[med-svn] [tophat] 01/01: Imported Upstream version 2.0.10

Andreas Tille tille at debian.org
Tue Jan 28 16:14:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch upstream
in repository tophat.

commit b2fc8e4ca8059bf42e6be372bdc3aa4c3c8488e9
Author: Andreas Tille <tille at debian.org>
Date:   Mon Jan 27 20:36:58 2014 +0100

    Imported Upstream version 2.0.10
---
 src/SeqAn-1.3/COPYING                              |  674 ++++
 src/SeqAn-1.3/README                               |   22 +
 src/SeqAn-1.3/seqan.h                              |   61 +
 src/SeqAn-1.3/seqan/LICENSE                        |   26 +
 src/SeqAn-1.3/seqan/align.h                        |   79 +
 src/SeqAn-1.3/seqan/align/align_algorithms.h       |  261 ++
 src/SeqAn-1.3/seqan/align/align_base.h             |  656 ++++
 src/SeqAn-1.3/seqan/align/align_cols_base.h        |  443 +++
 src/SeqAn-1.3/seqan/align/align_dynprog.h          |  578 ++++
 .../seqan/align/align_generated_forwards.h         | 1158 +++++++
 src/SeqAn-1.3/seqan/align/align_hirschberg.h       |  507 +++
 src/SeqAn-1.3/seqan/align/align_iterator_base.h    |  556 ++++
 src/SeqAn-1.3/seqan/align/align_local_dynprog.h    |  881 +++++
 .../seqan/align/align_local_dynprog_banded.h       |  585 ++++
 src/SeqAn-1.3/seqan/align/align_myers.h            | 1041 ++++++
 src/SeqAn-1.3/seqan/align/align_trace.h            |  424 +++
 src/SeqAn-1.3/seqan/align/gaps_array.h             | 1184 +++++++
 src/SeqAn-1.3/seqan/align/gaps_base.h              | 1335 ++++++++
 src/SeqAn-1.3/seqan/align/gaps_iterator_base.h     |  323 ++
 src/SeqAn-1.3/seqan/align/gaps_sumlist.h           |  938 ++++++
 src/SeqAn-1.3/seqan/align/hirschberg_set.h         |  223 ++
 src/SeqAn-1.3/seqan/align/matrix_base.h            | 1106 +++++++
 src/SeqAn-1.3/seqan/basic.h                        |  142 +
 src/SeqAn-1.3/seqan/basic/basic_aggregates.h       |  732 +++++
 .../seqan/basic/basic_allocator_chunkpool.h        |  335 ++
 .../seqan/basic/basic_allocator_interface.h        |  307 ++
 .../seqan/basic/basic_allocator_multipool.h        |  243 ++
 src/SeqAn-1.3/seqan/basic/basic_allocator_simple.h |  224 ++
 .../seqan/basic/basic_allocator_singlepool.h       |  312 ++
 src/SeqAn-1.3/seqan/basic/basic_allocator_to_std.h |  190 ++
 .../seqan/basic/basic_alphabet_interface.h         | 1104 +++++++
 .../seqan/basic/basic_alphabet_interface2.h        |  246 ++
 src/SeqAn-1.3/seqan/basic/basic_alphabet_simple.h  | 2357 +++++++++++++
 .../seqan/basic/basic_alphabet_simple_tabs.h       |  595 ++++
 .../seqan/basic/basic_alphabet_trait_basic.h       |  772 +++++
 src/SeqAn-1.3/seqan/basic/basic_compare.h          |   74 +
 src/SeqAn-1.3/seqan/basic/basic_converter.h        |  128 +
 src/SeqAn-1.3/seqan/basic/basic_counted_ptr.h      |  128 +
 src/SeqAn-1.3/seqan/basic/basic_debug.h            |  427 +++
 src/SeqAn-1.3/seqan/basic/basic_definition.h       |  429 +++
 src/SeqAn-1.3/seqan/basic/basic_forwards.h         |   81 +
 .../seqan/basic/basic_generated_forwards.h         | 2403 ++++++++++++++
 src/SeqAn-1.3/seqan/basic/basic_holder.h           | 1638 ++++++++++
 src/SeqAn-1.3/seqan/basic/basic_holder_dynamic.h   |  210 ++
 src/SeqAn-1.3/seqan/basic/basic_host.h             |  183 ++
 src/SeqAn-1.3/seqan/basic/basic_iterator.h         |  805 +++++
 .../seqan/basic/basic_iterator_adapt_std.h         |  449 +++
 src/SeqAn-1.3/seqan/basic/basic_iterator_adaptor.h |  587 ++++
 src/SeqAn-1.3/seqan/basic/basic_iterator_base.h    |  349 ++
 .../seqan/basic/basic_iterator_position.h          |  479 +++
 src/SeqAn-1.3/seqan/basic/basic_iterator_simple.h  |  130 +
 src/SeqAn-1.3/seqan/basic/basic_logvalue.h         |  330 ++
 src/SeqAn-1.3/seqan/basic/basic_metaprogramming.h  |  361 ++
 src/SeqAn-1.3/seqan/basic/basic_operator.h         |   44 +
 src/SeqAn-1.3/seqan/basic/basic_parallelism.h      |   64 +
 src/SeqAn-1.3/seqan/basic/basic_pointer.h          |  115 +
 src/SeqAn-1.3/seqan/basic/basic_profchar.h         |  213 ++
 src/SeqAn-1.3/seqan/basic/basic_profile.h          |  552 ++++
 src/SeqAn-1.3/seqan/basic/basic_proxy.h            |  632 ++++
 src/SeqAn-1.3/seqan/basic/basic_sse2.h             |  506 +++
 src/SeqAn-1.3/seqan/basic/basic_tag.h              |  251 ++
 src/SeqAn-1.3/seqan/basic/basic_testing.h          | 1687 ++++++++++
 src/SeqAn-1.3/seqan/basic/basic_transport.h        |  209 ++
 src/SeqAn-1.3/seqan/basic/basic_type.h             |  710 ++++
 src/SeqAn-1.3/seqan/basic/basic_volatile_ptr.h     |  171 +
 src/SeqAn-1.3/seqan/blast.h                        |   72 +
 src/SeqAn-1.3/seqan/blast/blast_base.h             |  197 ++
 .../seqan/blast/blast_generated_forwards.h         |  807 +++++
 src/SeqAn-1.3/seqan/blast/blast_hit.h              |  306 ++
 src/SeqAn-1.3/seqan/blast/blast_hit_iterator.h     |  441 +++
 src/SeqAn-1.3/seqan/blast/blast_hsp.h              | 1696 ++++++++++
 src/SeqAn-1.3/seqan/blast/blast_hsp_iterator.h     |  310 ++
 src/SeqAn-1.3/seqan/blast/blast_iterator.h         |   69 +
 src/SeqAn-1.3/seqan/blast/blast_parsing.h          |  137 +
 src/SeqAn-1.3/seqan/blast/blast_report.h           | 1170 +++++++
 src/SeqAn-1.3/seqan/blast/blast_run.h              |  418 +++
 src/SeqAn-1.3/seqan/blast/blast_stream_hit.h       |  135 +
 .../seqan/blast/blast_stream_hit_iterator.h        |  453 +++
 .../seqan/blast/blast_stream_hsp_iterator.h        |  435 +++
 src/SeqAn-1.3/seqan/blast/blast_stream_report.h    |  241 ++
 src/SeqAn-1.3/seqan/chaining.h                     |   75 +
 src/SeqAn-1.3/seqan/chaining/chain_base.h          |  371 +++
 src/SeqAn-1.3/seqan/chaining/chain_generic.h       |  260 ++
 src/SeqAn-1.3/seqan/chaining/chain_meta_fragment.h |  204 ++
 src/SeqAn-1.3/seqan/chaining/chain_point.h         |  497 +++
 src/SeqAn-1.3/seqan/chaining/chain_wrapper_point.h |  241 ++
 .../seqan/chaining/chaining_generated_forwards.h   | 1515 +++++++++
 src/SeqAn-1.3/seqan/chaining/fragment.h            |  402 +++
 src/SeqAn-1.3/seqan/chaining/geom_distribution.h   |   75 +
 src/SeqAn-1.3/seqan/chaining/range_max_tree.h      |   52 +
 src/SeqAn-1.3/seqan/chaining/range_tree.h          |   58 +
 src/SeqAn-1.3/seqan/chaining/rmt_base.h            |  310 ++
 src/SeqAn-1.3/seqan/chaining/rmt_common_algos.h    |  329 ++
 src/SeqAn-1.3/seqan/chaining/rmt_compl_algos.h     |  282 ++
 src/SeqAn-1.3/seqan/chaining/rmt_def_algos.h       |  119 +
 .../seqan/chaining/rmt_skip_base_element.h         |   59 +
 src/SeqAn-1.3/seqan/chaining/rmt_skip_element.h    |  126 +
 src/SeqAn-1.3/seqan/chaining/rt_base.h             |  345 ++
 src/SeqAn-1.3/seqan/chaining/rt_common_algos.h     |  212 ++
 src/SeqAn-1.3/seqan/chaining/rt_impl.h             |  162 +
 .../seqan/chaining/rt_skip_base_element.h          |   72 +
 src/SeqAn-1.3/seqan/chaining/rt_skip_element.h     |  244 ++
 src/SeqAn-1.3/seqan/chaining/rt_sl_base.h          |  368 +++
 src/SeqAn-1.3/seqan/chaining/rt_sl_compl_algos.h   |  164 +
 src/SeqAn-1.3/seqan/chaining/rt_sl_def_algos.h     |  144 +
 src/SeqAn-1.3/seqan/chaining/rt_sl_impl.h          |  243 ++
 src/SeqAn-1.3/seqan/chaining/score_chain.h         |   54 +
 src/SeqAn-1.3/seqan/chaining/score_chain_sop.h     |  248 ++
 src/SeqAn-1.3/seqan/chaining/score_manhattan.h     |  188 ++
 src/SeqAn-1.3/seqan/chaining/score_zero.h          |  152 +
 src/SeqAn-1.3/seqan/chaining/skip_base_element.h   |  888 +++++
 src/SeqAn-1.3/seqan/chaining/skip_element.h        |  457 +++
 src/SeqAn-1.3/seqan/chaining/skip_list.h           |   69 +
 src/SeqAn-1.3/seqan/chaining/skip_list_base.h      | 1016 ++++++
 src/SeqAn-1.3/seqan/chaining/skip_list_dynamic.h   |  468 +++
 src/SeqAn-1.3/seqan/chaining/skip_list_impl.h      |  701 ++++
 src/SeqAn-1.3/seqan/chaining/skip_list_iterator.h  |  279 ++
 src/SeqAn-1.3/seqan/chaining/skip_list_type.h      |  391 +++
 src/SeqAn-1.3/seqan/chaining/skip_pool_alloc.h     |  377 +++
 src/SeqAn-1.3/seqan/chaining/tree_chain.h          |  130 +
 src/SeqAn-1.3/seqan/chaining/tree_chain_sop.h      |  202 ++
 src/SeqAn-1.3/seqan/chaining/tree_chain_utils.h    |  567 ++++
 src/SeqAn-1.3/seqan/consensus.h                    |   57 +
 src/SeqAn-1.3/seqan/consensus/consensus_base.h     | 1806 ++++++++++
 .../seqan/consensus/consensus_generated_forwards.h |  304 ++
 src/SeqAn-1.3/seqan/consensus/consensus_library.h  |  580 ++++
 src/SeqAn-1.3/seqan/consensus/consensus_realign.h  |  763 +++++
 src/SeqAn-1.3/seqan/consensus/consensus_score.h    |  388 +++
 src/SeqAn-1.3/seqan/file.h                         |  113 +
 src/SeqAn-1.3/seqan/file/chunk_collector.h         |  554 ++++
 src/SeqAn-1.3/seqan/file/cstream.h                 |  307 ++
 src/SeqAn-1.3/seqan/file/file_array.h              |  439 +++
 src/SeqAn-1.3/seqan/file/file_base.h               |  759 +++++
 src/SeqAn-1.3/seqan/file/file_cstyle.h             |  245 ++
 src/SeqAn-1.3/seqan/file/file_filereader.h         |  954 ++++++
 src/SeqAn-1.3/seqan/file/file_filereaderiterator.h |  157 +
 src/SeqAn-1.3/seqan/file/file_format.h             |  705 ++++
 src/SeqAn-1.3/seqan/file/file_format_cgviz.h       |  240 ++
 src/SeqAn-1.3/seqan/file/file_format_embl.h        |  639 ++++
 src/SeqAn-1.3/seqan/file/file_format_fasta.h       |  587 ++++
 src/SeqAn-1.3/seqan/file/file_format_fasta_align.h |  339 ++
 src/SeqAn-1.3/seqan/file/file_format_genbank.h     |  381 +++
 src/SeqAn-1.3/seqan/file/file_format_guess.h       |  116 +
 src/SeqAn-1.3/seqan/file/file_format_mmap.h        | 1372 ++++++++
 src/SeqAn-1.3/seqan/file/file_format_raw.h         |  319 ++
 src/SeqAn-1.3/seqan/file/file_forwards.h           |   56 +
 src/SeqAn-1.3/seqan/file/file_generated_forwards.h | 1371 ++++++++
 src/SeqAn-1.3/seqan/file/file_page.h               | 1093 +++++++
 src/SeqAn-1.3/seqan/file/file_page_raid0.h         |  209 ++
 src/SeqAn-1.3/seqan/file/meta.h                    |   48 +
 src/SeqAn-1.3/seqan/file/stream.h                  |  446 +++
 src/SeqAn-1.3/seqan/file/stream_algorithms.h       |  221 ++
 src/SeqAn-1.3/seqan/file/string_external.h         | 2081 ++++++++++++
 src/SeqAn-1.3/seqan/file/string_mmap.h             |  832 +++++
 src/SeqAn-1.3/seqan/find.h                         |   95 +
 src/SeqAn-1.3/seqan/find/find_abndm.h              |  639 ++++
 src/SeqAn-1.3/seqan/find/find_ahocorasick.h        |  323 ++
 src/SeqAn-1.3/seqan/find/find_base.h               |  885 +++++
 src/SeqAn-1.3/seqan/find/find_begin.h              |  395 +++
 src/SeqAn-1.3/seqan/find/find_bndm.h               |  261 ++
 src/SeqAn-1.3/seqan/find/find_bom.h                |  242 ++
 src/SeqAn-1.3/seqan/find/find_generated_forwards.h | 1062 ++++++
 src/SeqAn-1.3/seqan/find/find_hamming_simple.h     |  272 ++
 src/SeqAn-1.3/seqan/find/find_horspool.h           |  476 +++
 src/SeqAn-1.3/seqan/find/find_multi.h              |  160 +
 src/SeqAn-1.3/seqan/find/find_multiple_bfam.h      |  401 +++
 src/SeqAn-1.3/seqan/find/find_multiple_shiftand.h  |  436 +++
 src/SeqAn-1.3/seqan/find/find_myers_ukkonen.h      | 1677 ++++++++++
 src/SeqAn-1.3/seqan/find/find_pattern_base.h       |  398 +++
 src/SeqAn-1.3/seqan/find/find_pex.h                |  726 ++++
 src/SeqAn-1.3/seqan/find/find_score.h              |  500 +++
 src/SeqAn-1.3/seqan/find/find_set_horspool.h       |  301 ++
 src/SeqAn-1.3/seqan/find/find_shiftand.h           |  297 ++
 src/SeqAn-1.3/seqan/find/find_shiftor.h            |  332 ++
 src/SeqAn-1.3/seqan/find/find_simple.h             |  162 +
 src/SeqAn-1.3/seqan/find/find_wild_shiftand.h      |  689 ++++
 src/SeqAn-1.3/seqan/find/find_wumanber.h           |  482 +++
 src/SeqAn-1.3/seqan/find2.h                        |   79 +
 .../seqan/find2/find2_generated_forwards.h         |  477 +++
 src/SeqAn-1.3/seqan/find2/find_approx_dpsearch.h   |  603 ++++
 src/SeqAn-1.3/seqan/find2/find_approx_find_begin.h |  223 ++
 src/SeqAn-1.3/seqan/find2/find_base.h              |   83 +
 src/SeqAn-1.3/seqan/find2/find_exact_shiftand.h    |  495 +++
 src/SeqAn-1.3/seqan/find2/find_exact_simple.h      |  346 ++
 src/SeqAn-1.3/seqan/find2/find_finder_default.h    |  157 +
 src/SeqAn-1.3/seqan/find2/find_hamming_simple.h    |  384 +++
 .../seqan/find2/find_multiple_exact_simple.h       |  473 +++
 .../seqan/find2/find_pattern_wild_shiftand.h       |  874 +++++
 src/SeqAn-1.3/seqan/find_motif.h                   |   75 +
 src/SeqAn-1.3/seqan/find_motif/em_algorithm.h      |  870 +++++
 src/SeqAn-1.3/seqan/find_motif/find_motif_base.h   |  366 +++
 .../find_motif/find_motif_epatternbranching.h      |  768 +++++
 .../find_motif/find_motif_generated_forwards.h     |  472 +++
 src/SeqAn-1.3/seqan/find_motif/find_motif_pms1.h   |  822 +++++
 src/SeqAn-1.3/seqan/find_motif/find_motif_pmsp.h   |  792 +++++
 .../seqan/find_motif/find_motif_projection.h       | 1256 +++++++
 .../seqan/find_motif/frequency_distribution.h      |  641 ++++
 src/SeqAn-1.3/seqan/find_motif/profile.h           |  242 ++
 src/SeqAn-1.3/seqan/find_motif/pseudocount_base.h  |   80 +
 .../seqan/find_motif/pseudocount_mode_c.h          |  165 +
 .../seqan/find_motif/pseudocount_mode_p.h          |  165 +
 .../seqan/find_motif/sequence_model_types.h        |  136 +
 src/SeqAn-1.3/seqan/graph_algorithms.h             |   55 +
 .../seqan/graph_algorithms/graph_algorithm.h       | 1991 +++++++++++
 .../graph_algorithms/graph_algorithm_heap_tree.h   |  514 +++
 .../seqan/graph_algorithms/graph_algorithm_hmm.h   | 1162 +++++++
 .../graph_algorithms/graph_algorithm_lis_his.h     |  405 +++
 .../graph_algorithms_generated_forwards.h          |  424 +++
 src/SeqAn-1.3/seqan/graph_align.h                  |   59 +
 .../seqan/graph_align/graph_align_banded_gotoh.h   |  348 ++
 .../graph_align_banded_needleman_wunsch.h          |  508 +++
 .../graph_align_banded_smith_waterman_clump.h      |  356 ++
 src/SeqAn-1.3/seqan/graph_align/graph_align_base.h |  280 ++
 .../seqan/graph_align/graph_align_config.h         |  571 ++++
 .../graph_align/graph_align_generated_forwards.h   |  327 ++
 .../seqan/graph_align/graph_align_gotoh.h          |  327 ++
 .../seqan/graph_align/graph_align_hirschberg.h     |  529 +++
 .../seqan/graph_align/graph_align_interface.h      |  454 +++
 .../graph_align/graph_align_needleman_wunsch.h     |  288 ++
 .../seqan/graph_align/graph_align_smith_waterman.h |  388 +++
 .../graph_align/graph_align_smith_waterman_clump.h |  125 +
 src/SeqAn-1.3/seqan/graph_msa.h                    |   59 +
 .../seqan/graph_msa/graph_align_tcoffee_base.h     | 1050 ++++++
 .../seqan/graph_msa/graph_align_tcoffee_distance.h |  222 ++
 .../graph_msa/graph_align_tcoffee_guidetree.h      |  882 +++++
 .../seqan/graph_msa/graph_align_tcoffee_io.h       | 1042 ++++++
 .../seqan/graph_msa/graph_align_tcoffee_kmer.h     |  153 +
 .../seqan/graph_msa/graph_align_tcoffee_library.h  |  544 +++
 .../seqan/graph_msa/graph_align_tcoffee_msa.h      |  483 +++
 .../graph_msa/graph_align_tcoffee_progressive.h    |  489 +++
 .../graph_msa/graph_align_tcoffee_refinement.h     |  515 +++
 .../seqan/graph_msa/graph_msa_generated_forwards.h |  541 +++
 src/SeqAn-1.3/seqan/graph_types.h                  |   89 +
 src/SeqAn-1.3/seqan/graph_types/graph_base.h       |  285 ++
 src/SeqAn-1.3/seqan/graph_types/graph_drawing.h    |  937 ++++++
 src/SeqAn-1.3/seqan/graph_types/graph_edgestump.h  | 1046 ++++++
 src/SeqAn-1.3/seqan/graph_types/graph_idmanager.h  |  480 +++
 .../seqan/graph_types/graph_impl_automaton.h       | 1008 ++++++
 .../seqan/graph_types/graph_impl_directed.h        | 1010 ++++++
 .../seqan/graph_types/graph_impl_fragment.h        |  452 +++
 src/SeqAn-1.3/seqan/graph_types/graph_impl_hmm.h   | 1051 ++++++
 .../seqan/graph_types/graph_impl_oracle.h          |  265 ++
 src/SeqAn-1.3/seqan/graph_types/graph_impl_tree.h  | 1101 +++++++
 src/SeqAn-1.3/seqan/graph_types/graph_impl_trie.h  |  275 ++
 .../seqan/graph_types/graph_impl_undirected.h      |  819 +++++
 .../seqan/graph_types/graph_impl_wordgraph.h       |  287 ++
 src/SeqAn-1.3/seqan/graph_types/graph_interface.h  |  465 +++
 src/SeqAn-1.3/seqan/graph_types/graph_iterator.h   |   97 +
 .../seqan/graph_types/graph_iterator_adjacency.h   |  346 ++
 .../seqan/graph_types/graph_iterator_bfs.h         |  302 ++
 .../seqan/graph_types/graph_iterator_dfs.h         |  305 ++
 .../seqan/graph_types/graph_iterator_edge.h        |  481 +++
 .../seqan/graph_types/graph_iterator_outedge.h     | 1225 +++++++
 .../seqan/graph_types/graph_iterator_vertex.h      |  473 +++
 src/SeqAn-1.3/seqan/graph_types/graph_property.h   |  759 +++++
 .../graph_types/graph_types_generated_forwards.h   | 1374 ++++++++
 .../seqan/graph_types/graph_utility_parsing.h      |   90 +
 src/SeqAn-1.3/seqan/index.h                        |  162 +
 src/SeqAn-1.3/seqan/index/find_index.h             |  312 ++
 src/SeqAn-1.3/seqan/index/find_index_approx.h      |  229 ++
 src/SeqAn-1.3/seqan/index/find_index_esa.h         | 1944 +++++++++++
 src/SeqAn-1.3/seqan/index/find_index_qgram.h       |   97 +
 src/SeqAn-1.3/seqan/index/find_quasar.h            |  167 +
 src/SeqAn-1.3/seqan/index/find_swift.h             | 1956 +++++++++++
 src/SeqAn-1.3/seqan/index/index_base.h             | 1181 +++++++
 src/SeqAn-1.3/seqan/index/index_bwt.h              |  313 ++
 src/SeqAn-1.3/seqan/index/index_childtab.h         |  328 ++
 src/SeqAn-1.3/seqan/index/index_dfi.h              |  599 ++++
 src/SeqAn-1.3/seqan/index/index_esa_algs.h         | 1010 ++++++
 src/SeqAn-1.3/seqan/index/index_esa_algs_multi.h   |  720 ++++
 src/SeqAn-1.3/seqan/index/index_esa_base.h         |  434 +++
 src/SeqAn-1.3/seqan/index/index_esa_drawing.h      |  108 +
 src/SeqAn-1.3/seqan/index/index_esa_stree.h        | 2288 +++++++++++++
 .../seqan/index/index_generated_forwards.h         | 3450 ++++++++++++++++++++
 src/SeqAn-1.3/seqan/index/index_lcp.h              |  531 +++
 src/SeqAn-1.3/seqan/index/index_lcp_tree.h         |  178 +
 src/SeqAn-1.3/seqan/index/index_manual_forwards.h  |   69 +
 src/SeqAn-1.3/seqan/index/index_pizzachili.h       |  384 +++
 src/SeqAn-1.3/seqan/index/index_pizzachili_find.h  |  174 +
 .../seqan/index/index_pizzachili_string.h          |  803 +++++
 src/SeqAn-1.3/seqan/index/index_qgram.h            | 2416 ++++++++++++++
 .../seqan/index/index_qgram_openaddressing.h       |  341 ++
 src/SeqAn-1.3/seqan/index/index_sa_btree.h         |  133 +
 src/SeqAn-1.3/seqan/index/index_sa_bwtwalk.h       |  660 ++++
 src/SeqAn-1.3/seqan/index/index_sa_lss.h           |  451 +++
 src/SeqAn-1.3/seqan/index/index_sa_mm.h            |  201 ++
 src/SeqAn-1.3/seqan/index/index_sa_qsort.h         |  241 ++
 src/SeqAn-1.3/seqan/index/index_shawarma.h         |   93 +
 src/SeqAn-1.3/seqan/index/index_shims.h            |  872 +++++
 src/SeqAn-1.3/seqan/index/index_skew3.h            |  544 +++
 src/SeqAn-1.3/seqan/index/index_skew7.h            |  853 +++++
 src/SeqAn-1.3/seqan/index/index_skew7_multi.h      |  424 +++
 src/SeqAn-1.3/seqan/index/index_wotd.h             | 1994 +++++++++++
 src/SeqAn-1.3/seqan/index/pipe_merger3.h           |  167 +
 src/SeqAn-1.3/seqan/index/pipe_merger7.h           |  520 +++
 src/SeqAn-1.3/seqan/index/pizzachili_api.h         |  182 ++
 src/SeqAn-1.3/seqan/index/pump_extender3.h         |  136 +
 src/SeqAn-1.3/seqan/index/pump_extender7.h         |  514 +++
 src/SeqAn-1.3/seqan/index/pump_lcp_core.h          |  391 +++
 src/SeqAn-1.3/seqan/index/pump_separator7.h        |   85 +
 src/SeqAn-1.3/seqan/index/radix.h                  |  195 ++
 src/SeqAn-1.3/seqan/index/repeat_base.h            |  325 ++
 src/SeqAn-1.3/seqan/index/shape_base.h             |  750 +++++
 src/SeqAn-1.3/seqan/index/shape_gapped.h           |  661 ++++
 src/SeqAn-1.3/seqan/index/shape_onegapped.h        |  376 +++
 src/SeqAn-1.3/seqan/index/shape_predefined.h       |  128 +
 src/SeqAn-1.3/seqan/index/shape_threshold.h        | 1124 +++++++
 src/SeqAn-1.3/seqan/map.h                          |   68 +
 src/SeqAn-1.3/seqan/map/map_adapter_stl.h          |  753 +++++
 src/SeqAn-1.3/seqan/map/map_base.h                 |  253 ++
 src/SeqAn-1.3/seqan/map/map_chooser.h              |   66 +
 src/SeqAn-1.3/seqan/map/map_generated_forwards.h   |  581 ++++
 src/SeqAn-1.3/seqan/map/map_skiplist.h             | 1163 +++++++
 src/SeqAn-1.3/seqan/map/map_vector.h               |  512 +++
 src/SeqAn-1.3/seqan/map/sumlist.h                  |  214 ++
 src/SeqAn-1.3/seqan/map/sumlist_mini.h             |  976 ++++++
 src/SeqAn-1.3/seqan/map/sumlist_skip.h             | 1124 +++++++
 src/SeqAn-1.3/seqan/misc/edit_environment.h        |  883 +++++
 src/SeqAn-1.3/seqan/misc/misc_base.h               |  124 +
 src/SeqAn-1.3/seqan/misc/misc_cmdparser.h          | 1722 ++++++++++
 src/SeqAn-1.3/seqan/misc/misc_dequeue.h            |  369 +++
 src/SeqAn-1.3/seqan/misc/misc_generated_forwards.h | 1123 +++++++
 src/SeqAn-1.3/seqan/misc/misc_interval_tree.h      | 1715 ++++++++++
 src/SeqAn-1.3/seqan/misc/misc_long_word.h          |  850 +++++
 src/SeqAn-1.3/seqan/misc/misc_map.h                |  218 ++
 src/SeqAn-1.3/seqan/misc/misc_parsing.h            |  622 ++++
 src/SeqAn-1.3/seqan/misc/misc_random.h             |  287 ++
 src/SeqAn-1.3/seqan/misc/misc_set.h                |  613 ++++
 src/SeqAn-1.3/seqan/misc/misc_svg.h                |  470 +++
 src/SeqAn-1.3/seqan/misc/priority_type_base.h      |   82 +
 src/SeqAn-1.3/seqan/misc/priority_type_heap.h      |  357 ++
 src/SeqAn-1.3/seqan/modifier.h                     |   70 +
 src/SeqAn-1.3/seqan/modifier/modifier_alphabet.h   |  774 +++++
 .../seqan/modifier/modifier_alphabet_expansion.h   |  494 +++
 src/SeqAn-1.3/seqan/modifier/modifier_functors.h   |  228 ++
 .../seqan/modifier/modifier_generated_forwards.h   |  717 ++++
 src/SeqAn-1.3/seqan/modifier/modifier_iterator.h   |  706 ++++
 src/SeqAn-1.3/seqan/modifier/modifier_reverse.h    |  628 ++++
 src/SeqAn-1.3/seqan/modifier/modifier_shortcuts.h  |  516 +++
 src/SeqAn-1.3/seqan/modifier/modifier_string.h     |  653 ++++
 src/SeqAn-1.3/seqan/modifier/modifier_view.h       |  420 +++
 src/SeqAn-1.3/seqan/parallel.h                     |   58 +
 .../seqan/parallel/parallel_atomic_misc.h          |  116 +
 .../seqan/parallel/parallel_atomic_primitives.h    |  291 ++
 .../seqan/parallel/parallel_generated_forwards.h   |   55 +
 src/SeqAn-1.3/seqan/parallel/parallel_macros.h     |   59 +
 src/SeqAn-1.3/seqan/pipe.h                         |   83 +
 src/SeqAn-1.3/seqan/pipe/pipe_base.h               |  857 +++++
 src/SeqAn-1.3/seqan/pipe/pipe_caster.h             |  110 +
 src/SeqAn-1.3/seqan/pipe/pipe_counter.h            |  106 +
 src/SeqAn-1.3/seqan/pipe/pipe_echoer.h             |  154 +
 src/SeqAn-1.3/seqan/pipe/pipe_edit_environment.h   |  348 ++
 src/SeqAn-1.3/seqan/pipe/pipe_filter.h             |  121 +
 src/SeqAn-1.3/seqan/pipe/pipe_generated_forwards.h |  738 +++++
 src/SeqAn-1.3/seqan/pipe/pipe_iterator.h           |  264 ++
 src/SeqAn-1.3/seqan/pipe/pipe_joiner.h             |  130 +
 src/SeqAn-1.3/seqan/pipe/pipe_namer.h              |  138 +
 src/SeqAn-1.3/seqan/pipe/pipe_sampler.h            |  540 +++
 src/SeqAn-1.3/seqan/pipe/pipe_shifter.h            |  167 +
 src/SeqAn-1.3/seqan/pipe/pipe_source.h             |  408 +++
 src/SeqAn-1.3/seqan/pipe/pipe_tupler.h             |  507 +++
 src/SeqAn-1.3/seqan/pipe/pool_base.h               | 1262 +++++++
 src/SeqAn-1.3/seqan/pipe/pool_mapper.h             |  697 ++++
 src/SeqAn-1.3/seqan/pipe/pool_sorter.h             |  479 +++
 src/SeqAn-1.3/seqan/platform.h                     |   46 +
 src/SeqAn-1.3/seqan/platform/platform_gcc.h        |   86 +
 .../seqan/platform/platform_generated_forwards.h   |   55 +
 src/SeqAn-1.3/seqan/platform/platform_mingw.h      |   65 +
 src/SeqAn-1.3/seqan/platform/platform_solaris.h    |   58 +
 src/SeqAn-1.3/seqan/platform/platform_windows.h    |   81 +
 src/SeqAn-1.3/seqan/random.h                       |   70 +
 src/SeqAn-1.3/seqan/random/ext_MersenneTwister.h   |  468 +++
 src/SeqAn-1.3/seqan/random/random_base.h           |  155 +
 .../seqan/random/random_generated_forwards.h       |  251 ++
 src/SeqAn-1.3/seqan/random/random_geometric.h      |  129 +
 src/SeqAn-1.3/seqan/random/random_lognormal.h      |  157 +
 src/SeqAn-1.3/seqan/random/random_mt19937.h        |  120 +
 src/SeqAn-1.3/seqan/random/random_normal.h         |  134 +
 src/SeqAn-1.3/seqan/random/random_rng_functor.h    |  127 +
 src/SeqAn-1.3/seqan/random/random_shuffle.h        |   88 +
 src/SeqAn-1.3/seqan/random/random_uniform.h        |  147 +
 src/SeqAn-1.3/seqan/refinement.h                   |   67 +
 .../refinement/graph_algorithm_refine_align.h      |  186 ++
 .../refinement/graph_algorithm_refine_aligngraph.h |  292 ++
 .../refinement/graph_algorithm_refine_annotation.h |  396 +++
 .../refinement/graph_algorithm_refine_exact.h      |  567 ++++
 .../graph_algorithm_refine_exact_iterative.h       |  666 ++++
 .../refinement/graph_algorithm_refine_fragment.h   |  208 ++
 .../refinement/graph_algorithm_refine_inexact.h    |  300 ++
 .../refinement/graph_algorithm_refine_scoring.h    |   63 +
 src/SeqAn-1.3/seqan/refinement/graph_impl_align.h  | 2079 ++++++++++++
 .../seqan/refinement/graph_impl_align_adapt.h      |  425 +++
 .../refinement/refinement_generated_forwards.h     |  568 ++++
 src/SeqAn-1.3/seqan/score.h                        |   52 +
 src/SeqAn-1.3/seqan/score/score_base.h             |  211 ++
 src/SeqAn-1.3/seqan/score/score_edit.h             |  142 +
 .../seqan/score/score_generated_forwards.h         |  350 ++
 src/SeqAn-1.3/seqan/score/score_matrix.h           |  602 ++++
 src/SeqAn-1.3/seqan/score/score_matrix_data.h      |  692 ++++
 src/SeqAn-1.3/seqan/score/score_simple.h           |  372 +++
 src/SeqAn-1.3/seqan/seeds.h                        |   64 +
 src/SeqAn-1.3/seqan/seeds/banded_align.h           |  711 ++++
 src/SeqAn-1.3/seqan/seeds/banded_chain_align.h     | 1310 ++++++++
 .../seqan/seeds/banded_chain_align_affine.h        | 1680 ++++++++++
 src/SeqAn-1.3/seqan/seeds/global_seed_chain.h      |  306 ++
 src/SeqAn-1.3/seqan/seeds/memoryManager_base.h     |  389 +++
 src/SeqAn-1.3/seqan/seeds/memoryManager_int.h      |  337 ++
 src/SeqAn-1.3/seqan/seeds/propertyMap.h            |  239 ++
 src/SeqAn-1.3/seqan/seeds/seedHandlingTags.h       |  168 +
 src/SeqAn-1.3/seqan/seeds/seedSet_base.h           | 1691 ++++++++++
 src/SeqAn-1.3/seqan/seeds/seedSet_iterator.h       |  316 ++
 src/SeqAn-1.3/seqan/seeds/seedSet_score.h          | 2136 ++++++++++++
 src/SeqAn-1.3/seqan/seeds/seed_base.h              | 1089 ++++++
 src/SeqAn-1.3/seqan/seeds/seed_multi.h             |  755 +++++
 .../seqan/seeds/seeds_generated_forwards.h         |  860 +++++
 src/SeqAn-1.3/seqan/seeds2.h                       |   96 +
 src/SeqAn-1.3/seqan/seeds2/align_chain_banded.h    |  828 +++++
 src/SeqAn-1.3/seqan/seeds2/align_dynprog_affine.h  |  516 +++
 .../seqan/seeds2/align_dynprog_banded_affine.h     |  563 ++++
 .../seqan/seeds2/align_dynprog_banded_linear.h     |  495 +++
 src/SeqAn-1.3/seqan/seeds2/align_dynprog_linear.h  |  461 +++
 src/SeqAn-1.3/seqan/seeds2/basic_iter_indirect.h   |  171 +
 .../seqan/seeds2/seeds2_generated_forwards.h       |  747 +++++
 src/SeqAn-1.3/seqan/seeds2/seeds_base.h            |   42 +
 src/SeqAn-1.3/seqan/seeds2/seeds_combination.h     |  464 +++
 src/SeqAn-1.3/seqan/seeds2/seeds_extension.h       |  735 +++++
 src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining.h |  258 ++
 .../seqan/seeds2/seeds_global_chaining_base.h      |   44 +
 .../seqan/seeds2/seeds_global_chaining_gusfield.h  |   48 +
 src/SeqAn-1.3/seqan/seeds2/seeds_seed_base.h       |  570 ++++
 src/SeqAn-1.3/seqan/seeds2/seeds_seed_chained.h    |  419 +++
 src/SeqAn-1.3/seqan/seeds2/seeds_seed_diagonal.h   |  130 +
 src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_base.h   |  283 ++
 .../seqan/seeds2/seeds_seed_set_non_scored.h       |   69 +
 src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_scored.h |   69 +
 .../seqan/seeds2/seeds_seed_set_unordered.h        |  384 +++
 src/SeqAn-1.3/seqan/seeds2/seeds_seed_simple.h     |  328 ++
 src/SeqAn-1.3/seqan/sequence.h                     |  114 +
 src/SeqAn-1.3/seqan/sequence/adapt_array_pointer.h |  837 +++++
 src/SeqAn-1.3/seqan/sequence/adapt_std_list.h      |  300 ++
 src/SeqAn-1.3/seqan/sequence/adapt_std_string.h    |  693 ++++
 src/SeqAn-1.3/seqan/sequence/adapt_std_vector.h    |  708 ++++
 src/SeqAn-1.3/seqan/sequence/iter_concat_virtual.h |  516 +++
 src/SeqAn-1.3/seqan/sequence/segment_base.h        | 1358 ++++++++
 src/SeqAn-1.3/seqan/sequence/segment_infix.h       |  900 +++++
 src/SeqAn-1.3/seqan/sequence/segment_prefix.h      |  748 +++++
 src/SeqAn-1.3/seqan/sequence/segment_suffix.h      |  744 +++++
 .../seqan/sequence/sequence_concatenator.h         |  255 ++
 src/SeqAn-1.3/seqan/sequence/sequence_forwards.h   |   84 +
 .../seqan/sequence/sequence_generated_forwards.h   | 2138 ++++++++++++
 src/SeqAn-1.3/seqan/sequence/sequence_interface.h  | 1700 ++++++++++
 src/SeqAn-1.3/seqan/sequence/sequence_lexical.h    |  833 +++++
 src/SeqAn-1.3/seqan/sequence/sequence_shortcuts.h  |  271 ++
 src/SeqAn-1.3/seqan/sequence/sequence_stream.h     |  170 +
 src/SeqAn-1.3/seqan/sequence/string_alloc.h        |  438 +++
 src/SeqAn-1.3/seqan/sequence/string_array.h        |  288 ++
 src/SeqAn-1.3/seqan/sequence/string_base.h         | 1948 +++++++++++
 src/SeqAn-1.3/seqan/sequence/string_block.h        |  615 ++++
 src/SeqAn-1.3/seqan/sequence/string_cstyle.h       |  943 ++++++
 src/SeqAn-1.3/seqan/sequence/string_packed.h       | 1335 ++++++++
 src/SeqAn-1.3/seqan/sequence/string_set_base.h     | 1411 ++++++++
 .../seqan/sequence/string_set_concat_direct.h      |  469 +++
 .../seqan/sequence/string_set_dependent_generous.h |  262 ++
 .../seqan/sequence/string_set_dependent_tight.h    |  322 ++
 src/SeqAn-1.3/seqan/sequence/string_set_owner.h    |  283 ++
 src/SeqAn-1.3/seqan/sequence_journaled.h           |   81 +
 .../journal_entries_sorted_array.h                 |  476 +++
 .../journal_entries_unbalanced_tree.h              |  695 ++++
 .../journal_entries_unbalanced_tree_iterator.h     |  528 +++
 .../journal_entries_unbalanced_tree_node.h         |  145 +
 .../seqan/sequence_journaled/journal_entry.h       |  144 +
 .../seqan/sequence_journaled/sequence_journaled.h  |  536 +++
 .../sequence_journaled_forwards.h                  |   51 +
 .../sequence_journaled_generated_forwards.h        |  440 +++
 .../sequence_journaled_iterator.h                  |  480 +++
 src/SeqAn-1.3/seqan/statistics.h                   |   53 +
 src/SeqAn-1.3/seqan/statistics/statistics_base.h   |  501 +++
 .../statistics/statistics_generated_forwards.h     |  182 ++
 .../seqan/statistics/statistics_markov_model.h     |  834 +++++
 src/SeqAn-1.3/seqan/store.h                        |   78 +
 src/SeqAn-1.3/seqan/store/store_align.h            | 1932 +++++++++++
 src/SeqAn-1.3/seqan/store/store_align_intervals.h  |  357 ++
 src/SeqAn-1.3/seqan/store/store_all.h              | 2004 ++++++++++++
 src/SeqAn-1.3/seqan/store/store_annotation.h       |  705 ++++
 src/SeqAn-1.3/seqan/store/store_base.h             |  282 ++
 src/SeqAn-1.3/seqan/store/store_contig.h           |  205 ++
 .../seqan/store/store_generated_forwards.h         | 1276 ++++++++
 src/SeqAn-1.3/seqan/store/store_intervaltree.h     |  197 ++
 src/SeqAn-1.3/seqan/store/store_io.h               | 1213 +++++++
 src/SeqAn-1.3/seqan/store/store_io_bam.h           |  572 ++++
 src/SeqAn-1.3/seqan/store/store_io_gff.h           |  735 +++++
 src/SeqAn-1.3/seqan/store/store_io_sam.h           | 1133 +++++++
 src/SeqAn-1.3/seqan/store/store_io_ucsc.h          |  601 ++++
 src/SeqAn-1.3/seqan/store/store_library.h          |   94 +
 src/SeqAn-1.3/seqan/store/store_matepair.h         |  112 +
 src/SeqAn-1.3/seqan/store/store_read.h             |  101 +
 src/SeqAn-1.3/seqan/system.h                       |   93 +
 src/SeqAn-1.3/seqan/system/file_async.h            | 1035 ++++++
 src/SeqAn-1.3/seqan/system/file_directory.h        |  284 ++
 src/SeqAn-1.3/seqan/system/file_manual_forwards.h  |  160 +
 src/SeqAn-1.3/seqan/system/file_sync.h             |  421 +++
 src/SeqAn-1.3/seqan/system/system_base.h           |   65 +
 src/SeqAn-1.3/seqan/system/system_event.h          |  315 ++
 .../seqan/system/system_generated_forwards.h       |   55 +
 .../seqan/system/system_manual_forwards.h          |  124 +
 src/SeqAn-1.3/seqan/system/system_mutex.h          |  183 ++
 src/SeqAn-1.3/seqan/system/system_sema.h           |  149 +
 src/SeqAn-1.3/seqan/system/system_thread.h         |  215 ++
 508 files changed, 256841 insertions(+)

diff --git a/src/SeqAn-1.3/COPYING b/src/SeqAn-1.3/COPYING
new file mode 100755
index 0000000..818433e
--- /dev/null
+++ b/src/SeqAn-1.3/COPYING
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/src/SeqAn-1.3/README b/src/SeqAn-1.3/README
new file mode 100644
index 0000000..62a2e44
--- /dev/null
+++ b/src/SeqAn-1.3/README
@@ -0,0 +1,22 @@
+This is SeqAn, the C++ template library for sequence analysis
+
+See http://www.seqan.de/ for more information
+
+For detailed installation instructions read:
+http://trac.mi.fu-berlin.de/seqan/wiki/Tutorial/GettingStarted
+
+
+Folders:
+========
+
+"apps":  SeqAn applications
+"cmake": CMake files to create your own project files
+"demos": SeqAn demos, see also http://www.seqan.de/dddoc/html/INDEXPAGE_Demo.html
+"docs":  HTML-Documentation
+"seqan": SeqAn library (add the folder that contains "seqan" to
+         your include path)
+
+
+Have fun!
+
+Your SeqAn Team
diff --git a/src/SeqAn-1.3/seqan.h b/src/SeqAn-1.3/seqan.h
new file mode 100644
index 0000000..cb90271
--- /dev/null
+++ b/src/SeqAn-1.3/seqan.h
@@ -0,0 +1,61 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  This is the musketeer header ("one for all and all for one").
+// ==========================================================================
+
+#ifndef SEQAN_H_
+#define SEQAN_H_
+
+#include <seqan/align.h>
+#include <seqan/basic.h>
+#include <seqan/blast.h>
+#include <seqan/chaining.h>
+#include <seqan/consensus.h>
+#include <seqan/file.h>
+#include <seqan/find.h>
+#include <seqan/find_motif.h>
+#include <seqan/graph_algorithms.h>
+#include <seqan/graph_align.h>
+#include <seqan/graph_msa.h>
+#include <seqan/graph_types.h>
+#include <seqan/index.h>
+#include <seqan/map.h>
+#include <seqan/modifier.h>
+#include <seqan/pipe.h>
+#include <seqan/refinement.h>
+#include <seqan/score.h>
+#include <seqan/seeds.h>
+#include <seqan/sequence.h>
+#include <seqan/statistics.h>
+#include <seqan/system.h>
+
+#endif  // SEQAN_H_
diff --git a/src/SeqAn-1.3/seqan/LICENSE b/src/SeqAn-1.3/seqan/LICENSE
new file mode 100644
index 0000000..c5aece5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/LICENSE
@@ -0,0 +1,26 @@
+Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the <organization> nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/src/SeqAn-1.3/seqan/align.h b/src/SeqAn-1.3/seqan/align.h
new file mode 100644
index 0000000..f6c2ab0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align.h
@@ -0,0 +1,79 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_ALIGN_H_
+#define SEQAN_ALIGN_H_
+
+// ----------------------------------------------------------------------
+// Prerequisites.
+
+#include <cmath>
+#include <stack>
+#include <ostream>
+
+#include <seqan/sequence.h>
+#include <seqan/score.h>
+
+#include <seqan/map.h>
+#include <seqan/graph_align.h>
+#include <seqan/modifier.h>
+
+// ----------------------------------------------------------------------
+// The module's headers.
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/align/align_generated_forwards.h>
+#endif
+
+#include <seqan/align/gaps_base.h>
+#include <seqan/align/gaps_iterator_base.h>
+
+#include <seqan/align/gaps_array.h>
+#include <seqan/align/gaps_sumlist.h>
+
+#include <seqan/align/align_base.h>
+#include <seqan/align/align_cols_base.h>
+#include <seqan/align/align_iterator_base.h>
+
+#include <seqan/align/matrix_base.h>
+#include <seqan/misc/priority_type_base.h>
+#include <seqan/misc/priority_type_heap.h>
+
+#include <seqan/align/align_algorithms.h>
+#include <seqan/align/align_dynprog.h>
+#include <seqan/align/align_local_dynprog.h>
+#include <seqan/align/align_local_dynprog_banded.h>
+#include <seqan/align/hirschberg_set.h>
+#include <seqan/align/align_myers.h>
+#include <seqan/align/align_hirschberg.h>
+
+#endif  // SEQAN_ALIGN_H_
diff --git a/src/SeqAn-1.3/seqan/align/align_algorithms.h b/src/SeqAn-1.3/seqan/align/align_algorithms.h
new file mode 100644
index 0000000..0551e57
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_algorithms.h
@@ -0,0 +1,261 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_ALGORITHMS_H
+#define SEQAN_HEADER_ALIGN_ALGORITHMS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// _alignTracePrint: this function is called by various alignment algorithm
+// to build up the alignment during traceback
+
+template <typename TSize, typename TStringSet, typename TId, typename TPos, typename TTraceValue>
+inline void
+_alignTracePrint(AlignTraceback<TSize> & tb,
+				   TStringSet const &,
+				   TId const,
+				   TPos const,
+				   TId const,
+				   TPos const,
+				   TPos const segLen,
+				   TTraceValue const tv)
+{
+SEQAN_CHECKPOINT
+	appendValue(tb.sizes, segLen);
+	appendValue(tb.tvs, tv);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// _pumpTraceToAlign: build alignment accoring to the traceback stored in trace
+// note that the traceback in trace is "reverse" (from back to front)
+template <typename TSource, typename TSpec, typename TTrace> 
+void
+_pumpTraceToAlign(Align<TSource, TSpec> & align_,
+					TTrace trace)
+{
+SEQAN_CHECKPOINT
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Size<TAlign>::Type TSize;
+
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow>::Type TRowIterator;
+
+	//pump trace into align_ (note: this is relatively slow code here. it could be improved if specialized to the Align Specs)
+	clearGaps(align_);
+	clearClipping(align_);
+
+	TSize i = length(trace.sizes); //scan trace backwards
+	TRowIterator it0 = begin(row(align_, 0));
+	TRowIterator it1 = begin(row(align_, 1));
+	while (i > 0)
+	{
+		--i;
+		TSize siz = trace.sizes[i];
+		switch ((int) trace.tvs[i])
+		{
+		case 1: //horizontal:
+			insertGaps(it1, siz);
+			break;
+
+		case 2: //vertical:
+			insertGaps(it0, siz);
+			break;
+		}
+		goFurther(it0, siz);
+		goFurther(it1, siz);
+	}
+}
+
+/**
+.Function.integrateAlign:
+..summary:Integrates an alignment into another by copying the gaps.
+..cat:Alignments
+...type:Class.Align
+..signature:integrateAlign(align1, align2[, positions])
+..param.align1:Alignment object into which align2 is to be integrated.
+...type:Class.Align
+..param.align2:Alignment object that is to be integrated into align1.
+...type:Class.Align
+..param.positions:The integration positions in align1 for all rows (view positions).
+...type:Class.String
+..remarks:If the integration positions are not specified, the sources of align2 have to be @Metafunction.Infix at es of the sources of align1.
+..include:seqan/align.h
+ */
+template <typename TSource1, typename TSpec1, typename TSource2, typename TSpec2, typename TPos> 
+void
+integrateAlign(Align<TSource1, TSpec1> & align,
+			   Align<TSource2, TSpec2> const & infixAlign,
+			   String<TPos> viewPos) {
+SEQAN_CHECKPOINT
+	typedef Align<TSource1, TSpec1> TAlign;
+	typedef Align<TSource2, TSpec2> TInfixAlign;
+	typedef typename Size<TAlign>::Type TSize;
+	TSize maxLen = 0;
+
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Row<TInfixAlign>::Type TInfixRow;
+	TInfixRow infixRow;
+
+	// iterators on align and infixAlign
+	typename Iterator<TRow>::Type it;
+	typename Iterator<TInfixRow>::Type infixIt, infixEnd;
+	
+	for (TSize i = 0; i < length(rows(align)); ++i) {
+		infixRow = row(infixAlign, i);
+
+		// init iterators
+		it = iter(row(align, i), value(viewPos, i));
+		infixIt = begin(infixRow);
+		infixEnd = end(infixRow);
+		
+		// insert leading gaps
+		if (beginPosition(infixRow) != 0) {
+			insertGaps(it, beginPosition(infixRow));
+			goFurther(it, beginPosition(infixRow));
+		}
+
+		// walk through Gaps containers and copy gaps
+		while (infixIt != infixEnd) {
+			TSize gapSize = countGaps(infixIt);
+			if (gapSize != 0) {
+				insertGaps(it, gapSize);
+			}
+			goFurther(it, gapSize+1);
+			goFurther(infixIt, gapSize+1);
+		}
+
+		// find longest row
+		if (maxLen < endPosition(infixRow)) {
+			maxLen = endPosition(infixRow);
+		}
+	}
+
+	// insert trailing gaps
+	for (TSize i = 0; i < length(rows(align)); ++i) {
+		infixRow = row(infixAlign, i);
+		TSize diffLen = maxLen - endPosition(infixRow);
+		if (diffLen > 0) {
+			insertGaps(iter(row(align, i), value(viewPos, i) + endPosition(infixRow)), diffLen);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSpec1, typename TSpec2> 
+void
+integrateAlign(Align<TSource, TSpec1> & align,
+			   Align<typename Infix<TSource>::Type, TSpec2> const & infixAlign) {
+SEQAN_CHECKPOINT
+	typedef typename Size<TSource>::Type TSize;
+	typedef typename Position<typename Row<Align<TSource, TSpec1> >::Type>::Type TPos;
+
+	String<TPos> viewPos;
+	TPos pos;
+	for (TSize i = 0; i < length(rows(infixAlign)); ++i) {
+		pos = beginPosition(source(row(infixAlign, i))) + clippedBeginPosition(row(infixAlign, i));
+		appendValue(viewPos, toViewPosition(row(align, i), pos));
+	}
+
+	integrateAlign(align, infixAlign, viewPos);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// globalAlignment Interface
+
+//____________________________________________________________________________
+//notational sugar
+
+template <typename TAlign, typename TScoreValue, typename TScoreSpec>
+TScoreValue
+globalAlignment(TAlign & align_,
+				Score<TScoreValue, TScoreSpec> const & score_)
+{
+SEQAN_CHECKPOINT
+	if (scoreGapOpen(score_)==scoreGapExtend(score_))
+	{//linear gap costs
+		return globalAlignment(align_, score_, NeedlemanWunsch());
+	}
+	else
+	{//affine gap costs
+		return globalAlignment(align_, score_, Gotoh());
+	}
+}
+
+
+//____________________________________________________________________________
+// for Align
+
+template <typename TSource, typename TSpec, typename TScoreValue, typename TScoreSpec, typename TAlignConfig, typename TAlgorithm>
+TScoreValue
+globalAlignment(Align<TSource, TSpec> & align_,
+				Score<TScoreValue, TScoreSpec> const & score_,
+				TAlignConfig tag_align_config,
+				TAlgorithm tag_algorithm)
+{
+SEQAN_CHECKPOINT
+
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Size<TAlign>::Type TSize;
+
+	AlignTraceback<TSize> trace;
+
+	TScoreValue ret_score =  _globalAlignment(trace, stringSet(align_), score_, tag_align_config, tag_algorithm);
+
+	_pumpTraceToAlign(align_, trace);
+
+	return ret_score;
+}
+
+template <typename TSource, typename TSpec, typename TScoreValue, typename TScoreSpec, typename TAlgorithm>
+TScoreValue
+globalAlignment(Align<TSource, TSpec> & align_,
+				Score<TScoreValue, TScoreSpec> const & score_,
+				TAlgorithm tag_algorithm)
+{
+SEQAN_CHECKPOINT
+
+	return globalAlignment(align_, score_, AlignConfig<>(), tag_algorithm);
+}
+
+
+
+//____________________________________________________________________________
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/align_base.h b/src/SeqAn-1.3/seqan/align/align_base.h
new file mode 100644
index 0000000..cdf11c9
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_base.h
@@ -0,0 +1,656 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_BASE_H
+#define SEQAN_HEADER_ALIGN_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment Specific Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Cols:
+..summary:Type of column container of an alignment.
+..signature:Cols<T>::Type
+..param.T:An alignment type.
+...type:Class.Align
+..returns.param.Type:The type of the container that allows access to the columns of $T$.
+..include:seqan/align.h
+*/
+template <typename T> struct Cols;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Col:
+..summary:Type of a column in an alignment.
+..signature:Col<T>::Type
+..param.T:An alignment type.
+...type:Class.Align
+..returns.param.Type:The column type of $T$.
+..remarks:The returned type is equivalent to $Value<Cols<T>::Type>::Type$.
+..see:Metafunction.Cols
+..see:Metafunction.Value
+..include:seqan/align.h
+*/
+template <typename T>
+struct Col:
+	Value<typename Cols<T>::Type>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Rows:
+..summary:Type of row container of an alignment.
+..signature:Rows<T>::Type
+..param.T:An alignment type.
+...type:Class.Align
+..returns.param.Type:The type of the container that allows access to the rows of $T$.
+..see:Metafunction.Cols
+..include:seqan/align.h
+*/
+template <typename T> struct Rows;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Row:
+..summary:Type of a row in an alignment.
+..signature:Row<T>::Type
+..param.T:An alignment type.
+...type:Class.Align
+..returns.param.Type:The row type of $T$.
+..remarks:The returned type is equivalent to $Value<Rows<T>::Type>::Type$.
+..see:Metafunction.Rows
+..see:Metafunction.Value
+..include:seqan/align.h
+*/
+template <typename T>
+struct Row:
+	Value<typename Rows<T>::Type>
+{
+};
+
+template <typename T>
+struct Row<T const> {
+	typedef typename Row<T>::Type const Type;
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Align
+//////////////////////////////////////////////////////////////////////////////
+//Default implementation: array of Gaps objects
+
+/**
+.Class.Align:
+..cat:Alignments
+..summary:An alignment of sequences.
+..signature:Align<TSource, TSpec>
+..param.TSource:Type of the ungapped sequences.
+...metafunction:Metafunction.Source
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...XXdefault:@Spec.ArrayGaps@
+..remarks:The default implementation of $Align$ stores the alignment in a set of @Class.Gaps.Gaps<TSource.TSpec>@ objects.
+ Hence, the default implementation is row-based, so it will be faster to access the alignment row-wise than column-wise.
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec = ArrayGaps>
+class Align
+{
+public:
+	typedef Gaps<TSource, TSpec> TGaps;
+	typedef String<TGaps> TRows;
+	typedef typename Size<TRows>::Type TRowsSize;
+
+	TRows data_rows;
+
+//____________________________________________________________________________
+public:
+	Align()
+	{
+SEQAN_CHECKPOINT
+	}
+	Align(Align const & _other):
+		data_rows(_other.data_rows)
+	{
+SEQAN_CHECKPOINT
+	}
+	template <typename TString, typename TStringsetSpec>
+	Align(StringSet<TString, TStringsetSpec> & stringset)
+	{
+SEQAN_CHECKPOINT
+		setStrings(*this, stringset);
+	}
+	~Align()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Align const &
+	operator = (Align const & _other)
+	{
+SEQAN_CHECKPOINT
+		data_rows = _other.data_rows;
+		return *this;
+	}
+
+//____________________________________________________________________________
+};
+
+template <typename TSource, typename TSpec>
+inline
+void move(Align<TSource, TSpec> & target, Align<TSource, TSpec> & source)
+{
+    SEQAN_CHECKPOINT;
+    move(target.data_rows, source.data_rows);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//ALIGN INTERFACE
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.Align
+
+template <typename TSource, typename TSpec>
+struct Value<Align<TSource, TSpec> >:
+	Value<Gaps<TSource, TSpec> >
+{
+};
+template <typename TSource, typename TSpec>
+struct Value<Align<TSource, TSpec> const>:
+	Value<Gaps<TSource, TSpec> const>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.GetValue.param.T.type:Class.Align
+
+template <typename TSource, typename TSpec>
+struct GetValue<Align<TSource, TSpec> >:
+	GetValue<Gaps<TSource, TSpec> >
+{
+};
+template <typename TSource, typename TSpec>
+struct GetValue<Align<TSource, TSpec> const>:
+	GetValue<Gaps<TSource, TSpec> const>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Reference.param.T.type:Class.Align
+
+template <typename TSource, typename TSpec>
+struct Reference<Align<TSource, TSpec> >:
+	Reference<Gaps<TSource, TSpec> >
+{
+};
+template <typename TSource, typename TSpec>
+struct Reference<Align<TSource, TSpec> const>:
+	Reference<Gaps<TSource, TSpec> const>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+// struct Cols<Align>: see below (in align_cols_base)
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Rows.param.T.type:Class.Align
+
+template <typename TSource, typename TSpec>
+struct Rows<Align<TSource, TSpec> >
+{
+	typedef String<Gaps<TSource, TSpec> > Type;
+};
+template <typename TSource, typename TSpec>
+struct Rows<Align<TSource, TSpec> const>
+{
+	typedef String<Gaps<TSource, TSpec> > const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Source.param.T.type:Class.Align
+
+template <typename TSource, typename TSpec>
+struct Source<Align<TSource, TSpec> >
+{
+	typedef TSource Type;
+};
+template <typename TSource, typename TSpec>
+struct Source<Align<TSource, TSpec> const >
+{
+	typedef TSource Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.StringSetType:
+..summary:Return type of @Function.stringSet@ function. 
+..signature:StringSetType<T>::Type
+..param.T:Alignment data structure.
+..param.T.Type:Spec.Alignment Graph
+..param.T.Type:Class.Align
+..returns.param.Type:A @Class.StringSet.string set@ type of a reference to a string set type.
+..see:Function.stringSet
+..include:seqan/align.h
+*/
+template <typename T>
+struct StringSetType;
+
+template <typename TSource, typename TSpec>
+struct StringSetType<Align<TSource, TSpec> >
+{
+	typedef StringSet<TSource, Dependent<> > Type;
+};
+template <typename TSource, typename TSpec>
+struct StringSetType<Align<TSource, TSpec> const >
+{
+	typedef StringSet<TSource, Dependent<> > Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.rows:
+..cat:Alignments
+..summary:The container of rows in an alignment. 
+..signature:Rows rows(align)
+..param.align:An alignment.
+...type:Class.Align
+..returns:The container of rows in $align$. 
+...metafunction:Metafunction.Rows
+..see:Function.cols
+..see:Metafunction.Rows
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec>
+inline typename Rows< Align<TSource, TSpec> >::Type &
+rows(Align<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_rows;
+}
+template <typename TSource, typename TSpec>
+inline typename Rows< Align<TSource, TSpec> const >::Type &
+rows(Align<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_rows;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.row:
+..cat:Alignments
+..summary:A row in an alignment. 
+..signature:Row & row(align, position)
+..param.align:An alignment.
+...type:Class.Align
+..param.position:A position in the @Function.rows@ container of $align$.
+..returns:The row in @Function.rows@ container of $align$ at the given $position$. 
+...metafunction:Metafunction.Row
+..remarks:This function is equivalent to $value(rows(align), position)$.
+..see:Function.rows
+..see:Function.col
+..see:Metafunction.Row
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename Row< Align<TSource, TSpec> >::Type &
+row(Align<TSource, TSpec> & me, 
+	TPosition _pos)
+{
+SEQAN_CHECKPOINT
+	return value(rows(me), _pos);
+}
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename Row< Align<TSource, TSpec> const>::Type &
+row(Align<TSource, TSpec> const & me, 
+	TPosition _pos)
+{
+SEQAN_CHECKPOINT
+	return value(rows(me), _pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.cols:
+..cat:Alignments
+..summary:The container of columns in an alignment. 
+..signature:Cols cols(align)
+..param.align:An alignment.
+...type:Class.Align
+..returns:The container of columns in $align$. 
+...metafunction:Metafunction.Cols
+..see:Metafunction.Cols
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec>
+inline typename Cols< Align<TSource, TSpec> >::Type
+cols(Align<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return typename Cols< Align<TSource, TSpec> >::Type(me);
+}
+template <typename TSource, typename TSpec>
+inline typename Cols< Align<TSource, TSpec> const>::Type
+cols(Align<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return typename Cols< Align<TSource, TSpec> const>::Type(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.col:
+..cat:Alignments
+..summary:A column in an alignment. 
+..signature:Col & col(align, position)
+..param.align:An alignment.
+...type:Class.Align
+..param.position:A position in the @Function.cols@ container of $align$.
+..returns:The column in @Function.cols@ container of $align$ at the given $position$. 
+...metafunction:Metafunction.Col
+..remarks:This function is equivalent to $value(cols(align), position)$.
+..see:Function.cols
+..see:Metafunction.Col
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename Col< Align<TSource, TSpec> >::Type
+col(Align<TSource, TSpec> & me,
+	TPosition _pos)
+{
+SEQAN_CHECKPOINT
+	return value(cols(me), _pos);
+}
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename Col< Align<TSource, TSpec> const>::Type
+col(Align<TSource, TSpec> const & me,
+	TPosition _pos)
+{
+SEQAN_CHECKPOINT
+	return value(cols(me), _pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.detach.param.object.type:Class.Align
+
+template <typename TSource, typename TSpec>
+inline void
+detach(Align<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Rows<TAlign>::Type TRows;
+	typedef typename Iterator<TRows, Standard>::Type TRowsIterator;
+
+	TRowsIterator it = begin(rows(me));
+	TRowsIterator it_end = end(rows(me));
+
+	while (it != it_end)
+	{
+		detach(*it);
+		++it;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TSource, typename TSpec, typename TIDString>
+inline void
+write(TFile & target,
+	  Align<TSource, TSpec> const & source,
+	  TIDString const &,
+	  Raw)
+{
+SEQAN_CHECKPOINT
+	typedef Align<TSource, TSpec> const TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Position<typename Rows<TAlign>::Type>::Type TRowsPosition;
+	typedef typename Position<TAlign>::Type TPosition;
+
+	TRowsPosition row_count = length(rows(source));
+	TPosition begin_ = beginPosition(cols(source));
+	TPosition end_ = endPosition(cols(source));
+	
+	unsigned int baseCount=0;
+	unsigned int leftSpace=6;
+	while(begin_ < end_) {
+		unsigned int windowSize_ = 50;
+		if ((begin_ + windowSize_)>end_) windowSize_=end_ - begin_;
+
+		// Print header line
+		unsigned int offset=0;
+		if (baseCount != 0) offset = (unsigned int) floor(log((double)baseCount) / log((double)10));
+		for(unsigned int j = 0;j<leftSpace-offset;++j) {
+			_streamPut(target, ' ');
+		}
+		_streamPutInt(target, baseCount);
+		baseCount+=windowSize_;
+		_streamPut(target, ' ');
+		for(TPosition i = 1;i<=windowSize_;++i) {
+			if ((i % 10)==0) _streamPut(target, ':');
+			else if ((i % 5)==0) _streamPut(target, '.');
+			else _streamPut(target, ' ');
+		}
+		_streamPut(target, ' ');
+		_streamPut(target, '\n');
+		
+		// Print sequences
+		for(TRowsPosition i=0;i<2*row_count-1;++i) {
+			for(unsigned int j = 0;j<leftSpace+2;++j) _streamPut(target, ' ');
+			if ((i % 2)==0) {
+				TRow& row_ = row(source, i/2);
+				typedef typename Iterator<typename Row<TAlign>::Type const, Standard>::Type TIter;
+				TIter begin1_ = iter(row_, begin_);
+				TIter end1_ = iter(row_, begin_ + windowSize_);
+				for (; begin1_ != end1_; ++begin1_) {
+					if (isGap(begin1_)) _streamPut(target, gapValue<char>());
+					else _streamPut(target, *begin1_);
+				}
+				//_streamWriteRange(target, iter(row_, begin_), iter(row_, begin_ + windowSize_));
+			} else {
+				for(unsigned int j = 0;j<windowSize_;++j) {
+					if ((!isGap(row(source, (i-1)/2), begin_+j)) &&
+						(!isGap(row(source, (i+1)/2), begin_+j)) &&
+						(row(source, (i-1)/2)[begin_+j]==row(source, (i+1)/2)[begin_+j]))
+					{
+						_streamPut(target, '|');
+					} else {
+						_streamPut(target, ' ');
+					}
+				} 
+			}
+			_streamPut(target, '\n');
+		}
+		_streamPut(target, '\n');
+		begin_+=50;
+	}
+	_streamPut(target, '\n');
+}
+
+template <typename TSource, typename TSpec>
+inline void
+clearClipping(Align<TSource, TSpec> & align_)
+{
+SEQAN_CHECKPOINT
+	typedef typename Rows<Align<TSource, TSpec> >::Type TRows;
+	typedef typename Iterator<TRows>::Type TRowsIterator;
+
+	for (TRowsIterator it = begin(rows(align_)); it != end(rows(align_)); goNext(it))
+	{
+		clearClipping(*it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// stream operators
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename TSource, typename TSpec>
+inline TStream &
+operator << (TStream & target, 
+			 Align<TSource, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	write(target, source);
+	return target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <typename TStream, typename TSource, typename TSpec>
+inline TStream &
+operator >> (TStream & source, 
+			 Align<TSource, TSpec> & target)
+{
+SEQAN_CHECKPOINT
+	read(source, target);
+	return source;
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.setStrings:
+..cat:Alignments
+..summary:Loads the sequences of a stringset into an alignment.
+..signature:setStrings(align, stringset)
+..param.align:An alignment.
+...type:Class.Align
+..param.stringset:A string set.
+...type:Class.StringSet
+..remarks:The function clears $align$ and creates an new global alignment between strings in $stringset$ that contains only trainling gaps.
+The alignment will be dependent from the strings in the stringset; use @Function.detach@ to make $align$ the owner of its strings.
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec, typename TSpec2>
+inline void
+setStrings(Align<TSource, TSpec> & me,
+		   StringSet<TSource, TSpec2> & stringset)
+{
+SEQAN_CHECKPOINT
+	typedef Align<TSource, TSpec> TAlign;
+	typedef StringSet<TSource, TSpec2> TStringset;
+
+	typedef typename Rows<TAlign>::Type TRows;
+	typedef typename Iterator<TRows>::Type TRowsIterator;
+	typedef typename Size<TStringset>::Type TStringsetSize;
+
+	clear(me.data_rows);
+	resize(me.data_rows, length(stringset));
+	TRowsIterator it = begin(rows(me));
+	TStringsetSize stringset_length = length(stringset);
+	for (TStringsetSize i = 0; i < stringset_length; ++i)
+	{
+		setSource(*it, value(stringset, i));
+		++it;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSpec>
+inline void
+clearGaps(Align<TSource, TSpec> & me)
+{
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Rows<TAlign>::Type TRows;
+	typedef typename Iterator<TRows>::Type TRowsIterator;
+	
+	for (TRowsIterator it = begin(rows(me)); it != end(rows(me)); goNext(it))
+	{
+		clearGaps(*it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.stringSet:
+..param.g.type:Class.Align
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec>
+inline typename StringSetType<Align<TSource, TSpec> >::Type 
+stringSet(Align<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename StringSetType<TAlign>::Type TStringSet;
+
+	typedef typename Rows<TAlign>::Type TRows;
+	typedef typename Iterator<TRows>::Type TRowsIterator;
+
+	TStringSet ss;
+
+	for (TRowsIterator it = begin(rows(me)); it != end(rows(me)); goNext(it))
+	{
+		appendValue(ss, source(*it));
+	}
+	return ss;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/align_cols_base.h b/src/SeqAn-1.3/seqan/align/align_cols_base.h
new file mode 100644
index 0000000..158b37b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_cols_base.h
@@ -0,0 +1,443 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_COLS_BASE_H
+#define SEQAN_HEADER_ALIGN_COLS_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Align Cols
+//////////////////////////////////////////////////////////////////////////////
+//implements Cols sequence for align implementations
+
+/**
+.Class.AlignCols:
+..cat:Alignments
+..summary:Pseudo columns container for row-based alignment classes.
+..signature:AlignCols<TAlign>
+..param.TAlign:Alignment type.
+...metafunction:Metafunction.Host
+..remarks:This class emulates a container of columns on alignment classes
+  that store the alignment in a container of rows.
+  Note that accessing a row-based alignment column-wise can be significantly
+  slower than accessing the alignment row-wise.
+..see:Class.Align
+..include:seqan/align.h
+*/
+
+template <typename TAlign>
+struct AlignCols
+{
+//____________________________________________________________________________
+	mutable TAlign * data_align;
+
+	AlignCols():
+		data_align(0)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	AlignCols(AlignCols const & other):
+		data_align(other.data_align)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	AlignCols(TAlign & ali):
+		data_align(& ali)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	~AlignCols() 
+	{
+SEQAN_CHECKPOINT
+	}
+
+	AlignCols const & operator = (AlignCols const & other)
+	{
+SEQAN_CHECKPOINT
+		data_align = other.data_align;
+		return *this;
+	}
+//____________________________________________________________________________
+
+	template <typename TPosition>
+	inline typename Value<AlignCols>::Type
+	operator [](TPosition _pos)
+	{
+SEQAN_CHECKPOINT
+		return value(*this, _pos);
+	}
+
+	template <typename TPosition>
+	inline typename Value<AlignCols const>::Type
+	operator [](TPosition _pos) const
+	{
+SEQAN_CHECKPOINT
+		return value(*this, _pos);
+	}
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Cols.param.T.type:Class.Align
+
+template <typename TSource, typename TSpec>
+struct Cols<Align<TSource, TSpec> >
+{
+	typedef AlignCols<Align<TSource, TSpec> > Type;
+};
+template <typename TSource, typename TSpec>
+struct Cols<Align<TSource, TSpec> const>
+{
+	typedef AlignCols<Align<TSource, TSpec> const> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Metafunctions for AlignCols
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Host.param.T.type:Class.AlignCols
+
+template <typename TAlign>
+struct Host<AlignCols<TAlign> >
+{
+	typedef TAlign Type;
+};
+template <typename TAlign>
+struct Host<AlignCols<TAlign> const>
+{
+	typedef TAlign Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Spec.AlignColIterator:
+..cat:Iterators
+..summary:Iterator for @Class.AlignCols@ pseudo container.
+..signature:Iter< TAlign, AlignColIterator<TSpec> >
+..param.TSpec:Specialization tag.
+..general:Class.Iter
+..see:Class.AlignCols
+..include:seqan/align.h
+*/
+
+
+template <typename TSpec>
+struct AlignColIterator;
+
+///.Metafunction.Iterator.param.T.type:Class.AlignCols
+
+template <typename TAlign, typename TIteratorSpec>
+struct Iterator<AlignCols<TAlign>, TIteratorSpec>
+{
+	typedef Iter< TAlign, AlignColIterator<void> > Type;
+};
+template <typename TAlign, typename TIteratorSpec>
+struct Iterator<AlignCols<TAlign> const, TIteratorSpec>
+{
+	typedef Iter< TAlign, AlignColIterator<void> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Iterator is also used as Value
+
+///.Metafunction.Value.param.T.type:Class.AlignCols
+
+template <typename TAlign>
+struct Value<AlignCols<TAlign> >:
+	Iterator<AlignCols<TAlign>, Standard >
+{
+};
+template <typename TAlign>
+struct Value<AlignCols<TAlign> const>:
+	Iterator<AlignCols<TAlign> const, Standard>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Size.param.T.type:Class.AlignCols
+
+template <typename TAlign>
+struct Size<AlignCols<TAlign> >:
+	Size<typename Row<TAlign>::Type>
+{
+};
+template <typename TAlign>
+struct Size<AlignCols<TAlign> const>:
+	Size<typename Row<TAlign const>::Type>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Position.param.T.type:Class.AlignCols
+
+template <typename TAlign>
+struct Position<AlignCols<TAlign> >:
+	Position<typename Row<TAlign>::Type>
+{
+};
+template <typename TAlign>
+struct Position<AlignCols<TAlign> const>:
+	Position<typename Row<TAlign const>::Type>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.host.param.object.type:Class.AlignCols
+
+template <typename TAlign>
+inline typename Host<AlignCols<TAlign> >::Type &
+host(AlignCols<TAlign> & me)
+{
+SEQAN_CHECKPOINT
+	SEQAN_ASSERT(me.data_align)
+	return *me.data_align; 
+}
+template <typename TAlign>
+inline typename Host<AlignCols<TAlign> const>::Type &
+host(AlignCols<TAlign> const & me)
+{
+SEQAN_CHECKPOINT
+	SEQAN_ASSERT(me.data_align)
+	return *me.data_align; 
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.iter.param.object.type:Class.AlignCols
+
+template <typename TAlign, typename TPosition, typename TTag>
+inline typename Iterator<AlignCols<TAlign>, Tag<TTag> const>::Type
+iter(AlignCols<TAlign> & me,
+	 TPosition pos_,
+	 Tag<TTag> const)
+{
+SEQAN_CHECKPOINT
+	return typename Iterator<AlignCols<TAlign>, Tag<TTag> const >::Type(host(me), pos_); 
+}
+template <typename TAlign, typename TPosition, typename TTag>
+inline typename Iterator<AlignCols<TAlign> const, Tag<TTag> const>::Type
+iter(AlignCols<TAlign> const & me,
+	 TPosition pos_,
+	 Tag<TTag> const)
+{
+SEQAN_CHECKPOINT
+	return typename Iterator<AlignCols<TAlign> const, Tag<TTag> const>::Type(host(me), pos_); 
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.value.param.container.type:Class.AlignCols
+
+template <typename TAlign, typename TPosition>
+inline typename Value< AlignCols<TAlign> >::Type
+value(AlignCols<TAlign> & me,
+	  TPosition _pos)
+{
+SEQAN_CHECKPOINT
+	return iter(me, _pos);
+}
+template <typename TAlign, typename TPosition>
+inline typename Value< AlignCols<TAlign> const>::Type
+value(AlignCols<TAlign> const & me,
+	  TPosition _pos)
+{
+SEQAN_CHECKPOINT
+	return iter(me, _pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.beginPosition.param.object.type:Class.AlignCols
+
+template <typename TAlignCols>
+inline typename Position<TAlignCols>::Type
+_beginPositionAlignCols(TAlignCols const & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Host<TAlignCols>::Type TAlign;
+	typename Position<typename Rows<TAlign>::Type>::Type _i = length(rows(host(me)));
+
+	if (!_i)
+	{
+		return 0;
+	}
+
+	--_i;
+	typename Position<TAlignCols>::Type _pos = beginPosition(row(host(me), _i));
+
+	while (_i > 0)
+	{
+		--_i;
+		typename Position<TAlignCols>::Type _pos2 = beginPosition(row(host(me), _i));
+		if (_pos2 < _pos)
+		{
+			_pos = _pos2;
+		}
+	}
+	return _pos;
+}
+
+template <typename TAlign>
+inline typename Position<AlignCols<TAlign> >::Type
+beginPosition(AlignCols<TAlign> const & me)
+{
+SEQAN_CHECKPOINT
+	return _beginPositionAlignCols(me);
+}
+template <typename TAlign>
+inline typename Position<AlignCols<TAlign> >::Type
+beginPosition(AlignCols<TAlign> & me)
+{
+SEQAN_CHECKPOINT
+	return _beginPositionAlignCols(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.begin.param.object.type:Class.AlignCols
+
+template <typename TAlign, typename TTag>
+inline typename Iterator<AlignCols<TAlign>, Tag<TTag> const>::Type
+begin(AlignCols<TAlign> & me,
+	  Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(me, beginPosition(me), tag_); 
+}
+template <typename TAlign, typename TTag>
+inline typename Iterator<AlignCols<TAlign> const, Tag<TTag> const>::Type
+begin(AlignCols<TAlign> const & me,
+	  Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(me, beginPosition(me), tag_); 
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.endPosition.param.object.type:Class.AlignCols
+
+template <typename TAlignCols>
+inline typename Position<TAlignCols>::Type
+_endPositionAlignCols(TAlignCols const & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Host<TAlignCols>::Type TAlign;
+
+	typename Position<typename Rows<TAlign>::Type>::Type _i = length(rows(host(me)));
+	typename Position<TAlignCols>::Type _pos = 0;
+
+	while (_i > 0)
+	{
+		--_i;
+		typename Position<TAlignCols>::Type _pos2 = endPosition(row(host(me), _i));
+		if (_pos2 > _pos)
+		{
+			_pos = _pos2;
+		}
+	}
+	return _pos;
+}
+
+template <typename TAlign>
+inline typename Position<AlignCols<TAlign> >::Type
+endPosition(AlignCols<TAlign> & me)
+{
+SEQAN_CHECKPOINT
+	return _endPositionAlignCols(me);
+}
+template <typename TAlign>
+inline typename Position<AlignCols<TAlign> const>::Type
+endPosition(AlignCols<TAlign> const & me)
+{
+SEQAN_CHECKPOINT
+	return _endPositionAlignCols(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.end.param.object.type:Class.AlignCols
+
+template <typename TAlign, typename TTag>
+inline typename Iterator<AlignCols<TAlign>, Tag<TTag> const>::Type
+end(AlignCols<TAlign> & me,
+	 Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(me, endPosition(me), tag_); 
+}
+template <typename TAlign, typename TTag>
+inline typename Iterator<AlignCols<TAlign> const, Tag<TTag> const>::Type
+end(AlignCols<TAlign> const & me,
+	 Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(me, endPosition(me), tag_); 
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign>
+inline typename Size<AlignCols<TAlign> >::Type
+length(AlignCols<TAlign> const & me)
+{
+SEQAN_CHECKPOINT
+	return endPosition(me) - beginPosition(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign>
+inline bool
+operator ==(AlignCols<TAlign> const & left, 
+			AlignCols<TAlign> const & right)
+{
+SEQAN_CHECKPOINT
+	return left.data_align == right.data_align; 
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/align_dynprog.h b/src/SeqAn-1.3/seqan/align/align_dynprog.h
new file mode 100644
index 0000000..6154f86
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_dynprog.h
@@ -0,0 +1,578 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_DYNPROG_H
+#define SEQAN_HEADER_ALIGN_DYNPROG_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//needleman wunsch alignment
+template <typename TScoreValue, unsigned DIMENSION, typename TString>
+TScoreValue
+_needlemanWunsch(Matrix<TScoreValue, DIMENSION> & matrix_,
+				  TString const & str1_,
+				  TString const & str2_,
+				  Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, Standard>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TValue;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+	TSize str1_length = length(str1_);
+	TSize str2_length = length(str2_);
+	TStringIterator x_begin = begin(str1_) - 1;
+	TStringIterator x_end = end(str1_) - 1;
+	TStringIterator y_begin = begin(str2_) - 1;
+	TStringIterator y_end = end(str2_) - 1;
+
+	TStringIterator x = x_end;
+	TStringIterator y;
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap = scoreGapExtend(score_);
+
+	TScoreValue h = 0;
+	TScoreValue border_ = score_gap;
+	TScoreValue v = border_;
+
+	setDimension(matrix_, 2);
+	setLength(matrix_, 0, str1_length + 1);
+	setLength(matrix_, 1, str2_length + 1);
+	resize(matrix_);
+
+	TMatrixIterator col_ = end(matrix_) - 1;
+	TMatrixIterator finger1;
+	TMatrixIterator finger2;
+
+	//-------------------------------------------------------------------------
+	// init
+
+	finger1 = col_;
+	*finger1 = 0;
+	for (x = x_end; x != x_begin; --x)
+	{
+		goPrevious(finger1, 0);
+		*finger1 = border_;
+		border_ += score_gap;
+	}
+
+	//-------------------------------------------------------------------------
+	//fill matrix
+
+	border_ = 0;
+	for (y = y_end; y != y_begin; --y)
+	{
+		TValue cy = *y;
+
+		h = border_;
+		border_ += score_gap;
+		v = border_;
+
+		finger2 = col_;		//points to last column
+		goPrevious(col_, 1);	//points to this column
+		finger1 = col_;
+
+		*finger1 = v;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			goPrevious(finger1, 0);
+			goPrevious(finger2, 0);
+			if (*x == cy)
+			{
+				v = h + score_match;
+				h = *finger2;
+			}
+			else
+			{
+				TScoreValue s1 = h + score_mismatch;
+				h = *finger2;
+				TScoreValue s2 = score_gap + ((h > v) ? h : v);
+				v = (s1 > s2) ? s1 : s2;
+			}
+			*finger1 = v;
+		}
+	}
+
+	return v;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//traceback through needleman wunsch matrix
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION>
+void
+_needlemanWunschTrace(Align<TTargetSource, TTargetSpec> & target_,
+						Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_,
+						Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+	typedef Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > TMatrixIterator;
+	typedef Segment<TTargetSource, InfixSegment> TTargetSourceSegment;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+
+	typedef typename Position<Matrix<TScoreValue, DIMENSION> >::Type TPosition;
+	TPosition pos_0 = coordinate(source_, 0);
+	TPosition pos_1 = coordinate(source_, 1);
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+	TTargetIterator target_0 = iter(row(target_, 0), pos_0);
+	TTargetIterator target_1 = iter(row(target_, 1), pos_1);
+
+	typedef typename Iterator<TTargetSourceSegment, Standard>::Type TStringIterator;
+	TStringIterator it_0 = iter(str_0, pos_0);
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = iter(str_1, pos_1);
+	TStringIterator it_1_end = end(str_1);
+
+	TScoreValue score_diff = scoreMismatch(score_) - scoreGapExtend(score_);
+
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		bool gv;
+		bool gh;
+
+		if (*it_0 == *it_1)
+		{
+			gv = gh = true;
+		}
+		else
+		{
+
+			TMatrixIterator it_ = source_;
+
+			goNext(it_, 0);
+			TScoreValue v = *it_;
+
+			goNext(it_, 1);
+			TScoreValue d = *it_;
+
+			it_ = source_;
+			goNext(it_, 1);
+			TScoreValue h = *it_;
+
+			gv = (v >= h) | (d + score_diff >= h);
+			gh = (h >  v) | (d + score_diff >= v);
+
+		}
+
+		if (gv)
+		{
+			++it_0;
+			goNext(source_, 0);
+		}
+		else
+		{
+			insertGap(target_0);
+		}
+
+		if (gh) 
+		{
+			++it_1;
+			goNext(source_, 1);
+		}
+		else
+		{
+			insertGap(target_1);
+		}
+
+		++target_0;
+		++target_1;
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Gotoh
+//Global alignment with affine gap costs
+template <typename TScoreValue, unsigned DIMENSION, typename TString>
+TScoreValue
+_gotoh(Matrix<TScoreValue, DIMENSION> & diag_matrix_,
+	   Matrix<TScoreValue, DIMENSION> & vert_matrix_,
+	   Matrix<TScoreValue, DIMENSION> & hori_matrix_,
+	   TString const & str1_,
+	   TString const & str2_,
+	   Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+
+
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, Rooted>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TValue;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+	TSize str1_length = length(str1_);
+	TSize str2_length = length(str2_);
+	TStringIterator x_begin = begin(str1_) - 1;
+	TStringIterator x_end = end(str1_) - 1;
+	TStringIterator y_begin = begin(str2_) - 1;
+	TStringIterator y_end = end(str2_) - 1;
+
+	TStringIterator x = x_end;
+	TStringIterator y;
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap_open = scoreGapOpen(score_);
+	TScoreValue score_gap_extend = scoreGapExtend(score_);
+
+	TScoreValue border_ = score_gap_open;
+	TScoreValue v;
+
+	setDimension(diag_matrix_, 2);
+	setLength(diag_matrix_, 0, str1_length + 1);
+	setLength(diag_matrix_, 1, str2_length + 1);
+	resize(diag_matrix_);
+	setDimension(vert_matrix_, 2);
+	setLength(vert_matrix_, 0, str1_length + 1);
+	setLength(vert_matrix_, 1, str2_length + 1);
+	resize(vert_matrix_);
+	setDimension(hori_matrix_, 2);
+	setLength(hori_matrix_, 0, str1_length + 1);
+	setLength(hori_matrix_, 1, str2_length + 1);
+	resize(hori_matrix_);
+
+	TMatrixIterator diag_col_ = end(diag_matrix_) - 1;
+	TMatrixIterator diag_finger1;
+	TMatrixIterator diag_finger2;
+	TMatrixIterator vert_col_ = end(vert_matrix_) - 1;
+	TMatrixIterator vert_finger1;
+	TMatrixIterator vert_finger2;
+	TMatrixIterator hori_col_ = end(hori_matrix_) - 1;
+	TMatrixIterator hori_finger1;
+	TMatrixIterator hori_finger2;
+	
+	//-------------------------------------------------------------------------
+	// init
+
+	diag_finger1 = diag_col_;
+	*diag_finger1 = 0;
+	vert_finger1 = vert_col_;
+	*vert_finger1 = -1000000;
+	hori_finger1 = hori_col_;
+	*hori_finger1 = -1000000;
+	for (x = x_end; x != x_begin; --x)
+	{
+		goPrevious(diag_finger1, 0);
+		*diag_finger1 = border_;
+		goPrevious(hori_finger1, 0);
+		*hori_finger1 = border_;
+		goPrevious(vert_finger1, 0);
+		*vert_finger1 = -1000000;//-inf
+		border_ += score_gap_extend;
+	}
+
+	//------------------------------------------------------------------------
+	//fill matrix
+
+	border_ = score_gap_open;
+	for (y = y_end; y != y_begin; --y)
+	{
+		TValue cy = *y;
+		v = border_;
+
+		vert_finger2 = vert_col_;	//points to last column
+		goPrevious(vert_col_, 1);	//points to this column
+		vert_finger1 = vert_col_;
+		*vert_finger1 = v;          //initialize first column
+
+		diag_finger2 = diag_col_;	
+		goPrevious(diag_col_, 1);	
+		diag_finger1 = diag_col_;
+		*diag_finger1 = v;			//initialize first column
+
+		hori_finger2 = hori_col_;	
+		goPrevious(hori_col_, 1);	
+		hori_finger1 = hori_col_;
+		*hori_finger1 = -1000000;	//initialize first column		
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			//compute entry in diag_matrix
+			goPrevious(diag_finger1, 0);
+			v = (*diag_finger2 > *vert_finger2) ? *diag_finger2 : *vert_finger2;
+			v = (*hori_finger2 > v) ? *hori_finger2 : v;
+			if (*x == cy) *diag_finger1 = v + score_match;
+			else *diag_finger1 = v + score_mismatch;
+
+			//compute entry in hori_matrix
+			v = *hori_finger1; 
+			goPrevious(hori_finger1, 0);
+			v += score_gap_extend;
+			goPrevious(diag_finger2, 1);
+			*hori_finger1 = (v > (*diag_finger2 + score_gap_open)) ? v : (*diag_finger2 + score_gap_open);
+			goPrevious(hori_finger2, 0);
+
+			//compute entry in vert_matrix
+			goPrevious(vert_finger2, 0);
+			goPrevious(vert_finger1, 0);
+			v = *vert_finger2 + score_gap_extend;
+			goNext(diag_finger2, 1);
+			goPrevious(diag_finger2, 0);
+			*vert_finger1 = (v > (*diag_finger2 + score_gap_open)) ? v : (*diag_finger2 + score_gap_open);
+			
+		}
+		border_ += score_gap_extend;
+	}
+
+	v = (*vert_finger1 > *hori_finger1) ? *vert_finger1 : *hori_finger1;
+	v = (*diag_finger1 > v) ? *diag_finger1 : v;
+
+	return v;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//gotoh trace
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION>
+void
+_gotohTrace(Align<TTargetSource, TTargetSpec> & target_,
+			 Matrix<TScoreValue, DIMENSION> & diag_matrix_,
+			 Matrix<TScoreValue, DIMENSION> & vert_matrix_,
+			 Matrix<TScoreValue, DIMENSION> & hori_matrix_,
+			 Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+	typedef Iter<Matrix<TScoreValue, DIMENSION>, PositionIterator > TMatrixIterator;
+	typedef typename Position<Matrix<TScoreValue, DIMENSION> >::Type TPosition;
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+
+	typedef Segment<TTargetSource, InfixSegment> TTargetSourceSegment;
+	typedef typename Iterator<TTargetSource, Standard>::Type TStringIterator;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+	typename Size<TTargetSourceSegment>::Type dim_0_len = length(str_0) + 1;
+	//typename Size<TTargetSourceSegment>::Type dim_1_len = length(str_1) + 1;
+	
+	TScoreValue score_gap_open = scoreGapOpen(score_);
+	TScoreValue score_gap_diff = score_gap_open;
+	//TScoreValue score_gap_extend = scoreGapExtend(score_);
+	
+	TMatrixIterator diag_source_ = begin(diag_matrix_);
+	TMatrixIterator hori_source_ = begin(hori_matrix_);
+	TMatrixIterator vert_source_ = begin(vert_matrix_);
+	TPosition pos_0 = coordinate(diag_source_, 0);
+	TPosition pos_1 = coordinate(diag_source_, 1);
+	TPosition pos = position(diag_source_);
+
+	TTargetIterator target_0 = iter(row(target_, 0), pos_0, Standard());
+	TTargetIterator target_1 = iter(row(target_, 1), pos_1, Standard());
+
+	TStringIterator it_0 = iter(str_0, pos_0, Standard());
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = iter(str_1, pos_1, Standard());
+	TStringIterator it_1_end = end(str_1);
+
+	// indicate which matrix we are in
+	bool hori = false, vert = false, diag = false;
+	if (*diag_source_ > *hori_source_)
+		if (*diag_source_ > *vert_source_) diag = true;
+		else vert = true;
+	else
+		if (*hori_source_ > *vert_source_) hori = true;
+		else vert = true;
+
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		if(diag)
+		{
+			++it_0;
+			++it_1;
+			pos += dim_0_len + 1;
+
+			if (getValue(diag_matrix_,pos) >= getValue(hori_matrix_,pos))
+			{
+				if (getValue(diag_matrix_,pos) < getValue(vert_matrix_,pos))
+				{
+					vert = true;
+					diag = false;
+				}
+			}
+			else
+			{
+				diag = false;
+				if (getValue(hori_matrix_,pos) >= getValue(vert_matrix_,pos)) hori = true;
+				else vert = true;
+			}
+		}
+		else
+		{
+			if(vert)
+			{
+				++it_1;
+				insertGap(target_0);
+				pos += dim_0_len;
+				if (getValue(diag_matrix_,pos) + score_gap_diff >= getValue(vert_matrix_,pos))
+				{
+					diag = true; 
+					vert = false;
+				}
+			}
+			else
+			{
+				if(hori)
+				{
+					++it_0;
+					insertGap(target_1);
+					++pos;
+					if (getValue(diag_matrix_,pos) + score_gap_diff >= getValue(hori_matrix_,pos))
+					{
+						diag = true; 
+						hori = false;
+					}
+				}
+			}
+		}
+
+		++target_0;
+		++target_1;
+	}
+
+
+
+
+
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////
+//if gap open == 0 regular needleman wunsch alignment, else gotoh alignment
+/*DISABLED
+.Function.needlemanWunsch:
+..summary:Computes the best global alignment of the (two) sequences given in align according to the score values given in score.
+..cat:Alignments
+..signature:needlemanWunsch(align, score)
+..param.align:The alignment object having the sequences to be aligned as sources.
+...type:Class.Align
+..param.score:The score values to be used for computing the alignment.
+...type:Class.Score
+..returns:The score value of the best scoring global alignment.
+..returns:The corresponding alignment can be found in align.
+..remarks:Depending on the Score object either the regular Needleman Wunsch algorithm (gap open = 0) or the Gotoh algorithm (gap open != 0) is applied.
+..see:Function.smithWaterman
+..include:seqan/align.h
+*/
+/*
+template <typename TSource, typename TSpec, typename TScoreValue>
+TScoreValue
+globalAlignment(Align<TSource, TSpec> & align_,
+				Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+
+	if(scoreGapOpen(score_)==scoreGapExtend(score_))
+	{//linear gap costs
+		return globalAlignment(align_, score_, NeedlemanWunsch());
+	}
+	else
+	{//affine gap costs
+		return globalAlignment(align_, score_, Gotoh());
+	}
+}
+
+
+template <typename TSource, typename TSpec, typename TScoreValue>
+TScoreValue
+globalAlignment(Align<TSource, TSpec> & align_,
+				Score<TScoreValue, Simple> const & score_,
+				NeedlemanWunsch)
+{
+SEQAN_CHECKPOINT
+	clearGaps(row(align_,0));
+	clearGaps(row(align_,1));
+
+	TScoreValue ret;
+
+	Matrix<TScoreValue> matr;
+	ret = _needlemanWunsch(matr, sourceSegment(row(align_, 0)), sourceSegment(row(align_, 1)), score_);
+	_needlemanWunschTrace(align_, begin(matr), score_);
+
+	return ret;
+}
+
+template <typename TSource, typename TSpec, typename TScoreValue>
+TScoreValue
+globalAlignment(Align<TSource, TSpec> & align_,
+				Score<TScoreValue, Simple> const & score_,
+				Gotoh)
+{
+SEQAN_CHECKPOINT
+	clearGaps(row(align_,0));
+	clearGaps(row(align_,1));
+
+	TScoreValue ret;
+
+	Matrix<TScoreValue> d_matr;
+	Matrix<TScoreValue> v_matr;
+	Matrix<TScoreValue> h_matr;
+	ret = _gotoh(d_matr, v_matr, h_matr, sourceSegment(row(align_, 0)), sourceSegment(row(align_, 1)), score_);
+	_gotohTrace(align_, d_matr, v_matr, h_matr, score_);	
+
+	return ret;
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/align_generated_forwards.h b/src/SeqAn-1.3/seqan/align/align_generated_forwards.h
new file mode 100644
index 0000000..bec52e0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_generated_forwards.h
@@ -0,0 +1,1158 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_ALIGN_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_ALIGN_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Align
+
+template <typename TSource, typename TSpec > class Align;       	// "projects/library/seqan/align/align_base.h"(138)
+
+//____________________________________________________________________________
+// AlignColIterator
+
+template <typename TSpec> struct AlignColIterator;       	// "projects/library/seqan/align/align_cols_base.h"(160)
+
+//____________________________________________________________________________
+// AlignCols
+
+template <typename TAlign> struct AlignCols;       	// "projects/library/seqan/align/align_cols_base.h"(60)
+
+//____________________________________________________________________________
+// AlignTrace
+
+template <typename TSize , typename TSpec > struct AlignTrace;       	// "projects/library/seqan/align/align_trace.h"(48)
+
+//____________________________________________________________________________
+// ArrayGaps
+
+struct ArrayGaps;       	// "projects/library/seqan/align/gaps_array.h"(44)
+struct ArrayGaps;       	// "projects/library/seqan/align/gaps_base.h"(80)
+
+//____________________________________________________________________________
+// Col
+
+template <typename T> struct Col;       	// "projects/library/seqan/align/align_base.h"(71)
+
+//____________________________________________________________________________
+// Cols
+
+template <typename T> struct Cols;       	// "projects/library/seqan/align/align_base.h"(52)
+
+//____________________________________________________________________________
+// GappedValueType
+
+template <typename T> struct GappedValueType;       	// "projects/library/seqan/align/gaps_base.h"(52)
+
+//____________________________________________________________________________
+// Gaps
+
+template <typename TSource, typename TSpec > class Gaps;       	// "projects/library/seqan/align/gaps_base.h"(111)
+
+//____________________________________________________________________________
+// GapsIterator
+
+template <typename TSpec> struct GapsIterator;       	// "projects/library/seqan/align/gaps_base.h"(84)
+
+//____________________________________________________________________________
+// GetSource
+
+template <typename T> struct GetSource;       	// "projects/library/seqan/align/gaps_base.h"(182)
+
+//____________________________________________________________________________
+// LocalAlignmentFinder
+
+template <typename TScoreValue > class LocalAlignmentFinder;       	// "projects/library/seqan/align/align_local_dynprog.h"(119)
+
+//____________________________________________________________________________
+// Matrix
+
+template <typename TValue, unsigned DIMENSION > class Matrix;       	// "projects/library/seqan/align/matrix_base.h"(49)
+
+//____________________________________________________________________________
+// NDimensional
+
+struct NDimensional;       	// "projects/library/seqan/align/matrix_base.h"(45)
+
+//____________________________________________________________________________
+// Navi
+
+template <typename TContainer, typename TSpec> struct Navi;       	// "projects/library/seqan/align/align_trace.h"(244)
+
+//____________________________________________________________________________
+// Navigator
+
+template <typename T> struct Navigator;       	// "projects/library/seqan/align/align_trace.h"(229)
+
+//____________________________________________________________________________
+// Row
+
+template <typename T> struct Row;       	// "projects/library/seqan/align/align_base.h"(105)
+
+//____________________________________________________________________________
+// Rows
+
+template <typename T> struct Rows;       	// "projects/library/seqan/align/align_base.h"(86)
+
+//____________________________________________________________________________
+// ScoreAndID
+
+template <typename TValue, typename TID> class ScoreAndID;       	// "projects/library/seqan/align/align_local_dynprog.h"(48)
+
+//____________________________________________________________________________
+// SizeArr_
+
+template <typename T> struct SizeArr_;       	// "projects/library/seqan/align/matrix_base.h"(52)
+
+//____________________________________________________________________________
+// StringSetType
+
+template <typename T> struct StringSetType;       	// "projects/library/seqan/align/align_base.h"(287)
+
+//____________________________________________________________________________
+// SumListOfGaps_
+
+template <typename TGaps> struct SumListOfGaps_;       	// "projects/library/seqan/align/gaps_sumlist.h"(532)
+
+//____________________________________________________________________________
+// SumlistGaps
+
+struct SumlistGaps;       	// "projects/library/seqan/align/gaps_sumlist.h"(44)
+
+//____________________________________________________________________________
+// _HirschbergSet
+
+class _HirschbergSet;       	// "projects/library/seqan/align/hirschberg_set.h"(45)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _alignBandedSmithWaterman
+
+template <typename TScoreValue, typename TStringSet, typename TScore, typename TDiagonal> inline TScoreValue _alignBandedSmithWaterman(LocalAlignmentFinder<TScoreValue>& finder, TStringSet const& str, TScore const& sc, TScoreValue const cutoff, TDiagonal const diagL, TDiagonal const diagU);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(341)
+
+//____________________________________________________________________________
+// _alignBandedSmithWatermanDeclump
+
+template <typename TScoreValue, typename TStringSet, typename TScore, typename TDiagonal> inline void _alignBandedSmithWatermanDeclump(LocalAlignmentFinder<TScoreValue>& finder, TStringSet const& str, TScore const& sc, TScoreValue const cutoff, TDiagonal const diagL, TDiagonal const diagU);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(182)
+
+//____________________________________________________________________________
+// _alignBandedSmithWatermanTrace
+
+template <typename TScoreValue, typename TStringSet, typename TScore, typename TDiagonal> inline Pair<Pair<TDiagonal> > _alignBandedSmithWatermanTrace(LocalAlignmentFinder<TScoreValue> & finder, TStringSet const& str, TScore& sc, TDiagonal diagL, TDiagonal diagU);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(83)
+
+//____________________________________________________________________________
+// _alignTracePrint
+
+template <typename TSize, typename TStringSet, typename TId, typename TPos, typename TTraceValue> inline void _alignTracePrint(AlignTraceback<TSize> & tb, TStringSet const &, TId const, TPos const, TId const, TPos const, TPos const segLen, TTraceValue const tv);       	// "projects/library/seqan/align/align_algorithms.h"(53)
+
+//____________________________________________________________________________
+// _begin1
+
+inline int& _begin1(_HirschbergSet & me);       	// "projects/library/seqan/align/hirschberg_set.h"(89)
+inline int const& _begin1(_HirschbergSet const & me);       	// "projects/library/seqan/align/hirschberg_set.h"(97)
+
+//____________________________________________________________________________
+// _begin2
+
+inline int& _begin2(_HirschbergSet & me);       	// "projects/library/seqan/align/hirschberg_set.h"(133)
+inline int const& _begin2(_HirschbergSet const & me);       	// "projects/library/seqan/align/hirschberg_set.h"(140)
+
+//____________________________________________________________________________
+// _beginPositionAlignCols
+
+template <typename TAlignCols> inline typename Position<TAlignCols>::Type _beginPositionAlignCols(TAlignCols const & me);       	// "projects/library/seqan/align/align_cols_base.h"(295)
+
+//____________________________________________________________________________
+// _coordinatesToPositions
+
+template <typename TSize, typename TSpec, typename TCoordinates> inline void _coordinatesToPositions(AlignTrace<TSize, TSpec> & me, TCoordinates const & coordinates_, TSize & position_, unsigned char & bit_position);       	// "projects/library/seqan/align/align_trace.h"(168)
+
+//____________________________________________________________________________
+// _dataArr
+
+template <typename TSource> inline String<typename Size<Gaps<TSource, ArrayGaps> >::Type> & _dataArr(Gaps<TSource, ArrayGaps> & me);       	// "projects/library/seqan/align/gaps_array.h"(165)
+template <typename TSource> inline String<typename Size<Gaps<TSource, ArrayGaps> >::Type> const & _dataArr(Gaps<TSource, ArrayGaps> const & me);       	// "projects/library/seqan/align/gaps_array.h"(172)
+
+//____________________________________________________________________________
+// _dataFactors
+
+template <typename TValue, unsigned DIMENSION> inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type & _dataFactors(Matrix<TValue, DIMENSION> & me);       	// "projects/library/seqan/align/matrix_base.h"(288)
+template <typename TValue, unsigned DIMENSION> inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type & _dataFactors(Matrix<TValue, DIMENSION> const & me);       	// "projects/library/seqan/align/matrix_base.h"(295)
+
+//____________________________________________________________________________
+// _dataLengths
+
+template <typename TValue, unsigned DIMENSION> inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type & _dataLengths(Matrix<TValue, DIMENSION> & me);       	// "projects/library/seqan/align/matrix_base.h"(274)
+template <typename TValue, unsigned DIMENSION> inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type const & _dataLengths(Matrix<TValue, DIMENSION> const & me);       	// "projects/library/seqan/align/matrix_base.h"(281)
+
+//____________________________________________________________________________
+// _dataSource
+
+template <typename TSource> inline Holder<TSource> & _dataSource(Gaps<TSource, ArrayGaps> & me);       	// "projects/library/seqan/align/gaps_array.h"(182)
+template <typename TSource> inline Holder<TSource> const & _dataSource(Gaps<TSource, ArrayGaps> const & me);       	// "projects/library/seqan/align/gaps_array.h"(189)
+template <typename TSource> inline Holder<TSource> & _dataSource(Gaps<TSource, SumlistGaps> & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(154)
+template <typename TSource> inline Holder<TSource> const & _dataSource(Gaps<TSource, SumlistGaps> const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(161)
+
+//____________________________________________________________________________
+// _end1
+
+inline int& _end1(_HirschbergSet & me);       	// "projects/library/seqan/align/hirschberg_set.h"(111)
+inline int const& _end1(_HirschbergSet const & me);       	// "projects/library/seqan/align/hirschberg_set.h"(118)
+
+//____________________________________________________________________________
+// _end2
+
+inline int& _end2(_HirschbergSet & me);       	// "projects/library/seqan/align/hirschberg_set.h"(154)
+inline int const& _end2(_HirschbergSet const & me);       	// "projects/library/seqan/align/hirschberg_set.h"(161)
+
+//____________________________________________________________________________
+// _endPositionAlignCols
+
+template <typename TAlignCols> inline typename Position<TAlignCols>::Type _endPositionAlignCols(TAlignCols const & me);       	// "projects/library/seqan/align/align_cols_base.h"(363)
+
+//____________________________________________________________________________
+// _finishAlign
+
+template <typename TSource, typename TSpec, typename TPos> inline void _finishAlign(Align<TSource, TSpec>& align, TPos const begin1, TPos const end1, TPos const begin2, TPos const end2);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(443)
+
+//____________________________________________________________________________
+// _getBitsPerEntry
+
+template <typename TSize, typename TSpec> inline unsigned int _getBitsPerEntry(AlignTrace<TSize, TSpec> & me);       	// "projects/library/seqan/align/align_trace.h"(114)
+
+//____________________________________________________________________________
+// _getNextBestEndPosition
+
+template <typename TScoreValue> typename LocalAlignmentFinder<TScoreValue>::TMatrixPosition _getNextBestEndPosition(LocalAlignmentFinder<TScoreValue> & sw , TScoreValue cutoff);       	// "projects/library/seqan/align/align_local_dynprog.h"(655)
+
+//____________________________________________________________________________
+// _getTrailingGaps
+
+template <typename TSource> inline typename Position<Gaps<TSource, ArrayGaps> >::Type _getTrailingGaps(Gaps<TSource, ArrayGaps> const & me);       	// "projects/library/seqan/align/gaps_array.h"(216)
+
+//____________________________________________________________________________
+// _goNextArrayGapsIterator
+
+template <typename T> inline void _goNextArrayGapsIterator(T const & me);       	// "projects/library/seqan/align/gaps_array.h"(892)
+
+//____________________________________________________________________________
+// _goNextSumlistGapsIterator
+
+template <typename T> inline void _goNextSumlistGapsIterator(T & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(710)
+
+//____________________________________________________________________________
+// _goPreviousArrayGapsIterator
+
+template <typename T> inline void _goPreviousArrayGapsIterator(T const & me);       	// "projects/library/seqan/align/gaps_array.h"(925)
+
+//____________________________________________________________________________
+// _goPreviousSumlistGapsIterator
+
+template <typename T> inline void _goPreviousSumlistGapsIterator(T & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(737)
+
+//____________________________________________________________________________
+// _gotoh
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString> TScoreValue _gotoh(Matrix<TScoreValue, DIMENSION> & diag_matrix_, Matrix<TScoreValue, DIMENSION> & vert_matrix_, Matrix<TScoreValue, DIMENSION> & hori_matrix_, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/align/align_dynprog.h"(241)
+
+//____________________________________________________________________________
+// _gotohTrace
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION> void _gotohTrace(Align<TTargetSource, TTargetSpec> & target_, Matrix<TScoreValue, DIMENSION> & diag_matrix_, Matrix<TScoreValue, DIMENSION> & vert_matrix_, Matrix<TScoreValue, DIMENSION> & hori_matrix_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/align/align_dynprog.h"(385)
+
+//____________________________________________________________________________
+// _initLocalAlignmentFinder
+
+template <typename TStringSet, typename TScoreValue, typename TTag> void _initLocalAlignmentFinder(TStringSet & str, LocalAlignmentFinder<TScoreValue> & finder, TTag);       	// "projects/library/seqan/align/align_local_dynprog.h"(186)
+template <typename TStringSet, typename TScoreValue, typename TDiagonal> void _initLocalAlignmentFinder(TStringSet const& str, LocalAlignmentFinder<TScoreValue> & finder, BandedWatermanEggert, TDiagonal const lowerDiag, TDiagonal const upperDiag);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(50)
+
+//____________________________________________________________________________
+// _initMembers
+
+template <typename TSize, typename TSpec> inline void _initMembers(AlignTrace<TSize, TSpec> & me);       	// "projects/library/seqan/align/align_trace.h"(123)
+
+//____________________________________________________________________________
+// _initToResize
+
+template <typename TSource, typename TSize> inline void _initToResize(Gaps<TSource, ArrayGaps> & me, TSize _size);       	// "projects/library/seqan/align/gaps_array.h"(329)
+template <typename TSource, typename TSize2> inline void _initToResize(Gaps<TSource, SumlistGaps> & me, TSize2 _size);       	// "projects/library/seqan/align/gaps_sumlist.h"(261)
+
+//____________________________________________________________________________
+// _iteratorGapsArray
+
+template <typename TGaps, typename TPosition> inline typename Iterator<TGaps, Standard>::Type _iteratorGapsArray(TGaps & gaps, TPosition view_position);       	// "projects/library/seqan/align/gaps_array.h"(478)
+
+//____________________________________________________________________________
+// _localAlignment
+
+template <typename TScoreValue, typename TSource, typename TSpec, typename TStringSet, typename TScore, typename TDiagonal> inline TScoreValue _localAlignment(LocalAlignmentFinder<TScoreValue> & finder, TStringSet& str, Align<TSource, TSpec> & align, TScore const& sc, TScoreValue cutoff, TDiagonal diag1, TDiagonal diag2, BandedWatermanEggert);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(464)
+
+//____________________________________________________________________________
+// _localAlignmentNext
+
+template <typename TScoreValue, typename TSource, typename TSpec, typename TStringSet, typename TScore, typename TDiagonal> inline TScoreValue _localAlignmentNext(LocalAlignmentFinder<TScoreValue> & finder, TStringSet& str, Align<TSource, TSpec> & align, TScore const& sc, TScoreValue cutoff, TDiagonal diag1, TDiagonal diag2, BandedWatermanEggert);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(491)
+
+//____________________________________________________________________________
+// _needlemanWunsch
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString> TScoreValue _needlemanWunsch(Matrix<TScoreValue, DIMENSION> & matrix_, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/align/align_dynprog.h"(47)
+
+//____________________________________________________________________________
+// _needlemanWunschTrace
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION> void _needlemanWunschTrace(Align<TTargetSource, TTargetSpec> & target_, Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/align/align_dynprog.h"(147)
+
+//____________________________________________________________________________
+// _positionsToCoordinates
+
+template <typename TSize, typename TSpec, typename TCoordinates> inline void _positionsToCoordinates(AlignTrace<TSize, TSpec> & me, TCoordinates & coordinates_, TSize position_, unsigned char bit_position );       	// "projects/library/seqan/align/align_trace.h"(195)
+
+//____________________________________________________________________________
+// _pumpTraceToAlign
+
+template <typename TSource, typename TSpec, typename TTrace> void _pumpTraceToAlign(Align<TSource, TSpec> & align_, TTrace trace);       	// "projects/library/seqan/align/align_algorithms.h"(66)
+
+//____________________________________________________________________________
+// _score
+
+inline int& _score(_HirschbergSet & me);       	// "projects/library/seqan/align/hirschberg_set.h"(179)
+inline int const& _score(_HirschbergSet const & me);       	// "projects/library/seqan/align/hirschberg_set.h"(186)
+
+//____________________________________________________________________________
+// _setBegin1
+
+inline void _setBegin1(_HirschbergSet & me, int const & new_begin);       	// "projects/library/seqan/align/hirschberg_set.h"(104)
+
+//____________________________________________________________________________
+// _setBegin2
+
+inline void _setBegin2(_HirschbergSet & me, int const & new_begin);       	// "projects/library/seqan/align/hirschberg_set.h"(147)
+
+//____________________________________________________________________________
+// _setClippedBeginPosition
+
+template <typename TSource, typename TSourcePosition> inline void _setClippedBeginPosition(Gaps<TSource, ArrayGaps> & me, TSourcePosition _pos);       	// "projects/library/seqan/align/gaps_array.h"(286)
+template <typename TSource, typename TSourcePosition> inline void _setClippedBeginPosition(Gaps<TSource, SumlistGaps> & me, TSourcePosition _pos);       	// "projects/library/seqan/align/gaps_sumlist.h"(231)
+
+//____________________________________________________________________________
+// _setClippedEndPosition
+
+template <typename TSource, typename TSourcePosition> inline void _setClippedEndPosition(Gaps<TSource, ArrayGaps> & me, TSourcePosition _pos);       	// "projects/library/seqan/align/gaps_array.h"(318)
+template <typename TSource, typename TSourcePosition> inline void _setClippedEndPosition(Gaps<TSource, SumlistGaps> & me, TSourcePosition _pos);       	// "projects/library/seqan/align/gaps_sumlist.h"(250)
+
+//____________________________________________________________________________
+// _setEnd1
+
+inline void _setEnd1(_HirschbergSet & me, int const & new_end);       	// "projects/library/seqan/align/hirschberg_set.h"(125)
+
+//____________________________________________________________________________
+// _setEnd2
+
+inline void _setEnd2(_HirschbergSet & me, int const & new_end);       	// "projects/library/seqan/align/hirschberg_set.h"(168)
+
+//____________________________________________________________________________
+// _setEndPosition
+
+template <typename TSource, typename TPosition> inline void _setEndPosition(Gaps<TSource, ArrayGaps> & me, TPosition _pos);       	// "projects/library/seqan/align/gaps_array.h"(253)
+
+//____________________________________________________________________________
+// _setScore
+
+inline void _setScore(_HirschbergSet & me,int new_score);       	// "projects/library/seqan/align/hirschberg_set.h"(193)
+
+//____________________________________________________________________________
+// _setTrailingGaps
+
+template <typename TSource, typename TSize> inline void _setTrailingGaps(Gaps<TSource, ArrayGaps> & me, TSize const & size);       	// "projects/library/seqan/align/gaps_array.h"(224)
+
+//____________________________________________________________________________
+// _smithWaterman
+
+template <typename TSource, typename TSpec, typename TScoreValue> TScoreValue _smithWaterman(Align<TSource, TSpec> & align_, LocalAlignmentFinder<TScoreValue> & sw_finder, Score<TScoreValue, Simple> const & score_, TScoreValue cutoff);       	// "projects/library/seqan/align/align_local_dynprog.h"(722)
+
+//____________________________________________________________________________
+// _smithWatermanDeclump
+
+template <typename TScoreValue, typename TSource, typename TSpec> void _smithWatermanDeclump(LocalAlignmentFinder<TScoreValue> & sw , Align<TSource, TSpec> & align_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/align/align_local_dynprog.h"(346)
+
+//____________________________________________________________________________
+// _smithWatermanGetMatrix
+
+template <typename TScoreValue, typename TString> TScoreValue _smithWatermanGetMatrix(LocalAlignmentFinder<TScoreValue> & sw, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_, TScoreValue cutoff);       	// "projects/library/seqan/align/align_local_dynprog.h"(234)
+
+//____________________________________________________________________________
+// _smithWatermanGetNext
+
+template <typename TSource, typename TSpec, typename TScoreValue> TScoreValue _smithWatermanGetNext(Align<TSource, TSpec> & align_, LocalAlignmentFinder<TScoreValue> & sw_finder , Score<TScoreValue, Simple> const & score_, TScoreValue cutoff);       	// "projects/library/seqan/align/align_local_dynprog.h"(783)
+
+//____________________________________________________________________________
+// _smithWatermanTrace
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION> typename Iterator<Matrix<TScoreValue, DIMENSION>, Standard >::Type _smithWatermanTrace(Align<TTargetSource, TTargetSpec> & target_, typename LocalAlignmentFinder<TScoreValue>::TBoolMatrix & fb_matrix, Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_, Score<TScoreValue, Simple> const & scoring_);       	// "projects/library/seqan/align/align_local_dynprog.h"(548)
+
+//____________________________________________________________________________
+// _unclippedLength
+
+template <typename TSource> inline typename Position<Gaps<TSource, ArrayGaps> >::Type _unclippedLength(Gaps<TSource, ArrayGaps> & me);       	// "projects/library/seqan/align/gaps_array.h"(243)
+
+//____________________________________________________________________________
+// _writeDebugMatrix
+
+template <typename TSource> void _writeDebugMatrix(TSource s1,TSource s2);       	// "projects/library/seqan/align/align_hirschberg.h"(49)
+template <typename TSource> void _writeDebugMatrix(TSource s1,TSource s2);       	// "projects/library/seqan/align/align_myers.h"(51)
+
+//____________________________________________________________________________
+// assignHost
+
+template <typename TValue, unsigned DIMENSION, typename THost> inline void assignHost(Matrix<TValue, DIMENSION> & me, THost const & value_);       	// "projects/library/seqan/align/matrix_base.h"(340)
+
+//____________________________________________________________________________
+// assignSource
+
+template <typename TSource, typename TSpec, typename TSource2> inline void assignSource(Gaps<TSource, TSpec> & me, TSource2 const & source_);       	// "projects/library/seqan/align/gaps_base.h"(1040)
+
+//____________________________________________________________________________
+// assignValue
+
+template <typename TGaps, typename TSpec, typename TValue> inline void assignValue(Iter<TGaps, GapsIterator<TSpec> > & me, TValue const & val);       	// "projects/library/seqan/align/gaps_iterator_base.h"(222)
+template <typename TGaps, typename TSpec, typename TValue> inline void assignValue(Iter<TGaps, GapsIterator<TSpec> > const & me, TValue const & val);       	// "projects/library/seqan/align/gaps_iterator_base.h"(234)
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue> inline void assignValue(Iter<TAlign, AlignColIterator<TSpec> > & me, TPosition pos_, TValue & val);       	// "projects/library/seqan/align/align_iterator_base.h"(348)
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue> inline void assignValue(Iter<TAlign, AlignColIterator<TSpec> > & me, TPosition pos_, TValue const & val);       	// "projects/library/seqan/align/align_iterator_base.h"(357)
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue> inline void assignValue(Iter<TAlign, AlignColIterator<TSpec> > const & me, TPosition pos_, TValue & val);       	// "projects/library/seqan/align/align_iterator_base.h"(366)
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue> inline void assignValue(Iter<TAlign, AlignColIterator<TSpec> > const & me, TPosition pos_, TValue const & val);       	// "projects/library/seqan/align/align_iterator_base.h"(375)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename TGaps> inline bool atBegin(Iter<TGaps, GapsIterator<ArrayGaps> > const & me);       	// "projects/library/seqan/align/gaps_array.h"(963)
+template <typename TGaps> inline bool atBegin(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(766)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TGaps> inline bool atEnd(Iter<TGaps, GapsIterator<ArrayGaps> > const & me);       	// "projects/library/seqan/align/gaps_array.h"(973)
+template <typename TGaps> inline bool atEnd(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(776)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TValue, unsigned DIMENSION, typename TTag> inline typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const>::Type begin(Matrix<TValue, DIMENSION> & me, Tag<TTag> const);       	// "projects/library/seqan/align/matrix_base.h"(554)
+template <typename TValue, unsigned DIMENSION, typename TTag> inline typename Iterator<Matrix <TValue, DIMENSION> const, Tag<TTag> const>::Type begin(Matrix<TValue, DIMENSION> const & me, Tag<TTag> const);       	// "projects/library/seqan/align/matrix_base.h"(561)
+template <typename TSource, typename TSpec, typename TTag> inline typename Iterator<Gaps<TSource, TSpec>, Tag<TTag> const>::Type begin(Gaps<TSource, TSpec> & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/gaps_base.h"(304)
+template <typename TSource, typename TSpec, typename TTag> inline typename Iterator<Gaps<TSource, TSpec> const, Tag<TTag> const>::Type begin(Gaps<TSource, TSpec> const & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/gaps_base.h"(312)
+template <typename TAlign, typename TTag> inline typename Iterator<AlignCols<TAlign>, Tag<TTag> const>::Type begin(AlignCols<TAlign> & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/align_cols_base.h"(343)
+template <typename TAlign, typename TTag> inline typename Iterator<AlignCols<TAlign> const, Tag<TTag> const>::Type begin(AlignCols<TAlign> const & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/align_cols_base.h"(351)
+
+//____________________________________________________________________________
+// beginPosition
+
+template <typename TSource> inline typename Position< Gaps<TSource, ArrayGaps> >::Type beginPosition(Gaps<TSource, ArrayGaps> & gaps);       	// "projects/library/seqan/align/gaps_array.h"(562)
+template <typename TSource> inline typename Position< Gaps<TSource, ArrayGaps> const>::Type beginPosition(Gaps<TSource, ArrayGaps> const & gaps);       	// "projects/library/seqan/align/gaps_array.h"(569)
+template <typename TAlign> inline typename Position<AlignCols<TAlign> >::Type beginPosition(AlignCols<TAlign> const & me);       	// "projects/library/seqan/align/align_cols_base.h"(323)
+template <typename TAlign> inline typename Position<AlignCols<TAlign> >::Type beginPosition(AlignCols<TAlign> & me);       	// "projects/library/seqan/align/align_cols_base.h"(330)
+template <typename TSource> inline typename Position< Gaps<TSource, SumlistGaps> >::Type beginPosition(Gaps<TSource, SumlistGaps> & gaps);       	// "projects/library/seqan/align/gaps_sumlist.h"(171)
+template <typename TSource> inline typename Position< Gaps<TSource, SumlistGaps> const>::Type beginPosition(Gaps<TSource, SumlistGaps> const & gaps);       	// "projects/library/seqan/align/gaps_sumlist.h"(182)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TSource> inline void clear(Gaps<TSource, ArrayGaps> & me);       	// "projects/library/seqan/align/gaps_array.h"(353)
+template <typename TScoreValue> void clear(LocalAlignmentFinder<TScoreValue> & sw_finder);       	// "projects/library/seqan/align/align_local_dynprog.h"(210)
+template <typename TSource> inline void clear(Gaps<TSource, SumlistGaps> & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(288)
+
+//____________________________________________________________________________
+// clearBit
+
+template <typename TSize, typename TSpec, typename TSpec2> inline void clearBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me);       	// "projects/library/seqan/align/align_trace.h"(302)
+
+//____________________________________________________________________________
+// clearClipping
+
+template <typename TSource> inline void clearClipping(Gaps<TSource, ArrayGaps> & me);       	// "projects/library/seqan/align/gaps_array.h"(365)
+template <typename TSource, typename TSpec> inline void clearClipping(Align<TSource, TSpec> & align_);       	// "projects/library/seqan/align/align_base.h"(533)
+template <typename TSource> inline void clearClipping(Gaps<TSource, SumlistGaps> & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(300)
+
+//____________________________________________________________________________
+// clearGaps
+
+template <typename TSource> inline void clearGaps(Gaps<TSource, ArrayGaps> & me);       	// "projects/library/seqan/align/gaps_array.h"(343)
+template <typename TSource, typename TSpec, typename TPosition1, typename TPosition2> inline void clearGaps(Gaps<TSource, TSpec> & me, TPosition1 view_pos_begin, TPosition2 view_pos_end);       	// "projects/library/seqan/align/gaps_base.h"(641)
+template <typename TSource, typename TSpec> inline void clearGaps(Gaps<TSource, TSpec> & me);       	// "projects/library/seqan/align/gaps_base.h"(674)
+template <typename TSource, typename TSpec> inline void clearGaps(Align<TSource, TSpec> & me);       	// "projects/library/seqan/align/align_base.h"(615)
+template <typename TSource> inline void clearGaps(Gaps<TSource, SumlistGaps> & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(278)
+
+//____________________________________________________________________________
+// clippedBeginPosition
+
+template <typename TSource> inline typename Position<TSource>::Type clippedBeginPosition(Gaps<TSource, ArrayGaps> const & me);       	// "projects/library/seqan/align/gaps_array.h"(276)
+template <typename TSource> inline typename Position<TSource>::Type clippedBeginPosition(Gaps<TSource, SumlistGaps> const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(221)
+
+//____________________________________________________________________________
+// clippedEndPosition
+
+template <typename TSource> inline typename Position<TSource>::Type clippedEndPosition(Gaps<TSource, ArrayGaps> const & me);       	// "projects/library/seqan/align/gaps_array.h"(309)
+template <typename TSource> inline typename Position<TSource>::Type clippedEndPosition(Gaps<TSource, SumlistGaps> const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(241)
+
+//____________________________________________________________________________
+// col
+
+template <typename TSource, typename TSpec, typename TPosition> inline typename Col< Align<TSource, TSpec> >::Type col(Align<TSource, TSpec> & me, TPosition _pos);       	// "projects/library/seqan/align/align_base.h"(418)
+template <typename TSource, typename TSpec, typename TPosition> inline typename Col< Align<TSource, TSpec> const>::Type col(Align<TSource, TSpec> const & me, TPosition _pos);       	// "projects/library/seqan/align/align_base.h"(426)
+
+//____________________________________________________________________________
+// cols
+
+template <typename TSource, typename TSpec> inline typename Cols< Align<TSource, TSpec> >::Type cols(Align<TSource, TSpec> & me);       	// "projects/library/seqan/align/align_base.h"(385)
+template <typename TSource, typename TSpec> inline typename Cols< Align<TSource, TSpec> const>::Type cols(Align<TSource, TSpec> const & me);       	// "projects/library/seqan/align/align_base.h"(392)
+
+//____________________________________________________________________________
+// container
+
+template <typename TGaps, typename TSpec> inline TGaps & container(Iter<TGaps, GapsIterator<TSpec> > & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(273)
+template <typename TGaps, typename TSpec> inline TGaps & container(Iter<TGaps, GapsIterator<TSpec> > const & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(281)
+template <typename TAlign, typename TSpec> inline typename Cols<TAlign>::Type container(Iter<TAlign, AlignColIterator<TSpec> > & me);       	// "projects/library/seqan/align/align_iterator_base.h"(136)
+template <typename TAlign, typename TSpec> inline typename Cols<TAlign>::Type container(Iter<TAlign, AlignColIterator<TSpec> > const & me);       	// "projects/library/seqan/align/align_iterator_base.h"(143)
+template <typename TContainer, typename TSpec> inline TContainer & container(Navi<TContainer, TSpec> & me);       	// "projects/library/seqan/align/align_trace.h"(261)
+template <typename TContainer, typename TSpec> inline TContainer const & container(Navi<TContainer, TSpec> const & me);       	// "projects/library/seqan/align/align_trace.h"(267)
+
+//____________________________________________________________________________
+// coordinate
+
+template <typename TValue, unsigned DIMENSION, typename TPosition> inline typename Size< Matrix <TValue, DIMENSION> >::Type coordinate(Matrix<TValue, DIMENSION> & me, TPosition position_, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(535)
+template <typename TValue, unsigned DIMENSION> inline typename Size< Matrix<TValue, DIMENSION> >::Type coordinate(Iter<Matrix<TValue, DIMENSION>, PositionIterator > & me, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(744)
+template <typename TValue, unsigned DIMENSION> inline typename Size< Matrix<TValue, DIMENSION> >::Type coordinate(Iter<Matrix<TValue, DIMENSION> const, PositionIterator > & me, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(752)
+
+//____________________________________________________________________________
+// copyGaps
+
+template <typename TSource, typename TSpec, typename TPosition1, typename TSourceGaps, typename TPosition2, typename TPosition3> inline void copyGaps(Gaps<TSource, TSpec> & target_gaps, TPosition1 target_view_pos_begin, TSourceGaps const & source_gaps, TPosition2 source_view_pos_begin, TPosition3 source_view_pos_end);       	// "projects/library/seqan/align/gaps_base.h"(691)
+
+//____________________________________________________________________________
+// countCharacters
+
+template <typename TGaps> inline typename Size<TGaps>::Type countCharacters(Iter<TGaps, GapsIterator<ArrayGaps> > const & me);       	// "projects/library/seqan/align/gaps_array.h"(867)
+template <typename TSource, typename TSpec, typename TPosition> inline typename Size<Gaps<TSource, TSpec> >::Type countCharacters(Gaps<TSource, TSpec> const & me, TPosition view_pos);       	// "projects/library/seqan/align/gaps_base.h"(606)
+template <typename TSource, typename TSpec, typename TPoistion> inline typename Size<Gaps<TSource, TSpec> >::Type countCharacters(Gaps<TSource, TSpec> & me, TPoistion view_pos);       	// "projects/library/seqan/align/gaps_base.h"(615)
+
+//____________________________________________________________________________
+// countGaps
+
+template <typename TGaps> inline typename Size<TGaps>::Type countGaps(Iter<TGaps, GapsIterator<ArrayGaps> > const & me);       	// "projects/library/seqan/align/gaps_array.h"(828)
+template <typename TSource, typename TSpec, typename TPosition> inline typename Size<Gaps<TSource, TSpec> >::Type countGaps(Gaps<TSource, TSpec> & me, TPosition view_pos);       	// "projects/library/seqan/align/gaps_base.h"(572)
+template <typename TSource, typename TSpec, typename TPosition> inline typename Size<Gaps<TSource, TSpec> >::Type countGaps(Gaps<TSource, TSpec> const & me, TPosition view_pos);       	// "projects/library/seqan/align/gaps_base.h"(580)
+template <typename TGaps> inline typename Size<TGaps>::Type countGaps(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(693)
+
+//____________________________________________________________________________
+// createSource
+
+template <typename TSource, typename TSpec> inline void createSource(Gaps<TSource, TSpec> & me);       	// "projects/library/seqan/align/gaps_base.h"(893)
+
+//____________________________________________________________________________
+// dependent
+
+template <typename TValue, unsigned DIMENSION> inline bool dependent(Matrix<TValue, DIMENSION> & me);       	// "projects/library/seqan/align/matrix_base.h"(305)
+
+//____________________________________________________________________________
+// dependentSource
+
+template <typename TSource, typename TSpec> inline bool dependentSource(Gaps<TSource, TSpec> & me);       	// "projects/library/seqan/align/gaps_base.h"(810)
+template <typename TSource, typename TSpec> inline bool dependentSource(Gaps<TSource, TSpec> const & me);       	// "projects/library/seqan/align/gaps_base.h"(817)
+
+//____________________________________________________________________________
+// detach
+
+template <typename TSource, typename TSpec> inline void detach(Gaps<TSource, TSpec> & me);       	// "projects/library/seqan/align/gaps_base.h"(909)
+template <typename TSource, typename TSpec> inline void detach(Align<TSource, TSpec> & me);       	// "projects/library/seqan/align/align_base.h"(438)
+
+//____________________________________________________________________________
+// dimension
+
+template <typename TValue, unsigned DIMENSION> inline unsigned int dimension(Matrix<TValue, DIMENSION> & me);       	// "projects/library/seqan/align/matrix_base.h"(381)
+template <typename TSize, typename TSpec> inline unsigned int dimension(AlignTrace<TSize, TSpec> & me);       	// "projects/library/seqan/align/align_trace.h"(74)
+
+//____________________________________________________________________________
+// empty
+
+template <typename TValue, unsigned DIMENSION> inline bool empty(Matrix<TValue, DIMENSION> const & me);       	// "projects/library/seqan/align/matrix_base.h"(421)
+
+//____________________________________________________________________________
+// emptySource
+
+template <typename TSource, typename TSpec> inline bool emptySource(Gaps<TSource, TSpec> & me);       	// "projects/library/seqan/align/gaps_base.h"(776)
+template <typename TSource, typename TSpec> inline bool emptySource(Gaps<TSource, TSpec> const & me);       	// "projects/library/seqan/align/gaps_base.h"(784)
+
+//____________________________________________________________________________
+// end
+
+template <typename TValue, unsigned DIMENSION, typename TTag> inline typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const >::Type end(Matrix<TValue, DIMENSION> & me, Tag<TTag> const);       	// "projects/library/seqan/align/matrix_base.h"(571)
+template <typename TValue, unsigned DIMENSION, typename TTag> inline typename Iterator<Matrix <TValue, DIMENSION> const, Tag<TTag> const >::Type end(Matrix<TValue, DIMENSION> const & me, Tag<TTag> const);       	// "projects/library/seqan/align/matrix_base.h"(578)
+template <typename TSource, typename TSpec, typename TTag> inline typename Iterator<Gaps<TSource, TSpec>, Tag<TTag> const>::Type end(Gaps<TSource, TSpec> & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/gaps_base.h"(325)
+template <typename TSource, typename TSpec, typename TTag> inline typename Iterator<Gaps<TSource, TSpec> const, Tag<TTag> const>::Type end(Gaps<TSource, TSpec> const & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/gaps_base.h"(333)
+template <typename TAlign, typename TTag> inline typename Iterator<AlignCols<TAlign>, Tag<TTag> const>::Type end(AlignCols<TAlign> & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/align_cols_base.h"(405)
+template <typename TAlign, typename TTag> inline typename Iterator<AlignCols<TAlign> const, Tag<TTag> const>::Type end(AlignCols<TAlign> const & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/align_cols_base.h"(413)
+
+//____________________________________________________________________________
+// endPosition
+
+template <typename TSource> inline typename Position<Gaps<TSource, ArrayGaps> >::Type endPosition(Gaps<TSource, ArrayGaps> & me);       	// "projects/library/seqan/align/gaps_array.h"(199)
+template <typename TSource> inline typename Position<Gaps<TSource, ArrayGaps> >::Type endPosition(Gaps<TSource, ArrayGaps> const & me);       	// "projects/library/seqan/align/gaps_array.h"(206)
+template <typename TAlign> inline typename Position<AlignCols<TAlign> >::Type endPosition(AlignCols<TAlign> & me);       	// "projects/library/seqan/align/align_cols_base.h"(385)
+template <typename TAlign> inline typename Position<AlignCols<TAlign> const>::Type endPosition(AlignCols<TAlign> const & me);       	// "projects/library/seqan/align/align_cols_base.h"(392)
+template <typename TSource> inline typename Position<Gaps<TSource, SumlistGaps> >::Type endPosition(Gaps<TSource, SumlistGaps> & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(204)
+template <typename TSource> inline typename Position<Gaps<TSource, SumlistGaps> >::Type endPosition(Gaps<TSource, SumlistGaps> const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(211)
+
+//____________________________________________________________________________
+// gapValueImpl
+
+template <typename THost, typename TSpec> inline ModifiedAlphabet<THost, ModExpand<'-', TSpec> > gapValueImpl(ModifiedAlphabet<THost, ModExpand<'-', TSpec> > *);       	// "projects/library/seqan/align/gaps_base.h"(69)
+
+//____________________________________________________________________________
+// getBit
+
+template <typename TSize, typename TSpec, typename TSpec2> inline bool getBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me);       	// "projects/library/seqan/align/align_trace.h"(284)
+
+//____________________________________________________________________________
+// getScore
+
+template <typename TScoreValue> TScoreValue getScore(LocalAlignmentFinder<TScoreValue> & sw);       	// "projects/library/seqan/align/align_local_dynprog.h"(218)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TGaps> inline typename GetValue< Iter<TGaps, GapsIterator<ArrayGaps> > >::Type getValue(Iter<TGaps, GapsIterator<ArrayGaps> > & me);       	// "projects/library/seqan/align/gaps_array.h"(797)
+template <typename TGaps> inline typename GetValue< Iter<TGaps, GapsIterator<ArrayGaps> > const>::Type getValue(Iter<TGaps, GapsIterator<ArrayGaps> > const & me);       	// "projects/library/seqan/align/gaps_array.h"(806)
+template <typename TSource, typename TSpec, typename TPosition> inline typename GetValue<Gaps<TSource, TSpec> >::Type getValue(Gaps<TSource, TSpec> & me, TPosition view_pos);       	// "projects/library/seqan/align/gaps_base.h"(717)
+template <typename TSource, typename TSpec, typename TPosition> inline typename GetValue<Gaps<TSource, TSpec> >::Type getValue(Gaps<TSource, TSpec> const & me, TPosition view_pos);       	// "projects/library/seqan/align/gaps_base.h"(727)
+template <typename TAlign, typename TSpec, typename TPosition> inline typename GetValue<TAlign>::Type getValue(Iter<TAlign, AlignColIterator<TSpec> > & me, TPosition pos_);       	// "projects/library/seqan/align/align_iterator_base.h"(328)
+template <typename TAlign, typename TSpec, typename TPosition> inline typename GetValue<TAlign>::Type getValue(Iter<TAlign, AlignColIterator<TSpec> > const & me, TPosition pos_);       	// "projects/library/seqan/align/align_iterator_base.h"(336)
+template <typename TGaps> inline typename GetValue< Iter<TGaps, GapsIterator<SumlistGaps> > >::Type getValue(Iter<TGaps, GapsIterator<SumlistGaps> > & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(618)
+template <typename TGaps> inline typename GetValue< Iter<TGaps, GapsIterator<SumlistGaps> > const>::Type getValue(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(627)
+
+//____________________________________________________________________________
+// globalAlignment
+
+template <typename TAlign, typename TScoreValue, typename TScoreSpec> TScoreValue globalAlignment(TAlign & align_, Score<TScoreValue, TScoreSpec> const & score_);       	// "projects/library/seqan/align/align_algorithms.h"(205)
+template <typename TSource, typename TSpec, typename TScoreValue, typename TScoreSpec, typename TAlignConfig, typename TAlgorithm> TScoreValue globalAlignment(Align<TSource, TSpec> & align_, Score<TScoreValue, TScoreSpec> const & score_, TAlignConfig tag_align_config, TAlgorithm tag_algorithm);       	// "projects/library/seqan/align/align_algorithms.h"(227)
+template <typename TSource, typename TSpec, typename TScoreValue, typename TScoreSpec, typename TAlgorithm> TScoreValue globalAlignment(Align<TSource, TSpec> & align_, Score<TScoreValue, TScoreSpec> const & score_, TAlgorithm tag_algorithm);       	// "projects/library/seqan/align/align_algorithms.h"(247)
+template <typename TSource, typename TSpec, typename TScoreValue> TScoreValue globalAlignment(Align<TSource, TSpec> & align_, Score<TScoreValue, Simple> const & score_, Hirschberg);       	// "projects/library/seqan/align/align_hirschberg.h"(174)
+template <typename TSource, typename TSpec, typename TScoreValue> TScoreValue globalAlignment(Align<TSource, TSpec> & align_, Score<TScoreValue, Simple> const &, MyersBitVector);       	// "projects/library/seqan/align/align_myers.h"(171)
+template <typename TSource, typename TSpec, typename TScoreValue> TScoreValue globalAlignment(Align<TSource, TSpec> & align_, Score<TScoreValue, Simple> const &, MyersHirschberg);       	// "projects/library/seqan/align/align_myers.h"(374)
+
+//____________________________________________________________________________
+// goFurther
+
+template <typename TGaps, typename TSpec, typename TSize> inline void goFurther(Iter<TGaps, GapsIterator<TSpec> > & me, TSize steps);       	// "projects/library/seqan/align/gaps_iterator_base.h"(310)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TGaps> inline void goNext(Iter<TGaps, GapsIterator<ArrayGaps> > & me);       	// "projects/library/seqan/align/gaps_array.h"(910)
+template <typename TGaps> inline void goNext(Iter<TGaps, GapsIterator<ArrayGaps> > const & me);       	// "projects/library/seqan/align/gaps_array.h"(916)
+template <typename TValue, unsigned DIMENSION> inline void goNext(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(642)
+template <typename TValue, unsigned DIMENSION> inline void goNext(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(650)
+template <typename TValue, unsigned DIMENSION> inline void goNext(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me);       	// "projects/library/seqan/align/matrix_base.h"(657)
+template <typename TValue, unsigned DIMENSION> inline void goNext(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me);       	// "projects/library/seqan/align/matrix_base.h"(664)
+template <typename TAlign, typename TSpec> inline void goNext(Iter<TAlign, AlignColIterator<TSpec> > & me);       	// "projects/library/seqan/align/align_iterator_base.h"(153)
+template <typename TGaps> inline void goNext(Iter<TGaps, GapsIterator<SumlistGaps> > & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(722)
+template <typename TGaps> inline void goNext(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(728)
+template <typename TSize, typename TSpec, typename TSpec2> inline void goNext(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me, unsigned int dimension_);       	// "projects/library/seqan/align/align_trace.h"(312)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename TGaps> inline void goPrevious(Iter<TGaps, GapsIterator<ArrayGaps> > & me);       	// "projects/library/seqan/align/gaps_array.h"(949)
+template <typename TGaps> inline void goPrevious(Iter<TGaps, GapsIterator<ArrayGaps> > const & me);       	// "projects/library/seqan/align/gaps_array.h"(955)
+template <typename TValue, unsigned DIMENSION> inline void goPrevious(Iter< Matrix<TValue, DIMENSION>, PositionIterator > & me, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(676)
+template <typename TValue, unsigned DIMENSION> inline void goPrevious(Iter< Matrix<TValue, DIMENSION> const, PositionIterator > & me, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(684)
+template <typename TValue, unsigned DIMENSION> inline void goPrevious(Iter< Matrix<TValue, DIMENSION>, PositionIterator > & me);       	// "projects/library/seqan/align/matrix_base.h"(691)
+template <typename TValue, unsigned DIMENSION> inline void goPrevious(Iter< Matrix<TValue, DIMENSION> const, PositionIterator > & me);       	// "projects/library/seqan/align/matrix_base.h"(698)
+template <typename TAlign, typename TSpec> inline void goPrevious(Iter<TAlign, AlignColIterator<TSpec> > & me);       	// "projects/library/seqan/align/align_iterator_base.h"(196)
+template <typename TGaps> inline void goPrevious(Iter<TGaps, GapsIterator<SumlistGaps> > & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(752)
+template <typename TGaps> inline void goPrevious(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(758)
+template <typename TSize, typename TSpec, typename TSpec2> inline void goPrevious(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me, unsigned int dimension_);       	// "projects/library/seqan/align/align_trace.h"(352)
+
+//____________________________________________________________________________
+// goTo
+
+template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1> inline void goTo(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1);       	// "projects/library/seqan/align/matrix_base.h"(709)
+template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1> inline void goTo(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1);       	// "projects/library/seqan/align/matrix_base.h"(717)
+template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1, typename TPosition2> inline void goTo(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1, TPosition2 pos2);       	// "projects/library/seqan/align/matrix_base.h"(725)
+template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1, typename TPosition2> inline void goTo(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1, TPosition2 pos2);       	// "projects/library/seqan/align/matrix_base.h"(733)
+
+//____________________________________________________________________________
+// host
+
+template <typename TValue, unsigned DIMENSION> inline typename Host<Matrix<TValue, DIMENSION> >::Type & host(Matrix<TValue, DIMENSION> & me);       	// "projects/library/seqan/align/matrix_base.h"(324)
+template <typename TValue, unsigned DIMENSION> inline typename Host<Matrix<TValue, DIMENSION> >::Type const & host(Matrix<TValue, DIMENSION> const & me);       	// "projects/library/seqan/align/matrix_base.h"(331)
+template <typename TAlign, typename TSpec> inline TAlign & host(Iter<TAlign, AlignColIterator<TSpec> > & me);       	// "projects/library/seqan/align/align_iterator_base.h"(109)
+template <typename TAlign, typename TSpec> inline TAlign & host(Iter<TAlign, AlignColIterator<TSpec> > const & me);       	// "projects/library/seqan/align/align_iterator_base.h"(116)
+template <typename TAlign> inline typename Host<AlignCols<TAlign> >::Type & host(AlignCols<TAlign> & me);       	// "projects/library/seqan/align/align_cols_base.h"(230)
+template <typename TAlign> inline typename Host<AlignCols<TAlign> const>::Type & host(AlignCols<TAlign> const & me);       	// "projects/library/seqan/align/align_cols_base.h"(238)
+
+//____________________________________________________________________________
+// id
+
+template <typename TSource, typename TSpec> inline void const * id(Gaps<TSource, TSpec> & me);       	// "projects/library/seqan/align/gaps_base.h"(283)
+template <typename TSource, typename TSpec> inline void const * id(Gaps<TSource, TSpec> const & me);       	// "projects/library/seqan/align/gaps_base.h"(290)
+
+//____________________________________________________________________________
+// insertGap
+
+template <typename TGaps, typename TSpec> inline void insertGap(Iter<TGaps, GapsIterator<TSpec> > const & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(179)
+template <typename TSource, typename TSpec, typename TPosition> inline void insertGap(Gaps<TSource, TSpec> & me, TPosition _view_pos);       	// "projects/library/seqan/align/gaps_base.h"(436)
+
+//____________________________________________________________________________
+// insertGaps
+
+template <typename TGaps, typename TCount> inline void insertGaps(Iter<TGaps, GapsIterator<ArrayGaps> > const & me, TCount size);       	// "projects/library/seqan/align/gaps_array.h"(984)
+template <typename TSource, typename TSpec, typename TPosition, typename TSize> inline void insertGaps(Gaps<TSource, TSpec> & me, TPosition _view_pos, TSize _size);       	// "projects/library/seqan/align/gaps_base.h"(460)
+template <typename TGaps, typename TCount> inline void insertGaps(Iter<TGaps, GapsIterator<SumlistGaps> > const & me, TCount size);       	// "projects/library/seqan/align/gaps_sumlist.h"(787)
+
+//____________________________________________________________________________
+// integrateAlign
+
+template <typename TSource1, typename TSpec1, typename TSource2, typename TSpec2, typename TPos> void integrateAlign(Align<TSource1, TSpec1> & align, Align<TSource2, TSpec2> const & infixAlign, String<TPos> viewPos);       	// "projects/library/seqan/align/align_algorithms.h"(119)
+template <typename TSource, typename TSpec1, typename TSpec2> void integrateAlign(Align<TSource, TSpec1> & align, Align<typename Infix<TSource>::Type, TSpec2> const & infixAlign);       	// "projects/library/seqan/align/align_algorithms.h"(179)
+
+//____________________________________________________________________________
+// isGap
+
+template <typename TGaps> inline bool isGap(Iter<TGaps, GapsIterator<ArrayGaps> > const & me);       	// "projects/library/seqan/align/gaps_array.h"(818)
+template <typename TSource, typename TSpec, typename TPosition> inline bool isGap(Gaps<TSource, TSpec> & me, TPosition view_pos);       	// "projects/library/seqan/align/gaps_base.h"(535)
+template <typename TSource, typename TSpec, typename TPosition> inline bool isGap(Gaps<TSource, TSpec> const & me, TPosition view_pos);       	// "projects/library/seqan/align/gaps_base.h"(543)
+template <typename TGaps> inline bool isGap(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(683)
+
+//____________________________________________________________________________
+// iter
+
+template <typename TSource, typename TPosition, typename TTag> inline typename Iterator<Gaps<TSource, ArrayGaps>, Tag<TTag> const>::Type iter(Gaps<TSource, ArrayGaps> & gaps, TPosition view_pos, Tag<TTag> const);       	// "projects/library/seqan/align/gaps_array.h"(543)
+template <typename TSource, typename TPosition, typename TTag> inline typename Iterator<Gaps<TSource, ArrayGaps> const, Tag<TTag> const>::Type iter(Gaps<TSource, ArrayGaps> const & gaps, TPosition view_pos, Tag<TTag> const);       	// "projects/library/seqan/align/gaps_array.h"(552)
+template <typename TAlign, typename TPosition, typename TTag> inline typename Iterator<AlignCols<TAlign>, Tag<TTag> const>::Type iter(AlignCols<TAlign> & me, TPosition pos_, Tag<TTag> const);       	// "projects/library/seqan/align/align_cols_base.h"(253)
+template <typename TAlign, typename TPosition, typename TTag> inline typename Iterator<AlignCols<TAlign> const, Tag<TTag> const>::Type iter(AlignCols<TAlign> const & me, TPosition pos_, Tag<TTag> const);       	// "projects/library/seqan/align/align_cols_base.h"(262)
+template <typename TSource, typename TPosition, typename TTag> inline typename Iterator<Gaps<TSource, SumlistGaps>, Tag<TTag> const>::Type iter(Gaps<TSource, SumlistGaps> & gaps, TPosition view_pos, Tag<TTag> const);       	// "projects/library/seqan/align/gaps_sumlist.h"(382)
+template <typename TSource, typename TPosition, typename TTag> inline typename Iterator<Gaps<TSource, SumlistGaps> const, Tag<TTag> const>::Type iter(Gaps<TSource, SumlistGaps> const & gaps, TPosition view_pos, Tag<TTag> const);       	// "projects/library/seqan/align/gaps_sumlist.h"(393)
+
+//____________________________________________________________________________
+// length
+
+template <typename TValue, unsigned DIMENSION> inline typename Size<Matrix<TValue, DIMENSION> >::Type length(Matrix<TValue, DIMENSION> const & me, unsigned int dim_);       	// "projects/library/seqan/align/matrix_base.h"(408)
+template <typename TValue, unsigned DIMENSION> inline typename Size<Matrix <TValue, DIMENSION> >::Type length(Matrix<TValue, DIMENSION> const & me);       	// "projects/library/seqan/align/matrix_base.h"(415)
+template <typename TSource, typename TSpec> inline typename Size<Gaps<TSource, TSpec> >::Type length(Gaps<TSource, TSpec> const & me);       	// "projects/library/seqan/align/gaps_base.h"(345)
+template <typename TAlign> inline typename Size<AlignCols<TAlign> >::Type length(AlignCols<TAlign> const & me);       	// "projects/library/seqan/align/align_cols_base.h"(423)
+template <typename TSize, typename TSpec> inline TSize length(AlignTrace<TSize, TSpec> const & me, TSize _dim);       	// "projects/library/seqan/align/align_trace.h"(94)
+
+//____________________________________________________________________________
+// localAlignment
+
+template <typename TSource, typename TSpec, typename TScoreValue> inline TScoreValue localAlignment(Align<TSource, TSpec> & align_, Score<TScoreValue, Simple> const & score_, SmithWaterman);       	// "projects/library/seqan/align/align_local_dynprog.h"(834)
+template <typename TSource, typename TSpec, typename TScoreValue> inline TScoreValue localAlignment(Align<TSource, TSpec> & align_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/align/align_local_dynprog.h"(844)
+template <typename TSource, typename TSpec, typename TScoreValue1, typename TScoreValue2, typename TScoreValue3> inline TScoreValue1 localAlignment(Align<TSource, TSpec> & align_, LocalAlignmentFinder<TScoreValue1> & sw_finder, Score<TScoreValue2, Simple> const & score_, TScoreValue3 cutoff, WatermanEggert);       	// "projects/library/seqan/align/align_local_dynprog.h"(857)
+template <typename TSource, typename TSpec, typename TScoreValue1, typename TScoreValue2, typename TScoreValue3> inline TScoreValue1 localAlignment(Align<TSource, TSpec> & align_, LocalAlignmentFinder<TScoreValue1> & sw_finder, Score<TScoreValue2, Simple> const & score_, TScoreValue3 cutoff);       	// "projects/library/seqan/align/align_local_dynprog.h"(873)
+template <typename TSource, typename TSpec, typename TScoreValue, typename TDiagonal> inline TScoreValue localAlignment(Align<TSource, TSpec> & align, Score<TScoreValue, Simple> const & score, TDiagonal lowerDiag, TDiagonal upperDiag, BandedSmithWaterman);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(519)
+template <typename TSource, typename TSpec, typename TScoreValue, typename TDiagonal> inline TScoreValue localAlignment(Align<TSource, TSpec> & align_, Score<TScoreValue, Simple> const & score_, TDiagonal lowerDiag, TDiagonal upperDiag);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(544)
+template <typename TSource, typename TSpec, typename TScoreValue1, typename TScoreValue2, typename TScoreValue3, typename TDiagonal, typename TTag> inline TScoreValue1 localAlignment(Align<TSource, TSpec> & align, LocalAlignmentFinder<TScoreValue1> & finder, Score<TScoreValue2, Simple> const & score, TScoreValue3 cutoff, TDiagonal lowerDiag, TDiagonal upperDiag, TTag tag);       	// "projects/library/seqan/align/align_local_dynprog_banded.h"(558)
+
+//____________________________________________________________________________
+// move
+
+template <typename TSource, typename TSpec> inline void move(Align<TSource, TSpec> & target, Align<TSource, TSpec> & source);       	// "projects/library/seqan/align/align_base.h"(182)
+
+//____________________________________________________________________________
+// moveHost
+
+template <typename TValue, unsigned DIMENSION, typename THost> inline void moveHost(Matrix<TValue, DIMENSION> & me, THost const & value_);       	// "projects/library/seqan/align/matrix_base.h"(349)
+
+//____________________________________________________________________________
+// moveNextBit
+
+template <typename TSize, typename TSpec, typename TSpec2> inline void moveNextBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me);       	// "projects/library/seqan/align/align_trace.h"(389)
+
+//____________________________________________________________________________
+// movePreviousBit
+
+template <typename TSize, typename TSpec, typename TSpec2> inline void movePreviousBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me);       	// "projects/library/seqan/align/align_trace.h"(406)
+
+//____________________________________________________________________________
+// moveSource
+
+template <typename TSource, typename TSpec, typename TSource2, typename TPosition1, typename TPosition2> inline void moveSource(Gaps<TSource, TSpec> & me, TSource2 const & source_, TPosition1 clipped_begin_pos, TPosition2 clipped_end_pos);       	// "projects/library/seqan/align/gaps_base.h"(1085)
+template <typename TSource, typename TSpec, typename TSource2> inline void moveSource(Gaps<TSource, TSpec> & me, TSource2 const & source_);       	// "projects/library/seqan/align/gaps_base.h"(1099)
+
+//____________________________________________________________________________
+// moveValue
+
+template <typename TGaps, typename TSpec, typename TValue> inline void moveValue(Iter<TGaps, GapsIterator<TSpec> > & me, TValue const & val);       	// "projects/library/seqan/align/gaps_iterator_base.h"(247)
+template <typename TGaps, typename TSpec, typename TValue> inline void moveValue(Iter<TGaps, GapsIterator<TSpec> > const & me, TValue const & val);       	// "projects/library/seqan/align/gaps_iterator_base.h"(258)
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue> inline void moveValue(Iter<TAlign, AlignColIterator<TSpec> > & me, TPosition pos_, TValue & val);       	// "projects/library/seqan/align/align_iterator_base.h"(387)
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue> inline void moveValue(Iter<TAlign, AlignColIterator<TSpec> > & me, TPosition pos_, TValue const & val);       	// "projects/library/seqan/align/align_iterator_base.h"(396)
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue> inline void moveValue(Iter<TAlign, AlignColIterator<TSpec> > const & me, TPosition pos_, TValue & val);       	// "projects/library/seqan/align/align_iterator_base.h"(405)
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue> inline void moveValue(Iter<TAlign, AlignColIterator<TSpec> > const & me, TPosition pos_, TValue const & val);       	// "projects/library/seqan/align/align_iterator_base.h"(414)
+
+//____________________________________________________________________________
+// nextPosition
+
+template <typename TValue, unsigned DIMENSION, typename TPosition> inline typename Position<Matrix <TValue, DIMENSION> >::Type nextPosition(Matrix<TValue, DIMENSION> & me, TPosition position_, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(497)
+template <typename TValue, unsigned DIMENSION, typename TPosition> inline typename Position<Matrix <TValue, DIMENSION> >::Type nextPosition(Matrix<TValue, DIMENSION> const & me, TPosition position_, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(506)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TGaps1, typename TGaps2> inline bool operator!= (Iter<TGaps1, GapsIterator<ArrayGaps> > & _left, Iter<TGaps2, GapsIterator<ArrayGaps> > & _right);       	// "projects/library/seqan/align/gaps_array.h"(1150)
+template <typename TGaps1, typename TGaps2> inline bool operator!= (Iter<TGaps1, GapsIterator<ArrayGaps> > const & _left, Iter<TGaps2, GapsIterator<ArrayGaps> > & _right);       	// "projects/library/seqan/align/gaps_array.h"(1158)
+template <typename TGaps1, typename TGaps2> inline bool operator!= (Iter<TGaps1, GapsIterator<ArrayGaps> > & _left, Iter<TGaps2, GapsIterator<ArrayGaps> > const & _right);       	// "projects/library/seqan/align/gaps_array.h"(1166)
+template <typename TGaps1, typename TGaps2> inline bool operator!= (Iter<TGaps1, GapsIterator<ArrayGaps> > const & _left, Iter<TGaps2, GapsIterator<ArrayGaps> > const & _right);       	// "projects/library/seqan/align/gaps_array.h"(1174)
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec > inline bool operator!= (Gaps<TLeftSource, TLeftSpec> const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1194)
+template <typename TLeftSource, typename TLeftSpec, typename TRight > inline bool operator!=(Gaps<TLeftSource, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/align/gaps_base.h"(1203)
+template <typename TLeft, typename TRightSource, typename TRightSpec > inline bool operator!= (TLeft const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1212)
+template <typename TAlign1, typename TAlign2, typename TSpec> inline bool operator!=(Iter<TAlign1, AlignColIterator<TSpec> > & _left, Iter<TAlign2, AlignColIterator<TSpec> > & _right);       	// "projects/library/seqan/align/align_iterator_base.h"(275)
+template <typename TAlign1, typename TAlign2, typename TSpec> inline bool operator!=(Iter<TAlign1, AlignColIterator<TSpec> > const & _left, Iter<TAlign2, AlignColIterator<TSpec> > & _right);       	// "projects/library/seqan/align/align_iterator_base.h"(283)
+template <typename TAlign1, typename TAlign2, typename TSpec> inline bool operator!=(Iter<TAlign1, AlignColIterator<TSpec> > & _left, Iter<TAlign2, AlignColIterator<TSpec> > const & _right);       	// "projects/library/seqan/align/align_iterator_base.h"(291)
+template <typename TAlign1, typename TAlign2, typename TSpec> inline bool operator!=(Iter<TAlign1, AlignColIterator<TSpec> > const & _left, Iter<TAlign2, AlignColIterator<TSpec> > const & _right);       	// "projects/library/seqan/align/align_iterator_base.h"(299)
+template <typename TGaps1, typename TGaps2> inline bool operator!= (Iter<TGaps1, GapsIterator<SumlistGaps> > & _left, Iter<TGaps2, GapsIterator<SumlistGaps> > & _right);       	// "projects/library/seqan/align/gaps_sumlist.h"(904)
+template <typename TGaps1, typename TGaps2> inline bool operator!= (Iter<TGaps1, GapsIterator<SumlistGaps> > const & _left, Iter<TGaps2, GapsIterator<SumlistGaps> > & _right);       	// "projects/library/seqan/align/gaps_sumlist.h"(912)
+template <typename TGaps1, typename TGaps2> inline bool operator!= (Iter<TGaps1, GapsIterator<SumlistGaps> > & _left, Iter<TGaps2, GapsIterator<SumlistGaps> > const & _right);       	// "projects/library/seqan/align/gaps_sumlist.h"(920)
+template <typename TGaps1, typename TGaps2> inline bool operator!= (Iter<TGaps1, GapsIterator<SumlistGaps> > const & _left, Iter<TGaps2, GapsIterator<SumlistGaps> > const & _right);       	// "projects/library/seqan/align/gaps_sumlist.h"(928)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TValue> Matrix<TValue, 2> operator* (Matrix<TValue, 2> const & matrix1, Matrix<TValue, 2> const & matrix2);       	// "projects/library/seqan/align/matrix_base.h"(815)
+template <typename TValue> Matrix<TValue, 2> operator* (TValue const & scalar, Matrix<TValue, 2> const & matrix);       	// "projects/library/seqan/align/matrix_base.h"(845)
+template <typename TValue> Matrix<TValue, 2> operator* (Matrix<TValue, 2> const & matrix, TValue const & scalar);       	// "projects/library/seqan/align/matrix_base.h"(860)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename TValue,unsigned DIMENSION> Matrix<TValue,DIMENSION> operator+ (Matrix<TValue,DIMENSION> const & matrix1,Matrix<TValue,DIMENSION> const & matrix2);       	// "projects/library/seqan/align/matrix_base.h"(771)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename TGaps, typename TSpec> inline Iter<TGaps, GapsIterator<TSpec> > const & operator++(Iter<TGaps, GapsIterator<TSpec> > const & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(132)
+template <typename TGaps, typename TSpec> inline Iter<TGaps, GapsIterator<TSpec> > const operator++(Iter<TGaps, GapsIterator<TSpec> > const & me, int);       	// "projects/library/seqan/align/gaps_iterator_base.h"(141)
+template <typename TAlign, typename TSpec> inline Iter<TAlign, AlignColIterator<TSpec> > & operator++(Iter<TAlign, AlignColIterator<TSpec> > & me);       	// "projects/library/seqan/align/align_iterator_base.h"(174)
+template <typename TAlign, typename TSpec> inline Iter<TAlign, AlignColIterator<TSpec> > operator++(Iter<TAlign, AlignColIterator<TSpec> > & me, int);       	// "projects/library/seqan/align/align_iterator_base.h"(184)
+template <typename TSize, typename TSpec, typename TSpec2> inline Navi< AlignTrace<TSize, TSpec>, TSpec2> const & operator++ (Navi< AlignTrace<TSize, TSpec>, TSpec2> & me);       	// "projects/library/seqan/align/align_trace.h"(340)
+
+//____________________________________________________________________________
+// operator-
+
+template <typename TValue,unsigned DIMENSION> Matrix<TValue,DIMENSION> operator- (Matrix<TValue,DIMENSION> const & matrix1,Matrix<TValue,DIMENSION> const & matrix2);       	// "projects/library/seqan/align/matrix_base.h"(793)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename TGaps, typename TSpec> inline Iter<TGaps, GapsIterator<TSpec> > const & operator--(Iter<TGaps, GapsIterator<TSpec> > const & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(153)
+template <typename TGaps, typename TSpec> inline Iter<TGaps, GapsIterator<TSpec> > const operator--(Iter<TGaps, GapsIterator<TSpec> > const & me, int);       	// "projects/library/seqan/align/gaps_iterator_base.h"(162)
+template <typename TAlign, typename TSpec> inline Iter<TAlign, AlignColIterator<TSpec> > & operator--(Iter<TAlign, AlignColIterator<TSpec> > & me);       	// "projects/library/seqan/align/align_iterator_base.h"(217)
+template <typename TAlign, typename TSpec> inline Iter<TAlign, AlignColIterator<TSpec> > operator--(Iter<TAlign, AlignColIterator<TSpec> > & me, int);       	// "projects/library/seqan/align/align_iterator_base.h"(227)
+template <typename TSize, typename TSpec, typename TSpec2> inline Navi< AlignTrace<TSize, TSpec>, TSpec2> const & operator-- (Navi< AlignTrace<TSize, TSpec>, TSpec2> & me);       	// "projects/library/seqan/align/align_trace.h"(380)
+
+//____________________________________________________________________________
+// operator<
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec > inline bool operator< (Gaps<TLeftSource, TLeftSpec> const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1223)
+template <typename TLeftSource, typename TLeftSpec, typename TRight> inline bool operator< (Gaps<TLeftSource, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/align/gaps_base.h"(1232)
+template <typename TLeft, typename TRightSource, typename TRightSpec > inline bool operator< (TLeft const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1240)
+template <typename TValue, typename TID> bool operator<(ScoreAndID<TValue,TID> & a, ScoreAndID<TValue,TID> & b);       	// "projects/library/seqan/align/align_local_dynprog.h"(89)
+template <typename TValue, typename TID> bool operator<(const ScoreAndID<TValue,TID> & a, const ScoreAndID<TValue,TID> & b);       	// "projects/library/seqan/align/align_local_dynprog.h"(96)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TValue > ::std::ostream& operator<<(::std::ostream &out, const Matrix<TValue,2> &matrix);       	// "projects/library/seqan/align/matrix_base.h"(1065)
+template <typename TStream, typename TSource, typename TSpec> inline TStream & operator<< (TStream & target, Gaps<TSource, TSpec> const & source);       	// "projects/library/seqan/align/gaps_base.h"(1138)
+template <typename TStream, typename TSource, typename TSpec> inline TStream & operator<< (TStream & target, Align<TSource, TSpec> const & source);       	// "projects/library/seqan/align/align_base.h"(552)
+
+//____________________________________________________________________________
+// operator<=
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec > inline bool operator<= (Gaps<TLeftSource, TLeftSpec> const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1252)
+template <typename TLeftSource, typename TLeftSpec, typename TRight> inline bool operator<= (Gaps<TLeftSource, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/align/gaps_base.h"(1261)
+template <typename TLeft, typename TRightSource, typename TRightSpec > inline bool operator<= (TLeft const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1269)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TGaps1, typename TGaps2> inline bool operator== (Iter<TGaps1, GapsIterator<ArrayGaps> > & _left, Iter<TGaps2, GapsIterator<ArrayGaps> > & _right);       	// "projects/library/seqan/align/gaps_array.h"(1116)
+template <typename TGaps1, typename TGaps2> inline bool operator== (Iter<TGaps1, GapsIterator<ArrayGaps> > const & _left, Iter<TGaps2, GapsIterator<ArrayGaps> > & _right);       	// "projects/library/seqan/align/gaps_array.h"(1124)
+template <typename TGaps1, typename TGaps2> inline bool operator== (Iter<TGaps1, GapsIterator<ArrayGaps> > & _left, Iter<TGaps2, GapsIterator<ArrayGaps> > const & _right);       	// "projects/library/seqan/align/gaps_array.h"(1132)
+template <typename TGaps1, typename TGaps2> inline bool operator== (Iter<TGaps1, GapsIterator<ArrayGaps> > const & _left, Iter<TGaps2, GapsIterator<ArrayGaps> > const & _right);       	// "projects/library/seqan/align/gaps_array.h"(1140)
+template <typename TValue, unsigned DIMENSION1, unsigned DIMENSION2> bool operator== (Matrix<TValue, DIMENSION1> const & matrix1, Matrix<TValue, DIMENSION2> const & matrix2);       	// "projects/library/seqan/align/matrix_base.h"(876)
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec > inline bool operator== (Gaps<TLeftSource, TLeftSpec> const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1164)
+template <typename TLeftSource, typename TLeftSpec, typename TRight > inline bool operator== (Gaps<TLeftSource, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/align/gaps_base.h"(1173)
+template <typename TLeft, typename TRightSource, typename TRightSpec > inline bool operator== (TLeft const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1182)
+template <typename TAlign1, typename TAlign2, typename TSpec> inline bool operator==(Iter<TAlign1, AlignColIterator<TSpec> > & _left, Iter<TAlign2, AlignColIterator<TSpec> > & _right);       	// "projects/library/seqan/align/align_iterator_base.h"(240)
+template <typename TAlign1, typename TAlign2, typename TSpec> inline bool operator==(Iter<TAlign1, AlignColIterator<TSpec> > const & _left, Iter<TAlign2, AlignColIterator<TSpec> > & _right);       	// "projects/library/seqan/align/align_iterator_base.h"(248)
+template <typename TAlign1, typename TAlign2, typename TSpec> inline bool operator==(Iter<TAlign1, AlignColIterator<TSpec> > & _left, Iter<TAlign2, AlignColIterator<TSpec> > const & _right);       	// "projects/library/seqan/align/align_iterator_base.h"(256)
+template <typename TAlign1, typename TAlign2, typename TSpec> inline bool operator==(Iter<TAlign1, AlignColIterator<TSpec> > const & _left, Iter<TAlign2, AlignColIterator<TSpec> > const & _right);       	// "projects/library/seqan/align/align_iterator_base.h"(264)
+template <typename TAlign> inline bool operator==(AlignCols<TAlign> const & left, AlignCols<TAlign> const & right);       	// "projects/library/seqan/align/align_cols_base.h"(434)
+template <typename TGaps1, typename TGaps2> inline bool operator== (Iter<TGaps1, GapsIterator<SumlistGaps> > & _left, Iter<TGaps2, GapsIterator<SumlistGaps> > & _right);       	// "projects/library/seqan/align/gaps_sumlist.h"(870)
+template <typename TGaps1, typename TGaps2> inline bool operator== (Iter<TGaps1, GapsIterator<SumlistGaps> > const & _left, Iter<TGaps2, GapsIterator<SumlistGaps> > & _right);       	// "projects/library/seqan/align/gaps_sumlist.h"(878)
+template <typename TGaps1, typename TGaps2> inline bool operator== (Iter<TGaps1, GapsIterator<SumlistGaps> > & _left, Iter<TGaps2, GapsIterator<SumlistGaps> > const & _right);       	// "projects/library/seqan/align/gaps_sumlist.h"(886)
+template <typename TGaps1, typename TGaps2> inline bool operator== (Iter<TGaps1, GapsIterator<SumlistGaps> > const & _left, Iter<TGaps2, GapsIterator<SumlistGaps> > const & _right);       	// "projects/library/seqan/align/gaps_sumlist.h"(894)
+inline bool operator== (_HirschbergSet const & lhs, _HirschbergSet const & rhs);       	// "projects/library/seqan/align/hirschberg_set.h"(217)
+
+//____________________________________________________________________________
+// operator>
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec > inline bool operator> (Gaps<TLeftSource, TLeftSpec> const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1280)
+template <typename TLeftSource, typename TLeftSpec, typename TRight> inline bool operator> (Gaps<TLeftSource, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/align/gaps_base.h"(1289)
+template <typename TLeft, typename TRightSource, typename TRightSpec > inline bool operator> (TLeft const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1297)
+template <typename TValue, typename TID> bool operator>(ScoreAndID<TValue,TID> & a, ScoreAndID<TValue,TID> & b);       	// "projects/library/seqan/align/align_local_dynprog.h"(73)
+template <typename TValue, typename TID> bool operator>(const ScoreAndID<TValue,TID> & a, const ScoreAndID<TValue,TID> & b);       	// "projects/library/seqan/align/align_local_dynprog.h"(80)
+
+//____________________________________________________________________________
+// operator>=
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec > inline bool operator>= (Gaps<TLeftSource, TLeftSpec> const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1308)
+template <typename TLeftSource, typename TLeftSpec, typename TRight> inline bool operator>= (Gaps<TLeftSource, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/align/gaps_base.h"(1317)
+template <typename TLeft, typename TRightSource, typename TRightSpec > inline bool operator>= (TLeft const & left, Gaps<TRightSource, TRightSpec> const & right);       	// "projects/library/seqan/align/gaps_base.h"(1325)
+
+//____________________________________________________________________________
+// previousPosition
+
+template <typename TValue, unsigned DIMENSION, typename TPosition> inline typename Position<Matrix <TValue, DIMENSION> >::Type previousPosition(Matrix<TValue, DIMENSION> & me, TPosition position_, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(515)
+template <typename TValue, unsigned DIMENSION, typename TPosition> inline typename Position<Matrix <TValue, DIMENSION> >::Type previousPosition(Matrix<TValue, DIMENSION> const & me, TPosition position_, unsigned int dimension_);       	// "projects/library/seqan/align/matrix_base.h"(524)
+
+//____________________________________________________________________________
+// print
+
+inline void print(_HirschbergSet const & me);       	// "projects/library/seqan/align/hirschberg_set.h"(207)
+
+//____________________________________________________________________________
+// removeGap
+
+template <typename TGaps, typename TSpec> inline void removeGap(Iter<TGaps, GapsIterator<TSpec> > const & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(190)
+template <typename TSource, typename TSpec, typename TPosition> inline void removeGap(Gaps<TSource, TSpec> & me, TPosition _view_pos);       	// "projects/library/seqan/align/gaps_base.h"(483)
+
+//____________________________________________________________________________
+// removeGaps
+
+template <typename TGaps, typename TCount> inline void removeGaps(Iter<TGaps, GapsIterator<ArrayGaps> > const & me, TCount _size);       	// "projects/library/seqan/align/gaps_array.h"(1046)
+template <typename TSource, typename TSpec, typename TPosition, typename TSize> inline void removeGaps(Gaps<TSource, TSpec> & me, TPosition _view_pos, TSize _size);       	// "projects/library/seqan/align/gaps_base.h"(512)
+template <typename TGaps, typename TCount> inline void removeGaps(Iter<TGaps, GapsIterator<SumlistGaps> > const & me, TCount _size);       	// "projects/library/seqan/align/gaps_sumlist.h"(825)
+
+//____________________________________________________________________________
+// resize
+
+template <typename TValue, unsigned DIMENSION> inline void resize(Matrix<TValue, DIMENSION> & me);       	// "projects/library/seqan/align/matrix_base.h"(444)
+template <typename TValue, unsigned DIMENSION, typename TFillValue> inline void resize(Matrix<TValue, DIMENSION> & me, TFillValue myValue);       	// "projects/library/seqan/align/matrix_base.h"(470)
+
+//____________________________________________________________________________
+// row
+
+template <typename TSource, typename TSpec, typename TPosition> inline typename Row< Align<TSource, TSpec> >::Type & row(Align<TSource, TSpec> & me, TPosition _pos);       	// "projects/library/seqan/align/align_base.h"(355)
+template <typename TSource, typename TSpec, typename TPosition> inline typename Row< Align<TSource, TSpec> const>::Type & row(Align<TSource, TSpec> const & me, TPosition _pos);       	// "projects/library/seqan/align/align_base.h"(363)
+
+//____________________________________________________________________________
+// rows
+
+template <typename TSource, typename TSpec> inline typename Rows< Align<TSource, TSpec> >::Type & rows(Align<TSource, TSpec> & me);       	// "projects/library/seqan/align/align_base.h"(321)
+template <typename TSource, typename TSpec> inline typename Rows< Align<TSource, TSpec> const >::Type & rows(Align<TSource, TSpec> const & me);       	// "projects/library/seqan/align/align_base.h"(328)
+
+//____________________________________________________________________________
+// setBeginPosition
+
+template <typename TSource, typename TPosition> inline void setBeginPosition(Gaps<TSource, ArrayGaps> & me, TPosition view_position);       	// "projects/library/seqan/align/gaps_array.h"(582)
+template <typename TSource, typename TPosition> inline void setBeginPosition(Gaps<TSource, SumlistGaps> & me, TPosition view_position);       	// "projects/library/seqan/align/gaps_sumlist.h"(408)
+
+//____________________________________________________________________________
+// setBit
+
+template <typename TSize, typename TSpec, typename TSpec2> inline void setBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me);       	// "projects/library/seqan/align/align_trace.h"(293)
+
+//____________________________________________________________________________
+// setClippedBeginPosition
+
+template <typename TSource, typename TPosition> inline void setClippedBeginPosition(Gaps<TSource, ArrayGaps> & me, TPosition source_position);       	// "projects/library/seqan/align/gaps_array.h"(599)
+template <typename TSource, typename TPosition> inline typename Size< Gaps<TSource, SumlistGaps> >::Type setClippedBeginPosition(Gaps<TSource, SumlistGaps> & me, TPosition source_position);       	// "projects/library/seqan/align/gaps_sumlist.h"(426)
+
+//____________________________________________________________________________
+// setClippedEndPosition
+
+template <typename TSource, typename TPosition> inline void setClippedEndPosition(Gaps<TSource, ArrayGaps> & me, TPosition source_position);       	// "projects/library/seqan/align/gaps_array.h"(666)
+template <typename TSource, typename TPosition> inline void setClippedEndPosition(Gaps<TSource, SumlistGaps> & me, TPosition source_position);       	// "projects/library/seqan/align/gaps_sumlist.h"(484)
+
+//____________________________________________________________________________
+// setContainer
+
+template <typename TContainer, typename TSpec> inline void setContainer(Navi<TContainer, TSpec> & me, TContainer & container_);       	// "projects/library/seqan/align/align_trace.h"(274)
+
+//____________________________________________________________________________
+// setDimension
+
+template <typename TValue, unsigned DIMENSION> inline void setDimension(Matrix<TValue, DIMENSION> & me, unsigned int dim_);       	// "projects/library/seqan/align/matrix_base.h"(391)
+template <typename TSize, typename TSpec> inline unsigned int setDimension(AlignTrace<TSize, TSpec> & me, unsigned int _dim);       	// "projects/library/seqan/align/align_trace.h"(84)
+
+//____________________________________________________________________________
+// setHost
+
+template <typename TValue, unsigned DIMENSION, typename THost> inline void setHost(Matrix<TValue, DIMENSION> & me, THost & host_);       	// "projects/library/seqan/align/matrix_base.h"(314)
+template <typename TAlign, typename TSpec> inline void setHost(Iter<TAlign, AlignColIterator<TSpec> > & me, TAlign & _host);       	// "projects/library/seqan/align/align_iterator_base.h"(126)
+
+//____________________________________________________________________________
+// setLength
+
+template <typename TValue, unsigned DIMENSION, typename TSize> inline void setLength(Matrix<TValue, DIMENSION> & me, unsigned int dim_, TSize length_);       	// "projects/library/seqan/align/matrix_base.h"(432)
+template <typename TSize, typename TSpec> inline void setLength(AlignTrace<TSize, TSpec> & me, unsigned int _dim, TSize _length);       	// "projects/library/seqan/align/align_trace.h"(105)
+
+//____________________________________________________________________________
+// setSource
+
+template <typename TSource, typename TSpec, typename TPosition1, typename TPosition2> inline void setSource(Gaps<TSource, TSpec> & me, TSource & source_, TPosition1 clipped_begin_pos, TPosition2 clipped_end_pos);       	// "projects/library/seqan/align/gaps_base.h"(850)
+template <typename TSource, typename TSpec> inline void setSource(Gaps<TSource, TSpec> & me, TSource & source_);       	// "projects/library/seqan/align/gaps_base.h"(864)
+
+//____________________________________________________________________________
+// setStrings
+
+template <typename TSource, typename TSpec, typename TSpec2> inline void setStrings(Align<TSource, TSpec> & me, StringSet<TSource, TSpec2> & stringset);       	// "projects/library/seqan/align/align_base.h"(590)
+
+//____________________________________________________________________________
+// source
+
+template <typename TGaps, typename TSpec> inline typename Source<Iter<TGaps, GapsIterator<TSpec> > >::Type source(Iter<TGaps, GapsIterator<TSpec> > & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(291)
+template <typename TGaps, typename TSpec> inline typename Source<Iter<TGaps, GapsIterator<TSpec> > const>::Type source(Iter<TGaps, GapsIterator<TSpec> > const & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(298)
+template <typename TSource, typename TSpec> inline TSource & source(Gaps<TSource, TSpec> & me);       	// "projects/library/seqan/align/gaps_base.h"(932)
+template <typename TSource, typename TSpec> inline TSource & source(Gaps<TSource, TSpec> const & me);       	// "projects/library/seqan/align/gaps_base.h"(939)
+template <typename TGaps> inline typename Source<Iter<TGaps, GapsIterator<SumlistGaps> > >::Type source(Iter<TGaps, GapsIterator<SumlistGaps> > & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(666)
+template <typename TGaps> inline typename Source<Iter<TGaps, GapsIterator<SumlistGaps> > const>::Type source(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(673)
+
+//____________________________________________________________________________
+// sourceBegin
+
+template <typename TSource, typename TSpec, typename TTag> inline typename Iterator<TSource, Tag<TTag> const>::Type sourceBegin(Gaps<TSource, TSpec> const & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/gaps_base.h"(370)
+template <typename TSource, typename TSpec> inline typename Iterator<TSource, typename DefaultGetIteratorSpec<TSource>::Type>::Type sourceBegin(Gaps<TSource, TSpec> const & me);       	// "projects/library/seqan/align/gaps_base.h"(377)
+
+//____________________________________________________________________________
+// sourceEnd
+
+template <typename TSource, typename TSpec, typename TTag> inline typename Iterator<TSource, Tag<TTag> const>::Type sourceEnd(Gaps<TSource, TSpec> const & me, Tag<TTag> const tag_);       	// "projects/library/seqan/align/gaps_base.h"(405)
+template <typename TSource, typename TSpec> inline typename Iterator<TSource, typename DefaultGetIteratorSpec<TSource>::Type>::Type sourceEnd(Gaps<TSource, TSpec> const & me);       	// "projects/library/seqan/align/gaps_base.h"(412)
+
+//____________________________________________________________________________
+// sourceLength
+
+template <typename TSource> inline typename Size<TSource>::Type sourceLength(Gaps<TSource, ArrayGaps> & me);       	// "projects/library/seqan/align/gaps_array.h"(715)
+template <typename TSource, typename TSpec> inline typename Size<TSource>::Type sourceLength(Gaps<TSource, TSpec> & me);       	// "projects/library/seqan/align/gaps_base.h"(996)
+template <typename TSource, typename TSpec> inline typename Size<TSource>::Type sourceLength(Gaps<TSource, TSpec> const & me);       	// "projects/library/seqan/align/gaps_base.h"(1003)
+
+//____________________________________________________________________________
+// sourcePosition
+
+template <typename TGaps> inline typename Position<TGaps>::Type sourcePosition(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(649)
+
+//____________________________________________________________________________
+// sourceSegment
+
+template <typename TSource, typename TSpec> inline typename Infix<TSource>::Type sourceSegment(Gaps<TSource, TSpec> & me);       	// "projects/library/seqan/align/gaps_base.h"(964)
+template <typename TSource, typename TSpec> inline typename Infix<TSource>::Type sourceSegment(Gaps<TSource, TSpec> const & me);       	// "projects/library/seqan/align/gaps_base.h"(972)
+
+//____________________________________________________________________________
+// stringSet
+
+template <typename TSource, typename TSpec> inline typename StringSetType<Align<TSource, TSpec> >::Type stringSet(Align<TSource, TSpec> & me);       	// "projects/library/seqan/align/align_base.h"(635)
+
+//____________________________________________________________________________
+// toSourcePosition
+
+template <typename TSource> inline typename Position<TSource>::Type toSourcePosition(Gaps<TSource, ArrayGaps> const & gaps, typename Position< Gaps<TSource, ArrayGaps> >::Type pos);       	// "projects/library/seqan/align/gaps_array.h"(442)
+template <typename TSource> inline typename Position<TSource>::Type toSourcePosition(Gaps<TSource, SumlistGaps> const & gaps, typename Position< Gaps<TSource, SumlistGaps> >::Type pos);       	// "projects/library/seqan/align/gaps_sumlist.h"(340)
+
+//____________________________________________________________________________
+// toViewPosition
+
+template <typename TSource> inline typename Position< Gaps<TSource, ArrayGaps> >::Type toViewPosition(Gaps<TSource, ArrayGaps> const & gaps, typename Position<TSource>::Type pos);       	// "projects/library/seqan/align/gaps_array.h"(392)
+template <typename TSource> inline typename Position< Gaps<TSource, SumlistGaps> >::Type toViewPosition(Gaps<TSource, SumlistGaps> const & gaps_, typename Position<TSource>::Type pos);       	// "projects/library/seqan/align/gaps_sumlist.h"(313)
+
+//____________________________________________________________________________
+// transpose
+
+template <typename TValue> Matrix<TValue,2> transpose(Matrix<TValue,2> const & matrix);       	// "projects/library/seqan/align/matrix_base.h"(1036)
+
+//____________________________________________________________________________
+// value
+
+template <typename TGaps, typename TSpec> inline typename Reference< Iter<TGaps, GapsIterator<TSpec> > >::Type value(Iter<TGaps, GapsIterator<TSpec> > & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(201)
+template <typename TGaps, typename TSpec> inline typename Reference< Iter<TGaps, GapsIterator<TSpec> > const>::Type value(Iter<TGaps, GapsIterator<TSpec> > const & me);       	// "projects/library/seqan/align/gaps_iterator_base.h"(209)
+template <typename TValue, unsigned DIMENSION, typename TPosition> inline typename Reference<Matrix<TValue, DIMENSION> >::Type value(Matrix<TValue, DIMENSION> & me, TPosition position_);       	// "projects/library/seqan/align/matrix_base.h"(588)
+template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2> inline typename Reference<Matrix<TValue, DIMENSION> >::Type value(Matrix<TValue, DIMENSION> & me, TOrdinate1 i1, TOrdinate2 i2);       	// "projects/library/seqan/align/matrix_base.h"(600)
+template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2, typename TOrdinate3> inline typename Reference<Matrix<TValue, DIMENSION> >::Type value(Matrix<TValue, DIMENSION> & me, TOrdinate1 i1, TOrdinate2 i2, TOrdinate3 i3);       	// "projects/library/seqan/align/matrix_base.h"(614)
+template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2, typename TOrdinate3, typename TOrdinate4> inline typename Reference<Matrix<TValue, DIMENSION> >::Type value(Matrix<TValue, DIMENSION> & me, TOrdinate1 i1, TOrdinate2 i2, TOrdinate3 i3, TOrdinate4 i4);       	// "projects/library/seqan/align/matrix_base.h"(629)
+template <typename TSource, typename TSpec, typename TPosition> inline typename Reference<Gaps<TSource, TSpec> >::Type value(Gaps<TSource, TSpec> & me, TPosition view_pos);       	// "projects/library/seqan/align/gaps_base.h"(742)
+template <typename TSource, typename TSpec, typename TPosition> inline typename Reference<Gaps<TSource, TSpec> const>::Type value(Gaps<TSource, TSpec> const & me, TPosition view_pos);       	// "projects/library/seqan/align/gaps_base.h"(751)
+template <typename TAlign, typename TSpec, typename TPosition> inline typename Reference<TAlign>::Type value(Iter<TAlign, AlignColIterator<TSpec> > & me, TPosition pos_);       	// "projects/library/seqan/align/align_iterator_base.h"(310)
+template <typename TAlign, typename TSpec, typename TPosition> inline typename Reference<TAlign>::Type value(Iter<TAlign, AlignColIterator<TSpec> > const & me, TPosition pos_);       	// "projects/library/seqan/align/align_iterator_base.h"(318)
+template <typename TAlign, typename TPosition> inline typename Value< AlignCols<TAlign> >::Type value(AlignCols<TAlign> & me, TPosition _pos);       	// "projects/library/seqan/align/align_cols_base.h"(275)
+template <typename TAlign, typename TPosition> inline typename Value< AlignCols<TAlign> const>::Type value(AlignCols<TAlign> const & me, TPosition _pos);       	// "projects/library/seqan/align/align_cols_base.h"(283)
+
+//____________________________________________________________________________
+// viewPosition
+
+template <typename TGaps> inline typename Position<TGaps>::Type viewPosition(Iter<TGaps, GapsIterator<SumlistGaps> > const & me);       	// "projects/library/seqan/align/gaps_sumlist.h"(639)
+
+//____________________________________________________________________________
+// write
+
+template <typename TFile, typename TSource, typename TIDString, typename TSpec> inline void write(TFile & target, Gaps<TSource, TSpec> const & source, TIDString const &, Raw);       	// "projects/library/seqan/align/gaps_base.h"(1114)
+template <typename TFile, typename TSource, typename TSpec, typename TIDString> inline void write(TFile & target, Align<TSource, TSpec> const & source, TIDString const &, Raw);       	// "projects/library/seqan/align/align_base.h"(463)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/align/align_hirschberg.h b/src/SeqAn-1.3/seqan/align/align_hirschberg.h
new file mode 100644
index 0000000..64b879a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_hirschberg.h
@@ -0,0 +1,507 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_HIRSCHBERG_H
+#define SEQAN_HEADER_ALIGN_HIRSCHBERG_H
+
+#include <stack>
+#include <seqan/align/hirschberg_set.h>
+
+//#define SEQAN_HIRSCHBERG_DEBUG_CUT
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+#ifdef SEQAN_HIRSCHBERG_DEBUG_CUT
+	template<typename TSource>
+	void _writeDebugMatrix(TSource s1,TSource s2)
+	{
+		int l1 = length(s1);
+		int l2 = length(s2);
+	    
+		int i,j,sg,sd;
+
+		String<String<int> > fMatrix,rMatrix,tMatrix;
+
+		resize(fMatrix,l1 + 1);
+		resize(rMatrix,l1 + 1);
+		resize(tMatrix,l1 + 1);
+
+		for(i = 0;i <= l1;++i)
+		{
+			resize(fMatrix[i],l2 + 1);
+			resize(rMatrix[i],l2 + 1);
+			resize(tMatrix[i],l2 + 1);
+		}
+
+		for(i = 0;i <= l1;++i)
+			fMatrix[i][0] = i * (-1);
+
+		for(i = l1;i >= 0;--i)
+			rMatrix[i][l2] = (l1 - i) * (-1);
+
+		// calculate forward matrix
+		for(j = 1;j <= l2;++j)
+		{
+			fMatrix[0][j] = j*(-1);
+			for(i = 1;i <= l1;++i)
+			{
+				sg = -1 + ((fMatrix[i-1][j] > fMatrix[i][j-1]) ? fMatrix[i-1][j] : fMatrix[i][j-1]);
+				sd = fMatrix[i-1][j-1] + ((s1[i - 1] == s2[j-1]) ? 0 : -1 );
+		
+				fMatrix[i][j] = ((sg > sd) ? sg : sd);
+			}
+		}
+
+		// calculate reverse matrix
+		for(j = l2 - 1;j >= 0;--j)
+		{	
+			rMatrix[l1][j] = (l2 - j)*(-1);
+			for(i = l1 - 1;i >= 0;--i)
+			{
+				sg = -1 + ((rMatrix[i+1][j] > rMatrix[i][j+1]) ? rMatrix[i+1][j] : rMatrix[i][j+1]);
+				sd = rMatrix[i+1][j+1] + ((s1[i] == s2[j]) ? 0 : -1 );
+		
+				rMatrix[i][j] = ((sg > sd) ? sg : sd);
+			}
+		}
+
+		// print fMatrix
+		std::cout << ";-;";
+		for(i = 0;i < l1;++i)
+			std::cout << s1[i] << ";";
+
+		std::cout << std::endl << "-;";
+		for(j = 0;j <= l2;++j)
+		{	
+			if(j != 0) std::cout << s2[j-1] << ";";
+			for(i = 0;i <= l1;++i)
+			{
+				std::cout << fMatrix[i][j] << ";";
+			}
+			std::cout << std::endl;
+		}
+		// print rMatrix
+		std::cout << ";";
+		for(i = 0;i < l1;++i)
+			std::cout << s1[i] << ";";
+		std::cout << "-;" << std::endl;
+
+		for(j = 0;j <= l2;++j)
+		{	
+			if(j != l2) std::cout << s2[j] << ";";
+			else std::cout << "-;";
+			for(i = 0;i <= l1;++i)
+			{
+				std::cout << rMatrix[i][j] << ";";
+			}
+			std::cout << std::endl;
+		}
+
+		// fill and print target matrix
+		std::cout << ";-;";
+		for(i = 0;i < l1;++i)
+			std::cout << s1[i] << ";";
+
+		std::cout << std::endl << "-;";
+		for(j = 0;j <= l2;++j)
+		{	
+			if(j != 0) std::cout << s2[j-1] << ";";
+			for(i = 0;i <= l1;++i)
+			{
+				tMatrix[i][j] = fMatrix[i][j] + rMatrix[i][j];
+				std::cout << tMatrix[i][j] << ";";
+			}
+			std::cout << std::endl;
+		}
+	}
+
+#endif
+
+// debug flag .. define to see where Hirschberg cuts the sequences	
+//#define SEQAN_HIRSCHBERG_DEBUG_CUT
+
+/*DISABLED
+.Function.hirschberg:
+..cat:Alignment
+..summary:Computes a global Alignment for the passed Alignment-Container with the specified scoring scheme
+..signature:hirschberg(Align<TSource, TSpec> & align,Score<TScoreValue, Simple> const & score)
+..param.align: Reference to the Alignment-Object
+..param.score: Const Reference to the Scoring Scheme
+..remarks: The alignment is based on the algorithm proposed by Hirschberg. The general idea is to divide the DP (dynamic programming) matrix,
+to compute a global alignment in linear space. Instead of computing half of the
+DP matrix in forward direction and the other half in reverse, a pointer to the cell of the DP matrix, were the actual, optimal alignment
+passes the mid column ist saved, during the computation of the second part of the Matrix.
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec, typename TScoreValue>
+TScoreValue
+globalAlignment(Align<TSource, TSpec> & align_,
+                Score<TScoreValue, Simple> const & score_,
+                Hirschberg)
+{
+SEQAN_CHECKPOINT
+	TSource s1 = sourceSegment(row(align_, 0));
+	TSource s2 = sourceSegment(row(align_, 1));
+	
+	TScoreValue total_score=0;
+
+	typedef typename Value<TSource>::Type TStringValue;
+	typedef typename Size<TSource>::Type TStringSize;
+	
+	typedef typename Iterator<TSource>::Type TStringIterator;
+
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow>::Type TTargetIterator;
+
+	TTargetIterator target_0 = iter(row(align_, 0), 0);
+	TTargetIterator target_1 = iter(row(align_, 1), 0);
+
+	typedef typename Size<Matrix<TScoreValue> >::Type TSize;
+	typedef typename Iterator<Matrix<TScoreValue> >::Type TMatrixIterator;
+
+	TStringValue v;
+
+	TStringSize len1 = length(s1);
+	TStringSize len2 = length(s2);
+
+	// string to store the score values for the currently active cell
+	String<TScoreValue> c_score;
+	resize(c_score,len2 + 1);
+	// string to strore the backpointers
+	String<int> pointer;
+	resize(pointer,len2 + 1);
+
+	// scoring-scheme specific score values
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap = scoreGapExtend(score_);
+
+	TScoreValue border,s,sg,sd,sg1,sg2;
+	int dp;
+
+	std::stack<_HirschbergSet> to_process;
+	_HirschbergSet target;
+	
+	int i,j;
+	
+	_HirschbergSet hs_complete(0,len1,0,len2,0);
+	to_process.push(hs_complete);
+
+	while(!to_process.empty())
+	{
+SEQAN_CHECKPOINT
+		target = to_process.top();
+		to_process.pop();
+
+		if(_begin2(target) == _end2(target))
+		{
+			for(i = 0;i < (_end1(target) - _begin1(target));++i)
+			{
+				insertGap(target_1);
+				++target_0;
+				++target_1;
+			}
+		}
+		else if(_begin1(target) + 1 == _end1(target) || _begin2(target) + 1 == _end2(target))
+		{
+			/* ALIGN */			
+SEQAN_CHECKPOINT
+#ifdef SEQAN_HIRSCHBERG_DEBUG_CUT
+			std::cout << "align s1 " << _begin1(target) << " to " << _end1(target) << " and s2 " << _begin2(target) << " to " << _end2(target) << std::endl;
+			std::cout << "align " << infix(s1,_begin1(target),_end1(target)) << " and " << infix(s2,_begin2(target),_end2(target)) << std::endl << std::endl;
+#endif
+
+			TStringSize len_1 = _end1(target) - _begin1(target);
+			TStringSize len_2 = _end2(target) - _begin2(target);
+
+			Matrix<TScoreValue> matrix_;
+
+			setDimension(matrix_, 2);
+			setLength(matrix_, 0, len_1 + 1);
+			setLength(matrix_, 1, len_2 + 1);
+			resize(matrix_);
+
+			/* init matrix */
+			TStringIterator x_begin = iter(s1,_begin1(target)) - 1;
+			TStringIterator x_end = iter(s1,_end1(target)) - 1;
+			TStringIterator y_begin = iter(s2,_begin2(target)) - 1;
+			TStringIterator y_end = iter(s2,_end2(target)) - 1;
+
+			TStringIterator x = x_end;
+			TStringIterator y;
+
+			TMatrixIterator col_ = end(matrix_) - 1;
+			TMatrixIterator finger1;
+			TMatrixIterator finger2;
+
+
+			TScoreValue h = 0;
+			TScoreValue border_ = score_gap;
+			TScoreValue v = border_;
+
+
+			//-------------------------------------------------------------------------
+			// init
+
+			finger1 = col_;
+			*finger1 = 0;
+			for (x = x_end; x != x_begin; --x)
+			{
+				goPrevious(finger1, 0);
+				*finger1 = border_;
+				border_ += score_gap;
+			}
+
+			//-------------------------------------------------------------------------
+			//fill matrix
+			border_ = 0;
+			for (y = y_end; y != y_begin; --y)
+			{
+				TStringValue cy = *y;
+				h = border_;
+				border_ += score_gap;
+				v = border_;
+
+				finger2 = col_;	
+				goPrevious(col_, 1);
+				finger1 = col_;
+
+				*finger1 = v;
+
+				for (x = x_end; x != x_begin; --x)
+				{
+					goPrevious(finger1, 0);
+					goPrevious(finger2, 0);
+					if (*x == cy)
+					{
+						v = h + score_match;
+						h = *finger2;
+					}
+					else
+					{
+						TScoreValue s1 = h + score_mismatch;
+						h = *finger2;
+						TScoreValue s2 = score_gap + ((h > v) ? h : v);
+						v = (s1 > s2) ? s1 : s2;
+					}
+					*finger1 = v;
+				}
+			}	
+
+			/* TRACE BACK */
+			finger1 = begin(matrix_);
+			x = iter(s1,_begin1(target));
+			y = iter(s2,_begin2(target));
+			x_end = iter(s1,_end1(target));
+			y_end = iter(s2,_end2(target));
+
+			while ((x != x_end) && (y != y_end))
+			{
+				bool gv;
+				bool gh;
+
+				if (*x == *y)
+				{
+					gv = gh = true;
+				}
+				else
+				{
+					TMatrixIterator it_ = finger1;
+
+					goNext(it_, 0);
+					TScoreValue v = *it_;
+
+					goNext(it_, 1);
+					TScoreValue d = *it_;
+
+					it_ = finger1;
+					goNext(it_, 1);
+					TScoreValue h = *it_;
+
+					gv = (v >= h) | (d >= h);
+					gh = (h >= v) | (d >= v);
+				}
+
+				if (gv)
+				{
+					++x;
+					goNext(finger1, 0);
+				}
+				else
+				{
+					insertGap(target_0);
+				}
+
+				if (gh) 
+				{
+					++y;
+					goNext(finger1, 1);
+				}
+				else
+				{
+					insertGap(target_1);
+				}
+
+				++target_0;
+				++target_1;
+			}
+
+			// if x or y did not reached there end position, fill the rest with gaps
+			while(x != x_end)
+			{
+				insertGap(target_1);
+				++target_0;
+				++target_1;
+				++x;
+			}
+
+			while(y != y_end)
+			{
+				insertGap(target_0);
+				++target_0;
+				++target_1;
+				++y;
+			}
+			/* END ALIGN */
+		}
+		else
+		{	
+			/* 
+				Calculate cut using the algorithm as proposed in the lecture of Clemens Gr�pl 
+				using a backpointer to remember the position where the optimal alignment passes
+				the mid column
+			*/
+SEQAN_CHECKPOINT
+			int mid = static_cast<int>(floor( static_cast<double>((_begin1(target) + _end1(target))/2) ));
+
+#ifdef SEQAN_HIRSCHBERG_DEBUG_CUT
+			std::cout << "calculate cut for s1 " << _begin1(target) << " to " << _end1(target) << " and s2 " << _begin2(target) << " to " << _end2(target) << std::endl;
+			std::cout << "calculate cut for " << infix(s1,_begin1(target),_end1(target)) << " and " << infix(s2,_begin2(target),_end2(target)) << std::endl;
+			std::cout << "cut is in row " << mid << " symbol is " << getValue(s1,mid-1) << std::endl << std::endl;
+
+
+			_writeDebugMatrix(infix(s1,_begin1(target),_end1(target)),infix(s2,_begin2(target),_end2(target)));
+#endif
+
+			border = 0;
+			for(i = _begin2(target);i <= _end2(target);++i)
+			{
+				c_score[i] = border;
+				border += score_gap; 
+				pointer[i] = i;
+			}
+
+			// iterate over s1 until the mid column is reached
+			border = score_gap;
+			for(i = _begin1(target) + 1;i <= mid;++i)
+			{
+				s = c_score[_begin2(target)];
+				c_score[_begin2(target)] = border;
+				border += score_gap;
+				v = getValue(s1,i-1);
+				for(j = _begin2(target) + 1;j <= _end2(target);++j)
+				{
+					sg = score_gap + ((c_score[j] > c_score[j - 1]) ? c_score[j] : c_score[j - 1]);
+					sd = s + ((v == getValue(s2,j-1)) ? score_match : score_mismatch);
+
+					s = c_score[j];
+					c_score[j] = (sg > sd) ? sg : sd;	
+				}
+			}
+
+			// from here, rememeber the cell of mid-column, where optimal alignment passed
+			for(i = mid + 1;i <= _end1(target);++i)
+			{
+				s = c_score[_begin2(target)];
+				c_score[_begin2(target)] = border;
+				border += score_gap;
+				v = getValue(s1,i-1);
+			
+				dp = _begin2(target);
+			
+				for(j = _begin2(target) + 1;j <= _end2(target);++j)
+				{
+					sg1 = score_gap + c_score[j];
+					sg2 = score_gap + c_score[j - 1];
+
+					sd = s + ((v == getValue(s2,j-1)) ? score_match : score_mismatch);
+
+					s = c_score[j];
+					sg = pointer[j];
+					if(sd >= _max(sg1,sg2))
+					{
+						c_score[j] = sd;
+						pointer[j] = dp;
+					}
+					else
+					{
+						if(sg2 > sg1)
+						{
+							c_score[j] = sg2;
+							pointer[j] = pointer[j-1];
+						}
+						else
+						{
+							// gap introduced from left
+							// no update for the pointer
+							c_score[j] = sg1;
+						}
+					}
+					dp = sg;
+				}
+			}
+
+			// if computed the whole matrix max = alignment score
+			if(hs_complete == target)
+				total_score = c_score[_end2(target)];
+
+#ifdef SEQAN_HIRSCHBERG_DEBUG_CUT
+			std::cout << "hirschberg calculates cut in column " << mid << " and row " << pointer[_end2(target)] << std::endl;
+			std::cout << "requested position in c_score and pointer is " << _end2(target) << std::endl;
+			std::cout << "alignment score is " << c_score[_end2(target)] << std::endl << std::endl;
+#endif
+			to_process.push(_HirschbergSet(mid,_end1(target),pointer[_end2(target)],_end2(target),0));
+			to_process.push(_HirschbergSet(_begin1(target),mid,_begin2(target),pointer[_end2(target)],0));
+		}
+		/* END CUT */
+	}
+	return total_score;
+}
+
+
+}
+#endif
diff --git a/src/SeqAn-1.3/seqan/align/align_iterator_base.h b/src/SeqAn-1.3/seqan/align/align_iterator_base.h
new file mode 100644
index 0000000..88a0e49
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_iterator_base.h
@@ -0,0 +1,556 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_ITERATOR_BASE_H
+#define SEQAN_HEADER_ALIGN_ITERATOR_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Align Iterator for Gaps alignment
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec>
+class Iter<TAlign, AlignColIterator<TSpec> >
+{
+public:
+	typedef typename Rows<TAlign>::Type TRows;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TRowIterator;
+	typedef typename Position<TRow>::Type TRowPosition;
+	typedef String<TRowIterator> TIterators;
+
+	TAlign * data_host;
+	TIterators data_iterators;
+
+public:
+	Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+	Iter(TAlign & _align):
+		data_host(& _align)
+	{
+SEQAN_CHECKPOINT
+		typename Position<TRows>::Type _i = length(rows(_align));
+		resize(data_iterators, _i, Exact());
+	}
+	Iter(TAlign & _align, TRowPosition _pos):
+		data_host(& _align)
+	{
+SEQAN_CHECKPOINT
+		typename Position<TRows>::Type _i = length(rows(_align));
+		resize(data_iterators, _i, Exact());
+
+		while (_i > 0)
+		{
+			--_i;
+			data_iterators[_i] = iter(row(_align, _i), _pos);
+		}
+	}
+	Iter(Iter const & _other):
+		data_host(_other.data_host),
+		data_iterators(_other.data_iterators)
+	{
+	}
+	~Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter const &
+	operator = (Iter const & _other)
+	{
+SEQAN_CHECKPOINT
+		data_host = _other.data_host;
+		data_iterators = _other.data_iterators;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec>
+inline TAlign &
+host(Iter<TAlign, AlignColIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return *me.data_host;
+}
+template <typename TAlign, typename TSpec>
+inline TAlign &
+host(Iter<TAlign, AlignColIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return *me.data_host;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec>
+inline void
+setHost(Iter<TAlign, AlignColIterator<TSpec> > & me, TAlign & _host)
+{
+SEQAN_CHECKPOINT
+	me.data_host = & _host;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec>
+inline typename Cols<TAlign>::Type
+container(Iter<TAlign, AlignColIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return cols(*me.data_host);
+}
+template <typename TAlign, typename TSpec>
+inline typename Cols<TAlign>::Type
+container(Iter<TAlign, AlignColIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return cols(*me.data_host);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec>
+inline void
+goNext(Iter<TAlign, AlignColIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TRowIterator;
+	typedef String<TRowIterator> TIterators;
+	typedef typename Iterator<TIterators, Standard>::Type TIteratorsIterator;
+
+	TIteratorsIterator _it = begin(me.data_iterators);
+	TIteratorsIterator _it_end = end(me.data_iterators);
+
+	while (_it != _it_end)
+	{
+		goNext(*_it);
+		++_it;
+	}
+}
+//____________________________________________________________________________
+
+template <typename TAlign, typename TSpec>
+inline Iter<TAlign, AlignColIterator<TSpec> > & 
+operator ++(Iter<TAlign, AlignColIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	goNext(me);
+	return me;
+}
+//____________________________________________________________________________
+
+template <typename TAlign, typename TSpec>
+inline Iter<TAlign, AlignColIterator<TSpec> > 
+operator ++(Iter<TAlign, AlignColIterator<TSpec> > & me, int)
+{
+SEQAN_CHECKPOINT
+	Iter<TAlign, AlignColIterator<TSpec> > ret = me;
+	goNext(me);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec>
+inline void
+goPrevious(Iter<TAlign, AlignColIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TRowIterator;
+	typedef String<TRowIterator> TIterators;
+	typedef typename Iterator<TIterators, Standard>::Type TIteratorsIterator;
+
+	TIteratorsIterator _it = begin(me.data_iterators);
+	TIteratorsIterator _it_end = end(me.data_iterators);
+
+	while (_it != _it_end)
+	{
+		goPrevious(*_it);
+		++_it;
+	}
+}
+//____________________________________________________________________________
+
+template <typename TAlign, typename TSpec>
+inline Iter<TAlign, AlignColIterator<TSpec> > & 
+operator --(Iter<TAlign, AlignColIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	goPrevious(me);
+	return me;
+}
+//____________________________________________________________________________
+
+template <typename TAlign, typename TSpec>
+inline Iter<TAlign, AlignColIterator<TSpec> > 
+operator --(Iter<TAlign, AlignColIterator<TSpec> > & me, int)
+{
+SEQAN_CHECKPOINT
+	Iter<TAlign, AlignColIterator<TSpec> > ret = me;
+	goPrevious(me);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign1, typename TAlign2, typename TSpec>
+inline bool
+operator ==(Iter<TAlign1, AlignColIterator<TSpec> > & _left,
+			Iter<TAlign2, AlignColIterator<TSpec> > & _right)
+{
+SEQAN_CHECKPOINT
+	return getValue(_left.data_iterators, 0) == getValue(_right.data_iterators, 0);
+}
+template <typename TAlign1, typename TAlign2, typename TSpec>
+inline bool
+operator ==(Iter<TAlign1, AlignColIterator<TSpec> > const & _left,
+			Iter<TAlign2, AlignColIterator<TSpec> > & _right)
+{
+SEQAN_CHECKPOINT
+	return value(_left.data_iterators, 0) == value(_right.data_iterators, 0);
+}
+template <typename TAlign1, typename TAlign2, typename TSpec>
+inline bool
+operator ==(Iter<TAlign1, AlignColIterator<TSpec> > & _left,
+			Iter<TAlign2, AlignColIterator<TSpec> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return value(_left.data_iterators, 0) == value(_right.data_iterators, 0);
+}
+template <typename TAlign1, typename TAlign2, typename TSpec>
+inline bool
+operator ==(Iter<TAlign1, AlignColIterator<TSpec> > const & _left,
+			Iter<TAlign2, AlignColIterator<TSpec> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return value(_left.data_iterators, 0) == value(_right.data_iterators, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign1, typename TAlign2, typename TSpec>
+inline bool
+operator !=(Iter<TAlign1, AlignColIterator<TSpec> > & _left,
+			Iter<TAlign2, AlignColIterator<TSpec> > & _right)
+{
+SEQAN_CHECKPOINT
+	return value(_left.data_iterators, 0) != value(_right.data_iterators, 0);
+}
+template <typename TAlign1, typename TAlign2, typename TSpec>
+inline bool
+operator !=(Iter<TAlign1, AlignColIterator<TSpec> > const & _left,
+			Iter<TAlign2, AlignColIterator<TSpec> > & _right)
+{
+SEQAN_CHECKPOINT
+	return value(_left.data_iterators, 0) != value(_right.data_iterators, 0);
+}
+template <typename TAlign1, typename TAlign2, typename TSpec>
+inline bool
+operator !=(Iter<TAlign1, AlignColIterator<TSpec> > & _left,
+			Iter<TAlign2, AlignColIterator<TSpec> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return value(_left.data_iterators, 0) != value(_right.data_iterators, 0);
+}
+template <typename TAlign1, typename TAlign2, typename TSpec>
+inline bool
+operator !=(Iter<TAlign1, AlignColIterator<TSpec> > const & _left,
+			Iter<TAlign2, AlignColIterator<TSpec> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return value(_left.data_iterators, 0) != value(_right.data_iterators, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec, typename TPosition>
+inline typename Reference<TAlign>::Type
+value(Iter<TAlign, AlignColIterator<TSpec> > & me,
+	  TPosition pos_)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_iterators[pos_]);
+}
+template <typename TAlign, typename TSpec, typename TPosition>
+inline typename Reference<TAlign>::Type
+value(Iter<TAlign, AlignColIterator<TSpec> > const & me,
+	  TPosition pos_)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_iterators[pos_]);
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec, typename TPosition>
+inline typename GetValue<TAlign>::Type
+getValue(Iter<TAlign, AlignColIterator<TSpec> > & me,
+		 TPosition pos_)
+{
+SEQAN_CHECKPOINT
+	return getValue(me.data_iterators[pos_]);
+}
+template <typename TAlign, typename TSpec, typename TPosition>
+inline typename GetValue<TAlign>::Type
+getValue(Iter<TAlign, AlignColIterator<TSpec> > const & me,
+		 TPosition pos_)
+{
+SEQAN_CHECKPOINT
+	return getValue(me.data_iterators[pos_]);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue>
+inline void
+assignValue(Iter<TAlign, AlignColIterator<TSpec> > & me,
+			TPosition pos_,
+			TValue & val)
+{
+SEQAN_CHECKPOINT
+	return assignValue(me.data_iterators[pos_], val);
+}
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue>
+inline void
+assignValue(Iter<TAlign, AlignColIterator<TSpec> > & me,
+			TPosition pos_,
+			TValue const & val)
+{
+SEQAN_CHECKPOINT
+	return assignValue(me.data_iterators[pos_], val);
+}
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue>
+inline void
+assignValue(Iter<TAlign, AlignColIterator<TSpec> > const & me,
+			TPosition pos_,
+			TValue & val)
+{
+SEQAN_CHECKPOINT
+	return assignValue(me.data_iterators[pos_], val);
+}
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue>
+inline void
+assignValue(Iter<TAlign, AlignColIterator<TSpec> > const & me,
+			TPosition pos_,
+			TValue const & val)
+{
+SEQAN_CHECKPOINT
+	return assignValue(me.data_iterators[pos_], val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue>
+inline void
+moveValue(Iter<TAlign, AlignColIterator<TSpec> > & me,
+		  TPosition pos_,
+		  TValue & val)
+{
+SEQAN_CHECKPOINT
+	return moveValue(me.data_iterators[pos_], val);
+}
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue>
+inline void
+moveValue(Iter<TAlign, AlignColIterator<TSpec> > & me,
+		  TPosition pos_,
+		  TValue const & val)
+{
+SEQAN_CHECKPOINT
+	return moveValue(me.data_iterators[pos_], val);
+}
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue>
+inline void
+moveValue(Iter<TAlign, AlignColIterator<TSpec> > const & me,
+		  TPosition pos_,
+		  TValue & val)
+{
+SEQAN_CHECKPOINT
+	return moveValue(me.data_iterators[pos_], val);
+}
+template <typename TAlign, typename TSpec, typename TPosition, typename TValue>
+inline void
+moveValue(Iter<TAlign, AlignColIterator<TSpec> > const & me,
+		  TPosition pos_,
+		  TValue const & val)
+{
+SEQAN_CHECKPOINT
+	return moveValue(me.data_iterators[pos_], val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//??? TODO
+//disabled since GapsIterator has no operator - and +
+/*
+template <typename TAlign, typename TSpec, typename TSize>
+inline Iter<TAlign, AlignColIterator<TSpec> > & 
+operator +=(Iter<TAlign, AlignColIterator<TSpec> > & me,
+			TSize size)
+{
+SEQAN_CHECKPOINT
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow>::Type TRowIterator;
+	typedef String<TRowIterator> TIterators;
+	typedef typename Iterator<TIterators>::Type TIteratorsIterator;
+
+	TIteratorsIterator _it = begin(me.data_iterators);
+	TIteratorsIterator _it_end = end(me.data_iterators);
+
+	while (_it != _it_end)
+	{
+		*_it += size;
+		++_it;
+	}
+	return me;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec, typename TSize>
+inline Iter<TAlign, AlignColIterator<TSpec> > 
+operator +(Iter<TAlign, AlignColIterator<TSpec> > & me,
+		   TSize size)
+{
+SEQAN_CHECKPOINT
+	Iter<TAlign, AlignColIterator<TSpec> > ret = me;
+	me += size;
+	return me;
+}
+template <typename TAlign, typename TSpec, typename TSize>
+inline Iter<TAlign, AlignColIterator<TSpec> > 
+operator +(Iter<TAlign, AlignColIterator<TSpec> > const & me,
+		   TSize size)
+{
+SEQAN_CHECKPOINT
+	Iter<TAlign, AlignColIterator<TSpec> > ret = me;
+	me += size;
+	return me;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec, typename TSize>
+inline Iter<TAlign, AlignColIterator<TSpec> > & 
+operator -=(Iter<TAlign, AlignColIterator<TSpec> > & me,
+			TSize size)
+{
+SEQAN_CHECKPOINT
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow>::Type TRowIterator;
+	typedef String<TRowIterator> TIterators;
+	typedef typename Iterator<TIterators>::Type TIteratorsIterator;
+
+	TIteratorsIterator _it = begin(me.data_iterators);
+	TIteratorsIterator _it_end = end(me.data_iterators);
+
+	while (_it != _it_end)
+	{
+		*_it -= size;
+		++_it;
+	}
+	return me;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec, typename TSize>
+inline Iter<TAlign, AlignColIterator<TSpec> > 
+operator -(Iter<TAlign, AlignColIterator<TSpec> > & me,
+		   TSize size)
+{
+SEQAN_CHECKPOINT
+	Iter<TAlign, AlignColIterator<TSpec> > ret = me;
+	me -= size;
+	return me;
+}
+template <typename TAlign, typename TSpec, typename TSize>
+inline Iter<TAlign, AlignColIterator<TSpec> > 
+operator -(Iter<TAlign, AlignColIterator<TSpec> > const & me,
+		   TSize size)
+{
+SEQAN_CHECKPOINT
+	Iter<TAlign, AlignColIterator<TSpec> > ret = me;
+	me -= size;
+	return me;
+}
+
+//____________________________________________________________________________
+
+template <typename TAlign, typename TSpec>
+inline typename Difference<TAlign>::Type
+operator -(Iter<TAlign, AlignColIterator<TSpec> > const & left,
+		   Iter<TAlign, AlignColIterator<TSpec> > const & right)
+{
+SEQAN_CHECKPOINT
+	SEQAN_ASSERT(length(left.data_iterators))
+	SEQAN_ASSERT(length(right.data_iterators))
+
+	return (left.data_iterators[0] - right.data_iterators[0]);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSpec>
+inline typename Position<TAlign>::Type
+position(Iter<TAlign, AlignColIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return position(me.data_iterators[0], row(host(me), 0));
+}
+template <typename TAlign, typename TSpec>
+inline typename Position<TAlign>::Type
+position(Iter<TAlign, AlignColIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return position(me.data_iterators[0], row(host(me), 0));
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/align_local_dynprog.h b/src/SeqAn-1.3/seqan/align/align_local_dynprog.h
new file mode 100644
index 0000000..d6ff0e6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_local_dynprog.h
@@ -0,0 +1,881 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_LOCAL_DYNPROG_H
+#define SEQAN_HEADER_ALIGN_LOCAL_DYNPROG_H
+
+#include <functional>
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//simple class that stores a value with an ID
+template <typename TValue, typename TID>
+class ScoreAndID 
+{
+
+public:
+	TValue value_;
+	TID id_;
+
+	ScoreAndID()
+	{
+SEQAN_CHECKPOINT
+
+	}
+
+	ScoreAndID(TValue score, TID id_pos)
+	{
+SEQAN_CHECKPOINT
+		value_ = score;
+		id_ = id_pos;
+	}
+}; 
+
+
+
+template <typename TValue, typename TID>
+bool operator >(ScoreAndID<TValue,TID> & a,
+				ScoreAndID<TValue,TID> & b)
+{
+	return (a.value_>b.value_);
+}
+
+template <typename TValue, typename TID>
+bool operator >(const ScoreAndID<TValue,TID> & a,
+				const ScoreAndID<TValue,TID> & b)
+{
+	return (a.value_>b.value_);
+}
+
+
+
+template <typename TValue, typename TID>
+bool operator <(ScoreAndID<TValue,TID> & a,
+				ScoreAndID<TValue,TID> & b)
+{
+	return (a.value_<b.value_);
+}
+
+template <typename TValue, typename TID>
+bool operator <(const ScoreAndID<TValue,TID> & a,
+				const ScoreAndID<TValue,TID> & b)
+{
+	return (a.value_<b.value_);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////
+/**
+.Class.LocalAlignmentFinder:
+..cat:Miscellaneous
+..summary:Stores the information necessary for local alignment dynamic programming.
+..signature:LocalAlignmentFinder<TScoreValue>
+..param.TScoreValue:The value type that is used for scoring the alignments.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..see:Function.localAlignment
+.Memfunc.LocalAlignmentFinder#LocalAlignmentFinder
+..class:Class.LocalAlignmentFinder
+..summary:Constructor
+..signature:LocalAlignmentFinder(align)
+..param.align:An @Class.Align@ object that is already initialized with the sequences.
+..include:seqan/align.h
+*/
+template<typename TScoreValue = int>
+class LocalAlignmentFinder{
+
+public:
+//____________________________________________________________________________
+
+	typedef Matrix<TScoreValue> TMatrix;
+	typedef typename Position<TMatrix>::Type TMatrixPosition;
+    typedef typename Size<TMatrix>::Type TSize;
+	typedef ScoreAndID<TScoreValue,TMatrixPosition> TPQEntry;
+
+	typedef Iter<TMatrix,PositionIterator> TMatrixIterator;
+	typedef PriorityType<TPQEntry> TPriorityQ;
+	typedef String<bool> TBoolMatrix;
+
+//____________________________________________________________________________
+	
+	//DP-matrix
+	TMatrix matrix;
+	//matrix that memorizes the cells from which not to go diagonal
+	TBoolMatrix forbidden;
+	//priority queue for quickly finding the maximum score in the DP-matrix
+	TPriorityQ pQ;
+	//position of maximum score (where traceback is started from) 
+	TMatrixPosition bestEndPos;
+	//position where traceback ended and where declumping begins
+	TMatrixPosition bestBeginPos;
+    //traceback path that is set to forbidden while declumping
+    AlignTraceback<TSize> trace;
+
+	bool needReinit; //true: call "smithWaterman", false: call "smithWatermanGetNext" 
+
+
+//____________________________________________________________________________
+
+	//LocalAlignmentFinder()
+	//	: pQ(), matrix(), forbidden()
+	//{
+	//
+	//}
+
+	LocalAlignmentFinder():
+		needReinit(true)
+	{
+SEQAN_CHECKPOINT
+	}
+
+    // TODO(holtgrew): Remove and replace all occurences with default constructor.
+    template<typename TAlign>
+	LocalAlignmentFinder(TAlign const &)
+	    : needReinit(true)
+	{
+SEQAN_CHECKPOINT
+    }
+
+	~LocalAlignmentFinder()
+	{
+SEQAN_CHECKPOINT
+	}
+
+
+};
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScoreValue, typename TTag>
+void
+_initLocalAlignmentFinder(TStringSet & str,
+                          LocalAlignmentFinder<TScoreValue> & finder,
+                          TTag) {
+SEQAN_CHECKPOINT
+    typedef LocalAlignmentFinder<TScoreValue> TFinder;
+    typedef typename TFinder::TMatrix TMatrix;
+    typedef typename Size<TMatrix>::Type TSize;
+
+    TSize len0 = length(value(str, 0));
+    TSize len1 = length(value(str, 1));
+
+    setDimension(finder.matrix, 2);
+    setLength(finder.matrix, 0, len0 + 1);
+    setLength(finder.matrix, 1, len1 + 1);
+    resize(finder.matrix);
+
+    resize(finder.forbidden, (len0 + 1) * (len1 + 1), false);
+
+	finder.bestEndPos = minValue<typename TFinder::TMatrixPosition>();
+	finder.bestBeginPos = minValue<typename TFinder::TMatrixPosition>();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TScoreValue>
+void clear(LocalAlignmentFinder<TScoreValue> & sw_finder)
+{
+	sw_finder.needReinit = true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TScoreValue>
+TScoreValue getScore(LocalAlignmentFinder<TScoreValue> & sw)
+{
+	typedef LocalAlignmentFinder<TScoreValue> TFinder;
+	if(sw.bestEndPos !=  minValue<typename TFinder::TMatrixPosition>())
+		return getValue(sw.matrix,sw.bestEndPos);
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//Smith-Waterman algorithm
+template <typename TScoreValue, typename TString>
+TScoreValue
+_smithWatermanGetMatrix(LocalAlignmentFinder<TScoreValue> & sw,
+						  TString const & str1_,
+						  TString const & str2_,
+						  Score<TScoreValue, Simple> const & score_,
+						  TScoreValue cutoff)
+{
+SEQAN_CHECKPOINT
+
+	// typedefs
+	typedef Matrix<TScoreValue> TMatrix;
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Position<TMatrix>::Type TMatrixPosition;
+	typedef Iter<TMatrix,PositionIterator> TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TValue;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+
+
+//	TSize str1_length = length(str1_);
+//	TSize str2_length = length(str2_);
+	TStringIterator x_begin = begin(str1_) - 1;
+	TStringIterator x_end = end(str1_) - 1;
+	TStringIterator y_begin = begin(str2_) - 1;
+	TStringIterator y_end = end(str2_) - 1;
+
+	TStringIterator x = x_end;
+	TStringIterator y;
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap = scoreGapExtend(score_);
+
+	TScoreValue h = 0;
+	TScoreValue v = 0;
+
+	TMatrixIterator col_ = end(sw.matrix) - 1;
+	TMatrixIterator finger1;
+	TMatrixIterator finger2;
+
+	//-------------------------------------------------------------------------
+	// init
+
+	finger1 = col_;
+	*finger1 = 0;
+	//std::cout <<"  ";
+	for (x = x_end; x != x_begin; --x)
+	{
+		goPrevious(finger1, 0);
+		*finger1 = 0;
+	}
+
+	//-------------------------------------------------------------------------
+	//fill matrix
+	for (y = y_end; y != y_begin; --y)
+	{
+		TValue cy = *y;
+
+		h = 0;
+		v = 0;
+
+		finger2 = col_;		//points to last column
+		goPrevious(col_, 1);	//points to this column
+		finger1 = col_;
+
+		*finger1 = v;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			goPrevious(finger1, 0);
+			goPrevious(finger2, 0);
+			
+			if (*x == cy)
+			{
+				v = h + score_match;
+				h = *finger2;
+			}
+			else
+			{
+				TScoreValue s1 = h + score_mismatch;
+				h = *finger2;
+				TScoreValue s2 = score_gap + ((h > v) ? h : v);
+				v = (s1 > s2) ? s1 : s2;
+				if (v < 0) v = 0;
+			
+			}
+			*finger1 = v;
+			if (v >= cutoff)
+			{
+				push(sw.pQ,ScoreAndID<TScoreValue,TMatrixPosition>(v,position(finger1)));
+			}
+		}
+	}
+
+	// check if any scores >= cutoff were found
+	if(!empty(sw.pQ))
+	{
+        ScoreAndID<TScoreValue,TMatrixPosition> best = top(sw.pQ);
+		v = getValue(sw.matrix,best.id_);
+		sw.bestEndPos = best.id_;
+	}
+	else 
+		v=0;
+
+	return v;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// declumping
+template <typename TScoreValue, typename TSource, typename TSpec>
+void
+_smithWatermanDeclump(LocalAlignmentFinder<TScoreValue> & sw ,
+				Align<TSource, TSpec> & align_,
+				Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+
+//typedefs
+	typedef typename LocalAlignmentFinder<TScoreValue>::TMatrixPosition TMatrixPosition;
+	typedef Iter<typename LocalAlignmentFinder<TScoreValue>::TMatrix, PositionIterator> TMatrixIterator;
+	
+	typedef TSource TString;
+	typedef typename Iterator<TString, Rooted>::Type TStringIterator;
+	typedef typename Value<TString>::Type TValue;
+
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Rooted>::Type TAlignIterator;
+
+//-------------------------------------------------------------------------
+//variables
+	TRow row0 = row(align_,0);
+	TRow row1 = row(align_,1);
+
+	TAlignIterator ali_it0_stop = iter(row0,beginPosition(row0));
+	TAlignIterator ali_it1_stop = iter(row1,beginPosition(row1));
+
+	SEQAN_ASSERT_TRUE( endPosition(row0)- beginPosition(row0) == endPosition(row1)- beginPosition(row1) );
+
+	TAlignIterator ali_it0 = iter(row0,endPosition(row0));
+	TAlignIterator ali_it1 = iter(row1,endPosition(row1));
+
+	TStringIterator x_begin = begin(source(row0))-1; 
+	TStringIterator y_begin = begin(source(row1))-1; 
+	TStringIterator x_end = iter(source(row0),clippedEndPosition(row0))-1;
+	TStringIterator y_end = iter(source(row1),clippedEndPosition(row1))-1;
+
+	TStringIterator x = x_end;
+	TStringIterator y = y_end;
+	TStringIterator x_stop = x_end;
+	
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap = scoreGapExtend(score_);
+	TScoreValue h,v;
+
+	TMatrixIterator finger0 = iter(sw.matrix,sw.bestBeginPos);
+	TMatrixIterator end_col = finger0;
+	TMatrixIterator finger1 = finger0;
+	TMatrixIterator forbidden = finger0;
+
+	bool different = true;
+	bool forbidden_reached = true;
+	bool end_reached = false;
+	bool skip_row = false;
+	
+
+/*	int str0_length = length(source(row(align_,0)))+1;
+	int str1_length = length(source(row(align_,1)))+1;
+	for(int i = 0; i <str1_length; ++i){
+ 		for(int j=0;j<str0_length;++j){
+ 			std::cout << getValue(sw.matrix,(str0_length*i)+j);
+ 			if(sw.forbidden[(str0_length*i)+j]==true)
+ 				std::cout <<"(1) ";
+ 			else
+ 				std::cout <<"(0) ";
+ 		}
+ 		std::cout <<"\n";
+ 	}*/
+	
+	setClippedBeginPosition(row(align_, 0),0);
+	setClippedBeginPosition(row(align_, 1),0);
+	
+
+	for (y = y_end; (y != y_begin) ; --y)
+	{
+		different = true;
+		//compute next "forbidden" cell (where you are not allowed to go diagonal)
+		if(forbidden_reached && !end_reached)
+		{
+
+			if(ali_it0==ali_it0_stop && ali_it1==ali_it1_stop)
+			{
+				end_reached = true;
+			}
+
+			if(!end_reached)
+			{
+				--ali_it0;
+				goPrevious(forbidden,1);
+				while(isGap(ali_it0)&& ali_it0!=ali_it0_stop)
+				{
+					skip_row = true;			
+					--ali_it0;
+					--ali_it1;
+					goPrevious(forbidden,1);
+				}
+
+				--ali_it1;
+				goPrevious(forbidden,0);
+				while(isGap(ali_it1)&& ali_it1!=ali_it1_stop)
+				{
+					--ali_it1;
+					--ali_it0;
+					goPrevious(forbidden,0);
+				}
+				// mark the forbidden cell 
+				sw.forbidden[position(forbidden)]=true;
+				forbidden_reached = false;
+			}
+
+		}
+
+		TValue cy = *y;
+
+		h = *end_col;
+		
+		finger1 = end_col;		//points to last column
+		goPrevious(end_col, 1);	//points to this column
+		finger0 = end_col;
+
+		v = *finger0;
+		x = x_end;
+
+		// declump the current row until the cells in the declumped and 
+		// the cells in the original matrix are the same (or the border is reached)
+		// indicated by bool different
+		while (x != x_begin && different)
+		{
+			goPrevious(finger0, 0);
+			goPrevious(finger1, 0);
+			if (*x == cy && !(sw.forbidden[position(finger0)]))
+			{
+				v = h + score_match;
+				h = *finger1;
+			}
+			else
+			{
+				TScoreValue s1;
+			
+				if(finger0 == forbidden)
+				{
+						skip_row = false;
+						forbidden_reached = true;
+						s1 = 0;
+				}
+				else
+				{
+					if(sw.forbidden[position(finger0)]) s1 = 0;
+					else s1 = h + score_mismatch;
+				}
+
+				h = *finger1;
+				TScoreValue s2 = score_gap + ((h > v) ? h : v);
+				v = (s1 > s2) ? s1 : s2;
+				if (v < 0) v = 0;
+			
+			}
+
+			// value is the same as in the original matrix
+			if(*finger0==v)
+			{
+				//x_stop is as far as we have to go at least
+				if(x<x_stop)
+				{
+					different=false;
+			//		x_stop=x;
+				}
+				else
+				{
+					// x_end indicates where to start in the next row
+					if(x==x_end && ((!forbidden_reached && !skip_row)||end_reached))
+					{
+						--x_end;
+						goPrevious(end_col, 0);	
+					}
+				}
+			} 
+			if(x<x_stop)// && different)
+			{
+				x_stop=x;
+			}
+			*finger0 = v;
+			--x;
+		}
+		if(x_end==x_begin)
+			break;
+	}
+
+
+//	cout <<"...declumped.\n";
+
+
+
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//traceback
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION>
+typename Iterator<Matrix<TScoreValue, DIMENSION>, Standard >::Type
+_smithWatermanTrace(Align<TTargetSource, TTargetSpec> & target_,
+					 typename LocalAlignmentFinder<TScoreValue>::TBoolMatrix & fb_matrix, 
+					 Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_,
+					 Score<TScoreValue, Simple> const & scoring_) {
+SEQAN_CHECKPOINT
+	//typedefs
+	typedef Iter<Matrix<TScoreValue, DIMENSION>, PositionIterator > TMatrixIterator;
+	typedef typename Position<Matrix<TScoreValue, DIMENSION> >::Type TPosition;
+
+//	typedef Segment<TTargetSource, InfixSegment> TTargetSourceSegment;
+	typedef typename Iterator<TTargetSource, Standard>::Type TStringIterator;
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Rooted>::Type TTargetIterator;
+
+	//-------------------------------------------------------------------------
+	//variables
+	TPosition pos_0 = coordinate(source_, 0);
+	TPosition pos_1 = coordinate(source_, 1);
+
+	TTargetSource str_0 = source(row(target_, 0));
+	TTargetSource str_1 = source(row(target_, 1));
+	
+	TTargetIterator target_0 = iter(row(target_, 0), pos_0);
+	TTargetIterator target_1 = iter(row(target_, 1), pos_1);
+
+	TStringIterator it_0 = iter(str_0, pos_0, Standard());
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = iter(str_1, pos_1, Standard());
+	TStringIterator it_1_end = end(str_1);
+
+	TScoreValue score_mismatch = scoreMismatch(scoring_);
+	TScoreValue score_gap = scoreGapExtend(scoring_);
+
+	//-------------------------------------------------------------------------
+	//follow the trace until 0 is reached
+	while ((*source_!=0) && (it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		bool gv;
+		bool gh;
+		bool forbidden = fb_matrix[position(source_)];
+
+		if (*it_0 == *it_1 && !forbidden)
+		{
+			gv = gh = true;
+		}
+		else
+		{
+			TMatrixIterator it_ = source_;
+
+			goNext(it_, 0);
+			TScoreValue v = *it_ + score_gap;
+
+			TScoreValue d;
+			if(forbidden)
+				d = 0;
+			else{
+				goNext(it_, 1);
+				d = *it_ + score_mismatch;
+			}
+
+			it_ = source_;
+			goNext(it_, 1);
+			TScoreValue h = *it_ + score_gap;
+
+			gv = (v >= h) | (d >= h);
+			gh = (h >  v) | (d >= v);
+		}
+
+		if (gv)
+		{
+			++it_0;
+			goNext(source_, 0);
+		}
+		else
+		{
+			insertGap(target_0);
+		}
+
+		if (gh) 
+		{
+			++it_1;
+			goNext(source_, 1);
+		}
+		else
+		{
+			insertGap(target_1);
+		}
+		++target_0;
+		++target_1;
+	}
+
+	setClippedBeginPosition(row(target_, 0),pos_0);
+	setClippedBeginPosition(row(target_, 1),pos_1);
+	setBeginPosition(row(target_, 0),0);
+	setBeginPosition(row(target_, 1),0);
+	setClippedEndPosition(row(target_, 0),position(it_0, str_0));
+	setClippedEndPosition(row(target_, 1),position(it_1, str_1));
+	
+	return source_;
+
+}
+
+/////////////////////////////////////////////////////////////////////
+//adjust the priority queue of scores until the true maximum is found
+template <typename TScoreValue>
+typename LocalAlignmentFinder<TScoreValue>::TMatrixPosition
+_getNextBestEndPosition(LocalAlignmentFinder<TScoreValue> & sw ,
+                            TScoreValue cutoff) {
+SEQAN_CHECKPOINT
+    // get maximal score from priority queue
+	TScoreValue topScore = 0;
+    if (!empty(sw.pQ)) {
+        topScore = getValue(sw.matrix, top(sw.pQ).id_);
+    }
+
+    // check if matrix entry of topScore did not change while declumping
+	if (!empty(sw.pQ)) {
+		while (top(sw.pQ).value_ != topScore) {
+			if (topScore >= cutoff) {
+				((sw.pQ).heap[0]).value_ = topScore;
+				adjustTop(sw.pQ); 
+			} else {
+				pop(sw.pQ);
+			}
+			if (!empty(sw.pQ)) topScore = getValue(sw.matrix, top(sw.pQ).id_);
+			else break;
+		}
+	}
+
+    // priority queue with top scores is empty
+    if(empty(sw.pQ)) {//||top(sw.pQ).value_<cutoff) {
+		sw.needReinit = true;
+		return 0;
+	}
+
+	typename LocalAlignmentFinder<TScoreValue>::TMatrixPosition ret_pos = top(sw.pQ).id_;
+	sw.bestEndPos = ret_pos;
+	pop(sw.pQ);
+	
+	return ret_pos;
+}
+
+/*DISABLED
+.Function.smithWaterman:
+..summary:Computes the best local alignment of the (two) sequences given in align.
+..cat:Alignments
+..signature:smithWaterman(align, sw_finder, score, cutoff)
+..param.align:The alignment object having the sequences to be aligned as sources.
+...type:Class.Align
+..param.sw_finder:The local alignment finder object.
+...type:Class.LocalAlignmentFinder
+..param.score:The score values to be used for computing the alignment.
+...type:Class.Score
+..param.cutoff:A score limit.
+...remarks:Alignments with scores < cutoff will be discarded (starTCGCGCCTGGAC
+CAAGACA
+ts being useful when
+	not only the best, but also sub-optimal local aligments are of interest). 
+	Low cutoff scores cause a higher runtime.
+..returns:The score value of the best scoring local alignment or 0 if there was no alignment with score >= cutoff.
+...param.align:The corresponding alignment.
+..remarks:So far, only linear gap costs are allowed.
+..see:Function.smithWatermanGetNext
+..see:Function.localAlignment
+..include:seqan/align.h
+*/
+///////////////////////////////////////////////////////////////////////////////////
+//wrapper that computes the matrix and does the backtracking for the best alignment
+template <typename TSource, typename TSpec, typename TScoreValue>
+TScoreValue
+_smithWaterman(Align<TSource, TSpec> & align_,
+			    LocalAlignmentFinder<TScoreValue> & sw_finder,
+			    Score<TScoreValue, Simple> const & score_, 
+			    TScoreValue cutoff)
+{
+SEQAN_CHECKPOINT
+	typedef LocalAlignmentFinder<TScoreValue> TFinder;
+	clearGaps(row(align_,0));
+	clearGaps(row(align_,1));
+
+    StringSet<TSource> str;
+    for (unsigned i = 0; i < length(rows(align_)); ++i) {
+        appendValue(str, sourceSegment(row(align_, i)));
+    }
+    _initLocalAlignmentFinder(str, sw_finder, SmithWaterman());
+	
+	TScoreValue ret = _smithWatermanGetMatrix(sw_finder, sourceSegment(row(align_, 0)), sourceSegment(row(align_, 1)), score_,cutoff);
+	
+	if(ret==0)
+		return ret;
+	sw_finder.needReinit = false;
+
+	typedef Iter<typename LocalAlignmentFinder<TScoreValue>::TMatrix,PositionIterator > TMatrixIterator;
+	TMatrixIterator best_begin;
+	
+	// TODO: sw_finder statt kram
+	best_begin = _smithWatermanTrace(align_,sw_finder.forbidden,iter(sw_finder.matrix,(top(sw_finder.pQ)).id_), score_);
+
+	sw_finder.bestBeginPos = position(best_begin);
+	
+	pop(sw_finder.pQ);
+
+	return ret;
+}
+
+/*DISABLED
+.Function.smithWatermanGetNext:
+..summary:Computes next best local alignment.
+..description:Declumps the matrix and computes the next best local alignment of the (two) sequences given in align 
+according to the score values given in score. Declumping means forbidding all matches and mismatches that were used
+in previously found alignment to be used again.
+..cat:Alignments
+..signature:smithWatermanGetNext(align, sw_finder, score, cutoff)
+..param.align:The alignment object having the sequences to be aligned as sources.
+...type:Class.Align
+..param.sw_finder:The local alignment finder object (that has been passed to @Function.smithWaterman@ before).
+...type:Class.LocalAlignmentFinder
+..param.score:The score values to be used for computing the alignment.
+...type:Class.Score
+..param.cutoff:Alignments with scores < cutoff will be discarded. 
+...remarks:Only use a cut off score that is greater or equal to the one that was used when calling @Function.smithWaterman at .
+..returns:The score value of the next best local alignment or 0 if there was no alignment with score >= cutoff.
+..returns:The corresponding alignment can be found in align.
+..see:Function.smithWaterman
+..see:Function.localAlignment
+..include:seqan/align.h
+*/
+///////////////////////////////////////////////////////////////////////////
+// wrapper that declumps the matrix and traces back the next best alignment
+template <typename TSource, typename TSpec, typename TScoreValue>
+TScoreValue
+_smithWatermanGetNext(Align<TSource, TSpec> & align_,
+					 LocalAlignmentFinder<TScoreValue> & sw_finder ,
+					 Score<TScoreValue, Simple> const & score_, 
+					 TScoreValue cutoff)
+{	
+SEQAN_CHECKPOINT
+
+	_smithWatermanDeclump(sw_finder, align_, score_);
+
+	clearGaps(row(align_,0));
+	clearGaps(row(align_,1));
+	setClippedEndPosition(row(align_, 0),endPosition(source(row(align_,0))));
+	setClippedEndPosition(row(align_, 1),endPosition(source(row(align_,1))));
+
+	typename LocalAlignmentFinder<TScoreValue>::TMatrixPosition next_best_end;
+	next_best_end = _getNextBestEndPosition(sw_finder,cutoff);
+	if(next_best_end==0)
+		return 0;
+	typename LocalAlignmentFinder<TScoreValue>::TMatrixIterator next_best_begin;
+	next_best_begin= _smithWatermanTrace(align_,sw_finder.forbidden,iter(sw_finder.matrix,next_best_end), score_);
+	sw_finder.bestBeginPos = position(next_best_begin);
+	
+	return getValue(sw_finder.matrix,next_best_end);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//interface for Function.localAlignment
+
+/**
+.Function.localAlignment:
+..cat:Alignments
+...type:Class.Align
+..signature:localAlignment(align, score, tag)
+..signature:localAlignment(align, score)
+..signature:localAlignment(align, sw_finder, score, cutoff, tag)
+..signature:localAlignment(align, sw_finder, score, cutoff, diagLow, diagHigh, tag)
+..param.align:Alignment object to use.
+...type:Class.Align
+..param.cutoff:Alignments with scores < cutoff will be discarded.
+..param.diagLow:The lowest diagonal of the alignment matrix that will be computed for banded alignment.
+..param.diagHigh:The highest diagonal of the alignment matrix that will be computed for banded alignment.
+..param.tag:
+...type:Tag.Local Alignment Algorithms.value.SmithWaterman
+...type:Tag.Local Alignment Algorithms.value.WatermanEggert
+...type:Tag.Local Alignment Algorithms.value.BandedWatermanEggert
+.remarks:TODO
+..include:seqan/align.h
+ */	
+
+//1. only Align object
+template <typename TSource, typename TSpec, typename TScoreValue>
+inline TScoreValue
+localAlignment(Align<TSource, TSpec> & align_,
+			   Score<TScoreValue, Simple> const & score_, 
+			   SmithWaterman)
+{
+	LocalAlignmentFinder<TScoreValue> sw_finder(align_);
+
+	return _smithWaterman(align_, sw_finder, score_, 0);
+}
+
+template <typename TSource, typename TSpec, typename TScoreValue>
+inline TScoreValue
+localAlignment(Align<TSource, TSpec> & align_,
+			   Score<TScoreValue, Simple> const & score_)
+{
+	return localAlignment(align_, score_, SmithWaterman());
+}
+
+
+//2. Align, LocalAlignmentFinder, and cutoff arguments
+template <typename TSource, typename TSpec, typename TScoreValue1, typename TScoreValue2, typename TScoreValue3>
+inline TScoreValue1
+localAlignment(Align<TSource, TSpec> & align_,
+			   LocalAlignmentFinder<TScoreValue1> & sw_finder,
+			   Score<TScoreValue2, Simple> const & score_, 
+			   TScoreValue3 cutoff,
+			   WatermanEggert)
+{
+	if (sw_finder.needReinit)
+	{
+		return _smithWaterman(align_, sw_finder, score_, cutoff);
+	}
+	else
+	{
+		return _smithWatermanGetNext(align_, sw_finder, score_, cutoff);
+	}
+}
+template <typename TSource, typename TSpec, typename TScoreValue1, typename TScoreValue2, typename TScoreValue3>
+inline TScoreValue1
+localAlignment(Align<TSource, TSpec> & align_,
+			   LocalAlignmentFinder<TScoreValue1> & sw_finder,
+			   Score<TScoreValue2, Simple> const & score_, 
+			   TScoreValue3 cutoff)
+{
+	return localAlignment(align_, sw_finder, score_, cutoff, WatermanEggert());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/align_local_dynprog_banded.h b/src/SeqAn-1.3/seqan/align/align_local_dynprog_banded.h
new file mode 100644
index 0000000..f6636b0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_local_dynprog_banded.h
@@ -0,0 +1,585 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_LOCAL_DYNPROG_BANDED_H
+#define SEQAN_HEADER_ALIGN_LOCAL_DYNPROG_BANDED_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScoreValue, typename TDiagonal>
+void
+_initLocalAlignmentFinder(TStringSet const& str,
+                          LocalAlignmentFinder<TScoreValue> & finder,
+                          BandedWatermanEggert,
+                          TDiagonal const lowerDiag,
+                          TDiagonal const upperDiag) {
+SEQAN_CHECKPOINT
+    typedef LocalAlignmentFinder<TScoreValue> TFinder;
+    typedef typename TFinder::TMatrix TMatrix;
+    typedef typename Size<TMatrix>::Type TSize;
+
+    TSize lo_row = (upperDiag <= 0) ? static_cast<TSize>(-upperDiag) : 0;
+    TSize hi_row = length(value(str, 1)) + 1;
+    TSize len0 = length(value(str, 0));
+    if (len0 - lowerDiag < hi_row) hi_row = static_cast<TSize>(len0 - lowerDiag);
+    TSize height = hi_row - lo_row + 1;
+	SEQAN_ASSERT_GEQ(upperDiag, lowerDiag);
+    TSize diagonalWidth = (TSize) (upperDiag - lowerDiag + 1);
+
+    setDimension(finder.matrix, 2);
+    setLength(finder.matrix, 0, diagonalWidth);
+    setLength(finder.matrix, 1, height);
+    resize(finder.matrix, 0);
+
+    resize(finder.forbidden, height * diagonalWidth, false);
+
+	finder.bestEndPos = minValue<typename TFinder::TMatrixPosition>();
+	finder.bestBeginPos = minValue<typename TFinder::TMatrixPosition>();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TScoreValue, typename TStringSet, typename TScore, typename TDiagonal>
+inline Pair<Pair<TDiagonal> >
+_alignBandedSmithWatermanTrace(LocalAlignmentFinder<TScoreValue> & finder,
+                       TStringSet const& str,
+                       TScore& sc,
+                       TDiagonal diagL,
+                       TDiagonal diagU) {
+SEQAN_CHECKPOINT
+    typedef LocalAlignmentFinder<TScoreValue> TFinder;
+    typedef typename Value<TStringSet>::Type TString;
+    typedef typename Id<TStringSet>::Type TId;
+    typedef typename Size<TString>::Type TSize;
+    typedef unsigned char TTraceValue;
+
+    clear(finder.trace.sizes);
+    clear(finder.trace.tvs);
+
+    // Traceback values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2; TTraceValue Stop = 3;
+
+    // Initialization
+    TString const& str1 = str[0];
+    TString const& str2 = str[1];
+    TId id1 = positionToId(const_cast<TStringSet&>(str), 0);
+    TId id2 = positionToId(const_cast<TStringSet&>(str), 1);
+    TSize len1 = length(str1);
+    TSize len2 = length(str2);
+
+    TSize lo_row = (diagU <= 0) ? static_cast<TSize>(-diagU) : 0;
+    //TSize diagonalWidth = static_cast<TSize>(diagU - diagL + 1);
+
+    // Start the trace from the cell with the max value
+    typename TFinder::TMatrixIterator matIt = iter(finder.matrix, finder.bestEndPos);
+    typename TFinder::TMatrixIterator matIt2 = iter(finder.matrix, finder.bestEndPos);
+    goPrevious(matIt2, 1);
+
+    TSize row = coordinate(matIt, 1);
+    TSize col = coordinate(matIt, 0);
+    TSize endRow = row + lo_row;
+    TSize endCol = static_cast<TSize>(col + diagL + endRow);
+
+	TSize actualRow = row + lo_row;
+    TSize actualCol = static_cast<TSize>(col + diagL + actualRow);
+    if ((actualCol == 0) || (actualRow == 0)) 
+        return Pair<Pair<TDiagonal> >();
+
+	if (actualCol < len1) _alignTracePrint(finder.trace, str, id1, actualCol, id2, actualRow, len1 - actualCol, Horizontal);
+	if (actualRow < len2) _alignTracePrint(finder.trace, str, id1, actualCol, id2, actualRow, len2 - actualRow, Vertical);
+	
+    TTraceValue traceValue = Stop;
+    TTraceValue nextTraceValue = Horizontal;
+    TSize segLen = 0;
+	
+    while (nextTraceValue != Stop) {
+        traceValue = nextTraceValue;
+        if (*matIt == 0) {
+            nextTraceValue = Stop;
+        }
+        else if (*matIt == *matIt2 + score(const_cast<TScore&>(sc), ((int)actualCol-1), ((int)actualRow-1), str1, str2)) {
+            nextTraceValue = Diagonal;
+            --actualRow; --actualCol;
+            --row;
+            goPrevious(matIt, 1); 
+            goPrevious(matIt2, 1);
+        } else if (*matIt == *(matIt2+1) + scoreGapExtendVertical(sc, ((int)actualCol-1), ((int)actualRow-1), str1, str2)) {
+            nextTraceValue = Vertical;
+            --actualRow; 
+            --row; ++col;
+            goPrevious(matIt, 1); goNext(matIt, 0);
+            goPrevious(matIt2, 1); goNext(matIt2, 0);
+        } else {
+            SEQAN_ASSERT_EQ(*matIt, *(matIt-1) + scoreGapExtendHorizontal(sc, ((int)actualCol-1), ((int)actualRow-1), str1, str2));
+            nextTraceValue = Horizontal;
+            --actualCol; 
+            --col;
+            goPrevious(matIt, 0);
+            goPrevious(matIt2, 0);
+        }
+        if (traceValue == nextTraceValue) {
+            ++segLen;
+        } else {
+            _alignTracePrint(finder.trace, str, id1, actualCol, id2, actualRow, segLen, traceValue);
+            segLen = 1;
+        }
+    }
+    
+	// Handle the remaining sequence
+	if (actualCol != 0) _alignTracePrint(finder.trace, str, (TId) id1, (TSize) 0, (TId) 0, (TSize) 0, (TSize) actualCol, Horizontal);
+	if (actualRow != 0) _alignTracePrint(finder.trace, str, (TId) 0, (TSize) 0, (TId) id2, (TSize) 0, (TSize) actualRow, Vertical);
+
+    goNext(matIt, 1); // assumes that each trace ends with a diagonal
+    finder.bestBeginPos = position(matIt);
+
+    return Pair<Pair<TDiagonal> >(Pair<TDiagonal>(actualCol, endCol), Pair<TDiagonal>(actualRow, endRow));
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+template<typename TScoreValue, typename TStringSet, typename TScore, typename TDiagonal>
+inline void
+_alignBandedSmithWatermanDeclump(LocalAlignmentFinder<TScoreValue>& finder,
+                 TStringSet const& str,
+                 TScore const& sc,
+                 TScoreValue const cutoff,
+                 TDiagonal const diagL,
+                 TDiagonal const diagU) {
+SEQAN_CHECKPOINT
+    typedef typename Value<TStringSet>::Type TString;
+    typedef typename Size<TString>::Type TSize;
+    typedef LocalAlignmentFinder<TScoreValue> TFinder;
+    typedef unsigned char TTraceValue;
+
+    // Traceback values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+
+    TString const& str1 = str[0];
+    TString const& str2 = str[1];
+    TSize len1 = length(str1);
+
+    TSize diagonalWidth = (TSize) (diagU - diagL + 1);
+    TSize lo_row = (diagU <= 0) ? static_cast<TSize>(-diagU) : 0;
+    TSize hi_row = length(value(str, 1));// + 1;
+    if (len1 - diagL < hi_row) hi_row = static_cast<TSize>(len1 - diagL);
+    TSize height = hi_row - lo_row + 1;
+
+    TSize actualRow, actualCol;
+    //TSize row, col;
+
+    // Initialize iterators
+    typename TFinder::TMatrixIterator matIt = iter(finder.matrix, finder.bestBeginPos);
+    typename TFinder::TMatrixIterator matIt2;
+
+    // Initialize column boundaries
+    TSize minCol = diagonalWidth, newMinCol = diagonalWidth;
+    TSize maxCol = 0, newMaxCol = 0;
+    TSize row = coordinate(matIt, 1);
+    TSize col = coordinate(matIt, 0);
+    TSize traceCol = col;
+
+    matIt -= col;
+
+    // Initialize position in trace
+    TSize tracePos = length(finder.trace.sizes);
+    while (tracePos > 0 && finder.trace.tvs[tracePos-1] != Diagonal) --tracePos;
+    if (tracePos == 0) return;
+    TSize traceSize = finder.trace.sizes[tracePos-1];
+    TTraceValue traceValue = finder.trace.tvs[tracePos-1];
+
+    // iterate over rows
+    while((row < height) && ((maxCol > minCol) || (tracePos > 0))) {
+        actualRow = row + lo_row;
+
+        // make sure that all matrix entries of trace are re-calculated and set to forbidden
+        while (traceSize == 0 && tracePos > 1) {
+            // determine next trace direction
+            --tracePos;
+            traceValue = finder.trace.tvs[tracePos-1];
+            if (traceValue == Horizontal) {
+                traceCol += finder.trace.sizes[tracePos-1];
+            } else {
+                traceSize = finder.trace.sizes[tracePos-1];
+            }
+        }
+        if (tracePos > 0) {
+            // follow the trace in the current row
+            if (traceValue == Diagonal) {
+                --traceSize;
+                _setForbiddenCell(finder.forbidden, row+1, traceCol+1, diagonalWidth);
+                minCol = _min(minCol, traceCol);
+                maxCol = _max(maxCol, traceCol+1);
+            } else if (traceValue == Vertical) {
+                if (traceCol > 0) --traceCol;
+                --traceSize;
+            }
+
+            if (traceCol >= maxCol) {
+                    maxCol = traceCol + 1;
+            }
+        }
+ 
+        // iterate over columns that have to be re-calculated
+        if (maxCol > minCol) {
+            col = minCol;
+            matIt += col;
+            matIt2 = matIt - diagonalWidth;
+            while (col < maxCol) {
+                actualCol = static_cast<TSize>(col + diagL + actualRow);
+                if (actualCol > len1) break;
+
+                TScoreValue newVal = 0;
+
+                // diagonal
+                if (!value(finder.forbidden, position(matIt))) {
+                    newVal = _max(newVal, *matIt2 + score(sc, ((int)actualCol-1), ((int)actualRow-1), str1, str2));
+                }
+                ++matIt2;
+
+                // horizontal
+				if (col > 0) {
+		            newVal = _max(newVal, *(matIt-1) + scoreGapExtendHorizontal(sc, ((int)actualCol-1), ((int)actualRow-1), str1, str2));
+				}
+
+                // vertical
+				if (col+1 < maxCol) {
+					newVal = _max(newVal, *matIt2 + scoreGapExtendVertical(sc, ((int)actualCol-1), ((int)actualRow-1), str1, str2));
+				}
+
+                if (newVal != *matIt) {
+                    // matrix entry changed
+                    *matIt = newVal;
+                    maxCol = _min(_max(maxCol, col+2), diagonalWidth);
+                    newMaxCol = _max(newMaxCol, col+1);
+                    newMinCol = ((col != 0) ? _min(newMinCol, col-1) : 0);
+
+                    // Record the new best score
+                    if (newVal >= cutoff) {
+                        push(finder.pQ, ScoreAndID<TScoreValue, typename TFinder::TMatrixPosition>(newVal, position(matIt)));
+                    }
+                } else {
+                    // matrix entry did not change
+                    if (col == minCol) {
+                        ++minCol;
+                    }
+                }
+                ++col;
+                ++matIt;
+            }
+            matIt += diagonalWidth - col;
+        } else {
+            matIt += diagonalWidth;
+        }
+
+        minCol = _max((TSize)0, newMinCol);
+        maxCol = _min(diagonalWidth, newMaxCol);
+        newMinCol = diagonalWidth;
+        newMaxCol = 0;
+
+        ++row;
+    }
+  //  // Debug code
+  //  std::cerr << std::endl;
+  //  for (TSize i = 0; i < height; ++i) {
+  //      for(TSize j = 0; j < diagonalWidth; ++j) {
+  //          std::cerr << value(finder.matrix, j, i) << ',';
+  //      }
+		//if (i > 0) std::cerr << " " << str2[i-1] << "    ";
+		//else std::cerr << "      ";
+  //      for (TSize j= 0; j<diagonalWidth; ++j) {
+  //          std::cerr << value(finder.forbidden, j+i*diagonalWidth) << ',';
+  //      }
+  //      if (i > 0) std::cerr << " " << str2[i-1] << std::endl;
+		//else std::cerr << std::endl;
+  //  }
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+template <typename TScoreValue, typename TStringSet, typename TScore, typename TDiagonal>
+inline TScoreValue
+_alignBandedSmithWaterman(LocalAlignmentFinder<TScoreValue>& finder,
+                 TStringSet const& str,
+                 TScore const& sc,
+                 TScoreValue const cutoff,
+                 TDiagonal const diagL,
+                 TDiagonal const diagU) {
+SEQAN_CHECKPOINT
+    typedef typename Value<TStringSet>::Type TString;
+    typedef typename Size<TString>::Type TSize;
+    typedef LocalAlignmentFinder<TScoreValue> TFinder;
+
+    // Initialization
+    TString const& str1 = str[0];
+    TString const& str2 = str[1];
+    TSize len1 = length(str1);
+    TSize len2 = length(str2);
+
+    TSize lo_row = (diagU <= 0) ? static_cast<TSize>(-diagU) : 0;
+    TSize hi_row = len2;// + 1;
+    if (len1 - diagL < hi_row) hi_row = static_cast<TSize>(len1 - diagL);
+
+    TSize height = hi_row - lo_row + 1;
+    TSize diagonalWidth = (TSize) (diagU - diagL + 1);
+
+    TSize actualCol, actualRow;
+    TScoreValue verti_val, hori_val;
+
+    // Initialize iterators
+    typename TFinder::TMatrixIterator matIt = begin(finder.matrix);  // Iterator in current row
+    goNext(matIt, 1);
+    typename TFinder::TMatrixIterator matIt2 = begin(finder.matrix); // Iterator in previous row (for diagonal and vertical value)
+
+    for (TSize row = 1; row < height; ++row) {
+        actualRow = row + lo_row;
+        hori_val = 0;
+        
+        for (TSize col = 0; col < diagonalWidth; ++col, ++matIt) {
+            // handle begin and end triangle of band
+            if ((int)col + diagL + (int)actualRow < 0) {++matIt2; continue;}
+            actualCol = static_cast<TSize>(col + diagL + actualRow);
+            if (actualCol > len1) {++matIt2; continue;}
+
+            if (actualCol != 0) {
+                // Get the new maximum for diagonal
+                *matIt = *matIt2 + score(const_cast<TScore&>(sc), ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+
+                ++matIt2;
+
+                // Get the new maximum for vertical
+                if (col < diagonalWidth - 1) {
+                    verti_val = *matIt2 + scoreGapExtendVertical(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+                    if (verti_val > *matIt) {
+                        *matIt = verti_val;
+                    }
+                }
+
+                // Get the new maximum for horizontal
+                if (col > 0) {
+                    hori_val = hori_val + scoreGapExtendHorizontal(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+                    if (hori_val > *matIt) {
+                        *matIt = hori_val;
+                    }
+                }
+
+                // Check if new maximum is greater than 0
+                if (0 > *matIt) {
+                    *matIt = 0;
+                }
+
+                // Record the new best score
+                if (*matIt >= cutoff) {
+                    push(finder.pQ, ScoreAndID<TScoreValue, typename TFinder::TMatrixPosition>(*matIt, position(matIt)));
+                }
+            } else {
+                // First column (*matIt = 0)
+                ++matIt2;
+            }
+            hori_val = *matIt;
+        }
+    }
+ //   // Debug code
+ //   std::cerr << std::endl;
+	//for(TSize i= 0; i<height; ++i) {
+	//	for(TSize j= 0; j<diagonalWidth; ++j) {
+	//		std::cerr << value(finder.matrix, j, i) << ',';
+	//	}
+	//	if (i > 0) std::cerr << " " << str2[i-1] << std::endl;
+	//	else std::cerr << std::endl;
+	//}
+ //   if(length(finder.pQ) > 0) std::cerr << "Max score: " << top(finder.pQ).value_ << std::endl;
+
+    if(!empty(finder.pQ)) {
+        finder.bestEndPos = top(finder.pQ).id_;
+        return top(finder.pQ).value_;
+    } else {
+        return 0;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSource, typename TSpec, typename TPos>
+inline void
+_finishAlign(Align<TSource, TSpec>& align,
+             TPos const begin1,
+             TPos const end1,
+             TPos const begin2,
+             TPos const end2) {
+SEQAN_CHECKPOINT
+	setClippedBeginPosition(row(align, 0), begin1);
+	setClippedBeginPosition(row(align, 1), begin2);
+	setBeginPosition(row(align, 0), 0);
+	setBeginPosition(row(align, 1), 0);
+	setClippedEndPosition(row(align, 0), end1);
+	setClippedEndPosition(row(align, 1), end2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TScoreValue, typename TSource, typename TSpec, typename TStringSet, typename TScore, typename TDiagonal>
+inline TScoreValue
+_localAlignment(LocalAlignmentFinder<TScoreValue> & finder,
+                TStringSet& str,
+                Align<TSource, TSpec> & align,
+                TScore const& sc,
+                TScoreValue cutoff,
+                TDiagonal diag1,
+                TDiagonal diag2,
+                BandedWatermanEggert) {
+SEQAN_CHECKPOINT
+    // Fill the matrix
+    TScoreValue maxScore = _alignBandedSmithWaterman(finder, str, sc, cutoff, diag1, diag2);
+    if (maxScore < cutoff) return 0;
+
+    // Follow the matrix back from max entry and create a trace path
+    Pair<Pair<TDiagonal> > alignmentPositions = _alignBandedSmithWatermanTrace(finder, str, sc, diag1, diag2);
+
+    // Create the alignment following the trace path
+	_pumpTraceToAlign(align, finder.trace);
+    _finishAlign(align, alignmentPositions.i1.i1, alignmentPositions.i1.i2, alignmentPositions.i2.i1, alignmentPositions.i2.i2);
+
+	pop(finder.pQ);
+
+    return maxScore;
+}
+
+template<typename TScoreValue, typename TSource, typename TSpec, typename TStringSet, typename TScore, typename TDiagonal>
+inline TScoreValue
+_localAlignmentNext(LocalAlignmentFinder<TScoreValue> & finder,
+                TStringSet& str,
+                Align<TSource, TSpec> & align,
+                TScore const& sc,
+                TScoreValue cutoff,
+                TDiagonal diag1,
+                TDiagonal diag2,
+                BandedWatermanEggert) {
+SEQAN_CHECKPOINT
+    // Declump the matrix and find new maximum score
+    _alignBandedSmithWatermanDeclump(finder, str, sc, cutoff, diag1, diag2);
+    typename LocalAlignmentFinder<TScoreValue>::TMatrixPosition nextBestEnd;
+	nextBestEnd = _getNextBestEndPosition(finder, cutoff);
+	if(nextBestEnd==0)
+		return 0;
+    TScoreValue maxScore = getValue(finder.matrix, nextBestEnd);
+	if(maxScore == 0) return 0;
+
+    // Follow the trace matrix and create a trace path
+    Pair<Pair<TDiagonal> > alignmentPositions = _alignBandedSmithWatermanTrace(finder, str, sc, diag1, diag2);
+
+    // Create the alignment following the trace path
+	_pumpTraceToAlign(align, finder.trace);
+    _finishAlign(align, alignmentPositions.i1.i1, alignmentPositions.i1.i2, alignmentPositions.i2.i1, alignmentPositions.i2.i2);
+
+    return maxScore;
+}
+
+//1. only Align object
+template <typename TSource, typename TSpec, typename TScoreValue, typename TDiagonal>
+inline TScoreValue
+localAlignment(Align<TSource, TSpec> & align,
+			   Score<TScoreValue, Simple> const & score, 
+               TDiagonal lowerDiag,
+               TDiagonal upperDiag,
+			   BandedSmithWaterman) {
+SEQAN_CHECKPOINT
+	clearGaps(row(align, 0));
+	clearGaps(row(align, 1));
+    setClippedBeginPosition(row(align, 0), 0);
+    setClippedBeginPosition(row(align, 1), 0);
+	setClippedEndPosition(row(align, 0), length(source(row(align, 0))));
+	setClippedEndPosition(row(align, 1), length(source(row(align, 1))));
+
+    StringSet<TSource> str;
+    for (unsigned i = 0; i < length(rows(align)); ++i) {
+        appendValue(str, sourceSegment(row(align, i)));
+    }
+	LocalAlignmentFinder<TScoreValue> finder(align);
+	_initLocalAlignmentFinder(str, finder, BandedWatermanEggert(), lowerDiag, upperDiag);
+	finder.needReinit = false;
+
+	return _localAlignment(finder, str, align, score, 0, lowerDiag, upperDiag, BandedWatermanEggert());
+}
+
+template <typename TSource, typename TSpec, typename TScoreValue, typename TDiagonal>
+inline TScoreValue
+localAlignment(Align<TSource, TSpec> & align_,
+			   Score<TScoreValue, Simple> const & score_,
+               TDiagonal lowerDiag,
+               TDiagonal upperDiag) {
+	return localAlignment(align_, score_, lowerDiag, upperDiag, BandedSmithWaterman());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSpec, typename TScoreValue1, typename TScoreValue2, typename TScoreValue3, typename TDiagonal, typename TTag>
+inline TScoreValue1
+localAlignment(Align<TSource, TSpec> & align,
+			   LocalAlignmentFinder<TScoreValue1> & finder,
+			   Score<TScoreValue2, Simple> const & score,
+			   TScoreValue3 cutoff,
+               TDiagonal lowerDiag,
+               TDiagonal upperDiag,
+			   TTag tag) {
+SEQAN_CHECKPOINT
+	clearGaps(row(align, 0));
+	clearGaps(row(align, 1));
+    setClippedBeginPosition(row(align, 0), 0);
+    setClippedBeginPosition(row(align, 1), 0);
+	setClippedEndPosition(row(align, 0), length(source(row(align, 0))));
+	setClippedEndPosition(row(align, 1), length(source(row(align, 1))));
+
+    StringSet<TSource> str;
+    for (unsigned i = 0; i < length(rows(align)); ++i) {
+        appendValue(str, sourceSegment(row(align, i)));
+    }
+    if (finder.needReinit) {
+        _initLocalAlignmentFinder(str, finder, tag, lowerDiag, upperDiag);
+        finder.needReinit = false;
+        return _localAlignment(finder, str, align, score, cutoff, lowerDiag, upperDiag, tag);
+    } else {
+        return _localAlignmentNext(finder, str, align, score, cutoff, lowerDiag, upperDiag, tag);
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
diff --git a/src/SeqAn-1.3/seqan/align/align_myers.h b/src/SeqAn-1.3/seqan/align/align_myers.h
new file mode 100644
index 0000000..395840a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_myers.h
@@ -0,0 +1,1041 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_MYERS_H
+#define SEQAN_HEADER_ALIGN_MYERS_H
+
+// is necessary to include extended alphabet 
+// can possibly be omitted by extending the alphabet defenition
+#ifdef BAC_ALIGNER 
+#include <../apps/bac_aligner/extended_iupac_alphabet.h>
+#endif
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//#define MYERS_HIRSCHBERG_VERBOSE
+
+#ifdef MYERS_HIRSCHBERG_VERBOSE
+	template<typename TSource>
+	void _writeDebugMatrix(TSource s1,TSource s2)
+	{
+		int l1 = length(s1);
+		int l2 = length(s2);
+	    
+		int i,j,sg,sd;
+
+		String<String<int> > fMatrix,rMatrix,tMatrix;
+
+		resize(fMatrix,l1 + 1);
+		resize(rMatrix,l1 + 1);
+		resize(tMatrix,l1 + 1);
+
+		for(i = 0;i <= l1;++i)
+		{
+			resize(fMatrix[i],l2 + 1);
+			resize(rMatrix[i],l2 + 1);
+			resize(tMatrix[i],l2 + 1);
+		}
+
+		for(i = 0;i <= l1;++i)
+			fMatrix[i][0] = i * (-1);
+
+		for(i = l1;i >= 0;--i)
+			rMatrix[i][l2] = (l1 - i) * (-1);
+
+		// calculate forward matrix
+		for(j = 1;j <= l2;++j)
+		{
+			fMatrix[0][j] = j*(-1);
+			for(i = 1;i <= l1;++i)
+			{
+				sg = -1 + ((fMatrix[i-1][j] > fMatrix[i][j-1]) ? fMatrix[i-1][j] : fMatrix[i][j-1]);
+				sd = fMatrix[i-1][j-1] + ((s1[i - 1] == s2[j-1]) ? 0 : -1 );
+		
+				fMatrix[i][j] = ((sg > sd) ? sg : sd);
+			}
+		}
+
+		// calculate reverse matrix
+		for(j = l2 - 1;j >= 0;--j)
+		{	
+			rMatrix[l1][j] = (l2 - j)*(-1);
+			for(i = l1 - 1;i >= 0;--i)
+			{
+				sg = -1 + ((rMatrix[i+1][j] > rMatrix[i][j+1]) ? rMatrix[i+1][j] : rMatrix[i][j+1]);
+				sd = rMatrix[i+1][j+1] + ((s1[i] == s2[j]) ? 0 : -1 );
+		
+				rMatrix[i][j] = ((sg > sd) ? sg : sd);
+			}
+		}
+
+		// print fMatrix
+		std::cout << ";-;";
+		for(i = 0;i < l1;++i)
+			std::cout << s1[i] << ";";
+
+		std::cout << std::endl << "-;";
+		for(j = 0;j <= l2;++j)
+		{	
+			if(j != 0) std::cout << s2[j-1] << ";";
+			for(i = 0;i <= l1;++i)
+			{
+				std::cout << fMatrix[i][j] << ";";
+			}
+			std::cout << std::endl;
+		}
+		// print rMatrix
+		std::cout << ";";
+		for(i = 0;i < l1;++i)
+			std::cout << s1[i] << ";";
+		std::cout << "-;" << std::endl;
+
+		for(j = 0;j <= l2;++j)
+		{	
+			if(j != l2) std::cout << s2[j] << ";";
+			else std::cout << "-;";
+			for(i = 0;i <= l1;++i)
+			{
+				std::cout << rMatrix[i][j] << ";";
+			}
+			std::cout << std::endl;
+		}
+
+		// fill and print target matrix
+		std::cout << ";-;";
+		for(i = 0;i < l1;++i)
+			std::cout << s1[i] << ";";
+
+		std::cout << std::endl << "-;";
+		for(j = 0;j <= l2;++j)
+		{	
+			if(j != 0) std::cout << s2[j-1] << ";";
+			for(i = 0;i <= l1;++i)
+			{
+				tMatrix[i][j] = fMatrix[i][j] + rMatrix[i][j];
+				std::cout << tMatrix[i][j] << ";";
+			}
+			std::cout << std::endl;
+		}
+	}
+
+#endif
+/*DISABLED
+.Function.align_myers:
+..cat:Alignment
+..summary:(Name of the Function is going to be changed in future)Computes the global Alignmentscore for the passed Alignment-Container with an Edit-Distance Scoring Scheme
+..signature:hirschberg(Align<TSource, TSpec> & align,Score<TScoreValue, Simple> const & score)
+..param.align:The alignment object having the sequences to be aligned as sources.
+...type:Class.Align
+..param.score:The score values to be used for computing the alignment.
+...type:Class.Score
+..remarks: The Computation of the Alignment-Score is based on Myers-Bitvektor-Algorihm for Approximate Stringmatching. The Algorithm was customized,
+as proposed by Hyrroe to compute edit distance. To compute a complete Alignment use @Function.hirschberg_myers@ or @Function.hirschberg@ for smaller Instances of the Problem.
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec, typename TScoreValue>
+TScoreValue
+globalAlignment(Align<TSource, TSpec> & align_,
+				Score<TScoreValue, Simple> const &,
+				MyersBitVector)
+{
+	clearGaps(row(align_,0));
+	clearGaps(row(align_,1));
+
+	// use size of unsigned int as blocksize for bit-vectors
+	const unsigned int BLOCK_SIZE = BitsPerValue<unsigned int>::VALUE;
+
+	typedef typename Value<TSource>::Type TAlphabet;
+	typedef typename Size<TSource>::Type TSourceSize;
+
+	// switch x and y .. y should be the shorter one, to allocate less memory for the bitMasks
+	TSource x,y;
+	if(length(sourceSegment(row(align_, 0))) < length(sourceSegment(row(align_, 1))))
+	{
+		y = sourceSegment(row(align_, 0));
+		x = sourceSegment(row(align_, 1));
+	}
+	else
+	{
+		x = sourceSegment(row(align_, 0));
+		y = sourceSegment(row(align_, 1));
+	}
+	
+	TSourceSize len_x = length(x);
+	unsigned int pos = 0;
+
+	// init variables 
+	unsigned int len_y = length(y);
+	unsigned int score = (-1)*len_y;
+	unsigned int alphabetSize = ValueSize<TAlphabet>::VALUE;
+	unsigned int blockCount = (len_y + BLOCK_SIZE - 1) / BLOCK_SIZE;
+
+	unsigned int scoreMask = 1 << ((len_y % BLOCK_SIZE) - 1);	// the mask with a bit set at the position of the last active cell
+
+	unsigned int * VP;
+	unsigned int * VN;
+	unsigned int * bitMask;
+
+	allocate (align_, VP, blockCount);
+	arrayFill (VP, VP + blockCount, ~0);
+
+	allocate (align_, VN, blockCount);
+	arrayFill (VN, VN + blockCount, 0);
+
+	// first bitMask will be constructed from the shorter sequence
+	allocate (align_, bitMask, alphabetSize * blockCount);
+	arrayFill(bitMask, bitMask + alphabetSize * blockCount, 0);
+
+	// encoding the letters as bit-vectors
+    for (unsigned int j = 0; j < len_y; j++)
+		bitMask[blockCount * ordValue(getValue(y,j)) + j/BLOCK_SIZE] = bitMask[blockCount * ordValue(getValue(y,j)) + j/BLOCK_SIZE] | 1 << (j%BLOCK_SIZE);
+
+#ifdef BAC_ALIGNER // see definition of BAC_ALIGNER
+	//extend the bitMasks for ambigous alphabets
+	//	possibly intergrate Tag for Alphabet-Class
+	if(ClassIdentifier_<TAlphabet>::getID() == ClassIdentifier_<EIupac>::getID())
+	{
+		unsigned int i,j,m;
+		unsigned int * copyMask;
+
+		// copy of bitmask
+		allocate (align_, copyMask, alphabetSize * blockCount);
+		arrayCopy(bitMask,bitMask + alphabetSize * blockCount,copyMask);
+		
+		for(i = 0;i < alphabetSize;++i)
+		{
+			for(j = 0;j < alphabetSize;++j)
+			{
+				if(static_cast<TAlphabet>(i) == static_cast<TAlphabet>(j))
+				{
+					unsigned int char_ind_i = blockCount * ordValue(static_cast<TAlphabet>(i));
+					unsigned int char_ind_j = blockCount * ordValue(static_cast<TAlphabet>(j));
+					for(m = 0;m < blockCount;++m)
+					{
+						bitMask[char_ind_i] |= copyMask[char_ind_j];
+						++char_ind_i;
+						++char_ind_j;
+					}
+				}
+			}
+
+		}
+
+		deallocate(align_, copyMask, alphabetSize * blockCount);
+	}
+#endif
+	// compute score
+	unsigned int X, D0, HN, HP;
+	if(blockCount == 1)
+	{
+		while (pos < len_x) {
+			X = bitMask[ordValue(getValue(x,pos))] | VN[0];
+
+			D0 = ((VP[0] + (X & VP[0])) ^ VP[0]) | X;
+			HN = VP[0] & D0;
+			HP = VN[0] | ~(VP[0] | D0);
+
+			// customized to compute edit distance
+			X = (HP << 1) | 1;
+			VN[0] = X & D0;
+			VP[0] = (HN << 1) | ~(X | D0);
+
+			if (HP & scoreMask)
+				score--;
+			else if (HN & scoreMask)
+				score++;
+
+			++pos;
+		}
+	} // end compute score - short pattern
+	else
+	{
+		unsigned int temp, shift, currentBlock;
+		unsigned int carryD0, carryHP, carryHN;
+
+		while (pos < len_x) 
+		{
+			// set vars
+			carryD0 = carryHP = carryHN = 0;
+			shift = blockCount * ordValue(getValue(x,pos));
+
+			// computing first the top most block
+			X = bitMask[shift] | VN[0];
+	
+			temp = VP[0] + (X & VP[0]);
+			carryD0 = temp < VP[0];
+			
+			D0 = (temp ^ VP[0]) | X;
+			HN = VP[0] & D0;
+			HP = VN[0] | ~(VP[0] | D0);
+			
+			// customized to compute edit distance
+			X = (HP << 1) | 1;
+			carryHP = HP >> (BLOCK_SIZE - 1);
+			
+			VN[0] = X & D0;
+
+			temp = (HN << 1);
+			carryHN = HN >> (BLOCK_SIZE - 1);
+								
+		 	VP[0] = temp | ~(X | D0);
+
+			// computing the necessary blocks, carries between blocks following one another are stored
+			for (currentBlock = 1; currentBlock < blockCount; currentBlock++) {
+				X = bitMask[shift + currentBlock] | VN[currentBlock];
+		
+				temp = VP[currentBlock] + (X & VP[currentBlock]) + carryD0;
+				
+				carryD0 = ((carryD0) ? temp <= VP[currentBlock] : temp < VP[currentBlock]);
+			
+				D0 = (temp ^ VP[currentBlock]) | X;
+				HN = VP[currentBlock] & D0;
+				HP = VN[currentBlock] | ~(VP[currentBlock] | D0);
+				
+				X = (HP << 1) | carryHP;
+				carryHP = HP >> (BLOCK_SIZE-1);
+				
+				VN[currentBlock] = X & D0;
+
+				temp = (HN << 1) | carryHN;
+				carryHN = HN >> (BLOCK_SIZE - 1);
+									
+		 		VP[currentBlock] = temp | ~(X | D0);
+			}
+
+			// update score with the HP and HN values of the last block the last block
+			if (HP & scoreMask)
+				score--;
+			else if (HN & scoreMask)
+				score++;
+			++pos;
+		}
+
+	} // end compute score - long pattern
+
+	// clean up
+	deallocate(align_, bitMask, alphabetSize * blockCount);
+	deallocate(align_, VP, blockCount);
+	deallocate(align_, VN, blockCount);
+
+	return score;
+
+} // end align_myers_score
+
+/*DISABLED
+.Function.hirschberg_myers:
+..cat:Alignment
+..summary:Computes the global Alignment for the passed Alignment-Container with an Edit-Distance Scoring Scheme.
+..signature:hirschberg_myers(Align<TSource, TSpec> & align,Score<TScoreValue, Simple> const & score)
+..param.align:The alignment object having the sequences to be aligned as sources.
+...type:Class.Align
+..param.score:The score values to be used for computing the alignment.
+...type:Class.Score
+..remarks: The Computation of the Alignment-Score is based on a combination of Myers-Bitvektor-Algorihm for Approximate Stringmatching and
+the Algorithm proposed by Hirschberg to compute Sequence Alignments with linear space.
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec, typename TScoreValue>
+TScoreValue
+globalAlignment(Align<TSource, TSpec> & align_,
+				Score<TScoreValue, Simple> const &,
+				MyersHirschberg)
+{
+SEQAN_CHECKPOINT
+	
+	clearGaps(row(align_,0));
+	clearGaps(row(align_,1));
+
+	// use size of unsigned int as blocksize for bit-vectors
+	const unsigned int BLOCK_SIZE = BitsPerValue<unsigned int>::VALUE;
+
+	// saves the score value that will be returned
+	TScoreValue score,total_score = 0;
+
+	// switch x and y .. y should be the shorter one, to allocate less memory for the bitMasks
+	TSource x,y;
+
+	typedef typename Value<TSource>::Type TAlphabet;
+	typedef typename Size<TSource>::Type TStringSize;
+	
+	typedef typename Iterator<TSource, Rooted>::Type TStringIterator;
+
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Rooted>::Type TTargetIterator;
+
+	typedef typename Iterator<Matrix<TScoreValue>, Rooted>::Type TMatrixIterator;
+
+	TTargetIterator target_0,target_1;
+
+	if(length(sourceSegment(row(align_, 0))) < length(sourceSegment(row(align_, 1))))
+	{
+		x = sourceSegment(row(align_, 1));
+		y = sourceSegment(row(align_, 0));
+		
+		target_0 = iter(row(align_, 1), 0);
+		target_1 = iter(row(align_, 0), 0);
+	}
+	else
+	{
+		x = sourceSegment(row(align_, 0));
+		y = sourceSegment(row(align_, 1));
+
+		target_0 = iter(row(align_, 0), 0);
+		target_1 = iter(row(align_, 1), 0);
+	}
+
+
+	TStringSize len_x = length(x);
+	TStringSize len_y = length(y);
+
+	// string to store the score values for the currently active cell
+	String<TScoreValue> c_score;
+	resize(c_score,len_x + 1);
+	
+	// scoring-scheme specific score values
+	TScoreValue score_match = 0;
+	TScoreValue score_mismatch = -1;
+	TScoreValue score_gap = -1;
+
+	// additional vars
+	int i;
+
+	// stack with parts of matrix that have to be processed
+	std::stack<_HirschbergSet> to_process;
+	_HirschbergSet target;
+
+	// myers specific vars and preprocessing
+	unsigned int alphabetSize = ValueSize<TAlphabet>::VALUE;
+	unsigned int blockCount = (len_y + BLOCK_SIZE - 1) / BLOCK_SIZE; // maximal count of blocks
+
+	unsigned int * VP;
+	unsigned int * VN;
+	
+	unsigned int * forwardBitMask;			// encoding the alphabet as bit-masks
+	unsigned int * reverseBitMask;
+	
+	allocate (align_, VP, blockCount);
+	arrayFill (VP, VP + blockCount, ~0);
+
+	allocate (align_, VN, blockCount);
+	arrayFill (VN, VN + blockCount, 0);
+
+	// first bitMask will be constructed from the shorter sequence
+	allocate (align_, forwardBitMask, alphabetSize * blockCount);
+	arrayFill(forwardBitMask, forwardBitMask + alphabetSize * blockCount, 0);
+
+	allocate (align_, reverseBitMask, alphabetSize * blockCount);
+	arrayFill(reverseBitMask, reverseBitMask + alphabetSize * blockCount, 0);
+
+	// encoding the letters as bit-vectors
+    for (unsigned int j = 0; j < len_y; j++){
+SEQAN_CHECKPOINT
+		forwardBitMask[blockCount * ordValue(getValue(y,j)) + j/BLOCK_SIZE] = forwardBitMask[blockCount * ordValue(getValue(y,j)) + j/BLOCK_SIZE] | 1 << (j%BLOCK_SIZE);
+		reverseBitMask[blockCount * ordValue(getValue(y,len_y - j - 1)) + j/BLOCK_SIZE] = reverseBitMask[blockCount * ordValue(getValue(y,len_y - j - 1)) + j/BLOCK_SIZE] | 1 << (j%BLOCK_SIZE);
+	}
+
+#ifdef BAC_ALIGNER // see definition of BAC_ALIGNER
+
+	// extend the bitMasks for ambigous alphabets
+	//		possibly intergrate Tag for Alphabet-Class
+	if(ClassIdentifier_<TAlphabet>::getID() == ClassIdentifier_<EIupac>::getID())
+	{
+		unsigned int * fCopyMask;
+		unsigned int * rCopyMask;
+		
+		// allocate memory for temporary copy of bitMasks
+		allocate (align_, fCopyMask, alphabetSize * blockCount);
+		allocate (align_, rCopyMask, alphabetSize * blockCount);
+
+		arrayCopy(forwardBitMask, forwardBitMask + alphabetSize * blockCount, fCopyMask);
+		arrayCopy(reverseBitMask, reverseBitMask + alphabetSize * blockCount, rCopyMask);
+
+		unsigned int i,j,m;
+		for(i=0;i < alphabetSize;++i)
+		{
+			// iterate over the whole alphabet
+			// 1. all letters that were allready processed
+			for(j = 0;j < i;++j)
+			{
+				if(static_cast<TAlphabet>(i) == static_cast<TAlphabet>(j))
+				{
+					unsigned int char_ind_i = blockCount*ordValue(static_cast<TAlphabet>(i));
+					unsigned int char_ind_j = blockCount*ordValue(static_cast<TAlphabet>(j));
+
+					for(m = 0;m < blockCount;++m)
+					{
+						forwardBitMask[char_ind_i] |= fCopyMask[char_ind_j];
+						reverseBitMask[char_ind_i] |= rCopyMask[char_ind_j];
+						++char_ind_i;
+						++char_ind_j;
+					}
+				}
+			}
+			// 2. all unprocessed letters
+			for(j = i+1;j < alphabetSize;++j)
+			{
+				if(static_cast<TAlphabet>(i) == static_cast<TAlphabet>(j))
+				{
+					unsigned int char_ind_i = blockCount*ordValue(static_cast<TAlphabet>(i));
+					unsigned int char_ind_j = blockCount*ordValue(static_cast<TAlphabet>(j));
+					
+					for(m = 0;m < blockCount;++m)
+					{
+						forwardBitMask[char_ind_i] |= fCopyMask[char_ind_j];
+						reverseBitMask[char_ind_i] |= rCopyMask[char_ind_j];
+						++char_ind_i;
+						++char_ind_j;
+					}
+				}
+			}
+		}
+
+		/* deallocate space used for the temporary bitMasks */
+		deallocate(align_, fCopyMask, alphabetSize * blockCount);
+		deallocate(align_, rCopyMask, alphabetSize * blockCount);
+	}
+#endif
+	_HirschbergSet hs_complete(0,len_x,0,len_y,1);
+	to_process.push(hs_complete);
+
+	while(!to_process.empty())
+	{
+SEQAN_CHECKPOINT
+		target = to_process.top();
+		to_process.pop();
+		/* if score is zero, the whole part of the sequence can be simply skipped */
+		if(_score(target) == 0)
+		{
+SEQAN_CHECKPOINT
+			/* coukd work faster */
+			for(i = 0;i < (_end1(target) - _begin1(target));++i)
+			{
+				++target_0;
+				++target_1;
+			}
+
+#ifdef MYERS_HIRSCHBERG_VERBOSE
+			printf("skipped %i to %i in first sequence\n",_begin1(target),_end1(target));
+#endif
+		}
+		else if(_begin1(target) == _end1(target))
+		{
+SEQAN_CHECKPOINT
+
+#ifdef MYERS_HIRSCHBERG_VERBOSE
+			std::cout << "align y " << _begin2(target) << " to " << _end2(target) << std::endl;
+			std::cout << "align " << infix(y,_begin2(target),_end2(target)) << std::endl << std::endl;
+#endif	
+			for(i = 0;i < (_end2(target) - _begin2(target));++i)
+			{
+				insertGap(target_0);
+				++target_0;
+				++target_1;
+			}
+		}
+		else if(_begin2(target) + 1 == _end2(target))
+		{
+			/* ALIGN */			
+SEQAN_CHECKPOINT
+#ifdef MYERS_HIRSCHBERG_VERBOSE
+			std::cout << "align x " << _begin1(target) << " to " << _end1(target) << " and y " << _begin2(target) << " to " << _end2(target) << std::endl;
+			std::cout << "align " << infix(x,_begin1(target),_end1(target)) << " and " << infix(y,_begin2(target),_end2(target)) << std::endl << std::endl;
+#endif
+
+			TStringSize len_1 = _end1(target) - _begin1(target);
+			TStringSize len_2 = _end2(target) - _begin2(target);
+
+			Matrix<TScoreValue> matrix_;
+
+			setDimension(matrix_, 2);
+			setLength(matrix_, 0, len_1 + 1);
+			setLength(matrix_, 1, len_2 + 1);
+			resize(matrix_);
+
+			/* init matrix */
+			TStringIterator xs_begin = iter(x,_begin1(target)) - 1;
+			TStringIterator xs_end = iter(x,_end1(target)) - 1;
+			TStringIterator ys_begin = iter(y,_begin2(target)) - 1;
+			TStringIterator ys_end = iter(y,_end2(target)) - 1;
+
+			TStringIterator xs = xs_end;
+			TStringIterator ys;
+
+			TMatrixIterator col_ = end(matrix_) - 1;
+			TMatrixIterator finger1;
+			TMatrixIterator finger2;
+
+
+			TScoreValue h = 0;
+			TScoreValue border_ = score_gap;
+			TScoreValue v = border_;
+
+
+			//-------------------------------------------------------------------------
+			// init
+
+			finger1 = col_;
+			*finger1 = 0;
+			for (xs = xs_end; xs != xs_begin; --xs)
+			{
+				goPrevious(finger1, 0);
+				*finger1 = border_;
+				border_ += score_gap;
+			}
+
+			//-------------------------------------------------------------------------
+			//fill matrix
+
+			border_ = 0;
+			for (ys = ys_end; ys != ys_begin; --ys)
+			{
+				TAlphabet cy = *ys;
+				h = border_;
+				border_ += score_gap;
+				v = border_;
+
+				finger2 = col_;		
+				goPrevious(col_, 1);	
+				finger1 = col_;
+
+				*finger1 = v;
+
+				for (xs = xs_end; xs != xs_begin; --xs)
+				{
+					goPrevious(finger1, 0);
+					goPrevious(finger2, 0);
+					if (*xs == cy)
+					{
+						v = h + score_match;
+						h = *finger2;
+					}
+					else
+					{
+						TScoreValue s1 = h + score_mismatch;
+						h = *finger2;
+						TScoreValue s2 = score_gap + ((h > v) ? h : v);
+						v = (s1 > s2) ? s1 : s2;
+					}
+					*finger1 = v;
+				}
+			}	
+
+			// if computed the whole matrix last value of v = alignment score
+			if(target == hs_complete)   total_score = v;
+
+			/* TRACE BACK */
+			finger1 = begin(matrix_);
+			xs = iter(x,_begin1(target));
+			ys = iter(y,_begin2(target));
+			xs_end = iter(x,_end1(target));
+			ys_end = iter(y,_end2(target));
+
+			while ((xs != xs_end) && (ys != ys_end))
+			{
+				bool gv;
+				bool gh;
+
+				if (*xs == *ys)
+				{
+					gv = gh = true;
+				}
+				else
+				{
+					TMatrixIterator it_ = finger1;
+
+					goNext(it_, 0);
+					TScoreValue v = *it_;
+
+					goNext(it_, 1);
+					TScoreValue d = *it_;
+
+					it_ = finger1;
+					goNext(it_, 1);
+					TScoreValue h = *it_;
+
+					gv = (v >= h) | (d >= h);
+					gh = (h >= v) | (d >= v);
+				}
+
+				if (gv)
+				{
+					++xs;
+					goNext(finger1, 0);
+				}
+				else
+				{
+					insertGap(target_0);
+				}
+
+				if (gh) 
+				{
+					++ys;
+					goNext(finger1, 1);
+				}
+				else
+				{
+					insertGap(target_1);
+				}
+
+				++target_0;
+				++target_1;
+			}
+
+			// if x or y did not reached there end position, fill the rest with gaps
+			while(xs != xs_end)
+			{
+				insertGap(target_1);
+				++target_0;
+				++target_1;
+				++xs;
+			}
+
+			while(ys != ys_end)
+			{
+				insertGap(target_0);
+				++target_0;
+				++target_1;
+				++ys;
+			}
+			/* END ALIGN */
+
+
+#ifdef MYERS_HIRSCHBERG_VERBOSE
+			std::cout << std::endl << align_ << std::endl << std::endl;
+#endif
+
+		}
+		else
+		{
+SEQAN_CHECKPOINT
+			/*
+				---------------------------------------------------------------
+				Calculate cut position using extended Myers-Bitvector-Algorithm
+			    --------------------------------------------------------------- 
+			*/
+
+			/* declare variables */
+			unsigned int X, D0, HN, HP;
+
+			/* compute cut position */
+			int mid = static_cast<int>(floor( static_cast<double>((_begin2(target) + _end2(target))/2) ));
+
+			/* debug infos */
+#ifdef MYERS_HIRSCHBERG_VERBOSE
+			std::cout << "calculate cut for x " << _begin1(target) << " to " << _end1(target) << " and y " << _begin2(target) << " to " << _end2(target) << std::endl;
+			std::cout << "calculate cut for " << infix(x,_begin1(target),_end1(target)) << " and " << infix(y,_begin2(target),_end2(target)) << std::endl;
+			std::cout << "cut is in row " << mid << " symbol is " << getValue(x,mid-1) << std::endl << std::endl;
+
+			std::cout << std::endl;
+			_writeDebugMatrix(infix(x,_begin1(target),_end1(target)),infix(y,_begin2(target),_end2(target)));
+			std::cout << std::endl;
+#endif
+			/* compute blocks and score masks */
+			int fStartBlock = _begin2(target) / BLOCK_SIZE;
+			int fEndBlock = (mid - 1) / BLOCK_SIZE;
+			int fSpannedBlocks = (fEndBlock - fStartBlock) + 1;
+
+			unsigned int fScoreMask = 1 << ((mid  - 1) % BLOCK_SIZE);
+			
+			unsigned int fOffSet = _begin2(target) % BLOCK_SIZE;
+			unsigned int fSilencer = ~0;
+			fSilencer <<= fOffSet;
+
+			/* reset v-bitvectors */
+			arrayFill (VP + fStartBlock, VP + fEndBlock + 1, ~0);
+			arrayFill (VN + fStartBlock, VN + fEndBlock + 1, 0);
+
+
+			/* determine start-position and start-score */
+			int pos = _begin1(target);			
+			score = (mid - _begin2(target)) * score_gap;
+			c_score[pos] = score;
+
+			/* compute with myers - forward - begin */
+			if(fSpannedBlocks == 1)
+			{
+SEQAN_CHECKPOINT
+				while (pos < _end1(target)) {
+					X = (fSilencer & forwardBitMask[(blockCount * ordValue(getValue(x,pos))) + fStartBlock]) | VN[fStartBlock];
+
+					D0 = ((VP[fStartBlock] + (X & VP[fStartBlock])) ^ VP[fStartBlock]) | X;
+					HN = VP[fStartBlock] & D0;
+					HP = VN[fStartBlock] | ~(VP[fStartBlock] | D0);
+
+					X = (HP << 1) | (1 << fOffSet);
+					VN[fStartBlock] = X & D0;
+					VP[fStartBlock] = (HN << 1) | ~(X | D0);
+
+					if (HP & fScoreMask)
+						score--;
+					else if (HN & fScoreMask)
+						score++;
+
+					c_score[pos + 1] = score;
+
+					++pos;
+				}
+			} /* end - short patten */
+			else
+			{
+SEQAN_CHECKPOINT
+
+				int shift, currentBlock;
+				unsigned int temp, carryD0, carryHP, carryHN;
+
+				while (pos < _end1(target))
+				{
+					carryD0 = carryHP = carryHN = 0;
+					shift = blockCount * ordValue(getValue(x,pos));
+
+					// computing first the top most block
+					X = (fSilencer & forwardBitMask[shift + fStartBlock]) | VN[fStartBlock];
+			
+					temp = VP[fStartBlock] + (X & VP[fStartBlock]);
+					carryD0 = temp < VP[fStartBlock];
+					
+					D0 = (temp ^ VP[fStartBlock]) | X;
+					HN = VP[fStartBlock] & D0;
+					HP = VN[fStartBlock] | ~(VP[fStartBlock] | D0);
+					
+					X = (HP << 1) | (1 << fOffSet);
+					carryHP = HP >> (BLOCK_SIZE - 1);
+					
+					VN[fStartBlock] = X & D0;
+
+					temp = (HN << 1);
+					carryHN = HN >> (BLOCK_SIZE - 1);
+										
+		 			VP[fStartBlock] = temp | ~(X | D0);
+
+					// compute the remaining blocks
+					for (currentBlock = fStartBlock + 1; currentBlock <= fEndBlock; currentBlock++) {
+						X = forwardBitMask[shift + currentBlock] | VN[currentBlock];
+				
+						temp = VP[currentBlock] + (X & VP[currentBlock]) + carryD0;
+						
+						carryD0 = ((carryD0) ? temp <= VP[currentBlock] : temp < VP[currentBlock]);
+					
+						D0 = (temp ^ VP[currentBlock]) | X;
+						HN = VP[currentBlock] & D0;
+						HP = VN[currentBlock] | ~(VP[currentBlock] | D0);
+						
+						X = (HP << 1) | carryHP;
+						carryHP = HP >> (BLOCK_SIZE-1);
+						
+						VN[currentBlock] = X & D0;
+
+						temp = (HN << 1) | carryHN;
+						carryHN = HN >> (BLOCK_SIZE - 1);
+											
+		 				VP[currentBlock] = temp | ~(X | D0);
+					}
+					
+					/* update score */
+					if (HP & fScoreMask)
+						score--;
+					else if (HN & fScoreMask)
+						score++;
+
+					c_score[pos + 1] = score;
+
+					++pos;
+				}
+
+			} /* end - long patten */
+			/* compute with myers - forward - end */
+			
+			/* compute blocks and score masks */
+			int rStartBlock = (len_y - _end2(target)) / BLOCK_SIZE;
+			int rEndBlock = (len_y - mid - 1) / BLOCK_SIZE;
+			int rSpannedBlocks = (rEndBlock - rStartBlock) + 1;
+
+			unsigned int rScoreMask = 1 <<  ((len_y - mid - 1) % BLOCK_SIZE);
+			unsigned int rOffSet = (len_y - _end2(target)) % BLOCK_SIZE;
+			unsigned int rSilencer = ~0;
+			rSilencer <<= rOffSet;
+
+			/* reset v-bitvectors */
+			arrayFill (VP + rStartBlock, VP + rEndBlock + 1, ~0);
+			arrayFill (VN + rStartBlock, VN + rEndBlock + 1, 0);
+
+			/* determine start-position and start-score */
+			pos = _end1(target)-1;			
+			score = (_end2(target) - mid) * score_gap;
+
+			/* set start score */
+			c_score[_end1(target)] += score;
+
+			/* determine optimal cut position -- score extension */
+			TScoreValue max = c_score[_end1(target)];
+			TScoreValue rmax = score;
+			unsigned int pos_max = _end1(target);
+
+			/* compute with myers - reverse - begin */
+			if(rSpannedBlocks == 1)
+			{
+SEQAN_CHECKPOINT
+
+				while (pos >= _begin1(target)) {
+					X = (rSilencer & reverseBitMask[(blockCount * ordValue(getValue(x,pos))) + rStartBlock]) | VN[rStartBlock];
+
+					D0 = ((VP[rStartBlock] + (X & VP[rStartBlock])) ^ VP[rStartBlock]) | X;
+					HN = VP[rStartBlock] & D0;
+					HP = VN[rStartBlock] | ~(VP[rStartBlock] | D0);
+
+					X = (HP << 1) | (1 << rOffSet);
+					VN[rStartBlock] = X & D0;
+					VP[rStartBlock] = (HN << 1) | ~(X | D0);
+
+					if (HP & rScoreMask)
+						--score;
+					else if (HN & rScoreMask)
+						++score;
+
+					c_score[pos] += score;
+
+					/* check for optimality -- score extension */
+					if(c_score[pos]> max)
+					{
+						pos_max = pos;
+						max = c_score[pos];
+						rmax =  score;
+					}
+
+					--pos;
+				}
+			} /* end - short pattern */
+			else
+			{
+SEQAN_CHECKPOINT
+				int shift, currentBlock;
+				unsigned int temp, carryD0, carryHP, carryHN;
+
+				while (pos >= _begin1(target))
+				{
+					carryD0 = carryHP = carryHN = 0;
+					shift = blockCount * ordValue(getValue(x,pos));
+
+					// compute first the top most block
+					X = (rSilencer & reverseBitMask[shift + rStartBlock]) | VN[rStartBlock];
+			
+					temp = VP[rStartBlock] + (X & VP[rStartBlock]);
+					carryD0 = temp < VP[rStartBlock];
+					
+					D0 = (temp ^ VP[rStartBlock]) | X;
+					HN = VP[rStartBlock] & D0;
+					HP = VN[rStartBlock] | ~(VP[rStartBlock] | D0);
+					
+					X = (HP << 1) | (1 << rOffSet);
+					carryHP = HP >> (BLOCK_SIZE - 1);
+					
+					VN[rStartBlock] = X & D0;
+
+					temp = (HN << 1);
+					carryHN = HN >> (BLOCK_SIZE - 1);
+										
+		 			VP[rStartBlock] = temp | ~(X | D0);
+
+					// compute the remaining blocks
+					for (currentBlock = rStartBlock + 1; currentBlock <= rEndBlock; currentBlock++) {
+						X = reverseBitMask[shift + currentBlock] | VN[currentBlock];
+				
+						temp = VP[currentBlock] + (X & VP[currentBlock]) + carryD0;
+						
+						carryD0 = ((carryD0) ? temp <= VP[currentBlock] : temp < VP[currentBlock]);
+					
+						D0 = (temp ^ VP[currentBlock]) | X;
+						HN = VP[currentBlock] & D0;
+						HP = VN[currentBlock] | ~(VP[currentBlock] | D0);
+						
+						X = (HP << 1) | carryHP;
+						carryHP = HP >> (BLOCK_SIZE-1);
+						
+						VN[currentBlock] = X & D0;
+
+						temp = (HN << 1) | carryHN;
+						carryHN = HN >> (BLOCK_SIZE - 1);
+											
+		 				VP[currentBlock] = temp | ~(X | D0);
+					}
+
+					if (HP & rScoreMask)
+						--score;
+					else if (HN & rScoreMask)
+						++score;
+
+					c_score[pos] += score;
+					
+					/* check for optimality -- score extension*/
+					if(c_score[pos] > max)
+					{
+						pos_max = pos;
+						max = c_score[pos];
+						rmax = score;
+					}
+					
+					--pos;
+				}
+
+			}  /* end - long pattern */			
+			/* compute with myers - reverse - end */
+
+			// if computed the whole matrix max = alignment score
+			if(target == hs_complete)
+				total_score = max;
+
+#ifdef MYERS_HIRSCHBERG_VERBOSE
+			printf("Optimal cut is at %i and %i with forward score %i and reverse score %i\n\n",mid,pos_max,(max - rmax),rmax);
+#endif
+			/* push the two computed parts of the dp-matrix on process stack */
+			to_process.push(_HirschbergSet(pos_max,_end1(target),mid,_end2(target),rmax));
+			to_process.push(_HirschbergSet(_begin1(target),pos_max,_begin2(target),mid,max - rmax));
+
+		}
+		/* END CUT */
+	}
+	
+	/* clean up */
+	deallocate(align_, forwardBitMask, alphabetSize * blockCount);
+	deallocate(align_, reverseBitMask, alphabetSize * blockCount);
+
+	deallocate(align_, VP, blockCount);
+	deallocate(align_, VN, blockCount);
+
+	return total_score;
+}
+
+} // end namespace
+#endif // end ifndef
diff --git a/src/SeqAn-1.3/seqan/align/align_trace.h b/src/SeqAn-1.3/seqan/align/align_trace.h
new file mode 100644
index 0000000..0d9db68
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/align_trace.h
@@ -0,0 +1,424 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_ALIGN_TRACE_H
+#define SEQAN_HEADER_ALIGN_TRACE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//??? DIESER CODE IST NOCH UNGETESTET
+
+//////////////////////////////////////////////////////////////////////////////
+// AlignTrace
+
+template <typename TSize = size_t, typename TSpec = void>
+struct AlignTrace
+{
+	String<TSize> data_lengths;
+	String<TSize> data_factors;
+	String<unsigned int> data_dat;
+	unsigned int data_bits_per_entry;
+	unsigned int data_entries_per_word; //entries per word, or words per entry
+	bool data_has_few_bits_per_entry;
+	unsigned char data_max_sub_position;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec>
+struct Size< AlignTrace<TSize, TSpec> >
+{
+	typedef TSize Type;
+};
+
+//____________________________________________________________________________
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec>
+inline unsigned int
+dimension(AlignTrace<TSize, TSpec> & me)
+{
+	return length(me.data_lengths);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec>
+inline unsigned int
+setDimension(AlignTrace<TSize, TSpec> & me,
+			 unsigned int _dim)
+{
+	return resize(me.data_lengths, _dim);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec>
+inline TSize
+length(AlignTrace<TSize, TSpec> const & me,
+	   TSize _dim)
+{
+	return me.data_lengths[_dim];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec>
+inline void
+setLength(AlignTrace<TSize, TSpec> & me,
+		  unsigned int _dim,
+		  TSize _length)
+{
+	me.data_lengths[_dim] = _length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec>
+inline unsigned int
+_getBitsPerEntry(AlignTrace<TSize, TSpec> & me)
+{
+	return length(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec>
+inline void
+_initMembers(AlignTrace<TSize, TSpec> & me)
+{
+	SEQAN_ASSERT(dimension(me) >= 1);
+
+	unsigned int bits_per_word = BitsPerValue<unsigned int>::VALUE;
+
+	me.data_bits_per_entry = _computeBitsPerEntry(me);
+	me.data_has_few_bits_per_entry = (me.data_bits_per_entry <= bits_per_word);
+
+	unsigned int i;
+	TSize _size;
+	if (me.data_has_few_bits_per_entry)
+	{
+		me.data_entries_per_word = bits_per_word / me.data_bits_per_entry;
+		_size = length(me, 0) / me.data_entries_per_word;
+		if (_size < 1) _size = 1;
+		me.data_max_sub_position = (me.data_entries_per_word - 1) * me.data_bits_per_entry;
+	}
+	else
+	{
+		me.data_entries_per_word = (me.data_bits_per_entry + bits_per_word - 1) / bits_per_word;
+		_size = length(me, 0) * me.data_entries_per_word;
+	}
+
+	resize(me.data_factors, dimension(me));
+
+	me.data_factors[0] = 1; //actually, this is not needed
+
+	unsigned int i = 1;
+	for (i = 1; i < dimension(me); ++i)
+	{
+		me.data_factors[i] = _size;
+		_size *= length(me, i);
+	}
+
+	resize(me.data_dat, _size);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec, typename TCoordinates>
+inline void
+_coordinatesToPositions(AlignTrace<TSize, TSpec> & me,
+						TCoordinates const & coordinates_,
+						TSize & position_,
+						unsigned char & bit_position)
+{
+	for (unsigned int i=dimension(me)-1; i > 0; --i)
+	{
+		pos_ += me.data_factor[i] * coordinates[i];
+	}
+	pos_ += coordinates[0];
+
+	if (me.data_has_few_bits_per_entry)
+	{
+		position_ = pos_ / me.data_entries_per_word;
+		bit_position = me.data_bits_per_entry *(pos_ - position * me.data_entries_per_word);
+	}
+	else
+	{
+		position_ = pos_ * me.data_entries_per_word;
+		bit_position = 0;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec, typename TCoordinates>
+inline void
+_positionsToCoordinates(AlignTrace<TSize, TSpec> & me,
+						TCoordinates & coordinates_,
+						TSize position_,
+						unsigned char bit_position = 0)
+{
+	if (me.data_has_few_bits_per_entry)
+	{
+		position_ *= me.data_entries_per_word;
+		position_ += bit_position / me.data_bits_per_entry;
+	}
+	else
+	{
+		position_ /= me.data_entries_per_word;
+	}
+	for (unsigned int i = dimension(me)-1; i > 0; --i)
+	{
+		TSize factor_ = me.data_factors[i];
+		TSize coor_ = position_ / factor_;
+		_coordinates[i] = _coor;
+		position_ -= _coor * _factor;
+	}
+
+	dimension_[0] = position_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, TSpec>
+struct Value< AlignTrace<TSize, TSpec> >
+{
+	typedef bool Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+//???verschieben
+template <typename T>
+struct Navigator;
+
+template <typename TSize, typename TSpec>
+struct Navigator< AlignTrace<TSize, TSpec> >
+{
+	typedef Navi< AlignTrace<TSize, TSpec>, void> Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Navigator
+//////////////////////////////////////////////////////////////////////////////
+
+//???verschieben
+template <typename TContainer, typename TSpec>
+struct Navi;
+
+template <typename TSize, typename TSpec, typename TSpec2>
+struct Navi< AlignTrace<TSize, TSpec>, TSpec2>
+{
+	typedef AlignTrace<TSize, TSpec> TContainer;
+	TContainer & data_container;
+	TSize data_position;
+	unsigned char data_bit_position;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+//???verschieben
+template <typename TContainer, typename TSpec>
+inline TContainer &
+container(Navi<TContainer, TSpec> & me)
+{
+	return me.data_container;
+}
+template <typename TContainer, typename TSpec>
+inline TContainer const &
+container(Navi<TContainer, TSpec> const & me)
+{
+	return me.data_container;
+}
+template <typename TContainer, typename TSpec>
+inline void
+setContainer(Navi<TContainer, TSpec> & me,
+			 TContainer & container_)
+{
+	me.data_container = container_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec, typename TSpec2>
+inline bool
+getBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me)
+{
+	return (me.data_dat[me.data_position] >> me.data_bit_position) & 1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec, typename TSpec2>
+inline void
+setBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me)
+{
+	me.data_dat[me.data_position] |= (1 << me.data_bit_position);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec, typename TSpec2>
+inline void
+clearBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me)
+{
+	me.data_dat[me.data_position] &= ~(1 << me.data_bit_position);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec, typename TSpec2>
+inline void
+goNext(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me,
+	   unsigned int dimension_)
+{
+	if (dimension_)
+	{
+		me.data_position += me.data_factor[dimension_];
+	}
+	else
+	{
+		if (me.data_container.data_has_few_bits_per_entry)
+		{
+			me.data_bit_position += me.data_container.data_bits_per_entry;
+			if (me.data_bit_position >= BitsPerValue<unsigned int>::VALUE)
+			{
+				me.data_bit_position = 0;
+				++me.data_position;
+			}
+		}
+		else
+		{
+			me.data_position += me.data_container.data_entries_per_word;
+		}
+	}	
+}
+
+//____________________________________________________________________________
+
+template <typename TSize, typename TSpec, typename TSpec2>
+inline Navi< AlignTrace<TSize, TSpec>, TSpec2> const &
+operator ++ (Navi< AlignTrace<TSize, TSpec>, TSpec2> & me)
+{
+	goNext(me);
+}
+
+//todo??? postfix
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec, typename TSpec2>
+inline void
+goPrevious(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me,
+		   unsigned int dimension_)
+{
+	if (dimension_)
+	{
+		me.data_position -= me.data_factor[dimension_];
+	}
+	else
+	{
+		if (me.data_container.data_has_few_bits_per_entry)
+		{
+			me.data_bit_position -= me.data_container.data_bits_per_entry;
+			if (me.data_bit_position > BitsPerValue<unsigned int>::VALUE)
+			{
+				me.data_bit_position = me.data_container.data_max_sub_position;
+				--me.data_position;
+			}
+		}
+		else
+		{
+			me.data_position -= me.data_container.data_entries_per_word;
+		}
+	}	
+}
+
+//____________________________________________________________________________
+
+template <typename TSize, typename TSpec, typename TSpec2>
+inline Navi< AlignTrace<TSize, TSpec>, TSpec2> const &
+operator -- (Navi< AlignTrace<TSize, TSpec>, TSpec2> & me)
+{
+	goPevious(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec, typename TSpec2>
+inline void
+moveNextBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me)
+{
+	if (me.data_bit_position >= BitsPerValue<unsigned int>::VALUE -1)
+	{
+		me.data_bit_position = 0;
+		++me.data_position;
+	}
+	else
+	{
+		++me.data_bit_position;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSpec, typename TSpec2>
+inline void
+movePreviousBit(Navi< AlignTrace<TSize, TSpec>, TSpec2 > & me)
+{
+	if (me.data_bit_position > 0)
+	{
+		--me.data_bit_position;
+	}
+	else
+	{
+		me.data_bit_position = BitsPerValue<unsigned int>::VALUE -1;
+		--me.data_position;
+	}
+}
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/gaps_array.h b/src/SeqAn-1.3/seqan/align/gaps_array.h
new file mode 100644
index 0000000..88af76e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/gaps_array.h
@@ -0,0 +1,1184 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GAPS_ARRAY_H
+#define SEQAN_HEADER_GAPS_ARRAY_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Tag
+
+struct ArrayGaps;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Gaps - ArrayGaps Spec
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.ArrayGaps:
+..cat:Alignments
+..general:Class.Gaps
+..summary:Stores gaps sizes in an array.
+..signature:Gaps<TSource, ArrayGaps >
+..param.TSource:Type of the ungapped sequence.
+...metafunction:Metafunction.Source
+..include:seqan/align.h
+*/
+template <typename TSource>
+class Gaps<TSource, ArrayGaps>
+{
+public:
+	typedef typename Size<Gaps>::Type TSize;
+	typedef String<TSize> TArr;
+	typedef typename Position<TSource>::Type TSourcePosition;
+	typedef typename Position<Gaps>::Type TViewPosition;
+
+public:
+	String<TSize> data_arr; //a list of gap and non-gap region lengths
+	TViewPosition data_end_position;
+	TViewPosition data_unclipped_end_position;
+
+	Holder<TSource> data_source;
+	TSourcePosition clipped_source_begin;
+	TSourcePosition clipped_source_end;
+
+public:
+	Gaps():
+		data_unclipped_end_position(0),
+		clipped_source_begin(0),
+		clipped_source_end(0)
+	{
+SEQAN_CHECKPOINT
+	}
+	Gaps(TSize _size):
+		data_unclipped_end_position(0),
+		clipped_source_begin(0),
+		clipped_source_end(0)
+	{
+		_initToResize(*this, _size);
+	}
+	Gaps(TSource & source_):
+		data_unclipped_end_position(0),
+		data_source(source_),
+		clipped_source_begin(beginPosition(source_)),
+		clipped_source_end(endPosition(source_))
+	{
+SEQAN_CHECKPOINT
+		_initToResize(*this, length(source_));
+	}
+
+	template <typename TSource2>
+	Gaps(TSource2 const & source_):
+		data_unclipped_end_position(0),
+		clipped_source_begin(0),
+		clipped_source_end(length(source_))
+		//clipped_source_begin(beginPosition(source_)),
+		//clipped_source_end(endPosition(source_))
+	{
+SEQAN_CHECKPOINT
+		data_source = source_;
+		_initToResize(*this, length(source_));
+	}
+
+	Gaps(Gaps const & other_):
+		data_arr(other_.data_arr),
+		data_end_position(other_.data_end_position),
+		data_unclipped_end_position(other_.data_unclipped_end_position),
+//		data_source(value(other_.data_source)), //variant: setValue => Align benutzen gemeinsame Sources
+		data_source(other_.data_source),		//variant: assignValue => Align kopieren Sources
+		clipped_source_begin(other_.clipped_source_begin),
+		clipped_source_end(other_.clipped_source_end)
+	{
+SEQAN_CHECKPOINT
+	}
+	Gaps & operator = (Gaps const & other_)
+	{
+SEQAN_CHECKPOINT
+		data_arr = other_.data_arr;
+		data_end_position = other_.data_end_position;
+		data_unclipped_end_position = other_.data_unclipped_end_position,
+		setValue(data_source, source(other_));
+		clipped_source_begin = other_.clipped_source_begin;
+		clipped_source_end = other_.clipped_source_end; 
+		return *this;
+	}
+
+	~Gaps()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	inline typename Reference<Gaps>::Type
+	operator[](TViewPosition view_pos)
+	{
+SEQAN_CHECKPOINT
+		return value(*this, view_pos);
+	}
+	inline typename Reference<Gaps const>::Type
+	operator[](TViewPosition view_pos) const
+	{
+SEQAN_CHECKPOINT
+		return value(*this, view_pos);
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline String<typename Size<Gaps<TSource, ArrayGaps> >::Type> &
+_dataArr(Gaps<TSource, ArrayGaps> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_arr;
+}
+template <typename TSource>
+inline String<typename Size<Gaps<TSource, ArrayGaps> >::Type> const &
+_dataArr(Gaps<TSource, ArrayGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_arr;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline Holder<TSource> &
+_dataSource(Gaps<TSource, ArrayGaps> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_source;
+}
+template <typename TSource>
+inline Holder<TSource> const &
+_dataSource(Gaps<TSource, ArrayGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline typename Position<Gaps<TSource, ArrayGaps> >::Type
+endPosition(Gaps<TSource, ArrayGaps> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_end_position;
+}
+template <typename TSource>
+inline typename Position<Gaps<TSource, ArrayGaps> >::Type
+endPosition(Gaps<TSource, ArrayGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_end_position;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline typename Position<Gaps<TSource, ArrayGaps> >::Type
+_getTrailingGaps(Gaps<TSource, ArrayGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_unclipped_end_position;
+}
+
+template <typename TSource, typename TSize>
+inline void
+_setTrailingGaps(Gaps<TSource, ArrayGaps> & me, TSize const & size)
+{
+	TSize zero = 0;
+	if (size >= zero)
+	{
+		me.data_unclipped_end_position = size;
+	}
+	else
+	{
+		me.data_unclipped_end_position = 0;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+ * Returns the length of the gaps sequence including the trailing gaps
+ */
+template <typename TSource>
+inline typename Position<Gaps<TSource, ArrayGaps> >::Type
+_unclippedLength(Gaps<TSource, ArrayGaps> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_end_position + me.data_unclipped_end_position;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TPosition>
+inline void 
+_setEndPosition(Gaps<TSource, ArrayGaps> & me, TPosition _pos)
+{
+SEQAN_CHECKPOINT
+	me.data_end_position = _pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.clippedBeginPosition:
+..summary:Begin position of the source segment.
+..cat:Alignments
+..signature:clippedBeginPosition(object)
+..param.object:An object that has a source
+...type:Class.Gaps
+..returns:The position of the first item in @Function.source.source(object)@ that is used in object.
+..see:Function.begin
+..see:Function.source
+..see:Function.clippedEndPosition
+..include:seqan/align.h
+*/
+template <typename TSource>
+inline typename Position<TSource>::Type
+clippedBeginPosition(Gaps<TSource, ArrayGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.clipped_source_begin;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSourcePosition>
+inline void
+_setClippedBeginPosition(Gaps<TSource, ArrayGaps> & me, TSourcePosition _pos)
+{
+SEQAN_CHECKPOINT
+	me.clipped_source_begin = _pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.clippedEndPosition:
+..summary:Position of the end of the source segment.
+..cat:Alignments
+..signature:clippedEndPosition(object)
+..param.object:An object that has a source
+...type:Class.Gaps
+..returns:The position behind the last element of the source segment.
+..see:Function.end
+..see:Function.sourceEnd
+..see:Function.clippedBeginPosition
+..include:seqan/align.h
+*/
+template <typename TSource>
+inline typename Position<TSource>::Type
+clippedEndPosition(Gaps<TSource, ArrayGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.clipped_source_end;
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSourcePosition>
+inline void
+_setClippedEndPosition(Gaps<TSource, ArrayGaps> & me, TSourcePosition _pos)
+{
+SEQAN_CHECKPOINT
+	me.clipped_source_end = _pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSize>
+inline void
+_initToResize(Gaps<TSource, ArrayGaps> & me,
+				TSize _size)
+{
+SEQAN_CHECKPOINT
+	resize(_dataArr(me), 2);
+	_dataArr(me)[0] = 0;
+	_dataArr(me)[1] = _size;
+	_setEndPosition(me, _size);
+	_setTrailingGaps(me, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline void
+clearGaps(Gaps<TSource, ArrayGaps> & me)
+{
+SEQAN_CHECKPOINT
+	_initToResize(me, clippedEndPosition(me) - clippedBeginPosition(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline void
+clear(Gaps<TSource, ArrayGaps> & me)
+{
+SEQAN_CHECKPOINT
+	_initToResize(me, 0);
+	_setClippedBeginPosition(me, 0);
+	_setClippedEndPosition(me, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline void
+clearClipping(Gaps<TSource, ArrayGaps> & me)
+{
+SEQAN_CHECKPOINT
+	_setEndPosition(me, length(source(me)));
+	_setTrailingGaps(me, 0);
+	_setClippedBeginPosition(me, 0);
+	_setClippedEndPosition(me, length(source(me)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.toViewPosition:
+..summary:Transforms source to view position.
+..cat:Alignments
+..signature:toViewPosition(gaps, pos)
+..param.gap:A Gaps object, e.g. a row in the alignment.
+...type:Class.Gaps
+..param.pos:Position in the original sequence to get the view position for.
+..returns:The position in the view/gaps position.
+..remarks:If $gap$ is a clipped alignment row, gaps in the clipped part will influence the result. The position $pos$ is counted from the unclipped begin position and must be greater or equal the clipped begin position of $gap$.
+..see:Function.toSourcePosition
+..include:seqan/align.h
+*/
+template <typename TSource>
+inline typename Position< Gaps<TSource, ArrayGaps> >::Type
+toViewPosition(Gaps<TSource, ArrayGaps> const & gaps,
+			   typename Position<TSource>::Type pos)
+{
+SEQAN_CHECKPOINT
+
+	SEQAN_ASSERT_GEQ(pos, clippedBeginPosition(gaps));
+	pos -= clippedBeginPosition(gaps);
+
+	typedef Gaps<TSource, ArrayGaps> const TGaps;
+	typedef typename Size<TGaps>::Type TSize;
+	typedef String<TSize> const TArr;
+
+	typename Iterator<TArr, Standard>::Type arr_begin = begin(_dataArr(gaps));
+	typename Iterator<TArr, Standard>::Type arr_end = end(_dataArr(gaps));
+	typename Position<TGaps>::Type view_pos = pos;
+	typename Position<TSource>::Type source_pos = pos;
+	
+	while (true)
+	{
+		if (arr_begin == arr_end) return view_pos;
+		TSize step = *arr_begin;
+		view_pos += step;
+	    
+		++arr_begin;
+	    
+		step = *arr_begin;
+		if (source_pos < step) return view_pos;
+		source_pos -= step;
+	    
+		++arr_begin;
+	}
+}
+
+//____________________________________________________________________________
+
+/**
+.Function.toSourcePosition:
+..summary:Transforms view to source position, if the view position is a gap, the original position of the next non-gap entry is returned.
+..cat:Alignments
+..signature:toSourcePosition(gaps, pos)
+..param.gap:A Gaps object, e.g. a row in the alignment.
+...type:Class.Gaps
+..param.pos:Position in the view sequence (this includes gaps) to get the original position for.
+..returns:The position in the source sequence.
+..remarks:If $gap$ is a clipped alignment row, gaps in the clipped part will influence the result. The position $pos$ is counted from the unclipped begin position.
+..see:Function.toViewPosition
+..include:seqan/align.h
+*/
+template <typename TSource>
+inline typename Position<TSource>::Type
+toSourcePosition(Gaps<TSource, ArrayGaps> const & gaps,
+				 typename Position< Gaps<TSource, ArrayGaps> >::Type pos)
+{
+SEQAN_CHECKPOINT
+	typedef Gaps<TSource, ArrayGaps> const TGaps;
+	typedef typename Size<TGaps>::Type TSize;
+	typedef String<TSize> const TArr;
+
+	typename Iterator<TArr, Standard>::Type arr_begin = begin(_dataArr(gaps));
+	typename Iterator<TArr, Standard>::Type arr_end = end(_dataArr(gaps));
+	typename Position<TSource>::Type source_pos = clippedBeginPosition(gaps);
+	typename Position<TGaps>::Type view_pos = pos;
+	
+	while (true)
+	{
+		if (arr_begin == arr_end) return source_pos;
+
+		TSize step = *arr_begin;
+		if (view_pos <= step) return source_pos;
+		view_pos -= step;
+	    
+		++arr_begin;
+		step = *arr_begin;
+		if (view_pos <= step ) return source_pos + view_pos;
+		source_pos += step;
+		view_pos -= step;
+	    
+		++arr_begin;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// returns an iterator to view-Position 
+
+template <typename TGaps, typename TPosition>
+inline typename Iterator<TGaps, Standard>::Type
+_iteratorGapsArray(TGaps & gaps, 
+					 TPosition view_position)
+{
+	typedef typename Size<TGaps>::Type TSize;
+	typedef typename TGaps::TArr const TArr;
+	typedef typename Source<TGaps>::Type TSource;
+	typedef typename Iterator<TArr, Standard>::Type TArrIterator;
+	typedef typename Value<TArrIterator>::Type TArrIteratorType;
+
+ 	TArrIterator arr_begin = begin(_dataArr(gaps), Standard());
+	TArrIterator arr_end = end(_dataArr(gaps), Standard());
+	typename Position<TGaps>::Type block = 0;
+
+	TArrIteratorType view_pos = view_position;
+
+	if (emptySource(gaps))
+	{
+		for (; arr_begin != arr_end; ++arr_begin)
+		{
+			if (view_pos < *arr_begin) break;
+			++block;
+			view_pos -= *arr_begin;
+		}
+		return typename Iterator<TGaps, Standard>::Type(
+			gaps, 
+			block, 
+			view_pos);
+	}
+	else
+	{
+		typename Position<TSource>::Type source_pos = clippedBeginPosition(gaps);
+
+		while (true)
+		{
+			if ((arr_begin == arr_end) || (view_pos < *arr_begin))
+			{
+				break;
+			}
+			++block;
+			view_pos -= *arr_begin;
+			++arr_begin;
+
+			if (view_pos < *arr_begin)
+			{
+				source_pos += view_pos;
+				break;
+			}
+			++block;
+			view_pos -= *arr_begin;
+			source_pos += *arr_begin;
+			++arr_begin;
+		}
+
+		return typename Iterator<TGaps, Standard>::Type(
+			gaps,
+            iter(source(gaps), source_pos),
+			block, 
+			view_pos);
+	}
+
+}
+
+template <typename TSource, typename TPosition, typename TTag>
+inline typename Iterator<Gaps<TSource, ArrayGaps>, Tag<TTag> const>::Type
+iter(Gaps<TSource, ArrayGaps> & gaps,
+	 TPosition view_pos,
+	 Tag<TTag> const)
+{
+SEQAN_CHECKPOINT
+	return _iteratorGapsArray(gaps, view_pos);
+}
+template <typename TSource, typename TPosition, typename TTag>
+inline typename Iterator<Gaps<TSource, ArrayGaps> const, Tag<TTag> const>::Type
+iter(Gaps<TSource, ArrayGaps> const & gaps,
+	 TPosition view_pos,
+	 Tag<TTag> const)
+{
+SEQAN_CHECKPOINT
+	return _iteratorGapsArray<Gaps<TSource, ArrayGaps> const>(gaps, view_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline typename Position< Gaps<TSource, ArrayGaps> >::Type
+beginPosition(Gaps<TSource, ArrayGaps> & gaps)
+{
+SEQAN_CHECKPOINT
+	return value(_dataArr(gaps), 0);
+}
+template <typename TSource>
+inline typename Position< Gaps<TSource, ArrayGaps> const>::Type
+beginPosition(Gaps<TSource, ArrayGaps> const & gaps)
+{
+SEQAN_CHECKPOINT
+	return value(_dataArr(gaps), 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TSource, typename TPosition>
+inline void
+setBeginPosition(Gaps<TSource, ArrayGaps> & me,
+				 TPosition view_position)
+{
+SEQAN_CHECKPOINT
+	TPosition old_pos = beginPosition(me);
+	if (length(_dataArr(me)) == 0)
+	{
+		_initToResize(me, length(source(me)));
+	}
+	_dataArr(me)[0] = view_position;
+	_setEndPosition(me, endPosition(me) + view_position - old_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TPosition>
+inline void
+setClippedBeginPosition(Gaps<TSource, ArrayGaps> & me,
+					   TPosition source_position)
+{
+	SEQAN_ASSERT(length(_dataArr(me)))
+
+	typedef Gaps<TSource, ArrayGaps> TGaps;
+	typedef typename Position<TGaps>::Type TViewPosition;
+	typedef typename TGaps::TArr TArr;
+
+	TPosition old_clipped_begin_pos = clippedBeginPosition(me);
+	if (old_clipped_begin_pos == source_position) return;
+	else if (source_position < old_clipped_begin_pos)
+	{
+SEQAN_CHECKPOINT
+		TViewPosition delta = old_clipped_begin_pos - source_position;
+		TViewPosition view_begin_pos = beginPosition(me);
+		if (view_begin_pos <= delta)
+		{
+			setBeginPosition(me, 0);
+		}
+		else
+		{
+			setBeginPosition(me, view_begin_pos - delta);
+		}
+		_setEndPosition(me, endPosition(me) + delta);
+		_dataArr(me)[1] += delta;
+		_setClippedBeginPosition(me, source_position);
+	}
+	else //(source_position > old_clipped_begin_pos)
+	{
+SEQAN_CHECKPOINT
+		TViewPosition view_pos = toViewPosition(me, source_position);
+		TViewPosition source_pos_left = source_position - old_clipped_begin_pos;
+		TViewPosition gaps_count = 0;
+
+		typename Iterator<TArr, Standard>::Type it_arr_begin = begin(_dataArr(me));
+		typename Iterator<TArr, Standard>::Type it_arr_end = end(_dataArr(me));
+		typename Iterator<TArr, Standard>::Type it_arr = it_arr_begin;
+
+		while (it_arr != it_arr_end)
+		{
+			gaps_count += *it_arr;
+			++it_arr;
+			if (*it_arr > source_pos_left) 
+			{
+				*it_arr_begin = view_pos;
+				*it_arr -= source_pos_left;
+				if (it_arr - it_arr_begin > 1)
+				{
+					replace(_dataArr(me), 1, it_arr - it_arr_begin, "");
+				}
+				_setClippedBeginPosition(me, source_position);
+				return;
+			}
+			gaps_count += *it_arr;
+			source_pos_left -= *it_arr;
+			++it_arr;
+		}
+		//alignment is empty
+		clear(me);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TPosition>
+inline void
+setClippedEndPosition(Gaps<TSource, ArrayGaps> & me,
+					 TPosition source_position)
+{
+	typedef Gaps<TSource, ArrayGaps> TGaps;
+	typedef typename Position<TGaps>::Type TViewPosition;
+	typedef typename TGaps::TArr TArr;
+
+	TArr arr = _dataArr(me);
+	SEQAN_ASSERT(length(arr));
+
+	TPosition old_end_begin_pos = clippedEndPosition(me);
+	if (old_end_begin_pos == source_position) return;
+	else if (source_position < old_end_begin_pos)
+	{
+SEQAN_CHECKPOINT
+		typename Iterator<TArr, Standard>::Type it_arr_begin = begin(_dataArr(me));
+		typename Iterator<TArr, Standard>::Type it_arr_end = end(_dataArr(me));
+		typename Iterator<TArr, Standard>::Type it_arr = it_arr_begin;
+		TViewPosition end_pos = 0;
+		TViewPosition chars_to_scan = source_position - clippedBeginPosition(me);
+
+		while (it_arr != it_arr_end)
+		{
+			end_pos += *it_arr;
+			++it_arr;
+			if (*it_arr >= chars_to_scan)
+			{
+				resize(_dataArr(me), it_arr - it_arr_begin + 1);
+				*it_arr = chars_to_scan;
+				_setEndPosition(me, end_pos + chars_to_scan);
+				break;
+			}
+			end_pos += *it_arr;
+			chars_to_scan -= *it_arr;
+			++it_arr;
+		}
+	}
+	else //(source_position > old_end_begin_pos)
+	{
+SEQAN_CHECKPOINT
+		*(end(_dataArr(me)) - 1) += (source_position - old_end_begin_pos);
+		_setEndPosition(me, endPosition(me) + source_position - old_end_begin_pos);
+	}
+	_setClippedEndPosition(me, source_position);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline typename Size<TSource>::Type
+sourceLength(Gaps<TSource, ArrayGaps> & me)
+{
+SEQAN_CHECKPOINT
+	return clippedEndPosition(me) - clippedBeginPosition(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Gaps Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TGaps>
+class Iter<TGaps, GapsIterator<ArrayGaps> >
+{
+public:
+	typedef typename Size<TGaps>::Type TGapsSize;
+	typedef String<TGapsSize> TArr;
+	typedef typename Position<TArr>::Type TArrPosition;
+	typedef typename Source<Iter>::Type TSourceIterator;
+
+	TGaps * data_container;								//the gaps object
+	mutable TSourceIterator data_source;			
+	mutable TArrPosition data_block;					//block in array of container
+	mutable TGapsSize data_sub;							//position block
+
+public:
+	Iter() 
+	{
+SEQAN_CHECKPOINT
+	}
+	Iter(Iter const & other_):
+		data_container(other_.data_container),
+		data_source(other_.data_source),
+		data_block(other_.data_block),
+		data_sub(other_.data_sub)
+	{
+SEQAN_CHECKPOINT
+	}
+	Iter(TGaps & container_,
+			TSourceIterator source_iterator,
+			TArrPosition block_ = 0,
+			TGapsSize sub_ = 0):
+		data_container(&container_),
+		data_source(source_iterator),
+		data_block(block_),
+		data_sub(sub_)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter(TGaps & container_,
+			TArrPosition block_,
+			TGapsSize sub_ = 0):
+		data_container(&container_),
+		data_block(block_),
+		data_sub(sub_)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	~Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter const & operator = (Iter const & other_)
+	{
+SEQAN_CHECKPOINT
+		data_container = other_.data_container;
+		data_block = other_.data_block;
+		data_sub = other_.data_sub;
+		data_source = other_.data_source;
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps>
+inline typename GetValue< Iter<TGaps, GapsIterator<ArrayGaps> > >::Type
+getValue(Iter<TGaps, GapsIterator<ArrayGaps> > & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<Iter<TGaps, GapsIterator<ArrayGaps> > >::Type TValue;
+	if (isGap(me)) return gapValue<TValue>();
+	else return getValue(source(me));
+}
+template <typename TGaps>
+inline typename GetValue< Iter<TGaps, GapsIterator<ArrayGaps> > const>::Type
+getValue(Iter<TGaps, GapsIterator<ArrayGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<Iter<TGaps, GapsIterator<ArrayGaps> > const>::Type TValue;
+	if (isGap(me)) return gapValue<TValue>();
+	else return getValue(source(me));
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps>
+inline bool 
+isGap(Iter<TGaps, GapsIterator<ArrayGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	return !(me.data_block & 1);
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps>
+inline typename Size<TGaps>::Type
+countGaps(Iter<TGaps, GapsIterator<ArrayGaps> > const & me)
+{
+	if (isGap(me))
+	{
+		typedef typename Size<TGaps>::Type TGapsSize;
+		typedef String<TGapsSize> const TArr;
+
+		TArr & arr = _dataArr(container(me));
+		typename Position<TArr>::Type pos = me.data_block;
+		typename Position<TArr>::Type block_pos = me.data_sub;
+
+		if (length(arr) == pos)
+		{//counting trailing gaps
+			if (block_pos <= _getTrailingGaps(container(me)))
+			{//is in range of trailing gaps
+SEQAN_CHECKPOINT
+				return _getTrailingGaps(container(me)) - block_pos;
+			}
+			else
+			{//no trailing gaps here
+SEQAN_CHECKPOINT
+				return 0;
+			}
+		}
+		else
+		{
+SEQAN_CHECKPOINT
+			return arr[pos] - me.data_sub;
+		}
+	}
+	else
+	{
+SEQAN_CHECKPOINT
+		return 0;
+	}
+}
+
+template <typename TGaps>
+inline typename Size<TGaps>::Type
+countCharacters(Iter<TGaps, GapsIterator<ArrayGaps> > const & me)
+{
+	if (isGap(me))
+	{// only count chars
+SEQAN_CHECKPOINT
+		return 0;
+	}
+	else
+	{//count chars
+SEQAN_CHECKPOINT
+		typedef typename Size<TGaps>::Type TGapsSize;
+		typedef String<TGapsSize> const TArr;
+
+		TArr & arr = _dataArr(container(me));
+		typename Position<TArr>::Type pos = me.data_block;
+		typename Position<TArr>::Type block_pos = me.data_sub;
+
+		return arr[pos] - block_pos;
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename T>
+inline void 
+_goNextArrayGapsIterator(T const & me)
+{
+	if (!isGap(me))
+	{
+SEQAN_CHECKPOINT
+		goNext(me.data_source);
+	}
+
+	++me.data_sub;
+	if ((me.data_block < length(_dataArr(container(me)))) && (me.data_sub >= _dataArr(container(me))[me.data_block]))
+	{
+SEQAN_CHECKPOINT
+		++me.data_block;
+		me.data_sub = 0;
+	}
+}
+template <typename TGaps>
+inline void 
+goNext(Iter<TGaps, GapsIterator<ArrayGaps> > & me)
+{
+	_goNextArrayGapsIterator(me);
+}
+template <typename TGaps>
+inline void 
+goNext(Iter<TGaps, GapsIterator<ArrayGaps> > const & me)
+{
+	_goNextArrayGapsIterator(me);
+}
+
+//____________________________________________________________________________
+
+template <typename T>
+inline void 
+_goPreviousArrayGapsIterator(T const & me)
+{
+	if (me.data_sub > 0)
+	{
+SEQAN_CHECKPOINT
+		--me.data_sub;
+	}
+	else
+	{
+		if (me.data_block > 0)
+		{
+SEQAN_CHECKPOINT
+			--me.data_block;
+			me.data_sub = _dataArr(container(me))[me.data_block] - 1;
+		}
+	}
+	if (!isGap(me))
+	{
+SEQAN_CHECKPOINT
+		goPrevious(me.data_source);
+	}
+}
+template <typename TGaps>
+inline void 
+goPrevious(Iter<TGaps, GapsIterator<ArrayGaps> > & me)
+{
+	_goPreviousArrayGapsIterator(me);
+}
+template <typename TGaps>
+inline void 
+goPrevious(Iter<TGaps, GapsIterator<ArrayGaps> > const & me)
+{
+	_goPreviousArrayGapsIterator(me);
+}
+//____________________________________________________________________________
+
+template <typename TGaps>
+inline bool 
+atBegin(Iter<TGaps, GapsIterator<ArrayGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	return ((me.data_block == 1) && (me.data_sub == 0));
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps>
+inline bool 
+atEnd(Iter<TGaps, GapsIterator<ArrayGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	return ((me.data_block == length(_dataArr(container(me)))) && (me.data_sub == 0));
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TCount>
+inline void
+insertGaps(Iter<TGaps, GapsIterator<ArrayGaps> > const & me,
+		   TCount size)
+{
+	typedef typename Size<TGaps>::Type TGapsSize;
+	typedef String<TGapsSize> TArr;
+
+	TArr & arr = _dataArr(container(me));
+	typename Position<TArr>::Type pos = me.data_block;
+	typename Position<TArr>::Type block_pos = me.data_sub;
+	typename Iterator<TArr, Rooted>::Type it = iter(arr, pos);
+
+	if (isGap(me))
+	{
+		if (pos < length(arr))
+		{//here is a gap: expand it
+SEQAN_CHECKPOINT
+			value(it) += size;
+		}
+		else if (pos == length(arr))
+		{//gap at end: add trailing gaps
+			if (block_pos <= _getTrailingGaps(container(me)))
+			{
+SEQAN_CHECKPOINT
+				_setTrailingGaps(container(me), _getTrailingGaps(container(me)) + size);
+			}
+			return; // do not adjust right position
+		}
+	}
+	else
+	{
+		if (me.data_sub)
+		{//here is no gap: insert one
+SEQAN_CHECKPOINT
+			_clearSpace(arr, 2, pos + 1, pos + 1, Generous());
+
+			it = iter(arr, pos); //reload, since iterator could be invalid
+			it[2] = it[0] - me.data_sub;
+			it[0] = me.data_sub;
+			it[1] = size;
+
+			++me.data_block;
+			me.data_sub = 0;
+		}
+		else
+		{//insert gaps at begin of a char block
+SEQAN_CHECKPOINT
+			me.data_sub = arr[pos - 1];
+			arr[pos - 1] += size; //note: pos > 0 because this is a char block
+			--me.data_block;
+		}
+	}
+
+	//adjust right position
+	_setEndPosition(container(me), endPosition(container(me)) + size);
+}
+
+//____________________________________________________________________________
+
+//delete up to size gaps 
+	
+template <typename TGaps, typename TCount>
+inline void
+removeGaps(Iter<TGaps, GapsIterator<ArrayGaps> > const & me,
+		   TCount _size)
+{
+	typedef typename Size<TGaps>::Type TGapsSize;
+	typedef String<TGapsSize> TArr;
+
+	TGapsSize size = _size;
+
+	if (isGap(me))
+	{//here is a gap
+		TArr & arr = _dataArr(container(me));
+		if (me.data_block < length(arr))
+		{//not trailing gaps
+			typename Iterator<TArr, Standard>::Type it = iter(arr, me.data_block);
+
+			TGapsSize rest_size = *it - me.data_sub;
+
+			if (rest_size <= size)
+			{//remove rest of gap block
+				if (me.data_sub || !me.data_block)
+				{//keep this gap block
+SEQAN_CHECKPOINT
+					*it = me.data_sub;
+					++me.data_block;
+					me.data_sub = 0;
+				}
+				else
+				{//remove complete gap block, merge two char blocks
+SEQAN_CHECKPOINT
+					TGapsSize data_sub = *(it-1); //(note: this well defined, since "it" was not the first block)
+
+					*(it-1) += *(it+1);
+					replace(_dataArr(container(me)), me.data_block, me.data_block + 2, "");
+
+					--me.data_block;
+					me.data_sub = data_sub;
+				}
+				_setEndPosition(container(me), endPosition(container(me)) - rest_size);
+			}
+			else
+			{//remove a part of this block
+SEQAN_CHECKPOINT
+				*it -= size;
+				_setEndPosition(container(me), endPosition(container(me)) - size);
+			}
+		}
+		else if (me.data_block == length(arr))
+		{
+			if (me.data_sub <= _getTrailingGaps(container(me)))
+			{//remove trailing gaps
+				if (size > (_getTrailingGaps(container(me)) - me.data_sub))
+				{//remove more than exists
+SEQAN_CHECKPOINT
+					_setTrailingGaps(container(me), me.data_sub);
+				}
+				else
+				{//remove less or equal than exists
+SEQAN_CHECKPOINT
+					_setTrailingGaps(container(me), _getTrailingGaps(container(me)) - size);
+				}
+			}
+		}//else: trailing gaps: infinite gaps here - nothing to do
+	}
+	//else: here is no gap - nothing to do
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator == (Iter<TGaps1, GapsIterator<ArrayGaps> > & _left, 
+			 Iter<TGaps2, GapsIterator<ArrayGaps> > & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.data_block == _right.data_block) && (_left.data_sub == _right.data_sub);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator == (Iter<TGaps1, GapsIterator<ArrayGaps> > const & _left, 
+			 Iter<TGaps2, GapsIterator<ArrayGaps> > & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.data_block == _right.data_block) && (_left.data_sub == _right.data_sub);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator == (Iter<TGaps1, GapsIterator<ArrayGaps> > & _left, 
+			 Iter<TGaps2, GapsIterator<ArrayGaps> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.data_block == _right.data_block) && (_left.data_sub == _right.data_sub);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator == (Iter<TGaps1, GapsIterator<ArrayGaps> > const & _left, 
+			 Iter<TGaps2, GapsIterator<ArrayGaps> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.data_block == _right.data_block) && (_left.data_sub == _right.data_sub);
+}
+//____________________________________________________________________________
+
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator != (Iter<TGaps1, GapsIterator<ArrayGaps> > & _left, 
+			 Iter<TGaps2, GapsIterator<ArrayGaps> > & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.data_block != _right.data_block) || (_left.data_sub != _right.data_sub);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator != (Iter<TGaps1, GapsIterator<ArrayGaps> > const & _left, 
+			 Iter<TGaps2, GapsIterator<ArrayGaps> > & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.data_block != _right.data_block) || (_left.data_sub != _right.data_sub);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator != (Iter<TGaps1, GapsIterator<ArrayGaps> > & _left, 
+			 Iter<TGaps2, GapsIterator<ArrayGaps> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.data_block != _right.data_block) || (_left.data_sub != _right.data_sub);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator != (Iter<TGaps1, GapsIterator<ArrayGaps> > const & _left, 
+			 Iter<TGaps2, GapsIterator<ArrayGaps> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.data_block != _right.data_block) || (_left.data_sub != _right.data_sub);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/gaps_base.h b/src/SeqAn-1.3/seqan/align/gaps_base.h
new file mode 100644
index 0000000..9e94bd3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/gaps_base.h
@@ -0,0 +1,1335 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GAPS_BASE_H
+#define SEQAN_HEADER_GAPS_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**.Metafunction.GappedValueType:
+..summary:Returns a value type that contains a blank value '-'.
+..signature:GappedValueType<T>::Type
+..param.T:The value type that should be expanded (if needed) by '-'.
+..returns.param.Type:A value type that can be used to store store values in $T$ and the value '-'.
+*/
+
+template <typename T>
+struct GappedValueType
+{
+	typedef T Type;
+};
+
+template <typename TValue, typename TSpec>
+struct GappedValueType< SimpleType<TValue, TSpec> >
+{
+	typedef SimpleType<TValue, TSpec> THost_;
+	typedef ModifiedAlphabet<THost_, ModExpand<'-'> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename THost, typename TSpec>
+inline ModifiedAlphabet<THost, ModExpand<'-', TSpec> >
+gapValueImpl(ModifiedAlphabet<THost, ModExpand<'-', TSpec> > *)
+{
+SEQAN_CHECKPOINT
+	static ModifiedAlphabet<THost, ModExpand<'-', TSpec> > const _gap = '-';
+	return _gap;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Tags
+
+struct ArrayGaps;
+
+
+template <typename TSpec>
+struct GapsIterator;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Gaps
+//////////////////////////////////////////////////////////////////////////////
+// an instance of the Gaps class is a strictly increasing function
+// between N_0 and N_0
+
+/**
+.Class.Gaps:
+..cat:Alignments
+..cat:Sequences
+..summary:Stores the gaps in a gapped sequences.
+..signature:Gaps<TSource, TSpec>
+..param.TSource:Type of the ungapped sequence.
+...metafunction:Metafunction.Source
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+..remarks:The gaps are stored separately from the sequence.
+The ungapped sequence is called the @Function.source@ of the gaps object.
+$Gaps$ either stores the source (then it is the owner of the source), or refers to an external source (then it is @Function.dependent@).
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec/* = ArrayGaps*/>
+class Gaps;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Size
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSpec>
+struct Size<Gaps<TSource, TSpec> >
+{
+	typedef typename Size<TSource>::Type Type;
+};
+template <typename TSource, typename TSpec>
+struct Size<Gaps<TSource, TSpec> const>
+{
+	typedef typename Size<TSource const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Position
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Position.param.T.type:Class.Gaps
+
+template <typename TSource, typename TSpec>
+struct Position<Gaps<TSource, TSpec> >:
+	Position<TSource>
+{
+};
+template <typename TSource, typename TSpec>
+struct Position<Gaps<TSource, TSpec> const>:
+	Position<TSource>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Source
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Source:
+..summary:The underlying sequence for alignments or gaps data structures.
+..signature:Source<T>::Type
+..param.T:Type for which the source type is determined.
+...type:Class.Gaps
+..returns.param.Type:Source type of $T$.
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec>
+struct Source<Gaps<TSource, TSpec> >
+{
+	typedef TSource Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.GetSource:
+..summary:The type returned by the @Function.source@ function.
+..signature:GetSource<T>::Type
+..param.T:Type for which the source is retrieved by @Function.source at .
+...type:Class.Gaps
+..returns.param.Type:The type returned by the @Function.source@ function.
+...remarks:This type is a reference to @Metafunction.Source at .
+..include:seqan/align.h
+*/
+template <typename T>
+struct GetSource
+{
+	typedef typename Source<T>::Type & Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Iterator.param.T.type:Class.Gaps
+
+template <typename TSource, typename TSpec, typename TIteratorSpec>
+struct Iterator<Gaps<TSource, TSpec>, TIteratorSpec>
+{
+	typedef Iter<Gaps<TSource, TSpec>, GapsIterator<TSpec> > Type;
+};
+template <typename TSource, typename TSpec, typename TIteratorSpec>
+struct Iterator<Gaps<TSource, TSpec> const, TIteratorSpec>
+{
+	typedef Iter<Gaps<TSource, TSpec> const, GapsIterator<TSpec> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.Gaps
+
+template <typename TSource, typename TSpec>
+struct Spec<Gaps<TSource, TSpec> >
+{
+	typedef TSpec Type;
+};
+template <typename TSource, typename TSpec>
+struct Spec<Gaps<TSource, TSpec> const>
+{
+	typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Value
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.Gaps
+
+template <typename TSource, typename TSpec>
+struct Value<Gaps<TSource, TSpec> >:
+	Value<TSource>
+{
+};
+template <typename TSource, typename TSpec>
+struct Value<Gaps<TSource, TSpec> const>:
+	Value<TSource const>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// GetValue
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.GetValue.param.T.type:Class.Gaps
+
+template <typename TSource, typename TSpec>
+struct GetValue<Gaps<TSource, TSpec> >:
+	Value<TSource> //no reference
+{
+};
+template <typename TSource, typename TSpec>
+struct GetValue<Gaps<TSource, TSpec> const>:
+	Value<TSource const> //no reference
+{
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Reference
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Reference.param.T.type:Class.Gaps
+
+template <typename TSource, typename TSpec>
+struct Reference<Gaps<TSource, TSpec> >
+{
+	typedef typename Iterator<Gaps<TSource, TSpec>, Standard>::Type TIterator_;
+	typedef Proxy<IteratorProxy<TIterator_> > Type;
+};
+
+template <typename TSource, typename TSpec>
+struct Reference<Gaps<TSource, TSpec> const>
+{
+	typedef typename Iterator<Gaps<TSource, TSpec> const, Standard>::Type TIterator_;
+	typedef Proxy<IteratorProxy<TIterator_> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.id.param.object.type:Class.Gaps
+
+template <typename TSource, typename TSpec>
+inline void const *
+id(Gaps<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return id(source(me));
+}
+template <typename TSource, typename TSpec>
+inline void const *
+id(Gaps<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return id(source(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.begin.param.object.type:Class.Gaps
+
+// returns iterator to left border
+template <typename TSource, typename TSpec, typename TTag>
+inline typename Iterator<Gaps<TSource, TSpec>, Tag<TTag> const>::Type 
+begin(Gaps<TSource, TSpec> & me,
+	  Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(me, beginPosition(me), tag_);
+}
+template <typename TSource, typename TSpec, typename TTag>
+inline typename Iterator<Gaps<TSource, TSpec> const, Tag<TTag> const>::Type 
+begin(Gaps<TSource, TSpec> const & me,
+	  Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(me, beginPosition(me), tag_);
+}
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.end.param.object.type:Class.Gaps
+
+// returns iterator to right border
+template <typename TSource, typename TSpec, typename TTag>
+inline typename Iterator<Gaps<TSource, TSpec>, Tag<TTag> const>::Type 
+end(Gaps<TSource, TSpec> & me,
+	Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(me, endPosition(me), tag_);
+}
+template <typename TSource, typename TSpec, typename TTag>
+inline typename Iterator<Gaps<TSource, TSpec> const, Tag<TTag> const>::Type 
+end(Gaps<TSource, TSpec> const & me,
+	Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(me, endPosition(me), tag_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.length.param.object.type:Class.Gaps
+
+template <typename TSource, typename TSpec>
+inline typename Size<Gaps<TSource, TSpec> >::Type
+length(Gaps<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return endPosition(me) - beginPosition(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.sourceBegin:
+..summary:Begin of the source segment. 
+..cat:Alignments
+..signature:sourceBegin(object)
+..param.object:An object that has a source
+...type:Class.Gaps
+..returns:An iterator that points to the first item in @Function.source.source(object)@ that is used in object.
+..see:Function.begin
+..see:Function.source
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec, typename TTag>
+inline typename Iterator<TSource, Tag<TTag> const>::Type 
+sourceBegin(Gaps<TSource, TSpec> const & me,
+			Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(source(me), clippedBeginPosition(me), tag_);
+}
+template <typename TSource, typename TSpec>
+inline typename Iterator<TSource, typename DefaultGetIteratorSpec<TSource>::Type>::Type 
+sourceBegin(Gaps<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename DefaultGetIteratorSpec<TSource>::Type TDefaultGetIteratorSpec;
+	return iter(source(me), clippedBeginPosition(me), TDefaultGetIteratorSpec());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.sourceEnd:
+..summary:End of the source segment. 
+..cat:Alignments
+..signature:sourceEnd(object)
+..param.object:An object that has a source
+...type:Class.Gaps
+..returns:An iterator that points behind the last item in @Function.source.source(object)@ that is used in object.
+..see:Function.end
+..see:Function.source
+..see:Function.sourceBegin
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec, typename TTag>
+inline typename Iterator<TSource, Tag<TTag> const>::Type 
+sourceEnd(Gaps<TSource, TSpec> const & me,
+		  Tag<TTag> const tag_)
+{
+SEQAN_CHECKPOINT
+	return iter(source(me), clippedEndPosition(me), tag_);
+}
+template <typename TSource, typename TSpec>
+inline typename Iterator<TSource, typename DefaultGetIteratorSpec<TSource>::Type>::Type 
+sourceEnd(Gaps<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename DefaultGetIteratorSpec<TSource>::Type TDefaultGetIteratorSpec;
+	return iter(source(me), clippedEndPosition(me), TDefaultGetIteratorSpec());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.insertGap:
+..cat:Alignments
+..summary:Insert one blank into a gapped sequence. 
+..signature:insertGap(gapped_sequence, view_position)
+..param.gapped_sequence:A gapped sequence.
+...type:Class.Gaps
+..param.view_position:The view position at which the blank is inserted.
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec, typename TPosition>
+inline void
+insertGap(Gaps<TSource, TSpec> & me,
+		  TPosition _view_pos)
+{
+SEQAN_CHECKPOINT
+	insertGap(iter(me, _view_pos));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.insertGaps:
+..cat:Alignments
+..summary:Insert blanks into a gapped sequence. 
+..signature:insertGaps(gapped_sequence, view_position, count)
+..param.gapped_sequence:A gapped sequence.
+...type:Class.Gaps
+..param.view_position:The view position at which $count$ blanks are inserted.
+..param.count:Number of blanks to insert.
+..see:Function.insertGap
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec, typename TPosition, typename TSize>
+inline void
+insertGaps(Gaps<TSource, TSpec> & me,
+		   TPosition _view_pos,
+		   TSize _size)
+{
+SEQAN_CHECKPOINT
+	insertGaps(iter(me, _view_pos), _size);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.removeGap:
+..cat:Alignments
+..summary:Removes one blank from a gapped sequence. 
+..signature:removeGap(gapped_sequence, view_position)
+..param.gapped_sequence:A gapped sequence.
+...type:Class.Gaps
+..param.view_position:The view position at which the blank is removed.
+..remarks:If there is no gap at position $view_position$ in $gapped_sequence$, then nothing happens.
+..see:Function.insertGap
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec, typename TPosition>
+inline void
+removeGap(Gaps<TSource, TSpec> & me,
+		  TPosition _view_pos)
+{
+SEQAN_CHECKPOINT
+	removeGap(iter(me, _view_pos));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.removeGaps:
+..cat:Alignments
+..summary:Removes blanks from a gapped sequence. 
+..signature:removeGaps(gapped_sequence, view_position, count)
+..param.gapped_sequence:A gapped sequence.
+...type:Class.Gaps
+..param.view_position:The view position at which up to $count$ blanks are removed.
+..param.count:Number of blanks 
+..remarks:This funcion removes up to $count$ blanks. 
+If there is no gap at position $view_position$ in $gapped_sequence$, nothing happens.
+If there are only $x < count$ consecutive blanks starting at position $view_position$ in $gappend_sequence$, then only $x$ blanks are removed.
+..see:Function.insertGaps
+..see:Function.removeGap
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec, typename TPosition, typename TSize>
+inline void
+removeGaps(Gaps<TSource, TSpec> & me,
+		   TPosition _view_pos,
+		   TSize _size)
+{
+SEQAN_CHECKPOINT
+	removeGaps(iter(me, _view_pos), _size);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isGap:
+..cat:Alignments
+..summary:Test a gapped sequence for gaps at a specific position. 
+..signature:bool isGap(gapped_sequence, view_position)
+..param.gapped_sequence:A gapped sequence.
+...type:Class.Gaps
+..param.view_position:The view position at which $gapped_sequence$ is tested.
+..returns:$true$, if there is a gap at position $view_position$ in $gapped_sequence$, $false$ otherwise.
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec, typename TPosition>
+inline bool 
+isGap(Gaps<TSource, TSpec> & me,
+	  TPosition view_pos)
+{
+SEQAN_CHECKPOINT
+	return isGap(iter(me, view_pos));
+}
+template <typename TSource, typename TSpec, typename TPosition>
+inline bool 
+isGap(Gaps<TSource, TSpec> const & me,
+	  TPosition view_pos)
+{
+SEQAN_CHECKPOINT
+	return isGap(iter(me, view_pos));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.countGaps:
+..cat:Alignments
+..summary:Count blanks at a specific position in a gapped sequence. 
+..signature:Size countGaps(gapped_sequence, view_position)
+..param.gapped_sequence:A gapped sequence.
+...type:Class.Gaps
+..param.view_position:The view position at which $gapped_sequence$ is tested.
+..returns:Number of consecutive gaps in $gapped_sequence$ starting at position $view_position$.
+...metafunction:Metafunction.Size
+..remarks:If there is no gap at position $view_position$, the function returns $0$.
+...text:If $view_position \geq $@Function.endPosition@$(gapped_sequence)$, the function returns $0$.
+..include:seqan/align.h
+*/
+
+// count gaps beginning at given view position
+// counting trailing gaps returns either the intended trailing gaps or 0
+
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename Size<Gaps<TSource, TSpec> >::Type
+countGaps(Gaps<TSource, TSpec> & me,
+		  TPosition view_pos)
+{
+SEQAN_CHECKPOINT
+	return countGaps(iter(me, view_pos));
+}
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename Size<Gaps<TSource, TSpec> >::Type
+countGaps(Gaps<TSource, TSpec> const & me,
+		  TPosition view_pos)
+{
+SEQAN_CHECKPOINT
+	return countGaps(iter(me, view_pos));
+}
+
+/**
+.Function.countCharacters:
+..cat:Alignments
+..summary:Count characters at a specific position in a gapped sequence.
+..signature:Size countCharacters(gapped_sequence, view_position)
+..param.gapped_sequence:A gapped sequence.
+...type:Class.Gaps
+..param.view_position:The view position at which $gapped_sequence$ is tested.
+..returns:Number of consecutive characters in $gapped_sequence$ starting at position $view_position$.
+...metafunction:Metafunction.Size
+..remarks:If there is no character at position $view_position$, the function returns $0$.
+...text:If $view_position \geq $@Function.endPosition@$(gapped_sequence)$, the function returns $0$.
+..include:seqan/align.h
+*/
+
+// count characters beginning at given view position
+
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename Size<Gaps<TSource, TSpec> >::Type
+countCharacters(Gaps<TSource, TSpec> const & me,
+				TPosition view_pos)
+{
+SEQAN_CHECKPOINT
+	return countCharacters(iter(me, view_pos));
+}
+
+template <typename TSource, typename TSpec, typename TPoistion>
+inline typename Size<Gaps<TSource, TSpec> >::Type
+countCharacters(Gaps<TSource, TSpec> & me,
+				TPoistion view_pos)
+{
+SEQAN_CHECKPOINT
+	return countCharacters(iter(me, view_pos));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.clearGaps:
+..cat:Alignments
+..summary:Remove blanks from a gapped sequence. 
+..signature:clearGaps(gapped_sequence [, view_begin_pos, view_end_pos])
+..param.gapped_sequence:A gapped sequence.
+...type:Class.Gaps
+..param.view_begin_pos:First view position that is scanned for blanks. (optional)
+..param.view_end_pos:View Position behind the last item that is scanned for blanks. (optional)
+..remarks:All blanks after $view_begin_pos$ and before $view_end_pos$ are removed.
+...text:If no $view_begin_pos$ and $view_end_pos$ are specified, all gaps are removed from $gapped_sequence$.
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec, typename TPosition1, typename TPosition2>
+inline void
+clearGaps(Gaps<TSource, TSpec> & me,
+		  TPosition1 view_pos_begin,
+		  TPosition2 view_pos_end)
+{
+SEQAN_CHECKPOINT
+
+	TPosition1 pos_left = view_pos_end - view_pos_begin;
+	while (pos_left > 0)
+	{
+		if (isGap(me, view_pos_begin))
+		{
+			TPosition1 gap_count = countGaps(me, view_pos_begin);
+			if (!gap_count)
+			{//trailing gaps reached: stop function
+				break;
+			}
+			if (gap_count > pos_left)
+			{
+				gap_count = pos_left;
+			}
+			removeGaps(me, view_pos_begin, gap_count);
+			pos_left -= gap_count;
+		}
+		else
+		{
+			++view_pos_begin;
+			--pos_left;
+		}
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename TSource, typename TSpec>
+inline void
+clearGaps(Gaps<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	clearGaps(me, 0, endPosition(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// copy gaps-information from one Gaps-object range into another object
+//??? TODO: not tested, not documented
+
+template <typename TSource, typename TSpec, typename TPosition1, typename TSourceGaps, typename TPosition2, typename TPosition3>
+inline void
+copyGaps(Gaps<TSource, TSpec> & target_gaps,
+		 TPosition1 target_view_pos_begin,
+		 TSourceGaps const & source_gaps,
+		 TPosition2 source_view_pos_begin,
+		 TPosition3 source_view_pos_end)
+{
+SEQAN_CHECKPOINT
+	TPosition1 target_view_pos_end = target_view_pos_begin + source_view_pos_end - source_view_pos_begin;
+	clearGaps(target_gaps, target_view_pos_begin, target_view_pos_end);
+	
+	for (TPosition3 i = source_view_pos_end - source_view_pos_begin; i > 0; --i)
+	{
+		if (isGap(source_gaps, source_view_pos_begin))
+		{
+			insertGap(target_gaps, target_view_pos_begin);
+		}
+
+		++target_view_pos_begin;
+		++source_view_pos_begin;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.getValue.param.container.type:Class.Gaps
+
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename GetValue<Gaps<TSource, TSpec> >::Type
+getValue(Gaps<TSource, TSpec> & me,
+		 TPosition view_pos)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TSource>::Type TValue;
+	if (isGap(me, view_pos)) return gapValue<TValue>();
+	else return value(source(me), toSourcePosition(me, view_pos));
+}
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename GetValue<Gaps<TSource, TSpec> >::Type
+getValue(Gaps<TSource, TSpec> const & me,
+		 TPosition view_pos)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TSource>::Type TValue;
+	if (isGap(me, view_pos)) return gapValue<TValue>();
+	else return value(source(me), toSourcePosition(me, view_pos));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.value.param.container.type:Class.Gaps
+
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename Reference<Gaps<TSource, TSpec> >::Type
+value(Gaps<TSource, TSpec> & me,
+	  TPosition view_pos)
+{
+SEQAN_CHECKPOINT
+	typedef typename Reference<Gaps<TSource, TSpec> >::Type TReference;
+	return TReference(iter(me, view_pos));
+}
+template <typename TSource, typename TSpec, typename TPosition>
+inline typename Reference<Gaps<TSource, TSpec> const>::Type
+value(Gaps<TSource, TSpec> const & me,
+	  TPosition view_pos)
+{
+SEQAN_CHECKPOINT
+	typedef typename Reference<Gaps<TSource, TSpec> const>::Type TReference;
+	return TReference(iter(me, view_pos));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.emptySource:
+..summary:Test if there is a source. 
+..cat:Alignments
+..signature:bool emptySource(object)
+..param.object:An object that could habe a source.
+...type:Class.Gaps
+..returns:$true$ if $object$ has a @Function.source@, $false$ otherwise.
+..see:Function.source
+..see:Metafunction.Source
+..include:seqan/align.h
+*/
+
+template <typename TSource, typename TSpec>
+inline bool
+emptySource(Gaps<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	bool ret = empty(_dataSource(me));
+	return ret;
+}
+template <typename TSource, typename TSpec>
+inline bool
+emptySource(Gaps<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	bool ret = empty(_dataSource(me));
+	return ret;
+}
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.dependentSource:
+..summary:Test if object depends from it's source. 
+..cat:Alignments
+..signature:bool dependentSource(object)
+..param.object:An object that has a source.
+...type:Class.Gaps
+..returns:$true$ if the source of $object$ is a stand alone object that is
+not managed by $object$. $false$ otherwise.
+..remarks:This function returns $false$, if the @Function.source@ is @Function.emptySource.empty at .
+..remarks.text:If both @Function.emptySource@ and @Function.dependentSource@ are false, $object$ is the owner of the source.
+..see:Function.source
+..see:Metafunction.Source
+..see:Function.emptySource
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec>
+inline bool
+dependentSource(Gaps<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return dependent(_dataSource(me));
+}
+template <typename TSource, typename TSpec>
+inline bool
+dependentSource(Gaps<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return dependent(_dataSource(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.setSource:
+..summary:Let an external object be the source.
+..cat:Alignments
+..signature:setSource(object, source)
+..signature:setSource(object, source [, begin_pos, end_pos])
+..param.object:An object that will get a new source.
+...type:Class.Gaps
+..param.source:The new source.
+...remarks:The source type can be determined by @Metafunction.Source at .
+..param.begin_pos:Position of the first item in $source$ that is used in $object$. (optional)
+..param.end_pos:Position behind the last item in $source$ that is used in $object$. (optional)
+..remarks:After this function, $object$ @Function.dependentSource.depends@ from $source$,
+and $source$ is the new source of $object$.
+...text:If no $begin_pos$ and $end_pos$ are specified, the whole $source$ will be used.
+..see:Function.source
+..see:Function.dependentSource
+..see:Metafunction.Source
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec, typename TPosition1, typename TPosition2>
+inline void
+setSource(Gaps<TSource, TSpec> & me,
+		  TSource & source_,
+		  TPosition1 clipped_begin_pos,
+		  TPosition2 clipped_end_pos)
+{
+SEQAN_CHECKPOINT
+	setValue(_dataSource(me), source_);
+	_setClippedBeginPosition(me, clipped_begin_pos);
+	_setClippedEndPosition(me, clipped_end_pos);
+	clearGaps(me);
+}
+
+//____________________________________________________________________________
+
+template <typename TSource, typename TSpec>
+inline void
+setSource(Gaps<TSource, TSpec> & me,
+		  TSource & source_)
+{
+SEQAN_CHECKPOINT
+	setSource(me, source_, 0, length(source_));
+}
+
+//??? Variante mit zusaetzlich source_begin und source_end
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.createSource:
+..summary:Creates a new source.
+..cat:Alignments
+..signature:createSource(object)
+..param.object:An object that will get a new source.
+...type:Class.Gaps
+..remarks:
+If $object$ has no @Function.source@, a new one is created.
+If $object$ is already the owner of the source, nothing happens.
+If $object$ has an external source, this source is copied. 
+$object$ is thereupon the owner of the source.
+..see:Function.source
+..see:Function.dependentSource
+..see:Metafunction.Source
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec>
+inline void
+createSource(Gaps<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	create(_dataSource(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.detach:
+..cat:Alignments
+..param.object.type:Class.Gaps
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec>
+inline void
+detach(Gaps<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	createSource(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.source:
+..summary:The source of an object. 
+..cat:Alignments
+..signature:source(object)
+..param.object:An object.
+...type:Class.Gaps
+..returns:The source of $object$.
+...type:Metafunction.Source
+..remarks:The source of a @Class.Gaps@ instance is the underlying sequence without gaps.
+..see:Metafunction.Source
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec>
+inline TSource &
+source(Gaps<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return value(_dataSource(me));
+}
+template <typename TSource, typename TSpec>
+inline TSource &
+source(Gaps<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(_dataSource(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.sourceSegment:
+..summary:The used part of the source. 
+..cat:Alignments
+..signature:sourceSegment(object)
+..param.object:An object.
+...type:Class.Gaps
+..returns:The part of the @Function.source@ that is actually used by $object$.
+...type:Class.Segment
+..remarks:The source of a @Class.Gaps@ instance is the underlying sequence without gaps. 
+$sourceSegment$ is useful since @Class.Gaps@ can be limited to work on a subsequence of the source.
+..see:Metafunction.Source
+..see:Function.source
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec>
+inline typename Infix<TSource>::Type
+sourceSegment(Gaps<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return infix(source(me), clippedBeginPosition(me), clippedEndPosition(me));
+}
+
+template <typename TSource, typename TSpec>
+inline typename Infix<TSource>::Type
+sourceSegment(Gaps<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return infix(source(me), clippedBeginPosition(me), clippedEndPosition(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.sourceLength:
+..summary:Length of the source. 
+..cat:Alignments
+..signature:Size sourceLength(gaps)
+..param.gaps:A gaps object.
+...type:Class.Gaps
+..returns:Length of the used part of the source.
+...metafunction:Metafunction.Size
+..remarks:This function is equivalent to $clippedEndPosition(gaps) - clippedBeginPosition(gaps)$.
+..include:seqan/align.h
+*/
+//..see:Function.clippedEndPosition
+//..see:Function.clippedBeginPosition
+template <typename TSource, typename TSpec>
+inline typename Size<TSource>::Type
+sourceLength(Gaps<TSource, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return clippedEndPosition(me) - clippedBeginPosition(me);
+}
+template <typename TSource, typename TSpec>
+inline typename Size<TSource>::Type
+sourceLength(Gaps<TSource, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return clippedEndPosition(me) - clippedBeginPosition(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignSource:
+..summary:Assigns the source to a new value. 
+..cat:Alignments
+..signature:assignSource(object, source_in)
+..param.object:An object.
+...type:Class.Gaps
+..param.source_in:An object that is assigned to the source of $object$.
+..remarks:
+...note:$source_in$ is not the new @Function.source@ of $object$, but $source_in$ is assigned (copied) to @Function.source.source(object)@.
+That means that the current source of $object$ is modified by this function. 
+If you want $object$ to drop its current source and take another object as source, use @Function.setSource@ instead.
+...text:If no $begin_pos$ and $end_pos$ are specified, the whole source will be used.
+...text:This function does not change whether $object$ is @Function.dependentSource.dependent@ or not.
+...text:The source of $object$ must not be @Function.emptySource.empty@ for executing this function.
+..see:Metafunction.Source
+..see:Function.source
+..see:Function.setSource
+..see:Function.emptySource
+..see:Function.dependentSource
+..see:Function.assign
+..include:seqan/align.h
+*/
+
+//____________________________________________________________________________
+
+template <typename TSource, typename TSpec, typename TSource2>
+inline void
+assignSource(Gaps<TSource, TSpec> & me,
+			 TSource2 const & source_)
+{
+SEQAN_CHECKPOINT
+	assignValue(me.data_source, source_);
+	_setClippedBeginPosition(me, 0);
+	_setClippedEndPosition(me, length(source_));
+	clearGaps(me);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.moveSource:
+..summary:Moves the source to a new value. 
+..cat:Alignments
+..signature:moveSource(object, source_in [, begin_pos, end_pos])
+..param.object:An object.
+...type:Class.Gaps
+..param.source_in:An object that is moved to the source of $object$.
+..param.begin_pos:Position of the first item in the source that is used in $object$. (optional)
+..param.end_pos:Position behind the last item in the source that is used in $object$. (optional)
+..remarks:
+...note:$source_in$ is not the new @Function.source@ of $object$, but $source_in$ is moved into @Function.source.source(object)@.
+"Moved" means that $source_in$ is assigned to $source(object)$ with the possibility that $source_in$ looses its content.
+That means that the current source of $object$ is modified by this function. 
+If you want $object$ to drop its current source and take another object as source, use @Function.setSource@ instead.
+If you want $source_in$ not to become empty, use @Function.assignSource@ instead.
+...text:If no $begin_pos$ and $end_pos$ are specified, the whole source will be used.
+...text:This function does not change whether $object$ is @Function.dependentSource.dependent@ or not.
+...text:The source of $object$ must not be @Function.emptySource.empty@ for executing this function.
+..see:Metafunction.Source
+..see:Function.source
+..see:Function.setSource
+..see:Function.emptySource
+..see:Function.dependentSource
+..see:Function.move
+..see:Function.assignSource
+..include:seqan/align.h
+*/
+template <typename TSource, typename TSpec, typename TSource2, typename TPosition1, typename TPosition2>
+inline void
+moveSource(Gaps<TSource, TSpec> & me,
+		   TSource2 const & source_,
+		   TPosition1 clipped_begin_pos,
+		   TPosition2 clipped_end_pos)
+{
+SEQAN_CHECKPOINT
+	moveValue(_dataSource(me), source_);
+	_setClippedBeginPosition(me, clipped_begin_pos);
+	_setClippedEndPosition(me, clipped_end_pos);
+	clearGaps(me);
+}
+
+//____________________________________________________________________________
+
+template <typename TSource, typename TSpec, typename TSource2>
+inline void
+moveSource(Gaps<TSource, TSpec> & me,
+		   TSource2 const & source_)
+{
+SEQAN_CHECKPOINT
+	moveSource(me, source_, 0, length(source_));
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TSource, typename TIDString, typename TSpec>
+inline void
+write(TFile & target,
+	  Gaps<TSource, TSpec> const & source, 
+	  TIDString const &,
+	  Raw)
+{
+SEQAN_CHECKPOINT
+//	_streamWriteRange(target, begin(source), end(source));
+
+	// Print gaps row
+	typedef typename Iterator<Gaps<TSource, TSpec> const>::Type TIter;
+	TIter begin_ = begin(source);
+	TIter end_ = end(source);
+	for (; begin_ != end_; ++begin_) {
+		if (isGap(begin_))
+			_streamPut(target, gapValue<char>());
+		else 
+			_streamPut(target, *begin_);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// stream operators
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename TSource, typename TSpec>
+inline TStream &
+operator << (TStream & target, 
+			 Gaps<TSource, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	write(target, source);
+	return target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <typename TStream, typename TSource, typename TSpec>
+inline TStream &
+operator >> (TStream & source, 
+			 Gaps<TSource, TSpec> & target)
+{
+SEQAN_CHECKPOINT
+	read(source, target);
+	return source;
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+// Comparison Operators
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec >
+inline bool
+operator == (Gaps<TLeftSource, TLeftSpec> const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TLeftSource, TLeftSpec> >::Type _lex(left, right);
+    return isEqual(_lex);
+}
+template <typename TLeftSource, typename TLeftSpec, typename TRight >
+inline bool
+operator == (Gaps<TLeftSource, TLeftSpec> const & left, 
+			 TRight const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TLeftSource, TLeftSpec> >::Type _lex(left, right);
+    return isEqual(_lex);
+}
+template <typename TLeft, typename TRightSource, typename TRightSpec >
+inline bool
+operator == (TLeft const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TRightSource, TRightSpec> >::Type _lex(left, right);
+    return isEqual(_lex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec >
+inline bool
+operator != (Gaps<TLeftSource, TLeftSpec> const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TLeftSource, TLeftSpec> >::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+template <typename TLeftSource, typename TLeftSpec, typename TRight >
+inline bool
+operator !=(Gaps<TLeftSource, TLeftSpec> const & left, 
+			TRight const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TLeftSource, TLeftSpec> >::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+template <typename TLeft, typename TRightSource, typename TRightSpec >
+inline bool
+operator != (TLeft const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TRightSource, TRightSpec> >::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec >
+inline bool
+operator < (Gaps<TLeftSource, TLeftSpec> const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TLeftSource, TLeftSpec> >::Type _lex(left, right);
+    return isLess(_lex);
+}
+template <typename TLeftSource, typename TLeftSpec, typename TRight>
+inline bool
+operator < (Gaps<TLeftSource, TLeftSpec> const & left, 
+			TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return isLess(left, right, typename DefaultPrefixOrder<Gaps<TLeftSource, TLeftSpec> >::Type());
+}
+template <typename TLeft, typename TRightSource, typename TRightSpec >
+inline bool
+operator < (TLeft const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TRightSource, TRightSpec> >::Type _lex(left, right);
+    return isLess(_lex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec >
+inline bool
+operator <= (Gaps<TLeftSource, TLeftSpec> const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TLeftSource, TLeftSpec> >::Type _lex(left, right);
+    return isLessOrEqual(_lex);
+}
+template <typename TLeftSource, typename TLeftSpec, typename TRight>
+inline bool
+operator <= (Gaps<TLeftSource, TLeftSpec> const & left, 
+			 TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return isLessOrEqual(left, right, typename DefaultPrefixOrder<Gaps<TLeftSource, TLeftSpec> >::Type());
+}
+template <typename TLeft, typename TRightSource, typename TRightSpec >
+inline bool
+operator <= (TLeft const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TRightSource, TRightSpec> >::Type _lex(left, right);
+    return isLessOrEqual(_lex);
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec >
+inline bool
+operator > (Gaps<TLeftSource, TLeftSpec> const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TLeftSource, TLeftSpec> >::Type _lex(left, right);
+    return isGreater(_lex);
+}
+template <typename TLeftSource, typename TLeftSpec, typename TRight>
+inline bool
+operator > (Gaps<TLeftSource, TLeftSpec> const & left, 
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return isGreater(left, right, typename DefaultPrefixOrder<Gaps<TLeftSource, TLeftSpec> >::Type());
+}
+template <typename TLeft, typename TRightSource, typename TRightSpec >
+inline bool
+operator > (TLeft const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TRightSource, TRightSpec> >::Type _lex(left, right);
+    return isGreater(_lex);
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftSource, typename TLeftSpec, typename TRightSource, typename TRightSpec >
+inline bool
+operator >= (Gaps<TLeftSource, TLeftSpec> const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TLeftSource, TLeftSpec> >::Type _lex(left, right);
+    return isGreaterOrEqual(_lex);
+}
+template <typename TLeftSource, typename TLeftSpec, typename TRight>
+inline bool
+operator >= (Gaps<TLeftSource, TLeftSpec> const & left, 
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return isGreaterOrEqual(left, right, typename DefaultPrefixOrder<Gaps<TLeftSource, TLeftSpec> >::Type());
+}
+template <typename TLeft, typename TRightSource, typename TRightSpec >
+inline bool
+operator >= (TLeft const & left, 
+			 Gaps<TRightSource, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<Gaps<TRightSource, TRightSpec> >::Type _lex(left, right);
+    return isGreaterOrEqual(_lex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/gaps_iterator_base.h b/src/SeqAn-1.3/seqan/align/gaps_iterator_base.h
new file mode 100644
index 0000000..31e6ba4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/gaps_iterator_base.h
@@ -0,0 +1,323 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GAPS_ITERATOR_BASE_H
+#define SEQAN_HEADER_GAPS_ITERATOR_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Source
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec>
+struct Source<Iter<TGaps, GapsIterator<TSpec> > >
+{
+	typedef typename Source<TGaps>::Type TSource_;
+	typedef typename Iterator<TSource_, Rooted>::Type Type;
+};
+template <typename TGaps, typename TSpec>
+struct Source<Iter<TGaps, GapsIterator<TSpec> > const>
+{
+	typedef typename Source<TGaps>::Type TSource_;
+	typedef typename Iterator<TSource_, Rooted>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Value
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec>
+struct Value<Iter<TGaps, GapsIterator<TSpec> > >
+{
+	typedef typename Source<Iter<TGaps, GapsIterator<TSpec> > >::Type TSource_;
+	typedef typename Value<TSource_>::Type TSourceValue_;
+	typedef typename GappedValueType<TSourceValue_>::Type Type;
+
+};
+template <typename TGaps, typename TSpec>
+struct Value<Iter<TGaps, GapsIterator<TSpec> > const>
+{
+	typedef typename Source<Iter<TGaps, GapsIterator<TSpec> > const>::Type TSource_;
+	typedef typename Value<TSource_>::Type TSourceValue_;
+	typedef typename GappedValueType<TSourceValue_>::Type Type;
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// GetValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec>
+struct GetValue<Iter<TGaps, GapsIterator<TSpec> > >:
+	Value<Iter<TGaps, GapsIterator<TSpec> > > //no reference
+{
+};
+template <typename TGaps, typename TSpec>
+struct GetValue<Iter<TGaps, GapsIterator<TSpec> > const>:
+	Value<Iter<TGaps, GapsIterator<TSpec> > const> //no reference
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Reference
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec>
+struct Reference<Iter<TGaps, GapsIterator<TSpec> > >
+{
+	typedef Iter<TGaps, GapsIterator<TSpec> > TIterator_;
+	typedef Proxy<IteratorProxy<TIterator_> > Type;
+};
+template <typename TGaps, typename TSpec>
+struct Reference<Iter<TGaps, GapsIterator<TSpec> > const>
+{
+	typedef Iter<TGaps, GapsIterator<TSpec> > TIterator_; //remove const
+	typedef Proxy<IteratorProxy<TIterator_> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//specialization of basic_proxy.h/CompareType implementation
+
+/*
+template <typename TGaps, typename TSpec, typename T>
+struct CompareType<Proxy<IteratorProxy<Iter<TGaps, GapsIterator<TSpec> > > >, T>
+{
+	typedef T Type;
+};
+*/
+
+//???TODO: Symmetrie von CompareType herstellen
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec>
+inline Iter<TGaps, GapsIterator<TSpec> > const & 
+operator ++(Iter<TGaps, GapsIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	goNext(me);
+	return me;
+}
+
+template <typename TGaps, typename TSpec>
+inline Iter<TGaps, GapsIterator<TSpec> > const 
+operator ++(Iter<TGaps, GapsIterator<TSpec> > const & me, int)
+{
+SEQAN_CHECKPOINT
+	Iter<TGaps, GapsIterator<TSpec> > ret = me;
+	goNext(me);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec>
+inline Iter<TGaps, GapsIterator<TSpec> > const & 
+operator --(Iter<TGaps, GapsIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	goPrevious(me);
+	return me;
+}
+
+template <typename TGaps, typename TSpec>
+inline Iter<TGaps, GapsIterator<TSpec> > const 
+operator --(Iter<TGaps, GapsIterator<TSpec> > const & me, int)
+{
+SEQAN_CHECKPOINT
+	Iter<TGaps, GapsIterator<TSpec> > ret = me;
+	goPrevious(me);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//todo???: weitere operatoren
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+// insert a single gap at current iterator position
+template <typename TGaps, typename TSpec>
+inline void
+insertGap(Iter<TGaps, GapsIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	insertGaps(me, 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// remove a single gap at current iterator position
+template <typename TGaps, typename TSpec>
+inline void
+removeGap(Iter<TGaps, GapsIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	removeGaps(me, 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec>
+inline typename Reference< Iter<TGaps, GapsIterator<TSpec> > >::Type
+value(Iter<TGaps, GapsIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Reference< Iter<TGaps, GapsIterator<TSpec> > >::Type TReference;
+	return TReference(me);
+}
+template <typename TGaps, typename TSpec>
+inline typename Reference< Iter<TGaps, GapsIterator<TSpec> > const>::Type
+value(Iter<TGaps, GapsIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Reference< Iter<TGaps, GapsIterator<TSpec> > const>::Type TReference;
+	return TReference(me);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec, typename TValue>
+inline void
+assignValue(Iter<TGaps, GapsIterator<TSpec> > & me,
+			TValue const & val)
+{
+SEQAN_CHECKPOINT
+	if (!isGap(me)) 
+	{
+		assignValue(source(me), val);
+	}
+	//else insert??? das waere neu.
+}
+template <typename TGaps, typename TSpec, typename TValue>
+inline void
+assignValue(Iter<TGaps, GapsIterator<TSpec> > const & me,
+			TValue const & val)
+{
+SEQAN_CHECKPOINT
+	if (!isGap(me)) 
+	{
+		assignValue(source(me), val);
+	}
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec, typename TValue>
+inline void
+moveValue(Iter<TGaps, GapsIterator<TSpec> > & me,
+		  TValue const & val)
+{
+SEQAN_CHECKPOINT
+	if (!isGap(me)) 
+	{
+		moveValue(source(me), val);
+	}
+}
+template <typename TGaps, typename TSpec, typename TValue>
+inline void
+moveValue(Iter<TGaps, GapsIterator<TSpec> > const & me,
+		  TValue const & val)
+{
+SEQAN_CHECKPOINT
+	if (!isGap(me)) 
+	{
+		moveValue(source(me), val);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TSpec>
+inline TGaps &
+container(Iter<TGaps, GapsIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return *me.data_container;
+}
+
+template <typename TGaps, typename TSpec>
+inline TGaps &
+container(Iter<TGaps, GapsIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return *me.data_container;
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TSpec>
+inline typename Source<Iter<TGaps, GapsIterator<TSpec> > >::Type /*returns copy*/
+source(Iter<TGaps, GapsIterator<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_source;
+}
+template <typename TGaps, typename TSpec>
+inline typename Source<Iter<TGaps, GapsIterator<TSpec> > const>::Type /*returns copy*/
+source(Iter<TGaps, GapsIterator<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_source;
+}
+
+//todo??? setSource? setContainer?
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps, typename TSpec, typename TSize>
+inline void
+goFurther(Iter<TGaps, GapsIterator<TSpec> > & me,
+		  TSize steps)
+{
+SEQAN_CHECKPOINT
+	while (steps)
+	{
+		goNext(me);
+		--steps;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/gaps_sumlist.h b/src/SeqAn-1.3/seqan/align/gaps_sumlist.h
new file mode 100644
index 0000000..427383f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/gaps_sumlist.h
@@ -0,0 +1,938 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GAPS_SUMLIST_H
+#define SEQAN_HEADER_GAPS_SUMLIST_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Tag
+
+struct SumlistGaps;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Gaps - SumlistGaps Spec
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.SumlistGaps:
+..cat:Alignments
+..general:Class.Gaps
+..summary:Stores gaps in a Sumlist.
+..signature:Gaps<TSource, SumlistGaps>
+..param.TSource:Type of the ungapped sequence.
+...metafunction:Metafunction.Source
+..include:seqan/align.h
+*/
+
+template <typename TSource>
+class Gaps<TSource, SumlistGaps>
+{
+public:
+	typedef typename Size<Gaps>::Type TSize;
+	typedef SumList<2, TSize> TSumlist;
+	typedef typename Position<TSource>::Type TSourcePosition;
+	typedef typename Position<Gaps>::Type TViewPosition;
+
+public:
+	TSumlist data_sumlist; 
+
+	Holder<TSource> data_source;
+	TSourcePosition clipped_source_begin;
+	TSourcePosition clipped_source_end;
+
+public:
+	Gaps():
+		clipped_source_begin(0),
+		clipped_source_end(0)
+	{
+SEQAN_CHECKPOINT
+	}
+	Gaps(TSize _size):
+		clipped_source_begin(0),
+		clipped_source_end(0)
+	{
+		_initToResize(*this, _size);
+	}
+	Gaps(TSource & source_):
+		data_source(source_),
+		clipped_source_begin(beginPosition(source_)),
+		clipped_source_end(endPosition(source_))
+	{
+SEQAN_CHECKPOINT
+		_initToResize(*this, length(source_));
+	}
+
+	template <typename TSource2>
+	Gaps(TSource2 const & source_):
+		clipped_source_begin(beginPosition(source_)),
+		clipped_source_end(endPosition(source_))
+	{
+SEQAN_CHECKPOINT
+		data_source = source_;
+		_initToResize(*this, length(source_));
+	}
+
+	Gaps(Gaps const & other_):
+		data_sumlist(other_.data_sumlist),
+//		data_source(value(other_.data_source)), //variant: setValue => Align benutzen gemeinsame Sources
+		data_source(other_.data_source),		//variant: assignValue => Align kopieren Sources
+		clipped_source_begin(other_.clipped_source_begin),
+		clipped_source_end(other_.clipped_source_end)
+	{
+SEQAN_CHECKPOINT
+	}
+	Gaps & operator = (Gaps const & other_)
+	{
+SEQAN_CHECKPOINT
+		data_sumlist = other_.data_sumlist;
+		setValue(data_source, source(other_));
+		clipped_source_begin = other_.clipped_source_begin;
+		clipped_source_end = other_.clipped_source_end; 
+		return *this;
+	}
+
+	~Gaps()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	inline typename Reference<Gaps>::Type
+	operator[](TViewPosition view_pos)
+	{
+SEQAN_CHECKPOINT
+		return value(*this, view_pos);
+	}
+	inline typename Reference<Gaps const>::Type
+	operator[](TViewPosition view_pos) const
+	{
+SEQAN_CHECKPOINT
+		return value(*this, view_pos);
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline Holder<TSource> &
+_dataSource(Gaps<TSource, SumlistGaps> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_source;
+}
+template <typename TSource>
+inline Holder<TSource> const &
+_dataSource(Gaps<TSource, SumlistGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline typename Position< Gaps<TSource, SumlistGaps> >::Type
+beginPosition(Gaps<TSource, SumlistGaps> & gaps)
+{
+SEQAN_CHECKPOINT
+	if (length(gaps.data_sumlist))
+	{
+		return getValue(begin(gaps.data_sumlist), 0) - getValue(begin(gaps.data_sumlist), 1);
+	}
+	return 0;
+}
+template <typename TSource>
+inline typename Position< Gaps<TSource, SumlistGaps> const>::Type
+beginPosition(Gaps<TSource, SumlistGaps> const & gaps)
+{
+SEQAN_CHECKPOINT
+/*	
+typedef Gaps<TSource, SumlistGaps> const TGaps;
+typedef typename Size<TGaps>::Type TSize;
+typedef SumList<2, TSize> const TSumlist;
+typedef typename Iterator<TSumlist>::Type TSumlistIterator;
+
+TSumlistIterator it = begin(gaps.data_sumlist);
+*/
+	if (length(gaps.data_sumlist))
+	{
+		return getValue(begin(gaps.data_sumlist), 0) - getValue(begin(gaps.data_sumlist), 1);
+	}
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline typename Position<Gaps<TSource, SumlistGaps> >::Type
+endPosition(Gaps<TSource, SumlistGaps> & me)
+{
+SEQAN_CHECKPOINT
+	return getSum(me.data_sumlist, 0);
+}
+template <typename TSource>
+inline typename Position<Gaps<TSource, SumlistGaps> >::Type
+endPosition(Gaps<TSource, SumlistGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return getSum(me.data_sumlist, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline typename Position<TSource>::Type
+clippedBeginPosition(Gaps<TSource, SumlistGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.clipped_source_begin;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSourcePosition>
+inline void
+_setClippedBeginPosition(Gaps<TSource, SumlistGaps> & me, TSourcePosition _pos)
+{
+SEQAN_CHECKPOINT
+	me.clipped_source_begin = _pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline typename Position<TSource>::Type
+clippedEndPosition(Gaps<TSource, SumlistGaps> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.clipped_source_end;
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSourcePosition>
+inline void
+_setClippedEndPosition(Gaps<TSource, SumlistGaps> & me, TSourcePosition _pos)
+{
+SEQAN_CHECKPOINT
+	me.clipped_source_end = _pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSize2>
+inline void
+_initToResize(Gaps<TSource, SumlistGaps> & me,
+				TSize2 _size)
+{
+SEQAN_CHECKPOINT
+	typedef Gaps<TSource, SumlistGaps> TGaps;
+	typedef typename Size<TGaps>::Type TSize;
+
+	clear(me.data_sumlist);
+	TSize values[2];
+	values[0] = _size;
+	values[1] = _size;
+	appendValues(me.data_sumlist, (TSize *) values);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline void
+clearGaps(Gaps<TSource, SumlistGaps> & me)
+{
+SEQAN_CHECKPOINT
+	_initToResize(me, clippedEndPosition(me) - clippedBeginPosition(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline void
+clear(Gaps<TSource, SumlistGaps> & me)
+{
+SEQAN_CHECKPOINT
+	_initToResize(me, 0);
+	_setClippedBeginPosition(me, 0);
+	_setClippedEndPosition(me, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+inline void
+clearClipping(Gaps<TSource, SumlistGaps> & me)
+{
+SEQAN_CHECKPOINT
+	_setClippedBeginPosition(me, 0);
+	_setClippedEndPosition(me, length(source(me)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// transforms source- to view-position
+template <typename TSource>
+inline typename Position< Gaps<TSource, SumlistGaps> >::Type
+toViewPosition(Gaps<TSource, SumlistGaps> const & gaps_,
+			   typename Position<TSource>::Type pos)
+{
+SEQAN_CHECKPOINT
+	typedef Gaps<TSource, SumlistGaps> TGaps;
+	typedef typename Size<TGaps>::Type TSize;
+	typedef SumList<2, TSize> TSumlist;
+	typedef typename Iterator<TSumlist>::Type TSumlistIterator;
+	TGaps & gaps = const_cast<TGaps &>(gaps_);
+
+	SEQAN_ASSERT(pos >= clippedBeginPosition(gaps))
+	pos -= clippedBeginPosition(gaps);
+
+	if (pos >= getSum(gaps.data_sumlist, 1))
+	{
+		return endPosition(gaps);
+	}
+
+	TSumlistIterator it(gaps.data_sumlist);
+	searchSumList(it, pos, 1);
+	return getSum(it, 0) + getValue(it, 0) - (getSum(it, 1) + getValue(it, 1)) + pos;
+}
+
+//____________________________________________________________________________
+// transformates view- to source-position. (aufgerundet!)
+template <typename TSource>
+inline typename Position<TSource>::Type
+toSourcePosition(Gaps<TSource, SumlistGaps> const & gaps,
+				 typename Position< Gaps<TSource, SumlistGaps> >::Type pos)
+{
+SEQAN_CHECKPOINT
+	typedef Gaps<TSource, SumlistGaps> const TGaps;
+	typedef typename Size<TGaps>::Type TSize;
+	typedef SumList<2, TSize> const TSumlist;
+	typedef typename Iterator<TSumlist>::Type TSumlistIterator;
+	TSumlistIterator it(gaps.data_sumlist);
+	searchSumList(it, pos, 0);
+
+	TSize dif = getValue(it, 0) - getValue(it, 1);
+
+	if (pos - getSum(it, 0) > dif)
+	{//view position within a non-gap
+		return clippedBeginPosition(gaps) + getSum(it, 1) + (pos - getSum(it, 0) - dif);
+	}
+	else
+	{//view position within a gap
+		return clippedBeginPosition(gaps) + getSum(it, 1);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+template <typename TSource, typename TTag>
+inline typename Iterator<Gaps<TSource, SumlistGaps>, Tag<TTag> const>::Type
+begin(Gaps<TSource, SumlistGaps> & gaps,
+	  Tag<TTag> const)
+{
+SEQAN_CHECKPOINT
+	typedef Gaps<TSource, SumlistGaps> TGaps;
+	typedef typename Iterator<TGaps, Tag<TTag> const>::Type TGapsIterator;
+	return TGapsIterator(gaps);
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TPosition, typename TTag>
+inline typename Iterator<Gaps<TSource, SumlistGaps>, Tag<TTag> const>::Type
+iter(Gaps<TSource, SumlistGaps> & gaps,
+	 TPosition view_pos,
+	 Tag<TTag> const)
+{
+SEQAN_CHECKPOINT
+	typedef Gaps<TSource, SumlistGaps> TGaps;
+	typedef typename Iterator<TGaps, Tag<TTag> const>::Type TGapsIterator;
+	return TGapsIterator(gaps, view_pos);
+}
+template <typename TSource, typename TPosition, typename TTag>
+inline typename Iterator<Gaps<TSource, SumlistGaps> const, Tag<TTag> const>::Type
+iter(Gaps<TSource, SumlistGaps> const & gaps,
+	 TPosition view_pos,
+	 Tag<TTag> const)
+{
+SEQAN_CHECKPOINT
+	typedef Gaps<TSource, SumlistGaps> TGaps;
+	typedef typename Iterator<TGaps const, Tag<TTag> >::Type TGapsIterator;
+	return TGapsIterator(const_cast<TGaps &>(gaps), view_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TSource, typename TPosition>
+inline void
+setBeginPosition(Gaps<TSource, SumlistGaps> & me,
+				 TPosition view_position)
+{
+SEQAN_CHECKPOINT
+	typedef Gaps<TSource, SumlistGaps> TGaps;
+	typedef typename Size<TGaps>::Type TSize;
+	typedef SumList<2, TSize> TSumlist;
+	typedef typename Iterator<TSumlist>::Type TSumlistIterator;
+	TSumlistIterator it(me.data_sumlist);
+
+	assignValue(it, 0, getValue(it, 1) + view_position);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//Funktion gibt die Zahl, um die sich die view_positions verschieben zurueck.
+
+template <typename TSource, typename TPosition>
+inline typename Size< Gaps<TSource, SumlistGaps> >::Type
+setClippedBeginPosition(Gaps<TSource, SumlistGaps> & me,
+					   TPosition source_position)
+{
+	typedef Gaps<TSource, SumlistGaps> TGaps;
+	typedef typename Size<TGaps>::Type TSize;
+	typedef SumList<2, TSize> TSumlist;
+	typedef typename Position<TSource>::Type TSourcePosition;
+	typedef typename Iterator<TSumlist>::Type TSumlistIterator;
+	typedef SumListValues<2, TSize> TValues;
+
+	TSourcePosition old_begin_position = clippedBeginPosition(me);
+
+	TSize ret_value = 0;
+
+	if ((TSourcePosition) source_position < old_begin_position)
+	{//expand to left
+		TSumlistIterator it(me.data_sumlist);
+		TSize new_block_size = getValue(it, 1) + (old_begin_position - source_position);
+		//are there enough trailing blanks?
+		if (getValue(it, 0) < new_block_size)
+		{//not enough trailing blanks: move view positions!
+			ret_value = new_block_size - getValue(it, 0); //the amount the view positions are moved
+			assignValue(it, 0, new_block_size);
+		}
+		assignValue(it, 1, new_block_size);
+	}
+	else if ((TSourcePosition) source_position > old_begin_position)
+	{//shrink left
+
+		TSize pos_change = source_position - old_begin_position;
+
+		//sum all values up to the new source_position
+		TSumlistIterator it(me.data_sumlist);
+		TValues vals;
+
+		while (vals[1] + getValue(it, 1) < pos_change)
+		{
+			vals += getValues(it);
+			removeValues(it);
+		}
+		//add the collected gaps to the first block
+		assignValue(it, 0, getValue(it, 0) + vals[0] );
+		assignValue(it, 1, getValue(it, 1) - (pos_change - vals[1]));
+	}
+	else
+	{//nothing to do
+		return 0;
+	}
+
+	_setClippedBeginPosition(me, source_position);
+
+	return ret_value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TPosition>
+inline void
+setClippedEndPosition(Gaps<TSource, SumlistGaps> & me,
+					 TPosition source_position)
+{
+	typedef Gaps<TSource, SumlistGaps> TGaps;
+	typedef typename Size<TGaps>::Type TSize;
+	typedef SumList<2, TSize> TSumlist;
+	typedef typename Position<TSource>::Type TSourcePosition;
+	typedef typename Iterator<TSumlist>::Type TSumlistIterator;
+	typedef SumListValues<2, TSize> TValues;
+
+	TSourcePosition old_end_position = clippedEndPosition(me);
+
+	if (old_end_position < (TSourcePosition) source_position)
+	{//expand end to right: just add the difference to the last block
+		TSumlistIterator it(me.data_sumlist);
+		goBeforeEnd(it);
+		assignValue(it, 0, getValue(it, 0) + source_position - old_end_position);
+		assignValue(it, 1, getValue(it, 1) + source_position - old_end_position);
+	}
+	else if (old_end_position > (TSourcePosition) source_position)
+	{//shrink end to left
+		TSumlistIterator it(me.data_sumlist);
+
+		//ajust the new last block
+		searchSumList(it, source_position - clippedBeginPosition(me), 1);
+		TSize diff = getValue(it, 1) + getSum(it, 1) - source_position + clippedBeginPosition(me);
+		assignValue(it, 0, getValue(it, 0) - diff);
+		assignValue(it, 1, getValue(it, 1) - diff);
+
+		//remove all follwing blocks
+		goNext(it);
+		while (!atEnd(it))
+		{
+			removeValues(it);
+		}
+	}
+	else 
+	{//nothing to do
+		return;
+	}
+
+	_setClippedEndPosition(me, source_position);
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TGaps>
+struct SumListOfGaps_
+{
+	typedef typename Size<TGaps>::Type TSize_;
+	typedef SumList<2, TSize_> Type;
+};
+
+template <typename TGaps>
+struct SumListOfGaps_<TGaps const>
+{
+	typedef typename Size<TGaps const>::Type TSize_;
+	typedef SumList<2, TSize_> const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Gaps Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps>
+class Iter<TGaps, GapsIterator<SumlistGaps> >
+{
+public:
+	typedef typename Size<TGaps>::Type TSize;
+	typedef typename SumListOfGaps_<TGaps>::Type TSumlist;
+//	typedef SumList<2, TSize> TSumlist;
+	typedef typename Iterator<TSumlist>::Type TSumlistIterator;
+
+	TGaps * data_container;							//the gaps object
+	mutable TSumlistIterator iter;			
+	mutable TSize pos;
+
+public:
+	Iter() 
+	{
+SEQAN_CHECKPOINT
+	}
+	Iter(Iter const & other_):
+		data_container(other_.data_container),
+		iter(other_.iter),
+		pos(other_.pos)
+	{
+SEQAN_CHECKPOINT
+	}
+	Iter(TGaps & container_, TSize view_position):
+		data_container(& container_),
+		iter(container_.data_sumlist)
+	{
+SEQAN_CHECKPOINT
+		searchSumList(iter, view_position, 0);
+		pos = view_position - getSum(iter, 0);
+	}
+
+	~Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter const & operator = (Iter const & other_)
+	{
+SEQAN_CHECKPOINT
+		data_container = other_.data_container;
+		iter = other_.iter;
+		pos = other_.pos;
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps>
+struct Source< Iter<TGaps, GapsIterator<SumlistGaps> > >
+{
+	typedef typename Source<TGaps>::Type TGapsSource_;
+	typedef typename Iterator<TGapsSource_>::Type Type;
+};
+template <typename TGaps>
+struct Source< Iter<TGaps, GapsIterator<SumlistGaps> > const>
+{
+	typedef typename Source<TGaps>::Type TGapsSource_;
+	typedef typename Iterator<TGapsSource_>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps>
+inline typename GetValue< Iter<TGaps, GapsIterator<SumlistGaps> > >::Type
+getValue(Iter<TGaps, GapsIterator<SumlistGaps> > & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<Iter<TGaps, GapsIterator<SumlistGaps> > >::Type TValue;
+	if (isGap(me)) return gapValue<TValue>();
+	else return getValue(source(* me.data_container), sourcePosition(me));
+}
+template <typename TGaps>
+inline typename GetValue< Iter<TGaps, GapsIterator<SumlistGaps> > const>::Type
+getValue(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<Iter<TGaps, GapsIterator<SumlistGaps> > const>::Type TValue;
+	if (isGap(me)) return gapValue<TValue>();
+	else return getValue(source(* me.data_container), sourcePosition(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps>
+inline typename Position<TGaps>::Type
+viewPosition(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	return getSum(me.iter, 0) + me.pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps>
+inline typename Position<TGaps>::Type
+sourcePosition(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	if (isGap(me))
+	{
+		return getSum(me.iter, 1) + me.data_container->clipped_source_begin;
+	}
+	else
+	{
+		return getSum(me.iter, 1) + (me.pos - (getValue(me.iter, 0) - getValue(me.iter, 1))) + me.data_container->clipped_source_begin;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps>
+inline typename Source<Iter<TGaps, GapsIterator<SumlistGaps> > >::Type /*returns copy*/
+source(Iter<TGaps, GapsIterator<SumlistGaps> > & me)
+{
+SEQAN_CHECKPOINT
+	return begin(source(*me.data_container)) +  sourcePosition(me);
+}
+template <typename TGaps>
+inline typename Source<Iter<TGaps, GapsIterator<SumlistGaps> > const>::Type /*returns copy*/
+source(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	return begin(source(*me.data_container)) + sourcePosition(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps>
+inline bool 
+isGap(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	return (atEnd(me.iter) || (me.pos < (getValue(me.iter, 0) - getValue(me.iter, 1))));
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps>
+inline typename Size<TGaps>::Type
+countGaps(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+	if (!atEnd(me) && isGap(me))
+	{
+		return getValue(me.iter, 0) - getValue(me.iter, 1) - me.pos;
+	}
+	else
+	{
+SEQAN_CHECKPOINT
+		return 0;
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename T>
+inline void 
+_goNextSumlistGapsIterator(T & me)
+{
+	++me.pos;
+	if (atEnd(me.iter)) return;
+
+	if (getValue(me.iter, 0) > me.pos) return;
+
+	me.pos = 0;
+	goNext(me.iter);
+}
+template <typename TGaps>
+inline void 
+goNext(Iter<TGaps, GapsIterator<SumlistGaps> > & me)
+{
+	_goNextSumlistGapsIterator(me);
+}
+template <typename TGaps>
+inline void 
+goNext(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+	_goNextSumlistGapsIterator(me);
+}
+
+//____________________________________________________________________________
+
+template <typename T>
+inline void 
+_goPreviousSumlistGapsIterator(T & me)
+{
+	if (me.pos > 0)
+	{
+SEQAN_CHECKPOINT
+		--me.pos;
+	}
+	else
+	{
+		searchSumList(me.iter, getSum(me.iter, 0) - 1, 0);
+		me.pos = getValue(me.iter, 0) - 1;
+	}
+}
+template <typename TGaps>
+inline void 
+goPrevious(Iter<TGaps, GapsIterator<SumlistGaps> > & me)
+{
+	_goPreviousSumlistGapsIterator(me);
+}
+template <typename TGaps>
+inline void 
+goPrevious(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+	_goPreviousSumlistGapsIterator(me);
+}
+//____________________________________________________________________________
+
+template <typename TGaps>
+inline bool 
+atBegin(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	return (atBegin(me.iter) && (me.pos == 0));
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps>
+inline bool 
+atEnd(Iter<TGaps, GapsIterator<SumlistGaps> > const & me)
+{
+SEQAN_CHECKPOINT
+	return (atEnd(me.iter));
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TCount>
+inline void
+insertGaps(Iter<TGaps, GapsIterator<SumlistGaps> > const & me,
+		   TCount size)
+{
+	typedef typename Size<TGaps>::Type TSize;
+
+	if (atEnd(me)) return;
+
+	if (getValue(me.iter, 0) - getValue(me.iter, 1) >= me.pos)
+	{//gap verlaengern
+		assignValue(me.iter, 0, getValue(me.iter, 0) + size); 
+	}
+	else
+	{
+		//new left block: 
+		TSize vals[2];
+		vals[0] = me.pos;
+		vals[1] = me.pos - (getValue(me.iter, 0) - getValue(me.iter, 1));
+
+		//adjust the current block
+		assignValue(me.iter, 0, getValue(me.iter, 0) - vals[0] + size);
+		assignValue(me.iter, 1, getValue(me.iter, 1) - vals[1]);
+
+		//insert the new block before the current block
+		insertValues(me.iter, vals);
+
+		//move iterator again to beginning of next block
+		goNext(me.iter);
+		me.pos = 0;
+	}
+
+}
+
+//____________________________________________________________________________
+
+//delete up to size gaps 
+	
+template <typename TGaps, typename TCount>
+inline void
+removeGaps(Iter<TGaps, GapsIterator<SumlistGaps> > const & me,
+		   TCount _size)
+{
+	typedef typename Size<TGaps>::Type TSize;
+	typedef typename SumListOfGaps_<TGaps>::Type TSumlist;
+	typedef typename Iterator<TSumlist>::Type TSumlistIterator;
+
+	TCount gaps_here = countGaps(me);
+	if (gaps_here < _size) _size = gaps_here;
+	if (_size)
+	{
+		TSize new_size = getValue(me.iter, 0) - _size;
+		if (new_size > getValue(me.iter, 1))
+		{//ok, there are still blanks at the beginning of this block. Just assign new block width
+			assignValue(me.iter, 0, new_size);
+			return;
+		}
+		//there are not enough blanks, i.e. the complete gap was deleted
+		//is this the first block? if yes, nothing more to do
+		if (me == begin(container(me))) return; 
+
+		//this is not the first block, so it must be merged with the block before this block
+		//find the preceding block
+		TSumlistIterator it_before = me.iter;
+		goPrevious(it_before); //this involves a search, alas!
+
+		//adjust the pos-member of me:
+		me.pos += getValue(it_before, 0);
+
+		//add the current block size to it
+		assignValue(it_before, 0, getValue(it_before, 0) + new_size);
+		assignValue(it_before, 1, getValue(it_before, 1) + new_size);
+
+		//remove the current block
+		removeValues(me.iter);
+
+		//adjust me (me.pos was already adjusted)
+		me.iter = it_before;
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator == (Iter<TGaps1, GapsIterator<SumlistGaps> > & _left, 
+			 Iter<TGaps2, GapsIterator<SumlistGaps> > & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.iter == _right.iter) && (_left.pos == _right.pos);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator == (Iter<TGaps1, GapsIterator<SumlistGaps> > const & _left, 
+			 Iter<TGaps2, GapsIterator<SumlistGaps> > & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.iter == _right.iter) && (_left.pos == _right.pos);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator == (Iter<TGaps1, GapsIterator<SumlistGaps> > & _left, 
+			 Iter<TGaps2, GapsIterator<SumlistGaps> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.iter == _right.iter) && (_left.pos == _right.pos);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator == (Iter<TGaps1, GapsIterator<SumlistGaps> > const & _left, 
+			 Iter<TGaps2, GapsIterator<SumlistGaps> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.iter == _right.iter) && (_left.pos == _right.pos);
+}
+//____________________________________________________________________________
+
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator != (Iter<TGaps1, GapsIterator<SumlistGaps> > & _left, 
+			 Iter<TGaps2, GapsIterator<SumlistGaps> > & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.iter != _right.iter) || (_left.pos != _right.pos);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator != (Iter<TGaps1, GapsIterator<SumlistGaps> > const & _left, 
+			 Iter<TGaps2, GapsIterator<SumlistGaps> > & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.iter != _right.iter) || (_left.pos != _right.pos);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator != (Iter<TGaps1, GapsIterator<SumlistGaps> > & _left, 
+			 Iter<TGaps2, GapsIterator<SumlistGaps> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.iter != _right.iter) || (_left.pos != _right.pos);
+}
+template <typename TGaps1, typename TGaps2>
+inline bool
+operator != (Iter<TGaps1, GapsIterator<SumlistGaps> > const & _left, 
+			 Iter<TGaps2, GapsIterator<SumlistGaps> > const & _right)
+{
+SEQAN_CHECKPOINT
+	return (_left.iter != _right.iter) || (_left.pos != _right.pos);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/align/hirschberg_set.h b/src/SeqAn-1.3/seqan/align/hirschberg_set.h
new file mode 100644
index 0000000..1da6648
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/hirschberg_set.h
@@ -0,0 +1,223 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_HIRSCHBERG_SET_H
+#define SEQAN_HEADER_HIRSCHBERG_SET_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+class _HirschbergSet
+{
+
+public:
+	int x1,x2,y1,y2;
+	int score;
+
+public:
+	_HirschbergSet()
+		: x1(0),x2(0),y1(0),y2(0)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	_HirschbergSet(int a1,int a2,int b1,int b2,int sc)
+		: x1(a1),x2(a2),y1(b1),y2(b2),score(sc)
+	{
+SEQAN_CHECKPOINT
+		SEQAN_ASSERT(a1 <= b1);
+		SEQAN_ASSERT(a2 <= b2);
+	}
+
+	_HirschbergSet & 
+	operator = (_HirschbergSet const & other_)
+	{
+SEQAN_CHECKPOINT
+		x1 = other_.x1;
+		x2 = other_.x2;
+		y1 = other_.y1;
+		y2 = other_.y2;
+		score = other_.score;
+		return *this;
+	}
+
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+// Accessor Methods
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+	// Sequence 1
+
+
+inline 
+int& 
+_begin1(_HirschbergSet & me) {
+	SEQAN_CHECKPOINT
+	return me.x1;
+}
+
+
+inline 
+int const& 
+_begin1(_HirschbergSet const & me) {
+	SEQAN_CHECKPOINT
+	return me.x1;
+}
+
+inline 
+void
+_setBegin1(_HirschbergSet & me, int const & new_begin) {
+	SEQAN_CHECKPOINT
+	me.x1 = new_begin;
+}
+
+inline 
+int&
+_end1(_HirschbergSet & me) {
+	SEQAN_CHECKPOINT
+	return me.x2;
+}
+
+inline 
+int const& 
+_end1(_HirschbergSet const & me) {
+	SEQAN_CHECKPOINT
+	return me.x2;
+}
+
+inline 
+void
+_setEnd1(_HirschbergSet & me, int const & new_end) {
+	SEQAN_CHECKPOINT
+	me.x2 = new_end;
+}
+
+// Sequence 2
+
+inline int&
+_begin2(_HirschbergSet & me) {
+	SEQAN_CHECKPOINT
+	return me.y1;
+}
+
+inline 
+int const&
+_begin2(_HirschbergSet const & me) {
+	SEQAN_CHECKPOINT
+	return me.y1;
+}
+
+inline 
+void
+_setBegin2(_HirschbergSet & me, int const & new_begin) {
+	SEQAN_CHECKPOINT
+	me.y1 = new_begin;
+}
+
+inline 
+int&
+_end2(_HirschbergSet & me) {
+	SEQAN_CHECKPOINT
+	return me.y2;
+}
+
+inline 
+int const&
+_end2(_HirschbergSet const & me) {
+	SEQAN_CHECKPOINT
+	return me.y2;
+}
+
+inline 
+void
+_setEnd2(_HirschbergSet & me, int const & new_end) {
+	SEQAN_CHECKPOINT
+	me.y2 = new_end;
+}
+
+// //////////////////////////////////////////////////////////////////////////////////////////////
+// Score Methods
+// //////////////////////////////////////////////////////////////////////////////////////////////
+
+inline 
+int&
+_score(_HirschbergSet & me)	{
+	SEQAN_CHECKPOINT
+	return me.score;
+}
+
+inline 
+int const&
+_score(_HirschbergSet const & me) {
+	SEQAN_CHECKPOINT
+	return me.score;
+}
+
+inline 
+void
+_setScore(_HirschbergSet & me,int new_score) {
+	SEQAN_CHECKPOINT
+	me.score = new_score;
+}
+
+// //////////////////////////////////////////////////////////////////////////////////////////////
+//  Debug Methods
+//		functions are only used for debugging or verbose output, therefore they
+//      are only active in SEQAN_DEBUG
+// //////////////////////////////////////////////////////////////////////////////////////////////
+#ifdef SEQAN_DEBUG
+	
+inline 
+void
+print(_HirschbergSet const & me) {
+	std::cout << me.x1 << " " << me.x2 << "\t" << me.y1 << " " << me.y2 << std::endl;
+}
+#endif
+
+
+
+inline bool
+operator == (_HirschbergSet const & lhs, 
+		_HirschbergSet const & rhs)
+{
+	return ((_begin1(lhs) == _begin1(rhs)) && (_end1(lhs) == _end1(rhs)) && (_begin2(lhs) == _begin2(rhs)) && (_end2(lhs) == _end2(rhs)));
+}
+
+}
+
+#endif // #ifndef SEQAN_HEADER_HIRSCHBERG_SET_H
diff --git a/src/SeqAn-1.3/seqan/align/matrix_base.h b/src/SeqAn-1.3/seqan/align/matrix_base.h
new file mode 100644
index 0000000..5be4920
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/align/matrix_base.h
@@ -0,0 +1,1106 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+//  Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+//  Simple matrices;  Used in many alignment algorithms.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MATRIX_BASE_H
+#define SEQAN_HEADER_MATRIX_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct NDimensional;
+
+
+template <typename TValue, unsigned DIMENSION = 0/*typename TSpec = NDimensional*/>
+class Matrix;
+
+//////////////////////////////////////////////////////////////////////////////
+template <typename T> struct SizeArr_;
+
+template <typename TValue, unsigned DIMENSION>
+struct SizeArr_<Matrix<TValue, DIMENSION> >
+{
+	typedef Matrix<TValue, DIMENSION> TMatrix_;
+	typedef typename Size<TMatrix_>::Type TSize_;
+	typedef String<TSize_> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION>
+struct Host<Matrix<TValue, DIMENSION> >
+{
+	typedef String<TValue> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.Matrix:
+..cat:Miscellaneous
+..summary:A simple n-dimensional matrix type.
+..signature:Matrix<TValue, unsigned DIMENSION = 0>
+..param.TValue:Type of matrix entries.
+..param.unsigned DIMENSION:The specializing type (0: NDimensional matrix; 2: two dimensional matrix).
+..remarks: The following operators and functions are supported: A*B, A*a, A+B,A-B,<<, transpose
+..include:seqan/align.h
+*/
+
+
+template <typename TValue>
+class Matrix<TValue, 0>
+{
+//____________________________________________________________________________
+
+public:
+	typedef typename Size<Matrix>::Type TSize;
+	typedef String<TSize> TSizeArr;
+	typedef String<TValue> THost;
+
+	TSizeArr data_lengths;		//Length of every dimension
+	TSizeArr data_factors;		//used for positions of dimensions in host ("size of jumps" to get to next entry of specified dimension)
+
+	Holder<THost> data_host;
+//____________________________________________________________________________
+
+public:
+	Matrix()
+	{
+		create(data_host);
+	}
+	Matrix(Matrix const & other_):
+		data_lengths(other_.data_lengths),
+		data_factors(other_.data_factors),
+		data_host(other_.data_host)
+	{
+	}
+	inline Matrix const &
+	operator = (Matrix const & other_)
+	{
+		data_lengths = other_.data_lengths;
+		data_factors = other_.data_factors;
+		data_host = other_.data_host;
+
+		return *this;
+	}
+	~Matrix()
+	{
+	}
+//____________________________________________________________________________
+
+
+//____________________________________________________________________________
+
+	inline TValue & 
+	operator () (TSize x1, TSize x2)
+	{
+		return value(*this, x1, x2);
+	}
+	inline TValue & 
+	operator () (TSize x1, TSize x2, TSize x3)
+	{
+		return value(*this, x1, x2, x3);
+	}
+	inline TValue & 
+	operator () (TSize x1, TSize x2, TSize x3, TSize x4)
+	{
+		return value(*this, x1, x2, x3, x4);
+	}
+
+//____________________________________________________________________________
+};
+
+
+template <typename TValue>
+class Matrix<TValue, 2>
+{
+//____________________________________________________________________________
+
+public:
+	typedef typename Size<Matrix>::Type TSize;
+	typedef String<TSize> TSizeArr;
+	typedef String<TValue> THost;
+
+	TSizeArr data_lengths;
+	TSizeArr data_factors;
+
+	Holder<THost> data_host;
+
+
+//____________________________________________________________________________
+
+public:
+	Matrix()
+	{
+		create(data_host);
+
+		//setDimension to 2
+		resize(data_lengths, 2, 0);
+		resize(data_factors, 2);
+		data_factors[0] = 1;
+	}
+	Matrix(Matrix const & other_):
+		data_lengths(other_.data_lengths),
+		data_factors(other_.data_factors),
+		data_host(other_.data_host)
+	{
+	}
+	inline Matrix const &
+	operator = (Matrix const & other_)
+	{
+		data_lengths = other_.data_lengths;
+		data_factors = other_.data_factors;
+		data_host = other_.data_host;
+
+		return *this;
+	}
+
+	~Matrix()
+	{
+	}
+//____________________________________________________________________________
+
+
+//____________________________________________________________________________
+
+	inline TValue &
+	operator () (TSize x1, TSize x2)
+	{
+		return value(*this, x1, x2);
+	}
+
+//____________________________________________________________________________
+};
+
+template <typename TValue>
+class Matrix<TValue, 3>
+{
+//____________________________________________________________________________
+
+public:
+	typedef typename Size<Matrix>::Type TSize;
+	typedef String<TSize> TSizeArr;
+	typedef String<TValue> THost;
+
+	TSizeArr data_lengths;
+	TSizeArr data_factors;
+
+	Holder<THost> data_host;
+
+
+//____________________________________________________________________________
+
+public:
+	Matrix()
+	{
+		create(data_host);
+
+		//setDimension to 3
+		resize(data_lengths, 3, 0);
+		resize(data_factors, 3);
+		data_factors[0] = 1;
+	}
+	Matrix(Matrix const & other_):
+		data_lengths(other_.data_lengths),
+		data_factors(other_.data_factors),
+		data_host(other_.data_host)
+	{
+	}
+	inline Matrix const &
+	operator = (Matrix const & other_)
+	{
+		data_lengths = other_.data_lengths;
+		data_factors = other_.data_factors;
+		data_host = other_.data_host;
+
+		return *this;
+	}
+
+	~Matrix()
+	{
+	}
+//____________________________________________________________________________
+
+
+//____________________________________________________________________________
+
+	inline TValue &
+	operator () (TSize x1, TSize x2, TSize x3)
+	{
+		return value(*this, x1, x2, x3);
+	}
+
+//____________________________________________________________________________
+};
+
+template <typename TValue, unsigned DIMENSION>
+inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type &
+_dataLengths(Matrix<TValue, DIMENSION> & me)
+{
+	return me.data_lengths;
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type const &
+_dataLengths(Matrix<TValue, DIMENSION> const & me)
+{
+	return me.data_lengths;
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type &
+_dataFactors(Matrix<TValue, DIMENSION> & me)
+{
+	return me.data_factors;
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type &
+_dataFactors(Matrix<TValue, DIMENSION> const & me)
+{
+	return me.data_factors;
+}
+
+//____________________________________________________________________________
+
+
+template <typename TValue, unsigned DIMENSION>
+inline bool
+dependent(Matrix<TValue, DIMENSION> & me)
+{
+	return dependent(me.data_host);
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline void
+setHost(Matrix<TValue, DIMENSION> & me, THost & host_)
+{
+	setValue(me.data_host, host_);
+}
+
+//____________________________________________________________________________
+
+
+template <typename TValue, unsigned DIMENSION>
+inline typename Host<Matrix<TValue, DIMENSION> >::Type &
+host(Matrix<TValue, DIMENSION> & me)
+{
+	return value(me.data_host);
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline typename Host<Matrix<TValue, DIMENSION> >::Type const &
+host(Matrix<TValue, DIMENSION> const & me)
+{
+	return value(me.data_host);
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline void
+assignHost(Matrix<TValue, DIMENSION> & me, THost const & value_)
+{
+	assignValue(me.data_host, value_);
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline void
+moveHost(Matrix<TValue, DIMENSION> & me, THost const & value_)
+{
+	moveValue(me.data_host, value_);
+}
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION>
+struct Value< Matrix<TValue, DIMENSION> >
+{
+	typedef TValue Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION, typename TIteratorSpec>
+struct Iterator< Matrix<TValue, DIMENSION>, TIteratorSpec >
+{
+	typedef Iter<Matrix<TValue, DIMENSION>, PositionIterator> Type;
+};
+
+template <typename TValue, unsigned DIMENSION, typename TIteratorSpec>
+struct Iterator< Matrix<TValue, DIMENSION> const, TIteratorSpec >
+{
+	typedef Iter<Matrix<TValue, DIMENSION> const, PositionIterator> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION>
+inline unsigned int
+dimension(Matrix<TValue, DIMENSION> & me)
+{
+	return length(_dataLengths(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+setDimension(Matrix<TValue, DIMENSION> & me,
+			 unsigned int dim_)
+{
+
+	SEQAN_ASSERT(dim_ > 0)
+//std::cout<<"\npress enter1\n";
+//std::cin.get();
+	resize(_dataLengths(me), dim_, 0);
+
+	resize(_dataFactors(me), dim_);
+	_dataFactors(me)[0] = 1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION>
+inline typename Size<Matrix<TValue, DIMENSION> >::Type
+length(Matrix<TValue, DIMENSION> const & me,
+	   unsigned int dim_)
+{
+	return me.data_lengths[dim_];
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline typename Size<Matrix <TValue, DIMENSION> >::Type
+length(Matrix<TValue, DIMENSION> const & me)
+{
+	return length(host(me));
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline bool empty(Matrix<TValue, DIMENSION> const & me)
+{
+	return empty(host(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION, typename TSize>
+inline void
+setLength(Matrix<TValue, DIMENSION> & me,
+		  unsigned int dim_,
+		  TSize length_)
+{
+	SEQAN_ASSERT(length_ > 0);
+	SEQAN_ASSERT(dim_ < dimension(me));
+
+	_dataLengths(me)[dim_] = length_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+resize(Matrix<TValue, DIMENSION> & me)
+{
+	typedef Matrix<TValue, DIMENSION> TMatrix;
+	typedef typename Size<TMatrix>::Type TSize;
+
+	unsigned int dimension_ = dimension(me);
+
+	SEQAN_ASSERT(dimension_ > 0);
+
+	TSize factor_ = _dataFactors(me)[0] * length(me, 0);
+	for (unsigned int i = 1; (factor_ > 0) && (i < dimension_); ++i)
+	{
+		_dataFactors(me)[i] = factor_;
+		factor_ *= length(me, i);
+	}
+
+	if (factor_ > 0)
+	{
+		resize(host(me), factor_);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION, typename TFillValue>
+inline void
+resize(Matrix<TValue, DIMENSION> & me, TFillValue myValue)	//resize the matrix and fill with value
+{
+	typedef Matrix<TValue, DIMENSION> TMatrix;
+	typedef typename Size<TMatrix>::Type TSize;
+
+	unsigned int dimension_ = dimension(me);
+
+	SEQAN_ASSERT(dimension_ > 0);
+
+	TSize factor_ = _dataFactors(me)[0] * length(me, 0);
+	for (unsigned int i = 1; (factor_ > 0) && (i < dimension_); ++i)
+	{
+		_dataFactors(me)[i] = factor_;
+		factor_ *= length(me, i);
+	}
+
+	if (factor_ > 0)
+		resize(host(me), factor_, myValue);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION, typename TPosition>
+inline typename Position<Matrix <TValue, DIMENSION> >::Type
+nextPosition(Matrix<TValue, DIMENSION> & me,
+			 TPosition position_,
+			 unsigned int dimension_)
+{
+	return position_ + _dataFactors(me)[dimension_];
+}
+
+template <typename TValue, unsigned DIMENSION, typename TPosition>
+inline typename Position<Matrix <TValue, DIMENSION> >::Type
+nextPosition(Matrix<TValue, DIMENSION> const & me,
+			 TPosition position_,
+			 unsigned int dimension_)
+{
+	return position_ + _dataFactors(me)[dimension_];
+}
+
+template <typename TValue, unsigned DIMENSION, typename TPosition>
+inline typename Position<Matrix <TValue, DIMENSION> >::Type
+previousPosition(Matrix<TValue, DIMENSION> & me,
+				 TPosition position_,
+				 unsigned int dimension_)
+{
+	return position_ - _dataFactors(me)[dimension_];
+}
+
+template <typename TValue, unsigned DIMENSION, typename TPosition>
+inline typename Position<Matrix <TValue, DIMENSION> >::Type
+previousPosition(Matrix<TValue, DIMENSION> const & me,
+				 TPosition position_,
+				 unsigned int dimension_)
+{
+	return position_ - _dataFactors(me)[dimension_];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION, typename TPosition>
+inline typename Size< Matrix <TValue, DIMENSION> >::Type
+coordinate(Matrix<TValue, DIMENSION> & me,
+		   TPosition position_,
+		   unsigned int dimension_)
+{
+	SEQAN_ASSERT(dimension_ < dimension(me));
+
+	if (dimension_ < dimension(me) - 1)
+	{
+		return (position_ / _dataFactors(me)[dimension_]) % _dataFactors(me)[dimension_ + 1];
+	}
+	else
+	{
+		return position_ / _dataFactors(me)[dimension_];
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION, typename TTag>
+inline typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const>::Type
+begin(Matrix<TValue, DIMENSION> & me,
+	  Tag<TTag> const)
+{
+	return typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const >::Type(me, 0);
+}
+template <typename TValue, unsigned DIMENSION, typename TTag>
+inline typename Iterator<Matrix <TValue, DIMENSION> const, Tag<TTag> const>::Type
+begin(Matrix<TValue, DIMENSION> const & me,
+	  Tag<TTag> const)
+{
+	return typename Iterator<Matrix <TValue, DIMENSION> const, Tag<TTag> const >::Type(me, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION, typename TTag>
+inline typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const >::Type
+end(Matrix<TValue, DIMENSION> & me,
+	  Tag<TTag> const)
+{
+	return typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const >::Type(me, length(host(me)));
+}
+template <typename TValue, unsigned DIMENSION, typename TTag>
+inline typename Iterator<Matrix <TValue, DIMENSION> const, Tag<TTag> const >::Type
+end(Matrix<TValue, DIMENSION> const & me,
+	  Tag<TTag> const)
+{
+	return typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const >::Type(me, length(host(me)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION, typename TPosition>
+inline typename Reference<Matrix<TValue, DIMENSION> >::Type
+value(Matrix<TValue, DIMENSION> & me,
+	  TPosition position_)
+{
+	return value(host(me), position_);
+}
+
+//____________________________________________________________________________
+
+//two dimensional value access
+template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2>
+inline typename Reference<Matrix<TValue, DIMENSION> >::Type
+value(Matrix<TValue, DIMENSION> & me,
+	  TOrdinate1 i1,
+	  TOrdinate2 i2)
+{
+	return value(host(me), i1 + i2 * _dataFactors(me)[1]);
+}
+
+//____________________________________________________________________________
+
+//3 dimensional value access
+
+template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2, typename TOrdinate3>
+inline typename Reference<Matrix<TValue, DIMENSION> >::Type
+value(Matrix<TValue, DIMENSION> & me,
+	  TOrdinate1 i1, 
+	  TOrdinate2 i2,
+	  TOrdinate3 i3)
+{
+	return value(host(me), i1 + i2 * _dataFactors(me)[1] + i3 * _dataFactors(me)[2]);
+}
+
+//____________________________________________________________________________
+
+//4 dimensional value access
+
+template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2, typename TOrdinate3, typename TOrdinate4>
+inline typename Reference<Matrix<TValue, DIMENSION> >::Type
+value(Matrix<TValue, DIMENSION> & me,
+	  TOrdinate1 i1, 
+	  TOrdinate2 i2,
+	  TOrdinate3 i3,
+	  TOrdinate4 i4)
+{
+	return value(host(me), i1 + i2 * _dataFactors(me)[1] + i3 * _dataFactors(me)[2] + i4 * _dataFactors(me)[3]);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Iterator: goNext
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+goNext(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me,
+	   unsigned int dimension_)
+{
+	setPosition(me, nextPosition(container(me), position(me), dimension_));
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+goNext(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me,
+	   unsigned int dimension_)
+{
+	setPosition(me, nextPosition(container(me), position(me), dimension_));
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+goNext(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me)
+{
+	goNext(me, 0);
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+goNext(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me)
+{
+	goNext(me, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Iterator: goPrevious
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+goPrevious(Iter< Matrix<TValue, DIMENSION>, PositionIterator > & me,
+		   unsigned int dimension_)
+{
+	setPosition(me, previousPosition(container(me), position(me), dimension_));
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+goPrevious(Iter< Matrix<TValue, DIMENSION> const, PositionIterator > & me,
+		   unsigned int dimension_)
+{
+	setPosition(me, previousPosition(container(me), position(me), dimension_));
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+goPrevious(Iter< Matrix<TValue, DIMENSION>, PositionIterator > & me)
+{
+	goPrevious(me, 0);
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline void
+goPrevious(Iter< Matrix<TValue, DIMENSION> const, PositionIterator > & me)
+{
+	goPrevious(me, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goTo
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1>
+inline void
+goTo(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1)
+{
+    setPosition(me, pos0 + pos1 * _dataFactors(container(me))[1]);
+}
+
+
+template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1>
+inline void
+goTo(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1)
+{
+    setPosition(me, pos0 + pos1 * _dataFactors(container(me))[1]);
+}
+
+
+template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1, typename TPosition2>
+inline void
+goTo(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1, TPosition2 pos2)
+{
+    setPosition(me, pos0 + pos1 * _dataFactors(container(me))[1] + pos2 * _dataFactors(container(me))[2]);
+}
+
+
+template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1, typename TPosition2>
+inline void
+goTo(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1, TPosition2 pos2)
+{
+    setPosition(me, pos0 + pos1 * _dataFactors(container(me))[1] + pos2 * _dataFactors(container(me))[2]);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Iterator: coordinate
+
+template <typename TValue, unsigned DIMENSION>
+inline typename Size< Matrix<TValue, DIMENSION> >::Type
+coordinate(Iter<Matrix<TValue, DIMENSION>, PositionIterator > & me,
+		   unsigned int dimension_)
+{
+	return coordinate(container(me), position(me), dimension_);
+}
+
+template <typename TValue, unsigned DIMENSION>
+inline typename Size< Matrix<TValue, DIMENSION> >::Type
+coordinate(Iter<Matrix<TValue, DIMENSION> const, PositionIterator > & me,
+		   unsigned int dimension_)
+{
+	return coordinate(container(me), position(me), dimension_);
+}
+
+/*
+operator +
+Computes the matricial sum between two matrices
+..signature:Matrix +(matrix1,matrix2)
+..param.matrix1:The first matrix.
+...type:Class.Matrix
+..param.matrix2:The second matrix.
+...type:Class.Matrix
+..returns:The sum of the two matrices (another nxm matrix).
+..remarks:The number of rows and columns of matrix1 must be equal to the number of rows and columns of matrix2 (length of dimensions for NDimensional matrices)
+*/
+
+template <typename TValue,unsigned DIMENSION>
+Matrix<TValue,DIMENSION>
+operator + (Matrix<TValue,DIMENSION> const & matrix1,Matrix<TValue,DIMENSION> const & matrix2)
+{
+	//the two matrices must have same dimension
+	SEQAN_ASSERT(_dataLengths(matrix1)==_dataLengths(matrix2));
+
+	Matrix<TValue,DIMENSION> result;
+	//copy the first matrix
+	setDimension(result,length(_dataLengths(matrix1)));
+	_dataLengths(result) = _dataLengths(matrix1);
+	resize(result);
+
+	//add the matrices
+	for(unsigned int i = 0;i< length(host(result));++i)
+	{
+		value(host(result), i)=value(host(matrix1), i)+value(host(matrix2), i);
+	}
+	//Return matrix sum
+	return result;
+}
+
+template <typename TValue,unsigned DIMENSION>
+Matrix<TValue,DIMENSION>
+operator - (Matrix<TValue,DIMENSION> const & matrix1,Matrix<TValue,DIMENSION> const & matrix2)
+{
+	//the two matrices must have same dimension
+	SEQAN_ASSERT(_dataLengths(matrix1)==_dataLengths(matrix2))
+
+	Matrix<TValue,DIMENSION> result;
+	//resize the matrix
+	setDimension(result,length(_dataLengths(matrix1)));
+	_dataLengths(result) = _dataLengths(matrix1);
+	resize(result);
+
+	//subtract the matrices
+	for(unsigned int i = 0;i< length(host(result));++i)
+	{
+		value(host(result), i)=value(host(matrix1), i)-value(host(matrix2), i);
+	}
+	//Return matrix difference
+	return result;
+}
+
+template <typename TValue>
+Matrix<TValue, 2>
+operator * (Matrix<TValue, 2> const & matrix1, Matrix<TValue, 2> const & matrix2)
+{
+	SEQAN_ASSERT(length(matrix1,1) == length(matrix2,0))
+
+	unsigned int nrow1=length(matrix1,0);
+	unsigned int ncol2=length(matrix2,1);
+	Matrix<TValue, 2> result;
+	//resize the matrix
+	setLength(result, 0, nrow1);
+	setLength(result, 1, ncol2);
+	resize(result,(TValue) 0);
+
+	//Matrix product
+	for(unsigned int row = 0; row < nrow1; row++)
+	{
+		for(unsigned int col = 0; col < ncol2; col++)
+		{
+			for(unsigned int colRes = 0; colRes < length(matrix1,1); colRes++)
+			{
+				value(result,row,col)+=	value(host(matrix1), row + colRes * matrix1.data_factors[1])*value(host(matrix2), colRes + col * matrix2.data_factors[1]);
+			}
+		}
+	}
+	//return the matrix product
+	return result;
+}
+
+
+template <typename TValue>
+Matrix<TValue, 2>
+operator * (TValue const & scalar, Matrix<TValue, 2> const & matrix)
+{
+	Matrix<TValue, 2> result;
+	result= matrix;
+	//scalar multiplication
+	for(unsigned int i = 0;i< length(host(result));++i)
+	{
+		value(host(result), i)*=scalar;
+	}
+	//return the matrix product
+	return result;
+}
+
+template <typename TValue>
+Matrix<TValue, 2>
+operator * (Matrix<TValue, 2> const & matrix, TValue const & scalar)
+{
+	Matrix<TValue, 2> result;
+	result= matrix;
+	//scalar multiplication
+	for(unsigned int i = 0;i< length(host(result));++i)
+	{
+		value(host(result), i)*=scalar;
+	}
+	//return the matrix product
+	return result;
+}
+
+
+template <typename TValue, unsigned DIMENSION1, unsigned DIMENSION2>
+bool
+operator == (Matrix<TValue, DIMENSION1> const & matrix1, Matrix<TValue, DIMENSION2> const & matrix2)
+{
+	bool result;
+	result= (matrix1.data_lengths==matrix2.data_lengths)&&(matrix1.data_factors==matrix2.data_factors)&&(value(matrix1.data_host)==value(matrix2.data_host))&&(DIMENSION1==DIMENSION2);
+	return result;
+}
+/*
+.Function.matricialSum:
+..summary:Computes the matricial sum between two nxm matrixes
+..signature:matricialSum(matrix1,matrix2)
+..param.matrix1:The first matrix.
+...type:Matrix<TValue, 2>&
+..param.matrix2:The second matrix.
+...type:Matrix<TValue, 2>&
+..returns:The sum of the two matrices (another nxm matrix).
+..remarks:The number of rows and columns of matrix1 must be equal to the number of rows and columns of matrix2.
+..include:seqan/align.h
+*/
+/*
+template <typename TValue>
+Matrix<TValue,2>
+matricialSum(Matrix<TValue,2> &matrix1,Matrix<TValue,2> &matrix2)
+{
+	//the two matrices must have same dimension
+	if(length(matrix1,0) != length(matrix2,0)||length(matrix1,1) != length(matrix2,1))
+	{
+		fprintf(stderr,"Error: The two matrices have different dimensions");
+	}
+
+
+	unsigned int nrow=length(matrix1,0);
+	unsigned int ncol=length(matrix1,1);
+
+	Matrix<TValue,2> result;
+	//resize the matrix
+	setLength(result, 0, nrow);
+	setLength(result, 1, ncol);
+	resize(result);
+
+	//add the matrices
+	for(unsigned int i = 0;i< nrow*ncol;++i)
+	{
+		value(host(result), i)=value(host(matrix1), i)+value(host(matrix2), i);
+	}
+	//Return matrix difference
+	return result;
+
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+// _matricialDifference
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.matricialDifference:
+..summary:Computes the matricial difference between two matrixes
+..signature:matricialDifference(matrix1,matrix2)
+..param.matrix1:The first matrix.
+...type:Matrix<TValue, 2>&
+..param.matrix2:The second matrix.
+...type:Matrix<TValue, 2>&
+..returns:The difference of the two matrices (another matrix).
+..remarks:The number of rows and columns of matrix1 must be equal to the number of rows and columns of matrix2.
+..include:seqan/align.h
+*/
+/*
+template <typename TValue>
+inline Matrix<TValue,2>
+matricialDifference(Matrix<TValue,2> & matrix1, Matrix<TValue,2> & matrix2)
+{
+	//the two matrices must have same dimension
+	if(length(matrix1,0) != length(matrix2,0)||length(matrix1,1) != length(matrix2,1))
+	{
+		fprintf(stderr,"Error: The two matrices have different dimensions");
+	}
+
+	unsigned int nrow=length(matrix1,0);
+	unsigned int ncol=length(matrix1,1);
+
+	Matrix<TValue,2> result;
+	//resize the matrix
+	//setDimension(result, 2);
+	setLength(result, 0, nrow);
+	setLength(result, 1, ncol);
+	resize(result);
+
+	//Substract the matrices
+	for(unsigned int i1 = 0;i1< nrow;++i1)
+		{
+			for(unsigned int i2 = 0;i2<ncol;++i2)
+			{
+				value(host(result), i1 + i2 * _dataFactors(result)[1])=value(host(matrix1), i1 + i2 * _dataFactors(matrix1)[1])-value(host(matrix2), i1 + i2 * _dataFactors(matrix2)[1]);
+			}
+
+		}
+	//Return matrix difference
+	return result;
+}
+*/
+/*
+.Function.matricialProduct:
+..summary:Computes the matricial product between two 2-dimensional matrixes
+..signature:matricialProduct(matrix1,matrix2)
+..param.matrix1:The first matrix (mxn).
+...type:Matrix<TValue,2>&
+..param.matrix2:The second matrix (nxp).
+...type:Matrix<TValue,2>&
+..returns:The products of the two matrices (another matrix, mxp).
+..remarks:The number of columns of matrix1 (left matrix) must be equal to the number of rows of matrix2(right matrix).
+..include:seqan/align.h
+*/
+/*
+template <typename TValue>
+inline Matrix<TValue, 2>
+matricialProduct(Matrix<TValue, 2> &matrix1,
+		Matrix<TValue, 2> &matrix2)
+{
+	//SEQAN_ASSERT(dimension_ < dimension(me));
+	if(length(matrix1,1) != length(matrix2,0))
+	{
+		fprintf(stderr,"Error: Number of columns of matrix1 is unequal to number of rows of matrix2");
+	}
+
+	unsigned int nrow1=length(matrix1,0);
+	unsigned int ncol2=length(matrix2,1);
+	Matrix<TValue, 2> result;
+	//resize the matrix
+	setLength(result, 0, nrow1);
+	setLength(result, 1, ncol2);
+	resize(result,(TValue) 0);
+
+	//Matrix product
+	for(unsigned int row = 0; row < nrow1; row++)
+	{
+		for(unsigned int col = 0; col < ncol2; col++)
+		{
+			for(unsigned int colRes = 0; colRes < length(matrix1,1); colRes++)
+			{
+				value(result,row,col)+=value(matrix1, row,colRes)*value(matrix2,colRes,col);
+			}
+		}
+	}
+	//return the matrix product
+	return result;
+}
+*/
+// TODO(holtgrew): Should work as the graph-transpose.
+/**
+.Function.transpose:
+..Xsummary:Transposes matrix
+..signature:Matrix transpose(matrix)
+..param.matrix:The matrix (mxn) to transpose.
+...type:Class.Matrix
+...remarks: must be of type Matrix<TValue,2> (two dimensional)
+..returns:Transposed matrix
+..remarks:Only works on two dimensional matrices
+..include:seqan/align.h
+*/
+template <typename TValue>
+Matrix<TValue,2>
+transpose(Matrix<TValue,2> const & matrix)
+{
+
+	unsigned int nrow=length(matrix,0);
+	unsigned int ncol=length(matrix,1);
+
+	Matrix<TValue,2> result;
+	//resize the matrix
+	setLength(result, 0, ncol);
+	setLength(result, 1, nrow);
+	resize(result);
+
+
+	for(unsigned int i1 = 0;i1< nrow;++i1)
+	{
+		for(unsigned int i2 = 0;i2<ncol;++i2)
+		{
+			value(host(result), i2 + i1 * _dataFactors(result)[1])=value(host(matrix), i1 + i2 * matrix.data_factors[1]);
+		}
+
+	}
+
+	//Return transposed matrix
+	return result;
+
+}
+
+
+template < typename TValue >
+::std::ostream& operator<<(::std::ostream &out, const Matrix<TValue,2> &matrix)
+{
+	for(unsigned int i1 = 0;i1< matrix.data_lengths[0];++i1)
+	{
+			for(unsigned int i2 = 0;i2<(matrix.data_lengths[1]-1);++i2)
+			{
+				out<<value(host(matrix), i1 + i2 * matrix.data_factors[1])<<"\t";
+			}
+			//Last line is followd by \n instead of \t
+			out<<value(host(matrix), i1 + (matrix.data_lengths[1]-1) *matrix.data_factors[1])<<"\n";
+		}
+
+    return out;
+}
+//////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+///// READ
+/*
+ * TODO(goeke) only square matrices of fixed size can be read in...
+ */
+///////////////////////////////////////////////////////////////
+// template < typename TValue >
+// void read(FILE *file, Matrix<TValue,2> & matrix)
+// {
+// 	//unsigned int column_size=3;
+// 	unsigned int column_size=pow(4,5);
+// 	//read the transition matrix
+// 	setLength(matrix, 0, column_size);
+// 	setLength(matrix, 1, column_size);
+// resize(matrix,0.0);
+// 	for(unsigned int row=0; row<column_size; row++)
+// 	{
+// 		for(unsigned int col=0; col<column_size; col++)
+// 		{
+// 		  fscanf(file,"%lf ", & value(matrix, row,col));
+// 		}
+// 		fscanf(file,"\n");
+// 	}
+// }
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic.h b/src/SeqAn-1.3/seqan/basic.h
new file mode 100644
index 0000000..b887e53
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic.h
@@ -0,0 +1,142 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_H
+#define SEQAN_HEADER_BASIC_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <seqan/platform.h>
+
+//#include <cstring>
+#ifdef PLATFORM_WINDOWS
+#include <limits>	// limits include file exists only for g++ >= 3.0
+#endif
+
+#include <cstddef>	// size_t
+#include <cstdio>	// FILE, basic_debug
+#include <cstdlib>	// posix_memalign
+#include <ctime>
+#include <iterator>
+#include <algorithm>
+#include <cstring>  // memset, memcpy
+#include <string>	// basic_profile
+#ifdef PLATFORM_WINDOWS
+#include <malloc.h>	// _aligned_malloc
+#endif  // PLATFORM_WINDOWS
+
+#define SEQAN_NAMESPACE_MAIN seqan
+
+//____________________________________________________________________________
+
+#include <seqan/basic/basic_forwards.h>
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/basic/basic_generated_forwards.h>
+#endif
+
+#include <seqan/basic/basic_testing.h>
+#include <seqan/basic/basic_debug.h>
+#include <seqan/basic/basic_testing.h>  // new, better debug
+#include <seqan/basic/basic_profile.h>
+#include <seqan/basic/basic_parallelism.h>  // include after basic_testing.h!
+#include <seqan/basic/basic_metaprogramming.h>
+#include <seqan/basic/basic_definition.h>
+#include <seqan/basic/basic_type.h>
+#include <seqan/basic/basic_tag.h>
+
+//____________________________________________________________________________
+// allocators
+
+#include <seqan/basic/basic_allocator_interface.h>
+#include <seqan/basic/basic_allocator_to_std.h>
+
+#include <seqan/basic/basic_holder.h>
+
+#include <seqan/basic/basic_allocator_simple.h>
+#include <seqan/basic/basic_allocator_singlepool.h>
+#include <seqan/basic/basic_allocator_multipool.h>
+#include <seqan/basic/basic_allocator_chunkpool.h>
+
+//____________________________________________________________________________
+
+#include <seqan/basic/basic_converter.h>
+#include <seqan/basic/basic_compare.h>
+#include <seqan/basic/basic_operator.h>
+
+#include <seqan/basic/basic_host.h>
+
+//____________________________________________________________________________
+// iterators
+
+#include <seqan/basic/basic_iterator.h>
+#include <seqan/basic/basic_iterator_base.h>
+
+#include <seqan/basic/basic_transport.h>
+
+#include <seqan/basic/basic_iterator_simple.h>
+#include <seqan/basic/basic_iterator_adaptor.h>
+#include <seqan/basic/basic_iterator_position.h>
+#include <seqan/basic/basic_iterator_adapt_std.h>
+//#include <seqan/basic_identifier.h>
+
+#include <seqan/basic/basic_proxy.h>
+
+#include <seqan/basic/basic_pointer.h>
+
+//____________________________________________________________________________
+// alphabets
+
+#include <seqan/basic/basic_alphabet_interface.h>
+#include <seqan/basic/basic_alphabet_trait_basic.h>
+
+#include <seqan/basic/basic_alphabet_interface2.h>
+
+#include <seqan/basic/basic_alphabet_simple_tabs.h>
+#include <seqan/basic/basic_alphabet_simple.h>
+
+#include <seqan/basic/basic_sse2.h>
+
+#include <seqan/basic/basic_profchar.h>
+
+//____________________________________________________________________________
+
+#include <seqan/basic/basic_holder_dynamic.h>
+
+//____________________________________________________________________________
+
+//#include <seqan/basic/basic_counted_ptr>
+#include <seqan/basic/basic_volatile_ptr.h>
+
+#include <seqan/basic/basic_aggregates.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_aggregates.h b/src/SeqAn-1.3/seqan/basic/basic_aggregates.h
new file mode 100644
index 0000000..534ad8e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_aggregates.h
@@ -0,0 +1,732 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_AGGREGATES_H
+#define SEQAN_HEADER_BASIC_AGGREGATES_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//____________________________________________________________________________
+
+    struct Compressed_;
+	typedef Tag<Compressed_> Compressed;
+
+	template <unsigned BITSIZE1 = 16, unsigned BITSIZE2 = 16>
+	struct BitCompressed;
+
+/**
+.Class.Pair:
+..cat:Aggregates
+..summary:Stores two arbitrary objects.
+..signature:Pair<T1[, T2[, TSpec]]>
+..param.T1:The type of the first object.
+..param.T2:The type of the second object.
+...default:$T1$
+..param.TSpec:The specializing type.
+...default:$void$, no compression (faster access).
+.Memfunc.Pair#Pair:
+..class:Class.Pair
+..summary:Constructor
+..signature:Pair<T1, T2[, TSpec]> ()	
+..signature:Pair<T1, T2[, TSpec]> (pair)
+..signature:Pair<T1, T2[, TSpec]> (i1, i2)
+..param.pair:Other Pair object. (copy constructor)
+..param.i1:T1 object.
+..param.i2:T2 object.
+.Memvar.Pair#i1:
+..class:Class.Pair
+..summary:T1 object
+.Memvar.Pair#i2:
+..class:Class.Pair
+..summary:T2 object
+..include:seqan/basic.h
+*/
+
+	// standard storage 
+	template <typename T1_, typename T2_ = T1_, typename TSpec = void>
+    struct Pair {
+        typedef T1_ T1;
+        typedef T2_ T2;
+	    T1_ i1;
+	    T2_ i2;
+		inline Pair() {}
+		inline Pair(Pair const &_p): i1(_p.i1), i2(_p.i2) {}
+		inline Pair(T1_ const &_i1, T2_ const &_i2): i1(_i1), i2(_i2) {}
+
+		template <typename T1__, typename T2__, typename TSpec__>
+		inline Pair(Pair<T1__, T2__, TSpec__> const &_p):
+			i1(getValueI1(_p)), i2(getValueI2(_p)) {}
+    };
+
+/**
+.Spec.Packed Pair:
+..cat:Aggregates
+..general:Class.Pair
+..summary:Stores two arbitrary objects. Saves memory by disabling memory alignment.
+..signature:Pair<T1, T2, Compressed>
+..param.T1:The type of the first object.
+..param.T2:The type of the second object.
+..notes:Useful for external storage.
+..remarks:Memory access could be slower. Direct access to members by pointers is not allowed on all platforms.
+..include:seqan/basic.h
+.Memfunc.Pair#Pair.class:Spec.Packed Pair
+.Memvar.Pair#i1.class:Spec.Packed Pair
+.Memvar.Pair#i2.class:Spec.Packed Pair
+*/
+
+	// unaligned and unpadded storage (space efficient)
+#ifdef PLATFORM_WINDOWS
+    #pragma pack(push,1)
+#endif
+    template <typename T1_, typename T2_>
+    struct Pair<T1_, T2_, Compressed> {
+        typedef T1_ T1;
+        typedef T2_ T2;
+        T1_ i1;
+        T2_ i2;
+		inline Pair() {}
+		inline Pair(Pair const &_p): i1(_p.i1), i2(_p.i2) {}
+		inline Pair(T1_ const &_i1, T2_ const &_i2): i1(_i1), i2(_i2) {}
+
+		template <typename T1__, typename T2__, typename TSpec__>
+		inline Pair(Pair<T1__, T2__, TSpec__> const &_p):
+			i1(getValueI1(_p)), i2(getValueI2(_p)) {}
+	}
+#ifndef PLATFORM_WINDOWS
+	__attribute__((packed))
+#endif
+	;
+#ifdef PLATFORM_WINDOWS
+    #pragma pack(pop)
+#endif
+
+
+/**
+.Spec.Bit Compressed Pair:
+..cat:Aggregates
+..general:Class.Pair
+..summary:Stores two arbitrary objects. Saves memory by packing bits with bit fields.
+..signature:Pair<T1, T2, BitCompressed<BITSIZE1, BITSIZE2> >
+..param.T1:The type of the first object.
+..param.T2:The type of the second object.
+..param.BITSIZE1:Number of bits to store $T1$.
+..param.BITSIZE2:Number of bits to store $T2$.
+..notes:Useful for external storage.
+..remarks:Memory access could be slower. Direct access to members by pointers is not allowed.
+..include:seqan/basic.h
+.Memfunc.Pair#Pair.class:Spec.Bit Compressed Pair
+.Memvar.Pair#i1.class:Spec.Bit Compressed Pair
+.Memvar.Pair#i2.class:Spec.Bit Compressed Pair
+*/
+
+    template <typename T1_, typename T2_, unsigned BITSIZE1, unsigned BITSIZE2>
+    struct Pair<T1_, T2_, BitCompressed<BITSIZE1, BITSIZE2> > {
+        typedef T1_ T1;
+        typedef T2_ T2;
+	    T1_ i1:BITSIZE1;
+	    T2_ i2:BITSIZE2;
+		inline Pair() {}
+		inline Pair(Pair const &_p): i1(_p.i1), i2(_p.i2) {}
+		inline Pair(T1_ const &_i1, T2_ const &_i2): i1(_i1), i2(_i2) {}
+
+		template <typename T1__, typename T2__, typename TSpec__>
+		inline Pair(Pair<T1__, T2__, TSpec__> const &_p):
+			i1(getValueI1(_p)), i2(getValueI2(_p)) {}
+	};
+
+
+
+    template <typename T1_, typename T2_, typename TSpec>
+	std::ostream& operator<<(std::ostream &out, Pair<T1_,T2_,TSpec> const &p) {
+		out << "< " << getValueI1(p) << " , " << getValueI2(p) << " >";
+		return out;
+	}
+
+	template <typename T1, typename T2, typename TSpec>
+	struct Value< Pair<T1, T2, TSpec>, 1 > {
+		typedef T1 Type;
+	};
+
+	template <typename T1, typename T2, typename TSpec>
+	struct Value< Pair<T1, T2, TSpec>, 2 > {
+		typedef T2 Type;
+	};
+
+	template <typename T1, typename T2, typename TSpec>
+	struct Spec< Pair<T1, T2, TSpec> > {
+		typedef TSpec Type;
+	};
+
+
+//____________________________________________________________________________
+
+	template <typename TKey, typename TObject, typename TSpec>
+	struct Key< Pair<TKey, TObject, TSpec> > 
+	{
+		typedef TKey Type;
+	};
+
+	template <typename TKey, typename TCargo, typename TSpec>
+	struct Cargo< Pair<TKey, TCargo, TSpec> > 
+	{
+		typedef TCargo Type;
+	};
+//____________________________________________________________________________
+
+/**
+.Class.Triple:
+..cat:Aggregates
+..summary:Stores three arbitrary objects.
+..signature:Triple<T1[, T2[, T3[, TSpec]]]>
+..param.T1:The type of the first object.
+..param.T2:The type of the second object.
+...default:$T1$
+..param.T3:The type of the third object.
+...default:$T2$
+..param.TSpec:The specializing type.
+...default:$void$, no compression (faster access).
+.Memfunc.Triple#Triple:
+..class:Class.Triple
+..summary:Constructor
+..signature:Triple<T1, T2, T3[, TSpec]> ()
+..signature:Triple<T1, T2, T3[, TSpec]> (triple)
+..signature:Triple<T1, T2, T3[, TSpec]> (i1, i2, i3)
+..param.triple:Other Triple object. (copy constructor)
+..param.i1:T1 object.
+..param.i2:T2 object.
+..param.i3:T3 object.
+.Memvar.Triple#i1:
+..class:Class.Triple
+..summary:T1 object
+.Memvar.Triple#i2:
+..class:Class.Triple
+..summary:T2 object
+.Memvar.Triple#i3:
+..class:Class.Triple
+..summary:T3 object
+..include:seqan/basic.h
+*/
+
+	// standard storage 
+	template <typename T1_, typename T2_ = T1_, typename T3_ = T1_, typename TSpec = void>
+    struct Triple {
+        typedef T1_ T1;
+        typedef T2_ T2;
+        typedef T3_ T3;
+        T1_ i1;
+        T2_ i2;
+        T3_ i3;
+		inline Triple() {}
+		inline Triple(Triple const &_p):
+			i1(_p.i1), i2(_p.i2), i3(_p.i3) {}
+		inline Triple(T1_ const &_i1, T2_ const &_i2, T3_ const &_i3):
+			i1(_i1), i2(_i2), i3(_i3) {}
+
+		template <typename T1__, typename T2__, typename T3__, typename TSpec__>
+		inline Triple(Triple<T1__, T2__, T3__, TSpec__> const &_p):
+			i1(getValueI1(_p)), i2(getValueI2(_p)), i3(getValueI3(_p)) {}
+
+        inline bool
+        operator==(Triple const & other) const
+        {
+            return i1 == other.i1 && i2 == other.i2 && i3 == other.i3;
+        }
+        
+        inline bool
+        operator<(Triple const & other) const
+        {
+            if (i1 < other.i1)
+                return true;
+            if (i1 == other.i1 && i2 < other.i2)
+                return true;
+            if (i1 == other.i1 && i2 == other.i2 && i3 < other.i3)
+                return true;
+            return false;
+        }
+	};
+	
+/**
+.Spec.Packed Triple:
+..cat:Aggregates
+..general:Class.Triple
+..summary:Stores three arbitrary objects. Saves memory by disabling memory alignment.
+..signature:Triple<T1, T2, T3, Compressed>
+..param.T1:The type of the first object.
+..param.T2:The type of the second object.
+..param.T3:The type of the third object.
+..notes:Useful for external storage.
+..remarks:Memory access could be slower. Direct access to members by pointers is not allowed on all platforms.
+..include:seqan/basic.h
+.Memfunc.Triple#Triple.class:Spec.Packed Triple
+.Memvar.Triple#i1.class:Spec.Packed Triple
+.Memvar.Triple#i2.class:Spec.Packed Triple
+.Memvar.Triple#i3.class:Spec.Packed Triple
+*/
+
+	// unaligned and unpadded storage (space efficient)
+#ifdef PLATFORM_WINDOWS
+    #pragma pack(push,1)
+#endif
+    template <typename T1_, typename T2_, typename T3_>
+    struct Triple<T1_, T2_, T3_, Compressed> {
+        typedef T1_ T1;
+        typedef T2_ T2;
+        typedef T3_ T3;
+        T1_ i1;
+        T2_ i2;
+        T3_ i3;
+		inline Triple() {}
+		inline Triple(Triple const &_p):
+			i1(_p.i1), i2(_p.i2), i3(_p.i3) {}
+		inline Triple(T1_ const &_i1, T2_ const &_i2, T3_ const &_i3):
+			i1(_i1), i2(_i2), i3(_i3) {}
+
+		template <typename T1__, typename T2__, typename T3__, typename TSpec__>
+		inline Triple(Triple<T1__, T2__, T3__, TSpec__> const &_p):
+			i1(getValueI1(_p)), i2(getValueI2(_p)), i3(getValueI3(_p)) {}
+	}
+#ifndef PLATFORM_WINDOWS
+	__attribute__((packed))
+#endif
+	;
+#ifdef PLATFORM_WINDOWS
+    #pragma pack(pop)
+#endif
+
+	template <typename T1_, typename T2_, typename T3_, typename TSpec>
+	std::ostream& operator<<(std::ostream &out, Triple<T1_,T2_,T3_,TSpec> const &t) {
+		out << "< " << getValueI1(t) << " , " << getValueI2(t) << " , " << getValueI3(t) << " >";
+		return out;
+	}
+
+	template <typename T1, typename T2, typename T3, typename TSpec>
+	struct Value< Triple<T1, T2, T3, TSpec>, 1 > {
+		typedef T1 Type;
+	};
+
+	template <typename T1, typename T2, typename T3, typename TSpec>
+	struct Value< Triple<T1, T2, T3, TSpec>, 2 > {
+		typedef T2 Type;
+	};
+
+	template <typename T1, typename T2, typename T3, typename TSpec>
+	struct Value< Triple<T1, T2, T3, TSpec>, 3 > {
+		typedef T3 Type;
+	};
+
+	template <typename T1, typename T2, typename T3, typename TSpec>
+	struct Spec< Triple<T1, T2, T3, TSpec> > {
+		typedef TSpec Type;
+	};
+
+
+//____________________________________________________________________________
+
+/**
+.Class.Tuple:
+..cat:Aggregates
+..summary:A plain fixed-length string.
+..signature:Tuple<T, SIZE[, TSpec]>
+..param.T:The value type, that is the type of characters stored in the tuple.
+..param.SIZE:The size/length of the tuple.
+...remarks:In contrast to @Class.String@ the length of Tuple is fixed.
+..param.TSpec:The specializing type.
+...default:$void$, no compression (faster access).
+..include:seqan/basic.h
+*/
+
+	// standard storage 
+	template <typename T_, unsigned _size, typename TSpec = void>
+    struct Tuple {
+        typedef T_ T;
+        enum { size = _size };
+        T_ i[_size];
+
+		template <typename TPos>
+        inline T_& operator[](TPos k) {
+            SEQAN_ASSERT_GEQ(static_cast<__int64>(k), 0);
+			SEQAN_ASSERT_LT(static_cast<__int64>(k), static_cast<__int64>(size));
+            return i[k];
+        }
+		template <typename TPos>
+        inline const T_& operator[](TPos k) const {
+            SEQAN_ASSERT_GEQ(static_cast<__int64>(k), 0);
+			SEQAN_ASSERT_LT(static_cast<__int64>(k), static_cast<__int64>(size));
+            return i[k];
+        }
+		inline T_* operator&() { return i; }
+		inline const T_* operator&() const { return i; }
+
+		// has to be inline because elements (like this tuple) of packed structs can't be arguments
+		template <typename TPos, typename tmpS>
+		inline tmpS const assignValueAt(TPos k, tmpS const source) {
+			return i[k] = source;
+		}
+    };
+
+
+    template < unsigned char _size >
+	struct BitVector_ {
+        typedef typename BitVector_<_size + 1>::Type Type;
+    };
+
+    template <> struct BitVector_<8> { typedef unsigned char Type; };
+    template <> struct BitVector_<16> { typedef unsigned short Type; };
+    template <> struct BitVector_<32> { typedef unsigned long Type; };
+    template <> struct BitVector_<64> { typedef __uint64 Type; };
+    template <> struct BitVector_<255> { typedef __uint64 Type; };
+
+/**
+.Spec.Bit Packed Tuple:
+..cat:Aggregates
+..general:Class.Tuple
+..summary:A plain fixed-length string. Saves memory by packing bits.
+..signature:Tuple<T, SIZE, Compressed>
+..param.T:The value type, that is the type of characters stored in the tuple.
+..param.SIZE:The size/length of the tuple.
+...remarks:In contrast to @Class.String@ the length of Tuple is fixed.
+..notes:The characters are stored as a bit sequence in an ordinal type (char, ..., __int64).
+..remarks:Only useful for small alphabets and small tuple sizes (|Sigma|^size <= 2^64) as for @Spec.Dna@ or @Spec.AminoAcid@ m-grams)
+..see:Spec.Sampler
+..include:seqan/basic.h
+*/
+
+	// bit-compressed storage (space efficient)
+#ifdef PLATFORM_WINDOWS
+    #pragma pack(push,1)
+#endif
+    template <typename T_, unsigned _size>
+    struct Tuple<T_, _size, Compressed> {
+        typedef T_ T;
+        enum { size = _size };
+        enum { bitSize = BitsPerValue<T_>::VALUE };
+        enum { bitMask = (1 << bitSize) - 1 };
+        enum { mask = (1 << (size * bitSize)) - 1 };
+        typedef typename BitVector_< bitSize * size >::Type CT;
+        
+        CT i;
+/*
+		inline Tuple() {
+			SEQAN_ASSERT(bitSize * size <= sizeof(CT) * 8);
+		}
+*/
+		template <typename TPos>
+        inline const T_ operator[](TPos k) const {
+            SEQAN_ASSERT_GEQ(static_cast<__int64>(k), 0);
+			SEQAN_ASSERT_LT(static_cast<__int64>(k), static_cast<__int64>(size));
+            return (i >> (size - 1 - k) * bitSize) & bitMask;
+        }
+		template <unsigned size__>
+		inline Tuple operator=(Tuple<T_, size__, Compressed> const &_right) {
+			i = _right.i;
+			return *this;
+		}
+		template <typename TShiftSize>
+        inline CT operator<<=(TShiftSize shift) {
+            return i = (i << (shift * bitSize)) & mask;
+        }
+		template <typename TShiftSize>
+        inline CT operator<<(TShiftSize shift) const {
+            return (i << (shift * bitSize)) & mask;
+        }
+		template <typename TShiftSize>
+        inline CT operator>>=(TShiftSize shift) {
+            return i = (i >> (shift * bitSize));
+        }
+		template <typename TShiftSize>
+        inline CT operator>>(TShiftSize shift) const {
+            return i >> (shift * bitSize);
+        }
+        template <typename T>
+        inline void operator|=(T const &t) {
+            i |= t;
+        }
+        template <typename T, typename TSpec>
+        inline void operator|=(SimpleType<T, TSpec> const &t) {
+            i |= t.value;
+        }
+		inline CT* operator&() { return &i; }
+		inline const CT* operator&() const { return &i; }
+
+		// has to be inline because elements (like this tuple) of packed structs can't be arguments
+		template <typename TPos, typename tmpS>
+		inline tmpS const assignValueAt(TPos k, tmpS const source) {
+			typedef Tuple<T_, _size, Compressed> Tup;
+			typename Tup::CT mask = Tup::bitMask << ((_size - 1 - k) * bitSize);
+			i = (i & ~mask) | ((CT)ordValue(source) << ((_size - 1 - k) * bitSize));
+			return source;
+		}
+    }
+#ifndef PLATFORM_WINDOWS
+	__attribute__((packed))
+#endif
+	;
+#ifdef PLATFORM_WINDOWS
+    #pragma pack(pop)
+#endif
+
+
+//////////////////////////////////////////////////////////////////////////////
+// length
+
+    template <typename T_, unsigned _size, typename TSpec>
+	inline unsigned length(Tuple<T_, _size, TSpec> const &) { return _size; }
+
+	///.Metafunction.LENGTH.param.T.type:Class.Tuple
+    template <typename T_, unsigned _size, typename TSpec>
+	struct LENGTH< Tuple<T_, _size, TSpec> >
+	{
+		enum { VALUE = _size };
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+// assignValueAt
+
+    template <typename TObject, typename TPos, typename TSource>
+    inline TSource & 
+	assignValueAt(TObject &me, TPos k, TSource &source) {
+        assign(value(me, k), source);
+		return source;
+    }
+
+    template <typename TObject, typename TPos, typename TSource>
+    inline TSource const & 
+	assignValueAt(TObject &me, TPos k, TSource const &source) {
+        assign(value(me, k), source);
+		return source;
+    }
+
+    template <typename T_, unsigned _size, typename tmpS, typename TPos>
+    inline tmpS const assignValueAt(Tuple<T_, _size, void> &me, TPos k, tmpS const source) {
+        return me.i[k] = source;
+    }
+
+    template <typename T_, unsigned _size, typename tmpS, typename TPos>
+    inline tmpS const assignValueAt(Tuple<T_, _size, Compressed> &me, TPos k, tmpS const source) {
+        typedef Tuple<T_, _size, Compressed> Tup;
+        typename Tup::CT mask = Tup::bitMask << ((_size - 1 - k) * me.bitSize);
+        me.i = (me.i & ~mask) | source << ((_size - 1 - k) * me.bitSize);
+        return source;
+    }
+
+    template <typename T_, typename tmpS, typename Spec_, unsigned _size, typename TPos>
+    inline SimpleType<tmpS, Spec_> const & assignValueAt(Tuple<T_, _size, Compressed> &me, TPos k, SimpleType<tmpS, Spec_> const &source) {
+        typedef Tuple<T_, _size, Compressed> Tup;
+        typename Tup::CT mask = Tup::bitMask << ((_size - 1 - k) * me.bitSize);
+        me.i = (me.i & ~mask) | source.value << ((_size - 1 - k) * me.bitSize);
+        return source;
+    }
+
+//////////////////////////////////////////////////////////////////////////////
+// clear
+
+	template <typename T_, unsigned _size, typename TSpec>
+	inline void clear(Tuple<T_, _size, TSpec> &me) {
+        memset<sizeof(me.i), 0>(&(me.i));
+	}
+    template <typename T_, unsigned _size>
+	inline void clear(Tuple<T_, _size, Compressed> &me) {
+		me.i = 0; 
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// optimized compares
+
+	template <typename T_, unsigned _sizeL, unsigned _sizeR>
+	inline bool operator<(Tuple<T_, _sizeL, Compressed> const &_left, Tuple<T_, _sizeR, Compressed> const &_right) {
+		return _left.i < _right.i;
+	}
+	template <typename T_, unsigned _sizeL, unsigned _sizeR>
+	inline bool operator>(Tuple<T_, _sizeL, Compressed> const &_left, Tuple<T_, _sizeR, Compressed> const &_right) {
+		return _left.i > _right.i;
+	}
+	template <typename T_, unsigned _sizeL, unsigned _sizeR>
+	inline bool operator==(Tuple<T_, _sizeL, Compressed> const &_left, Tuple<T_, _sizeR, Compressed> const &_right) {
+		return _left.i == _right.i;
+	}
+	template <typename T_, unsigned _sizeL, unsigned _sizeR>
+	inline bool operator!=(Tuple<T_, _sizeL, Compressed> const &_left, Tuple<T_, _sizeR, Compressed> const &_right) {
+		return _left.i != _right.i;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// optimized shifts
+
+    struct TupleShiftLeftWorker_ {
+        template <typename Arg>
+        static inline void body(Arg &arg, unsigned I) {
+            arg[I-1] = arg[I];
+        }
+    };
+
+    struct TupleShiftRightWorker_ {
+        template <typename Arg>
+        static inline void body(Arg &arg, unsigned I) {
+            arg[I] = arg[I-1];
+        }
+    };
+
+	template <typename T_, unsigned _size, typename TSpec>
+	inline void shiftLeft(Tuple<T_, _size, TSpec> &me) {
+		Loop<TupleShiftLeftWorker_, _size - 1>::run(me);
+	}
+
+	template <typename T_, unsigned _size, typename TSpec>
+	inline void shiftRight(Tuple<T_, _size, TSpec> &me) {
+		LoopReverse<TupleShiftRightWorker_, _size - 1>::run(me);
+	}
+
+	template <typename T_, unsigned _size>
+	inline void shiftLeft(Tuple<T_, _size, Compressed> &me) {
+		me<<=1;
+	}
+
+	template <typename T_, unsigned _size>
+	inline void shiftRight(Tuple<T_, _size, Compressed> &me) {
+		me>>=1;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// standard output
+
+	template <typename T_, unsigned _size, typename TSpec>
+	std::ostream& operator<<(std::ostream& out, Tuple<T_,_size,TSpec> const &a) {
+		out << "[";
+		if (a.size > 0)
+			out << a[0];
+		for(unsigned j = 1; j < a.size; ++j)
+			out << " " << a[j];
+		out << "]";
+		return out;
+	}
+
+	template <typename T_, unsigned _size, typename TSpec>
+	struct Value< Tuple<T_, _size, TSpec> > {
+		typedef T_ Type;
+	};
+
+	template <typename T_, unsigned _size, typename TSpec>
+	struct Spec< Tuple<T_, _size, TSpec> > {
+		typedef TSpec Type;
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+// getValueIx
+
+	template <typename T1, typename T2, typename TSpec>
+	inline T1 getValueI1(Pair<T1, T2, TSpec> const &pair) {
+		return pair.i1;
+	}
+
+	template <typename T1, typename T2, typename TSpec>
+	inline T2 getValueI2(Pair<T1, T2, TSpec> const &pair) {
+		return pair.i2;
+	}
+
+//____________________________________________________________________________
+
+	template <typename T1, typename T2, typename T3, typename TSpec>
+	inline T1 getValueI1(Triple<T1, T2, T3, TSpec> const &triple) {
+		return triple.i1;
+	}
+
+	template <typename T1, typename T2, typename T3, typename TSpec>
+	inline T2 getValueI2(Triple<T1, T2, T3, TSpec> const &triple) {
+		return triple.i2;
+	}
+
+	template <typename T1, typename T2, typename T3, typename TSpec>
+	inline T3 getValueI3(Triple<T1, T2, T3, TSpec> const &triple) {
+		return triple.i3;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// assignValueIx
+
+	template <typename T1, typename T2, typename TSpec, typename T>
+	inline void assignValueI1(Pair<T1, T2, TSpec> &pair, T const &_i) {
+		pair.i1 = _i;
+	}
+
+	template <typename T1, typename T2, typename TSpec, typename T>
+	inline void assignValueI2(Pair<T1, T2, TSpec> &pair, T const &_i) {
+		pair.i2 = _i;
+	}
+
+//____________________________________________________________________________
+
+	template <typename T1, typename T2, typename T3, typename TSpec, typename T>
+	inline T const assignValueI1(Triple<T1, T2, T3, TSpec> &triple, T const &_i) {
+		return triple.i1 = _i;
+	}
+
+	template <typename T1, typename T2, typename T3, typename TSpec, typename T>
+	inline T const assignValueI2(Triple<T1, T2, T3, TSpec> &triple, T const &_i) {
+		return triple.i2 = _i;
+	}
+
+	template <typename T1, typename T2, typename T3, typename TSpec, typename T>
+	inline T const assignValueI3(Triple<T1, T2, T3, TSpec> &triple, T const &_i) {
+		return triple.i3 = _i;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator ==/!= for pairs and triples
+
+	template <typename L1, typename L2, typename LCompression, typename R1, typename R2, typename RCompression>
+	inline bool operator==(Pair<L1, L2, LCompression> const &_left, Pair<R1, R2, RCompression> const &_right) {
+		return _left.i1 == _right.i1 && _left.i2 == _right.i2;
+	}
+	template <typename L1, typename L2, typename LCompression, typename R1, typename R2, typename RCompression>
+	inline bool operator!=(Pair<L1, L2, LCompression> const &_left, Pair<R1, R2, RCompression> const &_right) {
+		return _left.i1 != _right.i1 || _left.i2 != _right.i2;
+	}
+
+//____________________________________________________________________________
+
+	template <
+		typename L1, typename L2, typename L3, typename LCompression, 
+		typename R1, typename R2, typename R3, typename RCompression>
+	inline bool operator==(Triple<L1, L2, L3, LCompression> const &_left, Triple<R1, R2, R3, RCompression> const &_right) {
+		return _left.i1 == _right.i1 && _left.i2 == _right.i2 && _left.i3 == _right.i3;
+	}
+	template <
+		typename L1, typename L2, typename L3, typename LCompression, 
+		typename R1, typename R2, typename R3, typename RCompression>
+	inline bool operator!=(Triple<L1, L2, L3, LCompression> const &_left, Triple<R1, R2, R3, RCompression> const &_right) {
+		return _left.i1 != _right.i1 || _left.i2 != _right.i2 || _left.i3 != _right.i3;
+	}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_allocator_chunkpool.h b/src/SeqAn-1.3/seqan/basic/basic_allocator_chunkpool.h
new file mode 100644
index 0000000..dcba463
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_allocator_chunkpool.h
@@ -0,0 +1,335 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALLOCATOR_CHUNKPOOL_H
+#define SEQAN_HEADER_BASIC_ALLOCATOR_CHUNKPOOL_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// ChunkPool Allocator
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Chunk Pool Allocator:
+..cat:Allocators
+..general:Class.Allocator
+..summary:Allocator that pools one or more consecutive memory blocks of a specific size.
+..signature:Allocator< ChunkPool<SIZE, MAX_COUNT, ParentAllocator> >
+..param.SIZE:Size of memory blocks that are pooled.
+...value:An unsigned integer with $SIZE >= sizeof(void *)$.
+..param.MAX_COUNT:Maximum number of consecutive memory blocks that are pooled.
+...default:26
+...remarks:Longer "chunks" are allocated and deallocated without pooling.
+..param.ParentAllocator:An allocator that is by the pool allocator used to allocate memory.
+...default:@Spec.Simple Allocator@
+...note:The multi pool allocator only supports @Function.clear@ if this function is also implemented for $ParentAllocator$.
+..remarks:A pool allocator allocates several memory blocks at once. 
+Freed blocks are not immediately deallocated but recycled in subsequential allocations.
+This way, the number of calls to the heap manager is reduced, and that speeds up memory management.
+...text:Note that memory blocks of size different than $SIZE$, $2*SIZE$, $3*SIZE$, ..., $MAX_COUNT * SIZE$ 
+are not pooled but immediately allocated and deallocated using $ParentAllocator$.
+..include:seqan/basic.h
+*/
+
+
+template <
+	size_t SIZE, 
+	size_t MAX_COUNT = 26, 
+	typename TParentAllocator = Allocator<SimpleAlloc<Default> > >
+struct ChunkPool;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, size_t MAX_COUNT, typename TParentAllocator>
+struct Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> >
+{
+	enum
+	{
+		STORAGE_SIZE_1 = 0x1000UL,
+		STORAGE_SIZE_2 = SIZE * MAX_COUNT * 8,
+		STORAGE_SIZE_UPPER = (STORAGE_SIZE_1 > STORAGE_SIZE_2) ? STORAGE_SIZE_1 : STORAGE_SIZE_2,
+		ITEMS_PER_STORAGE = STORAGE_SIZE_UPPER / SIZE,
+		STORAGE_SIZE = ITEMS_PER_STORAGE * SIZE,
+
+		STORAGE_SIZE_MIN = SIZE * MAX_COUNT //minimal storage size
+	};
+
+	char * data_recycled_blocks [MAX_COUNT];
+	char * data_current_begin;
+	char * data_current_end;
+	char * data_current_free;
+	Holder<TParentAllocator> data_parent_allocator;
+
+	Allocator()
+	{
+SEQAN_CHECKPOINT
+		::std::memset(data_recycled_blocks, 0, sizeof(data_recycled_blocks));
+		data_current_end = data_current_free = 0;
+		//dont need to initialize data_current_begin
+	}
+
+	Allocator(size_t reserve_item_count)
+	{
+SEQAN_CHECKPOINT
+		::std::memset(data_recycled_blocks, 0, sizeof(data_recycled_blocks));
+
+		size_t storage_size = (reserve_item_count * SIZE > STORAGE_SIZE_MIN) ? reserve_item_count * SIZE : STORAGE_SIZE_MIN;
+		allocate( parentAllocator( *this ), data_current_begin, storage_size );
+		data_current_end = data_current_begin + storage_size;
+		data_current_free = data_current_begin;
+	}
+
+	Allocator(TParentAllocator & parent_alloc)
+	{
+SEQAN_CHECKPOINT
+		::std::memset(data_recycled_blocks, 0, sizeof(data_recycled_blocks));
+		data_current_end = data_current_free = 0;
+		//dont need to initialize data_current_begin
+
+		setValue(data_parent_allocator, parent_alloc);
+	}
+
+	Allocator(size_t reserve_item_count, TParentAllocator & parent_alloc)
+	{
+SEQAN_CHECKPOINT
+		::std::memset(data_recycled_blocks, 0, sizeof(data_recycled_blocks));
+
+		setValue(data_parent_allocator, parent_alloc);
+
+		size_t storage_size = (reserve_item_count * SIZE > STORAGE_SIZE_MIN) ? reserve_item_count * SIZE : STORAGE_SIZE_MIN;
+		allocate( parentAllocator( *this ), data_current_begin, storage_size );
+		data_current_end = data_current_begin + storage_size;
+		data_current_free = data_current_begin;
+	}
+
+	//Dummy copy
+	Allocator(Allocator const &)
+	{
+		::std::memset(data_recycled_blocks, 0, sizeof(data_recycled_blocks));
+		data_current_end = data_current_free = 0;
+		//dont need to initialize data_current_begin
+	}
+	inline Allocator &
+	operator = (Allocator const &)
+	{
+		clear(*this);
+		return *this;
+	}
+
+	~Allocator()
+	{
+SEQAN_CHECKPOINT
+		clear(*this);
+	}
+};
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, size_t MAX_COUNT, typename TParentAllocator>
+inline TParentAllocator &
+parentAllocator(Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_parent_allocator);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, size_t MAX_COUNT, typename TParentAllocator>
+void
+clear(Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+	::std::memset(me.data_recycled_blocks, 0, sizeof(me.data_recycled_blocks));
+	me.data_current_end = me.data_current_free = 0;
+
+	clear(parentAllocator(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, size_t MAX_COUNT, typename TParentAllocator, typename TValue, typename TSize, typename TUsage>
+inline void
+allocate(Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > & me, 
+		 TValue * & data,
+		 TSize count,
+		 Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+SEQAN_ASSERT(count > 0)
+
+	typedef Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > TAllocator;
+
+	char * ptr;
+
+	if ((sizeof(TValue) != SIZE) || ((size_t) count > MAX_COUNT))
+	{//no blocking
+		return allocate(parentAllocator(me), data, count, tag_);
+	}
+
+	size_t bytes_needed = count * SIZE;
+	if (me.data_recycled_blocks[count - 1])
+	{//use recycled
+		ptr = me.data_recycled_blocks[count - 1];
+		me.data_recycled_blocks[count - 1] = * reinterpret_cast<char **>(ptr);
+	}
+	else
+	{//use new
+		ptr = me.data_current_free;
+		if (ptr + bytes_needed > me.data_current_end)
+		{//not enough free space in current storage: allocate new
+			size_t rest_block_number = (me.data_current_end - me.data_current_free) / SIZE;
+			if (ptr && rest_block_number)
+			{//link rest to recycle list
+				*reinterpret_cast<char **>(ptr) = me.data_recycled_blocks[rest_block_number - 1];
+				me.data_recycled_blocks[rest_block_number - 1] = reinterpret_cast<char *>(ptr);
+			}
+
+			allocate(parentAllocator(me), ptr, (size_t) TAllocator::STORAGE_SIZE, tag_);
+			me.data_current_begin = ptr;
+			me.data_current_end = ptr + TAllocator::STORAGE_SIZE;
+		}
+		me.data_current_free = ptr + bytes_needed;
+	}
+
+	data = reinterpret_cast<TValue *>(ptr);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, size_t MAX_COUNT, typename TParentAllocator, typename TValue, typename TSize, typename TUsage>
+inline void 
+deallocate(Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > & me,
+		   TValue * data, 
+		   TSize count,
+		   Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+SEQAN_ASSERT(count > 0)
+
+	typedef Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > TAllocator;
+
+	if ((sizeof(TValue) != SIZE) || (count > MAX_COUNT))
+	{//no blocking
+		return deallocate(parentAllocator(me), data, count, tag_);
+	}
+
+	//link in recycling list
+	*reinterpret_cast<char **>(data) = me.data_recycled_blocks[count - 1];
+	me.data_recycled_blocks[count - 1] = reinterpret_cast<char *>(data);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// alternative Interface that takes a Type instead of a SIZE
+//////////////////////////////////////////////////////////////////////////////
+
+template <
+	typename TValue, 
+	size_t MAX_COUNT = 26, 
+	typename TParentAllocator = Allocator<SimpleAlloc<Default> > >
+struct ChunkPool2;
+
+
+template <typename TValue, size_t MAX_COUNT, typename TParentAllocator>
+struct Allocator<ChunkPool2<TValue, MAX_COUNT, TParentAllocator> >
+{
+	Allocator<ChunkPool<sizeof(TValue), MAX_COUNT, TParentAllocator> > data_alloc;
+
+
+	Allocator(size_t reserve_item_count)
+		: data_alloc(reserve_item_count)
+	{
+	}
+
+	Allocator(TParentAllocator & parent_alloc)
+		: data_alloc(parent_alloc)
+	{
+	}
+
+	Allocator(size_t reserve_item_count, TParentAllocator & parent_alloc)
+		: data_alloc(reserve_item_count, parent_alloc)
+
+	{
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, size_t MAX_COUNT, typename TParentAllocator>
+inline TParentAllocator &
+parentAllocator(Allocator<ChunkPool2<TValue, MAX_COUNT, TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+	return parentAllocator(me.data_alloc);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, size_t MAX_COUNT, typename TParentAllocator>
+void
+clear(Allocator<ChunkPool2<TValue, MAX_COUNT, TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+	clear(me.data_alloc);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, size_t MAX_COUNT, typename TParentAllocator, typename TValue2, typename TSize, typename TUsage>
+inline void
+allocate(Allocator<ChunkPool2<TValue, MAX_COUNT, TParentAllocator> > & me, 
+		 TValue2 * & data,
+		 TSize count,
+		 Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+	allocate(me.data_alloc, data, count, tag_);
+}
+
+template <typename TValue, size_t MAX_COUNT, typename TParentAllocator, typename TValue2, typename TSize, typename TUsage>
+inline void 
+deallocate(Allocator<ChunkPool2<TValue, MAX_COUNT, TParentAllocator> > & me,
+		   TValue2 * data, 
+		   TSize count,
+		   Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+	deallocate(me.data_alloc, data, count, tag_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_allocator_interface.h b/src/SeqAn-1.3/seqan/basic/basic_allocator_interface.h
new file mode 100644
index 0000000..4e78766
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_allocator_interface.h
@@ -0,0 +1,307 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALLOCATOR_INTERFACE_H
+#define SEQAN_HEADER_BASIC_ALLOCATOR_INTERFACE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+//Allocator
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Class.Allocator:
+..cat:Basic
+..summary:Manager for allocated memory.
+..signature:Allocator<TSpec>
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+..implements:Concept.Allocator
+..include:basic.h
+..remarks:There are two reasons for using non-trivial allocators:
+...text:1. Allocators support the function @Function.Allocator#clear@ for a fast deallocation of all 
+allocated memory blocks. 
+...text:2. Some allocators are faster in allocating an deallocating memory.
+Pool allocators like e.g. @Spec.Single Pool Allocator@ or @Spec.Multi Pool Allocator@
+speed up @Function.allocate@, @Function.deallocate@, and @Function.Allocator#clear@ for
+pooled memory blocks.
+*/
+
+template <typename TSpec>
+struct Allocator;
+
+///.Function.allocate.param.object.type:Class.Allocator
+///.Function.deallocate.param.object.type:Class.Allocator
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//.Metafunction.Spec.param.T.type:Class.Allocator
+
+template <typename TSpec>
+struct Spec<Allocator<TSpec> >
+{
+	typedef TSpec Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Allocator Usage:
+..summary:The purpose of an allocated memory block.
+..tag.TagAllocateTemp:Temporary memory. 
+..tag.TagAllocateStorage:Memory for storing container content. 
+..see:Function.allocate
+..see:Function.deallocate
+..include:seqan/basic.h
+*/
+struct AllocateUnspecified_; //< usage not specified
+typedef Tag<AllocateUnspecified_> const TagAllocateUnspecified;
+
+struct AllocateTemp_; //< allocate temporary memory
+typedef Tag<AllocateTemp_> const TagAllocateTemp;
+
+struct AllocateStorage_; //< allocate memory for storing member data
+typedef Tag<AllocateStorage_> const TagAllocateStorage;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//allocates memory on heap. No c'tors are called.
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.allocate:
+..cat:Memory
+..summary:Allocates memory from heap.
+..signature:allocate(object, data, count [, usage_tag])
+..param.object:Allocator object.
+...remarks:$object$ is conceptually the "owner" of the allocated memory.
+ Objects of all types can be used as allocators. If no special behavior is implemented,
+ default functions allocation/deallocation are applied that uses standard
+ $new$ and $delete$ operators.
+..param.count:Number of items that could be stored in the allocated memory.
+...text:The type of the allocated items is given by the type of $data$.
+..param.usage_tag:A tag the specifies the purpose for the allocated memory.
+...value:@Tag.Allocator Usage@
+..returns.param.data:Pointer to allocated memory.
+...remarks:The value of this pointer is overwritten by the function.
+..remarks:
+...text:The function allocates at least $count*sizeof(data)$ bytes. 
+ The allocated memory is large enough 
+ to hold $count$ objects of type $T$, where $T *$ is type of $data$.
+...note:These objects are not constructed by $allocate$.
+...text:Use e.g. one of the functions @Function.valueConstruct@, @Function.arrayConstruct@, @Function.arrayConstructCopy@ or @Function.arrayFill@
+to construct the objects.
+A $new$ operator which is part of the C++ standard (defined in $<new>$)
+ can also be used to construct objects at a given memory address.
+..note:All allocated memory blocks should be deallocated by the corresponding function @Function.deallocate at .
+..see:Function.deallocate
+..see:Function.valueConstruct
+..see:Function.arrayFill
+..see:Function.arrayConstruct
+..see:Function.arrayConstructCopy
+..include:seqan/basic.h
+*/
+template <typename T, typename TValue, typename TSize>
+inline void
+allocate(T const & me,
+		 TValue * & data,
+		 TSize count)
+{
+	allocate(me, data, count, TagAllocateUnspecified());
+}
+template <typename T, typename TValue, typename TSize>
+inline void
+allocate(T & me,
+		 TValue * & data,
+		 TSize count)
+{
+	allocate(me, data, count, TagAllocateUnspecified());
+}
+
+template <typename T, typename TValue, typename TSize, typename TUsage>
+inline void
+allocate(T const &, 
+		 TValue * & data,
+		 TSize count,
+		 Tag<TUsage> const)
+{
+//	data = (TValue *) operator new(count * sizeof(TValue));
+#ifdef PLATFORM_WINDOWS_VS
+	data = (TValue *) _aligned_malloc(count * sizeof(TValue), __alignof(TValue));
+#else
+/*#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
+	const size_t align = (__alignof__(TValue) < sizeof(void*))? sizeof(void*): __alignof__(TValue);
+	if (posix_memalign(&(void* &)data, align, count * sizeof(TValue)))
+		data = NULL;
+#else
+	data = (TValue *) malloc(count * sizeof(TValue));
+#endif*/
+	data = (TValue *) operator new(count * sizeof(TValue));
+#endif
+
+#ifdef SEQAN_PROFILE
+	if (data)
+	    SEQAN_PROADD(SEQAN_PROMEMORY, count * sizeof(TValue));
+#endif
+}
+template <typename T, typename TValue, typename TSize, typename TUsage>
+inline void
+allocate(T &, 
+		 TValue * & data,
+		 TSize count,
+		 Tag<TUsage> const)
+{
+//	data = (TValue *) operator new(count * sizeof(TValue));
+#ifdef PLATFORM_WINDOWS_VS
+	data = (TValue *) _aligned_malloc(count * sizeof(TValue), __alignof(TValue));
+#else
+/*#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
+	const size_t align = (__alignof__(TValue) < sizeof(void*))? sizeof(void*): __alignof__(TValue);
+	if (posix_memalign(&(void* &)data, align, count * sizeof(TValue)))
+		data = NULL;
+#else
+	data = (TValue *) malloc(count * sizeof(TValue));
+#endif
+*/	data = (TValue *) operator new(count * sizeof(TValue));
+#endif
+
+#ifdef SEQAN_PROFILE
+	if (data)
+	    SEQAN_PROADD(SEQAN_PROMEMORY, count * sizeof(TValue));
+#endif
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//deallocates memory that was allocates using allocate(.)
+
+/**
+.Function.deallocate:
+..cat:Memory
+..summary:Deallocates memory.
+..signature:deallocate(object, data, count [, usage_tag])
+..param.object:Allocator object.
+...remarks:$object$ is conceptually the "owner" of the allocated memory.
+ Objects of all types can be used as allocators. If no special behavior is implemented,
+ default functions allocation/deallocation are applied that uses standard
+ $new$ and $delete$ operators.
+..param.data:Pointer to allocated memory that was allocated by $allocate$.
+..param.count:Number of items that could be stored in the allocated memory.
+..param.usage_tag:A tag the specifies the purpose for the allocated memory.
+...value:@Tag.Allocator Usage@
+..remarks:
+...text:The values for $object$, $count$ and $usage_tag$ should be the same that was 
+used when $allocate$ was called. The value of $data$ should be the same that was
+returned by $allocate$.
+...note:$deallocate$ does not destruct objects.
+...text:Use e.g. one of the functions @Function.valueDestruct@ or @Function.arrayDestruct@ to destruct the objects.
+$delete$ and $delete []$ operators which are part of the C++ standard (defined in $<new>$)
+ can also be used to destruct objects at a given memory address.
+..see:Function.valueDestruct
+..see:Function.arrayDestruct
+..include:seqan/basic.h
+*/
+template <typename T, typename TValue, typename TSize>
+inline void 
+deallocate(T const & me, 
+		   TValue * data, 
+		   TSize const count)
+{
+	deallocate(me, data, count, TagAllocateUnspecified());
+}
+template <typename T, typename TValue, typename TSize>
+inline void 
+deallocate(T & me, 
+		   TValue * data, 
+		   TSize const count)
+{
+	deallocate(me, data, count, TagAllocateUnspecified());
+}
+
+template <typename T, typename TValue, typename TSize, typename TUsage>
+inline void
+deallocate(
+	T const & /*me*/,
+	TValue * data,
+#ifdef SEQAN_PROFILE 
+	TSize count,
+#else
+	TSize,
+#endif
+	Tag<TUsage> const)
+{
+#ifdef SEQAN_PROFILE
+	if (data && count)	// .. to use count if SEQAN_PROFILE is not defined
+	    SEQAN_PROSUB(SEQAN_PROMEMORY, count * sizeof(TValue));
+#endif
+//	operator delete ((void *) data);
+#ifdef PLATFORM_WINDOWS_VS
+	_aligned_free((void *) data);
+#else
+//	free((void *) data);
+	operator delete ((void *) data);
+#endif
+}
+template <typename T, typename TValue, typename TSize, typename TUsage>
+inline void 
+deallocate(
+	T & /*me*/,
+	TValue * data,
+#ifdef SEQAN_PROFILE 
+	TSize count,
+#else
+	TSize,
+#endif
+	Tag<TUsage> const)
+{
+#ifdef SEQAN_PROFILE
+	if (data && count)	// .. to use count if SEQAN_PROFILE is not defined
+	    SEQAN_PROSUB(SEQAN_PROMEMORY, count * sizeof(TValue));
+#endif
+//	operator delete ((void *) data);
+#ifdef PLATFORM_WINDOWS_VS
+	_aligned_free((void *) data);
+#else
+//	free((void *) data);
+	operator delete ((void *) data);
+#endif
+}
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_allocator_multipool.h b/src/SeqAn-1.3/seqan/basic/basic_allocator_multipool.h
new file mode 100644
index 0000000..d6a60a3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_allocator_multipool.h
@@ -0,0 +1,243 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALLOCATOR_MULTIPOOL_H
+#define SEQAN_HEADER_BASIC_ALLOCATOR_MULTIPOOL_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// MultiPool Allocator
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Multi Pool Allocator:
+..cat:Allocators
+..general:Class.Allocator
+..summary:Allocator that pools memory blocks.
+..signature:Allocator< MultiPool<ParentAllocator, BLOCKING_LIMIT> >
+..param.ParentAllocator:An allocator that is by the pool allocator used to allocate memory.
+...default:@Spec.Simple Allocator@
+...note:The multi pool allocator only supports @Function.clear@ if this function is also implemented for $ParentAllocator$.
+..remarks:A pool allocator allocates several memory blocks at once. 
+..param.BLOCKING_LIMIT:The maximum size for memory blocks to be pooled.
+...default:256
+Freed blocks are not immediately deallocated but recycled in subsequential allocations.
+This way, the number of calls to the heap manager is reduced, and that speeds up memory management.
+...text:Note that memory blocks larger than $BLOCKING_LIMIT$ are not pooled 
+but immediately allocated and deallocated using $ParentAllocator$.
+..include:seqan/basic.h
+*/
+
+
+template <typename TParentAllocator = Allocator<SimpleAlloc<Default> >, unsigned int BLOCKING_LIMIT = 0x100>
+struct MultiPool;
+
+//////////////////////////////////////////////////////////////////////////////
+
+typedef Allocator<MultiPool<Allocator<SimpleAlloc<Default> >, 0x100> > PoolAllocator;
+
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT_>
+struct Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT_> >
+{
+	enum
+	{
+		BLOCKING_LIMIT = BLOCKING_LIMIT_,
+		GRANULARITY_BITS = 2,
+		BLOCKING_COUNT = BLOCKING_LIMIT >> GRANULARITY_BITS,
+		STORAGE_SIZE = 0xf80
+	};
+
+	char * data_recycled_blocks [BLOCKING_COUNT];
+	char * data_current_begin [BLOCKING_COUNT];
+	char * data_current_free [BLOCKING_COUNT];
+	Holder<TParentAllocator> data_parent_allocator;
+
+	Allocator()
+	{
+SEQAN_CHECKPOINT
+		::std::memset(data_recycled_blocks, 0, sizeof(data_recycled_blocks));
+		::std::memset(data_current_begin, 0, sizeof(data_current_begin));
+		::std::memset(data_current_free, 0, sizeof(data_current_free));
+	}
+
+	Allocator(TParentAllocator & parent_alloc)
+	{
+SEQAN_CHECKPOINT
+		::std::memset(data_recycled_blocks, 0, sizeof(data_recycled_blocks));
+		::std::memset(data_current_begin, 0, sizeof(data_current_begin));
+		::std::memset(data_current_free, 0, sizeof(data_current_free));
+
+		setValue(data_parent_allocator, parent_alloc);
+	}
+
+	//Dummy copy
+	Allocator(Allocator const &)
+	{
+		::std::memset(data_recycled_blocks, 0, sizeof(data_recycled_blocks));
+		::std::memset(data_current_begin, 0, sizeof(data_current_begin));
+		::std::memset(data_current_free, 0, sizeof(data_current_free));
+	}
+	inline Allocator &
+	operator = (Allocator const &)
+	{
+		clear(*this);
+		return *this;
+	}
+
+	~Allocator()
+	{
+SEQAN_CHECKPOINT
+		clear(*this);
+	}
+};
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT>
+inline TParentAllocator &
+parentAllocator(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_parent_allocator);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT>
+void
+clear(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > & me)
+{
+SEQAN_CHECKPOINT
+	::std::memset(me.data_recycled_blocks, 0, sizeof(me.data_recycled_blocks));
+	::std::memset(me.data_current_begin, 0, sizeof(me.data_current_begin));
+	::std::memset(me.data_current_free, 0, sizeof(me.data_current_free));
+
+	clear(parentAllocator(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT>
+inline unsigned int
+_allocatorBlockNumber(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > &,
+					  size_t size_)
+{
+SEQAN_CHECKPOINT
+	typedef Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > TAllocator;
+
+	SEQAN_ASSERT(size_)
+
+	if (size_ < BLOCKING_LIMIT)
+	{//blocks
+		return size_ >> TAllocator::GRANULARITY_BITS;
+	}
+	else
+	{//no blocking
+		return TAllocator::BLOCKING_COUNT;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT, typename TValue, typename TSize, typename TUsage>
+inline void
+allocate(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > & me, 
+		 TValue * & data,
+		 TSize count,
+		 Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+	typedef Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > TAllocator;
+
+	size_t bytes_needed = count * sizeof(TValue);
+	char * ptr;
+
+	unsigned int block_number =  _allocatorBlockNumber(me, bytes_needed);
+	if (block_number == TAllocator::BLOCKING_COUNT)
+	{//no blocking
+		return allocate(parentAllocator(me), data, count, tag_);
+	}
+
+	bytes_needed = (block_number + 1) << TAllocator::GRANULARITY_BITS;
+
+	if (me.data_recycled_blocks[block_number])
+	{//use recycled
+		ptr = me.data_recycled_blocks[block_number];
+		me.data_recycled_blocks[block_number] = * reinterpret_cast<char **>(ptr);
+	}
+	else
+	{//use new
+		ptr = me.data_current_free[block_number];
+		if (!ptr || (ptr + bytes_needed > me.data_current_begin[block_number] + TAllocator::STORAGE_SIZE))
+		{//not enough free space in current storage: allocate new
+			allocate(parentAllocator(me), ptr, (size_t) TAllocator::STORAGE_SIZE, tag_);
+			me.data_current_begin[block_number] = ptr;
+		}
+		me.data_current_free[block_number] = ptr + bytes_needed;
+	}
+
+	data = reinterpret_cast<TValue *>(ptr);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT, typename TValue, typename TSize, typename TUsage>
+inline void 
+deallocate(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > & me,
+		   TValue * data, 
+		   TSize count,
+		   Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+	typedef Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > TAllocator;
+
+	size_t bytes_needed = count * sizeof(TValue);
+
+	unsigned int block_number = _allocatorBlockNumber(me, bytes_needed);
+	if (block_number == TAllocator::BLOCKING_COUNT)
+	{//no blocking
+		return deallocate(parentAllocator(me), data, count, tag_);
+	}
+
+	bytes_needed = (block_number + 1) << TAllocator::GRANULARITY_BITS;
+
+	//link in recycling list
+	*reinterpret_cast<char **>(data) = me.data_recycled_blocks[block_number];
+	me.data_recycled_blocks[block_number] = reinterpret_cast<char *>(data);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_allocator_simple.h b/src/SeqAn-1.3/seqan/basic/basic_allocator_simple.h
new file mode 100644
index 0000000..b3a0b70
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_allocator_simple.h
@@ -0,0 +1,224 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALLOCATOR_SIMPLE_H
+#define SEQAN_HEADER_BASIC_ALLOCATOR_SIMPLE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// SimpleAlloc Allocator
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Simple Allocator:
+..cat:Allocators
+..general:Class.Allocator
+..summary:General purpose allocator.
+..signature:Allocator< SimpleAlloc<ParentAllocator> >
+..param.ParentAllocator:An allocator that is by the simple allocator used to allocate memory.
+...default:@Tag.Default@
+...remarks:@Tag.Default@ used as allocator means that the default implementations
+of @Function.allocate@ and @Function.deallocate@ are used.
+..include:seqan/basic.h
+*/
+
+template <typename TParentAllocator = Default>
+struct SimpleAlloc;
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+typedef Allocator<SimpleAlloc<Default> > SimpleAllocator;
+
+template <typename TParentAllocator>
+struct Allocator<SimpleAlloc<TParentAllocator> >
+{
+	struct Header
+	{
+		Header * left;
+		Header * right;
+		size_t size;
+	};
+
+	Header * data_storages;
+	Holder<TParentAllocator> data_parent_allocator;
+
+	Allocator():
+		data_storages(0)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Allocator(TParentAllocator & parent_alloc):
+		data_storages(0)
+	{
+SEQAN_CHECKPOINT
+		setValue(data_parent_allocator, parent_alloc);
+	}
+
+	//Dummy copy
+	Allocator(Allocator const &):
+		data_storages(0)
+	{
+	}
+	inline Allocator &
+	operator = (Allocator const &)
+	{
+		clear(*this);
+		return *this;
+	}
+
+	~Allocator()
+	{
+SEQAN_CHECKPOINT
+		clear(*this);
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TParentAllocator>
+inline TParentAllocator &
+parentAllocator(Allocator<SimpleAlloc<TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_parent_allocator);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.Allocator#clear:
+..cat:Memory
+..summary:Deallocates all memory blocks.
+..signature:clear(allocator)
+..param.allocator:Allocator object.
+...type:Class.Allocator
+...concept:Concept.Allocator
+..remarks:This function deallocates all memory blocks 
+that was allocated using @Function.allocate@ for $allocator$.
+The memory is not pooled but directly passed back to the heap manager.
+..see:Function.allocate
+..see:Function.deallocate
+..include:seqan/basic.h
+*/
+template <typename TParentAllocator>
+void
+clear(Allocator<SimpleAlloc<TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+	typedef Allocator<SimpleAlloc<TParentAllocator> > TAllocator;
+
+	while (me.data_storages)
+	{
+		typename TAllocator::Header * next_storage = me.data_storages->right;
+		deallocate(parentAllocator(me), reinterpret_cast<char *>(me.data_storages), me.data_storages->size);
+		me.data_storages = next_storage;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TParentAllocator, typename TValue, typename TSize, typename TUsage>
+inline void
+allocate(Allocator<SimpleAlloc<TParentAllocator> > & me, 
+		 TValue * & data,
+		 TSize count,
+		 Tag<TUsage> const)
+{
+SEQAN_CHECKPOINT
+	typedef Allocator<SimpleAlloc<TParentAllocator> > TAllocator;
+	typedef typename TAllocator::Header THeader;
+
+	//compute needed bytes
+	size_t bytes_needed = count * sizeof(TValue) + sizeof(THeader);
+
+	//allocate storage from parent
+	char * ptr;
+	allocate(parentAllocator(me), ptr, bytes_needed, TagAllocateStorage());
+
+	THeader * new_block = reinterpret_cast<THeader *>(ptr);
+	new_block->left = 0;
+	new_block->right = me.data_storages;
+	new_block->size = bytes_needed;
+
+	if (me.data_storages)
+	{
+		me.data_storages->left = new_block;
+	}
+	me.data_storages = new_block;
+
+	//return data
+	data = reinterpret_cast<TValue *>(ptr + sizeof(THeader));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TParentAllocator, typename TValue, typename TSize, typename TUsage>
+inline void 
+deallocate(Allocator<SimpleAlloc<TParentAllocator> > & me,
+		   TValue * data, 
+		   TSize,
+		   Tag<TUsage> const)
+{
+SEQAN_CHECKPOINT
+	typedef Allocator<SimpleAlloc<TParentAllocator> > TAllocator;
+	typedef typename TAllocator::Header THeader;
+
+	//update links
+	THeader & header = *(reinterpret_cast<THeader *>(data) - 1);
+	if (header.left)
+	{
+		header.left->right = header.right;
+	}
+	else
+	{
+		me.data_storages = header.right;
+	}
+	if (header.right)
+	{
+		header.right->left = header.left;
+	}
+
+	//deallocate storage using parent
+	char * ptr = reinterpret_cast<char *>(& header);
+	deallocate(parentAllocator(me), ptr, header.size);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_allocator_singlepool.h b/src/SeqAn-1.3/seqan/basic/basic_allocator_singlepool.h
new file mode 100644
index 0000000..ed2c0c2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_allocator_singlepool.h
@@ -0,0 +1,312 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALLOCATOR_SINGLE_POOL_H
+#define SEQAN_HEADER_BASIC_ALLOCATOR_SINGLE_POOL_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// SinglePool Allocator
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Single Pool Allocator:
+..cat:Allocators
+..general:Class.Allocator
+..summary:Allocator that pools memory blocks of specific size.
+..signature:Allocator< SinglePool<SIZE, ParentAllocator> >
+..param.SIZE:Size of memory blocks that are pooled.
+...value:An unsigned integer with $SIZE >= sizeof(void *)$.
+..param.ParentAllocator:An allocator that is by the pool allocator used to allocate memory.
+...default:@Spec.Simple Allocator@
+...note:The single pool allocator only supports @Function.clear@ if this function is also implemented for $ParentAllocator$.
+..remarks:A pool allocator allocates several memory blocks at once. 
+Freed blocks are not immediately deallocated but recycled in subsequential allocations.
+This way, the number of calls to the heap manager is reduced, and that speeds up memory management.
+...text:The single pool allocator only pools memory blocks of size $SIZE$.
+Blocks of other sizes are allocated and deallocated using an allocator of type $ParentAllocator$.
+...text:Using the single pool allocator for blocksizes larger than some KB is not advised.
+..include:seqan/basic.h
+*/
+
+template <size_t SIZE, typename TParentAllocator = SimpleAllocator>
+struct SinglePool;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, typename TParentAllocator>
+struct Allocator<SinglePool<SIZE, TParentAllocator> >
+{
+	enum
+	{
+		SIZE_PER_ITEM = SIZE,
+		ITEMS_PER_BLOCK = (SIZE_PER_ITEM < 0x0100) ? 0x01000 / SIZE_PER_ITEM : 16,
+		STORAGE_SIZE = SIZE * ITEMS_PER_BLOCK,
+
+		STORAGE_SIZE_MIN = SIZE
+	};
+
+	char * data_recycled_blocks;
+	char * data_current_begin;
+	char * data_current_end;
+	char * data_current_free;
+	Holder<TParentAllocator> data_parent_allocator;
+
+	Allocator()
+	{
+SEQAN_CHECKPOINT
+		data_recycled_blocks = data_current_end = data_current_free = 0;
+		//dont need to initialize data_current_begin
+	}
+
+	Allocator(size_t reserve_item_count)
+	{
+SEQAN_CHECKPOINT
+		data_recycled_blocks = 0;
+
+		size_t storage_size = (reserve_item_count * SIZE > STORAGE_SIZE_MIN) ? reserve_item_count * SIZE : STORAGE_SIZE_MIN;
+		allocate( parentAllocator( *this ), data_current_begin, storage_size );
+		data_current_end = data_current_begin + storage_size;
+		data_current_free = data_current_begin;
+	}
+
+	Allocator(TParentAllocator & parent_alloc)
+	{
+SEQAN_CHECKPOINT
+		setValue(data_parent_allocator, parent_alloc);
+
+		data_recycled_blocks = data_current_end = data_current_free = 0;
+		//dont need to initialize data_current_begin
+	}
+
+	Allocator(size_t reserve_item_count, TParentAllocator & parent_alloc)
+	{
+SEQAN_CHECKPOINT
+		data_recycled_blocks = 0;
+
+		setValue(data_parent_allocator, parent_alloc);
+
+		size_t storage_size = (reserve_item_count * SIZE > STORAGE_SIZE_MIN) ? reserve_item_count * SIZE : STORAGE_SIZE_MIN;
+		allocate( parentAllocator( *this ), data_current_begin, storage_size );
+		data_current_end = data_current_begin + storage_size;
+		data_current_free = data_current_begin;
+	}
+
+	//Dummy copy
+	Allocator(Allocator const &)
+	{
+		data_recycled_blocks = data_current_end = data_current_free = 0;
+		//dont need to initialize data_current_begin
+	}
+	inline Allocator &
+	operator = (Allocator const &)
+	{
+		clear(*this);
+		return *this;
+	}
+
+	~Allocator()
+	{
+SEQAN_CHECKPOINT
+		clear(*this);
+	}
+};
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, typename TParentAllocator>
+inline TParentAllocator &
+parentAllocator(Allocator<SinglePool<SIZE, TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_parent_allocator);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, typename TParentAllocator>
+void
+clear(Allocator<SinglePool<SIZE, TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+
+	me.data_recycled_blocks = me.data_current_end = me.data_current_free = 0;
+
+	clear(parentAllocator(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, typename TParentAllocator, typename TValue, typename TSize, typename TUsage>
+inline void
+allocate(Allocator<SinglePool<SIZE, TParentAllocator> > & me, 
+		 TValue * & data,
+		 TSize count,
+		 Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+	typedef Allocator<SinglePool<SIZE, TParentAllocator> > TAllocator;
+	size_t bytes_needed = count * sizeof(TValue);
+
+	if (bytes_needed != TAllocator::SIZE_PER_ITEM)
+	{//no blocking
+		allocate(parentAllocator(me), data, count, tag_);
+		return;
+	}
+
+	char * ptr;
+	if (me.data_recycled_blocks)
+	{//use recycled
+		ptr = me.data_recycled_blocks;
+		me.data_recycled_blocks = * reinterpret_cast<char **>(ptr);
+	}
+	else
+	{//use new
+		ptr = me.data_current_free;
+		if (ptr + bytes_needed > me.data_current_end)
+		{//not enough free space in current storage: allocate new
+			allocate(parentAllocator(me), ptr, (size_t) TAllocator::STORAGE_SIZE, tag_);
+			me.data_current_begin = ptr;
+			me.data_current_end = ptr + TAllocator::STORAGE_SIZE;
+		}
+		me.data_current_free = ptr + bytes_needed;
+	}
+
+	data = reinterpret_cast<TValue *>(ptr);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <size_t SIZE, typename TParentAllocator, typename TValue, typename TSize, typename TUsage>
+inline void 
+deallocate(Allocator<SinglePool<SIZE, TParentAllocator> > & me,
+		   TValue * data, 
+		   TSize count,
+		   Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+	typedef Allocator<SinglePool<SIZE, TParentAllocator> > TAllocator;
+
+	size_t bytes_needed = count * sizeof(TValue);
+
+	if (bytes_needed != TAllocator::SIZE_PER_ITEM)
+	{//no blocking
+		deallocate(parentAllocator(me), data, count, tag_);
+		return;
+	}
+
+	//link in recycling list
+	*reinterpret_cast<char **>(data) = me.data_recycled_blocks;
+	me.data_recycled_blocks = reinterpret_cast<char *>(data);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// alternative Interface that takes a Type instead of a SIZE
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TValue, typename TParentAllocator = SimpleAllocator>
+struct SinglePool2;
+
+template <typename TValue, typename TParentAllocator>
+struct Allocator<SinglePool2<TValue, TParentAllocator> >
+{
+	Allocator<SinglePool<sizeof(TValue), TParentAllocator> > data_alloc;
+
+
+	Allocator(size_t reserve_item_count)
+		: data_alloc(reserve_item_count)
+	{
+	}
+
+	Allocator(TParentAllocator & parent_alloc)
+		: data_alloc(parent_alloc)
+	{
+	}
+
+	Allocator(size_t reserve_item_count, TParentAllocator & parent_alloc)
+		: data_alloc(reserve_item_count, parent_alloc)
+
+	{
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TParentAllocator>
+inline TParentAllocator &
+parentAllocator(Allocator<SinglePool2<TValue, TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+	return parentAllocator(me.data_alloc);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TParentAllocator>
+void
+clear(Allocator<SinglePool2<TValue, TParentAllocator> > & me)
+{
+SEQAN_CHECKPOINT
+	clear(me.data_alloc);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TParentAllocator, typename TValue2, typename TSize, typename TUsage>
+inline void
+allocate(Allocator<SinglePool2<TValue, TParentAllocator> > & me, 
+		 TValue2 * & data,
+		 TSize count,
+		 Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+	allocate(me.data_alloc, data, count, tag_);
+}
+
+template <typename TValue, typename TParentAllocator, typename TValue2, typename TSize, typename TUsage>
+inline void 
+deallocate(Allocator<SinglePool2<TValue, TParentAllocator> > & me,
+		   TValue2 * data, 
+		   TSize count,
+		   Tag<TUsage> const tag_)
+{
+SEQAN_CHECKPOINT
+	deallocate(me.data_alloc, data, count, tag_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_allocator_to_std.h b/src/SeqAn-1.3/seqan/basic/basic_allocator_to_std.h
new file mode 100644
index 0000000..5c1966c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_allocator_to_std.h
@@ -0,0 +1,190 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALLOCATOR_TO_STD_H
+#define SEQAN_HEADER_BASIC_ALLOCATOR_TO_STD_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//Filter that adapts seqan allocator zu std allocator
+/**
+.Class.ToStdAllocator:
+..summary:Emulates standard conform allocator.
+..signature:ToStdAllocator<THost, TValue>
+..param.THost:Type of the host allocator object.
+...text:This object is used to call @Function.allocate@ and @Function.deallocate at .
+..param.TValue:Type of allocated items.
+..remarks:The member functions $allocate$ and $deallocate$ of $ToStdAllocator$ call
+the (globale) functions @Function.allocate@ and @Function.deallocate@, respectively. The globale functions
+get an allocator object as their first arguments. This allocator object is not the $ToStdAllocator$ object itself,
+but the host object that was given to the constructor. 
+..cat:Basic
+..remarks:
+..see:Function.allocate
+..see:Function.deallocate
+..include:seqan/basic.h
+*/
+template <typename THost, typename TValue>
+struct ToStdAllocator
+{
+	typedef TValue value_type;
+	typedef value_type * pointer;
+	typedef value_type & reference;
+	typedef value_type const * const_pointer;
+	typedef value_type const & const_reference;
+
+//	typedef typename THost::Size size_type;
+//	typedef typename THost::Difference difference_type;
+	typedef size_t size_type;
+	typedef ptrdiff_t difference_type;
+
+/**
+.Memfunc.ToStdAllocator:
+..summary:Constructor
+..signature:ToStdAllocator(host)
+..class:Class.ToStdAllocator
+..param.host:The host object that is used as allocator for @Function.allocate@ and @Function.deallocate at .
+*/
+	ToStdAllocator(THost & host): m_host(& host)
+	{
+	}
+	template <typename TValue2>
+	ToStdAllocator(ToStdAllocator<THost, TValue2> const & alloc): m_host(alloc.m_host)
+	{
+	}
+	ToStdAllocator & operator= (ToStdAllocator const & alloc)
+	{
+		m_host = alloc.m_host;
+		return *this;
+	}
+	~ToStdAllocator()
+	{
+	}
+
+// TODO(holtgrew): Move to basic_host.h?
+/**
+.Function.host:
+..summary:The object a given object depends on.
+..cat:Dependent Objects
+..signature:host(object)
+..param.object:An object.
+...type:Class.ToStdAllocator
+..returns:The host object.
+..include:seqan/basic.h
+*/
+	pointer allocate(size_type count)
+	{
+		value_type * ptr;
+		seqan::allocate(*m_host, ptr, count);
+		return pointer(ptr);
+	}
+	pointer allocate(size_type count, const void *)
+	{
+		value_type * ptr;
+		seqan::allocate(*m_host, ptr, count);
+		return pointer(ptr);
+	}
+
+	void deallocate(pointer data, size_type count)
+	{
+		seqan::deallocate(*m_host, data, count);
+	}
+
+	void construct(pointer ptr, const_reference data)
+	{
+		new(ptr) TValue(data);
+	}
+
+	void destroy(pointer ptr)
+	{
+		ptr->~TValue();
+	}
+
+	pointer address(reference value) const
+	{
+		return (&value);
+	}
+	const_pointer address(const_reference value) const
+	{
+		return (&value);
+	}
+
+	size_type max_size() const
+	{
+		return ~0UL / sizeof(value_type);
+	}
+
+	template<class TValue2>
+	struct rebind
+	{
+		typedef ToStdAllocator<THost, TValue2> other;
+	};
+
+	template <typename THost2, typename TValue2>
+	friend
+	struct ToStdAllocator;
+
+	private:
+		THost * m_host;
+};
+
+template <typename THost, typename TValue>
+THost & 
+host(ToStdAllocator<THost, TValue> & me)
+{
+   return *me.m_host;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//returns std-allocator type (for allocators)
+template <typename T, typename TData>
+struct StdAllocator
+{
+	typedef ToStdAllocator<T, TData> Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_alphabet_interface.h b/src/SeqAn-1.3/seqan/basic/basic_alphabet_interface.h
new file mode 100644
index 0000000..5036ba8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_alphabet_interface.h
@@ -0,0 +1,1104 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALPHABET_INTERFACE_H
+#define SEQAN_HEADER_BASIC_ALPHABET_INTERFACE_H
+
+#include <new>
+#include <float.h>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+//IsSimple
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.IsSimple:
+..summary:Tests type to be simple.
+..signature:IsSimple<T>::Type
+..param.T:Type that is tested.
+..returns.param.Type:@Tag.Logical Values.True@, if $T$ is a simple type, @Tag.Logical Values.False@ otherwise.
+...default:@Tag.Logical Values.False@
+..remarks:A simple type is a type that does not need constructors to be created,
+a destructor to be destroyed, and copy assignment operators or copy constructors
+to be copied. All POD ("plain old data") types are simple, but some
+non-POD types could be simple too, e.g. some specializations of @Class.SimpleType at .
+..see:Class.SimpleType
+..include:seqan/basic.h
+*/
+
+template <typename T>
+struct IsSimple_ {
+	typedef False Type;
+};
+
+template <typename T>
+struct IsSimple:
+	public IsSimple_<T> {};
+template <typename T>
+struct IsSimple<T const>:
+	public IsSimple<T> {};
+
+//////////////////////////////////////////////////////////////////////////////
+//very basic Alphabets
+
+typedef char Ascii;
+//typedef unsigned char Byte;  // TODO(holtgrew): Disabling, remove together with Ascii and Unicode with #849
+typedef wchar_t Unicode;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.valueConstruct:
+..cat:Content Manipulation
+..summary:Constructs an object at specified position.
+..signature:valueConstruct(iterator [, param [, move_tag] ])
+..param.iterator:Pointer or iterator to position where the object should be constructed.
+..param.param:Parameter that is forwarded to constructor. (optional)
+..param.move_tag:Instance of the @Tag.Move Switch.move switch tag at . (optional)
+...remarks:If the @Tag.Move Switch.move switch tag@ is specified, it is forwarded to the constructor,
+so the constructed object must support move construction.
+..remarks:The type of the destructed object is the @Metafunction.Value.value type@ of $iterator$.
+..include:seqan/basic.h
+*/
+
+struct ValueConstructor_ 
+{
+	template <typename TIterator>
+	static inline void
+	construct(TIterator it)
+	{
+		typedef typename Value<TIterator>::Type		TValue;
+		typedef typename RemoveConst_<TValue>::Type	TNonConstValue;
+		new( (void*) & value(it) ) TNonConstValue;
+	}
+
+	template <typename TIterator, typename TParam>
+	static inline void
+	construct(TIterator it,
+			  TParam const & param_)
+	{
+		typedef typename Value<TIterator>::Type		TValue;
+		typedef typename RemoveConst_<TValue>::Type	TNonConstValue;
+		new( (void*) & value(it) ) TNonConstValue(param_);
+	}
+
+	template <typename TIterator, typename TParam>
+	static inline void
+	construct(TIterator it,
+			  TParam const & param_,
+			  Move tag)
+	{
+		typedef typename Value<TIterator>::Type		TValue;
+		typedef typename RemoveConst_<TValue>::Type	TNonConstValue;
+		new( (void*) & value(it) ) TNonConstValue(param_, tag);
+	}
+};
+
+struct ValueConstructorProxy_ 
+{
+	template <typename TIterator>
+	static inline void construct(TIterator) {}
+
+	template <typename TIterator, typename TParam>
+	static inline void construct(TIterator, TParam const &) {}
+
+	template <typename TIterator, typename TParam>
+	static inline void construct(TIterator, TParam const &, Move) {}
+};
+
+//____________________________________________________________________________
+
+struct ValueDestructor_ 
+{
+	template <typename TValue>
+	static inline void
+	_destruct(TValue* p)
+	{
+		p->~TValue();
+	}
+
+	template <typename TIterator>
+	static inline void
+	destruct(TIterator it)
+	{
+		_destruct(&value(it));
+	}
+};
+struct ValueDestructorProxy_ 
+{
+	template <typename TIterator>
+	static inline void destruct(TIterator) {}
+};
+
+//____________________________________________________________________________
+
+template <typename TIterator>
+inline void
+valueConstruct(TIterator it)
+{
+SEQAN_CHECKPOINT
+	typedef typename If<
+		IsSameType<
+			typename Value<TIterator>::Type &,
+			typename Reference<TIterator>::Type
+		>::VALUE,
+	// THEN
+		ValueConstructor_,			// true,  types are equal
+	// ELSE
+		ValueConstructorProxy_		// false, types differ -> value() returns a proxy
+	>::Type TConstructor;
+
+	TConstructor::construct(it);
+}
+
+template <typename TIterator, typename TParam>
+inline void
+valueConstruct(TIterator it,
+			   TParam const & param_)
+{
+SEQAN_CHECKPOINT
+	typedef typename If<
+		IsSameType<
+			typename Value<TIterator>::Type &,
+			typename Reference<TIterator>::Type
+		>::VALUE,
+	// THEN
+		ValueConstructor_,			// true,  types are equal
+	// ELSE
+		ValueConstructorProxy_		// false, types differ -> value() returns a proxy
+	>::Type TConstructor;
+
+	TConstructor::construct(it, param_);
+}
+
+template <typename TIterator, typename TParam>
+inline void
+valueConstruct(TIterator it,
+			   TParam const & param_,
+			   Move tag)
+{
+SEQAN_CHECKPOINT
+	typedef typename If<
+		IsSameType<
+			typename Value<TIterator>::Type &,
+			typename Reference<TIterator>::Type
+		>::VALUE,
+	// THEN
+		ValueConstructor_,			// true,  types are equal
+	// ELSE
+		ValueConstructorProxy_		// false, types differ -> value() returns a proxy
+	>::Type TConstructor;
+
+	TConstructor::construct(it, param_, tag);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.valueDestruct:
+..cat:Content Manipulation
+..summary:Destoys an object at specified position.
+..signature:valueDestruct(iterator)
+..param.iterator:Pointer or iterator to position where the object should be constructed.
+..remarks:The type of the constructed object is the @Metafunction.Value.value type@ of $iterator$.
+..see:Function.valueConstruct
+..include:seqan/basic.h
+*/
+template <typename TIterator>
+inline void
+valueDestruct(TIterator it)
+{
+SEQAN_CHECKPOINT
+	typedef typename If<
+		IsSameType<
+			typename Value<TIterator>::Type &,
+			typename Reference<TIterator>::Type
+		>::VALUE,
+	// THEN
+		ValueDestructor_,			// true,  types are equal
+	// ELSE
+		ValueDestructorProxy_		// false, types differ -> value() returns a proxy
+	>::Type TDestructor;
+
+	TDestructor::destruct(it);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.valueConstructMove:
+..cat:Content Manipulation
+..summary:Move constructs an object at specified position.
+..signature:valueConstructMove(iterator, param)
+..param.iterator:Pointer or iterator to position where the object should be constructed.
+..param.param:Parameter that is moved to the new constructed object.
+..remarks:The type of the destructed object is the @Metafunction.Value.value type@ of $iterator$.
+..remarks:The default implementation just calls @Function.valueConstruct at .
+..include:seqan/basic.h
+*/
+template <typename TIterator, typename TValue>
+inline void
+valueConstructMove(TIterator it, TValue const & value)
+{
+	valueConstruct(it, value);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//arrayConstruct
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.arrayConstruct:
+..cat:Array Handling
+..summary:Construct objects in a given memory buffer.
+..signature:arrayConstruct(begin, end [, value])
+..param.begin:Iterator to the begin of the range that is to be constructed.
+..param.end:Iterator behind the end of the range.
+..param.value:Argument that is forwarded to the constructor. (optional)
+...text:An appropriate constructor is required. 
+If $value$ is not specified, the default constructor is used. 
+..remarks:The type of the constructed Objects is the @Metafunction.Value.value type@
+of $begin$ and $end$.
+..see:Function.arrayDestruct
+..see:Function.arrayConstructCopy
+..see:Function.arrayFill
+..see:Class.SimpleType
+..see:Function.valueConstruct
+..include:seqan/basic.h
+*/
+template<typename TIterator1, typename TIterator2>
+inline void 
+_arrayConstructDefault(TIterator1 begin_, 
+						TIterator2 end_)
+{
+SEQAN_CHECKPOINT
+	while (begin_ != end_)
+	{
+		valueConstruct(begin_);
+		++begin_;
+	}
+}
+template<typename TIterator1, typename TIterator2>
+inline void 
+arrayConstruct(TIterator1 begin_, 
+			   TIterator2 end_)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructDefault(begin_, end_);
+}
+
+//____________________________________________________________________________
+
+template<typename TIterator1, typename TIterator2, typename TParam>
+inline void 
+_arrayConstructDefault(TIterator1 begin_, 
+						TIterator2 end_, 
+						TParam const & param_)
+{
+SEQAN_CHECKPOINT
+	while (begin_ != end_)
+	{
+		valueConstruct(begin_, param_);
+		++begin_;
+	}
+}
+template<typename TIterator1, typename TIterator2, typename TParam>
+inline void 
+arrayConstruct(TIterator1 begin_, 
+			   TIterator2 end_, 
+			   TParam const & param_)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructDefault(begin_, end_, param_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayConstructCopy
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayConstructCopy:
+..cat:Array Handling
+..summary:Copy constructs an array of objects into in a given memory buffer.
+..signature:arrayConstructCopy(source_begin, source_end, target)
+..param.source_begin:Iterator to the first element of the source range.
+..param.source_end:Iterator behind the last element of the source range.
+...text:$source_end$ should have the same type as $source_begin$.
+..param.target:Pointer to the memory block the new objects will be constructed in.
+...text:The type of $target$ specifies the type of the constructed objects:
+If $T*$ is the type of $target$, then the function constructs objects of type $T$. 
+...text:The memory buffer should be large enough to store $source_end$ - $source_begin$ objects.
+An appropriate (copy-) constructor that constructs an target objects given a source object is required.
+..see:Function.arrayDestruct
+..see:Function.arrayCopyForward
+..see:Function.arrayCopy
+..see:Function.valueConstruct
+..include:seqan/basic.h
+*/
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+_arrayConstructCopyDefault(TSource1 source_begin, 
+							TSource2 source_end, 
+							TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	while (source_begin != source_end)
+	{
+		valueConstruct(target_begin, getValue(source_begin));
+		++source_begin;
+		++target_begin;
+	}
+}
+
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+arrayConstructCopy(TSource1 source_begin, 
+				   TSource2 source_end, 
+				   TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructCopyDefault(source_begin, source_end, target_begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayConstructMove
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayConstructMove:
+..cat:Array Handling
+..summary:Move constructs an array of objects into in a given memory buffer.
+..signature:arrayConstructMove(source_begin, source_end, target)
+..param.source_begin:Iterator to the first element of the source range.
+..param.source_end:Iterator behind the last element of the source range.
+...text:$source_end$ should have the same type as $source_begin$.
+..param.target:Pointer to the memory block the new objects will be constructed in.
+...text:The type of $target$ specifies the type of the constructed objects:
+If $T*$ is the type of $target$, then the function constructs objects of type $T$. 
+...text:The memory buffer should be large enough to store $source_end$ - $source_begin$ objects.
+An appropriate move constructor that constructs an target objects given a source object is required.
+..see:Function.arrayDestruct
+..see:Function.arrayConstructCopy
+..see:Function.arrayMoveForward
+..see:Function.arrayMove
+..see:Function.valueConstruct
+..include:seqan/basic.h
+*/
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+_arrayConstructMoveDefault(TSource1 source_begin, 
+							TSource2 source_end, 
+							TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	while (source_begin < source_end)
+	{
+		valueConstructMove(target_begin, getValue(source_begin));
+		++source_begin;
+		++target_begin;
+	}
+}
+
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+arrayConstructMove(TSource1 source_begin, 
+				   TSource2 source_end, 
+				   TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayMoveConstruct_Default(source_begin, source_end, target_begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayDestruct
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayDestruct:
+..cat:Array Handling
+..summary:Destroys an array of objects.
+..signature:arrayDestruct(begin, end)
+..param.begin:Iterator to the begin of the range that is to be destructed.
+..param.end:Iterator behind the end of the range.
+..remarks:This function does not deallocates the memory.
+..see:Class.SimpleType
+..see:Function.valueDestruct
+..include:seqan/basic.h
+*/
+template<typename TIterator1, typename TIterator2>
+inline void 
+_arrayDestructDefault(TIterator1 begin_, 
+					   TIterator2 end_)
+{
+SEQAN_CHECKPOINT
+	while (begin_ != end_)
+	{
+		valueDestruct(begin_);
+		++begin_;
+	}
+}
+template<typename TIterator1, typename TIterator2>
+inline void 
+arrayDestruct(TIterator1 begin_, 
+			  TIterator2 end_)
+{
+SEQAN_CHECKPOINT
+	_arrayDestructDefault(begin_, end_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayFill
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayFill:
+..cat:Array Handling
+..summary:Assigns one object to each element of a range.
+..signature:arrayFill(begin, end, value)
+..param.begin:Iterator to the begin of the range that is to be filled.
+..param.end:Iterator behind the end of the range.
+..param.value:Argument that is assigned to all $count$ objects in $array$.
+..remarks:All objects $target_begin[0]$ to $target_begin[count-1]$ are set to $value$.
+..see:Function.arrayCopy
+..see:Function.arrayCopyForward
+..include:seqan/basic.h
+*/
+template<typename TIterator1, typename TIterator2, typename TValue>
+inline void 
+arrayFill(TIterator1 begin_,
+		  TIterator2 end_, 
+		  TValue const & value)
+{
+SEQAN_CHECKPOINT
+	::std::fill_n(begin_, end_ - begin_, value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayCopyForward
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayCopyForward:
+..cat:Array Handling
+..summary:Copies a range of objects into another range of objects starting from the first element.
+..signature:arrayCopyForward(source_begin, source_end, target)
+..param.source_begin:Iterator to the first element of the source array.
+..param.source_end:Iterator behind the last element of the source array.
+...text:$source_end$ must have the same type as $source_begin$.
+..param.target:Iterator to the first element of the target array.
+...text:The target capacity should be at least as long as the source range.
+..remarks.note:Be careful if source and target range overlap, because in this case
+	some source elements could be accidently overwritten before they are moved.
+..remarks:If there is no need for the source elements to persist, consider to use 
+ at Function.arrayMoveForward@ instead to improve performance.
+..see:Class.SimpleType
+..include:seqan/basic.h
+*/
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+_arrayCopyForwardDefault(TSource1 source_begin, 
+						  TSource2 source_end, 
+						  TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	::std::copy(source_begin, source_end, target_begin);
+}
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+arrayCopyForward(TSource1 source_begin, 
+				 TSource2 source_end, 
+				 TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayCopyForwardDefault(source_begin, source_end, target_begin);	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayCopyBackward
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayCopyBackward:
+..cat:Array Handling
+..summary:Copies a range of objects into another range of objects starting from the last element.
+..signature:arrayCopyBackward(source_begin, source_end, target)
+..param.source_begin:Iterator to the first element of the source array.
+..param.source_end:Iterator behind the last element of the source array.
+...text:$source_end$ must have the same type as $source_begin$.
+..param.target:Iterator to the first element of the target array.
+...text:The target capacity should be at least as long as the source range.
+..remarks.note:Be careful if source and target range overlap, because in this case
+	some source elements could be accidently overwritten before they are moved.
+..remarks.text:If source and target do not overlap, consider to use the function
+ at Function.arrayCopyForward@ instead that is faster in some cases.
+..remarks:If there is no need for the source elements to persist, consider to use 
+ at Function.arrayMoveBackward@ instead to improve performance.
+..remarks.note:The semantic of this function's argument $target$ differ from the arguments of $::std::copy_backward$.
+..see:Function.arrayCopyForward
+..see:Class.SimpleType
+..include:seqan/basic.h
+*/
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+_arrayCopyBackwardDefault(TSource1 source_begin, 
+						   TSource2 source_end, 
+						   TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	::std::copy_backward(source_begin, source_end, target_begin + (source_end - source_begin));
+}
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+arrayCopyBackward(TSource1 source_begin, 
+				  TSource2 source_end, 
+				  TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayCopyBackwardDefault(source_begin, source_end, target_begin);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayCopy
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayCopy:
+..cat:Array Handling
+..summary:Copies a range of objects into another range of objects.
+..signature:arrayCopy(source_begin, source_end, target)
+..param.source_begin:Iterator to the first element of the source range.
+..param.source_end:Iterator behind the last element of the source range.
+...text:$source_end$ must have the same type as $source_begin$.
+..param.target:Iterator to the first element of the target range.
+...text:The target capacity should be at least as long as the source range.
+..remarks.text:If source and target range do not overlap, consider to use
+	@Function.arrayCopyForward@ instead to improve performance.
+..remarks:If there is no need for the source elements to persist, consider to use 
+	@Function.arrayMoveForward@ instead to improve performance.
+..DISABLED.remarks.note:Be careful if source and target range overlap and the size of the
+	source elements differ from the size of target elements, because in this case
+	some source elements could be accidently overwritten before they are moved.
+..see:Function.arrayCopyForward
+..see:Function.arrayCopyBackward
+..see:Class.SimpleType
+..include:seqan/basic.h
+*/
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void arrayCopy(TSource1 source_begin, 
+					  TSource2 source_end, 
+					  TTarget target_begin)
+{
+	if ((void *) source_begin >= (void *) target_begin)
+	{
+SEQAN_CHECKPOINT
+		arrayCopyForward(source_begin, source_end, target_begin);
+	}
+	else
+	{
+SEQAN_CHECKPOINT
+		arrayCopyBackward(source_begin, source_end, target_begin);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayMoveForward
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayMoveForward:
+..cat:Array Handling
+..summary:Moves a range of objects into another range of objects starting from the first element.
+..signature:arrayMoveForward(source_begin, source_end, target)
+..param.source_begin:Iterator to the first element of the source array.
+..param.source_end:Iterator behind the last element of the source array.
+...text:$source_end$ must have the same type as $source_begin$.
+..param.target:Iterator to the first element of the target array.
+...text:The target capacity should be at least as long as the source range.
+..remarks:The function possibly clears (but does not destroy) the source elements.
+	If source elements must persist, consider to use @Function.arrayCopyForward@ instead.
+..remarks.note:Be careful if source and target range overlap, because in this case
+	some source elements could be accidently overwritten before they are moved.
+..see:Function.arrayCopyForward
+..see:Class.SimpleType
+..include:seqan/basic.h
+*/
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+_arrayMoveForwardDefault(TSource1 source_begin, 
+						  TSource2 source_end, 
+						  TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	while (source_begin != source_end)
+	{
+		move(*target_begin, *source_begin);
+		++source_begin;
+		++target_begin;
+	}
+}
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+arrayMoveForward(TSource1 source_begin, 
+				 TSource2 source_end, 
+				 TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayMoveForwardDefault(source_begin, source_end, target_begin);	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayMoveBackward
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayMoveBackward:
+..cat:Array Handling
+..summary:Moves a range of objects into another range of objects starting from the last element.
+..signature:arrayMoveBackward(source_begin, source_end, target)
+..param.source_begin:Iterator to the first element of the source array.
+..param.source_end:Iterator behind the last element of the source array.
+...text:$source_end$ must have the same type as $source_begin$.
+..param.target:Iterator to the first element of the target array.
+...text:The target capacity should be at least as long as the source range.
+..remarks:The function possibly clears (but does not destroy) the source elements.
+	If source elements must persist, consider to use @Function.arrayCopyBackward@ instead.
+..remarks.note:Be careful if source and target range overlap, because in this case
+	some source elements could be accidently overwritten before they are moved.
+..remarks.text:If source and target do not overlap, consider to use the function
+ at Function.arrayMoveForward@ instead that is faster in some cases.
+..remarks.note:The semantic of this function's argument $target$ differ from the arguments of $::std::copy_backward$.
+..see:Function.arrayMoveForward
+..see:Function.arrayCopyBackward
+..see:Class.SimpleType
+..include:seqan/basic.h
+*/
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+_arrayMoveBackwardDefault(TSource1 source_begin, 
+						   TSource2 source_end, 
+						   TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	target_begin += (source_end - source_begin);
+	while (source_end != source_begin)
+	{
+		--source_end;
+		--target_begin;
+		move(*target_begin, *source_end);
+	}
+}
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+arrayMoveBackward(TSource1 source_begin, 
+				  TSource2 source_end, 
+				  TTarget target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayMoveBackwardDefault(source_begin, source_end, target_begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayMove
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayMove:
+..cat:Array Handling
+..summary:Moves a range of objects into another range of objects.
+..signature:arrayMove(source_begin, source_end, target)
+..param.source_begin:Iterator to the first element of the source range.
+..param.source_end:Iterator behind the last element of the source range.
+...text:$source_end$ must have the same type as $source_begin$.
+..param.target:Iterator to the first element of the target range.
+...text:The target capacity should be at least as long as the source range.
+..remarks:The function possibly clears (but does not destroy) the source elements.
+	If source elements must persist, consider to use @Function.arrayCopy@ instead.
+..remarks.text:If source and target range do not overlap, consider to use
+	@Function.arrayMoveForward@ instead to improve performance.
+..DISABLED.remarks.note:Be careful if source and target range overlap and the size of the
+	source elements differ from the size of target elements, because in this case
+	some source elements could be accidently overwritten before they are moved.
+..remarks.note:Don't confuse this function with the standard $move$ function that
+resembles @Function.arrayCopy at .
+..see:Function.arrayMoveForward
+..see:Function.arrayMoveBackward
+..see:Function.arrayCopy
+..see:Class.SimpleType
+..include:seqan/basic.h
+*/
+template<typename TTarget, typename TSource1, typename TSource2>
+inline void 
+arrayMove(TSource1 source_begin, 
+		  TSource2 source_end,
+		  TTarget target_begin)
+{
+	if ((void *) source_begin >= (void *) target_begin)
+	{
+SEQAN_CHECKPOINT
+		arrayMoveForward(source_begin, source_end, target_begin);
+	}
+	else
+	{
+SEQAN_CHECKPOINT
+		arrayMoveBackward(source_begin, source_end, target_begin);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayClearSpace
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.arrayClearSpace:
+..cat:Array Handling
+..summary:Destroys the begin of an array and keeps the rest.
+..signature:arrayClearSpace(arr_begin, arr_length, keep_from, move_to)
+..param.arr_begin:Pointer to the first element of the array.
+..param.arr_length:Length of the array.
+..param.keep_from:Offset of the first object that will be kept.
+..param.move_to:Offset the first kept object will get at the end of the function. 
+..remarks.text:The objects $arr[keep_from]$ to $arr[arr_length-1]$
+are moved to the area beginning at positions $move_to$. 
+All objects in $arr[0]$ to $arr[keep_from-1]$ are destroyed.
+After this function, the first $move_to$ positions of the array
+are free and dont contain objects. 
+..remarks.text:The array must have at least enough space to store $arr_length + move_to - keep_from$ objects.
+..see:Function.arrayCopy
+..see:Function.arrayDestruct
+..see:Function.arrayCopyForward
+..see:Class.SimpleType
+..include:seqan/basic.h
+*/
+template <typename TIterator>
+void _arrayClearSpaceDefault(TIterator array_begin, 
+							  size_t array_length, 
+							  size_t keep_from, 
+							  size_t move_to)
+{
+	if (keep_from == array_length)
+	{
+		arrayDestruct(array_begin, array_begin + array_length);
+		return;
+	}
+
+	SEQAN_ASSERT(keep_from < array_length)
+
+	if (keep_from == move_to)
+	{
+		arrayDestruct(array_begin, array_begin + move_to);
+	}
+	else if (keep_from < move_to) 
+	{
+		if (array_length > move_to)
+		{
+SEQAN_CHECKPOINT
+			size_t middle = array_length - (move_to - keep_from);
+			arrayConstructMove(array_begin + middle, array_begin + array_length, array_begin + array_length);
+			arrayMove(array_begin + keep_from, array_begin + middle, array_begin + move_to);
+			arrayDestruct(array_begin, array_begin + move_to);
+		}
+		else
+		{
+SEQAN_CHECKPOINT
+			arrayConstructMove(array_begin + keep_from, array_begin + array_length, array_begin + move_to);
+			arrayDestruct(array_begin, array_begin + array_length);
+		}
+	}
+	else
+	{
+SEQAN_CHECKPOINT
+		arrayMove(array_begin + keep_from, array_begin + array_length, array_begin + move_to);
+		arrayDestruct(array_begin, array_begin + move_to);
+		arrayDestruct(array_begin + array_length - (keep_from - move_to), array_begin + array_length);
+	}
+}
+
+template <typename TIterator>
+void arrayClearSpace(TIterator array_begin, 
+					 size_t array_length, 
+					 size_t keep_from, 
+					 size_t move_to)
+{
+	_arrayClearSpaceDefault(array_begin, array_length, keep_from, move_to);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//BitsPerValue
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Metafunction.BitsPerValue:
+..summary:Number of bits needed to store a value.
+..signature:BitsPerValue<T>::VALUE
+..param.T:A class.
+..returns.param.VALUE:Number of bits needed to store $T$.
+...default:$sizeof<T> * 8$
+..see:Metafunction.ValueSize
+..include:seqan/basic.h
+*/
+template <typename TValue>
+struct BitsPerValue
+{
+	enum { VALUE = sizeof(TValue) * 8 };
+};
+template <typename TValue>
+struct BitsPerValue<TValue const>:
+	public BitsPerValue<TValue> {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//BytesPerValue
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.BytesPerValue:
+..summary:Number of bytes needed to store a value.
+..signature:BytesPerValue<T>::VALUE
+..param.T:A class.
+..returns.param.VALUE:Number of bytes needed to store $T$.
+...default:$BitsPerValue / 8$, rounded up. For built-in types, this is the same as $sizeof(T)$.
+..see:Metafunction.ValueSize
+..see:Metafunction.BitsPerValue
+..include:seqan/basic.h
+*/
+
+template <typename TValue>
+struct BytesPerValue
+{
+	enum { VALUE = (BitsPerValue<TValue>::VALUE + 7) / 8 };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// IntegralPerValue
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.IntegralForValue:
+..summary:Returns an itegral type that provides sufficient space to store a value.
+..signature:IntegralForValue<T>::Type
+..param.T:A class.
+..returns.param.Type:An integral type that can store $T$ values.
+..remarks:The type is the smallest unsigned integral type that has a size of at least @Metafunction.BytesPerValue@ bytes.
+...tableheader:bytes|integral type
+...table:1|$unsigned char$
+...table:2|$unsigned short$
+...table:3|$unsigned int$
+...table:4|$unsigned int$
+...table:5 and above|$__int64$
+..remarks:Note that the returned integral type cannot store $T$ values, if $T$ takes more than 8 bytes, 
+	since there exists no integral type that provides sufficient space to store types of this size.
+..see:Metafunction.ValueSize
+..see:Metafunction.BitsPerValue
+..see:Metafunction.BytesPerValue
+..include:seqan/basic.h
+*/
+
+
+template <int SIZE>
+struct IntegralForValueImpl_
+{
+	typedef __int64 Type;
+};
+template <>
+struct IntegralForValueImpl_<1>
+{
+	typedef unsigned char Type;
+};
+template <>
+struct IntegralForValueImpl_<2>
+{
+	typedef unsigned short Type;
+};
+template <>
+struct IntegralForValueImpl_<3>
+{
+	typedef unsigned int Type;
+};
+template <>
+struct IntegralForValueImpl_<4>
+{
+	typedef unsigned int Type;
+};
+
+template <typename TValue>
+struct IntegralForValue:
+	IntegralForValueImpl_<BytesPerValue<TValue>::VALUE>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//ValueSize
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Metafunction.ValueSize:
+..summary:Number of different values a value type object can have.
+..signature:ValueSize<T>::VALUE
+..param.T:A class.
+..returns.param.VALUE:Value size of $T$.
+..remarks
+...text:This function is only defined for integral types like $unsigned int$, $double$ or @Spec.Dna at .
+..see:Metafunction.Value
+..include:seqan/basic.h
+*/
+template <typename T>
+struct ValueSize
+{
+	enum { VALUE = 1 << BitsPerValue<T>::VALUE };
+};
+template <typename TValue>
+struct ValueSize<TValue const>:
+	public ValueSize<TValue> {};
+
+template <typename TValue> 
+struct InternalValueSize_:
+	public ValueSize<TValue> {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename T >
+struct MaximumValueUnsigned_ {	static const T VALUE; };
+template < typename T >
+struct MaximumValueSigned_ {	static const T VALUE; };
+
+template < typename T = void >
+struct MaximumValueFloat_ {	static const float VALUE; };
+template < typename T = void >
+struct MaximumValueDouble_ {	static const double VALUE; };
+
+template < typename T >
+struct MinimumValueUnsigned_ {	static const T VALUE; };
+template < typename T >
+struct MinimumValueSigned_ {	static const T VALUE; };
+
+template < typename T = void >
+struct MinimumValueFloat_ {	static const float VALUE; };
+template < typename T = void >
+struct MinimumValueDouble_ {	static const double VALUE; };
+
+
+template < typename T >
+const T MaximumValueUnsigned_<T>::VALUE = ~(T)0;
+template < typename T >
+const T MaximumValueSigned_<T>::VALUE = ( (((T)1 << (BitsPerValue<T>::VALUE - 2)) - 1) << 1) + 1;
+template < typename T >
+const float MaximumValueFloat_<T>::VALUE = FLT_MAX;
+template < typename T >
+const double MaximumValueDouble_<T>::VALUE = DBL_MAX;
+
+template < typename T >
+const T MinimumValueUnsigned_<T>::VALUE = 0;
+template < typename T >
+const T MinimumValueSigned_<T>::VALUE = ~(T)MaximumValueSigned_<T>::VALUE;
+template < typename T >
+const float MinimumValueFloat_<T>::VALUE = -FLT_MAX;
+template < typename T >
+const double MinimumValueDouble_<T>::VALUE = -DBL_MAX;
+
+
+/**
+.Metafunction.MaxValue:
+..cat:Miscellaneous
+..summary:Supremum for a given type.
+..signature:MaxValue<T>::VALUE
+..param.T:An ordered type.
+..returns.param.VALUE:A value $sup$ for which holds: $sup >= i$ for all values $i$ of type $T$.
+..remarks:Note tat
+..see:Function.maxValue
+..include:seqan/basic.h
+ */
+template <
+	typename T,
+	typename TParent = typename If<
+	  IsSameType<double, T>::VALUE,
+	  MaximumValueDouble_<>,
+	  typename If<
+      IsSameType<float, T>::VALUE,
+      MaximumValueFloat_<>,
+      typename If<
+        IsSameType< typename MakeSigned_<T>::Type, T >::VALUE,
+        MaximumValueSigned_<T>,
+        MaximumValueUnsigned_<T>
+        >::Type
+      >::Type
+    >::Type
+  >
+struct MaxValue:
+	public TParent 
+{
+};
+
+/**
+.Metafunction.MinValue:
+..cat:Miscellaneous
+..summary:Infimum for a given type.
+..signature:Infimum<T>::VALUE
+..param.T:An ordered type.
+..returns.param.VALUE:A value $inf$ for which holds: $inf <= i$ for all values $i$ of type $T$.
+..remarks:Note tat
+..see:Function.minValue
+..include:seqan/basic.h
+ */
+template <
+	typename T,
+	typename TParent = typename If<
+	  IsSameType<double, T>::VALUE,
+	  MinimumValueDouble_<>,
+	  typename If<
+      IsSameType<float, T>::VALUE,
+      MinimumValueFloat_<>,
+      typename If<
+        IsSameType< typename MakeSigned_<T>::Type, T >::VALUE,
+        MinimumValueSigned_<T>,
+        MinimumValueUnsigned_<T>
+        >::Type
+      >::Type
+    >::Type
+  >
+struct MinValue:
+	public TParent
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_alphabet_interface2.h b/src/SeqAn-1.3/seqan/basic/basic_alphabet_interface2.h
new file mode 100644
index 0000000..a2a7815
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_alphabet_interface2.h
@@ -0,0 +1,246 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALPHABET_INTERFACE2_H
+#define SEQAN_HEADER_BASIC_ALPHABET_INTERFACE2_H
+
+#include <new>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// gapValue, gapValueImpl
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.gapValueImpl:
+..hidefromindex
+..cat:Alphabets
+..summary:Implements @Function.gapValue at .
+..signature:gapValueImpl(value_pointer_tag)
+..param.value_pointer_tag:A pointer that is used as a tag to specify the value type.
+...remarks:The pointer needs not to point to a valid object, so it is possible to use a null pointer here.
+..returns:A gap character.
+..remarks.text:This function implements @Function.getValue at . 
+It is recommended to use @Function.gapValue@ rather than $gapValueImpl$.
+..include:seqan/basic.h
+*/
+
+template <typename T>
+inline T const &
+gapValueImpl(T *)
+{
+SEQAN_CHECKPOINT
+	static T const _gap = T();
+	return _gap;
+}
+
+template <typename T>
+inline T
+unknownValueImpl(T *)
+{
+SEQAN_CHECKPOINT
+	return 'N';
+}
+
+/**
+.Function.gapValue:
+..cat:Alphabets
+..cat:Alignments
+..summary:Returns reference to a value that is used as gap character.
+..signature:gapValue<TValue>()
+..param.TValue:Value type.
+..returns:A gap character.
+..remarks.text:The function is implemented in @Function.gapValueImpl at . 
+Do not specialize $gapValue$, specialize @Function.gapValueImpl@ instead!
+..see:Function.gapValueImpl
+..include:seqan/basic.h
+*/
+
+/*
+template <typename T>
+inline T const &
+gapValue()
+{
+SEQAN_CHECKPOINT
+	static T * _tag = 0;
+	return gapValueImpl(_tag);
+}
+*/
+template <typename T>
+inline T
+gapValue()
+{
+SEQAN_CHECKPOINT
+	static T * _tag = 0;
+	return gapValueImpl(_tag);
+}
+
+template <typename T>
+inline T
+unknownValue()
+{
+SEQAN_CHECKPOINT
+	static T * _tag = 0;
+	return unknownValueImpl(_tag);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// maxValue, supremumValueImpl
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.supremumValueImpl:
+..hidefromindex
+..cat:Alphabets
+..summary:Implements @Function.maxValue at .
+..signature:supremumValueImpl(value_pointer_tag)
+..param.value_pointer_tag:A pointer that is used as a tag to specify the value type.
+...remarks:The pointer needs not to point to a valid object, so it is possible to use a null pointer here.
+..returns:A value $inf$ that holds: $inf >= i$ for all values $i$.
+..remarks.text:This function implements @Function.maxValue at . 
+It is recommended to use @Function.maxValue@ rather than $supremumValueImpl$.
+..status:deprecated, will be removed in favour of @Metafunction.MaxValue@
+..include:seqan/basic.h
+*/
+
+/*
+template <typename T>
+inline T const &
+supremumValueImpl(T *)
+{
+	static T const _value = -1;
+	return _value;
+}
+*/
+
+/**
+.Function.maxValue:
+..cat:Alphabets
+..summary:Supremum for a given type.
+..signature:maxValue<T>()
+..param.T:An ordered type.
+..returns:A value $inf$ that holds: $inf >= i$ for all values $i$ of type $T$.
+..remarks.text:The function is implemented in @Function.supremumValueImpl at . 
+Do not specialize $maxValue$, specialize @Function.supremumValueImpl@ instead!
+..see:Function.supremumValueImpl
+..status:deprecated, will be removed in favour of @Metafunction.MaxValue@
+..include:seqan/basic.h
+*/
+
+template <typename T>
+inline T const &
+maxValue()
+{
+SEQAN_CHECKPOINT
+	T * _tag = 0;
+	return supremumValueImpl(_tag);
+}
+
+template <typename T>
+inline T const &
+maxValue(T)
+{
+SEQAN_CHECKPOINT
+	T * _tag = 0;
+	return supremumValueImpl(_tag);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// minValue, infimumValueImpl
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.infimumValueImpl:
+..hidefromindex
+..cat:Alphabets
+..summary:Implements @Function.minValue at .
+..signature:infimumValueImpl(value_pointer_tag)
+..param.value_pointer_tag:A pointer that is used as a tag to specify the value type.
+...remarks:The pointer needs not to point to a valid object, so it is possible to use a null pointer here.
+..returns:A value $inf$ that holds: $inf <= i$ for all values $i$.
+..remarks.text:This function implements @Function.minValue at . 
+It is recommended to use @Function.minValue@ rather than $infimumValueImpl$.
+..status:deprecated, will be removed in favour of @Metafunction.MinValue@
+..include:seqan/basic.h
+*/
+
+/*
+template <typename T>
+inline T const &
+infimumValueImpl(T *)
+{
+	static T const _value = -1;
+	return _value;
+}
+*/
+
+/**
+.Function.minValue:
+..cat:Alphabets
+..summary:Infimum for a given type.
+..signature:minValue<T>()
+..param.T:An ordered type.
+..returns:A value $inf$ that holds: $inf <= i$ for all values $i$ of type $T$.
+..remarks.text:The function is implemented in @Function.infimumValueImpl at . 
+Do not specialize $minValue$, specialize @Function.infimumValueImpl@ instead!
+..see:Function.infimumValueImpl
+..see:Function.maxValue
+..status:deprecated, will be removed in favour of @Metafunction.MinValue@
+..include:seqan/basic.h
+*/
+
+template <typename T>
+inline T const &
+minValue()
+{
+SEQAN_CHECKPOINT
+	T * _tag = 0;
+	return infimumValueImpl(_tag);
+}
+
+template <typename T>
+inline T const &
+minValue(T)
+{
+SEQAN_CHECKPOINT
+	T * _tag = 0;
+	return infimumValueImpl(_tag);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_alphabet_simple.h b/src/SeqAn-1.3/seqan/basic/basic_alphabet_simple.h
new file mode 100644
index 0000000..c774ff7
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_alphabet_simple.h
@@ -0,0 +1,2357 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Implementation of SimpleType, the biological sequence types and conversion
+// tables.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALPHABET_SIMPLE_H
+#define SEQAN_HEADER_BASIC_ALPHABET_SIMPLE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//Class that is used for various simple value types
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.SimpleType:
+..cat:Basic
+..summary:Implementation for "simple" types.
+..signature:SimpleType<TValue, TSpec>
+..param.TValue:Type that stores the values of an instance.
+...remarks:TValue must be a simple type.
+...metafunction:Metafunction.Value
+..param.TSpec:Specialization tag.
+...metafunction:Metafunction.Spec
+..remarks:
+...text:A "simple type" is a C++ type that can be constructed without constructor,
+destructed without destructor and copied without copy constructor or assignment operator.
+All basic types (like $char$, $int$ or $float$) are simple. Pointers, references and arrays of
+simple types are simple.
+POD types ("plain old data types"), that are - simplified spoken - C++-types that already existed in C,
+are simple too. 
+...text:Arrays of simple types can be copied very fast by memory manipulation routines, 
+but the default implementation of functions like @Function.arrayCopyForward@ and @Function.arrayCopy@
+are not optimized for simple types this way.
+But for classes derived from $SimpleType$, optimized variants of array manipulation functions are applied. 
+...text:Note that simple types need not to be derived or specialized from $SimpleType$, but
+it could be convenient to do so.
+..implements:Concept.Simple Type
+..include:seqan/basic.h
+*/
+// TODO(holtgrew): This should actually be a class.
+template <typename TValue, typename TSpec>
+struct SimpleType
+{
+//____________________________________________________________________________
+
+	TValue value;
+
+//____________________________________________________________________________
+
+	SimpleType() 
+	{
+SEQAN_CHECKPOINT
+	}
+
+//____________________________________________________________________________
+
+	SimpleType(SimpleType const & other)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, other);
+	}
+
+	template <typename T> 
+	SimpleType(T const & other) 
+	{
+SEQAN_CHECKPOINT
+		assign(*this, other);
+	}
+
+
+//____________________________________________________________________________
+
+	SimpleType & operator=(SimpleType const & other) 
+	{ 
+SEQAN_CHECKPOINT
+		assign(*this, other);
+		return *this;
+	}
+
+	template <typename T>
+	SimpleType & operator=(T const & other) 
+	{ 
+SEQAN_CHECKPOINT
+		assign(*this, other);
+		return *this;
+	}
+//____________________________________________________________________________
+
+	~SimpleType()
+	{
+SEQAN_CHECKPOINT
+	}
+//____________________________________________________________________________
+
+
+    // Class.SimpleType specifies type conversion operators for all built-in
+    // integer types since there is no way to extend the build-in types with
+    // copy and assignment constructors in C++.
+    //
+    // This cannot be a template since it would conflict to the template
+    // constructor.
+
+    // TODO(holtgrew): These are candidates for breaking the style convention and simply write each function in one line.
+
+	operator __int64() const
+	{
+SEQAN_CHECKPOINT
+		__int64 c;
+		assign(c, *this);
+		return c;
+	}
+
+	operator __uint64() const
+	{
+SEQAN_CHECKPOINT
+		__uint64 c;
+		assign(c, *this);
+		return c;
+	}
+
+
+	operator int() const
+	{
+SEQAN_CHECKPOINT
+		int c;
+		assign(c, *this);
+		return c;
+	}
+	operator unsigned int() const
+	{
+SEQAN_CHECKPOINT
+		unsigned int c;
+		assign(c, *this);
+		return c;
+	}
+	operator short() const
+	{
+SEQAN_CHECKPOINT
+		short c;
+		assign(c, *this);
+		return c;
+	}
+	operator unsigned short() const
+	{
+SEQAN_CHECKPOINT
+		unsigned short c;
+		assign(c, *this);
+		return c;
+	}
+	operator char() const
+	{
+SEQAN_CHECKPOINT
+		char c;
+		assign(c, *this);
+		return c;
+	}
+	operator signed char() const
+	{
+SEQAN_CHECKPOINT
+		signed char c;
+		assign(c, *this);
+		return c;
+	}
+	operator unsigned char() const
+	{
+SEQAN_CHECKPOINT
+		unsigned char c;
+		assign(c, *this);
+		return c;
+	}
+
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// METAFUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.IsSimple.param.T.type:Class.SimpleType
+
+template <typename TValue, typename TSpec>
+struct IsSimple<SimpleType<TValue, TSpec> >
+{
+	typedef True Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.SimpleType
+template <typename TValue, typename TSpec>
+struct Value<SimpleType<TValue, TSpec> >
+{
+	typedef TValue Type;
+};
+
+template <typename TValue, typename TSpec>
+struct Value<SimpleType<TValue, TSpec> const >
+{
+	typedef TValue const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.SimpleType
+template <typename TValue, typename TSpec>
+struct Spec<SimpleType<TValue, TSpec> >
+{
+	typedef TSpec Type;
+};
+
+template <typename TValue, typename TSpec>
+struct Spec<SimpleType<TValue, TSpec> const >
+{
+	typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct Iterator<SimpleType<TValue, TSpec>, Standard>
+{
+	typedef SimpleType<TValue, TSpec> * Type;
+//	typedef Iter<SimpleType<TValue, TSpec>, SimpleIterator> * Type;
+};
+
+template <typename TValue, typename TSpec>
+struct Iterator<SimpleType<TValue, TSpec> const, Standard>
+{
+	typedef SimpleType<TValue, TSpec> const * Type;
+//	typedef Iter<SimpleType<TValue, TSpec> const, SimpleIterator> * Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTarget, typename T, typename TSourceValue, typename TSourceSpec>
+inline typename RemoveConst_<TTarget>::Type
+convertImpl(Convert<TTarget, T> const,
+			SimpleType<TSourceValue, TSourceSpec> const & source_)
+{
+SEQAN_CHECKPOINT
+	typename RemoveConst_<TTarget>::Type target_;
+	assign(target_, source_);
+	return target_;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename TValue, typename TSpec>
+inline TStream &
+operator << (TStream & stream, 
+			 SimpleType<TValue, TSpec> const & data)
+{
+SEQAN_CHECKPOINT
+	stream << convert<char>(data);
+	return stream;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename TValue, typename TSpec>
+inline TStream &
+operator >> (TStream & stream, 
+			 SimpleType<TValue, TSpec> & data)
+{
+SEQAN_CHECKPOINT
+	char c;
+	stream >> c;
+	assign(data, c);
+	return stream;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// assign
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.assign.param.target.type:Class.SimpleType
+///.Function.assign.param.source.type:Class.SimpleType
+
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TSourceSpec>
+inline void 
+assign(SimpleType<TTargetValue, TTargetSpec> & target, 
+	   SimpleType<TSourceValue, TSourceSpec> & source)
+{
+SEQAN_CHECKPOINT
+	target.value = source.value;
+}
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TSourceSpec>
+inline void 
+assign(SimpleType<TTargetValue, TTargetSpec> & target, 
+	   SimpleType<TSourceValue, TSourceSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = source.value;
+}
+
+//____________________________________________________________________________
+
+template <typename TTargetValue, typename TTargetSpec, typename TSource>
+inline void 
+assign(SimpleType<TTargetValue, TTargetSpec> & target, 
+	   TSource & source)
+{
+SEQAN_CHECKPOINT
+	target.value = source;
+}
+template <typename TTargetValue, typename TTargetSpec, typename TSource>
+inline void 
+assign(SimpleType<TTargetValue, TTargetSpec> & target, 
+	   TSource const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = source;
+}
+
+//____________________________________________________________________________
+// Assign Proxy to SimpleType 
+//??? Diese Funktionen wurden noetig wegen eines seltsamen VC++-Verhaltens
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceSpec>
+inline void 
+assign(SimpleType<TTargetValue, TTargetSpec> & target, 
+	   Proxy<TSourceSpec> & source)
+{
+SEQAN_CHECKPOINT
+	target.value = getValue(source);
+}
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceSpec>
+inline void 
+assign(SimpleType<TTargetValue, TTargetSpec> & target, 
+	   Proxy<TSourceSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = getValue(source);
+}
+
+//____________________________________________________________________________
+//INTEGRAL TYPES
+//note: it is not possible to write a single function here since "assign"
+//must be specialized for the first argument at the first place
+
+//__int64
+template <typename TValue, typename TSpec>
+inline void 
+assign(__int64 & c_target, 
+	   SimpleType<TValue, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+template <typename TValue, typename TSpec>
+inline void 
+assign(__int64 & c_target, 
+	   SimpleType<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+
+//__uint64
+template <typename TValue, typename TSpec>
+inline void 
+assign(__uint64 & c_target, 
+	   SimpleType<TValue, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+template <typename TValue, typename TSpec>
+inline void 
+assign(__uint64 & c_target, 
+	   SimpleType<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+
+//int
+template <typename TValue, typename TSpec>
+inline void 
+assign(int & c_target, 
+	   SimpleType<TValue, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+template <typename TValue, typename TSpec>
+inline void 
+assign(int & c_target, 
+	   SimpleType<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+
+//unsigned int
+template <typename TValue, typename TSpec>
+inline void 
+assign(unsigned int & c_target, 
+	   SimpleType<TValue, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+template <typename TValue, typename TSpec>
+inline void 
+assign(unsigned int & c_target, 
+	   SimpleType<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+
+//short
+template <typename TValue, typename TSpec>
+inline void 
+assign(short & c_target, 
+	   SimpleType<TValue, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+template <typename TValue, typename TSpec>
+inline void 
+assign(short & c_target, 
+	   SimpleType<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+
+//unsigned short
+template <typename TValue, typename TSpec>
+inline void 
+assign(unsigned short & c_target, 
+	   SimpleType<TValue, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+template <typename TValue, typename TSpec>
+inline void 
+assign(unsigned short & c_target, 
+	   SimpleType<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+
+//char
+template <typename TValue, typename TSpec>
+inline void 
+assign(char & c_target, 
+	   SimpleType<TValue, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+template <typename TValue, typename TSpec>
+inline void 
+assign(char & c_target, 
+	   SimpleType<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+
+//signed char
+template <typename TValue, typename TSpec>
+inline void 
+assign(signed char & c_target, 
+	   SimpleType<TValue, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+template <typename TValue, typename TSpec>
+inline void 
+assign(signed char & c_target, 
+	   SimpleType<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+
+//unsigned char
+template <typename TValue, typename TSpec>
+inline void 
+assign(unsigned char & c_target, 
+	   SimpleType<TValue, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+template <typename TValue, typename TSpec>
+inline void 
+assign(unsigned char & c_target, 
+	   SimpleType<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = source.value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// CompareType
+//////////////////////////////////////////////////////////////////////////////
+
+/**.Metafunction.CompareType:
+..summary:Type to convert other types for comparisons.
+..signature:CompareType<TLeft, TRight>::Type
+..param.TLeft:Type of the left operand of a comparison.
+..param.TRight:Type of the right operand of a comparison.
+..return.Type:The Type in which the arguments are converted in order to compare them.
+..remarks:Comparisons are for example operators like $==$ or $<$.
+..remarks.text:Note that there is no rule that guarantees that $CompareType<T1, T2>::Type$
+is the same as $CompareType<T2, T1>::Type$. It is also possible, that only one of these
+two types is defined.
+..remarks.text:This metafunction is used for the implementation of
+comparisons that involve @Class.SimpleType at .
+*/
+//???TODO: muss geprueft werden, ob diese Metafunktion noch ausgeweitet oder aber versteckt wird.
+
+template <typename TLeft, typename TRight>
+struct CompareType;
+
+template <typename T>
+struct CompareType<T, T>
+{
+	typedef T Type;
+};
+
+//____________________________________________________________________________
+
+template <typename TValue, typename TSpec, typename TRight>
+struct CompareType<SimpleType<TValue, TSpec>, TRight>
+{
+	typedef TRight Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// operator ==
+
+template <typename TValue, typename TSpec, typename TRight>
+inline bool
+operator == (SimpleType<TValue, TSpec> const & left_, 
+			 TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TValue, typename TSpec>
+inline bool
+operator == (TLeft const & left_, 
+			 SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec>
+inline bool
+operator == (SimpleType<TLeftValue, TLeftSpec> const & left_, 
+			 SimpleType<TRightValue, TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TLeftValue, TLeftSpec> TLeft;
+	typedef SimpleType<TRightValue, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+operator == (SimpleType<TValue, TSpec> const & left_, 
+			 SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	return convert<TValue>(left_) == convert<TValue>(right_);
+}
+
+
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator == (Proxy<TSpec> const & left_, 
+			 SimpleType<TValue, TSpec2> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator == (SimpleType<TValue, TSpec2> const & left_,
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+
+//____________________________________________________________________________
+// operator !=
+
+template <typename TValue, typename TSpec, typename TRight>
+inline bool
+operator != (SimpleType<TValue, TSpec> const & left_, 
+			 TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TValue, typename TSpec>
+inline bool
+operator != (TLeft const & left_, 
+			 SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec>
+inline bool
+operator != (SimpleType<TLeftValue, TLeftSpec> const & left_, 
+			 SimpleType<TRightValue, TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TLeftValue, TLeftSpec> TLeft;
+	typedef SimpleType<TRightValue, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+operator != (SimpleType<TValue, TSpec> const & left_, 
+			 SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	return convert<TValue>(left_) != convert<TValue>(right_);
+}
+
+
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator != (Proxy<TSpec> const & left_, 
+			 SimpleType<TValue, TSpec2> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator != (SimpleType<TValue, TSpec2> const & left_,
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+
+//____________________________________________________________________________
+// operator <
+
+template <typename TValue, typename TSpec, typename TRight>
+inline bool
+operator < (SimpleType<TValue, TSpec> const & left_, 
+			TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TValue, typename TSpec>
+inline bool
+operator < (TLeft const & left_, 
+			SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec>
+inline bool
+operator < (SimpleType<TLeftValue, TLeftSpec> const & left_, 
+			SimpleType<TRightValue, TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TLeftValue, TLeftSpec> TLeft;
+	typedef SimpleType<TRightValue, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+operator < (SimpleType<TValue, TSpec> const & left_, 
+			SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	return convert<TValue>(left_) < convert<TValue>(right_);
+}
+
+
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator < (Proxy<TSpec> const & left_, 
+			 SimpleType<TValue, TSpec2> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator < (SimpleType<TValue, TSpec2> const & left_,
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+
+//____________________________________________________________________________
+// operator <=
+
+template <typename TValue, typename TSpec, typename TRight>
+inline bool
+operator <= (SimpleType<TValue, TSpec> const & left_, 
+			 TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TValue, typename TSpec>
+inline bool
+operator <= (TLeft const & left_, 
+			 SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec>
+inline bool
+operator <= (SimpleType<TLeftValue, TLeftSpec> const & left_, 
+			 SimpleType<TRightValue, TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TLeftValue, TLeftSpec> TLeft;
+	typedef SimpleType<TRightValue, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+operator <= (SimpleType<TValue, TSpec> const & left_, 
+			 SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	return convert<TValue>(left_) <= convert<TValue>(right_);
+}
+
+
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator <= (Proxy<TSpec> const & left_, 
+			 SimpleType<TValue, TSpec2> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator <= (SimpleType<TValue, TSpec2> const & left_,
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+
+
+//____________________________________________________________________________
+// operator >
+
+template <typename TValue, typename TSpec, typename TRight>
+inline bool
+operator > (SimpleType<TValue, TSpec> const & left_, 
+			TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TValue, typename TSpec>
+inline bool
+operator > (TLeft const & left_, 
+			SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec>
+inline bool
+operator > (SimpleType<TLeftValue, TLeftSpec> const & left_, 
+			SimpleType<TRightValue, TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TLeftValue, TLeftSpec> TLeft;
+	typedef SimpleType<TRightValue, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+operator > (SimpleType<TValue, TSpec> const & left_, 
+			SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	return convert<TValue>(left_) > convert<TValue>(right_);
+}
+
+
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator > (Proxy<TSpec> const & left_, 
+			 SimpleType<TValue, TSpec2> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator > (SimpleType<TValue, TSpec2> const & left_,
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+
+//____________________________________________________________________________
+// operator >=
+
+template <typename TValue, typename TSpec, typename TRight>
+inline bool
+operator >= (SimpleType<TValue, TSpec> const & left_, 
+			 TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TValue, typename TSpec>
+inline bool
+operator >= (TLeft const & left_, 
+			 SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec>
+inline bool
+operator >= (SimpleType<TLeftValue, TLeftSpec> const & left_, 
+			 SimpleType<TRightValue, TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TLeftValue, TLeftSpec> TLeft;
+	typedef SimpleType<TRightValue, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+operator >= (SimpleType<TValue, TSpec> const & left_, 
+			 SimpleType<TValue, TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	return convert<TValue>(left_) >= convert<TValue>(right_);
+}
+
+
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator >= (Proxy<TSpec> const & left_, 
+			 SimpleType<TValue, TSpec2> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+template <typename TSpec, typename TValue, typename TSpec2>
+inline bool
+operator >= (SimpleType<TValue, TSpec2> const & left_,
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T_, typename TSpec> 
+inline
+bool lexLess(SimpleType<T_, TSpec> const &_Left, SimpleType<T_, TSpec> const &Right_)
+{	// return lexicographical _Left < Right_
+	typedef typename MakeUnsigned_<T_>::Type TUnsigned;
+    return (TUnsigned)(_Left.value) < (TUnsigned)(Right_.value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline SimpleType<TValue, TSpec> &
+operator ++ (SimpleType<TValue, TSpec> & me)
+{
+	++me.value;
+	return me;
+}
+template <typename TValue, typename TSpec>
+inline SimpleType<TValue, TSpec>
+operator ++ (SimpleType<TValue, TSpec> & me,
+			 int)
+{
+	SimpleType<TValue, TSpec> dummy = me;
+	++me.value;
+	return dummy;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline SimpleType<TValue, TSpec> &
+operator -- (SimpleType<TValue, TSpec> & me)
+{
+	--me.value;
+	return me;
+}
+template <typename TValue, typename TSpec>
+inline SimpleType<TValue, TSpec>
+operator -- (SimpleType<TValue, TSpec> & me,
+			 int)
+{
+	SimpleType<TValue, TSpec> dummy = me;
+	--me.value;
+	return dummy;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Dna:
+..cat:Alphabets
+..summary:Alphabet for DNA.
+..general:Class.SimpleType
+..signature:Dna
+..remarks:
+...text:The @Metafunction.ValueSize@ of $Dna$ is 4. 
+The nucleotides are enumerated this way: $'A' = 0, 'C' = 1, 'G' = 2, 'T' = 3$.
+...text:Objects of type $Dna$ can be converted to various other types and vice versa. 
+An object that has a value not in ${'A', 'C', 'G', 'T'}$ is converted to $'A'$.
+...text:$Dna$ is typedef for $SimpleType<char,Dna_>$, while $Dna_$ is a helper
+specialization tag class.
+..see:Metafunction.ValueSize
+..see:Spec.Dna5
+..include:seqan/basic.h
+*/
+struct Dna_ {};
+typedef SimpleType<unsigned char,Dna_> Dna;
+
+template <> struct ValueSize< Dna > { enum { VALUE = 4 }; };
+template <> struct BitsPerValue< Dna > { enum { VALUE = 2 }; };
+
+//____________________________________________________________________________
+
+/**
+.Spec.Dna5:
+..cat:Alphabets
+..summary:Alphabet for DNA including 'N' character.
+..general:Class.SimpleType
+..signature:Dna5
+..remarks:
+...text:The @Metafunction.ValueSize@ of $Dna5$ is 5. 
+The nucleotides are enumerated this way: $'A' = 0, 'C' = 1, 'G' = 2, 'T' = 3$. 
+The 'N' character ("unkown nucleotide") is encoded by 4.
+...text:Objects of type $Dna5$ can be converted to various other types and vice versa. 
+An object that has a value not in ${'A', 'C', 'G', 'T'}$ is converted to $'N'$.
+...text:$Dna5$ is typedef for $SimpleType<char,Dna5_>$, while $Dna5_$ is a helper
+specialization tag class.
+..see:Metafunction.ValueSize
+..include:seqan/basic.h
+*/
+struct Dna5_ {};
+typedef SimpleType<unsigned char, Dna5_> Dna5;
+
+template <> struct ValueSize< Dna5 > { enum { VALUE = 5 }; };
+template <> struct BitsPerValue< Dna5 > { enum { VALUE = 3 }; };
+
+//____________________________________________________________________________
+
+/**
+.Spec.Rna:
+..cat:Alphabets
+..summary:Alphabet for RNA.
+..general:Class.SimpleType
+..signature:Rna
+..remarks:
+...text:The @Metafunction.ValueSize@ of $Rna$ is 4. 
+The nucleotides are enumerated this way: $'A' = 0, 'C' = 1, 'G' = 2, 'U' = 3$.
+...text:Objects of type $Rna$ can be converted to various other types and vice versa. 
+An object that has a value not in ${'A', 'C', 'G', 'U'}$ is converted to $'A'$.
+...text:$Rna$ is typedef for $SimpleType<char,Rna_>$, while $Rna_$ is a helper
+specialization tag class.
+..see:Metafunction.ValueSize
+..see:Spec.Rna5
+..include:seqan/basic.h
+*/
+struct Rna_ {};
+typedef SimpleType<unsigned char,Rna_> Rna;
+
+template <> struct ValueSize< Rna > { enum { VALUE = 4 }; };
+template <> struct BitsPerValue< Rna > { enum { VALUE = 2 }; };
+
+//____________________________________________________________________________
+
+/**
+.Spec.Rna5:
+..cat:Alphabets
+..summary:Alphabet for RNA including 'N' character.
+..general:Class.SimpleType
+..signature:Rna5
+..remarks:
+...text:The @Metafunction.ValueSize@ of $Rna5$ is 5. 
+The nucleotides are enumerated this way: $'A' = 0, 'C' = 1, 'G' = 2, 'U' = 3$. 
+The 'N' character ("unkown nucleotide") is encoded by 4.
+...text:Objects of type $Rna5$ can be converted to various other types and vice versa. 
+An object that has a value not in ${'A', 'C', 'G', 'U'}$ is converted to $'N'$.
+...text:$Rna5$ is typedef for $SimpleType<char,Rna5_>$, while $Rna5_$ is a helper
+specialization tag class.
+..see:Metafunction.ValueSize
+..include:seqan/basic.h
+*/
+struct Rna5_ {};
+typedef SimpleType<unsigned char, Rna5_> Rna5;
+
+template <> struct ValueSize< Rna5 > { enum { VALUE = 5 }; };
+template <> struct BitsPerValue< Rna5 > { enum { VALUE = 3 }; };
+
+//____________________________________________________________________________
+
+/**
+.Spec.Iupac:
+..cat:Alphabets
+..summary:Iupac code for DNA.
+..general:Class.SimpleType
+..signature:Iupac
+..remarks:
+...text:The @Metafunction.ValueSize@ of $Iupac$ is 16. 
+The nucleotides are enumerated from 0 to 15 in this order: 
+'U'=0, 'T', 'A', 'W', 'C', 'Y', 'M', 'H', 'G', 'K', 'R', 'D', 'S', 'B', 'V', 'N'=15. 
+...text:Objects of type $Iupac$ can be converted to various other types and vice versa. 
+Unkown values are converted to $'N'$.
+...text:$Iupac$ is typedef for $SimpleType<char,Iupac_>$, while $Iupac_$ is a helper
+specialization tag class.
+..see:Metafunction.ValueSize
+..include:seqan/basic.h
+*/
+struct Iupac_ {};
+typedef SimpleType<unsigned char, Iupac_> Iupac;
+
+template <> struct ValueSize< Iupac > { enum { VALUE = 16 }; };
+template <> struct BitsPerValue< Iupac > { enum { VALUE = 4 }; };
+
+
+//____________________________________________________________________________
+
+/**
+.Spec.AminoAcid:
+..cat:Alphabets
+..summary:Iupac code for amino acids.
+..general:Class.SimpleType
+..signature:AminoAcid
+..remarks:
+...text:The @Metafunction.ValueSize@ of $AminoAcid$ is 24. 
+...text:The amino acids are enumerated from 0 to 15 in this order: 
+...text:'A'=0, 'R', 'N', 'D', 'C', 'Q', 'E', 'G', 'H', 'I', 'L', 'K', 'M', 'F', 'P', 'S', 'T', 'W', 'Y', 'V'=19.
+...text:The remaining 4 symbols are:
+...text: 'B'=20 (Aspartic Acid, Asparagine), 'Z'=21 (Glutamic Acid, Glutamine), 'X'=22 (unknown), '*'=23 (terminator)
+...text:Objects of type $AminoAcid$ can be converted to $char$ and vice versa. 
+Unkown values are converted to $'X'$.
+...text:$AminoAcid$ is typedef for $SimpleType<char,AminoAcid_>$, while $AminoAcid_$ is a helper
+specialization tag class.
+..see:Metafunction.ValueSize
+..include:seqan/basic.h
+*/
+struct AminoAcid_ {};
+typedef SimpleType<unsigned char, AminoAcid_> AminoAcid;
+
+template <> struct ValueSize< AminoAcid > { enum { VALUE = 24 }; };
+template <> struct BitsPerValue< AminoAcid > { enum { VALUE = 5 }; };
+
+//____________________________________________________________________________
+
+/**
+.Spec.Finite:
+..cat:Alphabets
+..summary:A finite alphabet of a fixed size.
+..general:Class.SimpleType
+..signature:SimpleType<TValue, Finite<SIZE> >
+..param.TValue:The type that is use to store the values.
+...default:$char$
+..param.SIZE:The @Metafunction.ValueSize@ of the alphabet.
+..see:Metafunction.ValueSize
+..include:seqan/basic.h
+*/
+template <unsigned SIZE>
+struct Finite;
+
+template <typename TValue, unsigned SIZE> 
+struct ValueSize< SimpleType<TValue, Finite<SIZE> > > { enum { VALUE = SIZE }; };
+
+template <typename TValue, unsigned SIZE> 
+struct BitsPerValue< SimpleType<TValue, Finite<SIZE> > >: Log2<SIZE> {};
+
+//////////////////////////////////////////////////////////////////////////////
+//ASCII
+
+inline void assign(Ascii & c_target, 
+				   Dna const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = TranslateTableDna5ToAscii_<>::VALUE[source.value];
+}
+//____________________________________________________________________________
+
+inline void assign(Ascii & c_target, 
+				   Dna5 const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = TranslateTableDna5ToAscii_<>::VALUE[source.value];
+}
+//____________________________________________________________________________
+
+inline void assign(Ascii& target,
+				   Rna const & source)
+{
+	SEQAN_CHECKPOINT
+	target = TranslateTableRna5ToAscii_<>::VALUE[source.value];
+}
+//____________________________________________________________________________
+
+inline void assign(Ascii& target,
+				   Rna5 const & source)
+{
+	SEQAN_CHECKPOINT
+	target = TranslateTableRna5ToAscii_<>::VALUE[source.value];
+}
+//____________________________________________________________________________
+
+inline void assign(Ascii & c_target, Iupac const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = TranslateTableIupacToAscii_<>::VALUE[source.value];
+}
+//____________________________________________________________________________
+
+inline void assign(Ascii & c_target, AminoAcid const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = TranslateTableAAToAscii_<>::VALUE[source.value];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//DNA (4 letters)
+
+template <>
+struct CompareType<Dna, __uint8> { typedef Dna Type; };
+inline void assign(Dna & target, __uint8 c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableByteToDna_<>::VALUE[c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna, Ascii> { typedef Dna Type; };
+inline void assign(Dna & target, Ascii c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToDna_<>::VALUE[(unsigned char)c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna, Unicode> { typedef Dna Type; };
+inline void assign(Dna & target, Unicode c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToDna_<>::VALUE[(unsigned char) c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna, Dna5> { typedef Dna Type; };
+inline void assign(Dna & target, Dna5 const & c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = c_source.value & 0x03;
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna, Iupac> { typedef Dna Type; };
+inline void assign(Dna & target, Iupac const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableIupacToDna_<>::VALUE[source.value];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//DNA (5 letters)
+
+template <>
+struct CompareType<Dna5, __uint8> { typedef Dna5 Type; };
+inline void assign(Dna5 & target, __uint8 c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableByteToDna5_<>::VALUE[c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna5, Ascii> { typedef Dna5 Type; };
+inline void assign(Dna5 & target, Ascii c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToDna5_<>::VALUE[(unsigned char) c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna5, Unicode> { typedef Dna5 Type; };
+inline void assign(Dna5 & target, Unicode c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToDna5_<>::VALUE[(unsigned char) c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna5, Iupac> { typedef Dna5 Type; };
+inline void assign(Dna5 & target, Iupac const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableIupacToDna5_<>::VALUE[source.value];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna5, Dna> { typedef Dna Type; };
+inline void assign(Dna5 & target, Dna const & c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = c_source.value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//RNA (4 letters)
+
+template <>
+struct CompareType<Rna, __uint8> { typedef Rna Type; };
+inline void assign(Rna & target, __uint8 c_source)
+{
+	SEQAN_CHECKPOINT
+	target.value = TranslateTableByteToRna_<>::VALUE[c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Rna, Ascii> { typedef Rna Type; };
+inline void assign(Rna & target, Ascii c_source)
+{
+	SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToRna_<>::VALUE[(unsigned char)c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Rna, Unicode> { typedef Rna Type; };
+inline void assign(Rna & target, Unicode c_source)
+{
+	SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToRna_<>::VALUE[(unsigned char) c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Rna, Rna5> { typedef Rna Type; };
+inline void assign(Rna & target, Rna5 const & c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = c_source.value & 0x03;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//RNA (5 letters)
+
+template <>
+struct CompareType<Rna5, __uint8> { typedef Rna5 Type; };
+inline void assign(Rna5 & target, __uint8 c_source)
+{
+	SEQAN_CHECKPOINT
+	target.value = TranslateTableByteToRna5_<>::VALUE[c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Rna5, Ascii> { typedef Rna5 Type; };
+inline void assign(Rna5 & target, Ascii c_source)
+{
+	SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToRna5_<>::VALUE[(unsigned char)c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Rna5, Unicode> { typedef Rna5 Type; };
+inline void assign(Rna5 & target, Unicode c_source)
+{
+	SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToRna5_<>::VALUE[(unsigned char) c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Rna5, Rna> { typedef Dna Type; };
+inline void assign(Rna5 & target, Rna const & c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = c_source.value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//IUPAC (4 bits)
+
+template <>
+struct CompareType<Iupac, __uint8> { typedef Iupac Type; };
+inline void assign(Iupac & target, __uint8 c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableByteToIupac_<>::VALUE[c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Iupac, Ascii> { typedef Iupac Type; };
+inline void assign(Iupac & target, Ascii c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToIupac_<>::VALUE[(unsigned char) c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Iupac, Unicode> { typedef Iupac Type; };
+inline void assign(Iupac & target, Unicode c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToIupac_<>::VALUE[(unsigned char) c_source];
+}
+//____________________________________________________________________________
+
+inline void assign(Iupac & target, Dna const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableDna5ToIupac_<>::VALUE[source.value];
+}
+//____________________________________________________________________________
+
+inline void assign(Iupac & target, Dna5 const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableDna5ToIupac_<>::VALUE[source.value];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//Amino Acid (5 bits)
+
+template <>
+struct CompareType<AminoAcid, __uint8> { typedef AminoAcid Type; };
+inline void assign(AminoAcid & target, __uint8 c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableByteToAA_<>::VALUE[c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<AminoAcid, Ascii> { typedef AminoAcid Type; };
+inline void assign(AminoAcid & target, Ascii c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToAA_<>::VALUE[(unsigned char) c_source];
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<AminoAcid, Unicode> { typedef AminoAcid Type; };
+inline void assign(AminoAcid & target, Unicode c_source)
+{
+SEQAN_CHECKPOINT
+	target.value = TranslateTableAsciiToAA_<>::VALUE[(unsigned char) c_source];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+struct BaseAlphabet
+{
+	typedef TValue Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+// //DnaQ and Dna5Q
+
+/**
+.Spec.DnaQ:
+..cat:Alphabets
+..summary:Alphabet for DNA plus phred quality.
+..general:Class.SimpleType
+..signature:DnaQ
+..remarks:
+...text:The @Metafunction.ValueSize@ of $DnaQ$ is 4. 
+The nucleotides are enumerated this way: $'A' = 0, 'C' = 1, 'G' = 2, 'T' = 3$.
+...text:Objects of type $DnaQ$ can be converted to various other types and vice versa. 
+...text:$DnaQ$ is typedef for $SimpleType<char,DnaQ_>$, while $DnaQ_$ is a helper
+specialization tag class.
+..see:Metafunction.ValueSize
+..see:Spec.Dna5Q
+*/
+struct DnaQ_ {};
+typedef SimpleType <unsigned char, DnaQ_> DnaQ;
+
+template <> struct ValueSize< DnaQ > { enum { VALUE = 4 }; };				// considering nucleotides
+template <> struct InternalValueSize_< DnaQ > { enum { VALUE = 252 }; };	// considering nucleotides x Quality 0..62
+template <> struct BitsPerValue< DnaQ > { enum { VALUE = 8 }; };
+
+template <>
+struct BaseAlphabet<DnaQ>
+{
+	typedef Dna Type;
+};
+
+//____________________________________________________________________________
+ 
+/**
+.Spec.Dna5Q:
+..cat:Alphabets
+..summary:Alphabet for DNA plus phred quality including 'N' character.
+..general:Class.SimpleType
+..signature:Dna5Q
+..remarks:
+...text:The @Metafunction.ValueSize@ of $Dna5Q$ is 5. 
+The nucleotides are enumerated this way: $'A' = 0, 'C' = 1, 'G' = 2, 'T' = 3$. 
+The 'N' character ("unkown nucleotide") is encoded by 4.
+...text:Objects of type $Dna5$ can be converted to various other types and vice versa. 
+...text:$Dna5Q$ is typedef for $SimpleType<char,Dna5Q_>$, while $Dna5Q_$ is a helper
+specialization tag class.
+..see:Metafunction.ValueSize
+*/
+struct Dna5Q_ {};
+typedef SimpleType <unsigned char, Dna5Q_> Dna5Q;
+
+static const unsigned char Dna5QValueN_ = 252;								// value representing N
+
+template <> struct ValueSize< Dna5Q > { enum { VALUE = 5 }; };				// considering nucleotides + N
+template <> struct InternalValueSize_< Dna5Q > { enum { VALUE = 253 }; };	// considering (nucleotides x Quality 0..62) + N
+template <> struct BitsPerValue< Dna5Q > { enum { VALUE = 8 }; };
+
+template <>
+struct BaseAlphabet<Dna5Q>
+{
+	typedef Dna5 Type;
+};
+
+template <typename TValue>
+struct QualityValueSize {
+	enum { VALUE = ValueSize<TValue>::VALUE };
+};
+template <typename TValue>
+struct QualityValueSize<TValue const>:
+	public QualityValueSize<TValue> {};
+
+template <> struct QualityValueSize< DnaQ >  { enum { VALUE = 63 }; };		// 64 - 1 (N)
+template <> struct QualityValueSize< Dna5Q > { enum { VALUE = 63 }; };
+
+
+// template <typename TValue, typename TValue2>
+// struct CompareType<SimpleType<TValue,DnaQ_>, SimpleType<TValue2,Dna_> >
+// {
+// 	typedef SimpleType<TValue2,Dna_> Type;
+// };
+// 
+// template <typename TValue, typename TValue2>
+// struct CompareType<SimpleType<TValue,Dna_>, SimpleType<TValue2,DnaQ_> >
+// {
+// 	typedef SimpleType<TValue,Dna_> Type;
+// };
+// 
+// 
+// 
+// template <typename TValue, typename TValue2>
+// struct CompareType<SimpleType<TValue,Dna5Q_>, SimpleType<TValue2,Dna5_> >
+// {
+// 	typedef SimpleType<TValue2,Dna5_> Type;
+// };
+// 
+// template <typename TValue, typename TValue2>
+// struct CompareType<SimpleType<TValue,Dna5_>, SimpleType<TValue2,Dna5Q_> >
+// {
+// 	typedef SimpleType<TValue,Dna5_> Type;
+// };
+
+
+template <>
+struct CompareType<Dna5Q, Dna5Q> { typedef Dna5 Type; };
+template <>
+struct CompareType<DnaQ, DnaQ> { typedef Dna Type; };
+
+//////////////////////////////////////////////////////////////////////////////
+//DNA (4 letters) with Qualities (0..60)
+
+
+template <>
+struct CompareType<DnaQ, Dna5Q> { typedef Dna Type; };
+inline void assign(DnaQ & target, Dna5Q const & source)
+{
+    SEQAN_CHECKPOINT;
+
+    // We perform the converstion from DNA5 to DNA5 with qualities by a simple
+    // table lookup.  The lookup below is equivalent to the following line:
+    //
+	// target.value = (source.value == Dna5QValueN_)? 0: source.value;
+
+    static const unsigned table[] = {
+          0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15,
+         16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,  30,  31,
+         32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,
+         48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,
+         64,  65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79,
+         80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,
+         96,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+        112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+        128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+        144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+        160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+        176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+        192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+        208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+        224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+        240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 0,   0,   0,   0
+    };
+    target.value = table[source.value];
+}
+//____________________________________________________________________________
+
+
+template <>
+struct CompareType<DnaQ, Dna> { typedef Dna Type; };
+inline void assign(DnaQ & target, Dna const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = source.value | (60 << 2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//DNA (5 letters)
+
+template <>
+struct CompareType<Dna5Q, DnaQ> { typedef Dna Type; };
+inline void assign(Dna5Q & target, DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = source.value;
+}
+
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna5, Dna5Q> { typedef Dna5 Type; };
+inline void assign(Dna5 & target, Dna5Q const & source)
+{
+    SEQAN_CHECKPOINT;
+
+    // We perform the conversion from DNA5 to DNA5 with qualities by a simple
+    // table lookup.  The lookup below is equivalent to the following line:
+    //
+	// target.value = (source.value == Dna5QValueN_)? 4: source.value & 3;
+
+    static const unsigned table[] = {
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
+        0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 4, 4, 4 // <-- note the 4
+    };
+    target.value = table[source.value];
+}
+
+
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna5Q, Dna5> { typedef Dna5 Type; };
+inline void assign(Dna5Q & target, Dna5 const & source)
+{
+    SEQAN_CHECKPOINT;
+
+    // We perform the conversion from DNA5 with qualities to DNA5 by a simple
+    // table lookup.  The lookup below is equivalent to the following line:
+    //
+	// target.value = (source.value == 4)? Dna5QValueN_ : source.value | (60 << 2);
+
+    static const unsigned table[] = {
+        (60 << 2) + 0, (60 << 2) + 1, (60 << 2) + 2, (60 << 2) + 3, Dna5QValueN_
+    };
+    target.value = table[source.value];
+}
+
+
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna, DnaQ> { typedef Dna Type; };
+inline void assign(Dna & target, DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = source.value & 3;
+}
+
+//____________________________________________________________________________
+
+
+template <>
+struct CompareType<DnaQ, Iupac> { typedef Dna Type; };
+inline void assign(DnaQ & target, Iupac const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna) source);
+}
+
+//____________________________________________________________________________
+
+
+template <>
+struct CompareType<DnaQ, Dna5> { typedef Dna Type; };
+inline void assign(DnaQ & target, Dna5 const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna) source);
+}
+
+template <>
+struct CompareType<DnaQ, __uint8> { typedef Dna Type; };
+inline void assign(DnaQ & target, __uint8 c_source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna) c_source);
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<DnaQ, Ascii> { typedef Dna Type; };
+inline void assign(DnaQ & target, Ascii c_source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna) c_source);
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<DnaQ, Unicode> { typedef Dna Type; };
+inline void assign(DnaQ & target, Unicode c_source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna) c_source);
+}
+//____________________________________________________________________________
+
+inline void 
+assign(DnaQ & target, DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = source.value;
+}
+
+template <typename TSource>
+inline void 
+assign(DnaQ & target, TSource const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = (Dna)source;
+}
+//____________________________________________________________________________
+
+
+template <>
+struct CompareType<Dna5Q, Dna> { typedef Dna Type; };
+inline void assign(Dna5Q & target, Dna const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (DnaQ) source);
+}
+
+//____________________________________________________________________________
+
+
+template <>
+struct CompareType<Dna, Dna5Q> { typedef Dna Type; };
+inline void assign(Dna & target, Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna5)source);
+}
+
+//____________________________________________________________________________
+template <>
+struct CompareType<Dna5, DnaQ> { typedef Dna5 Type; };
+inline void assign(Dna5 & target, DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna5Q)source);
+}
+//____________________________________________________________________________
+
+
+
+template <>
+struct CompareType<Dna5Q, __uint8> { typedef Dna5 Type; };
+inline void assign(Dna5Q & target, __uint8 c_source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna5)c_source);
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna5Q, Ascii> { typedef Dna5 Type; };
+inline void assign(Dna5Q & target, Ascii c_source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna5)c_source);
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna5Q, Unicode> { typedef Dna5 Type; };
+inline void assign(Dna5Q & target, Unicode c_source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna5)c_source);
+}
+//____________________________________________________________________________
+
+template <>
+struct CompareType<Dna5Q, Iupac> { typedef Dna5 Type; };
+inline void assign(Dna5Q & target, Iupac const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna5)source);
+}
+
+inline void 
+assign(Dna5Q & target, Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	target.value = source.value;
+}
+template <typename TSource>
+inline void 
+assign(Dna5Q & target, TSource const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, (Dna5)source);
+}
+
+
+//____________________________________________________________________________
+
+
+
+//__int64
+
+inline void 
+assign(__int64 & c_target, 
+	   DnaQ & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+inline void 
+assign(__int64 & c_target, 
+	   DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+//__uint64
+
+inline void 
+assign(__uint64 & c_target, 
+	   DnaQ & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+inline void 
+assign(__uint64 & c_target, 
+	   DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+//int
+
+inline void 
+assign(int & c_target, 
+	   DnaQ & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+inline void 
+assign(int & c_target, 
+	   DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+//unsigned int
+
+inline void 
+assign(unsigned int & c_target, 
+	   DnaQ & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+inline void 
+assign(unsigned int & c_target, 
+	   DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+
+//short
+
+inline void 
+assign(short & c_target, 
+	   DnaQ & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+inline void 
+assign(short & c_target, 
+	   DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+//unsigned short
+
+inline void 
+assign(unsigned short & c_target, 
+	   DnaQ & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+inline void 
+assign(unsigned short & c_target, 
+	   DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+//char
+
+inline void 
+assign(char & c_target, 
+	   DnaQ & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+inline void 
+assign(char & c_target, 
+	   DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+//signed char
+
+inline void 
+assign(signed char & c_target, 
+	   DnaQ & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+inline void 
+assign(signed char & c_target, 
+	   DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+//unsigned char
+
+inline void 
+assign(unsigned char & c_target, 
+	   DnaQ & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+inline void 
+assign(unsigned char & c_target, 
+	   DnaQ const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna(source);
+}
+
+
+//__int64
+
+inline void 
+assign(__int64 & c_target, 
+	   Dna5Q & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline void 
+assign(__int64 & c_target, 
+	   Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+//__uint64
+
+inline void 
+assign(__uint64 & c_target, 
+	   Dna5Q & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline void 
+assign(__uint64 & c_target, 
+	   Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+//int
+
+inline void 
+assign(int & c_target, 
+	   Dna5Q & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline void 
+assign(int & c_target, 
+	   Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+//unsigned int
+
+inline void 
+assign(unsigned int & c_target, 
+	   Dna5Q & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline void 
+assign(unsigned int & c_target, 
+	   Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+
+//short
+
+inline void 
+assign(short & c_target, 
+	   Dna5Q & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline void 
+assign(short & c_target, 
+	   Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+//unsigned short
+
+inline void 
+assign(unsigned short & c_target, 
+	   Dna5Q & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline void 
+assign(unsigned short & c_target, 
+	   Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+//char
+
+inline void 
+assign(char & c_target, 
+	   Dna5Q & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline void 
+assign(char & c_target, 
+	   Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+//signed char
+
+inline void 
+assign(signed char & c_target, 
+	   Dna5Q & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline void 
+assign(signed char & c_target, 
+	   Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+//unsigned char
+
+inline void 
+assign(unsigned char & c_target, 
+	   Dna5Q & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline void 
+assign(unsigned char & c_target, 
+	   Dna5Q const & source)
+{
+SEQAN_CHECKPOINT
+	c_target = Dna5(source);
+}
+
+inline int getQualityValue(DnaQ const &c) 
+{
+	return c.value >> 2;
+}
+
+inline int getQualityValue(Dna5Q const &c) 
+{
+    // We use a lookup table to extract the qualities from DNA5Q.  The lookup
+    // table based code is equivalent to the following line:
+	// return (c.value == Dna5QValueN_)? 0: c.value >> 2;
+
+    static const unsigned table[] = {
+         0,  0,  0,  0,  1,  1,  1,  1,  2,  2,  2,  2,  3,  3,  3,  3,  4,
+         4,  4,  4,  5,  5,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,
+         8,  8,  9,  9,  9,  9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12,
+        12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16,
+        17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21,
+        21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25,
+        25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29,
+        29, 30, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 33,
+        34, 34, 34, 34, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37, 38,
+        38, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40, 41, 41, 41, 41, 42, 42,
+        42, 42, 43, 43, 43, 43, 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46,
+        46, 47, 47, 47, 47, 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50,
+        51, 51, 51, 51, 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 55,
+        55, 55, 55, 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59,
+        59, 59, 60, 60, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62,
+		0,  0,  0,  0};
+    return table[c.value];
+}
+
+inline 
+void convertQuality(Ascii & c, int q) 
+{
+	c = '!' + Ascii(q);
+}
+
+
+// TODO(holtgrew): What about different quality types? Guess scaling? Look at how other packages do this.
+/**
+.Function.assignQualityValue
+..cat:Alphabets
+..signature:assignQualityValue(c, q)
+..summary:Assign quality to a character from an alphabet with integrated quality.
+..param.c:Target character to assign quality to.
+...type:Spec.DnaQ
+..param.q:Quality to assign to the quality.
+...type:nolink:int
+...type:nolink:char
+..remarks:If $q$ is a $char$ then $'!'$ is subtracted from $q$. This is useful for ASCII encoded PHRED scores.
+ */
+//set quality value
+inline 
+void assignQualityValue(DnaQ &c, int q)
+{
+	if (q < 0) q = 0;
+    if (q >= QualityValueSize<DnaQ>::VALUE)
+        q = QualityValueSize<DnaQ>::VALUE - 1;
+	c.value = (c.value & 3) | (q << 2);
+}
+
+///.Function.assignQualityValue.param.c.type:Spec.Dna5Q
+inline 
+void assignQualityValue(Dna5Q &c, int q) 
+{
+	if (q < 0) q = 0;
+    if (q >= QualityValueSize<Dna5Q>::VALUE)
+        q = QualityValueSize<Dna5Q>::VALUE - 1;
+	if (c.value != Dna5QValueN_)
+		c.value = (c.value & 3) | (q << 2);
+}
+
+inline 
+void assignQualityValue(DnaQ &c, Ascii q)
+{
+    int q1 = static_cast<int>(q - '!');
+	if (q1 < 0) q1 = 0;
+    if (q1 >= QualityValueSize<DnaQ>::VALUE)
+        q1 = QualityValueSize<DnaQ>::VALUE - 1;
+	assignQualityValue(c, q1);
+}
+
+inline 
+void assignQualityValue(Dna5Q &c, Ascii q) 
+{
+    int q1 = static_cast<int>(q - '!');
+	if (q1 < 0) q1 = 0;
+	if (q1 >= QualityValueSize<Dna5Q>::VALUE)
+        q1 = QualityValueSize<Dna5Q>::VALUE - 1;
+	assignQualityValue(c, q1);
+}
+
+/**
+.Function.assignQualities
+..cat:Alphabets
+..summary:Assign quality value between strings.
+..signature:assignQualities(target, source)
+..param.target:Target string
+...type:nolink:@Class.String@ of any alphabet with qualities, e.g. @Spec.DnaQ@, @Spec.Dna5Q@
+..param.source:Source string.
+...type:nolink:@Class.String@ of $int$ or $char$.
+..remarks:This funciton calls @Function.assignQualityValue@ for all entries of $target$ and $source$, look at the documentation of @Function.assignQualityValue@ on how the values of $source$ are interpreted.
+..see:Function.assignQualityValue
+ */
+template <typename TDest, typename TSource>
+void assignQualities(TDest &dst, TSource const &src)
+{
+	typedef typename Iterator<TDest>::Type TDestIter;
+	typedef typename Iterator<TSource>::Type TSourceIter;
+
+	TDestIter itDst = begin(dst, Standard());
+	TDestIter itDstEnd = end(dst, Standard());
+	TSourceIter itSrcEnd = end(src, Standard());
+	
+	for (TSourceIter itSrc = begin(src, Standard()); itDst != itDstEnd && itSrc != itSrcEnd; ++itDst, ++itSrc)
+		assignQualityValue(*itDst, *itSrc);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_alphabet_simple_tabs.h b/src/SeqAn-1.3/seqan/basic/basic_alphabet_simple_tabs.h
new file mode 100644
index 0000000..a60dd2d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_alphabet_simple_tabs.h
@@ -0,0 +1,595 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALPHABET_SIMPLE_TABS_H
+#define SEQAN_HEADER_BASIC_ALPHABET_SIMPLE_TABS_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+
+//use same tables for Dna
+
+template <typename T = void>
+struct TranslateTableDna5ToAscii_
+{
+	static char const VALUE[5];
+};
+template <typename T>
+char const TranslateTableDna5ToAscii_<T>::VALUE[5] = {'A', 'C', 'G', 'T', 'N'};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableDna5ToIupac_
+{
+	static char const VALUE[5];
+};
+template <typename T>
+char const TranslateTableDna5ToIupac_<T>::VALUE[5] = {0x02, 0x04, 0x08, 0x01, 0x0f};
+
+//____________________________________________________________________________
+
+// use same table for Rna
+
+template <typename T = void>
+struct TranslateTableRna5ToAscii_
+{
+	static char const VALUE[5];
+};
+template <typename T>
+char const TranslateTableRna5ToAscii_<T>::VALUE[5] = {'A', 'C', 'G', 'U', 'N'}; 
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableIupacToAscii_
+{
+	static char const VALUE[16];
+};
+template <typename T>
+char const TranslateTableIupacToAscii_<T>::VALUE[16] = 
+{
+	'U', //0000=0
+	'T', //0001=1 //T=1: change between U and T is just inc/dec
+	'A', //0010=2
+	'W', //0011=3 TA
+	'C', //0100=4 
+	'Y', //0101=5 TC (pyrimidine)
+	'M', //0110=6 AC
+	'H', //0111=7 not-G
+	'G', //1000=8
+	'K', //1001=9 TG
+	'R', //1010=A AG (purine)
+	'D', //1011=B not-C
+	'S', //1100=C CG
+	'B', //1101=D non-A
+	'V', //1110=E non-T
+	'N'  //1111=F any
+};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableIupacToDna_
+{
+	static char const VALUE[16];
+};
+template <typename T>
+char const TranslateTableIupacToDna_<T>::VALUE[16] = 
+{
+	3, //'U'
+	3, //'T'
+	0, //'A'
+	0, //'W' = TA
+	1, //'C' 
+	1, //'Y' = TC
+	0, //'M' = AC
+	0, //'H' = not-G
+	2, //'G'
+	2, //'K' = TG
+	0, //'R' = AG
+	0, //'D' = not-C
+	1, //'S' = CG
+	1, //'B' = non-A
+	0, //'V' = non-T
+	0  //'N' = any
+};
+
+//____________________________________________________________________________
+
+
+template <typename T = void>
+struct TranslateTableIupacToDna5_
+{
+	static char const VALUE[16];
+};
+template <typename T>
+char const TranslateTableIupacToDna5_<T>::VALUE[16] = 
+{
+	3, //'U'
+	3, //'T'
+	0, //'A'
+	4, //'W' = TA
+	1, //'C' 
+	4, //'Y' = TC
+	4, //'M' = AC
+	4, //'H' = not-G
+	2, //'G'
+	4, //'K' = TG
+	4, //'R' = AG
+	4, //'D' = not-C
+	4, //'S' = CG
+	4, //'B' = non-A
+	4, //'V' = non-T
+	4  //'N' = any
+};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableAsciiToDna_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableAsciiToDna_<T>::VALUE[256] = 
+{
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //0
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //1
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //2
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //3
+
+	0,   0,   0,   1,   0,   0,   0,   2,   0,   0,   0,   0,   0,   0,   0,   0, //4
+//	 ,   A,   B,   C,   D,   E,   D,   G,   H,   I,   J,   K,   L,   M,   N,   O,
+
+	0,   0,   0,   0,   3,   3,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //5
+//	P,   Q,   R,   S,   T,   U,   V,   W,   X,   Y,   Z,    ,    ,    ,    ,    
+
+	0,   0,   0,   1,   0,   0,   0,   2,   0,   0,   0,   0,   0,   0,   0,   0, //6
+//   ,   a,   b,   c,   d,   e,   f,   g,   h,   i,   j,   k,   l,   m,   n,   o,
+
+	0,   0,   0,   0,   3,   3,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //7
+//  p,   q,   r,   s,   t,   u,   v,   w,   x,   y,   z,    ,    ,    ,    ,   
+
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //8
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //9
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //10
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //11
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //12
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //13
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //14
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  //15
+};
+
+//____________________________________________________________________________
+
+
+template <typename T = void>
+struct TranslateTableAsciiToDna5_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableAsciiToDna5_<T>::VALUE[256] = 
+{
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //0
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //1
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //2
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //3
+
+	4,   0,   4,   1,   4,   4,   4,   2,   4,   4,   4,   4,   4,   4,   4,   4, //4
+//	 ,   A,   B,   C,   D,   E,   D,   G,   H,   I,   J,   K,   L,   M,   N,   O,
+
+	4,   4,   4,   4,   3,   3,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //5
+//	P,   Q,   R,   S,   T,   U,   V,   W,   X,   Y,   Z,    ,    ,    ,    ,    
+
+	4,   0,   4,   1,   4,   4,   4,   2,   4,   4,   4,   4,   4,   4,   4,   4, //6
+//   ,   a,   b,   c,   d,   e,   f,   g,   h,   i,   j,   k,   l,   m,   n,   o,
+
+	4,   4,   4,   4,   3,   3,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //7
+//  p,   q,   r,   s,   t,   u,   v,   w,   x,   y,   z,    ,    ,    ,    ,   
+
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //8
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //9
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //10
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //11
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //12
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //13
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //14
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4  //15
+};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableAsciiToRna_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableAsciiToRna_<T>::VALUE[256] = 
+{
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //0
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //1
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //2
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //3
+
+	0,   0,   0,   1,   0,   0,   0,   2,   0,   0,   0,   0,   0,   0,   0,   0, //4
+//	 ,   A,   B,   C,   D,   E,   D,   G,   H,   I,   J,   K,   L,   M,   N,   O,
+
+	0,   0,   0,   0,   0,   3,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //5
+//	P,   Q,   R,   S,   T,   U,   V,   W,   X,   Y,   Z,    ,    ,    ,    ,    
+
+	0,   0,   0,   1,   0,   0,   0,   2,   0,   0,   0,   0,   0,   0,   0,   0, //6
+//   ,   a,   b,   c,   d,   e,   f,   g,   h,   i,   j,   k,   l,   m,   n,   o,
+
+	0,   0,   0,   0,   0,   3,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //7
+//  p,   q,   r,   s,   t,   u,   v,   w,   x,   y,   z,    ,    ,    ,    ,   
+
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //8
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //9
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //10
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //11
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //12
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //13
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //14
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  //15
+};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableAsciiToRna5_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableAsciiToRna5_<T>::VALUE[256] = 
+{
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //0
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //1
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //2
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //3
+
+	4,   0,   4,   1,   4,   4,   4,   2,   4,   4,   4,   4,   4,   4,   4,   4, //4
+//	 ,   A,   B,   C,   D,   E,   D,   G,   H,   I,   J,   K,   L,   M,   N,   O,
+
+	4,   4,   4,   4,   4,   3,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //5
+//	P,   Q,   R,   S,   T,   U,   V,   W,   X,   Y,   Z,    ,    ,    ,    ,    
+
+	4,   0,   4,   1,   4,   4,   4,   2,   4,   4,   4,   4,   4,   4,   4,   4, //6
+//   ,   a,   b,   c,   d,   e,   f,   g,   h,   i,   j,   k,   l,   m,   n,   o,
+
+	4,   4,   4,   4,   4,   3,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //7
+//  p,   q,   r,   s,   t,   u,   v,   w,   x,   y,   z,    ,    ,    ,    ,   
+
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //8
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //9
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //10
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //11
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //12
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //13
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //14
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4  //15
+};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableAsciiToIupac_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableAsciiToIupac_<T>::VALUE[256] = 
+{
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //0
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //1
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //2
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //3
+
+	15,   2,  13,   4,  11,  15,  15,   8,   7,  15,  15,   9,  15,   6,  15,  15, //4
+	//   ,   A,   B,   C,   D,   E,   F,   G,   H,   I,   J,   K,   L,   M,   N,   O,
+
+	15,  15,  10,  12,   1,   0,  14,   3,  15,   5,  15,  15,  15,  15,  15,  15, //5
+	//  P,   Q,   R,   S,   T,   U,   V,   W,   X,   Y,   Z,    ,    ,    ,    ,   
+
+	15,   2,  13,   4,  11,  15,  15,   8,   7,  15,  15,   9,  15,   6,  15,  15, //6
+	//   ,   a,   b,   c,   d,   e,   f,   g,   h,   i,   j,   k,   l,   m,   n,   o,
+
+	15,  15,  10,  12,   1,   0,  14,   3,  15,   5,  15,  15,  15,  15,  15,  15, //7
+	//  p,   q,   r,   s,   t,   u,   v,   w,   x,   y,   z,    ,    ,    ,    ,   
+
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //8
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //9
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //10
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //11
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //12
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //13
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //14
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15  //15
+};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableByteToDna_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableByteToDna_<T>::VALUE[256] = 
+{
+	0,   1,   2,   3,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //0
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //1
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //2
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //3
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //4
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //5
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //6
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //7
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //8
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //9
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //10
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //11
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //12
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //13
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //14
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  //15
+};
+
+//____________________________________________________________________________
+
+
+template <typename T = void>
+struct TranslateTableByteToDna5_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableByteToDna5_<T>::VALUE[256] = {
+	0,   1,   2,   3,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //0
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //1
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //2
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //3
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //4
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //5
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //6
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //7
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //8
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //9
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //10
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //11
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //12
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //13
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4, //14
+	4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4  //15
+};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableByteToRna_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableByteToRna_<T>::VALUE[256] = 
+{
+	0,   1,   2,   3,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //0
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //1
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //2
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //3
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //4
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //5
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //6
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //7
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //8
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //9
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //10
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //11
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //12
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //13
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //14
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  //15
+};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableByteToRna5_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableByteToRna5_<T>::VALUE[256] = 
+{
+	0,   1,   2,   3,   4,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //0
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //1
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //2
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //3
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //4
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //5
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //6
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //7
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //8
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //9
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //10
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //11
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //12
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //13
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //14
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  //15
+};
+
+//____________________________________________________________________________
+
+template <typename T = void>
+struct TranslateTableByteToIupac_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableByteToIupac_<T>::VALUE[256] = 
+{
+	0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, //0
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //1
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //2
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //3
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //4
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //5
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //6
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //7
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //8
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //9
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //10
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //11
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //12
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //13
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15, //14
+	15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15,  15  //15
+};
+
+//____________________________________________________________________________
+
+
+template <typename T = void>
+struct TranslateTableAAToAscii_
+{
+	static char const VALUE[24];
+};
+template <typename T>
+char const TranslateTableAAToAscii_<T>::VALUE[24] = 
+{
+	'A', // 0 Ala Alanine                 
+	'R', // 1 Arg Arginine                
+	'N', // 2 Asn Asparagine              
+	'D', // 3 Asp Aspartic Acid           
+	'C', // 4 Cys Cystine                 
+	'Q', // 5 Gln Glutamine               
+	'E', // 6 Glu Glutamic Acid           
+	'G', // 7 Gly Glycine                 
+	'H', // 8 His Histidine               
+	'I', // 9 Ile Isoleucine              
+	'L', //10 Leu Leucine                 
+	'K', //11 Lys Lysine                  
+	'M', //12 Met Methionine              
+	'F', //13 Phe Phenylalanine           
+	'P', //14 Pro Proline                 
+	'S', //15 Ser Serine                  
+	'T', //16 Thr Threonine               
+	'W', //17 Trp Tryptophan              
+	'Y', //18 Tyr Tyrosine                
+	'V', //19 Val Valine                  
+	'B', //20 Aspartic Acid, Asparagine   
+	'Z', //21 Glutamic Acid, Glutamine    
+	'X', //22 Unknown                     
+	'*'  //23 Terminator                  
+};
+
+//____________________________________________________________________________
+
+
+template <typename T = void>
+struct TranslateTableAsciiToAA_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableAsciiToAA_<T>::VALUE[256] = 
+{
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //0
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //1
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  23,  22,  22,  22,  22,  22, //2
+//													   *	
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //3
+	22,   0,  20,   4,   3,   6,  13,   7,   8,   9,  22,  11,  10,  12,   2,  22, //4
+//    ,   A,   B,   C,   D,   E,   F,   G,   H,   I,   J,   K,   L,   M,   N,   O,
+
+	14,   5,   1,  15,  16,  22,  19,  17,  22,  18,  21,  22,  22,  22,  22,  22, //5
+//   P,   Q,   R,   S,   T,   U,   V,   W,   X,   Y,   Z,    ,    ,    ,    ,    ,
+
+	22,   0,  20,   4,   3,   6,  13,   7,   8,   9,  22,  11,  10,  12,   2,  22, //6
+//    ,   a,   b,   c,   d,   e,   f,   g,   h,   i,   j,   k,   l,   m,   n,   o,
+
+	14,   5,   1,  15,  16,  22,  19,  17,  22,  18,  21,  22,  22,  22,  22,  22, //7
+//   p,   q,   r,   s,   t,   u,   v,   w,   x,   y,   z,    ,    ,    ,    ,    ,
+
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //8
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //9
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //10
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //11
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //12
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //13
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //14
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22  //15
+};
+
+//____________________________________________________________________________
+
+
+template <typename T = void>
+struct TranslateTableByteToAA_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableByteToAA_<T>::VALUE[256] = 
+{
+	0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, //0
+	16,  17,  18,  19,  20,  21,  22,  23,  22,  22,  22,  22,  22,  22,  22,  22, //1
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //2
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //3
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //4
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //5
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //6
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //7
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //8
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //9
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //10
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //11
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //12
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //13
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22, //14
+	22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22,  22  //15
+};
+
+
+//____________________________________________________________________________
+
+
+
+
+}//namespace SEQAN_NAMESPACE_MAIN
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_alphabet_trait_basic.h b/src/SeqAn-1.3/seqan/basic/basic_alphabet_trait_basic.h
new file mode 100644
index 0000000..d2380fe
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_alphabet_trait_basic.h
@@ -0,0 +1,772 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ALPHABET_TRAIT_BASIC_H
+#define SEQAN_HEADER_BASIC_ALPHABET_TRAIT_BASIC_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayConstruct
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TIterator>
+inline void 
+_arrayConstructPointer(TIterator, 
+						TIterator,
+						True)
+{
+SEQAN_CHECKPOINT
+	//nothing to do
+}
+template<typename TIterator>
+inline void 
+_arrayConstructPointer(TIterator begin_, 
+						TIterator end_,
+						False)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructDefault(begin_, end_);
+}
+template<typename TValue>
+inline void 
+arrayConstruct(TValue * begin_, 
+			   TValue * end_)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructPointer(begin_, end_, typename IsSimple<TValue>::Type() );
+}
+
+//____________________________________________________________________________
+
+template<typename TIterator, typename TParam>
+inline void 
+_arrayConstructPointer(TIterator begin_, 
+						TIterator end_, 
+						TParam const & param_,
+						True)
+{
+SEQAN_CHECKPOINT
+	arrayFill(begin_, end_, param_);
+}
+template<typename TIterator, typename TParam>
+inline void 
+_arrayConstructPointer(TIterator begin_, 
+						TIterator end_, 
+						TParam const & param_,
+						False)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructDefault(begin_, end_, param_);
+}
+template<typename TValue, typename TParam>
+inline void 
+arrayConstruct(TValue * begin_, 
+			   TValue * end_, 
+			   TParam const & param_)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructPointer(begin_, end_, param_, typename IsSimple<TValue>::Type() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayConstructCopy
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValueSource, typename TValueTarget>
+inline void 
+_arrayConstructCopyPointer(TValueSource * source_begin, 
+							TValueSource * source_end, 
+							TValueTarget * target_begin,
+							True)
+{
+SEQAN_CHECKPOINT
+	arrayCopyForward(source_begin, source_end, target_begin);
+}
+template<typename TValueSource, typename TValueTarget>
+inline void 
+_arrayConstructCopyPointer(TValueSource * source_begin, 
+							TValueSource * source_end, 
+							TValueTarget const* target_begin,
+							True)
+{
+SEQAN_CHECKPOINT
+	arrayCopyForward(source_begin, source_end, const_cast<TValueTarget *>(target_begin));
+}
+
+template<typename TValueSource, typename TValueTarget>
+inline void 
+_arrayConstructCopyPointer(TValueSource * source_begin, 
+							TValueSource * source_end, 
+							TValueTarget * target_begin,
+							False)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructCopyDefault(source_begin, source_end, target_begin);
+}
+template<typename TValueSource, typename TValueTarget>
+inline void 
+arrayConstructCopy(TValueSource * source_begin, 
+				   TValueSource * source_end, 
+				   TValueTarget * target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructCopyPointer(source_begin, source_end, target_begin, typename IsSimple<TValueTarget>::Type() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayConstructMove
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue>
+inline void 
+_arrayConstructMovePointer(TValue * source_begin, 
+							TValue * source_end, 
+							TValue * target_begin,
+							True)
+{
+SEQAN_CHECKPOINT
+	arrayMoveForward(source_begin, source_end, target_begin);
+}
+template<typename TValue>
+inline void 
+_arrayConstructMovePointer(TValue * source_begin, 
+							TValue * source_end, 
+							TValue * target_begin,
+							False)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructMoveDefault(source_begin, source_end, target_begin);
+}
+template<typename TValue>
+inline void 
+arrayConstructMove(TValue * source_begin, 
+				   TValue * source_end, 
+				   TValue * target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayConstructMovePointer(source_begin, source_end, target_begin, typename IsSimple<TValue>::Type() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayDestruct
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue>
+inline void 
+_arrayDestructPointer(TValue * /*begin_*/, 
+					   TValue * /*end_*/,
+					   True)
+{
+SEQAN_CHECKPOINT
+	//do nothing
+}
+template<typename TValue>
+inline void 
+_arrayDestructPointer(TValue * begin_, 
+					   TValue * end_,
+					   False)
+{
+SEQAN_CHECKPOINT
+	_arrayDestructDefault(begin_, end_);
+}
+template<typename TValue>
+inline void 
+arrayDestruct(TValue * begin_, 
+			  TValue * end_)
+{
+SEQAN_CHECKPOINT
+	_arrayDestructPointer(begin_, end_, typename IsSimple<TValue>::Type() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayFill
+//////////////////////////////////////////////////////////////////////////////
+
+//no specializiation for pointer to simple
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayCopyForward
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue>
+inline void 
+_arrayCopyForwardPointer(TValue * source_begin, 
+						  TValue * source_end, 
+						  TValue * target_begin,
+						  True)
+{
+SEQAN_CHECKPOINT
+	::std::memmove(target_begin, source_begin, (source_end - source_begin) * sizeof(TValue));
+}
+template<typename TValue>
+inline void 
+_arrayCopyForwardPointer(TValue * source_begin, 
+						  TValue * source_end, 
+						  TValue * target_begin,
+						  False)
+{
+SEQAN_CHECKPOINT
+	_arrayCopyForwardDefault(source_begin, source_end, target_begin);
+}
+template<typename TValue>
+inline void 
+arrayCopyForward(TValue * source_begin, 
+				 TValue * source_end, 
+				 TValue * target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayCopyForwardPointer(source_begin, source_end, target_begin, typename IsSimple<TValue>::Type() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayCopyBackward
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void 
+_arrayCopyBackwardPointer(TValue * source_begin, 
+						   TValue * source_end, 
+						   TValue * target_begin,
+						   True)
+{
+SEQAN_CHECKPOINT
+	::std::memmove(target_begin, source_begin, (source_end - source_begin) * sizeof(TValue));
+}
+template <typename TValue>
+inline void 
+_arrayCopyBackwardPointer(TValue * source_begin, 
+						   TValue * source_end, 
+						   TValue * target_begin,
+						   False)
+{
+SEQAN_CHECKPOINT
+	_arrayCopyBackwardDefault(source_begin, source_end, target_begin); 
+}
+template<typename TValue>
+inline void 
+arrayCopyBackward(TValue * source_begin, 
+				  TValue * source_end, 
+				  TValue * target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayCopyBackwardPointer(source_begin, source_end, target_begin, typename IsSimple<TValue>::Type() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayMoveForward
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue>
+inline void 
+_arrayMoveForwardPointer(TValue * source_begin, 
+						  TValue * source_end, 
+						  TValue * target_begin,
+						  True)
+{
+SEQAN_CHECKPOINT
+	::std::memmove(target_begin, source_begin, (source_end - source_begin) * sizeof(TValue));
+}
+template<typename TValue>
+inline void 
+_arrayMoveForwardPointer(TValue * source_begin, 
+						  TValue * source_end, 
+						  TValue * target_begin,
+						  False)
+{
+SEQAN_CHECKPOINT
+	_arrayMoveForwardDefault(source_begin, source_end, target_begin);
+}
+template<typename TValue>
+inline void 
+arrayMoveForward(TValue * source_begin, 
+				 TValue * source_end, 
+				 TValue * target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayMoveForwardPointer(source_begin, source_end, target_begin, typename IsSimple<TValue>::Type() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayMoveBackward
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void 
+_arrayMoveBackwardPointer(TValue * source_begin, 
+						   TValue * source_end, 
+						   TValue * target_begin,
+						   True)
+{
+SEQAN_CHECKPOINT
+	::std::memmove(target_begin, source_begin, (source_end - source_begin) * sizeof(TValue));
+}
+template <typename TValue>
+inline void 
+_arrayMoveBackwardPointer(TValue * source_begin, 
+						   TValue * source_end, 
+						   TValue * target_begin,
+						   False)
+{
+SEQAN_CHECKPOINT
+	_arrayMoveBackwardDefault(source_begin, source_end, target_begin); 
+}
+template<typename TValue>
+inline void 
+arrayMoveBackward(TValue * source_begin, 
+				  TValue * source_end, 
+				  TValue * target_begin)
+{
+SEQAN_CHECKPOINT
+	_arrayMoveBackwardPointer(source_begin, source_end, target_begin, typename IsSimple<TValue>::Type() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//arrayClearSpace
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void 
+_arrayClearSpacePointer(TValue * array_begin, 
+						size_t array_length, 
+						size_t keep_from, 
+						size_t move_to,
+						True)
+{
+	if (keep_from == move_to) return;
+SEQAN_CHECKPOINT
+	arrayMove(array_begin + keep_from, array_begin + array_length, array_begin + move_to);
+}
+template <typename TValue>
+inline void 
+_arrayClearSpacePointer(TValue * array_begin, 
+						size_t array_length, 
+						size_t keep_from, 
+						size_t move_to,
+						False)
+{
+	_arrayClearSpaceDefault(array_begin, array_length, keep_from, move_to);
+}
+template <typename TValue>
+void arrayClearSpace(TValue * array_begin, 
+					 size_t array_length, 
+					 size_t keep_from, 
+					 size_t move_to)
+{
+	_arrayClearSpacePointer(array_begin, array_length, keep_from, move_to, typename IsSimple<TValue>::Type() );
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// IsSimple specializations
+//////////////////////////////////////////////////////////////////////////////
+
+// standard types
+template <> struct IsSimple_< bool > { typedef True Type; };
+template <> struct IsSimple_< char > { typedef True Type; };
+
+template <> struct IsSimple_< unsigned char > { typedef True Type; };
+template <> struct IsSimple_< unsigned short > { typedef True Type; };
+template <> struct IsSimple_< unsigned int > { typedef True Type; };
+template <> struct IsSimple_< unsigned long > { typedef True Type; };
+
+template <> struct IsSimple_< signed char > { typedef True Type; };
+template <> struct IsSimple_< signed short > { typedef True Type; };
+template <> struct IsSimple_< signed int > { typedef True Type; };
+template <> struct IsSimple_< signed long > { typedef True Type; };
+
+template <> struct IsSimple_< float > { typedef True Type; };
+template <> struct IsSimple_< double > { typedef True Type; };
+template <> struct IsSimple_< long double > { typedef True Type; };
+
+// user defined types (re-specializations are allowed here)
+template <> struct IsSimple< wchar_t > { typedef True Type; };
+template <> struct IsSimple< __int64 > { typedef True Type; };
+template <> struct IsSimple< __uint64 > { typedef True Type; };
+
+//////////////////////////////////////////////////////////////////////////////
+// gapValue
+//////////////////////////////////////////////////////////////////////////////
+
+inline char const &
+gapValueImpl(char *)
+{
+SEQAN_CHECKPOINT
+	static char const _gap = '-';
+	return _gap;
+}
+inline char const &
+gapValueImpl(char const *)
+{
+SEQAN_CHECKPOINT
+	static char const _gap = '-';
+	return _gap;
+}
+
+inline char const &
+unknownValueImpl(char *)
+{
+SEQAN_CHECKPOINT
+	static char const _unknown = 'N';
+	return _unknown;
+}
+inline char const &
+unknownValueImpl(char const *)
+{
+SEQAN_CHECKPOINT
+	static char const _unknown = 'N';
+	return _unknown;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// generic extreme values
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline T const &
+supremumValueImpl(T *)
+{
+SEQAN_CHECKPOINT
+	return MaxValue<T>::VALUE;
+}
+template <typename T>
+inline T const &
+infimumValueImpl(T *)
+{
+SEQAN_CHECKPOINT
+	return MinValue<T>::VALUE;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// bool 
+//////////////////////////////////////////////////////////////////////////////
+
+template <> struct BitsPerValue< bool > { enum { VALUE = 1 }; };
+
+/*
+//////////////////////////////////////////////////////////////////////////////
+// char 
+//////////////////////////////////////////////////////////////////////////////
+
+inline char const &
+supremumValueImpl(char *)
+{
+SEQAN_CHECKPOINT
+	static char const _value = (char) 127;
+	return _value;
+}
+inline char const &
+infimumValueImpl(char *)
+{
+SEQAN_CHECKPOINT
+	static char const _value = (char) -128;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// signed char 
+//////////////////////////////////////////////////////////////////////////////
+
+inline signed char const &
+supremumValueImpl(signed char *)
+{
+SEQAN_CHECKPOINT
+	static signed char const _value = 127;
+	return _value;
+}
+inline signed char const &
+infimumValueImpl(signed char *)
+{
+SEQAN_CHECKPOINT
+	static signed char const _value = -128;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// unsigned char 
+//////////////////////////////////////////////////////////////////////////////
+
+inline unsigned char const &
+supremumValueImpl(unsigned char *)
+{
+SEQAN_CHECKPOINT
+	static unsigned char const _value = 255;
+	return _value;
+}
+inline unsigned char const &
+infimumValueImpl(unsigned char *)
+{
+SEQAN_CHECKPOINT
+	static unsigned char const _value = 0;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// wchar_t
+//////////////////////////////////////////////////////////////////////////////
+
+inline wchar_t const &
+supremumValueImpl(wchar_t *)
+{
+SEQAN_CHECKPOINT
+	static wchar_t const _value = 1UL << (BitsPerValue<wchar_t>::VALUE) - 1;
+	return _value;
+}
+inline wchar_t const &
+infimumValueImpl(wchar_t *)
+{
+SEQAN_CHECKPOINT
+	static wchar_t const _value = 0;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// signed short 
+//////////////////////////////////////////////////////////////////////////////
+
+inline signed short const &
+supremumValueImpl(signed short *)
+{
+SEQAN_CHECKPOINT
+	static signed short const _value = (((1 << (BitsPerValue<signed short>::VALUE - 2)) - 1) << 1) + 1;
+	return _value;
+}
+inline signed short const &
+infimumValueImpl(signed short *dummy)
+{
+SEQAN_CHECKPOINT
+	static signed short const _value = -supremumValueImpl(dummy) - 1;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// unsigned short 
+//////////////////////////////////////////////////////////////////////////////
+
+inline unsigned short const &
+supremumValueImpl(unsigned short *)
+{
+SEQAN_CHECKPOINT
+	static unsigned short const _value = (((1 << (BitsPerValue<unsigned short>::VALUE - 1)) - 1) << 1) + 1;
+	return _value;
+}
+inline unsigned short const &
+infimumValueImpl(unsigned short *)
+{
+SEQAN_CHECKPOINT
+	static unsigned short const _value = 0;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// signed int 
+//////////////////////////////////////////////////////////////////////////////
+
+inline signed int const &
+supremumValueImpl(signed int *)
+{
+SEQAN_CHECKPOINT
+	static signed int const _value = (((1 << (BitsPerValue<signed int>::VALUE - 2)) - 1) << 1) + 1;
+	return _value;
+}
+inline signed int const &
+infimumValueImpl(signed int *dummy)
+{
+SEQAN_CHECKPOINT
+	static signed int const _value = -supremumValueImpl(dummy) - 1;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// unsigned int 
+//////////////////////////////////////////////////////////////////////////////
+
+inline unsigned int const &
+supremumValueImpl(unsigned int *)
+{
+SEQAN_CHECKPOINT
+	static unsigned int const _value = ~0ul;
+	return _value;
+}
+inline unsigned int const &
+infimumValueImpl(unsigned int *)
+{
+SEQAN_CHECKPOINT
+	static unsigned int const _value = 0;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// signed long
+//////////////////////////////////////////////////////////////////////////////
+
+inline signed long const &
+supremumValueImpl(signed long *)
+{
+SEQAN_CHECKPOINT
+	static signed long const _value = (((1 << (BitsPerValue<signed long>::VALUE - 2)) - 1) << 1) + 1;
+	return _value;
+}
+inline signed long const &
+infimumValueImpl(signed long *dummy)
+{
+SEQAN_CHECKPOINT
+	static signed long const _value = -supremumValueImpl(dummy) - 1;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// unsigned long
+//////////////////////////////////////////////////////////////////////////////
+
+inline unsigned long const &
+supremumValueImpl(unsigned long *)
+{
+SEQAN_CHECKPOINT
+	static unsigned long const _value = ~0ul;
+	return _value;
+}
+inline unsigned long const &
+infimumValueImpl(unsigned long *)
+{
+SEQAN_CHECKPOINT
+	static unsigned long const _value = 0;
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// signed 64bit int (cannot use long long <- no ISO C++)
+//////////////////////////////////////////////////////////////////////////////
+
+inline __int64 const &
+supremumValueImpl(__int64 *)
+{
+SEQAN_CHECKPOINT
+	static __int64 const _value = ((((__int64)1 << (BitsPerValue<__int64>::VALUE - 2)) - 1) << 1) + 1;
+	return _value;
+}
+inline __int64 const &
+infimumValueImpl(__int64 *dummy)
+{
+SEQAN_CHECKPOINT
+	static __int64 const _value = -supremumValueImpl(dummy) - 1;
+	return _value;
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// float 
+//////////////////////////////////////////////////////////////////////////////
+
+inline float const &
+supremumValueImpl(float *)
+{
+SEQAN_CHECKPOINT
+#ifdef PLATFORM_WINDOWS
+	static float const _value = ::std::numeric_limits<float>::infinity( );
+#else
+	static float const _value = 3.40282347e+38F;
+#endif
+	return _value;
+}
+inline float const &
+infimumValueImpl(float *)
+{
+SEQAN_CHECKPOINT
+#ifdef PLATFORM_WINDOWS
+	static float const _value = -::std::numeric_limits<float>::infinity( );
+#else
+	static float const _value = -3.40282347e+38F;
+#endif
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// double 
+//////////////////////////////////////////////////////////////////////////////
+
+inline double const &
+supremumValueImpl(double *)
+{
+SEQAN_CHECKPOINT
+#ifdef PLATFORM_WINDOWS
+	static double const _value = ::std::numeric_limits<double>::infinity( );
+#else
+	static double const _value = 1.7976931348623157e+308;
+#endif
+	return _value;
+}
+inline double const &
+infimumValueImpl(double *)
+{
+SEQAN_CHECKPOINT
+#ifdef PLATFORM_WINDOWS
+	static double const _value = -::std::numeric_limits<double>::infinity( );
+#else
+	static double const _value = -1.7976931348623157e+308;
+#endif
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// long double 
+//////////////////////////////////////////////////////////////////////////////
+
+inline long double const &
+supremumValueImpl(long double *)
+{
+SEQAN_CHECKPOINT
+#ifdef PLATFORM_WINDOWS
+	static long double const _value = ::std::numeric_limits<long double>::infinity( );
+#else
+	static long double const _value = 1.7976931348623157e+308;
+#endif
+	return _value;
+}
+inline long double const &
+infimumValueImpl(long double *)
+{
+SEQAN_CHECKPOINT
+#ifdef PLATFORM_WINDOWS
+	static long double const _value = -::std::numeric_limits<long double>::infinity( );
+#else
+	static long double const _value = -1.7976931348623157e+308;
+#endif
+	return _value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_compare.h b/src/SeqAn-1.3/seqan/basic/basic_compare.h
new file mode 100644
index 0000000..9769e96
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_compare.h
@@ -0,0 +1,74 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_COMPARE_H
+#define SEQAN_HEADER_BASIC_COMPARE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeft, typename TRight>
+struct CompareType;
+
+
+template <typename TLeft, typename TRight>
+struct CompareType<TLeft const, TRight>
+{
+	typedef typename CompareType<TLeft, TRight>::Type const Type;
+};
+template <typename TLeft, typename TRight>
+struct CompareType<TLeft, TRight const>
+{
+	typedef typename CompareType<TLeft, TRight>::Type const Type;
+};
+template <typename TLeft, typename TRight>
+struct CompareType<TLeft const, TRight const>
+{
+	typedef typename CompareType<TLeft, TRight>::Type const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T_> inline
+bool lexLess(const T_& _Left, const T_& Right_)
+{	// return lexicographical _Left < Right_
+	typedef typename MakeUnsigned_<T_>::Type TUnsigned;
+    return (TUnsigned)_Left < (TUnsigned)Right_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_converter.h b/src/SeqAn-1.3/seqan/basic/basic_converter.h
new file mode 100644
index 0000000..bd3376e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_converter.h
@@ -0,0 +1,128 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Basic conversion code.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_CONVERTER_H
+#define SEQAN_HEADER_BASIC_CONVERTER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//Convert
+//////////////////////////////////////////////////////////////////////////////
+
+//gibt den Typ an, in den TSource konvertiert werden kann (TTarget oder TTarget &)
+
+/**
+.Metafunction.Convert:
+..summary:Return type of a conversion. 
+..signature:Convert<Target, Source>::Type
+..param.Target:Type the object should be converted to.
+..param.Source:Type of the object that should be converted to $Target$.
+..returns.param.Type:Type that is returned by @Function.convert at .
+...remarks:This is either $Target$ or $Target &$:
+If instances of $Source$ can be re-interpreted as instances of $Target$,
+than this metafunction returns a reference, otherwise it returns $Target$, 
+that is @Function.convert@ returns a temporary.
+..remarks:A constant instance of $Convert$ is (ab)used as tag argument of @Function.convertImpl at .
+..include:seqan/basic.h
+*/
+template <typename TTarget, typename TSource = void>
+struct Convert
+{
+	typedef TTarget Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//convertImpl
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.convertImpl:
+..hidefromindex
+..cat:Alphabets
+..summary:Implements @Function.convert at .
+..signature:Convert convertImpl(convert, source)
+..param.convert:Object that specifies the conversion.
+...type:Metafunction.Convert
+...remarks:A constant instance of @Metafunction.Convert@ is used to specify the conversion target.
+..param.source:An object that should be converted.
+..returns:$source$ converted to the type specified by convert.
+...metafunction:Metafunction.Convert
+..remarks:This function implements @Function.convert at . 
+It is recommended to use @Function.convert@ rather than $convertImpl$.
+..include:seqan/basic.h
+*/
+//??? Spezialisiere convertImpl, verwende convert
+//??? Konversion eines einzelnen Zeichens in ein einzelnes Zeichen. Konversion von Sequenzen in Sequenzen finden wo anders statt.
+//??? Kann entweder kopieren oder re-interpretieren, je nach Convert::Type
+template <typename TTarget, typename T, typename TSource>
+inline typename Convert<TTarget, TSource>::Type
+convertImpl(Convert<TTarget, T> const,
+			TSource const & source)
+{
+	return source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//convert
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.convert:
+..cat:Alphabets
+..summary:Converts a value into another value.
+..signature:Convert convert<Target>(source)
+..param.Target:The type $source$ is converted to.
+..param.source:An object that is converted to $Target$.
+..returns:$source$ converted to $Target$.
+...remarks:If $source$ can be re-interpreted as instance of $Target$, then a reference is returned.
+Otherwise the function returns a temporary object. 
+...metafunction:Metafunction.Convert
+..remarks:This function is implemented in @Function.convertImpl at . 
+Do not specialize $convert$, specialize @Function.convertImpl@ instead.
+..see:Function.convertImpl
+..include:seqan/basic.h
+*/
+template <typename TTarget, typename TSource>
+inline typename Convert<TTarget, TSource>::Type
+convert(TSource const & source)
+{
+	return convertImpl(Convert<TTarget, TSource>(), source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_counted_ptr.h b/src/SeqAn-1.3/seqan/basic/basic_counted_ptr.h
new file mode 100644
index 0000000..eb8d528
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_counted_ptr.h
@@ -0,0 +1,128 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+// THIS FILE IS CURRENTLY NOT USED IN SEQAN
+
+#ifndef SEQAN_HEADER_BASIC_COUNTED_PTR_H
+#define SEQAN_HEADER_BASIC_COUNTED_PTR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	//////////////////////////////////////////////////////////////////////////////
+	// counted pointer
+
+	template < typename Type >
+	struct CountedPtr
+	{
+		typedef CountedPtr		Self_;
+		typedef CountedPtr*	    SelfPtr_;
+		typedef CountedPtr&	    SelfRef_;
+
+		typedef Type&			reference;
+		typedef const Type&		const_reference;
+		typedef Type*			pointer;
+
+        explicit CountedPtr(pointer p = 0): // allocate a new counter
+            itsCounter(0)
+        {
+            if (p) itsCounter = new counter(p);
+        }
+
+        CountedPtr(const Self_& r) throw() {
+            acquire(r.itsCounter);
+        }
+
+        ~CountedPtr() {
+            release();
+        }
+
+        CountedPtr& operator=(const Self_& r)
+        {
+            if (this != &r) {
+                release();
+                acquire(r.itsCounter);
+            }
+            return *this;
+        }
+
+        reference operator*() const throw() {
+            return *itsCounter->ptr;
+        }
+
+        pointer operator->() const throw() {
+            return itsCounter->ptr;
+        }
+
+        pointer get() const throw() {
+            return itsCounter ? itsCounter->ptr : 0;
+        }
+
+        bool unique() const throw() {
+            return (itsCounter ? itsCounter->count == 1 : true);
+        }
+
+		inline operator pointer () const {
+            return get();
+		}
+
+    private:
+
+        struct counter {
+            pointer     ptr;
+            unsigned    count;
+            counter(pointer p = 0, unsigned c = 1):
+                ptr(p),
+                count(c) { }
+        }* itsCounter;
+
+        void acquire(counter* c) throw()
+        { // increment the count
+            itsCounter = c;
+            if (c) ++c->count;
+        }
+
+        void release()
+        { // decrement the count, delete if it is 0
+            if (itsCounter) {
+                if (--itsCounter->count == 0) {
+                    delete itsCounter->ptr;
+                    delete itsCounter;
+                }
+                itsCounter = 0;
+            }
+        }
+    };
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/basic/basic_debug.h b/src/SeqAn-1.3/seqan/basic/basic_debug.h
new file mode 100644
index 0000000..9fe7489
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_debug.h
@@ -0,0 +1,427 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_DEBUG_H
+#define SEQAN_HEADER_BASIC_DEBUG_H
+
+#ifndef SEQAN_DEBUG_OR_TEST_
+#ifdef SEQAN_DEBUG
+#define SEQAN_DEBUG_OR_TEST_
+#else //#ifdef SEQAN_DEBUG
+#ifdef SEQAN_TEST
+#define SEQAN_DEBUG_OR_TEST_
+#endif //#ifdef SEQAN_TEST
+#endif //#ifdef SEQAN_DEBUG
+#endif //#ifndef SEQAN_DEBUG_OR_TEST_
+
+
+#ifdef SEQAN_DEBUG_OR_TEST_
+#include <cstdio>
+#endif //#ifdef SEQAN_DEBUG_OR_TEST_
+
+#ifdef SEQAN_DEBUG
+
+//throw a fatal debug report if _cond is false
+#define SEQAN_ASSERT(_cond) { if (!(_cond)) ::SEQAN_NAMESPACE_MAIN::debug::Error< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, #_cond " is FALSE"); }
+#define SEQAN_ASSERT1(_cond) SEQAN_ASSERT(_cond)
+#define SEQAN_ASSERT2(_cond, _comment) { if (!(_cond)) ::SEQAN_NAMESPACE_MAIN::debug::Error< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, _comment); }
+
+//throw a debug report if _cond is false
+#define SEQAN_CHECK(_cond) { if (!(_cond)) ::SEQAN_NAMESPACE_MAIN::debug::Message< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, #_cond " is FALSE"); }
+#define SEQAN_CHECK1(_cond) SEQAN_CHECK(_cond)
+#define SEQAN_CHECK2(_cond, _comment) { if (!(_cond)) ::SEQAN_NAMESPACE_MAIN::debug::Message< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, _comment); }
+
+#define SEQAN_DO(_cond) { if (!(_cond)) ::SEQAN_NAMESPACE_MAIN::debug::Message< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, #_cond " is FALSE"); }
+#define SEQAN_DO1(_cond) SEQAN_DO(_cond)
+#define SEQAN_DO2(_cond, _comment) { if (!(_cond)) ::SEQAN_NAMESPACE_MAIN::debug::Error< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, _comment); }
+
+//report a message
+#define SEQAN_ABORT(_comment) { ::SEQAN_NAMESPACE_MAIN::debug::Error< ::SEQAN_NAMESPACE_MAIN::debug::Report >(__FILE__, __LINE__, _comment); }
+#define SEQAN_REPORT(_comment) { ::SEQAN_NAMESPACE_MAIN::debug::Message< ::SEQAN_NAMESPACE_MAIN::debug::Report >(__FILE__, __LINE__, _comment); }
+
+#else //#ifdef SEQAN_DEBUG
+
+//disable debug reports in release built
+#define SEQAN_ASSERT(_cond) {}
+#define SEQAN_ASSERT1(_cond) {}
+#define SEQAN_ASSERT2(_cond, _comment) {}
+
+#define SEQAN_CHECK(_cond) {}
+#define SEQAN_CHECK1(_cond) {}
+#define SEQAN_CHECK2(_cond, _comment) {}
+
+#define SEQAN_DO(_cond) { if (_cond) {} }
+#define SEQAN_DO1(_cond) SEQAN_DO(_cond)
+#define SEQAN_DO2(_cond, _comment) { _cond; }
+
+#define SEQAN_ABORT(_comment) {}
+#define SEQAN_REPORT(_comment) {}
+
+#endif //#ifdef SEQAN_DEBUG
+
+#ifdef SEQAN_TEST
+
+//test a condition and report test result
+#define SEQAN_TASSERT(_cond) \
+	{ if (!(_cond)) ::SEQAN_NAMESPACE_MAIN::debug::Error< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, "(" #_cond ") is FALSE"); }
+#define SEQAN_TASSERT1(_cond) SEQAN_TASSERT(_cond)
+#define SEQAN_TASSERT2(_cond, _comment) \
+	{ if (!(_cond)) ::SEQAN_NAMESPACE_MAIN::debug::Error< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, _comment); }
+
+#define SEQAN_TCHECK(_cond) \
+	{ if (_cond) ::SEQAN_NAMESPACE_MAIN::debug::Result< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, "(" #_cond ") is TRUE"); \
+	else ::SEQAN_NAMESPACE_MAIN::debug::Result< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, "(" #_cond ") is FALSE"); }
+#define SEQAN_TCHECK1(_cond) SEQAN_TCHECK(_cond)
+#define SEQAN_TCHECK2(_cond, _comment) \
+	{ if (_cond) ::SEQAN_NAMESPACE_MAIN::debug::Result< ::SEQAN_NAMESPACE_MAIN::debug::Check >(__FILE__, __LINE__, _comment); }
+
+//report a test result
+#define SEQAN_TABORT(_comment) { ::SEQAN_NAMESPACE_MAIN::debug::Error< ::SEQAN_NAMESPACE_MAIN::debug::Report >(__FILE__, __LINE__, _comment); }
+#define SEQAN_TREPORT(_comment) { ::SEQAN_NAMESPACE_MAIN::debug::Result< ::SEQAN_NAMESPACE_MAIN::debug::Report >(__FILE__, __LINE__, _comment); }
+
+#else //#ifdef SEQAN_TEST
+
+#define SEQAN_TASSERT(_cond) {}
+#define SEQAN_TASSERT1(_cond) {}
+#define SEQAN_TASSERT2(_cond, _comment) {}
+
+#define SEQAN_TCHECK(_cond) {}
+#define SEQAN_TABORT(_comment) {}
+#define SEQAN_TREPORT(_comment) {}
+
+#endif //#ifdef SEQAN_TEST
+//____________________________________________________________________________
+
+#ifdef SEQAN_DEBUG_OR_TEST_
+
+//Test Helper Functions
+
+// compare two files, do not translate linebreaks
+inline bool 
+_compareBinaryFiles(const char * file1, const char * file2)
+{
+	bool ret = false;
+
+	FILE * fl1 = fopen(file1, "rb");
+	if (!fl1) return ret;
+
+	FILE * fl2 = fopen(file2, "rb");
+	if (!fl2)
+	{
+		fclose(fl1);
+		return ret;
+	}
+
+	while (!feof(fl1) && !feof(fl2))
+	{
+		if (fgetc(fl1) != fgetc(fl2)) goto End;
+	}
+
+	ret = feof(fl1) && feof(fl2);
+
+End:
+	fclose(fl2);
+	fclose(fl1);
+
+	return ret;
+
+}
+//____________________________________________________________________________
+
+//one line break is either \r, \n, or \r\n.
+//a single line break is skipped.
+//the second line break is transformed into \n
+inline void 
+_compareTextFilesReadChar(FILE * fl, char & c, int & num_lb, bool & is_eof)
+{
+	num_lb = 0;
+	is_eof = false;
+
+	c = fgetc(fl);
+	while ((c == '\r') || (c == '\n'))
+	{
+		++num_lb;
+		if (c == '\r')
+		{
+			c = fgetc(fl);
+			if (feof(fl)) is_eof = true;
+			else
+			{
+				if (c == '\n')
+				{
+					c = fgetc(fl);
+					if (feof(fl)) is_eof = true;
+				}
+			}
+		}
+		else if (c == '\n')
+		{
+			c = fgetc(fl);
+			if (feof(fl)) is_eof = true;
+		}
+	}
+}
+
+// compare two files, translate linebreaks
+inline bool 
+_compareTextFiles(const char * file1, const char * file2)
+{
+	FILE * fl1 = fopen(file1, "rb");
+	if (!fl1) return false;
+
+	FILE * fl2 = fopen(file2, "rb");
+	if (!fl2)
+	{
+		fclose(fl1);
+		return false;
+	}
+
+	bool ret = false;
+
+	int num_lb1, num_lb2;
+	bool is_eof1, is_eof2;
+	char c1, c2;
+
+	while (!feof(fl1) && !feof(fl2))
+	{
+		_compareTextFilesReadChar(fl1, c1, num_lb1, is_eof1);
+		_compareTextFilesReadChar(fl2, c2, num_lb2, is_eof2);
+
+		if (num_lb1 != num_lb2)
+		{
+			goto End;
+		}
+		if (is_eof1 ^ is_eof2)
+		{
+			goto End;
+		}
+		if (c1 != c2)
+		{
+			goto End;
+		}
+	}
+
+	ret = feof(fl1) && feof(fl2);
+
+End:
+	fclose(fl2);
+	fclose(fl1);
+
+	return ret;
+
+}
+
+
+//____________________________________________________________________________
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+namespace debug
+{
+
+//action of SEQAN_ASSERT, SEQAN_TCHECK and SEQAN_CHECK
+//use as template argument for Error<> and Message<> and Result<>
+class Check {};
+
+//action of SEQAN_ABORT, SEQAN_TREPORT and SEQAN_REPORT
+//use as template argument for Error<> and Message<> and Result<>
+class Report {};
+
+
+//report fatal error
+//template argument TAction is the action (Check or Report)
+//use explicit instatiation for overwriting the default behavior
+template <typename TAction>
+void Error(const char * file, int line, const char * comment)
+{
+	std::fprintf(stderr, "%s(%i) : SEQAN: %s\nSEQAN: execution aborted\n", file, line, comment);
+	exit(1);
+}
+
+template <typename TAction>
+void Error(const char * file, int line)
+{
+  Error<TAction>(file, line, "-");
+}
+
+//report debug message
+//template argument TAction is the action (Check or Report)
+//use explicit instatiation for overwriting the default behavior
+template <typename TAction>
+void Message(const char * file, int line, const char * comment)
+{
+	std::fprintf(stderr, "%s(%i) : SEQAN: %s\n", file, line, comment);
+}
+
+template <typename TAction>
+void Message(const char * file, int line)
+{
+  Message<TAction>(file, line, "-");
+}
+
+//report test result
+//template argument TAction is the action (Check or Report)
+//use explicit instatiation for overwriting the default behavior
+template <typename TAction>
+void Result(const char * file, int line, const char * comment)
+{
+	std::fprintf(stdout, "%s(%i) : %s\n", file, line, comment);
+}
+
+template <typename TAction>
+void Result(const char * file, int line)
+{
+  Result<TAction>(file, line, "-");
+}
+
+} //namespace debug
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifdef SEQAN_DEBUG_OR_TEST_
+
+
+//____________________________________________________________________________
+//Checkpoint Testing
+
+//note: this framework relies on the filenames in the project to be unique 
+
+#ifdef SEQAN_TEST
+
+#include <set>
+#include <vector>
+#include <cstring>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+namespace debug
+{
+struct Checkpoint
+{
+	char const* file;
+	unsigned int line;
+};
+
+struct CheckpointLess : public ::std::binary_function <Checkpoint, Checkpoint, bool>
+{
+	inline bool operator() (Checkpoint const &a, Checkpoint const &b) const
+	{
+		int c = strcmp(a.file, b.file);
+		return c < 0 || (c == 0 && a.line < b.line);
+	}
+};
+
+template <typename T = void>
+struct CheckpointStore
+{
+	static ::std::set<Checkpoint, CheckpointLess> data;
+};
+template <typename T>
+::std::set<Checkpoint, CheckpointLess> CheckpointStore<T>::data;
+
+
+inline bool 
+checkpoint(unsigned int line, char const* file)
+{
+	char const* file_name = strrchr(file, '/');
+	char const* file_name_2 = strrchr(file, '\\');
+	if (file_name_2 > file_name) file_name = file_name_2;
+	if (!file_name) file_name = file;
+	else ++file_name;
+
+	Checkpoint cp = {file_name, line};
+	CheckpointStore<>::data.insert(cp);
+	return true;
+}
+//#define SEQAN_CHECKPOINT ::SEQAN_NAMESPACE_MAIN::debug::checkpoint(__LINE__, __FILE__);
+
+
+inline void 
+testCheckpoint(char const* file, unsigned int line)
+{
+	Checkpoint cp = {file, line};
+	if (CheckpointStore<>::data.find(cp) == CheckpointStore<>::data.end())
+		Message< Report >(file, line, "Checkpoint lost");
+}
+
+inline void 
+verifyCheckpoints(char const* file)
+{
+	char const* file_name = strrchr(file, '/');
+	char const* file_name_2 = strrchr(file, '\\');
+	if (file_name_2 > file_name) file_name = file_name_2;
+	if (!file_name) file_name = file;
+	else ++file_name;
+
+        int len = strlen(::seqan::ClassTest::StaticData::pathToProjects()) +
+            strlen("/") + strlen(file) + 1;
+        char *absolutePath = new char[len];
+        absolutePath[0] = '\0';
+        strcat(absolutePath, ::seqan::ClassTest::StaticData::pathToProjects());
+        strcat(absolutePath, "/");
+        strcat(absolutePath, file);
+
+	FILE * fl = ::std::fopen(absolutePath, "r");
+        delete[] absolutePath;
+	if (!fl)
+	{
+		Error< Report >(file, 0, "verifyCheckpoints could not find this file.");	
+	}
+	unsigned int line_number = 1;
+	char buf[1<<16];
+
+	while (::std::fgets(buf, sizeof(buf), fl))
+	{
+		if (::std::strstr(buf, "SEQAN_CHECKPOINT"))
+		{
+			testCheckpoint(file_name, line_number);
+		}
+		++line_number;
+	}
+
+	::std::fclose(fl);
+}
+
+} //namespace debug
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#else //#ifdef SEQAN_TEST
+
+//#define SEQAN_CHECKPOINT
+
+#endif //#ifdef SEQAN_TEST
+
+//____________________________________________________________________________
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_definition.h b/src/SeqAn-1.3/seqan/basic/basic_definition.h
new file mode 100644
index 0000000..2fb167b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_definition.h
@@ -0,0 +1,429 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_DEFINITION_H
+#define SEQAN_HEADER_BASIC_DEFINITION_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct Tag
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct Length;
+
+template <>
+struct Length<void>
+{
+	enum { VALUE = 0 };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.TagList:
+..summary:A structure to represent a list of tags.
+..signature:TagList<TTag1>
+..signature:TagList<TTag1, TagList<TTag2> >
+..signature:TagList<TTag1, TagList<TTag2, TagList<TTag3[...]> > >
+..param.TTag1:The first tag of the list.
+..param.TTag2:The second tag of the list.
+..param.TTag3:The third tag of the list.
+..include:seqan/basic.h
+*/
+
+template <typename TTag = void, typename TSubList = void>
+struct TagList
+{
+	typedef TTag Type;
+};
+
+template <typename TTag>
+struct Length< TagList<TTag, void> > {
+	enum { VALUE = 1 };
+};
+
+template <typename TTag, typename TSubList>
+struct Length< TagList<TTag, TSubList> > {
+	enum { VALUE = Length<TSubList>::VALUE + 1 };
+};
+
+template <typename TTagList = void>
+struct TagSelector
+{
+	int tagId;
+	
+	TagSelector()
+	{
+		tagId = 0;
+	}
+
+    inline bool operator==(TagSelector const & other) const
+    {
+        return other.tagId == tagId;
+    }
+};
+
+/**
+.Class.TagSelector:
+..summary:A structure to select a tag from a @Tag.TagList at .
+..signature:TagSelector<TTagList>
+..param.TTagList:A tag list.
+...type:Tag.TagList
+.Memvar.TagSelector#tagId:
+..class:Class.TagSelector
+..type:nolink:int
+..cat:Basic
+..summary:Stores the index of a @Page.Glossary.Tag@ in the tag list.
+..include:seqan/basic.h
+*/
+
+///
+
+template <typename TTag, typename TSubList>
+struct TagSelector< TagList<TTag, TSubList> >:
+	TagSelector<TSubList>
+{
+	typedef TTag					Type;
+	typedef TagSelector<TSubList>	Base;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Default:
+..summary:Tag that specifies default behavior.
+..tag.Default:Use default behavior. 
+..include:seqan/basic.h
+*/
+struct Default_;
+typedef Tag<Default_> const Default;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Move Switch:
+..summary:Switch to force move.
+..tag.Move:Move instead of assign. 
+..remarks.text:The difference between move constructor and copy constructor
+is that the source object is not copied but moved into the target object.
+The source object can lose its content and will be empty after
+this operation in this case.
+A move constructor can sigificantly faster than a copy constructor.
+..example.code:String source("hello");
+String target(source, Move()); // source is moved to target
+std::cout << source; //nothing printed since source lost content
+std::cout << target; //"hello"
+..see:Function.move
+..include:seqan/basic.h
+*/
+
+struct Move_;
+typedef Tag<Move_> const Move;
+
+//////////////////////////////////////////////////////////////////////////////
+
+//Pass to c'tor of iterator to move it to the end
+struct GoEnd_;
+typedef Tag<GoEnd_> const GoEnd;
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//construct without initializing
+struct MinimalCtor_;
+typedef Tag<MinimalCtor_> const MinimalCtor;
+
+//construct with initializing
+struct NonMinimalCtor_;
+typedef Tag<NonMinimalCtor_> const NonMinimalCtor;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Nothing:
+..summary:Tag that represents an absent parameter or an absent type.
+..tag.Nothing:Omit parameter.
+..include:seqan/basic.h
+*/
+///Empty Data Class.
+struct Nothing {};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// returns TTo const, if TFrom is const, TTo otherwise
+
+template <typename TFrom, typename TTo>
+struct CopyConst_
+{
+	typedef TTo Type;
+};
+template <typename TFrom, typename TTo>
+struct CopyConst_<TFrom const, TTo>
+{
+	typedef TTo const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal.RemoveConst_:
+..signature:RemoveConst_<T>
+..returns:$t$ if $T$ is $t const$, otherwise $T$.
+*/
+template <typename T>
+struct RemoveConst_
+{
+	typedef T Type;
+};
+template <typename T>
+struct RemoveConst_<T const>:
+	public RemoveConst_<T> {};
+
+template <typename T>
+struct RemoveConst_<T &>
+{
+	typedef typename RemoveConst_<T>::Type & Type;
+};
+template <typename T>
+struct RemoveConst_<T *>
+{
+	typedef typename RemoveConst_<T>::Type * Type;
+};
+template <typename T, size_t I>
+struct RemoveConst_<T const [I]>
+{
+	typedef T * Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Internal.MakeUnsigned_:
+..signature:MakeUnsigned_<T>
+..returns:$unsigned t$ if $T$ is not $unsigned t$, otherwise $T$.
+*/
+template <typename T>
+struct MakeUnsigned_
+{
+	typedef
+		typename If< IsSameType<T, char>::VALUE,         unsigned char,
+		typename If< IsSameType<T, signed char>::VALUE,  unsigned char,
+		typename If< IsSameType<T, signed short>::VALUE, unsigned short,
+		typename If< IsSameType<T, signed int>::VALUE,   unsigned int,
+		typename If< IsSameType<T, signed long>::VALUE,  unsigned long,
+		typename If< IsSameType<T, __int64>::VALUE,      __uint64, T
+		>::Type>::Type>::Type>::Type>::Type>::Type Type;
+};
+
+template <typename T>
+struct MakeUnsigned_<T const> {
+	typedef typename MakeUnsigned_<T>::Type const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Internal.MakeSigned_:
+..signature:MakeSigned_<T>
+..returns:$signed t$ if $T$ is not $signed t$, otherwise $T$.
+*/
+template <typename T>
+struct MakeSigned_
+{
+	typedef
+		typename If< IsSameType<T, char>::VALUE,           signed char,
+		typename If< IsSameType<T, unsigned char>::VALUE,  signed char,
+		typename If< IsSameType<T, unsigned short>::VALUE, signed short,
+		typename If< IsSameType<T, unsigned int>::VALUE,   signed int,
+		typename If< IsSameType<T, unsigned long>::VALUE,  signed long,
+		typename If< IsSameType<T, __uint64>::VALUE,       __int64, T
+		>::Type>::Type>::Type>::Type>::Type>::Type Type;
+};
+
+template <typename T>
+struct MakeSigned_<T const> {
+	typedef typename MakeSigned_<T>::Type const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Internal.ClassIdentifier_:
+..signature:void * ClassIdentifier_<T>::getID()
+..returns:A void * that identifies $T$.
+...text:The returned values of two calls of $getID$ are equal if and only if
+the used type $T$ was the same.
+*/
+template <typename T>
+struct ClassIdentifier_
+{
+	static inline void *
+	getID()
+	{
+SEQAN_CHECKPOINT
+		static bool _id_dummy;
+		return &_id_dummy;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.log2:
+..cat:Miscellaneous
+..summary:Computes logarithm of base 2 for integer types
+..signature:unsigned int log2(i)
+..param.i:An integer type.
+..returns:The largest integer smaller or equal than
+the logarithm of $i$.
+..include:seqan/basic.h
+*/
+
+template <int BITS_MAX>
+struct Log2Impl_
+{
+	template <typename T>
+	static inline unsigned int
+	log2(T val, unsigned int offset)
+	{
+		unsigned int val2 = val >> (BITS_MAX / 2);
+		if (val2)
+		{
+			val = val2;
+			offset += BITS_MAX / 2;
+		}
+		return Log2Impl_<BITS_MAX / 2>::log2(val, offset);
+	}
+};
+
+template <>
+struct Log2Impl_<1>
+{
+	template <typename T>
+	static inline unsigned int
+	log2(T /*val*/, unsigned int offset)
+	{
+		return offset;
+	}
+};
+
+
+template <typename T>
+inline unsigned int
+log2(T val)
+{
+	enum
+	{
+//		BITS_PER_VALUE = BitsPerValue<T>::VALUE //TODO???
+		BITS_PER_VALUE = sizeof(T) * 8
+	};
+
+	return Log2Impl_<BITS_PER_VALUE>::log2(val, 0);
+}
+
+template <typename TValue, typename TExponent>
+inline TValue _intPow(TValue a, TExponent b)
+{
+SEQAN_CHECKPOINT
+	TValue ret = 1;
+	while (b != 0)
+	{
+		if (b & 1) ret *= a;
+		a *= a;
+		b >>= 1;
+	}	
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// to avoid conflicts with non-standard macros and namespaces
+// we define our own Min/Max functions
+
+template<typename Tx_> inline
+const Tx_& _min(const Tx_& _Left, const Tx_& Right_)
+{	// return smaller of _Left and Right_
+	if (_Left < Right_)
+		return _Left;
+	else
+		return Right_;
+}
+
+template<typename Tx_, typename Ty_> inline
+Tx_ _min(const Tx_& _Left, const Ty_& Right_)
+{	// return smaller of _Left and Right_
+    return (Right_ < _Left ? Right_ : _Left);
+}
+
+template<typename Ty_> inline
+const Ty_& _max(const Ty_& _Left, const Ty_& Right_)
+{	// return larger of _Left and Right_
+	if (_Left < Right_)
+		return Right_;
+	else
+		return _Left;
+}
+
+template<typename Tx_, typename Ty_> inline
+Tx_ _max(const Tx_& _Left, const Ty_& Right_)
+{	// return smaller of _Left and Right_
+    return (Right_ < _Left ? _Left : Right_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline
+T _abs(T const & x)
+{
+    if (x < static_cast<T>(0))
+        return -x;
+    else
+        return x;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T1, typename T2>
+inline bool 
+_isSameType()
+{
+	return IsSameType<T1, T2>::VALUE;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
diff --git a/src/SeqAn-1.3/seqan/basic/basic_forwards.h b/src/SeqAn-1.3/seqan/basic/basic_forwards.h
new file mode 100644
index 0000000..60156b3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_forwards.h
@@ -0,0 +1,81 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_FORWARD2_H
+#define SEQAN_HEADER_BASIC_FORWARD2_H
+
+//forward declarations (make GCC 4.x happy)
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// basic_transport.h::assign
+
+template <typename TTarget, typename TSource>
+inline void
+assign(TTarget & target,
+	   TSource & source);
+
+template <typename TTarget, typename TSource>
+inline void
+assign(TTarget & target,
+	   TSource const & source);
+
+//////////////////////////////////////////////////////////////////////////////
+// string_pointer.h::assignValue
+
+template <typename TValue, typename TPos>
+inline void
+assignValue(TValue * me,
+			TPos pos, 
+			TValue const & _value);
+
+//////////////////////////////////////////////////////////////////////////////
+// string_pointer.h::value
+
+template <typename TValue, typename TPos>
+inline TValue &
+value(TValue * me,
+	  TPos pos);
+
+//////////////////////////////////////////////////////////////////////////////
+// sequence/lexical.h::ordValue
+
+template <typename TValue>
+inline unsigned
+ordValue(TValue const & c);
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_generated_forwards.h b/src/SeqAn-1.3/seqan/basic/basic_generated_forwards.h
new file mode 100644
index 0000000..d7e1455
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_generated_forwards.h
@@ -0,0 +1,2403 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_BASIC_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_BASIC_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+namespace debug {
+
+//____________________________________________________________________________
+// Check
+
+class Check;       	// "projects/library/seqan/basic/basic_debug.h"(254)
+
+//____________________________________________________________________________
+// Checkpoint
+
+struct Checkpoint;       	// "projects/library/seqan/basic/basic_debug.h"(330)
+
+//____________________________________________________________________________
+// CheckpointLess
+
+struct CheckpointLess;       	// "projects/library/seqan/basic/basic_debug.h"(336)
+
+//____________________________________________________________________________
+// CheckpointStore
+
+template <typename T > struct CheckpointStore;       	// "projects/library/seqan/basic/basic_debug.h"(346)
+
+//____________________________________________________________________________
+// Report
+
+class Report;       	// "projects/library/seqan/basic/basic_debug.h"(258)
+
+} //namespace debug
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AdaptorIterator
+
+template <typename TIterator, typename TSpec > struct AdaptorIterator;       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(43)
+
+//____________________________________________________________________________
+// AllocateStorage_
+
+struct AllocateStorage_;       	// "projects/library/seqan/basic/basic_allocator_interface.h"(97)
+
+//____________________________________________________________________________
+// AllocateTemp_
+
+struct AllocateTemp_;       	// "projects/library/seqan/basic/basic_allocator_interface.h"(94)
+
+//____________________________________________________________________________
+// AllocateUnspecified_
+
+struct AllocateUnspecified_;       	// "projects/library/seqan/basic/basic_allocator_interface.h"(91)
+
+//____________________________________________________________________________
+// Allocator
+
+template <typename TSpec> struct Allocator;       	// "projects/library/seqan/basic/basic_allocator_interface.h"(62)
+
+//____________________________________________________________________________
+// AminoAcid_
+
+struct AminoAcid_;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1204)
+
+//____________________________________________________________________________
+// And
+
+template <typename TBool1, typename TBool2> struct And;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(86)
+
+//____________________________________________________________________________
+// BandedGotoh_
+
+struct BandedGotoh_;       	// "projects/library/seqan/basic/basic_tag.h"(131)
+
+//____________________________________________________________________________
+// BandedNeedlemanWunsch_
+
+struct BandedNeedlemanWunsch_;       	// "projects/library/seqan/basic/basic_tag.h"(110)
+
+//____________________________________________________________________________
+// BandedSmithWaterman_
+
+struct BandedSmithWaterman_;       	// "projects/library/seqan/basic/basic_tag.h"(202)
+
+//____________________________________________________________________________
+// BandedWatermanEggert_
+
+struct BandedWatermanEggert_;       	// "projects/library/seqan/basic/basic_tag.h"(227)
+
+//____________________________________________________________________________
+// BaseAlphabet
+
+template <typename TValue> struct BaseAlphabet;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1527)
+
+//____________________________________________________________________________
+// BitCompressed
+
+template <unsigned BITSIZE1 , unsigned BITSIZE2 > struct BitCompressed;       	// "projects/library/seqan/basic/basic_aggregates.h"(45)
+
+//____________________________________________________________________________
+// BitVector_
+
+template <unsigned char _size > struct BitVector_;       	// "projects/library/seqan/basic/basic_aggregates.h"(399)
+
+//____________________________________________________________________________
+// BitsPerValue
+
+template <typename TValue> struct BitsPerValue;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(878)
+
+//____________________________________________________________________________
+// Blat_
+
+struct Blat_;       	// "projects/library/seqan/basic/basic_tag.h"(243)
+
+//____________________________________________________________________________
+// BytesPerValue
+
+template <typename TValue> struct BytesPerValue;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(904)
+
+//____________________________________________________________________________
+// Cargo
+
+template <typename T> struct Cargo;       	// "projects/library/seqan/basic/basic_type.h"(312)
+
+//____________________________________________________________________________
+// Case
+
+template <int tag_,class Type_,class Next_ > struct Case;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(146)
+
+//____________________________________________________________________________
+// ChunkPool
+
+template <size_t SIZE, size_t MAX_COUNT , typename TParentAllocator > struct ChunkPool;       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(69)
+
+//____________________________________________________________________________
+// ChunkPool2
+
+template <typename TValue, size_t MAX_COUNT , typename TParentAllocator > struct ChunkPool2;       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(261)
+
+//____________________________________________________________________________
+// ClassIdentifier_
+
+template <typename T> struct ClassIdentifier_;       	// "projects/library/seqan/basic/basic_definition.h"(291)
+
+//____________________________________________________________________________
+// CompareType
+
+template <typename TLeft, typename TRight> struct CompareType;       	// "projects/library/seqan/basic/basic_compare.h"(42)
+template <typename TLeft, typename TRight> struct CompareType;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(565)
+
+//____________________________________________________________________________
+// Compressed_
+
+struct Compressed_;       	// "projects/library/seqan/basic/basic_aggregates.h"(41)
+
+//____________________________________________________________________________
+// ConstParameter_
+
+template <typename T> struct ConstParameter_;       	// "projects/library/seqan/basic/basic_type.h"(501)
+
+//____________________________________________________________________________
+// Container
+
+template <typename T> struct Container;       	// "projects/library/seqan/basic/basic_iterator_base.h"(168)
+template <typename T> struct Container;       	// "projects/library/seqan/basic/basic_iterator.h"(164)
+
+//____________________________________________________________________________
+// Convert
+
+template <typename TTarget, typename TSource > struct Convert;       	// "projects/library/seqan/basic/basic_converter.h"(65)
+
+//____________________________________________________________________________
+// CopyConst_
+
+template <typename TFrom, typename TTo> struct CopyConst_;       	// "projects/library/seqan/basic/basic_definition.h"(192)
+
+//____________________________________________________________________________
+// CountedPtr
+
+template <typename Type > struct CountedPtr;       	// "projects/library/seqan/basic/basic_counted_ptr.h"(46)
+
+//____________________________________________________________________________
+// DeepestSpec
+
+template <typename T> struct DeepestSpec;       	// "projects/library/seqan/basic/basic_type.h"(250)
+
+//____________________________________________________________________________
+// DefaultGetIteratorSpec
+
+template <typename T> struct DefaultGetIteratorSpec;       	// "projects/library/seqan/basic/basic_iterator.h"(109)
+
+//____________________________________________________________________________
+// DefaultIteratorSpec
+
+template <typename T> struct DefaultIteratorSpec;       	// "projects/library/seqan/basic/basic_iterator.h"(86)
+
+//____________________________________________________________________________
+// Default_
+
+struct Default_;       	// "projects/library/seqan/basic/basic_definition.h"(133)
+
+//____________________________________________________________________________
+// Difference
+
+template <typename T> struct Difference;       	// "projects/library/seqan/basic/basic_type.h"(154)
+
+//____________________________________________________________________________
+// Dna5Q_
+
+struct Dna5Q_;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1580)
+
+//____________________________________________________________________________
+// Dna5_
+
+struct Dna5_;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1101)
+
+//____________________________________________________________________________
+// DnaQ_
+
+struct DnaQ_;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1550)
+
+//____________________________________________________________________________
+// Dna_
+
+struct Dna_;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1076)
+
+//____________________________________________________________________________
+// DotDrawing_
+
+struct DotDrawing_;       	// "projects/library/seqan/basic/basic_tag.h"(49)
+
+//____________________________________________________________________________
+// Eval
+
+template <bool b> struct Eval;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(53)
+
+//____________________________________________________________________________
+// False
+
+struct False;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(49)
+
+//____________________________________________________________________________
+// Finite
+
+template <unsigned SIZE> struct Finite;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1225)
+
+//____________________________________________________________________________
+// GetValue
+
+template <typename T> struct GetValue;       	// "projects/library/seqan/basic/basic_type.h"(83)
+
+//____________________________________________________________________________
+// GoEnd_
+
+struct GoEnd_;       	// "projects/library/seqan/basic/basic_definition.h"(160)
+
+//____________________________________________________________________________
+// Gotoh_
+
+struct Gotoh_;       	// "projects/library/seqan/basic/basic_tag.h"(121)
+
+//____________________________________________________________________________
+// HammingDistance_
+
+struct HammingDistance_;       	// "projects/library/seqan/basic/basic_tag.h"(67)
+
+//____________________________________________________________________________
+// Hirschberg_
+
+struct Hirschberg_;       	// "projects/library/seqan/basic/basic_tag.h"(162)
+
+//____________________________________________________________________________
+// Holder
+
+template <typename TValue, typename TSpec > struct Holder;       	// "projects/library/seqan/basic/basic_holder.h"(73)
+
+//____________________________________________________________________________
+// Host
+
+template <typename T> struct Host;       	// "projects/library/seqan/basic/basic_type.h"(200)
+
+//____________________________________________________________________________
+// Id
+
+template <typename T> struct Id;       	// "projects/library/seqan/basic/basic_type.h"(359)
+
+//____________________________________________________________________________
+// If
+
+template <bool Flag,class Type1, class Type2> struct If;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(105)
+
+//____________________________________________________________________________
+// IntegralForValue
+
+template <typename TValue> struct IntegralForValue;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(963)
+
+//____________________________________________________________________________
+// IntegralForValueImpl_
+
+template <int SIZE> struct IntegralForValueImpl_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(936)
+
+//____________________________________________________________________________
+// InternalValueSize_
+
+template <typename TValue> struct InternalValueSize_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(991)
+
+//____________________________________________________________________________
+// IsIntegral
+
+template <typename T> struct IsIntegral;       	// "projects/library/seqan/basic/basic_type.h"(675)
+
+//____________________________________________________________________________
+// IsSameType
+
+template <class Type1, class Type2> struct IsSameType;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(124)
+
+//____________________________________________________________________________
+// IsSimple
+
+template <typename T> struct IsSimple;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(69)
+template <typename T> struct IsSimple;       	// "projects/library/seqan/basic/basic_holder.h"(49)
+
+//____________________________________________________________________________
+// IsSimple_
+
+template <typename T> struct IsSimple_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(63)
+
+//____________________________________________________________________________
+// Iter
+
+template <typename TContainer, typename TSpec> class Iter;       	// "projects/library/seqan/basic/basic_iterator_base.h"(54)
+
+//____________________________________________________________________________
+// IterComplementConst
+
+template <typename TIterator> struct IterComplementConst;       	// "projects/library/seqan/basic/basic_iterator_base.h"(66)
+
+//____________________________________________________________________________
+// IterMakeConst
+
+template <typename TIterator> struct IterMakeConst;       	// "projects/library/seqan/basic/basic_iterator_base.h"(93)
+
+//____________________________________________________________________________
+// Iterator
+
+template <typename T, typename TSpec > struct Iterator;       	// "projects/library/seqan/basic/basic_iterator.h"(145)
+
+//____________________________________________________________________________
+// IteratorProxy
+
+template <typename TIterator> struct IteratorProxy;       	// "projects/library/seqan/basic/basic_proxy.h"(79)
+template <typename TIterator> struct IteratorProxy;       	// "projects/library/seqan/basic/basic_proxy.h"(190)
+
+//____________________________________________________________________________
+// Iterator_Default_Imp
+
+template <typename T, typename TSpec> struct Iterator_Default_Imp;       	// "projects/library/seqan/basic/basic_iterator.h"(135)
+
+//____________________________________________________________________________
+// Iupac_
+
+struct Iupac_;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1176)
+
+//____________________________________________________________________________
+// Key
+
+template <typename T > struct Key;       	// "projects/library/seqan/basic/basic_type.h"(383)
+
+//____________________________________________________________________________
+// LENGTH
+
+template <typename T> struct LENGTH;       	// "projects/library/seqan/basic/basic_type.h"(627)
+
+//____________________________________________________________________________
+// Lcs_
+
+struct Lcs_;       	// "projects/library/seqan/basic/basic_tag.h"(172)
+
+//____________________________________________________________________________
+// Length
+
+template <typename T> struct Length;       	// "projects/library/seqan/basic/basic_definition.h"(49)
+
+//____________________________________________________________________________
+// LevenshteinDistance_
+
+struct LevenshteinDistance_;       	// "projects/library/seqan/basic/basic_tag.h"(68)
+
+//____________________________________________________________________________
+// Log2
+
+template <__int64 numerus > struct Log2;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(236)
+
+//____________________________________________________________________________
+// Log2Floor
+
+template <__int64 numerus > struct Log2Floor;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(241)
+
+//____________________________________________________________________________
+// Log2Impl_
+
+template <int BITS_MAX> struct Log2Impl_;       	// "projects/library/seqan/basic/basic_definition.h"(315)
+
+//____________________________________________________________________________
+// LogProb
+
+template <typename TValue , typename TSpec > class LogProb;       	// "projects/library/seqan/basic/basic_logvalue.h"(48)
+template <typename TValue, typename TSpec> class LogProb;       	// "projects/library/seqan/basic/basic_logvalue.h"(54)
+
+//____________________________________________________________________________
+// Loop
+
+template <typename Worker, int I> class Loop;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(191)
+
+//____________________________________________________________________________
+// LoopReverse
+
+template <typename Worker, int I> class LoopReverse;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(214)
+
+//____________________________________________________________________________
+// MakeSigned_
+
+template <typename T> struct MakeSigned_;       	// "projects/library/seqan/basic/basic_definition.h"(265)
+
+//____________________________________________________________________________
+// MakeUnsigned_
+
+template <typename T> struct MakeUnsigned_;       	// "projects/library/seqan/basic/basic_definition.h"(241)
+
+//____________________________________________________________________________
+// MaxValue
+
+template <typename T, typename TParent > struct MaxValue;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(1066)
+
+//____________________________________________________________________________
+// MaximumValueDouble_
+
+template <typename T > struct MaximumValueDouble_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(1005)
+
+//____________________________________________________________________________
+// MaximumValueFloat_
+
+template <typename T > struct MaximumValueFloat_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(1003)
+
+//____________________________________________________________________________
+// MaximumValueSigned_
+
+template <typename T > struct MaximumValueSigned_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(1000)
+
+//____________________________________________________________________________
+// MaximumValueUnsigned_
+
+template <typename T > struct MaximumValueUnsigned_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(998)
+
+//____________________________________________________________________________
+// MemsetConstValueWorker
+
+template <unsigned SIZE, bool direct, unsigned char c> struct MemsetConstValueWorker;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(319)
+
+//____________________________________________________________________________
+// MemsetWorker
+
+template <unsigned SIZE, bool direct> struct MemsetWorker;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(273)
+
+//____________________________________________________________________________
+// MinValue
+
+template <typename T, typename TParent > struct MinValue;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(1098)
+
+//____________________________________________________________________________
+// MinimalCtor_
+
+struct MinimalCtor_;       	// "projects/library/seqan/basic/basic_definition.h"(167)
+
+//____________________________________________________________________________
+// MinimumValueDouble_
+
+template <typename T > struct MinimumValueDouble_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(1015)
+
+//____________________________________________________________________________
+// MinimumValueFloat_
+
+template <typename T > struct MinimumValueFloat_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(1013)
+
+//____________________________________________________________________________
+// MinimumValueSigned_
+
+template <typename T > struct MinimumValueSigned_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(1010)
+
+//____________________________________________________________________________
+// MinimumValueUnsigned_
+
+template <typename T > struct MinimumValueUnsigned_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(1008)
+
+//____________________________________________________________________________
+// Move_
+
+struct Move_;       	// "projects/library/seqan/basic/basic_definition.h"(154)
+
+//____________________________________________________________________________
+// MultiPool
+
+template <typename TParentAllocator , unsigned int BLOCKING_LIMIT > struct MultiPool;       	// "projects/library/seqan/basic/basic_allocator_multipool.h"(63)
+
+//____________________________________________________________________________
+// MyersBitVector_
+
+struct MyersBitVector_;       	// "projects/library/seqan/basic/basic_tag.h"(142)
+
+//____________________________________________________________________________
+// MyersHirschberg_
+
+struct MyersHirschberg_;       	// "projects/library/seqan/basic/basic_tag.h"(152)
+
+//____________________________________________________________________________
+// NeedlemanWunsch_
+
+struct NeedlemanWunsch_;       	// "projects/library/seqan/basic/basic_tag.h"(100)
+
+//____________________________________________________________________________
+// NilCase
+
+struct NilCase;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(142)
+
+//____________________________________________________________________________
+// NonConstPointer_
+
+template <typename T> struct NonConstPointer_;       	// "projects/library/seqan/basic/basic_type.h"(572)
+
+//____________________________________________________________________________
+// NonMinimalCtor_
+
+struct NonMinimalCtor_;       	// "projects/library/seqan/basic/basic_definition.h"(171)
+
+//____________________________________________________________________________
+// Nothing
+
+struct Nothing;       	// "projects/library/seqan/basic/basic_definition.h"(183)
+
+//____________________________________________________________________________
+// Nussinov_
+
+struct Nussinov_;       	// "projects/library/seqan/basic/basic_tag.h"(238)
+
+//____________________________________________________________________________
+// Object
+
+template <typename T> struct Object;       	// "projects/library/seqan/basic/basic_type.h"(403)
+
+//____________________________________________________________________________
+// Or
+
+template <typename TBool1, typename TBool2> struct Or;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(69)
+
+//____________________________________________________________________________
+// Pair
+
+template <typename T1_, typename T2_ , typename TSpec > struct Pair;       	// "projects/library/seqan/basic/basic_aggregates.h"(77)
+
+//____________________________________________________________________________
+// Parameter_
+
+template <typename T> struct Parameter_;       	// "projects/library/seqan/basic/basic_type.h"(443)
+
+//____________________________________________________________________________
+// Pointer_
+
+template <typename T> struct Pointer_;       	// "projects/library/seqan/basic/basic_type.h"(546)
+
+//____________________________________________________________________________
+// Position
+
+template <typename T> struct Position;       	// "projects/library/seqan/basic/basic_type.h"(179)
+
+//____________________________________________________________________________
+// PositionIterator
+
+struct PositionIterator;       	// "projects/library/seqan/basic/basic_iterator_position.h"(41)
+
+//____________________________________________________________________________
+// Power
+
+template <__int64 base, __int64 exponent > struct Power;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(256)
+
+//____________________________________________________________________________
+// ProfileType
+
+template <typename TValue, typename TCount , typename TSpec > class ProfileType;       	// "projects/library/seqan/basic/basic_profchar.h"(46)
+template <typename TValue, typename TCount, typename TSpec> class ProfileType;       	// "projects/library/seqan/basic/basic_profchar.h"(55)
+
+//____________________________________________________________________________
+// Proxy
+
+template <typename TSpec> struct Proxy;       	// "projects/library/seqan/basic/basic_proxy.h"(61)
+template <typename TSpec> struct Proxy;       	// "projects/library/seqan/basic/basic_transport.h"(80)
+
+//____________________________________________________________________________
+// QualityValueSize
+
+template <typename TValue> struct QualityValueSize;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1596)
+
+//____________________________________________________________________________
+// Reference
+
+template <typename T> struct Reference;       	// "projects/library/seqan/basic/basic_type.h"(106)
+
+//____________________________________________________________________________
+// RemoveConst_
+
+template <typename T> struct RemoveConst_;       	// "projects/library/seqan/basic/basic_definition.h"(210)
+
+//____________________________________________________________________________
+// Rna5_
+
+struct Rna5_;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1151)
+
+//____________________________________________________________________________
+// Rna_
+
+struct Rna_;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1126)
+
+//____________________________________________________________________________
+// Rooted_
+
+struct Rooted_;       	// "projects/library/seqan/basic/basic_iterator.h"(61)
+
+//____________________________________________________________________________
+// Simple
+
+struct Simple;       	// "projects/library/seqan/basic/basic_holder.h"(45)
+
+//____________________________________________________________________________
+// SimpleAlloc
+
+template <typename TParentAllocator > struct SimpleAlloc;       	// "projects/library/seqan/basic/basic_allocator_simple.h"(59)
+
+//____________________________________________________________________________
+// SimpleIterator
+
+struct SimpleIterator;       	// "projects/library/seqan/basic/basic_iterator_simple.h"(42)
+
+//____________________________________________________________________________
+// SimpleType
+
+template <typename TValue, typename TSpec> struct SimpleType;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(77)
+
+//____________________________________________________________________________
+// SinglePool
+
+template <size_t SIZE, typename TParentAllocator > struct SinglePool;       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(63)
+
+//____________________________________________________________________________
+// SinglePool2
+
+template <typename TValue, typename TParentAllocator > struct SinglePool2;       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(239)
+
+//____________________________________________________________________________
+// Size
+
+template <typename T> struct Size;       	// "projects/library/seqan/basic/basic_type.h"(129)
+
+//____________________________________________________________________________
+// SmithWatermanClump_
+
+struct SmithWatermanClump_;       	// "projects/library/seqan/basic/basic_tag.h"(214)
+
+//____________________________________________________________________________
+// SmithWaterman_
+
+struct SmithWaterman_;       	// "projects/library/seqan/basic/basic_tag.h"(192)
+
+//____________________________________________________________________________
+// Source
+
+template <typename TSpec > struct Source;       	// "projects/library/seqan/basic/basic_type.h"(419)
+
+//____________________________________________________________________________
+// SourceValue
+
+template <typename T> struct SourceValue;       	// "projects/library/seqan/basic/basic_profchar.h"(129)
+
+//____________________________________________________________________________
+// Spec
+
+template <typename T> struct Spec;       	// "projects/library/seqan/basic/basic_type.h"(220)
+
+//____________________________________________________________________________
+// Standard_
+
+struct Standard_;       	// "projects/library/seqan/basic/basic_iterator.h"(64)
+
+//____________________________________________________________________________
+// StdAllocator
+
+template <typename T, typename TData> struct StdAllocator;       	// "projects/library/seqan/basic/basic_allocator_to_std.h"(178)
+
+//____________________________________________________________________________
+// StdContainerIterator
+
+template <typename TStdContainer> struct StdContainerIterator;       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(80)
+
+//____________________________________________________________________________
+// StdIteratorAdaptor
+
+struct StdIteratorAdaptor;       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(102)
+
+//____________________________________________________________________________
+// Switch
+
+template <int tag,class Case> class Switch;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(154)
+
+//____________________________________________________________________________
+// Tag
+
+template <typename T> struct Tag;       	// "projects/library/seqan/basic/basic_definition.h"(43)
+
+//____________________________________________________________________________
+// TagList
+
+template <typename TTag , typename TSubList > struct TagList;       	// "projects/library/seqan/basic/basic_definition.h"(72)
+
+//____________________________________________________________________________
+// TagSelector
+
+template <typename TTagList > struct TagSelector;       	// "projects/library/seqan/basic/basic_definition.h"(88)
+
+//____________________________________________________________________________
+// ToStdAllocator
+
+template <typename THost, typename TValue> struct ToStdAllocator;       	// "projects/library/seqan/basic/basic_allocator_to_std.h"(61)
+
+//____________________________________________________________________________
+// TranslateTableAAToAscii_
+
+template <typename T > struct TranslateTableAAToAscii_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(489)
+
+//____________________________________________________________________________
+// TranslateTableAsciiToAA_
+
+template <typename T > struct TranslateTableAsciiToAA_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(526)
+
+//____________________________________________________________________________
+// TranslateTableAsciiToDna5_
+
+template <typename T > struct TranslateTableAsciiToDna5_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(200)
+
+//____________________________________________________________________________
+// TranslateTableAsciiToDna_
+
+template <typename T > struct TranslateTableAsciiToDna_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(162)
+
+//____________________________________________________________________________
+// TranslateTableAsciiToIupac_
+
+template <typename T > struct TranslateTableAsciiToIupac_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(311)
+
+//____________________________________________________________________________
+// TranslateTableAsciiToRna5_
+
+template <typename T > struct TranslateTableAsciiToRna5_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(274)
+
+//____________________________________________________________________________
+// TranslateTableAsciiToRna_
+
+template <typename T > struct TranslateTableAsciiToRna_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(237)
+
+//____________________________________________________________________________
+// TranslateTableByteToAA_
+
+template <typename T > struct TranslateTableByteToAA_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(564)
+
+//____________________________________________________________________________
+// TranslateTableByteToDna5_
+
+template <typename T > struct TranslateTableByteToDna5_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(377)
+
+//____________________________________________________________________________
+// TranslateTableByteToDna_
+
+template <typename T > struct TranslateTableByteToDna_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(348)
+
+//____________________________________________________________________________
+// TranslateTableByteToIupac_
+
+template <typename T > struct TranslateTableByteToIupac_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(460)
+
+//____________________________________________________________________________
+// TranslateTableByteToRna5_
+
+template <typename T > struct TranslateTableByteToRna5_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(432)
+
+//____________________________________________________________________________
+// TranslateTableByteToRna_
+
+template <typename T > struct TranslateTableByteToRna_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(404)
+
+//____________________________________________________________________________
+// TranslateTableDna5ToAscii_
+
+template <typename T > struct TranslateTableDna5ToAscii_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(45)
+
+//____________________________________________________________________________
+// TranslateTableDna5ToIupac_
+
+template <typename T > struct TranslateTableDna5ToIupac_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(55)
+
+//____________________________________________________________________________
+// TranslateTableIupacToAscii_
+
+template <typename T > struct TranslateTableIupacToAscii_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(77)
+
+//____________________________________________________________________________
+// TranslateTableIupacToDna5_
+
+template <typename T > struct TranslateTableIupacToDna5_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(134)
+
+//____________________________________________________________________________
+// TranslateTableIupacToDna_
+
+template <typename T > struct TranslateTableIupacToDna_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(105)
+
+//____________________________________________________________________________
+// TranslateTableRna5ToAscii_
+
+template <typename T > struct TranslateTableRna5ToAscii_;       	// "projects/library/seqan/basic/basic_alphabet_simple_tabs.h"(67)
+
+//____________________________________________________________________________
+// Triple
+
+template <typename T1_, typename T2_ , typename T3_ , typename TSpec > struct Triple;       	// "projects/library/seqan/basic/basic_aggregates.h"(242)
+
+//____________________________________________________________________________
+// Tristate
+
+struct Tristate;       	// "projects/library/seqan/basic/basic_holder.h"(46)
+
+//____________________________________________________________________________
+// Tristate2
+
+struct Tristate2;       	// "projects/library/seqan/basic/basic_holder.h"(1309)
+
+//____________________________________________________________________________
+// True
+
+struct True;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(48)
+
+//____________________________________________________________________________
+// Tuple
+
+template <typename T_, unsigned _size, typename TSpec > struct Tuple;       	// "projects/library/seqan/basic/basic_aggregates.h"(370)
+
+//____________________________________________________________________________
+// TupleShiftLeftWorker_
+
+struct TupleShiftLeftWorker_;       	// "projects/library/seqan/basic/basic_aggregates.h"(585)
+
+//____________________________________________________________________________
+// TupleShiftRightWorker_
+
+struct TupleShiftRightWorker_;       	// "projects/library/seqan/basic/basic_aggregates.h"(592)
+
+//____________________________________________________________________________
+// Value
+
+template <typename T, const int i > struct Value;       	// "projects/library/seqan/basic/basic_type.h"(56)
+
+//____________________________________________________________________________
+// ValueConstructorProxy_
+
+struct ValueConstructorProxy_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(131)
+
+//____________________________________________________________________________
+// ValueConstructor_
+
+struct ValueConstructor_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(98)
+
+//____________________________________________________________________________
+// ValueDestructorProxy_
+
+struct ValueDestructorProxy_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(161)
+
+//____________________________________________________________________________
+// ValueDestructor_
+
+struct ValueDestructor_;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(145)
+
+//____________________________________________________________________________
+// ValueSize
+
+template <typename T> struct ValueSize;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(982)
+
+//____________________________________________________________________________
+// VertexDescriptor
+
+template <typename T> struct VertexDescriptor;       	// "projects/library/seqan/basic/basic_type.h"(336)
+
+//____________________________________________________________________________
+// VoidHolder
+
+class VoidHolder;       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(42)
+
+//____________________________________________________________________________
+// VolatilePtr
+
+template <typename Type > struct VolatilePtr;       	// "projects/library/seqan/basic/basic_volatile_ptr.h"(52)
+
+//____________________________________________________________________________
+// WEIGHT
+
+template <typename T> struct WEIGHT;       	// "projects/library/seqan/basic/basic_type.h"(650)
+
+//____________________________________________________________________________
+// WorkerNothing
+
+struct WorkerNothing;       	// "projects/library/seqan/basic/basic_metaprogramming.h"(185)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AminoAcid
+
+typedef SimpleType<unsigned char, AminoAcid_> AminoAcid;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1205)
+
+//____________________________________________________________________________
+// Ascii
+
+typedef char Ascii;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(77)
+
+//____________________________________________________________________________
+// BandedGotoh
+
+typedef Tag<BandedGotoh_> BandedGotoh;       	// "projects/library/seqan/basic/basic_tag.h"(132)
+
+//____________________________________________________________________________
+// BandedNeedlemanWunsch
+
+typedef Tag<BandedNeedlemanWunsch_> BandedNeedlemanWunsch;       	// "projects/library/seqan/basic/basic_tag.h"(111)
+
+//____________________________________________________________________________
+// BandedSmithWaterman
+
+typedef Tag<BandedSmithWaterman_> const BandedSmithWaterman;       	// "projects/library/seqan/basic/basic_tag.h"(203)
+
+//____________________________________________________________________________
+// BandedSmithWatermanClump
+
+typedef Tag<BandedWatermanEggert_> const BandedSmithWatermanClump;       	// "projects/library/seqan/basic/basic_tag.h"(228)
+
+//____________________________________________________________________________
+// BandedWatermanEggert
+
+typedef Tag<BandedWatermanEggert_> const BandedWatermanEggert;       	// "projects/library/seqan/basic/basic_tag.h"(229)
+
+//____________________________________________________________________________
+// Blat
+
+typedef Tag<Blat_> const Blat;       	// "projects/library/seqan/basic/basic_tag.h"(244)
+
+//____________________________________________________________________________
+// Compressed
+
+typedef Tag<Compressed_> Compressed;       	// "projects/library/seqan/basic/basic_aggregates.h"(42)
+
+//____________________________________________________________________________
+// Default
+
+typedef Tag<Default_> const Default;       	// "projects/library/seqan/basic/basic_definition.h"(134)
+
+//____________________________________________________________________________
+// Dna
+
+typedef SimpleType<unsigned char,Dna_> Dna;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1077)
+
+//____________________________________________________________________________
+// Dna5
+
+typedef SimpleType<unsigned char, Dna5_> Dna5;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1102)
+
+//____________________________________________________________________________
+// Dna5Q
+
+typedef SimpleType <unsigned char, Dna5Q_> Dna5Q;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1581)
+
+//____________________________________________________________________________
+// DnaQ
+
+typedef SimpleType <unsigned char, DnaQ_> DnaQ;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1551)
+
+//____________________________________________________________________________
+// DotDrawing
+
+typedef Tag<DotDrawing_> const DotDrawing;       	// "projects/library/seqan/basic/basic_tag.h"(50)
+
+//____________________________________________________________________________
+// EditDistance
+
+typedef Tag<LevenshteinDistance_> EditDistance;       	// "projects/library/seqan/basic/basic_tag.h"(72)
+
+//____________________________________________________________________________
+// GoEnd
+
+typedef Tag<GoEnd_> const GoEnd;       	// "projects/library/seqan/basic/basic_definition.h"(161)
+
+//____________________________________________________________________________
+// Gotoh
+
+typedef Tag<Gotoh_> Gotoh;       	// "projects/library/seqan/basic/basic_tag.h"(122)
+
+//____________________________________________________________________________
+// HammingDistance
+
+typedef Tag<HammingDistance_> HammingDistance;       	// "projects/library/seqan/basic/basic_tag.h"(70)
+
+//____________________________________________________________________________
+// Hirschberg
+
+typedef Tag<Hirschberg_> const Hirschberg;       	// "projects/library/seqan/basic/basic_tag.h"(163)
+
+//____________________________________________________________________________
+// Iupac
+
+typedef SimpleType<unsigned char, Iupac_> Iupac;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1177)
+
+//____________________________________________________________________________
+// Lcs
+
+typedef Tag<Lcs_> const Lcs;       	// "projects/library/seqan/basic/basic_tag.h"(173)
+
+//____________________________________________________________________________
+// LevenshteinDistance
+
+typedef Tag<LevenshteinDistance_> LevenshteinDistance;       	// "projects/library/seqan/basic/basic_tag.h"(71)
+
+//____________________________________________________________________________
+// MinimalCtor
+
+typedef Tag<MinimalCtor_> const MinimalCtor;       	// "projects/library/seqan/basic/basic_definition.h"(168)
+
+//____________________________________________________________________________
+// Move
+
+typedef Tag<Move_> const Move;       	// "projects/library/seqan/basic/basic_definition.h"(155)
+
+//____________________________________________________________________________
+// MyersBitVector
+
+typedef Tag<MyersBitVector_> const MyersBitVector;       	// "projects/library/seqan/basic/basic_tag.h"(143)
+
+//____________________________________________________________________________
+// MyersHirschberg
+
+typedef Tag<MyersHirschberg_> const MyersHirschberg;       	// "projects/library/seqan/basic/basic_tag.h"(153)
+
+//____________________________________________________________________________
+// NeedlemanWunsch
+
+typedef Tag<NeedlemanWunsch_> NeedlemanWunsch;       	// "projects/library/seqan/basic/basic_tag.h"(101)
+
+//____________________________________________________________________________
+// NonMinimalCtor
+
+typedef Tag<NonMinimalCtor_> const NonMinimalCtor;       	// "projects/library/seqan/basic/basic_definition.h"(172)
+
+//____________________________________________________________________________
+// Nussinov
+
+typedef Tag<Nussinov_> const Nussinov;       	// "projects/library/seqan/basic/basic_tag.h"(239)
+
+//____________________________________________________________________________
+// PoolAllocator
+
+typedef Allocator<MultiPool<Allocator<SimpleAlloc<Default> >, 0x100> > PoolAllocator;       	// "projects/library/seqan/basic/basic_allocator_multipool.h"(67)
+
+//____________________________________________________________________________
+// Rna
+
+typedef SimpleType<unsigned char,Rna_> Rna;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1127)
+
+//____________________________________________________________________________
+// Rna5
+
+typedef SimpleType<unsigned char, Rna5_> Rna5;       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1152)
+
+//____________________________________________________________________________
+// Rooted
+
+typedef Tag<Rooted_> const Rooted;       	// "projects/library/seqan/basic/basic_iterator.h"(62)
+
+//____________________________________________________________________________
+// SimpleAllocator
+
+typedef Allocator<SimpleAlloc<Default> > SimpleAllocator;       	// "projects/library/seqan/basic/basic_allocator_simple.h"(64)
+
+//____________________________________________________________________________
+// SmithWaterman
+
+typedef Tag<SmithWaterman_> const SmithWaterman;       	// "projects/library/seqan/basic/basic_tag.h"(193)
+
+//____________________________________________________________________________
+// SmithWatermanClump
+
+typedef Tag<SmithWatermanClump_> const SmithWatermanClump;       	// "projects/library/seqan/basic/basic_tag.h"(215)
+
+//____________________________________________________________________________
+// Standard
+
+typedef Tag<Standard_> const Standard;       	// "projects/library/seqan/basic/basic_iterator.h"(65)
+
+//____________________________________________________________________________
+// TagAllocateStorage
+
+typedef Tag<AllocateStorage_> const TagAllocateStorage;       	// "projects/library/seqan/basic/basic_allocator_interface.h"(98)
+
+//____________________________________________________________________________
+// TagAllocateTemp
+
+typedef Tag<AllocateTemp_> const TagAllocateTemp;       	// "projects/library/seqan/basic/basic_allocator_interface.h"(95)
+
+//____________________________________________________________________________
+// TagAllocateUnspecified
+
+typedef Tag<AllocateUnspecified_> const TagAllocateUnspecified;       	// "projects/library/seqan/basic/basic_allocator_interface.h"(92)
+
+//____________________________________________________________________________
+// Unicode
+
+typedef wchar_t Unicode;       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(79)
+
+//____________________________________________________________________________
+// WatermanEggert
+
+typedef Tag<SmithWatermanClump_> const WatermanEggert;       	// "projects/library/seqan/basic/basic_tag.h"(216)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+namespace debug {
+
+//____________________________________________________________________________
+// Error
+
+template <typename TAction> void Error(const char * file, int line, const char * comment);       	// "projects/library/seqan/basic/basic_debug.h"(266)
+template <typename TAction> void Error(const char * file, int line);       	// "projects/library/seqan/basic/basic_debug.h"(273)
+
+//____________________________________________________________________________
+// Message
+
+template <typename TAction> void Message(const char * file, int line, const char * comment);       	// "projects/library/seqan/basic/basic_debug.h"(282)
+template <typename TAction> void Message(const char * file, int line);       	// "projects/library/seqan/basic/basic_debug.h"(288)
+
+//____________________________________________________________________________
+// Result
+
+template <typename TAction> void Result(const char * file, int line, const char * comment);       	// "projects/library/seqan/basic/basic_debug.h"(297)
+template <typename TAction> void Result(const char * file, int line);       	// "projects/library/seqan/basic/basic_debug.h"(303)
+
+//____________________________________________________________________________
+// checkpoint
+
+inline bool checkpoint(unsigned int line, char const* file);       	// "projects/library/seqan/basic/basic_debug.h"(355)
+
+//____________________________________________________________________________
+// testCheckpoint
+
+inline void testCheckpoint(char const* file, unsigned int line);       	// "projects/library/seqan/basic/basic_debug.h"(371)
+
+//____________________________________________________________________________
+// verifyCheckpoints
+
+inline void verifyCheckpoints(char const* file);       	// "projects/library/seqan/basic/basic_debug.h"(379)
+
+} //namespace debug
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// TValue
+
+template <typename TValue, size_t I> inline void setValue(Holder<TValue *, Tristate> & me, TValue (& value_)[I]);       	// "projects/library/seqan/basic/basic_holder.h"(922)
+template <typename TValue, size_t I> inline void setValue(Holder<TValue * const, Tristate> & me, TValue (& value_)[I]);       	// "projects/library/seqan/basic/basic_holder.h"(944)
+
+//____________________________________________________________________________
+// _abs
+
+template <typename T> inline T _abs(T const & x);       	// "projects/library/seqan/basic/basic_definition.h"(408)
+
+//____________________________________________________________________________
+// _allocatorBlockNumber
+
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT> inline unsigned int _allocatorBlockNumber(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > &, size_t size_);       	// "projects/library/seqan/basic/basic_allocator_multipool.h"(153)
+
+//____________________________________________________________________________
+// _arrayClearSpaceDefault
+
+template <typename TIterator> void _arrayClearSpaceDefault(TIterator array_begin, size_t array_length, size_t keep_from, size_t move_to);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(814)
+
+//____________________________________________________________________________
+// _arrayClearSpacePointer
+
+template <typename TValue> inline void _arrayClearSpacePointer(TValue * array_begin, size_t array_length, size_t keep_from, size_t move_to, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(365)
+template <typename TValue> inline void _arrayClearSpacePointer(TValue * array_begin, size_t array_length, size_t keep_from, size_t move_to, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(377)
+
+//____________________________________________________________________________
+// _arrayConstructCopyDefault
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void _arrayConstructCopyDefault(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(379)
+
+//____________________________________________________________________________
+// _arrayConstructCopyPointer
+
+template <typename TValueSource, typename TValueTarget> inline void _arrayConstructCopyPointer(TValueSource * source_begin, TValueSource * source_end, TValueTarget * target_begin, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(112)
+template <typename TValueSource, typename TValueTarget> inline void _arrayConstructCopyPointer(TValueSource * source_begin, TValueSource * source_end, TValueTarget const* target_begin, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(122)
+template <typename TValueSource, typename TValueTarget> inline void _arrayConstructCopyPointer(TValueSource * source_begin, TValueSource * source_end, TValueTarget * target_begin, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(133)
+
+//____________________________________________________________________________
+// _arrayConstructDefault
+
+template <typename TIterator1, typename TIterator2> inline void _arrayConstructDefault(TIterator1 begin_, TIterator2 end_);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(309)
+template <typename TIterator1, typename TIterator2, typename TParam> inline void _arrayConstructDefault(TIterator1 begin_, TIterator2 end_, TParam const & param_);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(333)
+
+//____________________________________________________________________________
+// _arrayConstructMoveDefault
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void _arrayConstructMoveDefault(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(428)
+
+//____________________________________________________________________________
+// _arrayConstructMovePointer
+
+template <typename TValue> inline void _arrayConstructMovePointer(TValue * source_begin, TValue * source_end, TValue * target_begin, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(157)
+template <typename TValue> inline void _arrayConstructMovePointer(TValue * source_begin, TValue * source_end, TValue * target_begin, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(167)
+
+//____________________________________________________________________________
+// _arrayConstructPointer
+
+template <typename TIterator> inline void _arrayConstructPointer(TIterator, TIterator, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(48)
+template <typename TIterator> inline void _arrayConstructPointer(TIterator begin_, TIterator end_, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(57)
+template <typename TIterator, typename TParam> inline void _arrayConstructPointer(TIterator begin_, TIterator end_, TParam const & param_, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(78)
+template <typename TIterator, typename TParam> inline void _arrayConstructPointer(TIterator begin_, TIterator end_, TParam const & param_, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(88)
+
+//____________________________________________________________________________
+// _arrayCopyBackwardDefault
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void _arrayCopyBackwardDefault(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(582)
+
+//____________________________________________________________________________
+// _arrayCopyBackwardPointer
+
+template <typename TValue> inline void _arrayCopyBackwardPointer(TValue * source_begin, TValue * source_end, TValue * target_begin, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(262)
+template <typename TValue> inline void _arrayCopyBackwardPointer(TValue * source_begin, TValue * source_end, TValue * target_begin, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(272)
+
+//____________________________________________________________________________
+// _arrayCopyForwardDefault
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void _arrayCopyForwardDefault(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(538)
+
+//____________________________________________________________________________
+// _arrayCopyForwardPointer
+
+template <typename TValue> inline void _arrayCopyForwardPointer(TValue * source_begin, TValue * source_end, TValue * target_begin, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(228)
+template <typename TValue> inline void _arrayCopyForwardPointer(TValue * source_begin, TValue * source_end, TValue * target_begin, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(238)
+
+//____________________________________________________________________________
+// _arrayDestructDefault
+
+template <typename TIterator1, typename TIterator2> inline void _arrayDestructDefault(TIterator1 begin_, TIterator2 end_);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(468)
+
+//____________________________________________________________________________
+// _arrayDestructPointer
+
+template <typename TValue> inline void _arrayDestructPointer(TValue * , TValue * , True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(190)
+template <typename TValue> inline void _arrayDestructPointer(TValue * begin_, TValue * end_, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(199)
+
+//____________________________________________________________________________
+// _arrayMoveBackwardDefault
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void _arrayMoveBackwardDefault(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(717)
+
+//____________________________________________________________________________
+// _arrayMoveBackwardPointer
+
+template <typename TValue> inline void _arrayMoveBackwardPointer(TValue * source_begin, TValue * source_end, TValue * target_begin, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(330)
+template <typename TValue> inline void _arrayMoveBackwardPointer(TValue * source_begin, TValue * source_end, TValue * target_begin, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(340)
+
+//____________________________________________________________________________
+// _arrayMoveForwardDefault
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void _arrayMoveForwardDefault(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(667)
+
+//____________________________________________________________________________
+// _arrayMoveForwardPointer
+
+template <typename TValue> inline void _arrayMoveForwardPointer(TValue * source_begin, TValue * source_end, TValue * target_begin, True);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(296)
+template <typename TValue> inline void _arrayMoveForwardPointer(TValue * source_begin, TValue * source_end, TValue * target_begin, False);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(306)
+
+//____________________________________________________________________________
+// _dataValue
+
+template <typename TValue> inline typename Reference<Holder<TValue, Tristate> >::Type _dataValue(Holder<TValue, Tristate> & me);       	// "projects/library/seqan/basic/basic_holder.h"(479)
+template <typename TValue> inline typename Reference<Holder<TValue, Tristate> const>::Type _dataValue(Holder<TValue, Tristate> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(485)
+template <typename TValue> inline typename Reference<Holder<TValue *, Tristate> >::Type _dataValue(Holder<TValue *, Tristate> & me);       	// "projects/library/seqan/basic/basic_holder.h"(492)
+template <typename TValue> inline typename Reference<Holder<TValue *, Tristate> const>::Type _dataValue(Holder<TValue *, Tristate> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(498)
+template <typename TValue> inline typename Reference<Holder<TValue * const, Tristate> >::Type _dataValue(Holder<TValue * const, Tristate> & me);       	// "projects/library/seqan/basic/basic_holder.h"(505)
+template <typename TValue> inline typename Reference<Holder<TValue * const, Tristate> const>::Type _dataValue(Holder<TValue * const, Tristate> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(511)
+
+//____________________________________________________________________________
+// _getMaxIndex
+
+template <typename TSourceValue, typename TSourceCount, typename TSourceSpec> inline typename Size<ProfileType<TSourceValue, TSourceCount, TSourceSpec> const >::Type _getMaxIndex(ProfileType<TSourceValue, TSourceCount, TSourceSpec> const & source);       	// "projects/library/seqan/basic/basic_profchar.h"(162)
+
+//____________________________________________________________________________
+// _holderAllocateObject
+
+template <typename THolder, typename TValue> inline typename Value<THolder, 0>::Type * _holderAllocateObject(THolder & me, TValue const & data);       	// "projects/library/seqan/basic/basic_holder.h"(549)
+
+//____________________________________________________________________________
+// _holderAllocatePointer
+
+template <typename THolder, typename TValue> inline typename Value<THolder, 0>::Type _holderAllocatePointer(THolder & me, TValue * data, True);       	// "projects/library/seqan/basic/basic_holder.h"(559)
+template <typename THolder, typename TValue> inline typename Value<THolder, 0>::Type _holderAllocatePointer(THolder & , TValue * data, False);       	// "projects/library/seqan/basic/basic_holder.h"(570)
+template <typename THolder, typename TValue> inline typename Value<THolder, 0>::Type _holderAllocatePointer(THolder & me, TValue * data);       	// "projects/library/seqan/basic/basic_holder.h"(577)
+
+//____________________________________________________________________________
+// _holderDeallocate
+
+template <typename THolder, typename TValue> inline void _holderDeallocate(THolder & me, TValue const & data);       	// "projects/library/seqan/basic/basic_holder.h"(586)
+template <typename THolder, typename TValue> inline void _holderDeallocate(THolder & me, TValue * data, True);       	// "projects/library/seqan/basic/basic_holder.h"(594)
+template <typename THolder, typename TValue> inline void _holderDeallocate(THolder & , TValue * , False);       	// "projects/library/seqan/basic/basic_holder.h"(603)
+template <typename THolder, typename TValue> inline void _holderDeallocate(THolder & me, TValue * data);       	// "projects/library/seqan/basic/basic_holder.h"(609)
+
+//____________________________________________________________________________
+// _intPow
+
+template <typename TValue, typename TExponent> inline TValue _intPow(TValue a, TExponent b);       	// "projects/library/seqan/basic/basic_definition.h"(357)
+
+//____________________________________________________________________________
+// _isSameType
+
+template <typename T1, typename T2> inline bool _isSameType();       	// "projects/library/seqan/basic/basic_definition.h"(420)
+
+//____________________________________________________________________________
+// _max
+
+template <typename Ty_> inline const Ty_& _max(const Ty_& _Left, const Ty_& Right_);       	// "projects/library/seqan/basic/basic_definition.h"(390)
+template <typename Tx_, typename Ty_> inline Tx_ _max(const Tx_& _Left, const Ty_& Right_);       	// "projects/library/seqan/basic/basic_definition.h"(399)
+
+//____________________________________________________________________________
+// _min
+
+template <typename Tx_> inline const Tx_& _min(const Tx_& _Left, const Tx_& Right_);       	// "projects/library/seqan/basic/basic_definition.h"(375)
+template <typename Tx_, typename Ty_> inline Tx_ _min(const Tx_& _Left, const Ty_& Right_);       	// "projects/library/seqan/basic/basic_definition.h"(384)
+
+//____________________________________________________________________________
+// _toParameter
+
+template <typename T> typename Parameter_<T>::Type _toParameter(T * _object);       	// "projects/library/seqan/basic/basic_type.h"(474)
+template <typename T> typename Parameter_<T>::Type _toParameter(T _object);       	// "projects/library/seqan/basic/basic_type.h"(481)
+
+//____________________________________________________________________________
+// _toPointer
+
+template <typename T> typename NonConstPointer_<T>::Type _toPointer(T & _object);       	// "projects/library/seqan/basic/basic_type.h"(593)
+template <typename T> typename NonConstPointer_<T const>::Type _toPointer(T const & _object);       	// "projects/library/seqan/basic/basic_type.h"(600)
+template <typename T> typename NonConstPointer_<T *>::Type _toPointer(T * _object);       	// "projects/library/seqan/basic/basic_type.h"(608)
+
+//____________________________________________________________________________
+// allocate
+
+template <size_t SIZE, size_t MAX_COUNT, typename TParentAllocator, typename TValue, typename TSize, typename TUsage> inline void allocate(Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > & me, TValue * & data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(186)
+template <typename TValue, size_t MAX_COUNT, typename TParentAllocator, typename TValue2, typename TSize, typename TUsage> inline void allocate(Allocator<ChunkPool2<TValue, MAX_COUNT, TParentAllocator> > & me, TValue2 * & data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(315)
+template <size_t SIZE, typename TParentAllocator, typename TValue, typename TSize, typename TUsage> inline void allocate(Allocator<SinglePool<SIZE, TParentAllocator> > & me, TValue * & data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(175)
+template <typename TValue, typename TParentAllocator, typename TValue2, typename TSize, typename TUsage> inline void allocate(Allocator<SinglePool2<TValue, TParentAllocator> > & me, TValue2 * & data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(292)
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT, typename TValue, typename TSize, typename TUsage> inline void allocate(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > & me, TValue * & data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_multipool.h"(178)
+template <typename T, typename TValue, typename TSize> inline void allocate(T const & me, TValue * & data, TSize count);       	// "projects/library/seqan/basic/basic_allocator_interface.h"(143)
+template <typename T, typename TValue, typename TSize> inline void allocate(T & me, TValue * & data, TSize count);       	// "projects/library/seqan/basic/basic_allocator_interface.h"(151)
+template <typename T, typename TValue, typename TSize, typename TUsage> inline void allocate(T const &, TValue * & data, TSize count, Tag<TUsage> const);       	// "projects/library/seqan/basic/basic_allocator_interface.h"(161)
+template <typename T, typename TValue, typename TSize, typename TUsage> inline void allocate(T &, TValue * & data, TSize count, Tag<TUsage> const);       	// "projects/library/seqan/basic/basic_allocator_interface.h"(187)
+template <typename TParentAllocator, typename TValue, typename TSize, typename TUsage> inline void allocate(Allocator<SimpleAlloc<TParentAllocator> > & me, TValue * & data, TSize count, Tag<TUsage> const);       	// "projects/library/seqan/basic/basic_allocator_simple.h"(160)
+
+//____________________________________________________________________________
+// arrayClearSpace
+
+template <typename TIterator> void arrayClearSpace(TIterator array_begin, size_t array_length, size_t keep_from, size_t move_to);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(858)
+template <typename TValue> void arrayClearSpace(TValue * array_begin, size_t array_length, size_t keep_from, size_t move_to);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(385)
+
+//____________________________________________________________________________
+// arrayConstruct
+
+template <typename TIterator1, typename TIterator2> inline void arrayConstruct(TIterator1 begin_, TIterator2 end_);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(321)
+template <typename TIterator1, typename TIterator2, typename TParam> inline void arrayConstruct(TIterator1 begin_, TIterator2 end_, TParam const & param_);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(346)
+template <typename TValue> inline void arrayConstruct(TValue * begin_, TValue * end_);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(65)
+template <typename TValue, typename TParam> inline void arrayConstruct(TValue * begin_, TValue * end_, TParam const & param_);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(97)
+
+//____________________________________________________________________________
+// arrayConstructCopy
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void arrayConstructCopy(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(394)
+template <typename TValueSource, typename TValueTarget> inline void arrayConstructCopy(TValueSource * source_begin, TValueSource * source_end, TValueTarget * target_begin);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(142)
+
+//____________________________________________________________________________
+// arrayConstructMove
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void arrayConstructMove(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(443)
+template <typename TValue> inline void arrayConstructMove(TValue * source_begin, TValue * source_end, TValue * target_begin);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(176)
+
+//____________________________________________________________________________
+// arrayCopy
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void arrayCopy(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(627)
+
+//____________________________________________________________________________
+// arrayCopyBackward
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void arrayCopyBackward(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(591)
+template <typename TValue> inline void arrayCopyBackward(TValue * source_begin, TValue * source_end, TValue * target_begin);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(281)
+
+//____________________________________________________________________________
+// arrayCopyForward
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void arrayCopyForward(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(547)
+template <typename TValue> inline void arrayCopyForward(TValue * source_begin, TValue * source_end, TValue * target_begin);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(247)
+
+//____________________________________________________________________________
+// arrayDestruct
+
+template <typename TIterator1, typename TIterator2> inline void arrayDestruct(TIterator1 begin_, TIterator2 end_);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(480)
+template <typename TValue> inline void arrayDestruct(TValue * begin_, TValue * end_);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(207)
+
+//____________________________________________________________________________
+// arrayFill
+
+template <typename TIterator1, typename TIterator2, typename TValue> inline void arrayFill(TIterator1 begin_, TIterator2 end_, TValue const & value);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(507)
+
+//____________________________________________________________________________
+// arrayMove
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void arrayMove(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(771)
+
+//____________________________________________________________________________
+// arrayMoveBackward
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void arrayMoveBackward(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(732)
+template <typename TValue> inline void arrayMoveBackward(TValue * source_begin, TValue * source_end, TValue * target_begin);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(349)
+
+//____________________________________________________________________________
+// arrayMoveForward
+
+template <typename TTarget, typename TSource1, typename TSource2> inline void arrayMoveForward(TSource1 source_begin, TSource2 source_end, TTarget target_begin);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(681)
+template <typename TValue> inline void arrayMoveForward(TValue * source_begin, TValue * source_end, TValue * target_begin);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(315)
+
+//____________________________________________________________________________
+// assign
+
+template <typename TTargetContainer, typename TIterator, typename TSpec, typename TSource> inline void assign(Iter<TTargetContainer, AdaptorIterator<TIterator, TSpec> > & target, TSource const & source);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(577)
+template <typename TValue> inline void assign(VoidHolder & me, TValue const & val);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(200)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TSourceCount, typename TSourceSpec> inline void assign(SimpleType<TTargetValue, TTargetSpec> & target, ProfileType<TSourceValue, TSourceCount, TSourceSpec> const & source);       	// "projects/library/seqan/basic/basic_profchar.h"(183)
+template <typename TTarget, typename TSource> inline void assign(TTarget & target, TSource & source);       	// "projects/library/seqan/basic/basic_transport.h"(65)
+template <typename TTarget, typename TSource> inline void assign(TTarget & target, TSource const & source);       	// "projects/library/seqan/basic/basic_transport.h"(73)
+template <typename TTargetSpec, typename TSource> inline void assign(Proxy<TTargetSpec> & target, TSource & source);       	// "projects/library/seqan/basic/basic_transport.h"(86)
+template <typename TTargetSpec, typename TSource> inline void assign(Proxy<TTargetSpec> & target, TSource const & source);       	// "projects/library/seqan/basic/basic_transport.h"(95)
+template <typename TValue> inline void assign(Holder<TValue, Tristate> & target_, Holder<TValue, Tristate> const & source_);       	// "projects/library/seqan/basic/basic_holder.h"(1062)
+template <typename TValue> inline void assign(Holder<TValue, Simple> & target_, Holder<TValue, Simple> const & source_);       	// "projects/library/seqan/basic/basic_holder.h"(1293)
+template <typename TValue> inline void assign(Holder<TValue, Tristate2> & target_, Holder<TValue, Tristate2> const & source_);       	// "projects/library/seqan/basic/basic_holder.h"(1609)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TSourceSpec> inline void assign(SimpleType<TTargetValue, TTargetSpec> & target, SimpleType<TSourceValue, TSourceSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(323)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TSourceSpec> inline void assign(SimpleType<TTargetValue, TTargetSpec> & target, SimpleType<TSourceValue, TSourceSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(331)
+template <typename TTargetValue, typename TTargetSpec, typename TSource> inline void assign(SimpleType<TTargetValue, TTargetSpec> & target, TSource & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(342)
+template <typename TTargetValue, typename TTargetSpec, typename TSource> inline void assign(SimpleType<TTargetValue, TTargetSpec> & target, TSource const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(350)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceSpec> inline void assign(SimpleType<TTargetValue, TTargetSpec> & target, Proxy<TSourceSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(363)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceSpec> inline void assign(SimpleType<TTargetValue, TTargetSpec> & target, Proxy<TSourceSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(372)
+template <typename TValue, typename TSpec> inline void assign(__int64 & c_target, SimpleType<TValue, TSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(387)
+template <typename TValue, typename TSpec> inline void assign(__int64 & c_target, SimpleType<TValue, TSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(395)
+template <typename TValue, typename TSpec> inline void assign(__uint64 & c_target, SimpleType<TValue, TSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(405)
+template <typename TValue, typename TSpec> inline void assign(__uint64 & c_target, SimpleType<TValue, TSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(413)
+template <typename TValue, typename TSpec> inline void assign(int & c_target, SimpleType<TValue, TSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(423)
+template <typename TValue, typename TSpec> inline void assign(int & c_target, SimpleType<TValue, TSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(431)
+template <typename TValue, typename TSpec> inline void assign(unsigned int & c_target, SimpleType<TValue, TSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(441)
+template <typename TValue, typename TSpec> inline void assign(unsigned int & c_target, SimpleType<TValue, TSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(449)
+template <typename TValue, typename TSpec> inline void assign(short & c_target, SimpleType<TValue, TSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(459)
+template <typename TValue, typename TSpec> inline void assign(short & c_target, SimpleType<TValue, TSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(467)
+template <typename TValue, typename TSpec> inline void assign(unsigned short & c_target, SimpleType<TValue, TSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(477)
+template <typename TValue, typename TSpec> inline void assign(unsigned short & c_target, SimpleType<TValue, TSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(485)
+template <typename TValue, typename TSpec> inline void assign(char & c_target, SimpleType<TValue, TSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(495)
+template <typename TValue, typename TSpec> inline void assign(char & c_target, SimpleType<TValue, TSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(503)
+template <typename TValue, typename TSpec> inline void assign(signed char & c_target, SimpleType<TValue, TSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(513)
+template <typename TValue, typename TSpec> inline void assign(signed char & c_target, SimpleType<TValue, TSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(521)
+template <typename TValue, typename TSpec> inline void assign(unsigned char & c_target, SimpleType<TValue, TSpec> & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(531)
+template <typename TValue, typename TSpec> inline void assign(unsigned char & c_target, SimpleType<TValue, TSpec> const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(539)
+inline void assign(Ascii & c_target, Dna const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1238)
+inline void assign(Ascii & c_target, Dna5 const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1246)
+inline void assign(Ascii& target, Rna const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1254)
+inline void assign(Ascii& target, Rna5 const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1262)
+inline void assign(Ascii & c_target, Iupac const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1269)
+inline void assign(Ascii & c_target, AminoAcid const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1276)
+inline void assign(Dna & target, __uint8 c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1287)
+inline void assign(Dna & target, Ascii c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1296)
+inline void assign(Dna & target, Unicode c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1305)
+inline void assign(Dna & target, Dna5 const & c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1314)
+inline void assign(Dna & target, Iupac const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1323)
+inline void assign(Dna5 & target, __uint8 c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1334)
+inline void assign(Dna5 & target, Ascii c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1343)
+inline void assign(Dna5 & target, Unicode c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1352)
+inline void assign(Dna5 & target, Iupac const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1361)
+inline void assign(Dna5 & target, Dna const & c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1370)
+inline void assign(Rna & target, __uint8 c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1381)
+inline void assign(Rna & target, Ascii c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1390)
+inline void assign(Rna & target, Unicode c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1399)
+inline void assign(Rna & target, Rna5 const & c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1408)
+inline void assign(Rna5 & target, __uint8 c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1419)
+inline void assign(Rna5 & target, Ascii c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1428)
+inline void assign(Rna5 & target, Unicode c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1437)
+inline void assign(Rna5 & target, Rna const & c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1446)
+inline void assign(Iupac & target, __uint8 c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1457)
+inline void assign(Iupac & target, Ascii c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1466)
+inline void assign(Iupac & target, Unicode c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1475)
+inline void assign(Iupac & target, Dna const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1482)
+inline void assign(Iupac & target, Dna5 const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1489)
+inline void assign(AminoAcid & target, __uint8 c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1500)
+inline void assign(AminoAcid & target, Ascii c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1509)
+inline void assign(AminoAcid & target, Unicode c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1518)
+inline void assign(DnaQ & target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1646)
+inline void assign(DnaQ & target, Dna const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1680)
+inline void assign(Dna5Q & target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1691)
+inline void assign(Dna5 & target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1701)
+inline void assign(Dna5Q & target, Dna5 const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1733)
+inline void assign(Dna & target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1753)
+inline void assign(DnaQ & target, Iupac const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1764)
+inline void assign(DnaQ & target, Dna5 const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1775)
+inline void assign(DnaQ & target, __uint8 c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1783)
+inline void assign(DnaQ & target, Ascii c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1792)
+inline void assign(DnaQ & target, Unicode c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1801)
+inline void assign(DnaQ & target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1809)
+template <typename TSource> inline void assign(DnaQ & target, TSource const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1817)
+inline void assign(Dna5Q & target, Dna const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1827)
+inline void assign(Dna & target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1838)
+inline void assign(Dna5 & target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1847)
+inline void assign(Dna5Q & target, __uint8 c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1858)
+inline void assign(Dna5Q & target, Ascii c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1867)
+inline void assign(Dna5Q & target, Unicode c_source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1876)
+inline void assign(Dna5Q & target, Iupac const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1885)
+inline void assign(Dna5Q & target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1892)
+template <typename TSource> inline void assign(Dna5Q & target, TSource const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1899)
+inline void assign(__int64 & c_target, DnaQ & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1914)
+inline void assign(__int64 & c_target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1922)
+inline void assign(__uint64 & c_target, DnaQ & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1932)
+inline void assign(__uint64 & c_target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1940)
+inline void assign(int & c_target, DnaQ & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1950)
+inline void assign(int & c_target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1958)
+inline void assign(unsigned int & c_target, DnaQ & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1968)
+inline void assign(unsigned int & c_target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1976)
+inline void assign(short & c_target, DnaQ & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1987)
+inline void assign(short & c_target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1995)
+inline void assign(unsigned short & c_target, DnaQ & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2005)
+inline void assign(unsigned short & c_target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2013)
+inline void assign(char & c_target, DnaQ & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2023)
+inline void assign(char & c_target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2031)
+inline void assign(signed char & c_target, DnaQ & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2041)
+inline void assign(signed char & c_target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2049)
+inline void assign(unsigned char & c_target, DnaQ & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2059)
+inline void assign(unsigned char & c_target, DnaQ const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2067)
+inline void assign(__int64 & c_target, Dna5Q & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2078)
+inline void assign(__int64 & c_target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2086)
+inline void assign(__uint64 & c_target, Dna5Q & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2096)
+inline void assign(__uint64 & c_target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2104)
+inline void assign(int & c_target, Dna5Q & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2114)
+inline void assign(int & c_target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2122)
+inline void assign(unsigned int & c_target, Dna5Q & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2132)
+inline void assign(unsigned int & c_target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2140)
+inline void assign(short & c_target, Dna5Q & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2151)
+inline void assign(short & c_target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2159)
+inline void assign(unsigned short & c_target, Dna5Q & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2169)
+inline void assign(unsigned short & c_target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2177)
+inline void assign(char & c_target, Dna5Q & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2187)
+inline void assign(char & c_target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2195)
+inline void assign(signed char & c_target, Dna5Q & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2205)
+inline void assign(signed char & c_target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2213)
+inline void assign(unsigned char & c_target, Dna5Q & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2223)
+inline void assign(unsigned char & c_target, Dna5Q const & source);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2231)
+template <typename TTargetContainer, typename TSource> inline void assign(Iter<TTargetContainer, StdIteratorAdaptor> & target, TSource const & source);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(440)
+template <typename TTargetContainer, typename TSource> inline void assign(Iter<TTargetContainer, PositionIterator> & target, TSource const & source);       	// "projects/library/seqan/basic/basic_iterator_position.h"(469)
+
+//____________________________________________________________________________
+// assignHost
+
+template <typename T, typename THost> inline void assignHost(T & me, THost & host_);       	// "projects/library/seqan/basic/basic_host.h"(147)
+template <typename T, typename THost> inline void assignHost(T & me, THost const & host_);       	// "projects/library/seqan/basic/basic_host.h"(155)
+
+//____________________________________________________________________________
+// assignQualities
+
+template <typename TDest, typename TSource> void assignQualities(TDest &dst, TSource const &src);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2342)
+
+//____________________________________________________________________________
+// assignQualityValue
+
+inline void assignQualityValue(DnaQ &c, int q);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2290)
+inline void assignQualityValue(Dna5Q &c, int q);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2300)
+inline void assignQualityValue(DnaQ &c, Ascii q);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2310)
+inline void assignQualityValue(Dna5Q &c, Ascii q);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2320)
+
+//____________________________________________________________________________
+// assignValue
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TValue> inline void assignValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(307)
+template <typename TContainer, typename TIterator, typename TSpec, typename TValue> inline void assignValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(315)
+template <typename TValue, typename TSource> inline void assignValue(Holder<TValue, Tristate> & me, TSource const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1020)
+template <typename TValue, typename TSource> inline void assignValue(Holder<TValue, Simple> & me, TSource const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1271)
+template <typename TValue, typename TSource> inline void assignValue(Holder<TValue, Tristate2> & me, TSource const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1567)
+template <typename TContainer, typename TValue> inline void assignValue(Iter<TContainer, StdIteratorAdaptor> & me, TValue & val);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(178)
+template <typename TContainer, typename TValue> inline void assignValue(Iter<TContainer, StdIteratorAdaptor> & me, TValue const & val);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(185)
+template <typename T, typename TValue> inline void assignValue(T & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator.h"(278)
+template <typename T, typename TValue> inline void assignValue(T const & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator.h"(288)
+template <typename TContainer, typename TValue> inline void assignValue(Iter<TContainer, PositionIterator> & me, TValue _value);       	// "projects/library/seqan/basic/basic_iterator_position.h"(207)
+template <typename TContainer, typename TValue> inline void assignValue(Iter<TContainer, PositionIterator> const & me, TValue _value);       	// "projects/library/seqan/basic/basic_iterator_position.h"(215)
+
+//____________________________________________________________________________
+// assignValueAt
+
+template <typename TObject, typename TPos, typename TSource> inline TSource & assignValueAt(TObject &me, TPos k, TSource &source);       	// "projects/library/seqan/basic/basic_aggregates.h"(517)
+template <typename TObject, typename TPos, typename TSource> inline TSource const & assignValueAt(TObject &me, TPos k, TSource const &source);       	// "projects/library/seqan/basic/basic_aggregates.h"(524)
+template <typename T_, unsigned _size, typename tmpS, typename TPos> inline tmpS const assignValueAt(Tuple<T_, _size, void> &me, TPos k, tmpS const source);       	// "projects/library/seqan/basic/basic_aggregates.h"(530)
+template <typename T_, unsigned _size, typename tmpS, typename TPos> inline tmpS const assignValueAt(Tuple<T_, _size, Compressed> &me, TPos k, tmpS const source);       	// "projects/library/seqan/basic/basic_aggregates.h"(535)
+template <typename T_, typename tmpS, typename Spec_, unsigned _size, typename TPos> inline SimpleType<tmpS, Spec_> const & assignValueAt(Tuple<T_, _size, Compressed> &me, TPos k, SimpleType<tmpS, Spec_> const &source);       	// "projects/library/seqan/basic/basic_aggregates.h"(543)
+
+//____________________________________________________________________________
+// assignValueI1
+
+template <typename T1, typename T2, typename TSpec, typename T> inline void assignValueI1(Pair<T1, T2, TSpec> &pair, T const &_i);       	// "projects/library/seqan/basic/basic_aggregates.h"(677)
+template <typename T1, typename T2, typename T3, typename TSpec, typename T> inline T const assignValueI1(Triple<T1, T2, T3, TSpec> &triple, T const &_i);       	// "projects/library/seqan/basic/basic_aggregates.h"(689)
+
+//____________________________________________________________________________
+// assignValueI2
+
+template <typename T1, typename T2, typename TSpec, typename T> inline void assignValueI2(Pair<T1, T2, TSpec> &pair, T const &_i);       	// "projects/library/seqan/basic/basic_aggregates.h"(682)
+template <typename T1, typename T2, typename T3, typename TSpec, typename T> inline T const assignValueI2(Triple<T1, T2, T3, TSpec> &triple, T const &_i);       	// "projects/library/seqan/basic/basic_aggregates.h"(694)
+
+//____________________________________________________________________________
+// assignValueI3
+
+template <typename T1, typename T2, typename T3, typename TSpec, typename T> inline T const assignValueI3(Triple<T1, T2, T3, TSpec> &triple, T const &_i);       	// "projects/library/seqan/basic/basic_aggregates.h"(699)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename T, typename TContainer> inline bool atBegin(T const & it, TContainer const & cont);       	// "projects/library/seqan/basic/basic_iterator.h"(418)
+template <typename T, typename TContainer> inline bool atBegin(T const & it, TContainer & cont);       	// "projects/library/seqan/basic/basic_iterator.h"(426)
+template <typename T, typename TContainer> inline bool atBegin(T & it, TContainer & cont);       	// "projects/library/seqan/basic/basic_iterator.h"(434)
+template <typename T, typename TContainer> inline bool atBegin(T & it, TContainer const & cont);       	// "projects/library/seqan/basic/basic_iterator.h"(442)
+template <typename T> inline bool atBegin(T const & it);       	// "projects/library/seqan/basic/basic_iterator.h"(451)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TContainer, typename TIterator, typename TSpec> inline bool atEnd(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(556)
+template <typename TContainer, typename TIterator, typename TSpec> inline bool atEnd(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(564)
+template <typename T, typename TContainer> inline bool atEnd(T & it, TContainer const & cont);       	// "projects/library/seqan/basic/basic_iterator.h"(483)
+template <typename T, typename TContainer> inline bool atEnd(T const & it, TContainer const & cont);       	// "projects/library/seqan/basic/basic_iterator.h"(491)
+template <typename T, typename TContainer> inline bool atEnd(T & it, TContainer & cont);       	// "projects/library/seqan/basic/basic_iterator.h"(500)
+template <typename T, typename TContainer> inline bool atEnd(T const & it, TContainer & cont);       	// "projects/library/seqan/basic/basic_iterator.h"(508)
+template <typename T> inline bool atEnd(T & it);       	// "projects/library/seqan/basic/basic_iterator.h"(517)
+template <typename T> inline bool atEnd(T const & it);       	// "projects/library/seqan/basic/basic_iterator.h"(524)
+
+//____________________________________________________________________________
+// atNil
+
+template <typename TIterator> inline bool atNil(TIterator & me);       	// "projects/library/seqan/basic/basic_iterator.h"(787)
+template <typename TIterator> inline bool atNil(TIterator * me);       	// "projects/library/seqan/basic/basic_iterator.h"(796)
+
+//____________________________________________________________________________
+// clear
+
+template <size_t SIZE, size_t MAX_COUNT, typename TParentAllocator> void clear(Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(170)
+template <typename TValue, size_t MAX_COUNT, typename TParentAllocator> void clear(Allocator<ChunkPool2<TValue, MAX_COUNT, TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(302)
+template <size_t SIZE, typename TParentAllocator> void clear(Allocator<SinglePool<SIZE, TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(159)
+template <typename TValue, typename TParentAllocator> void clear(Allocator<SinglePool2<TValue, TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(279)
+inline void clear(VoidHolder & me);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(122)
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT> void clear(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > & me);       	// "projects/library/seqan/basic/basic_allocator_multipool.h"(138)
+template <typename T_, unsigned _size, typename TSpec> inline void clear(Tuple<T_, _size, TSpec> &me);       	// "projects/library/seqan/basic/basic_aggregates.h"(554)
+template <typename T_, unsigned _size> inline void clear(Tuple<T_, _size, Compressed> &me);       	// "projects/library/seqan/basic/basic_aggregates.h"(558)
+template <typename TValue> inline void clear(Holder<TValue, Tristate> & me);       	// "projects/library/seqan/basic/basic_holder.h"(623)
+template <typename TValue> inline void clear(Holder<TValue, Simple> & );       	// "projects/library/seqan/basic/basic_holder.h"(1204)
+template <typename TValue> inline void clear(Holder<TValue, Tristate2> & me);       	// "projects/library/seqan/basic/basic_holder.h"(1422)
+template <typename TParentAllocator> void clear(Allocator<SimpleAlloc<TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_simple.h"(140)
+
+//____________________________________________________________________________
+// clearHost
+
+template <typename T> inline void clearHost(T & me);       	// "projects/library/seqan/basic/basic_host.h"(71)
+
+//____________________________________________________________________________
+// const
+
+template <typename TValue, size_t I> inline void setValue(Holder<TValue *, Tristate> & me, TValue const (& value_)[I]);       	// "projects/library/seqan/basic/basic_holder.h"(933)
+template <typename TValue, size_t I> inline void setValue(Holder<TValue * const, Tristate> & me, TValue const (& value_)[I]);       	// "projects/library/seqan/basic/basic_holder.h"(955)
+
+//____________________________________________________________________________
+// container
+
+template <typename TContainer, typename TIterator, typename TSpec> inline typename Parameter_<TContainer>::Type container(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(182)
+template <typename TContainer, typename TIterator, typename TSpec> inline typename Parameter_<TContainer>::Type container(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(189)
+template <typename T> inline typename Container<T>::Type & container(T me);       	// "projects/library/seqan/basic/basic_iterator.h"(350)
+template <typename TContainer> inline typename Parameter_<TContainer>::Type container(Iter<TContainer, PositionIterator> & me);       	// "projects/library/seqan/basic/basic_iterator_position.h"(130)
+template <typename TContainer> inline typename Parameter_<TContainer>::Type container(Iter<TContainer, PositionIterator> const & me);       	// "projects/library/seqan/basic/basic_iterator_position.h"(137)
+
+//____________________________________________________________________________
+// convert
+
+template <typename TTarget, typename TSource> inline typename Convert<TTarget, TSource>::Type convert(TSource const & source);       	// "projects/library/seqan/basic/basic_converter.h"(121)
+
+//____________________________________________________________________________
+// convertImpl
+
+template <typename TTarget, typename T, typename TSpec> inline typename Convert<TTarget, Proxy<TSpec> >::Type convertImpl(Convert<TTarget, T> const, Proxy<TSpec> & source);       	// "projects/library/seqan/basic/basic_proxy.h"(290)
+template <typename TTarget, typename T, typename TSpec> inline typename Convert<TTarget, Proxy<TSpec> const>::Type convertImpl(Convert<TTarget, T> const, Proxy<TSpec> const & source);       	// "projects/library/seqan/basic/basic_proxy.h"(297)
+template <typename TTarget, typename T, typename TSourceValue, typename TSourceCount, typename TSourceSpec> inline typename Convert<TTarget, ProfileType<TSourceValue, TSourceCount, TSourceSpec> >::Type convertImpl(Convert<TTarget, T> const, ProfileType<TSourceValue, TSourceCount, TSourceSpec> const & source);       	// "projects/library/seqan/basic/basic_profchar.h"(193)
+template <typename TTarget, typename T, typename TSource> inline typename Convert<TTarget, TSource>::Type convertImpl(Convert<TTarget, T> const, TSource const & source);       	// "projects/library/seqan/basic/basic_converter.h"(95)
+template <typename TTarget, typename T, typename TSourceValue, typename TSourceSpec> inline typename RemoveConst_<TTarget>::Type convertImpl(Convert<TTarget, T> const, SimpleType<TSourceValue, TSourceSpec> const & source_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(276)
+
+//____________________________________________________________________________
+// convertQuality
+
+inline void convertQuality(Ascii & c, int q);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2269)
+
+//____________________________________________________________________________
+// create
+
+template <typename TValue> inline TValue & create(VoidHolder & me);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(146)
+template <typename TValue> inline void create(Holder<TValue, Tristate> & me);       	// "projects/library/seqan/basic/basic_holder.h"(671)
+template <typename TValue> inline void create(Holder<TValue *, Tristate> & me);       	// "projects/library/seqan/basic/basic_holder.h"(699)
+template <typename TValue> inline void create(Holder<TValue * const, Tristate> & me);       	// "projects/library/seqan/basic/basic_holder.h"(725)
+template <typename TValue, typename TValue2> inline void create(Holder<TValue, Tristate> & me, TValue2 & value_);       	// "projects/library/seqan/basic/basic_holder.h"(754)
+template <typename TValue, typename TValue2> inline void create(Holder<TValue const, Tristate> & me, TValue2 & value_);       	// "projects/library/seqan/basic/basic_holder.h"(772)
+template <typename TValue, typename TValue2> inline void create(Holder<TValue *, Tristate> & me, TValue2 & value_);       	// "projects/library/seqan/basic/basic_holder.h"(784)
+template <typename TValue, typename TValue2> inline void create(Holder<TValue * const, Tristate> & me, TValue2 & value_);       	// "projects/library/seqan/basic/basic_holder.h"(796)
+template <typename TValue> inline void create(Holder<TValue, Simple> & );       	// "projects/library/seqan/basic/basic_holder.h"(1213)
+template <typename TValue> inline void create(Holder<TValue, Simple> & me, TValue const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1223)
+template <typename TValue> inline void create(Holder<TValue, Tristate2> & me);       	// "projects/library/seqan/basic/basic_holder.h"(1452)
+template <typename TValue> inline void create(Holder<TValue, Tristate2> & me, TValue const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1485)
+
+//____________________________________________________________________________
+// createHost
+
+template <typename T> inline void createHost(T & me);       	// "projects/library/seqan/basic/basic_host.h"(81)
+template <typename T, typename THost> inline void createHost(T & me, THost & host_);       	// "projects/library/seqan/basic/basic_host.h"(92)
+template <typename T, typename THost> inline void createHost(T & me, THost const & host_);       	// "projects/library/seqan/basic/basic_host.h"(100)
+
+//____________________________________________________________________________
+// deallocate
+
+template <size_t SIZE, size_t MAX_COUNT, typename TParentAllocator, typename TValue, typename TSize, typename TUsage> inline void deallocate(Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > & me, TValue * data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(235)
+template <typename TValue, size_t MAX_COUNT, typename TParentAllocator, typename TValue2, typename TSize, typename TUsage> inline void deallocate(Allocator<ChunkPool2<TValue, MAX_COUNT, TParentAllocator> > & me, TValue2 * data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(326)
+template <size_t SIZE, typename TParentAllocator, typename TValue, typename TSize, typename TUsage> inline void deallocate(Allocator<SinglePool<SIZE, TParentAllocator> > & me, TValue * data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(215)
+template <typename TValue, typename TParentAllocator, typename TValue2, typename TSize, typename TUsage> inline void deallocate(Allocator<SinglePool2<TValue, TParentAllocator> > & me, TValue2 * data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(303)
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT, typename TValue, typename TSize, typename TUsage> inline void deallocate(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > & me, TValue * data, TSize count, Tag<TUsage> const tag_);       	// "projects/library/seqan/basic/basic_allocator_multipool.h"(220)
+template <typename T, typename TValue, typename TSize> inline void deallocate(T const & me, TValue * data, TSize const count);       	// "projects/library/seqan/basic/basic_allocator_interface.h"(243)
+template <typename T, typename TValue, typename TSize> inline void deallocate(T & me, TValue * data, TSize const count);       	// "projects/library/seqan/basic/basic_allocator_interface.h"(251)
+template <typename T, typename TValue, typename TSize, typename TUsage> inline void deallocate( T const & , TValue * data, TSize count, TSize, Tag<TUsage> const);       	// "projects/library/seqan/basic/basic_allocator_interface.h"(266)
+template <typename T, typename TValue, typename TSize, typename TUsage> inline void deallocate( T & , TValue * data, TSize count, TSize, Tag<TUsage> const);       	// "projects/library/seqan/basic/basic_allocator_interface.h"(290)
+template <typename TParentAllocator, typename TValue, typename TSize, typename TUsage> inline void deallocate(Allocator<SimpleAlloc<TParentAllocator> > & me, TValue * data, TSize, Tag<TUsage> const);       	// "projects/library/seqan/basic/basic_allocator_simple.h"(195)
+
+//____________________________________________________________________________
+// dependent
+
+template <typename TValue> inline bool dependent(Holder<TValue, Tristate> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(534)
+template <typename TValue> inline bool dependent(Holder<TValue, Simple> const & );       	// "projects/library/seqan/basic/basic_holder.h"(1194)
+template <typename TValue> inline bool dependent(Holder<TValue, Tristate2> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(1408)
+
+//____________________________________________________________________________
+// dependentHost
+
+template <typename T> inline bool dependentHost(T const & me);       	// "projects/library/seqan/basic/basic_host.h"(61)
+
+//____________________________________________________________________________
+// destroy
+
+template <typename TValue> inline void destroy(VoidHolder & me);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(158)
+
+//____________________________________________________________________________
+// detach
+
+template <typename TValue> inline void detach(Holder<TValue, Tristate> & me);       	// "projects/library/seqan/basic/basic_holder.h"(826)
+template <typename TValue> inline void detach(Holder<TValue, Simple> & );       	// "projects/library/seqan/basic/basic_holder.h"(1233)
+template <typename TValue> inline void detach(Holder<TValue, Tristate2> & me);       	// "projects/library/seqan/basic/basic_holder.h"(1506)
+
+//____________________________________________________________________________
+// difference
+
+template <typename TIterator> inline typename Difference<TIterator>::Type difference( TIterator const & begin, TIterator const & end);       	// "projects/library/seqan/basic/basic_iterator.h"(728)
+
+//____________________________________________________________________________
+// empty
+
+inline bool empty(VoidHolder & me);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(109)
+inline bool empty(VoidHolder const & me);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(114)
+template <typename TSourceValue, typename TSourceCount, typename TSourceSpec> inline bool empty(ProfileType<TSourceValue, TSourceCount, TSourceSpec> const & source);       	// "projects/library/seqan/basic/basic_profchar.h"(148)
+template <typename TValue> inline bool empty(Holder<TValue, Tristate> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(522)
+template <typename TValue> inline bool empty(Holder<TValue, Simple> const & );       	// "projects/library/seqan/basic/basic_holder.h"(1184)
+template <typename TValue> inline bool empty(Holder<TValue, Tristate2> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(1396)
+
+//____________________________________________________________________________
+// emptyHost
+
+template <typename T> inline bool emptyHost(T const & me);       	// "projects/library/seqan/basic/basic_host.h"(51)
+
+//____________________________________________________________________________
+// gapValue
+
+template <typename T> inline T gapValue();       	// "projects/library/seqan/basic/basic_alphabet_interface2.h"(104)
+
+//____________________________________________________________________________
+// gapValueImpl
+
+template <typename T> inline T const & gapValueImpl(T *);       	// "projects/library/seqan/basic/basic_alphabet_interface2.h"(63)
+inline char const & gapValueImpl(char *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(424)
+inline char const & gapValueImpl(char const *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(431)
+
+//____________________________________________________________________________
+// getQualityValue
+
+inline int getQualityValue(DnaQ const &c);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2237)
+inline int getQualityValue(Dna5Q const &c);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(2242)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TValue> inline TValue & getValue(VoidHolder & me);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(184)
+template <typename TValue> inline TValue const & getValue(VoidHolder const & me);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(190)
+template <typename TSpec> typename GetValue<Proxy<TSpec> >::Type getValue(Proxy<TSpec> & me);       	// "projects/library/seqan/basic/basic_proxy.h"(164)
+template <typename TSpec> typename GetValue<Proxy<TSpec> const>::Type getValue(Proxy<TSpec> const & me);       	// "projects/library/seqan/basic/basic_proxy.h"(170)
+template <typename T> inline typename GetValue<T>::Type getValue(T & me);       	// "projects/library/seqan/basic/basic_iterator.h"(229)
+template <typename T> inline typename GetValue<T const>::Type getValue(T const & me);       	// "projects/library/seqan/basic/basic_iterator.h"(236)
+template <typename T> inline T & getValue(T * me);       	// "projects/library/seqan/basic/basic_iterator.h"(244)
+
+//____________________________________________________________________________
+// getValueI1
+
+template <typename T1, typename T2, typename TSpec> inline T1 getValueI1(Pair<T1, T2, TSpec> const &pair);       	// "projects/library/seqan/basic/basic_aggregates.h"(647)
+template <typename T1, typename T2, typename T3, typename TSpec> inline T1 getValueI1(Triple<T1, T2, T3, TSpec> const &triple);       	// "projects/library/seqan/basic/basic_aggregates.h"(659)
+
+//____________________________________________________________________________
+// getValueI2
+
+template <typename T1, typename T2, typename TSpec> inline T2 getValueI2(Pair<T1, T2, TSpec> const &pair);       	// "projects/library/seqan/basic/basic_aggregates.h"(652)
+template <typename T1, typename T2, typename T3, typename TSpec> inline T2 getValueI2(Triple<T1, T2, T3, TSpec> const &triple);       	// "projects/library/seqan/basic/basic_aggregates.h"(664)
+
+//____________________________________________________________________________
+// getValueI3
+
+template <typename T1, typename T2, typename T3, typename TSpec> inline T3 getValueI3(Triple<T1, T2, T3, TSpec> const &triple);       	// "projects/library/seqan/basic/basic_aggregates.h"(669)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename TIterator, typename TContainer> inline void goBegin(TIterator & it, TContainer & container);       	// "projects/library/seqan/basic/basic_iterator.h"(554)
+template <typename TIterator> inline void goBegin(TIterator & it);       	// "projects/library/seqan/basic/basic_iterator.h"(572)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename TIterator, typename TContainer> inline void goEnd(TIterator & it, TContainer & container);       	// "projects/library/seqan/basic/basic_iterator.h"(603)
+template <typename TIterator, typename TContainer> inline void goEnd(TIterator & it, TContainer const & container);       	// "projects/library/seqan/basic/basic_iterator.h"(611)
+template <typename TIterator> inline void goEnd(TIterator & it);       	// "projects/library/seqan/basic/basic_iterator.h"(619)
+
+//____________________________________________________________________________
+// goFurther
+
+template <typename TIterator, typename TDiff> inline void goFurther(TIterator & it, TDiff steps);       	// "projects/library/seqan/basic/basic_iterator.h"(671)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TContainer, typename TIterator, typename TSpec> inline void goNext(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(410)
+template <typename TContainer> inline void goNext(Iter<TContainer, StdIteratorAdaptor> & me);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(293)
+template <typename TIterator> inline void goNext(TIterator & it);       	// "projects/library/seqan/basic/basic_iterator.h"(644)
+template <typename TContainer> inline void goNext(Iter<TContainer, PositionIterator> & me);       	// "projects/library/seqan/basic/basic_iterator_position.h"(324)
+
+//____________________________________________________________________________
+// goNil
+
+template <typename TIterator> inline void goNil(TIterator & me);       	// "projects/library/seqan/basic/basic_iterator.h"(753)
+template <typename TIterator> inline void goNil(TIterator * & me);       	// "projects/library/seqan/basic/basic_iterator.h"(761)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename TContainer, typename TIterator, typename TSpec> inline void goPrevious(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(422)
+template <typename TContainer> inline void goPrevious(Iter<TContainer, StdIteratorAdaptor> & me);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(305)
+template <typename TIterator> inline void goPrevious(TIterator & it);       	// "projects/library/seqan/basic/basic_iterator.h"(696)
+template <typename TContainer> inline void goPrevious(Iter<TContainer, PositionIterator> & me);       	// "projects/library/seqan/basic/basic_iterator_position.h"(336)
+
+//____________________________________________________________________________
+// host
+
+template <typename T> inline typename Host<T>::Type & host(T & me);       	// "projects/library/seqan/basic/basic_host.h"(129)
+template <typename T> inline typename Host<T const>::Type & host(T const & me);       	// "projects/library/seqan/basic/basic_host.h"(136)
+template <typename THost, typename TValue> THost & host(ToStdAllocator<THost, TValue> & me);       	// "projects/library/seqan/basic/basic_allocator_to_std.h"(166)
+
+//____________________________________________________________________________
+// hostIterator
+
+template <typename TContainer, typename TIterator, typename TSpec> inline TIterator & hostIterator(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(218)
+template <typename TContainer, typename TIterator, typename TSpec> inline TIterator const & hostIterator(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(225)
+template <typename TContainer> inline typename StdContainerIterator<TContainer>::Type & hostIterator(Iter<TContainer, StdIteratorAdaptor> & me);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(142)
+template <typename TContainer> inline typename StdContainerIterator<TContainer>::Type const & hostIterator(Iter<TContainer, StdIteratorAdaptor> const & me);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(148)
+
+//____________________________________________________________________________
+// infimumValueImpl
+
+template <typename T> inline T const & infimumValueImpl(T *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(466)
+inline float const & infimumValueImpl(float *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(705)
+inline double const & infimumValueImpl(double *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(732)
+inline long double const & infimumValueImpl(long double *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(759)
+
+//____________________________________________________________________________
+// iter
+
+template <typename TIterator> inline TIterator & iter(Proxy<IteratorProxy<TIterator> > & me);       	// "projects/library/seqan/basic/basic_proxy.h"(260)
+template <typename TIterator> inline TIterator const & iter(Proxy<IteratorProxy<TIterator> > const & me);       	// "projects/library/seqan/basic/basic_proxy.h"(266)
+
+//____________________________________________________________________________
+// length
+
+template <typename T_, unsigned _size, typename TSpec> inline unsigned length(Tuple<T_, _size, TSpec> const &);       	// "projects/library/seqan/basic/basic_aggregates.h"(503)
+
+//____________________________________________________________________________
+// lexLess
+
+template <typename T_> inline bool lexLess(const T_& _Left, const T_& Right_);       	// "projects/library/seqan/basic/basic_compare.h"(66)
+template <typename T_, typename TSpec> inline bool lexLess(SimpleType<T_, TSpec> const &_Left, SimpleType<T_, TSpec> const &Right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1013)
+
+//____________________________________________________________________________
+// log2
+
+template <typename T> inline unsigned int log2(T val);       	// "projects/library/seqan/basic/basic_definition.h"(345)
+
+//____________________________________________________________________________
+// maxValue
+
+template <typename T> inline T const & maxValue();       	// "projects/library/seqan/basic/basic_alphabet_interface2.h"(166)
+template <typename T> inline T const & maxValue(T);       	// "projects/library/seqan/basic/basic_alphabet_interface2.h"(175)
+
+//____________________________________________________________________________
+// memset
+
+template <unsigned SIZE> finline void memset(void* ptr, unsigned char c);       	// "projects/library/seqan/basic/basic_metaprogramming.h"(309)
+template <unsigned SIZE, unsigned char c> finline void memset(void* ptr);       	// "projects/library/seqan/basic/basic_metaprogramming.h"(355)
+
+//____________________________________________________________________________
+// minValue
+
+template <typename T> inline T const & minValue();       	// "projects/library/seqan/basic/basic_alphabet_interface2.h"(228)
+template <typename T> inline T const & minValue(T);       	// "projects/library/seqan/basic/basic_alphabet_interface2.h"(237)
+
+//____________________________________________________________________________
+// move
+
+template <typename TTarget, typename TSource> inline void move(TTarget & target, TSource & source);       	// "projects/library/seqan/basic/basic_transport.h"(122)
+template <typename TTarget, typename TSource> inline void move(TTarget const & target, TSource & source);       	// "projects/library/seqan/basic/basic_transport.h"(130)
+template <typename TTarget, typename TSource> inline void move(TTarget & target, TSource const & source);       	// "projects/library/seqan/basic/basic_transport.h"(138)
+template <typename TTarget, typename TSource> inline void move(TTarget const & target, TSource const & source);       	// "projects/library/seqan/basic/basic_transport.h"(146)
+
+//____________________________________________________________________________
+// moveHost
+
+template <typename T, typename THost> inline void moveHost(T & me, THost & host_);       	// "projects/library/seqan/basic/basic_host.h"(165)
+template <typename T, typename THost> inline void moveHost(T & me, THost const & host_);       	// "projects/library/seqan/basic/basic_host.h"(173)
+
+//____________________________________________________________________________
+// moveValue
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TValue> inline void moveValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(328)
+template <typename TContainer, typename TIterator, typename TSpec, typename TValue> inline void moveValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(336)
+template <typename TValue, typename TSource> inline void moveValue(Holder<TValue, Tristate> & me, TSource const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1041)
+template <typename TValue, typename TSource> inline void moveValue(Holder<TValue, Simple> & me, TSource const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1282)
+template <typename TValue, typename TSource> inline void moveValue(Holder<TValue, Tristate2> & me, TSource const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1588)
+template <typename TContainer, typename TValue> inline void moveValue(Iter<TContainer, StdIteratorAdaptor> & me, TValue & val);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(197)
+template <typename TContainer, typename TValue> inline void moveValue(Iter<TContainer, StdIteratorAdaptor> & me, TValue const & val);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(204)
+template <typename T, typename TValue> inline void moveValue(T & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator.h"(318)
+template <typename T, typename TValue> inline void moveValue(T const & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator.h"(327)
+template <typename TContainer, typename TValue> inline void moveValue(Iter<TContainer, PositionIterator> & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator_position.h"(234)
+template <typename TContainer, typename TValue> inline void moveValue(Iter<TContainer, PositionIterator> const & me, TValue const & _value);       	// "projects/library/seqan/basic/basic_iterator_position.h"(242)
+
+//____________________________________________________________________________
+// nukeCopies
+
+template <typename TValue> inline void nukeCopies(TValue* &);       	// "projects/library/seqan/basic/basic_volatile_ptr.h"(164)
+template <typename TValue> inline void nukeCopies(VolatilePtr<TValue> &ptr);       	// "projects/library/seqan/basic/basic_volatile_ptr.h"(167)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TContainer, typename TIterator, typename TSpec> inline bool operator!= (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left, Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(380)
+template <typename TContainer, typename TIterator, typename TSpec> inline bool operator!= (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left, typename IterComplementConst<TIterator>::Type const & right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(389)
+template <typename TContainer, typename TIterator, typename TSpec> inline bool operator!= (typename IterComplementConst<TIterator>::Type const & left, Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(398)
+template <typename TSpec, typename TRight> inline bool operator!= (Proxy<TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(354)
+template <typename TLeft, typename TSpec> inline bool operator!= (TLeft const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(365)
+template <typename TLeftSpec, typename TRightSpec> inline bool operator!= (Proxy<TLeftSpec> const & left_, Proxy<TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(376)
+template <typename TSpec> inline bool operator!= (Proxy<TSpec> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(388)
+template <typename T_, unsigned _sizeL, unsigned _sizeR> inline bool operator!=(Tuple<T_, _sizeL, Compressed> const &_left, Tuple<T_, _sizeR, Compressed> const &_right);       	// "projects/library/seqan/basic/basic_aggregates.h"(578)
+template <typename L1, typename L2, typename LCompression, typename R1, typename R2, typename RCompression> inline bool operator!=(Pair<L1, L2, LCompression> const &_left, Pair<R1, R2, RCompression> const &_right);       	// "projects/library/seqan/basic/basic_aggregates.h"(711)
+template <typename L1, typename L2, typename L3, typename LCompression, typename R1, typename R2, typename R3, typename RCompression> inline bool operator!=(Triple<L1, L2, L3, LCompression> const &_left, Triple<R1, R2, R3, RCompression> const &_right);       	// "projects/library/seqan/basic/basic_aggregates.h"(726)
+template <typename TValue, typename TSpec, typename TRight> inline bool operator!= (SimpleType<TValue, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(659)
+template <typename TLeft, typename TValue, typename TSpec> inline bool operator!= (TLeft const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(670)
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec> inline bool operator!= (SimpleType<TLeftValue, TLeftSpec> const & left_, SimpleType<TRightValue, TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(681)
+template <typename TValue, typename TSpec> inline bool operator!= (SimpleType<TValue, TSpec> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(693)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator!= (Proxy<TSpec> const & left_, SimpleType<TValue, TSpec2> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(703)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator!= (SimpleType<TValue, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(714)
+template <typename TContainer> inline bool operator!= (Iter<TContainer, StdIteratorAdaptor> const & left, Iter<TContainer, StdIteratorAdaptor> const & right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(229)
+template <typename TContainer> inline bool operator!= (Iter<TContainer, PositionIterator> const & left, Iter<TContainer, PositionIterator> const & right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(268)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TContainer, typename TSpec> inline typename Reference<Iter<TContainer, TSpec> >::Type operator* (Iter<TContainer, TSpec> & me);       	// "projects/library/seqan/basic/basic_iterator_base.h"(205)
+template <typename TContainer, typename TSpec> inline typename Reference<Iter<TContainer, TSpec> const>::Type operator* (Iter<TContainer, TSpec> const & me);       	// "projects/library/seqan/basic/basic_iterator_base.h"(212)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename TContainer, typename TSpec, typename TSize> inline Iter<TContainer, TSpec> operator+ (Iter<TContainer, TSpec> const & me, TSize size);       	// "projects/library/seqan/basic/basic_iterator_base.h"(280)
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > operator+ (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(435)
+template <typename TContainer, typename TIterator, typename TSpec> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > operator+ (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left, int right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(444)
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > operator+ (TIntegral left, Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(453)
+template <typename TContainer, typename TIterator, typename TSpec> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > operator+ (int left, Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(462)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, StdIteratorAdaptor> operator+ (Iter<TContainer, StdIteratorAdaptor> const & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(318)
+template <typename TContainer> inline Iter<TContainer, StdIteratorAdaptor> operator+ (Iter<TContainer, StdIteratorAdaptor> const & left, int right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(327)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, StdIteratorAdaptor> operator+ (TIntegral left, Iter<TContainer, StdIteratorAdaptor> const & right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(336)
+template <typename TContainer> inline Iter<TContainer, StdIteratorAdaptor> operator+ (int left, Iter<TContainer, StdIteratorAdaptor> const & right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(345)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, PositionIterator> operator+ (Iter<TContainer, PositionIterator> const & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(348)
+template <typename TContainer> inline Iter<TContainer, PositionIterator> operator+ (Iter<TContainer, PositionIterator> const & left, int right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(357)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, PositionIterator> operator+ (TIntegral left, Iter<TContainer, PositionIterator> const & right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(366)
+template <typename TContainer> inline Iter<TContainer, PositionIterator> operator+ (int left, Iter<TContainer, PositionIterator> const & right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(375)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename TContainer, typename TSpec> inline Iter<TContainer, TSpec> const & operator++ (Iter<TContainer, TSpec> & me);       	// "projects/library/seqan/basic/basic_iterator_base.h"(224)
+template <typename TContainer, typename TSpec> inline Iter<TContainer, TSpec> operator++ (Iter<TContainer, TSpec> & me, int);       	// "projects/library/seqan/basic/basic_iterator_base.h"(233)
+template <typename TValue, typename TSpec> inline SimpleType<TValue, TSpec> & operator++ (SimpleType<TValue, TSpec> & me);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1023)
+template <typename TValue, typename TSpec> inline SimpleType<TValue, TSpec> operator++ (SimpleType<TValue, TSpec> & me, int);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1031)
+
+//____________________________________________________________________________
+// operator+=
+
+template <typename TContainer, typename TSpec, typename TSize> inline Iter<TContainer, TSpec> const & operator+= (Iter<TContainer, TSpec> & me, TSize size);       	// "projects/library/seqan/basic/basic_iterator_base.h"(290)
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & operator+= (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(475)
+template <typename TContainer, typename TIterator, typename TSpec> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & operator+= (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & left, int right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(485)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, StdIteratorAdaptor> & operator+= (Iter<TContainer, StdIteratorAdaptor> & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(358)
+template <typename TContainer> inline Iter<TContainer, StdIteratorAdaptor> & operator+= (Iter<TContainer, StdIteratorAdaptor> & left, int right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(368)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, PositionIterator> & operator+= (Iter<TContainer, PositionIterator> & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(388)
+template <typename TContainer> inline Iter<TContainer, PositionIterator> & operator+= (Iter<TContainer, PositionIterator> & left, int right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(398)
+
+//____________________________________________________________________________
+// operator-
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > operator- (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(499)
+template <typename TContainer, typename TIterator, typename TSpec> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > operator- (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left, int right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(508)
+template <typename TContainer, typename TIterator, typename TSpec, typename TContainer2, typename TIterator2, typename TSpec2> inline typename Difference<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > >::Type operator- (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left, Iter<TContainer2, AdaptorIterator<TIterator2, TSpec2> > const & right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(519)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, StdIteratorAdaptor> operator- (Iter<TContainer, StdIteratorAdaptor> const & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(382)
+template <typename TContainer> inline Iter<TContainer, StdIteratorAdaptor> operator- (Iter<TContainer, StdIteratorAdaptor> const & left, int right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(391)
+template <typename TContainer> inline typename Difference<Iter<TContainer, StdIteratorAdaptor> >::Type operator- (Iter<TContainer, StdIteratorAdaptor> const & left, Iter<TContainer, StdIteratorAdaptor> const & right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(402)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, PositionIterator> operator- (Iter<TContainer, PositionIterator> const & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(412)
+template <typename TContainer> inline Iter<TContainer, PositionIterator> operator- (Iter<TContainer, PositionIterator> const & left, int right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(421)
+template <typename TContainer> inline typename Difference<TContainer>::Type operator- (Iter<TContainer, PositionIterator> const & left, Iter<TContainer, PositionIterator> const & right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(432)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename TContainer, typename TSpec> inline Iter<TContainer, TSpec> const & operator-- (Iter<TContainer, TSpec> & me);       	// "projects/library/seqan/basic/basic_iterator_base.h"(247)
+template <typename TContainer, typename TSpec> inline Iter<TContainer, TSpec> operator-- (Iter<TContainer, TSpec> & me, int);       	// "projects/library/seqan/basic/basic_iterator_base.h"(256)
+template <typename TValue, typename TSpec> inline SimpleType<TValue, TSpec> & operator-- (SimpleType<TValue, TSpec> & me);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1042)
+template <typename TValue, typename TSpec> inline SimpleType<TValue, TSpec> operator-- (SimpleType<TValue, TSpec> & me, int);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(1050)
+
+//____________________________________________________________________________
+// operator-=
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & operator-= (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(532)
+template <typename TContainer, typename TIterator, typename TSpec> inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & operator-= (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & left, int right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(542)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, StdIteratorAdaptor> & operator-= (Iter<TContainer, StdIteratorAdaptor> & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(415)
+template <typename TContainer> inline Iter<TContainer, StdIteratorAdaptor> & operator-= (Iter<TContainer, StdIteratorAdaptor> & left, int right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(425)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, PositionIterator> & operator-= (Iter<TContainer, PositionIterator> & left, TIntegral right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(445)
+template <typename TContainer> inline Iter<TContainer, PositionIterator> & operator-= (Iter<TContainer, PositionIterator> & left, int right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(455)
+
+//____________________________________________________________________________
+// operator<
+
+template <typename TSpec, typename TRight> inline bool operator< (Proxy<TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(402)
+template <typename TLeft, typename TSpec> inline bool operator< (TLeft const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(413)
+template <typename TLeftSpec, typename TRightSpec> inline bool operator< (Proxy<TLeftSpec> const & left_, Proxy<TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(424)
+template <typename TSpec> inline bool operator< (Proxy<TSpec> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(436)
+template <typename T_, unsigned _sizeL, unsigned _sizeR> inline bool operator<(Tuple<T_, _sizeL, Compressed> const &_left, Tuple<T_, _sizeR, Compressed> const &_right);       	// "projects/library/seqan/basic/basic_aggregates.h"(566)
+template <typename TValue, typename TSpec, typename TRight> inline bool operator< (SimpleType<TValue, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(730)
+template <typename TLeft, typename TValue, typename TSpec> inline bool operator< (TLeft const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(741)
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec> inline bool operator< (SimpleType<TLeftValue, TLeftSpec> const & left_, SimpleType<TRightValue, TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(752)
+template <typename TValue, typename TSpec> inline bool operator< (SimpleType<TValue, TSpec> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(764)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator< (Proxy<TSpec> const & left_, SimpleType<TValue, TSpec2> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(774)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator< (SimpleType<TValue, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(785)
+template <typename TContainer> inline bool operator< (Iter<TContainer, StdIteratorAdaptor> const & left, Iter<TContainer, StdIteratorAdaptor> const & right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(242)
+template <typename TContainer> inline bool operator< (Iter<TContainer, PositionIterator> const & left, Iter<TContainer, PositionIterator> const & right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(281)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TStream, typename TSpec> inline TStream & operator<< (TStream & strm, Proxy<TSpec> & proxy);       	// "projects/library/seqan/basic/basic_proxy.h"(617)
+template <typename TStream, typename TSpec> inline TStream & operator<< (TStream & strm, Proxy<TSpec> const & proxy);       	// "projects/library/seqan/basic/basic_proxy.h"(624)
+template <typename TStream, typename TValue, typename TSpec> TStream& operator<<(TStream& os, LogProb<TValue, TSpec> const& rhs);       	// "projects/library/seqan/basic/basic_logvalue.h"(323)
+template <typename TStream, typename TValue, typename TCount, typename TSpec> inline TStream& operator<<(TStream& os, ProfileType<TValue, TCount, TSpec> const& rhs);       	// "projects/library/seqan/basic/basic_profchar.h"(201)
+template <typename T1_, typename T2_, typename TSpec> std::ostream& operator<<(std::ostream &out, Pair<T1_,T2_,TSpec> const &p);       	// "projects/library/seqan/basic/basic_aggregates.h"(170)
+template <typename T1_, typename T2_, typename T3_, typename TSpec> std::ostream& operator<<(std::ostream &out, Triple<T1_,T2_,T3_,TSpec> const &t);       	// "projects/library/seqan/basic/basic_aggregates.h"(327)
+template <typename T_, unsigned _size, typename TSpec> std::ostream& operator<<(std::ostream& out, Tuple<T_,_size,TSpec> const &a);       	// "projects/library/seqan/basic/basic_aggregates.h"(623)
+template <typename TStream, typename TValue, typename TSpec> inline TStream & operator<< (TStream & stream, SimpleType<TValue, TSpec> const & data);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(291)
+
+//____________________________________________________________________________
+// operator<=
+
+template <typename TSpec, typename TRight> inline bool operator<= (Proxy<TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(449)
+template <typename TLeft, typename TSpec> inline bool operator<= (TLeft const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(460)
+template <typename TLeftSpec, typename TRightSpec> inline bool operator<= (Proxy<TLeftSpec> const & left_, Proxy<TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(471)
+template <typename TSpec> inline bool operator<= (Proxy<TSpec> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(483)
+template <typename TValue, typename TSpec, typename TRight> inline bool operator<= (SimpleType<TValue, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(801)
+template <typename TLeft, typename TValue, typename TSpec> inline bool operator<= (TLeft const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(812)
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec> inline bool operator<= (SimpleType<TLeftValue, TLeftSpec> const & left_, SimpleType<TRightValue, TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(823)
+template <typename TValue, typename TSpec> inline bool operator<= (SimpleType<TValue, TSpec> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(835)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator<= (Proxy<TSpec> const & left_, SimpleType<TValue, TSpec2> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(845)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator<= (SimpleType<TValue, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(856)
+template <typename TContainer> inline bool operator<= (Iter<TContainer, StdIteratorAdaptor> const & left, Iter<TContainer, StdIteratorAdaptor> const & right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(268)
+template <typename TContainer> inline bool operator<= (Iter<TContainer, PositionIterator> const & left, Iter<TContainer, PositionIterator> const & right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(303)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TContainer, typename TIterator, typename TSpec> inline bool operator== (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left, Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(349)
+template <typename TContainer, typename TIterator, typename TSpec> inline bool operator== (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left, typename IterComplementConst<TIterator>::Type const & right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(358)
+template <typename TContainer, typename TIterator, typename TSpec> inline bool operator== (typename IterComplementConst<TIterator>::Type const & left, Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(367)
+template <typename TSpec, typename TRight> inline bool operator== (Proxy<TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(307)
+template <typename TLeft, typename TSpec> inline bool operator== (TLeft const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(318)
+template <typename TLeftSpec, typename TRightSpec> inline bool operator== (Proxy<TLeftSpec> const & left_, Proxy<TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(329)
+template <typename TSpec> inline bool operator== (Proxy<TSpec> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(341)
+template <typename T_, unsigned _sizeL, unsigned _sizeR> inline bool operator==(Tuple<T_, _sizeL, Compressed> const &_left, Tuple<T_, _sizeR, Compressed> const &_right);       	// "projects/library/seqan/basic/basic_aggregates.h"(574)
+template <typename L1, typename L2, typename LCompression, typename R1, typename R2, typename RCompression> inline bool operator==(Pair<L1, L2, LCompression> const &_left, Pair<R1, R2, RCompression> const &_right);       	// "projects/library/seqan/basic/basic_aggregates.h"(707)
+template <typename L1, typename L2, typename L3, typename LCompression, typename R1, typename R2, typename R3, typename RCompression> inline bool operator==(Triple<L1, L2, L3, LCompression> const &_left, Triple<R1, R2, R3, RCompression> const &_right);       	// "projects/library/seqan/basic/basic_aggregates.h"(720)
+template <typename TValue, typename TSpec, typename TRight> inline bool operator== (SimpleType<TValue, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(588)
+template <typename TLeft, typename TValue, typename TSpec> inline bool operator== (TLeft const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(599)
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec> inline bool operator== (SimpleType<TLeftValue, TLeftSpec> const & left_, SimpleType<TRightValue, TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(610)
+template <typename TValue, typename TSpec> inline bool operator== (SimpleType<TValue, TSpec> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(622)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator== (Proxy<TSpec> const & left_, SimpleType<TValue, TSpec2> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(632)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator== (SimpleType<TValue, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(643)
+template <typename TContainer> inline bool operator== (Iter<TContainer, StdIteratorAdaptor> const & left, Iter<TContainer, StdIteratorAdaptor> const & right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(216)
+template <typename TContainer> inline bool operator== (Iter<TContainer, PositionIterator> const & left, Iter<TContainer, PositionIterator> const & right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(255)
+
+//____________________________________________________________________________
+// operator>
+
+template <typename TSpec, typename TRight> inline bool operator> (Proxy<TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(497)
+template <typename TLeft, typename TSpec> inline bool operator> (TLeft const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(508)
+template <typename TLeftSpec, typename TRightSpec> inline bool operator> (Proxy<TLeftSpec> const & left_, Proxy<TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(519)
+template <typename TSpec> inline bool operator> (Proxy<TSpec> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(531)
+template <typename T_, unsigned _sizeL, unsigned _sizeR> inline bool operator>(Tuple<T_, _sizeL, Compressed> const &_left, Tuple<T_, _sizeR, Compressed> const &_right);       	// "projects/library/seqan/basic/basic_aggregates.h"(570)
+template <typename TValue, typename TSpec, typename TRight> inline bool operator> (SimpleType<TValue, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(873)
+template <typename TLeft, typename TValue, typename TSpec> inline bool operator> (TLeft const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(884)
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec> inline bool operator> (SimpleType<TLeftValue, TLeftSpec> const & left_, SimpleType<TRightValue, TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(895)
+template <typename TValue, typename TSpec> inline bool operator> (SimpleType<TValue, TSpec> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(907)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator> (Proxy<TSpec> const & left_, SimpleType<TValue, TSpec2> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(917)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator> (SimpleType<TValue, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(928)
+template <typename TContainer> inline bool operator> (Iter<TContainer, StdIteratorAdaptor> const & left, Iter<TContainer, StdIteratorAdaptor> const & right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(255)
+template <typename TContainer> inline bool operator> (Iter<TContainer, PositionIterator> const & left, Iter<TContainer, PositionIterator> const & right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(290)
+
+//____________________________________________________________________________
+// operator>=
+
+template <typename TSpec, typename TRight> inline bool operator>= (Proxy<TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(545)
+template <typename TLeft, typename TSpec> inline bool operator>= (TLeft const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(556)
+template <typename TLeftSpec, typename TRightSpec> inline bool operator>= (Proxy<TLeftSpec> const & left_, Proxy<TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(567)
+template <typename TSpec> inline bool operator>= (Proxy<TSpec> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_proxy.h"(579)
+template <typename TValue, typename TSpec, typename TRight> inline bool operator>= (SimpleType<TValue, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(944)
+template <typename TLeft, typename TValue, typename TSpec> inline bool operator>= (TLeft const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(955)
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec> inline bool operator>= (SimpleType<TLeftValue, TLeftSpec> const & left_, SimpleType<TRightValue, TRightSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(966)
+template <typename TValue, typename TSpec> inline bool operator>= (SimpleType<TValue, TSpec> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(978)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator>= (Proxy<TSpec> const & left_, SimpleType<TValue, TSpec2> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(988)
+template <typename TSpec, typename TValue, typename TSpec2> inline bool operator>= (SimpleType<TValue, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(999)
+template <typename TContainer> inline bool operator>= (Iter<TContainer, StdIteratorAdaptor> const & left, Iter<TContainer, StdIteratorAdaptor> const & right);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(281)
+template <typename TContainer> inline bool operator>= (Iter<TContainer, PositionIterator> const & left, Iter<TContainer, PositionIterator> const & right);       	// "projects/library/seqan/basic/basic_iterator_position.h"(312)
+
+//____________________________________________________________________________
+// operator>>
+
+template <typename TStream, typename TSpec> inline TStream & operator>> (TStream & strm, Proxy<TSpec> & proxy);       	// "projects/library/seqan/basic/basic_proxy.h"(591)
+template <typename TStream, typename TSpec> inline TStream & operator>> (TStream & strm, Proxy<TSpec> const& proxy);       	// "projects/library/seqan/basic/basic_proxy.h"(603)
+template <typename TStream, typename TValue, typename TSpec> inline TStream & operator>> (TStream & stream, SimpleType<TValue, TSpec> & data);       	// "projects/library/seqan/basic/basic_alphabet_simple.h"(303)
+
+//____________________________________________________________________________
+// parentAllocator
+
+template <size_t SIZE, size_t MAX_COUNT, typename TParentAllocator> inline TParentAllocator & parentAllocator(Allocator<ChunkPool<SIZE, MAX_COUNT, TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(160)
+template <typename TValue, size_t MAX_COUNT, typename TParentAllocator> inline TParentAllocator & parentAllocator(Allocator<ChunkPool2<TValue, MAX_COUNT, TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_chunkpool.h"(292)
+template <size_t SIZE, typename TParentAllocator> inline TParentAllocator & parentAllocator(Allocator<SinglePool<SIZE, TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(149)
+template <typename TValue, typename TParentAllocator> inline TParentAllocator & parentAllocator(Allocator<SinglePool2<TValue, TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_singlepool.h"(269)
+template <typename TParentAllocator, unsigned int BLOCKING_LIMIT> inline TParentAllocator & parentAllocator(Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> > & me);       	// "projects/library/seqan/basic/basic_allocator_multipool.h"(128)
+template <typename TParentAllocator> inline TParentAllocator & parentAllocator(Allocator<SimpleAlloc<TParentAllocator> > & me);       	// "projects/library/seqan/basic/basic_allocator_simple.h"(116)
+
+//____________________________________________________________________________
+// position
+
+template <typename TContainer, typename TSpec, typename TContainer2> inline typename Position<Iter<TContainer, TSpec> const>::Type position(Iter<TContainer, TSpec> const & me, TContainer2 const &);       	// "projects/library/seqan/basic/basic_iterator_base.h"(339)
+template <typename TContainer, typename TIterator, typename TSpec> inline typename Position<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const>::Type position(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(251)
+template <typename TContainer, typename TIterator, typename TSpec, typename TContainer2> inline typename Position<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const>::Type position(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me, TContainer2 const &);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(262)
+template <typename TContainer, typename TContainer2> inline typename Position<Iter<TContainer, SimpleIterator> const>::Type position(Iter<TContainer, SimpleIterator> const & me, TContainer2 const & cont);       	// "projects/library/seqan/basic/basic_iterator_simple.h"(121)
+template <typename T> inline typename Position<T>::Type position(T * );       	// "projects/library/seqan/basic/basic_iterator.h"(377)
+template <typename TContainer, typename TIterator> inline typename Position<TContainer>::Type position(TIterator const & it, TContainer const & me);       	// "projects/library/seqan/basic/basic_iterator.h"(386)
+template <typename TContainer> inline typename Position<TContainer>::Type & position(Iter<TContainer, PositionIterator> & me);       	// "projects/library/seqan/basic/basic_iterator_position.h"(159)
+template <typename TContainer> inline typename Position<TContainer>::Type const & position(Iter<TContainer, PositionIterator> const & me);       	// "projects/library/seqan/basic/basic_iterator_position.h"(166)
+
+//____________________________________________________________________________
+// resize
+
+template <typename TSize> inline void resize(VoidHolder & me, TSize length);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(132)
+
+//____________________________________________________________________________
+// set
+
+template <typename TTarget, typename TSource> inline void set(TTarget & target, TSource & source);       	// "projects/library/seqan/basic/basic_transport.h"(175)
+template <typename TTarget, typename TSource> inline void set(TTarget const & target, TSource & source);       	// "projects/library/seqan/basic/basic_transport.h"(183)
+template <typename TTarget, typename TSource> inline void set(TTarget & target, TSource const & source);       	// "projects/library/seqan/basic/basic_transport.h"(191)
+template <typename TTarget, typename TSource> inline void set(TTarget const & target, TSource const & source);       	// "projects/library/seqan/basic/basic_transport.h"(199)
+
+//____________________________________________________________________________
+// setContainer
+
+template <typename TContainer, typename TIterator, typename TSpec> inline void setContainer(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me, typename Parameter_<TContainer>::Type container_);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(198)
+template <typename TContainer> inline void setContainer(Iter<TContainer, PositionIterator> & me, typename Parameter_<TContainer>::Type container_);       	// "projects/library/seqan/basic/basic_iterator_position.h"(146)
+
+//____________________________________________________________________________
+// setHost
+
+template <typename T, typename THost> inline void setHost(T & me, THost & host_);       	// "projects/library/seqan/basic/basic_host.h"(111)
+template <typename T, typename THost> inline void setHost(T & me, THost const & host_);       	// "projects/library/seqan/basic/basic_host.h"(119)
+
+//____________________________________________________________________________
+// setPosition
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TPosition> inline void setPosition(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me, TPosition pos_);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(275)
+template <typename TContainer, typename TPosition> inline void setPosition(Iter<TContainer, PositionIterator> & me, TPosition position_);       	// "projects/library/seqan/basic/basic_iterator_position.h"(175)
+
+//____________________________________________________________________________
+// setValue
+
+template <typename TValue> inline void setValue(Holder<TValue, Tristate> & me, TValue & value_);       	// "projects/library/seqan/basic/basic_holder.h"(850)
+template <typename TValue> inline void setValue(Holder<TValue const, Tristate> & me, TValue & value_);       	// "projects/library/seqan/basic/basic_holder.h"(863)
+template <typename TValue> inline void setValue(Holder<TValue *, Tristate> & me, TValue * & value_);       	// "projects/library/seqan/basic/basic_holder.h"(876)
+template <typename TValue> inline void setValue(Holder<TValue *, Tristate> & me, TValue * const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(887)
+template <typename TValue> inline void setValue(Holder<TValue * const, Tristate> & me, TValue * & value_);       	// "projects/library/seqan/basic/basic_holder.h"(898)
+template <typename TValue> inline void setValue(Holder<TValue * const, Tristate> & me, TValue * const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(909)
+template <typename TValue, typename TValue2> inline void setValue(Holder<TValue, Tristate> & me, TValue2 & value_);       	// "projects/library/seqan/basic/basic_holder.h"(968)
+template <typename TValue, typename TValue2> inline void setValue(Holder<TValue, Tristate> & me, TValue2 const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(977)
+template <typename TValue> inline void setValue(Holder<TValue, Simple> & me, TValue const & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1243)
+template <typename TValue> inline void setValue(Holder<TValue, Tristate2> & me, TValue & value_);       	// "projects/library/seqan/basic/basic_holder.h"(1518)
+
+//____________________________________________________________________________
+// shiftLeft
+
+template <typename T_, unsigned _size, typename TSpec> inline void shiftLeft(Tuple<T_, _size, TSpec> &me);       	// "projects/library/seqan/basic/basic_aggregates.h"(600)
+template <typename T_, unsigned _size> inline void shiftLeft(Tuple<T_, _size, Compressed> &me);       	// "projects/library/seqan/basic/basic_aggregates.h"(610)
+
+//____________________________________________________________________________
+// shiftRight
+
+template <typename T_, unsigned _size, typename TSpec> inline void shiftRight(Tuple<T_, _size, TSpec> &me);       	// "projects/library/seqan/basic/basic_aggregates.h"(605)
+template <typename T_, unsigned _size> inline void shiftRight(Tuple<T_, _size, Compressed> &me);       	// "projects/library/seqan/basic/basic_aggregates.h"(615)
+
+//____________________________________________________________________________
+// supremumValueImpl
+
+template <typename T> inline T const & supremumValueImpl(T *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(459)
+inline float const & supremumValueImpl(float *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(694)
+inline double const & supremumValueImpl(double *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(721)
+inline long double const & supremumValueImpl(long double *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(748)
+
+//____________________________________________________________________________
+// unknownValue
+
+template <typename T> inline T unknownValue();       	// "projects/library/seqan/basic/basic_alphabet_interface2.h"(113)
+
+//____________________________________________________________________________
+// unknownValueImpl
+
+template <typename T> inline T unknownValueImpl(T *);       	// "projects/library/seqan/basic/basic_alphabet_interface2.h"(72)
+inline char const & unknownValueImpl(char *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(439)
+inline char const & unknownValueImpl(char const *);       	// "projects/library/seqan/basic/basic_alphabet_trait_basic.h"(446)
+
+//____________________________________________________________________________
+// value
+
+template <typename TContainer, typename TIterator, typename TSpec> inline typename Reference<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > >::Type value(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(287)
+template <typename TContainer, typename TIterator, typename TSpec> inline typename Reference<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const>::Type value(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me);       	// "projects/library/seqan/basic/basic_iterator_adaptor.h"(294)
+template <typename TValue> inline TValue & value(VoidHolder & me);       	// "projects/library/seqan/basic/basic_holder_dynamic.h"(171)
+template <typename TValue> inline typename Reference<Holder<TValue, Tristate> >::Type value(Holder<TValue, Tristate> & me);       	// "projects/library/seqan/basic/basic_holder.h"(990)
+template <typename TValue> inline typename Reference<Holder<TValue, Tristate> const>::Type value(Holder<TValue, Tristate> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(1005)
+template <typename TValue> inline typename Reference<Holder<TValue, Simple> >::Type value(Holder<TValue, Simple> & me);       	// "projects/library/seqan/basic/basic_holder.h"(1253)
+template <typename TValue> inline typename Reference<Holder<TValue, Simple> const>::Type value(Holder<TValue, Simple> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(1260)
+template <typename TValue> inline typename Reference<Holder<TValue, Tristate2> >::Type value(Holder<TValue, Tristate2> & me);       	// "projects/library/seqan/basic/basic_holder.h"(1534)
+template <typename TValue> inline typename Reference<Holder<TValue, Tristate2> const>::Type value(Holder<TValue, Tristate2> const & me);       	// "projects/library/seqan/basic/basic_holder.h"(1551)
+template <typename TContainer> inline typename Reference<Iter<TContainer, StdIteratorAdaptor> >::Type value(Iter<TContainer, StdIteratorAdaptor> & me);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(159)
+template <typename TContainer> inline typename Reference<Iter<TContainer, StdIteratorAdaptor> const>::Type value(Iter<TContainer, StdIteratorAdaptor> const & me);       	// "projects/library/seqan/basic/basic_iterator_adapt_std.h"(165)
+template <typename T> inline typename Reference<T>::Type value(T & me);       	// "projects/library/seqan/basic/basic_iterator.h"(189)
+template <typename T> inline typename Reference<T const>::Type value(T const & me);       	// "projects/library/seqan/basic/basic_iterator.h"(196)
+template <typename T> inline T & value(T * me);       	// "projects/library/seqan/basic/basic_iterator.h"(205)
+template <typename TContainer> inline typename Reference<Iter<TContainer, PositionIterator> >::Type value(Iter<TContainer, PositionIterator> & me);       	// "projects/library/seqan/basic/basic_iterator_position.h"(187)
+template <typename TContainer> inline typename Reference<Iter<TContainer, PositionIterator> >::Type value(Iter<TContainer, PositionIterator> const & me);       	// "projects/library/seqan/basic/basic_iterator_position.h"(194)
+
+//____________________________________________________________________________
+// valueConstruct
+
+template <typename TIterator> inline void valueConstruct(TIterator it);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(171)
+template <typename TIterator, typename TParam> inline void valueConstruct(TIterator it, TParam const & param_);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(191)
+template <typename TIterator, typename TParam> inline void valueConstruct(TIterator it, TParam const & param_, Move tag);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(212)
+
+//____________________________________________________________________________
+// valueConstructMove
+
+template <typename TIterator, typename TValue> inline void valueConstructMove(TIterator it, TValue const & value);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(276)
+
+//____________________________________________________________________________
+// valueDestruct
+
+template <typename TIterator> inline void valueDestruct(TIterator it);       	// "projects/library/seqan/basic/basic_alphabet_interface.h"(243)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//____________________________________________________________________________
+// _compareBinaryFiles
+
+inline bool _compareBinaryFiles(const char * file1, const char * file2);       	// "projects/library/seqan/basic/basic_debug.h"(131)
+
+//____________________________________________________________________________
+// _compareTextFiles
+
+inline bool _compareTextFiles(const char * file1, const char * file2);       	// "projects/library/seqan/basic/basic_debug.h"(197)
+
+//____________________________________________________________________________
+// _compareTextFilesReadChar
+
+inline void _compareTextFilesReadChar(FILE * fl, char & c, int & num_lb, bool & is_eof);       	// "projects/library/seqan/basic/basic_debug.h"(165)
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/basic/basic_holder.h b/src/SeqAn-1.3/seqan/basic/basic_holder.h
new file mode 100644
index 0000000..98a803e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_holder.h
@@ -0,0 +1,1638 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_HOLDER_H
+#define SEQAN_HEADER_BASIC_HOLDER_H
+
+// TODO(holtgrew): Are holders on pointers used anywhere?
+// TODO(holtgrew): What about Simple holders? What about Tristate2?
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Tags
+
+struct Simple;
+struct Tristate;
+
+template <typename T>
+struct IsSimple;
+
+//////////////////////////////////////////////////////////////////////////////
+// Holder
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.Holder:
+..cat:Basic
+..summary:Manages relationship to another object.
+..signature:Holder<TValue, TSpec>
+..param.TValue:Type of the managed object.
+...metafunction:Metafunction.Value
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:$Tristate$
+..remarks.text:The main purpose of this class is to facilitate the handling of
+member objects. If we want class $A$ to be dependent on or the owner of another object of class $B$, 
+then we add a data member of type $Holder<B>$ to $A$. 
+$Holder$ offers some useful access functions and stores the kind of relationship between $A$ and $B$.
+..include:seqan/basic.h
+*/
+
+template <typename TValue, typename TSpec = Tristate>
+struct Holder;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// METAFUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.Holder
+
+template <typename TValue, typename TSpec>
+struct Value< Holder<TValue, TSpec> >
+{
+	typedef TValue Type;
+};
+template <typename TValue, typename TSpec>
+struct Value< Holder<TValue * const, TSpec> >
+{
+	typedef TValue * Type;
+};
+template <typename TValue, typename TSpec>
+struct Value< Holder<TValue, TSpec> const>
+{
+	typedef TValue Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.Holder
+
+template <typename TValue, typename TSpec>
+struct Spec< Holder<TValue, TSpec> >
+{
+	typedef TSpec Type;
+};
+template <typename TValue, typename TSpec>
+struct Spec< Holder<TValue, TSpec> const>
+{
+	typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Reference.param.T.type:Class.Holder
+
+template <typename TValue, typename TSpec>
+struct Reference< Holder<TValue, TSpec> >
+{
+	typedef typename Value< Holder<TValue, TSpec> >::Type & Type;
+};
+template <typename TValue, typename TSpec>
+struct Reference< Holder<TValue, TSpec> const>
+{
+	typedef typename Value< Holder<TValue, TSpec> const>::Type & Type;
+};
+template <typename TValue, typename TSpec>
+struct Reference< Holder<TValue *, TSpec> const>
+{
+	typedef typename Value< Holder<TValue *, TSpec> const>::Type const & Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Tristate Holder
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Spec.Tristate Holder
+..cat:Holders
+..summary:Holder that can be empty, dependent, or owner.
+..signature:Holder<TValue, Tristate>
+..param.TValue:Type of the managed object.
+..general:Class.Holder
+..remarks.text:A tristate holder $A$ that holds an object $B$ has one of the following states:
+..remarks.text:- owner: $A$ is the owner of $B$. If $A$ is destroyed, $B$ will be destroyed automatically.
+..remarks.text:- dependent: $A$ depends on $B$. $B$ should not be destroyed as long as $A$ is used.
+..remarks.text:- empty: there is currently no object reference stored in the holder $A$.
+..remarks.text:The state of the holder can be determined by @Function.empty@ and @Function.dependent at .
+..include:seqan/basic.h
+*/
+
+/**
+.Memfunc.Holder:
+..class:Class.Holder
+..summary:Constructor
+..signature:Holder<TValue, TInfix> ()
+..signature:Holder<TValue, TInfix> (holder)
+..signature:Holder<TValue, TInfix> (value)
+..param.holder:Another holder object.
+..param.value:An object of type $TValue$.
+..remarks.text:
+The default constructor creates a holder that is in state 'empty'.
+If a $value$ is passed to the constructor, the holder will be in state 'dependent'.
+*/
+/**
+.Memfunc.~Holder:
+..class:Class.Holder
+..summary:Destructor
+..signature:~Holder()
+..remarks.text:
+If the holder is in state 'owner', the holded object will be destoyed too.
+*/
+
+template <typename TValue>
+struct Holder<TValue, Tristate>
+{
+public:
+	enum EHolderState
+	{
+		EMPTY = 0,
+		OWNER = 1,
+		DEPENDENT = ~0
+	};
+
+	typedef typename Value<Holder>::Type THostValue;
+
+	THostValue * data_value;
+	EHolderState data_state;
+
+//____________________________________________________________________________
+
+	Holder():
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+	}
+	Holder(Holder const & source_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+	}
+	Holder(THostValue & value_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		setValue(*this, value_);
+	}
+	Holder(THostValue const & value_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		assignValue(*this, value_);
+	}
+
+	~Holder()
+	{
+SEQAN_CHECKPOINT
+		clear(*this);
+	}
+
+//____________________________________________________________________________
+
+	inline Holder const &
+	operator = (Holder const & source_)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+		return *this;
+	}
+
+	inline Holder const &
+	operator = (THostValue const & value_)
+	{
+SEQAN_CHECKPOINT
+		assignValue(*this, value_);
+		return *this;
+	}
+
+	inline operator THostValue()
+	{
+SEQAN_CHECKPOINT
+		return _dataValue(*this);
+	}
+//____________________________________________________________________________
+
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+struct Holder<TValue const, Tristate>
+{
+public:
+	enum EHolderState
+	{
+		EMPTY = 0,
+		OWNER = 1,
+		DEPENDENT = ~0
+	};
+
+	typedef typename Value<Holder>::Type THostValue;
+
+	THostValue * data_value;
+	EHolderState data_state;
+
+//____________________________________________________________________________
+
+	Holder():
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+	}
+	Holder(Holder const & source_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+	}
+	Holder(TValue & value_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		setValue(*this, value_);
+	}
+	Holder(TValue const & value_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		setValue(*this, value_);
+	}
+
+	~Holder()
+	{
+SEQAN_CHECKPOINT
+		clear(*this);
+	}
+
+//____________________________________________________________________________
+
+	inline Holder const &
+	operator = (Holder const & source_)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+		return *this;
+	}
+
+	inline Holder const &
+	operator = (THostValue const & value_)
+	{
+SEQAN_CHECKPOINT
+		assignValue(*this, value_);
+		return *this;
+	}
+
+	inline operator THostValue()
+	{
+SEQAN_CHECKPOINT
+		return _dataValue(*this);
+	}
+//____________________________________________________________________________
+
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+struct Holder<TValue *, Tristate>
+{
+public:
+	enum EHolderState
+	{
+		EMPTY = 0,
+		OWNER = 1,
+		DEPENDENT = ~0
+	};
+
+	typedef typename Value<Holder>::Type THostValue;
+
+	THostValue data_value;
+	EHolderState data_state;
+
+//____________________________________________________________________________
+
+	Holder():
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+	}
+	Holder(Holder const & source_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+	}
+	Holder(TValue * value_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		setValue(*this, value_);
+	}
+
+	~Holder()
+	{
+SEQAN_CHECKPOINT
+		clear(*this);
+	}
+
+//____________________________________________________________________________
+
+	inline Holder const &
+	operator = (Holder const & source_)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+		return *this;
+	}
+
+	inline Holder const &
+	operator = (THostValue value_)
+	{
+SEQAN_CHECKPOINT
+		setValue(*this, value_);
+		return *this;
+	}
+
+	inline operator THostValue()
+	{
+SEQAN_CHECKPOINT
+		return _dataValue(*this);
+	}
+//____________________________________________________________________________
+
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+struct Holder<TValue * const, Tristate>
+{
+public:
+	enum EHolderState
+	{
+		EMPTY = 0,
+		OWNER = 1,
+		DEPENDENT = ~0
+	};
+
+	typedef typename Value<Holder>::Type THostValue;
+
+	THostValue data_value;
+	EHolderState data_state;
+
+//____________________________________________________________________________
+
+	Holder():
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+	}
+	Holder(Holder const & source_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+	}
+	Holder(TValue * value_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		setValue(*this, value_);
+	}
+
+	~Holder()
+	{
+SEQAN_CHECKPOINT
+		clear(*this);
+	}
+
+//____________________________________________________________________________
+
+	inline Holder const &
+	operator = (Holder const & source_)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+		return *this;
+	}
+
+	inline Holder const &
+	operator = (THostValue value_)
+	{
+SEQAN_CHECKPOINT
+		setValue(*this, value_);
+		return *this;
+	}
+
+	inline operator THostValue()
+	{
+SEQAN_CHECKPOINT
+		return _dataValue(*this);
+	}
+//____________________________________________________________________________
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline typename Reference<Holder<TValue, Tristate> >::Type
+_dataValue(Holder<TValue, Tristate> & me)
+{
+	return * me.data_value;
+}
+template <typename TValue>
+inline typename Reference<Holder<TValue, Tristate> const>::Type
+_dataValue(Holder<TValue, Tristate> const & me)
+{
+	return * me.data_value;
+}
+
+template <typename TValue>
+inline typename Reference<Holder<TValue *, Tristate> >::Type
+_dataValue(Holder<TValue *, Tristate> & me)
+{
+	return me.data_value;
+}
+template <typename TValue>
+inline typename Reference<Holder<TValue *, Tristate> const>::Type
+_dataValue(Holder<TValue *, Tristate> const & me)
+{
+	return me.data_value;
+}
+
+template <typename TValue>
+inline typename Reference<Holder<TValue * const, Tristate> >::Type
+_dataValue(Holder<TValue * const, Tristate> & me)
+{
+	return me.data_value;
+}
+template <typename TValue>
+inline typename Reference<Holder<TValue * const, Tristate> const>::Type
+_dataValue(Holder<TValue * const, Tristate> const & me)
+{
+	return me.data_value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.empty.param.object.type:Class.Holder
+
+template <typename TValue>
+inline bool
+empty(Holder<TValue, Tristate> const & me)
+{
+SEQAN_CHECKPOINT
+	return (me.data_state == Holder<TValue, Tristate>::EMPTY);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.dependent.param.object.type:Class.Holder
+
+template <typename TValue>
+inline bool
+dependent(Holder<TValue, Tristate> const & me)
+{
+SEQAN_CHECKPOINT
+	return (me.data_state == Holder<TValue, Tristate>::DEPENDENT);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue> inline size_t length(TValue const * me);
+template <typename TValue> inline size_t length(TValue * me);
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THolder, typename TValue>
+inline typename Value<THolder, 0>::Type *
+_holderAllocateObject(THolder & me, TValue const & data)
+{	
+	typename Value<THolder>::Type * ret;
+	allocate(me, ret, 1);
+	valueConstruct(ret, data);
+	return ret;
+}
+
+template <typename THolder, typename TValue>
+inline typename Value<THolder, 0>::Type
+_holderAllocatePointer(THolder & me, TValue * data, True)			// is a pointer to an *array* of objects
+{
+	typename Value<THolder>::Type ret;
+	size_t len = length(data)+1;
+	allocate(me, ret, len);
+	arrayConstructCopy(data, data + len, ret);
+	return ret;
+}
+
+template <typename THolder, typename TValue>
+inline typename Value<THolder, 0>::Type
+_holderAllocatePointer(THolder & /*me*/, TValue * data, False)			// is a pointer to *one* object
+{
+	return data;
+}
+
+template <typename THolder, typename TValue>
+inline typename Value<THolder, 0>::Type
+_holderAllocatePointer(THolder & me, TValue * data)
+{
+	return _holderAllocatePointer(me, data, IsSimple<TValue>());	// try to distinguish between a pointer to one/array of object(s)
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THolder, typename TValue>
+inline void
+_holderDeallocate(THolder & me, TValue const & data)
+{	
+	valueDestruct(& data);
+	deallocate(me, & data, 1);
+}
+
+template <typename THolder, typename TValue>
+inline void
+_holderDeallocate(THolder & me, TValue * data, True)				// is a pointer to an *array* of objects
+{
+	size_t len = length(data)+1;
+	arrayDestruct(data, data+len);
+	deallocate(me, data, len);
+}
+
+template <typename THolder, typename TValue>
+inline void
+_holderDeallocate(THolder & /*me*/, TValue * /*data*/, False)				// is a pointer to *one* object
+{
+}
+
+template <typename THolder, typename TValue>
+inline void
+_holderDeallocate(THolder & me, TValue * data)
+{
+	return _holderDeallocate(me, data, IsSimple<TValue>());			// try to distinguish between a pointer to one/array of object(s)
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.clear.param.object.type:Class.Holder
+///.Function.clear.remarks.text:If $clear$ is applied on a @Class.Holder@ object,
+///the state of this object is set to 'empty'.
+
+template <typename TValue>
+inline void
+clear(Holder<TValue, Tristate> & me)
+{
+	switch (me.data_state)
+	{
+	case Holder<TValue, Tristate>::EMPTY:
+		break;
+
+	case Holder<TValue, Tristate>::DEPENDENT:
+		{
+SEQAN_CHECKPOINT
+		me.data_state = Holder<TValue, Tristate>::EMPTY;
+		}
+		break;
+
+	default: /*Holder<TValue, TSpec>::OWNER*/
+		{
+SEQAN_CHECKPOINT
+		_holderDeallocate(me, _dataValue(me));
+		me.data_state = Holder<TValue, Tristate>::EMPTY;
+		}
+		break;
+	}
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.create:
+..summary:Makes an object to owner of its content.
+..cat:Dependent Objects
+..signature:create(holder [, object])
+..param.holder:A holder object.
+...type:Class.Holder
+..param.object:Object from which a copy is made and stored in $holder$. (optional)
+...type:Metafunction.Value.Value<Holder>::Type
+..remarks.text:After this operation, $holder$ will be in state 'owner'.
+If $object$ is specified, $holder$ will hold a copy of $object$ at the end of this function.
+If $object$ is not specified, the action depends on the former state of $holder$:
+..remarks.text:- If the state of $holder$ was 'empty', a new object is default constructed and stored into $holder$.
+..remarks.text:- If the state of $holder$ was 'dependent', a copy of the former object is made and stored into $holder$. 
+..remarks.text:- If the state of $holder$ was already 'owner', nothing happens.
+..see:Class.Holder
+..include:seqan/basic.h
+*/
+
+template <typename TValue>
+inline void
+create(Holder<TValue, Tristate> & me)
+{
+	typedef Holder<TValue, Tristate> THolder;
+
+	switch (me.data_state)
+	{
+	case Holder<TValue, Tristate>::EMPTY:
+		{
+SEQAN_CHECKPOINT
+		allocate(me, me.data_value, 1);
+		valueConstruct(me.data_value);
+		me.data_state = THolder::OWNER;
+		}
+		break;
+
+	case THolder::DEPENDENT:
+		{
+SEQAN_CHECKPOINT
+		create(me, _dataValue(me));
+		}
+		break;
+	default:;
+	}
+}
+
+
+template <typename TValue>
+inline void
+create(Holder<TValue *, Tristate> & me)
+{
+	typedef Holder<TValue *, Tristate> THolder;
+
+	switch (me.data_state)
+	{
+	case Holder<TValue *, Tristate>::EMPTY:
+		{
+SEQAN_CHECKPOINT
+		valueConstruct(& me.data_value);
+		me.data_state = THolder::OWNER;
+		}
+		break;
+
+	case THolder::DEPENDENT:
+		{
+SEQAN_CHECKPOINT
+		create(me, _dataValue(me));
+		}
+		break;
+	default:;
+	}
+}
+
+template <typename TValue>
+inline void
+create(Holder<TValue * const, Tristate> & me)
+{
+	typedef Holder<TValue *, Tristate> THolder;
+
+	switch (me.data_state)
+	{
+	case Holder<TValue *, Tristate>::EMPTY:
+		{
+SEQAN_CHECKPOINT
+		valueConstruct(& me.data_value);
+		me.data_state = THolder::OWNER;
+		}
+		break;
+
+	case THolder::DEPENDENT:
+		{
+SEQAN_CHECKPOINT
+		create(me, _dataValue(me));
+		}
+		break;
+	default:;
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, typename TValue2>
+inline void
+create(Holder<TValue, Tristate> & me,
+	   TValue2 & value_)
+{
+SEQAN_CHECKPOINT
+
+	if (me.data_state == Holder<TValue, Tristate>::OWNER)
+	{
+		assign(_dataValue(me), value_);
+		return;
+	}
+
+	clear(me);
+	me.data_value = _holderAllocateObject(me, value_);
+	me.data_state = Holder<TValue, Tristate>::OWNER;
+}
+
+template <typename TValue, typename TValue2>
+inline void
+create(Holder<TValue const, Tristate> & me,
+	   TValue2 & value_)
+{
+SEQAN_CHECKPOINT
+
+	clear(me);
+	me.data_value = _holderAllocateObject(me, value_);
+	me.data_state = Holder<TValue const, Tristate>::OWNER;
+}
+
+template <typename TValue, typename TValue2>
+inline void
+create(Holder<TValue *, Tristate> & me,
+	   TValue2 & value_)
+{
+SEQAN_CHECKPOINT
+
+	clear(me);
+	me.data_value = _holderAllocatePointer(me, value_);
+	me.data_state = Holder<TValue *, Tristate>::OWNER;
+}
+
+template <typename TValue, typename TValue2>
+inline void
+create(Holder<TValue * const, Tristate> & me,
+	   TValue2 & value_)
+{
+SEQAN_CHECKPOINT
+
+	clear(me);
+	me.data_value = _holderAllocatePointer(me, value_);
+	me.data_state = Holder<TValue *, Tristate>::OWNER;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.detach:
+..summary:Makes an object independent from other objects.
+..cat:Dependent Objects
+..signature:detach(object)
+..param.object:An object.
+...type:Class.Holder
+..remarks:
+After this function, $object$ does not depends from any other entity outside of $object$,
+like a @Function.source@ or a @Function.host@, and @Function.dependent.dependent(object)@ returns $false$ 
+..see:Function.source
+..see:Function.host
+..see:Function.createSource
+..see:Function.create
+..include:seqan/basic.h
+*/
+
+template <typename TValue>
+inline void
+detach(Holder<TValue, Tristate> & me)
+{
+SEQAN_CHECKPOINT
+	create(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.setValue:
+..cat:Content Manipulation
+..summary:Makes holder dependent.
+..signature:setValue(holder, object)
+..param.holder:A holder object.
+...type:Class.Holder
+..param.object:Object from which $holder$ will be dependent.
+...type:Metafunction.Value.Value<Holder>::Type
+..remarks.text:After this operation, $holder$ will be dependent in state 'dependent'.
+..see:Class.Holder
+..include:seqan/basic.h
+*/
+
+template <typename TValue>
+inline void
+setValue(Holder<TValue, Tristate> & me,
+		 TValue & value_)
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = & value_;
+	me.data_state = Holder<TValue, Tristate>::DEPENDENT;
+}
+
+//____________________________________________________________________________
+
+template <typename TValue>
+inline void
+setValue(Holder<TValue const, Tristate> & me,
+		 TValue & value_)
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = & value_;
+	me.data_state = Holder<TValue const, Tristate>::DEPENDENT;
+}
+
+//____________________________________________________________________________
+
+template <typename TValue>
+inline void
+setValue(Holder<TValue *, Tristate> & me,
+		 TValue * & value_)
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = value_;
+	me.data_state = Holder<TValue *, Tristate>::DEPENDENT;
+}
+
+template <typename TValue>
+inline void
+setValue(Holder<TValue *, Tristate> & me,
+		 TValue * const & value_)
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = value_;
+	me.data_state = Holder<TValue *, Tristate>::DEPENDENT;
+}
+
+template <typename TValue>
+inline void
+setValue(Holder<TValue * const, Tristate> & me,
+		 TValue * & value_)
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = value_;
+	me.data_state = Holder<TValue *, Tristate>::DEPENDENT;
+}
+
+template <typename TValue>
+inline void
+setValue(Holder<TValue * const, Tristate> & me,
+		 TValue * const & value_)
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = value_;
+	me.data_state = Holder<TValue *, Tristate>::DEPENDENT;
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, size_t I>
+inline void
+setValue(Holder<TValue *, Tristate> & me,
+		 TValue (& value_)[I])
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = value_;
+	me.data_state = Holder<TValue *, Tristate>::DEPENDENT;
+}
+
+template <typename TValue, size_t I>
+inline void
+setValue(Holder<TValue *, Tristate> & me,
+		 TValue const (& value_)[I])
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = value_;
+	me.data_state = Holder<TValue *, Tristate>::DEPENDENT;
+}
+
+template <typename TValue, size_t I>
+inline void
+setValue(Holder<TValue * const, Tristate> & me,
+		 TValue (& value_)[I])
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = value_;
+	me.data_state = Holder<TValue *, Tristate>::DEPENDENT;
+}
+
+template <typename TValue, size_t I>
+inline void
+setValue(Holder<TValue * const, Tristate> & me,
+		 TValue const (& value_)[I])
+{
+SEQAN_CHECKPOINT
+	clear(me);
+	me.data_value = value_;
+	me.data_state = Holder<TValue *, Tristate>::DEPENDENT;
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, typename TValue2>
+inline void
+setValue(Holder<TValue, Tristate> & me,
+		 TValue2 & value_)
+{
+SEQAN_CHECKPOINT
+	set(value(me), value_);
+}
+
+template <typename TValue, typename TValue2>
+inline void
+setValue(Holder<TValue, Tristate> & me,
+		 TValue2 const & value_)
+{
+SEQAN_CHECKPOINT
+	set(value(me), value_);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.value.param.object.type:Class.Holder
+
+template <typename TValue>
+inline typename Reference<Holder<TValue, Tristate> >::Type
+value(Holder<TValue, Tristate> & me)
+{
+SEQAN_CHECKPOINT
+	typedef Holder<TValue, Tristate> THolder;
+
+	if (empty(me))
+	{
+		create(me);
+	}
+
+	return _dataValue(me);
+}
+
+template <typename TValue>
+inline typename Reference<Holder<TValue, Tristate> const>::Type
+value(Holder<TValue, Tristate> const & me)
+{
+SEQAN_CHECKPOINT
+	SEQAN_ASSERT(!empty(me));
+
+	return _dataValue(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.assignValue.param.object.type:Class.Holder
+
+template <typename TValue, typename TSource>
+inline void
+assignValue(Holder<TValue, Tristate> & me,
+			TSource const & value_)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<Holder<TValue, Tristate> >::Type THostValue;
+	if (empty(me))
+	{
+		create(me, value_);
+	}
+	else
+	{
+		assign(_dataValue(me), value_);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.moveValue.param.object.type:Class.Holder
+
+template <typename TValue, typename TSource>
+inline void
+moveValue(Holder<TValue, Tristate> & me,
+		  TSource const & value_)
+{
+SEQAN_CHECKPOINT
+	if (empty(me))
+	{
+		create(me, value_);
+	}
+	else
+	{
+		move(_dataValue(me), value_);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.assign.param.target.type:Class.Holder
+///.Function.assign.param.source.type:Class.Holder
+
+template <typename TValue>
+inline void
+assign(Holder<TValue, Tristate> & target_,
+	   Holder<TValue, Tristate> const & source_)
+{
+SEQAN_CHECKPOINT
+	switch(source_.data_state)
+	{
+	case Holder<TValue, Tristate>::EMPTY:
+		{
+		clear(target_);
+		}
+		break;
+
+	case Holder<TValue, Tristate>::OWNER:
+		{
+		assignValue(target_, value(source_));
+		}
+		break;
+
+	default: /*case Holder<TValue, Tristate>::DEPENDENT*/
+		{
+		setValue(target_, value(source_));
+		}
+		break;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Simple Holder
+//////////////////////////////////////////////////////////////////////////////
+//??? TODO: Documentation of Simple Holder
+
+#ifdef PLATFORM_WINDOWS_VS
+// Disable warning C4521 locally (multiple copy constructors).
+#pragma warning( push )
+#pragma warning( disable: 4521 )
+#endif  // PLATFORM_WINDOWS_VS
+
+template <typename TValue>
+struct Holder<TValue, Simple>
+{
+	typedef typename Value<Holder>::Type THolderValue;
+	typedef typename Parameter_<THolderValue>::Type THolderParameter;
+
+	mutable typename RemoveConst_<THolderValue>::Type data_value;
+//____________________________________________________________________________
+
+	Holder()
+	{
+SEQAN_CHECKPOINT
+	}
+	Holder(Holder & source_):
+		data_value(source_.data_value)
+	{
+SEQAN_CHECKPOINT
+	}
+	Holder(Holder const & source_):
+		data_value(source_.data_value)
+	{
+SEQAN_CHECKPOINT
+	}
+	template <typename TSource>
+	Holder(TSource & value_):
+		data_value(value_)
+	{
+SEQAN_CHECKPOINT
+	}
+	template <typename TSource>
+	Holder(TSource const & value_):
+		data_value(value_)
+	{
+SEQAN_CHECKPOINT
+	}
+/*
+	Holder(TValue const & value_):
+		data_value(value_)
+	{
+SEQAN_CHECKPOINT
+	}
+*/
+	~Holder()
+	{
+SEQAN_CHECKPOINT
+	}
+
+//____________________________________________________________________________
+
+	Holder const &
+	operator = (Holder const & source_)
+	{
+SEQAN_CHECKPOINT
+		data_value = source_.data_value;
+		return *this;
+	}
+
+	Holder const &
+	operator = (THolderValue const & value_)
+	{
+SEQAN_CHECKPOINT
+		data_value = value_;
+		return *this;
+	}
+
+	operator THolderParameter()
+	{
+SEQAN_CHECKPOINT
+		return *data_value;
+	}
+//____________________________________________________________________________
+};
+
+#ifdef PLATFORM_WINDOWS_VS
+// Set old warning C4521 state again (multiple copy constructors).
+#pragma warning( pop )
+#endif  // PLATFORM_WINDOWS_VS
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline bool
+empty(Holder<TValue, Simple> const & /*me*/)
+{
+SEQAN_CHECKPOINT
+	return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline bool
+dependent(Holder<TValue, Simple> const & /*me*/)
+{
+SEQAN_CHECKPOINT
+	return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void
+clear(Holder<TValue, Simple> & /*me*/)
+{
+SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void
+create(Holder<TValue, Simple> & /*me*/)
+{
+SEQAN_CHECKPOINT
+}
+
+//____________________________________________________________________________
+
+template <typename TValue>
+inline void
+create(Holder<TValue, Simple> & me,
+	   TValue const & value_)
+{
+SEQAN_CHECKPOINT
+	me.data_value = value_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void
+detach(Holder<TValue, Simple> & /*me*/)
+{
+SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void
+setValue(Holder<TValue, Simple> & me,
+		 TValue const & value_)
+{
+SEQAN_CHECKPOINT
+	me.data_value = value_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline typename Reference<Holder<TValue, Simple> >::Type
+value(Holder<TValue, Simple> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_value;
+}
+template <typename TValue>
+inline typename Reference<Holder<TValue, Simple> const>::Type
+value(Holder<TValue, Simple> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSource>
+inline void
+assignValue(Holder<TValue, Simple> & me,
+			TSource const & value_)
+{
+SEQAN_CHECKPOINT
+	assignValue(me.data_value, value_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSource>
+inline void
+moveValue(Holder<TValue, Simple> & me,
+		  TSource const & value_)
+{
+SEQAN_CHECKPOINT
+	move(me.data_value, value_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void
+assign(Holder<TValue, Simple> & target_,
+	   Holder<TValue, Simple> const & source_)
+{
+SEQAN_CHECKPOINT
+	assignValue(target_, source_);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// New Tristate Holder that works also on pointers
+//////////////////////////////////////////////////////////////////////////////
+
+struct Tristate2;
+
+template <typename TValue>
+struct Holder<TValue, Tristate2>
+{
+public:
+	enum EHolderState
+	{
+		EMPTY = 0,
+		OWNER = 1,
+		DEPENDENT = ~0
+	};
+
+	typedef typename Value<Holder>::Type THostValue;
+
+	TValue * data_value;
+	EHolderState data_state;
+
+//____________________________________________________________________________
+
+	Holder():
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+	}
+	Holder(Holder const & source_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+	}
+	Holder(typename Parameter_<THostValue>::Type value_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		setValue(*this, value_);
+	}
+	/*
+	Holder(typename ConstParameter_<THostValue>::Type value_):
+		data_state(EMPTY)
+	{
+SEQAN_CHECKPOINT
+		assignValue(*this, value_);
+	}
+	*/
+	~Holder()
+	{
+SEQAN_CHECKPOINT
+		clear(*this);
+	}
+
+//____________________________________________________________________________
+
+	Holder const &
+	operator = (Holder const & source_)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source_);
+		return *this;
+	}
+
+	Holder const &
+	operator = (TValue const & value_)
+	{
+SEQAN_CHECKPOINT
+		assignValue(*this, value_);
+		return *this;
+	}
+
+	operator TValue &()
+	{
+SEQAN_CHECKPOINT
+		return *data_value;
+	}
+//____________________________________________________________________________
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.empty.param.object.type:Class.Holder
+
+template <typename TValue>
+inline bool
+empty(Holder<TValue, Tristate2> const & me)
+{
+SEQAN_CHECKPOINT
+	return (me.data_state == Holder<TValue, Tristate2>::EMPTY);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.dependent.param.object.type:Class.Holder
+
+template <typename TValue>
+inline bool
+dependent(Holder<TValue, Tristate2> const & me)
+{
+SEQAN_CHECKPOINT
+	return (me.data_state == Holder<TValue, Tristate2>::DEPENDENT);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.clear.param.object.type:Class.Holder
+///.Function.clear.remarks.text:If $clear$ is applied on a @Class.Holder@ object,
+///the state of this object is set to 'empty'.
+
+template <typename TValue>
+inline void
+clear(Holder<TValue, Tristate2> & me)
+{
+	switch (me.data_state)
+	{
+	case Holder<TValue, Tristate2>::EMPTY:
+		break;
+
+	case Holder<TValue, Tristate2>::DEPENDENT:
+		{
+SEQAN_CHECKPOINT
+		me.data_state = Holder<TValue, Tristate2>::EMPTY;
+		}
+		break;
+
+	default: /*Holder<TValue, TSpec>::OWNER*/
+		{
+SEQAN_CHECKPOINT
+		valueDestruct(me.data_value);
+		deallocate(me, me.data_value, 1);
+		me.data_state = Holder<TValue, Tristate2>::EMPTY;
+		}
+		break;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TValue>
+inline void
+create(Holder<TValue, Tristate2> & me)
+{
+	typedef Holder<TValue, Tristate2> THolder;
+
+	switch (me.data_state)
+	{
+	case Holder<TValue, Tristate2>::EMPTY:
+		{
+SEQAN_CHECKPOINT
+		allocate(me, me.data_value, 1);
+		valueConstruct(me.data_value);
+		me.data_state = THolder::OWNER;
+		}
+		break;
+
+	case THolder::DEPENDENT:
+		{
+SEQAN_CHECKPOINT
+		TValue & old_value = value(me);
+		allocate(me, me.data_value, 1);
+		valueConstruct(me.data_value, old_value);
+		me.data_state = THolder::OWNER;
+		}
+		break;
+	default:;
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename TValue>
+inline void
+create(Holder<TValue, Tristate2> & me,
+	   TValue const & value_)
+{
+SEQAN_CHECKPOINT
+
+	if (me.data_state == Holder<TValue, Tristate2>::OWNER)
+	{
+		assign(*(me.data_value), value_);
+		return;
+	}
+
+	clear(me);
+	allocate(me, me.data_value, 1);
+	valueConstruct(me.data_value, value_);
+	me.data_state = Holder<TValue, Tristate2>::OWNER;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TValue>
+inline void
+detach(Holder<TValue, Tristate2> & me)
+{
+SEQAN_CHECKPOINT
+	create(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TValue>
+inline void
+setValue(Holder<TValue, Tristate2> & me,
+		 TValue & value_)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<Holder<TValue, Tristate2> >::Type THolderType;
+
+	clear(me);
+	me.data_value = & value_;
+	me.data_state = Holder<TValue, Tristate2>::DEPENDENT;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.value.param.object.type:Class.Holder
+
+template <typename TValue>
+inline typename Reference<Holder<TValue, Tristate2> >::Type
+value(Holder<TValue, Tristate2> & me)
+{
+SEQAN_CHECKPOINT
+	typedef Holder<TValue, Tristate2> THolder;
+
+	if (empty(me))
+	{
+		allocate(me, me.data_value, 1);
+		valueConstruct(me.data_value);
+		me.data_state = THolder::OWNER;
+	}
+
+	typedef typename Value<Holder<TValue, Tristate2> >::Type THolderType;
+	return *(me.data_value);
+}
+template <typename TValue>
+inline typename Reference<Holder<TValue, Tristate2> const>::Type
+value(Holder<TValue, Tristate2> const & me)
+{
+SEQAN_CHECKPOINT
+	SEQAN_ASSERT(!empty(me));
+
+	return *(me.data_value);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.assignValue.param.object.type:Class.Holder
+
+template <typename TValue, typename TSource>
+inline void
+assignValue(Holder<TValue, Tristate2> & me,
+			TSource const & value_)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<Holder<TValue, Tristate2> >::Type THostValue;
+	if (empty(me))
+	{
+		create(me, value_);
+	}
+	else
+	{
+		assign(*(me.data_value), value_);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.moveValue.param.object.type:Class.Holder
+
+template <typename TValue, typename TSource>
+inline void
+moveValue(Holder<TValue, Tristate2> & me,
+		  TSource const & value_)
+{
+SEQAN_CHECKPOINT
+	if (empty(me))
+	{
+		create(me, value_);
+	}
+	else
+	{
+		move(value(me), value_);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.assign.param.target.type:Class.Holder
+///.Function.assign.param.source.type:Class.Holder
+
+template <typename TValue>
+inline void
+assign(Holder<TValue, Tristate2> & target_,
+	   Holder<TValue, Tristate2> const & source_)
+{
+SEQAN_CHECKPOINT
+	switch(source_.data_state)
+	{
+	case Holder<TValue, Tristate2>::EMPTY:
+		{
+		clear(target_);
+		}
+		break;
+
+	case Holder<TValue, Tristate2>::OWNER:
+		{
+		assignValue(target_, value(source_));
+		}
+		break;
+
+	default: /*case Holder<TValue, Tristate2>::DEPENDENT*/
+		{
+		setValue(target_, value(source_));
+		}
+		break;
+	}
+}
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
+
diff --git a/src/SeqAn-1.3/seqan/basic/basic_holder_dynamic.h b/src/SeqAn-1.3/seqan/basic/basic_holder_dynamic.h
new file mode 100644
index 0000000..7f9909d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_holder_dynamic.h
@@ -0,0 +1,210 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_HOLDER_DYNAMIC_H
+#define SEQAN_HEADER_BASIC_HOLDER_DYNAMIC_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+class VoidHolder
+{
+public:
+	char * _data;
+	size_t _length;
+	bool _empty;
+
+	VoidHolder()
+		: _length(0)
+		, _empty(true)
+	{ }
+	VoidHolder(VoidHolder const & other)
+		: _length(other._length)
+		, _empty(other._empty)
+	{ 
+		if (_length)
+		{
+			allocate(*this, _data, _length);
+			arrayCopyForward(other._data, other._data + _length, _data);
+		}
+	}
+	template <typename TValue>
+	VoidHolder(TValue const & val)
+		: _length(0)
+		, _empty(true)
+	{
+		assign(*this, val);
+	}
+
+	~VoidHolder()
+	{
+		if (_length)
+		{
+			deallocate(*this, _data, _length);
+			_length = 0;
+		}
+	}
+
+	VoidHolder const & 
+	operator = (VoidHolder const & other)
+	{
+		_empty = other._empty;
+		if (!_empty)
+		{
+			if (_length < other._length)
+			{
+				deallocate(*this, _data, _length);
+				_length = other._length;
+				allocate(*this, _data, _length);
+			}
+			arrayCopyForward(other._data, other._data + other._length, _data);
+		}
+		return *this;
+	}
+	template <typename TValue>
+	VoidHolder const & 
+	operator = (TValue const & val)
+	{
+		assign(*this, val);
+		return *this;
+	}
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+inline bool
+empty(VoidHolder & me)
+{
+	return me._empty;
+}
+inline bool
+empty(VoidHolder const & me)
+{
+	return me._empty;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+inline void
+clear(VoidHolder & me)
+{
+	me._empty = true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize>
+inline void
+resize(VoidHolder & me, 
+	   TSize length)
+{
+	if (me._length < length)
+	{
+		deallocate(me, me._data, me._length);
+		me._length = length;
+		allocate(me, me._data, me._length);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline TValue &
+create(VoidHolder & me)
+{
+	resize(me, sizeof(TValue));
+	valueConstruct(reinterpret_cast<TValue *>(me._data));
+	me._empty = false;
+	return * reinterpret_cast<TValue *>(me._data);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void
+destroy(VoidHolder & me)
+{
+	if (empty(me)) return;
+	me._empty = true;
+
+	SEQAN_ASSERT(me._length >= sizeof(TValue))
+	valueDestruct(reinterpret_cast<TValue *>(me._data));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline TValue &
+value(VoidHolder & me)
+{
+	if (me._empty)
+	{
+		return create<TValue>(me);
+	}
+	return * reinterpret_cast<TValue *>(me._data);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline TValue &
+getValue(VoidHolder & me)
+{
+	return * reinterpret_cast<TValue *>(me._data);
+}
+template <typename TValue>
+inline TValue const &
+getValue(VoidHolder const & me)
+{
+	return * reinterpret_cast<TValue const *>(me._data);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline void
+assign(VoidHolder & me, 
+	   TValue const & val)
+{
+	assign(value<TValue>(me), val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
+
diff --git a/src/SeqAn-1.3/seqan/basic/basic_host.h b/src/SeqAn-1.3/seqan/basic/basic_host.h
new file mode 100644
index 0000000..3cdf9af
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_host.h
@@ -0,0 +1,183 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_HOST_H
+#define SEQAN_HEADER_BASIC_HOST_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// Host Functions
+//////////////////////////////////////////////////////////////////////////////
+//these functions assume that the hosted object exports a function "_dataHost"
+//that returns a reference to a holder type of Host<T>::Type & 
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline bool
+emptyHost(T const & me)
+{
+SEQAN_CHECKPOINT
+	return empty(_dataHost(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline bool
+dependentHost(T const & me)
+{
+SEQAN_CHECKPOINT
+	return dependent(_dataHost(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline void
+clearHost(T & me)
+{
+SEQAN_CHECKPOINT
+	clear(_dataHost(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline void
+createHost(T & me)
+{
+SEQAN_CHECKPOINT
+	create(_dataHost(me));
+}
+
+//____________________________________________________________________________
+
+template <typename T, typename THost>
+inline void
+createHost(T & me,
+		   THost & host_)
+{
+SEQAN_CHECKPOINT
+	create(_dataHost(me), host_);
+}
+template <typename T, typename THost>
+inline void
+createHost(T & me,
+		   THost const & host_)
+{
+SEQAN_CHECKPOINT
+	create(_dataHost(me), host_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename THost>
+inline void
+setHost(T & me,
+		THost & host_)
+{
+SEQAN_CHECKPOINT
+	setValue(_dataHost(me), host_);
+}
+template <typename T, typename THost>
+inline void
+setHost(T & me,
+		THost const & host_)
+{
+SEQAN_CHECKPOINT
+	setValue(_dataHost(me), host_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline typename Host<T>::Type &
+host(T & me)
+{
+SEQAN_CHECKPOINT
+	return value(_dataHost(me));
+}
+template <typename T>
+inline typename Host<T const>::Type &
+host(T const & me)
+{
+SEQAN_CHECKPOINT
+	return value(_dataHost(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename THost>
+inline void
+assignHost(T & me,
+		   THost & host_)
+{
+SEQAN_CHECKPOINT
+	assignValue(_dataHost(me), host_);
+}
+template <typename T, typename THost>
+inline void
+assignHost(T & me,
+		   THost const & host_)
+{
+SEQAN_CHECKPOINT
+	assignValue(_dataHost(me), host_);
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename THost>
+inline void
+moveHost(T & me,
+		 THost & host_)
+{
+SEQAN_CHECKPOINT
+	moveValue(_dataHost(me), host_);
+}
+template <typename T, typename THost>
+inline void
+moveHost(T & me,
+		 THost const & host_)
+{
+SEQAN_CHECKPOINT
+	moveValue(_dataHost(me), host_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
+
diff --git a/src/SeqAn-1.3/seqan/basic/basic_iterator.h b/src/SeqAn-1.3/seqan/basic/basic_iterator.h
new file mode 100644
index 0000000..5f513b3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_iterator.h
@@ -0,0 +1,805 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ITERATOR_H
+#define SEQAN_HEADER_BASIC_ITERATOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// TAGS
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Iterator Spec:
+..summary:Specifies the kind of an iterator.
+..tag.Rooted:Rooted iterator. 
+...remarks
+....text:This iterator implements some more advanced functions like
+ at Function.container@ and @Function.position at .
+....concept:Concept.Rooted Iterator
+..tag.Standard:Standard conform iterator. 
+...remarks
+....text:Note that standard iterators need not to implement all functions
+that are available for rooted iterators.
+....concept:Concept.Iterator
+..remarks.text:The default iterator spec is given by @Metafunction.DefaultIteratorSpec at .
+..see:Metafunction.DefaultIteratorSpec
+..see:Concept.Iterator
+..include:seqan/basic.h
+*/
+
+struct Rooted_;
+typedef Tag<Rooted_> const Rooted;
+
+struct Standard_;
+typedef Tag<Standard_> const Standard;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// METAFUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.DefaultIteratorSpec:
+..hidefromindex
+..summary:Specifies default kind of iterator.
+..signature:DefaultIteratorSpec<T>::Type
+..param.T:Container type for which the default iterator spec is determined.
+...concept:Concept.Container
+..returns.param.Type:Iterator spec of $T$.
+..see:Metafunction.Iterator
+..include:seqan/basic.h
+*/
+
+template <typename T>
+struct DefaultIteratorSpec
+{
+	typedef Standard Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.DefaultGetIteratorSpec:
+..hidefromindex
+..summary:Specifies default kind of iterator returned by functions.
+..signature:DefaultGetIteratorSpec<T>::Type
+..param.T:Container type for which the spec is determined.
+...concept:Concept.Container
+..returns.param.Type:Iterator spec of $T$.
+..remarks:This metafunction returns the iterator spec of iterators that are returned by functions like 
+ at Function.begin@, @Function.end@, or @Function.iter at .
+..see:Metafunction.Iterator
+..see:Metafunction.DefaultIteratorSpec
+..include:seqan/basic.h
+*/
+
+template <typename T>
+struct DefaultGetIteratorSpec
+{
+	typedef Rooted Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Iterator:
+..summary:Type of iterator objects that are used to traverse the container.
+..signature:Iterator<T, TSpec>::Type
+..param.T:Type for which the iterator type is determined.
+...concept:Concept.Container
+...type:Class.Iter
+..param.TSpec:Specifies an @Tag.Iterator Spec.iterator spec at .
+...default:The default iterator spec is given by @Metafunction.DefaultIteratorSpec at .
+..returns.param.Type:Iterator type of $T$.
+..remarks.text:Iterators behave like pointers in some respects. 
+ For example, you can use $*it$ to access the value object the iterator $it$ points to.
+ But note that $Iterator<T>::Type$ can differ from $T *$, depending on $T$.
+..see:Metafunction.Position
+..include:seqan/basic.h
+*/
+
+//____________________________________________________________________________
+
+template <typename T, typename TSpec>
+struct Iterator_Default_Imp;
+
+//Iterator_Default_Imp<T, Standard> is implemented in basic_iterator_simple.h
+//Iterator_Default_Imp<T, Rooted> is implemented in basic_iterator_adaptor.h 
+
+//____________________________________________________________________________
+
+template <typename T, typename TSpec = typename DefaultIteratorSpec<T>::Type>
+struct Iterator:
+	Iterator_Default_Imp<T, TSpec>
+{
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Container:
+..summary:Type of the container given an iterator.
+..signature:Container<T>::Type
+..param.T:Iterator type.
+...type:Class.Iter
+...concept:Concept.Iterator
+..returns.param.Type:The container type to $T$.
+..include:seqan/basic.h
+*/
+
+template <typename T>
+struct Container
+{
+	typedef T Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// GENERAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// value
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.value:
+..signature:Reference value(object)
+..param.object:An object that holds a value or an iterator that points to a value.
+...type:Class.Iter
+...concept:Concept.Iterator
+..include:seqan/basic.h
+*/
+
+template <typename T>
+inline typename Reference<T>::Type
+value(T & me)
+{
+SEQAN_CHECKPOINT
+	return *me;
+} 
+template <typename T>
+inline typename Reference<T const>::Type
+value(T const & me)
+{
+SEQAN_CHECKPOINT
+	return *me;
+} 
+
+
+template <typename T>
+inline T &
+value(T * me)
+{
+SEQAN_CHECKPOINT
+	return *me;
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+// getValue
+//////////////////////////////////////////////////////////////////////////////
+
+//unary getValue
+/**
+.Function.getValue:
+..cat:Iteration
+..signature:GetValue getValue(object)
+..param.object:An object that holds a value or points to a value.
+...type:Class.Iter
+...concept:Concept.Iterator
+..see:Metafunction.GetValue
+..include:seqan/basic.h
+*/
+
+template <typename T>
+inline typename GetValue<T>::Type
+getValue(T & me)
+{
+SEQAN_CHECKPOINT
+	return value(me);
+} 
+template <typename T>
+inline typename GetValue<T const>::Type
+getValue(T const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me);
+} 
+
+template <typename T>
+inline T &
+getValue(T * me)
+{
+SEQAN_CHECKPOINT
+	return value(me);
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+//toGetValue
+//////////////////////////////////////////////////////////////////////////////
+//Nimmt eine Reference und macht daraus einen GetValue
+//???TODO toGetValue()
+
+//////////////////////////////////////////////////////////////////////////////
+// assignValue
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.assignValue:
+..cat:Iteration
+..summary:Assigns value to item.
+..signature:assignValue(object, value)
+..param.object:An object that holds a value or points to a value.
+...type:Class.Iter
+...concept:Concept.Iterator
+..param.value:A value that is assigned to the item $object$ holds or points to.
+..remarks.text:This function is similar to @Function.assign at .
+The difference is, that $assignValue$ just changes a value stored in $object$ or the value $object$ points to, 
+while @Function.assign@ changes the whole object.
+..see:Function.assign
+..include:seqan/basic.h
+*/
+
+template <typename T, typename TValue>
+inline void
+assignValue(T & me,
+			TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	assign(value(me), _value);
+} 
+
+//const version for iterators as targets
+template <typename T, typename TValue>
+inline void
+assignValue(T const & me,
+			TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	assign(value(me), _value);
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+// moveValue
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.moveValue:
+..cat:Iteration
+..summary:Assigns value to item.
+..signature:moveValue(object, value)
+..param.object:An object that holds a value or points to a value.
+...type:Class.Iter
+...concept:Concept.Iterator
+..param.value:A value that is handed over to the item $object$ holds or points to.
+..remarks.text:This function is similar to @Function.move at .
+The difference is, that $moveValue$ just changes a value stored in $object$ or the value $object$ points to, 
+while @Function.move@ changes the whole object.
+..see:Function.move
+..see:Function.assignValue
+..include:seqan/basic.h
+*/
+
+template <typename T, typename TValue>
+inline void
+moveValue(T & me,
+		  TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	move(value(me), _value);
+}
+//const version for iterators as targets
+template <typename T, typename TValue>
+inline void
+moveValue(T const & me,
+		  TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	move(value(me), _value);
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.container:
+..cat:Iteration
+..summary:Container of an iterator.
+..signature:Container container(iterator)
+..param.iterator:An iterator.
+...type:Class.Iter
+...concept:Concept.Rooted Iterator
+..returns:The container that $iterator$ traverses.
+...metafunction:Metafunction.Container
+..include:seqan/basic.h
+*/
+
+template <typename T>
+inline typename Container<T>::Type &
+container(T me)
+{
+SEQAN_CHECKPOINT
+	return me;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.position:
+..summary:Position of an iterator.
+..cat:Iteration
+..signature:Position position(iterator [, container])
+..param.iterator:An iterator.
+...type:Class.Iter
+...concept:Concept.Iterator
+..param.container:A container.
+...concept:Concept.Container
+...remarks:If $iterator$ implements @Concept.Rooted Iterator@, then $container$ is optional.
+...remarks:If $container$ is specified, $iterator$ must be a container of $container$.
+..returns:The position of the value in the container $iterator$ points to.
+...metafunction:Metafunction.Position
+..include:seqan/basic.h
+*/
+
+template <typename T>
+inline typename Position<T>::Type 
+position(T * /*me*/)
+{
+SEQAN_CHECKPOINT
+	return 0;
+}
+
+template <typename TContainer, typename TIterator>
+inline typename Position<TContainer>::Type 
+position(TIterator const & it,
+		 TContainer const & me)
+{
+SEQAN_CHECKPOINT
+	return it - begin(me, Standard());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// atBegin
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.atBegin:
+..cat:Iteration
+..summary:Determines whether an iterator is at the beginning position.
+..signature:bool atBegin(iterator [, container])
+..param.iterator:An iterator.
+...type:Class.Iter
+...concept:Concept.Iterator
+..param.container:Container of $iterator$. (optional)
+...remarks.text:If $iterator$ implements @Concept.Rooted Iterator@ then $container$ is optional otherwise $container$ is required.
+..returns:$true$ if $iterator$ points to the fist item of the container, otherwise $false$.
+..see:Function.begin
+..include:seqan/basic.h
+*/
+
+//TODO???: Was, wenn der Container leer ist?
+
+template <typename T, typename TContainer>
+inline bool
+atBegin(T const & it, TContainer const & cont)
+{
+SEQAN_CHECKPOINT
+	return it == begin(cont, Standard());	
+}
+
+template <typename T, typename TContainer>
+inline bool
+atBegin(T const & it, TContainer & cont)
+{
+SEQAN_CHECKPOINT
+	return it == begin(cont, Standard());
+}
+
+template <typename T, typename TContainer>
+inline bool
+atBegin(T & it, TContainer & cont)
+{
+SEQAN_CHECKPOINT
+	return it == begin(cont, Standard());
+}
+
+template <typename T, typename TContainer>
+inline bool
+atBegin(T & it, TContainer const & cont)
+{
+SEQAN_CHECKPOINT
+	return it == begin(cont, Standard());
+}
+//____________________________________________________________________________
+
+template <typename T>
+inline bool
+atBegin(T const & it)
+{
+SEQAN_CHECKPOINT
+	return atBegin(it, container(it));	
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// atEnd
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.atEnd:
+..cat:Iteration
+..summary:Determines whether an iterator is at the end position. 
+..signature:bool atEnd(iterator [, container])
+..param.iterator:An iterator.
+...type:Class.Iter
+...concept:Concept.Iterator
+..param.container:Container of $iterator$.
+...remarks.text:If $iterator$ implements @Concept.Rooted Iterator@ then $container$ is optional.
+....text:$container$ is also optional for iterators to @Adaption.char array.char arrays at .
+....text:Otherwise, $container$ is required.
+..returns:$true$ if $iterator$ points behind the last item of the container, otherwise $false$.
+..see:Function.atBegin
+..see:Function.end
+..include:seqan/basic.h
+*/
+
+template <typename T, typename TContainer>
+inline bool
+atEnd(T & it, 
+	  TContainer const & cont)
+{
+SEQAN_CHECKPOINT
+	return it == end(cont, Standard());	
+}
+template <typename T, typename TContainer>
+inline bool
+atEnd(T const & it, 
+	  TContainer const & cont)
+{
+SEQAN_CHECKPOINT
+	return it == end(cont, Standard());	
+}
+
+template <typename T, typename TContainer>
+inline bool
+atEnd(T & it,
+	  TContainer & cont)
+{
+SEQAN_CHECKPOINT
+	return it == end(cont, Standard());
+}
+template <typename T, typename TContainer>
+inline bool
+atEnd(T const & it,
+	  TContainer & cont)
+{
+SEQAN_CHECKPOINT
+	return it == end(cont, Standard());
+}
+//____________________________________________________________________________
+
+template <typename T>
+inline bool
+atEnd(T & it)
+{
+SEQAN_CHECKPOINT
+	return atEnd(it, container(it));	
+}
+template <typename T>
+inline bool
+atEnd(T const & it)
+{
+SEQAN_CHECKPOINT
+	return atEnd(it, container(it));	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goBegin
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.goBegin:
+..cat:Iteration
+..summary:Iterates to the first position of a container. 
+..signature:goBegin(iterator [, container])
+..param.iterator:Object that iterates through $container$.
+...type:Class.Iter
+...concept:Concept.Iterator
+...text:$iterator$ is set to the position of the first item in $container$.
+..param.container:Container of $iterator$.
+...remarks.text:If $iterator$ implements @Concept.Rooted Iterator@ then $container$ is optional,
+otherwise $container$ is required.
+..remarks:This function is equivalent to $iterator = begin(container)$.
+..see:Function.begin
+..see:Function.atBegin
+..see:Function.goEnd
+..include:seqan/basic.h
+*/
+template <typename TIterator, typename TContainer>
+inline void
+goBegin(TIterator & it,
+		TContainer & container)
+{
+SEQAN_CHECKPOINT
+	it = begin(container);
+}
+/*
+template <typename TIterator, typename TContainer>
+inline void
+goBegin(TIterator & it,
+		TContainer const & container)
+{
+SEQAN_CHECKPOINT
+	it = begin(container);
+}
+*/
+
+template <typename TIterator>
+inline void
+goBegin(TIterator & it)
+{
+SEQAN_CHECKPOINT
+	goBegin(it, container(it));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goEnd
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.goEnd:
+..cat:Iteration
+..summary:Iterates to the last position of a container. 
+..signature:goEnd(iterator [, container])
+..param.iterator:Object that iterates through $container$.
+...type:Class.Iter
+...concept:Concept.Iterator
+...text:$iterator$ is set to the position behin the last item in $container$.
+..param.container:Container of $iterator$.
+...remarks.text:If $iterator$ implements @Concept.Rooted Iterator@ then $container$ is optional,
+otherwise $container$ is required.
+..remarks:This function is equivalent to $iterator = end(container)$.
+..see:Function.end
+..see:Function.atEnd
+..see:Function.goBegin
+..see:Function.goEnd
+..include:seqan/basic.h
+*/
+template <typename TIterator, typename TContainer>
+inline void
+goEnd(TIterator & it,
+	  TContainer & container)
+{
+SEQAN_CHECKPOINT
+	it = end(container);
+}
+template <typename TIterator, typename TContainer>
+inline void
+goEnd(TIterator & it,
+	  TContainer const & container)
+{
+SEQAN_CHECKPOINT
+	it = end(container);
+}
+
+template <typename TIterator>
+inline void
+goEnd(TIterator & it)
+{
+SEQAN_CHECKPOINT
+	goEnd(it, container(it));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goNext
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.goNext:
+..cat:Iteration
+..summary:Iterates to next position. 
+..signature:goNext(iterator)
+..param.iterator:An iterator.
+...type:Class.Iter
+...concept:Concept.Iterator
+...text:$iterator$ is set to the next position of an iteration through its container.
+..remarks:This function is equivalent to $++iterator$.
+..see:Function.goBegin
+..see:Function.goEnd
+..include:seqan/basic.h
+*/
+template <typename TIterator>
+inline void
+goNext(TIterator & it)
+{
+SEQAN_CHECKPOINT
+	++it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goFurther
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.goFurther:
+..cat:Iteration
+..summary:Iterates some steps further. 
+..signature:goFurther(iterator, steps)
+..param.iterator:An iterator.
+...type:Class.Iter
+...concept:Concept.Iterator
+...text:$iterator$ is set $steps$ positions further in the iteration through the container.
+..param.steps:Number of steps $iterator$ should be moved further.
+...remarks:If $iterator$ supports bidirectional iteration, $steps$ could also be negativ.
+..remarks:This function is equivalent to $iterator += steps$ for random access iterators.
+..see:Function.goNext
+..see:Function.goPrevious
+..include:seqan/basic.h
+*/
+
+template <typename TIterator, typename TDiff> inline
+void goFurther(TIterator & it, TDiff steps)
+{	// return distance type from arbitrary argument
+    it += steps;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goPrevious
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.goPrevious:
+..cat:Iteration
+..summary:Iterates to pevious position. 
+..signature:goPrevious(iterator)
+..param.iterator:An iterator.
+...type:Class.Iter
+...concept:Concept.Iterator
+...text:$iterator$ is set to the pevious position of an iteration through its container.
+..remarks:This function is equivalent to $--iterator$.
+..see:Function.goBegin
+..see:Function.goEnd
+..see:Function.goNext
+..include:seqan/basic.h
+*/
+template <typename TIterator>
+inline void
+goPrevious(TIterator & it)
+{
+SEQAN_CHECKPOINT
+	--it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// difference
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.difference:
+..cat:Iteration
+..summary:The difference between two iterators. 
+..signature:difference(begin, end)
+..param.begin:Iterator to the first position of a range.
+...type:Class.Iter
+...Concept.Iterator
+..param.end:Iterator behind the last position of a range.
+...type:Class.Iter
+...Concept.Iterator
+..returns:Length of the range between $begin$ and $end$.
+..remarks:This function is equivalent to $end - begin$.
+...text:Usually, $begin$ and $end$ have the same type.
+..see:Function.begin
+..see:Function.end
+..see:Function.length
+..include:seqan/basic.h
+*/
+
+template <typename TIterator> inline
+typename Difference<TIterator>::Type difference(
+	TIterator const & begin, 
+	TIterator const & end)
+{	// return distance type from arbitrary argument
+SEQAN_CHECKPOINT
+    return end - begin;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goNil
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.goNil:
+..cat:Iteration
+..summary:Moves iterator to nil position.
+..signature:goNil(iterator)
+..param.iterator:The iterator that will be moved.
+...type:Class.String
+..remarks:$iterator$ is set to an invalid position, e.g. $NULL$ for pointer types.
+..see:Function.clear
+..include:seqan/basic.h
+*/
+
+template <typename TIterator>
+inline void
+goNil(TIterator & me)
+{
+SEQAN_CHECKPOINT
+	me = TIterator();
+}
+
+template <typename TIterator>
+inline void
+goNil(TIterator * & me)
+{
+SEQAN_CHECKPOINT
+	me = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// atNil
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.atNil:
+..cat:Iteration
+..summary:Tests whether iterator is at nil position.
+..signature:bool atNil(iterator)
+..param.iterator:An iterator.
+...type:Class.String
+..returns:$true$ if $iterator$ points to an ivalid position, e.g. $iterator$ is a $NULL$ pointer.
+$false$ otherwise.
+..see:Function.goNil
+..include:seqan/basic.h
+*/
+
+template <typename TIterator>
+inline bool
+atNil(TIterator & me)
+{
+SEQAN_CHECKPOINT
+	return me == TIterator();
+}
+
+
+template <typename TIterator>
+inline bool
+atNil(TIterator * me)
+{
+SEQAN_CHECKPOINT
+	return me == 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_iterator_adapt_std.h b/src/SeqAn-1.3/seqan/basic/basic_iterator_adapt_std.h
new file mode 100644
index 0000000..98f2437
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_iterator_adapt_std.h
@@ -0,0 +1,449 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ITERATOR_ADAPT_STD_H
+#define SEQAN_HEADER_BASIC_ITERATOR_ADAPT_STD_H
+
+//////////////////////////////////////////////////////////////////////////////
+
+//adapt SeqAn iterator to std
+namespace std
+{
+	template<typename TContainer, typename TSpec>
+	struct iterator_traits<seqan::Iter<TContainer, TSpec> >
+	{
+		typedef ::seqan::Iter<TContainer, TSpec> TIter;
+
+		typedef random_access_iterator_tag iterator_category;
+		typedef typename ::seqan::Value<TIter>::Type value_type;
+		typedef typename ::seqan::Difference<TIter>::Type difference_type;
+		typedef typename ::seqan::Value<TIter>::Type * pointer;
+		typedef typename ::seqan::Reference<TIter>::Type reference;
+	};
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//helper Metafunction
+
+/* This simple, general implementation cannot be used due to strange VC++ 2003 behavior
+
+template <typename TStdContainer>
+struct StdContainerIterator
+{
+	typedef typename TStdContainer::iterator Type;
+};
+
+template <typename TStdContainer>
+struct StdContainerIterator<TStdContainer const>
+{
+	typedef typename TStdContainer::const_iterator Type;
+};
+*/
+
+//we use this instead: specialize StdContainerIterator for each std-container
+template <typename TStdContainer>
+struct StdContainerIterator
+{
+	typedef void * Type; //dummy, just to make VC++ 2003 happy
+};
+
+// TODO(holtgrew): This should go into the STL string adaption header...
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct StdContainerIterator< ::std::basic_string<TChar, TCharTraits, TAlloc> >
+{
+	typedef ::std::basic_string<TChar, TCharTraits, TAlloc> TContainer;
+	typedef typename TContainer::iterator Type;
+};
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct StdContainerIterator< ::std::basic_string<TChar, TCharTraits, TAlloc> const>
+{
+	typedef ::std::basic_string<TChar, TCharTraits, TAlloc> TContainer;
+	typedef typename TContainer::const_iterator Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//adapt std iterator to SeqAn
+
+
+struct StdIteratorAdaptor;
+
+template <typename TContainer>
+class Iter<TContainer, StdIteratorAdaptor>
+{
+public:
+	typedef typename StdContainerIterator<TContainer>::Type TIterator;
+	TIterator data_iterator;
+
+	Iter() {}
+	Iter(Iter const & other_): data_iterator(other_.data_iterator) {}
+	Iter(TIterator const & iter_): data_iterator(iter_) {}
+	Iter(TContainer const & cont_): data_iterator(begin(cont_)) {}
+
+	Iter const & operator = (Iter const & other_)
+	{
+		data_iterator = other_.data_iterator;
+		return *this;
+	}
+	Iter const & operator = (TIterator const & iter_)
+	{
+		data_iterator = iter_;
+		return *this;
+	}
+
+	operator TIterator &()
+	{
+		return data_iterator;
+	}
+
+	~Iter() {}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// hostIterator
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline typename StdContainerIterator<TContainer>::Type &
+hostIterator(Iter<TContainer, StdIteratorAdaptor> & me)
+{
+	return me.data_iterator;
+}
+template <typename TContainer>
+inline typename StdContainerIterator<TContainer>::Type const &
+hostIterator(Iter<TContainer, StdIteratorAdaptor> const & me)
+{
+	return me.data_iterator;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// value
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline typename Reference<Iter<TContainer, StdIteratorAdaptor> >::Type 
+value(Iter<TContainer, StdIteratorAdaptor> & me)
+{
+	return *(me.data_iterator);
+}
+template <typename TContainer>
+inline typename Reference<Iter<TContainer, StdIteratorAdaptor> const>::Type 
+value(Iter<TContainer, StdIteratorAdaptor> const & me)
+{
+	return *(me.data_iterator);
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+// assignValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TValue>
+inline void 
+assignValue(Iter<TContainer, StdIteratorAdaptor> & me,
+			TValue & val)
+{
+	*(me.data_iterator) = val;
+}
+template <typename TContainer, typename TValue>
+inline void 
+assignValue(Iter<TContainer, StdIteratorAdaptor> & me,
+			TValue const & val)
+{
+	*(me.data_iterator) = val;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// moveValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TValue>
+inline void 
+moveValue(Iter<TContainer, StdIteratorAdaptor> & me,
+		  TValue & val)
+{
+	move(*(me.data_iterator), val);
+}
+template <typename TContainer, typename TValue>
+inline void 
+moveValue(Iter<TContainer, StdIteratorAdaptor> & me,
+		  TValue const & val)
+{
+	move(*(me.data_iterator), val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator ==
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator == (Iter<TContainer, StdIteratorAdaptor> const & left,
+			 Iter<TContainer, StdIteratorAdaptor> const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) == hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator !=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator != (Iter<TContainer, StdIteratorAdaptor> const & left,
+			 Iter<TContainer, StdIteratorAdaptor> const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) != hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator <
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator < (Iter<TContainer, StdIteratorAdaptor> const & left,
+			Iter<TContainer, StdIteratorAdaptor> const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) < hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator >
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator > (Iter<TContainer, StdIteratorAdaptor> const & left,
+			Iter<TContainer, StdIteratorAdaptor> const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) > hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator <=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator <= (Iter<TContainer, StdIteratorAdaptor> const & left,
+			Iter<TContainer, StdIteratorAdaptor> const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) <= hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator >=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator >= (Iter<TContainer, StdIteratorAdaptor> const & left,
+			Iter<TContainer, StdIteratorAdaptor> const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) >= hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goNext
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline void
+goNext(Iter<TContainer, StdIteratorAdaptor> & me)
+{
+SEQAN_CHECKPOINT
+	goNext(hostIterator(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goPrevious
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline void
+goPrevious(Iter<TContainer, StdIteratorAdaptor> & me)
+{
+SEQAN_CHECKPOINT
+	goPrevious(hostIterator(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, StdIteratorAdaptor>  
+operator + (Iter<TContainer, StdIteratorAdaptor> const & left,
+			TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, StdIteratorAdaptor>(hostIterator(left) + right);
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, StdIteratorAdaptor>  
+operator + (Iter<TContainer, StdIteratorAdaptor> const & left,
+			int right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, StdIteratorAdaptor>(hostIterator(left) + right);
+}
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, StdIteratorAdaptor>  
+operator + (TIntegral left,
+			Iter<TContainer, StdIteratorAdaptor> const & right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, StdIteratorAdaptor>(hostIterator(right) + left);
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, StdIteratorAdaptor>  
+operator + (int left,
+			Iter<TContainer, StdIteratorAdaptor> const & right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, StdIteratorAdaptor>(hostIterator(right) + left);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, StdIteratorAdaptor> &
+operator += (Iter<TContainer, StdIteratorAdaptor> & left,
+			 TIntegral right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) += right;
+	return left;
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, StdIteratorAdaptor> &
+operator += (Iter<TContainer, StdIteratorAdaptor> & left,
+			 int right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) += right;
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, StdIteratorAdaptor>  
+operator - (Iter<TContainer, StdIteratorAdaptor> const & left,
+			TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, StdIteratorAdaptor>(hostIterator(left) - right);
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, StdIteratorAdaptor>  
+operator - (Iter<TContainer, StdIteratorAdaptor> const & left,
+			int right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, StdIteratorAdaptor>(hostIterator(left) - right);
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer>
+inline typename Difference<Iter<TContainer, StdIteratorAdaptor> >::Type  
+operator - (Iter<TContainer, StdIteratorAdaptor> const & left,
+			Iter<TContainer, StdIteratorAdaptor> const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) - hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, StdIteratorAdaptor> &
+operator -= (Iter<TContainer, StdIteratorAdaptor> & left,
+			 TIntegral right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) -= right;
+	return left;
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, StdIteratorAdaptor> &
+operator -= (Iter<TContainer, StdIteratorAdaptor> & left,
+			 int right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) -= right;
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// assign (Conversion)
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTargetContainer, typename TSource>
+inline void
+assign(Iter<TTargetContainer, StdIteratorAdaptor> & target,
+	   TSource const & source)
+{
+SEQAN_CHECKPOINT
+	target.data_iterator = begin(container(source)) + position(source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_iterator_adaptor.h b/src/SeqAn-1.3/seqan/basic/basic_iterator_adaptor.h
new file mode 100644
index 0000000..70c719d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_iterator_adaptor.h
@@ -0,0 +1,587 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ITERATOR_ADAPTOR_H
+#define SEQAN_HEADER_BASIC_ITERATOR_ADAPTOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Tag
+
+//An iterator that adapts a std iterator to a default seqan iterator
+template <typename TIterator, typename TSpec = Default>
+struct AdaptorIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct Iterator_Default_Imp<T, Rooted>
+{
+	typedef typename Iterator<T, Standard>::Type TStandardIterator;
+	typedef Iter<T, AdaptorIterator<TStandardIterator> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Adaptor Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Adaptor Iterator:
+..cat:Iterators
+..general:Class.Iter
+..summary:Adapts iterators to @Concept.Rooted Iterator at .
+..signature:Iter<TContainer, AdaptorIterator<TIterator [, TSpec]> >
+..param.TContainer:Type of the container that can be iterated by $TIterator$.
+...remarks:Use @Metafunction.Container@ to get the container type for a given iterator.
+..param.TIterator:Type of the iterator that is adapted to @Concept.Rooted Iterator at .
+..remarks.text:Adaptor iterators can implicitly converted to $TIterator$.
+..include:seqan/basic.h
+*/
+
+template <typename TContainer, typename TIterator, typename TSpec>
+class Iter<TContainer, AdaptorIterator<TIterator, TSpec> >
+{
+public:
+	typename Pointer_<TContainer>::Type data_container;
+	TIterator data_iterator;
+//____________________________________________________________________________
+
+/**
+.Memfunc.AdaptorIterator#Iter:
+..class:Spec.Adaptor Iterator
+..summary:Constructor
+..signature:Iter()
+..signature:Iter(iter)
+..signature:Iter(container [, iterator])
+..param.iter:Another adaptor iterator object.
+..param.container:The corresponding container object.
+..param.iterator:A iterator of $container$. (optional)
+...remarks.text:If this argument is omitted, the adaptor iterator is initialized to the @Function.begin.begin iterator@ of $container$.
+*/
+
+public:
+	Iter():
+		data_container(0)
+	{
+SEQAN_CHECKPOINT
+		data_iterator = TIterator();
+	}
+/*//TODO: welches "begin" zur initialisierung von "data_iterator" aufrufen?
+	Iter(typename Parameter_<TContainer>::Type container_):
+		data_container(_toPointer(container_)),
+		data_iterator(begin(container_))
+	{
+SEQAN_CHECKPOINT
+	}
+*/
+	Iter(typename Parameter_<TContainer>::Type container_, TIterator it_):
+		data_container(_toPointer(container_)),
+		data_iterator(it_)
+	{
+SEQAN_CHECKPOINT
+	}
+	Iter(Iter const & other_):
+		data_container(other_.data_container),
+		data_iterator(other_.data_iterator)
+	{
+SEQAN_CHECKPOINT
+	}
+/*
+	template <typename TSource>
+	Iter(TSource & source)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source);
+	}
+	template <typename TSource>
+	Iter(TSource const & source)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source);
+	}
+*/
+
+	~Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter const & 
+	operator = (Iter const & other_)
+	{
+SEQAN_CHECKPOINT
+		data_container = other_.data_container;
+		data_iterator = other_.data_iterator;
+		return *this;
+	}
+/*
+	template <typename TSource>
+	Iter const & 
+	operator = (TSource & source)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source);
+		return *this;
+	}
+	template <typename TSource>
+	Iter const & 
+	operator = (TSource const & source)
+	{
+SEQAN_CHECKPOINT
+		assign(*this, source);
+		return *this;
+	}
+*/
+//____________________________________________________________________________
+
+
+//____________________________________________________________________________
+
+	operator TIterator () const
+	{
+SEQAN_CHECKPOINT
+		return data_iterator;
+	}
+
+//____________________________________________________________________________
+};
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline typename Parameter_<TContainer>::Type 
+container(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return _toParameter<TContainer>(me.data_container);
+}
+template <typename TContainer, typename TIterator, typename TSpec>
+inline typename Parameter_<TContainer>::Type 
+container(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return _toParameter<TContainer>(me.data_container);
+}
+//____________________________________________________________________________
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline void
+setContainer(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me,	typename Parameter_<TContainer>::Type container_)
+{
+SEQAN_CHECKPOINT
+   typedef Iter<TContainer, AdaptorIterator<TIterator, TSpec> > TIter;
+	if (me.data_container && me.data_iterator != TIterator())
+	{
+		typename Position<TIter>::Type pos = position(me);
+		me.data_container = _toPointer(container_);
+		setPosition(me, pos);
+	}
+	else
+	{	
+		me.data_container = _toPointer(container_);
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline TIterator &
+hostIterator(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_iterator;
+}
+template <typename TContainer, typename TIterator, typename TSpec>
+inline TIterator const &
+hostIterator(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_iterator;
+}
+//////////////////////////////////////////////////////////////////////////////
+// METAFUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <typename TContainer, typename TIterator, typename TSpec>
+struct Reference<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const>:
+	Reference<TIterator const>
+{
+};
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// position
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline typename Position<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const>::Type 
+position(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(me) - begin(container(me), Standard());
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TContainer2>
+inline typename Position<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const>::Type 
+position(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me,
+		 TContainer2 const &)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(me) - begin(container(me), Standard());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// setPosition
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TPosition>
+inline void 
+setPosition(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me,
+			TPosition pos_)
+{
+SEQAN_CHECKPOINT
+	hostIterator(me) = begin(container(me), Standard()) + pos_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// value
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline typename Reference<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > >::Type 
+value(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return value(hostIterator(me));
+}
+template <typename TContainer, typename TIterator, typename TSpec>
+inline typename Reference<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const>::Type 
+value(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return value(hostIterator(me));
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// assignValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TValue>
+inline void
+assignValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me,
+			TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	assignValue(hostIterator(me), _value);
+}
+template <typename TContainer, typename TIterator, typename TSpec, typename TValue>
+inline void
+assignValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me,
+			TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	assignValue(hostIterator(me), _value);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// moveValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TValue>
+inline void
+moveValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me,
+		  TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	moveValue(hostIterator(me), _value);
+}
+template <typename TContainer, typename TIterator, typename TSpec, typename TValue>
+inline void
+moveValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me,
+		  TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	moveValue(hostIterator(me), _value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator ==
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline bool 
+operator == (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left,
+			 Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) == hostIterator(right);
+}
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline bool 
+operator == (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left,
+			 typename IterComplementConst<TIterator>::Type const & right)
+{
+SEQAN_CHECKPOINT
+ 	return hostIterator(left) == right;
+}
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline bool 
+operator == (typename IterComplementConst<TIterator>::Type const & left,
+			 Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right)
+{
+SEQAN_CHECKPOINT
+	return left == hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator !=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline bool 
+operator != (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left,
+			 Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) != hostIterator(right);
+}
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline bool 
+operator != (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left,
+			 typename IterComplementConst<TIterator>::Type const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) != right;
+}
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline bool 
+operator != (typename IterComplementConst<TIterator>::Type const & left,
+			 Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right)
+{
+SEQAN_CHECKPOINT
+	return left != hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goNext
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline void
+goNext(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	goNext(hostIterator(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goPrevious
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline void
+goPrevious(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	goPrevious(hostIterator(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> >  
+operator + (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left,
+			TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, AdaptorIterator<TIterator, TSpec> >(container(left), hostIterator(left) + right);
+}
+// for <anonymous enum> types
+template <typename TContainer, typename TIterator, typename TSpec>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> >  
+operator + (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left,
+			int right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, AdaptorIterator<TIterator, TSpec> >(container(left), hostIterator(left) + right);
+}
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> >  
+operator + (TIntegral left,
+			Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, AdaptorIterator<TIterator, TSpec> >(container(right), hostIterator(right) + left);
+}
+// for <anonymous enum> types
+template <typename TContainer, typename TIterator, typename TSpec>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> >  
+operator + (int left,
+			Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, AdaptorIterator<TIterator, TSpec> >(container(right), hostIterator(right) + left);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > &
+operator += (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & left,
+			 TIntegral right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) += right;
+	return left;
+}
+// for <anonymous enum> types
+template <typename TContainer, typename TIterator, typename TSpec>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > &
+operator += (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & left,
+			 int right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) += right;
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> >  
+operator - (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left,
+			TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, AdaptorIterator<TIterator, TSpec> >(container(left), hostIterator(left) - right);
+}
+// for <anonymous enum> types
+template <typename TContainer, typename TIterator, typename TSpec>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> >  
+operator - (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left,
+			int right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, AdaptorIterator<TIterator, TSpec> >(container(left), hostIterator(left) - right);
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TContainer2, typename TIterator2, typename TSpec2>
+inline typename Difference<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > >::Type  
+operator - (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & left,
+			Iter<TContainer2, AdaptorIterator<TIterator2, TSpec2> > const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) - hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec, typename TIntegral>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > &
+operator -= (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & left,
+			 TIntegral right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) -= right;
+	return left;
+}
+// for <anonymous enum> types
+template <typename TContainer, typename TIterator, typename TSpec>
+inline Iter<TContainer, AdaptorIterator<TIterator, TSpec> > &
+operator -= (Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & left,
+			 int right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) -= right;
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// atEnd
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline bool
+atEnd(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return atEnd(me, container(me));
+}
+
+template <typename TContainer, typename TIterator, typename TSpec>
+inline bool
+atEnd(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return atEnd(me, container(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// assign (Conversion)
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTargetContainer, typename TIterator, typename TSpec, typename TSource>
+inline void
+assign(Iter<TTargetContainer, AdaptorIterator<TIterator, TSpec> > & target,
+	   TSource const & source)
+{
+SEQAN_CHECKPOINT
+	target.data_container = container(source);
+	target.data_iterator = begin(container(source)) + position(source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_iterator_base.h b/src/SeqAn-1.3/seqan/basic/basic_iterator_base.h
new file mode 100644
index 0000000..e17cd1f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_iterator_base.h
@@ -0,0 +1,349 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ITERATOR_BASE_H
+#define SEQAN_HEADER_BASIC_ITERATOR_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Iter
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Class.Iter:
+..cat:Basic
+..summary:Iterator that is used to traverse containers.
+..signature:Iter<TContainer, TSpec>
+..param.TContainer:Type of the container that can be iterated by $Iter$.
+...metafunction:Metafunction.Container
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+..implements:Concept.Iterator
+..include:seqan/basic.h
+*/
+template <typename TContainer, typename TSpec>
+class Iter;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Metafunction.IterComplementConst:
+..cat:Basic
+..summary:Complement the "constness" of the container of an iterator.
+..signature:IterComplementConst<TIterator>
+..param.TIterator:The iterator to toggle the constness of its container for.
+..include:seqan/basic.h
+*/
+template <typename TIterator>
+struct IterComplementConst;
+
+template <typename TContainer, typename TSpec>
+struct IterComplementConst<Iter<TContainer, TSpec> >
+{
+    typedef Iter<
+        typename If<
+            IsSameType<typename RemoveConst_<TContainer>::Type, TContainer>::VALUE,
+            TContainer const,
+            typename RemoveConst_<TContainer>::Type>::Type,
+        TSpec> Type;
+};
+
+template <typename TContainer, typename TSpec>
+struct IterComplementConst<Iter<TContainer, TSpec> const>
+        : IterComplementConst<Iter<TContainer, TSpec> > {};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Metafunction.IterMakeConst:
+..cat:Basic
+..summary:Make the container of an Iter const.
+..signature:IterMakeConst<TIterator>
+..param.TIterator:The iterator make the container const for.
+..include:seqan/basic.h
+*/
+template <typename TIterator>
+struct IterMakeConst;
+
+template <typename TContainer, typename TSpec>
+struct IterMakeConst<Iter<TContainer, TSpec> >
+{
+    typedef Iter<typename RemoveConst_<TContainer>::Type const, TSpec> Type;
+};
+
+template <typename TContainer, typename TSpec>
+struct IterMakeConst<Iter<TContainer, TSpec> const>
+        : IterMakeConst<Iter<TContainer, TSpec> > {};
+
+//////////////////////////////////////////////////////////////////////////////
+///.Metafunction.Spec.param.T.type:Class.Iter
+
+template <typename TContainer, typename TSpec>
+struct Spec<Iter<TContainer, TSpec> >
+{
+	typedef TSpec Type;
+};
+template <typename TContainer, typename TSpec>
+struct Spec<Iter<TContainer, TSpec> const>
+{
+	typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.Iter
+
+template <typename TContainer, typename TSpec>
+struct Value<Iter<TContainer, TSpec> >:
+	Value<TContainer>
+{
+};
+template <typename TContainer, typename TSpec>
+struct Value<Iter<TContainer, TSpec> const>:
+	Value<TContainer>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.GetValue.param.T.type:Class.Iter
+
+template <typename TContainer, typename TSpec>
+struct GetValue<Iter<TContainer, TSpec> >:
+	GetValue<TContainer>
+{
+};
+template <typename TContainer, typename TSpec>
+struct GetValue<Iter<TContainer, TSpec> const>:
+	GetValue<TContainer>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Reference.param.T.type:Class.Iter
+
+template <typename TContainer, typename TSpec>
+struct Reference<Iter<TContainer, TSpec> >:
+	Reference<TContainer>
+{
+};
+template <typename TContainer, typename TSpec>
+struct Reference<Iter<TContainer, TSpec> const>:
+	Reference<TContainer>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Container.param.T.type:Class.Iter
+
+template <typename T> struct Container;
+
+template <typename TContainer, typename TSpec>
+struct Container<Iter<TContainer, TSpec> >
+{
+	typedef TContainer Type;
+};
+template <typename TContainer, typename TSpec>
+struct Container<Iter<TContainer, TSpec> const>
+{
+	typedef TContainer Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+///.Metafunction.Host.param.T.type:Class.Iter
+
+template <typename TContainer, typename TSpec>
+struct Host<Iter<TContainer, TSpec> >:
+	Container<Iter<TContainer, TSpec> >
+{
+};
+template <typename TContainer, typename TSpec>
+struct Host<Iter<TContainer, TSpec> const>:
+	Container<Iter<TContainer, TSpec> const>
+{
+};
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// operator *
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline typename Reference<Iter<TContainer, TSpec> >::Type
+operator * (Iter<TContainer, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return value(me);
+}
+template <typename TContainer, typename TSpec>
+inline typename Reference<Iter<TContainer, TSpec> const>::Type
+operator * (Iter<TContainer, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator ++
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline Iter<TContainer, TSpec> const &
+operator ++ (Iter<TContainer, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	goNext(me);
+	return me;
+}
+
+template <typename TContainer, typename TSpec>
+inline Iter<TContainer, TSpec>
+operator ++ (Iter<TContainer, TSpec> & me, int)
+{
+SEQAN_CHECKPOINT
+	Iter<TContainer, TSpec> temp_(me);
+	goNext(me);
+	return temp_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator --
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline Iter<TContainer, TSpec> const &
+operator -- (Iter<TContainer, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	goPrevious(me);
+	return me;
+}
+
+template <typename TContainer, typename TSpec>
+inline Iter<TContainer, TSpec>
+operator -- (Iter<TContainer, TSpec> & me, int)
+{
+SEQAN_CHECKPOINT
+	Iter<TContainer, TSpec> temp_(me);
+	goPrevious(me);
+	return temp_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator + / +=
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <typename TContainer, typename TSpec, typename TSize>
+inline Iter<TContainer, TSpec>
+operator + (Iter<TContainer, TSpec> & me, TSize size)
+{
+SEQAN_CHECKPOINT
+	Iter<TContainer, TSpec> temp_(me);
+	goFurther(temp_, size);
+	return temp_;
+}
+*/
+template <typename TContainer, typename TSpec, typename TSize>
+inline Iter<TContainer, TSpec>
+operator + (Iter<TContainer, TSpec> const & me, TSize size)
+{
+SEQAN_CHECKPOINT
+	Iter<TContainer, TSpec> temp_(me);
+	goFurther(temp_, size);
+	return temp_;
+}
+
+template <typename TContainer, typename TSpec, typename TSize>
+inline Iter<TContainer, TSpec> const &
+operator += (Iter<TContainer, TSpec> & me, TSize size)
+{
+SEQAN_CHECKPOINT
+	goFurther(me, size);
+	return me;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator - / -=
+//////////////////////////////////////////////////////////////////////////////
+/* // collides with Iter-Iter
+template <typename TContainer, typename TSpec, typename TSize>
+inline Iter<TContainer, TSpec>
+operator - (Iter<TContainer, TSpec> & me, TSize size)
+{
+SEQAN_CHECKPOINT
+	Iter<TContainer, TSpec> temp_(me);
+	goFurther(temp_, -size);
+	return temp_;
+}
+
+template <typename TContainer, typename TSpec, typename TSize>
+inline Iter<TContainer, TSpec>
+operator - (Iter<TContainer, TSpec> const & me, TSize size)
+{
+SEQAN_CHECKPOINT
+	Iter<TContainer, TSpec> temp_(me);
+	goFurther(temp_, -size);
+	return temp_;
+}
+
+template <typename TContainer, typename TSpec, typename TSize>
+inline Iter<TContainer, TSpec> const &
+operator -= (Iter<TContainer, TSpec> & me, TSize size)
+{
+SEQAN_CHECKPOINT
+	goFurther(me, -size);
+	return me;
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+// position
+//////////////////////////////////////////////////////////////////////////////
+
+//most Iter classes are rooted strings
+
+template <typename TContainer, typename TSpec, typename TContainer2>
+inline typename Position<Iter<TContainer, TSpec> const>::Type
+position(Iter<TContainer, TSpec> const & me,
+		 TContainer2 const &)
+{
+SEQAN_CHECKPOINT
+	return position(me);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_iterator_position.h b/src/SeqAn-1.3/seqan/basic/basic_iterator_position.h
new file mode 100644
index 0000000..466fd15
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_iterator_position.h
@@ -0,0 +1,479 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ITERATOR_POSITION_H
+#define SEQAN_HEADER_BASIC_ITERATOR_POSITION_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Tag
+
+struct PositionIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+// Position Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Position Iterator:
+..cat:Iterators
+..general:Class.Iter
+..summary:Adapts @Metafunction.Position.position@ to @Concept.Rooted Iterator.iterator at .
+..signature:Iter<TContainer, PositionIterator>
+..param.TContainer:Type of the container.
+...metafunction:Metafunction.Container
+..remarks
+...text:Position Iterators provide the concept @Concept.Rooted Iterator at .
+..see:Metafunction.Position
+..include:seqan/basic.h
+*/
+
+template <typename TContainer>
+class Iter<TContainer, PositionIterator>
+{
+public:
+	typedef typename Position<TContainer>::Type TPosition;
+
+	typename Pointer_<TContainer>::Type data_container;
+	TPosition data_position;
+//____________________________________________________________________________
+
+public:
+/**
+.Memfunc.PositionIterator#Iter:
+..class:Spec.Position Iterator
+..summary:Constructor
+..signature:Iter()
+..signature:Iter(iter)
+..signature:Iter(container [, position])
+..param.iter:Another position iterator object.
+..param.container:The corresponding container object.
+...metafunction:Metafunction.Container
+..param.position:A position in $container$. (optional)
+...metafunction:Metafunction.Position
+...remarks.text:If this argument is omitted, the adaptor iterator is initialized to the @Function.beginPosition.begin position@ of $container$.
+*/
+	Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+	Iter(typename Parameter_<TContainer>::Type container_, TPosition position_ = 0):
+		data_container(_toPointer(container_)),
+		data_position(position_)
+	{
+SEQAN_CHECKPOINT
+	}
+	Iter(Iter const & other_):
+		data_container(other_.data_container),
+		data_position(other_.data_position)
+	{
+SEQAN_CHECKPOINT
+	}
+	template <typename TContainer2, typename TSpec2>
+	Iter(Iter<TContainer2, TSpec2> const & other_):
+		data_container(container(other_)),
+		data_position(position(other_))
+	{
+SEQAN_CHECKPOINT
+	}
+	~Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+	Iter const & 
+	operator = (Iter const & other_)
+	{
+SEQAN_CHECKPOINT
+		data_container = other_.data_container;
+		data_position = other_.data_position;
+		return *this;
+	}
+
+//____________________________________________________________________________
+};
+
+//____________________________________________________________________________
+
+template <typename TContainer>
+inline typename Parameter_<TContainer>::Type 
+container(Iter<TContainer, PositionIterator> & me)
+{
+SEQAN_CHECKPOINT
+	return _toParameter<TContainer>(me.data_container);
+}
+template <typename TContainer>
+inline typename Parameter_<TContainer>::Type 
+container(Iter<TContainer, PositionIterator> const & me)
+{
+SEQAN_CHECKPOINT
+	return _toParameter<TContainer>(me.data_container);
+}
+//____________________________________________________________________________
+
+template <typename TContainer>
+inline void
+setContainer(Iter<TContainer, PositionIterator> & me, typename Parameter_<TContainer>::Type container_)
+{
+SEQAN_CHECKPOINT
+	typedef Iter<TContainer, PositionIterator> TIter;
+	typename Position<TIter>::Type pos = position(me);
+	me.data_container = _toPointer(container_);
+	setPosition(me, pos);
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer>
+inline typename Position<TContainer>::Type &
+position(Iter<TContainer, PositionIterator> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_position;
+}
+template <typename TContainer>
+inline typename Position<TContainer>::Type const &
+position(Iter<TContainer, PositionIterator> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_position;
+}
+//____________________________________________________________________________
+
+template <typename TContainer, typename TPosition>
+inline void
+setPosition(Iter<TContainer, PositionIterator> & me, TPosition position_)
+{
+SEQAN_CHECKPOINT
+	me.data_position = position_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// value
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline typename Reference<Iter<TContainer, PositionIterator> >::Type 
+value(Iter<TContainer, PositionIterator> & me)
+{
+SEQAN_CHECKPOINT
+	return value(container(me), position(me));
+}
+template <typename TContainer>
+inline typename Reference<Iter<TContainer, PositionIterator> >::Type 
+value(Iter<TContainer, PositionIterator> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(container(me), position(me));
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// assignValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TValue>
+inline void
+assignValue(Iter<TContainer, PositionIterator> & me,
+			TValue _value)
+{
+SEQAN_CHECKPOINT
+	assignValue(container(me), position(me), _value);
+}
+template <typename TContainer, typename TValue>
+inline void
+assignValue(Iter<TContainer, PositionIterator> const & me,
+			TValue _value)
+{
+SEQAN_CHECKPOINT
+	assignValue(container(me), position(me), _value);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// moveValue
+//////////////////////////////////////////////////////////////////////////////
+
+// manual forwards
+template <typename T, typename TValue, typename TPos>
+inline void moveValue(T & me, TPos pos, TValue const & _value);
+template <typename T, typename TValue, typename TPos>
+inline void moveValue(T const & me, TPos pos, TValue const & _value);
+
+template <typename TContainer, typename TValue>
+inline void
+moveValue(Iter<TContainer, PositionIterator> & me,
+		  TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	moveValue(container(me), position(me), _value);
+}
+template <typename TContainer, typename TValue>
+inline void
+moveValue(Iter<TContainer, PositionIterator> const & me,
+		  TValue const & _value)
+{
+SEQAN_CHECKPOINT
+	moveValue(container(me), position(me), _value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator ==
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator == (Iter<TContainer, PositionIterator> const & left,
+			 Iter<TContainer, PositionIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return position(left) == position(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator !=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator != (Iter<TContainer, PositionIterator> const & left,
+			 Iter<TContainer, PositionIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return position(left) != position(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator < / >
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator < (Iter<TContainer, PositionIterator> const & left,
+			Iter<TContainer, PositionIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return position(left) < position(right);
+}
+
+template <typename TContainer>
+inline bool 
+operator > (Iter<TContainer, PositionIterator> const & left,
+			Iter<TContainer, PositionIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return position(left) > position(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator <= / >=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator <= (Iter<TContainer, PositionIterator> const & left,
+			 Iter<TContainer, PositionIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return position(left) <= position(right);
+}
+
+template <typename TContainer>
+inline bool 
+operator >= (Iter<TContainer, PositionIterator> const & left,
+			 Iter<TContainer, PositionIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return position(left) >= position(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goNext
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline void
+goNext(Iter<TContainer, PositionIterator> & me)
+{
+SEQAN_CHECKPOINT
+	setPosition(me, position(me) + 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goPrevious
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline void
+goPrevious(Iter<TContainer, PositionIterator> & me)
+{
+SEQAN_CHECKPOINT
+	setPosition(me, position(me) - 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +
+//////////////////////////////////////////////////////////////////////////////
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, PositionIterator>  
+operator + (Iter<TContainer, PositionIterator> const & left,
+			TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, PositionIterator>(container(left), position(left) + right);
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, PositionIterator>  
+operator + (Iter<TContainer, PositionIterator> const & left,
+			int right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, PositionIterator>(container(left), position(left) + right);
+}
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, PositionIterator>  
+operator + (TIntegral left,
+			Iter<TContainer, PositionIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, PositionIterator>(container(right), position(right) + left);
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, PositionIterator>  
+operator + (int left,
+			Iter<TContainer, PositionIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, PositionIterator>(container(right), position(right) + left);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, PositionIterator> &
+operator += (Iter<TContainer, PositionIterator> & left,
+			 TIntegral right)
+{
+SEQAN_CHECKPOINT
+	setPosition(left, position(left) + right);
+	return left;
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, PositionIterator> &
+operator += (Iter<TContainer, PositionIterator> & left,
+			 int right)
+{
+SEQAN_CHECKPOINT
+	setPosition(left, position(left) + right);
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, PositionIterator>  
+operator - (Iter<TContainer, PositionIterator> const & left,
+			TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, PositionIterator>(container(left), position(left) - right);
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, PositionIterator>  
+operator - (Iter<TContainer, PositionIterator> const & left,
+			int right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, PositionIterator>(container(left), position(left) - right);
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer>
+inline typename Difference<TContainer>::Type  
+operator - (Iter<TContainer, PositionIterator> const & left,
+			Iter<TContainer, PositionIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return position(left) - position(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, PositionIterator> &
+operator -= (Iter<TContainer, PositionIterator> & left,
+			 TIntegral right)
+{
+SEQAN_CHECKPOINT
+	setPosition(left, position(left) - right);
+	return left;
+}
+// for <anonymous enum> types
+template <typename TContainer>
+inline Iter<TContainer, PositionIterator> &
+operator -= (Iter<TContainer, PositionIterator> & left,
+			 int right)
+{
+SEQAN_CHECKPOINT
+	setPosition(left, position(left) - right);
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// assign (Conversion)
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTargetContainer, typename TSource>
+inline void
+assign(Iter<TTargetContainer, PositionIterator> & target,
+	   TSource const & source)
+{
+SEQAN_CHECKPOINT
+	target.data_container = _toPointer(container(source));
+	target.data_position = position(source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_iterator_simple.h b/src/SeqAn-1.3/seqan/basic/basic_iterator_simple.h
new file mode 100644
index 0000000..a4a4c0a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_iterator_simple.h
@@ -0,0 +1,130 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_ITERATOR_SIMPLE_H
+#define SEQAN_HEADER_BASIC_ITERATOR_SIMPLE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Iter
+//////////////////////////////////////////////////////////////////////////////
+
+struct SimpleIterator;
+
+/**
+.Spec.SimpleIterator:
+..cat:Iterators
+..summary:A simple iterator.
+..signature:Iter<TContainer, SimpleIterator>
+..param.TContainer:Type of the container that can be iterated.
+...metafunction:Metafunction.Container
+..general:Class.Iter
+..include:seqan/basic.h
+*/
+template <typename TContainer>
+class Iter<TContainer, SimpleIterator>
+{
+public:
+	typedef typename Value<TContainer>::Type TValue;
+	TValue * data_ptr;
+
+	Iter()
+	{
+	}
+	Iter(Iter const & other_):
+		data_ptr(other_.data_ptr)
+	{
+	}
+	Iter(TValue * other_data_ptr):
+		data_ptr(other_data_ptr)
+	{
+	}
+	template <typename TContainer2>
+	Iter(Iter<TContainer2, SimpleIterator> const & other_):
+		data_ptr(other_.data_ptr)
+	{
+	}
+	~Iter()
+	{
+	}
+	Iter const &
+	operator = (Iter const & other_)
+	{
+		this->data_ptr = other_.data_ptr;
+		return *this;
+	}
+	Iter const &
+	operator = (TValue * other_data_ptr)
+	{
+		data_ptr = other_data_ptr;
+		return *this;
+	}
+	template <typename TContainer2>
+	Iter const &
+	operator = (Iter<TContainer2, SimpleIterator> const & other_)
+	{
+		this->data_ptr = other_.data_ptr;
+		return *this;
+	}
+
+	operator TValue * ()
+	{
+		return data_ptr;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct Iterator_Default_Imp<T, Standard>
+{
+	typedef typename Value<T>::Type * Type;
+//	typedef Iter<T, SimpleIterator> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TContainer2>
+inline typename Position<Iter<TContainer, SimpleIterator> const>::Type 
+position(Iter<TContainer, SimpleIterator> const & me,
+		 TContainer2 const & cont)
+{
+SEQAN_CHECKPOINT
+	return me.data_ptr - begin(cont);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_logvalue.h b/src/SeqAn-1.3/seqan/basic/basic_logvalue.h
new file mode 100644
index 0000000..cae4d52
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_logvalue.h
@@ -0,0 +1,330 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_LOGVALUE_H
+#define SEQAN_HEADER_BASIC_LOGVALUE_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	
+//////////////////////////////////////////////////////////////////////////////
+// LogProb
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue = double, typename TSpec = Default>
+class LogProb;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSpec>
+class LogProb
+{
+public:	
+	TValue data_value;
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	LogProb() : data_value(std::log(0.0)) {	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	LogProb(TOtherValue const& _other) {
+		data_value = std::log(_other);
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb(LogProb<TValue2, TSpec2> const & _other) {
+		data_value = _other.data_value;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	~LogProb() {}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	operator int() const {
+		return (int) std::exp(data_value);
+	}
+
+	operator float() const {
+		return (float) std::exp(data_value);
+	}
+
+	operator double() const {
+		return (double) std::exp(data_value);
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	LogProb& operator=(TOtherValue const& rhs) {
+		data_value = std::log(rhs);
+		return *this;
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb& operator=(LogProb<TValue2, TSpec2> const& rhs) {
+		data_value = rhs.data_value;
+		return *this;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	
+	template<typename TOtherValue>
+	LogProb& operator*=(TOtherValue const& rhs) {
+		data_value += std::log(rhs);
+		return *this;
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb& operator*=(LogProb<TValue2, TSpec2> const& rhs) {
+		data_value += rhs.data_value;
+		return *this;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	LogProb operator*(TOtherValue const& other) {
+		LogProb result = *this;
+		result *= LogProb(other);
+		return result;
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb operator*(LogProb<TValue2, TSpec2> const& other) {
+		LogProb result = *this;
+		result *= other;
+		return result;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	
+	template<typename TOtherValue>
+	LogProb& operator/=(TOtherValue const& rhs) {
+		data_value -= std::log(rhs);
+		return *this;
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb& operator/=(LogProb<TValue2, TSpec2> const& rhs) {
+		data_value -= rhs.data_value;
+		return *this;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	LogProb operator/(TOtherValue const& other) {
+		LogProb result = *this;
+		result /= LogProb(other);
+		return result;
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb operator/(LogProb<TValue2, TSpec2> const& other) {
+		LogProb result = *this;
+		result /= other;
+		return result;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	
+	template<typename TOtherValue>
+	LogProb& operator+=(TOtherValue const& rhs) {
+		data_value = std::log(std::exp(data_value) + rhs);
+		return *this;
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb& operator+=(LogProb<TValue2, TSpec2> const& rhs) {
+		if (data_value > rhs.data_value) {
+			if ((rhs.data_value == std::log(0.0)) || (data_value - rhs.data_value > 100)) return *this;
+			data_value = data_value + std::log(1 + std::exp(rhs.data_value - data_value));
+		} else {
+			if ((data_value == std::log(0.0)) || (rhs.data_value - data_value > 100)) {
+				data_value = rhs.data_value;
+				return *this;
+			}
+			data_value = rhs.data_value + std::log(1 + std::exp(data_value - rhs.data_value));
+		}
+		return *this;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	LogProb operator+(TOtherValue const& other) {
+		LogProb result = *this;
+		result += LogProb(other);
+		return result;
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb operator+(LogProb<TValue2, TSpec2> const& other) {
+		LogProb result = *this;
+		result += other;
+		return result;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	
+	template<typename TOtherValue>
+	LogProb& operator-=(TOtherValue const& rhs) {
+		data_value = std::log(std::exp(data_value) - rhs);
+		return *this;
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb& operator-=(LogProb<TValue2, TSpec2> const& rhs) {
+		if (data_value > rhs.data_value) {
+			if ((rhs.data_value == std::log(0.0)) || (data_value - rhs.data_value > 100)) return *this;
+			data_value = data_value + std::log(1 - std::exp(rhs.data_value - data_value));
+		} else {
+			if ((data_value == std::log(0.0)) || (rhs.data_value - data_value > 100)) {
+				data_value = rhs.data_value;
+				return *this;
+			}
+			data_value = rhs.data_value + std::log(1 - std::exp(data_value - rhs.data_value));
+		}
+		return *this;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	LogProb operator-(TOtherValue const& other) {
+		LogProb result = *this;
+		result -= LogProb(other);
+		return result;
+	}
+
+	template<typename TValue2, typename TSpec2>
+	LogProb operator-(LogProb<TValue2, TSpec2> const& other) {
+		LogProb result = *this;
+		result -= other;
+		return result;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	bool operator==(TOtherValue const& other) const {
+		return data_value == std::log(other);
+	}
+
+	template<typename TValue2, typename TSpec2>
+	bool operator==(LogProb<TValue2, TSpec2> const& other) const {
+		return data_value == other.data_value;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	bool operator!=(TOtherValue const& other) const {
+		return data_value != std::log(other);
+	}
+
+	template<typename TValue2, typename TSpec2>
+	bool operator!=(LogProb<TValue2, TSpec2> const& other) const {
+		return data_value != other.data_value;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	bool operator<(TOtherValue const& other) const {
+		return data_value < std::log(other);
+	}
+
+	template<typename TValue2, typename TSpec2>
+	bool operator<(LogProb<TValue2, TSpec2> const& other) const {
+		return data_value < other.data_value;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	bool operator>(TOtherValue const& other) const {
+		return data_value > std::log(other);
+	}
+
+	template<typename TValue2, typename TSpec2>
+	bool operator>(LogProb<TValue2, TSpec2> const& other) const {
+		return data_value > other.data_value;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	bool operator<=(TOtherValue const& other) const {
+		return data_value <= std::log(other);
+	}
+
+	template<typename TValue2, typename TSpec2>
+	bool operator<=(LogProb<TValue2, TSpec2> const& other) const {
+		return data_value <= other.data_value;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TOtherValue>
+	bool operator>=(TOtherValue const& other) const {
+		return data_value >= std::log(other);
+	}
+
+	template<typename TValue2, typename TSpec2>
+	bool operator>=(LogProb<TValue2, TSpec2> const& other) const {
+		return data_value >= other.data_value;
+	}
+
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStream, typename TValue, typename TSpec>
+TStream& operator<<(TStream& os, LogProb<TValue, TSpec> const& rhs) {
+	return os << std::exp(rhs.data_value);
+}
+	
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_metaprogramming.h b/src/SeqAn-1.3/seqan/basic/basic_metaprogramming.h
new file mode 100644
index 0000000..b4ef0ea
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_metaprogramming.h
@@ -0,0 +1,361 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_BASIC_METAPROGRAMMING_H
+#define SEQAN_BASIC_METAPROGRAMMING_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Logical Values:
+..summary:Tag that represents true and false.
+..tag.True:The logical value "true".
+..tag.False:The logical value "false".
+..include:seqan/basic.h
+*/
+
+	struct True { enum { VALUE = true }; };
+	struct False { enum { VALUE = false }; };
+
+	template <bool b>
+	struct Eval
+	{
+		typedef False Type;
+	};
+
+	template <>
+	struct Eval<true>
+	{
+		typedef True Type;
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic "or" (using meta-programming)
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TBool1, typename TBool2>
+	struct Or
+	{
+		typedef True Type;
+	};
+
+	template <>
+	struct Or<False, False>
+	{
+		typedef False Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic "and" (using meta-programming)
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TBool1, typename TBool2>
+	struct And
+	{
+		typedef False Type;
+	};
+
+	template <>
+	struct And<True, True>
+	{
+		typedef True Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic "if" (using meta-programming)
+	// if Flag is true,  the resulting type is Type1
+	// if Flag is false, the resulting type is Type2
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <bool Flag,class Type1, class Type2>
+	struct If
+	{
+		typedef Type1 Type;
+	};
+
+	template <class Type1, class Type2>
+	struct If<false,Type1,Type2>
+	{
+		typedef Type2 Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic type comparison (using meta-programming)
+	// if Type1 equals Type2,		VALUE is true
+	// if Type1 differs from Type2, VALUE is false
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <class Type1, class Type2>
+	struct IsSameType
+	{
+		typedef False Type;
+		enum { VALUE = false };
+	};
+
+	template <class Type1>
+	struct IsSameType<Type1, Type1>
+	{
+		typedef True Type;
+		enum { VALUE = true };
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic "switch" (using meta-programming)
+	//////////////////////////////////////////////////////////////////////////////
+
+	const int DEFAULT = ~(~0u >> 1); // initialize with the smallest int
+
+	struct NilCase {};
+	  
+	template <int tag_,class Type_,class Next_ = NilCase>
+	struct Case
+	{
+		enum { tag = tag_ };
+		typedef Type_ Type;
+		typedef Next_ Next;
+	};
+
+	template <int tag,class Case>
+	class Switch
+	{
+		typedef typename Case::Next NextCase;
+		enum
+		{
+			caseTag = Case::tag,
+			found   = (caseTag == tag || caseTag == DEFAULT)
+		};
+	public:
+		typedef typename 
+			If<
+				found,
+				typename Case::Type,
+				typename Switch<tag,NextCase>::Type
+			>::Type Type;
+	};
+
+	template <int tag>
+	class Switch<tag,NilCase>
+	{
+	public:
+		typedef NilCase Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic loops (using meta-programming)
+	// corresponds to for(i=1; i<=I; ++i) ...
+	//////////////////////////////////////////////////////////////////////////////
+
+	// example of a loop Worker class
+	struct WorkerNothing
+	{
+		template <typename Arg>
+		static inline void body(Arg &/*arg*/, int /*I*/) {}
+	};
+
+	template <typename Worker, int I>
+	class Loop {
+	public:
+		template <typename Arg>
+		static inline void run(Arg &arg) {
+			Loop<Worker, I - 1>::run(arg);
+			Worker::body(arg, I);
+		}
+	};
+
+	template <typename Worker>
+	class Loop<Worker, 0> {
+	public:
+		// end of loop
+		template <typename Arg>
+		static inline void run(Arg &) {}
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic reverse loops (using meta-programming)
+	// corresponds to for(i=I; i>0; --i) ...
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename Worker, int I>
+	class LoopReverse {
+	public:
+		template <typename Arg>
+		static inline void run(Arg &arg) {
+			Worker::body(arg, I);
+			LoopReverse<Worker, I - 1>::run(arg);
+		}
+	};
+
+	template <typename Worker>
+	class LoopReverse<Worker, 0> {
+	public:
+		// end of loop
+		template <typename Arg>
+		static inline void run(Arg &) {}
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// logarithmus dualis (using meta-programming)
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < __int64 numerus >
+	struct Log2 {
+		static const __uint64 VALUE = Log2<(numerus + 1) / 2>::VALUE + 1;		// ceil(log_2(n))
+	};
+
+	template < __int64 numerus >
+	struct Log2Floor {
+		static const __uint64 VALUE = Log2Floor<numerus / 2>::VALUE + 1;		// floor(log_2(n))
+	};
+
+	template <> struct Log2<1> { static const __uint64 VALUE = 0; };
+	template <> struct Log2<0> { static const __uint64 VALUE = 0; };
+	template <> struct Log2Floor<1> { static const __uint64 VALUE = 0; };
+	template <> struct Log2Floor<0> { static const __uint64 VALUE = 0; };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// exponentiation (using meta-programming)
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < __int64 base, __int64 exponent >
+	struct Power {
+		static const __uint64 VALUE =
+				Power<base, exponent / 2>::VALUE * 
+				Power<base, exponent - (exponent / 2)>::VALUE;
+	};
+
+	template < __int64 base > struct Power<base, 1> { static const __uint64 VALUE = base; };
+	template < __int64 base > struct Power<base, 0> { static const __uint64 VALUE = 1; };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// memset with fill size (using meta-programming)
+	//////////////////////////////////////////////////////////////////////////////
+
+	using ::std::memset;
+
+	template <unsigned SIZE, bool direct>
+	struct MemsetWorker {
+		finline static void run(unsigned char* ptr, unsigned char c) { ::std::memset(ptr, c, SIZE); }
+	};
+
+	template <unsigned  SIZE>
+	struct MemsetWorker<SIZE, true> {
+		finline static void run(unsigned char* ptr, unsigned char c) {
+			*((unsigned*)ptr) = ((unsigned)c << 24) + ((unsigned)c << 16) + ((unsigned)c << 8) + (unsigned)c;
+			MemsetWorker<SIZE - 4, true>::run(ptr + 4, c);
+		}
+	};
+
+	template <>
+	struct MemsetWorker<0, true> {
+		finline static void run(unsigned char*, unsigned char) {}
+	};
+
+	template <>
+	struct MemsetWorker<1, true> {
+		finline static void run(unsigned char* ptr, unsigned char c) { *ptr = c; }
+	};
+
+	template <>
+	struct MemsetWorker<2, true> {
+		finline static void run(unsigned char* ptr, unsigned char c) { *(unsigned short *)ptr = ((unsigned short)c << 8) + (unsigned short)c; }
+	};
+
+	template <>
+	struct MemsetWorker<3, true> {
+		finline static void run(unsigned char* ptr, unsigned char c) {
+			MemsetWorker<2, true>::run(ptr, c);
+			MemsetWorker<1, true>::run(ptr + 2, c);
+		}
+	};
+
+	template <unsigned SIZE>
+	finline void memset(void* ptr, unsigned char c) {
+		MemsetWorker<SIZE, SIZE <= 32>::run((unsigned char*)ptr, c);
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// memset with fill value (using meta-programming)
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <unsigned SIZE, bool direct, unsigned char c>
+	struct MemsetConstValueWorker {
+		finline static void run(unsigned char* ptr) { ::std::memset(ptr, c, SIZE); }
+	};
+
+	template <unsigned  SIZE, unsigned char c>
+	struct MemsetConstValueWorker<SIZE, true, c> {
+		finline static void run(unsigned char* ptr) {
+			*((unsigned*)ptr) = ((unsigned)c << 24) + ((unsigned)c << 16) + ((unsigned)c << 8) + (unsigned)c;
+			MemsetConstValueWorker<SIZE - 4, true, c>::run(ptr + 4);
+		}
+	};
+
+	template <unsigned char c>
+	struct MemsetConstValueWorker<0, true, c> {
+		finline static void run(unsigned char*) {}
+	};
+
+	template <unsigned char c>
+	struct MemsetConstValueWorker<1, true, c> {
+		finline static void run(unsigned char* ptr) { *ptr = c; }
+	};
+
+	template <unsigned char c>
+	struct MemsetConstValueWorker<2, true, c> {
+		finline static void run(unsigned char* ptr) { *(unsigned short *)ptr = ((unsigned short)c << 8) + (unsigned short)c; }
+	};
+
+	template <unsigned char c>
+	struct MemsetConstValueWorker<3, true, c> {
+		finline static void run(unsigned char* ptr) {
+			MemsetConstValueWorker<2, true, c>::run(ptr);
+			MemsetConstValueWorker<1, true, c>::run(ptr + 2);
+		}
+	};
+
+	template <unsigned SIZE, unsigned char c>
+	finline void memset(void* ptr) {
+		MemsetConstValueWorker<SIZE, SIZE <= 32, c>::run((unsigned char*)ptr);
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/basic/basic_operator.h b/src/SeqAn-1.3/seqan/basic/basic_operator.h
new file mode 100644
index 0000000..fcb204f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_operator.h
@@ -0,0 +1,44 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_OPERATOR_H
+#define SEQAN_HEADER_BASIC_OPERATOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
+
diff --git a/src/SeqAn-1.3/seqan/basic/basic_parallelism.h b/src/SeqAn-1.3/seqan/basic/basic_parallelism.h
new file mode 100644
index 0000000..9b65e6c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_parallelism.h
@@ -0,0 +1,64 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// This module contains simple, generic support code for parallelism in
+// SeqAn. It mainly defines the macros SEQAN_ENABLE_PARALLELISM and
+// SEQAN_PRAGMA_IF_PARALLEL.
+// ==========================================================================
+
+#ifndef SEQAN_BASIC_BASIC_PARALLELISM_H_
+#define SEQAN_BASIC_BASIC_PARALLELISM_H_
+
+/* By default, parallelism is enabled if OpenMP is activated.
+ */
+#if !defined(SEQAN_ENABLE_PARALLELISM)
+#if defined(_OPENMP)
+#define SEQAN_ENABLE_PARALLELISM 1
+#else  // defined(_OPENMP)
+#define SEQAN_ENABLE_PARALLELISM 0
+#endif  // defined(_OPENMP)
+#endif  // !defined(SEQAN_ENABLE_PARALLELISM)
+
+
+/* The SEQAN_PRAGMA_IF_PARALLEL macro expands to a pragma as in the argument
+ * if SEQAN_ENABLE_PARALLELISM is 1.
+ */
+#if SEQAN_ENABLE_PARALLELISM
+// SEQAN_MKSTRING_() comes from basic_testing.h, so include before this header.
+#define SEQAN_PRAGMA_IF_PARALLEL(arg) \
+  Pragma_(SEQAN_MKSTRING_(arg))
+#else  // SEQAN_ENABLE_PARALLELISM
+#define SEQAN_PRAGMA_IF_PARALLEL
+#endif  // SEQAN_ENABLE_PARALLELISM
+
+#endif  // SEQAN_BASIC_BASIC_PARALLELISM_H_
diff --git a/src/SeqAn-1.3/seqan/basic/basic_pointer.h b/src/SeqAn-1.3/seqan/basic/basic_pointer.h
new file mode 100644
index 0000000..735172a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_pointer.h
@@ -0,0 +1,115 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_POINTER_H
+#define SEQAN_HEADER_BASIC_POINTER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Adaption.char array
+
+template <typename TValue>
+struct Value< TValue * >
+{
+	typedef TValue Type;
+};
+template <typename TValue>
+struct Value< TValue * const>
+{
+	typedef TValue Type;
+};
+
+//The next two metafunctions dont work in VC++ due to a compiler bug.
+//(the default implementation in common_type.h is called instead)
+//work-around: convert arrays to pointers.
+template <typename TValue, size_t SIZE>
+struct Value< TValue [SIZE] >
+{
+	typedef TValue Type;
+};
+template <typename TValue, size_t SIZE>
+struct Value< TValue const [SIZE] >
+{
+	typedef TValue Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Iterator.param.T.type:Adaption.char array
+
+template <typename TValue>
+struct Iterator< TValue *, Standard>
+{
+	typedef TValue * Type;
+};
+template <typename TValue>
+struct Iterator< TValue * const, Standard>
+{
+	typedef TValue * Type;
+};
+
+//____________________________________________________________________________
+
+template <typename TValue, size_t SIZE>
+struct Iterator< TValue [SIZE], Standard>:
+	Iterator<TValue *, Standard>
+{
+};
+template <typename TValue, size_t SIZE>
+struct Iterator< TValue const [SIZE], Standard>:
+	Iterator<TValue const *, Standard>
+{
+};
+
+template <typename TValue, size_t SIZE>
+struct Iterator< TValue [SIZE], Rooted>:
+	Iterator<TValue *, Rooted>
+{
+};
+template <typename TValue, size_t SIZE>
+struct Iterator< TValue const [SIZE], Rooted>:
+	Iterator<TValue const *, Rooted>
+{
+};
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_profchar.h b/src/SeqAn-1.3/seqan/basic/basic_profchar.h
new file mode 100644
index 0000000..0752658
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_profchar.h
@@ -0,0 +1,213 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQAN_BASIC_PROFCHAR_H
+#define SEQAN_HEADER_SEQAN_BASIC_PROFCHAR_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Profile alphabet character
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TValue, typename TCount = unsigned int, typename TSpec = Default>
+class ProfileType;
+
+template<typename TValue, typename TCount, typename TSpec>
+struct ValueSize<ProfileType<TValue, TCount, TSpec> >
+{
+	enum { VALUE = ValueSize<TValue>::VALUE + 1};
+};
+
+template<typename TValue, typename TCount, typename TSpec>
+class ProfileType {
+	public:
+		typedef typename Size<ProfileType>::Type TSize;
+
+		TCount count[ValueSize<ProfileType>::VALUE];
+
+		ProfileType() {
+			memset<ValueSize<ProfileType>::VALUE * sizeof(TCount), (unsigned char) 0>(count);
+		}
+
+		~ProfileType() {}
+
+		ProfileType(ProfileType const& other_data) {
+			for(TSize i = 0; i<ValueSize<ProfileType>::VALUE; ++i) 
+				count[i] = other_data.count[i];
+		}
+
+
+		template <typename TOther> 
+		ProfileType(TOther const& other_data) {
+			memset<ValueSize<ProfileType>::VALUE * sizeof(TCount), (unsigned char) 0>(count);
+			count[ordValue(TValue(other_data))] = 1;
+		}
+
+		ProfileType const& 
+		operator = (ProfileType const& other_data) 
+		{
+			if (this == &other_data) return *this;
+			for(TSize i = 0; i<ValueSize<ProfileType>::VALUE; ++i) 
+				count[i] = other_data.count[i];
+			return *this;
+		}
+
+		template <typename TOther>
+		ProfileType const& 
+		operator = (TOther const& other_data) {
+			memset<ValueSize<ProfileType>::VALUE * sizeof(TCount), (unsigned char) 0>(count);
+			count[ordValue(TValue(other_data))] = 1;
+			return *this;
+		}
+
+		operator char() { 
+			typedef typename Size<ProfileType>::Type TSize;
+			TSize maxIndex = 0;
+			TCount maxCount = count[0];
+			for(TSize i = 1; i<ValueSize<ProfileType>::VALUE; ++i) {
+				if (count[i] > maxCount) {
+					maxIndex = i;
+					maxCount = count[i];
+				}
+			}
+			return (maxIndex == ValueSize<ProfileType>::VALUE - 1) ? gapValue<char>() : (char) TValue(maxIndex);
+		}
+
+		bool
+		operator==(ProfileType const& other_data) const {
+			for(TSize i = 0; i<ValueSize<ProfileType>::VALUE; ++i) {
+				if (count[i] != other_data.count[i]) return false;
+			}
+			return true;
+		}
+
+		bool 
+		operator!=(ProfileType const& other_data) const {
+			for(TSize i = 0; i<ValueSize<ProfileType>::VALUE; ++i) {
+				if (count[i] != other_data.count[i]) return true;
+			}
+			return false;
+		}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T>
+struct SourceValue;
+
+template<typename TValue, typename TCount, typename TSpec>
+struct SourceValue<ProfileType<TValue, TCount, TSpec> >
+{
+	typedef TValue Type;
+};
+
+template<typename TValue, typename TCount, typename TSpec>
+struct SourceValue<ProfileType<TValue, TCount, TSpec> const>
+{
+	typedef TValue const Type;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename TSourceValue, typename TSourceCount, typename TSourceSpec>
+inline bool
+empty(ProfileType<TSourceValue, TSourceCount, TSourceSpec> const & source)
+{
+	typedef typename Size<ProfileType<TSourceValue, TSourceCount, TSourceSpec> const >::Type TSize;
+	// Check if there are only gaps
+	for(TSize i = 0; i<ValueSize<TSourceValue>::VALUE; ++i) {
+		if (source.count[i]) return false;
+	}
+	return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename TSourceValue, typename TSourceCount, typename TSourceSpec>
+inline typename Size<ProfileType<TSourceValue, TSourceCount, TSourceSpec> const >::Type
+_getMaxIndex(ProfileType<TSourceValue, TSourceCount, TSourceSpec> const & source)
+{
+	typedef ProfileType<TSourceValue, TSourceCount, TSourceSpec> TProfileType;
+	typedef typename Size<TProfileType>::Type TSize;
+	TSize maxIndex = 0;
+	TSourceCount maxCount = source.count[0];
+	for(TSize i = 1; i<ValueSize<TProfileType>::VALUE; ++i) {
+		if (source.count[i] > maxCount) {
+			maxIndex = i;
+			maxCount = source.count[i];
+		}
+	}
+	return maxIndex;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TSourceCount, typename TSourceSpec>
+inline void 
+assign(SimpleType<TTargetValue, TTargetSpec> & target, 
+	   ProfileType<TSourceValue, TSourceCount, TSourceSpec> const & source)
+{
+	target.value = _getMaxIndex(source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTarget, typename T, typename TSourceValue, typename TSourceCount, typename TSourceSpec>
+inline typename Convert<TTarget, ProfileType<TSourceValue, TSourceCount, TSourceSpec> >::Type
+convertImpl(Convert<TTarget, T> const,
+			ProfileType<TSourceValue, TSourceCount, TSourceSpec> const & source)
+{
+	return (_getMaxIndex(source) == ValueSize<TSourceValue>::VALUE) ? convertImpl(Convert<TTarget, T>(), '-') : convertImpl(Convert<TTarget, T>(), TSourceValue(_getMaxIndex(source)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStream, typename TValue, typename TCount, typename TSpec>
+inline TStream& 
+operator<<(TStream& os, ProfileType<TValue, TCount, TSpec> const& rhs) {
+	typedef ProfileType<TValue, TCount, TSpec> TProfileType;
+	typedef typename Size<TProfileType>::Type TSize;
+	for(TSize i = 0; i<ValueSize<TProfileType>::VALUE; ++i) {
+		os << i << ':' << rhs.count[i] << ' ' << ';';
+	}
+	return os;
+}
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/basic/basic_profile.h b/src/SeqAn-1.3/seqan/basic/basic_profile.h
new file mode 100644
index 0000000..a7c649d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_profile.h
@@ -0,0 +1,552 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_BASIC_PROFILE_H
+#define SEQAN_HEADER_BASIC_PROFILE_H
+
+// todo: substitute defines with inlines
+#ifndef SEQAN_PROFILE
+
+    #define SEQAN_PROSET(i,v)           do {} while (false)
+    #define SEQAN_PROADD(i,v)           do {} while (false)
+    #define SEQAN_PROSUB(i,v)           do {} while (false)
+	#define SEQAN_PROVAL(i)				0
+    #define SEQAN_PROEXTRAS(i)          do {} while (false)
+    #define SEQAN_PROMARK(m)            do {} while (false)
+    #define SEQAN_PROENDMARK(m)         do {} while (false)
+    #define SEQAN_PRORESET              do {} while (false)
+	#define SEQAN_PROGETTIME			0
+    #define SEQAN_PROTIMESTART(a)       do {} while (false)
+    #define SEQAN_PROTIMEDIFF(a)		0
+	#define SEQAN_PROTIMEUPDATE(a)		0
+	// replace malloc and free in external tools
+	// with SEQAN_PROMALLOC and SEQAN_PROFREE to profile
+	// their memory usage
+    #define SEQAN_PROMALLOC(s) 			malloc(s)
+    #define SEQAN_PROFREE(p) 			free(p)
+
+#else
+
+    #define SEQAN_PROSET(i,v)			_profileSet(i,v)
+    #define SEQAN_PROADD(i,v)			_profileAdd(i,v)
+    #define SEQAN_PROSUB(i,v)			_profileSub(i,v)
+	#define SEQAN_PROVAL(i)				(ProfileData_<>::_proValue[i])
+    #define SEQAN_PROEXTRAS(i)			{ProfileData_<>::_proExtraCount = i;}
+    #define SEQAN_PROMARK(m)			_profileMark(m)
+    #define SEQAN_PROENDMARK(m)			_profileEndMark(m)
+    #define SEQAN_PRORESET				_profileReset()
+	#define SEQAN_PROGETTIME			sysTime()
+    #define SEQAN_PROTIMESTART(a)		_proFloat a = sysTime()
+    #define SEQAN_PROTIMEDIFF(a)		(sysTime() - a)
+	#define SEQAN_PROTIMEUPDATE(a)		(_profileUpdate(a))
+    #define SEQAN_PROMALLOC(s)			_profileMalloc(s)
+    #define SEQAN_PROFREE(p)			_profileFree(p)
+
+#endif
+
+#ifdef PLATFORM_WINDOWS
+    typedef __int64   ProfileInt_;
+#else
+    typedef int64_t ProfileInt_;
+#endif
+
+    typedef double    _proFloat;
+
+
+    typedef _proFloat ProfileTimeValue_;
+
+    enum ProfileConstants_ {
+        SEQAN_PROPAGESIZE         = 4096, // B in byte
+        SEQAN_PROFLOAT            = 0,
+        SEQAN_PROINT              = 1,
+        SEQAN_PROTIME             = 2,
+        SEQAN_PROTYPEMASK         = 3,
+        SEQAN_PROSTATE            = 4
+    };
+
+    enum ProfileValueIndex_ {
+		SEQAN_PROSYSTIME		  = 0,
+		SEQAN_PROCPUTIME		  = 1,
+        SEQAN_PROMEMORY           = 2,    // current memory usage (state value)
+        SEQAN_PROIO               = 3,    // IOs done (measured in Blocks of size B)
+        SEQAN_PROIORANDOM         = 4,    // IOs calls done (read/write calls done)
+        SEQAN_PROIOVOLUME         = 5,    // current disk usage (state value)
+        SEQAN_PRODEPTH            = 6,    // algorithmic rec. depth or loop count
+		SEQAN_PROOPENFILES		  = 7,	  // currently opened files
+        SEQAN_PROIWAIT            = 8,    // waiting time (initiating)
+        SEQAN_PROCWAIT            = 9,    // waiting time (completing)
+		SEQAN_PROEXTRA1           = 10,
+		SEQAN_PROEXTRA2           = 11,
+		SEQAN_PROEXTRA3           = 12,
+		SEQAN_PROINDEXCOUNT       = 13,
+		SEQAN_PROEXTRACOUNT       = 3
+    };
+
+    const char ProfileValueType_[] = {
+		SEQAN_PROTIME, 
+		SEQAN_PROTIME, 
+        SEQAN_PROINT + SEQAN_PROSTATE, 
+        SEQAN_PROINT,
+        SEQAN_PROINT,
+        SEQAN_PROINT + SEQAN_PROSTATE, 
+        SEQAN_PROINT + SEQAN_PROSTATE, 
+        SEQAN_PROINT + SEQAN_PROSTATE, 
+        SEQAN_PROFLOAT,
+        SEQAN_PROFLOAT,
+        SEQAN_PROFLOAT + SEQAN_PROSTATE,
+        SEQAN_PROFLOAT + SEQAN_PROSTATE,
+        SEQAN_PROFLOAT + SEQAN_PROSTATE
+    };
+
+    typedef ProfileTimeValue_ ProfileTStates_[SEQAN_PROINDEXCOUNT];
+    typedef _proFloat  ProfileTTimes[SEQAN_PROINDEXCOUNT];
+
+
+
+    struct ProfileFile_;
+
+	template <typename T = void>
+	struct ProfileData_
+	{
+		static ProfileTStates_	_proValue;
+		static ProfileTTimes	_proLastUpdate;
+		static int			_proExtraCount;
+	    
+		static clock_t		_proCpuTimeLast;			// clock_t wraps around every 72mins
+		static ProfileInt_		_proCpuTimeOffset;			// we have to work around this
+
+		static ProfileFile_*	_proPFile;
+		static ProfileFile_*	_proPFileStream;
+	};
+
+	template <typename T> ProfileTStates_	ProfileData_<T>::_proValue = {};
+	template <typename T> ProfileTStates_	ProfileData_<T>::_proLastUpdate = {};
+	template <typename T> int			ProfileData_<T>::_proExtraCount = 0;
+	template <typename T> clock_t		ProfileData_<T>::_proCpuTimeLast = 0;
+	template <typename T> ProfileInt_		ProfileData_<T>::_proCpuTimeOffset = 0;
+	template <typename T> ProfileFile_*		ProfileData_<T>::_proPFile = NULL;
+	template <typename T> ProfileFile_*		ProfileData_<T>::_proPFileStream = NULL;
+
+
+	inline ProfileFile_* & _proPFile()			{ return ProfileData_<>::_proPFile; }
+	inline ProfileFile_* & _proPFileStream()	{ return ProfileData_<>::_proPFileStream; }
+
+/**
+.Function.cpuTime:
+..cat:Misc
+..summary:Returns the cpu time in seconds.
+..signature:cpuTime()
+..returns:A cpu time stamp in seconds.
+...type:nolink:double
+..remarks:Calls $clock$ to retrieve the processor time used by the running thread.
+..see:Function.sysTime
+..include:seqan/basic.h
+*/
+
+
+// HINT: The unit of all time functions is second.
+    inline _proFloat cpuTime() {
+    	clock_t now = clock();
+    	if (ProfileData_<>::_proCpuTimeLast > now) {		// test for time wrap
+    		ProfileData_<>::_proCpuTimeOffset += (~0u);		// got one
+    		ProfileData_<>::_proCpuTimeOffset ++;
+//    		printf("\n!!WRAP!! old:%d, now:%d    ofs:%d\n",ProfileData_<>::_proCpuTimeLast,now,ProfileData_<>::_proCpuTimeOffset);
+    	}
+   		ProfileData_<>::_proCpuTimeLast = now;
+    	return (ProfileData_<>::_proCpuTimeOffset + now) / (_proFloat)CLOCKS_PER_SEC;
+   	}
+
+
+/**
+.Function.sysTime:
+..cat:Misc
+..summary:Returns the system time in seconds.
+..signature:sysTime()
+..returns:A system time stamp in seconds.
+...type:nolink:double
+..remarks:In contrast to @Function.cpuTime@, the system time corresponds to the wall clock time under Linux and Mac OS X.
+Under Windows @Function.sysTime@ returns the result of @Function.cpuTime at .
+..remarks:Calls $clock_gettime$ under Linux and $gettimeofday$ under Mac OS X.
+..see:Function.cpuTime
+..include:seqan/basic.h
+*/
+
+    #ifdef PLATFORM_WINDOWS
+//        inline _proFloat sysTime() { return GetTickCount() * 1e-3; }
+		inline _proFloat sysTime() { return ( (_proFloat) clock() ) / CLOCKS_PER_SEC; }
+    #else
+
+		#include <unistd.h>
+		#if _POSIX_TIMERS > 0
+			#ifndef SEQAN_USE_CLOCKGETTIME
+			#define SEQAN_USE_CLOCKGETTIME
+			#endif
+		#endif
+		
+		#ifndef SEQAN_USE_CLOCKGETTIME
+		/* some systems e.g. darwin have no clock_gettime */
+		
+			#include <sys/time.h>
+			
+			inline _proFloat sysTime() {
+				struct timeval tp;
+				gettimeofday(&tp, NULL);
+				return tp.tv_sec + tp.tv_usec * 1e-6;
+			}
+
+		#else
+
+			inline _proFloat sysTime() {
+				struct timespec tp;
+				clock_gettime(CLOCK_MONOTONIC, &tp);
+				return tp.tv_sec + tp.tv_nsec * 1e-9;
+			}
+
+	    #endif
+
+    #endif
+
+    
+    struct ProfileFile_ {
+
+        FILE   *out;
+        bool   running;
+
+        _proFloat dumpStep;            // 0 .. manual dump mode, >0 .. live stream
+        _proFloat dumpNext;        
+
+        ProfileTStates_ all, last;
+        ::std::string mark;
+        unsigned	lines;
+
+        ProfileFile_() {
+            running = false;
+        }
+
+        ProfileFile_(char const *fname, _proFloat _dumpStep = 300.0) { // five minutes default dump interval
+            running = false;
+            start(fname, _dumpStep);
+        }
+
+        ~ProfileFile_() {
+            if (running) stop();
+        }
+
+        inline void start(char const *fname, _proFloat _dumpStep = 300.0, bool append = false) {
+            if (append)
+                out = fopen(fname, "a");
+            else {
+                out = fopen(fname, "w");
+                dumpHeader();
+            }
+
+            if (!out) printf("WARNING: proFile could not be opened.\n");
+
+			setTime(ProfileData_<>::_proValue);
+            syncAll(all);
+            syncAll(last);
+            running      = true;
+            lines		 = 0;
+            dumpStep     = _dumpStep;
+            dumpNext     = sysTime();
+            dump(last);
+        }
+
+        inline void stop() {
+            dump(last);
+            maximize(all, last);
+            if (dumpStep == 0) {
+                mark = "Zusammenfassung";
+                dump(all);
+            }
+            fclose(out);
+            running = false;
+        }
+
+        inline void syncTime(ProfileTStates_ &dst) {
+			::std::memcpy(dst, ProfileData_<>::_proValue, 2 * sizeof(ProfileTimeValue_));
+        }
+
+        inline void sync(ProfileTStates_ &dst) {
+            ::std::memcpy(&(dst[2]), &(ProfileData_<>::_proValue[2]), sizeof(ProfileTStates_) - 2 * sizeof(ProfileTimeValue_));
+        }
+
+        inline void syncAll(ProfileTStates_ &dst) {
+            ::std::memcpy(dst, ProfileData_<>::_proValue, sizeof(ProfileTStates_));
+        }
+
+		inline static void setTime(ProfileTStates_ &dst) {
+            dst[0] = sysTime();
+			dst[1] = cpuTime();
+		}
+
+        inline void maximize(ProfileTStates_ &dst, ProfileTStates_ const &src) {
+            for(int i = 0; i < SEQAN_PROINDEXCOUNT; ++i)
+                if (((ProfileValueType_[i] & SEQAN_PROSTATE) != 0))
+                    if (dst[i] < src[i])
+                        dst[i] = src[i];
+        }
+
+        inline void dumpTab() {
+            if (!bol)
+                fprintf(out, " \t");
+            bol = false;
+        }
+
+        inline void dumpEndl() { fprintf(out, "\n"); }
+
+        inline void dumpHeader() {
+            fprintf(out, "\"Echtzeit\"\t\"CPU-Zeit\"\t\"Speicher\"\t\"I/O-Zugriffe\"\t\"wahlfreie I/Os\"\t\"I/O-Volumen\"\t\"Rekursionstiefe\"\t\"Offene Dateien\"\t\"Idle-Zeit vor I/O\"\t\"Idle-Zeit nach I/O\"\n");
+        }
+
+        inline void dumpTime(_proFloat seconds) {
+			if (seconds < 0) {
+				fputc('-', out);
+				seconds = -seconds;
+			}
+            int secs    = (int)seconds;
+            int mins    = secs/60;  secs -= 60*mins;
+            int hours   = mins/60;  mins -= 60*hours;
+            fprintf(out, "%d:%02d:%02d", hours, mins, secs);
+        }
+
+        inline void dumpTimeEx(_proFloat seconds) {
+            int milli   = (int)(seconds * 1000.0);
+            int secs    = (int)seconds;
+            int mins    = secs/60;  secs -= 60*mins;
+            int hours   = mins/60;  mins -= 60*hours;
+            fprintf(out, "%d:%02d:%02d.%03d", hours, mins, secs, milli);
+        }
+
+        inline void dumpValue(ProfileTStates_ &stat, int valNum) {
+			_proFloat f = stat[valNum];
+            if ((ProfileValueType_[valNum] & SEQAN_PROSTATE) == 0)
+				f = ProfileData_<>::_proValue[valNum] - f;
+
+			switch (ProfileValueType_[valNum] & SEQAN_PROTYPEMASK) {
+				case SEQAN_PROINT:   									// state value -> print last seen maximum
+					fprintf(out, "%.0f", f);
+					break;
+
+				case SEQAN_PROFLOAT:
+					fprintf(out, "%f", f);
+					break;
+
+				case SEQAN_PROTIME:
+					dumpTimeEx(f);
+			}
+        }
+
+        inline void dumpSysValues(ProfileTStates_ &stat) {
+            for(int i = 0; i < SEQAN_PROINDEXCOUNT - SEQAN_PROEXTRACOUNT; ++i) {
+                dumpTab();
+                dumpValue(stat, i);
+            }
+        }
+
+        inline void dumpExtraValues(ProfileTStates_ &stat) {
+            for(int i = 0; i < ProfileData_<>::_proExtraCount; ++i) {
+                dumpTab();
+                dumpValue(stat, SEQAN_PROINDEXCOUNT - SEQAN_PROEXTRACOUNT + i);
+            }
+	}
+	
+        inline void dumpMark() {
+            if (!mark.empty()) {
+                dumpTab();
+                fprintf(out, "\"%s\"", mark.c_str());
+                mark.erase();
+            }
+        }
+
+        inline void dump(ProfileTStates_ &stat) {
+			setTime(ProfileData_<>::_proValue);
+            dumpNext += dumpStep;
+            bol = true;
+            bool _flush = ((dumpStep == 0.0)) || ((lines & 16) == 0);
+
+            dumpSysValues(stat);
+            dumpExtraValues(stat);
+            dumpMark();
+            dumpEndl();
+            if (_flush) fflush(out);
+            ++lines;
+        }
+
+        inline void signalDumpTest(_proFloat now) {
+            if (dumpStep > 0 && now > dumpNext && running) {
+                dump(last);
+                maximize(all, last);
+                sync(last);
+            }
+        }
+
+        inline void signalNewMax(int valNum) {
+            if (running)
+                if (last[valNum] < ProfileData_<>::_proValue[valNum])
+                    last[valNum] = ProfileData_<>::_proValue[valNum];
+        }
+
+        inline void setMark(const char *text) {
+            if (running) {
+                mark = text;
+                if (dumpStep == 0.0) {
+                    dump(last);                 // manual dump;
+                    maximize(all, last);
+                    sync(last);
+                }
+            }
+        }
+        
+        inline void reset() {
+        	syncTime(last);
+        }
+
+        inline void setEndMark(const char *text) {
+            if (running) {
+				setMark(text);
+				reset();
+			}
+        }
+
+    private:
+        
+        bool bol;   // begin of line
+    };
+
+
+
+/*
+    inline void _profileSignalDumpTest(_proFloat now);
+    inline void _profileSignalNewMax(int valNum);
+    inline void _profileMark(const char *text);
+    inline void _profileEndMark(const char *text);
+    inline void _profileReset();
+
+    inline void _profileSet(int valNum, _proFloat value);
+    inline void _profileAdd(int valNum, _proFloat value);
+    inline void _profileSub(int valNum, _proFloat value);
+    
+    // simple interface for external programs
+    inline void *_profileMalloc(size_t size);
+    inline void _profileFree(void *_ptr);
+*/
+
+    inline void _profileSignalDumpTest(_proFloat now) {
+        if (ProfileData_<>::_proPFileStream) ProfileData_<>::_proPFileStream->signalDumpTest(now);
+    }
+
+    inline void _profileSignalNewMax(int valNum) {
+        if (((ProfileValueType_[valNum] & SEQAN_PROSTATE) != 0)) {
+            if (ProfileData_<>::_proPFileStream) ProfileData_<>::_proPFileStream->signalNewMax(valNum);
+            if (ProfileData_<>::_proPFile)       ProfileData_<>::_proPFile->signalNewMax(valNum);
+        }
+    }
+
+    inline void _profileMark(const char *text) {
+        if (ProfileData_<>::_proPFileStream) ProfileData_<>::_proPFileStream->setMark(text);
+        if (ProfileData_<>::_proPFile)       ProfileData_<>::_proPFile->setMark(text);
+    }
+
+    inline void _profileEndMark(const char *text) {
+        if (ProfileData_<>::_proPFileStream) { ProfileData_<>::_proPFileStream->setEndMark(text); }
+        if (ProfileData_<>::_proPFile)       { ProfileData_<>::_proPFile->setEndMark(text); }
+    }
+
+    inline void _profileReset() {
+        if (ProfileData_<>::_proPFileStream) { ProfileData_<>::_proPFileStream->reset(); }
+        if (ProfileData_<>::_proPFile)       { ProfileData_<>::_proPFile->reset(); }
+    }
+
+
+
+
+	template <typename TValue>
+    inline void _profileSet(ProfileValueIndex_ valNum, TValue value) {
+        _proFloat now = sysTime();
+        ProfileData_<>::_proLastUpdate[valNum] = now;
+        if (ProfileData_<>::_proValue[valNum] < value) {
+            ProfileData_<>::_proValue[valNum] = value;
+            _profileSignalNewMax(valNum);
+        } else
+            ProfileData_<>::_proValue[valNum] = value;
+        _profileSignalDumpTest(now);
+    }
+
+	template <typename TValue>
+    inline void _profileAdd(ProfileValueIndex_ valNum, TValue value) {
+        _proFloat now = sysTime();
+        ProfileData_<>::_proValue[valNum] += value;
+        ProfileData_<>::_proLastUpdate[valNum] = now;
+        if (valNum == SEQAN_PROIO) _profileAdd(SEQAN_PROIORANDOM, 1);
+        _profileSignalNewMax(valNum);
+        _profileSignalDumpTest(now);
+    }
+
+	template <typename TValue>
+    inline void _profileSub(ProfileValueIndex_ valNum, TValue value) {
+        _proFloat now = sysTime();
+        ProfileData_<>::_proValue[valNum] -= value;
+        ProfileData_<>::_proLastUpdate[valNum] = now;
+        _profileSignalDumpTest(now);
+    }
+    
+    // simple interface for external programs
+    inline void *_profileMalloc(size_t size) {
+    	size_t *ptr = reinterpret_cast<size_t*>(malloc(size + sizeof(size_t)));
+    	if (ptr) {
+    		_profileAdd(SEQAN_PROMEMORY, (_proFloat)(*ptr = size));
+//			printf("_profileMalloc %x size %d\n", ptr, size);
+    		++ptr;
+    	}
+    	return ptr;
+    }
+
+    inline void _profileFree(void *_ptr) {
+    	size_t *ptr = reinterpret_cast<size_t*>(_ptr);
+    	if (ptr) {
+    		--ptr;
+//			printf("_profileFree   %x size %d\n", _ptr, *ptr);
+    		_profileSub(SEQAN_PROMEMORY, (_proFloat)*ptr);
+    	}
+    	free(ptr);
+    }
+
+	inline _proFloat _profileUpdate(_proFloat& a) {
+		_proFloat x = sysTime() - a;
+		a += x;
+		return x;
+    }
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/basic/basic_proxy.h b/src/SeqAn-1.3/seqan/basic/basic_proxy.h
new file mode 100644
index 0000000..7b02784
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_proxy.h
@@ -0,0 +1,632 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_PROXY_H
+#define SEQAN_HEADER_BASIC_PROXY_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Proxy
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Class.Proxy:
+..cat:Basic
+..summary:Emulates object of another class.
+..signature:Proxy<TSpec>
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+..remarks.text:Use @Metafunction.Value@ to get the emulated type.
+An instance of $Proxy$ behaves like an object of its value type.
+$Proxy$ can be used as reference type (see @Metafunction.Reference@).
+..remarks.text:Note that functions that are both general and specialized for 
+the value type should be specialized for $Proxy<TSpec>$ too, 
+since otherwise the general version will be called.
+..include:seqan/basic.h
+*/
+
+template <typename TSpec>
+struct Proxy;
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.Proxy
+
+template <typename TSpec>
+struct Spec< Proxy<TSpec> >
+{
+	typedef TSpec Type;
+};
+template <typename TSpec>
+struct Spec< Proxy<TSpec> const>
+{
+	typedef TSpec Type;
+};
+
+template <typename TIterator>
+struct IteratorProxy;
+
+//////////////////////////////////////////////////////////////////////////////
+// Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.Proxy
+
+template <typename TIterator>
+struct Value< Proxy<IteratorProxy<TIterator> > >:
+	Value<TIterator>
+{
+};
+template <typename TIterator>
+struct Value< Proxy<IteratorProxy<TIterator> > const>
+{
+	typedef typename Value<TIterator>::Type const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.GetValue.param.T.type:Class.Proxy
+
+template <typename TIterator>
+struct GetValue< Proxy<IteratorProxy<TIterator> > >:
+	GetValue<TIterator>
+{
+};
+template <typename TIterator>
+struct GetValue< Proxy<IteratorProxy<TIterator> > const>
+{
+	typedef typename GetValue<TIterator const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Reference.param.T.type:Class.Proxy
+
+template <typename TIterator>
+struct Reference< Proxy<IteratorProxy<TIterator> > >
+{
+	typedef Proxy<IteratorProxy<TIterator> > Type;
+};
+template <typename TIterator>
+struct Reference< Proxy<IteratorProxy<TIterator> > const >
+{
+	typedef Proxy<IteratorProxy<TIterator> > const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Size.param.T.type:Class.Proxy
+
+template <typename TIterator>
+struct Size< Proxy<IteratorProxy<TIterator> > >:
+	Size<TIterator>
+{
+};
+template <typename TIterator>
+struct Size< Proxy<IteratorProxy<TIterator> > const>:
+	Size<TIterator>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Difference.param.T.type:Class.Proxy
+
+template <typename TIterator>
+struct Difference< Proxy<IteratorProxy<TIterator> > >:
+	Difference<TIterator>
+{
+};
+template <typename TIterator>
+struct Difference< Proxy<IteratorProxy<TIterator> > const>:
+	Difference<TIterator>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec>
+typename GetValue<Proxy<TSpec> >::Type
+getValue(Proxy<TSpec> & me)
+{
+	return getValue(iter(me));
+}
+template <typename TSpec>
+typename GetValue<Proxy<TSpec> const>::Type
+getValue(Proxy<TSpec> const & me)
+{
+	return getValue(iter(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Iterator Proxy
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Spec.Iterator Proxy:
+..cat:Proxies
+..general:Class.Proxy
+..summary:Proxy that is implemented by an iterator.
+..signature:Proxy<IteratorProxy<TIterator> >
+..param.TIterator:Iterator type.
+..remarks.text:The value type of an iterator proxy is the value type of the
+iterator $TIterator$.
+..include:seqan/basic.h
+*/
+
+template <typename TIterator>
+struct IteratorProxy;
+
+//____________________________________________________________________________
+
+template <typename TIterator>
+struct Proxy<IteratorProxy<TIterator> >
+{
+public:
+	typedef typename Value<Proxy>::Type TValue;
+	typedef typename GetValue<Proxy>::Type TAccessor;
+
+	typedef typename RemoveConst_<TAccessor>::Type TAccessor_NotConst;
+
+public:
+	TIterator data_iterator;
+
+public:
+	Proxy(TIterator const _it):
+		data_iterator(_it)
+	{
+SEQAN_CHECKPOINT
+	}
+	Proxy(Proxy const & _other):
+		data_iterator(_other.data_iterator)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	~Proxy()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Proxy const &
+	operator = (Proxy const & _other) const
+	{
+SEQAN_CHECKPOINT
+		assignValue(data_iterator, getValue(_other.data_iterator));
+		return *this;
+	}
+
+	Proxy const &
+	operator = (TValue const & _value) const
+	{
+SEQAN_CHECKPOINT
+		assignValue(data_iterator, _value);
+		return *this;
+	}
+
+	operator TAccessor_NotConst()
+	{
+SEQAN_CHECKPOINT
+		return getValue(data_iterator);
+	}
+
+	operator TAccessor_NotConst() const
+	{
+SEQAN_CHECKPOINT
+		return getValue(data_iterator);
+	}
+
+//____________________________________________________________________________
+
+	//not documented
+//____________________________________________________________________________
+};
+
+template <typename TIterator>
+inline TIterator &
+iter(Proxy<IteratorProxy<TIterator> > & me)
+{
+	return me.data_iterator;
+}
+template <typename TIterator>
+inline TIterator const &
+iter(Proxy<IteratorProxy<TIterator> > const & me)
+{
+	return me.data_iterator;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Comparison
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec, typename T>
+struct CompareType <Proxy<TSpec>, T>
+{
+	typedef typename Value<Proxy<TSpec> >::Type TValue;
+	typedef typename RemoveConst_<TValue>::Type TValue_NoConst;
+	typedef typename CompareType<TValue_NoConst, T>::Type Type;
+};
+
+//???TODO: Symmetrie von CompareType herstellen
+//____________________________________________________________________________
+
+template <typename TTarget, typename T, typename TSpec>
+inline typename Convert<TTarget, Proxy<TSpec> >::Type
+convertImpl(Convert<TTarget, T> const,
+			Proxy<TSpec> & source)
+{
+	return convert<TTarget>(getValue(source));
+}
+template <typename TTarget, typename T, typename TSpec>
+inline typename Convert<TTarget, Proxy<TSpec> const>::Type
+convertImpl(Convert<TTarget, T> const,
+			Proxy<TSpec> const & source)
+{
+	return convert<TTarget>(getValue(source));
+}
+//////////////////////////////////////////////////////////////////////////////
+// operator ==
+
+template <typename TSpec, typename TRight>
+inline bool
+operator == (Proxy<TSpec> const & left_, 
+			 TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TSpec>
+inline bool
+operator == (TLeft const & left_, 
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+template <typename TLeftSpec, typename TRightSpec>
+inline bool
+operator == (Proxy<TLeftSpec> const & left_, 
+			 Proxy<TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TLeftSpec> TLeft;
+	typedef Proxy<TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+template <typename TSpec>
+inline bool
+operator == (Proxy<TSpec> const & left_, 
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef typename GetValue<Proxy<TSpec> >::Type TAccessor;
+	return convert<TAccessor>(left_) == convert<TAccessor>(right_);
+}
+
+//____________________________________________________________________________
+// operator !=
+
+template <typename TSpec, typename TRight>
+inline bool
+operator != (Proxy<TSpec> const & left_, 
+			 TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TSpec>
+inline bool
+operator != (TLeft const & left_, 
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+template <typename TLeftSpec, typename TRightSpec>
+inline bool
+operator != (Proxy<TLeftSpec> const & left_, 
+			 Proxy<TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TLeftSpec> TLeft;
+	typedef Proxy<TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+template <typename TSpec>
+inline bool
+operator != (Proxy<TSpec> const & left_, 
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef typename GetValue<Proxy<TSpec> >::Type TAccessor;
+	return convert<TAccessor>(left_) != convert<TAccessor>(right_);
+}
+
+
+//____________________________________________________________________________
+// operator <
+
+template <typename TSpec, typename TRight>
+inline bool
+operator < (Proxy<TSpec> const & left_, 
+			TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TSpec>
+inline bool
+operator < (TLeft const & left_, 
+			Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+template <typename TLeftSpec, typename TRightSpec>
+inline bool
+operator < (Proxy<TLeftSpec> const & left_, 
+			Proxy<TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TLeftSpec> TLeft;
+	typedef Proxy<TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+template <typename TSpec>
+inline bool
+operator < (Proxy<TSpec> const & left_, 
+			Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef typename GetValue<Proxy<TSpec> >::Type TAccessor;
+	return convert<TAccessor>(left_) < convert<TAccessor>(right_);
+}
+
+//____________________________________________________________________________
+// operator <=
+
+template <typename TSpec, typename TRight>
+inline bool
+operator <= (Proxy<TSpec> const & left_, 
+			 TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TSpec>
+inline bool
+operator <= (TLeft const & left_, 
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+template <typename TLeftSpec, typename TRightSpec>
+inline bool
+operator <= (Proxy<TLeftSpec> const & left_, 
+			 Proxy<TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TLeftSpec> TLeft;
+	typedef Proxy<TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+template <typename TSpec>
+inline bool
+operator <= (Proxy<TSpec> const & left_, 
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef typename GetValue<Proxy<TSpec> >::Type TAccessor;
+	return convert<TAccessor>(left_) <= convert<TAccessor>(right_);
+}
+
+
+//____________________________________________________________________________
+// operator >
+
+template <typename TSpec, typename TRight>
+inline bool
+operator > (Proxy<TSpec> const & left_, 
+			TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TSpec>
+inline bool
+operator > (TLeft const & left_, 
+			Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+template <typename TLeftSpec, typename TRightSpec>
+inline bool
+operator > (Proxy<TLeftSpec> const & left_, 
+			Proxy<TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TLeftSpec> TLeft;
+	typedef Proxy<TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+template <typename TSpec>
+inline bool
+operator > (Proxy<TSpec> const & left_, 
+			Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef typename GetValue<Proxy<TSpec> >::Type TAccessor;
+	return convert<TAccessor>(left_) > convert<TAccessor>(right_);
+}
+
+
+//____________________________________________________________________________
+// operator >=
+
+template <typename TSpec, typename TRight>
+inline bool
+operator >= (Proxy<TSpec> const & left_, 
+			 TRight const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename TSpec>
+inline bool
+operator >= (TLeft const & left_, 
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+template <typename TLeftSpec, typename TRightSpec>
+inline bool
+operator >= (Proxy<TLeftSpec> const & left_, 
+			 Proxy<TRightSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef Proxy<TLeftSpec> TLeft;
+	typedef Proxy<TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+template <typename TSpec>
+inline bool
+operator >= (Proxy<TSpec> const & left_, 
+			 Proxy<TSpec> const & right_)
+{
+SEQAN_CHECKPOINT
+	typedef typename GetValue<Proxy<TSpec> >::Type TAccessor;
+	return convert<TAccessor>(left_) >= convert<TAccessor>(right_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename TSpec>
+inline TStream &
+operator >> (TStream & strm,
+			 Proxy<TSpec> & proxy)
+{
+	typedef Proxy<TSpec> TProxy;
+	typedef typename Value<TProxy>::Type TValue;
+	TValue temp;
+	strm >> temp;
+	assignValue(iter(proxy), temp);
+	return strm;
+}
+template <typename TStream, typename TSpec>
+inline TStream &
+operator >> (TStream & strm,
+			 Proxy<TSpec> const& proxy)
+{
+	typedef Proxy<TSpec> TProxy;
+	typedef typename Value<TProxy>::Type TValue;
+	TValue temp;
+	strm >> temp;
+	assignValue(iter(proxy), temp);
+	return strm;
+}
+
+
+template <typename TStream, typename TSpec>
+inline TStream &
+operator << (TStream & strm,
+			 Proxy<TSpec> & proxy)
+{
+	return strm << getValue(proxy);
+}
+template <typename TStream, typename TSpec>
+inline TStream &
+operator << (TStream & strm,
+			 Proxy<TSpec> const & proxy)
+{
+	return strm << getValue(proxy);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_sse2.h b/src/SeqAn-1.3/seqan/basic/basic_sse2.h
new file mode 100644
index 0000000..c4a50d6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_sse2.h
@@ -0,0 +1,506 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_SSE2_H
+#define SEQAN_HEADER_BASIC_SSE2_H
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifdef SEQAN_USE_SSE2_WORDS
+#ifdef __SSE2__
+
+#include <emmintrin.h>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+	
+//	#define __int128 Sse2Int128
+	
+	#ifndef SEQAN_SSE2_INT128
+	#define SEQAN_SSE2_INT128
+	#endif
+		
+	// ATTENTION:
+	// The Sse2Int128 struct must be 16-byte aligned. Some allocators
+	// don't ensure the correct alignment, e.g. the STL allocators.
+	// Either avoid STL classes holding Sse2Int128 structs (maps in find_pex.h)
+	// or avoid the SEQAN_USE_SSE2_WORDS define above.
+
+	// may become obsolete when 128-bit integers will be introduced
+	struct Sse2Int128
+	{
+	public:
+		union {
+			__m128i	 v;
+			__uint64 v64[2];
+			unsigned v32[4];
+		}						data;
+
+//____________________________________________________________________________
+
+	public:
+		Sse2Int128();
+		Sse2Int128(Sse2Int128 const &);
+		Sse2Int128(__m128i const &);
+		Sse2Int128(__int64, __int64);
+		Sse2Int128(int, int, int, int);
+		Sse2Int128(short, short, short, short, short, short, short, short);
+
+		template <typename TValue>
+		Sse2Int128(TValue const &);
+		
+		//____________________________________________________________________________
+		
+		template <typename TValue>
+		Sse2Int128 & operator = (TValue const &);
+		
+		//____________________________________________________________________________
+
+		operator __m128i () const;
+		operator __int64 () const;
+/*		operator bool () const;
+		operator __uint64 ();
+		operator int ();
+		operator unsigned int ();
+		operator short ();
+		operator unsigned short ();
+		operator char ();
+		operator signed char ();
+		operator unsigned char ();
+*/	};
+	
+	template <> struct IsSimple_<__m128i> { typedef True Type; };
+	template <> struct IsSimple_<Sse2Int128> { typedef True Type; };
+
+//____________________________________________________________________________
+// clear
+
+inline void
+clear(Sse2Int128 &me)
+{
+	me.data.v = _mm_setzero_si128();
+}
+
+//____________________________________________________________________________
+// assign
+
+inline void
+assign(Sse2Int128 &me, Sse2Int128 const &other)
+{
+	me.data = other.data;
+}
+
+// 1x 128bit
+inline void
+assign(Sse2Int128 &me, __m128i const &other)
+{
+	me.data.v = other;
+}
+inline Sse2Int128::operator __m128i () const
+{
+	return data.v;
+}
+	
+// 64bit => 128bit
+inline void
+assign(Sse2Int128 &me, __int64 other)
+{
+	me.data.v = _mm_set_epi32(0, 0, other >> 32, other);
+}
+inline void
+assign(Sse2Int128 &me, __uint64 other)
+{
+	me.data.v = _mm_set_epi32(0, 0, other >> 32, other);
+}
+// 64bit <= 128bit
+inline Sse2Int128::operator __int64 () const
+{
+	return data.v64[0];
+}
+/*inline Sse2Int128::operator __uint64 ()
+{
+	return data.v64[0];
+}
+*/
+// 32bit => 128bit
+inline void
+assign(Sse2Int128 &me, int other)
+{
+	me.data.v = _mm_set_epi32(0, 0, 0, other);
+}
+inline void
+assign(Sse2Int128 &me, unsigned int other)
+{
+	me.data.v = _mm_set_epi32(0, 0, 0, other);
+}
+// 32bit <= 128bit
+/*inline Sse2Int128::operator int ()
+{
+	return data.v32[0];
+}
+inline Sse2Int128::operator unsigned int ()
+{
+	return data.v32[0];
+}
+*/
+// 16bit => 128bit
+inline void
+assign(Sse2Int128 &me, short other)
+{
+	me.data.v = _mm_set_epi16(0, 0, 0, 0, 0, 0, 0, other);
+}
+inline void
+assign(Sse2Int128 &me, unsigned short other)
+{
+	me.data.v = _mm_set_epi16(0, 0, 0, 0, 0, 0, 0, other);
+}
+// 16bit <= 128bit
+/*inline Sse2Int128::operator short ()
+{
+	return _mm_extract_epi16(data.v, 0);
+}
+inline Sse2Int128::operator unsigned short ()
+{
+	return _mm_extract_epi16(data.v, 0);
+}
+*/
+// 8bit => 128bit
+inline void
+assign(Sse2Int128 &me, char other)
+{
+	me.data.v = _mm_set_epi8(
+		0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, other);
+}
+inline void
+assign(Sse2Int128 &me, signed char other)
+{
+	me.data.v = _mm_set_epi8(
+		0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, other);
+}
+inline void
+assign(Sse2Int128 &me, unsigned char other)
+{
+	me.data.v = _mm_set_epi8(
+		0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, other);
+}
+// 8bit <= 128bit
+/*inline Sse2Int128::operator char ()
+{
+	return _mm_extract_epi16(data.v, 0);
+}
+inline Sse2Int128::operator signed char ()
+{
+	return _mm_extract_epi16(data.v, 0);
+}
+inline Sse2Int128::operator unsigned char ()
+{
+	return _mm_extract_epi16(data.v, 0);
+}
+	
+inline Sse2Int128::operator bool () const
+{
+	return (__int64)(Sse2Int128)_mm_or_si128(data.v, _mm_unpackhi_epi64(data.v, data.v));
+}
+*/
+//____________________________________________________________________________
+// constructors
+
+inline Sse2Int128::Sse2Int128()
+{
+	clear(*this);
+}
+	
+inline Sse2Int128::Sse2Int128(Sse2Int128 const &other)
+{
+	assign(*this, other);
+}
+
+inline Sse2Int128::Sse2Int128(__m128i const &other)
+{
+	assign(*this, other);
+}
+
+// 2x 64bit
+inline Sse2Int128::Sse2Int128(__int64 q1, __int64 q0)
+{
+	data.v = _mm_set_epi32(q1 >> 32, q1, q0 >> 32, q0);
+}
+
+// 4x 32bit
+inline Sse2Int128::Sse2Int128(int q3, int q2, int q1, int q0)
+{
+	data.v = _mm_set_epi32(q3, q2, q1, q0);
+}
+
+// 8x 16bit
+inline Sse2Int128::Sse2Int128(
+				   short q7, short q6, short q5, short q4,
+				   short q3, short q2, short q1, short q0)
+{
+	data.v = _mm_set_epi16(q7, q6, q5, q4, q3, q2, q1, q0);
+}
+	
+template <typename TValue>
+inline Sse2Int128::Sse2Int128(TValue const &other)
+{
+	assign(*this, other);
+}
+
+//____________________________________________________________________________
+// operator =
+
+template <typename TValue>
+inline Sse2Int128 &
+Sse2Int128::operator = (TValue const &other)
+{
+	assign(*this, other);
+	return *this;
+}
+	
+//____________________________________________________________________________
+// logical operators
+
+inline Sse2Int128
+operator & (Sse2Int128 const &a, Sse2Int128 const &b)
+{
+	return _mm_and_si128((__m128i)a, (__m128i)b);
+}
+inline Sse2Int128
+operator &= (Sse2Int128 &a, Sse2Int128 const &b)
+{
+	a.data.v = _mm_and_si128((__m128i)a, (__m128i)b);
+	return a;
+}
+
+inline Sse2Int128
+operator | (Sse2Int128 const &a, Sse2Int128 const &b)
+{
+	return _mm_or_si128((__m128i)a, (__m128i)b);
+}
+inline Sse2Int128
+operator |= (Sse2Int128 &a, Sse2Int128 const &b)
+{
+	a.data.v = _mm_or_si128((__m128i)a, (__m128i)b);
+	return a;
+}
+
+inline Sse2Int128
+operator ^ (Sse2Int128 const &a, Sse2Int128 const &b)
+{
+	return _mm_xor_si128((__m128i)a, (__m128i)b);
+}
+inline Sse2Int128
+operator ^= (Sse2Int128 &a, Sse2Int128 const &b)
+{
+	a.data.v = _mm_xor_si128((__m128i)a, (__m128i)b);
+	return a;
+}
+
+inline Sse2Int128
+operator ~ (Sse2Int128 const &a)
+{
+	__m128i _a = (__m128i)a;
+	return _mm_xor_si128(_a, _mm_cmpeq_epi32(_a, _a));
+}
+
+//____________________________________________________________________________
+// shift operators
+
+inline Sse2Int128
+operator << (Sse2Int128 const &a, int n)
+{
+	return _mm_or_si128(
+		// n <= 64
+		_mm_or_si128(
+			_mm_sll_epi64((__m128i)a, (Sse2Int128)n),
+			_mm_srl_epi64(
+				_mm_unpacklo_epi64(_mm_setzero_si128(), (__m128i)a),
+				(Sse2Int128)(64-n)
+			)
+		),
+		// n >= 64
+		_mm_sll_epi64(
+			_mm_unpacklo_epi64(_mm_setzero_si128(), (__m128i)a),
+			(Sse2Int128)(n-64)
+		)
+	);
+}
+inline Sse2Int128
+operator <<= (Sse2Int128 &a, int n)
+{
+	a.data.v = _mm_or_si128(
+		// n <= 64
+		_mm_or_si128(
+			_mm_sll_epi64((__m128i)a, (Sse2Int128)n),
+			_mm_srl_epi64(
+				_mm_unpacklo_epi64(_mm_setzero_si128(), (__m128i)a),
+				(Sse2Int128)(64-n)
+			)
+		),
+		// n >= 64
+		_mm_sll_epi64(
+			_mm_unpacklo_epi64(_mm_setzero_si128(), (__m128i)a),
+			(Sse2Int128)(n-64)
+		)
+	);
+	return a;
+}
+inline Sse2Int128
+operator << (Sse2Int128 const &a, unsigned int n)
+{
+	return a << (int)n;
+}
+inline Sse2Int128
+operator <<= (Sse2Int128 &a, unsigned int n)
+{
+	return a <<= (int)n;
+}
+
+inline Sse2Int128
+operator >> (Sse2Int128 const &a, int n)
+{
+	return _mm_or_si128(
+		// n <= 64
+		_mm_or_si128(
+			_mm_srl_epi64((__m128i)a, (Sse2Int128)n),
+			_mm_sll_epi64(
+				_mm_unpackhi_epi64(a.data.v, _mm_setzero_si128()),
+				(Sse2Int128)(64-n)
+			)
+		),
+		// n >= 64
+		_mm_srl_epi64(
+			_mm_unpackhi_epi64((__m128i)a, _mm_setzero_si128()),
+			(Sse2Int128)(n-64)
+		)
+	);
+}
+inline Sse2Int128
+operator >>= (Sse2Int128 &a, int n)
+{
+	a.data.v = _mm_or_si128(
+		// n <= 64
+		_mm_or_si128(
+			_mm_srl_epi64((__m128i)a, (Sse2Int128)n),
+			_mm_sll_epi64(
+				_mm_unpackhi_epi64((__m128i)a, _mm_setzero_si128()),
+				(Sse2Int128)(64-n)
+			)
+		),
+		// n >= 64
+		_mm_srl_epi64(
+			_mm_unpackhi_epi64((__m128i)a, _mm_setzero_si128()),
+			(Sse2Int128)(n-64)
+		)
+	);
+	return a;
+}
+inline Sse2Int128
+operator >> (Sse2Int128 const &a, unsigned int n)
+{
+	return a >> (int)n;
+}
+inline Sse2Int128
+operator >>= (Sse2Int128 &a, unsigned int n)
+{
+	return a >>= (int)n;
+}
+
+//____________________________________________________________________________
+// artihmetic operators
+
+//template <typename T>
+inline Sse2Int128
+operator + (Sse2Int128 const &a, Sse2Int128 const &b)
+{
+	static const __m128i carry = Sse2Int128(0, 1, 0, 0);
+
+	union {
+		__uint64 v64[2];
+		__m128i v;
+	} _sum;
+	
+	_sum.v = _mm_add_epi64((__m128i)a, (__m128i)b);
+	if (_sum.v64[0] >= a.data.v64[0])
+		return _sum.v;
+	else
+		return _mm_add_epi64(_sum.v, carry);
+}
+
+//template <typename T>
+inline Sse2Int128
+operator - (Sse2Int128 const &a, Sse2Int128 const &b)
+{
+	static const __m128i carry = Sse2Int128(0, 1, 0, 0);
+
+	union {
+		__uint64 v64[2];
+		__m128i v;
+	} _diff;
+	
+	_diff.v = _mm_sub_epi64((__m128i)a, (__m128i)b);
+	if (_diff.v64[0] <= a.data.v64[0])
+		return _diff.v;
+	else
+		return _mm_sub_epi64(_diff.v, carry);
+}
+
+// TODO: operator *, /
+
+//____________________________________________________________________________
+// compares
+
+inline bool
+operator == (Sse2Int128 const &a, Sse2Int128 const &b)
+{
+	__m128i _e = _mm_cmpeq_epi32((__m128i)a, (__m128i)b);
+	return ((__int64)(Sse2Int128)_mm_and_si128(_e, _mm_unpackhi_epi64(_e, _e))) == ~(__int64)0;
+}
+
+inline bool
+operator != (Sse2Int128 const &a, Sse2Int128 const &b)
+{
+	__m128i _e = _mm_cmpeq_epi32((__m128i)a, (__m128i)b);
+	return ((__int64)(Sse2Int128)_mm_and_si128(_e, _mm_unpackhi_epi64(_e, _e))) != ~(__int64)0;
+}
+	
+// TODO: operator <, <=, >, >=
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifdef __SSE2__
+#endif //#ifdef SEQAN_USE_SSE2_WORDS
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_tag.h b/src/SeqAn-1.3/seqan/basic/basic_tag.h
new file mode 100644
index 0000000..7c8e2f8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_tag.h
@@ -0,0 +1,251 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_TAG_H
+#define SEQAN_HEADER_BASIC_TAG_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.DotDrawing
+..summary:Switch to trigger drawing in dot format.
+..value.DotDrawing:Graphs in dot format.
+..include:seqan/basic.h
+*/
+
+struct DotDrawing_;
+typedef Tag<DotDrawing_> const DotDrawing;
+
+
+/**
+.Tag.HammingDistance
+..summary:Switch to trigger Hamming distance, which is a measure of character substitutions.
+..include:seqan/basic.h
+*/
+
+/**
+.Tag.LevenshteinDistance
+..summary:Switch to trigger Levenshtein distance, which is a measure of edit operations (character substitutions, deletions or insertions).
+..remarks:$EditDistance$ is a synonym for $LevenshteinDistance$.
+..see:Spec.EditDistance
+..include:seqan/basic.h
+*/
+
+struct HammingDistance_;
+struct LevenshteinDistance_;
+
+typedef Tag<HammingDistance_>		HammingDistance;
+typedef Tag<LevenshteinDistance_>	LevenshteinDistance;
+typedef Tag<LevenshteinDistance_>	EditDistance; 
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment: Tags
+//////////////////////////////////////////////////////////////////////////////
+//Sollte eigentlich nach align/, aber da jetzt ja so viele
+//alignment algorithmen in graph/ gelandet sind...
+
+/**
+.Tag.Global Alignment Algorithms:
+..summary:Global alignment algorithm used by globalAlignment.
+..see:Function.globalAlignment
+..see:Tag.Local Alignment Algorithms
+..include:seqan/basic.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Global Alignment Algorithms.value.NeedlemanWunsch:
+	Dynamic programming algorithm for alignments by Needleman and Wunsch.
+..include:seqan/basic.h
+*/
+
+struct NeedlemanWunsch_;
+typedef Tag<NeedlemanWunsch_> NeedlemanWunsch;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Global Alignment Algorithms.value.BandedNeedlemanWunsch:
+	The Needleman-Wunsch alignment algorithm in a banded version.
+..include:seqan/basic.h
+*/
+struct BandedNeedlemanWunsch_;
+typedef Tag<BandedNeedlemanWunsch_> BandedNeedlemanWunsch;
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Global Alignment Algorithms.value.Gotoh:
+	Gotoh's affine gap cost alignment algorithm.
+..include:seqan/basic.h
+*/
+struct Gotoh_;
+typedef Tag<Gotoh_> Gotoh;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Global Alignment Algorithms.value.BandedGotoh:
+	Gotoh's affine gap cost alignment algorithm in a banded version.
+..include:seqan/basic.h
+*/
+struct BandedGotoh_;
+typedef Tag<BandedGotoh_> BandedGotoh;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Global Alignment Algorithms.value.MyersBitVector:
+	Myers' bit vector alignment algorithm for edit distance.
+	Note that this algorithm does not returns the alignment itself, but only computes the score.
+..include:seqan/basic.h
+*/
+struct MyersBitVector_;
+typedef Tag<MyersBitVector_> const MyersBitVector;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Global Alignment Algorithms.value.MyersHirschberg:
+	Myers' bit vector algorithm for edit distance combined with Hirschberg's linear space alignment algorithm.
+..include:seqan/basic.h
+*/
+struct MyersHirschberg_;
+typedef Tag<MyersHirschberg_> const MyersHirschberg;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Global Alignment Algorithms.value.Hirschberg:
+	Hirschberg's linear space global alignment algorithm.
+..include:seqan/basic.h
+*/
+struct Hirschberg_;
+typedef Tag<Hirschberg_> const Hirschberg;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Global Alignment Algorithms.value.Lcs:
+	Longest common subsequence algorithm.
+..include:seqan/basic.h
+*/
+struct Lcs_;
+typedef Tag<Lcs_> const Lcs;
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Local Alignment Algorithms:
+..summary:Local alignment algorithm used by localAlignment.
+..see:Function.localAlignment
+..include:seqan/basic.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Local Alignment Algorithms.value.SmithWaterman:
+	Triggers a Smith Waterman local alignment algorithm.
+..include:seqan/basic.h
+*/
+struct SmithWaterman_;
+typedef Tag<SmithWaterman_> const SmithWaterman;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Local Alignment Algorithms.value.BandedSmithWaterman:
+	Triggers a banded version of the Smith Waterman local alignment algorithm.
+..include:seqan/basic.h
+*/
+struct BandedSmithWaterman_;
+typedef Tag<BandedSmithWaterman_> const BandedSmithWaterman;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Local Alignment Algorithms.value.WatermanEggert:
+	Local alignment algorithm by Waterman and Eggert with "declumping" (i.e. only non-overlapping local alignments are computed).
+.Tag.Local Alignment Algorithms.value.SmithWatermanClump:
+	Same as $WatermanEggert$.
+..include:seqan/basic.h
+*/
+struct SmithWatermanClump_;
+typedef Tag<SmithWatermanClump_> const SmithWatermanClump;
+typedef Tag<SmithWatermanClump_> const WatermanEggert;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Local Alignment Algorithms.value.BandedWatermanEggert:
+	Triggers a banded version of the local alignment algorithm by Waterman and Eggert with "declumping".
+.Tag.Local Alignment Algorithms.value.BandedSmithWatermanClump:
+	Same as $BandedWatermanEggert$.
+..include:seqan/basic.h
+*/
+struct BandedWatermanEggert_;
+typedef Tag<BandedWatermanEggert_> const BandedSmithWatermanClump;
+typedef Tag<BandedWatermanEggert_> const BandedWatermanEggert;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*DISABLED
+.Tag.RNA Folding Algorithms.value.Nussinov:
+	Nussinov style RNA folding algorithm
+..include:seqan/basic.h
+*/
+struct Nussinov_;
+typedef Tag<Nussinov_> const Nussinov;
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct Blat_;
+typedef Tag<Blat_> const Blat;
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_testing.h b/src/SeqAn-1.3/seqan/basic/basic_testing.h
new file mode 100644
index 0000000..a1c17a1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_testing.h
@@ -0,0 +1,1687 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// The SeqAn testing infrastructure.  Based on ideas from the OpenMS
+// "ClassTest.h".
+// ==========================================================================
+
+// SEQAN_NO_GENERATED_FORWARDS
+
+#ifndef SEQAN_BASIC_BASIC_TESTING_H_
+#define SEQAN_BASIC_BASIC_TESTING_H_
+
+#include <iostream>  // stdout, stderr
+#include <cstring>   // strrpos
+#include <cstdlib>   // exit()
+#include <cstdarg>   // va_start, va_list, va_end
+#include <set>
+#include <vector>
+#include <string>
+
+#ifdef PLATFORM_WINDOWS
+#include <Windows.h>  // DeleteFile()
+#else  // #ifdef PLATFORM_WINDOWS
+#include <unistd.h>  // unlink()
+#endif  // #ifdef PLATFORM_WINDOWS
+
+// SeqAn's has three global debug/testing levels: testing, debug and
+// release.  Depending on the level, the SEQAN_ASSERT_* and
+// SEQAN_CHECKPOINT macros will be enabled.
+//
+// Note that this is independent of the <cassert> assertions and
+// NDEBUG being defined.
+//
+// The levels are enabled by the values of the macros
+// SEQAN_ENABLE_TESTING and SEQAN_ENABLE_DEBUG.  By setting a macro to
+// 0, one disables the level and by setting the macro to 1, one
+// enables a level.  Enabling testing also enables debug, overriding a
+// value of 0 for SEQAN_ENABLE_DEBUG.
+//
+// If the level is release (both the macros for debug and testing are
+// 0), the assertions will be disabled.  If the level is debug then
+// the assertions will be enabled.  If the level is testing then the
+// checkpoint macros will also be enabled.
+//
+// The default is to enable debugging but disable testing.
+//
+// You can print the current level using the function seqan::printDebugLevel().
+
+// Set default for SEQAN_ENABLE_TESTING.
+#ifndef SEQAN_ENABLE_TESTING
+#define SEQAN_ENABLE_TESTING 0
+#endif  // #ifndef SEQAN_ENABLE_TESTING
+
+// Set default for SEQAN_ENABLE_DEBUG.
+#ifndef SEQAN_ENABLE_DEBUG
+#define SEQAN_ENABLE_DEBUG 1
+#endif  // #ifndef SEQAN_ENABLE_DEBUG
+
+// Force-enable debugging if testing is enabled.
+#if SEQAN_ENABLE_TESTING
+#undef SEQAN_ENABLE_DEBUG
+#define SEQAN_ENABLE_DEBUG 1
+#endif  // #if SEQAN_ENABLE_TESTING
+
+// Allow disabling checkpoints independent of testing.
+#ifndef SEQAN_ENABLE_CHECKPOINTS
+#define SEQAN_ENABLE_CHECKPOINTS SEQAN_ENABLE_TESTING
+#endif  // #ifndef SEQAN_ENABLE_CHECKPOINTS
+
+namespace seqan {
+
+// SEQAN_CXX_FLAGS_ contains the compiler flags, SEQAN_CXX_FLAGS is a string
+// literal with this value.
+#if !defined(SEQAN_CXX_FLAGS_)
+#define SEQAN_CXX_FLAGS_ SEQAN_CXX_FLAGS_NOT_SET
+#endif //  !defined(SEQAN_CXX_FLAGS__)
+#define SEQAN_MKSTRING_(str) # str
+#define SEQAN_MKSTRING(str) SEQAN_MKSTRING_(str)
+#define SEQAN_CXX_FLAGS SEQAN_MKSTRING(SEQAN_CXX_FLAGS_)
+//#undef SEQAN_MKSTRING
+//#undef SEQAN_MKSTRING_
+
+
+/**
+.Function.printDebugLevel:
+..cat:Miscellaneous:
+..summary:Print the current SeqAn debug level and the compiler flags to the given stream.
+..signature:printDebugLevel(stream)
+..param.stream:The stream to print to, e.g. $std::cout$.
+..include:seqan/basic.h
+ */
+template <typename TStream>
+void printDebugLevel(TStream &stream) {
+    stream << "SEQAN_ENABLE_DEBUG == " << SEQAN_ENABLE_DEBUG << std::endl;
+    stream << "SEQAN_ENABLE_TESTING == " << SEQAN_ENABLE_TESTING << std::endl;
+    stream << "SEQAN_ENABLE_CHECKPOINTS == " << SEQAN_ENABLE_CHECKPOINTS << std::endl;
+    stream << "SEQAN_CXX_FLAGS == \"" << SEQAN_CXX_FLAGS << "\"" << std::endl;
+}
+
+
+// Namespace for the testing infrastructure.
+//
+// This namespace contains the variables and functions that are used
+// in the macros below to perform the tests.
+namespace ClassTest {
+    // Raised when an assertion fails in test mode.
+    struct AssertionFailedException {};
+
+    // Container for static global data for the tests.
+    struct StaticData {
+        // Number of tests that were run.
+        static int &testCount() {
+            static int result = 0;
+            return result;
+        }
+
+        // Number of errors that occured.
+        static int &errorCount() {
+            static int result = 0;
+            return result;
+        }
+
+        // Number of skipped tests.
+        static int &skippedCount() {
+            static int result = 0;
+            return result;
+        }
+
+        // Flag whether there was an error in this test.
+        static bool &thisTestOk() {
+            static bool result = 0;
+            return result;
+        }
+
+        // Flag whether this test was skipped.
+        static bool &thisTestSkipped() {
+            static bool result = 0;
+            return result;
+        }
+
+        // Name of the current test.
+        static const char *&currentTestName() {
+            const char *defaultValue = "";
+            static const char *result = const_cast<char*>(defaultValue);
+            return result;
+        }
+
+        // Base path to the binary.  Extrapolated from __FILE__.
+        static char *&basePath() {
+            const char *defaultValue = ".";
+            static char *result = const_cast<char*>(defaultValue);
+            return result;
+        }
+
+        // Base path to the "projects" directory, extrapolated from
+        // __FILE__.
+        static char *&pathToProjects() {
+            const char *defaultValue = ".";
+            static char *result = const_cast<char*>(defaultValue);
+            return result;
+        }
+
+        // Total number of checkpoints in header file.
+        static int &totalCheckPointCount() {
+            static int result = 0;
+            return result;
+        }
+
+        // Total number of checkpoints found in binary files.
+        static int &foundCheckPointCount() {
+            static int result = 0;
+            return result;
+        }
+
+        // Names of temporary files as returned by tempFileName.  This
+        // global state is used to remove any existing such files
+        // after completing the testsuite.
+        static ::std::vector<std::string> & tempFileNames() {
+            static ::std::vector<std::string> filenames;
+            return filenames;
+        }
+    };
+
+// Open a temporary file, unlink it, return posix handle.  Note: This has not been tested yet.
+// TODO(holtgrew): Not used yet and Windows code does not work.
+/*
+inline
+int openTempFile() {
+#ifdef PLATFORM_WINDOWS
+    char * fileName = _tempnam(NULL, "SQN");
+    if (!fileName) {
+        ::std::cerr << "Cannot create a unique temporary filename" << ::std::endl;
+        exit(1);
+    }
+    int result = open(fileName, _O_RDWR | OPEN_TEMPORARY);
+    free(fileName);
+    return result;
+#else  // A Unix...
+    char filenameBuffer[100];
+    strcpy(filenameBuffer, "/tmp/SEQANXXXXXXXXXX");
+    int result = mkstemp(filenameBuffer);
+    unlink(filenameBuffer);
+    return result;
+#endif  // ifdef PLATFORM_WINDOWS
+}
+*/
+
+// Return the path to a temporary file, in a static buffer in this
+// function.  This is not thread safe!
+inline
+const char *tempFileName() {
+    static char fileNameBuffer[100];
+#ifdef PLATFORM_WINDOWS_VS
+    char * fileName = tempnam(NULL, "SEQAN.");
+    if (!fileName) {
+        ::std::cerr << "Cannot create a unique temporary filename" << ::std::endl;
+        exit(1);
+    }
+    strcpy(fileNameBuffer, fileName);
+    free(fileName);
+    StaticData::tempFileNames().push_back(fileNameBuffer);
+    return fileNameBuffer;
+#else  // ifdef PLATFORM_WINDOWS_VS
+    strcpy(fileNameBuffer, "/tmp/SEQAN.XXXXXXXXXXXXXXXXXXXX");
+#ifdef PLATFORM_WINDOWS_MINGW
+    // There is no mkstemp in MinGW but it does not complain about tmpnam.
+    tmpnam(fileNameBuffer);
+#else  // ifdef PLATFORM_WINDOWS_MINGW
+    mkstemp(fileNameBuffer);
+    unlink(fileNameBuffer);
+#endif  // #ifdef PLATFORM_WINDOWS_MINGW
+    StaticData::tempFileNames().push_back(fileNameBuffer);
+    return fileNameBuffer;
+#endif  // ifdef PLATFORM_WINDOWS_VS
+}
+
+    // Initialize the testing infrastructure.
+    //
+    // Used through SEQAN_BEGIN_TESTSUITE(test_name)
+    inline
+    void beginTestSuite(const char *testSuiteName, const char *argv0) {
+        // First things first: Print the current debug level.
+        printDebugLevel(std::cout);
+        (void)testSuiteName;
+        StaticData::testCount() = 0;
+        StaticData::skippedCount() = 0;
+        StaticData::errorCount() = 0;
+        StaticData::totalCheckPointCount() = 0;
+        StaticData::foundCheckPointCount() = 0;
+        // Get path to argv0.
+        const char *end = argv0;
+#ifdef PLATFORM_WINDOWS
+        const char pathSeparator = '\\';
+#else  // PLATFORM_WINDOWS
+        const char pathSeparator = '/';
+#endif  // PLATFORM_WINDOWS
+        for (const char *ptr = strchr(argv0, pathSeparator); ptr != 0; ptr = strchr(ptr+1, pathSeparator))
+            end = ptr;
+        int rpos = end - argv0;
+        if (rpos <= 0) {
+            StaticData::basePath() = new char[1];
+            strcpy(StaticData::basePath(), ".");
+        } else {
+            int len = rpos;
+            StaticData::basePath() = new char[len];
+            strncpy(StaticData::basePath(), argv0, len);
+        }
+        // Get path to projects.
+        const char *file = __FILE__;
+        int pos = -1;
+        for (size_t i = 0; i < strlen(file) - strlen("projects"); ++i) {
+            if (strncmp(file + i, "projects", strlen("projects")) == 0) {
+                pos = i;
+            }
+        }
+        if (pos == -1) {
+            std::cerr << "Could not extrapolate path to projects from __FILE__ == \""
+                      << __FILE__ << "\"" << std::endl;
+            exit(1);
+        }
+        StaticData::pathToProjects() = new char[pos];
+        strncpy(StaticData::pathToProjects(), file, pos);
+        StaticData::pathToProjects()[pos-1] = '\0';
+    }
+
+    // Run test suite finalization.
+    //
+    // Used through SEQAN_END_TESTSUITE
+    //
+    // Prints a bottom banner with the error count and returns the
+    // program's return code.
+    inline
+    int endTestSuite() {
+        delete[] StaticData::basePath();
+        delete[] StaticData::pathToProjects();
+
+        std::cout << "**************************************" << std::endl;
+        std::cout << " Total Check Points : " << StaticData::totalCheckPointCount() << std::endl;
+        std::cout << " Found Check Points : " << StaticData::foundCheckPointCount() << std::endl;
+        std::cout << " Lost Check Points  : " << StaticData::totalCheckPointCount() - StaticData::foundCheckPointCount() << std::endl;
+        std::cout << "--------------------------------------" << std::endl;
+        std::cout << " Total Tests: " << StaticData::testCount() << std::endl;
+        std::cout << " Skipped:     " << StaticData::skippedCount() << std::endl;
+        std::cout << " Errors:      " << StaticData::errorCount() << std::endl;
+        std::cout << "**************************************" << std::endl;
+        if (StaticData::errorCount() != 0)
+            return 1;
+        // TODO(holtgrew): Re-enable that all check points have to be found for the test to return 1;
+        /*
+        if (StaticData::totalCheckPointCount() != StaticData::foundCheckPointCount())
+            return 1;
+        */
+        // Delete all temporary files that still exist.
+        for (unsigned i = 0; i < StaticData::tempFileNames().size(); ++i) {
+#ifdef PLATFORM_WINDOWS
+            DeleteFile(StaticData::tempFileNames()[i].c_str());
+#else  // #ifdef PLATFORM_WINDOWS
+            unlink(StaticData::tempFileNames()[i].c_str());
+#endif  // #ifdef PLATFORM_WINDOWS
+        }
+
+        return 0;
+    }
+
+    // Run test initialization.
+    inline
+    void beginTest(const char *testName) {
+        StaticData::currentTestName() = testName;
+        StaticData::thisTestOk() = true;
+        StaticData::thisTestSkipped() = false;
+        StaticData::testCount() += 1;
+    }
+
+    // Run test finalization.
+    inline
+    void endTest() {
+        if (StaticData::thisTestSkipped()) {
+            std::cout << StaticData::currentTestName() << " SKIPPED" << std::endl;
+        } else if (StaticData::thisTestOk()) {
+            std::cout << StaticData::currentTestName() << " OK" << std::endl;
+        } else {
+            std::cerr << StaticData::currentTestName() << " FAILED" << std::endl;
+        }
+    }
+
+    // Marks the current test as "skipped".
+    inline
+    void skipCurrentTest() {
+        StaticData::thisTestSkipped() = true;
+        StaticData::skippedCount() += 1;
+    }
+
+    // Called by the macro SEQAN_ASSERT_FAIL.
+    inline void forceFail(const char *file, int line,
+                          const char *comment, ...) {
+        StaticData::errorCount() += 1;
+        std::cerr << file << ":" << line << " FAILED! ";
+        if (comment) {
+            std::cerr << " (";
+            va_list args;
+            va_start(args, comment);
+            vfprintf(stderr, comment, args);
+            va_end(args);
+            std::cerr << ")";
+        }
+        std::cerr << std::endl;
+    }
+
+    // Similar to forceFail above, but accepting a va_list parameter.
+    inline void vforceFail(const char *file, int line,
+                           const char *comment, va_list argp) {
+        StaticData::errorCount() += 1;
+        std::cerr << file << ":" << line << " FAILED! ";
+        if (comment) {
+            std::cerr << " (";
+            vfprintf(stderr, comment, argp);
+            std::cerr << ")";
+        }
+        std::cerr << std::endl;
+    }
+
+    // Same as forceFail above, but with comment set to 0.
+    inline void forceFail(const char *file, int line) {
+        forceFail(file, line, 0);
+    }
+
+    // Called by the macro SEQAN_ASSERT_EQ.
+    //
+    // Tests that the given two value are equal.  Returns true iff the
+    // two values are equal.
+    template <typename T1, typename T2>
+    bool testEqual(const char *file, int line,
+                   const T1 &value1, const char *expression1,
+                   const T2 &value2, const char *expression2,
+                   const char *comment, ...) {
+        if (!(value1 == value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " == " << expression2 << " was: " << value1
+                      << " != " << value2;
+            if (comment) {
+                std::cerr << " (";
+                va_list args;
+                va_start(args, comment);
+                vfprintf(stderr, comment, args);
+                va_end(args);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Similar to testEqual above, but accepts a va_list instead of variadic
+    // parameters.
+    template <typename T1, typename T2>
+    bool vtestEqual(const char *file, int line,
+                    const T1 &value1, const char *expression1,
+                    const T2 &value2, const char *expression2,
+                    const char *comment, va_list argp) {
+        if (!(value1 == value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " == " << expression2 << " was: " << value1
+                      << " != " << value2;
+            if (comment) {
+                std::cerr << " (";
+                vfprintf(stderr, comment, argp);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Same as testEqual above, but with comment set to 0.
+    template <typename T1, typename T2>
+    bool testEqual(const char *file, int line,
+                   const T1 &value1, const char *expression1,
+                   const T2 &value2, const char *expression2) {
+        return testEqual(file, line, value1, expression1, value2, expression2, 0);
+    }
+
+
+
+    // Called by the macro SEQAN_ASSERT_IN_DELTA.
+    //
+    // Tests that the given two value are equal.  Returns true iff the
+    // two values are equal.
+    template <typename T1, typename T2, typename T3>
+    bool testInDelta(const char *file, int line,
+                     const T1 &value1, const char *expression1,
+                     const T2 &value2, const char *expression2,
+                     const T3 &value3, const char *expression3,
+                     const char *comment, ...) {
+        if (!(value1 >= value2 - value3 && value1 <= value2 + value3)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " in [" << expression2 << " - " << expression3
+                      << ", " << expression2 << " + " << expression3 << "] was: " << value1
+                      << " not in [" << value2 - value3 << ", " << value2 + value3 << "]";
+            if (comment) {
+                std::cerr << " (";
+                va_list args;
+                va_start(args, comment);
+                vfprintf(stderr, comment, args);
+                va_end(args);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Similar to testInDelta above, but accepts a va_list instead of variadic
+    // parameters.
+    template <typename T1, typename T2, typename T3>
+    bool vtestInDelta(const char *file, int line,
+                      const T1 &value1, const char *expression1,
+                      const T2 &value2, const char *expression2,
+                      const T3 &value3, const char *expression3,
+                      const char *comment, va_list argp) {
+        if (!(value1 >= value2 - value3 && value1 <= value2 + value3)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " in [" << expression2 << " - " << expression3
+                      << ", " << expression2 << " + " << expression3 << "] was: " << value1
+                      << " not in [" << value2 - value3 << ", " << value2 + value3 << "]";
+            if (comment) {
+                std::cerr << " (";
+                vfprintf(stderr, comment, argp);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Same as testInDelta above, but with comment set to 0.
+    template <typename T1, typename T2, typename T3>
+    bool testInDelta(const char *file, int line,
+                     const T1 &value1, const char *expression1,
+                     const T2 &value2, const char *expression2,
+                     const T3 &value3, const char *expression3) {
+        return testInDelta(file, line, value1, expression1, value2, expression2, value3, expression3, 0);
+    }
+
+
+    // Called by the macro SEQAN_ASSERT_NEQ.
+    //
+    // Tests that the given two value are not equal.  Returns true iff
+    // the two values are equal.
+    template <typename T1, typename T2>
+    bool testNotEqual(const char *file, int line,
+                      const T1 &value1, const char *expression1,
+                      const T2 &value2, const char *expression2,
+                      const char *comment, ...) {
+        if (!(value1 != value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " != " << expression2 << " was: " << value1
+                      << " == " << value2;
+            if (comment) {
+                std::cerr << " (";
+                va_list args;
+                va_start(args, comment);
+                vfprintf(stderr, comment, args);
+                va_end(args);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+    // Similar to testNotEqual above, but accepts a va_list instead of variadic
+    // parameters.
+    template <typename T1, typename T2>
+    bool vtestNotEqual(const char *file, int line,
+                       const T1 &value1, const char *expression1,
+                       const T2 &value2, const char *expression2,
+                       const char *comment, va_list argp) {
+        if (!(value1 != value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " != " << expression2 << " was: " << value1
+                      << " == " << value2;
+            if (comment) {
+                std::cerr << " (";
+                vfprintf(stderr, comment, argp);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Same as testNotEqual above, but with comment set to 0.
+    template <typename T1, typename T2>
+    bool testNotEqual(const char *file, int line,
+                      const T1 &value1, const char *expression1,
+                      const T2 &value2, const char *expression2) {
+        return testNotEqual(file, line, value1, expression1, value2, expression2, 0);
+    }
+
+
+    // Called by the macro SEQAN_ASSERT_GEQ.
+    //
+    // Tests that the first value is greater than or equal to the
+    // second one.  Returns true iff the test yields true.
+    template <typename T1, typename T2>
+    bool testGeq(const char *file, int line,
+                 const T1 &value1, const char *expression1,
+                 const T2 &value2, const char *expression2,
+                 const char *comment, ...) {
+        if (!(value1 >= value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " >= " << expression2 << " was: " << value1
+                      << " < " << value2;
+            if (comment) {
+                std::cerr << " (";
+                va_list args;
+                va_start(args, comment);
+                vfprintf(stderr, comment, args);
+                va_end(args);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Similar to testGeq above, but accepts a va_list instead of variadic
+    // parameters.
+    template <typename T1, typename T2>
+    bool vtestGeq(const char *file, int line,
+                  const T1 &value1, const char *expression1,
+                  const T2 &value2, const char *expression2,
+                  const char *comment, va_list argp) {
+        if (!(value1 >= value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " >= " << expression2 << " was: " << value1
+                      << " < " << value2;
+            if (comment) {
+                std::cerr << " (";
+                vfprintf(stderr, comment, argp);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+    // Same as testGeq above, but with comment set to 0.
+    template <typename T1, typename T2>
+    bool testGeq(const char *file, int line,
+                 const T1 &value1, const char *expression1,
+                 const T2 &value2, const char *expression2) {
+        return testGeq(file, line, value1, expression1, value2, expression2, 0);
+    }
+
+
+    // Called by the macro SEQAN_ASSERT_GT.
+    //
+    // Tests that the first value is greater than the second one.
+    // Returns true iff the test yields true.
+    template <typename T1, typename T2>
+    bool testGt(const char *file, int line,
+                const T1 &value1, const char *expression1,
+                const T2 &value2, const char *expression2,
+                const char *comment, ...) {
+        if (!(value1 > value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " > " << expression2 << " was: " << value1
+                      << " <= " << value2;
+            if (comment) {
+                std::cerr << " (";
+                va_list args;
+                va_start(args, comment);
+                vfprintf(stderr, comment, args);
+                va_end(args);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Similar to testGt above, but accepts a va_list instead of variadic
+    // parameters.
+    template <typename T1, typename T2>
+    bool vtestGt(const char *file, int line,
+                 const T1 &value1, const char *expression1,
+                 const T2 &value2, const char *expression2,
+                 const char *comment, va_list argp) {
+        if (!(value1 > value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " > " << expression2 << " was: " << value1
+                      << " <= " << value2;
+            if (comment) {
+                std::cerr << " (";
+                vfprintf(stderr, comment, argp);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+                
+    // Same as testGt above, but with comment set to 0.
+    template <typename T1, typename T2>
+    bool testGt(const char *file, int line,
+                const T1 &value1, const char *expression1,
+                const T2 &value2, const char *expression2) {
+        return testGt(file, line, value1, expression1, value2, expression2, 0);
+    }
+
+
+    // Called by the macro SEQAN_ASSERT_LEQ.
+    //
+    // Tests that the first value is less than or equal to the second
+    // one.  Returns true iff the test yields true.
+    template <typename T1, typename T2>
+    bool testLeq(const char *file, int line,
+                 const T1 &value1, const char *expression1,
+                 const T2 &value2, const char *expression2,
+                 const char *comment, ...) {
+        if (!(value1 <= value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " <= " << expression2 << " was: " << value1
+                      << " > " << value2;
+            if (comment) {
+                std::cerr << " (";
+                va_list args;
+                va_start(args, comment);
+                vfprintf(stderr, comment, args);
+                va_end(args);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Similar to testLeq above, but accepts a va_list instead of variadic
+    // parameters.
+    template <typename T1, typename T2>
+    bool vtestLeq(const char *file, int line,
+                  const T1 &value1, const char *expression1,
+                  const T2 &value2, const char *expression2,
+                  const char *comment, va_list argp) {
+        if (!(value1 <= value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " <= " << expression2 << " was: " << value1
+                      << " > " << value2;
+            if (comment) {
+                std::cerr << " (";
+                vfprintf(stderr, comment, argp);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Same as testLeq above, but with comment set to 0.
+    template <typename T1, typename T2>
+    bool testLeq(const char *file, int line,
+                 const T1 &value1, const char *expression1,
+                 const T2 &value2, const char *expression2) {
+        return testLeq(file, line, value1, expression1, value2, expression2, 0);
+    }
+
+
+    // Called by the macro SEQAN_ASSERT_LT.
+    //
+    // Tests that the first value is greater than the second one.
+    // Returns true iff the test yields true.
+    template <typename T1, typename T2>
+    bool testLt(const char *file, int line,
+                const T1 &value1, const char *expression1,
+                const T2 &value2, const char *expression2,
+                const char *comment, ...) {
+        if (!(value1 < value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " < " << expression2 << " was: " << value1
+                      << " >= " << value2;
+            if (comment) {
+                std::cerr << " (";
+                va_list args;
+                va_start(args, comment);
+                vfprintf(stderr, comment, args);
+                va_end(args);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Similar to testLt above, but accepts a va_list instead of variadic
+    // parameters.
+    template <typename T1, typename T2>
+    bool vtestLt(const char *file, int line,
+                 const T1 &value1, const char *expression1,
+                 const T2 &value2, const char *expression2,
+                 const char *comment, va_list argp) {
+        if (!(value1 < value2)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression1 << " < " << expression2 << " was: " << value1
+                      << " >= " << value2;
+            if (comment) {
+                std::cerr << " (";
+                vfprintf(stderr, comment, argp);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Same as testLt above, but comment is 0.
+    template <typename T1, typename T2>
+    bool testLt(const char *file, int line,
+                const T1 &value1, const char *expression1,
+                const T2 &value2, const char *expression2) {
+        return testLt(file, line, value1, expression1, value2, expression2, 0);
+    }
+
+
+    // Called by the macro SEQAN_ASSERT.
+    //
+    // Test that the given argument evaluates to true.
+    template <typename T>
+    bool testTrue(const char *file, int line,
+                  const T &value_, const char *expression_,
+                  const char *comment, ...) {
+        if (!(value_)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression_ << " should be true but was " << (value_);
+            if (comment) {
+                std::cerr << " (";
+                va_list args;
+                va_start(args, comment);
+                vfprintf(stderr, comment, args);
+                va_end(args);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Similar to testTrue above, but accepts a va_list instead of variadic
+    // parameters.
+    template <typename T>
+    bool vtestTrue(const char *file, int line,
+                   const T &value_, const char *expression_,
+                   const char *comment, va_list argp) {
+        if (!(value_)) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression_ << " should be true but was " << (value_);
+            if (comment) {
+                std::cerr << " (";
+                vfprintf(stderr, comment, argp);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Same as testTrue above, but comment will automatically be set to 0.
+    template <typename T>
+    bool testTrue(const char *file, int line,
+                  const T &value_, const char *expression_)
+    {
+        return testTrue(file, line, value_, expression_, 0);
+    }
+
+
+    // Called by the macro SEQAN_ASSERT.
+    //
+    // Test that the given argument evaluates to false.
+    template <typename T>
+    bool testFalse(const char *file, int line,
+                   const T &value_, const char *expression_,
+                   const char *comment, ...) {
+        if (value_) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression_ << " should be false but was " << (value_);
+            if (comment) {
+                std::cerr << " (";
+                va_list args;
+                va_start(args, comment);
+                vfprintf(stderr, comment, args);
+                va_end(args);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Similar to testFalse above, but accepts a va_list instead of variadic
+    // parameters.
+    template <typename T>
+    bool vtestFalse(const char *file, int line,
+                    const T &value_, const char *expression_,
+                    const char *comment, va_list argp) {
+        if (value_) {
+            // Increase global error count.
+            StaticData::thisTestOk() = false;
+            StaticData::errorCount() += 1;
+            // Print assertion failure text, with comment if any is given.
+            std::cerr << file << ":" << line << " Assertion failed : "
+                      << expression_ << " should be false but was " << (value_);
+            if (comment) {
+                std::cerr << " (";
+                vfprintf(stderr, comment, argp);
+                std::cerr << ")";
+            }
+            std::cerr << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+
+    // Same as testFalse above, but comment will automatically be set to 0.
+    template <typename T>
+    bool testFalse(const char *file, int line,
+                   const T &value_, const char *expression_) {
+        return testFalse(file, line, value_, expression_, 0);
+    }
+
+    // Represents a check point in a file.
+    struct CheckPoint {
+        // Path to the file.
+        const char *file;
+        // Line in the file.
+        unsigned int line;
+
+        // Less-than comparator for check points.
+        bool operator<(const CheckPoint &other) const {
+            int c = strcmp(file, other.file);
+            if (c < 0)
+                return true;
+            if (c == 0 && line < other.line)
+                return true;
+            return false;
+        }
+    };
+
+    // Wrapper for a set of check points.
+    // TODO(holtgrew): Simply store the set?
+    struct CheckPointStore {
+        static ::std::set<CheckPoint> &data() {
+            static ::std::set<CheckPoint> result;
+            return result;
+        }
+    };
+
+    // Puts the given check point into the CheckPointStore's data.
+    inline bool
+    registerCheckPoint(unsigned int line, const char *file) {
+        const char *file_name = strrchr(file, '/');
+        const char *file_name_2 = strrchr(file, '\\');
+        if (file_name_2 > file_name)
+            file_name = file_name_2;
+        if (!file_name)
+            file_name = file;
+        else ++file_name;
+
+        CheckPoint cp = {file_name, line};
+        #ifdef _OMP
+        #pragma omp critical
+        #endif  // #ifdef _OMP
+        CheckPointStore::data().insert(cp);
+        return true;
+    }
+
+    // Test whether the given check point exists in the check point
+    // store.
+    inline void
+    testCheckPoint(const char *file, unsigned int line) {
+        StaticData::totalCheckPointCount() += 1;
+        CheckPoint cp = {file, line};
+        if (CheckPointStore::data().find(cp) == CheckPointStore::data().end()) {
+            std::cerr << file << ":" << line << "  -- Check point lost."
+                      << std::endl;
+            return;
+        }
+        StaticData::foundCheckPointCount() += 1;
+    }
+
+    // Verify the check points for the given file.
+    inline void
+    verifyCheckPoints(const char *file) {
+        char const* file_name = strrchr(file, '/');
+        char const* file_name_2 = strrchr(file, '\\');
+        if (file_name_2 > file_name) file_name = file_name_2;
+        if (!file_name) file_name = file;
+        else ++file_name;
+
+
+
+        int len = strlen(StaticData::pathToProjects()) +
+            strlen("/") + strlen(file) + 1;
+        char *absolutePath = new char[len];
+        absolutePath[0] = '\0';
+        strcat(absolutePath, StaticData::pathToProjects());
+        strcat(absolutePath, "/");
+        strcat(absolutePath, file);
+
+        FILE * fl = ::std::fopen(absolutePath, "r");
+        delete[] absolutePath;
+        if (!fl) {
+            std::cerr << file << " -- verifyCheckPoints could not find this file." << std::endl;
+        }
+        unsigned int line_number = 1;
+        char buf[1<<16];
+
+        while (::std::fgets(buf, sizeof(buf), fl)) {
+            if (::std::strstr(buf, "SEQAN_CHECKPOINT")) {
+                testCheckPoint(file_name, line_number);
+            }
+            ++line_number;
+        }
+
+        ::std::fclose(fl);
+    }
+
+#if SEQAN_ENABLE_TESTING
+    // If in testing mode then raise an AssertionFailedException.
+    inline void fail() {
+        StaticData::thisTestOk() = false;
+        throw AssertionFailedException();
+    }
+#else
+    // If not in testing mode then quit with an abort.
+    inline void fail() {
+        abort();
+    }
+#endif  // #if SEQAN_ENABLE_TESTING
+
+}  // namespace ClassTest
+
+// This macro expands to function header for one test.
+#define SEQAN_DEFINE_TEST(test_name)                    \
+    template <bool speed_up_dummy_to_prevent_compilation_of_unused_tests_> void SEQAN_TEST_ ## test_name ()
+
+#if SEQAN_ENABLE_TESTING
+// This macro expands to startup code for a test file.
+#define SEQAN_BEGIN_TESTSUITE(suite_name)                       \
+    int main(int argc, char **argv) {                           \
+    (void) argc;                                                \
+    ::seqan::ClassTest::beginTestSuite(#suite_name, argv[0]);
+
+
+// This macro expands to shutdown code for a test file.
+#define SEQAN_END_TESTSUITE                     \
+    return ::seqan::ClassTest::endTestSuite();  \
+}
+
+
+// This macro expands to code to call a given test.
+#define SEQAN_CALL_TEST(test_name)                                      \
+    do {                                                                \
+        ::seqan::ClassTest::beginTest(#test_name);                      \
+        try {                                                           \
+            SEQAN_TEST_ ## test_name<true>();                           \
+        } catch(::seqan::ClassTest::AssertionFailedException e) {       \
+            /* Swallow exception, go on with next test. */              \
+            (void) e;  /* Get rid of unused variable warning. */        \
+        }                                                               \
+        ::seqan::ClassTest::endTest();                                  \
+    } while (false)
+
+
+// This macro returns from the current function and logs a "skipped"
+// event for the current test.
+#define SEQAN_SKIP_TEST                         \
+    do {                                        \
+        ::seqan::ClassTest::skipCurrentTest();  \
+        return;                                 \
+    } while (false)
+#endif  // #if SEQAN_ENABLE_TESTING
+
+// variadic macros are not supported by VS 2003 and before
+#if !defined(_MSC_VER) || (_MSC_VER >= 1400)
+
+#if SEQAN_ENABLE_DEBUG
+
+// Force a test failure.
+//
+// Usage:  SEQAN_ASSERT_FAIL("Failed at position %d", pos);
+#define SEQAN_ASSERT_FAIL(...)                                          \
+    do {                                                                \
+        ::seqan::ClassTest::forceFail(__FILE__, __LINE__,               \
+                                      __VA_ARGS__);                     \
+        ::seqan::ClassTest::fail();                                     \
+    } while (false)
+
+
+// Equality assertion without a comment.
+//
+// Usage:  SEQAN_ASSERT_EQ(4, 4);
+#define SEQAN_ASSERT_EQ(_arg1, _arg2)                                   \
+    do {                                                                \
+        if (!::seqan::ClassTest::testEqual(__FILE__, __LINE__,          \
+                                           (_arg1), #_arg1,             \
+                                           (_arg2), #_arg2)) {          \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Equality assertion with a comment.
+//
+// Usage:  SEQAN_ASSERT_EQ(4, 4);
+#define SEQAN_ASSERT_EQ_MSG(_arg1, _arg2, ...)                          \
+    do {                                                                \
+        if (!::seqan::ClassTest::testEqual(__FILE__, __LINE__,          \
+                                           (_arg1), #_arg1,             \
+                                           (_arg2), #_arg2,             \
+                                           __VA_ARGS__)) {              \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// In-delta-environment assertion without a comment.
+//
+// Usage:  SEQAN_ASSERT_IN_DELTA(4.1, 4, 0.1);
+#define SEQAN_ASSERT_IN_DELTA(_arg1, _arg2, _arg3)                      \
+    do {                                                                \
+        if (!::seqan::ClassTest::testInDelta(__FILE__, __LINE__,        \
+                                             (_arg1), #_arg1,           \
+                                             (_arg2), #_arg2,           \
+                                             (_arg3), #_arg3)) {        \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// In-delta-environment assertion witha comment.
+//
+// Usage:  SEQAN_ASSERT_IN_DELTA_MSG(4.1, 4, 0.1, "3.9 <= 4.1 <= 4.1");
+#define SEQAN_ASSERT_IN_DELTA_MSG(_arg1, _arg2, _arg3, ...)             \
+    do {                                                                \
+        if (!::seqan::ClassTest::testInDelta(__FILE__, __LINE__,        \
+                                             (_arg1), #_arg1,           \
+                                             (_arg2), #_arg2,           \
+                                             (_arg3), #_arg3,           \
+                                             __VA_ARGS__)) {            \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Inequality assertion without a comment.
+//
+// Usage:  SEQAN_ASSERT_NEQ(4, 5);
+#define SEQAN_ASSERT_NEQ(_arg1, _arg2)                                  \
+    do {                                                                \
+        if (!::seqan::ClassTest::testNotEqual(__FILE__, __LINE__,       \
+                                              (_arg1), #_arg1,          \
+                                              (_arg2), #_arg2)) {       \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Inequality assertion with a comment.
+//
+// Usage:  SEQAN_ASSERT_NEQ(4, 5);
+#define SEQAN_ASSERT_NEQ_MSG(_arg1, _arg2, ...)                         \
+    do {                                                                \
+        if (!::seqan::ClassTest::testNotEqual(__FILE__, __LINE__,       \
+                                              (_arg1), #_arg1,          \
+                                              (_arg2), #_arg2,          \
+                                              __VA_ARGS__)) {           \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Less-than-or-equal assertion without a comment.
+#define SEQAN_ASSERT_LEQ(_arg1, _arg2)                                  \
+    do {                                                                \
+        if (!::seqan::ClassTest::testLeq(__FILE__, __LINE__,            \
+                                         (_arg1), #_arg1,               \
+                                         (_arg2), #_arg2)) {            \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Less-than-or-equal assertion with a comment.
+#define SEQAN_ASSERT_LEQ_MSG(_arg1, _arg2, ...)                         \
+    do {                                                                \
+        if (!::seqan::ClassTest::testLeq(__FILE__, __LINE__,            \
+                                         (_arg1), #_arg1,               \
+                                         (_arg2), #_arg2,               \
+                                         __VA_ARGS__)) {                \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Less-than assertion without a comment.
+#define SEQAN_ASSERT_LT(_arg1, _arg2)                                   \
+    do {                                                                \
+        if (!::seqan::ClassTest::testLt(__FILE__, __LINE__,             \
+                                        (_arg1), #_arg1,                \
+                                        (_arg2), #_arg2)) {             \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Less-than assertion with a comment.
+#define SEQAN_ASSERT_LT_MSG(_arg1, _arg2, ...)                          \
+    do {                                                                \
+        if (!::seqan::ClassTest::testLt(__FILE__, __LINE__,             \
+                                        (_arg1), #_arg1,                \
+                                        (_arg2), #_arg2,                \
+                                        __VA_ARGS__)) {                 \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Greater-than-or-equal assertion without a comment.
+#define SEQAN_ASSERT_GEQ(_arg1, _arg2)                                  \
+    do {                                                                \
+        if (!::seqan::ClassTest::testGeq(__FILE__, __LINE__,            \
+                                         (_arg1), #_arg1,               \
+                                         (_arg2), #_arg2)) {            \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Greater-than-or-equal assertion with a comment.
+#define SEQAN_ASSERT_GEQ_MSG(_arg1, _arg2, ...)                         \
+    do {                                                                \
+        if (!::seqan::ClassTest::testGeq(__FILE__, __LINE__,            \
+                                         (_arg1), #_arg1,               \
+                                         (_arg2), #_arg2,               \
+                                         __VA_ARGS__)) {                \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Greater-than assertion without a comment.
+#define SEQAN_ASSERT_GT(_arg1, _arg2)                                   \
+    do {                                                                \
+        if (!::seqan::ClassTest::testGt(__FILE__, __LINE__,             \
+                                        (_arg1), #_arg1,                \
+                                        (_arg2), #_arg2)) {             \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Greater-than assertion with a comment.
+#define SEQAN_ASSERT_GT_MSG(_arg1, _arg2, ...)                          \
+    do {                                                                \
+        if (!::seqan::ClassTest::testGt(__FILE__, __LINE__,             \
+                                        (_arg1), #_arg1,                \
+                                        (_arg2), #_arg2,                \
+                                        __VA_ARGS__)) {                 \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// TODO(holtgrew): Rename to SEQAN_ASSERT_TRUE once that name is free.;
+// Trueness assertion with a comment.
+//
+// Usage:  SEQAN_ASSERT_TRUE(false);
+#define SEQAN_ASSERT_TRUE(_arg1)                                        \
+    do {                                                                \
+        if (!::seqan::ClassTest::testTrue(__FILE__, __LINE__,           \
+                                          (_arg1), #_arg1)) {           \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// TODO(holtgrew): Rename to SEQAN_ASSERT_TRUE once that name is free.;
+// Trueness assertion with a comment.
+#define SEQAN_ASSERT_TRUE_MSG(_arg1, ...)                               \
+    do {                                                                \
+        if (!::seqan::ClassTest::testTrue(__FILE__, __LINE__,           \
+                                          (_arg1), #_arg1,              \
+                                          __VA_ARGS__)) {             \
+            ::seqan::ClassTest::fail();                                 \
+        }                                                               \
+    } while (false)
+
+
+// Falseness assertion without a comment.
+//
+// Usage:  SEQAN_ASSERT_NOT(false);
+#define SEQAN_ASSERT_NOT(_arg1)                                       \
+    do {                                                              \
+        if (!::seqan::ClassTest::testFalse(__FILE__, __LINE__,        \
+                                           (_arg1), #_arg1)) {        \
+            ::seqan::ClassTest::fail();                               \
+        }                                                             \
+    } while (false)
+
+
+// Falseness assertion with a comment.
+#define SEQAN_ASSERT_NOT_MSG(_arg1, ...)                              \
+    do {                                                              \
+        if (!::seqan::ClassTest::testFalse(__FILE__, __LINE__,        \
+                                           (_arg1), #_arg1,           \
+                                           __VA_ARGS__)) {          \
+            ::seqan::ClassTest::fail();                               \
+        }                                                             \
+    } while (false)
+
+
+#else  // #if SEQAN_ENABLE_DEBUG
+
+#define SEQAN_ASSERT_EQ(_arg1, _arg2) do {} while (false)
+#define SEQAN_ASSERT_EQ_MSG(_arg1, _arg2, ...) do {} while (false)
+#define SEQAN_ASSERT_NEQ(_arg1, _arg2) do {} while (false)
+#define SEQAN_ASSERT_NEQ_MSG(_arg1, _arg2, ...) do {} while (false)
+#define SEQAN_ASSERT_LEQ(_arg1, _arg2) do {} while (false)
+#define SEQAN_ASSERT_LEQ_MSG(_arg1, _arg2, ...) do {} while (false)
+#define SEQAN_ASSERT_LT(_arg1, _arg2) do {} while (false)
+#define SEQAN_ASSERT_LT_MSG(_arg1, _arg2, ...) do {} while (false)
+#define SEQAN_ASSERT_GEQ(_arg1, _arg2) do {} while (false)
+#define SEQAN_ASSERT_GEQ_MSG(_arg1, _arg2, ...) do {} while (false)
+#define SEQAN_ASSERT_GT(_arg1, _arg2) do {} while (false)
+#define SEQAN_ASSERT_GT_MSG(_arg1, _arg2, ...) do {} while (false)
+#define SEQAN_ASSERT_TRUE(_arg1) do {} while (false)
+#define SEQAN_ASSERT_TRUE_MSG(_arg1, ...) do {} while (false)
+#define SEQAN_ASSERT_NOT(_arg1) do {} while (false)
+#define SEQAN_ASSERT_NOT_MSG(_arg1, ...) do {} while (false)
+#define SEQAN_ASSERT_FAIL(...) do {} while (false)
+
+#endif  // #if SEQAN_ENABLE_DEBUG
+
+#else // no variadic macros
+
+#if SEQAN_ENABLE_DEBUG
+inline void SEQAN_ASSERT_FAIL(const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	::seqan::ClassTest::vforceFail("", 0, comment, args);
+    ::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+template <typename T1, typename T2, typename T3>
+void SEQAN_ASSERT_IN_DELTA(T1 const &_arg1, T2 const &_arg2, T3 const &_arg3)
+{
+	if (!::seqan::ClassTest::testInDelta("", 0, _arg1, "", _arg2, "", _arg3, ""))
+		::seqan::ClassTest::fail();
+}
+
+template <typename T1, typename T2, typename T3>
+void SEQAN_ASSERT_IN_DELTA_MSG(T1 const &_arg1, T2 const &_arg2, T3 const &_arg3, const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	if (!::seqan::ClassTest::vtestInDelta("", 0, _arg1, "", _arg2, "", _arg3, "", comment, args))
+		::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_EQ(T1 const &_arg1, T2 const &_arg2)
+{
+	if (!::seqan::ClassTest::testEqual("", 0, _arg1, "", _arg2, ""))
+		::seqan::ClassTest::fail();
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_EQ_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	if (!::seqan::ClassTest::vtestEqual("", 0, _arg1, "", _arg2, "", comment, args))
+		::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_NEQ(T1 const &_arg1, T2 const &_arg2)
+{
+	if (!::seqan::ClassTest::testNotEqual("", _arg1, "", _arg2, ""))
+		::seqan::ClassTest::fail();
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_NEQ_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	if (!::seqan::ClassTest::vtestNotEqual("", _arg1, "", _arg2, "", comment, args))
+		::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_LEQ(T1 const &_arg1, T2 const &_arg2)
+{
+	if (!::seqan::ClassTest::testLeq("", 0, _arg1, "", _arg2, ""))
+		::seqan::ClassTest::fail();
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_LEQ_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	if (!::seqan::ClassTest::vtestLeq("", 0, _arg1, "", _arg2, "", comment, args))
+		::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_LT(T1 const &_arg1, T2 const &_arg2)
+{
+	if (!::seqan::ClassTest::testLt("", 0, _arg1, "", _arg2, ""))
+		::seqan::ClassTest::fail();
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_LT_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	if (!::seqan::ClassTest::vtestLt("", 0, _arg1, "", _arg2, "", comment, args))
+		::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_GEQ(T1 const &_arg1, T2 const &_arg2)
+{
+	if (!::seqan::ClassTest::testGeq("", 0, _arg1, "", _arg2, ""))
+		::seqan::ClassTest::fail();
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_GEQ_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	if (!::seqan::ClassTest::vtestGeq("", 0, _arg1, "", _arg2, "", comment, args))
+		::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_GT(T1 const &_arg1, T2 const &_arg2)
+{
+	if (!::seqan::ClassTest::testGt("", 0, _arg1, "", _arg2, ""))
+		::seqan::ClassTest::fail();
+}
+
+template <typename T1, typename T2>
+void SEQAN_ASSERT_GT_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	if (!::seqan::ClassTest::vtestGt("", 0, _arg1, "", _arg2, "", comment, args))
+		::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+template <typename T1>
+void SEQAN_ASSERT_TRUE(T1 const &_arg1)
+{
+	if (!::seqan::ClassTest::testTrue("", 0, _arg1, ""))
+		::seqan::ClassTest::fail();
+}
+
+template <typename T1>
+void SEQAN_ASSERT_TRUE_MSG(T1 const &_arg1, const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	if (!::seqan::ClassTest::vtestTrue("", 0, _arg1, "", comment, args))
+		::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+template <typename T1>
+void SEQAN_ASSERT_NOT(T1 const &_arg1)
+{
+	if (!::seqan::ClassTest::testFalse("", 0, _arg1, ""))
+		::seqan::ClassTest::fail();
+}
+
+template <typename T1>
+void SEQAN_ASSERT_NOT_MSG(T1 const &_arg1, const char *comment, ...)
+{
+	va_list args;
+	va_start(args, comment);
+	if (!::seqan::ClassTest::vtestFalse("", 0, _arg1, "", comment, args))
+		::seqan::ClassTest::fail();
+	va_end(args);
+}
+
+#else // #if SEQAN_ENABLE_DEBUG
+
+inline void SEQAN_ASSERT_FAIL(const char *comment, ...) {}
+template <typename T1, typename T2, typename T3> void SEQAN_ASSERT_IN_DELTA(T1 const &_arg1, T2 const &_arg2, T3 const &_arg3) {}
+template <typename T1, typename T2, typename T3> void SEQAN_ASSERT_IN_DELTA_MSG(T1 const &_arg1, T2 const &_arg2, T3 const &_arg3, const char *comment, ...) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_EQ(T1 const &_arg1, T2 const &_arg2) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_EQ_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_NEQ(T1 const &_arg1, T2 const &_arg2) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_NEQ_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_LEQ(T1 const &_arg1, T2 const &_arg2) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_LEQ_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_LT(T1 const &_arg1, T2 const &_arg2) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_LT_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_GEQ(T1 const &_arg1, T2 const &_arg2) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_GEQ_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_GT(T1 const &_arg1, T2 const &_arg2) {}
+template <typename T1, typename T2> void SEQAN_ASSERT_GT_MSG(T1 const &_arg1, T2 const &_arg2, const char *comment, ...) {}
+template <typename T1> void SEQAN_ASSERT_TRUE(T1 const &_arg1) {}
+template <typename T1> void SEQAN_ASSERT_TRUE_MSG(T1 const &_arg1, const char *comment, ...) {}
+template <typename T1> void SEQAN_ASSERT_NOT(T1 const &_arg1) {}
+template <typename T1> void SEQAN_ASSERT_NOT_MSG(T1 const &_arg1, const char *comment, ...) {}
+
+#endif // #if SEQAN_ENABLE_DEBUG
+
+#endif // no variadic macros
+
+// Returns a string (of type char*) with the path to the called binary.
+//
+// Use this to locate files relative to the test binary.
+#define SEQAN_PROGRAM_PATH                      \
+    ::seqan::ClassTest::StaticData::basePath()
+
+// Returns a const char * string with the path to the projects directory.
+#define SEQAN_PATH_TO_PROJECTS()                        \
+    ::seqan::ClassTest::StaticData::pathToProjects()
+
+
+// Returns the POSIX int file handle to an open file.
+// TODO(holtgrewe): Uncomment if openTempFile has been implemented.
+// #define SEQAN_OPEN_TEMP_FILE() (::seqan::ClassTest::openTempFile())
+
+
+// Returns a temporary filename.
+#define SEQAN_TEMP_FILENAME() (::seqan::ClassTest::tempFileName())
+
+
+#if SEQAN_ENABLE_CHECKPOINTS
+
+// Create a check point at the point where the macro is placed.
+// TODO(holtgrew): Should be called SEQAN_CHECK_POINT to be consistent.
+#define SEQAN_CHECKPOINT                                        \
+    ::seqan::ClassTest::registerCheckPoint(__LINE__, __FILE__);
+
+// Call the check point verification code for the given file.
+#define SEQAN_VERIFY_CHECKPOINTS(filename)          \
+    ::seqan::ClassTest::verifyCheckPoints(filename)
+
+#else  // #if SEQAN_ENABLE_CHECKPOINTS
+
+#define SEQAN_CHECKPOINT
+
+// If checkpoints are to be verified if testing is disabled then print
+// a warning.
+#define SEQAN_VERIFY_CHECKPOINTS(filename)                              \
+    do {                                                                \
+        fprintf(stderr, ("WARNING: Check point verification is "        \
+                         "disabled. Trying to verify %s from %s:%d.\n"), \
+                filename, __FILE__, __LINE__);                          \
+    } while(false)
+
+#endif  // #if SEQAN_ENABLE_CHECKPOINTS
+
+#if !SEQAN_ENABLE_TESTING
+
+#define SEQAN_BEGIN_TESTSUITE(suite_name)                               \
+    int main(int argc, char **argv) {                                   \
+    (void) argc;                                                        \
+    (void) argv;                                                        \
+    fprintf(stderr, "Warning: SEQAN_ENABLE_TESTING is wrong and you used the macro SEQAN_BEGIN_TESTSUITE!\n");
+#define SEQAN_END_TESTSUITE }
+#define SEQAN_CALL_TEST(test_name) do { SEQAN_TEST_ ## test_name(); } while (false)
+#define SEQAN_SKIP_TEST do {} while (false)
+
+#endif  // #if !SEQAN_ENABLE_TESTING
+
+}  // namespace seqan
+
+#endif  // SEQAN_BASIC_BASIC_TESTING_H_
diff --git a/src/SeqAn-1.3/seqan/basic/basic_transport.h b/src/SeqAn-1.3/seqan/basic/basic_transport.h
new file mode 100644
index 0000000..234f748
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_transport.h
@@ -0,0 +1,209 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_TRANSPORT_H
+#define SEQAN_HEADER_BASIC_TRANSPORT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//assign
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assign:
+..summary:Assigns one object to another object.
+..cat:Content Manipulation
+..signature:assign(target, source)
+..signature:assign(target, source [, limit] [,resize_tag])
+..param.target: Gets the content of $source$.
+..param.source: Is copied to $target$.
+..param.limit: The maximal length of $target$ after the operation. (optional)
+...remarks:This arguments can be applied if $target$ is a container.
+..param.resize_tag: Specifies the strategy that is applied if $target$ has not enough capacity to store the complete content. (optional)
+...type:Tag.Overflow Strategy
+...default:Specified by @Metafunction.DefaultOverflowImplicit@ of the $target$ type.
+...remarks:This arguments can be applied if $target$ is a container.
+..remarks:$assign(target, source)$ is semantically equivalent to $target = source$. 
+..include:seqan/basic.h
+*/
+
+template <typename TTarget, typename TSource>
+inline void
+assign(TTarget & target,
+	   TSource & source)
+{
+SEQAN_CHECKPOINT
+	target = source;
+}
+template <typename TTarget, typename TSource>
+inline void
+assign(TTarget & target,
+	   TSource const & source)
+{
+SEQAN_CHECKPOINT
+	target = source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec> struct Proxy;
+
+template<typename TTargetSpec, typename TSource>
+inline void 
+assign(Proxy<TTargetSpec> & target,
+	   TSource & source)
+{
+SEQAN_CHECKPOINT
+	assignValue(iter(target), source);
+}
+
+template<typename TTargetSpec, typename TSource>
+inline void 
+assign(Proxy<TTargetSpec> & target,
+	   TSource const & source)
+{
+SEQAN_CHECKPOINT
+	assignValue(iter(target), source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// move
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.move:
+..summary:Hands over content from one container to another container.
+..cat:Content Manipulation
+..signature:move(target, source)
+..param.target:A container $source$ is moved to.
+..param.source:A container that is moved to $target$.
+..remarks:The function tries to hand over the contents of $source$ to $target$.
+If this is possible, $source$ looses its content and will therefore be empty after this operation.
+Otherwise, the function behaves like @Function.assign@ and $source$ is copied to $target$. 
+..see:Function.assign
+..include:seqan/basic.h
+*/
+
+template<typename TTarget, typename TSource>
+inline void 
+move(TTarget & target,
+	 TSource & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, source);
+}
+template<typename TTarget, typename TSource>
+inline void 
+move(TTarget const & target,
+	 TSource & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, source);
+}
+template<typename TTarget, typename TSource>
+inline void 
+move(TTarget & target,
+	 TSource const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, source);
+}
+template<typename TTarget, typename TSource>
+inline void 
+move(TTarget const & target,
+	 TSource const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, source);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// set
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.set:
+..summary:Assigns one object to another object avoiding to copy contents.
+..cat:Content Manipulation
+..signature:assign(target, source)
+..signature:assign(target, source)
+..param.target: Gets the content of $source$.
+..param.source: Content source.
+..remarks:$set(target, source)$ is semantically equivalent to $target = source$.
+If possible, $set$ copies content references instead of the content itself.
+..include:seqan/basic.h
+*/
+
+//TODO: rename set to ...
+
+template<typename TTarget, typename TSource>
+inline void 
+set(TTarget & target,
+	TSource & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, source);
+}
+template<typename TTarget, typename TSource>
+inline void 
+set(TTarget const & target,
+	TSource & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, source);
+}
+template<typename TTarget, typename TSource>
+inline void 
+set(TTarget & target,
+	TSource const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, source);
+}
+template<typename TTarget, typename TSource>
+inline void 
+set(TTarget const & target,
+	TSource const & source)
+{
+SEQAN_CHECKPOINT
+	assign(target, source);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_type.h b/src/SeqAn-1.3/seqan/basic/basic_type.h
new file mode 100644
index 0000000..8b50275
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_type.h
@@ -0,0 +1,710 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_TYPE_H
+#define SEQAN_HEADER_BASIC_TYPE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Value:
+..summary:Type of the items in the container. 
+..signature:Value<T>::Type
+..param.T:Type for which the value type is determined.
+..returns.param.Type:Value type of $T$.
+..remarks.text:The value type of a container $T$ is the type of the elements in $T$.
+    For example, the value type of a sequence of $int$ is $int$.
+..example.code:Value<String<char> >::Type c; //c has type char
+..include:seqan/basic.h
+*/
+
+template <typename T, const int i = 0>
+struct Value
+{
+	typedef T Type;
+};
+/*
+template <typename T>
+struct Value<T const>
+{
+	typedef T Type;
+};
+*/
+//____________________________________________________________________________
+
+/**
+.Metafunction.GetValue:
+..summary:Type for reading values. 
+..signature:GetValue<T>::Type
+..param.T:Type of container that holds a value.
+..returns.param.Type:GetValue type of $T$.
+..remarks.text:Depending on $T$, the $GetValue$-type can either be $Value<T>::Type &$ or $Value<T>::Type$.
+..text:$GetValue$ is the return type of @Function.getValue@ that allows a (read-only) access to objects.
+Do not confuse it with @Function.value@ that returns a @Metafunction.Reference.reference@ to the value.
+..see:Metafunction.Value
+..see:Function.getValue
+..include:seqan/basic.h
+*/
+template <typename T>
+struct GetValue
+{
+	typedef typename Value<T>::Type const & Type;
+};
+template <typename T>
+struct GetValue<T const>:
+	public GetValue<T>
+{
+};
+
+//____________________________________________________________________________
+
+/**
+.Metafunction.Reference:
+..summary:Reference type. 
+..signature:Reference<T>::Type
+..param.T:A Type.
+..returns.param.Type:Either $T &$ or a proxy object @Class.Proxy@ for $T$.
+..see:Metafunction.Value
+..see:Metafunction.GetValue
+..include:seqan/basic.h
+*/
+template <typename T>
+struct Reference
+{
+	typedef typename Value<T>::Type & Type;
+};
+template <typename T>
+struct Reference<T const>
+{
+	typedef typename Value<T>::Type const & Type;
+};
+
+//____________________________________________________________________________
+
+
+/**
+.Metafunction.Size:
+..summary:Type of an object that is suitable to hold size information.
+..signature:Size<T>::Type
+..param.T:Type for which the size type is determined.
+..returns.param.Type:Size type of $T$.
+..remarks.text:In most cases this type is $size_t$.
+..include:seqan/basic.h
+*/
+template <typename T>
+struct Size
+{
+	typedef size_t Type;
+};
+template <typename T>
+struct Size<T const>:
+	Size<T>
+{
+};
+
+//____________________________________________________________________________
+
+
+/**
+.Metafunction.Difference:
+..summary:Type of an object that stores the difference between two iterators.
+..signature:Difference<T>::Type
+..param.T:Type for which the difference type is determined.
+...type:Class.Iter
+..returns.param.Type:Difference type of $T$.
+..remarks.text:In most cases this type is $ptrdiff_t$.
+..see:Metafunction.Size
+..include:seqan/basic.h
+*/
+template <typename T>
+struct Difference
+{
+	typedef ptrdiff_t Type;
+};
+template <typename T>
+struct Difference<T const>:
+	Difference<T>
+{
+};
+
+//____________________________________________________________________________
+
+
+/**
+.Metafunction.Position:
+..summary:Type of an object that represents a position in a container.
+..signature:Position<T>::Type
+..param.T:Type for which the position type is determined.
+...type:Class.Iter
+...type:Class.String
+..returns.param.Type:Position type of $T$.
+..see:Metafunction.Iterator
+..include:seqan/basic.h
+*/
+template <typename T>
+struct Position
+{
+	typedef typename Size<T>::Type Type;
+};
+template <typename T>
+struct Position<T const>:
+	Position<T>
+{
+};
+
+//____________________________________________________________________________
+
+/**
+.Metafunction.Host:
+..summary:Type of the object a given object depends on.
+..signature:Host<T>::Type
+..param.T:Type for which the host type is determined.
+..returns.param.Type:Host type of $T$.
+..include:seqan/basic.h
+*/
+template <typename T>
+struct Host
+{
+	typedef T Type;
+};
+
+//____________________________________________________________________________
+
+/**
+.Metafunction.Spec:
+..summary:The spec of a class. 
+..signature:Spec<T>::Type
+..param.T:Type for which the spec is determined.
+..returns.param.Type:Spec of $T$.
+..remarks:The spec of a SeqAn type is the class that is used in template subclassing 
+ to specify the specialization. 
+ For example, the spec of $String<char, Alloc<> >$ is $Alloc<>$.
+..include:seqan/basic.h
+*/
+
+// default case
+template <typename T>
+struct Spec {
+	typedef void Type;
+};
+
+
+// one argument case
+template <template <typename> class T, typename TSpec>
+struct Spec< T<TSpec> > {
+	typedef TSpec Type;
+};
+
+template <typename T>
+struct Spec<T const>:
+	public Spec<T> {};
+
+//____________________________________________________________________________
+
+/**
+.Metafunction.DeepestSpec:
+..summary:The deepest spec of a class with nested template arguments.
+..signature:DeepestSpec<T>::Type
+..param.T:Type for which the deepest spec is determined.
+..returns.param.Type:Deepest spec of $T$.
+..remarks:The spec of a SeqAn type is the innermost class that is used in nested subclassing.
+ For example, the deepest spec of $Iter<..., VSTree<BottomUp<Mums> > >$ is $Mums$.
+..include:seqan/basic.h
+*/
+
+// default case
+template <typename T>
+struct DeepestSpec {
+	typedef T Type;
+};
+
+// recursion for 1 argument
+template <
+	template <typename> class T, 
+	typename T1 >
+struct DeepestSpec< T<T1> > {
+	typedef typename 
+		If<
+			IsSameType<T1, void>::VALUE,										// is T1 void?
+			T<T1>,															// yes, end of recursion
+			typename DeepestSpec< typename Spec< T<T1> >::Type >::Type		// no,  recurse
+		>::Type Type;
+};
+
+// recursion for 2 arguments
+template <
+	template <typename, typename> class T, 
+	typename T1, typename T2 >
+struct DeepestSpec< T<T1,T2> >:
+	DeepestSpec< typename Spec< T<T1,T2> >::Type > {};
+
+// recursion for 3 arguments
+template <
+	template <typename, typename, typename> class T, 
+	typename T1, typename T2, typename T3 >
+struct DeepestSpec< T<T1,T2,T3> >:
+	DeepestSpec< typename Spec< T<T1,T2,T3> >::Type > {};
+
+// recursion for 4 arguments
+template <
+	template <typename, typename, typename, typename> class T, 
+	typename T1, typename T2, typename T3, typename T4 >
+struct DeepestSpec< T<T1,T2,T3,T4> >:
+	DeepestSpec< typename Spec< T<T1,T2,T3,T4> >::Type > {};
+
+// recursion for 5 arguments
+template <
+	template <typename, typename, typename, typename, typename> class T, 
+	typename T1, typename T2, typename T3, typename T4, typename T5 >
+struct DeepestSpec< T<T1,T2,T3,T4,T5> >:
+	DeepestSpec< typename Spec< T<T1,T2,T3,T4,T5> >::Type > {};
+
+template <typename T>
+struct DeepestSpec<T const>:
+	public DeepestSpec<T> {};
+
+//____________________________________________________________________________
+
+/**
+.Metafunction.Cargo:
+..summary:Type of additional data stored in an object. 
+..signature:Cargo<T>::Type
+..param.T:Type for which the cargo tyoe is determined.
+..returns.param.Type:Cargo of $T$.
+..remarks:The definition of Cargo allows the addition of user specific data to existing data structures.
+..include:seqan/basic.h
+*/
+
+template <typename T>
+struct Cargo {
+	typedef Nothing Type;
+};
+template <typename T>
+struct Cargo<T const> {
+	typedef typename Cargo<T>::Type const Type;
+};
+
+//____________________________________________________________________________
+
+/**
+.Metafunction.VertexDescriptor:
+..summary:Type of an object that represents a vertex descriptor.
+..signature:VertexDescriptor<T>::Type
+..param.T:Type T must be a graph. All graphs currently use ids as vertex descriptors.
+..returns.param.Type:VertexDescriptor type.
+..remarks.text:The vertex descriptor is a unique handle to a vertex in a graph.
+It is used in various graph functions, e.g., to add edges, to create OutEdge Iterators or to remove a vertex.
+It is also used to attach properties to vertices.
+..example.code:VertexDescriptor<Graph<> >::Type vD; //vD is a vertex descriptor
+..include:seqan/basic.h
+*/
+
+template <typename T>
+struct VertexDescriptor {
+	typedef void* Type;
+};
+template <typename T>
+struct VertexDescriptor<T const>:
+	public VertexDescriptor<T> {};
+
+
+//____________________________________________________________________________
+
+	
+/**
+.Metafunction.Id:
+..summary:Type of an object that represents an id.
+..signature:Id<T>::Type
+..param.T:Type for which a suitable id type is determined.
+..returns.param.Type:Id type.
+..remarks.text:The id type of a container is the type that is used to uniquely identify its elements.
+In most cases this type is unsigned int.
+..example.code:Id<Graph<> >::Type id; //id has type unsigned int
+..include:seqan/basic.h
+*/
+template<typename T>
+struct Id {
+	typedef unsigned int Type;
+};
+
+//____________________________________________________________________________
+
+template<typename T>
+struct Id<T const> {
+	typedef unsigned int Type;
+};
+
+//____________________________________________________________________________
+
+/**
+.Metafunction.Key:
+..summary:Key type of a key to cargo mapping.
+..signature:Key<T>::Type
+..param.T:Type for which a key type is determined.
+..returns.param.Type:Key type.
+...default:The type $T$ itself.
+..include:seqan/basic.h
+*/
+template< typename T >
+struct Key
+{
+	typedef T Type;
+};
+
+template <typename T>
+struct Key<T const>:
+	Key<T> {};
+
+//____________________________________________________________________________
+
+/*VERALTET
+.Metafunction.Object:
+..summary:Object type of a key to object mapping.
+..signature:Object<T>::Type
+..param.T:Type for which a object type is determined.
+..returns.param.Type:Object type.
+..include:seqan/basic.h
+*/
+
+template<typename T>
+struct Object; 
+
+template <typename T>
+struct Object<T const>:
+	Object<T> {};
+
+
+//____________________________________________________________________________
+
+/**
+.Metafunction.Source
+..include:seqan/basic.h
+*/
+
+template < typename TSpec = void >
+struct Source
+{
+	typedef TSpec Type;
+};
+
+template <typename T>
+struct Source<T const>:
+	Source<T>
+{
+};
+
+//____________________________________________________________________________
+
+/**
+.Internal.Parameter_:
+..cat:Metafunctions
+..summary:Type for function parameters and return values.
+..signature:Parameter_<T>::Type
+..param.T:A type.
+..returns.param.Type:The parameter type for arguments of type $T$.
+...text:If $T$ is a pointer or array type, then $Parameter_<T>::Type$ is $T$, 
+otherwise $Parameter_<T>::Type$ is $T &$.
+*/
+template <typename T>
+struct Parameter_
+{
+	typedef T & Type;
+};
+
+template <typename T>
+struct Parameter_<T *>
+{
+	typedef T * Type;
+};
+template <typename T, size_t I>
+struct Parameter_<T [I]>
+{
+	typedef T * Type;
+};
+
+
+/**
+.Internal._toParameter:
+..cat:Functions
+..summary:Transforms pointers to parameter types.
+..signature:_toParameter<T>(pointer)
+..param.pointer:A pointer.
+..param.T:A Type.
+...text:$object$ is transformed into the parameter type of $T$ that is given by @Internal.Parameter_ at .
+...note:This type must be explicitely specified.
+..returns:To $TParameter$ transformed $object$.
+..see:Internal.Parameter_
+*/
+template <typename T>
+typename Parameter_<T>::Type
+_toParameter(T * _object)
+{
+SEQAN_CHECKPOINT
+	return * _object;
+}
+template <typename T>
+typename Parameter_<T>::Type
+_toParameter(T _object)
+{
+SEQAN_CHECKPOINT
+	return _object;
+}
+
+//____________________________________________________________________________
+
+/**
+.Internal.ConstParameter_:
+..cat:Metafunctions
+..summary:Type for constant function parameters and return values.
+..signature:ConstParameter_<T>::Type
+..param.T:A type.
+..returns.param.Type:The const parameter type for arguments of type $T$.
+...text:If $T$ is a pointer or array type, then $Parameter_<T>::Type$ is a pointer to a const array, 
+otherwise $Parameter_<T>::Type$ is $T const &$.
+..see:Internal.Parameter_
+*/
+template <typename T>
+struct ConstParameter_
+{
+	typedef T const & Type;
+};
+template <typename T>
+struct ConstParameter_<T const>:
+	public ConstParameter_<T> {};
+
+template <typename T>
+struct ConstParameter_<T *>
+{
+	typedef T const * Type;
+};
+template <typename T>
+struct ConstParameter_<T const *>
+{
+	typedef T const * Type;
+};
+
+template <typename T, size_t I>
+struct ConstParameter_<T [I]>
+{
+	typedef T const * Type;
+};
+template <typename T, size_t I>
+struct ConstParameter_<T const [I]>
+{
+	typedef T const * Type;
+};
+
+//____________________________________________________________________________
+
+/**
+.Internal.Pointer_:
+..cat:Metafunctions
+..summary:The associated pointer type.
+..signature:Pointer_<T>::Type
+..param.T:A type.
+..returns.param.Type:A pointer type for $T$.
+...text:if $T$ is already a pointer type, then $Pointer_<T>::Type$ is $T$,
+otherwise $Pointer_<T>::Type$ is $T *$.
+..see:Internal.Parameter_
+..see:Internal._toParameter
+*/
+template <typename T>
+struct Pointer_
+{
+	typedef T * Type;
+};
+
+template <typename T>
+struct Pointer_<T *>
+{
+	typedef T * Type;
+};
+template <typename T>
+struct Pointer_<T * const>
+{
+	typedef T * Type;
+};
+
+template <typename T, size_t I>
+struct Pointer_<T [I]>
+{
+	typedef T * Type;
+};
+
+//non const version of Pointer_ for return values
+
+template <typename T>
+struct NonConstPointer_:
+	Pointer_<T>
+{
+};
+template <typename T>
+struct NonConstPointer_<T * const>
+{
+	typedef T * Type;
+};
+
+/**
+.Internal._toPointer:
+..cat:Functions
+..summary:Transforms types into pointers.
+..signature:_toPointer(object)
+..param.object:An object.
+..returns:$object$, transformed to a pointer. 
+...text:The type of the returned pointer is given by @Internal.Pointer_ at .
+..see:Internal.Pointer_
+*/
+template <typename T>
+typename NonConstPointer_<T>::Type
+_toPointer(T & _object)
+{
+SEQAN_CHECKPOINT
+	return & _object;
+}
+template <typename T>
+typename NonConstPointer_<T const>::Type
+_toPointer(T const & _object)
+{
+SEQAN_CHECKPOINT
+	return & _object;
+}
+
+template <typename T>
+typename NonConstPointer_<T *>::Type
+_toPointer(T * _object)
+{
+SEQAN_CHECKPOINT
+	return _object;
+}
+
+//____________________________________________________________________________
+
+
+/**
+.Metafunction.LENGTH:
+..summary:Number of elements in a fixed-size container.
+..signature:LENGTH<T>::VALUE
+..param.T:Type for which the number of elements is determined.
+..returns.param.VALUE:Number of elements.
+..remarks.text:The default return value is 1 for dynamic-size containers.
+..include:seqan/basic.h
+*/
+template <typename T>
+struct LENGTH
+{
+	enum { VALUE = 1 };
+};
+template <typename T>
+struct LENGTH<T const>:
+	LENGTH<T>
+{
+};
+
+/**
+.Metafunction.WEIGHT:
+..summary:Number of relevant positions in a shape.
+..signature:WEIGHT<T>::Type
+..param.T:Shape type for which the number of relevant positions is determined.
+...type:Class.Shape
+..returns.param.VALUE:Number of relevant positions.
+..remarks.text:The default return value is the result of the @Metafunction.LENGTH@ function.
+For gapped shapes this is the number of '1's.
+..include:seqan/basic.h
+*/
+template <typename T>
+struct WEIGHT:
+	LENGTH<T>
+{
+};
+template <typename T>
+struct WEIGHT<T const>:
+	WEIGHT<T>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+//Iterator: see basic_iterator.h
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.IsIntegral:
+..summary:Tests for a type to be of integral value.
+..signature:IsIntegral<T>::Type
+..param.T:Type that is tested.
+..returns.param.Type:@Tag.Logical Values.True@, if $T$ is a simple type, @Tag.Logical Values.False@ otherwise.
+...default:@Tag.Logical Values.False@
+..include:seqan/basic.h
+ */
+template <typename T>
+struct IsIntegral
+{
+	typedef
+		// Implicitely signed.
+		typename If< IsSameType<T, char>::VALUE,  True,
+		typename If< IsSameType<T, char>::VALUE,  True,
+		typename If< IsSameType<T, short>::VALUE, True,
+		typename If< IsSameType<T, int>::VALUE,   True,
+		typename If< IsSameType<T, long>::VALUE,  True,
+		typename If< IsSameType<T, __int64>::VALUE,      True,
+		// Explicitely signed.
+		typename If< IsSameType<T, signed char>::VALUE,    True,
+		typename If< IsSameType<T, signed char>::VALUE,    True,
+		typename If< IsSameType<T, signed short>::VALUE,   True,
+		typename If< IsSameType<T, signed int>::VALUE,     True,
+		typename If< IsSameType<T, signed long>::VALUE,    True,
+		// Explicitely unsigned.
+		typename If< IsSameType<T, unsigned char>::VALUE,  True,
+		typename If< IsSameType<T, unsigned char>::VALUE,  True,
+		typename If< IsSameType<T, unsigned short>::VALUE, True,
+		typename If< IsSameType<T, unsigned int>::VALUE,   True,
+		typename If< IsSameType<T, unsigned long>::VALUE,  True,
+		typename If< IsSameType<T, __uint64>::VALUE,       True,
+		False
+		>::Type>::Type>::Type>::Type>::Type>::Type
+		>::Type>::Type>::Type>::Type>::Type
+		>::Type>::Type>::Type>::Type>::Type>::Type Type;
+};
+
+template <typename T>
+struct IsIntegral<T const> {
+	typedef typename IsIntegral<T>::Type Type;
+};
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/basic/basic_volatile_ptr.h b/src/SeqAn-1.3/seqan/basic/basic_volatile_ptr.h
new file mode 100644
index 0000000..048baf2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/basic/basic_volatile_ptr.h
@@ -0,0 +1,171 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BASIC_VOLATILE_PTR_H
+#define SEQAN_HEADER_BASIC_VOLATILE_PTR_H
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	//////////////////////////////////////////////////////////////////////////////
+	// volatile pointer
+	// allows you to handle volatile data (used by ext. string during swapping)
+    //
+	// imagine volatile pointers as nodes in an undirected graph
+    // when you assign one to another then they are connected
+    // all pointers in a connection component points to the same value
+    // by calling nukeCopies you can destroy the component and set all pointers to NULL
+
+	template < typename Type >
+	struct VolatilePtr
+	{
+		typedef VolatilePtr		Self_;
+		typedef VolatilePtr*	SelfPtr_;
+		typedef VolatilePtr&	SelfRef_;
+
+		typedef Type&			reference;
+		typedef const Type&		const_reference;
+		typedef Type*			pointer;
+
+		pointer			ptr;
+		SelfPtr_		next;			// prev == NULL means this is the master node
+		SelfPtr_		prev;			// prev == NULL means this is the master node
+
+        VolatilePtr() {	    // volatile pinters behave like normal pointers
+            prev = this;    // and are not initialized (ptr) per default
+            next = this;
+        }
+
+        VolatilePtr(const pointer _p) {
+			ptr = _p;
+			prev = this;
+			next = this;
+        }
+
+        VolatilePtr(const Self_& _vp) {
+			ptr = _vp.ptr;
+			prev = this;
+			next = this;
+        }
+
+        VolatilePtr(SelfRef_ _vp) {
+			ptr = _vp.ptr;
+			prev = this;
+			next = this;
+			if (ptr) hangOn(_vp);
+		}
+
+		~VolatilePtr() {
+			hangOff();
+		}
+        
+        template <typename size_type>
+		inline reference operator[] (size_type offset) {
+			return ptr[offset];
+		}
+
+        template <typename size_type>
+		inline const_reference operator[] (size_type offset) const {
+			return ptr[offset];
+		}
+
+		inline Self_& operator=(Self_ const &Right_) {
+			hangOff();
+			ptr = Right_.ptr;
+            if (ptr) hangOn(const_cast<Self_&>(Right_));
+			return *this;
+		}
+
+		inline Self_& operator=(pointer const Right_) {
+			hangOff();
+			ptr = Right_;
+			return *this;
+		}
+
+        inline bool isLonely() {
+            return next == this;
+        }
+
+		inline void nukeCopies() {
+			SelfPtr_ p = next;
+			while (p != this) {
+				SelfPtr_ tmp = p->next;
+				p->ptr = NULL;
+				p->prev = p;
+				p->next = p;
+				p = tmp;
+			}
+            prev = this;
+			next = this;
+		}
+
+		inline bool operator== (const Self_ &I) const {
+			return ptr == I.ptr;
+		}
+
+		inline bool operator!= (const Self_ &I) const {
+			return ptr != I.ptr;
+		}
+
+		inline operator pointer () const {
+			return ptr;
+		}
+
+	private:
+
+		inline void hangOn(SelfRef_ _prev) {
+			// hang on between _prev and _prev.next
+			prev = &_prev;
+			next = _prev.next;
+			_prev.next = this;
+			next->prev = this;
+		}
+
+		inline void hangOff() {
+			next->prev = prev;
+			prev->next = next;
+            next = this;
+            prev = this;
+		}
+	};
+
+    template <typename TValue>
+    inline void nukeCopies(TValue* &) {}
+
+    template <typename TValue>
+    inline void nukeCopies(VolatilePtr<TValue> &ptr) { ptr.nukeCopies(); }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/blast.h b/src/SeqAn-1.3/seqan/blast.h
new file mode 100644
index 0000000..c201ff6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast.h
@@ -0,0 +1,72 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_H
+#define SEQAN_HEADER_BLAST_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <iostream>
+#include <fstream>
+
+#include <seqan/align.h>
+#include <seqan/graph_types.h>
+#include <seqan/misc/misc_parsing.h>
+#include <seqan/graph_algorithms.h>
+
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/blast/blast_generated_forwards.h>
+#endif
+
+
+#include <seqan/blast/blast_base.h>
+#include <seqan/blast/blast_hsp.h>
+#include <seqan/blast/blast_hit.h>
+#include <seqan/blast/blast_report.h>
+#include <seqan/blast/blast_parsing.h>
+#include <seqan/blast/blast_iterator.h>
+#include <seqan/blast/blast_hit_iterator.h>
+#include <seqan/blast/blast_hsp_iterator.h>
+
+
+#include <seqan/blast/blast_stream_report.h>
+#include <seqan/blast/blast_stream_hit.h>
+#include <seqan/blast/blast_stream_hit_iterator.h>
+#include <seqan/blast/blast_stream_hsp_iterator.h>
+
+
+#include <seqan/blast/blast_run.h>
+
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_base.h b/src/SeqAn-1.3/seqan/blast/blast_base.h
new file mode 100644
index 0000000..07ec8e4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_base.h
@@ -0,0 +1,197 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_BASE_H
+#define SEQAN_HEADER_BLAST_BASE_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast Report types
+
+
+struct FullInfo;
+//...remarks:BasicInfo stores begin and end positions on query and database sequence, as well as the alignment. FullInfo stores additional information such as score, e-value...
+
+struct BasicInfo;
+
+
+
+/**
+.Spec.StoreReport:
+..cat:Blast
+..general:Class.BlastReport
+..summary:BlastReport specialization. Parses a Blast report and stores all hits and HSPs.
+..signature:BlastReport<TBlastHsp,StoreReport<TSpec> >
+..param.TBlastHsp:The type of HSPs to be stored. See @Class.BlastHsp@
+...metafunction:Metafunction.Hsp
+...default:BlastHsp<BlastN,BasicInfo> 
+..param.TSpec:The specializing type.
+...default:BasicInfo
+...type:Spec.BasicInfo
+...type:Spec.FullInfo 
+..include:blast.h
+*/
+//
+//...remarks:BasicInfo only stores query name, database name and a String of all hits found. FullInfo also stores the following 
+//parameters: lambda, k, h, gapped_lambda, gapped_k, gapped_h, gap_open, gap_extension; String<char> matrix; double min_expect;
+//
+template<typename TInfoSpec = BasicInfo>
+struct StoreReport;		//stores the whole report
+
+
+/**
+.Spec.StreamReport:
+..cat:Blast
+..general:Class.BlastReport
+..summary:BlastReport specialization that works on a file stream (parses hits/HSPs when iterating over them).
+..signature:BlastReport<TBlastHsp,StreamReport<TFile> >
+..param.TBlastHsp:The type of HSPs to be stored. See @Class.BlastHsp@
+...metafunction:Metafunction.Hsp
+...default:BlastHsp<BlastN,BasicInfo> 
+..param.TFile:The type of the stream.
+...default:std::fstream
+..include:blast.h
+*/
+template<typename TFile = std::fstream>    //works on a stream
+struct StreamReport;
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//Blast Meta functions
+
+
+/**
+.Metafunction.Hit:
+..summary:Blast Hit type of a Blast object.
+..signature:Hsp<T>::Type
+..param.T:A Blast report object.
+...type:Class.BlastReport
+..returns.param.Type:BlastHit type.
+..include:seqan/blast.h
+*/
+template<typename T>
+struct Hit;
+
+/**
+.Metafunction.Hsp:
+..summary:Blast HSP type of a Blast object.
+..signature:Hsp<T>::Type
+..param.T:A Blast object.
+...type:Class.BlastReport
+...type:Class.BlastHit
+..returns.param.Type:BlastHsp type.
+..include:seqan/blast.h
+*/
+template<typename T>
+struct Hsp;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast Tag
+
+struct TagBlast_;
+typedef Tag<TagBlast_> const Blast;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Blat Tag 
+//already defined in seeds/seedHandlingTags.h (49)
+//moved to basic_tag
+/*
+struct Blat_;
+typedef Tag<Blat_> const Blat;
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/**
+.Spec.BlastN:
+..cat:Blast
+..general:Class.BlastHsp
+..summary:For BlastN Blast reports.
+..signature:BlastN
+..include:blast.h
+*/
+
+
+/**
+.Spec.BlastP:
+..cat:Blast
+..general:Class.BlastHsp
+..summary:For BlastP Blast reports.
+..signature:BlastP
+..include:blast.h
+*/
+
+
+
+struct TagBlastN_;
+struct TagMegaBlast_;
+struct TagBlastP_;
+struct TagBlastX_;
+struct TagTBlastN_;
+struct TagTBlastX_;
+
+template<typename TSpec = TagBlastN_>
+class NucleotideBlast{
+public:
+	NucleotideBlast(){}
+	~NucleotideBlast(){}
+};
+
+template<typename TSpec = TagBlastP_>
+class ProteinBlast{
+public:
+	ProteinBlast(){}
+	~ProteinBlast(){}
+};
+
+typedef NucleotideBlast<TagBlastN_> BlastN;
+typedef NucleotideBlast<TagMegaBlast_> MegaBlast;
+
+typedef ProteinBlast<TagBlastP_> BlastP;
+typedef ProteinBlast<TagBlastX_> BlastX;
+typedef ProteinBlast<TagTBlastN_> TBlastN;
+typedef ProteinBlast<TagTBlastX_> TBlastX;
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_generated_forwards.h b/src/SeqAn-1.3/seqan/blast/blast_generated_forwards.h
new file mode 100644
index 0000000..5d3b324
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_generated_forwards.h
@@ -0,0 +1,807 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_BLAST_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_BLAST_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// BasicInfo
+
+struct BasicInfo;       	// "projects/library/seqan/blast/blast_base.h"(48)
+
+//____________________________________________________________________________
+// BlastHit
+
+template <typename TBlastHsp, typename TStoreSpec> class BlastHit;       	// "projects/library/seqan/blast/blast_hit.h"(41)
+
+//____________________________________________________________________________
+// BlastHsp
+
+template <typename TBlastSpec , typename TInfoSpec > class BlastHsp;       	// "projects/library/seqan/blast/blast_hsp.h"(47)
+
+//____________________________________________________________________________
+// BlastReport
+
+template <typename TBlastHsp , typename TStoreSpec > class BlastReport;       	// "projects/library/seqan/blast/blast_report.h"(44)
+
+//____________________________________________________________________________
+// FullInfo
+
+struct FullInfo;       	// "projects/library/seqan/blast/blast_base.h"(45)
+
+//____________________________________________________________________________
+// Hit
+
+template <typename T> struct Hit;       	// "projects/library/seqan/blast/blast_base.h"(108)
+
+//____________________________________________________________________________
+// HitIterator
+
+struct HitIterator;       	// "projects/library/seqan/blast/blast_iterator.h"(52)
+
+//____________________________________________________________________________
+// Hsp
+
+template <typename T> struct Hsp;       	// "projects/library/seqan/blast/blast_base.h"(121)
+
+//____________________________________________________________________________
+// HspIterator
+
+struct HspIterator;       	// "projects/library/seqan/blast/blast_iterator.h"(55)
+
+//____________________________________________________________________________
+// NucleotideBlast
+
+template <typename TSpec > class NucleotideBlast;       	// "projects/library/seqan/blast/blast_base.h"(172)
+
+//____________________________________________________________________________
+// ProteinBlast
+
+template <typename TSpec > class ProteinBlast;       	// "projects/library/seqan/blast/blast_base.h"(179)
+
+//____________________________________________________________________________
+// SimpleBlastIterator
+
+template <typename TSpec> struct SimpleBlastIterator;       	// "projects/library/seqan/blast/blast_iterator.h"(48)
+
+//____________________________________________________________________________
+// StoreReport
+
+template <typename TInfoSpec > struct StoreReport;       	// "projects/library/seqan/blast/blast_base.h"(72)
+
+//____________________________________________________________________________
+// StreamBlastIterator
+
+template <typename TSpec> struct StreamBlastIterator;       	// "projects/library/seqan/blast/blast_iterator.h"(63)
+
+//____________________________________________________________________________
+// StreamReport
+
+template <typename TFile > struct StreamReport;       	// "projects/library/seqan/blast/blast_base.h"(89)
+
+//____________________________________________________________________________
+// TagBlastN_
+
+struct TagBlastN_;       	// "projects/library/seqan/blast/blast_base.h"(164)
+
+//____________________________________________________________________________
+// TagBlastP_
+
+struct TagBlastP_;       	// "projects/library/seqan/blast/blast_base.h"(166)
+
+//____________________________________________________________________________
+// TagBlastX_
+
+struct TagBlastX_;       	// "projects/library/seqan/blast/blast_base.h"(167)
+
+//____________________________________________________________________________
+// TagBlast_
+
+struct TagBlast_;       	// "projects/library/seqan/blast/blast_base.h"(127)
+
+//____________________________________________________________________________
+// TagKnownSource_
+
+struct TagKnownSource_;       	// "projects/library/seqan/blast/blast_hsp.h"(857)
+
+//____________________________________________________________________________
+// TagMegaBlast_
+
+struct TagMegaBlast_;       	// "projects/library/seqan/blast/blast_base.h"(165)
+
+//____________________________________________________________________________
+// TagRunBlastN_
+
+struct TagRunBlastN_;       	// "projects/library/seqan/blast/blast_run.h"(48)
+
+//____________________________________________________________________________
+// TagRunBlastP_
+
+struct TagRunBlastP_;       	// "projects/library/seqan/blast/blast_run.h"(59)
+
+//____________________________________________________________________________
+// TagRunBlastX_
+
+struct TagRunBlastX_;       	// "projects/library/seqan/blast/blast_run.h"(62)
+
+//____________________________________________________________________________
+// TagRunBlat_
+
+struct TagRunBlat_;       	// "projects/library/seqan/blast/blast_run.h"(54)
+
+//____________________________________________________________________________
+// TagRunMegaBlast_
+
+struct TagRunMegaBlast_;       	// "projects/library/seqan/blast/blast_run.h"(51)
+
+//____________________________________________________________________________
+// TagRunTBlastN_
+
+struct TagRunTBlastN_;       	// "projects/library/seqan/blast/blast_run.h"(65)
+
+//____________________________________________________________________________
+// TagRunTBlastX_
+
+struct TagRunTBlastX_;       	// "projects/library/seqan/blast/blast_run.h"(68)
+
+//____________________________________________________________________________
+// TagTBlastN_
+
+struct TagTBlastN_;       	// "projects/library/seqan/blast/blast_base.h"(168)
+
+//____________________________________________________________________________
+// TagTBlastX_
+
+struct TagTBlastX_;       	// "projects/library/seqan/blast/blast_base.h"(169)
+
+//____________________________________________________________________________
+// TagUnknownSource_
+
+struct TagUnknownSource_;       	// "projects/library/seqan/blast/blast_hsp.h"(854)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Blast
+
+typedef Tag<TagBlast_> const Blast;       	// "projects/library/seqan/blast/blast_base.h"(128)
+
+//____________________________________________________________________________
+// BlastN
+
+typedef NucleotideBlast<TagBlastN_> BlastN;       	// "projects/library/seqan/blast/blast_base.h"(185)
+
+//____________________________________________________________________________
+// BlastP
+
+typedef ProteinBlast<TagBlastP_> BlastP;       	// "projects/library/seqan/blast/blast_base.h"(188)
+
+//____________________________________________________________________________
+// BlastX
+
+typedef ProteinBlast<TagBlastX_> BlastX;       	// "projects/library/seqan/blast/blast_base.h"(189)
+
+//____________________________________________________________________________
+// KnownSource
+
+typedef Tag<TagKnownSource_> const KnownSource;       	// "projects/library/seqan/blast/blast_hsp.h"(858)
+
+//____________________________________________________________________________
+// MegaBlast
+
+typedef NucleotideBlast<TagMegaBlast_> MegaBlast;       	// "projects/library/seqan/blast/blast_base.h"(186)
+
+//____________________________________________________________________________
+// RunBlastN
+
+typedef Tag<TagRunBlastN_> const RunBlastN;       	// "projects/library/seqan/blast/blast_run.h"(49)
+
+//____________________________________________________________________________
+// RunBlastP
+
+typedef Tag<TagRunBlastP_> const RunBlastP;       	// "projects/library/seqan/blast/blast_run.h"(60)
+
+//____________________________________________________________________________
+// RunBlastX
+
+typedef Tag<TagRunBlastX_> const RunBlastX;       	// "projects/library/seqan/blast/blast_run.h"(63)
+
+//____________________________________________________________________________
+// RunBlat
+
+typedef Tag<TagRunBlat_> const RunBlat;       	// "projects/library/seqan/blast/blast_run.h"(55)
+
+//____________________________________________________________________________
+// RunMegaBlast
+
+typedef Tag<TagRunMegaBlast_> const RunMegaBlast;       	// "projects/library/seqan/blast/blast_run.h"(52)
+
+//____________________________________________________________________________
+// RunTBlastN
+
+typedef Tag<TagRunTBlastN_> const RunTBlastN;       	// "projects/library/seqan/blast/blast_run.h"(66)
+
+//____________________________________________________________________________
+// RunTBlastX
+
+typedef Tag<TagRunTBlastX_> const RunTBlastX;       	// "projects/library/seqan/blast/blast_run.h"(69)
+
+//____________________________________________________________________________
+// TBlastN
+
+typedef ProteinBlast<TagTBlastN_> TBlastN;       	// "projects/library/seqan/blast/blast_base.h"(190)
+
+//____________________________________________________________________________
+// TBlastX
+
+typedef ProteinBlast<TagTBlastX_> TBlastX;       	// "projects/library/seqan/blast/blast_base.h"(191)
+
+//____________________________________________________________________________
+// UnknownSource
+
+typedef Tag<TagUnknownSource_> const UnknownSource;       	// "projects/library/seqan/blast/blast_hsp.h"(855)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _getNextHitFilePos
+
+template <typename TBlastHsp, typename TFile> inline void _getNextHitFilePos(TFile & file, Iter<BlastReport<TBlastHsp, StreamReport<TFile> >, StreamBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(424)
+
+//____________________________________________________________________________
+// _getNextHspFilePos
+
+template <typename TBlastHsp, typename TFile> inline void _getNextHspFilePos(TFile & file, Iter<BlastHit<TBlastHsp, StreamReport<TFile> >, StreamBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(395)
+
+//____________________________________________________________________________
+// _parseBlastHit
+
+template <typename TFile, typename TChar, typename TBlastHit> inline typename Position<TFile>::Type _parseBlastHit(TFile & file, TChar & c, TBlastHit & hit);       	// "projects/library/seqan/blast/blast_hit.h"(165)
+template <typename TFile, typename TChar, typename TBlastSpec> inline typename Position<TFile>::Type _parseBlastHit(TFile & file, TChar & c, BlastHit<TBlastSpec,StreamReport<TFile> > & hit);       	// "projects/library/seqan/blast/blast_stream_hit.h"(78)
+
+//____________________________________________________________________________
+// _parseBlastHsp
+
+template <typename TFile, typename TChar, typename TSpec> inline typename Position<TFile>::Type _parseBlastHsp(TFile & file, TChar & c, BlastHsp<NucleotideBlast<TSpec>,FullInfo > & hsp);       	// "projects/library/seqan/blast/blast_hsp.h"(184)
+template <typename TFile, typename TChar, typename TSpec> inline typename Position<TFile>::Type _parseBlastHsp(TFile & file, TChar & c, BlastHsp<ProteinBlast<TSpec>,FullInfo> & hsp);       	// "projects/library/seqan/blast/blast_hsp.h"(475)
+template <typename TFile, typename TChar, typename TBlastSpec, typename TInfoSpec> inline typename Position<TFile>::Type _parseBlastHsp(TFile & file, TChar & c, BlastHsp<TBlastSpec,TInfoSpec> & hsp);       	// "projects/library/seqan/blast/blast_hsp.h"(756)
+
+//____________________________________________________________________________
+// _parseReadAlignmentString
+
+template <typename TFile, typename TChar> inline String<char> _parseReadAlignmentString(TFile & file, TChar& c);       	// "projects/library/seqan/blast/blast_parsing.h"(53)
+
+//____________________________________________________________________________
+// _parseReadQueryAndDBName
+
+template <typename TFile, typename TChar> typename Position<TFile>::Type _parseReadQueryAndDBName(TFile & file, TChar & c, String<char> & query_name, String<char> & db_name);       	// "projects/library/seqan/blast/blast_parsing.h"(77)
+
+//____________________________________________________________________________
+// _readParameters
+
+template <typename TFile, typename TChar, typename TBlastHsp> void _readParameters(TFile & file, TChar & c, BlastReport<TBlastHsp, StoreReport<FullInfo> >& blastObj);       	// "projects/library/seqan/blast/blast_report.h"(399)
+template <typename TFile, typename TChar, typename TBlastHsp> void _readParameters(TFile & , TChar & , BlastReport<TBlastHsp, StoreReport<BasicInfo> >& );       	// "projects/library/seqan/blast/blast_report.h"(491)
+
+//____________________________________________________________________________
+// _runBlast
+
+template <typename TString, typename TPath1, typename TPath, typename TParamString> void _runBlast(TPath1 blast_path, TPath db_path, TString db_name, TPath query_path, TString query_name, TPath out_path, TString outfile_name, Tag<TagRunBlastN_>, TParamString params);       	// "projects/library/seqan/blast/blast_run.h"(94)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename TBlastHsp, typename TStoreSpec> inline bool atBegin(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(195)
+template <typename TBlastReport, typename TFile> inline bool atBegin(TFile &, Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(212)
+template <typename TBlastHit, typename TFile> inline bool atBegin(TFile &, Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(222)
+template <typename TBlastObject, typename TIteratorSpec> inline bool atBegin(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(214)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TBlastHsp, typename TStoreSpec> inline bool atEnd(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(216)
+template <typename TBlastReport, typename TFile> inline bool atEnd(TFile &, Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(402)
+template <typename TBlastHsp, typename TSpec, typename TFile> inline bool atEnd(TFile & file, BlastReport<TBlastHsp,TSpec> & blast);       	// "projects/library/seqan/blast/blast_report.h"(1134)
+template <typename TBlastHit, typename TFile> inline bool atEnd(TFile &, Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(373)
+template <typename TBlastReport> inline bool atEnd(Iter<TBlastReport, SimpleBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(410)
+
+//____________________________________________________________________________
+// bitScore
+
+template <typename TBlastSpec> inline float & bitScore(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1499)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TSpec> inline void clear(BlastHsp<NucleotideBlast<TSpec>, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(349)
+template <typename TSpec> inline void clear(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(648)
+template <typename TBlastSpec> inline void clear(BlastHsp<TBlastSpec, BasicInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(736)
+template <typename TBlastHsp, typename TSpec> inline void clear(BlastHit<TBlastHsp, StoreReport<TSpec> >& blastHit);       	// "projects/library/seqan/blast/blast_hit.h"(105)
+template <typename TBlastHsp> inline void clear(BlastReport<TBlastHsp, StoreReport<FullInfo> >& blastObj);       	// "projects/library/seqan/blast/blast_report.h"(207)
+template <typename TBlastHsp> inline void clear(BlastReport<TBlastHsp, StoreReport<BasicInfo> >& blastObj);       	// "projects/library/seqan/blast/blast_report.h"(379)
+
+//____________________________________________________________________________
+// databaseAlignmentString
+
+template <typename TBlastSpec, typename TInfoSpec> inline String<char> & databaseAlignmentString(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1425)
+
+//____________________________________________________________________________
+// databaseBegin
+
+template <typename TBlastSpec, typename TInfoSpec> inline unsigned int & databaseBegin(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1320)
+
+//____________________________________________________________________________
+// databaseEnd
+
+template <typename TBlastSpec, typename TInfoSpec> inline unsigned int & databaseEnd(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1389)
+
+//____________________________________________________________________________
+// databaseFrame
+
+template <typename TSpec> inline int & databaseFrame(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1651)
+
+//____________________________________________________________________________
+// databaseName
+
+template <typename TBlastHsp, typename TSpec> inline String<char> & databaseName(BlastReport<TBlastHsp,TSpec> & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(776)
+
+//____________________________________________________________________________
+// databaseOrientationPlus
+
+template <typename TBlastSpec> inline bool databaseOrientationPlus(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1623)
+
+//____________________________________________________________________________
+// eValue
+
+template <typename TBlastSpec, typename TInfoSpec> inline double & eValue(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1442)
+
+//____________________________________________________________________________
+// eValueCutoff
+
+template <typename TBlastHsp> inline double & eValueCutoff(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(863)
+
+//____________________________________________________________________________
+// entropy
+
+template <typename TBlastHsp> inline float & entropy(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1086)
+
+//____________________________________________________________________________
+// gapExtension
+
+template <typename TBlastHsp> inline float & gapExtension(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(934)
+
+//____________________________________________________________________________
+// gapOpen
+
+template <typename TBlastHsp> inline float & gapOpen(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(907)
+
+//____________________________________________________________________________
+// gappedEntropy
+
+template <typename TBlastHsp> inline float & gappedEntropy(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1103)
+
+//____________________________________________________________________________
+// gappedKappa
+
+template <typename TBlastHsp> inline float & gappedKappa(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1058)
+
+//____________________________________________________________________________
+// gappedLambda
+
+template <typename TBlastHsp> inline float & gappedLambda(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1000)
+
+//____________________________________________________________________________
+// gapsAllowed
+
+template <typename TBlastHsp> inline bool gapsAllowed(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(963)
+
+//____________________________________________________________________________
+// getAlignment
+
+template <typename TBlastHsp, typename TSpec, typename TSource> inline unsigned int getAlignment(TBlastHsp & hsp, Align<TSource,TSpec> & ali, UnknownSource);       	// "projects/library/seqan/blast/blast_hsp.h"(867)
+template <typename TBlastHsp, typename TSpec, typename TSource> inline unsigned int getAlignment(TBlastHsp & hsp, Align<TSource,TSpec> & ali);       	// "projects/library/seqan/blast/blast_hsp.h"(977)
+template <typename TBlastHsp, typename TSpec, typename TSource> inline unsigned int getAlignment(TBlastHsp & hsp, Align<TSource,TSpec> & ali, KnownSource);       	// "projects/library/seqan/blast/blast_hsp.h"(997)
+template <typename TBlastHsp, typename TAlign, typename TId> inline unsigned int getAlignment(TBlastHsp & hsp, Graph<TAlign> & ali, TId id0, TId id1);       	// "projects/library/seqan/blast/blast_hsp.h"(1070)
+template <typename TBlastHsp, typename TStringSet, typename TCargo, typename TSpec> inline unsigned int getAlignment(TBlastHsp & hsp, Graph<Alignment<TStringSet,TCargo,TSpec> > & ali);       	// "projects/library/seqan/blast/blast_hsp.h"(1158)
+
+//____________________________________________________________________________
+// getBitScore
+
+template <typename TBlastSpec> inline float getBitScore(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1519)
+
+//____________________________________________________________________________
+// getBlastMatchScore
+
+template <typename TBlastSpec> inline float getBlastMatchScore(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1491)
+
+//____________________________________________________________________________
+// getDatabaseAlignmentString
+
+template <typename TBlastSpec, typename TInfoSpec> inline String<char> getDatabaseAlignmentString(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1433)
+
+//____________________________________________________________________________
+// getDatabaseBegin
+
+template <typename TBlastSpec, typename TInfoSpec> inline unsigned int getDatabaseBegin(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1339)
+
+//____________________________________________________________________________
+// getDatabaseEnd
+
+template <typename TBlastSpec, typename TInfoSpec> inline unsigned int getDatabaseEnd(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1397)
+
+//____________________________________________________________________________
+// getDatabaseFrame
+
+template <typename TSpec> inline int getDatabaseFrame(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1659)
+
+//____________________________________________________________________________
+// getDatabaseName
+
+template <typename TBlastHsp, typename TSpec> inline String<char> getDatabaseName(BlastReport<TBlastHsp,TSpec> & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(797)
+
+//____________________________________________________________________________
+// getEValue
+
+template <typename TBlastSpec, typename TInfoSpec> inline double getEValue(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1461)
+
+//____________________________________________________________________________
+// getEValueCutoff
+
+template <typename TBlastHsp> inline double getEValueCutoff(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(883)
+
+//____________________________________________________________________________
+// getEntropy
+
+template <typename TBlastHsp> inline float getEntropy(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1094)
+
+//____________________________________________________________________________
+// getGapExtension
+
+template <typename TBlastHsp> inline float getGapExtension(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(954)
+
+//____________________________________________________________________________
+// getGapOpen
+
+template <typename TBlastHsp> inline float getGapOpen(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(926)
+
+//____________________________________________________________________________
+// getGappedEntropy
+
+template <typename TBlastHsp> inline float getGappedEntropy(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1111)
+
+//____________________________________________________________________________
+// getGappedKappa
+
+template <typename TBlastHsp> inline float getGappedKappa(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1077)
+
+//____________________________________________________________________________
+// getGappedLambda
+
+template <typename TBlastHsp> inline float getGappedLambda(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1019)
+
+//____________________________________________________________________________
+// getKappa
+
+template <typename TBlastHsp> inline float getKappa(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1049)
+
+//____________________________________________________________________________
+// getLambda
+
+template <typename TBlastHsp> inline float getLambda(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(991)
+
+//____________________________________________________________________________
+// getLength
+
+template <typename TBlastHsp, typename TStoreSpec> inline unsigned int getLength(BlastHit<TBlastHsp, TStoreSpec>& blastHit);       	// "projects/library/seqan/blast/blast_hit.h"(142)
+
+//____________________________________________________________________________
+// getMatrixName
+
+template <typename TBlastHsp> inline String<char> getMatrixName(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(899)
+
+//____________________________________________________________________________
+// getName
+
+template <typename TBlastHsp, typename TStoreSpec> inline String<char> getName(BlastHit<TBlastHsp, TStoreSpec>& blastHit);       	// "projects/library/seqan/blast/blast_hit.h"(126)
+
+//____________________________________________________________________________
+// getNext
+
+template <typename TBlastHsp, typename TSpec, typename TFile> inline void getNext(TFile & file, BlastReport<TBlastHsp,TSpec> & blast);       	// "projects/library/seqan/blast/blast_report.h"(1157)
+
+//____________________________________________________________________________
+// getNumGaps
+
+template <typename TBlastSpec> inline unsigned int getNumGaps(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1583)
+
+//____________________________________________________________________________
+// getPercentGaps
+
+template <typename TBlastSpec> inline unsigned int getPercentGaps(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1554)
+
+//____________________________________________________________________________
+// getPercentIdentity
+
+template <typename TBlastSpec> inline unsigned int getPercentIdentity(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1538)
+
+//____________________________________________________________________________
+// getPercentPositives
+
+template <typename TSpec> inline unsigned int getPercentPositives(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1675)
+
+//____________________________________________________________________________
+// getQueryAlignmentString
+
+template <typename TBlastSpec, typename TInfoSpec> inline String<char> getQueryAlignmentString(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1415)
+
+//____________________________________________________________________________
+// getQueryBegin
+
+template <typename TBlastSpec, typename TInfoSpec> inline unsigned int getQueryBegin(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1310)
+
+//____________________________________________________________________________
+// getQueryEnd
+
+template <typename TBlastSpec, typename TInfoSpec> inline unsigned int getQueryEnd(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1368)
+
+//____________________________________________________________________________
+// getQueryFrame
+
+template <typename TSpec> inline int getQueryFrame(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1642)
+
+//____________________________________________________________________________
+// getQueryName
+
+template <typename TBlastHsp, typename TSpec> inline String<char> getQueryName(BlastReport<TBlastHsp,TSpec> & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(755)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TBlastHsp, typename TStoreSpec> inline typename GetValue<Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> > >::Type getValue(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(146)
+template <typename TBlastReport, typename TFile> inline typename GetValue<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >::Type getValue(TFile & file, Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(337)
+template <typename TBlastHit, typename TFile> inline typename GetValue<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >::Type getValue(TFile & file, Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(303)
+template <typename TBlastReport> inline typename GetValue<Iter<TBlastReport, SimpleBlastIterator<HitIterator> > >::Type getValue(Iter<TBlastReport, SimpleBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(353)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename TBlastHsp, typename TStoreSpec> inline void goBegin(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(205)
+template <typename TBlastReport, typename TFile> inline void goBegin(TFile &, Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(235)
+template <typename TBlastHit, typename TFile> inline void goBegin(TFile &, Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(235)
+template <typename TBlastObject, typename TIteratorSpec> inline void goBegin(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(234)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename TBlastHsp, typename TStoreSpec> inline void goEnd(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(226)
+template <typename TBlastReport> inline void goEnd(Iter<TBlastReport, SimpleBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(428)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TBlastHsp, typename TStoreSpec> inline void goNext(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(236)
+template <typename TBlastReport, typename TFile> inline void goNext(TFile & file, Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(263)
+template <typename TBlastHit, typename TFile> inline void goNext(TFile & file, Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(250)
+template <typename TBlastObject, typename TIteratorSpec> inline void goNext(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(254)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename TBlastHsp, typename TStoreSpec> inline void goPrevious(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(259)
+template <typename TBlastObject, typename TIteratorSpec> inline void goPrevious(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(286)
+
+//____________________________________________________________________________
+// hostHit
+
+template <typename TBlastHit> inline typename Host<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >::Type const& hostHit(Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(361)
+
+//____________________________________________________________________________
+// hostReport
+
+template <typename TBlastReport> inline typename Host<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >::Type & hostReport(Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(379)
+template <typename TBlastReport> inline typename Host<Iter<TBlastReport, SimpleBlastIterator<HitIterator> > >::Type & hostReport(Iter<TBlastReport, SimpleBlastIterator<HitIterator> > & it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(391)
+
+//____________________________________________________________________________
+// kappa
+
+template <typename TBlastHsp> inline float & kappa(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(1029)
+
+//____________________________________________________________________________
+// lambda
+
+template <typename TBlastHsp> inline float & lambda(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(972)
+
+//____________________________________________________________________________
+// length
+
+template <typename TBlast, typename TSpec> inline unsigned int length(BlastHsp<TBlast,TSpec >& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1690)
+template <typename TBlastHsp, typename TStoreSpec> inline unsigned int & length(BlastHit<TBlastHsp, TStoreSpec>& blastHit);       	// "projects/library/seqan/blast/blast_hit.h"(134)
+
+//____________________________________________________________________________
+// matrixName
+
+template <typename TBlastHsp> inline String<char> & matrixName(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(891)
+
+//____________________________________________________________________________
+// name
+
+template <typename TBlastHsp, typename TStoreSpec> inline String<char> & name(BlastHit<TBlastHsp, TStoreSpec>& blastHit);       	// "projects/library/seqan/blast/blast_hit.h"(118)
+
+//____________________________________________________________________________
+// numGaps
+
+template <typename TBlastSpec> inline unsigned int & numGaps(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1562)
+
+//____________________________________________________________________________
+// numHits
+
+template <typename TBlastHsp, typename TInfoSpec> inline unsigned int numHits(BlastReport<TBlastHsp,StoreReport<TInfoSpec> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(818)
+
+//____________________________________________________________________________
+// numHsps
+
+template <typename TBlastHsp, typename TSpec> inline unsigned int numHsps(BlastHit<TBlastHsp, StoreReport<TSpec> >& blastHit);       	// "projects/library/seqan/blast/blast_hit.h"(151)
+template <typename TBlastHsp, typename TInfoSpec> inline unsigned int numHsps(BlastReport<TBlastHsp,StoreReport<TInfoSpec> > & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(838)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TBlastHsp, typename TStoreSpec> inline bool operator!=(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it1, Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it2);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(303)
+template <typename TBlastReport> inline bool operator!=(Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it1, Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it2);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(315)
+template <typename TBlastHit> inline bool operator!=(Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it1, Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it2);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(291)
+template <typename TBlastObject, typename TIteratorSpec> inline bool operator!=(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it1, Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it2);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(330)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TBlastHsp, typename TStoreSpec> inline typename Reference<Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> > >::Type operator* (Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(167)
+template <typename TBlastObject, typename TIteratorSpec> inline typename Reference<Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> > >::Type operator* (Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(195)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename TBlastHsp, typename TStoreSpec> inline Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& operator++(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(246)
+template <typename TBlastObject, typename TIteratorSpec> inline Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& operator++(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(264)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename TBlastHsp, typename TStoreSpec> inline Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& operator--(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(269)
+template <typename TBlastObject, typename TIteratorSpec> inline Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& operator--(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(296)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TBlastHsp, typename TStoreSpec> inline bool operator==(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it1, Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it2);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(292)
+template <typename TBlastReport> inline bool operator==(Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it1, Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it2);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(304)
+template <typename TBlastHit> inline bool operator==(Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it1, Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it2);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(280)
+template <typename TBlastObject, typename TIteratorSpec> inline bool operator==(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it1, Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it2);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(319)
+
+//____________________________________________________________________________
+// percentGaps
+
+template <typename TBlastSpec> inline unsigned int & percentGaps(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1546)
+
+//____________________________________________________________________________
+// percentIdentity
+
+template <typename TBlastSpec> inline unsigned int & percentIdentity(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1528)
+
+//____________________________________________________________________________
+// percentPositives
+
+template <typename TSpec> inline unsigned int & percentPositives(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1667)
+
+//____________________________________________________________________________
+// queryAlignmentString
+
+template <typename TBlastSpec, typename TInfoSpec> inline String<char> & queryAlignmentString(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1406)
+
+//____________________________________________________________________________
+// queryBegin
+
+template <typename TBlastSpec, typename TInfoSpec> inline unsigned int & queryBegin(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1288)
+
+//____________________________________________________________________________
+// queryEnd
+
+template <typename TBlastSpec, typename TInfoSpec> inline unsigned int & queryEnd(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1349)
+
+//____________________________________________________________________________
+// queryFrame
+
+template <typename TSpec> inline int & queryFrame(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1634)
+
+//____________________________________________________________________________
+// queryName
+
+template <typename TBlastHsp, typename TSpec> inline String<char> & queryName(BlastReport<TBlastHsp,TSpec> & blastObj);       	// "projects/library/seqan/blast/blast_report.h"(734)
+
+//____________________________________________________________________________
+// queryOrientationPlus
+
+template <typename TBlastSpec> inline bool queryOrientationPlus(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1604)
+
+//____________________________________________________________________________
+// read
+
+template <typename TBlastHsp, typename TFile> void read(TFile & file, BlastReport<TBlastHsp, StreamReport<TFile> >& blastObj, Tag<TagBlast_>);       	// "projects/library/seqan/blast/blast_stream_report.h"(104)
+template <typename TFile, typename TBlastHsp, typename TInfoSpec> void read(TFile & file, BlastReport<TBlastHsp, StoreReport<TInfoSpec> >& blastObj, Tag<TagBlast_>);       	// "projects/library/seqan/blast/blast_report.h"(508)
+
+//____________________________________________________________________________
+// run
+
+template <typename TBlast, typename TBlastReport, typename TString, typename TParamString> void run(Tag<TBlast> tag, TString blast_path, TString db_path, TString db_name, TString query_path, TString query_name, TBlastReport & blastObj, TParamString params);       	// "projects/library/seqan/blast/blast_run.h"(124)
+
+//____________________________________________________________________________
+// score
+
+template <typename TBlastSpec> inline float & score(BlastHsp<TBlastSpec, FullInfo>& blastHsp);       	// "projects/library/seqan/blast/blast_hsp.h"(1472)
+
+//____________________________________________________________________________
+// value
+
+template <typename TBlastHsp, typename TStoreSpec> inline typename Reference<Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> > >::Type value(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_hsp_iterator.h"(157)
+template <typename TBlastReport, typename TFile> inline typename Reference<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >::Type value(TFile & file, Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hit_iterator.h"(366)
+template <typename TBlastHit, typename TFile> inline typename Reference<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >::Type value(TFile & file, Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it);       	// "projects/library/seqan/blast/blast_stream_hsp_iterator.h"(326)
+template <typename TBlastReport> inline typename Reference<Iter<TBlastReport, SimpleBlastIterator<HitIterator> > >::Type value(Iter<TBlastReport, SimpleBlastIterator<HitIterator> >& it);       	// "projects/library/seqan/blast/blast_hit_iterator.h"(371)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/blast/blast_hit.h b/src/SeqAn-1.3/seqan/blast/blast_hit.h
new file mode 100644
index 0000000..817c184
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_hit.h
@@ -0,0 +1,306 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_HIT_H
+#define SEQAN_HEADER_BLAST_HIT_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template<typename TBlastHsp, typename TStoreSpec>
+class BlastHit;
+
+
+/**
+.Class.BlastHit:
+..cat:Blast
+..summary:Object for storing Blast hits. 
+..signature:BlastHit<TBlastHsp, TSpec>  
+..param.TBlastHsp:The type of HSPs that are stored.
+..param.TSpec:The specializing type.
+...type:Spec.StreamReport
+...type:Spec.StoreReport
+..remarks:Use Metafunction.Hit to get the BlastHit type used in a BlastReport object.
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TSpec>
+class BlastHit<TBlastHsp, StoreReport<TSpec> > 
+{
+	public:
+		String<char> name;
+		unsigned int length; //length of whole sequence 
+
+		String<TBlastHsp> hsps;
+		
+		BlastHit()
+		{
+		SEQAN_CHECKPOINT
+		}
+
+		//BlastHit(String<char> name, unsigned int len)
+		//{
+		//	name = name;
+		//	length = length;
+		//	clear(hsps);
+		//}
+
+		BlastHit(BlastHit const& other)
+		{
+		SEQAN_CHECKPOINT
+			assign(hsps,other.hsps);
+			name = other.name;
+			length = other.length;
+		}
+
+		BlastHit & operator = (BlastHit const & other)
+		{
+		SEQAN_CHECKPOINT
+			assign(hsps,other.hsps);
+			name = other.name;
+			length = other.length;
+			return *this;
+		}
+
+		~BlastHit()
+		{
+		}
+
+};
+
+
+
+template<typename TBlastHsp, typename TSpec>
+inline void
+clear(BlastHit<TBlastHsp, StoreReport<TSpec> >& blastHit)
+{
+SEQAN_CHECKPOINT
+	
+	for(unsigned int i = 0; i < length(blastHit.hsps); ++i)
+		clear(blastHit.hsps[i]);
+	resize(blastHit.hsps,0);
+	resize(blastHit.name,0);
+}
+
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline String<char> &
+name(BlastHit<TBlastHsp, TStoreSpec>& blastHit)
+{
+SEQAN_CHECKPOINT
+	return blastHit.name;
+}
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline String<char> 
+getName(BlastHit<TBlastHsp, TStoreSpec>& blastHit)
+{
+SEQAN_CHECKPOINT
+	return blastHit.name;
+}
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline unsigned int &
+length(BlastHit<TBlastHsp, TStoreSpec>& blastHit)
+{
+SEQAN_CHECKPOINT
+	return blastHit.length;
+}
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline unsigned int 
+getLength(BlastHit<TBlastHsp, TStoreSpec>& blastHit)
+{
+SEQAN_CHECKPOINT
+	return blastHit.length;
+}
+
+// for StoreReport only
+template<typename TBlastHsp, typename TSpec>
+inline unsigned int 
+numHsps(BlastHit<TBlastHsp, StoreReport<TSpec> >& blastHit)
+{
+SEQAN_CHECKPOINT
+	return length(blastHit.hsps);
+}		
+
+
+/////////////////////////////////////////////////////////////////////
+
+//parse BlastHit
+template<typename TFile, typename TChar, typename TBlastHit>
+inline typename Position<TFile>::Type
+_parseBlastHit(TFile & file,
+			TChar & c, 
+			TBlastHit & hit)
+{
+	typedef typename Position<TFile>::Type TPosition;
+	typedef typename Hsp<TBlastHit>::Type TBlastHsp;
+
+	String<char> pword;
+	int pint;
+	TPosition start_pos,act_pos;
+	act_pos = _streamTellG(file);
+
+	if(_parseUntilBeginLine(file,c,'>'))
+	{
+		start_pos = _streamTellG(file);
+		c = _streamGet(file);
+		pword = _parseReadWord(file, c);
+		while (!_streamEOF(file) && c != '\n' && c != '\r')
+			pword += _parseReadWord(file, c);
+		if(pword[length(pword)-1] == ' ')
+			resize(pword,length(pword)-1);
+		hit.name = pword;
+		_parseSkipWhitespace(file,c);
+		String<char> search = "Length";
+		if(_parseUntilBeginLine(file,c,search,6))
+		{
+			_parseSkipWhitespace(file,c);
+			if(c == '=')
+				c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pint = _parseReadNumber(file, c);
+			hit.length = pint;
+		}
+//		TPosition temp = _streamTellG(file);
+		//foreach Hsp
+		//if(_parseUntilBeginLine(file,c,'S') && _parseReadWord(file,c)=="Score")
+		search = "Score";
+		if(_parseUntilBeginLine(file,c,search,5))
+		{
+			//c = _streamGet(file);
+			bool in_hit = true;
+			TPosition act_hsp_pos,next_hsp_pos;
+			while(in_hit){
+				act_hsp_pos = _streamTellG(file);
+				TBlastHsp hsp;
+				next_hsp_pos = _parseBlastHsp(file,c,hsp);
+				//resize(hit.hsps, length(hit.hsps)+1);
+				//hit.hsps[length(hit.hsps)-1] = hsp;
+				appendValue(hit.hsps,hsp);
+				//append(hit.hsps,hsp);
+				if(next_hsp_pos == act_hsp_pos)
+					in_hit = false;
+				if(next_hsp_pos == (TPosition)0)
+					return (TPosition) 0;
+			}
+			_streamSeekG(file,next_hsp_pos);
+			c = _streamGet(file);
+			if(_parseUntilBeginLine(file,c,'>'))
+				return _streamTellG(file);
+		}
+
+		
+	}//end hit
+	_streamSeekG(file,act_pos);
+	return act_pos;
+}
+
+
+
+
+
+
+////////////////////////// MetaFunctions ////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+struct Value<BlastHit<TBlastHsp, TStoreSpec> > 
+{
+	typedef BlastHit<TBlastHsp,TStoreSpec> Type;
+};
+
+template<typename TBlastHsp, typename TStoreSpec>
+struct Value<BlastHit<TBlastHsp, TStoreSpec> const> 
+{
+	typedef BlastHit<TBlastHsp,TStoreSpec> Type;
+};
+
+template<typename TBlastHsp, typename TStoreSpec>
+struct Hit<BlastHit<TBlastHsp, TStoreSpec> > 
+{
+	typedef BlastHit<TBlastHsp,TStoreSpec> Type;
+};
+
+template<typename TBlastHsp, typename TStoreSpec>
+struct Hit<BlastHit<TBlastHsp, TStoreSpec> const> 
+{
+	typedef BlastHit<TBlastHsp,TStoreSpec> Type;
+};
+
+
+
+template<typename TBlastHsp, typename TStoreSpec>
+struct Hsp<BlastHit<TBlastHsp, TStoreSpec> > 
+{
+	typedef TBlastHsp Type;
+};
+
+template<typename TBlastHsp, typename TStoreSpec>
+struct Hsp<BlastHit<TBlastHsp, TStoreSpec> const> 
+{
+	typedef TBlastHsp Type;
+};
+
+
+/////////////komisch///////////
+
+	template<typename TBlastHsp, typename TStoreSpec>
+	struct Hsp<String<BlastHit<TBlastHsp, TStoreSpec> > > 
+	{
+		typedef TBlastHsp Type;
+	};
+
+	template<typename TBlastHsp, typename TStoreSpec>
+	struct Hsp<String<BlastHit<TBlastHsp, TStoreSpec> const> > 
+	{
+		typedef TBlastHsp Type;
+	};
+
+	template<typename TBlastSpec, typename TStoreSpec>
+	struct Hsp<String<BlastHsp<TBlastSpec, TStoreSpec> > > 
+	{
+		typedef BlastHsp<TBlastSpec, TStoreSpec> Type;
+	};
+
+	template<typename TBlastSpec, typename TStoreSpec>
+	struct Hsp<String<BlastHsp<TBlastSpec, TStoreSpec> const> > 
+	{
+		typedef BlastHsp<TBlastSpec, TStoreSpec> Type;
+	};
+
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_hit_iterator.h b/src/SeqAn-1.3/seqan/blast/blast_hit_iterator.h
new file mode 100644
index 0000000..7c184cd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_hit_iterator.h
@@ -0,0 +1,441 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_HIT_ITERATOR_H
+#define SEQAN_HEADER_BLAST_HIT_ITERATOR_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast Hit Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+/**
+.Spec.HitIterator:
+..cat:Blast
+..summary:Hit iterator for @Class.BlastReport at .
+..signature:Iterator<TBlastReport, HitIterator>
+..param.TBlastReport:A Blast report.
+...type:Class.BlastReport
+..general:Class.Iter
+..include:seqan/blast.h
+*/
+template<typename TBlastReport>
+class Iter<TBlastReport, SimpleBlastIterator<HitIterator> > 
+{
+public:
+
+	TBlastReport * data_host;
+	unsigned int data_pos;
+
+	Iter()	
+	{
+	}
+	
+	Iter(TBlastReport & blast) : 
+		data_host(&blast), 
+		data_pos(0) 
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	Iter(Iter const& it) : 
+		data_host(it.data_host), 
+		data_pos(it.data_pos) 
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	~Iter() 
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & other) 
+	{
+	SEQAN_CHECKPOINT
+		if (this == &other) return *this;
+		data_host = other.data_host;
+		data_pos = other.data_pos;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// SimpleBlastIterator<TSpec> - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Host.param.T.type:Spec.HitIterator
+///.Metafunction.Host.param.T.type:Spec.HspIterator
+template<typename TBlastObject, typename TIteratorSpec>
+struct Host<Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> > >
+{	
+	typedef TBlastObject Type;
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastObject, typename TIteratorSpec>
+struct Reference<Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> > >
+{
+	typedef typename Value<Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> > >::Type& Type;
+};
+
+template<typename TBlastObject, typename TIteratorSpec>
+struct Reference<Iter<TBlastObject const, SimpleBlastIterator<TIteratorSpec> > >
+{
+	typedef typename Value<Iter<TBlastObject const, SimpleBlastIterator<TIteratorSpec> > >::Type& Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastObject, typename TIteratorSpec>
+struct GetValue<Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> > >
+{
+	typedef typename Value<Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> > >::Type Type;
+};
+
+template<typename TBlastObject, typename TIteratorSpec>
+struct GetValue<Iter<TBlastObject const, SimpleBlastIterator<TIteratorSpec> > >
+{
+	typedef typename Value<Iter<TBlastObject const, SimpleBlastIterator<TIteratorSpec> > >::Type Type;
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// SimpleBlastIterator<HitIterator> - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Iterator.param.T.type:Class.BlastReport
+
+template<typename TBlastHsp, typename TInfoSpec>
+struct Iterator<BlastReport<TBlastHsp,StoreReport<TInfoSpec> >, HitIterator>
+{	
+	typedef Iter<BlastReport<TBlastHsp,StoreReport<TInfoSpec> >, SimpleBlastIterator<HitIterator> > Type;
+};
+
+template<typename TBlastHsp, typename TInfoSpec>
+struct Iterator<BlastReport<TBlastHsp,StoreReport<TInfoSpec> > const, HitIterator>
+{	
+	typedef Iter<BlastReport<TBlastHsp,StoreReport<TInfoSpec> > const, SimpleBlastIterator<HitIterator> > Type;
+};
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TSpec>
+struct Value<Iter<BlastReport<TBlastHsp,TSpec>, SimpleBlastIterator<HitIterator> > >
+{
+	typedef typename Hit<BlastReport<TBlastHsp,TSpec> >::Type Type;
+};
+
+template<typename TBlastHsp, typename TSpec>
+struct Value<Iter<BlastReport<TBlastHsp,TSpec> const, SimpleBlastIterator<HitIterator> > >
+{
+	typedef typename Hit<BlastReport<TBlastHsp,TSpec> const>::Type Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast SimpleBlastIterator<TSpec> - FUNCTIONS
+// TSpecs: HspIterator and HitIterator
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastObject, typename TIteratorSpec>
+inline typename Reference<Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> > >::Type
+operator * (Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it)
+{
+	SEQAN_CHECKPOINT
+	return value(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.atBegin:
+..cat:Blast
+..param.iterator:
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastObject, typename TIteratorSpec>
+inline bool
+atBegin(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it)
+{
+SEQAN_CHECKPOINT
+	return (it.data_pos == 0);	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/**
+.Function.goBegin:
+..cat:Blast
+..param.iterator:
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastObject, typename TIteratorSpec>
+inline void
+goBegin(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_pos = 0;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.goNext:
+..cat:Blast
+..param.iterator
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastObject, typename TIteratorSpec>
+inline void
+goNext(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(it)) ++it.data_pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastObject, typename TIteratorSpec>
+inline Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >&
+operator ++(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it)
+{
+SEQAN_CHECKPOINT
+	goNext(it);
+	return it;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.goPrevious:
+..cat:Blast
+..param.iterator:
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+
+template<typename TBlastObject, typename TIteratorSpec>
+inline void
+goPrevious(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atBegin(it)) --it.data_pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastObject, typename TIteratorSpec>
+inline Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >&
+operator --(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it)
+{
+SEQAN_CHECKPOINT
+	goPrevious(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//template<typename TBlastObject, typename TIteratorSpec>
+//inline Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >
+//operator --(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it, int)
+//{
+//	Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> > ret = it;
+//	goPrevious(it);
+//	return ret;
+//}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastObject, typename TIteratorSpec>
+inline bool
+operator ==(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it1,
+			Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_pos==it2.data_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastObject, typename TIteratorSpec>
+inline bool
+operator !=(Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it1,
+			Iter<TBlastObject, SimpleBlastIterator<TIteratorSpec> >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_pos!=it2.data_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast SimpleBlastIterator<HitIterator> - FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getValue:
+..cat:Blast
+..param.object:
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastReport>
+inline typename GetValue<Iter<TBlastReport, SimpleBlastIterator<HitIterator> > >::Type
+getValue(Iter<TBlastReport, SimpleBlastIterator<HitIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	return it.data_host->hits[it.data_pos];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.value:
+..cat:Blast
+..param.object:
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastReport>
+inline typename Reference<Iter<TBlastReport, SimpleBlastIterator<HitIterator> > >::Type 
+value(Iter<TBlastReport, SimpleBlastIterator<HitIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	return it.data_host->hits[it.data_pos];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.hostReport:
+..cat:Blast
+..summary:The BlastReport this iterator is working on.
+..signature:hostReport(it)
+..param.it:An iterator.
+...type:Spec.HitIterator
+..returns:A pointer to the host BlastReport.
+..include:seqan/blast.h
+*/
+template<typename TBlastReport>
+inline typename Host<Iter<TBlastReport, SimpleBlastIterator<HitIterator> > >::Type/* const*/ &
+hostReport(Iter<TBlastReport, SimpleBlastIterator<HitIterator> > & it)
+{
+	SEQAN_CHECKPOINT
+	return *it.data_host;
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.atEnd:
+..cat:Blast
+..param.iterator:
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastReport>
+inline bool
+atEnd(Iter<TBlastReport, SimpleBlastIterator<HitIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	return (it.data_pos == length(it.data_host->hits));	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.goEnd:
+..cat:Blast
+..param.iterator:
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastReport>
+inline void
+goEnd(Iter<TBlastReport, SimpleBlastIterator<HitIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_pos = length(it.data_host->hits);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_hsp.h b/src/SeqAn-1.3/seqan/blast/blast_hsp.h
new file mode 100644
index 0000000..38b4bbe
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_hsp.h
@@ -0,0 +1,1696 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_HSP_H
+#define SEQAN_HEADER_BLAST_HSP_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+
+
+
+
+
+template<typename TBlastSpec = NucleotideBlast<>, typename TInfoSpec = BasicInfo>
+class BlastHsp;
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+//////////////////////// FullInfo Nucleotide Spec //////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+
+//Info types
+/**
+.Spec.FullInfo:
+..cat:Blast
+..general:Class.BlastHsp
+..summary:Stores all pieces of information delivered with an alignment in a Blast report.
+..signature:FullInfo
+..include:blast.h
+*/
+
+/**
+.Spec.BasicInfo:
+..cat:Blast
+..general:Class.BlastHsp
+..summary:Stores only the basic pieces of information delivered with an alignment in a Blast report.
+..signature:BasicInfo
+..include:blast.h
+*/
+
+
+
+/**
+.Class.BlastHsp:
+..cat:Blast
+..summary:Object for storing Blast HSPs. 
+..signature:BlastHsp<TBlastSpec, TInfoSpec>  
+..param.TBlastSpec:The type of Blast report to be parsed.
+...type:Spec.BlastN
+...type:Spec.BlastP
+...default:BlastN
+..param.TInfoSpec:The specializing type determining the amount of information to be stored.
+...type:Spec.BasicInfo
+...type:Spec.FullInfo
+...default:BasicInfo
+...remarks:BasicInfo stores begin and end positions on query and database sequence, as well as the alignment. FullInfo stores additional information such as score, e-value...
+..include:blast.h
+*/
+template<typename TSpec>
+class BlastHsp<NucleotideBlast<TSpec>, FullInfo> 
+{
+
+	public:
+		float score;
+		float bits;
+		double expect;
+		unsigned int identity;
+		unsigned int gaps; 
+		unsigned int abs_gaps; 
+		bool query_strand;  //false=>minus, true=>plus
+		bool db_strand;
+		unsigned int query_begin;
+		unsigned int db_begin;
+		unsigned int query_end;	//included in the alignment
+		unsigned int db_end;	//included in the alignment
+
+		String<char> query_string;	
+		String<char> db_string;
+ 
+
+		BlastHsp()
+		{
+		SEQAN_CHECKPOINT
+			//defaults for those values that are not necessarily present in each HSP in the Blast Report
+			score = 0.0;
+			bits = 0.0;
+			expect = 0.0;
+			identity = 0;
+			gaps = 0; 
+			abs_gaps = 0; 
+			query_strand = true;  //false=>minus, true=>plus
+			db_strand = true;
+		}
+
+		BlastHsp(BlastHsp const& other)
+		{
+		SEQAN_CHECKPOINT
+			score = other.score;
+			bits = other.bits;
+			expect = other.expect;
+			identity = other.identity;
+			gaps = other.gaps;
+			abs_gaps = other.abs_gaps;
+			query_strand = other.query_strand;
+			db_strand = other.db_strand;
+			query_begin = other.query_begin;
+			db_begin = other.db_begin;
+			query_end = other.query_end;
+			db_end = other.db_end;	
+			query_string = other.query_string;	
+			db_string = other.db_string;
+
+		}
+
+		BlastHsp & operator = (BlastHsp const & other)
+		{
+		SEQAN_CHECKPOINT
+			score = other.score;
+			bits = other.bits;
+			expect = other.expect;
+			identity = other.identity;
+			gaps = other.gaps;
+			abs_gaps = other.abs_gaps;
+			query_strand = other.query_strand;
+			db_strand = other.db_strand;
+			query_begin = other.query_begin;
+			db_begin = other.db_begin;
+			query_end = other.query_end;
+			db_end = other.db_end;	
+			query_string = other.query_string;	
+			db_string = other.db_string;
+
+			return *this;
+		}
+
+
+		~BlastHsp()
+		{
+		SEQAN_CHECKPOINT
+		}
+};
+
+
+//parse BlastHsp
+template<typename TFile, typename TChar, typename TSpec>
+inline typename Position<TFile>::Type
+_parseBlastHsp(TFile & file,
+			TChar & c, 
+			BlastHsp<NucleotideBlast<TSpec>,FullInfo > & hsp)
+{
+SEQAN_CHECKPOINT
+	typedef typename Position<TFile>::Type TPosition;
+	
+	clear(hsp);
+	String<char> pword;
+	int pint;
+	float pfloat;
+	double pdouble;
+	TPosition start_pos,act_pos;
+	act_pos = _streamTellG(file);
+
+    String<char> query_string;
+	String<char> db_string;
+
+	_parseSkipWhitespace(file,c);
+	c = _streamGet(file);
+	_parseSkipWhitespace(file,c);
+	pfloat = (float)_parseReadEValue(file, c);
+	hsp.bits = pfloat;
+	if(_parseLineUntil(file,c,'('))
+	{
+		c = _streamGet(file);
+		pfloat = _parseReadFloat(file, c);
+		hsp.score = pfloat;
+	}
+
+	_parseSkipWhitespace(file,c);
+	String<char> query = "Expect";
+	if(_parseLineUntil(file,c,query,6))
+	{
+		c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		if(c == '=')
+			c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		pdouble = _parseReadEValue(file, c);
+		hsp.expect = pdouble;
+	}
+
+	query = "Identities";
+	if(_parseUntilBeginLine(file,c,query,10,3))
+	{
+		_parseLineUntil(file,c,'(');
+		c = _streamGet(file);
+		pint = _parseReadNumber(file, c);
+		hsp.identity = pint;
+	}
+
+	query = "Gaps";
+	if(_parseLineUntil(file,c,query,4))
+	{
+		_parseLineUntil(file,c,'=');
+		c = _streamGet(file);
+		pint = _parseReadNumber(file, c);
+		hsp.abs_gaps = pint;
+		_parseLineUntil(file,c,'(');
+		c = _streamGet(file);
+		pint = _parseReadNumber(file, c);
+		hsp.gaps = pint;
+	}
+	//else
+	//{
+	//	hsp.abs_gaps = 0;
+	//	hsp.gaps = 0;
+	//}
+
+	query = "Strand";
+	if(_parseUntilBeginLine(file,c,query,6,3))
+	{
+		c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		if(c == '=')
+			c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		pword = _parseReadWord(file, c);
+		if(pword == "Plus")
+			hsp.query_strand = true;
+		else
+			hsp.query_strand = false;
+		c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		if(c == '/')
+			c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		pword = _parseReadWord(file, c);
+		if(pword == "Plus")
+			hsp.db_strand = true;
+		else
+			hsp.db_strand = false;
+	}
+
+	bool first = true;
+	query = "Query";
+	if(_parseUntilBeginLine(file,c,query,5))
+	{
+		bool in_hsp = true;
+		while(in_hsp)
+		{
+			int end_query,end_db = -1;
+			_parseSkipWhitespace(file,c);
+			if(c == ':')
+				c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pint = _parseReadNumber(file,c);
+			_parseSkipWhitespace(file,c);
+			//TPosition act_posQ = _streamTellG(file);
+			if(first)
+				hsp.query_begin = pint;
+			query_string += _parseReadAlignmentString(file,c);
+			_parseSkipWhitespace(file,c);
+			end_query = _parseReadNumber(file,c);
+			query = "Sbjct";
+			_parseUntilBeginLine(file,c,query,5);
+			_parseSkipWhitespace(file,c);
+			if(c == ':')
+				c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pint = _parseReadNumber(file,c);
+			_parseSkipWhitespace(file,c);
+			//TPosition act_posS = _streamTellG(file);
+			if(first)
+				hsp.db_begin = pint;
+			db_string += _parseReadAlignmentString(file,c);
+			_parseSkipWhitespace(file,c);
+			end_db = _parseReadNumber(file,c);
+			first = false;
+			String<TChar> delim = "QS>R";
+			if(_parseUntilBeginLineOneOf(file,c,delim,4))
+			{
+				TPosition pos = _streamTellG(file);
+				pword = _parseReadWord(file,c);
+				
+				//still in the same HSP
+				if(pword == "Query")
+					in_hsp = true;
+				else
+				{
+					hsp.query_end = end_query;
+					hsp.db_end = end_db;
+					hsp.query_string = query_string;
+					hsp.db_string = db_string;
+					//next HSP
+					if(pword == "Score")
+						return _streamTellG(file);
+					if(pword[0] == '>')
+						return act_pos;
+					if(pword[0] == 'R')
+						return (TPosition) 0;
+					in_hsp = false;
+				}
+			}
+			else
+				return act_pos;
+		}
+	}
+
+	return act_pos;
+
+}
+
+
+template<typename TSpec>
+inline void
+clear(BlastHsp<NucleotideBlast<TSpec>, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+
+	blastHsp.identity = 0;
+	blastHsp.score = 0;
+	blastHsp.bits = 0.0;
+	blastHsp.expect = 0.0;
+	blastHsp.gaps = 0; 
+	blastHsp.abs_gaps = 0; 
+	blastHsp.query_begin = 0;  
+	blastHsp.db_end = 0;
+	blastHsp.query_end = 0;  
+	blastHsp.db_begin = 0;
+	blastHsp.query_strand = true;  
+	blastHsp.db_strand = true;
+	resize(blastHsp.query_string,0);
+	resize(blastHsp.db_string,0);
+}
+
+//////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+//////////////////////// FullInfo Protein Spec //////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+
+//Protein BlastHsp
+template<typename TSpec>
+class BlastHsp<ProteinBlast<TSpec>, FullInfo> 
+{
+
+	public:
+		float score;
+		float bits;
+		double expect;
+		unsigned int identity;
+		unsigned int positives; 
+		unsigned int gaps; 
+		unsigned int abs_gaps; 
+		bool query_strand;  //false=>minus, true=>plus
+		bool db_strand;
+		unsigned int query_begin;
+		unsigned int db_begin;
+		unsigned int query_end;	//included in the alignment
+		unsigned int db_end;	//included in the alignment
+		int query_frame;
+		int db_frame;
+		String<char> query_string;	
+		String<char> db_string;
+	
+
+		BlastHsp()
+		{
+		SEQAN_CHECKPOINT
+			score = 0.0;
+			bits = 0.0 ;
+			expect = 0.0;
+			identity = 0;
+			positives = 0; 
+			gaps = 0; 
+			abs_gaps = 0;
+			query_strand = true;  //false=>minus, true=>plus
+			db_strand = true;
+			query_frame = 1;
+			db_frame = 1;
+		}
+
+		BlastHsp(BlastHsp const& other)
+		{
+		SEQAN_CHECKPOINT
+			score = other.score;
+			bits = other.bits;
+			expect = other.expect;
+			identity = other.identity;
+			gaps = other.gaps;
+			abs_gaps = other.abs_gaps;
+			query_strand = other.query_strand;
+			db_strand = other.db_strand;
+			query_begin = other.query_begin;
+			db_begin = other.db_begin;
+			query_end = other.query_end;
+			db_end = other.db_end;	
+			query_string = other.query_string;	
+			db_string = other.db_string;
+			positives = other.positives; 
+			query_frame = other.query_frame;
+			db_frame = other.db_frame;
+		}
+
+		BlastHsp & operator = (BlastHsp const & other)
+		{
+		SEQAN_CHECKPOINT
+			score = other.score;
+			bits = other.bits;
+			expect = other.expect;
+			identity = other.identity;
+			gaps = other.gaps;
+			abs_gaps = other.abs_gaps;
+			query_strand = other.query_strand;
+			db_strand = other.db_strand;
+			query_begin = other.query_begin;
+			db_begin = other.db_begin;
+			query_end = other.query_end;
+			db_end = other.db_end;	
+			query_string = other.query_string;	
+			db_string = other.db_string;
+			positives = other.positives; 
+			query_frame = other.query_frame;
+			db_frame = other.db_frame;
+			return *this;
+		}
+
+		~BlastHsp()
+		{
+		SEQAN_CHECKPOINT
+		}
+};
+
+
+
+//parse BlastHsp
+template<typename TFile, typename TChar, typename TSpec>
+inline typename Position<TFile>::Type
+_parseBlastHsp(TFile & file,
+			TChar & c, 
+			BlastHsp<ProteinBlast<TSpec>,FullInfo> & hsp)
+{
+SEQAN_CHECKPOINT
+	typedef typename Position<TFile>::Type TPosition;
+	
+	clear(hsp);
+	String<char> pword;
+	int pint;
+	float pfloat;
+	double pdouble;
+	TPosition start_pos,act_pos;
+	act_pos = _streamTellG(file);
+
+	//String<char> query = "Score";
+	//if(_parseUntilBeginLine(file,c,query,6))
+	//{
+	String<char> query_string;
+	String<char> db_string;
+
+	_parseSkipWhitespace(file,c);
+	if(c == '=')
+		c = _streamGet(file);
+	_parseSkipWhitespace(file,c);
+	pfloat = (float)_parseReadEValue(file, c);
+	hsp.bits = pfloat;
+	if(_parseLineUntil(file,c,'('))
+	{
+		c = _streamGet(file);
+		pfloat = _parseReadFloat(file, c);
+		hsp.score = pfloat;
+	}
+
+	_parseSkipWhitespace(file,c);
+	String<char> query = "Expect";
+	if(_parseLineUntil(file,c,query,6))
+	{
+		c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		if(c == '=')
+			c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		pdouble = _parseReadEValue(file, c);
+		hsp.expect = pdouble;
+	}
+
+	query = "Identities";
+	if(_parseUntilBeginLine(file,c,query,10,3))
+	{
+		_parseLineUntil(file,c,'(');
+		c = _streamGet(file);
+		pint = _parseReadNumber(file, c);
+		hsp.identity = pint;
+	}
+
+	query = "Positives";
+	if(_parseLineUntil(file,c,query,9))
+	{
+		_parseUntil(file,c,'(');
+		c = _streamGet(file);
+		pint = _parseReadNumber(file, c);
+		hsp.positives = pint;
+	}
+
+	query = "Gaps";
+	if(_parseLineUntil(file,c,query,4))
+	{
+		_parseLineUntil(file,c,'=');
+		c = _streamGet(file);
+		pint = _parseReadNumber(file, c);
+		hsp.abs_gaps = pint;
+		_parseLineUntil(file,c,'(');
+		c = _streamGet(file);
+		pint = _parseReadNumber(file, c);
+		hsp.gaps = pint;
+	}
+
+	query = "Strand";
+	if(_parseUntilBeginLine(file,c,query,6,3))
+	{
+		c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		if(c == '=')
+			c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		pword = _parseReadWord(file, c);
+		if(pword == "Plus")
+			hsp.query_strand = true;
+		else
+			hsp.query_strand = false;
+		c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		if(c == '/')
+			c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		pword = _parseReadWord(file, c);
+		if(pword == "Plus")
+			hsp.db_strand = true;
+		else
+			hsp.db_strand = false;
+	}
+
+	bool first = true;
+	query = "Query";
+	if(_parseUntilBeginLine(file,c,query,5))
+	{
+		bool in_hsp = true;
+		while(in_hsp)
+		{
+			int end_query,end_db = -1;
+			_parseSkipWhitespace(file,c);
+			if(c == ':')
+				c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pint = _parseReadNumber(file,c);
+			_parseSkipWhitespace(file,c);
+			//TPosition act_posQ = _streamTellG(file);
+			if(first)
+				hsp.query_begin = pint;
+			query_string += _parseReadAlignmentString(file,c);
+			_parseSkipWhitespace(file,c);
+			end_query = _parseReadNumber(file,c);
+			query = "Sbjct";
+			_parseUntilBeginLine(file,c,query,5);
+			_parseSkipWhitespace(file,c);
+			if(c == ':')
+				c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pint = _parseReadNumber(file,c);
+			_parseSkipWhitespace(file,c);
+			//TPosition act_posS = _streamTellG(file);
+			if(first)
+				hsp.db_begin = pint;
+			db_string += _parseReadAlignmentString(file,c);
+			_parseSkipWhitespace(file,c);
+			end_db = _parseReadNumber(file,c);
+			first = false;
+			String<TChar> delim = "QS>R";
+			if(_parseUntilBeginLineOneOf(file,c,delim,4))
+			{
+				TPosition pos = _streamTellG(file);
+				pword = _parseReadWord(file,c);
+			//	_streamSeekG(file,pos);
+				
+				//still in the same HSP
+				if(pword == "Query")
+					in_hsp = true;
+				else
+				{
+					hsp.query_end = end_query;
+					hsp.db_end = end_db;
+					hsp.query_string = query_string;
+					hsp.db_string = db_string;
+					//next HSP
+					if(pword == "Score")
+						return _streamTellG(file);
+					if(pword[0] == '>')
+						return act_pos;
+					if(pword[0] == 'R')
+						return (TPosition) 0;
+					in_hsp = false;
+				}
+			}
+			else
+				return act_pos;
+		}
+	}
+	return act_pos;
+
+}
+
+
+template<typename TSpec>
+inline void
+clear(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	blastHsp.score = 0;
+	blastHsp.bits = 0.0;
+	blastHsp.expect = 0.0;
+	blastHsp.abs_gaps = 0; 
+	blastHsp.query_begin = 0;  
+	blastHsp.db_end = 0;
+	blastHsp.query_end = 0;  
+	blastHsp.db_begin = 0;
+	blastHsp.positives = 0; 
+	blastHsp.query_frame = 1;
+	blastHsp.db_frame = 1;
+	blastHsp.identity = 0;
+	blastHsp.gaps = 0; 
+	blastHsp.query_strand = true;  
+	blastHsp.db_strand = true;
+	resize(blastHsp.query_string,0);
+	resize(blastHsp.db_string,0);
+}
+
+
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////// BasicInfo Spec //////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+template<typename TBlastSpec>
+class BlastHsp<TBlastSpec, BasicInfo> 
+{
+
+	public:
+		double expect;
+		unsigned int query_begin;
+		unsigned int db_begin;
+		unsigned int query_end;	//included in the alignment
+		unsigned int db_end;	//included in the alignment
+
+		String<char> query_string;	
+		String<char> db_string;
+
+
+		BlastHsp()
+		{
+		SEQAN_CHECKPOINT
+			expect = 0;	
+		}
+
+		BlastHsp(BlastHsp const& other)
+		{
+		SEQAN_CHECKPOINT
+			expect = other.expect;
+			query_begin = other.query_begin;
+			db_begin = other.db_begin;
+			query_end = other.query_end;
+			db_end = other.db_end;	
+			query_string = other.query_string;	
+			db_string = other.db_string;
+		}
+
+		BlastHsp & operator = (BlastHsp const & other)
+		{
+		SEQAN_CHECKPOINT
+			expect = other.expect;
+			query_begin = other.query_begin;
+			db_begin = other.db_begin;
+			query_end = other.query_end;
+			db_end = other.db_end;	
+			query_string = other.query_string;	
+			db_string = other.db_string;
+			return *this;
+		}
+ 
+		~BlastHsp()
+		{
+		SEQAN_CHECKPOINT
+		}
+};
+
+
+template<typename TBlastSpec>
+inline void
+clear(BlastHsp<TBlastSpec, BasicInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+
+	blastHsp.expect = 0.0;
+	blastHsp.query_begin = 0;  
+	blastHsp.db_end = 0;
+	blastHsp.query_end = 0;  
+	blastHsp.db_begin = 0;
+	resize(blastHsp.query_string,0);
+	resize(blastHsp.db_string,0);
+}
+
+
+
+//parse BlastHsp
+template<typename TFile, typename TChar, typename TBlastSpec, typename TInfoSpec>
+inline typename Position<TFile>::Type
+_parseBlastHsp(TFile & file,
+			TChar & c, 
+			BlastHsp<TBlastSpec,TInfoSpec> & hsp)
+{
+SEQAN_CHECKPOINT
+	typedef typename Position<TFile>::Type TPosition;
+	
+	clear(hsp);
+	
+	String<char> pword;
+	int pint;
+	double pdouble;
+	TPosition start_pos,act_pos;
+	act_pos = _streamTellG(file);
+
+	String<char> query_string;
+	String<char> db_string;
+
+	_parseSkipWhitespace(file,c);
+	String<char> query = "Expect";
+	if(_parseLineUntil(file,c,query,6))
+	{
+		c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		c = _streamGet(file); // = 
+		_parseSkipWhitespace(file,c);
+		pdouble = _parseReadEValue(file, c);
+		hsp.expect = pdouble;
+	}
+
+	bool first = true;
+	query = "Query";
+	if(_parseUntilBeginLine(file,c,query,5))
+	{
+		bool in_hsp = true;
+		while(in_hsp)
+		{
+			int end_query,end_db = -1;
+			_parseSkipWhitespace(file,c);
+			c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pint = _parseReadNumber(file,c);
+			_parseSkipWhitespace(file,c);
+			if(first)
+				hsp.query_begin = pint;
+			query_string += _parseReadAlignmentString(file,c);
+			_parseSkipWhitespace(file,c);
+			end_query = _parseReadNumber(file,c);
+			query = "Sbjct";
+			_parseUntilBeginLine(file,c,query,5);
+			_parseSkipWhitespace(file,c);
+			c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pint = _parseReadNumber(file,c);
+			_parseSkipWhitespace(file,c);
+			if(first)
+				hsp.db_begin = pint;
+			db_string += _parseReadAlignmentString(file,c);
+			_parseSkipWhitespace(file,c);
+			end_db = _parseReadNumber(file,c);
+			first = false;
+			String<TChar> delim = "QS>R";
+			if(_parseUntilBeginLineOneOf(file,c,delim,4))
+			{
+				TPosition pos = _streamTellG(file);
+				pword = _parseReadWord(file,c);
+				
+				//still in the same HSP
+				if(pword == "Query")
+					in_hsp = true;
+				else
+				{
+					hsp.query_end = end_query;
+					hsp.db_end = end_db;
+					hsp.query_string = query_string;
+					hsp.db_string = db_string;
+					//next HSP
+					if(pword == "Score")
+						return _streamTellG(file);
+					if(pword[0] == '>')
+						return act_pos;
+					if(pword[0] == 'R')
+						return (TPosition) 0;
+					in_hsp = false;
+				}
+			}
+			else
+				return act_pos;
+		}
+	}
+	return act_pos;
+
+}
+
+
+
+
+/////////////////////////////////////////////////////////////
+/////////////////////// get functions ///////////////////////
+/////////////////////////////////////////////////////////////
+
+struct TagUnknownSource_;
+typedef Tag<TagUnknownSource_> const UnknownSource;
+
+struct TagKnownSource_;
+typedef Tag<TagKnownSource_> const KnownSource;
+
+/////////////////////////////////////////////////////////////
+// get Alignment for Align<TSource,TSpec>
+template<typename TBlastHsp, typename TSpec, typename TSource>
+inline unsigned int
+getAlignment(TBlastHsp & hsp,
+			 Align<TSource,TSpec> & ali, 
+			 UnknownSource)
+{
+SEQAN_CHECKPOINT
+
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+
+	typedef Pair<unsigned int, unsigned int> TPosLen;
+
+	//for storing node info
+	String<TPosLen> seq0info;
+	String<TPosLen> seq1info;
+
+	TSource str0,str1;
+
+	typedef typename Iterator<String<char>, Standard >::Type TStringIterator;
+	TStringIterator it_0 = begin(queryAlignmentString(hsp),Standard());
+	TStringIterator it_0_end = end(queryAlignmentString(hsp),Standard());
+	TStringIterator it_1 = begin(databaseAlignmentString(hsp),Standard());
+	TStringIterator it_1_end = end(databaseAlignmentString(hsp),Standard());
+
+	unsigned int act0_pos = 0;
+	unsigned int act1_pos = 0;
+	
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		if(*it_0 == '-')
+		{
+			unsigned int gap_len = 0;
+			while(it_0 != it_0_end && *it_0 == '-')
+			{
+				append(str1,getValue(it_1));
+				++it_0;
+				++it_1;
+				++act1_pos;
+				++gap_len;
+			}
+			append(seq0info,TPosLen(act0_pos,gap_len));
+			act0_pos += gap_len;
+			continue;
+		}
+		if(*it_1 == '-')
+		{
+			unsigned int gap_len = 0;
+			while(it_1 != it_1_end && *it_1 == '-')
+			{
+				append(str0,getValue(it_0));
+				++it_1;
+				++it_0;
+				++act0_pos;
+				++gap_len;
+			}
+			append(seq1info,TPosLen(act1_pos,gap_len));
+			act1_pos += gap_len;
+			continue;
+		}
+		append(str0,getValue(it_0));
+		append(str1,getValue(it_1));
+		++it_0;
+		++it_1;
+		++act0_pos;
+		++act1_pos;
+
+	}
+	
+	resize(rows(ali),2);
+	setSource(row(ali,0),str0);
+	setSource(row(ali,1),str1);
+
+	typedef typename Iterator<String<TPosLen>, Standard >::Type TNodeIterator;
+	TNodeIterator nodes0it = begin(seq0info,Standard());
+	TNodeIterator nodes0end = end(seq0info,Standard());
+
+	while(nodes0it != nodes0end)
+	{
+		insertGaps(row(ali,0),nodes0it->i1,nodes0it->i2);
+		++nodes0it;
+	}
+
+
+	typedef typename Iterator<String<TPosLen>, Standard >::Type TNodeIterator;
+	TNodeIterator nodes1it = begin(seq1info,Standard());
+	TNodeIterator nodes1end = end(seq1info,Standard());
+
+	while(nodes1it != nodes1end)
+	{
+		insertGaps(row(ali,1),nodes1it->i1,nodes1it->i2);
+		++nodes1it;
+	}
+	detach(ali);
+
+	return length(queryAlignmentString(hsp));
+
+}
+
+/**
+.Function.blast#getAlignment
+..cat:Blast
+..summary:Turns a HSP from a Blast search into an Alignment object.
+..signature:getAlignment(hsp,alignment)
+..param.hsp:A Blast HSP.
+...type:Class.BlastHsp
+..param.alignment:An Alignment object to be filled.
+...type:Class.Align
+...type:Spec.Alignment Graph
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TSpec, typename TSource>
+inline unsigned int
+getAlignment(TBlastHsp & hsp,
+			 Align<TSource,TSpec> & ali)
+{
+SEQAN_CHECKPOINT
+
+	if(length(rows(ali))>1)
+        if(!emptySource(row(ali,0)) && !!emptySource(row(ali,1)))
+			return getAlignment(hsp,ali,KnownSource());
+	
+	return getAlignment(hsp,ali,UnknownSource());
+
+}
+
+
+
+/////////////////////////////////////////////////////////////
+// get Alignment for Align<TSource,TSpec>
+template<typename TBlastHsp, typename TSpec, typename TSource>
+inline unsigned int
+getAlignment(TBlastHsp & hsp,
+			 Align<TSource,TSpec> & ali, 
+			 KnownSource)
+{
+SEQAN_CHECKPOINT
+
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+
+	typedef typename Iterator<TRow, Standard>::Type TAliIterator;
+	TAliIterator ali_0 = begin(row(ali, 0), Standard());
+	TAliIterator ali_1 = begin(row(ali, 1), Standard());
+
+	typedef typename Iterator<String<char>, Standard >::Type TStringIterator;
+	TStringIterator it_0 = begin(queryAlignmentString(hsp),Standard());
+	TStringIterator it_0_end = end(queryAlignmentString(hsp),Standard());
+
+	TStringIterator it_1 = begin(databaseAlignmentString(hsp),Standard());
+	TStringIterator it_1_end = end(databaseAlignmentString(hsp),Standard());
+
+	TSource str0,str1;
+
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		if (*it_0 == '-')
+		{
+			insertGap(ali_0);
+		}
+		else
+		{
+			append(str0,getValue(it_0));
+		}
+		if (*it_1 == '-')
+		{
+			insertGap(ali_1);
+		}
+		else
+		{
+			append(str1,getValue(it_1));
+		}
+		
+		++it_0;
+		++it_1;
+		++ali_0;
+		++ali_1;
+	}
+
+	setClippedBeginPosition(row(ali,0),queryBegin(hsp)-1);
+	setClippedBeginPosition(row(ali,1),databaseBegin(hsp)-1);
+	setClippedEndPosition(row(ali,0),queryEnd(hsp));
+	setClippedEndPosition(row(ali,1),databaseEnd(hsp));
+
+	return length(databaseAlignmentString(hsp));
+
+}
+
+
+
+
+
+/**
+.Function.blast#getAlignment
+..cat:Blast
+..signature:getAlignment(hsp,alignment,id0,id1)
+..param.id0:The Id of the query sequence in the StringSet of the Alignment Graph.
+..param.id1:The Id of the hit sequence in the StringSet of the Alignment Graph.
+..include:seqan/blast.h
+*/
+/////////////////////////////////////////////////////////////
+// get Alignment for Graph<TAlign>
+template<typename TBlastHsp, typename TAlign, typename TId>
+inline unsigned int
+getAlignment(TBlastHsp & hsp,
+			 Graph<TAlign> & ali,
+			 TId id0, //query ID 
+			 TId id1) //hit ID
+{
+SEQAN_CHECKPOINT
+
+	typedef Graph<TAlign> TAliGraph;
+	typedef typename Iterator<String<char>, Standard >::Type TStringIterator;
+	typedef typename VertexDescriptor<TAliGraph>::Type TVertexDescriptor;
+
+	TStringIterator it_0 = begin(queryAlignmentString(hsp),Standard());
+	TStringIterator it_0_end = end(queryAlignmentString(hsp),Standard());
+
+	TStringIterator it_1 = begin(databaseAlignmentString(hsp),Standard());
+	TStringIterator it_1_end = end(databaseAlignmentString(hsp),Standard());
+	unsigned int act0_pos = getQueryBegin(hsp)-1;
+	unsigned int act1_pos = getDatabaseBegin(hsp)-1;
+
+	unsigned int act_len = 0;
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		if(*it_0 == '-')
+		{
+			if(act_len > 0)
+			{
+				TVertexDescriptor vd0 = addVertex(ali,id0,act0_pos,act_len);
+				TVertexDescriptor vd1 = addVertex(ali,id1,act1_pos,act_len);
+				addEdge(ali,vd0,vd1);
+				act0_pos += act_len;
+				act1_pos += act_len;
+				act_len = 0;
+			}
+			unsigned int gap_len = 0;
+			while(it_0 != it_0_end && *it_0 == '-')
+			{
+				++it_0;
+				++it_1;
+				++gap_len;
+			}
+			addVertex(ali,id1,act1_pos,gap_len);
+			act1_pos += gap_len;
+			continue;
+		}
+		if(*it_1 == '-')
+		{
+			if(act_len > 0)
+			{
+				TVertexDescriptor vd0 = addVertex(ali,id0,act0_pos,act_len);
+				TVertexDescriptor vd1 = addVertex(ali,id1,act1_pos,act_len);
+				addEdge(ali,vd0,vd1);
+				act0_pos += act_len;
+				act1_pos += act_len;
+				act_len = 0;
+			}
+			unsigned int gap_len = 0;
+			while(it_1 != it_1_end && *it_1 == '-')
+			{
+				++it_1;
+				++it_0;
+				++gap_len;
+			}
+			addVertex(ali,id0,act0_pos,gap_len);
+			act0_pos += gap_len;
+			continue;
+		}
+		++it_0;
+		++it_1;
+		++act_len;
+
+	}
+	SEQAN_ASSERT_TRUE(act0_pos+act_len == getQueryEnd(hsp));
+	SEQAN_ASSERT_TRUE(act1_pos+act_len == getDatabaseEnd(hsp));
+	if(act_len>0)
+	{
+		TVertexDescriptor vd0 = addVertex(ali,id0,act0_pos,act_len);
+		TVertexDescriptor vd1 = addVertex(ali,id1,act1_pos,act_len);
+		addEdge(ali,vd0,vd1);
+	}
+
+	return length(queryAlignmentString(hsp));
+
+}
+
+
+
+/////////////////////////////////////////////////////////////
+// get Alignment for Graph<TAlign> (stringSet and sequence ids not given)
+template<typename TBlastHsp, typename TStringSet, typename TCargo, typename TSpec>
+inline unsigned int //returns the length of the alignment
+getAlignment(TBlastHsp & hsp,
+			 Graph<Alignment<TStringSet,TCargo,TSpec> > & ali) //hit ID
+{
+SEQAN_CHECKPOINT
+
+	typedef Graph<Alignment<TStringSet,TCargo,TSpec> > TAliGraph;
+	typedef typename Iterator<String<char>, Standard >::Type TStringIterator;
+	typedef typename VertexDescriptor<TAliGraph>::Type TVertexDescriptor;
+	typedef Pair<unsigned int, unsigned int> TPosLen;
+	typedef Triple<unsigned int, unsigned int, int> TPosLenLink;
+	typedef typename Value<TStringSet>::Type TString;
+
+	//for storing node info
+	String<TPosLen> seq0nodes;
+	//for storing node + edge info
+	String<TPosLenLink> seq1nodes;
+
+	//for storing the sequences
+	TString str0,str1;
+
+	TStringIterator it_0 = begin(queryAlignmentString(hsp),Standard());
+	TStringIterator it_0_end = end(queryAlignmentString(hsp),Standard());
+
+	TStringIterator it_1 = begin(databaseAlignmentString(hsp),Standard());
+	TStringIterator it_1_end = end(databaseAlignmentString(hsp),Standard());
+	unsigned int act0_pos = 0;
+	unsigned int act1_pos = 0;
+	unsigned int act_len = 0;
+
+	//walk over (gapped) sequences, retrieve ungapped sequences and store node+edge info for alignment graph
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		if(*it_0 == '-')
+		{
+			if(act_len > 0)
+			{
+				append(seq0nodes,TPosLen(act0_pos,act_len));
+				append(seq1nodes,TPosLenLink(act1_pos,act_len,act0_pos));
+				act0_pos += act_len;
+				act1_pos += act_len;
+				act_len = 0;
+			}
+			unsigned int gap_len = 0;
+			while(it_0 != it_0_end && *it_0 == '-')
+			{
+				append(str1,getValue(it_1));
+				++it_0;
+				++it_1;
+				++gap_len;
+			}
+			append(seq1nodes,TPosLenLink(act1_pos,gap_len,-1));
+			act1_pos += gap_len;
+			continue;
+		}
+		if(*it_1 == '-')
+		{
+			if(act_len > 0)
+			{
+				append(seq0nodes,TPosLen(act0_pos,act_len));
+				append(seq1nodes,TPosLenLink(act1_pos,act_len,act0_pos));
+				act0_pos += act_len;
+				act1_pos += act_len;
+				act_len = 0;
+			}
+			unsigned int gap_len = 0;
+			while(it_1 != it_1_end && *it_1 == '-')
+			{
+				append(str0,getValue(it_0));
+				++it_1;
+				++it_0;
+				++gap_len;
+			}
+			append(seq0nodes,TPosLen(act0_pos,gap_len));
+			act0_pos += gap_len;
+			continue;
+		}
+		append(str0,getValue(it_0));
+		append(str1,getValue(it_1));
+		++it_0;
+		++it_1;
+		++act_len;
+
+	}
+
+	if(act_len>0)
+	{
+		append(seq0nodes,TPosLen(act0_pos,act_len));
+		append(seq1nodes,TPosLenLink(act1_pos,act_len,act0_pos));
+	}
+
+	TStringSet str;
+	unsigned int id0 = assignValueById(str,str0);
+	unsigned int id1 = assignValueById(str,str1);
+
+	assignStringSet(ali,str);
+
+	typedef typename Iterator<String<TPosLen>, Standard >::Type TNodeIterator;
+	TNodeIterator nodes0it = begin(seq0nodes,Standard());
+	TNodeIterator nodes0end = end(seq0nodes,Standard());
+
+	while(nodes0it != nodes0end)
+	{
+		addVertex(ali,id0,nodes0it->i1,nodes0it->i2);
+		++nodes0it;
+	}
+
+	typedef typename Iterator<String<TPosLenLink>, Standard >::Type TNodeEdgeIterator;
+	TNodeEdgeIterator nodes1it = begin(seq1nodes,Standard());
+	TNodeEdgeIterator nodes1end = end(seq1nodes,Standard());
+	
+	while(nodes1it != nodes1end)
+	{
+		TVertexDescriptor vd1 = addVertex(ali,id1,nodes1it->i1,nodes1it->i2);
+		if(nodes1it->i3 >= 0)
+		{
+			TVertexDescriptor vd2 = findVertex(ali,id0,nodes1it->i3);
+			addEdge(ali,vd1,vd2);
+		}
+		++nodes1it;
+	}
+
+	return length(databaseAlignmentString(hsp));
+
+}
+
+
+
+// general (for all specs)
+
+template<typename TBlastSpec, typename TInfoSpec>
+inline unsigned int &
+queryBegin(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.query_begin;
+}
+
+
+
+
+/**
+.Function.getQueryBegin:
+..cat:Blast
+..summary:The begin position of the HSP on the query sequence.
+..signature:getQueryBegin(object);
+..param.object:A Blast HSP object.
+...type:Class.BlastHsp
+..returns:The begin position.
+...type:nolink:unsigned
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec, typename TInfoSpec>
+inline unsigned int
+getQueryBegin(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.query_begin;
+}
+	
+
+
+template<typename TBlastSpec, typename TInfoSpec>
+inline unsigned int &
+databaseBegin(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.db_begin;
+}
+
+/**
+.Function.getDatabaseBegin:
+..cat:Blast
+..summary:The begin position of the HSP on the database sequence.
+..signature:getDatabaseBegin(object);
+..param.object:A Blast HSP object.
+...type:Class.BlastHsp
+..returns:The begin position.
+...type:nolink:unsigned
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec, typename TInfoSpec>
+inline unsigned int
+getDatabaseBegin(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.db_begin;
+}
+	
+
+
+template<typename TBlastSpec, typename TInfoSpec>
+inline unsigned int &
+queryEnd(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.query_end;
+}
+
+/**
+.Function.getQueryEnd:
+..cat:Blast
+..summary:The end position of the HSP on the query sequence.
+..signature:getQueryEnd(object);
+..param.object:A Blast HSP object.
+...type:Class.BlastHsp
+..returns:The end position.
+...type:nolink:unsigned
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec, typename TInfoSpec>
+inline unsigned int
+getQueryEnd(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.query_end;
+}
+	
+
+
+/**
+.Function.getDatabaseEnd:
+..cat:Blast
+..summary:The end position of the HSP on the database sequence.
+..signature:getDatabaseEnd(object);
+..param.object:A Blast HSP object.
+...type:Class.BlastHsp
+..returns:The end position.
+...type:nolink:unsigned
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec, typename TInfoSpec>
+inline unsigned int &
+databaseEnd(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.db_end;
+}
+
+template<typename TBlastSpec, typename TInfoSpec>
+inline unsigned int
+getDatabaseEnd(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.db_end;
+}
+	
+
+template<typename TBlastSpec, typename TInfoSpec>
+inline String<char> &
+queryAlignmentString(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.query_string;
+}
+
+
+template<typename TBlastSpec, typename TInfoSpec>
+inline String<char>
+getQueryAlignmentString(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.query_string;
+}
+
+	
+
+template<typename TBlastSpec, typename TInfoSpec>
+inline String<char> &
+databaseAlignmentString(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.db_string;
+}
+
+template<typename TBlastSpec, typename TInfoSpec>
+inline String<char>
+getDatabaseAlignmentString(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.db_string;
+}
+
+
+template<typename TBlastSpec, typename TInfoSpec>
+inline double &
+eValue(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.expect;
+}
+
+/**
+.Function.getEValue:
+..cat:Blast
+..summary:The e-value associated with a Blast HSP.
+..signature:getEValue(object);
+..param.object:A Blast HSP object.
+...type:Class.BlastHsp
+..returns:The e-value.
+...type:nolink:double
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec, typename TInfoSpec>
+inline double
+getEValue(BlastHsp<TBlastSpec, TInfoSpec>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.expect;
+}
+
+
+// for FullInfo specs
+
+template<typename TBlastSpec>
+inline float &
+score(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.score;
+}
+
+/**
+.Function.Blast#getBlastMatchScore:
+..cat:Blast
+..summary:The Smith-Waterman score associated with a Blast HSP.
+..signature:getBlastMatchScore(object);
+..param.object:A Blast HSP object.
+...type:Spec.FullInfo
+..returns:The score.
+...type:nolink:float
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec>
+inline float 
+getBlastMatchScore(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.score;
+}
+
+template<typename TBlastSpec>
+inline float &
+bitScore(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.bits;
+}
+
+
+/**
+.Function.getBitScore:
+..cat:Blast
+..summary:The bit score associated with a Blast HSP.
+..signature:getBitScore(object);
+..param.object:A Blast HSP object.
+...type:Spec.FullInfo
+..returns:The bit score.
+...type:nolink:float
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec>
+inline float 
+getBitScore(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.bits;
+}
+
+
+template<typename TBlastSpec>
+inline unsigned int &
+percentIdentity(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.identity;
+}
+
+
+
+template<typename TBlastSpec>
+inline unsigned int
+getPercentIdentity(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.identity;
+}
+
+template<typename TBlastSpec>
+inline unsigned int &
+percentGaps(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.gaps;
+}
+
+template<typename TBlastSpec>
+inline unsigned int
+getPercentGaps(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.gaps;
+}
+	
+template<typename TBlastSpec>
+inline unsigned int &
+numGaps(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.abs_gaps;
+}
+
+
+
+/**
+.Function.getNumGaps:
+..cat:Blast
+..summary:The number of gaps within a Blast HSP alignment.
+..signature:getNumGaps(object);
+..param.object:A Blast HSP object.
+...type:Spec.FullInfo
+..returns:The number of gaps.
+...type:nolink:unsigned
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec>
+inline unsigned int
+getNumGaps(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.abs_gaps;
+}
+
+
+
+/**
+.Function.queryOrientationPlus:
+..cat:Blast
+..summary:Orientation of the query sequence within a Blast HSP alignment.
+..signature:queryOrientationPlus(object);
+..param.object:A Blast HSP object.
+...type:Spec.FullInfo
+..returns:True if the query is in forward orientation.
+...type:nolink:bool
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec>
+inline bool
+queryOrientationPlus(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.query_strand;
+}
+
+/**
+.Function.databaseOrientationPlus:
+..cat:Blast
+..summary:Orientation of the database sequence within a Blast HSP alignment.
+..signature:databaseOrientationPlus(object);
+..param.object:A Blast HSP object.
+...type:Spec.FullInfo
+..returns:True if the database sequence is in forward orientation.
+...type:nolink:bool
+..include:seqan/blast.h
+*/
+template<typename TBlastSpec>
+inline bool
+databaseOrientationPlus(BlastHsp<TBlastSpec, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.db_strand;
+}
+
+
+
+// only for fullinfo protein spec
+template<typename TSpec>
+inline int &
+queryFrame(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.query_frame;
+}
+
+template<typename TSpec>
+inline int
+getQueryFrame(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.query_frame;
+}
+
+
+template<typename TSpec>
+inline int &
+databaseFrame(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.db_frame;
+}
+
+template<typename TSpec>
+inline int
+getDatabaseFrame(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.db_frame;
+}
+
+template<typename TSpec>
+inline unsigned int &
+percentPositives(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.positives;
+}
+
+template<typename TSpec>
+inline unsigned int
+getPercentPositives(BlastHsp<ProteinBlast<TSpec>, FullInfo>& blastHsp)
+{
+SEQAN_CHECKPOINT
+	return blastHsp.positives;
+}
+
+/**
+.Function.length:
+..cat:Blast
+..param.object:
+...type:Class.BlastHsp
+..include:seqan/blast.h
+*/
+template<typename TBlast, typename TSpec>
+inline unsigned int
+length(BlastHsp<TBlast,TSpec >& blastHsp)
+{
+	return length(databaseAlignmentString(blastHsp));
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_hsp_iterator.h b/src/SeqAn-1.3/seqan/blast/blast_hsp_iterator.h
new file mode 100644
index 0000000..56e6bfd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_hsp_iterator.h
@@ -0,0 +1,310 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_HSP_ITERATOR_H
+#define SEQAN_HEADER_BLAST_HSP_ITERATOR_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast Hsp Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/**
+.Spec.HspIterator:
+..cat:Blast
+..summary:Hsp iterator for @Class.BlastHit at .
+..signature:Iterator<TBlastHit, HspIterator>
+..param.TBlastHit:A Blast hit.
+...type:Class.BlastHit
+..general:Class.Iter
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TStoreSpec>
+class Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> > 
+{
+public:
+
+	BlastHit<TBlastHsp, TStoreSpec> * data_host;
+	unsigned int data_pos;
+
+	Iter()	
+	{
+	}
+	
+	Iter(BlastHit<TBlastHsp, TStoreSpec> & blast) : 
+		data_host(&blast), 
+		data_pos(0) 
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	Iter(Iter const& it) : 
+		data_host(it.data_host), 
+		data_pos(it.data_pos) 
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	~Iter() 
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & other) 
+	{
+	SEQAN_CHECKPOINT
+		if (this == &other) return *this;
+		data_host = other.data_host;
+		data_pos = other.data_pos;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// SimpleBlastIterator<HspIterator> - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TInfoSpec>
+struct Iterator<BlastHit<TBlastHsp,StoreReport<TInfoSpec> >, HspIterator>
+{	
+	typedef Iter<BlastHit<TBlastHsp,StoreReport<TInfoSpec> >, SimpleBlastIterator<HspIterator> > Type;
+};
+
+template<typename TBlastHsp, typename TInfoSpec>
+struct Iterator<BlastHit<TBlastHsp,StoreReport<TInfoSpec> > const, HspIterator>
+{	
+	typedef Iter<BlastHit<TBlastHsp,StoreReport<TInfoSpec> > const, SimpleBlastIterator<HspIterator> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TInfoSpec>
+struct Value<Iter<BlastHit<TBlastHsp,StoreReport<TInfoSpec> >, SimpleBlastIterator<HspIterator> > >
+{
+	typedef TBlastHsp Type;
+};
+
+template<typename TBlastHsp, typename TInfoSpec>
+struct Value<Iter<BlastHit<TBlastHsp,StoreReport<TInfoSpec> > const, SimpleBlastIterator<HspIterator> > >
+{
+	typedef TBlastHsp Type;
+};
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// SimpleBlastIterator<HspIterator> - FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline typename GetValue<Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> > >::Type
+getValue(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	return it.data_host->hsps[it.data_pos];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline typename Reference<Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> > >::Type
+value(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	return it.data_host->hsps[it.data_pos];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline typename Reference<Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> > >::Type
+operator * (Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	return value(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+////**
+//.Function.hostHit:
+//..cat:Blast
+//..summary:The BlastHit this iterator is working on.
+//..signature:hostHit(it)
+//..param.it:A Blast hsp iterator.
+//...type:Spec.HspIterator
+//..returns:A pointer to the host Blast hit.
+//*/
+//template<typename TBlastHsp, typename TStoreSpec>
+//inline typename Host<Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> > >::Type &
+//hostHit(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+//{
+//	return *it.data_host;
+//} 
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline bool
+atBegin(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	return (it.data_pos == 0);	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline void
+goBegin(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_pos = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline bool
+atEnd(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	return (it.data_pos == length(it.data_host->hsps));	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline void
+goEnd(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	it.data_pos = length(it.data_host->hsps);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline void
+goNext(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(it)) ++it.data_pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >&
+operator ++(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	goNext(it);
+	return it;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline void
+goPrevious(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atBegin(it)) --it.data_pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >&
+operator --(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	goPrevious(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//template<typename TBlastHsp, typename TStoreSpec>
+//inline Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >
+//operator --(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it, int)
+//{
+//	Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> > ret = it;
+//	goPrevious(it);
+//	return ret;
+//}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline bool
+operator ==(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it1,
+			Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_pos==it2.data_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TStoreSpec>
+inline bool
+operator !=(Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it1,
+			Iter<BlastHit<TBlastHsp, TStoreSpec> , SimpleBlastIterator<HspIterator> >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_pos!=it2.data_pos);
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_iterator.h b/src/SeqAn-1.3/seqan/blast/blast_iterator.h
new file mode 100644
index 0000000..40d0f9a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_iterator.h
@@ -0,0 +1,69 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_ITERATOR_H
+#define SEQAN_HEADER_BLAST_ITERATOR_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast Iterators
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec>
+struct SimpleBlastIterator;	// for BlastReport<TBlastHsp,StoreBlast,TSpec>
+
+
+// Hit Iterator
+struct HitIterator;
+
+// Hsp Iterator
+struct HspIterator;
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+template <typename TSpec>
+struct StreamBlastIterator;	// for BlastReport<TBlastHsp,StreamBlast,TSpec>
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_parsing.h b/src/SeqAn-1.3/seqan/blast/blast_parsing.h
new file mode 100644
index 0000000..0f19610
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_parsing.h
@@ -0,0 +1,137 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_PARSING_H
+#define SEQAN_HEADER_BLAST_PARSING_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Internal Blast Parsing Functions
+// remark: uses a lot of functions from graph_utility_parsing.h
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/////////////////////////////////////////////////////////////////////////////////
+// read alignment string (letters and gaps)
+// steht am ende dahinter 
+template<typename TFile, typename TChar>
+inline String<char>
+_parseReadAlignmentString(TFile & file, TChar& c)
+{
+SEQAN_CHECKPOINT
+	// Read word
+	String<char> str(c);
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (!_parseIsLetter(c) && !(c=='-')) break;
+		append(str, c);
+	}
+	return str;
+}
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////
+// parses query and database name (file should be pointing to the beginning of the file)
+template<typename TFile, typename TChar>
+typename Position<TFile>::Type
+_parseReadQueryAndDBName(TFile & file,
+						  TChar & c,
+						  String<char> & query_name,
+						  String<char> & db_name)
+{
+SEQAN_CHECKPOINT
+	typedef typename Position<TFile>::Type TPosition;
+	typedef typename Value<TFile>::Type TValue;
+
+	TChar c_before = c;
+	TPosition act_pos = _streamTellG(file);
+	TPosition query_pos,db_pos;
+
+	//String<char> delim = "DQ";
+	//_parseUntilBeginLineOneOf(file,c,delim,2);
+
+
+	String<char> query = "Query";
+	if(_parseUntilBeginLine(file,c,query,6))
+		query_pos = _streamTellG(file);
+	else
+		return act_pos;
+	_streamSeekG(file,act_pos);
+	c = c_before;
+	String<char> database = "Database";
+	if(_parseUntilBeginLine(file,c,database,8))
+		db_pos = _streamTellG(file);
+	else
+		return act_pos;
+	
+	
+	//getQueryName
+	_streamSeekG(file,query_pos);
+	_parseSkipWhitespace(file,c);
+	c = _streamGet(file);
+	_parseSkipWhitespace(file,c);
+	query_name = _parseReadWord(file, c);
+	while (!_streamEOF(file) && c != '\n' && c != '\r')
+		query_name += _parseReadWord(file, c);
+	
+	//getDBName
+	_streamSeekG(file,db_pos);
+	c = _streamGet(file);
+	_parseSkipWhitespace(file,c);
+	db_name = _parseReadWord(file, c);
+	while (!_streamEOF(file) && c != '\n' && c != '\r')
+		db_name += _parseReadWord(file, c);
+	_parseSkipWhitespace(file,c);
+		
+	c = _streamGet(file);
+
+	return _streamTellG(file); 
+	
+}
+
+
+
+
+
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_report.h b/src/SeqAn-1.3/seqan/blast/blast_report.h
new file mode 100644
index 0000000..11d0df0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_report.h
@@ -0,0 +1,1170 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_REPORT_H
+#define SEQAN_HEADER_BLAST_REPORT_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+// 
+
+//template<typename TBlastHsp = BlastHsp<>, typename TStoreSpec = StoreReport<BasicInfo> >
+template<typename TBlastHsp = BlastHsp<>, typename TStoreSpec = StreamReport<FullInfo> >
+class BlastReport;
+
+
+/**
+.Class.BlastReport:
+..cat:Blast
+..summary:Object for storing Blast report information. 
+..signature:BlastReport<TBlastHsp, TSpec>  
+..param.TBlastHsp:The type of HSPs that are to be stored.
+...remarks:see @Class.BlastHsp at .
+...default:$BlastHsp<BlastN,BasicInfo>$
+..param.TSpec:The specializing type.
+...type:Spec.StreamReport
+...type:Spec.StoreReport
+...default:StreamReport 
+...remarks:StoreReport requires more space while StreamReport will be more time consuming if hits are iterated over more than once.
+..metafunction:Metafunction.Hsp
+..metafunction:Metafunction.Hit
+...remarks:Use @Metafunction.Hit@ to get the type of BlastHit.
+..remarks:Hits and HSPs can be iterated over by using @Spec.HitIterator@ and @Spec.HspIterator at .
+..include:blast.h
+*/
+
+template<typename TBlastHsp>
+class BlastReport<TBlastHsp, StoreReport<FullInfo> > 
+{
+	public:
+
+		String<BlastHit<TBlastHsp, StoreReport<FullInfo> > > hits;
+		String<char> query_name;
+		String<char> db_name;
+		
+		bool next_report;
+
+//Search Parameters
+
+		double min_expect;        //todo
+		bool allow_gaps;          
+		String<char> matrix;
+		float gap_open;
+		float gap_extension;
+
+
+
+//Search Statistics
+
+		//S' (bits) =  [lambda * S (raw)  -  ln K] / ln 2
+		float lambda;
+		float k; //kappa
+		float h; //entropy
+
+		float gapped_lambda;
+		float gapped_k;
+		float gapped_h;
+
+
+
+//die hier auch noch?		
+		//Hits_to_DB	
+		//S1	
+		//S1_bits	
+		//S2
+		//S2_bits
+		//X1
+		//X1_bits
+		//X2
+		//X2_bits
+		//X3
+		//X3_bits
+		//dbentries	
+		//dbletters	
+		//num_extensions
+		//num_successful_extensions
+		//posted_date	
+		//seqs_better_than_cutoff
+
+
+
+		BlastReport()
+		{
+		SEQAN_CHECKPOINT
+			allow_gaps = false;
+			next_report = true;
+		}
+
+		BlastReport(BlastReport const& other)
+		{
+		SEQAN_CHECKPOINT
+			assign(hits,other.hits);
+			query_name = other.query_name;
+			db_name = other.db_name;
+			next_report = other.next_report;
+
+			allow_gaps = other.allow_gaps;
+			min_expect = other.min_expect;
+			matrix = other.matrix;
+			gap_open = other.gap_open;
+			gap_extension = other.gap_extension;
+
+			lambda = other.lambda;
+			k = other.k;			
+			h = other.h;
+			gapped_lambda = other.gapped_lambda;
+			gapped_k = other.gapped_k;
+			gapped_h = other.gapped_h;
+		}
+
+		BlastReport & operator = (BlastReport const& other)
+		{
+		SEQAN_CHECKPOINT
+			assign(hits,other.hits);
+			query_name = other.query_name;
+			db_name = other.db_name;
+
+			allow_gaps = other.allow_gaps;
+			min_expect = other.min_expect;
+			matrix = other.matrix;
+			gap_open = other.gap_open;
+			gap_extension = other.gap_extension;
+
+			lambda = other.lambda;
+			k = other.k;			
+			h = other.h;
+			gapped_lambda = other.gapped_lambda;
+			gapped_k = other.gapped_k;
+			gapped_h = other.gapped_h;
+			return *this;
+		}
+
+		//BlastReport(const char * file_name,
+		//			double mineval = -1.0) // -1 => alle
+		//{
+		//	min_expect = mineval;
+		//	std::fstream strm; 
+		//	strm.open(file_name,::std::ios_base::in | ::std::ios_base::binary);
+		//	read(strm, *this, Blast());
+		//	strm.close();
+
+		//}
+
+//		template<typename TFile>
+//		BlastReport(TFile & file,
+//					double mineval = -1.0) // -1 => alle
+//		{
+//			min_expect = mineval;
+////			strm.open(file_name.c_str(),ios_base::in | ios_base::binary);
+//			read(file, *this, Blast());
+////			strm.close();
+//
+//		}
+
+		~BlastReport()
+		{
+		SEQAN_CHECKPOINT
+		}
+
+
+};
+
+
+template<typename TBlastHsp>
+inline void
+clear(BlastReport<TBlastHsp, StoreReport<FullInfo> >& blastObj)
+{
+SEQAN_CHECKPOINT
+	
+	for(unsigned int i = 0; i < length(blastObj.hits); ++i)
+		clear(blastObj.hits[i]);
+	resize(blastObj.hits,0);
+	resize(blastObj.query_name,0);
+	resize(blastObj.db_name,0);
+	blastObj.allow_gaps = false;
+	blastObj.next_report = true;
+	resize(blastObj.matrix,0);
+}
+
+
+
+
+
+//////////////////// Metafunctions /////////////////////////////
+
+template<typename TBlastHsp, typename TSpec>
+struct Value<BlastReport<TBlastHsp, TSpec> > 
+{
+	typedef BlastHit<TBlastHsp,TSpec> Type;
+};
+
+template<typename TBlastHsp, typename TSpec>
+struct Value<BlastReport<TBlastHsp, TSpec> const> 
+{
+	typedef BlastHit<TBlastHsp,TSpec> const Type;
+};
+
+
+template<typename TBlastHsp, typename TSpec>
+struct Hit<BlastReport<TBlastHsp, TSpec> > 
+{
+	typedef BlastHit<TBlastHsp,TSpec> Type;
+};
+
+template<typename TBlastHsp, typename TSpec>
+struct Hit<BlastReport<TBlastHsp, TSpec> const> 
+{
+	typedef BlastHit<TBlastHsp,TSpec> const Type;
+};
+
+
+///////////////////////////////////////////////////
+//todo
+	template<typename TBlastHsp, typename TSpec>
+	struct Hit<String<BlastReport<TBlastHsp, TSpec> > > 
+	{
+		typedef BlastHit<TBlastHsp,TSpec> Type;
+	};
+
+	template<typename TBlastHsp, typename TSpec>
+	struct Hit<String<BlastReport<TBlastHsp, TSpec> const> > 
+	{
+		typedef BlastHit<TBlastHsp,TSpec> Type;
+	};
+
+	template<typename TBlastHsp, typename TSpec>
+	struct Hit<String<BlastHit<TBlastHsp, TSpec> > > 
+	{
+		typedef BlastHit<TBlastHsp,TSpec> Type;
+	};
+
+	template<typename TBlastHsp, typename TSpec>
+	struct Hit<String<BlastHit<TBlastHsp, TSpec> const> > 
+	{
+		typedef BlastHit<TBlastHsp,TSpec> Type;
+	};
+
+	template<typename TBlastSpec, typename TInfoSpec>
+	struct Hit<String<BlastHsp<TBlastSpec, TInfoSpec> > > 
+	{
+		typedef BlastHit<BlastHsp<TBlastSpec,TInfoSpec>,StoreReport<TInfoSpec> > Type;
+	};
+
+	template<typename TBlastSpec, typename TInfoSpec>
+	struct Hit<String<BlastHsp<TBlastSpec, TInfoSpec> const> > 
+	{
+		typedef BlastHit<BlastHsp<TBlastSpec,TInfoSpec>,StoreReport<TInfoSpec> > Type;
+	};
+///////////////////////////////////////////////////////////////////
+
+
+template<typename TBlastHsp, typename TSpec>
+struct Hsp<BlastReport<TBlastHsp, TSpec> > 
+{
+	typedef TBlastHsp Type;
+};
+
+template<typename TBlastHsp, typename TSpec>
+struct Hsp<BlastReport<TBlastHsp, TSpec> const> 
+{
+	typedef TBlastHsp Type;
+};
+
+
+
+///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////
+
+
+
+template<typename TBlastHsp>
+class BlastReport<TBlastHsp, StoreReport<BasicInfo> > 
+{
+	public:
+		typedef BlastHit<TBlastHsp, StoreReport<BasicInfo> > TBlastHit;
+	
+		String<TBlastHit> hits;
+		String<char> query_name;
+		String<char> db_name;
+			
+		bool next_report;
+
+		BlastReport()
+		{
+			next_report = true;
+		}
+
+		BlastReport(BlastReport const& other)
+		{
+		SEQAN_CHECKPOINT
+			assign(hits,other.hits);
+			query_name = other.query_name;
+			db_name = other.db_name;
+			next_report = other.next_report;
+		}
+
+		BlastReport & operator = (BlastReport const& other)
+		{
+		SEQAN_CHECKPOINT
+			assign(hits,other.hits);
+			query_name = other.query_name;
+			db_name = other.db_name;
+			next_report = other.next_report;
+			return *this;
+		}
+
+//		BlastReport(const char * file_name)
+//		{
+//			std::fstream strm; 
+//		strm.open(file_name,::std::ios_base::in |::std::ios_base::binary);
+//			read(strm, *this, Blast());
+//			strm.close();
+//
+//		}
+//
+//		template<typename TFile>
+//		BlastReport(TFile & file)
+//		{
+////			std::fstream strm; 
+//			//strm.open(file_name,ios_base::in |ios_base::binary);
+//			read(file, *this, Blast());
+////			strm.close();
+//
+//		}
+
+		~BlastReport()
+		{
+		SEQAN_CHECKPOINT
+		}
+
+
+};
+
+
+
+template<typename TBlastHsp>
+inline void
+clear(BlastReport<TBlastHsp, StoreReport<BasicInfo> >& blastObj)
+{
+SEQAN_CHECKPOINT
+	
+	for(unsigned int i = 0; i < length(blastObj.hits); ++i)
+		clear(blastObj.hits[i]);
+	resize(blastObj.hits,0);
+	resize(blastObj.query_name,0);
+	resize(blastObj.db_name,0);
+	blastObj.next_report = true;
+}
+
+
+/////////////////////////// reading //////////////////////////
+
+
+template<typename TFile, typename TChar, typename TBlastHsp>
+void
+_readParameters(TFile & file,
+				TChar & c,
+                BlastReport<TBlastHsp, StoreReport<FullInfo> >& blastObj) 
+{
+SEQAN_CHECKPOINT
+	float pfloat;
+
+	String<char> search = "Lambda";
+	if(_parseUntilBeginLine(file,c,search,6))
+	{
+		_parseSkipLine(file, c);
+		_parseSkipWhitespace(file,c);
+		pfloat = _parseReadFloat(file,c);
+		blastObj.lambda = pfloat;
+		_parseSkipWhitespace(file,c);
+		pfloat = _parseReadFloat(file,c);
+		blastObj.k = pfloat;
+		_parseSkipWhitespace(file,c);
+		pfloat = _parseReadFloat(file,c);
+		blastObj.h = pfloat;
+		if(_parseUntilBeginLine(file,c,search,6,4))
+		{
+			_parseSkipLine(file, c);
+			_parseSkipWhitespace(file,c);
+			pfloat = _parseReadFloat(file,c);
+			blastObj.gapped_lambda = pfloat;
+			_parseSkipWhitespace(file,c);
+			pfloat = _parseReadFloat(file,c);
+			blastObj.gapped_k = pfloat;
+			_parseSkipWhitespace(file,c);
+			pfloat = _parseReadFloat(file,c);
+			blastObj.gapped_h = pfloat;
+		
+		}
+		
+	}
+
+//	Matrix: blastn matrix:1 -3
+	search = "Matrix";
+	if(_parseUntilBeginLine(file,c,search,6))
+	{
+		c = _streamGet(file);
+		_parseSkipWhitespace(file,c);
+		String<char> matrix_string = _parseReadWord(file, c);
+		while (!_streamEOF(file) && c != '\n' && c != '\r')
+			matrix_string += _parseReadWord(file, c);
+		blastObj.matrix = matrix_string;
+	}
+
+
+	search = "Gap";
+	if(_parseUntilBeginLine(file,c,search,3))
+	{
+		_parseSkipWhitespace(file,c);
+		String<char> pword = _parseReadWord(file,c);
+		if(pword == "Penalties"){
+			blastObj.allow_gaps = true;
+			c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pword = _parseReadWord(file,c);
+			if(pword == "Existence"){
+				c = _streamGet(file);
+				_parseSkipWhitespace(file,c);
+				pfloat = _parseReadFloat(file,c);
+				blastObj.gap_open = pfloat;
+			}
+			c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pword = _parseReadWord(file,c);
+			if(pword == "Extension"){
+				c = _streamGet(file);
+				_parseSkipWhitespace(file,c);
+				pfloat = _parseReadFloat(file,c);
+				blastObj.gap_extension = pfloat;
+			}
+		}
+	}
+
+	search = "than";
+	if(_parseUntil(file,c,search,4))
+	{
+		_parseSkipWhitespace(file,c);
+		blastObj.min_expect = _parseReadEValue(file,c);
+	}
+
+
+}
+
+
+
+template<typename TFile, typename TChar, typename TBlastHsp>
+void
+_readParameters(TFile & ,
+				TChar & ,
+                BlastReport<TBlastHsp, StoreReport<BasicInfo> >& ) 
+{
+SEQAN_CHECKPOINT
+	return;
+}
+
+
+
+/**
+.Function.read:
+..cat:Blast
+..include:seqan/blast.h
+*/
+template<typename TFile, typename TBlastHsp, typename TInfoSpec>
+void 
+read(TFile & file,
+	 BlastReport<TBlastHsp, StoreReport<TInfoSpec> >& blastObj,
+	 Tag<TagBlast_>) 
+{
+SEQAN_CHECKPOINT
+	typedef BlastReport<TBlastHsp, StoreReport<TInfoSpec> > TBlastReport;
+//	typedef BlastReport<TBlastHsp, StoreReport<FullInfo> > TBlastReport;
+//	typedef TBlastReport::TBlastHit TBlastHit;
+//	typedef BlastHit<TBlastHsp,StoreReport> TBlastHit;
+	typedef typename Hit<TBlastReport>::Type TBlastHit;
+	typedef typename Position<TFile>::Type TPosition;
+	typedef typename Value<TFile>::Type TValue;
+
+	clear(blastObj);
+	blastObj.next_report = false;
+	TValue c;
+
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+
+	String<char> query_name, db_name;
+
+	//get query and database names
+	_parseReadQueryAndDBName(file,c,query_name,db_name);
+	blastObj.query_name = query_name;
+	blastObj.db_name = db_name;
+
+	TPosition after_dbquery_pos = _streamTellG(file);
+	TPosition next_report_pos = 0;
+
+	String<char> delim = "Reference";
+	if(_parseUntilBeginLine(file,c,delim,9))
+	{
+		next_report_pos = _streamTellG(file);
+		blastObj.next_report = true;
+	}
+
+	_streamSeekG(file,after_dbquery_pos);
+
+	//get all hits
+	if(_parseUntilBeginLine(file,c,'>'))
+	{
+		if(!blastObj.next_report || _streamTellG(file) < next_report_pos)
+		{
+			bool hits_left = true;
+			TPosition act_hit_pos;
+			TPosition next_hit_pos;
+			while(hits_left){
+				act_hit_pos = _streamTellG(file);
+				TBlastHit hit;
+				next_hit_pos = _parseBlastHit(file,c,hit);
+				//resize(blastObj.hits,length(blastObj.hits)+1);
+				//blastObj.hits[length(blastObj.hits)-1] = hit;
+				appendValue(blastObj.hits,hit);
+				if(next_hit_pos == act_hit_pos)
+					hits_left = false;
+				if(next_hit_pos == (TPosition)0)
+				{
+					hits_left = false;
+					act_hit_pos = next_report_pos;
+				}
+			}
+			_streamSeekG(file,act_hit_pos);
+		}
+		else
+			_streamSeekG(file,next_report_pos);
+	}
+	
+	//get some more values
+	if(!blastObj.next_report)
+		_readParameters(file,c,blastObj) ;
+
+
+}
+
+
+/////////////////////////// writing //////////////////////////
+//
+
+
+//template <typename TStream>
+//inline void
+//_streamPutFloatBlast(TStream & target,
+//			float number, 
+//			char const * format_string)
+//{
+//	char str[32];
+//	sprintf(str, format_string, number);
+//	_streamWrite(target, str);
+//}
+//
+//template <typename TStream>
+//inline void
+//_streamPutFloatBlast(TStream & target,
+//			float number)
+//{
+//	_streamPutFloatBlast(target, number, "%f");
+//}
+//
+//
+//template <typename TFile, typename TBlastSpec>
+//inline void
+//_streamPutHspInfo(TFile & target,
+//				  BlastHsp<TBlastSpec,BasicInfo> const & hsp)
+//{
+//			_streamWrite(target,"\n\te-val: ");
+//			//todo: e value ausgabe weil doof
+//			_streamPutFloatBlast(target,hsp.expect);
+//			_streamPut(target,'\n');
+//}
+//
+//
+//
+//
+//template <typename TFile, typename TBlastSpec>
+//inline void
+//_streamPutHspInfo(TFile & target,
+//				  BlastHsp<TBlastSpec,FullInfo> const & hsp)
+//{
+//			_streamWrite(target,"\n\tScore: ");
+//			_streamPutFloatBlast(target,(float)hsp.bits, "%.2f");
+//			_streamWrite(target," bits (");
+//			_streamPutFloatBlast(target,hsp.score, "%.1f");
+//			_streamPut(target,')');
+//			_streamWrite(target,"\n\te-val: ");
+//			//todo: e value ausgabe weil doof
+//			_streamPutFloatBlast(target,hsp.expect);
+//			_streamPut(target,'\n');
+//}
+//
+//
+//template <typename TFile, typename TInfoSpec, typename TBlastHsp>
+//inline void
+//write(TFile & target,
+//	  BlastReport<TBlastHsp,StoreReport<TInfoSpec> > & blastObj, 
+//	  Blast)
+//{
+//
+//	typedef BlastReport<TBlastHsp,StoreReport<TInfoSpec> > TBlastReport;
+//	typedef typename Hit<TBlastReport>::Type TBlastHit;
+//	//typedef BlastHit<TBlastHsp,StoreReport> TBlastHit;
+//	typedef typename Iterator<TBlastReport,HitIterator>::Type THitIterator;
+//	typedef typename Iterator<TBlastHit,HspIterator>::Type THspIterator;
+//
+//	_streamWrite(target,"Query:    ");
+//	_streamWrite(target,blastObj.query_name);
+//	_streamPut(target, '\n');
+//
+//	_streamWrite(target,"Database: ");
+//	_streamWrite(target,blastObj.db_name);
+//	_streamWrite(target, "\n\n");
+//
+//	int hit_count = 1;
+//	THitIterator hit_it(blastObj); 
+//	for(goBegin(hit_it); !atEnd(hit_it); goNext(hit_it)) 
+//	{
+//		TBlastHit hit = getValue(hit_it);
+//		int hsp_count = 1;
+//		_streamPutInt(target, hit_count);
+//		_streamWrite(target,". Hit: ");
+//		_streamWrite(target,hit.name);
+//		//_streamWrite(target,(*hit_it).name);
+//		_streamPut(target,'\n');
+//		THspIterator hsp_it(hit);
+//		for(goBegin(hsp_it); !atEnd(hsp_it); goNext(hsp_it)) 
+//		{
+//			TBlastHsp hsp = getValue(hsp_it);
+//			_streamPut(target,'\t');
+//			_streamPut(target,'\n');
+//			_streamWrite(target,"    HSP ");
+//			_streamPutInt(target, hsp_count);
+//			_streamWrite(target,":\n\tQuery: ");
+//			_streamPutInt(target,hsp.query_begin);
+//			_streamWrite(target,"...");
+//			_streamPutInt(target,hsp.query_end);
+//			_streamWrite(target,"\n\tSbjct: ");
+//			_streamPutInt(target,hsp.db_begin);
+//			_streamWrite(target,"...");
+//			_streamPutInt(target,hsp.db_end);
+//			_streamPut(target,'\n');
+//
+//			_streamPutHspInfo(target,hsp);
+//
+//			_streamPut(target,'\n');
+//			_streamWrite(target,"\tAlignment:\n\t");
+//			_streamWrite(target,hsp.query_string);
+//			_streamWrite(target,"\n\t");
+//			_streamWrite(target,hsp.db_string);
+//			_streamPut(target,'\n');
+//			_streamPut(target,'\n');
+//			++hsp_count;
+//		}
+//		_streamPut(target,'\n');
+//		++hit_count;
+//	}
+//	
+//}
+//
+//
+//template <typename TStream, typename TBlastHsp, typename TInfoSpec>
+//inline TStream &
+//operator << (TStream & target, 
+//			 BlastReport<TBlastHsp,StoreReport<TInfoSpec> >& source)
+//{
+//	write(target, source, Blast());
+//	return target;
+//}
+
+
+///////////////////////// loads of get functions ////////////////////
+
+// for all BlastReports
+
+/**
+.Function.queryName:
+..cat:Blast
+..summary:Reference to the name (identifier) of the query in a Blast report.
+..signature:queryName(blastReport);
+..param.blastReport:A Blast Report.
+...type:Class.BlastReport
+..returns:The name (identifier) of the query.
+...type:Shortcut.CharString
+..see:Function.getQueryName
+..see:Function.databaseName
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TSpec>
+inline String<char> & 
+queryName(BlastReport<TBlastHsp,TSpec> & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.query_name;
+}
+
+/**
+.Function.getQueryName:
+..cat:Blast
+..summary:The name (identifier) of the query in a Blast report.
+..signature:getQueryName(blastReport);
+..param.blastReport:A Blast Report.
+...type:Class.BlastReport
+..returns:The name (identifier) of the query.
+...type:Shortcut.CharString
+..see:Function.queryName
+..see:Function.getDatabaseName
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TSpec>
+inline String<char> 
+getQueryName(BlastReport<TBlastHsp,TSpec> & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.query_name;
+}		
+
+/**
+.Function.databaseName:
+..cat:Blast
+..summary:Reference to the name (identifier) of the database in a Blast report.
+..signature:databaseName(blastReport);
+..param.blastReport:A Blast Report.
+...type:Class.BlastReport
+..returns:The name of the database.
+...type:Shortcut.CharString
+..see:Function.queryName
+..see:Function.getDatabaseName
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TSpec>
+inline String<char> & 
+databaseName(BlastReport<TBlastHsp,TSpec> & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.db_name;
+}
+
+/**
+.Function.getDatabaseName:
+..cat:Blast
+..summary:The name (identifier) of the database in a Blast report.
+..signature:getDatabaseName(blastReport);
+..param.blastReport:A Blast Report.
+...type:Class.BlastReport
+..returns:The name of the database.
+...type:Shortcut.CharString
+..see:Function.queryName
+..see:Function.getDatabaseName
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TSpec>
+inline String<char> 
+getDatabaseName(BlastReport<TBlastHsp,TSpec> & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.db_name;
+}		
+
+
+//for StoreReport only
+/**
+.Function.numHits:
+..cat:Blast
+..summary:The total number of hits in a Blast report.
+..signature:numHits(blastReport);
+..param.blastReport:A Blast Report.
+...type:Spec.StoreReport
+..returns:The number of hits (unsigned int).
+..see:Function.numHsps
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TInfoSpec>
+inline unsigned int
+numHits(BlastReport<TBlastHsp,StoreReport<TInfoSpec> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return length(blastObj.hits);
+}		
+
+
+/**
+.Function.numHsps:
+..cat:Blast
+..summary:The number of HSPs for an entire Blast report or for one Blast hit.
+..signature:numHits(blastObj);
+..param.blastObj:A Blast report or a Blast hit.
+...type:Spec.StoreReport
+..returns:The number of hsps (unsigned int)
+..see:Function.numHits
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TInfoSpec>
+inline unsigned int
+numHsps(BlastReport<TBlastHsp,StoreReport<TInfoSpec> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	unsigned int count = 0;
+	for(unsigned int i = 0; i < length(blastObj.hits); ++i)
+		count += numHsps(blastObj.hits[i]);
+	return count;
+}		
+		
+
+
+
+// /**
+//.Function.eValueCutoff:
+//..cat:Blast
+//..summary:The Expect-Value cutoff of a Blast report.
+//..signature:eValueCutoff(blastReport);
+//..param.blastReport:A Blast Report.
+//...type:Spec.StoreReport
+//..returns:The E-value cutoff (read from the Blast report file).
+//...type:double
+//*/
+//for StoreReport FullInfo only
+template<typename TBlastHsp>
+inline double & 
+eValueCutoff(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.min_expect;
+}
+
+
+/**
+.Function.getEValueCutoff:
+..cat:Blast
+..summary:The Expect-Value cutoff parsed from a Blast report.
+..signature:getEValueCutoff(blastReport);
+..param.blastReport:A Blast Report.
+...type:Spec.StoreReport
+..returns:The E-value cutoff (read from the Blast report file).
+...type:nolink:double
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp>
+inline double
+getEValueCutoff(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.min_expect;
+}		
+
+template<typename TBlastHsp>
+inline String<char> & 
+matrixName(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.matrix;
+}
+
+template<typename TBlastHsp>
+inline String<char> 
+getMatrixName(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.matrix;
+}		
+
+template<typename TBlastHsp>
+inline float &
+gapOpen(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+    return blastObj.gap_open;
+}		
+
+/**
+.Function.getGetOpen:
+..cat:Blast
+..summary:The gap open penalty parsed from a Blast report.
+..signature:getGapOpen(blastReport);
+..param.blastReport:A Blast Report.
+...type:Spec.StoreReport
+..returns:The gap open penalty.
+...type:nolink:float
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp>
+inline float 
+getGapOpen(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+    return blastObj.gap_open;
+}		
+
+template<typename TBlastHsp>
+inline float &
+gapExtension(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.gap_extension;
+}		
+
+
+/**
+.Function.getGetExtension:
+..cat:Blast
+..summary:The gap extension penalty parsed from a Blast report.
+..signature:getGapExtension(blastReport);
+..param.blastReport:A Blast Report.
+...type:Spec.StoreReport
+..returns:The gap open penalty.
+...type:nolink:float
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp>
+inline float 
+getGapExtension(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+    return blastObj.gap_extension;
+}		
+
+
+template<typename TBlastHsp>
+inline bool
+gapsAllowed(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.allow_gaps;
+}		
+
+
+template<typename TBlastHsp>
+inline float &
+lambda(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.lambda;
+}		
+
+/**
+.Function.getLambda:
+..cat:Blast
+..summary:The lambda value parsed from a Blast report.
+..signature:getLambda(blastReport);
+..param.blastReport:A Blast Report.
+...type:Spec.StoreReport
+..returns:The lambda value.
+...type:nolink:float
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp>
+inline float
+getLambda(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.lambda;
+}		
+
+
+template<typename TBlastHsp>
+inline float &
+gappedLambda(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.gapped_lambda;
+}		
+
+/**
+.Function.getGappedLambda:
+..cat:Blast
+..summary:The lambda value parsed from a Blast report.
+..signature:getGappedLambda(blastReport);
+..param.blastReport:A Blast Report.
+...type:Spec.StoreReport
+..returns:The gapped lambda value.
+...type:nolink:float
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp>
+inline float
+getGappedLambda(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.gapped_lambda;
+}		
+
+
+
+template<typename TBlastHsp>
+inline float &
+kappa(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.k;
+}		
+
+
+/**
+.Function.getKappa:
+..cat:Blast
+..summary:The kappa value parsed from a Blast report.
+..signature:getKappa(blastReport);
+..param.blastReport:A Blast Report.
+...type:Spec.StoreReport
+..returns:The kappa value.
+...type:nolink:float
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp>
+inline float
+getKappa(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.k;
+}		
+
+
+template<typename TBlastHsp>
+inline float &
+gappedKappa(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.gapped_k;
+}		
+
+/**
+.Function.getGappedKappa:
+..cat:Blast
+..summary:The gapped kappa value parsed from a Blast report.
+..signature:getGappedKappa(blastReport);
+..param.blastReport:A Blast Report.
+...type:Spec.StoreReport
+..returns:The gapped kappa value.
+...type:nolink:float
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp>
+inline float
+getGappedKappa(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.gapped_k;
+}		
+
+
+template<typename TBlastHsp>
+inline float &
+entropy(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.h;
+}		
+
+template<typename TBlastHsp>
+inline float
+getEntropy(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.h;
+}		
+
+
+template<typename TBlastHsp>
+inline float &
+gappedEntropy(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.gapped_h;
+}		
+
+template<typename TBlastHsp>
+inline float
+getGappedEntropy(BlastReport<TBlastHsp,StoreReport<FullInfo> > & blastObj)
+{
+SEQAN_CHECKPOINT
+	return blastObj.gapped_h;
+}		
+
+
+
+
+
+/**
+.Function.atEnd:
+..cat:Blast
+..signature:atEnd(file,object);
+..param.file:A file stream.
+..param.it:A Blast report.
+...type:Class.BlastReport
+..see:Function.getNext
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TSpec, typename TFile>
+inline bool
+atEnd(TFile & file,
+	  BlastReport<TBlastHsp,TSpec> & blast)
+{
+SEQAN_CHECKPOINT
+
+	return !blast.next_report || _streamEOF(file);
+}
+
+
+/**
+.Function.getNext:
+..cat:Blast
+..summary:Get next Blast report from a file containing multiple Blast reports.
+..signature:getNext(file,blastReport);
+..param.file:A file stream.
+..param.blastReport:A Blast report.
+...type:Class.BlastReport
+..returns:The result is stored in parameter blastReport.
+..see:Function.atEnd
+..include:seqan/blast.h
+*/
+template<typename TBlastHsp, typename TSpec, typename TFile>
+inline void
+getNext(TFile & file,
+        BlastReport<TBlastHsp,TSpec> & blast)
+{
+SEQAN_CHECKPOINT
+	read(file,blast,Blast());
+}
+
+
+
+
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_run.h b/src/SeqAn-1.3/seqan/blast/blast_run.h
new file mode 100644
index 0000000..93b284c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_run.h
@@ -0,0 +1,418 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_RUN_H
+#define SEQAN_HEADER_BLAST_RUN_H
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Different Blast Program Types
+//////////////////////////////////////////////////////////////////////////////
+
+// DNA alignments
+// blastn compares a nucleotide query sequence against a nucleotide sequence database
+struct TagRunBlastN_;
+typedef Tag<TagRunBlastN_> const RunBlastN;
+// megablast
+struct TagRunMegaBlast_;
+typedef Tag<TagRunMegaBlast_> const RunMegaBlast;
+//blat
+struct TagRunBlat_;
+typedef Tag<TagRunBlat_> const RunBlat;
+
+// Protein alignments
+// blastp compares an amino acid query sequence against a protein sequence database
+struct TagRunBlastP_;
+typedef Tag<TagRunBlastP_> const RunBlastP;
+// blastx compares a nucleotide query sequence translated in all reading frames against a protein sequence database
+struct TagRunBlastX_;
+typedef Tag<TagRunBlastX_> const RunBlastX;
+// tblastn compares a protein query sequence against a nucleotide sequence database dynamically translated in all reading frames
+struct TagRunTBlastN_;
+typedef Tag<TagRunTBlastN_> const RunTBlastN;
+// tblastx compares the six-frame translations of a nucleotide query sequence against the six-frame translations of a nucleotide sequence database. Please note that tblastx program cannot be used with the nr database on the BLAST Web page.
+struct TagRunTBlastX_;
+typedef Tag<TagRunTBlastX_> const RunTBlastX;
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast Program Calls
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+//blastn
+template<typename TString, typename TPath1, typename TPath, typename TParamString>
+void
+_runBlast(TPath1 blast_path,
+	TPath db_path,
+	TString db_name,
+	TPath query_path,
+	TString query_name,
+	TPath out_path,
+	TString outfile_name,
+	Tag<TagRunBlastN_>,
+	TParamString params)
+{
+SEQAN_CHECKPOINT
+
+
+	std::stringstream blastcall;
+	blastcall << blast_path << "blastall"; 
+	blastcall << " -p blastn"; 
+	blastcall << " -d " << db_path << db_name; 
+	blastcall << " -i " << query_path << query_name; 
+	blastcall << " -o " << out_path << outfile_name; 
+	blastcall << " " << params; 
+	//process params?
+
+	std::cout <<"\n"<< blastcall.str()<<"\n";
+	system((blastcall.str()).c_str());	
+
+
+}
+	
+//run without saving the blast report file (saves temporarily)
+template<typename TBlast, typename TBlastReport, typename TString, typename TParamString>
+void
+run(Tag<TBlast> tag,
+	TString blast_path,
+	TString db_path,
+	TString db_name,
+	TString query_path,
+	TString query_name,
+	TBlastReport & blastObj, //BlastReport<BlastHsp<BlastN,THspInfoSpec>,TStoreSpec,TInfoSpec >
+	TParamString params)
+{
+SEQAN_CHECKPOINT
+
+#ifdef PLATFORM_WINDOWS
+	String<char> out_path(blast_path);
+	String<char> out_path2("D:\\emde\\blast\\bin\\data\\");
+#else
+	String<char> out_path(blast_path);
+#endif
+
+	String<char> outfile_name = "tempseqanblast.out";
+
+	_runBlast(blast_path,db_path,db_name,query_path,query_name,out_path,outfile_name,tag,params);
+
+	std::fstream strm;
+	std::stringstream s;
+	s <<out_path<< outfile_name; 
+
+	strm.open((s.str()).c_str(),::std::ios_base::in);
+	read(strm,blastObj, Blast());
+
+}
+	
+//run without saving the blast report file (saves temporarily)
+template<typename TBlast, typename TBlastReport, typename TString, typename TParamString>
+void
+run(Tag<TBlast> tag,
+	TString blast_path,
+	TString db_path,
+	TString db_name,
+	TString query_path,
+	TString query_name,
+	TBlastReport & blastObj)
+{
+	SEQAN_CHECKPOINT;
+	run(tag, blast_path, db_path, db_name, query_path, query_name, blastObj);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+//megablast
+template<typename TString, typename TPath1, typename TPath, typename TParamString>
+void
+_runBlast(TPath1 blast_path,
+	TPath db_path,
+	TString db_name,
+	TPath query_path,
+	TString query_name,
+	TPath out_path,
+	TString outfile_name,
+	Tag<TagRunMegaBlast_>,
+	TParamString params)
+{
+SEQAN_CHECKPOINT
+
+	std::stringstream blastcall;
+	blastcall << blast_path << "megablast"; 
+	blastcall << " -d " << db_path << db_name; 
+	blastcall << " -i " << query_path << query_name; 
+	blastcall << " -o " << out_path << outfile_name; 
+	blastcall << " " << params; 
+
+	//process params
+
+	system((blastcall.str()).c_str());	
+
+
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//blat
+template<typename TString, typename TPath1, typename TPath, typename TParamString>
+void
+_runBlat(TPath1 blat_path,
+	TPath db_path,
+	TString db_name,
+	TPath query_path,
+	TString query_name,
+	TPath out_path,
+	TString outfile_name,
+	Tag<TagRunBlat_>,
+	TParamString params)
+{
+SEQAN_CHECKPOINT
+
+	std::stringstream blatcall;
+	blatcall << blat_path << "blat "; 
+	blatcall << db_path << db_name<<" "; 
+	blatcall << query_path << query_name<<" "; 
+	blatcall << " " << params; 
+	blatcall << " -out=blast " << out_path << outfile_name; 
+	
+	//process params
+
+	std::cout << blatcall.str() << "\n";
+	system((blatcall.str()).c_str());	
+
+
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+//blastp
+template<typename TString, typename TPath1, typename TPath, typename TParamString>
+void
+_runBlast(TPath1 blast_path,
+	TPath db_path,
+	TString db_name,
+	TPath query_path,
+	TString query_name,
+	TPath out_path,
+	TString outfile_name,
+	Tag<TagRunBlastP_>,
+	TParamString params)
+{
+SEQAN_CHECKPOINT
+
+
+	std::stringstream blastcall;
+	blastcall << blast_path << "blastall"; 
+	blastcall << " -p blastp"; 
+	blastcall << " -d " << db_path << db_name; 
+	blastcall << " -i " << query_path << query_name; 
+	blastcall << " -o " << out_path << outfile_name; 
+	blastcall << " " << params; 
+
+	//process params
+
+	system((blastcall.str()).c_str());	
+
+
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+//tblastn
+template<typename TString, typename TPath1, typename TPath, typename TParamString>
+void
+_runBlast(TPath1 blast_path,
+	TPath db_path,
+	TString db_name,
+	TPath query_path,
+	TString query_name,
+	TPath out_path,
+	TString outfile_name,
+	Tag<TagRunTBlastN_>,
+	TParamString params)
+{
+SEQAN_CHECKPOINT
+
+
+	std::stringstream blastcall;
+	blastcall << blast_path << "blastall"; 
+	blastcall << " -p tblastn"; 
+	blastcall << " -d " << db_path << db_name; 
+	blastcall << " -i " << query_path << query_name; 
+	blastcall << " -o " << out_path << outfile_name; 
+	blastcall << " " << params; 
+
+	//process params
+
+	system((blastcall.str()).c_str());	
+
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+//tblastx
+template<typename TString, typename TPath1, typename TPath, typename TParamString>
+void
+_runBlast(TPath1 blast_path,
+	TPath db_path,
+	TString db_name,
+	TPath query_path,
+	TString query_name,
+	TPath out_path,
+	TString outfile_name,
+	Tag<TagRunTBlastX_>,
+	TParamString params)
+{
+SEQAN_CHECKPOINT
+
+
+	std::stringstream blastcall;
+	blastcall << blast_path << "blastall"; 
+	blastcall << " -p tblastx"; 
+	blastcall << " -d " << db_path << db_name; 
+	blastcall << " -i " << query_path << query_name; 
+	blastcall << " -o " << out_path << outfile_name; 
+	blastcall << " " << params; 
+	//process params
+
+	system((blastcall.str()).c_str());	
+
+
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//blastx
+template<typename TString, typename TPath1, typename TPath, typename TParamString>
+void
+_runBlast(TPath1 blast_path,
+	TPath db_path,
+	TString db_name,
+	TPath query_path,
+	TString query_name,
+	TPath out_path,
+	TString outfile_name,
+	Tag<TagRunBlastX_>,
+	TParamString params)
+{
+SEQAN_CHECKPOINT
+
+
+	std::stringstream blastcall;
+	blastcall << blast_path << "blastall"; 
+	blastcall << " -p blastx"; 
+	blastcall << " -d " << db_path << db_name; 
+	blastcall << " -i " << query_path << query_name; 
+	blastcall << " -o " << out_path << outfile_name; 
+	blastcall << " " << params; 
+
+	//process params
+
+	system((blastcall.str()).c_str());	
+
+
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//formatdb
+template<typename TStr,typename TString, typename TParamString>
+void
+_runFormatDB(TStr blast_path,
+			 TStr db_path,
+			 TString db_file,
+			 TParamString params)
+{
+SEQAN_CHECKPOINT
+
+
+	std::stringstream blastcall;
+	blastcall << blast_path << "formatdb "; 
+	blastcall << " -i " <<db_path << db_file; 
+	blastcall << " " << params; 
+
+	//process params
+
+	system((blastcall.str()).c_str());	
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_stream_hit.h b/src/SeqAn-1.3/seqan/blast/blast_stream_hit.h
new file mode 100644
index 0000000..b67a2ab
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_stream_hit.h
@@ -0,0 +1,135 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_STREAM_HIT_H
+#define SEQAN_HEADER_BLAST_STREAM_HIT_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+//  Blast Hit storing only one hsp at a time
+////////////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TFile>
+class BlastHit<TBlastHsp, StreamReport<TFile> > 
+{
+	public:
+		typedef typename Position<TFile>::Type TPosition_;
+
+		String<char> name;
+		unsigned int length; //length of whole sequence  
+		TBlastHsp act_hsp;
+		TPosition_ begin_pos, first_hsp_pos;
+		
+		BlastReport<TBlastHsp,StreamReport<TFile> >* data_host;
+
+	
+		BlastHit()
+		{
+		}
+
+		~BlastHit()
+		{
+		}
+
+};
+
+
+
+
+//parse BlastHit
+template<typename TFile, typename TChar, typename TBlastSpec>
+inline typename Position<TFile>::Type
+_parseBlastHit(TFile & file,
+			TChar & c, 
+			BlastHit<TBlastSpec,StreamReport<TFile> > & hit)
+{
+	typedef typename Position<TFile>::Type TPosition;
+	typedef BlastHit<TBlastSpec,StreamReport<TFile> > TBlastHit;
+	typedef typename Hsp<TBlastHit>::Type TBlastHsp;
+
+	String<char> pword;
+	int pint;
+	TPosition start_pos,act_pos;
+	act_pos = _streamTellG(file);
+
+	if(_parseUntilBeginLine(file,c,'>'))
+	{
+		hit.begin_pos = _streamTellG(file);
+		c = _streamGet(file);
+		pword = _parseReadWord(file, c);
+		while (!_streamEOF(file) && c != '\n' && c != '\r')
+			pword += _parseReadWord(file, c);
+		if(pword[length(pword)-1] == ' ')
+			resize(pword,length(pword)-1);
+		hit.name = pword;
+		_parseSkipWhitespace(file,c);
+		String<char> search = "Length";
+		if(_parseUntilBeginLine(file,c,search,6))
+		{
+			_parseSkipWhitespace(file,c);
+			if(c == '=')
+				c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			pint = _parseReadNumber(file, c);
+			hit.length = pint;
+		}
+//		TPosition temp = _streamTellG(file);
+		//foreach Hsp
+		//if(_parseUntilBeginLine(file,c,'S') && _parseReadWord(file,c)=="Score")
+		search = "Score";
+		if(_parseUntilBeginLine(file,c,search,5))
+		{
+			hit.first_hsp_pos = _streamTellG(file);
+			//if(_parseUntilBeginLine(file,c,'>'))
+			//	return _streamTellG(file);
+		}
+
+		
+	}//end hit
+	_streamSeekG(file,act_pos);
+	c = '>';
+	return act_pos;
+}
+
+
+
+
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_stream_hit_iterator.h b/src/SeqAn-1.3/seqan/blast/blast_stream_hit_iterator.h
new file mode 100644
index 0000000..0ff89dc
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_stream_hit_iterator.h
@@ -0,0 +1,453 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_STREAM_HIT_ITERATOR_H
+#define SEQAN_HEADER_BLAST_STREAM_HIT_ITERATOR_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast Stream Hit Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////**
+//.Spec.HitIterator:
+//..cat:Blast
+//..summary:Hit iterator for @Class.BlastReport at .
+//..signature:Iterator<TBlastReport, HitIterator>
+//..param.TBlastReport:A Blast report container.
+//...type:Class.BlastReport
+//..general:Class.Iter
+//*/
+template<typename TBlastHsp, typename TFile>
+class Iter<BlastReport<TBlastHsp, StreamReport<TFile> >, StreamBlastIterator<HitIterator> > 
+{
+public:
+	typedef BlastReport<TBlastHsp, StreamReport<TFile> > TBlastReport_;
+	typedef typename Hit<TBlastReport_>::Type TBlastHit_;
+	typedef typename Position<TFile>::Type TPosition_;
+
+	TBlastHit_ data_hit;
+	TBlastReport_* data_host;
+	TPosition_ data_pos, data_next_pos;
+	bool data_at_end;
+
+	Iter()	
+	{
+		data_at_end = false;
+	}
+	
+	Iter(TBlastReport_ & blast)  
+	{
+	SEQAN_CHECKPOINT
+		data_host = &blast; 
+		data_pos = blast.first_hit_pos;
+		data_next_pos = data_pos;
+		if(blast.hits_found)
+			data_at_end = false;
+		else
+			data_at_end = true;
+		data_hit.data_host = &blast;
+
+	}
+
+	Iter(Iter const& other) : 
+		data_host(other.data_host), 
+		data_pos(other.data_pos), 
+		data_next_pos(other.data_next_pos), 
+		data_at_end(other.data_at_end),
+		data_hit(other.data_hit)
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	~Iter() 
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & other) 
+	{
+	SEQAN_CHECKPOINT
+		if (this == &other) return *this;
+		data_host = other.data_host;
+		data_pos = other.data_pos;
+		data_next_pos = other.data_next_pos;
+		data_at_end = other.data_at_end;
+		data_hit = other.data_hit;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast StreamHitIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Host.param.T.type:Class.BlastReport
+template<typename TBlastReport>
+struct Host<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >
+{	
+	typedef TBlastReport Type;
+};
+
+
+
+
+template<typename TBlastHsp, typename TFile>
+struct Iterator<BlastReport<TBlastHsp,StreamReport<TFile> >, HitIterator>
+{	
+	typedef Iter<BlastReport<TBlastHsp,StreamReport<TFile> >, StreamBlastIterator<HitIterator> > Type;
+};
+
+template<typename TBlastHsp, typename TFile>
+struct Iterator<BlastReport<TBlastHsp,StreamReport<TFile> > const, HitIterator>
+{	
+	typedef Iter<BlastReport<TBlastHsp,StreamReport<TFile> > const, StreamBlastIterator<HitIterator> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TSpec>
+struct Value<Iter<BlastReport<TBlastHsp,TSpec>, StreamBlastIterator<HitIterator> > >
+{
+	typedef typename Hit<BlastReport<TBlastHsp,TSpec> >::Type Type;
+};
+
+template<typename TBlastHsp, typename TSpec>
+struct Value<Iter<BlastReport<TBlastHsp,TSpec> const, StreamBlastIterator<HitIterator> > >
+{
+	typedef typename Hit<BlastReport<TBlastHsp,TSpec> const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastReport>
+struct Reference<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >
+{
+	typedef typename Value<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >::Type& Type;
+};
+
+template<typename TBlastReport>
+struct Reference<Iter<TBlastReport const, StreamBlastIterator<HitIterator> > >
+{
+	typedef typename Value<Iter<TBlastReport const, StreamBlastIterator<HitIterator> > >::Type& Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastReport>
+struct GetValue<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >
+{
+	typedef typename Value<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >::Type Type;
+};
+
+template<typename TBlastReport>
+struct GetValue<Iter<TBlastReport const, StreamBlastIterator<HitIterator> > >
+{
+	typedef typename Value<Iter<TBlastReport const, StreamBlastIterator<HitIterator> > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast StreamBlastIterator<HitIterator> - FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.atBegin:
+..cat:Blast
+..signature:atBegin(file,it)
+..param.file:A file stream.
+..param.it:An iterator.
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastReport, typename TFile>
+inline bool
+atBegin(TFile &,
+		Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	return (it.data_pos == it.data_host->first_hit_pos);	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/**
+.Function.goBegin:
+..cat:Blast
+..signature:goBegin(file,it)
+..param.file:A file stream.
+..param.it:An iterator.
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastReport, typename TFile>
+inline void
+goBegin(TFile &,
+		Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_pos = it.data_host->first_hit_pos;
+	it.data_next_pos = it.data_pos;
+	if(it.data_host->hits_found)
+		it.data_at_end = false;
+	else
+		it.data_at_end = true;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.goNext:
+..cat:Blast
+..signature:goNext(file,it)
+..param.file:A file stream.
+..param.it:An iterator.
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastReport, typename TFile>
+inline void
+goNext(TFile & file, 
+	   Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(file,it)) 
+	{
+		if(it.data_pos == it.data_next_pos)
+			_getNextHitFilePos(file,it);
+		if(it.data_pos == it.data_next_pos)
+			it.data_at_end = true;
+		else
+            it.data_pos = it.data_next_pos;
+	}
+}
+
+///////////////////////////////////////////////////////////////////////
+
+//template<typename TBlastReport>
+//inline void
+//goPrevious(Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it)
+//{
+//	if (!atBegin(it)) --it.data_pos;
+//}
+//
+////////////////////////////////////////////////////////////////////////////////
+//
+////////////////////////////////////////////////////////////////////////////////
+//
+//template<typename TBlastReport>
+//inline Iter<TBlastReport, StreamBlastIterator<HitIterator> >
+//operator --(Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it, int)
+//{
+//	Iter<TBlastReport, StreamBlastIterator<HitIterator> > ret = it;
+//	goPrevious(it);
+//	return ret;
+//}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastReport>
+inline bool
+operator ==(Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it1,
+			Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_pos==it2.data_pos && it1.data_host==it2.data_host);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastReport>
+inline bool
+operator !=(Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it1,
+			Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_pos!=it2.data_pos || it1.data_host!=it2.data_host);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.getValue:
+..cat:Blast
+..signature:getValue(file,it)
+..param.file:A file stream.
+..param.it:An iterator.
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastReport, typename TFile>
+inline typename GetValue<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >::Type
+getValue(TFile & file,
+		 Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	if(it.data_pos != (it.data_hit).begin_pos)
+	{
+		_streamSeekG(file,it.data_pos);
+		it.data_host->act_c = '>';
+		_parseBlastHit(file,it.data_host->act_c,it.data_hit);
+		//if(_parseBlastHit(file,it.data_host->act_c,it.data_hit) == it.data_pos)
+		//	it.data_at_end = true;
+	}
+	return it.data_hit;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.value:
+..cat:Blast
+..signature:value(file,it)
+..param.file:A file stream.
+..param.it:An iterator.
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+template<typename TBlastReport, typename TFile>
+inline typename Reference<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >::Type
+value(TFile & file,
+	  Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	if(it.data_pos != (it.data_hit).begin_pos)
+		it.data_hit = getValue(file,it);
+	return it.data_hit;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TBlastReport>
+inline typename Host<Iter<TBlastReport, StreamBlastIterator<HitIterator> > >::Type &
+hostReport(Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	return *it.data_host;
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.atEnd:
+..cat:Blast
+..signature:atEnd(file,it)
+..param.file:A file stream.
+..param.it:An iterator.
+...type:Spec.HitIterator
+...type:Spec.HspIterator
+..include:seqan/blast.h
+*/
+
+template<typename TBlastReport, typename TFile>
+inline bool
+atEnd(TFile &,
+	  Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it)
+{
+SEQAN_CHECKPOINT
+//	return (it.data_last_pos != it.data_pos);	
+	return it.data_at_end;	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//template<typename TBlastReport>
+//inline void
+//goEnd(Iter<TBlastReport, StreamBlastIterator<HitIterator> >& it)
+//{
+//	it.data_pos = doof;
+//}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TFile>
+inline void
+_getNextHitFilePos(TFile & file,
+				  Iter<BlastReport<TBlastHsp, StreamReport<TFile> >, StreamBlastIterator<HitIterator> >& it)
+{
+	typedef typename Position<TFile>::Type TPosition;
+
+	_streamSeekG(file,it.data_pos);
+	char c = '>';
+	it.data_host->act_c = c;
+
+	_parseSkipWhitespace(file,c);
+	_parseSkipLine(file,c);
+
+//	String<char> delim = ">";
+	if(_parseUntilBeginLine(file,c,'>'))
+	{
+		TPosition event_pos = _streamTellG(file);
+		if(c=='>' && ( !it.data_host->next_report || (it.data_host->next_report && event_pos < it.data_host->next_report_pos)))
+			it.data_next_pos = event_pos;
+		else
+	        _streamSeekG(file,it.data_host->next_report_pos);
+
+	}//end hit
+	else
+        _streamSeekG(file,it.data_pos);
+
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_stream_hsp_iterator.h b/src/SeqAn-1.3/seqan/blast/blast_stream_hsp_iterator.h
new file mode 100644
index 0000000..3cafafe
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_stream_hsp_iterator.h
@@ -0,0 +1,435 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_STREAM_HSP_ITERATOR_H
+#define SEQAN_HEADER_BLAST_STREAM_HSP_ITERATOR_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast Hsp Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+////**
+//.Spec.HspIterator:
+//..cat:Blast
+//..summary:Hsp iterator for @Class.BlastHit at .
+//..signature:Iterator<TBlastHit, HspIterator>
+//..param.TBlastHit:A Blast hit.
+//...type:Class.BlastHit
+//..general:Class.Iter
+//*/
+template<typename TBlastHsp, typename TFile>
+class Iter<BlastHit<TBlastHsp,StreamReport<TFile> >, StreamBlastIterator<HspIterator> > 
+{
+public:
+
+	typedef BlastHit<TBlastHsp,StreamReport<TFile> > TBlastHit_;
+	typedef typename Position<TFile>::Type TPosition_;
+
+	TBlastHsp data_hsp;
+	TBlastHit_* data_host;
+	TPosition_ data_pos, data_next_pos, data_hsp_begin_pos;
+	bool data_at_end;
+
+
+	Iter()	
+	{
+	data_at_end = false;
+	}
+	
+	Iter(TBlastHit_ & blast) 
+	{
+	SEQAN_CHECKPOINT
+		data_host = &blast; 
+		data_pos = blast.first_hsp_pos;
+		data_next_pos = data_pos;
+		data_hsp_begin_pos = (TPosition_) 0;
+		data_at_end = false;
+	}
+
+	Iter(Iter const& other): 
+		data_host(other.data_host), 
+		data_pos(other.data_pos), 
+		data_next_pos(other.data_next_pos), 
+		data_at_end(other.data_at_end),
+		data_hsp(other.data_hsp),
+		data_hsp_begin_pos(other.data_hsp_begin_pos) 
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	~Iter() 
+	{
+	SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & other) 
+	{
+		SEQAN_CHECKPOINT
+		if (this == &other) return *this;
+		data_host = other.data_host;
+		data_pos = other.data_pos;
+		data_at_end = other.data_at_end;
+		data_hsp = other.data_hsp;
+		data_next_pos = other.data_next_pos;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast StreamHspIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TBlastHsp, typename TFile>
+struct Iterator<BlastHit<TBlastHsp,StreamReport<TFile> >, HspIterator>
+{	
+	typedef Iter<BlastHit<TBlastHsp,StreamReport<TFile> >, StreamBlastIterator<HspIterator> > Type;
+};
+
+template<typename TBlastHsp, typename TFile>
+struct Iterator<BlastHit<TBlastHsp,StreamReport<TFile> > const, HspIterator>
+{	
+	typedef Iter<BlastHit<TBlastHsp,StreamReport<TFile> >, StreamBlastIterator<HspIterator> > Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TFile>
+struct Iterator<BlastReport<TBlastHsp,StreamReport<TFile> >, HspIterator>
+{	
+	typedef Iter<typename Hit<BlastReport<TBlastHsp,StreamReport<TFile> > >::Type, StreamBlastIterator<HspIterator> > Type;
+};
+
+template<typename TBlastHsp, typename TFile>
+struct Iterator<BlastReport<TBlastHsp,StreamReport<TFile> > const, HspIterator>
+{	
+	typedef Iter<typename Hit<BlastReport<TBlastHsp,StreamReport<TFile> > >::Type, StreamBlastIterator<HspIterator> > Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+template<typename TBlastHsp, typename TFile>
+struct Value<Iter<BlastHit<TBlastHsp,StreamReport<TFile> >, StreamBlastIterator<HspIterator> > >
+{
+	typedef TBlastHsp Type;
+};
+
+template<typename TBlastHsp, typename TFile>
+struct Value<Iter<BlastHit<TBlastHsp,StreamReport<TFile> > const, StreamBlastIterator<HspIterator> > >
+{
+	typedef TBlastHsp Type;
+};
+
+
+
+
+
+
+
+
+
+///.Metafunction.Host.param.T.type:Class.BlastHit
+template<typename TBlastHit>
+struct Host<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >
+{	
+	typedef TBlastHit Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHit>
+struct Reference<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >
+{
+	typedef typename Value<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >::Type& Type;
+};
+
+template<typename TBlastHit>
+struct Reference<Iter<TBlastHit const, StreamBlastIterator<HspIterator> > >
+{
+	typedef typename Value<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >::Type& Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHit>
+struct GetValue<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >
+{
+	typedef typename Value<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >::Type Type;
+};
+
+template<typename TBlastHit>
+struct GetValue<Iter<TBlastHit const, StreamBlastIterator<HspIterator> > >
+{
+	typedef typename Value<Iter<TBlastHit const, StreamBlastIterator<HspIterator> > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Blast StreamBlastIterator<HspIterator> - FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHit, typename TFile>
+inline bool
+atBegin(TFile &,
+		Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	return (it.data_pos == it.data_host->first_hsp_pos);	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+template<typename TBlastHit, typename TFile>
+inline void
+goBegin(TFile &,
+		Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_pos = it.data_host->first_hsp_pos;
+	it.data_next_pos = it.data_pos;
+	it.data_at_end = false;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHit, typename TFile>
+inline void
+goNext(TFile & file,
+	   Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(file,it)) 
+	{
+		if(it.data_pos == it.data_next_pos)
+			_getNextHspFilePos(file,it);
+		if(it.data_pos == it.data_next_pos)
+			it.data_at_end = true;
+		else
+            it.data_pos = it.data_next_pos;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//template<typename TBlastHit>
+//inline void
+//goPrevious(Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+//{
+//	if (!atBegin(it)) --it.data_pos;
+//}
+//
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHit>
+inline bool
+operator ==(Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it1,
+			Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_pos==it2.data_pos && it1.data_host==it2.data_host);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHit>
+inline bool
+operator !=(Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it1,
+			Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_pos!=it2.data_pos || it1.data_host!=it2.data_host);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TBlastHit, typename TFile>
+inline typename GetValue<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >::Type
+getValue(TFile & file,
+		 Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	if(it.data_pos != it.data_hsp_begin_pos)
+	{
+		_streamSeekG(file,it.data_pos);
+		(it.data_host->data_host)->act_c = ' ';
+		it.data_hsp_begin_pos = it.data_pos;
+		typename Position<TFile>::Type pot_next_pos = _parseBlastHsp(file,(it.data_host->data_host)->act_c,it.data_hsp);
+		if(pot_next_pos > it.data_pos)
+			it.data_next_pos = pot_next_pos;
+		//if(_parseBlastHit(it.data_host->strm,it.data_host->act_c,it.data_hsp) == it.data_pos)
+		//	it.data_at_end = true;
+	}
+	return it.data_hsp;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TBlastHit, typename TFile>
+inline typename Reference<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >::Type
+value(TFile & file,
+	  Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+	if(it.data_pos != it.data_hsp_begin_pos)
+		it.data_hsp = getValue(file,it);
+	return it.data_hsp;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//
+//template<typename TBlastHit>
+//inline typename Host< typename Iterator< typename Host< Iter<TBlastHit, StreamBlastIterator<HspIterator> >::Type>::Type, StreamBlastIterator<HitIterator> >::Type >::Type const&
+//hostReport(Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+//{
+//	return *(it.data_host->data_host);
+//} 
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/**
+.Function.hostHit:
+..cat:Blast
+..summary:The BlastHit this iterator is working on.
+..signature:hostHit(it)
+..param.it:An iterator.
+...type:Spec.HspIterator
+..returns:A pointer to the host BlastHit.
+..include:seqan/blast.h
+*/
+template<typename TBlastHit>
+inline typename Host<Iter<TBlastHit, StreamBlastIterator<HspIterator> > >::Type const&
+hostHit(Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+{
+	SEQAN_CHECKPOINT
+	return *it.data_host;
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TBlastHit, typename TFile>
+inline bool
+atEnd(TFile &,
+	  Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+{
+SEQAN_CHECKPOINT
+//	return (it.data_last_pos != it.data_pos);	
+	return it.data_at_end;	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//template<typename TBlastHit>
+//inline void
+//goEnd(Iter<TBlastHit, StreamBlastIterator<HspIterator> >& it)
+//{
+//	it.data_pos = doof;
+//}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TBlastHsp, typename TFile>
+inline void
+_getNextHspFilePos(TFile & file,
+				  Iter<BlastHit<TBlastHsp, StreamReport<TFile> >, StreamBlastIterator<HspIterator> >& it)
+{
+	typedef typename Position<TFile>::Type TPosition;
+
+	_streamSeekG(file,it.data_pos);
+	char c = 'e';
+	(it.data_host->data_host)->act_c = c;
+
+	_parseSkipWhitespace(file,c);
+	_parseSkipLine(file,c);
+
+	TPosition next_event_pos;
+	bool last_hit = true;
+	String<char> delim = ">";
+	if(_parseUntilBeginLine(file,c,'>'))
+	{
+		last_hit = false;
+		next_event_pos = _streamTellG(file);
+		if((it.data_host->data_host)->next_report && (next_event_pos > (it.data_host->data_host)->next_report_pos))
+			next_event_pos = (it.data_host->data_host)->next_report_pos;
+	}
+	_streamSeekG(file,it.data_pos);
+	c = 'e';
+
+	String<char> search = "Score";
+	if(_parseUntilBeginLine(file,c,search,5))
+	{
+		if(!last_hit && (_streamTellG(file) > next_event_pos))
+	        _streamSeekG(file,it.data_pos);
+		else
+            it.data_next_pos = _streamTellG(file);
+	}//end hsp
+	else
+        _streamSeekG(file,it.data_pos);
+
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/blast/blast_stream_report.h b/src/SeqAn-1.3/seqan/blast/blast_stream_report.h
new file mode 100644
index 0000000..3035f0f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/blast/blast_stream_report.h
@@ -0,0 +1,241 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BLAST_STREAM_REPORT_H
+#define SEQAN_HEADER_BLAST_STREAM_REPORT_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//TODO macht noch nicht so richtig sinn mit dem stringSet 
+//+vielleicht w�r ne map von fasta id -> stringset id gut
+template<typename TBlastHsp, typename TFile>
+class BlastReport<TBlastHsp, StreamReport<TFile> > 
+{
+	public:
+		typedef BlastHit<TBlastHsp,StreamReport<TFile> > TBlastHit_;
+		typedef typename Position<TFile>::Type TPosition_;
+	
+		String<char> query_name;
+		String<char> db_name;
+	
+	
+		TPosition_ first_hit_pos;
+		char act_c; 
+		bool hits_found;
+		bool next_report;
+		TPosition_ next_report_pos;
+
+
+		BlastReport()
+		{
+		SEQAN_CHECKPOINT
+			next_report = true;
+			next_report_pos = 0;
+		}
+
+		BlastReport(BlastReport const& other)
+		{
+		SEQAN_CHECKPOINT
+
+			query_name = other.query_name;
+			db_name = other.db_name;
+			act_c = other.act_c;
+			hits_found = other.hits_found;
+			first_hit_pos = other.first_hit_pos;
+			next_report = other.next_report;
+			next_report_pos = other.next_report_pos;
+		}
+
+		//BlastReport(TFile file)
+		//{
+		//	read(file,*this, Blast());
+		//}
+
+		~BlastReport()
+		{
+		SEQAN_CHECKPOINT
+		}
+
+
+};
+
+
+
+
+
+//read a  blast report and set the filestream to the first hit position (first '>')
+template<typename TBlastHsp, typename TFile>
+void 
+read(TFile & file,
+	 BlastReport<TBlastHsp, StreamReport<TFile> >& blastObj,	 
+	 Tag<TagBlast_>) 
+{
+SEQAN_CHECKPOINT
+ 
+
+
+	typedef typename Position<TFile>::Type TPosition;
+	typedef typename Value<TFile>::Type TValue;
+
+	TValue c = blastObj.act_c;
+	if(blastObj.next_report)
+		_streamSeekG(file,blastObj.next_report_pos);
+
+	blastObj.next_report = false;
+
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+
+	String<char> query_name, db_name;
+	
+	//get query and database names
+	_parseReadQueryAndDBName(file,c,query_name,db_name);
+	blastObj.query_name = query_name;
+	blastObj.db_name = db_name;
+
+	TPosition after_dbquery_pos = _streamTellG(file);
+	TValue c_before = c;
+
+	blastObj.hits_found = false;
+	TPosition next_event_pos = after_dbquery_pos;
+
+	String<char> delim = "Reference";
+	if(_parseUntilBeginLine(file,c,delim,9))
+	{
+		blastObj.next_report_pos = _streamTellG(file);
+		blastObj.next_report = true;
+	}
+
+	_streamSeekG(file,after_dbquery_pos);
+	if(_parseUntilBeginLine(file,c,'>'))
+	{
+		next_event_pos = _streamTellG(file);
+		if(!blastObj.next_report || next_event_pos < blastObj.next_report_pos)
+		{
+			blastObj.hits_found = true;
+			blastObj.first_hit_pos = next_event_pos;
+		}
+		else
+			next_event_pos = after_dbquery_pos;
+	}
+	//get some more values aber erst sp�ter
+	//_readParameters(file,c,blastObj) ;
+
+	if(blastObj.hits_found)
+	{
+		_streamSeekG(file,next_event_pos);
+		c = '>';
+	}
+	else
+	{
+		if(blastObj.next_report)
+		{
+			c = ':';
+			_streamSeekG(file,blastObj.next_report_pos);
+		}
+		else
+		{
+			_streamSeekG(file,next_event_pos);
+			c = c_before;
+		}
+	}
+
+	blastObj.act_c = c;
+
+}
+
+
+
+//////////////////// Metafunctions /////////////////////////////
+
+template<typename TBlastHsp, typename TFile>
+struct Value<BlastReport<TBlastHsp, StreamReport<TFile> > > 
+{
+	typedef BlastHit<TBlastHsp,StreamReport<TFile> > Type;
+};
+
+template<typename TBlastHsp, typename TFile>
+struct Value<BlastReport<TBlastHsp, StreamReport<TFile> > const> 
+{
+	typedef BlastHit<TBlastHsp,StreamReport<TFile> > Type;
+};
+
+
+template<typename TBlastHsp, typename TFile>
+struct Hit<BlastReport<TBlastHsp, StreamReport<TFile> > > 
+{
+	typedef BlastHit<TBlastHsp,StreamReport<TFile> > Type;
+};
+
+template<typename TBlastHsp, typename TFile>
+struct Hit<BlastReport<TBlastHsp, StreamReport<TFile> > const> 
+{
+	typedef BlastHit<TBlastHsp,StreamReport<TFile> > Type;
+};
+
+
+/////////////////////////////////////////////
+//todo
+
+	template<typename TBlastHsp, typename TFile>
+	struct Hit<String<BlastReport<TBlastHsp, StreamReport<TFile> > > > 
+	{
+		typedef BlastHit<TBlastHsp,StreamReport<TFile> > Type;
+	};
+
+	template<typename TBlastHsp, typename TFile>
+	struct Hit<String<BlastReport<TBlastHsp, StreamReport<TFile> > const> > 
+	{
+		typedef BlastHit<TBlastHsp,StreamReport<TFile> > Type;
+	};
+
+	template<typename TBlastHsp, typename TFile>
+	struct Hit<String<BlastHit<TBlastHsp, StreamReport<TFile> > > > 
+	{
+		typedef BlastHit<TBlastHsp,StreamReport<TFile> > Type;
+	};
+
+	template<typename TBlastHsp, typename TFile>
+	struct Hit<String<BlastHit<TBlastHsp, StreamReport<TFile> > const> > 
+	{
+		typedef BlastHit<TBlastHsp,StreamReport<TFile> > Type;
+	};
+
+///////////////////////////////////////////////////////////////////
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/chaining.h b/src/SeqAn-1.3/seqan/chaining.h
new file mode 100644
index 0000000..0905f5f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining.h
@@ -0,0 +1,75 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_CHAINING_H
+#define SEQAN_HEADER_CHAINING_H
+
+#include <seqan/basic.h>
+#include <seqan/score.h>
+#include <seqan/sequence.h>
+#include <seqan/seeds.h>
+
+#include <seqan/misc/misc_random.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/chaining/chaining_generated_forwards.h>
+#endif
+
+#include <seqan/chaining/score_chain.h>
+#include <seqan/chaining/score_manhattan.h>
+#include <seqan/chaining/score_zero.h>
+#include <seqan/chaining/score_chain_sop.h>
+
+#include <algorithm>
+#include <vector>
+
+#include <seqan/chaining/range_max_tree.h>
+#include <seqan/chaining/chain_base.h>
+#include <seqan/chaining/fragment.h>
+#include <seqan/chaining/chain_point.h>
+#include <seqan/chaining/chain_wrapper_point.h>
+#include <seqan/chaining/chain_meta_fragment.h>
+#include <seqan/chaining/tree_chain_utils.h>
+#include <seqan/chaining/tree_chain.h>
+#include <seqan/chaining/tree_chain_sop.h>
+
+
+#include <seqan/chaining/chain_generic.h>
+
+
+
+namespace seqan{
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/chaining/chain_base.h b/src/SeqAn-1.3/seqan/chaining/chain_base.h
new file mode 100644
index 0000000..586dc88
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/chain_base.h
@@ -0,0 +1,371 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_CHAIN_BASE_H
+#define SEQAN_HEADER_CHAIN_BASE_H
+
+/*
+ *  chain_base.h
+ *  chaining
+ *
+ *  Created by Hendrik Woehrle
+ *
+ *	Basis declarations & definitions for chaining algorithms
+ *
+ */
+
+namespace seqan
+{
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			class forward declarations
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+		
+		// basic data structure for fragments (see seed_base.h)
+	//template< typename TBorder, typename TSpec = Default >
+	//struct Seed;
+
+		// wrapper data structure for point in the RMT
+	template< typename T, typename TSpec >
+	struct ChainPoint_;
+
+		// wrapper for points for the line sweep paradigma
+	template< typename T >
+	struct WrapperPoint_;
+
+		// structure for metainformation about fragments in chains
+	template< typename T >
+	struct MetaFragment_;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			tag classes
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+		
+	struct GenericChaining_;
+	typedef Tag<GenericChaining_> const GenericChaining;
+
+	struct RangeTreeChaining_;
+	typedef Tag<RangeTreeChaining_> const RangetreeChaining;
+
+
+	struct GZeroCost
+	{};
+	//typedef Tag<ZeroCost_> const GZeroCost;
+
+	struct GOneCost
+	{};
+	//typedef Tag<G_1_Cost_> const GOneCost;
+
+	struct GInftyCost
+	{};
+	//typedef Tag<G_Inf_Cost_> const GInftyCost;
+
+	struct GSumOfPairCost
+	{};
+	//typedef Tag<F_SoP_Cost_> const GInftyCost;
+
+	template< typename Spec >
+	struct ChainSpecType_
+	{
+		typedef Spec Type;
+	};
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			special metatype declarations
+//
+///////////////////////////////////////////////////////////////////////////////////////////////////////
+// sizes
+
+	//template< typename TBorder, typename TSpec >
+	//struct Size< Seed< TBorder, TSpec > >
+	//{
+	//	typedef size_t Type;
+	//};
+
+	template< typename T, typename TSpec >
+	struct Size< ChainPoint_< T, TSpec > >
+	{
+		typedef size_t Type;
+	};
+
+	template< typename T >
+	struct Size< WrapperPoint_< T > >
+	{
+		typedef size_t Type;
+	};
+
+	template< typename T >
+	struct Size< MetaFragment_< T > >
+	{
+		typedef size_t Type;
+	};
+
+
+//////////////////////////////////////////////////////////////////////////
+// key types
+
+	//template< typename TBorder, typename TSpec >
+	//struct Key< Seed< TBorder, TSpec > >
+	//{
+	//	typedef TBorder Type;
+	//};
+
+	template< typename T, typename TSpec >
+	struct Key< ChainPoint_< T, TSpec > >
+	{
+		typedef typename Key< T >::Type Type;
+	};
+
+	template< typename T >
+	struct Key< WrapperPoint_< T > >
+	{
+		typedef typename Key< T >::Type Type;
+	};
+
+	template< typename T >
+	struct Key< MetaFragment_< T > >
+	{
+		typedef typename Key< T >::Type Type;
+	};
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			functions
+//
+///////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*
+	template< typename TSource, typename TDest, typename TScoreValue, typename TScoreType, typename TStructuring, typename TAlgorithm >
+	TScoreValue
+	computeChain( TSource & source, TDest & dest, Score< TScoreValue, TScoreType > const & score_, TAlgorithm tag, TStructuring structuring );
+
+	template< typename TSource, typename TDest, typename TCostModel, typename TScoreValue, typename TScoreType, typename TStructuring, typename TAlgorithm, typename TSpec >
+	TScoreValue
+	_computeChain( TSource & source, TDest & dest, TCostModel type, Score< TScoreValue, TScoreType > const & score_, TAlgorithm tag, TStructuring structuring, TSpec spec );
+
+*/
+	template< typename TSource, typename TDest, typename TScoreValue, typename TScoreType, typename TStructuring >
+	TScoreValue
+	computeChain( TSource & source, TDest & dest, Score< TScoreValue, TScoreType > const & score_, TStructuring structuring )
+	{
+
+//		SEQAN_CHECK2( scoreGapOpen( score_ ) == scoreGapExtend( score_ ), "Chaining only supports linear gap costs" )
+//		SEQAN_CHECK2( scoreGapOpen( score_ ) >= 0 && scoreGapExtend( score_ ) >= 0 && scoreMismatch( score_ ) >= 0, "Scores should be positive" )
+		switch( dimension( value( begin( source ) ) ) )
+		{
+			case 1: SEQAN_REPORT("One dimensional chaining not supported")
+					return 0;
+			case 2: if( scoreMismatch( score_ ) == 0 && scoreGap( score_ ) == 0 )
+					{
+						return _computeChain( source, dest, GZeroCost(), score_, structuring, ChainSpecType_< Array< 1 > >() );
+					}
+					else if( scoreMismatch( score_ ) > 0 && scoreGap( score_ ) > 0 )
+					{
+						if( scoreMismatch( score_ ) == scoreGap( score_ ) )
+							return _computeChain( source, dest, GOneCost(), score_, structuring, ChainSpecType_< Array< 1 > >() );
+						else //if( scoreMismatch( score_ ) > 2 * scoreGapExtend( score_ ) )
+							return _computeChain( source, dest, GSumOfPairCost(), score_, structuring,ChainSpecType_< Array< 2 > >() );
+					}
+					SEQAN_ASSERT2( false, "Gap/mismatch model not supported" );
+					break;
+			case 3: if( scoreMismatch( score_ ) == 0 && scoreGap( score_ ) == 0 )
+					return _computeChain( source, dest, GZeroCost(), score_, structuring, ChainSpecType_< Array< 2 > >() );
+					else if( scoreMismatch( score_ ) > 0 && scoreGap( score_ ) > 0 )
+					{
+						if( scoreMismatch( score_ ) == scoreGap( score_ ) )
+							return _computeChain( source, dest, GOneCost(), score_, structuring, ChainSpecType_< Array< 2 > >() );
+						else //if( scoreMismatch( score_ ) > 2 * scoreGapExtend( score_ ) )
+							return _computeChain( source, dest, GSumOfPairCost(), score_, structuring,ChainSpecType_< Array< 3 > >() );
+					}
+					SEQAN_ASSERT2( false, "Gap/mismatch model not supported" );
+					break;
+			case 4:	if( scoreMismatch( score_ ) == 0 && scoreGap( score_ ) == 0 )
+					return _computeChain( source, dest, GZeroCost(), score_, structuring, ChainSpecType_< Array< 3 > >() );
+					else if( scoreMismatch( score_ ) > 0 && scoreGap( score_ ) > 0 )
+					{
+						if( scoreMismatch( score_ ) == scoreGap( score_ ) )
+							return _computeChain( source, dest, GOneCost(), score_, structuring, ChainSpecType_< Array< 3 > >() );
+						else //if( scoreMismatch( score_ ) > 2 * scoreGapExtend( score_ ) )
+							return _computeChain( source, dest, GSumOfPairCost(), score_, structuring,ChainSpecType_< Array< 4 > >() );
+					}
+					SEQAN_ASSERT2( false, "Gap/mismatch model not supported" );
+					break;
+			case 5:	if( scoreMismatch( score_ ) == 0 && scoreGap( score_ ) == 0 )
+					return _computeChain( source, dest, GZeroCost(), score_, structuring, ChainSpecType_< Array< 4 > >() );
+					else if( scoreMismatch( score_ ) > 0 && scoreGap( score_ ) > 0 )
+					{
+						if( scoreMismatch( score_ ) == scoreGap( score_ ) )
+							return _computeChain( source, dest, GOneCost(), score_, structuring, ChainSpecType_< Array< 4 > >() );
+						else //if( scoreMismatch( score_ ) > 2 * scoreGapExtend( score_ ) )
+							return _computeChain( source, dest, GSumOfPairCost(), score_, structuring,ChainSpecType_< Array< 5 > >() );
+					}
+					SEQAN_ASSERT2( false, "Gap/mismatch model not supported" );
+					break;
+			default:if( scoreMismatch( score_ ) == 0 && scoreGap( score_ ) == 0 )
+					return _computeChain( source, dest, GZeroCost(), score_, structuring, ChainSpecType_< Default >() );
+					else if( scoreMismatch( score_ ) > 0 && scoreGap( score_ ) > 0 )
+					{
+						if( scoreMismatch( score_ ) == scoreGap( score_ ) )
+							return _computeChain( source, dest, GOneCost(), score_, structuring, ChainSpecType_< Default >() );
+						else //if( scoreMismatch( score_ ) > 2 * scoreGapExtend( score_ ) )
+							return _computeChain( source, dest, GSumOfPairCost(), score_, structuring, ChainSpecType_< Default >() );
+					}
+					SEQAN_ASSERT2( false, "Gap/mismatch model not supported" );
+
+		}
+		return minValue< TScoreValue >();
+	}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////
+
+template< typename TSource, typename TDest, typename TScoring>
+inline typename Value<TScoring>::Type
+globalChaining(TSource & source,
+	  TDest & dest,
+	  TScoring const & scoring,
+	  RangetreeChaining)
+{
+	typedef typename Iterator<TSource, Standard>::Type TSourceIterator;
+	typedef typename Iterator<TDest, Standard>::Type TDestIterator;
+
+	SEQAN_ASSERT(length(source))
+
+	//transform coordinates to old style ("end is last item")
+	unsigned int dim = dimension(source[0]);
+	for (TSourceIterator it = begin(source, Standard()); it < end(source, Standard()); ++it)
+	{
+		for (unsigned int i = 0; i < dim; ++i)
+		{
+			_setLeftPosition(*it, i, leftPosition(*it, i) + 1);
+		}
+	}
+
+	//compute chain
+	typename Value<TScoring>::Type ret_value = computeChain(source, dest, scoring, SemiDeferred()); //Deferred(), Complete()
+
+	//retransform coordinates to new style ("end is behind last item")
+	for (TSourceIterator it = begin(source, Standard()); it < end(source, Standard()); ++it)
+	{
+		for (unsigned int i = 0; i < dim; ++i)
+		{
+			_setLeftPosition(*it, i, leftPosition(*it, i) - 1);
+		}
+	}
+	for (TDestIterator it = begin(dest, Standard()) + 1; it < end(dest, Standard()); ++it)
+	{
+		for (unsigned int i = 0; i < dim; ++i)
+		{
+			_setLeftPosition(*it, i, leftPosition(*it, i) - 1);
+		}
+	}
+
+	//adjust right positions of the end fragment
+	TDestIterator it2 = end(dest, Standard());
+	--it2;
+	for (unsigned int i = 0; i < dim; ++i)
+	{
+		_setRightPosition(*it2, i, rightPosition(*it2, i) - 1);
+	}
+
+	//return score
+	return ret_value;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+//implementation for Default
+template< typename TSource, typename TDest, typename TScoring>
+inline typename Value<TScoring>::Type
+globalChaining(TSource & source, 
+	  TDest & dest, 
+	  TScoring const & scoring,
+	  Default)
+{
+	return globalChaining(source, dest, scoring, GenericChaining()); //default is GenericChaining
+}
+template< typename TSource, typename TDest, typename TValue>
+inline TValue
+globalChaining(TSource & source, 
+	  TDest & dest, 
+	  Score<TValue, Zero> const & scoring,
+	  Default)
+{
+	return globalChaining(source, dest, scoring, RangetreeChaining());
+}
+template< typename TSource, typename TDest, typename TValue>
+inline TValue
+globalChaining(TSource & source, 
+	  TDest & dest, 
+	  Score<TValue, Manhattan> const & scoring,
+	  Default)
+{
+	return globalChaining(source, dest, scoring, RangetreeChaining());
+}
+template< typename TSource, typename TDest, typename TValue>
+inline TValue
+globalChaining(TSource & source, 
+	  TDest & dest, 
+	  Score<TValue, ChainSoP> const & scoring,
+	  Default)
+{
+	return globalChaining(source, dest, scoring, RangetreeChaining());
+}
+
+
+//chain(3) => chain(4)
+template< typename TSource, typename TDest, typename TScoring>
+inline typename Value<TScoring>::Type
+globalChaining(TSource & source, 
+	  TDest & dest, 
+	  TScoring const & scoring)
+{
+	return globalChaining(source, dest, scoring, Default());
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////
+
+}
+
+#endif	// SEQAN_HEADER_CHAIN_BASE_H
diff --git a/src/SeqAn-1.3/seqan/chaining/chain_generic.h b/src/SeqAn-1.3/seqan/chaining/chain_generic.h
new file mode 100644
index 0000000..f901349
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/chain_generic.h
@@ -0,0 +1,260 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_CHAIN_GENERIC_H
+#define SEQAN_HEADER_CHAIN_GENERIC_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TPos, typename TWeight>
+struct ChainGenericEntry_
+{
+	TPos me;		//position of fragment here (within Source)
+	TPos pre;		//position of precursor or -1 for top (within Frags)
+	TWeight weight;	//weight for best chain until here
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource>
+struct ChainGenericSortFragsPredFunctional_
+{
+	TSource & source;
+	ChainGenericSortFragsPredFunctional_(TSource & src)
+		: source(src)
+	{
+	}
+	ChainGenericSortFragsPredFunctional_(ChainGenericSortFragsPredFunctional_ const & other)
+		: source(other.source)
+	{
+	}
+	inline ChainGenericSortFragsPredFunctional_ &
+	operator = (ChainGenericSortFragsPredFunctional_ const & other)
+	{
+		source = other.source;
+		return *this;
+	}
+	~ChainGenericSortFragsPredFunctional_()
+	{
+	}
+
+	template <typename TFrags>
+	inline bool 
+	operator() (TFrags const & left, TFrags const & right) const
+	{
+		return leftPosition(source[left.me], 0) < leftPosition(source[right.me], 0);
+	}
+};
+
+//____________________________________________________________________________
+
+
+template <typename TSource, typename TFrags, typename TScoring>
+inline void
+_chainGenericInitFrags(TSource & source,
+						 TFrags & frags,
+						 TScoring scoring)
+{
+	SEQAN_ASSERT(length(source))
+
+	typedef typename Position<TSource>::Type TPos;
+	typedef typename Value<TSource>::Type TFragment;
+	typedef typename Value<TFrags>::Type TFrag;
+
+	//create top fragment
+	TFragment top(dimension(source[0]));
+	makeBeginFragment(top);
+
+	//create entry in frags for each item in source
+	resize(frags, length(source));
+	for (TPos i = beginPosition(source); i < endPosition(source); ++i)
+	{
+		TFrag & frag = frags[i];
+		frag.me = i;
+		frag.pre = ~0UL; //link it with the top fragment
+		frag.weight = scoreChainGap(scoring, top, source[i]) + weight(source[i]);
+	}
+
+	std::sort(begin(frags, Standard()), end(frags, Standard()), ChainGenericSortFragsPredFunctional_<TSource>(source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFrag>
+inline bool
+_chainGenericChainable(TFrag & f1,
+						 TFrag & f2)
+{
+	SEQAN_ASSERT(dimension(f1) == dimension(f2))
+
+	unsigned int dim = dimension(f1); 
+	while (dim > 0)
+	{
+		--dim;
+		if (rightPosition(f1, dim) > leftPosition(f2, dim))
+		{
+			return false;
+		}
+	}
+
+	return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TFrags, typename TIterator, typename TScoring>
+inline void
+_chainGenericFindBest(TSource & source,
+						TFrags & frags,
+						TIterator & it_act,
+						TScoring scoring)
+{
+	typedef typename Iterator<TFrags, Standard>::Type TFragsIterator;
+	typedef typename Value<TScoring>::Type TWeight;
+	typedef typename Reference<TIterator>::Type TFragRef;
+
+	TFragRef act = *it_act;
+	TWeight act_weight = weight(source[act.me]);
+	TFragsIterator it_begin = begin(frags, Standard());
+	for (TFragsIterator it = it_begin; it < it_act; ++it)
+	{
+		TFragRef frag = *it;
+		if (_chainGenericChainable(source[frag.me], source[act.me]))
+		{
+			TWeight score = frag.weight + scoreChainGap(scoring, source[frag.me], source[act.me]) + act_weight;
+			if (score > act.weight)
+			{//better predecessor found
+				act.pre = it - it_begin;
+				act.weight = score;
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TFrags, typename TIterator, typename TDest, typename TFragment>
+inline void
+_chainGenericTraceback(TSource & source,
+						 TFrags & frags,
+						 TIterator & it_best,
+						 TDest & dest,
+						 TFragment & bottom)
+{
+	typedef typename Position<TSource>::Type TPos;
+
+	clear(dest);
+	//build chain in reverse order
+	appendValue(dest, bottom); //chain will end with bottom fragment
+
+	appendValue(dest, source[(*it_best).me]);
+	for (TPos pos = (*it_best).pre; pos != ~0UL; pos = frags[pos].pre)
+	{
+		appendValue(dest, source[frags[pos].me]);
+	}
+
+	//chain will start with top fragment
+	TFragment top(dimension(bottom));
+	makeBeginFragment(top);
+	appendValue(dest, top);
+
+	//reverse chain
+	std::reverse(begin(dest, Standard()), end(dest, Standard()));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//spec for GenericChaining
+template< typename TSource, typename TDest, typename TScoring>
+inline typename Value<TScoring>::Type
+globalChaining(TSource & source, 
+	  TDest & dest, 
+	  TScoring const & scoring, 
+	  GenericChaining)
+{
+	typedef typename Value<TSource>::Type TFragment;
+	typedef typename Weight<TFragment>::Type TWeight;
+	typedef typename Position<TSource>::Type TSourcePosition;
+	typedef ChainGenericEntry_<TSourcePosition, TWeight> TFrag;
+	typedef String<TFrag> TFrags;
+	typedef typename Iterator<TFrags, Standard>::Type TFragsIterator;
+
+	//initialize fragments
+	TFrags frags;
+	_chainGenericInitFrags(source, frags, scoring);
+
+	TFragsIterator it_begin = begin(frags, Standard());
+	TFragsIterator it_end = end(frags, Standard());
+	TFragsIterator it_best = it_begin;
+	TWeight weight_best = MinValue<TWeight>::VALUE;
+
+
+	//create bottom fragment
+	unsigned int dim = dimension(source[0]);
+	TFragment bottom(dim);
+	makeEndFragment(bottom, source);
+
+	//iterate all fragments
+	for (TFragsIterator it = it_begin; it < it_end; ++it)
+	{
+		//find best predecessor for *it
+		_chainGenericFindBest(source, frags, it, scoring);
+
+		//determine heaviest fragment
+		TWeight weight_it = (*it).weight + scoreChainGap(scoring, source[(*it).me], bottom);
+
+		if (weight_it > weight_best)
+		{
+			it_best = it;
+			weight_best = weight_it;
+		}
+	}
+
+	//follow best fragment back to the beginning of the chain
+	_chainGenericTraceback(source, frags, it_best, dest, bottom);
+
+	return weight_best;
+}
+
+
+
+//____________________________________________________________________________
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/chaining/chain_meta_fragment.h b/src/SeqAn-1.3/seqan/chaining/chain_meta_fragment.h
new file mode 100644
index 0000000..6d335eb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/chain_meta_fragment.h
@@ -0,0 +1,204 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_META_FRAGMENT
+#define SEQAN_HEADER_META_FRAGMENT
+
+namespace seqan{
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			Class MetaFragment_
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*DISABLED
+.Class.MetaFragment_:
+..summary:Basic data which associates fragments with prededing fragments and stores chain score informations
+..cat:Chaining
+..signature:MetaFragment_< TFragType >
+..param.TFragType:Type of the fragment
+..include:seqan/chaining.h
+*/
+
+		// get/set the weight of the related fragment
+	template< typename TFragType > inline
+	typename Weight< TFragType >::Type
+	weight( MetaFragment_< TFragType > & me )
+	{
+		return weight( *me._frag );
+	}
+
+	template< typename TFragType, typename TWeight> inline
+	void
+	setWeight( MetaFragment_< TFragType > & me,
+				TWeight weight )
+	{
+		setWeight( *me._frag, weight );
+	}
+
+		// get/set the score of the chain
+	template< typename TFragType > inline
+	typename Weight< TFragType >::Type 
+	score( MetaFragment_< TFragType > & me )
+	{
+		return me._score;
+	}
+
+	template< typename TFragType, typename TWeight > inline
+	void
+	setScore( MetaFragment_< TFragType > & me,
+						TWeight score )
+	{
+		me._score = score;
+	}
+
+		// get/set the priority
+	template< typename TFragType > inline
+	typename Weight< TFragType >::Type 
+	priority( MetaFragment_< TFragType > & me )
+	{
+		return me._priority;
+	}
+
+	template< typename TFragType, typename TWeight > inline
+	void
+	setPriority( MetaFragment_< TFragType > & me,
+					TWeight prio )
+	{
+		me._priority = prio;
+	}
+
+		// get the associated fragment
+	template< typename TFragType > inline
+	TFragType & 
+	_getFrag( MetaFragment_< TFragType > & me )
+	{
+		return *me._frag;
+	}
+
+	template< typename TFragType > inline
+	TFragType & 
+	_getFrag( const MetaFragment_< TFragType > & me )
+	{
+		return *me._frag;
+	}
+
+		// get preceding fragment
+	template< typename TFragType > inline
+	MetaFragment_< TFragType > & 
+	_getPred( MetaFragment_< TFragType > & me )
+	{
+		return *me._pred;
+	}
+
+	template< typename TFragType > inline 
+	MetaFragment_< TFragType > & 
+	_getPred( const MetaFragment_< TFragType > & me )
+	{
+		return *me._pred;
+	}
+
+		// set preceding fragment
+	template< typename TFragType > inline
+	void
+	_setPred( MetaFragment_< TFragType > & me, 
+				MetaFragment_< TFragType > & pred )
+	{
+		me._pred = &pred;
+	}
+
+	template< typename TFragType > inline
+	void
+	_setPred( const MetaFragment_< TFragType > & me, 
+				MetaFragment_< TFragType > & pred )
+	{
+		me._pred = &pred;
+	}
+
+	template< typename TFragType > inline
+	void 
+	dump( MetaFragment_< TFragType > & me )
+	{
+		if( me._frag )
+			dump( *me._frag );
+		std::cout << me._priority << " " << me._score << std::endl;
+	}
+
+
+	template< typename TFragType >
+	struct MetaFragment_
+	{
+		TFragType * _frag;
+			// preceding element in a chain
+		typename Weight< TFragType >::Type _priority;
+		typename Weight< TFragType >::Type _score;
+		MetaFragment_< TFragType > * _pred;
+
+		MetaFragment_()		
+			: _frag( NULL )
+			, _priority( minValue< typename Weight< TFragType >::Type >() )
+			, _score( minValue< typename Weight< TFragType >::Type >() )
+			, _pred( NULL )
+		{}
+
+		MetaFragment_( TFragType & frag )
+			: _frag( &frag )
+			, _priority( minValue< typename Weight< TFragType >::Type >() )
+			, _score( minValue< typename Weight< TFragType >::Type >() )
+			, _pred( NULL )
+		{}
+
+		MetaFragment_( const MetaFragment_ & old )
+			: _frag( old._frag)
+			, _priority( old._priority )
+			, _score( old._score )
+			, _pred( old._pred )
+		{}
+
+		MetaFragment_ & operator=( const MetaFragment_ & old )
+		{
+			if ( this == &old ) 
+				return *this;
+			_frag = old._frag;
+			_priority = old._priority;
+			_score = old._score;
+			_pred = old._pred;
+			return *this;
+		}
+
+	};
+
+
+}
+
+#endif // SEQAN_HEADER_META_FRAGMENT
diff --git a/src/SeqAn-1.3/seqan/chaining/chain_point.h b/src/SeqAn-1.3/seqan/chaining/chain_point.h
new file mode 100644
index 0000000..6d09d55
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/chain_point.h
@@ -0,0 +1,497 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_CHAINPOINT_H
+#define SEQAN_HEADER_CHAINPOINT_H
+
+namespace seqan
+{
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			Class ChainPoint_
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*DISABLED
+.Class.ChainPoint_:
+..summary:Basic data structure to represent the end-point of a fragment for use in a RMT
+..cat:Chaining
+..signature:ChainPoint_< TFragType, TSpec >
+..param.TFragType:Type of the class which represents the limits (multidimensional point) of an fragment.
+..param.TSpec:Spec of the ChainPoint_.
+..include:seqan/chaining.h
+*/
+	template< typename TFragType, typename TSpec >
+	struct Spec< ChainPoint_< TFragType, TSpec > >
+	{
+		typedef TSpec Type;
+	};
+
+	template< typename TFragType, typename TSpec, typename TSize > inline
+	typename Key< TFragType >::Type 
+	key( ChainPoint_< TFragType, TSpec > & me,
+			TSize dim )
+	{
+SEQAN_CHECK2( me._coords != NULL, "point not initialized" )
+SEQAN_CHECK2( dim <= me._dim, "dim corrupted" )
+		return me._coords[ dim ];
+	}
+
+	template< typename TFragType, typename TSpec, typename TSize > inline 
+	typename Key< TFragType >::Type 
+	key( const ChainPoint_< TFragType, TSpec > & me,
+			TSize dim )
+	{
+SEQAN_CHECK2( me._coords != NULL, "point not initialized" )
+SEQAN_ASSERT( dim <= me._dim )
+		return me._coords[ dim ];
+	}
+
+	template< typename TFragType, typename TSpec, typename TSize, typename TKey > inline 
+	void 
+	setKey( ChainPoint_< TFragType, TSpec > & me,
+			TSize dim,
+			TKey val )
+	{
+SEQAN_ASSERT( dim <= me._dim )
+		me._coords[ dim ] = val;
+	}
+
+	template< typename TFragType, typename TSpec, typename TSize, typename TKey > inline 
+	void 
+	setKey( const ChainPoint_< TFragType, TSpec > & me,
+				TSize dim,
+				TKey val )
+	{
+SEQAN_ASSERT( dim <= me._dim )
+		me._coords[ dim ] = val;
+	}
+
+	template< typename TFragType, typename TSpec, typename TSize > inline 
+	void 
+	_incKey(  ChainPoint_< TFragType, TSpec > & me,
+				TSize dim )
+	{
+SEQAN_ASSERT( dim <= me._dim )
+		++me._coords[ dim ];
+	}
+
+		// get the related fragment
+	template< typename TFragType, typename TSpec > inline
+	TFragType & 
+	_getFrag( ChainPoint_< TFragType, TSpec > & me )
+	{
+SEQAN_ASSERT( me._meta != NULL )
+		return _getFrag( *me._meta );
+	}
+
+	template< typename TFragType, typename TSpec > inline
+	TFragType & 
+	_getFrag( const ChainPoint_< TFragType, TSpec > & me )
+	{
+SEQAN_ASSERT( me._meta != NULL )
+		return _getFrag( *me._meta );
+	}
+
+		// get the related metainformation struct
+	template< typename TFragType, typename TSpec > inline
+	MetaFragment_< TFragType > & 
+	_meta( ChainPoint_< TFragType, TSpec > & me )
+	{
+		return *me._meta;
+	}
+
+	template< typename TFragType, typename TSpec > inline
+	MetaFragment_< TFragType > & 
+	_meta( const ChainPoint_< TFragType, TSpec > & me )
+	{
+		return *me._meta;
+	}
+
+		// set the related metainformation struct
+	template< typename TFragType, typename TSpec > inline
+	void 
+	_setMeta( ChainPoint_< TFragType, TSpec > & me,
+				MetaFragment_< TFragType > & meta )
+	{
+		me._meta = meta;
+	}
+
+	template< typename TFragType, typename TSpec > inline
+	void 
+	_setMeta( const ChainPoint_< TFragType, TSpec > & me,
+				MetaFragment_< TFragType > & meta )
+	{
+		me._meta = meta;
+	}
+
+	template< typename TFragType, typename TSpec > inline
+	typename Size< TFragType >::Type
+	dimension( ChainPoint_< TFragType, TSpec > & me )
+	{
+		return me._dim;
+	}
+
+	template< typename TFragType, unsigned int ISize > inline
+	typename Size< TFragType >::Type
+	dimension( ChainPoint_< TFragType, Array< ISize > > &)
+	{
+		return ISize;
+	}
+
+	template< typename TFragType, typename TSpec > inline
+	typename Weight< TFragType >::Type
+	priority( ChainPoint_< TFragType, TSpec > & me )
+	{
+		return me._prio;
+	}
+
+	template< typename TFragType, typename TSpec, typename TPrio > inline
+	void
+	setPriority( ChainPoint_< TFragType, TSpec > & me,
+					TPrio prio )
+	{
+		me._prio = prio;
+	}
+
+
+	template< typename TFragType, typename TSpec >
+	struct ChainPoint_
+	{
+		
+		MetaFragment_< TFragType > * _meta;
+		typename Key< TFragType >::Type * _coords;
+		typename Size< TFragType >::Type _dim;
+		typename Weight< TFragType >::Type _prio;
+
+	public:
+
+			// standard constructor for use in skiplist
+		ChainPoint_(  )
+		: _meta( NULL )
+		, _coords( NULL )
+		, _dim( 1 )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			allocate( *this, _coords, _dim );
+		}
+
+		ChainPoint_( typename Size< TFragType >::Type dim )
+		: _meta( NULL )
+		, _coords( NULL )
+		, _dim( dim )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			allocate( *this, _coords, _dim );
+		}
+
+		ChainPoint_( MetaFragment_< TFragType > & meta, 
+						bool begin = false )
+		: _meta( &meta )
+		, _coords( NULL )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			TFragType * frag = &_getFrag( meta );
+			_dim = dimension( *frag );
+			allocate( *this, _coords, _dim );
+			if( begin ){
+				for( typename Size< TFragType >::Type i = 0; i < _dim; ++i )
+				{
+					_coords[ i ] = leftPosition( *frag, i );
+				}
+			}
+			else{
+				for( typename Size< TFragType >::Type i = 0; i < _dim; ++i )
+				{
+					_coords[ i ] = rightPosition( *frag, i );
+				}
+			}
+		}
+
+		template< typename TSize >
+		ChainPoint_( MetaFragment_< TFragType > & meta,
+						TSize dim, 
+						bool begin = false )
+		: _meta( &meta )
+		, _coords( NULL )
+		, _dim( dim )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			TFragType * frag = &_getFrag( meta );
+			allocate( *this, _coords, _dim );
+			if( begin ){
+				for( typename Size< TFragType >::Type i = 0; i < _dim; ++i )
+				{
+					_coords[ i ] = leftPosition( *frag, i );
+				}
+			}
+			else{
+				for( typename Size< TFragType >::Type i = 0; i < _dim; ++i )
+				{
+					_coords[ i ] = rightPosition( *frag, i );
+				}
+			}
+		}
+
+		ChainPoint_( typename Key< TFragType >::Type * coords,
+						typename Size< TFragType >::Type dim,
+						MetaFragment_< TFragType > * meta, 
+						bool /*begin = false*/ )
+		: _meta( meta )
+		, _coords( NULL )
+		, _dim( dim )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			allocate( *this, _coords, _dim );
+			for( typename Size< TFragType >::Type i = 0; i < _dim; ++i )
+			{
+				_coords[ i ] = coords[ i ];
+			}
+		}
+
+		ChainPoint_( typename Key< TFragType >::Type * coords,
+						typename Size< TFragType >::Type dim )
+		: _meta( NULL )
+		, _coords( NULL )
+		, _dim( dim )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			allocate( *this, _coords, _dim );
+			for( typename Size< TFragType >::Type i = 0; i < _dim; ++i )
+			{
+				_coords[ i ] = coords[ i ];
+			}
+		}
+
+
+		~ChainPoint_()
+		{
+			deallocate( *this, _coords, _dim );
+			_coords = NULL;
+			_meta = NULL;
+			_dim = 0;
+		}
+
+		ChainPoint_( const ChainPoint_ & old )
+		{
+			_meta = old._meta;
+			_dim = old._dim;
+			_prio = old._prio;
+			allocate( *this, _coords, _dim );
+			for( typename Size< TFragType >::Type i = 0; i < _dim; ++i )
+			{
+				_coords[ i ] = old._coords[ i ];
+			}
+		}
+
+
+		ChainPoint_ & operator=( const ChainPoint_ & old )
+		{
+			if ( this == &old ) 
+				return *this;
+			_meta = old._meta;
+			if( _coords )
+				deallocate( *this, _coords, _dim );
+			_dim = old._dim;
+			_prio = old._prio;
+			allocate( *this, _coords, _dim );
+			for( typename Size< TFragType >::Type i = 0; i < _dim; ++i )
+			{
+				_coords[ i ] = old._coords[ i ];
+			}
+			return *this;
+		}
+
+		friend inline
+		void
+		dump( ChainPoint_ & me )
+		{
+			std::cout << "[ ";
+			typename Size< Seed< TFragType > >::Type dim = 0;
+			std::cout << key( me, dim );
+			++dim;
+			while( dim != me._dim )
+			{
+				std::cout << " , " << key( me, dim );
+				++dim;
+			}
+			std::cout << " ] "<< me._prio << std::endl;
+		}
+
+
+	};
+
+
+	template< typename TFragType, unsigned int ISize>
+	struct ChainPoint_< TFragType, Array< ISize > >
+	{
+		
+		typename Key< TFragType >::Type _coords[ISize];
+		MetaFragment_< TFragType > * _meta;
+		typename Weight< TFragType >::Type _prio;
+
+	public:
+
+			// standard constructor for use in skiplist
+		ChainPoint_(  )
+		: _meta( NULL )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+		}
+
+		ChainPoint_( typename Size< TFragType >::Type )
+		: _meta( NULL )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+		}
+
+		ChainPoint_( MetaFragment_< TFragType > & meta, 
+						bool begin = false )
+		: _meta( &meta )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			TFragType * frag = &_getFrag( meta );
+			if( begin ){
+				for( typename Size< TFragType >::Type i = 0; i < ISize; ++i )
+				{
+					_coords[ i ] = leftPosition( *frag, i );
+				}
+			}
+			else{
+				for( typename Size< TFragType >::Type i = 0; i < ISize; ++i )
+				{
+					_coords[ i ] = rightPosition( *frag, i );
+				}
+			}
+		}
+
+		template< typename TSize >
+		ChainPoint_( MetaFragment_< TFragType > & meta,
+						TSize, 
+						bool begin = false )
+		: _meta( &meta )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			TFragType * frag = &_getFrag( meta );
+			if( begin ){
+				for( typename Size< TFragType >::Type i = 0; i < ISize; ++i )
+				{
+					_coords[ i ] = leftPosition( *frag, i );
+				}
+			}
+			else{
+				for( typename Size< TFragType >::Type i = 0; i < ISize; ++i )
+				{
+					_coords[ i ] = rightPosition( *frag, i );
+				}
+			}
+		}
+
+		ChainPoint_( typename Key< TFragType >::Type * coords,
+						typename Size< TFragType >::Type /*dim*/,
+						MetaFragment_< TFragType > * meta, 
+						bool /*begin = false*/ )
+		: _meta( meta )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			for( typename Size< TFragType >::Type i = 0; i < ISize; ++i )
+			{
+				_coords[ i ] = coords[ i ];
+			}
+		}
+
+		ChainPoint_( typename Key< TFragType >::Type * coords,
+						typename Size< TFragType >::Type /*dim*/ )
+		: _meta( NULL )
+		, _prio( minValue< typename Weight< TFragType >::Type >() )
+		{
+			for( typename Size< TFragType >::Type i = 0; i < ISize; ++i )
+			{
+				_coords[ i ] = coords[ i ];
+			}
+		}
+
+
+		~ChainPoint_()
+		{
+			_meta = NULL;
+		}
+
+		ChainPoint_( const ChainPoint_ & old )
+		{
+			_meta = old._meta;
+			_prio = old._prio;
+			for( typename Size< TFragType >::Type i = 0; i < ISize; ++i )
+			{
+				_coords[ i ] = old._coords[ i ];
+			}
+		}
+
+
+		ChainPoint_ & operator=( const ChainPoint_ & old )
+		{
+			if ( this == &old ) 
+				return *this;
+			_meta = old._meta;
+			_prio = old._prio;
+			for( typename Size< TFragType >::Type i = 0; i < ISize; ++i )
+			{
+				_coords[ i ] = old._coords[ i ];
+			}
+			return *this;
+		}
+
+		friend inline
+		void
+		dump( ChainPoint_ & me )
+		{
+			std::cout << "[ ";
+			typename Size< Seed< TFragType > >::Type dim = 0;
+			std::cout << key( me, dim );
+			++dim;
+			while( dim != ISize )
+			{
+				std::cout << " , " << key( me, dim );
+				++dim;
+			}
+			std::cout << " ] "<< me._prio << std::endl;
+		}
+
+
+	};
+
+
+}	// namespace
+
+#endif // SEQAN_HEADER_CHAINPOINT_H
diff --git a/src/SeqAn-1.3/seqan/chaining/chain_wrapper_point.h b/src/SeqAn-1.3/seqan/chaining/chain_wrapper_point.h
new file mode 100644
index 0000000..5980f27
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/chain_wrapper_point.h
@@ -0,0 +1,241 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_H_CHAIN_WRAPPER_POINT
+#define SEQAN_H_CHAIN_WRAPPER_POINT
+
+namespace seqan{
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			Class WrapperPoint_
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*
+.Class.WrapperPoint_:
+..summary:Data structure to represent a begin or end point of a fragment
+..cat:Chaining
+..signature:WrapperPoint_<TBorder>
+..param.TBorder:Type of the class that represents the limits (multidimensional point) of an fragment.
+..include:seqan/chaining.h
+*/
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			general functions
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+			// get the Key of the bording points of the related fragment depends on _end 
+	template< typename TFragType > inline 
+	typename Key< TFragType >::Type
+	key( WrapperPoint_< TFragType > & me )
+	{
+		return me._key;
+	}
+
+	template< typename TFragType > inline 
+	typename Key< TFragType >::Type
+	key( const WrapperPoint_< TFragType > & me )
+	{
+		return me._key;
+	}
+
+
+		// get the related fragment
+	
+	template< typename TFragType > inline
+	TFragType & 
+	_getFrag( WrapperPoint_< TFragType > & me )
+	{
+		SEQAN_CHECK( me._frag != NULL )
+		SEQAN_CHECK( me._meta != NULL )
+		SEQAN_CHECK( &_getFrag( *me._meta ) == me._frag )
+		return *me._frag;
+	}
+
+	template< typename TFragType > inline
+	TFragType & 
+	_getFrag( const WrapperPoint_< TFragType > & me )
+	{
+		SEQAN_CHECK( me._frag != NULL )
+		SEQAN_CHECK( me._meta != NULL )
+		SEQAN_CHECK( _getFrag( *me._meta ) == me._frag )
+		return *me._frag;
+	}
+
+	template< typename TFragType > inline
+	MetaFragment_< TFragType > & 
+	_meta( WrapperPoint_< TFragType > & me )
+	{
+		SEQAN_CHECK( me._frag != NULL )
+		SEQAN_CHECK( me._meta != NULL )
+		return *me._meta;
+	}
+
+	template< typename TFragType > inline
+	void
+	_setMeta( WrapperPoint_< TFragType > & me,
+				MetaFragment_< TFragType > & meta )
+	{
+		me._meta = &meta;
+		me._frag = _getFrag( meta );
+	}
+
+	
+	template< typename TFragType > inline
+	bool 
+	_isEnd( WrapperPoint_< TFragType > & me )
+	{
+		return me._end;
+	}
+
+	template< typename TFragType > inline 
+	bool 
+	_isEnd( const WrapperPoint_< TFragType > & me )
+	{
+		return me._end;
+	}
+	
+	template< typename TFragType > inline 
+	bool
+	_isBegin( WrapperPoint_< TFragType > & me )
+	{
+		return !me._end;
+	}
+
+	template< typename TFragType > inline 
+	bool
+	_isBegin( const WrapperPoint_< TFragType > & me )
+	{
+		return !me._end;
+	}
+
+	template< typename TFragType > inline 
+	typename Size< TFragType >::Type
+	dimension( const WrapperPoint_< TFragType > & me )
+	{
+		return dimension( *me._frag );
+	}
+
+	
+	template< typename TFragType >
+	struct WrapperPoint_
+	{
+			// related triple, which stores the preceding frgament, chain value...
+		TFragType * _frag;
+			// the related key
+		typename Key< TFragType >::Type _key;
+			// meta information struct for that point
+		MetaFragment_< TFragType > * _meta;
+			// the point is either the end ( _end == true ) or the beginning of a fragment
+		bool _end;
+			
+		
+	#ifdef SEQAN_CHAIN_DEBUG_
+		friend inline
+		void 
+		dump( WrapperPoint_< TFragType > & me )
+		{
+			std::cout << "[ ";
+			typename Size< TFragType >::Type dim = 0;
+			if( me._end )
+				std::cout << rightPosition( *me._frag, dim );
+			else
+				std::cout << leftPosition( *me._frag, dim );
+			++dim;
+			while( dim != dimension( *me._frag ) )
+			{
+				if( me._end )
+					std::cout << " , " << rightPosition( *me._frag, dim );
+				else
+					std::cout << " , " << leftPosition( *me._frag, dim );
+				++dim;
+			}
+			std::cout << " ]" << std::endl;
+		}
+
+	#endif // SEQAN_CHAIN_DEBUG_
+
+		WrapperPoint_( )
+			: _frag( NULL )
+			, _key( 0 )
+			, _meta( NULL )
+			, _end( false )
+		{
+		}
+
+
+		WrapperPoint_( const WrapperPoint_ & old )
+			: _frag( old._frag )
+			, _key( old._key )
+			, _meta( old._meta )
+			, _end( old._end )
+		{
+		}
+
+
+		WrapperPoint_( MetaFragment_< TFragType > & meta, 
+						bool end )
+			: _frag( &_getFrag( meta ) )
+			, _key( end ? rightPosition( _getFrag( meta ), dimension( _getFrag( meta ) ) - 1 ) : leftPosition( _getFrag( meta ), dimension( _getFrag( meta ) ) - 1 ) )
+			, _meta( & meta )
+			, _end( end )
+		{}
+
+		template< typename TKey >
+		WrapperPoint_( MetaFragment_< TFragType > & meta,
+						TKey key,
+						bool end )
+			: _frag( &_getFrag( meta ) )
+			, _key( key )
+			, _meta( & meta )
+			, _end( end )
+		{}
+
+
+		WrapperPoint_ & operator=( const WrapperPoint_ & old )
+		{
+			if ( this == &old ) 
+				return *this;
+			_key = old._key;
+			_end = old._end;
+			_frag = old._frag;
+			_meta = old._meta;
+			return *this;
+		}
+
+	};
+
+}
+#endif // SEQAN_H_...
diff --git a/src/SeqAn-1.3/seqan/chaining/chaining_generated_forwards.h b/src/SeqAn-1.3/seqan/chaining/chaining_generated_forwards.h
new file mode 100644
index 0000000..d29d7a6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/chaining_generated_forwards.h
@@ -0,0 +1,1515 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_CHAINING_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_CHAINING_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// ChainGenericEntry_
+
+template <typename TPos, typename TWeight> struct ChainGenericEntry_;       	// "projects/library/seqan/chaining/chain_generic.h"(43)
+
+//____________________________________________________________________________
+// ChainGenericSortFragsPredFunctional_
+
+template <typename TSource> struct ChainGenericSortFragsPredFunctional_;       	// "projects/library/seqan/chaining/chain_generic.h"(53)
+
+//____________________________________________________________________________
+// Complete
+
+struct Complete;       	// "projects/library/seqan/chaining/skip_list_type.h"(150)
+
+//____________________________________________________________________________
+// Deferred
+
+struct Deferred;       	// "projects/library/seqan/chaining/skip_list_type.h"(152)
+
+//____________________________________________________________________________
+// EmptyCargo_
+
+struct EmptyCargo_;       	// "projects/library/seqan/chaining/skip_list_type.h"(133)
+
+//____________________________________________________________________________
+// Pair
+
+template <typename T1_, typename T2_, typename Compressed > struct Pair;       	// "projects/library/seqan/chaining/skip_list_type.h"(62)
+
+//____________________________________________________________________________
+// SkipBaseElement
+
+template <typename TObject, typename TModus , typename TSpec , typename TStructuring > struct SkipBaseElement;       	// "projects/library/seqan/chaining/skip_list_type.h"(163)
+
+//____________________________________________________________________________
+// SkipElement
+
+template <typename TObject, typename TModus , typename TSpec , typename TStructuring > struct SkipElement;       	// "projects/library/seqan/chaining/skip_list_type.h"(160)
+
+//____________________________________________________________________________
+// SkipList
+
+template <typename TObject, typename TModus , typename TSpec , typename TStructuring > struct SkipList;       	// "projects/library/seqan/chaining/skip_list_type.h"(166)
+
+//____________________________________________________________________________
+// SkipListDynamic
+
+struct SkipListDynamic;       	// "projects/library/seqan/chaining/skip_list_type.h"(146)
+
+//____________________________________________________________________________
+// SkipListStatic
+
+struct SkipListStatic;       	// "projects/library/seqan/chaining/skip_list_type.h"(148)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// ChainPoint_
+
+template <typename T, typename TSpec > struct ChainPoint_;       	// "projects/library/seqan/chaining/chain_base.h"(60)
+template <typename TFragType, typename TSpec > struct ChainPoint_;       	// "projects/library/seqan/chaining/chain_point.h"(191)
+
+//____________________________________________________________________________
+// ChainSoP
+
+struct ChainSoP;       	// "projects/library/seqan/chaining/score_chain.h"(46)
+
+//____________________________________________________________________________
+// ChainSorter_
+
+template <typename T > struct ChainSorter_;       	// "projects/library/seqan/chaining/tree_chain_utils.h"(302)
+
+//____________________________________________________________________________
+// ChainSpecType_
+
+template <typename Spec > struct ChainSpecType_;       	// "projects/library/seqan/chaining/chain_base.h"(101)
+
+//____________________________________________________________________________
+// ClassPool
+
+template <typename TClass, typename TType, typename TParentAllocator > struct ClassPool;       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(75)
+
+//____________________________________________________________________________
+// Complete
+
+struct Complete;       	// "projects/library/seqan/chaining/rt_base.h"(59)
+
+//____________________________________________________________________________
+// Deferred
+
+struct Deferred;       	// "projects/library/seqan/chaining/rt_base.h"(62)
+
+//____________________________________________________________________________
+// DeferredStruct_
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct DeferredStruct_;       	// "projects/library/seqan/chaining/skip_base_element.h"(110)
+
+//____________________________________________________________________________
+// DynamicStruct_
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct DynamicStruct_;       	// "projects/library/seqan/chaining/skip_base_element.h"(82)
+
+//____________________________________________________________________________
+// GInftyCost
+
+struct GInftyCost;       	// "projects/library/seqan/chaining/chain_base.h"(92)
+
+//____________________________________________________________________________
+// GOneCost
+
+struct GOneCost;       	// "projects/library/seqan/chaining/chain_base.h"(88)
+
+//____________________________________________________________________________
+// GSumOfPairCost
+
+struct GSumOfPairCost;       	// "projects/library/seqan/chaining/chain_base.h"(96)
+
+//____________________________________________________________________________
+// GZeroCost
+
+struct GZeroCost;       	// "projects/library/seqan/chaining/chain_base.h"(84)
+
+//____________________________________________________________________________
+// GenericChaining_
+
+struct GenericChaining_;       	// "projects/library/seqan/chaining/chain_base.h"(76)
+
+//____________________________________________________________________________
+// Limited
+
+struct Limited;       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(54)
+
+//____________________________________________________________________________
+// MaxTree
+
+template <typename TSpec > struct MaxTree;       	// "projects/library/seqan/chaining/rmt_base.h"(73)
+
+//____________________________________________________________________________
+// MetaFragment_
+
+template <typename T > struct MetaFragment_;       	// "projects/library/seqan/chaining/chain_base.h"(68)
+template <typename TFragType > struct MetaFragment_;       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(160)
+
+//____________________________________________________________________________
+// MultiSeed
+
+struct MultiSeed;       	// "projects/library/seqan/chaining/fragment.h"(59)
+
+//____________________________________________________________________________
+// RT
+
+template <typename TSpec > struct RT;       	// "projects/library/seqan/chaining/rt_base.h"(52)
+
+//____________________________________________________________________________
+// RangeCargo_
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct RangeCargo_;       	// "projects/library/seqan/chaining/rt_skip_element.h"(47)
+
+//____________________________________________________________________________
+// RangeMaxCargo_
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct RangeMaxCargo_;       	// "projects/library/seqan/chaining/rmt_skip_element.h"(43)
+
+//____________________________________________________________________________
+// RangeTree
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > class RangeTree;       	// "projects/library/seqan/chaining/rmt_base.h"(76)
+template <typename TObject, typename TModus, typename TSpec , typename TStructuring > class RangeTree;       	// "projects/library/seqan/chaining/rt_base.h"(69)
+
+//____________________________________________________________________________
+// RangeTreeAllocators
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct RangeTreeAllocators;       	// "projects/library/seqan/chaining/rt_base.h"(93)
+
+//____________________________________________________________________________
+// RangeTreeChaining_
+
+struct RangeTreeChaining_;       	// "projects/library/seqan/chaining/chain_base.h"(79)
+
+//____________________________________________________________________________
+// SearchPath_
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct SearchPath_;       	// "projects/library/seqan/chaining/skip_list_base.h"(90)
+
+//____________________________________________________________________________
+// SemiDeferred
+
+struct SemiDeferred;       	// "projects/library/seqan/chaining/rt_base.h"(56)
+
+//____________________________________________________________________________
+// SkipBaseElement
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct SkipBaseElement;       	// "projects/library/seqan/chaining/skip_base_element.h"(821)
+
+//____________________________________________________________________________
+// SkipElement
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct SkipElement;       	// "projects/library/seqan/chaining/skip_element.h"(66)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct SkipElement;       	// "projects/library/seqan/chaining/skip_element.h"(367)
+
+//____________________________________________________________________________
+// SkipList
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct SkipList;       	// "projects/library/seqan/chaining/skip_list_impl.h"(424)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > struct SkipList;       	// "projects/library/seqan/chaining/rt_base.h"(66)
+
+//____________________________________________________________________________
+// Unlimited
+
+struct Unlimited;       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(51)
+
+//____________________________________________________________________________
+// Weight
+
+template <typename T > struct Weight;       	// "projects/library/seqan/chaining/rmt_base.h"(103)
+
+//____________________________________________________________________________
+// WrapperPoint_
+
+template <typename T > struct WrapperPoint_;       	// "projects/library/seqan/chaining/chain_base.h"(64)
+template <typename TFragType > struct WrapperPoint_;       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(154)
+
+//____________________________________________________________________________
+// Zero
+
+struct Zero;       	// "projects/library/seqan/chaining/score_chain.h"(44)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// GenericChaining
+
+typedef Tag<GenericChaining_> const GenericChaining;       	// "projects/library/seqan/chaining/chain_base.h"(77)
+
+//____________________________________________________________________________
+// RangetreeChaining
+
+typedef Tag<RangeTreeChaining_> const RangetreeChaining;       	// "projects/library/seqan/chaining/chain_base.h"(80)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _chainGenericChainable
+
+template <typename TFrag> inline bool _chainGenericChainable(TFrag & f1, TFrag & f2);       	// "projects/library/seqan/chaining/chain_generic.h"(119)
+
+//____________________________________________________________________________
+// _chainGenericFindBest
+
+template <typename TSource, typename TFrags, typename TIterator, typename TScoring> inline void _chainGenericFindBest(TSource & source, TFrags & frags, TIterator & it_act, TScoring scoring);       	// "projects/library/seqan/chaining/chain_generic.h"(143)
+
+//____________________________________________________________________________
+// _chainGenericInitFrags
+
+template <typename TSource, typename TFrags, typename TScoring> inline void _chainGenericInitFrags(TSource & source, TFrags & frags, TScoring scoring);       	// "projects/library/seqan/chaining/chain_generic.h"(89)
+
+//____________________________________________________________________________
+// _chainGenericTraceback
+
+template <typename TSource, typename TFrags, typename TIterator, typename TDest, typename TFragment> inline void _chainGenericTraceback(TSource & source, TFrags & frags, TIterator & it_best, TDest & dest, TFragment & bottom);       	// "projects/library/seqan/chaining/chain_generic.h"(175)
+
+//____________________________________________________________________________
+// _initCargo
+
+template <typename TTag, typename TCargo > inline void _initCargo( TTag * , TCargo & );       	// "projects/library/seqan/chaining/skip_list_type.h"(386)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TKey, typename TVal > inline TVal & getValue( Pair<TKey, TVal> & p );       	// "projects/library/seqan/chaining/skip_list_type.h"(75)
+
+//____________________________________________________________________________
+// globalChaining
+
+template <typename TSource, typename TDest, typename TScoring> inline typename Value<TScoring>::Type globalChaining(TSource & source, TDest & dest, TScoring const & scoring, GenericChaining);       	// "projects/library/seqan/chaining/chain_generic.h"(207)
+
+//____________________________________________________________________________
+// key
+
+template <typename TKey, typename TVal > inline TKey & key( Pair<TKey, TVal> & p );       	// "projects/library/seqan/chaining/skip_list_type.h"(69)
+template <typename TKey, typename TVal > inline TKey key( std::pair< TKey, TVal > & p );       	// "projects/library/seqan/chaining/skip_list_type.h"(100)
+
+//____________________________________________________________________________
+// setKey
+
+template <typename TKey2, typename TVal > void setKey( Pair<TKey2, TVal> & p, TKey2 theKey);       	// "projects/library/seqan/chaining/skip_list_type.h"(81)
+template <typename TKey, typename TVal > void setKey( std::pair<TKey, TVal> & p, TKey theKey );       	// "projects/library/seqan/chaining/skip_list_type.h"(106)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _activate
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TSize > void _activate( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list, TObject * obj, TSize dim );       	// "projects/library/seqan/chaining/rmt_common_algos.h"(164)
+
+//____________________________________________________________________________
+// _activateHigherLayer
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TSize > void _activateHigherLayer( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list, TObject * obj, TSize dim );       	// "projects/library/seqan/chaining/rmt_common_algos.h"(134)
+
+//____________________________________________________________________________
+// _activatePriority
+
+template <typename FragType, typename SpecType, typename TScore, typename TSize > inline typename Weight< FragType >::Type _activatePriority( MetaFragment_< FragType > &, ChainPoint_< FragType, SpecType > &, GZeroCost, TScore const &, TSize );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(228)
+template <typename FragType, typename SpecType, typename TScore, typename TSize > inline typename Weight< FragType >::Type _activatePriority( MetaFragment_< FragType > & last_meta, ChainPoint_< FragType, SpecType > & point, GOneCost, TScore const & score_, TSize dim );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(240)
+
+//____________________________________________________________________________
+// _activateScoreBuild
+
+template <typename TObject, typename TSpec, typename TStructuring > inline void _activateScoreBuild( SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * base, SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list, SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > ** search_path );       	// "projects/library/seqan/chaining/rmt_compl_algos.h"(75)
+
+//____________________________________________________________________________
+// _add
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename THeight > inline void _add( SkipList< TObject, TModus, TSpec, TStructuring > & list, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base, THeight height, SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path );       	// "projects/library/seqan/chaining/skip_list_base.h"(839)
+
+//____________________________________________________________________________
+// _addMax
+
+template <typename TObject, typename TSpec, typename TStructuring, typename THeight > inline void _addMax( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & list, SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * base, THeight height, SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > ** );       	// "projects/library/seqan/chaining/rmt_common_algos.h"(313)
+
+//____________________________________________________________________________
+// _beginDefault
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > , Standard >::Type _beginDefault( SkipList< TObject, TModus, TSpec, TStructuring > & me, Standard);       	// "projects/library/seqan/chaining/skip_list_impl.h"(145)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > , Standard >::Type _beginDefault( SkipList< TObject, TModus, TSpec, TStructuring > const & me, Standard);       	// "projects/library/seqan/chaining/skip_list_impl.h"(154)
+
+//____________________________________________________________________________
+// _bottomSearch
+
+template <typename TObject, typename TModus, typename TSpec, typename TResultSet > void _bottomSearch( SkipList< TObject, TModus, RT< TSpec >, Deferred > * list, TObject * left_border, TObject * right_border, TResultSet & results );       	// "projects/library/seqan/chaining/rt_sl_def_algos.h"(111)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultSet > void _bottomSearch( SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list, TObject * left_border, TObject * right_border, TResultSet & results );       	// "projects/library/seqan/chaining/rt_sl_compl_algos.h"(143)
+
+//____________________________________________________________________________
+// _buildAssocStruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _buildAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me, SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list, TSize dim );       	// "projects/library/seqan/chaining/rt_skip_element.h"(107)
+
+//____________________________________________________________________________
+// _buildAssocStruct_left
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _buildAssocStruct_left( SkipList< TObject, TModus, RT< TSpec >, TStructuring > * me, SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * left, SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * right, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_base.h"(345)
+
+//____________________________________________________________________________
+// _buildAssocStruct_right
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _buildAssocStruct_right( SkipList< TObject, TModus, RT< TSpec >, TStructuring > * me, SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * left, SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * right, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_base.h"(360)
+
+//____________________________________________________________________________
+// _buildChainEnvironment
+
+template <typename FragType, typename TSource, typename TMetas, typename TWPoints, typename TCPoints, typename TSpec > inline void _buildChainEnvironment( TSource & source, TMetas & metas, TWPoints & wPoints, TCPoints & cPoints, FragType & startingFrag, FragType & endFrag, TSpec );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(392)
+template <typename FragType, typename TSource, typename TMetas, typename TWPoints, typename TPoints, typename TPerm, typename TSpec > inline void _buildChainEnvironment( TSource & source, TMetas & metas, TWPoints & wPoints, TPoints & tPoints, FragType & startingFrag, FragType & endFrag, TPerm & perm, typename Size< FragType >::Type fac, TSpec &);       	// "projects/library/seqan/chaining/tree_chain_utils.h"(459)
+
+//____________________________________________________________________________
+// _buildChainTrees
+
+template <typename TTrees, typename TTPoints, typename TSize > void _buildChainTrees( TTrees & trees, TTPoints & tPoints, TSize dim, TSize facValue );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(539)
+
+//____________________________________________________________________________
+// _buildMaxTowers
+
+template <typename TObject, typename TSpec, typename TStructuring > void _buildMaxTowers( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & list );       	// "projects/library/seqan/chaining/rmt_common_algos.h"(260)
+
+//____________________________________________________________________________
+// _buildTowers
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > void _buildTowers( SkipList< TObject, TModus, TSpec, TStructuring > & list );       	// "projects/library/seqan/chaining/skip_list_base.h"(486)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > void _buildTowers( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_compl_algos.h"(68)
+
+//____________________________________________________________________________
+// _calcPivot
+
+template <typename TObject, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * _calcPivot( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & base );       	// "projects/library/seqan/chaining/skip_list_base.h"(255)
+template <typename TObject, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > * _calcPivot( SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > & base );       	// "projects/library/seqan/chaining/skip_list_base.h"(273)
+
+//____________________________________________________________________________
+// _chainTrace
+
+template <typename TDest, typename TMetas > typename Weight< typename Value< TDest >::Type >::Type _chainTrace( TDest & dest, TMetas & metas );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(338)
+
+//____________________________________________________________________________
+// _chainTransformCoords
+
+template <typename FragType, typename SpecType, typename TPerm > inline void _chainTransformCoords( ChainPoint_< FragType, SpecType > & point_src, ChainPoint_< FragType, SpecType > & point_dst, TPerm & perm );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(136)
+
+//____________________________________________________________________________
+// _chainTransformCoordsSearch
+
+template <typename FragType, typename SpecType, typename TPerm > inline void _chainTransformCoordsSearch( ChainPoint_< FragType, SpecType > & point_src, ChainPoint_< FragType, SpecType > & point_dst, TPerm & perm );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(154)
+
+//____________________________________________________________________________
+// _checkAssocThresh
+
+template <typename TObject, typename TSpec, typename TStructuring > inline bool _checkAssocThresh( SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * first, SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * second );       	// "projects/library/seqan/chaining/rmt_base.h"(205)
+template <typename TObject, typename TSpec, typename TStructuring > inline bool _checkAssocThresh( SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > * first, SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > * second );       	// "projects/library/seqan/chaining/rt_base.h"(138)
+
+//____________________________________________________________________________
+// _checkBaseElementsLeft
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize, typename TKey, typename TResultSet > inline SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * _checkBaseElementsLeft( SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base, TObject * left_border, TObject * right_border, TSize dim, TKey left_theKey, TKey right_theKey, TResultSet & results );       	// "projects/library/seqan/chaining/rt_common_algos.h"(132)
+
+//____________________________________________________________________________
+// _checkBaseElementsLeftBottom
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey, typename TResultSet > inline SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * _checkBaseElementsLeftBottom( SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base, TObject * , TObject * , TKey left_theKey, TKey right_theKey, TResultSet & results );       	// "projects/library/seqan/chaining/rt_common_algos.h"(165)
+
+//____________________________________________________________________________
+// _checkBaseElementsRight
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize, typename TKey, typename TResultSet > inline void _checkBaseElementsRight( SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base, TObject * left_border, TObject * right_border, TSize dim, TKey right_theKey, TResultSet & results );       	// "projects/library/seqan/chaining/rt_common_algos.h"(197)
+
+//____________________________________________________________________________
+// _clearSearchPath
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _clearSearchPath( SearchPath_< TObject, TModus, TSpec, TStructuring > & sp, TSize size );       	// "projects/library/seqan/chaining/skip_list_base.h"(127)
+
+//____________________________________________________________________________
+// _collectAssocStructs
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize, typename TKey, typename TResultSet > inline SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * _collectAssocStructs( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * tower_buffer, TObject * left_border, TObject * right_border, TSize dim, TKey search_theKey, SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list, TResultSet & results );       	// "projects/lib [...]
+
+//____________________________________________________________________________
+// _completeBuild
+
+template <typename TObject, typename TSpec, typename TStructuring > inline void _completeBuild( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & list, typename Size< TObject >::Type dim );       	// "projects/library/seqan/chaining/rmt_compl_algos.h"(61)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _completeBuild( SkipList< TObject, TModus, TSpec, TStructuring > & list );       	// "projects/library/seqan/chaining/skip_list_base.h"(519)
+template <typename TObject, typename TModus, typename TSpec > inline void _completeBuild( SkipList< TObject, TModus, TSpec, Deferred > & );       	// "projects/library/seqan/chaining/skip_list_base.h"(529)
+template <typename TObject, typename TSpec > inline void _completeBuild( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Deferred > & list, typename Size< TObject >::Type dim );       	// "projects/library/seqan/chaining/rmt_def_algos.h"(51)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _completeBuild( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list, TSize dim );       	// "projects/library/seqan/chaining/rt_common_algos.h"(51)
+template <typename TObject, typename TModus, typename TSpec, typename TSize > inline void _completeBuild( SkipList< TObject, TModus, RT< TSpec >, Deferred > & , TSize );       	// "projects/library/seqan/chaining/rt_common_algos.h"(61)
+
+//____________________________________________________________________________
+// _computeChain
+
+template <typename TSource, typename TDest, typename TScoreValue, typename TScoreType, typename TStructuring, typename TSpec > TScoreValue _computeChain( TSource & source, TDest & dest, GSumOfPairCost, Score< TScoreValue, TScoreType > const & score_, TStructuring, TSpec spec );       	// "projects/library/seqan/chaining/tree_chain_sop.h"(51)
+template <typename TSource, typename TDest, typename TScoreValue, typename TScoreType, typename TStructuring, typename TCostModell, typename TSpec > TScoreValue _computeChain( TSource & source, TDest & dest, TCostModell cost, Score< TScoreValue, TScoreType > const & score_, TStructuring, TSpec spec );       	// "projects/library/seqan/chaining/tree_chain.h"(51)
+
+//____________________________________________________________________________
+// _connect
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TSize > inline void _connect( SkipList< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base, TSize height, SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path, TParam & param );       	// "projects/library/seqan/chaining/skip_list_base.h"(817)
+template <typename TObject, typename TModus, typename TSpec, typename TSize > inline void _connect( SkipList< TObject, TModus, RT< TSpec >, Deferred > & , SkipBaseElement< TObject, TModus, RT< TSpec >, Deferred > * base, TSize height, SkipElement< TObject, TModus, RT< TSpec >, Deferred > ** search_path, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_base.h"(269)
+
+//____________________________________________________________________________
+// _connectUpdate
+
+template <typename TObject, typename TModus, typename TSpec, typename TSize > inline void _connectUpdate( SkipList< TObject, TModus, RT< MaxTree< TSpec > >, Complete > & list, SkipBaseElement< TObject, TModus, RT< MaxTree< TSpec > >, Complete > * base, TSize height, SkipElement< TObject, TModus, RT< MaxTree< TSpec > >, Complete > ** search_path, TSize dim );       	// "projects/library/seqan/chaining/rmt_compl_algos.h"(103)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TSize > inline void _connectUpdate( SkipList< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base, TSize height, SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path, TParam & param );       	// "projects/library/seqan/chaining/skip_list_base.h"(794)
+template <typename TObject, typename TModus, typename TSpec, typename TSize > inline void _connectUpdate( SkipList< TObject, TModus, RT< TSpec >, Deferred > & , SkipBaseElement< TObject, TModus, RT< TSpec >, Deferred > * base, TSize height, SkipElement< TObject, TModus, RT< TSpec >, Deferred > ** search_path, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_base.h"(245)
+template <typename TObject, typename TModus, typename TSpec, typename TSize > inline void _connectUpdate( SkipList< TObject, TModus, RT< TSpec >, SemiDeferred > & , SkipBaseElement< TObject, TModus, RT< TSpec >, SemiDeferred > * base, TSize height, SkipElement< TObject, TModus, RT< TSpec >, SemiDeferred > ** search_path, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_base.h"(291)
+template <typename TObject, typename TModus, typename TSpec, typename TSize > inline void _connectUpdate( SkipList< TObject, TModus, RT< TSpec >, Complete > & list, SkipBaseElement< TObject, TModus, RT< TSpec >, Complete > * base, TSize height, SkipElement< TObject, TModus, RT< TSpec >, Complete > ** search_path, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_base.h"(316)
+
+//____________________________________________________________________________
+// _connectUpdateMax
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TSize, typename TKey > void _connectUpdateMax( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & list, SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * base, TSize height, TKey searchKey, SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > ** search_path, TObject * max_obj );       	// "projects/library/seqan/chaining/rmt_common_ [...]
+
+//____________________________________________________________________________
+// _costGOne
+
+template <typename FragType, typename TScore, typename TSize > typename Weight< FragType >::Type _costGOne( MetaFragment_< FragType > & upper, MetaFragment_< FragType > & lower, TScore const & score, TSize dim );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(252)
+
+//____________________________________________________________________________
+// _costGSoP
+
+template <typename FragType, typename TItPerm, typename TScoreValue, typename TScoreType, typename TSize > typename Weight< FragType >::Type _costGSoP( MetaFragment_< FragType > & upper, MetaFragment_< FragType > & lower, Score< TScoreValue, TScoreType > const & score, TItPerm permBeg, TItPerm, TSize dim );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(272)
+
+//____________________________________________________________________________
+// _create
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TContainer, typename TSize > void _create( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me, TContainer & data, RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & Tree, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_base.h"(123)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > void _create( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me, SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * first, SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * last, RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & Tree, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_base.h"(148)
+
+//____________________________________________________________________________
+// _createAssocStruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _createAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me, SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list, TSize dim );       	// "projects/library/seqan/chaining/rt_skip_element.h"(183)
+
+//____________________________________________________________________________
+// _deleteAssocStruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _deleteAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me );       	// "projects/library/seqan/chaining/rt_skip_element.h"(136)
+
+//____________________________________________________________________________
+// _deleteBase
+
+template <typename TObject, typename TSpec, typename TStructuring > void _deleteBase( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& base );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(354)
+
+//____________________________________________________________________________
+// _deleteChainTrees
+
+template <typename TTrees, typename TSize > void _deleteChainTrees( TTrees & trees, TSize facValue );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(556)
+
+//____________________________________________________________________________
+// _deleteSearchFrom
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TParam > SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * _deleteSearchFrom( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, typename Key< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type theKey, SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > ** search_path, TParam & param );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(269)
+
+//____________________________________________________________________________
+// _deleteTower
+
+template <typename TObject, typename TSpec, typename TStructuring > void _deleteTower( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > ** search_path, SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * base, typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type height );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(330)
+
+//____________________________________________________________________________
+// _endDefault
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring >, Standard>::Type _endDefault( SkipList< TObject, TModus, TSpec, TStructuring > & me, Standard);       	// "projects/library/seqan/chaining/skip_list_impl.h"(184)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > const, Standard>::Type _endDefault( SkipList< TObject, TModus, TSpec, TStructuring > const & me, Standard);       	// "projects/library/seqan/chaining/skip_list_impl.h"(192)
+
+//____________________________________________________________________________
+// _findTowerTop
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultSet, typename TSize, typename TKey > inline SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * _findTowerTop( SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base_buffer, SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list, TObject * left_border, TObject * right_border, TSize dim, TKey theKey, TResultSet & results );       	// "projects/library/seqan/chai [...]
+
+//____________________________________________________________________________
+// _fingerSearch
+
+template <typename TObject, typename TModus, typename TSpec, typename TResultSet, typename TSize > void _fingerSearch( SkipList< TObject, TModus, RT< TSpec >, Deferred > * list, TObject * left_border, TObject * right_border, TSize dim, TResultSet & results );       	// "projects/library/seqan/chaining/rt_sl_def_algos.h"(67)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultSet, typename TSize > void _fingerSearch( SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list, TObject * left_border, TObject * right_border, TSize dim, TResultSet & results );       	// "projects/library/seqan/chaining/rt_sl_compl_algos.h"(115)
+
+//____________________________________________________________________________
+// _geomRand
+
+template <typename T > inline T _geomRand( );       	// "projects/library/seqan/chaining/geom_distribution.h"(56)
+
+//____________________________________________________________________________
+// _getAssoc
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipList< TObject, TModus, TSpec, TStructuring > * _getAssoc( RangeMaxCargo_< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/rmt_skip_element.h"(58)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipList< TObject, TModus, TSpec, TStructuring > * _getAssoc( RangeCargo_< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_skip_element.h"(60)
+
+//____________________________________________________________________________
+// _getAssocStruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipList< TObject, TModus, RT< TSpec >, TStructuring > * _getAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me );       	// "projects/library/seqan/chaining/rt_skip_element.h"(87)
+
+//____________________________________________________________________________
+// _getBaseAlloc
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline Allocator< ClassPool< SkipBaseElement< TObject, TModus, TSpec, TStructuring >, Unlimited, SimpleAllocator> > & _getBaseAlloc( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_impl.h"(337)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline Allocator< SimpleAlloc<> > & _getBaseAlloc( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_base.h"(213)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline Allocator< SimpleAlloc<> > & _getBaseAlloc( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_sl_base.h"(101)
+
+//____________________________________________________________________________
+// _getBaseStore
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _getBaseStore( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_impl.h"(379)
+
+//____________________________________________________________________________
+// _getCount
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type _getCount( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(774)
+
+//____________________________________________________________________________
+// _getCurrentLayer
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type _getCurrentLayer( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_impl.h"(398)
+
+//____________________________________________________________________________
+// _getDown
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _getDown( SkipElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_element.h"(129)
+
+//____________________________________________________________________________
+// _getElementAlloc
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline Allocator< ClassPool< SkipElement< TObject, TModus, TSpec, TStructuring >, Limited, SimpleAllocator > > & _getElementAlloc( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_impl.h"(327)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline Allocator< ClassPool< SkipElement< TObject, TModus, RT< TSpec >, TStructuring >, Limited, SimpleAllocator > > & _getElementAlloc( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_base.h"(197)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline Allocator< ClassPool< SkipElement< TObject, TModus, RT< TSpec >, TStructuring >, Limited, SimpleAllocator > > & _getElementAlloc( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_sl_base.h"(84)
+
+//____________________________________________________________________________
+// _getFrag
+
+template <typename TFragType > inline TFragType & _getFrag( WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(80)
+template <typename TFragType > inline TFragType & _getFrag( const WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(90)
+template <typename TFragType, typename TSpec > inline TFragType & _getFrag( ChainPoint_< TFragType, TSpec > & me );       	// "projects/library/seqan/chaining/chain_point.h"(114)
+template <typename TFragType, typename TSpec > inline TFragType & _getFrag( const ChainPoint_< TFragType, TSpec > & me );       	// "projects/library/seqan/chaining/chain_point.h"(122)
+template <typename TFragType > inline TFragType & _getFrag( MetaFragment_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(105)
+template <typename TFragType > inline TFragType & _getFrag( const MetaFragment_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(112)
+
+//____________________________________________________________________________
+// _getHeight
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline typename Size< SkipElement< TObject, TModus, TSpec, TStructuring > >::Type _getHeight( SkipElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_element.h"(237)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type _getHeight( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(698)
+
+//____________________________________________________________________________
+// _getInitialState
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline bool _getInitialState( SkipList< TObject, TModus, TSpec, TStructuring > & list );       	// "projects/library/seqan/chaining/skip_list_base.h"(158)
+
+//____________________________________________________________________________
+// _getLBorderObj
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline TObject * _getLBorderObj( RangeTree< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_base.h"(223)
+
+//____________________________________________________________________________
+// _getLeft
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _getLeft( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(534)
+template <typename TObject, typename TModus, typename TSpec > inline SkipBaseElement< TObject, TModus, TSpec, Deferred > * _getLeft( SkipBaseElement< TObject, TModus, TSpec, Deferred > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(542)
+
+//____________________________________________________________________________
+// _getLeftSideStore
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipElement< TObject, TModus, TSpec, TStructuring > * _getLeftSideStore( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_impl.h"(369)
+
+//____________________________________________________________________________
+// _getList
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipList< TObject, TModus, RT< TSpec >, TStructuring > * _getList( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_base.h"(241)
+
+//____________________________________________________________________________
+// _getListAlloc
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline Allocator< ClassPool< SkipList< TObject, TModus, RT< TSpec >, TStructuring >, Unlimited, SimpleAllocator > > & _getListAlloc( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_base.h"(205)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline Allocator< ClassPool< SkipList< TObject, TModus, RT< TSpec >, TStructuring >, Unlimited, SimpleAllocator > > & _getListAlloc( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_sl_base.h"(93)
+
+//____________________________________________________________________________
+// _getMaxObject
+
+template <typename TObject, typename TSpec, typename TStructuring > inline TObject * _getMaxObject( RangeMaxCargo_< TObject, SkipListStatic, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/rmt_skip_element.h"(76)
+template <typename TObject,typename TSpec, typename TStructuring > inline TObject * _getMaxObject( SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me );       	// "projects/library/seqan/chaining/rmt_skip_element.h"(91)
+
+//____________________________________________________________________________
+// _getMaximalSLTowerHeight
+
+template <typename TNumber > inline TNumber _getMaximalSLTowerHeight( TNumber elements );       	// "projects/library/seqan/chaining/skip_list_base.h"(190)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type _getMaximalSLTowerHeight( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_base.h"(199)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type _getMaximalSLTowerHeight( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & rt );       	// "projects/library/seqan/chaining/rt_base.h"(330)
+
+//____________________________________________________________________________
+// _getNext
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline SkipElement< TObject, TModus, TSpec, TStructuring > * _getNext( SkipElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_element.h"(193)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _getNext( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(668)
+
+//____________________________________________________________________________
+// _getNextBlock
+
+template <typename TClass, typename TSpec, typename TParentAlloc > inline TClass * _getNextBlock( Allocator< ClassPool< TClass, TSpec, TParentAlloc > > & , TClass & block );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(102)
+
+//____________________________________________________________________________
+// _getPerm
+
+template <typename TData, typename TItPerm, typename TSize > inline void _getPerm( TData * values, TItPerm perm, TSize length );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(91)
+
+//____________________________________________________________________________
+// _getPermDifference
+
+template <typename TData, typename TSize, typename FragType > void _getPermDifference( TData * values, TSize dim, FragType & upper, FragType & lower );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(119)
+
+//____________________________________________________________________________
+// _getPred
+
+template <typename TObject, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > * _getPred( SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(464)
+template <typename TObject, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * _getPred( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(472)
+template <typename TFragType > inline MetaFragment_< TFragType > & _getPred( MetaFragment_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(120)
+template <typename TFragType > inline MetaFragment_< TFragType > & _getPred( const MetaFragment_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(127)
+
+//____________________________________________________________________________
+// _getRBorderObj
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline TObject * _getRBorderObj( RangeTree< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_base.h"(232)
+
+//____________________________________________________________________________
+// _getRight
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline SkipElement< TObject, TModus, TSpec, TStructuring > * _getRight(SkipElement< TObject, TModus, TSpec, TStructuring > & me);       	// "projects/library/seqan/chaining/skip_element.h"(103)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _getRight( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(590)
+template <typename TObject, typename TSpec > inline SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * _getRight( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(599)
+template <typename TObject, typename TSpec > inline SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > * _getRight( SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(607)
+
+//____________________________________________________________________________
+// _getRightBorder
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _getRightBorder( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_impl.h"(359)
+template <typename TObject, typename TSpec, typename TStructuring > inline SkipElement< TObject, SkipListStatic, RT< TSpec >, TStructuring > * _getRightBorder( SkipList< TObject, SkipListStatic, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_sl_base.h"(63)
+
+//____________________________________________________________________________
+// _getRoot
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipElement< TObject, TModus, TSpec, TStructuring > * _getRoot( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_impl.h"(318)
+
+//____________________________________________________________________________
+// _getSearchPath
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipElement< TObject, TModus, TSpec, TStructuring > ** _getSearchPath( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_impl.h"(388)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipElement< TObject, TModus, TSpec, TStructuring > ** _getSearchPath( SearchPath_< TObject, TModus, TSpec, TStructuring > & sp );       	// "projects/library/seqan/chaining/skip_list_base.h"(118)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline SkipElement< TObject, TModus, RT< TSpec >, TStructuring > ** _getSearchPath( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me, TParam dim );       	// "projects/library/seqan/chaining/rt_sl_def_algos.h"(46)
+
+//____________________________________________________________________________
+// _getSucc
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _getSucc( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(386)
+template <typename TObject, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * _getSucc( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(394)
+
+//____________________________________________________________________________
+// _getUp
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipElement< TObject, TModus, TSpec, TStructuring > & _getUp( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(365)
+
+//____________________________________________________________________________
+// _hasAssocStruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline bool _hasAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me );       	// "projects/library/seqan/chaining/rt_skip_element.h"(155)
+
+//____________________________________________________________________________
+// _hasBigAssocStruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline bool _hasBigAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me );       	// "projects/library/seqan/chaining/rt_skip_element.h"(171)
+
+//____________________________________________________________________________
+// _hasSmallAssocStruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline bool _hasSmallAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me );       	// "projects/library/seqan/chaining/rt_skip_element.h"(163)
+
+//____________________________________________________________________________
+// _incKey
+
+template <typename TFragType, typename TSpec, typename TSize > inline void _incKey( ChainPoint_< TFragType, TSpec > & me, TSize dim );       	// "projects/library/seqan/chaining/chain_point.h"(105)
+
+//____________________________________________________________________________
+// _initBases
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TIter, typename TSize > inline void _initBases( SkipList< TObject, SkipListStatic, TSpec, TStructuring > & list, SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > * firstBase, SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > *& lastBase, TIter & firstData, TIter & lastData, TSize numEntries );       	// "projects/library/seqan/chaining/skip_list_base.h"(919)
+template <typename TObject, typename TSpec, typename TStructuring, typename TIter, typename TSize > inline void _initBases( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * firstBase, SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& lastBase, TIter & firstData, TIter & lastData, TSize numEntries );       	// "projects/library/seqan/chaining/skip_list_base.h"(949)
+template <typename TObject, typename TSpec, typename TStructuring, typename TIter, typename TSize > inline void _initBases( SkipList< TObject, SkipListStatic, RT< TSpec >, TStructuring > & list, SkipBaseElement< TObject, SkipListStatic, RT< TSpec >, TStructuring > * firstBase, SkipBaseElement< TObject, SkipListStatic, RT< TSpec >, TStructuring > *& lastBase, TIter & firstData, TIter & lastData, TSize numEntries, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_base.h"(173)
+
+//____________________________________________________________________________
+// _initPerm
+
+template <typename TPerm, typename TSize > inline void _initPerm( TPerm & perm, TSize length );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(63)
+
+//____________________________________________________________________________
+// _initSL
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _initSL( SkipList< TObject, TModus, TSpec, TStructuring > & list, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * first_base, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * , TSize numEntries );       	// "projects/library/seqan/chaining/skip_list_base.h"(982)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _initSL( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list, SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * first_base, SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * , TSize numEntries, TSize );       	// "projects/library/seqan/chaining/rt_sl_base.h"(201)
+
+//____________________________________________________________________________
+// _initStartingFrag
+
+template <typename FragType, typename TSize > inline void _initStartingFrag( FragType & frag, TSize dim );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(367)
+
+//____________________________________________________________________________
+// _insertBack
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TParam > void _insertBack( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, TObject & obj, TParam & );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(169)
+
+//____________________________________________________________________________
+// _insertInPlace
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TParam > void _insertInPlace( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, TObject & obj, TParam & param );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(193)
+
+//____________________________________________________________________________
+// _isBegin
+
+template <typename TFragType > inline bool _isBegin( WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(133)
+template <typename TFragType > inline bool _isBegin( const WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(140)
+
+//____________________________________________________________________________
+// _isEnd
+
+template <typename TFragType > inline bool _isEnd( WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(119)
+template <typename TFragType > inline bool _isEnd( const WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(126)
+
+//____________________________________________________________________________
+// _maxPriority
+
+template <typename FragType, typename SpecType, typename TScore, typename TSize > inline typename Weight< FragType >::Type _maxPriority( MetaFragment_< FragType > & , MetaFragment_< FragType > & current_meta, ChainPoint_< FragType, SpecType > & point, GZeroCost, TScore const &, TSize );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(189)
+template <typename FragType, typename SpecType, typename TScore, typename TSize > inline typename Weight< FragType >::Type _maxPriority( MetaFragment_< FragType > &, MetaFragment_< FragType > & current_meta, ChainPoint_< FragType, SpecType > & point, GOneCost, TScore const & score_, TSize dim );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(203)
+
+//____________________________________________________________________________
+// _meta
+
+template <typename TFragType > inline MetaFragment_< TFragType > & _meta( WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(100)
+template <typename TFragType, typename TSpec > inline MetaFragment_< TFragType > & _meta( ChainPoint_< TFragType, TSpec > & me );       	// "projects/library/seqan/chaining/chain_point.h"(131)
+template <typename TFragType, typename TSpec > inline MetaFragment_< TFragType > & _meta( const ChainPoint_< TFragType, TSpec > & me );       	// "projects/library/seqan/chaining/chain_point.h"(138)
+
+//____________________________________________________________________________
+// _noInitialState
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _noInitialState( SkipList< TObject, TModus, TSpec, TStructuring > & list );       	// "projects/library/seqan/chaining/skip_list_base.h"(166)
+
+//____________________________________________________________________________
+// _performDestructorAction
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline void _performDestructorAction( SkipElement< TObject, TModus, TSpec, TStructuring > & );       	// "projects/library/seqan/chaining/skip_element.h"(302)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _performDestructorAction( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_skip_element.h"(235)
+
+//____________________________________________________________________________
+// _performRMQ
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TBorder, typename TSize, typename TKey > void _performRMQ( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list, TBorder & borderObj, TSize dim, TKey searchKey, TObject *& maxObject );       	// "projects/library/seqan/chaining/rmt_compl_algos.h"(135)
+template <typename TObject, typename TSpec, typename TBorder, typename TSize, typename TKey > void _performRMQ( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Complete > * list, TBorder & borderObj, TSize dim, TKey searchKey, TObject *& maxObject );       	// "projects/library/seqan/chaining/rmt_compl_algos.h"(180)
+template <typename TObject, typename TSpec, typename TStructuring, typename TBorder > void _performRMQ( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list, TBorder & , typename Key< TObject >::Type searchKey, TObject *& maxObject );       	// "projects/library/seqan/chaining/rmt_compl_algos.h"(222)
+template <typename TObject, typename TSpec, typename TBorder, typename TSize, typename TKey > void _performRMQ( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Deferred > * list, TBorder & borderObj, TSize dim, TKey searchKey, TObject *& maxObject );       	// "projects/library/seqan/chaining/rmt_def_algos.h"(77)
+
+//____________________________________________________________________________
+// _performSmallRMQ
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TBorder > inline void _performSmallRMQ( SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * elem, typename Size< TObject >::Type dim, TBorder & border, TObject *& max_object );       	// "projects/library/seqan/chaining/rmt_compl_algos.h"(267)
+
+//____________________________________________________________________________
+// _processRMQ
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TBorder > inline void _processRMQ( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list, typename Size< TObject >::Type dim, TBorder & borderObj, TObject *& maxObject );       	// "projects/library/seqan/chaining/rmt_common_algos.h"(86)
+
+//____________________________________________________________________________
+// _pushBack
+
+template <typename TTarget, typename TSource > inline void _pushBack( TTarget & target, TSource const & source );       	// "projects/library/seqan/chaining/rt_base.h"(146)
+
+//____________________________________________________________________________
+// _renewConnects
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _renewConnects( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & elem, SkipBaseElement< TObject, TModus, TSpec, TStructuring > & pivot, TSize elem_count, TSize i_count );       	// "projects/library/seqan/chaining/skip_list_base.h"(442)
+template <typename TObject, typename TSpec, typename TSize > inline void _renewConnects( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & elem, SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & pivot, TSize elem_count, TSize i_count );       	// "projects/library/seqan/chaining/skip_list_base.h"(455)
+
+//____________________________________________________________________________
+// _renewDynConnects
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _renewDynConnects( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > & , TSize , TSize );       	// "projects/library/seqan/chaining/skip_list_base.h"(403)
+template <typename TObject, typename TModus, typename TSpec, typename TSize > inline void _renewDynConnects( SkipBaseElement< TObject, TModus, TSpec, Deferred > & elem, SkipBaseElement< TObject, TModus, TSpec, Deferred > & pivot, TSize elem_count, TSize i_count );       	// "projects/library/seqan/chaining/skip_list_base.h"(412)
+template <typename TObject, typename TSpec, typename TSize > inline void _renewDynConnects( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & elem, SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & pivot, TSize elem_count, TSize i_count );       	// "projects/library/seqan/chaining/skip_list_base.h"(425)
+
+//____________________________________________________________________________
+// _renewLeftTower
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > void _renewLeftTower( SkipList< TObject, TModus, TSpec, TStructuring > & list );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(70)
+
+//____________________________________________________________________________
+// _renewSearchPath
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _renewSearchPath( SkipList< TObject, TModus, TSpec, TStructuring > & list, TSize old_size, TSize new_size );       	// "projects/library/seqan/chaining/skip_list_base.h"(140)
+
+//____________________________________________________________________________
+// _resetPerm
+
+template <typename TPerm > inline void _resetPerm( TPerm & perm );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(74)
+
+//____________________________________________________________________________
+// _scanAssocStruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultsSet, typename TSize > inline void _scanAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me, SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list, TObject * left_border, TObject * right_border, TSize dim, TResultsSet & results );       	// "projects/library/seqan/chaining/rt_skip_element.h"(204)
+
+//____________________________________________________________________________
+// _searchFrom
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TKey > SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _searchFrom( SkipList< TObject, TModus, TSpec, TStructuring > & list, SkipElement< TObject, TModus, TSpec, TStructuring > * layer_element, TKey theKey, SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path, TParam & param );       	// "projects/library/seqan/chaining/skip_list_base.h"(547)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TKey > SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _searchFrom( SkipList< TObject, TModus, TSpec, TStructuring > & , SkipElement< TObject, TModus, TSpec, TStructuring > * layer_element, TKey theKey, TParam & param );       	// "projects/library/seqan/chaining/skip_list_base.h"(600)
+
+//____________________________________________________________________________
+// _setAssoc
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setAssoc( RangeMaxCargo_< TObject, TModus, TSpec, TStructuring > & me, SkipList< TObject, TModus, TSpec, TStructuring > * list );       	// "projects/library/seqan/chaining/rmt_skip_element.h"(66)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setAssoc( RangeCargo_< TObject, TModus, TSpec, TStructuring > & me, SkipList< TObject, TModus, TSpec, TStructuring > * list);       	// "projects/library/seqan/chaining/rt_skip_element.h"(69)
+
+//____________________________________________________________________________
+// _setAssocStruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me, SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list );       	// "projects/library/seqan/chaining/rt_skip_element.h"(96)
+
+//____________________________________________________________________________
+// _setCount
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _setCount( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, TSize count );       	// "projects/library/seqan/chaining/skip_base_element.h"(794)
+
+//____________________________________________________________________________
+// _setCurrentLayer
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _setCurrentLayer( SkipList< TObject, TModus, TSpec, TStructuring > & me, TSize layer );       	// "projects/library/seqan/chaining/skip_list_impl.h"(408)
+
+//____________________________________________________________________________
+// _setDefConnects
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setDefConnects( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * );       	// "projects/library/seqan/chaining/skip_list_base.h"(886)
+template <typename TObject, typename TSpec > inline void _setDefConnects( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * left, SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * right );       	// "projects/library/seqan/chaining/skip_list_base.h"(895)
+
+//____________________________________________________________________________
+// _setDeferredCounts
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setDeferredCounts( SkipList< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(105)
+template <typename TObject, typename TModus, typename TSpec > inline void _setDeferredCounts( SkipList< TObject, TModus, TSpec, Deferred > & , SkipBaseElement< TObject, TModus, TSpec, Deferred > * preceding_elem, SkipBaseElement< TObject, TModus, TSpec, Deferred > * new_elem );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(114)
+
+//____________________________________________________________________________
+// _setDown
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline void _setDown( SkipElement< TObject, TModus, TSpec, TStructuring > & me, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * down );       	// "projects/library/seqan/chaining/skip_element.h"(173)
+
+//____________________________________________________________________________
+// _setDynConnects
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setDynConnects( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * );       	// "projects/library/seqan/chaining/skip_list_base.h"(866)
+template <typename TObject, typename TSpec, typename TStructuring > inline void _setDynConnects( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * pred, SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * succ );       	// "projects/library/seqan/chaining/skip_list_base.h"(875)
+
+//____________________________________________________________________________
+// _setHeight
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _setHeight( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, TSize height );       	// "projects/library/seqan/chaining/skip_base_element.h"(718)
+
+//____________________________________________________________________________
+// _setLeft
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setLeft( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * );       	// "projects/library/seqan/chaining/skip_base_element.h"(562)
+template <typename TObject, typename TModus, typename TSpec > inline void _setLeft( SkipBaseElement< TObject, TModus, TSpec, Deferred > & me, SkipBaseElement< TObject, TModus, TSpec, Deferred > * left );       	// "projects/library/seqan/chaining/skip_base_element.h"(570)
+
+//____________________________________________________________________________
+// _setLeftPosition
+
+template <typename TBorder, typename TSpec, typename TSize, typename TPosition > inline void _setLeftPosition( Seed< TBorder, TSpec > & me, TSize dim, TPosition value );       	// "projects/library/seqan/chaining/fragment.h"(317)
+
+//____________________________________________________________________________
+// _setLength
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _setLength( SkipList< TObject, TModus, TSpec, TStructuring > & me, TSize num_elems );       	// "projects/library/seqan/chaining/skip_list_impl.h"(210)
+
+//____________________________________________________________________________
+// _setMaxInfty
+
+template <typename TObject, typename TSize > inline void _setMaxInfty( TObject & me, TSize dim );       	// "projects/library/seqan/chaining/rt_base.h"(176)
+
+//____________________________________________________________________________
+// _setMaxObject
+
+template <typename TObject, typename TSpec, typename TStructuring > inline void _setMaxObject( RangeMaxCargo_< TObject, SkipListStatic, TSpec, TStructuring > & me, TObject * obj );       	// "projects/library/seqan/chaining/rmt_skip_element.h"(84)
+template <typename TObject, typename TSpec, typename TStructuring > inline void _setMaxObject( SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me, TObject * maxObj );       	// "projects/library/seqan/chaining/rmt_skip_element.h"(99)
+
+//____________________________________________________________________________
+// _setMeta
+
+template <typename TFragType > inline void _setMeta( WrapperPoint_< TFragType > & me, MetaFragment_< TFragType > & meta );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(110)
+template <typename TFragType, typename TSpec > inline void _setMeta( ChainPoint_< TFragType, TSpec > & me, MetaFragment_< TFragType > & meta );       	// "projects/library/seqan/chaining/chain_point.h"(147)
+template <typename TFragType, typename TSpec > inline void _setMeta( const ChainPoint_< TFragType, TSpec > & me, MetaFragment_< TFragType > & meta );       	// "projects/library/seqan/chaining/chain_point.h"(155)
+
+//____________________________________________________________________________
+// _setMinInfty
+
+template <typename TObject, typename TSize > inline void _setMinInfty( TObject & me, TSize dim );       	// "projects/library/seqan/chaining/rt_base.h"(161)
+
+//____________________________________________________________________________
+// _setNext
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline void _setNext( SkipElement< TObject, TModus, TSpec, TStructuring > & me, SkipElement< TObject, TModus, TSpec, TStructuring > * next );       	// "projects/library/seqan/chaining/skip_element.h"(217)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setNext( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * next );       	// "projects/library/seqan/chaining/skip_base_element.h"(678)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setNext( SkipList< TObject, TModus, TSpec, TStructuring > & me, SkipList< TObject, TModus, TSpec, TStructuring > * next );       	// "projects/library/seqan/chaining/skip_list_impl.h"(348)
+
+//____________________________________________________________________________
+// _setNextBlock
+
+template <typename TClass, typename TSpec, typename TParentAlloc > inline void _setNextBlock( Allocator< ClassPool< TClass, TSpec, TParentAlloc > > & , TClass & dest, TClass * block );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(111)
+
+//____________________________________________________________________________
+// _setObject
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setObject( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, TObject * obj );       	// "projects/library/seqan/chaining/skip_base_element.h"(315)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setObject( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * data );       	// "projects/library/seqan/chaining/skip_base_element.h"(325)
+
+//____________________________________________________________________________
+// _setPred
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setPred( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * );       	// "projects/library/seqan/chaining/skip_base_element.h"(508)
+template <typename TObject, typename TSpec, typename TStructuring > inline void _setPred( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & me, SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * goPrevious );       	// "projects/library/seqan/chaining/skip_base_element.h"(516)
+template <typename TFragType > inline void _setPred( MetaFragment_< TFragType > & me, MetaFragment_< TFragType > & pred );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(136)
+template <typename TFragType > inline void _setPred( const MetaFragment_< TFragType > & me, MetaFragment_< TFragType > & pred );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(144)
+
+//____________________________________________________________________________
+// _setRight
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline void _setRight( SkipElement< TObject, TModus, TSpec, TStructuring > & me, SkipElement< TObject, TModus, TSpec, TStructuring > * right );       	// "projects/library/seqan/chaining/skip_element.h"(153)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setRight( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * );       	// "projects/library/seqan/chaining/skip_base_element.h"(644)
+template <typename TObject, typename TSpec > inline void _setRight( SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > & , SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > * );       	// "projects/library/seqan/chaining/skip_base_element.h"(651)
+template <typename TObject, typename TSpec > inline void _setRight( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & me, SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * right );       	// "projects/library/seqan/chaining/skip_base_element.h"(659)
+
+//____________________________________________________________________________
+// _setRightPosition
+
+template <typename TBorder, typename TSpec, typename TSize, typename TPosition > inline void _setRightPosition( Seed< TBorder, TSpec > & me, TSize dim, TPosition value );       	// "projects/library/seqan/chaining/fragment.h"(335)
+
+//____________________________________________________________________________
+// _setSucc
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setSucc( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * );       	// "projects/library/seqan/chaining/skip_base_element.h"(431)
+template <typename TObject, typename TSpec, typename TStructuring > inline void _setSucc( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & me, SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * succ );       	// "projects/library/seqan/chaining/skip_base_element.h"(439)
+
+//____________________________________________________________________________
+// _setUp
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _setUp( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, SkipElement< TObject, TModus, TSpec, TStructuring > & up );       	// "projects/library/seqan/chaining/skip_base_element.h"(346)
+
+//____________________________________________________________________________
+// _sort
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _sort( SkipList< TObject, TModus, TSpec, TStructuring > & list, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * elem, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * right );       	// "projects/library/seqan/chaining/skip_list_base.h"(296)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TExtraParam > SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _sort( SkipList< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * elem, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * right_border, TExtraParam & param );       	// "projects/library/seqan/chaining/skip_list_base.h"(309)
+
+//____________________________________________________________________________
+// _sortEquals
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _sortEquals( SkipList< TObject, TModus, TSpec, TStructuring > & list, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * elem );       	// "projects/library/seqan/chaining/skip_list_base.h"(345)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline void _sortEquals( SkipList< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * , TKey );       	// "projects/library/seqan/chaining/skip_list_base.h"(355)
+template <typename TObject, typename TModus, typename TSpec, typename TKey > void _sortEquals( SkipList< TObject, TModus, TSpec, Deferred > & , SkipBaseElement< TObject, TModus, TSpec, Deferred > * elem, TKey theKey);       	// "projects/library/seqan/chaining/skip_list_base.h"(364)
+
+//____________________________________________________________________________
+// _sortRecursive
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _sortRecursive( SkipList< TObject, TModus, TSpec, TStructuring > & list, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * elem, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * right );       	// "projects/library/seqan/chaining/skip_list_base.h"(471)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline void _sortRecursive( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list, SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * elem, SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * right, TSize dim );       	// "projects/library/seqan/chaining/rt_sl_compl_algos.h"(54)
+
+//____________________________________________________________________________
+// _specialSearch
+
+template <typename TObject, typename TModus, typename TSpec, typename TKey > inline SkipBaseElement< TObject, TModus, TSpec, Deferred > * _specialSearch( SkipList< TObject, TModus, TSpec, Deferred > & list, SkipElement< TObject, TModus, TSpec, Deferred > * layer_element, TKey theKey);       	// "projects/library/seqan/chaining/skip_list_base.h"(641)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _specialSearch( SkipList< TObject, TModus, TSpec, TStructuring > & list, SkipElement< TObject, TModus, TSpec, TStructuring > * layer_element, TKey theKey);       	// "projects/library/seqan/chaining/skip_list_base.h"(653)
+
+//____________________________________________________________________________
+// _split
+
+template <typename TObject, typename TModus, typename TSpec, typename TParam, typename TKey > SkipBaseElement< TObject, TModus, TSpec, Deferred > * _split( SkipList< TObject, TModus, TSpec, Deferred > & list, SkipBaseElement< TObject, TModus, TSpec, Deferred > * base, TKey theKey, SkipElement< TObject, TModus, TSpec, Deferred > ** search_path, TParam & param );       	// "projects/library/seqan/chaining/skip_list_base.h"(740)
+
+//____________________________________________________________________________
+// _splitAction
+
+template <typename TObject, typename TModus, typename TSpec, typename TParam, typename TKey > inline SkipBaseElement< TObject, TModus, TSpec, Deferred > * _splitAction( SkipList< TObject, TModus, TSpec, Deferred > & list, SkipBaseElement< TObject, TModus, TSpec, Deferred > * base, TKey theKey, SkipElement< TObject, TModus, TSpec, Deferred > ** search_path, TParam & param );       	// "projects/library/seqan/chaining/skip_list_base.h"(716)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TKey > inline SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _splitAction( SkipList< TObject, TModus, TSpec, TStructuring > & , SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base, TKey , SkipElement< TObject, TModus, TSpec, TStructuring > ** , TParam & );       	// "projects/library/seqan/chaining/skip_list_base.h"(728)
+
+//____________________________________________________________________________
+// _swapBases
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void _swapBases( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & first, SkipBaseElement< TObject, TModus, TSpec, TStructuring > & second );       	// "projects/library/seqan/chaining/skip_list_base.h"(235)
+
+//____________________________________________________________________________
+// _testBruteForce
+
+template <typename TObject, typename TSize > inline bool _testBruteForce( TObject & elem, TObject & first, TObject & second, TSize dim );       	// "projects/library/seqan/chaining/rt_base.h"(291)
+
+//____________________________________________________________________________
+// _testBruteForceMax
+
+template <typename TObject, typename TSize > inline void _testBruteForceMax( TObject * elem, TObject * border, TObject *& max_object, TSize _dim );       	// "projects/library/seqan/chaining/rmt_base.h"(171)
+
+//____________________________________________________________________________
+// _testRange
+
+template <typename TObject, typename TSize > inline bool _testRange( TObject & elem, TObject & first, TObject & second, TSize dim );       	// "projects/library/seqan/chaining/rt_base.h"(311)
+
+//____________________________________________________________________________
+// _testRangeMax
+
+template <typename TObject, typename TBorder, typename TSize > inline void _testRangeMax( TObject * elem, TBorder * border, TObject *& max_object, TSize dim );       	// "projects/library/seqan/chaining/rmt_base.h"(189)
+
+//____________________________________________________________________________
+// _throwCoin
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename THeight > inline typename seqan::Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type _throwCoin( SkipList< TObject, TModus, TSpec, TStructuring > & , THeight max_height);       	// "projects/library/seqan/chaining/skip_list_base.h"(210)
+
+//____________________________________________________________________________
+// activate
+
+template <typename TObject, typename TSpec, typename TStructuring > inline void activate( RangeTree< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & tree, TObject & obj );       	// "projects/library/seqan/chaining/rmt_common_algos.h"(111)
+template <typename TObject, typename TSpec, typename TStructuring, typename TWeight > inline void activate( RangeTree< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & tree, TObject & obj, TWeight prio );       	// "projects/library/seqan/chaining/rmt_common_algos.h"(120)
+
+//____________________________________________________________________________
+// allocate
+
+template <typename TClass, typename TParentAlloc, typename TSize > void allocate( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me, TClass *& dest, TSize number );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(187)
+template <typename TClass, typename TParentAlloc, typename TSize > void allocate( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me, TClass *& dest, TSize number );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(316)
+
+//____________________________________________________________________________
+// append
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline void append( SkipList< TObject, TModus, TSpec, TStructuring > & , TParam & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(73)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam1, typename TParam2 > inline void append( SkipList< TObject, TModus, TSpec, TStructuring > & , TParam1 & , TParam2 & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(82)
+
+//____________________________________________________________________________
+// appendValue
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline void appendValue( SkipList< TObject, TModus, TSpec, TStructuring > & , TParam & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(90)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam1, typename TParam2 > inline void appendValue( SkipList< TObject, TModus, TSpec, TStructuring > & , TParam1 & , TParam2 & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(99)
+
+//____________________________________________________________________________
+// assign
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline void assign( SkipList< TObject, TModus, TSpec, TStructuring > & , TParam & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(108)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam1, typename TParam2 > inline void assign( SkipList< TObject, TModus, TSpec, TStructuring > & , TParam1 & , TParam2 & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(117)
+
+//____________________________________________________________________________
+// assignValue
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TValue> inline void assignValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * , TValue const & );       	// "projects/library/seqan/chaining/skip_list_iterator.h"(112)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TValue> inline void assignValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const * , TValue const & );       	// "projects/library/seqan/chaining/skip_list_iterator.h"(122)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline void assignValue( SkipList< TObject, TModus, TSpec, TStructuring > & , TParam & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(125)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam1, typename TParam2 > inline void assignValue( SkipList< TObject, TModus, TSpec, TStructuring > & , TParam1 & , TParam2 & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(134)
+
+//____________________________________________________________________________
+// capacity
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type capacity( SkipList< TObject, TModus, TSpec, TStructuring > & me);       	// "projects/library/seqan/chaining/skip_list_impl.h"(165)
+template <typename TObject, typename TSpec, typename TStructuring > inline typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type capacity( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(174)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TClass, typename TParentAlloc > inline void clear( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(249)
+template <typename TClass, typename TParentAlloc > void clear( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(363)
+
+//____________________________________________________________________________
+// computeChain
+
+template <typename TSource, typename TDest, typename TScoreValue, typename TScoreType, typename TStructuring > TScoreValue computeChain( TSource & source, TDest & dest, Score< TScoreValue, TScoreType > const & score_, TStructuring structuring );       	// "projects/library/seqan/chaining/chain_base.h"(187)
+
+//____________________________________________________________________________
+// deallocate
+
+template <typename TClass, typename TParentAlloc, typename TSize > inline void deallocate( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me, TClass * location, TSize );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(239)
+template <typename TClass, typename TParentAlloc, typename TSize > void deallocate( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me, TClass * location, TSize count );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(354)
+
+//____________________________________________________________________________
+// dimension
+
+template <typename TFragType > inline typename Size< TFragType >::Type dimension( const WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(147)
+template <typename TBorder > inline typename Size< Seed< TBorder, MultiSeed > >::Type dimension( Seed< TBorder, MultiSeed > & me );       	// "projects/library/seqan/chaining/fragment.h"(250)
+template <typename TFragType, typename TSpec > inline typename Size< TFragType >::Type dimension( ChainPoint_< TFragType, TSpec > & me );       	// "projects/library/seqan/chaining/chain_point.h"(162)
+template <typename TFragType, unsigned int ISize > inline typename Size< TFragType >::Type dimension( ChainPoint_< TFragType, Array< ISize > > &);       	// "projects/library/seqan/chaining/chain_point.h"(169)
+
+//____________________________________________________________________________
+// dump
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void dump( SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > & me );       	// "projects/library/seqan/chaining/rt_skip_base_element.h"(54)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline void dump( SkipElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_element.h"(332)
+template <typename TFragType > inline void dump( MetaFragment_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(151)
+
+//____________________________________________________________________________
+// erase
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > bool erase( SkipList< TObject, TModus, TSpec, TStructuring > & , TKey );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(376)
+template <typename TObject, typename TSpec, typename TStructuring, typename TKey > bool erase( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, TKey theKey );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(385)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > bool erase( SkipList< TObject, TModus, TSpec, TStructuring > & , TObject & );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(407)
+template <typename TObject, typename TSpec, typename TStructuring > bool erase( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, TObject & obj );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(418)
+
+//____________________________________________________________________________
+// fac
+
+template <typename TSimpleType > inline TSimpleType fac( TSimpleType data );       	// "projects/library/seqan/chaining/tree_chain_utils.h"(49)
+
+//____________________________________________________________________________
+// getObject
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline TObject * getObject( SkipElement< TObject, TModus, TSpec, TStructuring > * me );       	// "projects/library/seqan/chaining/skip_element.h"(83)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline TObject * getObject( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * me );       	// "projects/library/seqan/chaining/skip_base_element.h"(293)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename GetValue< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type getValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(222)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename GetValue< SkipBaseElement< TObject, TModus, TSpec, TStructuring > const >::Type getValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(230)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename GetValue< SkipBaseElement< TObject, TModus, TSpec, TStructuring > * >::Type getValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * me );       	// "projects/library/seqan/chaining/skip_base_element.h"(238)
+
+//____________________________________________________________________________
+// globalChaining
+
+template <typename TSource, typename TDest, typename TScoring> inline typename Value<TScoring>::Type globalChaining(TSource & source, TDest & dest, TScoring const & scoring, RangetreeChaining);       	// "projects/library/seqan/chaining/chain_base.h"(264)
+template <typename TSource, typename TDest, typename TScoring> inline typename Value<TScoring>::Type globalChaining(TSource & source, TDest & dest, TScoring const & scoring, Default);       	// "projects/library/seqan/chaining/chain_base.h"(324)
+template <typename TSource, typename TDest, typename TValue> inline TValue globalChaining(TSource & source, TDest & dest, Score<TValue, Zero> const & scoring, Default);       	// "projects/library/seqan/chaining/chain_base.h"(333)
+template <typename TSource, typename TDest, typename TValue> inline TValue globalChaining(TSource & source, TDest & dest, Score<TValue, Manhattan> const & scoring, Default);       	// "projects/library/seqan/chaining/chain_base.h"(342)
+template <typename TSource, typename TDest, typename TValue> inline TValue globalChaining(TSource & source, TDest & dest, Score<TValue, ChainSoP> const & scoring, Default);       	// "projects/library/seqan/chaining/chain_base.h"(351)
+template <typename TSource, typename TDest, typename TScoring> inline typename Value<TScoring>::Type globalChaining(TSource & source, TDest & dest, TScoring const & scoring);       	// "projects/library/seqan/chaining/chain_base.h"(362)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void goNext( SkipBaseElement< TObject, TModus, TSpec, TStructuring > *& me );       	// "projects/library/seqan/chaining/skip_base_element.h"(402)
+template <typename TObject, typename TSpec, typename TStructuring > inline void goNext( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& me );       	// "projects/library/seqan/chaining/skip_base_element.h"(410)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename TObject, typename TSpec, typename TStructuring > inline void goPrevious( SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > *& me );       	// "projects/library/seqan/chaining/skip_base_element.h"(480)
+template <typename TObject, typename TSpec, typename TStructuring > inline void goPrevious( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& me );       	// "projects/library/seqan/chaining/skip_base_element.h"(488)
+
+//____________________________________________________________________________
+// insert
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void insert( SkipList< TObject, TModus, TSpec, TStructuring > & , TObject & );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(147)
+template <typename TObject, typename TSpec, typename TStructuring > inline void insert( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, TObject & obj );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(157)
+template <typename TObject, typename TSpec, typename TStructuring, typename TParam > inline void insert( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, TObject & obj, TParam & param );       	// "projects/library/seqan/chaining/skip_list_dynamic.h"(230)
+
+//____________________________________________________________________________
+// key
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline typename Key< TObject >::Type key( SkipElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_element.h"(255)
+template <typename TFragType > inline typename Key< TFragType >::Type key( WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(63)
+template <typename TFragType > inline typename Key< TFragType >::Type key( const WrapperPoint_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_wrapper_point.h"(70)
+template <typename TType, typename TIterType > inline typename Key< typename Value< Iter< TType, TIterType > >::Type >::Type key( Iter< TType, TIterType > & it );       	// "projects/library/seqan/chaining/skip_list_iterator.h"(96)
+template <typename TType, typename TIterType, typename TParam > inline typename Key< typename Value< Iter< TType, TIterType > >::Type >::Type key( Iter< TType, TIterType > & it, TParam & param );       	// "projects/library/seqan/chaining/skip_list_iterator.h"(104)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Key< TObject >::Type key( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_base_element.h"(746)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline typename Key< TObject >::Type key( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, TParam & );       	// "projects/library/seqan/chaining/skip_base_element.h"(755)
+template <typename TFragType, typename TSpec, typename TSize > inline typename Key< TFragType >::Type key( ChainPoint_< TFragType, TSpec > & me, TSize dim );       	// "projects/library/seqan/chaining/chain_point.h"(65)
+template <typename TFragType, typename TSpec, typename TSize > inline typename Key< TFragType >::Type key( const ChainPoint_< TFragType, TSpec > & me, TSize dim );       	// "projects/library/seqan/chaining/chain_point.h"(75)
+
+//____________________________________________________________________________
+// leftPosition
+
+template <typename TBorder, typename TSize > inline TBorder leftPosition( Seed< TBorder, MultiSeed > & me, TSize dim );       	// "projects/library/seqan/chaining/fragment.h"(258)
+template <typename TBorder, typename TSize > inline TBorder leftPosition( const Seed< TBorder, MultiSeed > & me, TSize dim );       	// "projects/library/seqan/chaining/fragment.h"(266)
+
+//____________________________________________________________________________
+// length
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type length( SkipList< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_list_impl.h"(201)
+
+//____________________________________________________________________________
+// makeBeginFragment
+
+template <typename TFragment> inline void makeBeginFragment(TFragment & me);       	// "projects/library/seqan/chaining/fragment.h"(355)
+
+//____________________________________________________________________________
+// makeEndFragment
+
+template <typename TFragment, typename TFragments> inline void makeEndFragment(TFragment & me, TFragments & fragments);       	// "projects/library/seqan/chaining/fragment.h"(369)
+
+//____________________________________________________________________________
+// moveValue
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TValue > inline void moveValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > *& , TValue const & );       	// "projects/library/seqan/chaining/skip_list_iterator.h"(132)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TValue > inline void moveValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const *& , TValue const & );       	// "projects/library/seqan/chaining/skip_list_iterator.h"(141)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos > void moveValue( SkipList< TObject, TModus, TSpec, TStructuring > & , TPos & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(220)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos > void moveValue( SkipList< TObject, TModus, TSpec, TStructuring > const & , TPos & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(228)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos > void moveValue( SkipList< TObject, TModus, TSpec, TStructuring > & , TPos const & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(236)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos > void moveValue( SkipList< TObject, TModus, TSpec, TStructuring > const & , TPos const & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(244)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral> inline Iter< SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > operator+ (Iter< SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & left, TIntegral right);       	// "projects/library/seqan/chaining/skip_list_iterator.h"(182)
+template <typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral> inline Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > operator+ (TIntegral left, Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & right);       	// "projects/library/seqan/chaining/skip_list_iterator.h"(196)
+
+//____________________________________________________________________________
+// operator+=
+
+template <typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral> inline Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > & operator+= (Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > & left, TIntegral right);       	// "projects/library/seqan/chaining/skip_list_iterator.h"(215)
+
+//____________________________________________________________________________
+// operator-
+
+template <typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral> inline Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > operator- (Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & left, TIntegral right);       	// "projects/library/seqan/chaining/skip_list_iterator.h"(233)
+
+//____________________________________________________________________________
+// operator-=
+
+template <typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral> inline Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > & operator-= (Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > & left, TIntegral right);       	// "projects/library/seqan/chaining/skip_list_iterator.h"(264)
+
+//____________________________________________________________________________
+// parentAllocator
+
+template <typename TClass, typename TParentAlloc > inline TParentAlloc & parentAllocator( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(169)
+template <typename TClass, typename TParentAlloc > inline TParentAlloc & parentAllocator( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me );       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(299)
+
+//____________________________________________________________________________
+// position
+
+template <typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec> inline typename Position<Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const>::Type position(Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & me);       	// "projects/library/seqan/chaining/skip_list_iterator.h"(151)
+template <typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TContainer2> inline typename Position<Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const>::Type position(Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & me, TContainer2 const &);       	// "projects/library/seqan/chaining/skip_list_iterator.h"(169)
+
+//____________________________________________________________________________
+// printElementValue
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline void printElementValue( SkipElement< TObject, TModus, TSpec, TStructuring > & me );       	// "projects/library/seqan/chaining/skip_element.h"(344)
+
+//____________________________________________________________________________
+// printLayerScores
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TSize1, typename TSize2 > void printLayerScores( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list, TSize1 layer, TSize2 _dim );       	// "projects/library/seqan/chaining/rmt_base.h"(216)
+template <typename TObject, typename TSpec, typename TStructuring, typename TSize > void printLayerScores( SkipList< TObject, SkipListStatic, RT< TSpec >, TStructuring > * , TSize , TSize );       	// "projects/library/seqan/chaining/rt_base.h"(341)
+
+//____________________________________________________________________________
+// printScores
+
+template <typename TObject, typename TSpec, typename TStructuring > void printScores( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & list );       	// "projects/library/seqan/chaining/rmt_base.h"(284)
+
+//____________________________________________________________________________
+// priority
+
+template <typename TObject, typename TSpec, typename TStructuring > inline typename Weight< TObject >::Type priority( SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me );       	// "projects/library/seqan/chaining/rmt_skip_base_element.h"(52)
+template <typename TObject, typename TSpec, typename TStructuring > inline typename Weight< TObject >::Type priority( SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me );       	// "projects/library/seqan/chaining/rmt_skip_element.h"(121)
+template <typename TFragType, typename TSpec > inline typename Weight< TFragType >::Type priority( ChainPoint_< TFragType, TSpec > & me );       	// "projects/library/seqan/chaining/chain_point.h"(176)
+template <typename TFragType > inline typename Weight< TFragType >::Type priority( MetaFragment_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(89)
+
+//____________________________________________________________________________
+// rangeMaxQuery
+
+template <typename TObject, typename TSpec, typename TStructuring, typename TBorder > TObject * rangeMaxQuery( RangeTree< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & tree, TBorder & border_obj );       	// "projects/library/seqan/chaining/rmt_common_algos.h"(71)
+
+//____________________________________________________________________________
+// rangeQuery
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultSet > void rangeQuery( RangeTree< TObject, TModus, TSpec, TStructuring > & me, TObject & first, TObject & second, TResultSet & results );       	// "projects/library/seqan/chaining/rt_base.h"(277)
+
+//____________________________________________________________________________
+// replace
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos > void replace( SkipList< TObject, TModus, TSpec, TStructuring > & , TPos & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(254)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos > void replace( SkipList< TObject, TModus, TSpec, TStructuring > const & , TPos & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(263)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos > void replace( SkipList< TObject, TModus, TSpec, TStructuring > & , TPos const & );       	// "projects/library/seqan/chaining/skip_list_impl.h"(272)
+
+//____________________________________________________________________________
+// right
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline void right( SkipElement< TObject, TModus, TSpec, TStructuring > *& me );       	// "projects/library/seqan/chaining/skip_element.h"(111)
+template <typename TObject, typename TSpec, typename TStructuring > inline void right( SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > *& me );       	// "projects/library/seqan/chaining/skip_base_element.h"(616)
+template <typename TObject, typename TSpec, typename TStructuring > inline void right( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& me );       	// "projects/library/seqan/chaining/skip_base_element.h"(624)
+
+//____________________________________________________________________________
+// rightPosition
+
+template <typename TBorder, typename TSize > inline TBorder rightPosition( Seed< TBorder, MultiSeed > & me, TSize dim );       	// "projects/library/seqan/chaining/fragment.h"(274)
+template <typename TBorder, typename TSize > inline TBorder rightPosition( const Seed< TBorder, MultiSeed > & me, TSize dim );       	// "projects/library/seqan/chaining/fragment.h"(282)
+
+//____________________________________________________________________________
+// score
+
+template <typename TValue, typename T> inline TValue score(Score<TValue, Zero> const & , T const & , T const & );       	// "projects/library/seqan/chaining/score_zero.h"(132)
+template <typename TFragType > inline typename Weight< TFragType >::Type score( MetaFragment_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(73)
+
+//____________________________________________________________________________
+// scoreChainGap
+
+template <typename TValue, typename TFragment> inline TValue scoreChainGap(Score<TValue, Zero> const &, TFragment &, TFragment &);       	// "projects/library/seqan/chaining/score_zero.h"(144)
+template <typename TValue, typename TFragment> inline TValue scoreChainGap(Score<TValue, Manhattan> const & me, TFragment & f1, TFragment & f2);       	// "projects/library/seqan/chaining/score_manhattan.h"(171)
+template <typename TValue, typename TFragment> inline TValue scoreChainGap(Score<TValue, ChainSoP> const & me, TFragment & f1, TFragment & f2);       	// "projects/library/seqan/chaining/score_chain_sop.h"(217)
+
+//____________________________________________________________________________
+// scoreGap
+
+template <typename TValue> inline TValue scoreGap(Score<TValue, Zero> &);       	// "projects/library/seqan/chaining/score_zero.h"(106)
+template <typename TValue> inline TValue const scoreGap(Score<TValue, Zero> const &);       	// "projects/library/seqan/chaining/score_zero.h"(112)
+template <typename TValue> inline TValue scoreGap(Score<TValue, Manhattan> & me);       	// "projects/library/seqan/chaining/score_manhattan.h"(130)
+template <typename TValue> inline TValue const & scoreGap(Score<TValue, Manhattan> const & me);       	// "projects/library/seqan/chaining/score_manhattan.h"(136)
+template <typename TValue> inline TValue & scoreGap(Score<TValue, ChainSoP> & me);       	// "projects/library/seqan/chaining/score_chain_sop.h"(175)
+template <typename TValue> inline TValue const & scoreGap(Score<TValue, ChainSoP> const & me);       	// "projects/library/seqan/chaining/score_chain_sop.h"(182)
+
+//____________________________________________________________________________
+// scoreMatch
+
+template <typename TValue> inline TValue scoreMatch(Score<TValue, Zero> &);       	// "projects/library/seqan/chaining/score_zero.h"(80)
+template <typename TValue> inline TValue const scoreMatch(Score<TValue, Zero> const &);       	// "projects/library/seqan/chaining/score_zero.h"(86)
+template <typename TValue> inline TValue scoreMatch(Score<TValue, Manhattan> & me);       	// "projects/library/seqan/chaining/score_manhattan.h"(104)
+template <typename TValue> inline TValue scoreMatch(Score<TValue, Manhattan> const & me);       	// "projects/library/seqan/chaining/score_manhattan.h"(110)
+template <typename TValue> inline TValue & scoreMatch(Score<TValue, ChainSoP> & me);       	// "projects/library/seqan/chaining/score_chain_sop.h"(149)
+template <typename TValue> inline TValue const & scoreMatch(Score<TValue, ChainSoP> const & me);       	// "projects/library/seqan/chaining/score_chain_sop.h"(155)
+
+//____________________________________________________________________________
+// scoreMismatch
+
+template <typename TValue> inline TValue scoreMismatch(Score<TValue, Zero> & );       	// "projects/library/seqan/chaining/score_zero.h"(93)
+template <typename TValue> inline TValue const scoreMismatch(Score<TValue, Zero> const &);       	// "projects/library/seqan/chaining/score_zero.h"(99)
+template <typename TValue> inline TValue scoreMismatch(Score<TValue, Manhattan> & me);       	// "projects/library/seqan/chaining/score_manhattan.h"(117)
+template <typename TValue> inline TValue scoreMismatch(Score<TValue, Manhattan> const & me);       	// "projects/library/seqan/chaining/score_manhattan.h"(123)
+template <typename TValue> inline TValue & scoreMismatch(Score<TValue, ChainSoP> & me);       	// "projects/library/seqan/chaining/score_chain_sop.h"(162)
+template <typename TValue> inline TValue const & scoreMismatch(Score<TValue, ChainSoP> const & me);       	// "projects/library/seqan/chaining/score_chain_sop.h"(168)
+
+//____________________________________________________________________________
+// searchElement
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > >::Type searchElement( SkipList< TObject, TModus, TSpec, TStructuring > & list, TKey theKey );       	// "projects/library/seqan/chaining/skip_list_base.h"(675)
+
+//____________________________________________________________________________
+// setKey
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > __inline void setKey( SkipElement< TObject, TModus, TSpec, TStructuring > & me, TKey pos );       	// "projects/library/seqan/chaining/skip_element.h"(264)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline void setKey( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, TKey theKey);       	// "projects/library/seqan/chaining/skip_base_element.h"(729)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline void setKey( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * me, TKey theKey);       	// "projects/library/seqan/chaining/skip_base_element.h"(738)
+template <typename TFragType, typename TSpec, typename TSize, typename TKey > inline void setKey( ChainPoint_< TFragType, TSpec > & me, TSize dim, TKey val );       	// "projects/library/seqan/chaining/chain_point.h"(86)
+template <typename TFragType, typename TSpec, typename TSize, typename TKey > inline void setKey( const ChainPoint_< TFragType, TSpec > & me, TSize dim, TKey val );       	// "projects/library/seqan/chaining/chain_point.h"(96)
+
+//____________________________________________________________________________
+// setLeftPosition
+
+template <typename TPosition, typename TSize, typename TPosition2> inline void setLeftPosition(Seed<TPosition, MultiSeed> & me, TSize dim, TPosition2 new_pos);       	// "projects/library/seqan/chaining/fragment.h"(326)
+
+//____________________________________________________________________________
+// setParentAllocator
+
+template <typename TClass, typename TParentAlloc > inline void setParentAllocator( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me, TParentAlloc & alloc_);       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(178)
+template <typename TClass, typename TParentAlloc > inline void setParentAllocator( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me, TParentAlloc & alloc_);       	// "projects/library/seqan/chaining/skip_pool_alloc.h"(308)
+
+//____________________________________________________________________________
+// setPriority
+
+template <typename TFragType, typename TSpec, typename TPrio > inline void setPriority( ChainPoint_< TFragType, TSpec > & me, TPrio prio );       	// "projects/library/seqan/chaining/chain_point.h"(184)
+template <typename TFragType, typename TWeight > inline void setPriority( MetaFragment_< TFragType > & me, TWeight prio );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(97)
+
+//____________________________________________________________________________
+// setRightPosition
+
+template <typename TPosition, typename TSize, typename TPosition2> inline void setRightPosition(Seed<TPosition, MultiSeed> & me, TSize dim, TPosition2 new_pos);       	// "projects/library/seqan/chaining/fragment.h"(344)
+
+//____________________________________________________________________________
+// setScore
+
+template <typename TFragType, typename TWeight > inline void setScore( MetaFragment_< TFragType > & me, TWeight score );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(81)
+
+//____________________________________________________________________________
+// setWeight
+
+template <typename TBorder, typename TSpec, typename TWeight > inline void setWeight( Seed< TBorder, TSpec > & me, TWeight weight );       	// "projects/library/seqan/chaining/fragment.h"(308)
+template <typename TFragType, typename TWeight> inline void setWeight( MetaFragment_< TFragType > & me, TWeight weight );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(65)
+
+//____________________________________________________________________________
+// value
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Reference< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type value( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me);       	// "projects/library/seqan/chaining/skip_base_element.h"(191)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Reference< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type value( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const & me);       	// "projects/library/seqan/chaining/skip_base_element.h"(199)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Reference< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type value( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * me);       	// "projects/library/seqan/chaining/skip_base_element.h"(207)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline typename Reference< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type value( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const * me);       	// "projects/library/seqan/chaining/skip_base_element.h"(214)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos> inline typename Reference< SkipList< TObject, TModus, TSpec, TStructuring > >::Type value( SkipList< TObject, TModus, TSpec, TStructuring > & me, TPos pos);       	// "projects/library/seqan/chaining/skip_list_impl.h"(283)
+template <typename TObject, typename TSpec, typename TStructuring, typename TPos> inline typename Reference< SkipList< TObject, SkipListStatic, TSpec, TStructuring > >::Type value( SkipList< TObject, SkipListStatic, TSpec, TStructuring > & me, TPos pos);       	// "projects/library/seqan/chaining/skip_list_impl.h"(300)
+
+//____________________________________________________________________________
+// valueConstruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > __inline void valueConstruct( SkipElement< TObject, TModus, TSpec, TStructuring > * it, SkipElement< TObject, TModus, TSpec, TStructuring > * right, SkipBaseElement< TObject, TModus, TSpec, TStructuring > * down, TKey theKey );       	// "projects/library/seqan/chaining/skip_element.h"(359)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void valueConstruct( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * it );       	// "projects/library/seqan/chaining/skip_base_element.h"(255)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void valueConstruct( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * it, TObject * obj );       	// "projects/library/seqan/chaining/skip_base_element.h"(264)
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline void valueConstruct( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * it, TObject * obj, TKey key );       	// "projects/library/seqan/chaining/skip_base_element.h"(274)
+
+//____________________________________________________________________________
+// valueDestruct
+
+template <typename TObject, typename TModus, typename TSpec, typename TStructuring > inline void valueDestruct( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * it );       	// "projects/library/seqan/chaining/skip_base_element.h"(247)
+
+//____________________________________________________________________________
+// weight
+
+template <typename TObject, typename TSpec, typename TStructuring > inline typename Weight< TObject >::Type weight( SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me );       	// "projects/library/seqan/chaining/rmt_skip_base_element.h"(44)
+template <typename TObject, typename TSpec, typename TStructuring > inline typename Weight< TObject >::Type weight( SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me );       	// "projects/library/seqan/chaining/rmt_skip_element.h"(113)
+template <typename TBorder, typename TSpec > inline typename Weight< Seed< TBorder, TSpec > >::Type weight( Seed< TBorder, TSpec > & me );       	// "projects/library/seqan/chaining/fragment.h"(292)
+template <typename TBorder, typename TSpec > inline typename Weight< Seed< TBorder, TSpec > >::Type weight( const Seed< TBorder, TSpec > & me );       	// "projects/library/seqan/chaining/fragment.h"(299)
+template <typename TFragType > inline typename Weight< TFragType >::Type weight( MetaFragment_< TFragType > & me );       	// "projects/library/seqan/chaining/chain_meta_fragment.h"(57)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/chaining/fragment.h b/src/SeqAn-1.3/seqan/chaining/fragment.h
new file mode 100644
index 0000000..df0e4b2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/fragment.h
@@ -0,0 +1,402 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FRAGMENT_H
+#define SEQAN_HEADER_FRAGMENT_H
+
+
+namespace seqan
+{
+
+
+
+/**
+.Spec.MultiSeed:
+..summary:Data structure which represents a seed of multiple sequences.
+..cat:Chaining
+..cat:Seed Handling
+..general:Class.Seed
+..signature:Seed<TPosition, MultiSeed>
+..param.TPosition:Type of the class which represents the limits (multidimensional point) of a seed.
+..include:seqan/chaining.h
+*/
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			Class Seed implementation
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+struct MultiSeed;
+
+template <typename TBorder>
+class Seed <TBorder, MultiSeed>
+{
+public:
+	typedef MultiSeed TSpec;
+	typename Key< Seed< TBorder, TSpec > >::Type * _left;
+	typename Key< Seed< TBorder, TSpec > >::Type * _right;
+	typename Size< Seed< TBorder, TSpec > >::Type _dim;
+	typename Weight< Seed< TBorder, TSpec > >::Type _weight;
+
+/*
+#ifdef SEQAN_CHAIN_DEBUG_ // some debugging variables to identify fragments while debugging
+	char _id;
+
+	friend inline 
+	char 
+	_getID( Seed & me )
+	{
+		return me._id;
+	}
+
+	friend inline 
+	char 
+	_getID( const Seed & me )
+	{
+		return me._id;
+	}
+
+#endif // SEQAN_CHAIN_DEBUG_
+
+
+#ifdef SEQAN_CHAIN_DEBUG_
+	static int _frag_counter;
+#endif // SEQAN_CHAIN_DEBUG_
+*/
+
+	Seed( )
+		: _left( NULL )
+		, _right( NULL )
+		, _dim( 0 )
+		, _weight( 0 )
+	{}
+
+	Seed( typename Size< Seed< TBorder, TSpec > >::Type dim )
+		: _left( NULL )
+		, _right( NULL )
+		, _dim( dim )
+		, _weight( 0 )
+	{
+		allocate( *this, _left, _dim );
+		allocate( *this, _right, _dim );
+	}
+
+	Seed( TBorder * left,
+				TBorder * right,
+				typename Size< Seed< TBorder, TSpec > >::Type dim )
+		: _left( NULL )
+		, _right( NULL )
+		, _dim( dim )
+		, _weight( 0 )
+	{
+		allocate( *this, _left, _dim );
+		allocate( *this, _right, _dim );
+		_weight = 0;
+		for( typename Size< Seed< TBorder, TSpec > >::Type i = 0; i < dim; ++i )
+		{
+			_left[ i ] = left[ i ];
+			_right[ i ] = right[ i ];
+		}
+	}
+
+	Seed( TBorder * left,
+				TBorder * right,
+				typename Size< Seed< TBorder, TSpec > >::Type dim,
+				typename Weight< Seed< TBorder, TSpec > >::Type weight )
+		: _left( NULL )
+		, _right( NULL )
+		, _dim( dim )
+		, _weight( weight )
+	{
+		allocate( *this, _left, _dim );
+		allocate( *this, _right, _dim );
+		for( typename Size< Seed< TBorder, TSpec > >::Type i = 0; i < dim; ++i )
+		{
+			_left[ i ] = left[ i ];
+			_right[ i ] = right[ i ];
+		}
+	}
+
+	
+	Seed & operator=( const Seed & old )
+	{
+		if( this == &old) 
+			return *this;
+		if( _left )
+			deallocate( *this, _left, _dim );
+		if( _right )
+			deallocate( *this, _right, _dim );
+		_dim = old._dim;
+		_weight =  old._weight;
+		allocate( *this, _left, _dim );
+		allocate( *this, _right, _dim );
+		for( typename Size< Seed< TBorder, TSpec > >::Type i = 0; i < _dim; ++i )
+		{
+			_left[ i ] = old._left[ i ];
+			_right[ i ] = old._right[ i ];
+		}			
+	#ifdef SEQAN_CHAIN_DEBUG_
+		_id = old._id;
+	#endif
+		return *this;
+	}
+
+	Seed( const Seed & old )
+	{
+		_dim = old._dim;
+		_weight =  old._weight;
+		allocate( *this, _left, _dim );
+		allocate( *this, _right, _dim );
+		for( typename Size< Seed< TBorder, TSpec > >::Type i = 0; i < _dim; ++i )
+		{
+			_left[ i ] = old._left[ i ];
+			_right[ i ] = old._right[ i ];
+		}			
+	#ifdef SEQAN_CHAIN_DEBUG_
+		_id = old._id;
+	#endif
+	}
+
+	~Seed()
+	{
+		deallocate( *this, _left, _dim );
+		deallocate( *this, _right, _dim );
+		_dim = 0;
+		_weight = 0;
+	}
+
+	friend inline
+	void 
+	dump( Seed & me )
+	{
+		if( me._left != NULL )
+		{
+			std::cout << "[ ";
+			typename Size< Seed< TBorder, TSpec > >::Type dim = 0;
+			std::cout << leftPosition( me, dim );
+			++dim;
+			while( dim != me._dim )
+			{
+				std::cout << " , " << leftPosition( me, dim );
+				++dim;
+			}
+			std::cout << " ] * [ ";
+			dim = 0;
+			std::cout << rightPosition( me, dim );
+			++dim;
+			while( dim != me._dim )
+			{
+				std::cout << " , "<< rightPosition( me, dim );
+				++dim;
+			}
+			std::cout << " ] "  << weight( me ) << std::endl;
+		}
+	}
+
+	#ifdef SEQAN_CHAIN_DEBUG_
+	friend inline
+	void 
+	dump( Seed & me, std::ostream & os )
+	{
+		if( me._left != NULL )
+		{
+			typename Size< Seed< TBorder, TSpec > >::Type dim = 0;
+			os << "# " << weight( me )/10 << std::endl;
+			while( dim != me._dim )
+			{
+				os << "[" << leftPosition( me, dim ) << "," << rightPosition( me, dim ) << "]";
+				++dim;
+			}
+			os << std::endl;
+		}
+	}
+	#endif // SEQAN_CHAIN_DEBUG_
+
+};
+
+template< typename TBorder > inline
+typename Size< Seed< TBorder, MultiSeed > >::Type
+dimension( Seed< TBorder, MultiSeed > & me )
+{
+	return me._dim;
+}
+
+template< typename TBorder, typename TSize > inline 
+TBorder 
+leftPosition( Seed< TBorder, MultiSeed >  & me, 
+				TSize dim )
+{
+	return me._left[ dim ];
+}
+
+template< typename TBorder, typename TSize > inline 
+TBorder 
+leftPosition( const Seed< TBorder, MultiSeed >  & me, 
+				TSize dim )
+{
+	return me._left[ dim ];
+}
+
+template< typename TBorder, typename TSize > inline 
+TBorder 
+rightPosition( Seed< TBorder, MultiSeed >  & me, 
+				TSize dim )
+{
+	return me._right[dim];
+}
+
+template< typename TBorder, typename TSize > inline 
+TBorder 
+rightPosition( const Seed< TBorder, MultiSeed >  & me,
+				TSize dim )
+{
+SEQAN_ASSERT( me._left->size() == me._right->size() )
+	return me._right[dim];
+}
+
+
+
+template< typename TBorder, typename TSpec > inline 
+typename Weight< Seed< TBorder, TSpec > >::Type 
+weight( Seed< TBorder, TSpec > & me )
+{
+	return me._weight;
+}
+
+template< typename TBorder, typename TSpec > inline 
+typename Weight< Seed< TBorder, TSpec > >::Type 
+weight( const Seed< TBorder, TSpec > & me )
+{
+	return me._weight;
+}
+
+
+template< typename TBorder, typename TSpec, typename TWeight > 
+inline void 
+setWeight( Seed< TBorder, TSpec > & me,
+			TWeight weight )
+{
+	me._weight = weight;
+}
+
+template< typename TBorder, typename TSpec, typename TSize, typename TPosition > 
+inline void 
+_setLeftPosition( Seed< TBorder, TSpec > & me,
+					TSize dim,
+					TPosition value )
+{
+	SEQAN_CHECK2( dim >= 0 && dim < me._dim, "Dimension index out of bounds" );
+	me._left[ dim ] = value;
+}
+template< typename TPosition, typename TSize, typename TPosition2> 
+inline void
+setLeftPosition(Seed<TPosition, MultiSeed>  & me, 
+				TSize dim,
+				TPosition2 new_pos)
+{
+	_setLeftPosition(me, dim, new_pos);
+}
+
+template< typename TBorder, typename TSpec, typename TSize, typename TPosition > 
+inline void 
+_setRightPosition( Seed< TBorder, TSpec > & me,
+					TSize dim, 
+					TPosition value )
+{
+	SEQAN_CHECK2( dim >= 0 && dim < me._dim, "Dimension index out of bounds" );
+	me._right[ dim ] = value;
+}
+template< typename TPosition, typename TSize, typename TPosition2> 
+inline void 
+setRightPosition(Seed<TPosition, MultiSeed>  & me, 
+				 TSize dim,
+				 TPosition2 new_pos)
+{
+	_setRightPosition(me, dim, new_pos);
+}
+
+
+
+
+//set a fragment to "top" position, that is the starting fragment of a global chain
+template <typename TFragment> 
+inline void 
+makeBeginFragment(TFragment & me)
+{
+	unsigned int dim = dimension(me);
+	for (unsigned int i = 0; i < dim; ++i)
+	{
+		_setLeftPosition(me, i, 0);		//probably dont need left positions for top fragment
+		_setRightPosition(me, i, 0);
+	}
+}
+
+//set a fragment to "bottom" position in respect to a fragment set
+template <typename TFragment, typename TFragments> 
+inline void 
+makeEndFragment(TFragment & me,
+				TFragments & fragments)
+{
+	typedef typename Size<TFragment>::Type TSize;
+
+	unsigned int dim = dimension(me);
+	String<TSize> maxes;
+	resize(maxes, dim);
+	arrayFill(begin(maxes, Standard()), end(maxes, Standard()), 0);
+
+	typedef typename Iterator<TFragments, Standard>::Type TIterator;
+	for (TIterator it = begin(fragments, Standard()); it < end(fragments, Standard()); ++it)
+	{
+		for (unsigned int i = 0; i < dim; ++i)
+		{
+			TSize rpos = rightPosition(*it, i);
+			if (rpos > maxes[i])
+			{
+				maxes[i] = rpos;
+			}
+		}
+	}
+	for (unsigned int i = 0; i < dim; ++i)
+	{
+		_setLeftPosition(me, i, maxes[i] );	
+		_setRightPosition(me, i, maxes[i] );		//probably dont need right positions for bottom fragments
+	}
+}
+
+
+
+
+} // namespace seqan
+
+#endif // SEQAN_HEADER_FRAGMENT_H
+
diff --git a/src/SeqAn-1.3/seqan/chaining/geom_distribution.h b/src/SeqAn-1.3/seqan/chaining/geom_distribution.h
new file mode 100644
index 0000000..f71b588
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/geom_distribution.h
@@ -0,0 +1,75 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+/*	
+*	Random bit generator
+*	
+*	from Numerical Recipes in C
+*	
+*/
+
+
+#ifndef SEQAN_HEADER_RAND_GEOM
+#define SEQAN_HEADER_RAND_GEOM
+
+
+#define SEQAN_RG_IB1 1
+#define SEQAN_RG_IB2 2
+#define SEQAN_RG_IB5 16
+#define SEQAN_RG_IB18 131072
+#define SEQAN_RG_MASK ( SEQAN_RG_IB1 + SEQAN_RG_IB2 + SEQAN_RG_IB5 )
+
+namespace seqan {
+
+	template< typename T > inline
+	T
+	_geomRand( )
+	{
+		static unsigned long seed = rand();
+		T value = 0;
+		while( true )
+		{
+			if( ( seed & SEQAN_RG_IB18 ) ){
+				seed = ( ( seed ^ SEQAN_RG_MASK ) << 1 ) | SEQAN_RG_IB1;
+				++value;
+			}
+			else {
+				seed <<= 1;
+				break;
+			}
+		}
+		return value;
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/chaining/range_max_tree.h b/src/SeqAn-1.3/seqan/chaining/range_max_tree.h
new file mode 100644
index 0000000..e34d43b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/range_max_tree.h
@@ -0,0 +1,52 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_RANGE_MAX_TREE_H
+#define SEQAN_RANGE_MAX_TREE_H
+
+#include <seqan/chaining/range_tree.h>
+#include <seqan/chaining/rmt_base.h>
+#include <seqan/chaining/rmt_skip_base_element.h>
+#include <seqan/chaining/rmt_skip_element.h>
+#include <seqan/chaining/rmt_compl_algos.h>
+#include <seqan/chaining/rmt_def_algos.h>
+#include <seqan/chaining/rmt_common_algos.h>
+
+
+namespace seqan
+{
+
+
+} // namespace SEQAN_NAMESPACE_SKIPLIST
+
+#endif // SEQAN_RANGE_MAX_TREE_H
+
diff --git a/src/SeqAn-1.3/seqan/chaining/range_tree.h b/src/SeqAn-1.3/seqan/chaining/range_tree.h
new file mode 100644
index 0000000..bfd9003
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/range_tree.h
@@ -0,0 +1,58 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef RANGE_TREE_H_
+#define RANGE_TREE_H_
+
+#include <seqan/basic.h>
+
+#include <seqan/chaining/skip_list.h>
+#include <seqan/chaining/rt_base.h>
+#include <seqan/chaining/rt_common_algos.h>
+#include <seqan/chaining/rt_sl_base.h>
+#include <seqan/chaining/rt_sl_impl.h>
+#include <seqan/chaining/rt_skip_element.h>
+#include <seqan/chaining/rt_skip_base_element.h>
+#include <seqan/chaining/rt_impl.h>
+#include <seqan/chaining/rt_sl_def_algos.h>
+#include <seqan/chaining/rt_sl_compl_algos.h>
+
+namespace seqan
+{
+
+
+} // namespace SEQAN_NAMESPACE_SKIPLIST
+
+
+#endif //RANGE_TREE_H_
diff --git a/src/SeqAn-1.3/seqan/chaining/rmt_base.h b/src/SeqAn-1.3/seqan/chaining/rmt_base.h
new file mode 100644
index 0000000..bf21d55
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rmt_base.h
@@ -0,0 +1,310 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_RMT_MAX_BASE_H
+#define SEQAN_RMT_MAX_BASE_H
+
+/*
+ *  rmt_base.h
+ *  rmt
+ *
+ *  Created by Hendrik Woehrle
+ *
+ *	Contains basic decalrations, definitions, types
+ *
+ */
+
+namespace seqan{
+
+/*DISABLED
+.Spec.RangeMaximumTree:
+..cat:Range Tree
+..summary:The RangeMaximumTree is a data structure to find the object with maximal score in a hypercorner.
+..signature:RangeTree< TObject, [ TModus, TSpec, TStructuring] >
+..param.TObject:Type of stored objects.
+..param.TModus:Modus of operation of a RangeTree. A RangeTree is static.
+..param.TSpec:Specialization of the RangeTree. Must be $MaxTree<>$.
+..param.TStructuring:Parameter to specify whether the RangeTree uses Deferred Data Structuring or not.
+..remarks:The object given to the RangeTree should offer the following functions:
+..remarks:$key( obj, dim )$: returns the key of the object for dimension $dim$.
+..remarks:$setKey( obj, dim, k )$: set the key of the object to $k$ for dimension $dim$.
+..remarks:In contrast to STL-like containers, the objects are not cloned by the RangeTree. It only supports searching operations on a set of objects. This set must be handled by the user.
+..include:seqan/chaining.h
+*/
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	declarations, types, tags
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+		// spec for the RMT
+	template< typename TSpec = Default >
+	struct MaxTree
+	{};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	class RangeTree;
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Cargo< SkipList< TObject, TModus, RT< MaxTree< TSpec > >, TStructuring > >
+	{
+		typedef EmptyCargo_ Type;
+	};
+
+	
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	metafunctions
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Weight:
+..summary:Type of the weight of an item. 
+..signature:Weight<T>::Type
+..param.T:Type for which the weight type is determined.
+..returns.param.Type:Weight type of $T$.
+..remarks.text:The weight type of an item $T$ is the type which is used by $T$ for scores or priorities.
+..include:seqan/chaining.h
+*/
+
+	template< typename T >
+	struct Weight
+	{
+		typedef int Type;
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Weight< RangeTree< TObject, TModus, TSpec, TStructuring > >
+	{
+		typedef typename Weight< TObject >::Type Type;
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Weight< RangeTree< TObject, TModus, TSpec, TStructuring > const >
+	{
+		typedef typename Weight< TObject >::Type const Type;
+	};
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Weight< SkipList< TObject, TModus, TSpec, TStructuring > >
+	{
+		typedef typename Weight< TObject >::Type Type;
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Weight< SkipList< TObject, TModus, TSpec, TStructuring > const >
+	{
+		typedef typename Weight< TObject >::Type const Type;
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Weight< SkipElement< TObject, TModus, TSpec, TStructuring > >
+	{
+		typedef typename Weight< TObject >::Type Type;
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Weight< SkipElement< TObject, TModus, TSpec, TStructuring > const >
+	{
+		typedef typename Weight< TObject >::Type const Type;
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Weight< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >
+	{
+		typedef typename Weight< TObject >::Type Type;
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Weight< SkipBaseElement< TObject, TModus, TSpec, TStructuring > const >
+	{
+		typedef typename Weight< TObject >::Type const Type;
+	};
+
+	
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	basic data utility functions
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+
+		// tests, if an object lies in the area of interest and has maximum priority
+		// by brute force
+	template< typename TObject, typename TSize > inline
+	void 
+	_testBruteForceMax(	TObject * elem,
+						TObject * border,
+						TObject *& max_object,
+						TSize _dim )
+	{
+		bool in_range = true;
+		TSize dim = 0;
+		while( in_range && dim < _dim ){
+			in_range = ( key( *elem, dim ) < key( *border, dim ) );
+			++dim;
+		}
+		if( in_range && priority( *elem ) > priority( *max_object ) )
+			max_object = elem;
+	}
+
+		// test if an element is in range and has a larger priority
+	template< typename TObject, typename TBorder, typename TSize > inline
+	void 
+	_testRangeMax(	TObject * elem,
+					TBorder * border,
+					TObject *& max_object,
+					TSize dim )
+	{
+		bool in_range = true;
+		while( in_range && dim > 0 ){
+			in_range = ( key( *elem, dim ) < key( *border, dim ) );
+			--dim;
+		}
+		in_range = in_range && ( key( *elem, dim ) < key( *border, dim ) );
+		if( in_range && priority( *elem ) > priority( *max_object ) )
+			max_object = elem;
+	}
+
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	bool
+	_checkAssocThresh( SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * first,
+						SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * second )
+	{
+		SEQAN_CHECKPOINT
+		return ( ( second - first ) > 16 );
+	}
+
+		// dump of the lowest layer of a RMT
+	template< typename TObject, typename TSpec, typename TStructuring, typename TSize1, typename TSize2 >
+	void 
+	printLayerScores(	SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list,
+						TSize1 layer,
+						TSize2 _dim )
+	{
+		if( layer == 0 ){
+			for( typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type j = 0; j < length( *list ) + 1; ++j ){
+				std::cout.width(3);
+				std::cout<< "___";
+			}
+			std::cout<<std::endl;
+			typename Iterator< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type temp;
+			for( typename Size< TObject >::Type dim = 0; dim < dimension( *_getMainTree( *list ) ); ++dim )
+			{
+				temp = begin( *list );
+				--temp;
+				while( _pointsTo( temp ) != _pointsTo( end( *list ) ) ){
+					std::cout.width(3);
+					if( key( *temp, dim ) == minValue< typename Key< TObject >::Type >( ) )
+						std::cout << std::left << "L";
+					else
+						std::cout << std::left << key( *temp, dim );
+					++temp;
+				}
+				if( dim == _dim )
+					std::cout << "<-";
+				std::cout << std::endl;
+			}
+			std::cout<<std::endl;
+			printScores( *list );
+		}
+		else {
+			SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * temp = _getBaseStore( *list );
+			while( temp != NULL && temp != end( *list ) ){
+				if( _getHeight( *temp ) >= layer ){
+					if( _getRight( *( &_getUp( *temp ) + layer - 1) ) ){
+						std::stringstream s;
+						if( priority( &_getUp( *temp ) + layer - 1 ) == minValue< typename Weight< TObject >::Type >() )
+							s << std::left << "L";
+						else
+							s << priority( &_getUp( *temp ) + layer - 1 );
+						std::cout.width(3);
+						std::cout << std::left << s.str();
+					}
+					else{
+						std::cout.width(3);
+						std::cout << priority( &_getUp( *temp ) + layer - 1 );
+					}
+				}
+				else if( temp == _getBaseStore( *list ) )
+				{
+					std::stringstream s;
+					if( priority( &_getUp( *temp ) + layer - 1 ) == minValue< typename Weight< TObject >::Type >() )
+						s << std::left << "L";
+					else
+						s << priority( &_getUp( *temp ) + layer - 1 );
+					std::cout.width(3);
+					std::cout << std::left << s.str();
+				}
+				else {
+					std::cout.width(3);
+					std::cout << " ";
+				}
+				++temp;
+			} 
+		}
+		std::cout << std::endl;
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring >
+	void
+	printScores( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & list )
+	{
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring >* temp = _getBaseStore( list );
+		for( typename seqan::Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type i = 0; i < length( list ) + 1; ++i ){
+			std::cout.width(3);
+			if( temp == _getBaseStore( list ) )
+				std::cout << std::left << "L";
+			else
+				std::cout << weight( temp );
+			++temp;
+		}
+		std::cout << std::endl;
+		temp = _getBaseStore( list );
+		for( typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type i = 0; i < length( list ) + 1; ++i ){
+			std::cout.width(3);
+			if( priority( temp ) == minValue< typename Weight< TObject >::Type >() )
+				std::cout << std::left << "L";
+			else
+				std::cout << priority( temp );
+			++temp;
+		}
+		std::cout << std::endl;
+	}
+
+}
+
+
+#endif // SEQAN_RMT_MAX_BASE_H
diff --git a/src/SeqAn-1.3/seqan/chaining/rmt_common_algos.h b/src/SeqAn-1.3/seqan/chaining/rmt_common_algos.h
new file mode 100644
index 0000000..2e117a9
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rmt_common_algos.h
@@ -0,0 +1,329 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_RMT_SL_COMMON_ALGOS_H
+#define SEQAN_HEADER_RT_SL_COMMON_ALGOS_H
+
+/*
+ *  rmt_common_algos.h
+ *  rmt
+ *
+ *  Created by Hendrik Woehrle
+ *
+ *	Contains functions for all specs of the RMT
+ *
+ */
+
+namespace seqan{
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	tree algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*DISABLED
+.Function.rangeMaxQuery:
+..summary:Get the object with maximum priority in the RMT in a given intervall
+..cat:Range Tree
+..signature:rangeMaxQuery(tree, border)
+..param.tree:A Range Tree with spec MaxTree.
+...type:RangeMaximumTree
+..param.border:The object that stores the borders for all dimensions.
+..returns:A pointer to the object witch maximal priority in the given intervall.
+..include:seqan/chaining.h
+*/
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TBorder >
+	TObject *
+	rangeMaxQuery( RangeTree< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & tree,
+					TBorder & border_obj )
+	{
+		SEQAN_CHECK( dimension( border_obj ) >= dimension( tree ) )
+		TObject * maxObject = _getLBorderObj( tree );
+		_processRMQ( _getList( tree ), dimension( tree ) - 1, border_obj, maxObject );
+		return maxObject;
+	}
+
+		// wrappper function to distinguis between higher dimensions or lower dimensions
+		// in a RMQ
+	template< typename TObject, typename TSpec, typename TStructuring, typename TBorder > inline
+	void
+	_processRMQ(	SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list,
+					typename Size< TObject >::Type dim,
+					TBorder & borderObj,
+					TObject *& maxObject )
+	{
+		typename Key< TObject >::Type searchKey = key( borderObj, dim );
+		if( dim > 0 )
+			_performRMQ( list, borderObj, dim, searchKey, maxObject );
+		else
+			_performRMQ( list, borderObj, searchKey, maxObject );
+	}
+
+/*DISABLED
+.Function.activate:
+..summary:Update the internal pointer structure of the RMT. 
+..cat:Range Tree
+..signature:activate( tree, obj )
+..signature:activate( tree, obj, prio )
+..param.tree:The tree.
+...type:Class.RangeMaximumTree
+..param.obj:The object.
+..param.prio:The new priority (optional). $prio > priority( obj )$ must hold.
+...type:$Metafunction.Weight< TObject >::Type$.
+..include:seqan/chaining.h
+*/
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	activate( RangeTree< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & tree,
+			   TObject & obj )
+	{
+		_activate( _getList( tree ), &obj, dimension( tree ) - 1 );
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TWeight > inline
+	void
+	activate( RangeTree< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & tree,
+			   TObject & obj,
+			   TWeight prio )
+	{
+		SEQAN_CHECK( prio >= priority( obj ) )
+		setPriority( obj, prio );
+		_activate( _getList( tree ), &obj, dimension( tree ) - 1 );
+	}
+
+
+		// activate for higher layers
+		// -> searches lower layers that contain the object whose priority should be increased
+	template< typename TObject, typename TSpec, typename TStructuring, typename TSize >
+	void
+	_activateHigherLayer(	SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list,
+							TObject * obj,
+							TSize dim )
+	{
+		typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type height = _getCurrentLayer( *list );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * layer_element = _getRoot( *list );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * right_buffer = _getRight( *layer_element );
+
+		typename Key< TObject >::Type searchKey = key( *obj, dim );
+		while( height > 0 )
+		{
+			while( key( *right_buffer ) <= searchKey )
+			{	
+				layer_element = right_buffer;
+				right_buffer = _getRight( *right_buffer );
+			}
+			if( _hasBigAssocStruct( layer_element ) )
+				_activate( _getAssocStruct( layer_element ), obj, dim-1 );
+			--height;
+			--layer_element;
+			right_buffer = _getRight( *layer_element );
+		}
+
+	}
+
+
+		// the activation of the object in the lowest layer,
+		// updates the max-pointers
+	template< typename TObject, typename TSpec, typename TStructuring, typename TSize >
+	void
+	_activate(  SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list,
+				TObject * obj,
+				TSize dim )
+	{
+		if( dim > 0 ){
+			_activateHigherLayer( list, obj, dim );
+		}
+		else {
+			typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type height = _getCurrentLayer( *list );
+			SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > ** sp = _getSearchPath( *_getMainTree( *list ), dim ) + height - 1;
+			SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * layer_element = _getRoot( *list );
+			typename Key< TObject >::Type search_key = key( *obj, dim );
+			while( height > 0 )
+			{
+				while( key( *_getRight( *layer_element ) ) <= search_key )
+				{	
+					layer_element = _getRight( *layer_element );		
+				}
+				--height;
+				*sp = layer_element;
+				--layer_element;
+				--sp;
+			}
+			++sp;
+			++layer_element;
+			++height;
+			typename Weight< TObject >::Type new_score = priority( *obj );
+			typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type max_height = _getCurrentLayer( *list ) + 1;
+			while( height < max_height ){
+				if( priority( *sp ) <= new_score )
+					_setMaxObject( *sp, obj );
+				else
+					break;
+				++height;
+				++sp;
+			}
+		}
+	}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	structure building algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+	
+
+/*DISABLED
+.Internal._connectUpdateMax:
+..summary:As _connectUpdate, additionaly updates the max-pointers in the lowest layer of the RMT.
+..cat:RangeMaximumTree
+..signature:_connectUpdateMax( list, base, height, key, search_path, max_obj )
+..param.list:The Skip List of the RMT representing this layer.
+...type:Class.SkipList
+..param.base:The base element.
+...type:Class.SkipBaseElement*
+..param.height:The height of the tower.
+..param.key:The key of base.
+..param.searchPath:The search path.
+...type:SkipElement**
+..param.max_obj:The object with maximal priority.
+*/
+	
+	template< typename TObject, typename TSpec, typename TStructuring, typename TSize, typename TKey >
+	void
+	_connectUpdateMax(	SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & list,
+							SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * base, 
+							TSize height,
+							TKey searchKey,
+							SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > ** search_path,
+							TObject * max_obj )
+	{
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * buffer = &_getUp( *base );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * tower_top = buffer + height;
+		
+		while( buffer != tower_top ){
+			new( buffer ) SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring >( _getRight( **search_path ), base, searchKey );
+			_setRight( **search_path, buffer );
+			_setMaxObject( buffer, max_obj );
+			*search_path = buffer;
+			++buffer;
+			++search_path;
+		}
+		typename Weight< TObject >::Type score = priority( *max_obj );
+		typename Size< TObject >::Type max_height = _getMaximalSLTowerHeight( list );
+		while( height < max_height )
+		{
+			SEQAN_CHECK( max_obj != NULL )
+			if( priority( *search_path ) < score )
+				_setMaxObject( *search_path, max_obj );
+			else break;
+			++search_path;
+			++height;
+		}
+	}
+	
+			// build towers with maximum pointers in the lowest layer of the rmt
+	template< typename TObject, typename TSpec, typename TStructuring >
+	void
+	_buildMaxTowers( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & list )
+	{
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * buffer = _getBaseStore( list );
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * end = buffer + length( list ) + 1;
+		typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type max_height = _getMaximalSLTowerHeight( list );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > ** search_path = new SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring >*[ max_height ];
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * elem_buffer = &_getUp( *buffer );
+		TObject * border_obj = getObject( buffer );
+		
+		typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type height = 0;
+		
+		typename Key< TObject >::Type buffer_key = key( *buffer );
+
+		for( typename Size< TObject >::Type i = 0; i < max_height; ++i ){
+			*search_path = elem_buffer;
+			_setMaxObject( elem_buffer, border_obj );
+			++search_path;
+			++elem_buffer;
+		}
+		search_path -= max_height;
+		goNext( buffer );
+
+		typename Key< TObject >::Type act_key = key( *buffer );
+
+		while( buffer != end )
+		{
+			act_key = key( *buffer );
+			if( act_key != buffer_key )
+			{
+				height = _throwCoin< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring >( list, max_height );
+				if( height > 0 ){
+					_addMax( list, buffer, height, search_path );
+					_connectUpdateMax( list, buffer, height, act_key, search_path, getObject( buffer ) );
+				}
+				else
+					_activateScoreBuild( buffer, &list, search_path );
+				buffer_key = act_key;
+			}
+			else
+				_activateScoreBuild( buffer, &list, search_path );
+			goNext( buffer  );
+		}
+		delete[] search_path;
+	}
+
+
+		// _add adaption for the lowest layer in a rmt
+		// adjusts the max pointers
+	template< typename TObject, typename TSpec, typename TStructuring, typename THeight > inline
+	void 
+	_addMax(	SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring >  & list,
+				SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * base,
+				THeight height,
+				SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > ** /*search_path*/ )
+	{			
+			// adding additional layers, if necessary 
+		SEQAN_CHECK2( &_getUp( *base ) == NULL, "tried to build tower on bas element with tower" )
+		if( height > _getCurrentLayer( list ) ){
+			_setCurrentLayer( list, height );
+		}
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * tower;
+		allocate( _getElementAlloc( list ), tower, height );
+		_setUp( *base, *tower );
+		_setHeight( *base, height );
+	}
+
+
+}
+
+#endif // SEQAN_HEADER_RMT_SL_COMMON_ALGOS_H
+
diff --git a/src/SeqAn-1.3/seqan/chaining/rmt_compl_algos.h b/src/SeqAn-1.3/seqan/chaining/rmt_compl_algos.h
new file mode 100644
index 0000000..bc56f18
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rmt_compl_algos.h
@@ -0,0 +1,282 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_RMT_SL_COMPL_ALGOS_H
+#define SEQAN_HEADER_RMT_SL_COMPL_ALGOS_H
+
+namespace seqan{
+
+/*
+ *  rmt_compl_algos.h
+ *  rmt
+ *
+ *  Created by Hendrik Woehrle
+ *
+ *	Specializations for the complete RMT
+ *
+ */
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	structure building algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+		// construct the towers for the complete and semi deferred skip list layer in a rmt
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	_completeBuild( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > & list,
+					typename Size< TObject >::Type dim )
+	{
+		_sortRecursive( list, _getBaseStore( list ), _getBaseStore( list ) + length( list ) + 1, dim );
+		_setHeight( *_getBaseStore( list ), 1 );
+		if( dim != 0 )
+			_buildTowers( list, dim );
+		else _buildMaxTowers( list );
+	}
+	
+		// activation of the max pointers during initialization
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	_activateScoreBuild( SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * base,
+						SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list,
+						SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > ** search_path )
+	{
+		typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type height = 0;
+		typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type max_height = _getMaximalSLTowerHeight( *list );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > ** layer_element = search_path;
+		TObject * max_obj = getObject( base );
+		typename Weight< TObject >::Type max_score = priority( *max_obj );
+		while( height < max_height )
+		{
+			if( priority( *layer_element ) <= max_score )
+				_setMaxObject( *layer_element, max_obj );
+			else
+				break;
+			++height;
+			++layer_element;
+		}
+	}
+
+	
+
+		// reconnect the pointers after building
+		// special for the complete case
+	template< typename TObject, typename TModus, typename TSpec, typename TSize > inline
+	void 
+	_connectUpdate(	SkipList< TObject, TModus, RT< MaxTree< TSpec > >, Complete > & list,
+						SkipBaseElement< TObject, TModus, RT< MaxTree< TSpec > >, Complete > * base,
+						TSize height,
+						SkipElement< TObject, TModus, RT< MaxTree< TSpec > >, Complete > ** search_path,
+						TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, RT< MaxTree< TSpec > >, Complete > * buffer = &_getUp( *base );
+		typename Key< TObject >::Type searchKey = key( *base, dim );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Complete > * tower_top = buffer + height - 1;
+		while( buffer != tower_top ){
+			new( buffer ) SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Complete >( _getRight( **search_path ), base, searchKey );
+			_setRight( **search_path, buffer );
+			*search_path = buffer;
+			++buffer;
+			++search_path;
+		}
+		new( buffer ) SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Complete >( _getRight( **search_path ), base, searchKey );
+		_setRight( **search_path, buffer );	
+		_createAssocStruct( *search_path, &list, dim );
+		*search_path = buffer;
+	}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	range maximum tree algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+			// perform a rmq in higher layers, spec for semi deferred rmt
+	template< typename TObject, typename TSpec, typename TStructuring, typename TBorder, typename TSize, typename TKey >
+	void
+	_performRMQ(	SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list,
+					TBorder & borderObj,
+					TSize dim,
+					TKey searchKey,
+					TObject *& maxObject )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( searchKey < maxValue< typename Key< TObject >::Type >( ), "search theKeyexceeds supremum" ) 
+		SEQAN_CHECK2( searchKey > minValue< typename Key< TObject >::Type >( ), "search theKeyexceeds infimum" ) 
+	
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * layer_element = _getRoot( *list );
+		typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type height = _getCurrentLayer( *list );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * right_buffer = _getRight( *layer_element );
+		// search in higher layers		
+		while( height > 0 )
+		{
+			while( key( *right_buffer ) < searchKey )
+			{ 
+				if( !_hasAssocStruct( layer_element ) )
+					_createAssocStruct( layer_element, list, dim );
+				if( _hasSmallAssocStruct( layer_element ) )
+					_performSmallRMQ( layer_element, dim - 1, borderObj, maxObject );
+				else
+					_processRMQ( _getAssocStruct( layer_element ), dim - 1, borderObj, maxObject );
+				layer_element = right_buffer;
+				right_buffer = _getRight( *right_buffer );
+			}
+			--layer_element;
+			right_buffer = _getRight( *layer_element );
+			--height;
+		}
+		++layer_element;
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * base_element = _getDown( *layer_element );
+//		typename Weight< TObject >::Type max_score = priority( *maxObject );
+			// in the lowest layer, searching to the right
+		while( key( *base_element, dim ) < searchKey )
+		{
+			_testRangeMax( getObject( base_element ), &borderObj, maxObject, dim - 1 );
+			goNext( base_element );
+		}
+	}
+
+		// perform a rmq in higher layers, spec for complete rmt
+	template< typename TObject, typename TSpec, typename TBorder, typename TSize, typename TKey >
+	void
+	_performRMQ(	SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Complete > * list,
+					TBorder & borderObj,
+					TSize dim,
+					TKey searchKey,
+					TObject *& maxObject )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( searchKey < maxValue< typename Key< TObject >::Type >( ), "search theKeyexceeds supremum" ) 
+		SEQAN_CHECK2( searchKey > minValue< typename Key< TObject >::Type >( ), "search theKeyexceeds infimum" ) 
+	
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Complete > * layer_element = _getRoot( *list );
+		typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Complete > >::Type height = _getCurrentLayer( *list );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Complete > * right_buffer = _getRight( *layer_element );
+		
+			// search in higher layers		
+		while( height > 0 )
+		{
+			while( key( *right_buffer ) < searchKey )
+			{ 
+				if( _hasSmallAssocStruct( layer_element ) )
+					_performSmallRMQ( layer_element, dim - 1, borderObj, maxObject );
+				else
+					_processRMQ( _getAssocStruct( layer_element ), dim - 1, borderObj, maxObject );
+				layer_element = right_buffer;
+				right_buffer = _getRight( *right_buffer );
+			}
+			--layer_element;
+			right_buffer = _getRight( *layer_element );
+			--height;
+		}
+		++layer_element;
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Complete > * base_element = _getDown( *layer_element );
+		typename Weight< TObject >::Type max_score = priority( *maxObject );
+			// in the lowest layer, searching to the right
+		while( key( *base_element, dim ) < searchKey )
+		{
+			_testRangeMax( getObject( base_element ), &borderObj, maxObject, dim - 1 );
+			goNext( base_element );
+		}
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TBorder >
+	void
+	_performRMQ(	SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * list,
+					TBorder & /*obj*/,
+					typename Key< TObject >::Type searchKey,
+					TObject *& maxObject )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( searchKey < maxValue< typename Key< TObject >::Type >( ), "search theKeyexceeds supremum" ) 
+		SEQAN_CHECK2( searchKey > minValue< typename Key< TObject >::Type >( ), "search theKeyexceeds infimum" ) 
+	
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * layer_element = _getRoot( *list );
+		typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > >::Type height = _getCurrentLayer( *list );
+		TObject * temp_obj;
+		typename Weight< TObject >::Type max_score = priority( *maxObject );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * right_buffer = _getRight( *layer_element );
+			// search in higher layers		
+		while( height > 0 )
+		{
+			while( key( *right_buffer ) < searchKey )
+			{	
+				temp_obj = _getMaxObject( layer_element );
+				if( priority( *temp_obj ) >= max_score ){
+					maxObject = temp_obj;
+					max_score = priority( *maxObject );
+				}
+				layer_element = right_buffer;
+				right_buffer = _getRight( *right_buffer );
+			}
+			--layer_element;
+			--height;
+			right_buffer = _getRight( *layer_element );
+		}
+		++layer_element;
+			// lowest layer
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * base_element = _getDown( *layer_element );
+		while( key( *base_element ) < searchKey )
+		{
+			if( priority( *maxObject ) < priority( base_element ) )
+				maxObject = getObject( base_element );
+			goNext( base_element );
+		}
+	}
+
+		// perform a rmq for elements in a range which is below threshold
+	template< typename TObject, typename TSpec, typename TStructuring, typename TBorder > inline
+	void
+	_performSmallRMQ(	SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * elem,
+						typename Size< TObject >::Type dim,
+						TBorder & border,
+						TObject *& max_object )
+	{
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * end = _getDown( *_getRight( *elem ) );
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * buffer = _getDown( *elem );
+		while( buffer != end )
+		{
+			_testRangeMax( getObject( buffer ), &border, max_object, dim );
+			goNext( buffer );
+		}
+	}
+
+	
+
+}
+
+#endif // SEQAN_HEADER_RMT_SL_COMPL_ALGOS_H
+
diff --git a/src/SeqAn-1.3/seqan/chaining/rmt_def_algos.h b/src/SeqAn-1.3/seqan/chaining/rmt_def_algos.h
new file mode 100644
index 0000000..102a427
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rmt_def_algos.h
@@ -0,0 +1,119 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_RMT_SL_DEF_ALGOS_H
+#define SEQAN_HEADER_RMT_SL_DEF_ALGOS_H
+
+namespace seqan{
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	structure building algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+		// construct the towers for the complete skip list
+		// -> the deferred RMT comletely builds the list of the lowest layer
+	template< typename TObject, typename TSpec > inline
+	void
+	_completeBuild( SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Deferred > & list,
+					typename Size< TObject >::Type dim )
+	{
+		if( dim == 0 )
+		{
+			_sortRecursive( list, _getBaseStore( list ), _getBaseStore( list ) + length( list ) + 1, dim );
+			_setHeight( *_getBaseStore( list ), 1 );	
+			_buildMaxTowers( list );
+		}
+	}
+		
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	range maximum tree algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+		// _performRMQ adaption for the deferred RMT
+		// The defferd RMT needs 2 searches per layer:
+		// The first one assures that the element with the appropriate key is in an ordered state,
+		// the second one is equivalent to _performRMQ of the common case
+	template< typename TObject, typename TSpec, typename TBorder, typename TSize, typename TKey >
+	void
+	_performRMQ(	SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Deferred > * list,
+					TBorder & borderObj,
+					TSize dim,
+					TKey searchKey,
+					TObject *& maxObject )
+	{
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Deferred > * layer_element = _getRoot( *list );
+		typename Size< SkipList< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Deferred > >::Type height = _getCurrentLayer( *list );
+		SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Deferred > ** search_path = _getSearchPath( *_getMainTree( *list ), 0 ) + height - 1;
+				// first search operation
+		_searchFrom( *list, layer_element, searchKey, search_path, dim );
+				// search again
+		height = _getCurrentLayer( *list );
+		layer_element = _getRoot( *list );
+		while( height > 0 )
+		{
+			while( key( *_getRight( *layer_element ) ) < searchKey )
+			{ 
+				if( !_hasAssocStruct( layer_element ) )
+					_createAssocStruct( layer_element, list, dim );
+				if( _hasSmallAssocStruct( layer_element ) )
+					_performSmallRMQ( layer_element, dim - 1, borderObj, maxObject );
+				else
+					_processRMQ( _getAssocStruct( layer_element ), dim - 1, borderObj, maxObject );
+				layer_element = _getRight( *layer_element );
+			}
+			--layer_element;
+			--height;
+		}
+		++layer_element;
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Deferred > * base_element = _getDown( *layer_element );
+		SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, Deferred > * base_buffer = base_element;
+		while( key( *base_buffer, dim ) < searchKey )
+		{
+			base_buffer = _getRight( *base_buffer );
+		}
+			// in the lowest layer, searching to the right
+		while( base_element != base_buffer )
+		{
+			_testRangeMax( getObject( base_element), &borderObj, maxObject, dim - 1 );
+			goNext( base_element );
+		}
+	}
+
+	
+}
+
+#endif // SEQAN_HEADER_RMT_SL_DEF_ALGOS_H
diff --git a/src/SeqAn-1.3/seqan/chaining/rmt_skip_base_element.h b/src/SeqAn-1.3/seqan/chaining/rmt_skip_base_element.h
new file mode 100644
index 0000000..0d48564
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rmt_skip_base_element.h
@@ -0,0 +1,59 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_RMT_SKIP_BASE_ELEMENT_H
+#define SEQAN_RMT_SKIP_BASE_ELEMENT_H
+
+
+namespace seqan
+{
+
+		// get the score value of the related object
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	typename Weight< TObject >::Type
+	weight( SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me )
+	{
+		return weight( *getObject( me ) );
+	}
+
+		// get the chain score value of the related object
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	typename Weight< TObject >::Type
+	priority( SkipBaseElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me )
+	{
+		return priority( *getObject( me ) );
+	}
+
+} // namespace SEQAN_NAMESPACE_SKIPLIST
+#endif //SEQAN_RMT_SKIP_BASE_ELEMENT_H
+
+
diff --git a/src/SeqAn-1.3/seqan/chaining/rmt_skip_element.h b/src/SeqAn-1.3/seqan/chaining/rmt_skip_element.h
new file mode 100644
index 0000000..8ce4d45
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rmt_skip_element.h
@@ -0,0 +1,126 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_RMT_SKIP_ELEMENT_H
+#define SEQAN_RMT_SKIP_ELEMENT_H
+
+namespace seqan
+{
+
+// Modifications of the struct SkipElement for use in a SkipListStatic< True, RT< MaxTag > >
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct RangeMaxCargo_
+	{
+
+		SkipList< TObject, TModus, TSpec, TStructuring > * _assocStruct;
+		TObject * _maxObj;
+
+		RangeMaxCargo_()
+			: _assocStruct( NULL )
+			, _maxObj( NULL )
+		{}
+
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipList< TObject, TModus, TSpec, TStructuring > *
+	_getAssoc( RangeMaxCargo_< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		return me._assocStruct;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_setAssoc( RangeMaxCargo_< TObject, TModus, TSpec, TStructuring > & me,
+				SkipList< TObject, TModus, TSpec, TStructuring > * list )
+	{
+		me._assocStruct = list;
+	}
+
+	
+		// handling for max objects
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	TObject *
+	_getMaxObject( RangeMaxCargo_< TObject, SkipListStatic, TSpec, TStructuring > & me )
+	{
+		return me._maxObj;
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	_setMaxObject( RangeMaxCargo_< TObject, SkipListStatic, TSpec, TStructuring > & me,
+				TObject * obj )
+	{
+		me._maxObj = obj;
+	}
+
+	template< typename TObject,typename TSpec, typename TStructuring > inline
+	TObject *
+	_getMaxObject( SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me )
+	{
+		return me->_cargo._maxObj;
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	_setMaxObject( SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me,
+					TObject * maxObj )
+	{
+		me->_cargo._maxObj = maxObj;
+	}
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Cargo< SkipElement< TObject, TModus, RT< MaxTree< TSpec > >, TStructuring > >
+	{
+		typedef RangeMaxCargo_< TObject, TModus, RT< MaxTree< TSpec > >, TStructuring > Type;
+	};
+
+		// get the score value of the related object
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	typename Weight< TObject >::Type
+	weight( SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me )
+	{
+		return weight( *me->_cargo._maxObj );
+	}
+
+		// get the chain score value of the related object
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	typename Weight< TObject >::Type
+	priority( SkipElement< TObject, SkipListStatic, RT< MaxTree< TSpec > >, TStructuring > * me )
+	{
+		return priority( *me->_cargo._maxObj );
+	}
+
+} // namespace SEQAN_NAMESPACE_SKIPLIST
+#endif // SEQAN_RMT_SKIP_ELEMENT_H
diff --git a/src/SeqAn-1.3/seqan/chaining/rt_base.h b/src/SeqAn-1.3/seqan/chaining/rt_base.h
new file mode 100644
index 0000000..23eff80
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rt_base.h
@@ -0,0 +1,345 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+
+#ifndef SEQAN_RT_BASE_H
+#define SEQAN_RT_BASE_H
+
+
+
+namespace seqan{
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	declarations
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+		
+		// standard tag struct for range tree
+	template< typename TSpec = Default >
+	struct RT
+	{};
+
+		// tag structs for grade of deferredness of the range tree
+	struct SemiDeferred
+	{};
+
+	struct Complete
+	{};
+
+	struct Deferred
+	{};
+
+		// main classes
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct SkipList;
+	
+	template< typename TObject, typename TModus, typename TSpec = Default, typename TStructuring = Complete >
+	class RangeTree;
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Cargo< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >
+	{
+		typedef EmptyCargo_ Type;
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Cargo< SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > >
+	{
+		typedef typename Cargo< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type Type;
+	};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	dependent members
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+		// the memory allocators of the range tree
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct
+	RangeTreeAllocators;
+
+	template< typename TObject, typename TSpec, typename TStructuring >
+	struct
+	RangeTreeAllocators< TObject, SkipListStatic, TSpec, TStructuring >
+	{
+		
+		Allocator< ClassPool< SkipElement< TObject, SkipListStatic, TSpec, TStructuring >, Limited > > _elementAlloc;
+		Allocator< ClassPool< SkipList< TObject, SkipListStatic, TSpec, TStructuring >, Unlimited > > _listAlloc;
+		Allocator< SimpleAlloc<> > _baseAlloc;
+
+		RangeTreeAllocators()
+			: _elementAlloc( NULL )
+		{}
+
+		template< typename TSize >
+		RangeTreeAllocators( TSize size1, TSize size2 )
+			:_elementAlloc( size1 )
+			,_listAlloc( size2 )
+		{
+			SEQAN_CHECKPOINT
+		}
+
+		~RangeTreeAllocators( )
+		{
+			SEQAN_CHECKPOINT
+		}
+	};
+
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	utilities
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+		
+
+	const size_t RANGE_TREE_THRESH_ = 16;
+
+		
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	bool
+	_checkAssocThresh( SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > * first,
+						SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > * second )
+	{
+		SEQAN_CHECKPOINT
+		return ( ( second - first ) > RANGE_TREE_THRESH_ );
+	}
+
+	template< typename TTarget, typename TSource > inline
+	void
+	_pushBack( TTarget & target, TSource const & source )
+	{
+		SEQAN_CHECKPOINT
+#ifdef RTTIMETEST
+		volatile TSource temp = source;
+#else
+		appendValue( target, source );
+#endif
+	}
+
+
+			// setting the element to - infinity
+	template< typename TObject, typename TSize > inline 
+	void 
+	_setMinInfty(	TObject & me,  
+					TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		me = TObject( dim );
+		typename Key< TObject>::Type infValue = minValue< typename Key< TObject>::Type >();
+		for( typename Size< TObject >::Type i = 0; i < dimension( me ); ++i )
+		{
+			setKey( me, i, infValue );
+		}
+	}
+
+		// setting the element to + infinity
+	template< typename TObject, typename TSize > inline 
+	void 
+	_setMaxInfty(	TObject & me,  
+					TSize dim )
+	{
+		
+		SEQAN_CHECKPOINT
+		me = TObject( dim );
+		typename Key< TObject>::Type supValue = maxValue< typename Key< TObject>::Type >();
+		for( typename Size< TObject >::Type i = 0; i < dimension( me ); ++i )
+		{
+			setKey( me, i, supValue );
+		}
+	}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	basic accessor functions
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+	
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	Allocator< ClassPool< SkipElement< TObject, TModus, RT< TSpec >, TStructuring >, Limited, SimpleAllocator > > & 
+	_getElementAlloc( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._allocs._elementAlloc;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	Allocator< ClassPool< SkipList< TObject, TModus, RT< TSpec >, TStructuring >, Unlimited, SimpleAllocator > > & 
+	_getListAlloc( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._allocs._listAlloc;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	Allocator< SimpleAlloc<> > &
+	_getBaseAlloc( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._allocs._baseAlloc;
+	}
+
+	
+		// accessor f�r grenzobjekte
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	TObject * 
+	_getLBorderObj( RangeTree< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return &me._LBorderObj;
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	TObject * 
+	_getRBorderObj( RangeTree< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return &me.RBorderObj_;
+	}
+
+		// skip list of the main tree
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipList< TObject, TModus, RT< TSpec >, TStructuring > *
+	_getList( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._list;
+	}
+
+
+
+	
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+	
+	
+/*DISABLED
+.Function.rangeQuery:
+..summary:Get the object with maximum priority in the RMT in a given intervall
+..cat:Range Tree
+..signature:rangeMaxQuery(tree, lower_border, upper_border, dest)
+..param.tree:A Range Tree.
+...type:RangeTree
+..param.lower_border:The object that stores the lower borders for all dimensions, i.e. $key( lower_border ) <= key( point in range )$
+..param.lower_border:The object that stores the upper borders for all dimensions, i.e. $key( point in range ) <= key( upper_border )$
+..param.dest:A container to save the objects.
+..remarks:The size of $dest$ should be sufficient.
+..include:seqan/chaining.h
+*/
+
+		// perform a range query
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultSet >
+	void
+	rangeQuery( RangeTree< TObject, TModus, TSpec, TStructuring > & me, 
+				TObject & first, 
+				TObject & second,
+				TResultSet & results )
+	{
+		SEQAN_CHECKPOINT
+		if( dimension( me ) > 1 )
+			_fingerSearch( _getList( me ), &first, &second, dimension( me ) - 1, results );
+		else
+			_bottomSearch( _getList( me ), &first, &second, results );
+	}
+
+	template< typename TObject, typename TSize > inline
+	bool 
+	_testBruteForce( TObject & elem,
+					 TObject & first,
+					 TObject & second,
+					 TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		bool in_range = true;
+		typename Size< TObject >::Type _dim = 0;
+		while( in_range && _dim <= dim )
+		{
+			in_range = ( ( key( first, _dim ) <= key( elem, _dim ) ) && ( key( elem, _dim ) <= key( second, _dim ) ) );
+			++_dim;
+		}
+		return in_range;
+	}
+
+		// test if an element is in range
+		// from dim to dim - 1 to 0
+	template< typename TObject, typename TSize > inline
+	bool 
+	_testRange(	TObject & elem,
+				TObject & first,
+				TObject & second,
+				TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		bool in_range = true;
+		typename Key< TObject >::Type theKey;
+		while ( in_range && dim > 0 )
+		{
+			theKey = key( elem, dim );
+			in_range = ( ( key( first, dim ) <= theKey ) && ( theKey <= key( second, dim ) ) );
+			--dim;
+		}
+		theKey = key( elem, dim );
+		in_range &= ( ( key( first, dim ) <= theKey ) && ( theKey <= key( second, dim ) ) );
+		return in_range;
+	}
+
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type
+	_getMaximalSLTowerHeight( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & rt )
+	{
+		SEQAN_CHECKPOINT
+		return log2( length( rt ) ) + 2;
+	}
+
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TSize >
+	void 
+	printLayerScores(	SkipList< TObject, SkipListStatic, RT< TSpec >, TStructuring > * /*list*/,
+						TSize /*layer*/,
+						TSize /*_dim*/ )
+	{}
+
+}
+
+#endif // SEQAN_RT_BASE
diff --git a/src/SeqAn-1.3/seqan/chaining/rt_common_algos.h b/src/SeqAn-1.3/seqan/chaining/rt_common_algos.h
new file mode 100644
index 0000000..cb3f0f2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rt_common_algos.h
@@ -0,0 +1,212 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef SEQAN_HEADER_RT_SL_COMMON_ALGOS_H
+#define SEQAN_HEADER_RT_SL_COMMON_ALGOS_H
+
+namespace seqan{
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	structure building algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_completeBuild( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list,
+					TSize dim )
+	{
+		_sortRecursive( list, _getBaseStore( list ), _getBaseStore( list ) + length( list ) + 1, dim );
+		_setHeight( *_getBaseStore( list ), 1 );
+		_buildTowers( list, dim );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TSize > inline
+	void
+	_completeBuild( SkipList< TObject, TModus, RT< TSpec >, Deferred > & /*list*/,
+					TSize /*dim*/ )
+	{
+	} 
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	searching algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+	// _findTowerTop searches for the highest layer of a tower, 
+		// whose right-pointer points to an element beyond the given border
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultSet, typename TSize, typename TKey > inline
+	SkipElement< TObject, TModus, RT< TSpec >, TStructuring > *
+	_findTowerTop(	SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base_buffer,
+					SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list,
+					TObject * left_border,
+					TObject * right_border,
+					TSize dim,
+					TKey theKey,
+					TResultSet & results )
+	{
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * tower_buffer = &_getUp( *base_buffer ) + _getHeight( * base_buffer ) - 1;
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * right_buffer = _getRight( *tower_buffer );
+		while( key( *right_buffer ) <= theKey )
+		{
+			_scanAssocStruct( tower_buffer, list, left_border, right_border, dim, results );
+			base_buffer = _getDown( *right_buffer );
+			tower_buffer = &_getUp( *base_buffer ) + _getHeight( * base_buffer ) - 1;
+			right_buffer = _getRight( *tower_buffer );
+		}
+		return tower_buffer;	
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize, typename TKey, typename TResultSet > inline
+	SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > *
+	_collectAssocStructs(	SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * tower_buffer,
+							TObject * left_border,
+							TObject * right_border,
+							TSize dim,
+							TKey search_theKey,
+							SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list,
+							TResultSet & results )
+	{
+		typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type height = tower_buffer - &_getUp( * _getDown( * tower_buffer ) ) + 1;
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * right_buffer = _getRight( *tower_buffer );
+		while( height > 0 )
+		{
+			while( key( *right_buffer ) <= search_theKey )
+			{
+				_scanAssocStruct( tower_buffer, list, left_border, right_border, dim, results );
+				tower_buffer = right_buffer;
+				right( right_buffer );
+			}
+			--height;
+			--tower_buffer;
+			right_buffer = _getRight( *tower_buffer );
+		}
+		++tower_buffer;
+		return _getDown( *tower_buffer );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize, typename TKey, typename TResultSet > inline
+	SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > *
+	_checkBaseElementsLeft( SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base,
+							TObject * left_border,
+							TObject * right_border,
+							TSize dim,
+							TKey left_theKey,
+							TKey right_theKey,
+							TResultSet & results )
+	{
+			// check elemnts in base layer, until
+			//		1 ) element with tower is reached
+			//		2 ) sorted element is reached, which has a larger key
+			//			( all elements on right side of a sorted elemnt have a larger theKey )
+		
+		while( key( *base ) < left_theKey )
+			goNext( base );
+
+		typename Size< TObject >::Type l_dim = dim - 1;
+		while( _getHeight( *base ) == 0 )
+		{
+			if( key( *base, dim ) <= right_theKey ){
+				if( _testRange( *getObject( base ), *left_border, *right_border, l_dim ) )
+					_pushBack( results, getObject( base ) );
+			}
+			else if( _getCount( *base ) != 0 ){
+				break;
+			}
+			goNext( base );
+		}
+		return base;
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey, typename TResultSet > inline
+	SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > *
+	_checkBaseElementsLeftBottom( SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base,
+									TObject * /*left_border*/,
+									TObject * /*right_border*/,
+									TKey left_theKey,
+									TKey right_theKey,
+									TResultSet & results )
+	{
+			// check elemnts in base layer, until
+			//		1 ) element with tower is reached
+			//		2 ) sorted element is reached, which has a larger key
+			//			( all elements on right side of a sorted elemnt have a larger theKey )
+		
+		while( key( *base ) < left_theKey )
+			goNext( base );
+
+		while( _getHeight( *base ) == 0 )
+		{
+			if( key( *base ) <= right_theKey ){
+				_pushBack( results, getObject( base ) );
+			}
+			else if( _getCount( *base ) != 0 ){
+				break;
+			}
+			goNext( base );
+		}
+		return base;
+	}
+
+	
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize, typename TKey, typename TResultSet > inline
+	void
+	_checkBaseElementsRight(	SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base,
+								TObject * left_border,
+								TObject * right_border,
+								TSize dim,
+								TKey right_theKey,
+								TResultSet & results )
+	{
+		TSize l_dim = dim-1;
+		while( key( *base ) <= right_theKey )
+		{
+			if( _testRange( *getObject( base ), *left_border, *right_border, l_dim ) )
+			{
+				_pushBack( results, getObject( base ) );
+			}
+			goNext( base );
+		}
+	}
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/chaining/rt_impl.h b/src/SeqAn-1.3/seqan/chaining/rt_impl.h
new file mode 100644
index 0000000..5b2271f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rt_impl.h
@@ -0,0 +1,162 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef SEQAN_HEADER_COMPLETE_RANGE_TREE_H
+#define SEQAN_HEADER_COMPLETE_RANGE_TREE_H
+
+
+namespace seqan
+{
+
+
+/*DISABLED
+.Class.RangeTree:
+..cat:Range Tree
+..summary:The RangeTree is a data structure to solve the orthogonal range searching problem.
+..signature:RangeTree< TObject, [ TModus, TSpec, TStructuring] >
+..param.TObject:Type of stored objects.
+..param.TModus:Modus of operation of a RangeTree. A RangeTree is static.
+..param.TSpec:Specialization of the RangeTree.
+..param.TStructuring:Parameter to specify whether the RangeTree uses Deferred Data Structuring or not.
+..remarks:The object given to the RangeTree should offer the following functions:
+..remarks:$key( obj, dim )$: returns the key of the object for dimension $dim$.
+..remarks:$setKey( obj, dim, k )$: set the key of the object to $k$ for dimension $dim$.
+..remarks:In contrast to STL-like containers, the objects are not cloned by the RangeTree. It only supports searching operations on a set of objects. This set must be handled by the user.
+..remarks:The $MaxTree$ specialization offers the abbility to perform Range Maximum Queries.
+..include:seqan/chaining.h
+*/
+
+		
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+class RangeTree< TObject, TModus, RT< TSpec >, TStructuring >
+{
+public:
+	SkipList< TObject, TModus, RT< TSpec >, TStructuring > * _list;
+
+	TObject RBorderObj_;
+	TObject _LBorderObj;
+
+	typename Size< TObject >::Type _dim;
+	typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type _numOfElems;
+
+	SearchPath_< TObject, TModus, RT< TSpec >, TStructuring > _sp;
+	RangeTreeAllocators< TObject, TModus, RT< TSpec >, TStructuring > _allocs;
+	
+	friend inline
+	typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type 
+	length( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._numOfElems;
+	}
+/*
+	friend
+	Allocator< ClassPool< SkipElement< TObject, TModus, RT< TSpec >, TStructuring >, Limited > > &
+	_getElementAlloc<>( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );
+
+	friend
+	Allocator< ClassPool< SkipList< TObject, TModus, RT< TSpec >, TStructuring >, Unlimited > > & 
+	_getListAlloc<>( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );
+
+	friend
+	Allocator< SimpleAlloc<> > &
+	_getBaseAlloc<>( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );
+
+	friend
+	TObject * 
+	_getRBorderObj<>( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );
+
+	friend
+	TObject * 
+	_getLBorderObj<>( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );
+
+	friend
+	SkipList< TObject, TModus, RT< TSpec >, TStructuring > *
+	_getList<>( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me );
+*/
+	template< typename TSize > friend inline
+	SkipElement< TObject, TModus, RT< TSpec >, TStructuring > **
+	_getSearchPath( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me,
+					TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		return me._sp._searchPath + _getMaximalSLTowerHeight( me ) * dim;
+	}
+	
+	friend inline
+	typename Size< TObject >::Type
+	dimension( RangeTree< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._dim;
+	}
+
+	RangeTree()
+	{}
+
+public:
+	
+	template< typename TContainer, typename TSize >
+	RangeTree(	TContainer & data,
+				TSize dim )
+	: _dim( dim )
+	, _numOfElems( length( data ) )
+	, _sp( _getMaximalSLTowerHeight( length( data ) ) * _dim )
+	, _allocs( 2 * length( data ) * dim * dim * dim, length( data ) * dim * dim )
+	{
+		SEQAN_CHECKPOINT
+		_setMinInfty( _LBorderObj, _dim );
+		_setMaxInfty( RBorderObj_, _dim );
+
+		allocate( _getListAlloc( *this ), _list, 1 );
+		valueConstruct( _list );
+		_create( *_list, data, *this, _dim - 1 );
+	}
+
+
+	~RangeTree()
+	{	
+		SEQAN_CHECKPOINT
+		_clearSearchPath( this->_sp, _getMaximalSLTowerHeight( length( *this ) ) * _dim );
+	}
+
+}; // struct RangeTree
+
+}
+
+#endif // SEQAN_HEADER_COMPLETE_RANGE_TREE_H
+
+
+
+
diff --git a/src/SeqAn-1.3/seqan/chaining/rt_skip_base_element.h b/src/SeqAn-1.3/seqan/chaining/rt_skip_base_element.h
new file mode 100644
index 0000000..97c4032
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rt_skip_base_element.h
@@ -0,0 +1,72 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef RT_MAX_SKIP_BASE_ELEMENT_H_
+#define RT_MAX_SKIP_BASE_ELEMENT_H_
+
+
+namespace seqan
+{
+
+
+//___________________________ struct SkipBaseElement< TObject, TModus, RT< TSpec >, Deferred > > _______________________
+// Adaption of the struct SkipBaseElement for use in a RangeTree
+// Instead saving it's own theKey and value, it has a pointer to the related 
+// RTEntry object, which stores the theKey and value
+// To get the correct theKey, SkipBaseElement needs information about the dimension
+// of the RangeTree it is part of.
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void 
+	dump( SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		typename Size< TObject >::Type dim = dimension( *getObject( &me ) );
+		typename Size< TObject >::Type counter = 0;
+		while( counter < dim )
+		{
+			if( key( &getObject( &me ), counter ) == minValue< typename Key< TObject >::Type >( ) )
+					std::cout << std::left << "L";
+			else
+				std::cout << key( getObject( &me ), counter );
+			++counter;
+			std::cout << " ";
+		}
+		std::cout << std::endl;
+	}
+
+
+	
+} // namespace SEQAN_NAMESPACE_SKIPLIST
+#endif //RT_SKIP_BASE_ELEMENT_H_
diff --git a/src/SeqAn-1.3/seqan/chaining/rt_skip_element.h b/src/SeqAn-1.3/seqan/chaining/rt_skip_element.h
new file mode 100644
index 0000000..a83fa4f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rt_skip_element.h
@@ -0,0 +1,244 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef RT_SKIP_ELEMENT_H_
+#define RT_SKIP_ELEMENT_H_
+
+namespace seqan
+{
+
+//_________________________________struct SkipElement< TObject, TModus, RT< TSpec >, Deferred > >_______________________
+// Adaption of the struct SkipBaseElement for use in a Deferred, RT< TSpec >, TStructuring
+
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct RangeCargo_
+	{
+
+		SkipList< TObject, TModus, TSpec, TStructuring > * _assocStruct;
+
+		RangeCargo_()
+			: _assocStruct( NULL )
+		{}
+
+	};
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipList< TObject, TModus, TSpec, TStructuring > *
+	_getAssoc( RangeCargo_< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._assocStruct;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_setAssoc( RangeCargo_< TObject, TModus, TSpec, TStructuring > & me,
+				SkipList< TObject, TModus, TSpec, TStructuring > * list)
+	{
+		SEQAN_CHECKPOINT
+		me._assocStruct = list;
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > 
+	struct Cargo< SkipElement< TObject, TModus, RT< TSpec >, TStructuring > >
+	{
+		typedef RangeCargo_< TObject, TModus, RT< TSpec >, TStructuring > Type;
+	};
+	
+		//  Documentation in SkipElement.h
+		//  Adaption for Deferred, RT< TSpec >, TStructuring
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipList< TObject, TModus, RT< TSpec >, TStructuring > *
+	_getAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me )
+	{
+		SEQAN_CHECKPOINT
+		return _getAssoc( *cargo( *me ) );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_setAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me,
+						SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list )
+	{
+		SEQAN_CHECKPOINT
+		_setAssoc( *cargo(* me ), list );
+	}
+	
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_buildAssocStruct(	SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me,
+						SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list,
+						TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( _getAssocStruct( me ) == NULL, "List overwritten" )
+		if( _getDown( *me ) != _getBaseStore( *list ) )
+		{
+			SkipList< TObject, TModus, RT< TSpec >, TStructuring > * new_list;
+			allocate( _getListAlloc( *list ), new_list, 1 );
+			valueConstruct( new_list );
+			_create( *new_list, _getDown( *me ), _getDown( *_getRight( *me ) ), *_getMainTree( *list ), dim - 1 );
+			_setAssocStruct( me, new_list );
+		}
+		else{
+			if( _checkAssocThresh( _getDown( *me ), _getDown( *_getRight( *me ) ) ) )
+			{
+				SkipList< TObject, TModus, RT< TSpec >, TStructuring > * new_list;
+				allocate( _getListAlloc( *list ), new_list, 1 );
+				valueConstruct( new_list );
+				_create( *new_list, _getSucc( *_getDown( *me ) ), _getDown( *_getRight( *me ) ), *_getMainTree( *list ), dim - 1 );
+				_setAssocStruct( me, new_list );
+			}
+			else _setAssocStruct( me, (SkipList< TObject, TModus, RT< TSpec >, TStructuring > * ) 2 );
+		}
+	}
+		
+		//	_deleteNextLayer:
+		// delete the associated structure <=> the skip list over the elements in the subtree of a lower dimension
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	void 
+	_deleteAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me )
+	{
+		SEQAN_CHECKPOINT
+		if( _hasBigAssocStruct( me ) )
+		{
+			SkipList< TObject, SkipListStatic, RT< TSpec >, TStructuring > * list = _getAssocStruct( me );
+			Allocator< ClassPool< SkipList< TObject, SkipListStatic, RT< TSpec >, TStructuring >, Unlimited > > * _listAlloc = &_getListAlloc( *list );
+			valueDestruct( list );
+			deallocate( *_listAlloc, list, 1 );
+			_setAssocStruct< TObject, TModus, TSpec, TStructuring >( me, NULL );
+		}
+		else
+			_setAssocStruct< TObject, TModus, TSpec, TStructuring >( me, NULL );
+	}
+
+		//	_hasNextLayer:
+		// delete the associated structure <=> the skip list over the elements in the subtree of a lower dimension
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	bool 
+	_hasAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me )
+	{
+		SEQAN_CHECKPOINT
+		return _getAssoc( *cargo( *me ) ) != NULL;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	bool 
+	_hasSmallAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me )
+	{
+		SEQAN_CHECKPOINT
+		return ( _getAssoc( *cargo( *me ) ) == ( SkipList< TObject, TModus, RT< TSpec >, TStructuring > * ) 2 );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	bool 
+	_hasBigAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me )
+	{
+		SEQAN_CHECKPOINT
+		return ( _getAssoc( *cargo( *me ) ) > ( SkipList< TObject, TModus, RT< TSpec >, TStructuring > * ) 2 );
+	}
+
+
+			// build an associated structure in element elem over the base elements left and right
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_createAssocStruct( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me,
+						SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list,
+						TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		if( dim == 0 )
+			return;
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * left = _getDown( *me );
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * right = _getDown( *_getRight( *me ) );
+		if( _checkAssocThresh( left, right ) )
+			_buildAssocStruct( me, list, dim );
+		else
+			_setAssocStruct( me, ( SkipList< TObject, TModus, RT< TSpec >, TStructuring > *) 2 );
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultsSet, typename TSize > inline
+	void
+	_scanAssocStruct(	SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * me,
+						SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list,
+						TObject * left_border,
+						TObject * right_border,
+						TSize dim, 
+						TResultsSet & results )
+	{
+		SEQAN_CHECKPOINT
+		if( ! _hasAssocStruct( me ) )
+		{
+			_createAssocStruct( me, list, dim );				
+		}
+		
+		if( _hasSmallAssocStruct( me ) )
+		{
+			typename Size< TObject >::Type l_dim = dim - 1;
+			SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * buffer = _getDown( * me );
+			SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * end = _getDown( * _getRight( * me ) );
+			while( buffer != end )
+			{
+				if( _testRange( *getObject( buffer ), *left_border, *right_border, l_dim ) ){
+					_pushBack( results, getObject( buffer ) );
+				}
+				goNext( buffer );
+			}
+			return;
+		}
+		if( dim > 1 )
+			_fingerSearch( _getAssocStruct( me ), left_border, right_border, dim - 1, results );
+		else
+			_bottomSearch( _getAssocStruct( me ), left_border, right_border, results );
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_performDestructorAction( SkipElement< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		if( _hasBigAssocStruct( &me ) ) 
+			_deleteAssocStruct( &me );
+		else
+			_setAssocStruct< TObject, TModus, TSpec, TStructuring > ( &me, NULL );
+	}
+
+} // namespace SEQAN_NAMESPACE_SKIPLIST
+#endif //RT_SKIP_ELEMENT_H_
diff --git a/src/SeqAn-1.3/seqan/chaining/rt_sl_base.h b/src/SeqAn-1.3/seqan/chaining/rt_sl_base.h
new file mode 100644
index 0000000..af239b0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rt_sl_base.h
@@ -0,0 +1,368 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef SEQAN_RT_SKIP_LIST_BASE_H
+#define SEQAN_RT_SKIP_LIST_BASE_H
+
+#include "skip_list.h"
+#include "rt_skip_element.h"
+#include "rt_skip_base_element.h"
+
+namespace seqan{
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	basic accessor functions
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+		// get thr right border element
+		// e.g. the skip base element with supremum key
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	SkipElement< TObject, TModus, RT< TSpec >, TStructuring > *
+	_getRightBorder( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me );
+		
+	
+		// specialization for static case
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	SkipElement< TObject, SkipListStatic, RT< TSpec >, TStructuring > * 
+	_getRightBorder( SkipList< TObject, SkipListStatic, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return &_getUp( me._baseStore[ me._numOfElements + 1 ] );
+	}
+
+		// specialization for dynamic case
+	//template< typename TObject, typename TSpec, typename TStructuring > inline
+	//SkipElement< TObject, SkipListDynamic, RT< TSpec >, TStructuring > * 
+	//_getRightBorder( SkipList< TObject, SkipListDynamic, RT< TSpec >, TStructuring > & me )
+	//{
+	//	SEQAN_CHECKPOINT
+	//	SkipElement< TObject, SkipListDynamic, RT< TSpec >, TStructuring > * border = _getRoot( me );
+	//	while( key( *border ) < maxValue< typename Key< TObject >::Type >() )
+	//		border = _getRight( *border );
+	//	return border;
+	//}
+
+		// get the element allocator of a skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	Allocator< ClassPool< SkipElement< TObject, TModus, RT< TSpec >, TStructuring >, Limited, SimpleAllocator > > &
+	_getElementAlloc( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getElementAlloc( *_getMainTree( me ) );
+	}
+
+		// get the list allocator of a skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	Allocator< ClassPool< SkipList< TObject, TModus, RT< TSpec >, TStructuring >, Unlimited, SimpleAllocator > > &
+	_getListAlloc( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getListAlloc( *_getMainTree( me ) );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	Allocator< SimpleAlloc<> > &
+	_getBaseAlloc( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getBaseAlloc( *_getMainTree( me ) );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	RangeTree< TObject, TModus, RT< TSpec >, TStructuring > *
+	_getMainTree( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me );
+
+	
+///////////////////////////////////////////////////////
+//
+//	initialization
+//
+///////////////////////////////////////////////////////
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TContainer, typename TSize >
+	void
+	_create( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me,
+				TContainer & data,
+				RangeTree< TObject,	TModus, RT< TSpec >, TStructuring > & Tree,
+				TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		me._mainTree = &Tree;
+		me._dim = dim;
+		me._numOfElements = length( data );
+
+		typename Iterator< TContainer >::Type first = begin( data );
+		typename Iterator< TContainer >::Type last = end( data );
+
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base_right;
+
+		_initBases( me, me._baseStore, base_right, first, last, me._numOfElements, dim ); 
+
+		_initSL( me, me._baseStore, base_right, me._numOfElements, me._dim );
+
+		_completeBuild( me, dim );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize >
+	void
+	_create( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me,
+				SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * first,
+				SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * last,
+				RangeTree< TObject,	TModus, RT< TSpec >, TStructuring > & Tree,
+				TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		me._mainTree = &Tree;
+		me._dim = dim;
+		me._numOfElements = last - first;
+
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base_right;
+
+		_initBases( me, me._baseStore, base_right, first, last, me._numOfElements, dim ); 
+
+		_initSL( me, me._baseStore, base_right, me._numOfElements, dim );
+
+		_completeBuild( me, dim );
+	}
+
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TIter, typename TSize > inline
+	void
+	_initBases( SkipList< TObject, SkipListStatic, RT< TSpec >, TStructuring > & list, 
+				SkipBaseElement< TObject, SkipListStatic, RT< TSpec >, TStructuring > * firstBase,
+				SkipBaseElement< TObject, SkipListStatic, RT< TSpec >, TStructuring > *& lastBase,
+				TIter & firstData,
+				TIter & lastData,
+				TSize numEntries,
+				TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		allocate( _getBaseAlloc( list ), firstBase, numEntries + 2 );
+		list._baseStore = firstBase;
+
+		valueConstruct( firstBase, _getLBorderObj( *_getMainTree( list ) ), minValue< typename Key< TObject >::Type >() );
+		
+		++firstBase;
+
+		while( firstData != lastData )
+		{
+			valueConstruct( firstBase, &value( firstData ), key( value( firstData ), dim ) );
+			++firstBase;
+			++firstData;
+		}
+		lastBase = firstBase;
+		firstBase = list._baseStore;
+		valueConstruct( lastBase, _getRBorderObj( *_getMainTree( list ) ), maxValue< typename Key< TObject >::Type >() );
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_initSL(	SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list,
+				SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * first_base,
+				SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * /*last_base*/,
+				TSize numEntries,
+				TSize /*dim*/ )
+	{
+		SEQAN_CHECKPOINT
+			// allocate space for bording elements
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring  > * _rightBorder;
+		allocate( _getElementAlloc( list ), _rightBorder, 2 );
+		arrayConstruct( _rightBorder, _rightBorder + 2 );
+		allocate( _getElementAlloc( list ), list._leftSideStore, _getMaximalSLTowerHeight( numEntries ) );
+				
+			// set values
+			// left side ...
+		_setHeight( *first_base, 1 );
+		_setUp( *first_base, *list._leftSideStore );
+
+		typename Key< TObject >::Type left_border_key = minValue< typename Key< TObject >::Type >();
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * buffer = list._leftSideStore;
+		for( typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type i = 0; i < _getMaximalSLTowerHeight( numEntries ); ++i )
+		{
+			valueConstruct( buffer, _rightBorder, first_base, left_border_key );
+			++buffer;
+		}
+			// ... right side
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * r_base = &list._baseStore[ numEntries + 1 ];
+		_setDown( *_rightBorder, r_base);
+		_setHeight( *r_base, 1 );
+		_setRight( * _rightBorder, _rightBorder );
+		setKey( *_rightBorder, maxValue< typename Key< TObject >::Type >() );
+		_setUp( *r_base, *_rightBorder );
+
+		_setCount( *first_base, numEntries );
+	}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	structure building algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+	template< typename TObject, typename TModus, typename TSpec, typename TSize > inline
+	void 
+	_connectUpdate(	SkipList< TObject, TModus, RT< TSpec >, Deferred > & /*list*/,
+						SkipBaseElement< TObject, TModus, RT< TSpec >, Deferred > * base,
+						TSize height,
+						SkipElement< TObject, TModus, RT< TSpec >, Deferred > ** search_path,
+						TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, RT< TSpec >, Deferred > * buffer = &_getUp( *base );
+		SkipElement< TObject, TModus, RT< TSpec >, Deferred > * top = buffer + height;
+		typename Key< TObject >::Type theKey = key( *base, dim );
+		while( buffer != top )
+		{
+			new( buffer ) SkipElement< TObject, TModus, RT< TSpec >, Deferred >( _getRight( **search_path ), base, theKey );
+			_setRight( **search_path, buffer );
+			_deleteAssocStruct( *search_path );
+			*search_path = buffer;
+			++buffer;
+			++search_path;
+		}
+	}
+
+	// reconnect the pointers after building a tower
+	template< typename TObject, typename TModus, typename TSpec, typename TSize > inline
+	void 
+	_connect(	SkipList< TObject, TModus, RT< TSpec >, Deferred > & /*list*/,
+				SkipBaseElement< TObject, TModus, RT< TSpec >, Deferred > * base,
+				TSize height,
+				SkipElement< TObject, TModus, RT< TSpec >, Deferred > ** search_path,
+				TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, RT< TSpec >, Deferred > * buffer = &_getUp( *base );
+		SkipElement< TObject, TModus, RT< TSpec >, Deferred > * top = buffer + height;
+		typename Key< TObject >::Type theKey = key( *base, dim );
+		while( buffer != top )
+		{
+			new( buffer ) SkipElement< TObject, TModus, RT< TSpec >, Deferred >( _getRight( **search_path ), base, theKey );
+			_setRight( **search_path, buffer );
+			_deleteAssocStruct( *search_path );
+			++buffer;
+			++search_path;
+		}
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TSize > inline
+	void 
+	_connectUpdate(	SkipList< TObject, TModus, RT< TSpec >, SemiDeferred > & /*list*/,
+						SkipBaseElement< TObject, TModus, RT< TSpec >, SemiDeferred > * base,
+						TSize height,
+						SkipElement< TObject, TModus, RT< TSpec >, SemiDeferred > ** search_path,
+						TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, RT< TSpec >, SemiDeferred > * buffer = &_getUp( *base );
+		SkipElement< TObject, TModus, RT< TSpec >, SemiDeferred > * top = buffer + height;
+		typename Key< TObject >::Type theKey = key( *base, dim );
+		while( buffer != top )
+		{
+			new( buffer ) SkipElement< TObject, TModus, RT< TSpec >, SemiDeferred >( _getRight( **search_path ), base, theKey );
+			_setRight( **search_path, buffer );
+			*search_path = buffer;
+			++buffer;
+			++search_path;
+		}
+	}
+
+
+		// reconnect the pointers after building special for
+		// the complete case
+	template< typename TObject, typename TModus, typename TSpec, typename TSize > inline
+	void 
+	_connectUpdate(	SkipList< TObject, TModus, RT< TSpec >, Complete > & list,
+						SkipBaseElement< TObject, TModus, RT< TSpec >, Complete > * base,
+						TSize height,
+						SkipElement< TObject, TModus, RT< TSpec >, Complete > ** search_path,
+						TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, RT< TSpec >, Complete > * buffer = &_getUp( *base );
+		typename Key< TObject >::Type theKey = key( *base, dim );
+		typename Size< SkipList< TObject, TModus, RT< TSpec >, Complete > >::Type current_height = 0;
+		while( current_height < height - 1 ){
+			new( buffer ) SkipElement< TObject, TModus, RT< TSpec >, Complete >( _getRight( **search_path ), base, theKey );
+			_setRight( **search_path, buffer );
+			if( _getHeight( **search_path ) == current_height + 1)
+				_createAssocStruct( *search_path, &list, dim );
+			*search_path = buffer;
+			++current_height;
+			++buffer;
+			++search_path;
+		}
+		new( buffer ) SkipElement< TObject, TModus, RT< TSpec >, Complete >( _getRight( **search_path ), base, theKey );
+		_setRight( **search_path, buffer );	
+		_createAssocStruct( *search_path, &list, dim );
+		*search_path = buffer;
+	}
+
+
+	// linker rand muss getestet werden -> darf nicht mit eigef�gt werden
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_buildAssocStruct_left(  SkipList< TObject, TModus, RT< TSpec >, TStructuring >  * me,
+							 SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * left,
+							 SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * right,
+							 TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		if( _getDown( *left ) != _getBaseStore( *me ) )
+			_createAssocStruct( left, me, _getDown( *left ), right, dim );
+		else
+			_createAssocStruct( left, me, _getSucc( *_getDown( *left ) ), _getDown( *_getRight( *_getRight( *left ) ) ), dim );
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_buildAssocStruct_right(  SkipList< TObject, TModus, RT< TSpec >, TStructuring >  * me,
+							  SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * left,
+							  SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * right,
+							  TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		_createAssocStruct( left, me, _getDown( *left ), right, dim );
+	}
+
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/chaining/rt_sl_compl_algos.h b/src/SeqAn-1.3/seqan/chaining/rt_sl_compl_algos.h
new file mode 100644
index 0000000..1453202
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rt_sl_compl_algos.h
@@ -0,0 +1,164 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef SEQAN_HEADER_RT_SL_COMPL_ALGOS_H
+#define SEQAN_HEADER_RT_SL_COMPL_ALGOS_H
+
+namespace seqan{
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	structure building algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+	
+		// quick sort recursive step
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_sortRecursive( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list,
+					SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * elem,
+					SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * right,
+					TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		if( _getCount( *elem ) != 0 )
+		{
+			SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * pivot = _sort( list, elem, right, dim );
+			_sortRecursive( list, elem, pivot, dim );
+			_sortRecursive( list, pivot, right, dim );
+		}	
+	}
+		// construct the towers for the complete skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize >
+	void
+	_buildTowers( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list,
+					TSize dim )
+	{
+		SEQAN_CHECKPOINT
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * buffer = _getBaseStore( list );
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * end = buffer + length( list ) + 1;
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring > ** search_path = new SkipElement< TObject, TModus, RT< TSpec >, TStructuring >*[ _getMaximalSLTowerHeight( length( list ) ) ];
+		*search_path = &_getUp( *buffer ); 
+		typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring  > >::Type height;
+		typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring  > >::Type max_height = _getMaximalSLTowerHeight( list );
+		typename Key< TObject >::Type buffer_theKey = key( *_getBaseStore( list ), dim );
+		goNext( buffer );
+
+		while( buffer != end )
+		{
+			SEQAN_CHECK( buffer_theKey <= key( *buffer, dim ) )
+			if( key( *buffer, dim ) != buffer_theKey )
+			{
+				height = _throwCoin< TObject, TModus, RT< TSpec >, TStructuring  >( list, max_height );
+				if( height > 0 ){
+					_add( list, buffer, height, search_path );
+					_connectUpdate( list, buffer, height, search_path, dim );
+				}
+				buffer_theKey = key( *buffer, dim );
+			}
+			goNext( buffer  );
+		}
+		
+		delete[] search_path;
+	}
+
+	
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	search algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+	
+	
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultSet, typename TSize >
+	void
+	_fingerSearch(	SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list,
+					TObject * left_border,
+					TObject * right_border,
+					TSize dim,
+					TResultSet & results )
+	{
+		SEQAN_CHECKPOINT
+		typename Key< TObject >::Type left_theKey = key( *left_border, dim );
+		typename Key< TObject >::Type right_theKey = key( *right_border, dim );
+			
+			// search for the left base element
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base = _searchFrom( *list, _getRoot( *list ), left_theKey, dim );
+
+		base = _checkBaseElementsLeft( base, left_border, right_border, dim, left_theKey, right_theKey, results );
+		if( key( *base, dim ) > right_theKey )
+			return;
+	
+				//	1 ) searching for highest layer,
+				//		on-line search in associated structures
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * tower_buffer = _findTowerTop( base, list, left_border, right_border, dim, right_theKey, results );
+				//	2 ) on-line search in associated structures of the higher layers
+		base = _collectAssocStructs( tower_buffer, left_border, right_border, dim, right_theKey, list, results );
+				//	3 ) check the remaining base elements
+		_checkBaseElementsRight( base, left_border, right_border, dim, right_theKey, results );
+	}
+
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TResultSet >
+	void
+	_bottomSearch(	SkipList< TObject, TModus, RT< TSpec >, TStructuring > * list,
+					TObject * left_border,
+					TObject * right_border,
+					TResultSet & results )
+	{
+		SEQAN_CHECKPOINT
+		typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type dim = 0;
+		typename Key< TObject >::Type left_theKey = key( *left_border, dim );
+		typename Key< TObject >::Type right_theKey = key( *right_border, dim );
+			// search for the left base element
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * base = _searchFrom( *list, _getRoot( *list ), left_theKey, dim );
+		
+		base = _checkBaseElementsLeftBottom( base, left_border, right_border, left_theKey, right_theKey, results );
+		if( key( *base, dim ) > right_theKey )
+			return;
+
+		while( key( *base ) <= right_theKey )
+		{
+			_pushBack( results, getObject( base ) );
+			goNext( base );
+		}
+	}
+
+}
+
+#endif // SEQAN_HEADER_RT_SL_COMPL_ALGOS_H
diff --git a/src/SeqAn-1.3/seqan/chaining/rt_sl_def_algos.h b/src/SeqAn-1.3/seqan/chaining/rt_sl_def_algos.h
new file mode 100644
index 0000000..270bd58
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rt_sl_def_algos.h
@@ -0,0 +1,144 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef SEQAN_HEADER_RT_SL_DEF_ALGOS_H
+#define SEQAN_HEADER_RT_SL_DEF_ALGOS_H
+
+namespace seqan{
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline
+	SkipElement< TObject, TModus, RT< TSpec >, TStructuring > ** 
+	_getSearchPath( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me,
+					TParam dim )
+	{
+		SEQAN_CHECKPOINT
+		return _getSearchPath( *_getMainTree( me ), dim );
+	}
+
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+//	search algorithms
+//
+/////////////////////////////////////////////////////////////////////////////////////////
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TResultSet, typename TSize >
+	void
+	_fingerSearch(	SkipList< TObject, TModus, RT< TSpec >, Deferred > * list,
+					TObject * left_border,
+					TObject * right_border,
+					TSize dim,
+					TResultSet & results )
+	{
+		SEQAN_CHECKPOINT
+		typename Key< TObject >::Type left_theKey = key( *left_border, dim );
+		typename Key< TObject >::Type right_theKey = key( *right_border, dim );
+			// search for the left base element
+		SkipElement< TObject, TModus, RT< TSpec >, Deferred > ** search_path = _getSearchPath( *list, dim );
+		SkipBaseElement< TObject, TModus, RT< TSpec >, Deferred > * base = _searchFrom( *list, _getRoot( *list ), left_theKey, search_path, dim );
+		
+		base = _checkBaseElementsLeft( base, left_border, right_border, dim, left_theKey, right_theKey, results );
+		if( key( *base, dim ) > right_theKey )
+			return;
+
+			// search for the right border
+			//	the cooresponding element might be sorted or unsorted
+			//	=> search for the corresponding element
+
+				// I. search for the smallest element, which is outside the search intervall
+				//	1 ) search for the element, of which the right pointer of the highest tower
+				//		points to an element outside of the search intervall
+		SkipElement< TObject, TModus, RT< TSpec >, Deferred > * tower_buffer = _findTowerTop( base, list, left_border, right_border, dim, right_theKey, results );					
+		
+		base = _getDown( *tower_buffer );
+
+				//  2 ) search downwards from highest element, sort all equal keys behind found object
+		_sortEquals( *list, _searchFrom( *list, tower_buffer, right_theKey, search_path, dim ), right_theKey );
+		
+				// II. the range is now limited by a sorted element
+				//	1 ) searching for highest layer again( may have changed ),
+				//		on-line search in associated structures
+		tower_buffer = _findTowerTop( base, list, left_border, right_border, dim, right_theKey, results );
+
+				//	2 ) on-line search in associated structures of the higher layers
+		base = _collectAssocStructs( tower_buffer, left_border, right_border, dim, right_theKey, list, results );
+
+				//	3 ) check the remaining base elements
+		_checkBaseElementsRight( base, left_border, right_border, dim, right_theKey, results );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TResultSet >
+	void
+	_bottomSearch(	SkipList< TObject, TModus, RT< TSpec >, Deferred > * list,
+					TObject * left_border,
+					TObject * right_border,
+					TResultSet & results )
+	{
+		SEQAN_CHECKPOINT
+		typename Size< TObject >::Type dim = 0;
+		typename Key< TObject >::Type left_theKey = key( *left_border, dim );
+		typename Key< TObject >::Type right_theKey = key( *right_border, dim );
+			// search for the left base element
+		SkipElement< TObject, TModus, RT< TSpec >, Deferred > ** search_path = _getSearchPath( *list, 0 );
+		SkipBaseElement< TObject, TModus, RT< TSpec >, Deferred > * base = _searchFrom( *list, _getRoot( *list ), left_theKey, search_path, dim );
+
+		while( key( *base ) < left_theKey )
+			goNext( base );
+		if( key( *base ) > right_theKey )
+			return;
+
+		SkipBaseElement< TObject, TModus, RT< TSpec >, Deferred > * right_base  = _searchFrom( *list, _getRoot( *list ), right_theKey, search_path, dim );
+		_sortEquals( *list, right_base, right_theKey );
+
+			//  2 ) search downwards from highest element
+		while( base != right_base )
+		{
+			_pushBack( results, getObject( base ) );
+			goNext( base );
+		}
+		
+		while( key( *base ) <= right_theKey )
+		{
+			_pushBack( results, getObject( base ) );
+			goNext( base );
+		}
+	}
+
+}
+
+#endif // SEQAN_HEADER_RT_SL_DEF_ALGOS_H
diff --git a/src/SeqAn-1.3/seqan/chaining/rt_sl_impl.h b/src/SeqAn-1.3/seqan/chaining/rt_sl_impl.h
new file mode 100644
index 0000000..0eaf9bf
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/rt_sl_impl.h
@@ -0,0 +1,243 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef SEQAN_HEADER_CRT_SKIPLIST_H
+#define SEQAN_HEADER_CRT_SKIPLIST_H
+
+
+
+namespace seqan
+{
+	
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct SkipList< TObject, TModus, RT< TSpec >, TStructuring >
+{	
+	// private members:
+		// container for elements on the right side
+	SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * _leftSideStore;
+		// container for elements in the base(lowest) layer
+	union{
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * _baseStore;	
+		SkipList< TObject, TModus, RT< TSpec >, TStructuring > * _next;	
+	};
+		// the main container class containing meta-information and interface functions
+	RangeTree< TObject, TModus, RT< TSpec >, TStructuring > * _mainTree;
+		// stores number of elements used
+	typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type _numOfElements;
+		// dimension of the list
+	typename Size< TObject >::Type _dim;
+
+
+//*************************************** internal help functions: ************************************************
+
+
+	// **********************  Special SkipList< TObject, TModus, RT< TSpec >, TStructuring > accessor functions ***************************
+
+	friend inline
+	typename Size< TObject >::Type
+	dimension( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._dim;
+	}
+
+	friend inline
+	RangeTree< TObject, TModus, RT< TSpec >, TStructuring > *
+	_getMainTree( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._mainTree;
+	}
+
+	SkipList & operator=( const SkipList & /*old*/ )
+	{}
+
+	SkipList( const SkipList & /*old*/ )
+	{}
+		
+public:
+
+		// **********************  Constructors ***************************
+	SkipList()
+	{
+		mtRandInit();
+	}
+
+
+	~SkipList()
+	{
+		Allocator< ClassPool< SkipElement< TObject, TModus, RT< TSpec >, TStructuring >, Limited > > & elem_pool_buffer = _getElementAlloc( *_getMainTree( *this ) );
+		
+			// destroy towers
+		_setHeight( *_baseStore, _getMaximalSLTowerHeight( _numOfElements ) );
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * up_elem = &_getUp( *_baseStore );
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * up_buffer = up_elem;
+		SkipElement< TObject, TModus, RT< TSpec >, TStructuring > * right_elem = &_getUp( _baseStore[ _numOfElements + 1 ] );
+		typename Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type height;
+		while( up_elem != right_elem ){
+			height = _getHeight( *_getDown( *up_elem ) );
+			up_buffer = _getRight( *up_elem );
+			arrayDestruct( up_elem, up_elem + height );
+			deallocate( elem_pool_buffer, up_elem, height );
+			up_elem = up_buffer;
+		}
+		arrayDestruct( up_elem, up_elem + 2 );
+		deallocate( elem_pool_buffer, up_elem, 2 );
+			
+			// destroy base layer
+		arrayDestruct( _baseStore, _baseStore + _numOfElements + 2 );
+		deallocate( _getBaseAlloc( *this ), _baseStore, _numOfElements + 2 );
+	}
+	
+	
+	friend
+	void 
+	printLayer(	SkipList< TObject, TModus, RT< TSpec >, TStructuring > & me,
+				typename seqan::Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type layer,
+				int column )
+	{
+		if( layer == 0 )
+		{
+			for( typename seqan::Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type j = 0; j < 11; ++j )
+			{
+				std::cout<< "______";
+			}
+			std::cout<<std::endl;
+			SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * temp = me._baseStore;
+			temp += column;
+			SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * tempEnd = temp;
+			tempEnd += me._numOfElements;
+			while( temp != tempEnd )
+			{
+				std::cout.width(7);
+				if( key( *temp ) == minValue< typename Key< TObject >::Type >( ) )
+					std::cout << std::left << "L";
+				else
+					std::cout << std::left << key( *temp );
+				goNext( temp );
+			}
+			//std::cout<<std::endl;
+			//printCounts( me );
+			//std::cout<<std::endl;
+			//printSorting( me );
+			//std::cout<<std::endl;
+			//printHeights( me );
+			//std::cout<<std::endl;
+			//printValues( me );
+		}
+		else if( layer <= _getCurrentLayer( me ) )
+		{
+			SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * temp = me._baseStore;
+			temp += column;
+			SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring > * tempEnd = temp;
+			tempEnd += me._numOfElements;
+			while( temp != tempEnd )
+			{
+				if( _getHeight( *temp ) >= layer )
+				{
+					if( _getRight( *( &_getUp( *temp ) + layer - 1) ) )
+					{
+						std::stringstream s;
+						if( key( *temp ) == minValue< typename Key< TObject >::Type >( ) )
+							s << std::left << "L";
+						else
+							s << key( *temp );
+						s << ">";
+						std::cout.width(7);
+						std::cout << std::left << s.str();
+					}
+					//else
+					//	dump( *( &_getUp( *hostIterator( temp ) ) + layer - 1 ) );
+				}
+				else 
+				{
+					std::cout.width(7);
+					std::cout << " ";
+				}
+				goNext( temp );
+			} 
+		}
+		std::cout<<std::endl;
+	}
+
+	void 
+	dump(  )
+	{
+		int column = 0;
+
+		while( column < length( *this ) )
+		{
+			int j = _getMaximalSLTowerHeight( *this );
+			while( j > 0 ){
+				printLayer( *this, --j, column );
+			}
+			std::cout<< std::endl;
+			column += 14;
+		}
+	}
+
+	friend
+	void 
+	printCounts( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list )
+	{
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring  >* temp = &list._baseStore[0];
+		for( typename seqan::Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type i = 0; i < list._numOfElements + 1; ++i ){
+			std::cout.width(3);
+			std::cout << std::left << _getCountImpl( *temp );
+			++temp;
+		}
+	}
+
+
+	friend
+	void
+	printHeights( SkipList< TObject, TModus, RT< TSpec >, TStructuring > & list )
+	{
+		SkipBaseElement< TObject, TModus, RT< TSpec >, TStructuring  >* temp = &list._baseStore[0];
+		for( typename seqan::Size< SkipList< TObject, TModus, RT< TSpec >, TStructuring > >::Type i = 0; i < list._numOfElements + 1; ++i ){
+			std::cout.width(3);
+			std::cout << std::left << _getHeight( *temp );
+			++temp;
+		}
+	}
+
+
+}; // struct SkipList
+
+
+}
+
+#endif	// SEQAN_HEADER_CRT_SKIPLIST_H
diff --git a/src/SeqAn-1.3/seqan/chaining/score_chain.h b/src/SeqAn-1.3/seqan/chaining/score_chain.h
new file mode 100644
index 0000000..9444119
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/score_chain.h
@@ -0,0 +1,54 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SCORE_CHAIN_H
+#define SEQAN_HEADER_SCORE_CHAIN_H
+
+namespace seqan
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+//struct Manhattan;
+
+struct Zero;
+
+struct ChainSoP;
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+}// namespace seqan
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/chaining/score_chain_sop.h b/src/SeqAn-1.3/seqan/chaining/score_chain_sop.h
new file mode 100644
index 0000000..b3c7651
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/score_chain_sop.h
@@ -0,0 +1,248 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SCORE_CHAIN_SOP_H
+#define SEQAN_HEADER_SCORE_CHAIN_SOP_H
+
+namespace seqan
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Score spec for sum of pairs distance
+
+/**.Spec.Score ChainSoP
+..summary:Scoring scheme for chaining that uses a special method for scoring the gaps between two fragments.
+..cat:Chaining
+..general:Class.Score
+..signature:Score<TValue, ChainSoP>
+..param.TValue:Type of the score values.
+..remarks:This scoring scheme is used to score gaps between to fragments in chaining.
+*/
+
+template <typename TValue>
+class Score<TValue, ChainSoP>
+{
+private:
+	TValue data_match;
+	TValue data_mismatch;
+	TValue data_gap;
+
+public:
+	Score( TValue _match = 0, TValue _mismatch = 3, TValue _gap = 2 ):
+		data_match(_match),
+		data_mismatch(_mismatch),
+		data_gap(_gap)
+	{
+	}
+
+	Score( TValue multiplier ):
+		data_match( -1 * multiplier ),
+		data_mismatch( -1 * multiplier ),
+		data_gap( -1 * multiplier )
+	{
+	}
+
+	Score(Score const & other):
+		data_match(other.data_match),
+		data_mismatch(other.data_mismatch),
+		data_gap(other.data_gap)
+	{
+	}
+
+	~Score()
+	{
+	}
+
+	Score & operator = (Score const & other)
+	{
+		data_match = other.data_match;
+		data_mismatch = other.data_mismatch;
+		data_gap = other.data_gap;
+		return *this;
+	}
+
+//____________________________________________________________________________
+
+	friend inline TValue &
+	scoreMatch(Score & me)
+	{
+		return me.data_match;
+	}
+	friend inline TValue const &
+	scoreMatch(Score const & me)
+	{
+		return me.data_match;
+	}
+
+	friend inline TValue &
+	scoreMismatch(Score & me)
+	{
+		return me.data_mismatch;
+	}
+	friend inline TValue const &
+	scoreMismatch(Score const & me)
+	{
+		return me.data_mismatch;
+	}
+
+	friend inline TValue &
+	scoreGap(Score & me)
+	{
+		return me.data_gap;
+	}
+
+	friend inline TValue const &
+	scoreGap(Score const & me)
+	{
+		return me.data_gap;
+	}
+/*
+	friend inline TValue &
+	scoreGapOpen(Score<TValue, ChainSoP> & me)
+	{
+		return me.data_gap;
+	}
+
+	friend inline TValue const &
+	scoreGapOpen(Score<TValue, ChainSoP> const & me)
+	{
+		return me.data_gap;
+	}
+*/
+//____________________________________________________________________________
+};
+
+
+template <typename TValue>
+inline TValue &
+scoreMatch(Score<TValue, ChainSoP> & me)
+{
+	return me.data_match;
+}
+template <typename TValue>
+inline TValue const &
+scoreMatch(Score<TValue, ChainSoP> const & me)
+{
+	return me.data_match;
+}
+
+template <typename TValue>
+inline TValue &
+scoreMismatch(Score<TValue, ChainSoP> & me)
+{
+	return me.data_mismatch;
+}
+template <typename TValue>
+inline TValue const &
+scoreMismatch(Score<TValue, ChainSoP> const & me)
+{
+	return me.data_mismatch;
+}
+
+template <typename TValue>
+inline TValue &
+scoreGap(Score<TValue, ChainSoP> & me)
+{
+	return me.data_gap;
+}
+
+template <typename TValue>
+inline TValue const &
+scoreGap(Score<TValue, ChainSoP> const & me)
+{
+	return me.data_gap;
+}
+//////////////////////////////////////////////////////////////////////////////
+
+//Shortcut:
+
+
+//template< typename TValue >
+//typedef typename Score< TValue, ChainSoP > ChainSoPScore;
+
+//////////////////////////////////////////////////////////////////////////////
+
+// compute score of aligning two characters
+
+//template <typename TValue, typename T>
+//inline TValue
+//score( Score<TValue, ChainSoP> const & me,
+//	  T const & left,
+//	  T const & right)
+//{
+//	if (left == right) return scoreMatch(me);
+//	else return scoreMismatch(me);
+//}
+
+//////////////////////////////////////////////////////////////////////////////
+//compute score for chaining two fragments 
+//return value this is only valid for f1 < f2, 
+//that is f2 can be appended to f1
+
+template <typename TValue, typename TFragment>
+inline TValue
+scoreChainGap(Score<TValue, ChainSoP> const & me,
+			  TFragment & f1,
+			  TFragment & f2)
+{
+	SEQAN_ASSERT(dimension(f1) == dimension(f2))
+
+	TValue score_gap = scoreGap(me);
+	TValue score_miss = scoreMismatch(me);
+
+	TValue sc = 0;
+	unsigned int dim = dimension(f1);
+	for (unsigned int d1 = 0; d1 < dim-1; ++d1)
+	{
+		TValue delta1 = (TValue) (leftPosition(f2, d1) - rightPosition(f1, d1));
+		for (unsigned int d2 = d1+1; d2 < dim; ++d2)
+		{
+			TValue delta2 = (TValue) (leftPosition(f2, d2) - rightPosition(f1, d2));
+			if (delta1 > delta2)
+			{
+				sc -= (score_miss*delta2 + score_gap*(delta1 - delta2));
+			}
+			else
+			{
+				sc -= (score_miss*delta1 + score_gap*(delta2 - delta1));
+			}
+		}
+	}
+	return sc;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/chaining/score_manhattan.h b/src/SeqAn-1.3/seqan/chaining/score_manhattan.h
new file mode 100644
index 0000000..b36eaa8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/score_manhattan.h
@@ -0,0 +1,188 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SCORE_MANHATTAN_H
+#define SEQAN_HEADER_SCORE_MANHATTAN_H
+
+namespace seqan
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Score spec for manhattan distance
+
+/**.Spec.Score Manhattan
+..summary:Scoring scheme for chaining that computes gap scores using manhattan distance.
+..cat:Chaining
+..general:Class.Score
+..signature:Score<TValue, Manhattan>
+..param.TValue:Type of the score values.
+..remarks:The manhattan distance between two n-dimensional points is defined is the sum of the (absolute) differences of their coordinates. 
+*/
+template <typename TValue>
+class Score<TValue, Manhattan>
+{
+public:
+	TValue data_match;
+	TValue data_mismatch;
+	TValue data_gap;
+
+public:
+	Score( TValue _match = 0, TValue _misalign = 1 ):
+		data_match( _match ),
+		data_mismatch( _misalign ),
+		data_gap( _misalign )
+	{
+	}
+
+	Score( TValue score ):
+		data_match( 0 ),
+		data_mismatch( score ),
+		data_gap( score )
+	{
+	}
+
+	Score(Score const & other):
+		data_match(other.data_match),
+		data_mismatch(other.data_mismatch),
+		data_gap(other.data_gap)
+	{
+	}
+
+	~Score()
+	{
+	}
+
+	Score & operator = (Score const & other)
+	{
+		data_match = other.data_match;
+		data_mismatch = other.data_mismatch;
+		data_gap = other.data_gap;
+		return *this;
+	}
+
+
+
+//____________________________________________________________________________
+};
+
+
+//____________________________________________________________________________
+
+template <typename TValue>
+inline TValue 
+scoreMatch(Score<TValue, Manhattan> & me)
+{
+	return me.data_match;
+}
+template <typename TValue>
+inline TValue
+scoreMatch(Score<TValue, Manhattan> const & me)
+{
+	return me.data_match;
+}
+
+template <typename TValue>
+inline TValue 
+scoreMismatch(Score<TValue, Manhattan> & me)
+{
+	return me.data_mismatch;
+}
+template <typename TValue>
+inline TValue
+scoreMismatch(Score<TValue, Manhattan> const & me)
+{
+	return me.data_mismatch;
+}
+
+template <typename TValue>
+inline TValue 
+scoreGap(Score<TValue, Manhattan> & me)
+{
+	return me.data_gap;
+}
+template <typename TValue>
+inline TValue const &
+scoreGap(Score<TValue, Manhattan> const & me)
+{
+	return me.data_gap;
+}
+//////////////////////////////////////////////////////////////////////////////
+
+//Shortcut:
+
+
+//template< typename TValue >
+//typedef typename Score< TValue, Manhattan > ManhattanScore;
+
+//////////////////////////////////////////////////////////////////////////////
+
+// compute score of aligning two characters
+
+//template <typename TValue, typename T>
+//inline TValue
+//score(Score<TValue, Manhattan> const & me,
+//	  T const & left,
+//	  T const & right)
+//{
+//	if (left == right) return scoreMatch(me);
+//	else return scoreMismatch(me);
+//}
+
+//////////////////////////////////////////////////////////////////////////////
+//compute score for chaining two fragments 
+//return value this is only valid for f1 < f2, 
+//that is f2 can be appended to f1
+
+template <typename TValue, typename TFragment>
+inline TValue
+scoreChainGap(Score<TValue, Manhattan> const & me,
+			  TFragment & f1,
+			  TFragment & f2)
+{
+	SEQAN_ASSERT(dimension(f1) == dimension(f2))
+
+	unsigned int dim = dimension(f1);
+	TValue score = 0;
+	TValue score_gap = scoreGap(me);
+	for (unsigned int i = 0; i < dim; ++i)
+	{
+		score -= score_gap * (leftPosition(f2, i) - rightPosition(f1, i));
+	}
+	return score;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/chaining/score_zero.h b/src/SeqAn-1.3/seqan/chaining/score_zero.h
new file mode 100644
index 0000000..a36e4a4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/score_zero.h
@@ -0,0 +1,152 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SCORE_ZERO_H
+#define SEQAN_HEADER_SCORE_ZERO_H
+
+namespace seqan
+{
+
+//////////////////////////////////////////////////////////////////////////////
+/**.Spec.Score Zero
+..summary:Scoring scheme for chaining that set gap scores to 0
+..cat:Chaining
+..general:Class.Score
+..signature:Score<TValue, Zero>
+..param.TValue:Type of the score values.
+*/
+
+template <typename TValue>
+class Score<TValue, Zero>
+{
+private:
+
+public:
+	Score()
+	{
+	}
+
+	Score(Score const & )
+	{
+	}
+
+	~Score()
+	{
+	}
+
+	Score & operator = (Score const & other)
+	{
+		if( this == & other )
+			return *this;
+		return *this;
+	}
+
+//____________________________________________________________________________
+};
+
+template <typename TValue>
+inline TValue 
+scoreMatch(Score<TValue, Zero> &)
+{
+	return 0;
+}
+template <typename TValue>
+inline TValue const 
+scoreMatch(Score<TValue, Zero> const &)
+{
+	return 0;
+}
+
+template <typename TValue>
+inline TValue 
+scoreMismatch(Score<TValue, Zero> & /*me*/)
+{
+	return 0;
+}
+template <typename TValue>
+inline TValue const 
+scoreMismatch(Score<TValue, Zero> const &)
+{
+	return 0;
+}
+
+template <typename TValue>
+inline TValue 
+scoreGap(Score<TValue, Zero> &)
+{
+	return 0;
+}
+template <typename TValue>
+inline TValue const 
+scoreGap(Score<TValue, Zero> const &)
+{
+	return 0;
+}
+	
+//////////////////////////////////////////////////////////////////////////////
+
+//Shortcut:
+
+//template< typename TValue >
+//typedef typename Score<TValue, Zero> ZeroScore;
+
+//////////////////////////////////////////////////////////////////////////////
+
+// compute score of aligning two characters
+
+template <typename TValue, typename T>
+inline TValue
+score(Score<TValue, Zero> const & /*me*/,
+	  T const & /*left*/,
+	  T const & /*right*/)
+{
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//compute score for chaining two fragments
+
+template <typename TValue, typename TFragment>
+inline TValue
+scoreChainGap(Score<TValue, Zero> const &,
+			  TFragment &,
+			  TFragment &)
+{
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/chaining/skip_base_element.h b/src/SeqAn-1.3/seqan/chaining/skip_base_element.h
new file mode 100644
index 0000000..3037606
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/skip_base_element.h
@@ -0,0 +1,888 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+/*	2006 Hendrik Woehrle
+*
+*	Deferred Skip List Datastructure
+*
+*	Elements in the base layer of the Skip List
+*
+*	Specializations:
+*
+*	TModus:
+*		* SkipListDynamic: contains predecessor/successor pointers to have the properties of an double linked list in the base layer
+*		* SkipListStatic: comes without these pointers to reduce size
+*
+*	TSpec:
+*		* Complete: Not using Deferred Data Structuring
+*		* Deferred: For use with Deferred Data Structuring
+*
+*/
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+#ifndef SEQAN_HEADER_SKIP_BASE_ELEMENT_H
+#define SEQAN_HEADER_SKIP_BASE_ELEMENT_H
+
+namespace seqan
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//		SkipBaseElement
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/////////////////////////////////////////////////////////////////
+//
+//	SkipListDynamic <-> SkipListStatic and Complete <-> Deferred member wrapper structs
+//
+//	depending on this specializations, the elements contain different members
+//
+/////////////////////////////////////////////////////////////////
+
+// special members of static/dynamic elements
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct
+	DynamicStruct_
+	{};
+
+	template< typename TObject, typename TSpec, typename TStructuring >
+	struct
+	DynamicStruct_< TObject, SkipListDynamic, TSpec, TStructuring >
+	{
+			// predecessing element in the skip list
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * _pred;
+			// succeeding element
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * _succ;
+
+		DynamicStruct_()
+			: _pred( NULL )
+			, _succ( NULL )
+		{}
+
+		DynamicStruct_( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * goPrevious, 
+						SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * succ )
+			: _pred( goPrevious )
+			, _succ( succ )
+		{}
+	};
+
+// special members of complete/deferred elements
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct
+	DeferredStruct_
+	{
+		union{
+				// number of unsorted elements to the right of this
+			typename Size< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type _count;
+				// height of related tower
+			typename Size< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type _height;
+		};
+
+		DeferredStruct_()
+			: _height( 0 )
+		{}
+
+		DeferredStruct_( typename Size< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type h )
+			: _height( h )
+		{}
+	};
+	
+	template< typename TObject, typename TSpec >
+	struct
+	DeferredStruct_< TObject, SkipListDynamic, TSpec, Deferred >
+	{
+			// next sorted element on the left side
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * _left;
+			// next sorted element on the right side
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * _right;
+			// number of unsorted elements to the right of this
+		typename Size< SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > >::Type _count;
+			// height of related tower
+		typename Size< SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > >::Type _height;
+
+		DeferredStruct_()
+			: _left( NULL )
+			, _right( NULL )
+			, _count( 0 )
+			, _height( 0 )
+		{}
+
+		DeferredStruct_( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * left, 
+							SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * right )
+			: _left( left )
+			, _right( right )
+			, _count( 0 )
+			, _height( 0 )
+		{}
+
+		template< typename TSize >
+		DeferredStruct_( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * left, 
+							SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * right,
+							TSize _count,
+							TSize _height )
+			: _left( left )
+			, _right( right )
+			, _count( _count )
+			, _height( _height )
+		{}
+	};
+
+
+	template< typename TObject, typename TSpec >
+	struct
+	DeferredStruct_< TObject, SkipListStatic, TSpec, Deferred >
+	{
+		//	// next sorted element on the left side
+		//SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > * _left;
+			// number of unsorted elements to the right of this
+		typename Size< SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > >::Type _count;
+			// height of related tower
+		typename Size< SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > >::Type _height;
+
+		DeferredStruct_()
+			: _count( 0 )
+			, _height( 0 )
+		{}
+
+	};
+
+		// overloading for iterators
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename Reference< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type
+	value( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me)
+	{
+	SEQAN_CHECKPOINT
+		return *me._obj;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename Reference< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type
+	value( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const & me)
+	{
+	SEQAN_CHECKPOINT
+		return *me._obj;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename Reference< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type
+	value( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * me)
+	{
+	SEQAN_CHECKPOINT
+		return *me->_obj;
+	}
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename Reference< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type
+	value( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const * me)
+	{
+	SEQAN_CHECKPOINT
+		return *me->_obj;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename GetValue< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type
+	getValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+	SEQAN_CHECKPOINT
+		return value(me);
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename GetValue< SkipBaseElement< TObject, TModus, TSpec, TStructuring > const >::Type
+	getValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const & me )
+	{
+	SEQAN_CHECKPOINT
+		return value(me);
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename GetValue< SkipBaseElement< TObject, TModus, TSpec, TStructuring > * >::Type
+	getValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * me )
+	{
+	SEQAN_CHECKPOINT
+		return *me;
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline void
+	valueDestruct( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * it )
+	{
+	SEQAN_CHECKPOINT
+		it->~SkipBaseElement< TObject, TModus, TSpec, TStructuring >();
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline void
+	valueConstruct( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * it )
+	{
+	SEQAN_CHECKPOINT
+		new( it ) SkipBaseElement< TObject, TModus, TSpec, TStructuring >;
+	}
+
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline void
+	valueConstruct( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * it,
+				   TObject * obj )
+	{
+	SEQAN_CHECKPOINT
+		new( it ) SkipBaseElement< TObject, TModus, TSpec, TStructuring >( obj );
+	}
+
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey >
+	inline void
+	valueConstruct( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * it,
+				   TObject * obj,
+				   TKey key )
+	{
+	SEQAN_CHECKPOINT
+		new( it ) SkipBaseElement< TObject, TModus, TSpec, TStructuring >( obj, key );
+	}
+
+
+/*
+.Internal.getObject:
+..summary:Get the saved object which stores key-value information.
+..cat:SkipList
+..signature:getObject(element)
+..param.element:The desired element.
+...type:Class.SkipBaseElement
+*/
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	TObject * 
+	getObject( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * me )
+	{
+		SEQAN_CHECKPOINT
+		return me->_obj;
+	}
+
+
+/*
+.Internal._setObject:
+..summary:Set the saved object of a SkipBaseElement which stores key-value information.
+..remarks: For Internal use only. To insert an object into a dynamic skip list, use insert.
+..cat:SkipList
+..signature:getObject(element, object)
+..param.element:The desired element.
+...type:Class.SkipBaseElement
+..param.element:The desired element.
+...type:Class.SkipBaseElement
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void 
+	_setObject( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me,
+				TObject * obj )
+	{
+		SEQAN_CHECKPOINT
+		me._obj = obj;
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void 
+	_setObject( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me,
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > * data )
+	{
+		SEQAN_CHECKPOINT
+		me._obj = getObject( data );
+	}
+
+
+/*
+.Internal._setUp:
+..summary:Set the pointer to the lowest SkipElement of the related tower.
+..cat:SkipList
+..signature:_setUp(element, up)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..param.up:The SkipElement of the tower.
+...type:Class.SkipElement
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	void 
+	_setUp( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, 
+			SkipElement< TObject, TModus, TSpec, TStructuring > & up )
+	{
+		SEQAN_CHECKPOINT
+		me._up = &up;
+	}
+
+
+/*
+.Internal._getUp:
+..summary:_get a pointer to the lowest SkipElement of the related tower.
+..cat:SkipList
+..signature:_getUp(element)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..returns:A @Class.SkipElement.$SkipElement*$@ pointing to the lowest SkipElement in the related tower. NULL if no tower is related to $element$.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	SkipElement< TObject, TModus, TSpec, TStructuring > & 
+	_getUp( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return *me._up;
+	}
+
+
+/*
+.Internal._getSucc:
+..summary:Get a pointer to the succeeding SkipBaseElement.
+..cat:SkipList
+..signature:_getSucc(element)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..returns:A @Class.SkipBaseElement.$SkipBaseElement*$@, pointing to $element1$ succeeding $element$. NULL if no such $element1$ exists.
+..remarks:If the containing SkipList is Deferred and not completely sorted, it is unlikely that the ordering of the keys is already established. 
+..So $key( _getSucc( element ) ) >= key( element )$ does not hold for sure.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > *
+	_getSucc( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return ( &me + 1 );
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *
+	_getSucc( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._dynStruct._succ;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	goNext( SkipBaseElement< TObject, TModus, TSpec, TStructuring > *& me )
+	{
+		SEQAN_CHECKPOINT
+		++me;
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	goNext( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& me )
+	{
+		SEQAN_CHECKPOINT
+		me = _getSucc( *me );
+	}
+
+
+/*
+.Internal._setSucc:
+..summary:Set the pointer to the succeeding SkipBaseElement.
+..cat:SkipList
+..signature:_setSucc(element, succ)
+..param.element:The element.
+...type:Class.SkipBaseElement
+..param.succ:The succeeding SkipBaseElement.
+...type:Class.SkipBaseElement
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void 
+	_setSucc( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & /*me*/, 
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*succ*/ )
+	{
+		SEQAN_ASSERT2( false, "No dynamic related members in default mode" )
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void 
+	_setSucc( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & me, 
+				SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * succ )
+	{
+		SEQAN_CHECKPOINT
+		me._dynStruct._succ = succ;
+	}
+
+	
+/*
+.Function._getPred:
+..summary:Get a pointer to the preceding SkipBaseElement.
+..cat:SkipList
+..signature:_getPred(element)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..returns:A @Class.SkipBaseElement.$SkipBaseElement*$@, pointing to $element1$ preceding $element$. NULL if no such $element1$ exists.
+..remarks:If the containing SkipList is Deferred and not completely sorted, it is unlikely that the ordering of the keys is already established. 
+..So $key( _getPred( element ) ) >= key( element )$ does not hold for sure.
+..include:seqan/chaining.h
+*/
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * 
+	_getPred( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me );
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > * 
+	_getPred( SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return ( &me - 1 );
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * 
+	_getPred( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._dynStruct._pred;
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	goPrevious( SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > *& me )
+	{
+		SEQAN_CHECKPOINT
+		--me;
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	goPrevious( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& me )
+	{
+		SEQAN_CHECKPOINT
+		me = _getPred( *me );
+	}
+
+
+/*
+.Internal._setPred:
+..summary:Set the pointer to the preceding SkipBaseElement.
+..cat:SkipList
+..signature:_setPred(element, goPrevious)
+..param.element:The element.
+...type:Class.SkipBaseElement
+..param.goPrevious:The succeeding SkipBaseElement.
+...type:Class.SkipBaseElement
+*/
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void 
+	_setPred(	SkipBaseElement< TObject, TModus, TSpec, TStructuring > & /*me*/, 
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*goPrevious*/ )
+	{
+		SEQAN_ASSERT2( false, "No dynamic related members in default mode" )
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void 
+	_setPred(	SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & me, 
+				SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * goPrevious )
+	{
+		SEQAN_CHECKPOINT
+		me._dynStruct._pred = goPrevious;
+	}
+
+/*
+.Internal._getLeft:
+..summary:Get a pointer to the next sorted SkipBaseElement on the left side.
+..cat:SkipList
+..signature:_getLeft(element)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..returns:A @Class.SkipBaseElement.$SkipBaseElement*$@, pointing to the next sorted element on the left side.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * 
+	_getLeft( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getPred( me );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec > inline 
+	SkipBaseElement< TObject, TModus, TSpec, Deferred > * 
+	_getLeft( SkipBaseElement< TObject, TModus, TSpec, Deferred > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._defStruct._left;
+	}
+
+
+/*
+.Internal._setLeft:
+..summary:Get a pointer to the next sorted SkipBaseElement on the left side.
+..cat:SkipList
+..signature:_getLeft(element)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..returns:A @Class.SkipBaseElement.$SkipBaseElement*$@, pointing to the next sorted element on the left side.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	void 
+	_setLeft( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & /*me*/,
+							SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*left*/ )
+	{
+		SEQAN_ASSERT2( false, "No deferred related members in default mode" )
+	}
+
+	template< typename TObject, typename TModus, typename TSpec > inline 
+	void 
+	_setLeft( SkipBaseElement< TObject, TModus, TSpec, Deferred > & me,
+							SkipBaseElement< TObject, TModus, TSpec, Deferred > * left )
+	{
+		SEQAN_CHECKPOINT
+		me._defStruct._left = left;
+	}
+
+
+/*
+.Internal._getRight:
+..summary:Get a pointer to the next sorted SkipBaseElement on the right side.
+..cat:SkipList
+..signature:_getRight(element)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..returns:A @Class.SkipBaseElement.$SkipBaseElement*$@, pointing to the next sorted element on the right side.
+*/
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * 
+	_getRight( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getSucc( me );
+	}
+
+
+	template< typename TObject, typename TSpec > inline 
+	SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * 
+	_getRight( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._defStruct._right;
+	}
+
+	template< typename TObject, typename TSpec > inline 
+	SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > * 
+	_getRight( SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > & me )
+	{
+		SEQAN_CHECKPOINT
+		return &me +( _getCount( me ) + 1 );
+	}
+
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	right( SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > *& me )
+	{
+		SEQAN_CHECKPOINT
+		me += ( _getCount( *me ) + 1 );
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	right( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& me )
+	{
+		SEQAN_CHECKPOINT
+		me = _getRight( *me );
+	}
+
+
+/*
+.Internal._setRight:
+..summary:Get a pointer to the next sorted SkipBaseElement on the right side.
+..cat:SkipList
+..signature:_getRight(element)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..returns:A @Class.SkipBaseElement.$SkipBaseElement*$@, pointing to the next sorted element on the right side.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	void 
+	_setRight( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & /*me*/,
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*right*/ )
+	{
+	}
+
+	template< typename TObject, typename TSpec > inline 
+	void 
+	_setRight( SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > & /*me*/,
+				SkipBaseElement< TObject, SkipListStatic, TSpec, Deferred > * /*right*/ )
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TSpec > inline 
+	void 
+	_setRight( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & me,
+				SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * right )
+	{
+		SEQAN_CHECKPOINT
+		me._defStruct._right = right;
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * 
+	_getNext( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._next;
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	void 
+	_setNext(	SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me, 
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > * next )
+	{
+		SEQAN_CHECKPOINT
+		me._next = next;
+	}
+
+
+/*
+.Internal._getHeight:
+..summary:Get the height of the related tower.
+..cat:SkipList
+..signature:_getHeight(element)
+..param.element:The element.
+...type:Class.SkipBaseElement
+..returns:Height of the associated tower.
+...type:
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type
+	_getHeight( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._defStruct._height;	
+	}
+
+/*
+.Internal._setHeight:
+..summary:Set the height of the related tower.
+..cat:SkipList
+..signature:_setHeight(element, height)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..param.height:The height.
+...type:@Metafunction.Height.$Size< element-type >::Type$@
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void 
+	_setHeight(	SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me,
+				TSize height )
+	{
+		SEQAN_CHECKPOINT
+		me._defStruct._height = height;
+	}
+
+// key
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline 
+	void 
+	setKey( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me,
+			TKey theKey)
+	{
+		SEQAN_CHECKPOINT
+		me._key= theKey;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline 
+	void 
+	setKey( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * me,
+			TKey theKey)
+	{
+		SEQAN_CHECKPOINT
+		me->_key= theKey;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	typename Key< TObject >::Type 
+	key( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._key;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline 
+	typename Key< TObject >::Type 
+	key( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me,
+				TParam & /*p*/ )
+	{
+		SEQAN_CHECKPOINT
+		return me._key;
+	}
+
+
+/*
+.Internal._getCount:
+..summary:_get the count-value of the SkipBaseElement.
+..cat:SkipList
+..signature:_getCount(element)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..returns:The count-value of element. Type is $TKey$.
+..remarks:The count value is defined as the number of unsorted elements between $element$ and $_getRight(element)$
+*/
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type
+	_getCount( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._defStruct._count;
+	}
+	
+
+/*
+.Internal._setCount:
+..summary:Set the count value.
+..cat:SkipList
+..signature:_setCount(element, count)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+..param.count:The new count-value of element.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void 
+	_setCount(	SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me,
+				TSize count )
+	{
+		SEQAN_CHECKPOINT
+		me._defStruct._count = count;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// struct SkipBaseElement
+//
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*
+.Internal.SkipBaseElement:
+..summary:Type of elements in the base layer of a SkipList
+..cat:SkipList
+..signature:SkipBaseElement< TObject, TModus, TSpec, TStructuring >
+.signature:SkipElement< TObject, TModus, TSpec, TStructuring >
+..param.TObject:Type of the stored object.
+..param.TModus:The TModus parameter of the SkipList.
+..param.TSpec:The TSpec parameter of the SkipList.
+..param.TStructuring:The TStructuring parameter of the SkipList.
+*/
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct SkipBaseElement
+{
+	
+	DynamicStruct_< TObject, TModus, TSpec, TStructuring > _dynStruct;
+
+	DeferredStruct_< TObject, TModus, TSpec, TStructuring > _defStruct;
+	
+		// pointer to tower in the upper layers
+	union{
+		SkipElement< TObject, TModus, TSpec, TStructuring > * _up;
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _next;	// pointer needed for memory pool allocator, points to next free memory block 
+	};
+		// the actual key
+	typename Key< TObject >::Type _key;
+		// saved key/value pair
+	TObject * _obj;
+		
+
+	typename Cargo< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type _cargo;
+
+	
+	friend inline
+	typename Cargo< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >::Type * 
+	cargo( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return &me._cargo;
+	}
+
+	template< typename TCargo > friend inline
+	void
+	_setCargo( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & me,
+					TCargo & cargo )
+	{
+		SEQAN_CHECKPOINT
+		me._cargo = cargo;
+	}
+	
+	
+public:
+
+			// standard constructor
+	SkipBaseElement(void)
+		: _up(NULL)
+		, _obj(NULL)
+	{
+		_initCargo( this, _cargo );
+	}
+
+	template< typename TKey >
+	SkipBaseElement( TObject * obj, TKey key )
+		: _up(NULL)
+		, _key( key )
+		, _obj(obj)
+	{
+		_initCargo( this, _cargo );
+	}
+	
+	~SkipBaseElement(void)
+	{
+	}
+  
+};	// struct SkipBaseElement
+
+	
+} // namespace seqan
+#endif //SKIP_BASE_ELEMENT_H_
+
+
diff --git a/src/SeqAn-1.3/seqan/chaining/skip_element.h b/src/SeqAn-1.3/seqan/chaining/skip_element.h
new file mode 100644
index 0000000..1560db9
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/skip_element.h
@@ -0,0 +1,457 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+/*	2006 Hendrik Woehrle
+*
+*	Deferred Skip List Datastructure
+*
+*	Elements in the higher layers of the Skip List
+*
+*/
+
+//SEQAN_NO_ DDDOC: do not generate documentation for this file
+
+#ifndef SEQAN_HEADER_SKIP_ELEMENT_H
+#define SEQAN_HEADER_SKIP_ELEMENT_H
+
+namespace seqan
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//		SkipElement
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Internal.SkipElement:
+..summary:Basic data structure for elements in higher levels of a SkipList
+..cat:SkipList
+..signature:SkipElement< TObject, TModus, TSpec, TStructuring >
+..param.TObject:Type of the stored object.
+..param.TModus:The TModus parameter of the SkipList.
+..param.TSpec:The TSpec parameter of the SkipList.
+..param.TStructuring:The TStructuring parameter of the SkipList.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct SkipElement;
+
+
+/*
+.Internal.getObject:
+..summary:Get a reference to the related object in the SkipList
+..cat:SkipList
+..signature:getObject( element )
+..param.element:The object that has the desired value.
+...type:Class.SkipElement
+...type:Class.SkipBaseElement
+..returns:A Reference to the related object. Type depends on the TObject parameter of the SkipList.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	TObject * 
+	getObject( SkipElement< TObject, TModus, TSpec, TStructuring > * me )
+	{
+		SEQAN_CHECKPOINT
+		return getObject( _getDown( me ));
+	}
+
+/*
+.Internal._getRight:
+..summary:Get the SkipElement to the right of object.
+..cat:SkipList
+..signature:_getRight(element)
+..param.element:The object that references the desired SkipElement to the right.
+...type:Class.SkipElement
+...type:Class.SkipBaseElement
+..returns:The pointer to the right element. Types are @Class.SkipBaseElement.$SkipBaseElement*$@ or @Class.SkipElement.$SkipElement*$@ respectively.
+*/
+	
+		//default case
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	SkipElement< TObject, TModus, TSpec, TStructuring > * 
+	_getRight(SkipElement< TObject, TModus, TSpec, TStructuring > & me)
+	{
+		SEQAN_CHECKPOINT
+		return me._right;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline
+	void
+	right( SkipElement< TObject, TModus, TSpec, TStructuring > *& me )
+	{
+		SEQAN_CHECKPOINT
+		me = me->_right;
+	}
+
+/*
+.Internal._getDown:
+..summary:Get the underlying SkipBaseElement of a SkipElement.
+..cat:SkipList
+..signature:_getDown(element)
+..param.element:The element.
+...type:Class.SkipElement
+..returns:A pointer to the down element. Type is @Class.SkipBaseElement.$SkipBaseElement*$@
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * 
+	_getDown( SkipElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._down;
+	}
+
+
+/*
+.Internal._setRight:
+..summary:Set the $right$ member variable of a SkipElement to the SkipElement (or of a SkipBaseElement to the SkipBaseElement) that should be on the right.
+..cat:SkipList
+..signature:_setRight(element1, element2)
+..param.element1:The desired object.
+...type:Class.SkipElement
+...type:Class.SkipBaseElement
+..param.element2:Pointer to the element, that should become the element on the right.
+...type:Class.SkipElement
+...type:Class.SkipBaseElement
+..remarks.text:A SkipElement can only have another SkipElement on the right, a SkipBaseElement only another SkipBaseElement.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	void 
+	_setRight( SkipElement< TObject, TModus, TSpec, TStructuring > & me, 
+			   SkipElement< TObject, TModus, TSpec, TStructuring > * right )
+	{
+		SEQAN_CHECKPOINT
+		me._right = right;
+	}
+
+/*
+.Internal._setDown:
+..summary:Set the $down$ member variable to the related SkipBaseElement in the base layer.
+..cat:SkipList
+..signature:_setDown(element1, element2)
+..param.element1:The element.
+...type:Class.SkipElement
+..param.element2:A pointer to the realted SkipBaseElement.
+...type:Class.SkipBaseElement
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	void 
+	_setDown( SkipElement< TObject, TModus, TSpec, TStructuring > & me,
+			  SkipBaseElement< TObject, TModus, TSpec, TStructuring > * down )
+	{
+		SEQAN_CHECKPOINT
+		me._down = down;
+	}
+
+/*
+.Internal._getNext:
+..summary:Get the next-pointer of the element. This is only used in @Class.ClassPool@ to administrate memory blocks.
+..cat:SkipList
+..signature:_getNext(element)
+..param.element:The desired object.
+...type:Class.SkipElement
+...type:Class.SkipBaseElement
+...type:Class.SkipList
+..returns:Pointer to the next free block in ClassPool. Type is $SkipElement*$ or $SkipBaseElement*$ respectively.
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	SkipElement< TObject, TModus, TSpec, TStructuring > * 
+	_getNext( SkipElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return me._next;
+	}
+
+/*
+.Internal._setNext:
+..summary:Set the next-pointer of the element. This is only used in @Class.ClassPool@ to govern memory blocks.
+..cat:SkipList
+..signature:setNext(element, next)
+..param.element:The desired object.
+...type:Class.SkipBaseElement
+...type:Class.SkipElement
+...type:Class.SkipList
+..param.next:Pointer to next-object.
+...type:Class.SkipBaseElement
+...type:Class.SkipElement
+...type:Class.SkipList
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	void 
+	_setNext( SkipElement< TObject, TModus, TSpec, TStructuring > & me,
+			  SkipElement< TObject, TModus, TSpec, TStructuring > * next )
+	{
+		SEQAN_CHECKPOINT
+		me._next = next;
+	}
+
+
+/*
+.Internal._getHeight:
+..summary:_get the height of the tower of which object is a part of.
+..cat:SkipList
+..signature:_getHeight(element)
+..param.element:The desired object.
+...type:Class.SkipElement
+...type:Class.SkipBaseElement
+..returns:The height of the tower related which contains $element$. The type is @Metafunction.Size.$Size< "element-type" >::Type$@
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	typename Size< SkipElement< TObject, TModus, TSpec, TStructuring > >::Type 
+	_getHeight( SkipElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getHeight( * _getDown( me ) );
+	}
+
+/**
+.Function.key:
+..summary:Get the the key of the element.
+..cat:Map
+..signature:key(element)
+..param.element:The desired object.
+..returns:The the key of the element.  Type is @Metafunction.Key.$Key< "element-type" >::Type$@.
+..include:seqan/chaining.h
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	typename Key< TObject >::Type
+	key( SkipElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		return me._key;
+	}
+
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > __inline
+	void 
+	setKey( SkipElement< TObject, TModus, TSpec, TStructuring > & me,
+			TKey pos )
+	{
+		me._key= pos;
+	}
+
+/*
+.Function.setKey:
+..summary:Set the theKeyattribute of the element.
+..cat:SkipList
+..signature:setKey(element, theKey)
+..param.element:The desired object.
+...type:Class.SkipElement
+..param.key:The desired object.
+...type:Metafunction.Key.$Key< "element-type" >::Type
+..include:seqan/chaining.h
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey >
+	void 
+	setKey( SkipElement< TObject, TModus, TSpec, TStructuring > & me,
+			TKey pos );
+
+
+/*
+.Internal._performDestructorAction:
+..summary:Action that should be performed while destruction of the element.
+..cat:SkipList
+..signature:_performDestructorAction(element)
+..param.element:The element.
+...type:Class.SkipElement
+...type:Class.SkipBaseElement
+..Remarks:In the default case, no special operations are performed. In the $RangeTree$ spec, the destructor of the associated structure is called.
+Can be used to perform operation s
+*/
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline
+	void
+	_performDestructorAction( SkipElement< TObject, TModus, TSpec, TStructuring > & /*me*/ )
+	{}
+
+/*
+.Function.cargo:
+..summary:Get the cargo of the element.
+..cat:SkipList
+..signature:cargo(element)
+..param.element:The desired element.
+...type:Class.SkipElement
+...type:Class.SkipBaseElement
+..returns:A reference to the cargo of the element. Type is $TKey$.
+..include:seqan/chaining.h
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline
+	typename Cargo< SkipElement< TObject, TModus, TSpec, TStructuring > >::Type &
+	cargo( SkipElement< TObject, TModus, TSpec, TStructuring > & me );
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TCargo > __inline
+	void
+	setCargo( SkipElement< TObject, TModus, TSpec, TStructuring > & me,
+				TCargo cargo );
+
+	
+//___________________________________________________________________	
+	
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	void 
+	dump( SkipElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		std::cout.width(5);
+		if( key( me ) == minValue< typename Key< TObject >::Type >( ) )
+			std::cout << std::left << "L";
+		else
+			std::cout<< key( me );
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > __inline 
+	void 
+	printElementValue( SkipElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * buffer =  _getDown( me );
+		if( buffer != NULL )
+			printElementValue( buffer );
+		else
+			std::cout << "_ ";
+	}
+
+
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey >
+	__inline void
+	valueConstruct( SkipElement< TObject, TModus, TSpec, TStructuring > * it,
+				    SkipElement< TObject, TModus, TSpec, TStructuring > * right,
+					SkipBaseElement< TObject, TModus, TSpec, TStructuring > * down,
+					TKey theKey )
+	{
+	SEQAN_CHECKPOINT
+		new( it ) SkipElement< TObject, TModus, TSpec, TStructuring >( right, down, theKey );
+	}
+
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct SkipElement
+{
+public:
+
+	union{
+			// pointer to the SkipElement on the level of the tower on the right of this tower
+		SkipElement< TObject, TModus, TSpec, TStructuring > * _right;
+			// pointer needed for memory pool allocator, points to next free memory block
+		SkipElement< TObject, TModus, TSpec, TStructuring > * _next;
+	};
+		
+		// pointer to the underlying SkipBaseElement
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _down;
+		// the key
+	typename Key< TObject >::Type _key;
+		// related SkipList for entries of lower dimension
+		// only constructed if needed by a range query, 
+		// and number of elements is not under threshold
+	typename Cargo< SkipElement< TObject, TModus, TSpec, TStructuring > >::Type _cargo;
+
+
+		// don't allow copy assignment operator and copy constructor
+		// (without the SkipList environment, SkipElements are senseless. Forbidding avoids unintended corruption of the
+		// SkipList containing the original SkipElement by deleting the copy)	
+	SkipElement( SkipElement & elem );
+	void operator=( const SkipElement & elem );
+
+	friend __inline
+	typename Cargo< SkipElement< TObject, TModus, TSpec, TStructuring > >::Type *
+	cargo( SkipElement< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		return &me._cargo;
+	}
+
+	template< typename TCargo > friend __inline
+	void
+	setCargo( SkipElement< TObject, TModus, TSpec, TStructuring > & me ,
+				TCargo cargo )
+	{
+		me._cargo = cargo;
+	}
+/*
+	friend 
+	void 
+	dump<>( SkipElement< TObject, TModus, TSpec, TStructuring > & me );
+
+	friend 
+	void 
+	printElementValue<>( SkipElement< TObject, TModus, TSpec, TStructuring > & me );
+
+*/
+public:
+
+	SkipElement( void )
+	: _right(NULL)
+	, _down(NULL)
+	{
+		_initCargo( this, _cargo );
+		#ifdef MEMTEST
+			++created;
+			++current;
+			if( current > max )
+				max = current;
+		#endif
+	}
+
+	template< typename TKey >
+	SkipElement( SkipElement< TObject, TModus, TSpec, TStructuring > * right,
+				 SkipBaseElement< TObject, TModus, TSpec, TStructuring > * down,
+				 TKey theKey )
+	: _right(right)
+	, _down(down)
+	, _key(theKey)
+	{
+		_initCargo( this, _cargo );
+	}
+
+
+	~SkipElement( void )
+	{	
+		_performDestructorAction( *this );
+		#ifdef MEMTEST
+			--current;
+		#endif
+	}
+
+	
+}; // struct SkipElement
+
+} // namespace seqan
+
+#endif // SKIP_ELEMENT_H
diff --git a/src/SeqAn-1.3/seqan/chaining/skip_list.h b/src/SeqAn-1.3/seqan/chaining/skip_list.h
new file mode 100644
index 0000000..f6a2ea7
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/skip_list.h
@@ -0,0 +1,69 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+/*	2006 Hendrik Woehrle
+*
+*	Deferred Skip List Datastructure
+*
+*	Include header file
+*
+*/
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+
+#ifndef SEQAN_HEADER_SKIP_LIST
+#define SEQAN_HEADER_SKIP_LIST
+
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+#include <limits>
+#include <typeinfo>
+#include <vector>
+
+#include <seqan/basic.h>
+#include <seqan/sequence.h>
+
+//#include "mersenne_twister.h"
+#include "geom_distribution.h"
+#include "skip_pool_alloc.h"
+#include "skip_list_type.h"
+#include "skip_list_base.h"
+#include "skip_list_iterator.h"
+#include "skip_base_element.h"
+#include "skip_element.h"
+#include "skip_list_impl.h"
+#include "skip_list_dynamic.h"
+
+#endif // SEQAN_HEADER_SKIP_LIST
diff --git a/src/SeqAn-1.3/seqan/chaining/skip_list_base.h b/src/SeqAn-1.3/seqan/chaining/skip_list_base.h
new file mode 100644
index 0000000..ba6e6bb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/skip_list_base.h
@@ -0,0 +1,1016 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+/*	2006 Hendrik Woehrle
+*
+*	Skip List Datastructure
+*
+*	Algorithms, helper functions, accessor functions of the SkipList
+*
+*/
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+
+#ifndef SEQAN_HEADER_SKIP_LIST_BASE_H
+#define SEQAN_HEADER_SKIP_LIST_BASE_H
+
+namespace seqan
+{
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//
+//	container adaptor methods - specs for the seqan default container functions
+//
+//////////////////////////////////////////////////////////////////////////////////////////
+
+		
+	template< typename TObject, typename TSpec, typename TStructuring >
+	struct IsContiguous< SkipList< TObject, SkipListStatic, TSpec, TStructuring > >
+	{
+		enum { VALUE = true };
+	};
+
+	template< typename TObject, typename TSpec, typename TStructuring >
+	struct IsContiguous< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >
+	{
+		enum { VALUE = false };
+	};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//
+//		dependend member classes
+//
+//
+////////////////////////////////////////////////////////////////////////////////////////////////
+	
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//		search path: saves elements which where traversed by a search operation
+//		(needed by several other functions, e.g. insertion, deletion )
+//
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct
+	SearchPath_
+	{
+			// buffer for elements on searchng path
+		SkipElement< TObject, TModus, TSpec, TStructuring > ** _searchPath;
+
+		SearchPath_( )
+		{
+		}
+
+		template< typename TSize >
+		SearchPath_( TSize size )
+		{
+		SEQAN_CHECKPOINT
+			allocate( this, _searchPath, size );
+		}
+
+		~SearchPath_( void )
+		{
+		SEQAN_CHECKPOINT
+			SEQAN_CHECK( _searchPath == NULL )
+		}
+
+
+	};
+
+		// get the search path of a skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipElement< TObject, TModus, TSpec, TStructuring > **
+	_getSearchPath( SearchPath_< TObject, TModus, TSpec, TStructuring > & sp )
+	{
+	SEQAN_CHECKPOINT
+		return sp._searchPath;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_clearSearchPath( SearchPath_< TObject, TModus, TSpec, TStructuring > & sp,
+						TSize size )
+	{
+	SEQAN_CHECKPOINT
+		deallocate( sp, sp._searchPath, size );
+		sp._searchPath = NULL;
+	}
+
+		// change the maximal size of the skip list
+		// ( e.g. when the maximal tower height has changed after insertion operations )
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_renewSearchPath( SkipList< TObject, TModus, TSpec, TStructuring > & list,
+						TSize old_size,
+						TSize new_size )
+	{
+	SEQAN_CHECKPOINT
+		deallocate( list, list._sp._searchPath, old_size );
+		allocate( list, list._sp._searchPath, new_size );
+	}
+
+
+
+///////////////////////////////////////////////////////
+//
+//	state of skip list
+//
+///////////////////////////////////////////////////////
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	bool
+	_getInitialState( SkipList< TObject, TModus, TSpec, TStructuring > & list )
+	{
+	SEQAN_CHECKPOINT
+		return list._initialState;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_noInitialState( SkipList< TObject, TModus, TSpec, TStructuring > & list )
+	{
+	SEQAN_CHECKPOINT
+		list._initialState = false;
+	}
+
+		// get the dimension
+		// in default case, the dimension is 0
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type 
+	dimension( SkipList< TObject, TModus, TSpec, TStructuring > & me );
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//
+//		helper functions
+//
+//	several usefull basic helper functions for different purposes 
+//
+///////////////////////////////////////////////////////////////////////////////////////////
+
+		// get the maximal tower height, that depends on the number of elemnts in the skip list
+	template< typename TNumber > inline
+	TNumber
+	_getMaximalSLTowerHeight( TNumber elements )
+	{
+		SEQAN_CHECKPOINT
+		return log2( elements ) + 6;
+	}
+
+		// get the maximal tower height, that depends on the size type of skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type
+	_getMaximalSLTowerHeight( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getMaximalSLTowerHeight( length( me ) );
+	}
+
+	// _throwCoin
+		// generates height with geometric distribution of a fair coin
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename THeight > inline 
+	typename seqan::Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type 
+	_throwCoin( SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/,
+				THeight max_height)
+	{
+		SEQAN_CHECKPOINT
+		typename Size< SkipList< TObject, TModus, TSpec> >::Type height = _geomRand< typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type >();
+		//if( height < 4 )
+		//	height = 4;
+		//height -= 4;
+		if( height > max_height )
+			height = max_height;
+		return height;
+	}
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//
+//		helper functions
+//
+//	several usefull basic helper functions for different purposes 
+//
+///////////////////////////////////////////////////////////////////////////////////////////
+
+		// swapBases
+		// swaps the related objects of two skip base elements
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	void 
+	_swapBases(	SkipBaseElement< TObject, TModus, TSpec, TStructuring > & first,
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > & second )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( &first != NULL && &second != NULL, "An SkipBaseElements's object is corrupted")
+		typename Key< TObject >::Type buffer_key= key( first );
+		setKey( first, key( second ) );
+		setKey( second, buffer_key );
+		TObject * bufferObject = getObject( &first );
+		_setObject( first, getObject( &second ) );
+		_setObject( second, bufferObject );
+	}
+
+
+		//	_calcPivot
+		//	calculates the pivot element from a given element on left side
+		//	depends on the TModus spec of the SkipList
+
+		// dynamic: base layer is a list
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *
+	_calcPivot(	SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > & base )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK( &base != NULL )
+		typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type offset = mtRand() % _getCount( base ) + 1;
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * pivot = &base;
+		while( offset > 0 )
+		{
+			SEQAN_CHECK( _getSucc( *pivot ) != NULL )
+			goNext( pivot );
+			--offset;
+		}
+		return pivot;
+	}
+
+		// static: base layer is an array
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > *
+	_calcPivot(	SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > & base )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK( &base != NULL )
+		SEQAN_CHECK2( _getCount( base ) != 0, "Tried to sort element that is already sorted" )
+		return  ( &base + ( mtRand() % _getCount( base ) + 1 ) );
+	}
+
+
+///////////////////////////////////////////////////////
+//
+//		sorting
+//
+///////////////////////////////////////////////////////
+
+		//	_sort
+		//	sort elements between elem and right with a step of quicksort
+		//	depends on the TStructuring spec of the SkipList
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * 
+	_sort(	SkipList< TObject, TModus, TSpec, TStructuring > & list,
+			SkipBaseElement< TObject, TModus, TSpec, TStructuring > * elem,
+			SkipBaseElement< TObject, TModus, TSpec, TStructuring > * right )
+	{
+		SEQAN_CHECKPOINT
+		return _sort( list, elem, right, list );
+	}
+
+
+		// complete (=default) case
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TExtraParam > 
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * 
+	_sort(	SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/,
+			SkipBaseElement< TObject, TModus, TSpec, TStructuring > * elem,
+			SkipBaseElement< TObject, TModus, TSpec, TStructuring > * right_border,
+			TExtraParam & param )
+	{
+			// security checking
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( elem != NULL, "Tried to sort element that is NULL" )
+			// helper variables
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * pivot = _calcPivot( *elem );
+		typename Key< TObject >::Type pivot_key= key( *pivot, param );
+			
+			// buffer elements
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * index = elem;
+		goNext( index );
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * pointer = index;
+		goPrevious( right_border );
+		_swapBases( *pivot, *right_border );
+		
+		typename seqan::Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type i_count = 0;
+		while( pointer != right_border )
+		{
+			if( key( *pointer, param ) < pivot_key){
+				_swapBases( *index, *pointer );
+				goNext( index );
+				i_count++;
+			}
+			goNext( pointer );
+		}
+		_swapBases( *index, *right_border );
+		pivot = index;
+		_renewConnects( *elem, *pivot, _getCount( *elem ), i_count );
+		return pivot;
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_sortEquals(	SkipList< TObject, TModus, TSpec, TStructuring > & list,
+					SkipBaseElement< TObject, TModus, TSpec, TStructuring > * elem )
+	{
+		SEQAN_CHECKPOINT
+		_sortEquals( list, elem, key( *elem ) );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline
+	void
+	_sortEquals(	SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/,
+					SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*elem*/,
+					TKey /*theKey*/)
+	{	
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TKey > 
+	void
+	_sortEquals(	SkipList< TObject, TModus, TSpec, Deferred > & /*list*/,
+					SkipBaseElement< TObject, TModus, TSpec, Deferred > * elem,
+					TKey theKey)
+	{
+			// security checking
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( elem != NULL, "Tried to sort element that is NULL" )
+			
+		while( key( *_getSucc( *elem ) ) == theKey&& _getCount( *elem ) == 0 )
+			goNext( elem );
+
+		typename Size< SkipList< TObject, TModus, TSpec, Deferred > >::Type i_count = _getCount( *elem );
+		SkipBaseElement< TObject, TModus, TSpec, Deferred > * right_border = _getRight( *elem );
+		SkipBaseElement< TObject, TModus, TSpec, Deferred > * index = elem;
+		goNext( index );
+		SkipBaseElement< TObject, TModus, TSpec, Deferred > * pointer = index;
+		
+		while( pointer != right_border )
+		{
+			if( key( *pointer ) == theKey){
+				_swapBases( *index, *pointer );
+				_setRight( *elem, index );
+				_setCount( *elem, 0 );
+				goNext( elem );
+				goNext( index );
+				--i_count;
+			}
+			goNext( pointer );
+		}
+		if( index != elem ){
+			goPrevious( index );
+			_setCount( *index, i_count );
+			_setRight( *index, right_border );
+		}
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_renewDynConnects( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & /*elem*/,
+						SkipBaseElement< TObject, TModus, TSpec, TStructuring > & /*pivot*/,
+						TSize /*elem_count*/,
+						TSize /*i_count*/ )
+	{
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TSize > inline
+	void
+	_renewDynConnects( SkipBaseElement< TObject, TModus, TSpec, Deferred > & elem,
+						SkipBaseElement< TObject, TModus, TSpec, Deferred > & pivot,
+						TSize elem_count,
+						TSize i_count )
+	{
+		SEQAN_CHECKPOINT
+		_setCount( pivot, elem_count - i_count - 1 );
+		_setCount( elem, i_count );
+	}
+
+
+	template< typename TObject, typename TSpec, typename TSize > inline
+	void
+	_renewDynConnects( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & elem,
+						SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & pivot,
+						TSize elem_count,
+						TSize i_count )
+	{
+		SEQAN_CHECKPOINT
+		_setLeft( *_getRight( elem ), &pivot );
+		_setLeft( pivot, &elem );
+		_setRight( pivot, _getRight( elem ) );
+		_setRight( elem, &pivot );
+		_setCount( pivot, elem_count - i_count - 1 );
+		_setCount( elem, i_count );
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_renewConnects( SkipBaseElement< TObject, TModus, TSpec, TStructuring > & elem,
+					SkipBaseElement< TObject, TModus, TSpec, TStructuring > & pivot,
+					TSize elem_count,
+					TSize i_count )
+	{
+		SEQAN_CHECKPOINT
+		_setCount( pivot, elem_count - i_count - 1 );
+		_setCount( elem, i_count );
+	}
+
+
+	template< typename TObject, typename TSpec, typename TSize > inline
+	void
+	_renewConnects( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & elem,
+					SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > & pivot,
+					TSize elem_count,
+					TSize i_count )
+	{
+		SEQAN_CHECKPOINT
+		_setLeft( *_getRight( elem ), &pivot );
+		_setLeft( pivot, &elem );
+		_setRight( pivot, _getRight( elem ) );
+		_setRight( elem, &pivot );
+		_setCount( pivot, elem_count - i_count - 1 );
+		_setCount( elem, i_count );
+	}
+
+		// quick sort recursive step
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_sortRecursive( SkipList< TObject, TModus, TSpec, TStructuring > & list,
+					SkipBaseElement< TObject, TModus, TSpec, TStructuring > * elem,
+					SkipBaseElement< TObject, TModus, TSpec, TStructuring > * right )
+	{
+		SEQAN_CHECKPOINT
+		if( _getCount( *elem ) != 0 )
+		{
+			SkipBaseElement< TObject, TModus, TSpec, TStructuring > * pivot = _sort( list, elem, right );
+			_sortRecursive( list, elem, pivot );
+			_sortRecursive( list, pivot, right );
+		}	
+	}
+
+
+		// construct the towers for the complete skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	void
+	_buildTowers( SkipList< TObject, TModus, TSpec, TStructuring > & list )
+	{
+		SEQAN_CHECKPOINT
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * buffer = _getBaseStore( list );
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * last = list._rightBorder;
+		SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path = new SkipElement< TObject, TModus, TSpec, TStructuring >*[ _getMaximalSLTowerHeight( length( list ) ) ];
+		search_path[0] = &_getUp( *buffer ); 
+		typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type height, maxHeight = _getMaximalSLTowerHeight( list );
+		typename Key< TObject >::Type buffer_key = key( *buffer );
+		goNext( buffer );
+
+		while( buffer != last )
+		{
+			if( key( *buffer ) != buffer_key )
+			{
+				height = _throwCoin( list, maxHeight );
+				if( height > 0 ){
+					_add( list, buffer, height, search_path );
+					_connectUpdate( list, buffer, height, search_path, list );
+				}
+			}
+			buffer_key= key( *buffer );
+			goNext( buffer  );
+		}
+		
+		for( typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type i = _getCurrentLayer( list ) + 1; i > 0; --i )
+			search_path[ i-1 ] = NULL;
+	}
+
+
+		// complete sorting and building of towers
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_completeBuild( SkipList< TObject, TModus, TSpec, TStructuring > & list )
+	{
+		SEQAN_CHECKPOINT
+		_sortRecursive( list, _getBaseStore( list ), list._rightBorder );
+		_setHeight( *_getBaseStore( list ), 1 );
+		_buildTowers( list );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec > inline
+	void
+	_completeBuild( SkipList< TObject, TModus, TSpec, Deferred > & /*list*/ )
+	{}
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//			searching
+//
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+		// searching from a given element in a tower
+		// deferred skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TKey >
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > *
+	_searchFrom(	SkipList< TObject, TModus, TSpec, TStructuring > & list,
+					SkipElement< TObject, TModus, TSpec, TStructuring > * layer_element, 
+					TKey theKey,
+					SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path,
+					TParam & param )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( theKey < maxValue< typename Key< TObject >::Type >( ), "search theKeyexceeds supremum" ) 
+		SEQAN_CHECK2( theKey > minValue< typename Key< TObject >::Type >( ), "search theKeyexceeds infimum" ) 
+	
+		typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type height = layer_element - &_getUp( *_getDown( *layer_element ) ) + 1;
+		SkipElement< TObject, TModus, TSpec, TStructuring > * temp_right = _getRight( *layer_element );
+		SkipElement< TObject, TModus, TSpec, TStructuring > ** sp = &search_path[ height - 1];
+			// search in higher layers		
+		while( height > 0 ){
+			while( key( *temp_right ) <= theKey){ 
+				layer_element = temp_right;
+				right( temp_right );
+			}
+			--height;
+			*sp = layer_element;
+			--sp;
+			--layer_element;
+			temp_right = _getRight( *layer_element );
+		}
+		++layer_element;
+			// in the lowest layer, searching to the right
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base_element = _getDown( *layer_element );
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * right_base = _getRight( *base_element );
+		while( key( *right_base, param ) < theKey ){
+			base_element = right_base;
+			right( right_base );
+		}
+		if( key( *right_base, param ) == theKey && key( *base_element, param ) != theKey )
+		{
+			base_element = right_base;
+		}
+
+			// if the element found is in correct place and no unsorted elements follow,
+			// it is the correct element. Otherwise search following intervall
+		if( key( *base_element ) < theKey&& _getCount( *base_element ) > 0 )
+		{
+			base_element = _splitAction( list, base_element, theKey, search_path, param );
+		}
+			// handling for multiple elements
+		right_base = _getRight( *base_element );
+		if( key( *right_base, param ) <= theKey&& key( *base_element, param ) < theKey )
+			return right_base;
+		return  base_element;
+	}
+
+		// complete skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TKey >
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > *
+	_searchFrom(	SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/,
+						SkipElement< TObject, TModus, TSpec, TStructuring > * layer_element, 
+						TKey theKey,
+						TParam & param )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( theKey!= maxValue< typename Key< TObject >::Type >( ), "search theKeyexceeds supremum" ) 
+		SEQAN_CHECK2( theKey!= minValue< typename Key< TObject >::Type >( ), "search theKeyexceeds infimum" ) 
+	
+		typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type height = layer_element - &_getUp( *_getDown( *layer_element ) ) + 1;
+
+		SkipElement< TObject, TModus, TSpec, TStructuring > * temp_right = _getRight( *layer_element );
+
+			// search in higher layers		
+		while( height > 0 ){
+			while( key( *temp_right ) <= theKey){ 
+				layer_element = temp_right;
+				right( temp_right );
+			}
+			--height;
+			--layer_element;
+			temp_right = _getRight( *layer_element );
+		}
+		++layer_element;
+			// in the lowest layer, searching to the right
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base_element = _getDown( *layer_element );
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * succ_element = _getSucc( *base_element );
+		while( key( *succ_element, param ) < theKey){
+			base_element = succ_element;
+			goNext( succ_element );
+		}
+		if( key( *succ_element, param ) == theKey&& key( *base_element, param ) != theKey)
+		{
+			return succ_element;
+		}
+		return  base_element;
+	}
+
+
+		// search wrapper functions
+	template< typename TObject, typename TModus, typename TSpec, typename TKey > inline
+	SkipBaseElement< TObject, TModus, TSpec, Deferred > *
+	_specialSearch( SkipList< TObject, TModus, TSpec, Deferred > & list,
+					SkipElement< TObject, TModus, TSpec, Deferred > * layer_element, 
+					TKey theKey)
+	{ 
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, TSpec, Deferred > ** search_path = _getSearchPath( list );
+		return _searchFrom( list, layer_element, theKey, search_path, list );
+	}
+
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > *
+	_specialSearch( SkipList< TObject, TModus, TSpec, TStructuring > & list,
+					SkipElement< TObject, TModus, TSpec, TStructuring > * layer_element, 
+					TKey theKey)
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path = _getSearchPath( list );
+		return _searchFrom( list, layer_element, theKey, search_path, list );
+	}
+
+/**
+.Function.searchElement:
+..summary:Get the leftmost SkipBaseElement element in a SkipList list, where $key(element) <= search_key$
+..cat:SkipList
+..signature:searchElement(list, search_key)
+..remarks:If no Element exists which fullfills the conditions, the returned element is the right(maximal) bounding element.
+..param.list:The list to be searched.
+...type:Class.SkipList
+..param.search_key:The key.
+..include:seqan/chaining.h
+*/
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey > inline
+	typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > >::Type 
+	searchElement(	SkipList< TObject, TModus, TSpec, TStructuring > & list, 
+					TKey theKey )
+	{
+		SEQAN_CHECK( theKey < maxValue< typename Key< TObject >::Type >() )
+		SEQAN_CHECKPOINT
+		if( _getInitialState( list ) )
+		{
+			_completeBuild( list );
+			_noInitialState( list );
+		}
+			// starting in the root, search to the right and downwards
+		return typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > >::Type( list, _specialSearch( list, _getRoot( list ), theKey ) );
+	}
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//		structure building
+//
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*
+.internal._split:
+..summary:Manages sorting status of elements in the base layer 
+..cat:SkipList
+..signature:_split( list, elem, theKey, search_path )
+..param.list:The affected skip list.
+...type:Class.SkipList
+..param.elem:Element in the base layer.
+...type:Class.SkipBaseElement
+..param.key:The search key
+...type:Key type of TObject
+..param.search_path:Buffer of traversed elements
+...type:Ayrray of Pointers to SkipElement
+*/
+
+		// wrapper functions for split (split should only be performed on deferred skip lists)
+	template< typename TObject, typename TModus, typename TSpec, typename TParam, typename TKey > inline
+	SkipBaseElement< TObject, TModus, TSpec, Deferred > *
+	_splitAction( SkipList< TObject, TModus, TSpec, Deferred > & list,
+					SkipBaseElement< TObject, TModus, TSpec, Deferred > * base,
+					TKey theKey, 
+					SkipElement< TObject, TModus, TSpec, Deferred > ** search_path,
+					TParam & param )
+	{
+		return _split( list, base, theKey, search_path, param );
+	}
+
+		// general case (not deferred)
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TKey > inline
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > *
+	_splitAction( SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/,
+					SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base,
+					TKey /*theKey*/, 
+					SkipElement< TObject, TModus, TSpec, TStructuring > ** /*search_path*/,
+					TParam & /*param*/ )
+	{
+		return base;
+	}
+
+		// spec for deferred sl		
+	template< typename TObject, typename TModus, typename TSpec, typename TParam, typename TKey > 
+	SkipBaseElement< TObject, TModus, TSpec, Deferred > * 
+	_split( SkipList< TObject, TModus, TSpec, Deferred > & list,
+			SkipBaseElement< TObject, TModus, TSpec, Deferred > * base,
+			TKey theKey, 
+			SkipElement< TObject, TModus, TSpec, Deferred > ** search_path,
+			TParam & param )
+	{	 
+		SEQAN_CHECKPOINT
+		SkipBaseElement< TObject, TModus, TSpec, Deferred > * elem = base;
+		SEQAN_CHECK2( _getCount( *elem ) > 0, "count is < 0" )
+		SkipBaseElement< TObject, TModus, TSpec, Deferred > * pivot ;
+		typename Key< SkipList< TObject, TModus, TSpec, Deferred > >::Type pivot_key;
+		typename Size< SkipList< TObject, TModus, TSpec, Deferred > >::Type height = 0;
+		typename Size< SkipList< TObject, TModus, TSpec, Deferred > >::Type maxHeight = _getMaximalSLTowerHeight( list );
+		while( _getCount( *elem ) > 0 ){
+
+				// sorting
+			pivot = _sort( list, elem, _getRight( *elem ), param );
+			
+				// helper variables
+			pivot_key= key( *pivot, param );
+
+			if( key( ( *elem ), param ) != pivot_key)
+			{
+				height = _throwCoin( list, maxHeight );
+				if( pivot_key<= theKey){
+					if( height > 0){
+						_add( list, pivot, height, search_path );
+						_connectUpdate( list, pivot, height, search_path, param );
+					}
+					elem = pivot;
+				}
+				else{
+					if( height > 0){
+						_add( list, pivot, height, search_path );
+						_connect( list, pivot, height, search_path, param );
+					}
+				}
+			}
+			else
+				elem = pivot;
+			if( key( *elem, param ) == theKey)
+				break;
+		}
+		if( key( *elem, param ) != key( *base, param ) )
+			return elem;
+		else
+			return base;
+	}
+
+	
+		// reconnect the pointers after building a tower
+		// 
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TSize > inline
+	void 
+	_connectUpdate(	SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/,
+						SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base,
+						TSize height,
+						SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path,
+						TParam & param )
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, TSpec, TStructuring > * buffer = &_getUp( *base );
+		SkipElement< TObject, TModus, TSpec, TStructuring > * tower_top = buffer + height;
+		typename Key< TObject >::Type theKey= key( *base, param );
+		SkipElement< TObject, TModus, TSpec, TStructuring > ** sp = search_path;
+		while( buffer != tower_top ){
+			new( buffer ) SkipElement< TObject, TModus, TSpec, TStructuring >( _getRight( **sp ), base, theKey);
+			_setRight( **sp, buffer );
+			*sp = buffer;
+			++buffer;
+			++sp;
+		}
+	}
+
+		// reconnect the pointers after building a tower
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam, typename TSize > inline
+	void 
+	_connect(	SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/,
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base,
+				TSize height,
+				SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path,
+				TParam & param )
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, TSpec, TStructuring > * buffer = &_getUp( *base );
+		SkipElement< TObject, TModus, TSpec, TStructuring > * tower_top = buffer + height;
+		typename Key< TObject >::Type theKey= key( *base, param );
+		SkipElement< TObject, TModus, TSpec, TStructuring > ** sp = search_path;
+		while( buffer != tower_top ){
+			new( buffer ) SkipElement< TObject, TModus, TSpec, TStructuring >( _getRight( **sp ), base, theKey);
+			_setRight( **sp, buffer );
+			++buffer;
+			++sp;
+		}
+	}
+
+
+		// add a new tower to a base element
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename THeight > inline
+	void 
+	_add(	SkipList< TObject, TModus, TSpec, TStructuring >  & list,
+			SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base,
+			THeight height,
+			SkipElement< TObject, TModus, TSpec, TStructuring > ** search_path )
+	{			
+		SEQAN_CHECKPOINT
+		if( height > _getCurrentLayer( list ) ){
+			for( THeight i = _getCurrentLayer( list ); i < height; ++i )
+				search_path[i] = &( _getLeftSideStore( list )[i] );
+			_setCurrentLayer( list, height );
+		}
+		SkipElement< TObject, TModus, TSpec, TStructuring > * tower;
+		allocate( _getElementAlloc( list ), tower, height );
+		_setUp( *base, *tower );
+		_setHeight( *base, height );
+	}
+
+///////////////////////////////////////////////////////
+//
+//	initialization
+//
+///////////////////////////////////////////////////////
+
+	
+		// setting pointers between elements in base layer
+		
+			// static case
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_setDynConnects( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*pred*/,
+						SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*succ*/ )
+	{
+		// do nothing
+	}
+			
+			// dynamic case
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void
+	_setDynConnects( SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * pred,
+						SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * succ )
+	{
+		SEQAN_CHECKPOINT
+		_setSucc( *pred, succ );
+		_setPred( *succ, pred );
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_setDefConnects( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*left*/,
+						SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*right*/ )
+	{
+		// do nothing
+	}
+
+
+	template< typename TObject, typename TSpec > inline
+	void
+	_setDefConnects( SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * left,
+						SkipBaseElement< TObject, SkipListDynamic, TSpec, Deferred > * right )
+	{
+		SEQAN_CHECKPOINT
+		_setRight( *left, right );
+		_setLeft( *right, left );
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TIter, typename TSize > inline
+	void
+	_initBases( SkipList< TObject, TModus, TSpec, TStructuring > & list, 
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > & firstBase,
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > *& lastBase,
+				TIter & firstData,
+				TIter & lastData,
+				TSize numEntries );
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TIter, typename TSize > inline
+	void
+	_initBases( SkipList< TObject, SkipListStatic, TSpec, TStructuring > & list, 
+				SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > * firstBase,
+				SkipBaseElement< TObject, SkipListStatic, TSpec, TStructuring > *& lastBase,
+				TIter & firstData,
+				TIter & lastData,
+				TSize numEntries )
+	{
+		SEQAN_CHECKPOINT
+		allocate( _getBaseAlloc( list ), firstBase, numEntries + 2 );
+		list._baseStore = firstBase;
+
+		valueConstruct( firstBase, &list.l_border_obj, minValue< typename Key< TObject >::Type >() );
+
+		++firstBase;
+
+		while( firstData != lastData )
+		{
+			valueConstruct( firstBase, &value( firstData ), key( *firstData ) );
+			++firstBase;
+			++firstData;
+		}
+		lastBase = firstBase;
+		valueConstruct( lastBase, &list.r_border_obj, maxValue< typename Key< TObject >::Type >() );
+		firstBase = list._baseStore;
+		_setDefConnects( lastBase, lastBase );
+		_setDefConnects( firstBase, lastBase );
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TIter, typename TSize > inline
+	void
+	_initBases( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, 
+				SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * firstBase,
+				SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& lastBase,
+				TIter & firstData,
+				TIter & lastData,
+				TSize numEntries )
+	{
+		SEQAN_CHECKPOINT
+		allocate( _getBaseAlloc( list ), firstBase, numEntries + 2 );
+		list._baseStore = firstBase;
+
+		valueConstruct( firstBase, &list.l_border_obj, minValue< typename Key< TObject >::Type >() );
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * previous = firstBase;
+		++firstBase;
+
+		while( firstData != lastData )
+		{
+			valueConstruct( firstBase, &value( firstData ), key( *firstData ) );
+			_setDynConnects( previous, firstBase );
+			++firstBase;
+			++previous;
+			++firstData;
+		}
+		lastBase = firstBase;
+		valueConstruct( lastBase, &list.r_border_obj, maxValue< typename Key< TObject >::Type >() );
+		_setDynConnects( previous, lastBase );
+		_setSucc( *lastBase, lastBase );
+		firstBase = list._baseStore;
+		_setDefConnects( lastBase, lastBase );
+		_setDefConnects( firstBase, lastBase );
+	}
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void
+	_initSL(	SkipList< TObject, TModus, TSpec, TStructuring > & list,
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > * first_base,
+				SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*last_base*/,
+				TSize numEntries )
+	{
+			// allocate space for base elements and base layer
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, TModus, TSpec, TStructuring  > * _rightBorder;
+		allocate( _getElementAlloc( list ), _rightBorder, 2 );
+		arrayConstruct( _rightBorder, _rightBorder + 2 );
+		allocate( _getElementAlloc( list ), list._leftSideStore, _getMaximalSLTowerHeight( numEntries ) );
+				// construct bording elements
+				// right side
+		_setDown( *_rightBorder, &list._baseStore[ numEntries + 1 ] );
+		_setHeight( list._baseStore[ numEntries + 1 ], 1 );
+		_setRight( * _rightBorder, _rightBorder );
+		setKey( *_rightBorder, maxValue< typename Key< TObject >::Type >() );
+		_setUp( list._baseStore[ numEntries + 1 ], *_rightBorder );
+		
+				// ... left side
+		_setDown( *list._leftSideStore, first_base );
+		_setHeight( *first_base, 1 );
+		_setUp( *first_base, *list._leftSideStore );
+
+		typename Key< TObject >::Type left_border_key= key( list.l_border_obj );
+		SkipElement< TObject, TModus, TSpec, TStructuring > * buffer = list._leftSideStore;
+		for( typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type i = 0; i < _getMaximalSLTowerHeight( numEntries ); ++i )
+		{
+			new( buffer ) SkipElement< TObject, TModus, TSpec, TStructuring >( _rightBorder, list._baseStore, left_border_key);
+			++buffer;
+		}
+		
+		_setCount( *first_base, numEntries );
+
+	}
+	
+
+} // namespace seqan
+#endif //SKIP_LIST_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/chaining/skip_list_dynamic.h b/src/SeqAn-1.3/seqan/chaining/skip_list_dynamic.h
new file mode 100644
index 0000000..daacefa
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/skip_list_dynamic.h
@@ -0,0 +1,468 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+/*	2006 Hendrik Woehrle
+*
+*	SkipListDynamic Specialization of the Skip List
+*
+*	Contains the functions for the SkipListDynamic specialization of the Skip List
+*
+*/
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+
+#ifndef SEQAN_HEADER_SKIP_LIST_DYNAMIC_H
+#define SEQAN_HEADER_SKIP_LIST_DYNAMIC_H
+
+
+namespace seqan
+{
+
+	
+/////////////////////////////////////////////////////////////////////////////////
+//
+//								 struct SkipList
+//
+/////////////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////// SkipListDynamic< True, TSpec >  specialization ////////////////////////
+
+
+		// Function to renew the left bording tower.
+		// If the number of elements in the list increases, the _getMaximalSLTowerHeight 
+		// value might increase as well.
+		// Therefore, the height of the left bording tower must be increased.
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > 
+	void
+	_renewLeftTower( SkipList< TObject, TModus, TSpec, TStructuring > & list )
+	{
+		SEQAN_CHECKPOINT
+			// allocate the new tower
+		SkipElement< TObject, TModus, TSpec, TStructuring > * new_left;
+		typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type height = _getMaximalSLTowerHeight( length( list ) );
+		allocate( _getElementAlloc( list ), new_left, height + 1 );
+		
+			// construct tower elements, adjust connections and delete old tower elements 
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base = list._baseStore;
+		SkipElement< TObject, TModus, TSpec, TStructuring > * buffer = &_getUp( *base );
+		SkipElement< TObject, TModus, TSpec, TStructuring > * tower_top = buffer + height;
+		typename Key< TObject >::Type theKey= key( *base );
+		while( buffer != tower_top )
+		{
+			new( new_left ) SkipElement< TObject, TModus, TSpec, TStructuring >( _getRight( *buffer ), base, theKey );
+			valueDestruct( buffer );
+			++buffer;
+			++new_left;
+		}
+		new( new_left ) SkipElement< TObject, TModus, TSpec, TStructuring >( &_getUp( *list._rightBorder ), base, theKey );
+		deallocate( _getElementAlloc( list ), &_getUp( *base ), height );
+			
+			//	adjust values of the skip list and base layer
+		new_left -= height;
+		list._leftSideStore = new_left;
+		_setUp( *base, *( new_left ) );
+		_renewSearchPath( list, height, height+1 );
+	}
+
+		// calculate the count values of the deferred skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	_setDeferredCounts( SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/,
+						SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*preceding_elem*/,
+						SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*new_elem*/ )
+	{
+		// do nothing (non-deferred sl's don't have count values)
+	}
+
+	template< typename TObject, typename TModus, typename TSpec > inline
+	void
+	_setDeferredCounts( SkipList< TObject, TModus, TSpec, Deferred > & /*list*/,
+						SkipBaseElement< TObject, TModus, TSpec, Deferred > * preceding_elem,
+						SkipBaseElement< TObject, TModus, TSpec, Deferred > * new_elem )
+	{
+		SEQAN_CHECKPOINT
+			_setCount( *new_elem, _getCount( *preceding_elem ) );
+			_setCount( *preceding_elem, 0 );
+	}
+
+	
+/**
+.Function.insert:
+..summary:Inserts an object into a SkipList.
+..cat:SkipList
+..signature:insert(list, object)
+..param.list:The list.
+...type:Class.SkipList
+..param.object:The object.
+...remarks:The TObject parameter of the SkipList.
+..remarks:If the list is in a initial state, i.e. no search operation has been performed since the time of construction, the objects in the list are in an unsorted state.
+..The object is therefore inserted at the end of the list. After the first search operation, the objects are sorted. Pbjects from following insert operations will then be inserted at the correct place. 
+..include:seqan/chaining.h
+*/
+		// two cases:
+			// 1. list is empty apart from bording element or is not sorted 
+			//	-> insert new element at the end 
+			//	-> _insertBack is used
+			// 2. list contains elements 
+			//	-> insert at correct place
+			//	-> _insertInPlace is used
+
+		// static spec -> do nothing
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void 
+	insert( SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/, 
+			TObject & /*obj*/ )
+	{
+		SEQAN_ASSERT2( false, "SkipListStatic Skip Lists don't provide insertion operations" )
+	}
+
+
+		// dynamic case (wrapper for additional parameters)
+	template< typename TObject, typename TSpec, typename TStructuring > inline
+	void 
+	insert( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list,
+			TObject & obj )
+	{
+		SEQAN_CHECKPOINT
+		insert( list, obj, list );
+	}
+
+
+		// insertion at the end of the skip list
+	template< typename TObject, typename TSpec, typename TStructuring, typename TParam >
+	void 
+	_insertBack( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list,
+				TObject & obj,
+				TParam & /*param*/ )
+	{
+		SEQAN_CHECKPOINT
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * last_elem = _getPred( *list._rightBorder );
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * new_elem;
+		allocate( _getBaseAlloc( list ), new_elem, 1 );
+		valueConstruct( new_elem, &obj, key( obj ) );
+			// inserting values of member variables
+		_setPred( *new_elem, last_elem );
+		_setSucc( *last_elem, new_elem );
+		_setPred( *list._rightBorder, new_elem );
+		_setSucc( *new_elem, list._rightBorder );
+		_setCount( *_getBaseStore( list ), _getCount( *_getBaseStore( list ) ) +1 );
+		typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type list_size = length( list );
+		if( _getMaximalSLTowerHeight( list_size ) < _getMaximalSLTowerHeight( list_size + 1 ) )
+			_renewLeftTower( list );
+		_setLength( list, list_size + 1 );
+	}
+
+		// insertion at the correct place of the skip list
+	template< typename TObject, typename TSpec, typename TStructuring, typename TParam >
+	void 
+	_insertInPlace( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list,
+				TObject & obj,
+				TParam & param )
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > ** search_path = _getSearchPath( list );
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * preceding_elem = _searchFrom( list, _getRoot( list ), key( obj ), search_path, list );
+		
+		_sortEquals( list, preceding_elem );
+		while( key( *_getSucc( *preceding_elem ), param ) < key( obj ) )
+			goNext( preceding_elem );
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * new_elem;
+		allocate( _getBaseAlloc( list ), new_elem, 1 );
+		valueConstruct( new_elem, &obj, key( obj ) );
+
+			// inserting values of member variables
+		_setPred( *new_elem, preceding_elem );
+		_setSucc( *new_elem, _getSucc( *preceding_elem ) );
+		_setSucc( *preceding_elem, new_elem );
+		_setPred( *_getSucc( *new_elem ), new_elem );
+		
+		_renewDynConnects( *preceding_elem, *new_elem, _getCount( *preceding_elem ) + 1, static_cast< typename Size< SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > >::Type >( 0 ) );
+
+		typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type height = _throwCoin( list, _getMaximalSLTowerHeight( list ) );
+		if( key( *preceding_elem, param ) != key( *new_elem, param ) && height > 0 )
+		{
+			_add( list, new_elem, height, search_path );
+			_connect( list, new_elem, height, search_path, param );
+		}
+		if( _getMaximalSLTowerHeight( length( list ) ) < _getMaximalSLTowerHeight( length( list ) + 1 ) )
+			_renewLeftTower( list );
+		_setLength( list, length( list ) + 1 );
+	}
+
+		// the insertion function itself
+	template< typename TObject, typename TSpec, typename TStructuring, typename TParam > inline
+	void 
+	insert( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list,
+			TObject & obj,
+			TParam & param )
+	{
+		SEQAN_CHECKPOINT
+			// case 1
+		if( _getInitialState( list ) )
+		{		
+			_insertBack( list, obj, param );
+		}
+		else 
+		{	// case 2
+			_insertInPlace( list, obj, param );
+		}
+	}
+
+	
+
+/**
+.Function.erase:
+..summary:Deletes object from a SkipList.
+..cat:SkipList
+..signature:erase(list, iterator)
+..signature:erase(list, object)
+..signature:erase(list, theKey)
+..param.list:The list containing the element.
+...type:Class.SkipList
+..param.iterator:Iterator to an entry, that should be deleted.
+...concept:Concept.Iterator
+..param.object:An object in the list, that should be deleted.
+..param.key:A key.
+...type:A key. All entries with the given theKeywill be deleted.
+..remarks.text:Returns true, if at least one element is deleted, false otherwise.
+..include:seqan/chaining.h
+*/
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TParam >
+	SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *
+	_deleteSearchFrom(	SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list,
+						typename Key< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type theKey,
+						SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > ** search_path,
+						TParam & param )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( theKey != maxValue< typename Key< TObject >::Type >( ), "search key is supremum" ) 
+		SEQAN_CHECK2( theKey != minValue< typename Key< TObject >::Type >( ), "search key is infimum" ) 
+		
+		if( _getInitialState( list ) )
+		{
+			_completeBuild( list );
+			_noInitialState( list );
+		}
+		
+		SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > * layer_element = _getRoot( list );
+		typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type height = layer_element - &_getUp( *_getDown( *layer_element ) ) + 1;
+		SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > * temp_right = _getRight( *layer_element );
+		SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > ** sp = &search_path[ height - 1];
+			// search in higher layers		
+		while( height > 0 ){
+			while( key( *temp_right ) < theKey ){ 
+				layer_element = temp_right;
+				right( temp_right );
+			}
+			--height;
+			*sp = layer_element;
+			--sp;
+			--layer_element;
+			temp_right = _getRight( *layer_element );
+		}
+		++layer_element;
+			// in the lowest layer, searching to the right
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * base_element = _getDown( *layer_element );
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * right_base = _getRight( *base_element );
+		while( key( *right_base, param ) < theKey ){
+			base_element = right_base;
+			right( right_base );
+		}
+		if( key( *right_base, param ) == theKey && key( *base_element, param ) != theKey )
+		{
+			base_element = right_base;
+		}
+
+			// if the element found is in correct place and no unsorted elements follow,
+			// it is the correct element. Otherwise search following intervall
+		if( _getCount( *base_element ) > 0 )
+		{
+			base_element = _splitAction( list, base_element, theKey, search_path, param );
+		}
+			// handling for multiple elements
+		right_base = _getRight( *base_element );
+		if( key( *right_base, param ) <= theKey && key( *base_element, param ) < theKey )
+			return right_base;
+		return  base_element;
+	}
+
+		// deletes the tower of skip elements that is related to a skip base element and 
+		// adjusts the connections of the elements in the search path
+	template< typename TObject, typename TSpec, typename TStructuring >
+	void
+	_deleteTower( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list,
+					SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > ** search_path, 
+					SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * base, 
+					typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type height )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK( &_getUp( *base ) != NULL )
+		SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > * buffer = &_getUp( *base );
+		SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > * top = buffer + height;
+		SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > ** sp = search_path;
+			// adjusting pointers of the elements in the search path
+		while( buffer != top )
+		{
+			_setRight( **sp, _getRight( *buffer ) );
+			valueDestruct( buffer );
+			++sp;
+			++buffer;
+		}
+			// free memory
+		deallocate( _getElementAlloc( list ), &_getUp( *base ), height );
+	}
+
+		// deletes the base element in a skip list and adjusts the
+		// connections between surrounding elements
+	template< typename TObject, typename TSpec, typename TStructuring >
+	void
+	_deleteBase( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list,
+					SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > *& base )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_ASSERT2( base != list._rightBorder, "Can't delete right border" )
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * base_buffer1 = _getPred( *base );
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * base_buffer2 = _getSucc( *base );
+		_setSucc( *base_buffer1, base_buffer2 );
+		_setPred( *base_buffer2, base_buffer1 );
+		_setDefConnects( _getLeft( *base ), _getRight( *base ) );
+		valueDestruct( base );
+		deallocate( _getBaseAlloc( list ), base, 1 );
+		_setLength( list, length( list ) - 1 );
+		base = base_buffer1;
+	}
+
+	
+
+////////////////////////////////////////////////////////////////////////////////////////////
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TKey >
+	bool 
+	erase(	SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/, 
+			TKey /*theKey*/)
+	{
+		SEQAN_ASSERT2( false, "No deletion in static lists")
+		return false;
+	}
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TKey >
+	bool 
+	erase(	SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, 
+			TKey theKey )
+	{
+		SEQAN_CHECKPOINT
+		SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > ** search_path = _getSearchPath( list );
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * buffer = _deleteSearchFrom( list, theKey, search_path, list );
+		if( key( *buffer ) != theKey )
+			return false;
+		if( _getHeight( *buffer ) )
+			_deleteTower( list, search_path, buffer, _getHeight( *buffer ) );
+		_sortEquals( list, buffer, theKey );
+		while( key( *buffer ) == theKey )
+		{
+			_deleteBase( list, buffer );
+			goNext( buffer );
+		}
+		return true;
+	}
+	
+	// deleting an element with a given object
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	bool 
+	erase(	SkipList< TObject, TModus, TSpec, TStructuring > & /*list*/, 
+			TObject & /*obj*/ )
+	{
+		SEQAN_ASSERT2( false, "No deletion in static lists")
+		return false;
+	}
+
+
+		// deleting an element with a given object
+	template< typename TObject, typename TSpec, typename TStructuring >
+	bool 
+	erase(	SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & list, 
+			TObject & obj )
+	{
+		SEQAN_CHECKPOINT
+		if( key( obj ) == minValue< typename Key< TObject >::Type >() || key( obj ) == maxValue< typename Key< TObject >::Type >() )
+			return false;
+		SkipElement< TObject, SkipListDynamic, TSpec, TStructuring > ** search_path = _getSearchPath( list );
+		SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * buffer = _deleteSearchFrom( list, key( obj ), search_path, list );
+		if( key( *buffer, list ) != key( obj ) )
+			return false;
+		_sortEquals( list, buffer );
+
+		while( getObject( buffer ) != &obj && key( *buffer ) == key( obj ) )
+			goNext( buffer );
+
+		if( &obj == getObject( buffer ) && buffer != list._baseStore )
+		{
+			typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type height = _getHeight( *buffer );
+			if( height > 0 )
+			{ 
+				if( key( *_getSucc( *buffer ) ) == key( *buffer ) ){
+					SkipBaseElement< TObject, SkipListDynamic, TSpec, TStructuring > * succ_base = _getSucc( *buffer );
+					_swapBases( *buffer, *succ_base );
+					_deleteBase( list, succ_base );
+				}
+				else{
+					_deleteTower( list, search_path, buffer, height );
+					_deleteBase( list, buffer );
+				}
+			}
+			else{
+				_deleteBase( list, buffer );
+			}
+			return true;
+		}
+		
+			// searching rightmost element that may have the given object
+		while( key( *buffer, list ) == key( obj ) )
+		{
+			goNext( buffer );
+		}
+		if( getObject( buffer ) == &obj ){
+			_deleteBase( list, buffer );
+			return true;
+		}
+		return false;
+	}
+
+	
+} // namespace seqan
+
+
+#endif // SKIP_LIST_DYNAMIC_H_
diff --git a/src/SeqAn-1.3/seqan/chaining/skip_list_impl.h b/src/SeqAn-1.3/seqan/chaining/skip_list_impl.h
new file mode 100644
index 0000000..022378d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/skip_list_impl.h
@@ -0,0 +1,701 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+/*	2006 Hendrik Woehrle
+*
+*	Contains struct SkipList< TObject, TModus, TSpec, TStructuring > implementation
+*
+*/
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+
+#ifndef SEQAN_HEADER_SKIP_LIST_STATIC_H
+#define SEQAN_HEADER_SKIP_LIST_STATIC_H
+
+namespace seqan
+{
+
+/**
+.Class.SkipList:
+..cat:SkipList
+..summary:A SkipList is a randomized alternative for rooted trees. Offers fast searching, insertion and deletion operations
+objects. Saved objects are sorted with respect to their "key"-attribute.
+..signature:SkipList< TObject, [ TModus, TSpec, TStructuring] >
+..param.TObject:Type of stored objects.
+..param.TModus:Modus of operation of a SkipList. A SkipList can either be dynamic or static. 
+SkipListDynamic Skip Lists admit insertion and deletion operations of elements, but the construction time is higher 
+compared to a static SkipList. Default is SkipListDynamic.
+..param.TSpec:Specialization of the SkipList.
+..param.TStructuring:Parameter to specify whether the SkipList uses Deferred Data Structuring or not.
+..remarks:The object given to the SkipList should offer the following functions:
+..remarks:$key( obj )$: returns the key of the object.
+..remarks:$setKey( obj, k )$: set the key of the object to k.
+..remarks:In contrast to STL-like containers, the objects are not cloned by the SkipList. It only supports searching operations on a set of objects. This set must be handled by the user.
+..include:seqan/chaining.h
+*/
+	
+		// no append operations on skip lists
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline 
+	void
+	append( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/ ,
+			TParam & /*param*/)
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam1, typename TParam2 > inline 
+	void
+	append( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/ ,
+			TParam1 & /*param1*/,
+			TParam2 & /*param2*/ )
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline 
+	void
+	appendValue( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/ ,
+					TParam & /*param*/)
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam1, typename TParam2 > inline 
+	void
+	appendValue( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/ ,
+				TParam1 & /*param1*/,
+				TParam2 & /*param2*/ )
+	{
+		// do nothing
+	}
+
+		// no assign operations on skip lists
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline 
+	void
+	assign( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/,
+			TParam & /*param*/)
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam1, typename TParam2 > inline 
+	void
+	assign( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/,
+			TParam1 & /*param1*/,
+			TParam2 & /*param2*/ )
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam > inline 
+	void
+	assignValue( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/ ,
+					TParam & /*param*/)
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TParam1, typename TParam2 > inline 
+	void
+	assignValue( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/ ,
+				TParam1 & /*param1*/,
+				TParam2 & /*param2*/ )
+	{
+		// do nothing
+	}
+
+
+	// get the beginning of the skiplist
+		// i.e. the left bording element with score - infinity
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > , Standard >::Type 
+	_beginDefault( SkipList< TObject, TModus, TSpec, TStructuring > & me,
+				   Standard)
+	{
+	SEQAN_CHECKPOINT
+		return _getSucc( *me._baseStore );
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > , Standard >::Type 
+	_beginDefault( SkipList< TObject, TModus, TSpec, TStructuring > const & me,
+				   Standard)
+	{
+	SEQAN_CHECKPOINT
+		return _getSucc( *me._baseStore );
+	}
+
+
+		// capacity
+		// static case: the size of the list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type
+	capacity( SkipList< TObject, TModus, TSpec, TStructuring > & me)
+	{
+	SEQAN_CHECKPOINT
+		return length(me);
+	}
+
+		// dynamic case: the list can hold an infinite number of objevts
+	template< typename TObject, typename TSpec, typename TStructuring > inline 
+	typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type
+	capacity( SkipList< TObject, SkipListDynamic, TSpec, TStructuring > & /*me*/)
+	{
+	SEQAN_CHECKPOINT
+		return maxValue< typename Size< SkipList< TObject, SkipListDynamic, TSpec, TStructuring > >::Type >();
+	}
+
+
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring >, Standard>::Type 
+	_endDefault( SkipList< TObject, TModus, TSpec, TStructuring > & me,
+					Standard)
+	{
+	SEQAN_CHECKPOINT
+		return _getRightBorder( me );
+	}
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	inline typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > const, Standard>::Type 
+	_endDefault( SkipList< TObject, TModus, TSpec, TStructuring > const & me,
+					Standard)
+	{
+	SEQAN_CHECKPOINT
+		return _getRightBorder( me );
+	}
+
+		// the length == size
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type
+	length( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+	SEQAN_CHECKPOINT
+		return me._numOfElements;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline
+	void 
+	_setLength( SkipList< TObject, TModus, TSpec, TStructuring > & me,
+				TSize num_elems )
+	{
+		SEQAN_CHECKPOINT
+		me._numOfElements = num_elems;
+	}
+
+		// no moving objects in skip lists
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos >
+	void
+	moveValue( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/, 
+				TPos & /*pos*/)
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos >
+	void
+	moveValue( SkipList< TObject, TModus, TSpec, TStructuring > const & /*me*/, 
+				TPos & /*pos*/)
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos >
+	void
+	moveValue( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/, 
+				TPos const & /*pos*/)
+	{
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos >
+	void
+	moveValue( SkipList< TObject, TModus, TSpec, TStructuring > const & /*me*/, 
+				TPos const & /*pos*/)
+	{
+		// do nothing
+	}
+
+
+			// no replacements in skip lists
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos >
+	void
+	replace( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/, 
+				TPos & /*pos*/)
+	{
+	SEQAN_CHECKPOINT
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos >
+	void
+	replace( SkipList< TObject, TModus, TSpec, TStructuring >  const & /*me*/, 
+				TPos & /*pos*/)
+	{
+	SEQAN_CHECKPOINT
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos >
+	void
+	replace( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/, 
+				TPos const & /*pos*/)
+	{
+	SEQAN_CHECKPOINT
+		// do nothing
+	}
+
+
+		// the value at a given position
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TPos>
+	inline typename Reference< SkipList< TObject, TModus, TSpec, TStructuring > >::Type
+	value( SkipList< TObject, TModus, TSpec, TStructuring > & me, 
+			TPos pos)
+	{
+	SEQAN_CHECKPOINT
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base = me._baseStore;
+		goNext( base );
+		while( pos > 0 )
+		{
+			goNext( base );
+			--pos;
+		}
+		return value( *base );
+	}
+
+
+	template< typename TObject, typename TSpec, typename TStructuring, typename TPos>
+	inline typename Reference< SkipList< TObject, SkipListStatic, TSpec, TStructuring > >::Type
+	value( SkipList< TObject, SkipListStatic, TSpec, TStructuring > & me, 
+			TPos pos)
+	{
+	SEQAN_CHECKPOINT
+		return value( me._baseStore + pos + 1 );
+	} 
+
+///////////////////////////////////////////////////////
+//
+//	member accessors (internal)
+//
+///////////////////////////////////////////////////////
+	
+
+		// get root node
+		// i.e. the skip element in left bording tower in the current layer
+		// current layer == 0 at the beginning
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	SkipElement< TObject, TModus, TSpec, TStructuring > * 
+	_getRoot( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getLeftSideStore( me )+ _getCurrentLayer( me ) - 1;
+	}
+
+		// get the element allocator of a skiplist
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	Allocator< ClassPool< SkipElement< TObject, TModus, TSpec, TStructuring >, Limited, SimpleAllocator > > & 
+	_getElementAlloc( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_ASSERT2( &me._elementAlloc != NULL, "Allocator for layer elements not initialized" )
+		return me._elementAlloc;
+	}
+
+		// get the base element allocator of skiplist
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	Allocator< ClassPool< SkipBaseElement< TObject, TModus, TSpec, TStructuring >, Unlimited, SimpleAllocator> > & 
+	_getBaseAlloc( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_ASSERT2( &me._baseAlloc != NULL, "Allocator for base elements not initialized" )
+		return me._baseAlloc;
+	}
+
+		
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	void 
+	_setNext(	SkipList< TObject, TModus, TSpec, TStructuring > & me, 
+				SkipList< TObject, TModus, TSpec, TStructuring > * next )
+	{
+	SEQAN_CHECKPOINT
+		me._next = next;
+	}
+
+
+		//get the right bording element
+		//i.e. the lement with theKey== + infinity
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline 
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * 
+	_getRightBorder( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_ASSERT2( me._rightBorder != NULL, "Right border not created" )
+		return me._rightBorder;
+	}
+
+		// get the left side store of the skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipElement< TObject, TModus, TSpec, TStructuring > * 
+	_getLeftSideStore( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_ASSERT2( me._leftSideStore != NULL, "_leftSideStore not initialized" );
+		return me._leftSideStore;
+	}
+
+		// get the base layer of the skip list
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > *
+	_getBaseStore( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_ASSERT2( me._baseStore != NULL, "_baseStore not initialized" );
+		return me._baseStore;
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	SkipElement< TObject, TModus, TSpec, TStructuring > ** 
+	_getSearchPath( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getSearchPath( me._sp );
+	}
+
+
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type 
+	_getCurrentLayer( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SEQAN_CHECKPOINT
+		return _getHeight( *me._baseStore );
+	}
+
+		// renew current layer
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TSize > inline 
+	void 
+	_setCurrentLayer(	SkipList< TObject, TModus, TSpec, TStructuring > & me,
+						TSize layer )
+	{
+		SEQAN_CHECKPOINT
+		SEQAN_CHECK2( layer > _getCurrentLayer( me ), "Setting smaller value for _currentLayer" )
+		_setHeight( *me._baseStore, layer );
+	}
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//
+//								 struct SkipList
+//
+/////////////////////////////////////////////////////////////////////////////////
+
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct SkipList
+{	
+	// private members:
+		// container for elements in the lowest layer
+	union{
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _baseStore;
+		SkipList< TObject, TModus, TSpec, TStructuring > * _next;
+	};
+		// container for elements on the left side
+		// search operations start from this bording elements
+	SkipElement< TObject, TModus, TSpec, TStructuring > * _leftSideStore;
+
+		// number of elements in the list
+	typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type _numOfElements;
+
+		// pool allocators
+	Allocator< ClassPool< SkipBaseElement< TObject, TModus, TSpec, TStructuring >, Unlimited > > _baseAlloc;
+	Allocator< ClassPool< SkipElement< TObject, TModus, TSpec, TStructuring >, Limited > > _elementAlloc;	
+	
+		// search path
+	SearchPath_< TObject, TModus, TSpec, TStructuring > _sp;
+		
+		// border element for the right side
+	SkipBaseElement< TObject, TModus, TSpec, TStructuring > * _rightBorder;
+
+		// border objects
+	TObject l_border_obj;
+	TObject r_border_obj;
+
+		// 
+	bool _initialState;
+	
+//*************************************** internal help functions: ************************************************
+
+
+private:
+
+	SkipList & operator=( const SkipList & /*old*/ )
+	{}
+
+	SkipList( const SkipList & old )
+		: _numOfElements( length( old ) ) // bording elements are not included in Entries array => numOfElements + 2 elements in base layer	
+		, _baseAlloc( _numOfElements + 2 )	// guessing needed space: a basic layer must be possible
+		, _elementAlloc( _numOfElements )
+		, _sp( _getMaximalSLTowerHeight( _numOfElements ) )
+		, _initialState( true )
+	{
+			// construct bording elements
+		setKey( l_border_obj, minValue< typename Key< TObject >::Type >() );
+		setKey( r_border_obj, maxValue< typename Key< TObject >::Type >() );
+
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base_right;
+		
+		_initBases( *this, _baseStore, base_right, begin( old ), end( old ), _numOfElements ); 
+
+		_initSL( *this, _baseStore, base_right, _numOfElements );
+		_rightBorder = base_right;
+	}
+
+public:
+				
+	SkipList(void)
+		: _numOfElements( 0 ) // bording elements are not included in Entries array => numOfElements + 2 elements in base layer	
+		, _baseAlloc( 100  )	// guessing needed space: a basic layer must be possible
+		, _elementAlloc( 100 )
+		, _sp( 10 )
+		, _initialState( true )
+	{
+		mtRandInit();
+
+			// construct bording elements
+		setKey( l_border_obj, minValue< typename Key< TObject >::Type >() );
+		setKey( r_border_obj, maxValue< typename Key< TObject >::Type >() );
+			
+	}
+
+	template< typename TContainer >
+	SkipList( TContainer & cont )
+		: _numOfElements( length( cont ) ) // bording elements are not included in Entries array => numOfElements + 2 elements in base layer	
+		, _baseAlloc( _numOfElements + 2 )	// guessing needed space: a basic layer must be possible
+		, _elementAlloc( _numOfElements )
+		, _sp( _getMaximalSLTowerHeight( _numOfElements ) )
+		, _initialState( true )
+	{
+		mtRandInit();
+
+			// construct bording elements
+		setKey( l_border_obj, minValue< typename Key< TObject >::Type >() );
+		setKey( r_border_obj, maxValue< typename Key< TObject >::Type >() );
+
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base_right;
+		
+		_initBases( *this, _baseStore, base_right, begin( cont ), end( cont ), _numOfElements ); 
+
+		_initSL( *this, _baseStore, base_right, _numOfElements );
+		_rightBorder = base_right;
+	}
+
+		// Constructor
+		// Needs a range, defined by to iterators
+
+		// TODO: f�r allgmeinen iterator verf�gbar machen
+	template< typename TIterator >
+	SkipList( TIterator beg, TIterator end )
+		: _numOfElements( end - beg ) // bording elements are not included in Entries array => numOfElements + 2 elements in base layer	
+		, _baseAlloc( _numOfElements + 2 )	// guessing needed space: a basic layer must be possible
+		, _elementAlloc( _numOfElements )
+		, _sp( _getMaximalSLTowerHeight( _numOfElements ) )
+		, _initialState( true )
+	{			
+		mtRandInit();
+
+		setKey( l_border_obj, minValue< typename Key< TObject >::Type >() );
+		setKey( r_border_obj, maxValue< typename Key< TObject >::Type >() );
+
+			// construct bording elements
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * base_right;
+
+		_initBases( *this, _baseStore, base_right, beg, end, _numOfElements ); 
+
+		_initSL( *this, _baseStore, base_right, _numOfElements );
+		_rightBorder = base_right;
+	}
+	
+
+	~SkipList(void)
+	{
+		_clearSearchPath( this->_sp, _getMaximalSLTowerHeight( _numOfElements ) );
+	}
+
+	// Debug print methods
+private:
+
+	template< typename TSize1, typename TSize2 > friend
+	void 
+	printLayer(	SkipList< TObject, TModus, TSpec, TStructuring > & me,
+				TSize1 layer,
+				TSize2 column )
+	{
+		if( layer == 0 )
+		{
+			for( typename seqan::Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type j = 0; j < 11; ++j )
+			{
+				std::cout<< "______";
+			}
+			std::cout<<std::endl;
+			typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > >::Type temp = begin( me );
+			goPrevious( temp );
+			goFurther( temp, column );
+			typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > >::Type tempEnd = temp;
+			goFurther( tempEnd, 11 );
+			while( temp != end( me ) && temp != tempEnd )
+			{
+				std::cout.width(7);
+				if( key( temp ) == minValue< typename Key< TObject >::Type >( ) )
+					std::cout << std::left << "L";
+				else
+					std::cout << std::left << key( temp );
+				goNext( temp );
+			}
+			//std::cout<<std::endl;
+			//printCounts( me );
+			//std::cout<<std::endl;
+			//printSorting( me );
+			//std::cout<<std::endl;
+			//printHeights( me );
+			//std::cout<<std::endl;
+			//printValues( me );
+		}
+		else if( layer <= _getCurrentLayer( me ) && !_getInitialState( me ) )
+		{
+			typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > >::Type temp = begin( me );
+			goPrevious( temp );
+			goFurther( temp, column );
+			typename Iterator< SkipList< TObject, TModus, TSpec, TStructuring > >::Type tempEnd = temp;
+			goFurther( tempEnd, 11 );
+			while( temp != end( me ) && temp != tempEnd )
+			{
+				if( _getHeight( *hostIterator( temp ) ) >= layer )
+				{
+					if( _getRight( *( &_getUp( *hostIterator( temp ) ) + layer - 1) ) )
+					{
+						std::stringstream s;
+						if( key( temp ) == minValue< typename Key< TObject >::Type >( ) )
+							s << std::left << "L";
+						else
+							s << key( temp );
+						s << ">";
+						std::cout.width(7);
+						std::cout << std::left << s.str();
+					}
+					else
+						dump( *( &_getUp( *hostIterator( temp ) ) + layer - 1 ) );
+				}
+				else 
+				{
+					std::cout.width(7);
+					std::cout << " ";
+				}
+				goNext( temp );
+			} 
+		}
+		std::cout<<std::endl;
+	}
+
+	friend
+	void 
+	dump( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		int column = 0;
+
+		while( column < length( me ) )
+		{
+			typename seqan::Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type j = _getMaximalSLTowerHeight( me._numOfElements );
+			while( j > 0 ){
+				printLayer( me, --j, column );
+			}
+			std::cout<< std::endl;
+			column += 14;
+		}
+	}
+
+	friend
+	void 
+	printCounts( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring > * temp = &me._baseStore[0];
+		for( typename seqan::Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type i = 0; i < me._numOfElements + 1; ++i ){
+			std::cout.width(5);
+			std::cout << std::left << _getCount( *temp );
+			goNext( temp );
+		}
+	}
+
+	friend
+	void 
+	printSorting( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring >* temp = &me._baseStore[0];
+		for( typename seqan::Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type i = 0; i < me._numOfElements + 1; ++i ){
+			std::cout.width(5);
+			if( _getRight( *temp ) != NULL )
+				std::cout << std::left << "x";
+			else
+				std::cout << std::left << "o";
+			goNext( temp );
+		}
+	}
+
+	friend
+	void
+	printHeights( SkipList< TObject, TModus, TSpec, TStructuring > & me )
+	{
+		SkipBaseElement< TObject, TModus, TSpec, TStructuring >* temp = &me._baseStore[0];
+		for( typename seqan::Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type i = 0; i < me._numOfElements + 1; ++i ){
+			std::cout.width(5);
+			std::cout << std::left << _getHeight( *temp );
+			goNext( temp );
+		}
+	}
+
+	friend
+	void
+	printValues( SkipList< TObject, TModus, TSpec, TStructuring > & /*me*/ )
+	{
+		//SkipBaseElement< TObject, TModus, TSpec, TStructuring >* temp = &me._baseStore[0];
+		//for( typename seqan::Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type i = 0; i < me._numOfElements + 1; ++i ){
+		//	std::cout.width(5);
+		//	std::cout << std::left << getValue( getObject( *temp ) );
+		//	temp = _getSucc( *temp );
+		//}
+	}
+	
+
+}; // struct SkipList
+
+} // namespace seqan
+#endif //SKIP_LIST_STATIC_H_
+
diff --git a/src/SeqAn-1.3/seqan/chaining/skip_list_iterator.h b/src/SeqAn-1.3/seqan/chaining/skip_list_iterator.h
new file mode 100644
index 0000000..b122b8d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/skip_list_iterator.h
@@ -0,0 +1,279 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+/*	2006 Hendrik Woehrle
+*
+*	Skip List Iterator
+*
+*/
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+
+#ifndef SEQAN_HEADER_SKIP_LIST_ITER_H
+#define SEQAN_HEADER_SKIP_LIST_ITER_H
+
+namespace seqan
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Iterator:
+// 
+//	bidirectional iterator for dynamic skip list (base layer is a list)
+//	random access iterator for static skip list (base layer is an array)
+//
+//////////////////////////////////////////////////////////////////////////////
+
+		// the standard iterator is a pointer to the entrys in the base layer
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Iterator< SkipList< TObject, TModus, TSpec, TStructuring >, Standard >
+	{
+		typedef SkipBaseElement< TObject, TModus, TSpec, TStructuring > * Type;
+	};
+
+		// metatypes of the iterator
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct Reference< Iter< SkipList< TObject, TModus, TSpec, TStructuring >, Standard > >
+	{
+		typedef TObject & Type;
+	};
+
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring >
+	struct GetValue< Iter< SkipList< TObject, TModus, TSpec, TStructuring >, Standard > >
+	{
+		typedef TObject Type;
+	};
+
+	
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	goNext( SkipBaseElement< TObject, TModus, TSpec, TStructuring > *& it );
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring > inline
+	void
+	goPrevious( SkipBaseElement< TObject, TModus, TSpec, TStructuring > *& it );
+
+	
+//////////////////////////////////////////////////////////////////////////////
+//
+//	generic iterator functions and overloading of functions
+//
+//////////////////////////////////////////////////////////////////////////////
+
+	template< typename TType, typename TIterType > inline
+	typename Key< typename Value< Iter< TType, TIterType > >::Type >::Type
+	key( Iter< TType, TIterType > & it )
+	{
+		return key( value( it ) );
+	}
+
+	template< typename TType, typename TIterType, typename TParam > inline
+	typename Key< typename Value< Iter< TType, TIterType > >::Type >::Type
+	key( Iter< TType, TIterType > & it,
+			TParam & param )
+	{
+		return key( value( it ), param );
+	}
+
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TValue>
+	inline void
+	assignValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > * /*me*/,
+					TValue const & /*_value*/)
+	{
+	SEQAN_CHECKPOINT
+		// do nothing
+	} 
+
+	//const version for iterators as targets
+	template < typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TValue>
+	inline void
+	assignValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const * /*me*/,
+					TValue const & /*_value*/)
+	{
+	SEQAN_CHECKPOINT
+		// do nothing
+	} 
+
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TValue >
+	inline void
+	moveValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > *& /*it*/,
+				TValue const & /*_value*/)
+	{
+	SEQAN_CHECKPOINT
+		// do nothing
+	}
+
+	template< typename TObject, typename TModus, typename TSpec, typename TStructuring, typename TValue >
+	inline void
+	moveValue( SkipBaseElement< TObject, TModus, TSpec, TStructuring > const *& /*it*/,
+				TValue const & /*_value*/)
+	{
+	SEQAN_CHECKPOINT
+		// do nothing
+	}
+
+
+
+	template <typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec>
+	inline typename Position<Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const>::Type 
+	position(Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & me)
+	{
+	SEQAN_CHECKPOINT
+		typename Position<Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const>::Type pos = 0;
+		Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > it = begin( container(me) );
+		while( it != me )
+		{
+			goNext( it );
+			++pos;
+		}
+		return pos;
+	}
+
+	//____________________________________________________________________________
+
+	template <typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TContainer2>
+	inline typename Position<Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const>::Type 
+	position(Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & me,
+			 TContainer2 const &)
+	{
+	SEQAN_CHECKPOINT
+		return position( me );
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator +
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral>
+	inline Iter< SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> >  
+	operator + (Iter< SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & left,
+				TIntegral right)
+	{
+	SEQAN_CHECKPOINT
+		Iter< SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > buffer(container(left), hostIterator(left) );
+		while( right > 0 )
+		{
+			goNext( buffer );
+			--right;
+		}
+		return buffer;
+	}
+	template < typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral>
+	inline Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> >  
+	operator + (TIntegral left,
+				Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & right)
+	{
+	SEQAN_CHECKPOINT
+		Iter< SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > buffer(container(left), hostIterator(left) );
+		while( right > 0 )
+		{
+			goNext( buffer );
+			--right;
+		}
+		return buffer;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator +=
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral>
+	inline Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > &
+	operator += (Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > & left,
+				 TIntegral right)
+	{
+	SEQAN_CHECKPOINT
+		while( right > 0 )
+		{
+			goNext( left );
+			--right;
+		}
+		return left;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator -
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral>
+	inline Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> >  
+	operator - (Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & left,
+				TIntegral right)
+	{
+	SEQAN_CHECKPOINT
+		Iter< SkipList< TObject, SkipListDynamic, TSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > buffer(container(left), hostIterator(left) );
+		while( right > 0 )
+		{
+			goPrevious( buffer );
+			--right;
+		}
+		return buffer;
+	}
+
+	//____________________________________________________________________________
+
+	// ???
+	//template < typename TObject, typename SkipListDynamic, typename TSpec, typename TStructuring, typename TIterator, typename TSpec>
+	//inline typename Position<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > >::Type  
+	//operator - (Iter<SkipList< TObject, SkipListDynamic, TSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & left,
+	//			Iter<SkipList< TObject, SkipListDynamic, TSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > const & right)
+	//{
+	//SEQAN_CHECKPOINT
+	//	return hostIterator(left) - hostIterator(right);
+	//}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator -=
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TObject, typename TSLSpec, typename TStructuring, typename TIterator, typename TSpec, typename TIntegral>
+	inline Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > &
+	operator -= (Iter<SkipList< TObject, SkipListDynamic, TSLSpec, TStructuring >, AdaptorIterator<TIterator, TSpec> > & left,
+				 TIntegral right)
+	{
+	SEQAN_CHECKPOINT
+		while( right > 0 )
+		{
+			goPrevious( left );
+			--right;
+		}
+		return left;
+	}
+
+} // namespace ...
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+#endif //SEQAN_HEADER_SKIP_LIST_ITER_H
diff --git a/src/SeqAn-1.3/seqan/chaining/skip_list_type.h b/src/SeqAn-1.3/seqan/chaining/skip_list_type.h
new file mode 100644
index 0000000..eaa0bb2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/skip_list_type.h
@@ -0,0 +1,391 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SKIPLIST_TYPE_H
+#define SEQAN_HEADER_SKIPLIST_TYPE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+
+/**
+.Metafunction.Key:
+..summary:Type of the theKeyattribute of an object. 
+..signature:Key<T>::Type
+..param.T:Type for which the key type is determined.
+..returns.param.Type:Key type of $T$.
+..remarks.text:The theKeytype of an object is used for sorting and searching.
+..include:seqan/chaining.h
+*/
+
+/* moved to basic_h, see #6
+	template< typename T >
+	struct Key
+	{
+		typedef T Type;
+	};
+*/
+		// default for Pair
+	template < typename T1_, typename T2_, typename Compressed >
+    struct Pair;
+
+	// auxiliary functions for Objects that are plugged into the 
+		// SkipList
+		// Specialized for std::pair
+	template< typename TKey, typename TVal > inline
+	TKey & key( Pair<TKey, TVal> & p )
+	{
+		return p.i1;
+	}
+
+	template< typename TKey, typename TVal > inline
+	TVal & getValue( Pair<TKey, TVal> & p )
+	{
+		return p.i2;
+	}
+
+	template< typename TKey2, typename TVal >
+	void setKey( Pair<TKey2, TVal> & p, TKey2 theKey)
+	{
+		p.i1 = theKey;
+	}
+
+	template< typename TKey, typename TVal >
+	struct Value< Pair< TKey, TVal> >
+	{
+		typedef TVal Type;
+	};
+
+	template< typename TKey, typename TVal >
+	struct Key< Pair< TKey, TVal > >
+	{
+		typedef TKey Type;
+	};
+
+		// specialization for std::pair
+	template< typename TKey, typename TVal > inline
+	TKey key( std::pair< TKey, TVal > & p )
+	{
+		return p.first;
+	}
+
+	template< typename TKey, typename TVal >
+	void setKey( std::pair<TKey, TVal> & p, TKey theKey )
+	{
+		p.first = theKey;
+	}
+
+	template< typename TKey, typename TVal >
+	struct Value< std::pair< TKey, TVal> >
+	{
+		typedef TVal Type;
+	};
+
+	template< typename TKey, typename TVal >
+	struct Key< std::pair< TKey, TVal > >
+	{
+		typedef TKey Type;
+	};
+
+	
+	/**
+	.Metafunction.Cargo:
+	..summary:An additional cargo member of an object. 
+	..signature:Cargo<T>::Type
+	..param.T:Type for which the cargo type is determined.
+	..returns.param.Type:Cargo type of $T$.
+	..remarks.text:The cargo type is used for additional cargo information.
+	*/
+
+	struct EmptyCargo_
+	{};
+/*
+	template< typename T >
+	struct Cargo
+	{
+		typedef EmptyCargo_ Type;
+	};
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// Tags
+//////////////////////////////////////////////////////////////////////////////
+
+struct SkipListDynamic;
+
+struct SkipListStatic;
+
+struct Complete;
+
+struct Deferred;
+
+//////////////////////////////////////////////////////////////////////////////
+// Forward declarations
+//////////////////////////////////////////////////////////////////////////////
+
+
+template< typename TObject, typename TModus = SkipListDynamic, typename TSpec = Default, typename TStructuring = Complete >
+struct SkipElement;
+
+template< typename TObject, typename TModus = SkipListDynamic, typename TSpec = Default, typename TStructuring  = Complete >
+struct SkipBaseElement;
+
+template< typename TObject, typename TModus = SkipListDynamic, typename TSpec = Default, typename TStructuring  = Complete >
+struct SkipList;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// METAFUNCTIONS
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Size< SkipList< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef size_t Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Size< SkipList< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Size< SkipElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Size< SkipElement< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Size< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Size< SkipBaseElement< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename Size< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+//
+//		Position Type
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Position< SkipList< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef SkipBaseElement< TObject, TModus, TSpec, TStructuring > * Type;
+};
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+//
+//		GetValue Type
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct GetValue< SkipList< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename GetValue< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct GetValue< SkipElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename GetValue< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct GetValue< SkipElement< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename GetValue< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct GetValue< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename GetValue< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct GetValue< SkipBaseElement< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename GetValue< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct GetValue< SkipBaseElement< TObject, TModus, TSpec, TStructuring > * >
+{
+	typedef SkipBaseElement< TObject, TModus, TSpec, TStructuring > Type;
+};
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+//
+//		Value Type
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Value< SkipList< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef TObject Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Value< SkipList< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename Value< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Value< SkipElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename Value< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Value< SkipElement< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename Value< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Value< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename Value< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Value< SkipBaseElement< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename Value< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+//
+//		Key Type
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Key< SkipList< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename Key< TObject >::Type Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Key< SkipList< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename Key< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Key< SkipElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename Key< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Key< SkipElement< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename Key< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Key< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename Key< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Key< SkipBaseElement< TObject, TModus, TSpec, TStructuring > const >
+{
+	typedef typename Key< SkipList< TObject, TModus, TSpec, TStructuring > >::Type const Type;
+};
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+//
+//		Cargo Type
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Cargo< SkipList< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef EmptyCargo_ Type;	// default: no cargo
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Cargo< SkipElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename Cargo< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+
+template< typename TObject, typename TModus, typename TSpec, typename TStructuring >
+struct Cargo< SkipBaseElement< TObject, TModus, TSpec, TStructuring > >
+{
+	typedef typename Cargo< SkipList< TObject, TModus, TSpec, TStructuring > >::Type Type;
+};
+
+
+template< typename TTag, typename TCargo > inline
+void
+_initCargo( TTag * /*tag*/, 
+		   TCargo & /*_cargo*/ )
+{}
+
+
+}
+
+#endif // SEQAN_HEADER_SKIPLIST_TYPE_H
diff --git a/src/SeqAn-1.3/seqan/chaining/skip_pool_alloc.h b/src/SeqAn-1.3/seqan/chaining/skip_pool_alloc.h
new file mode 100644
index 0000000..1e82ee5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/skip_pool_alloc.h
@@ -0,0 +1,377 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+/*	Hendrik Woehrle
+*
+*	Deferred Skip List Datastructure
+*
+*	ClassPool -
+*
+*	Memory pool allocator for multiple objects at once
+*
+*/
+
+#ifndef SEQAN_HEADER_SKIP_POOL_ALLOC_H
+#define SEQAN_HEADER_SKIP_POOL_ALLOC_H
+
+namespace seqan
+{
+
+struct Unlimited
+{};
+
+struct Limited
+{};
+
+/*DISABLED
+.Spec.Class Pool Allocator:
+..cat:Allocators
+..general:Class.Allocator
+..summary:Allocator that pools memory blocks for a specific class.
+..signature:Allocator< ClassPool<Class, Type, ParentAllocator> >
+..param.Class:The class.
+..param.Type:A specialization. The Class Pool Allocator can manage either slices of a fixed size or of 
+..param.ParentAllocator:An allocator that is by the pool allocator used to allocate memory.
+...default:@Spec.Simple Allocator@
+...note:The multi pool allocator only supports @Function.clear@ if this function is also implemented for $ParentAllocator$.
+..remarks:A pool allocator allocates several memory blocks at once. 
+Freed blocks are not immediately deallocated but recycled in subsequential allocations.
+This way, the number of calls to the heap allocator is reduced and that speeds up memory management. The Class Pool Allocator
+pools only memory blocks of a fixed size, namely $sizeof(Class)$. The Class Pool Allocator only pools the memory, constructor and destructor have to be called manually.
+..include:seqan/chaining.h
+*/
+
+template< typename TClass, typename TType, typename TParentAllocator = SimpleAllocator >
+struct ClassPool;
+
+template< typename TClass, typename TSpec, typename TParentAlloc >
+void clear( Allocator< ClassPool< TClass, TSpec, TParentAlloc > > & me );
+
+template< typename TClass, typename TSpec, typename TParentAlloc, typename TSize >
+void allocate( Allocator< ClassPool< TClass, TSpec, TParentAlloc > > & me, 
+				TClass *& dest, 
+				TSize number );
+
+template< typename TClass, typename TSpec, typename TParentAlloc, typename TSize >
+void deallocate( Allocator< ClassPool< TClass, TSpec, TParentAlloc > > & me, 
+				 TClass * location );
+
+template< typename TClass, typename TSpec, typename TParentAlloc >
+TParentAlloc & 
+parentAlloc( Allocator< ClassPool< TClass, TSpec, TParentAlloc > > & me );
+
+template< typename TClass, typename TSpec, typename TParentAlloc >
+void
+setParentAlloc( Allocator< ClassPool< TClass, TSpec, TParentAlloc > > & me );
+
+
+template< typename TClass, typename TSpec, typename TParentAlloc > inline
+TClass * 
+_getNextBlock( Allocator< ClassPool< TClass, TSpec, TParentAlloc > > & /*me*/,
+				TClass & block )
+{
+	return _getNext( block );
+}
+
+template< typename TClass, typename TSpec, typename TParentAlloc > inline
+void 
+_setNextBlock( Allocator< ClassPool< TClass, TSpec, TParentAlloc > > & /*me*/,
+				TClass & dest,
+				TClass * block )
+{
+	_setNext( dest, block );
+}
+
+
+//********************************** Partially specialised Template Class of the memory allocator for SkipBaseElement
+template< typename TClass, typename TParentAllocator  >
+struct Allocator< ClassPool< TClass, Unlimited, TParentAllocator > >
+{
+		// Last free block in queue, which can be used again
+	TClass * _freeBlock;
+		// Pointer to end of "used" memory Block
+	TClass * _end;
+		// Pointer to single end of reserved memory
+	TClass * _terminal_end;
+		// size of blocks
+	typename Size< TClass >::Type _blockSize;
+		// parent Allocator
+	Holder<TParentAllocator> data_parent_allocator;
+		
+
+	Allocator(Allocator const &):
+		_freeBlock(0),
+		_end(0),
+		_terminal_end(0),
+		_blockSize(0)
+	{
+	}
+
+	inline Allocator &
+	operator = (Allocator const &)
+	{
+		clear(*this);
+		return *this;
+	}
+
+
+	Allocator( typename Size< TClass >::Type numElements = 1000 )
+	{
+		TClass * block;
+		_blockSize = numElements > 20 ? numElements : 20;
+		allocate( parentAllocator( *this ), block, _blockSize );
+		_end = block;
+		_terminal_end = _end + _blockSize;
+		_freeBlock = NULL;
+	}
+
+	~Allocator(void)
+	{
+		clear( *this );
+	}
+
+};
+
+	template< typename TClass, typename TParentAlloc >
+	inline 
+	TParentAlloc &
+	parentAllocator( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me )
+	{
+		return value( me.data_parent_allocator );
+	}
+
+	template< typename TClass, typename TParentAlloc >
+	inline 
+	void
+	setParentAllocator( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me,
+					   TParentAlloc & alloc_)
+	{
+		setValue( me.data_parent_allocator, alloc_ );
+	}
+
+
+	template< typename TClass, typename TParentAlloc, typename TSize >
+	void allocate( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me, 
+					TClass *& dest, 
+					TSize number )
+	{
+		SEQAN_CHECK2( number <= me._blockSize, "tried to allocate more elements than available in block");
+		SEQAN_CHECK2( number > 0, "tried to allocate 0 elements");
+		if( number == 1 )
+		{
+			if( me._end < me._terminal_end )
+			{		// enough place available in current memory pool
+				dest = me._end;
+				++me._end;
+				return;
+			}
+			else{
+				allocate( parentAllocator( me ), me._end, me._blockSize );
+				me._terminal_end = me._end + me._blockSize;
+				dest = me._end;
+				++me._end;
+				return;
+			}
+		}
+		else
+		{
+			if( me._end + number < me._terminal_end )
+			{		// enough place available in current memory pool
+				dest = me._end;
+				me._end += number;
+				return;
+			}
+			else{		
+					// not enough memory in current pool avaiable: allocate new, adjust pointers
+				if( me._end < me._terminal_end ){
+					_setNext( * me._end, me._freeBlock );
+					++me._end;
+					while( me._end < me._terminal_end){
+						_setNext( *me._end, me._end );
+						++me._end;
+					}
+					me._freeBlock = me._end-1;
+				}
+				allocate( parentAllocator( me ), me._end, me._blockSize );
+				me._terminal_end = me._end + me._blockSize;
+				dest = me._end;
+				me._end+=number;
+				return;
+			}
+		}	
+	}
+
+	
+	template< typename TClass, typename TParentAlloc, typename TSize > inline
+	void deallocate( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me, 
+					 TClass * location,
+					 TSize /*count*/ )
+	{
+		SEQAN_CHECK2( location != NULL, "Tried to free NULL-pointer" )
+		_setNext( *location, me._freeBlock );
+		me._freeBlock = location;
+	}
+
+
+	template< typename TClass, typename TParentAlloc > inline
+	void
+	clear( Allocator< ClassPool< TClass, Unlimited, TParentAlloc > > & me )
+	{
+	SEQAN_CHECKPOINT
+
+		me._freeBlock = NULL;
+		me._end = NULL;
+		me._terminal_end = NULL;
+		me._blockSize = 0;
+
+		clear( parentAllocator( me ) );
+	}
+
+
+//***************************** Partially specialised Template Class of the memory allocator for SkipElement
+template< typename TClass, typename TParentAllocator  >
+struct Allocator< ClassPool< TClass, Limited, TParentAllocator > >
+{
+		// Map for freed Blocks, which can be used again
+	TClass * _freeBlocks[ sizeof( typename Size< TClass >::Type ) * 8];
+		// Pointer to end of "used" memory Block
+	TClass * _end;
+		// Pointer to single end of reserved memory
+	TClass * _terminal_end;
+		// size of Elements
+	typename Size< TClass >::Type _blockSize;
+		// parent Allocator
+	Holder<TParentAllocator> data_parent_allocator;
+
+
+public:
+
+	Allocator( typename Size< TClass >::Type numElements = 1000 )
+	{
+		_blockSize = numElements > 32 ? numElements : 32;
+		allocate( parentAllocator( *this ), _end, _blockSize );
+		_terminal_end = _end + _blockSize;
+		for( typename Size< TClass >::Type i = 0; i < sizeof( typename Size< TClass >::Type ) * 8; i++ )
+			_freeBlocks[i] = NULL;
+	}
+
+	~Allocator(void)
+	{
+		clear( *this );
+	}
+
+};
+
+	template< typename TClass, typename TParentAlloc >
+	inline 
+	TParentAlloc &
+	parentAllocator( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me )
+	{
+		return value(me.data_parent_allocator);
+	}
+
+	template< typename TClass, typename TParentAlloc >
+	inline 
+	void
+	setParentAllocator( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me,
+					   TParentAlloc & alloc_)
+	{
+		setValue( me.data_parent_allocator, alloc_ );
+	}
+
+	template< typename TClass, typename TParentAlloc, typename TSize >
+	void allocate( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me, 
+					TClass *& dest, 
+					TSize number )
+	{
+		SEQAN_CHECK2( number <= me._blockSize, "tried to allocate more elements than available in block")
+		SEQAN_CHECK( number != 0 )		
+			// recycle old memory block
+		if( me._freeBlocks[ number-1 ] != NULL )
+		{
+			dest = me._freeBlocks[number-1];
+			me._freeBlocks[number-1] = _getNext( *dest );
+			return;
+		}
+			// use in memory from current block
+		else if( me._end + number < me._terminal_end )
+		{
+			dest = me._end;
+			me._end += number;
+			return;
+		}
+		else {	// allocate new memory block
+			TClass * block;
+			allocate( parentAllocator( me ), block, me._blockSize );
+			typename Size< TClass >::Type rest_space = me._terminal_end - me._end;
+			if( rest_space != 0 )
+			{
+				_setNextBlock( me, *me._end, me._freeBlocks[ rest_space - 1 ] );
+				me._freeBlocks[ rest_space - 1 ] = me._end;
+			}
+			me._end = block;
+			me._terminal_end = me._end + me._blockSize;
+			dest = me._end;
+			me._end += number;
+		}
+	}
+
+	template< typename TClass, typename TParentAlloc, typename TSize >
+	void 
+	deallocate( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me,
+				TClass * location,
+				TSize count )
+	{
+		SEQAN_CHECK( count != 0 )
+		_setNextBlock( me, *location, me._freeBlocks[ count - 1 ] );
+		me._freeBlocks[ count - 1 ] = location;
+	}
+
+	template< typename TClass, typename TParentAlloc >
+	void
+	clear( Allocator< ClassPool< TClass, Limited, TParentAlloc > > & me )
+	{
+	SEQAN_CHECKPOINT
+
+		for( size_t i = 0; i < sizeof( typename Size< TClass >::Type ) * 8; ++i )
+			me._freeBlocks[i] = NULL;
+		me._end = NULL;
+		me._terminal_end = NULL;
+		me._blockSize = 0;
+
+		clear( parentAllocator( me ) );
+	}
+
+} // namespace seqan
+
+#endif // SKIPPOOLALLOC_H
diff --git a/src/SeqAn-1.3/seqan/chaining/tree_chain.h b/src/SeqAn-1.3/seqan/chaining/tree_chain.h
new file mode 100644
index 0000000..8d03d8c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/tree_chain.h
@@ -0,0 +1,130 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_TREECHAIN_H
+#define SEQAN_HEADER_TREECHAIN_H
+
+#include <algorithm>
+#include <vector>
+
+namespace seqan{
+
+		// compute chain spec for G0 and G1 cost metric
+	template< typename TSource, typename TDest, typename TScoreValue, typename TScoreType, typename TStructuring, typename TCostModell, typename TSpec >
+	TScoreValue
+	_computeChain( TSource & source, 
+					TDest & dest, 
+					TCostModell cost, 
+					Score< TScoreValue, TScoreType > const & score_,
+					TStructuring,
+					TSpec spec )
+	{
+		SEQAN_CHECK( !empty( source ) )
+			// define some basic types
+		typedef typename Value< TSource >::Type FragType;
+		typedef typename Weight< FragType >::Type WeightType;
+		typedef typename Key< FragType >::Type PositionType;
+		typedef typename Size< FragType >::Type SizeType;
+		typedef typename TSpec::Type SpecType;
+
+		SizeType dim = dimension( value( begin( source ) ) );
+		
+			// construct containers for classes
+		String< MetaFragment_< FragType > > metas;
+		reserve( metas, length( source ) + 2 );
+
+		std::vector< WrapperPoint_< FragType > > points;
+		points.reserve( 2 * ( length( source ) + 2 ) );
+		
+		//String< WrapperPoint_< FragType > > points;
+		//reserve( points, 2 * ( length( source ) + 2 ) );
+
+		String< ChainPoint_< FragType, SpecType > > end_points;
+		reserve( end_points, length( source ) + 2 );
+		
+			// define origin and terminus fragment
+		FragType startingFrag( dim );		
+		FragType endFrag( dim );
+
+			// build the environment (construct wrapper points, chain point, get coordinates of the terminus)
+		_buildChainEnvironment( source, metas, points, end_points, startingFrag, endFrag, spec );
+
+		typename Iterator< String< MetaFragment_< FragType > > >::Type lastMeta = end( metas );
+		goPrevious( lastMeta );
+
+			// set the score of the origin from -infinity to 0
+		setScore( value( begin( metas ) ), 0 );
+
+			// sort the wrapper points to apply the line sweep paradigma
+		std::sort( points.begin(), points.end(), ChainSorter_< WrapperPoint_< FragType > >( ) );
+	
+			// build the RMT
+		RangeTree< ChainPoint_< FragType, SpecType >, SkipListStatic, RT< MaxTree< > >, TStructuring > tree( end_points, dim-1 );
+
+			// algorithm main loop
+			// traverse wrapper points
+		typename std::vector< WrapperPoint_< FragType > >::iterator pointIt = points.begin();
+		while( pointIt != points.end() )
+		{
+				// actual point is the beginning of a frag
+				// => search for preceding fragment
+			MetaFragment_< FragType > & meta = _meta(*pointIt );
+			if( !_isEnd( *pointIt ) )
+			{
+				ChainPoint_< FragType, SpecType > buffer( meta, dim - 1, true );
+				ChainPoint_< FragType, SpecType > * result = rangeMaxQuery( tree, buffer );
+
+				SEQAN_CHECK( result != NULL )
+
+				_setPred( meta, _meta( *result ) );
+				setScore( meta, _maxPriority( value( lastMeta ), meta, *result, cost, score_, dim ) );
+			}
+			else{
+					// point is the end of a frag
+					// => activate it
+				size_t offset = &meta - &_meta( *points.begin() );
+				ChainPoint_< FragType, SpecType > & point = end_points[ offset ];
+
+				setPriority( point, score( meta ) - _activatePriority( value( lastMeta ), point, cost, score_, dim ) );
+				activate( tree, point );
+			}
+			goNext( pointIt );
+		}
+			// perform backtracking
+		return _chainTrace( dest, metas );
+	}
+	
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/chaining/tree_chain_sop.h b/src/SeqAn-1.3/seqan/chaining/tree_chain_sop.h
new file mode 100644
index 0000000..668c56d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/tree_chain_sop.h
@@ -0,0 +1,202 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_TREECHAIN_SOP_H
+#define SEQAN_HEADER_TREECHAIN_SOP_H
+
+#include <algorithm>
+#include <vector>
+
+namespace seqan
+{
+		// compute chain spec for G_SoP cost metric
+	template< typename TSource, typename TDest, typename TScoreValue, typename TScoreType, typename TStructuring, typename TSpec >
+	TScoreValue
+	_computeChain( TSource & source, 
+					TDest & dest, 
+					GSumOfPairCost, 
+					Score< TScoreValue, TScoreType > const & score_,
+					TStructuring,
+					TSpec spec )
+	{
+		SEQAN_CHECK( !empty( source ) )
+			// define some basic types
+		typedef typename Value< TSource >::Type FragType;
+		typedef typename Weight< FragType >::Type WeightType;
+		typedef typename Key< FragType >::Type PositionType;
+		typedef typename Size< FragType >::Type SizeType;
+		typedef typename TSpec::Type SpecType;
+		
+		SizeType dim = dimension( value( begin( source ) ) );
+		SizeType facValue = fac( dim );
+		
+			// construct containers for classes
+			// meta information
+		String< MetaFragment_< FragType > > meta_inf;
+		reserve( meta_inf, length( source ) + 2 );
+//		typename Iterator< String< MetaFragment_< FragType > > >::Type metaIt = begin( meta_inf );
+		
+			// wrapper points for the line sweep paradigma
+		std::vector< WrapperPoint_< FragType > > points;
+		points.reserve( 2 * ( length( source ) + 2 ) );
+		
+		//String< WrapperPoint_< FragType > > points;
+		//reserve( points, 2 * ( length( source ) + 2 ) );
+		//typename Iterator< String< WrapperPoint_< FragType > > >::Type pointIt = begin( points );
+
+			// points for the rmt with transformated coodinates
+		String< String< ChainPoint_< FragType, SpecType > > > trans_points;
+		resize( trans_points, fac( dim ) );
+		typename Iterator< String< String< ChainPoint_< FragType, SpecType > > > >::Type transIt = begin( trans_points );
+	
+			// define origin and terminus fragment
+		FragType startingFrag( dim );		
+		FragType endFrag( dim );
+
+			// get permutations
+		String< SizeType > permutation;
+		reserve( permutation, dim );
+		_initPerm( permutation, dim );
+		
+		String< SizeType > bufferPermutation;
+		reserve( bufferPermutation, dim );
+		_initPerm( bufferPermutation, dim );
+
+			// build the environment (construct wrapper points, chain point, get coordinates of the terminus)
+		_buildChainEnvironment( source, meta_inf, points, trans_points, startingFrag, endFrag, permutation, facValue, spec );
+		typename Iterator< String< MetaFragment_< FragType > > >::Type lastMeta = end( meta_inf );
+		goPrevious( lastMeta );
+	
+			// sort the wrapper points to apply the line sweep paradigma
+		std::sort( points.begin(), points.end(), ChainSorter_< WrapperPoint_< FragType > >( ) );
+
+			// build the RMT's for all points
+		String< RangeTree< ChainPoint_< FragType, SpecType >, SkipListStatic, RT< MaxTree< > >, TStructuring > * > trees;
+		resize( trees, facValue );
+		_resetPerm( permutation );
+		_buildChainTrees( trees, trans_points, dim, facValue );
+			
+			// some buffer values
+		WeightType * weights;
+		allocate( weights, weights, dim );
+		MetaFragment_< FragType > & firstMeta = value( begin( meta_inf ) );
+		setScore( firstMeta, 0 );
+
+			// algorithm main loop
+			// traverse wrapper points
+		typename std::vector< WrapperPoint_< FragType > >::iterator pointIt = points.begin();
+		while( pointIt != points.end() )
+		{
+			MetaFragment_< FragType > & meta = _meta( *pointIt );
+			typename Iterator< String< RangeTree< ChainPoint_< FragType, SpecType >, SkipListStatic, RT< MaxTree< > >, TStructuring > * >, Rooted >::Type treeIt = begin( trees );
+	
+				// actual point is the beginning of a frag
+				// => search for preceding fragment
+			if( !_isEnd( *pointIt ) )
+			{
+				
+				typename Weight< FragType >::Type maxWeight = minValue< typename Weight< FragType >::Type >();
+				typename Weight< FragType >::Type tempWeight = 0;
+				MetaFragment_< FragType > * bestPoint = NULL; //&_meta( *points.begin() );
+				ChainPoint_< FragType, SpecType > origin( meta, dim, true );
+				ChainPoint_< FragType, SpecType > buffer = origin;
+
+					// choose the best preceding point
+				while( treeIt!= end( trees ) )
+				{
+						// transform coordinates for current permutation
+					_chainTransformCoordsSearch( origin, buffer, permutation );
+						
+						// perform RMQ
+					ChainPoint_< FragType, SpecType > * result = rangeMaxQuery( *value( treeIt ), buffer );
+						// choose the best point of current hyper corner,
+						// if one exists for the current permutation
+					if( key( *result, 0 ) != minValue< typename Key< ChainPoint_< FragType, SpecType > >::Type >() )
+					{
+						tempWeight = score( _meta( *result ) );
+						typename Weight< FragType >::Type cost_for_rest = _costGSoP( meta, _meta( *result ), score_, begin( permutation ), end( permutation ), dim );
+						tempWeight -= cost_for_rest;
+					}
+					else
+					{		// no active point in hyper corner
+						std::next_permutation( begin( permutation ), end( permutation ) );
+						goNext( treeIt );
+						continue;
+					}		
+						// get point with maximal priority
+					if( tempWeight > maxWeight )
+					{
+						maxWeight = tempWeight;
+						bestPoint = &_meta( *result );
+					}
+					std::next_permutation( begin( permutation ), end( permutation ) );
+					goNext( treeIt );
+				}
+				_setPred( meta, *bestPoint );
+				setScore( meta, maxWeight + weight( meta ) );
+			}
+			else{
+					// activate point with geometric costs
+				size_t offset = &meta - &firstMeta;
+				_getPermDifference( weights, dim, _getFrag( value( lastMeta ) ), _getFrag( meta ) );
+                _getPerm( weights, begin( bufferPermutation ), dim );
+				setPriority( meta, score( meta ) - _costGSoP( value( lastMeta ), meta, score_, begin( bufferPermutation ), end( bufferPermutation ), dim ) );
+				transIt = begin( trans_points );
+
+				_resetPerm( bufferPermutation );
+
+				while( treeIt!= end( trees ) )
+				{
+						// activate in all trees
+					ChainPoint_< FragType, SpecType > & point = value( transIt )[ offset ];
+
+					typename Weight< FragType >::Type new_prio = score( meta ) - _costGSoP( value( lastMeta ), meta, score_, begin( bufferPermutation ), end( bufferPermutation ), dim );
+					setPriority( point, new_prio );
+					activate( *value( treeIt ), point );
+					goNext( transIt );
+					goNext( treeIt );
+					std::next_permutation( begin( bufferPermutation ), end( bufferPermutation ) );
+				}
+			}
+			goNext( pointIt );
+		}
+			// delete the rmt's
+		_deleteChainTrees( trees, facValue );
+		deallocate( weights, weights, dim );
+			// backtracking
+		return _chainTrace( dest, meta_inf );
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/chaining/tree_chain_utils.h b/src/SeqAn-1.3/seqan/chaining/tree_chain_utils.h
new file mode 100644
index 0000000..aaa5b20
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/chaining/tree_chain_utils.h
@@ -0,0 +1,567 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_TREECHAIN_UTILS_H
+#define SEQAN_HEADER_TREECHAIN_UTILS_H
+
+
+
+namespace seqan{
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//	helper functions
+//////////////////////////////////////////////////////////////////////////////////////////
+
+		// calculate faculty of a number
+	template< typename TSimpleType > inline
+	TSimpleType
+	fac( TSimpleType data )
+	{
+		TSimpleType value = 1;
+		for( TSimpleType i = 2; i <= data; ++i )
+		{
+			value *= i;
+		}
+		return value;
+	}
+
+		// initailize a permutation to 0, 1, ..., k
+	template< typename TPerm, typename TSize > inline
+	void
+	_initPerm( TPerm & perm, 
+				TSize length )
+	{
+		for( TSize i = 0; i < length; ++i )
+		{
+			appendValue( perm, i );
+		}
+	}
+		
+		// reset a permutation to 0, 1, ..., k
+	template< typename TPerm > inline
+	void
+	_resetPerm( TPerm & perm )
+	{
+		typename Iterator< TPerm, Rooted >::Type permIt = begin( perm );
+		int i = 0;
+		while( permIt != end( perm ) )
+		{
+			assignValue( permIt, i );
+			++i;
+			goNext( permIt );
+		}
+	}
+
+		// get the permutation e.g. order of to sequences of numbers
+	template< typename TData, typename TItPerm, typename TSize > inline
+	void
+	_getPerm( TData * values,
+				TItPerm perm,
+				TSize length )
+	{
+		TData max = minValue< TData>();
+		TSize maxIndex = 0;
+		for( TSize i = 0; i < length; ++i )
+		{
+			for( TSize j = 0; j < length; ++j )
+			{
+				if( values[ j ] > max )
+				{
+					max = values[ j ];
+					maxIndex = j;
+					values[ j ] = minValue< TData>();
+				}
+			}
+			assignValue( perm, maxIndex );
+			maxIndex = 0;
+			max = minValue< TData>();
+			goNext( perm );
+		}		
+	}
+
+		// get the differences of coordinates of two fragments
+	template< typename TData, typename TSize, typename FragType >
+	void
+	_getPermDifference( TData * values,
+						TSize dim,
+						FragType & upper,
+						FragType & lower )
+	{
+		for( TSize i = 0; i < dim; ++i )
+		{
+			values[ i ] = leftPosition( upper, i ) - rightPosition( lower, i );
+		}		
+	}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//	transformations
+//////////////////////////////////////////////////////////////////////////////////////////
+
+		// transform the coordinates of a chain point
+	template< typename FragType, typename SpecType, typename TPerm > inline
+	void
+	_chainTransformCoords( ChainPoint_< FragType, SpecType > & point_src,
+							ChainPoint_< FragType, SpecType > & point_dst,
+							TPerm & perm )
+	{
+		typename Iterator< TPerm >::Type permIt = begin( perm );
+		typename Iterator< TPerm >::Type permEnd = end( perm );
+		goPrevious( permEnd );
+		while( permIt != permEnd )
+		{
+			setKey( point_dst, *permIt, key( point_src, *permIt ) - key( point_src, *( permIt + 1 ) ) );
+			++permIt;
+		}
+		setKey( point_dst, *permIt, key( point_src, *permIt ) );
+	}
+
+			// transform the coordinates of a chain point for searching
+	template< typename FragType, typename SpecType, typename TPerm > inline
+	void
+	_chainTransformCoordsSearch( ChainPoint_< FragType, SpecType > & point_src,
+									ChainPoint_< FragType, SpecType > & point_dst,
+									TPerm & perm )
+	{
+		typename Iterator< TPerm >::Type permIt = begin( perm );
+		typename Iterator< TPerm >::Type permEnd = end( perm );
+		goPrevious( permEnd );
+		while( permIt != permEnd )
+		{
+			setKey( point_dst, *permIt, key( point_src, *permIt ) - key( point_src, *( permIt + 1 ) ) + 1 );
+			++permIt;
+		}
+		setKey( point_dst, *permIt, key( point_src, *permIt ) );
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// cost functions
+//////////////////////////////////////////////////////////////////////////////////////////
+	
+		// calulate the score
+	template< typename FragType, typename SpecType, typename TCostModell, typename TScore, typename TSize > inline
+	typename Weight< FragType >::Type
+	_maxPriority( MetaFragment_< FragType > & last_meta,
+						MetaFragment_< FragType > & current_meta,
+						ChainPoint_< FragType, SpecType > & point,
+						TCostModell cost, 
+						TScore const & score_,
+						TSize dim );
+
+	template< typename FragType, typename SpecType, typename TScore, typename TSize > inline
+	typename Weight< FragType >::Type
+	_maxPriority( MetaFragment_< FragType > & ,
+					MetaFragment_< FragType > & current_meta,
+					ChainPoint_< FragType, SpecType > & point,
+					GZeroCost, 
+					TScore const &,
+					TSize )
+	{
+		return weight( current_meta ) + priority( point );
+	}
+
+
+		// calculate the maximum priority
+	template< typename FragType, typename SpecType, typename TScore, typename TSize > inline
+	typename Weight< FragType >::Type
+	_maxPriority( MetaFragment_< FragType > &,
+					MetaFragment_< FragType > & current_meta,
+					ChainPoint_< FragType, SpecType > & point,
+					GOneCost, 
+					TScore const & score_,
+					TSize dim )
+	{
+		typename Weight< FragType >::Type prio = weight( current_meta );
+		prio += score( _meta( point ) );
+		prio -= _costGOne( current_meta, _meta( point ), score_, dim );
+		return prio;
+	}
+
+	
+		// calculate the priority for activation
+	template< typename FragType, typename SpecType, typename TCostModell, typename TScore, typename TSize > inline
+	typename Weight< FragType >::Type
+	_activatePriority( MetaFragment_< FragType > & last_meta,
+						ChainPoint_< FragType, SpecType > & point,
+						TCostModell cost, 
+						TScore const & score_,
+						TSize dim );
+
+
+	template< typename FragType, typename SpecType, typename TScore, typename TSize > inline
+	typename Weight< FragType >::Type
+	_activatePriority( MetaFragment_< FragType > &,
+						ChainPoint_< FragType, SpecType > &,
+						GZeroCost, 
+						TScore const &,
+						TSize )
+	{
+		return 0;
+	}
+
+
+	template< typename FragType, typename SpecType, typename TScore, typename TSize > inline
+	typename Weight< FragType >::Type
+	_activatePriority( MetaFragment_< FragType > & last_meta,
+						ChainPoint_< FragType, SpecType > & point,
+						GOneCost, 
+						TScore const & score_,
+						TSize dim )
+	{
+		return _costGOne( last_meta, _meta( point ), score_, dim );
+	}
+
+	
+		// the cost function for manhattan metric
+	template< typename FragType, typename TScore, typename TSize >
+	typename Weight< FragType >::Type
+	_costGOne( MetaFragment_< FragType > & upper,
+				MetaFragment_< FragType > & lower,
+				TScore const & score,
+				TSize dim )
+	{
+		typename Weight< FragType >::Type weight = 0;
+		for( typename Size< FragType >::Type i = 0; i < dim; ++i )
+		{
+//!!!Change dist semantics
+//			weight += ( scoreGapExtend( score ) * ( leftPosition( _getFrag( upper ), i ) - rightPosition( _getFrag( lower ), i ) ) );
+			weight += ( scoreGap( score ) * ( leftPosition( _getFrag( upper ), i ) - rightPosition( _getFrag( lower ), i ) - 1) );
+		}
+		return weight;
+	}
+
+		// the cost function for SoP metric
+	template< typename FragType, typename TItPerm, typename TScoreValue, typename TScoreType, typename TSize >
+	typename Weight< FragType >::Type
+	_costGSoP( MetaFragment_< FragType > & upper,
+				MetaFragment_< FragType > & lower,
+				Score< TScoreValue, TScoreType > const & score,
+				TItPerm permBeg,
+				TItPerm,
+				TSize dim )
+	{
+		typename Weight< FragType >::Type weight = 0;
+		typename Weight< FragType >::Type weight_buffer = 0;
+		typename Weight< FragType >::Type delta;
+		typename Size< FragType >::Type dim_factor = dim - 1;
+		for( typename Size< FragType >::Type i = 0; i < dim; ++i )
+		{
+//!!!Change dist semantics
+//			delta = static_cast< typename Weight< FragType >::Type >( leftPosition( _getFrag( upper ), value( permBeg ) ) - rightPosition( _getFrag( lower ), value( permBeg ) ) );
+			delta = static_cast< typename Weight< FragType >::Type >( leftPosition( _getFrag( upper ), value( permBeg ) ) - rightPosition( _getFrag( lower ), value( permBeg ) ) -1);
+			weight_buffer = ( scoreGap( score ) * delta );
+			weight_buffer *= static_cast< typename Weight< FragType >::Type >( ( dim_factor - i ) );
+			weight += weight_buffer;
+			weight_buffer = ( delta * ( scoreMismatch( score ) - scoreGap( score ) ) );
+			weight_buffer *= static_cast< typename Weight< FragType >::Type >( i );
+			weight += weight_buffer;
+			goNext( permBeg );
+		}
+		return weight;
+	}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//	sorting
+//////////////////////////////////////////////////////////////////////////////////////////
+
+
+		// struct for std::sort of wrapper points
+	template< typename T >
+	struct
+	ChainSorter_
+	{
+		inline bool
+		operator()( T & first, T & second  )
+		{
+			if ( key( first ) < key( second ) )
+				return true;
+			else if ( key( first ) == key( second ) && _isBegin( first ) && _isEnd( second ) )
+				return true;
+			return false;
+		}
+		inline bool 
+		operator()( const T & first, const T & second  )
+		{
+			if ( key( first ) < key( second ) )
+				return true;
+			else if ( key( first ) == key( second ) && _isBegin( first ) && _isEnd( second ) )
+				return true;
+			return false;
+		}
+
+		ChainSorter_()
+		{}	
+
+	};
+	
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//	dynamic programming helper functions
+//////////////////////////////////////////////////////////////////////////////////////////
+
+
+		// backtracking
+	template< typename TDest, typename TMetas >
+	typename Weight< typename Value< TDest >::Type >::Type
+	_chainTrace( TDest & dest,
+					TMetas & metas )
+	{
+		typedef typename Value< TDest >::Type FragType;
+		typename Iterator< TMetas >::Type meta = end( metas );
+		goPrevious( meta );
+		MetaFragment_< FragType > * pMeta = & value( meta );
+		typename Weight< FragType >::Type chain_score = score( *pMeta );
+		//pMeta = &_getPred( *pMeta );
+		while( pMeta != &value( begin( metas ) ) )
+		{
+			SEQAN_CHECK( &_getFrag( *pMeta ) != 0 )
+			appendValue( dest, _getFrag( *pMeta ) );
+			pMeta = &_getPred( *pMeta );
+		}
+		appendValue( dest, _getFrag( *pMeta ) );
+		std::reverse( begin( dest ), end( dest ) );
+//		typename Iterator< TDest >::Type destIt = begin( dest );
+		return chain_score;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//	initialization helper functions
+//////////////////////////////////////////////////////////////////////////////////////////
+
+		// init of starting frag (the origin)
+	template< typename FragType, typename TSize > inline
+	void
+	_initStartingFrag( FragType & frag,
+							TSize dim )
+	{
+		TSize dim_counter = 0;
+		while( dim_counter != dim )
+		{
+			_setLeftPosition( frag, dim_counter, 0 );
+			_setRightPosition( frag, dim_counter, 0 );
+			++dim_counter;
+		}
+		setWeight( frag, 0 );
+	}
+
+		// init of needed variables
+		// * the wrapper points
+		// * the chain points
+		// * the metainformation structures
+		// spec for G0 and G1 metric
+	template< typename FragType, typename TSource, typename TMetas, typename TWPoints, typename TCPoints, typename TSpec > inline
+	void
+	_buildChainEnvironment( TSource & source,  
+								TMetas & metas, 
+								TWPoints & wPoints,
+								TCPoints & cPoints,
+								FragType & startingFrag,
+								FragType & endFrag,
+								TSpec )
+	{
+		typedef typename Key< FragType >::Type KeyType;
+		typedef typename Size< FragType >::Type SizeType;
+		typedef typename TSpec::Type SpecType;
+		SizeType dim = dimension( value( begin( source ) ) );
+		SizeType lower_dim  = dim - 1;
+				
+			// initialize starting frag
+		_initStartingFrag( startingFrag, dim );
+		appendValue( metas, MetaFragment_< FragType >( startingFrag ) );
+		wPoints.push_back( WrapperPoint_< FragType >( value( begin( metas ) ), true ) );
+		appendValue( cPoints, ChainPoint_< FragType, SpecType >( value( begin( metas ) ) ) );
+
+			// buffers to find the maximal coordinates
+		KeyType * maxCoords;
+		allocate( maxCoords, maxCoords, dim );
+		for( SizeType i = 0; i < dim; ++i )
+		{
+			maxCoords[ i ] = 0;
+		}
+
+			// traverse the set of fragments
+		typename Iterator< TSource, Rooted >::Type sourceIt = begin( source );
+		typename Iterator< TMetas, Rooted >::Type metaIt = begin( metas );
+		goNext( metaIt );
+		while( sourceIt != end( source ) )
+		{
+			appendValue( metas, MetaFragment_< FragType >( value( sourceIt ) ) );
+			wPoints.push_back( WrapperPoint_< FragType >( value( metaIt ), leftPosition( value( sourceIt ), lower_dim ), false ) );
+			wPoints.push_back( WrapperPoint_< FragType >( value( metaIt ), rightPosition( value( sourceIt ), lower_dim ), true ) );
+			appendValue( cPoints, ChainPoint_< FragType, SpecType >( value( metaIt ) ) );
+
+			for( SizeType i = 0; i < dim; ++i )
+			{
+				if( maxCoords[ i ] < rightPosition( value( sourceIt ), i ) )
+					maxCoords[ i ] = rightPosition( value( sourceIt ), i );
+			}
+			
+			goNext( metaIt );
+			goNext( sourceIt );
+		}
+
+			// set the coordinates of the terminus
+		for( SizeType dim_counter = 0; dim_counter < dim; ++dim_counter )
+		{
+			_setLeftPosition( endFrag, dim_counter, maxCoords[ dim_counter ] + 1 );
+			_setRightPosition( endFrag, dim_counter, maxCoords[ dim_counter ] + 1 );
+		}
+		appendValue( metas, MetaFragment_< FragType >( endFrag ) );
+		wPoints.push_back( WrapperPoint_< FragType >( *metaIt, false ) );
+		deallocate( maxCoords, maxCoords, dim );
+		appendValue( cPoints, ChainPoint_< FragType, SpecType >( *metaIt ) );
+	}
+
+
+		// spec for G_SoP metric
+	template< typename FragType, typename TSource, typename TMetas, typename TWPoints, typename TPoints, typename TPerm, typename TSpec > inline
+	void
+	_buildChainEnvironment( TSource & source, 
+								TMetas & metas, 
+								TWPoints & wPoints,
+								TPoints  & tPoints,
+								FragType & startingFrag,
+								FragType & endFrag,
+								TPerm & perm,
+								typename Size< FragType >::Type fac,
+								TSpec &)
+	{
+		typedef typename Key< FragType >::Type KeyType;
+		typedef typename Size< FragType >::Type SizeType;
+		typedef typename TSpec::Type SpecType;
+		SizeType dim = dimension( value( begin( source ) ) );
+		SizeType lower_dim = dim - 1;
+		SizeType dim_counter = 0;
+		
+		_initStartingFrag( startingFrag, dim );
+
+		appendValue( metas, MetaFragment_< FragType >( startingFrag ) );
+		wPoints.push_back( WrapperPoint_< FragType >( value( begin( metas ) ), true ) );
+		
+		KeyType * maxCoords;
+		allocate( maxCoords, maxCoords, dim );
+		for( SizeType i = 0; i < dim; ++ i )
+			maxCoords[ i ] = 0;
+
+		typename Iterator< TSource, Rooted >::Type sourceIt = begin( source );
+		typename Iterator< TMetas, Rooted >::Type metaIt = begin( metas );
+		goNext( metaIt );
+
+		while( sourceIt != end( source ) )
+		{
+			appendValue( metas, MetaFragment_< FragType >( value( sourceIt ) ) );
+			wPoints.push_back( WrapperPoint_< FragType >( value( metaIt ), leftPosition( value( sourceIt ), lower_dim ), false ) );
+			wPoints.push_back( WrapperPoint_< FragType >( value( metaIt ), rightPosition( value( sourceIt ), lower_dim ), true ) );
+
+			for( dim_counter = 0; dim_counter < dim; ++dim_counter )
+			{
+				if( maxCoords[ dim_counter ] < rightPosition( value( sourceIt ), dim_counter ) )
+					 maxCoords[ dim_counter ] = rightPosition( value( sourceIt ), dim_counter );
+			}
+
+			goNext( metaIt );
+			goNext( sourceIt );
+		}
+		dim_counter = 0;
+		while( dim_counter != dim )
+		{
+			_setLeftPosition( endFrag, dim_counter, maxCoords[ dim_counter ] + 1);
+			_setRightPosition( endFrag, dim_counter, maxCoords[ dim_counter ] + 1 );
+			++dim_counter;
+		}
+		appendValue( metas, MetaFragment_< FragType >( endFrag ) );
+		deallocate( maxCoords, maxCoords, dim );
+		wPoints.push_back( WrapperPoint_< FragType >( *metaIt, false ) );
+		metaIt = begin( metas );
+		
+			// transformate the point coordinates
+		typename Iterator< TPoints >::Type transIt =  begin( tPoints );
+			// traverse all dim! permutations
+		for( SizeType i = 0; i < fac; ++i )
+		{
+			assignValue( transIt, typename Value< TPoints >::Type() );
+			reserve( value( transIt ), length( source ) + 2 );
+			
+				// transform points
+			typename Iterator< typename Value< TPoints >::Type >::Type cPointIt = begin( value( transIt ) );
+			for( SizeType pointCount = 0; pointCount < ( length( source ) + 2 ); ++pointCount )
+			{
+				ChainPoint_< FragType, SpecType > buffer( value( metaIt ), dim );
+				appendValue( value( transIt ), buffer );
+				_chainTransformCoords( buffer, value( cPointIt ), perm );
+				goNext( metaIt );
+				goNext( cPointIt );
+			}
+			std::next_permutation( begin( perm ), end( perm ) );
+			metaIt = begin( metas );
+			goNext( transIt );
+		}
+	}
+
+		// construct dim! range trees for gSoP metric
+	template< typename TTrees, typename TTPoints, typename TSize >
+	void
+	_buildChainTrees( TTrees & trees, 
+						TTPoints & tPoints, 
+						TSize dim,
+						TSize facValue )
+	{
+		typename Iterator< TTPoints >::Type tPointIt = begin( tPoints );
+		typename Iterator< TTrees >::Type treeIt = begin( trees );
+		for( TSize i = 0; i < facValue; ++i )
+		{
+			allocate( value( treeIt ), value( treeIt ), 1 );
+			new( value( treeIt ) ) typename Value< typename Value< TTrees >::Type >::Type ( value( tPointIt ), dim );
+			goNext( tPointIt );
+			goNext( treeIt );
+		}
+	}
+
+		// delete all RMT's
+	template< typename TTrees, typename TSize >
+	void
+	_deleteChainTrees( TTrees & trees, 
+							TSize facValue )
+	{
+		typename Iterator< TTrees >::Type treeIt = begin( trees );
+		for( TSize i = 0; i < facValue; ++i )
+		{
+			delete ( value( treeIt ) );
+			goNext( treeIt );
+		}
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/consensus.h b/src/SeqAn-1.3/seqan/consensus.h
new file mode 100644
index 0000000..e4ce702
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/consensus.h
@@ -0,0 +1,57 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_CONSENSUS_H
+#define SEQAN_HEADER_CONSENSUS_H
+
+// Seqan
+#include <seqan/score.h>
+#include <seqan/modifier.h>
+#include <seqan/graph_types.h>
+#include <seqan/graph_algorithms.h>
+#include <seqan/refinement.h>
+#include <seqan/graph_align.h>
+#include <seqan/graph_msa.h>
+#include <seqan/store.h>
+
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/consensus/consensus_generated_forwards.h>
+#endif
+
+// Consensus tool
+#include <seqan/consensus/consensus_base.h>
+#include <seqan/consensus/consensus_score.h>
+#include <seqan/consensus/consensus_realign.h>
+#include <seqan/consensus/consensus_library.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/consensus/consensus_base.h b/src/SeqAn-1.3/seqan/consensus/consensus_base.h
new file mode 100644
index 0000000..257c99a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/consensus/consensus_base.h
@@ -0,0 +1,1806 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Tobias Rausch <rausch at embl.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_CONSENSUS_BASE_H
+#define SEQAN_HEADER_CONSENSUS_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Segment Match Generation tag
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Segment Match Generation.value.OverlapLibrary:
+	Segment matches from overlap alignments.
+..include:seqan/consensus.h
+*/
+
+struct OverlapLibrary_;
+typedef Tag<OverlapLibrary_> const OverlapLibrary;
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Consensus tag
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Consensus Calling:
+..summary:A tag that specifies how to call the consensus.
+..include:seqan/consensus.h
+*/
+
+
+/**
+.Tag.Consensus Calling.value.MajorityVote:
+	A consensus based on the most common character.
+..include:seqan/consensus.h
+*/
+
+struct MajorityVote_;
+typedef Tag<MajorityVote_> const MajorityVote;
+
+/**
+.Tag.Consensus Calling.value.Bayesian:
+	A consensus based on bayesian probability.
+..include:seqan/consensus.h
+*/
+
+struct Bayesian_;
+typedef Tag<Bayesian_> const Bayesian;
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Read alignment and Consensus Generation
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+struct ConsensusOptions {
+public:
+	// Method
+	// 0: graph-based multiple sequence alignment
+	// 1: realign
+	int method;
+
+	// ReAlign Method
+	// 0: Needleman-Wunsch
+	// 1: Gotoh
+	int rmethod;
+
+	// Bandwidth of overlap alignment
+	int bandwidth;
+
+	// Number of computed overlaps per read (at the beginning and end of a read)
+	int overlaps;
+
+	// Minimum match length of a computed overlap
+	int matchlength;
+
+	// Minimum quality (in percent identity) of a computed overlap
+	int quality;
+
+	// Window size, only relevant for insert sequencing
+	// If window == 0, no insert sequencing is assumed
+	int window;
+	
+	// Output
+	// 0: seqan style
+	// 1: afg output format
+	// 2: frg output format
+	// 3: cgb output format
+    // 4: Sam output format
+	int output;
+
+	// Multi-read alignment
+	bool noalign;
+
+	// Offset all reads, so the first read starts at position 0
+	bool moveToFront;
+
+	// Include reference genome
+	bool include;
+
+	// Scoring object for overlap alignments
+	Score<int> sc;
+
+	// Various input and output files
+	std::string readsfile;				// File of reads in FASTA format
+	std::string afgfile;				// AMOS afg file input
+	std::string samfile;				// Sam file input
+	std::string contigsfile;			// FASTA reference file for Sam input
+	std::string outfile;				// Output file name
+	
+	// Initialization
+	ConsensusOptions() 
+	{
+		sc = Score<int>(2,-6,-4,-9);
+	}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TStrSpec, typename TPosPair, typename TStringSpec, typename TSpec, typename TConfig, typename TId>
+inline void 
+_loadContigReads(StringSet<TValue, Owner<TStrSpec> >& strSet,
+				 String<TPosPair, TStringSpec>& startEndPos,
+				 FragmentStore<TSpec, TConfig> const& fragStore,
+				 TId const contigId)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename TFragmentStore::TReadPos TReadPos;
+
+	// All fragment store element types
+	typedef typename Value<typename TFragmentStore::TReadStore>::Type TReadStoreElement;
+	typedef typename Value<typename TFragmentStore::TAlignedReadStore>::Type TAlignedElement;
+
+	// Sort aligned reads according to contig id
+	sortAlignedReads(fragStore.alignedReadStore, SortContigId());
+	resize(strSet, length(fragStore.alignedReadStore));
+
+	// Retrieve all reads, limit them to the clear range and if required reverse complement them
+	typedef typename Iterator<typename TFragmentStore::TAlignedReadStore>::Type TAlignIter;
+	TAlignIter alignIt = lowerBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+	TAlignIter alignItEnd = upperBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+	TSize numRead = 0;
+	TReadPos begClr = 0;
+	TReadPos endClr = 0;
+	TSize lenRead = 0;
+	TSize offset = 0;
+	for(;alignIt != alignItEnd; ++alignIt) {
+		offset = _min(alignIt->beginPos, alignIt->endPos);
+		getClrRange(fragStore, *alignIt, begClr, endClr);
+		strSet[numRead] = infix(fragStore.readSeqStore[alignIt->readId], begClr, endClr);
+		lenRead = endClr - begClr;
+		if (alignIt->beginPos < alignIt->endPos) appendValue(startEndPos, TPosPair(offset, offset + lenRead), Generous());
+		else {
+			reverseComplement(strSet[numRead]);
+			appendValue(startEndPos, TPosPair(offset + lenRead, offset), Generous());
+		}
+		++numRead;
+	}
+	resize(strSet, numRead, Exact());
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TConfig, typename TMatrix, typename TSize2, typename TSize, typename TReadSlot> 
+inline bool
+convertAlignment(FragmentStore<TSpec, TConfig>& fragStore,
+				 TMatrix& mat,
+				 TSize2 contigId,
+				 TSize& coverage,
+				 TReadSlot& slot)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Value<TMatrix>::Type TValue;
+	typedef typename TFragmentStore::TContigPos TContigPos;
+
+	// Gap char
+	TValue gapChar = gapValue<TValue>();
+
+	// Sort according to contigId
+	sortAlignedReads(fragStore.alignedReadStore, SortContigId());
+	
+	// Find range of the given contig
+	typedef typename Iterator<typename TFragmentStore::TAlignedReadStore, Standard>::Type TAlignIter;
+	TAlignIter alignIt = lowerBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+	TAlignIter alignItEnd = upperBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+
+	// Sort the reads according to the begin position
+	sortAlignedReads(infix(fragStore.alignedReadStore, alignIt - begin(fragStore.alignedReadStore, Standard()), alignItEnd - begin(fragStore.alignedReadStore, Standard())), SortBeginPos());
+	TAlignIter alignItBegin = alignIt = lowerBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+	alignItEnd = upperBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+
+	// Get the maximum coverage and the slot for each read
+	typedef String<TSize> TFirstFreePos;
+	typedef typename Iterator<TFirstFreePos, Standard>::Type TPosIter;
+	TFirstFreePos freePos;
+	TSize pos = 0;
+	TSize maxTmp = 0;
+	TSize numCol = 0;
+	reserve(slot, alignItEnd - alignIt);
+	for(;alignIt != alignItEnd; ++alignIt) {
+		TPosIter itPos = begin(freePos, Standard());
+		TPosIter itPosEnd = end(freePos, Standard());
+		pos = 0;
+		for(;itPos != itPosEnd; ++itPos, ++pos) 
+			if ((TContigPos)*itPos < _min(alignIt->beginPos, alignIt->endPos)) break;
+		if (pos + 1 > length(freePos)) resize(freePos, pos+1, Generous());
+		maxTmp = _max(alignIt->beginPos, alignIt->endPos);
+		freePos[pos] = maxTmp;
+		if (maxTmp > numCol) numCol = maxTmp;
+		appendValue(slot, pos);
+	}
+	coverage = length(freePos);
+	clear(freePos);
+
+	// Fill the matrix
+	typedef typename Iterator<TMatrix, Standard>::Type TMatIter;
+	resize(mat, coverage * numCol, '.');
+	alignIt = alignItBegin;
+	TSize readPos = 0;
+	TMatIter matIt = begin(mat, Standard());
+	typename TFragmentStore::TReadSeq myRead;
+	for(;alignIt != alignItEnd; ++alignIt, ++readPos) {
+		typedef typename Iterator<String<typename TFragmentStore::TReadGapAnchor>, Standard>::Type TReadGapsIter;
+		TReadGapsIter itGaps = begin(alignIt->gaps, Standard());
+		TReadGapsIter itGapsEnd = end(alignIt->gaps, Standard());
+		
+		// Place each read inside the matrix
+		myRead = fragStore.readSeqStore[alignIt->readId];
+		TSize lenRead = length(myRead);
+		TSize offset = alignIt->beginPos;
+		if (alignIt->beginPos > alignIt->endPos) {
+			reverseComplement(myRead);
+			offset = alignIt->endPos;
+		}
+		matIt = begin(mat, Standard());
+		matIt += (slot[readPos] * numCol + offset);
+
+		typedef typename Iterator<typename TFragmentStore::TReadSeq, Standard>::Type TReadIter;
+		TReadIter seqReadIt = begin(myRead, Standard());
+
+		// First clear range
+		TSize mySeqPos = 0;
+		int diff = 0;
+		if ((itGaps != itGapsEnd) && (itGaps->gapPos == 0)) {
+			mySeqPos = itGaps->seqPos;
+			diff = -1 * mySeqPos;
+			seqReadIt += mySeqPos;
+		}
+		TSize clr2 = lenRead;
+		TSize stop = 0;
+		for(;itGaps != itGapsEnd; ++itGaps) {
+			// Any clipped sequence at the end
+			stop =  itGaps->seqPos;
+			if (diff - ((int) itGaps->gapPos - (int) itGaps->seqPos) > 0) 
+				clr2 = stop = lenRead - (diff - ((int) itGaps->gapPos - (int) itGaps->seqPos));
+			
+			for(;mySeqPos < stop; ++matIt, ++seqReadIt, ++mySeqPos) 
+				*matIt = *seqReadIt;
+
+			for(int i = 0; i < ((int) itGaps->gapPos - (int) itGaps->seqPos) - diff; ++i, ++matIt) 
+				*matIt = gapChar;
+	
+			diff = (itGaps->gapPos - itGaps->seqPos);
+		}
+		for(;mySeqPos < clr2; ++mySeqPos, ++seqReadIt, ++matIt) 
+			*matIt = *seqReadIt;
+	}
+	//for(TSize row = 0; row < coverage; ++row) {
+	//	for(TSize col = 0; col<numCol; ++col) {
+	//		std::cout << mat[row * numCol + col];
+	//	}
+	//	std::cout << std::endl;
+	//}
+	return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TConfig, typename TMatrix, typename TSize2, typename TSize> 
+inline bool
+convertAlignment(FragmentStore<TSpec, TConfig>& fragStore,
+				 TMatrix& mat,
+				 TSize2 contigId,
+				 TSize& coverage)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	String<TSize> slot;
+	return convertAlignment(fragStore, mat, contigId, coverage, slot);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TConfig, typename TMatrix> 
+inline bool
+convertAlignment(FragmentStore<TSpec, TConfig>& fragStore,
+				 TMatrix& mat)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	TSize coverage;
+	return convertAlignment(fragStore, mat, 0, coverage);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TConfig, typename TGappedConsensus, typename TSize> 
+inline void
+getGappedConsensus(FragmentStore<TSpec, TConfig>& fragStore,
+				   TGappedConsensus& gappedConsensus,
+				   TSize contigId)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Value<TGappedConsensus>::Type TValue;
+	typedef typename TFragmentStore::TContigPos TContigPos;
+	
+	TValue gapChar = gapValue<TValue>();
+	typedef typename Iterator<typename TFragmentStore::TContigSeq, Standard>::Type TContigIter;
+	TContigIter seqContigIt = begin(fragStore.contigStore[contigId].seq, Standard());
+	TContigIter seqContigItEnd = end(fragStore.contigStore[contigId].seq, Standard());
+	typedef typename Iterator<String<typename TFragmentStore::TContigGapAnchor>, Standard>::Type TGapsIter;
+	TGapsIter itGaps = begin(fragStore.contigStore[contigId].gaps, Standard());
+	TGapsIter itGapsEnd = end(fragStore.contigStore[contigId].gaps, Standard());
+	int diff = 0;
+	TContigPos mySeqPos = 0;
+	for(;itGaps != itGapsEnd; goNext(itGaps)) {
+		for(;mySeqPos < itGaps->seqPos; ++seqContigIt, ++mySeqPos) 
+			appendValue(gappedConsensus, *seqContigIt, Generous());
+			
+		for(int i = 0; i < ((int) itGaps->gapPos - (int) itGaps->seqPos) - diff; ++i) 
+			appendValue(gappedConsensus, gapChar, Generous());
+			diff = (itGaps->gapPos - itGaps->seqPos);
+	}
+	for(;seqContigIt != seqContigItEnd; ++seqContigIt) 
+		appendValue(gappedConsensus, *seqContigIt, Generous());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TConfig, typename TGappedConsensus, typename TSize> 
+inline void
+assignGappedConsensus(FragmentStore<TSpec, TConfig>& fragStore,
+					  TGappedConsensus& gappedCons,
+					  TSize contigId)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Value<TGappedConsensus>::Type TValue;
+	TValue gapChar = gapValue<TValue>();
+
+	// Update the contig
+	typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigStoreElement;
+	TContigStoreElement& contigEl = fragStore.contigStore[contigId];
+	clear(contigEl.gaps);
+	clear(contigEl.seq);
+
+	// Create the sequence and the gap anchors
+	typedef typename Iterator<TGappedConsensus, Standard>::Type TStringIter;
+	TStringIter seqIt = begin(gappedCons, Standard());
+	TStringIter seqItEnd = end(gappedCons, Standard());
+	typedef typename TFragmentStore::TReadPos TReadPos;
+	typedef typename TFragmentStore::TContigGapAnchor TContigGapAnchor;
+	TReadPos ungappedPos = 0;
+	TReadPos gappedPos = 0;
+	bool gapOpen = false;
+	for(;seqIt != seqItEnd; ++seqIt, ++gappedPos) {
+		if (*seqIt == gapChar) gapOpen = true;				
+		else {
+			if (gapOpen) {
+				appendValue(contigEl.gaps, TContigGapAnchor(ungappedPos, gappedPos), Generous());
+				gapOpen = false;
+			}
+			Dna5Q letter = *seqIt;
+			assignQualityValue(letter, 'D');
+			appendValue(contigEl.seq, letter);
+			++ungappedPos;
+		}
+	}
+	if (gapOpen) 
+		appendValue(contigEl.gaps, TContigGapAnchor(ungappedPos, gappedPos), Generous());
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSize, typename TConfigOptions>
+inline void
+consensusAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& gOut,
+				   String<Pair<TSize, TSize> >& begEndPos,
+				   TConfigOptions const& consOpt) 
+{
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TOutGraph;
+	typedef typename Id<TOutGraph>::Type TId;
+
+	// Initialization
+	TStringSet& seqSet = stringSet(gOut);
+
+	// Select all overlapping reads and record the diagonals of the band
+	String<Pair<TId, TId> > pList;
+	String<Pair<int, int> > diagList;
+	if (consOpt.window == 0) selectPairs(seqSet, begEndPos, consOpt.bandwidth, pList, diagList);
+	else selectPairsIndel(seqSet, begEndPos, consOpt.window, pList, diagList);
+
+	// Set-up a sparse distance matrix
+	Graph<Undirected<double> > pairGraph;
+	
+	// Containers for segment matches and corresponding scores 
+	typedef String<Fragment<> > TFragmentString;
+	TFragmentString matches;
+	typedef String<int> TScoreValues;
+	TScoreValues scores;
+
+	// Compute segment matches from global pairwise alignments
+	appendSegmentMatches(seqSet, pList, diagList, begEndPos, consOpt.sc, consOpt.matchlength, consOpt.quality, consOpt.overlaps, matches, scores, pairGraph, OverlapLibrary() );
+	clear(pList);
+	clear(diagList);
+
+	// If there are no alignment matches, return
+	if (!length(matches)) return;
+
+	// Use these segment matches for the initial alignment graph
+	typedef Graph<Alignment<TStringSet, TSize> > TGraph;
+	TGraph g(seqSet);
+	buildAlignmentGraph(matches, scores, g, consOpt.sc, ReScore() );
+	clear(matches);
+	clear(scores);
+
+	// Guide Tree
+	Graph<Tree<double> > guideTree;
+	upgmaTree(pairGraph, guideTree);
+	clear(pairGraph);
+
+	// Triplet library extension
+	graphBasedTripletLibraryExtension(g);
+
+	// Perform a progressive alignment
+	progressiveAlignment(g, guideTree, gOut);
+	clear(g);
+	clear(guideTree);
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSize>
+inline void
+consensusAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& gOut,
+				   String<Pair<TSize, TSize> >& begEndPos) 
+{
+	ConsensusOptions consOpt;
+	consensusAlignment(gOut, begEndPos, consOpt);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragSpec, typename TConfig, typename TStringSet, typename TCargo, typename TSpec, typename TContigId>
+inline void
+updateContig(FragmentStore<TFragSpec, TConfig>& fragStore,
+			 Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+			 TContigId contigId)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef std::map<TSize, TSize> TComponentLength;
+	typedef char TValue;
+
+	// Initialization
+	TStringSet& strSet = stringSet(g);
+	TSize nseq = length(strSet);
+	TValue gapChar = gapValue<TValue>();
+	TValue specialGap = '.';
+	TSize maxCoverage = 0;
+	TSize len = 0;
+	String<TValue> mat;
+
+	// Store for each read the begin position, the end position and the row in the alignment matrix
+	String<TSize> readBegEndRowPos;
+	resize(readBegEndRowPos, 3*nseq);
+
+	// Strongly Connected Components, topological sort, and length of each component
+	String<TSize> component;
+	String<TSize> order;
+	TComponentLength compLength;
+	if (convertAlignment(g, component, order, compLength)) {
+		TSize numOfComponents = length(order);
+		
+		// Assign to each sequence the start and end (in terms of component ranks)
+		typedef String<std::pair<TSize, TSize> > TComponentToRank;
+		TComponentToRank compToRank;
+		for(TSize compIndex = 0; compIndex < numOfComponents; ++compIndex) 
+			appendValue(compToRank, std::make_pair(order[compIndex], compIndex), Generous());
+		::std::sort(begin(compToRank, Standard()), end(compToRank, Standard()));
+
+		typedef Pair<TSize, TSize> TRankPair;
+		typedef String<TRankPair> TSequenceToRanks;
+		TSequenceToRanks seqToRank;
+		resize(seqToRank, nseq);
+		typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+		TVertexIterator itVertex(g);
+		for(;!atEnd(itVertex);++itVertex) {
+			TVertexDescriptor vert = value(itVertex);
+			TSize seq = idToPosition(strSet, sequenceId(g, vert));
+			if (fragmentBegin(g, vert) == 0) 
+				seqToRank[seq].i1 = ::std::lower_bound(begin(compToRank, Standard()), end(compToRank, Standard()), ::std::make_pair((TSize) component[vert], (TSize) 0))->second;
+			if (fragmentBegin(g, vert) + fragmentLength(g, vert) == length(strSet[seq]))
+				seqToRank[seq].i2 = ::std::lower_bound(begin(compToRank, Standard()), end(compToRank, Standard()), ::std::make_pair((TSize) component[vert], (TSize) 0))->second;
+		}
+		clear(compToRank);
+
+		// Assign the sequences to rows
+		String<TSize> seqToRow;
+		resize(seqToRow, nseq);
+		maxCoverage = 0;
+		typedef String<bool> TLeftOver;
+		typedef typename Iterator<TLeftOver, Standard>::Type TLeftOverIter;
+		TLeftOver leftOver;
+		resize(leftOver, nseq, true);
+		typedef String<std::pair<TSize, TSize> > TSeqToBegin;
+		typedef typename Iterator<TSeqToBegin, Standard>::Type TSeqToBeginIter;
+		TSeqToBegin seqToBegin;
+		TSize finishedSeq = 0;
+		while(finishedSeq < nseq) {
+			TLeftOverIter itL = begin(leftOver, Standard());
+			TLeftOverIter itLEnd = end(leftOver, Standard());
+			for(TSize pos = 0; itL != itLEnd; ++itL, ++pos) 
+				if (*itL) appendValue(seqToBegin, std::make_pair((seqToRank[pos]).i1, pos), Generous());
+			::std::sort(begin(seqToBegin, Standard()), end(seqToBegin, Standard()));
+			
+			TSize endPos = 0;
+			TSeqToBeginIter itSB = begin(seqToBegin, Standard());
+			TSeqToBeginIter itSBEnd = end(seqToBegin, Standard());
+			for(;itSB != itSBEnd;++itSB) {
+				if (endPos <= (*itSB).first) {
+					TSize currentSeq = (*itSB).second;
+					seqToRow[currentSeq] = maxCoverage;
+					endPos = (seqToRank[currentSeq]).i2 + 2;
+					leftOver[currentSeq] = false;
+					++finishedSeq;
+				}	
+			}
+			clear(seqToBegin);
+			++maxCoverage;
+		}
+		clear(leftOver);
+
+		// Create the matrix
+		len = 0;
+		String<TSize> compOffset;
+		resize(compOffset, numOfComponents);
+		for(TSize compIndex = 0; compIndex < numOfComponents; ++compIndex) {
+			compOffset[order[compIndex]] = len;
+			len+=compLength[order[compIndex]];
+		}
+		resize(mat, len * maxCoverage, gapChar);
+
+		// Fill in the segments
+		typedef typename Infix<TString>::Type TInfix;
+		typedef typename Iterator<TInfix, Standard>::Type TInfixIter;
+		typedef typename TGraph::TPosToVertexMap_ TPosToVertexMap;
+		for(typename TPosToVertexMap::const_iterator it = g.data_pvMap.begin();it != g.data_pvMap.end(); ++it) {
+			TInfix str = label(g,it->second);
+			TSize c = property(component, it->second);
+			TSize row = seqToRow[idToPosition(strSet, it->first.first)];
+			//if (row == 0) {
+			//	std::cout << sequenceId(g, it->second) << ':' << str << ',' << strSet[sequenceId(g, it->second)] << std::endl;
+			//	std::cout << getProperty(component, it->second) << ',' << order[compIndex] << std::endl;
+			//	std::cout << (seqToRank[sequenceId(g, it->second)]).i1 << ',' << (seqToRank[sequenceId(g, it->second)]).i2 << std::endl;
+			//}
+			TInfixIter sIt = begin(str, Standard());
+			TInfixIter sItEnd = end(str, Standard());
+			TSize i = compOffset[c];
+			for(TSize pCol = i;sIt!=sItEnd;++sIt, ++pCol, ++i) 
+				mat[row * len + pCol] = *sIt;
+		}
+		String<bool> active;
+		for(TSize compIndex = 0; compIndex < numOfComponents; ++compIndex) {
+			TSize offset = compOffset[order[compIndex]];
+			TSize currentCompLength = compLength[order[compIndex]];
+
+			clear(active);
+			resize(active, maxCoverage, false);
+
+			// Find the empty rows
+			for(TSize i=0;i<nseq; ++i) {
+				if (((seqToRank[i]).i1 <= compIndex) && ((seqToRank[i]).i2 >= compIndex)) 
+					active[(seqToRow[i])] = true;
+			}
+			
+			// Substitute false gaps with special gap character
+			for(TSize i = 0; i < maxCoverage; ++i) {
+				if (!(active[i])) {
+					for(TSize pCol = offset;pCol < offset + currentCompLength;++pCol) 
+						mat[i * len + pCol] = specialGap;
+				}
+			}
+		}
+
+		// Get the new begin and end positions
+		for(TSize i=0;i<nseq; ++i) {
+			TVertexDescriptor lastVertex = findVertex(const_cast<TGraph&>(g), positionToId(strSet, i), length(strSet[i]) - 1);
+			TSize readBegin = compOffset[getProperty(component, findVertex(const_cast<TGraph&>(g), positionToId(strSet, i), 0))];
+			TSize readEnd = compOffset[getProperty(component, lastVertex)] + fragmentLength(const_cast<TGraph&>(g), lastVertex);
+			readBegEndRowPos[3*i] = readBegin;
+			readBegEndRowPos[3*i+1] = readEnd;
+			readBegEndRowPos[3*i+2] = seqToRow[i];
+		}
+
+	}
+	clear(component);
+	clear(order);
+	compLength.clear();
+
+	
+	//// Debug code
+	//for(TSize row = 0; row<maxCoverage; ++row) {
+	//	for(TSize col = 0; col<len; ++col) {
+	//		std::cout << mat[row * len + col];			
+	//	}
+	//	std::cout << std::endl;
+	//}
+
+	// Create the new consensus
+	typedef typename Value<TString>::Type TAlphabet;
+	String<TValue> gappedCons;
+	consensusCalling(mat, gappedCons, maxCoverage, TAlphabet(), MajorityVote());
+
+	// Assign new consensus
+	assignGappedConsensus(fragStore, gappedCons, contigId);
+
+	// Update all aligned reads
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename TFragmentStore::TReadPos TReadPos;
+	typedef typename TFragmentStore::TContigPos TContigPos;
+	typedef typename TFragmentStore::TContigGapAnchor TContigGapAnchor;
+	typedef typename Value<typename TFragmentStore::TAlignedReadStore>::Type TAlignedElement;
+	typedef typename Iterator<typename TFragmentStore::TAlignedReadStore>::Type TAlignIter;
+	sortAlignedReads(fragStore.alignedReadStore, SortContigId());
+	TAlignIter alignIt = lowerBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+	TAlignIter alignItEnd = upperBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+	TReadPos ungappedPos = 0;
+	TReadPos gappedPos = 0;
+	bool gapOpen;
+	for(TSize i = 0;alignIt != alignItEnd; ++alignIt, ++i) {
+		TSize lenRead = length(fragStore.readSeqStore[alignIt->readId]);
+		TReadPos begClr = 0;
+		TReadPos endClr = 0;
+		getClrRange(fragStore, *alignIt, begClr, endClr);
+		clear(alignIt->gaps);
+		ungappedPos = begClr;
+		if (alignIt->beginPos > alignIt->endPos) ungappedPos = lenRead - endClr;
+		if (ungappedPos != 0) appendValue(alignIt->gaps, TContigGapAnchor(ungappedPos, 0));
+		gappedPos = 0;
+		gapOpen = false;
+		for(TSize column = readBegEndRowPos[3*i]; column<readBegEndRowPos[3*i + 1]; ++column, ++gappedPos) {
+			if (mat[readBegEndRowPos[3*i + 2] * len + column] == gapChar) gapOpen = true;				
+			else {
+				if (gapOpen) {
+					appendValue(alignIt->gaps, TContigGapAnchor(ungappedPos, gappedPos), Generous());
+					gapOpen = false;
+				}
+				++ungappedPos;
+			}
+		}
+		if (gapOpen) appendValue(alignIt->gaps, TContigGapAnchor(ungappedPos, gappedPos), Generous());
+		if (alignIt->beginPos < alignIt->endPos) {
+			if (endClr != (TContigPos)lenRead) 
+				appendValue(alignIt->gaps, TContigGapAnchor(lenRead, lenRead + (gappedPos - ungappedPos) - (lenRead - endClr)), Generous());
+		} else {
+			if (begClr != 0) 
+				appendValue(alignIt->gaps, TContigGapAnchor(lenRead, lenRead + (gappedPos - ungappedPos) - begClr), Generous());
+		}
+
+		// Set new begin and end position
+		if (alignIt->beginPos < alignIt->endPos) {
+			alignIt->beginPos = readBegEndRowPos[3*i];
+			alignIt->endPos = readBegEndRowPos[3*i+1];
+		} else {
+			alignIt->beginPos = readBegEndRowPos[3*i+1];
+			alignIt->endPos = readBegEndRowPos[3*i];
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TCounters, typename TSize, typename TAlphabet>
+inline void
+_countLetters(String<TValue, TSpec> const& mat,
+			   TCounters& counterValues,
+			   TSize alignDepth,
+			   TAlphabet)
+{
+	SEQAN_CHECKPOINT
+	typedef String<TValue, TSpec> TMatrix;
+	typedef typename Iterator<TMatrix, Standard>::Type TMatIter;
+
+	// Initialization
+	TSize len = length(mat) / alignDepth;
+	TValue gapChar = gapValue<TValue>();
+	TValue specialGap = '.';
+	TSize alphabetSize = ValueSize<TAlphabet>::VALUE;
+
+	// Set-up counter values
+	typedef typename Value<TCounters>::Type TCounter;
+	typedef typename Iterator<TCounters, Standard>::Type TCounterIt;
+	resize(counterValues, len);
+	for(TSize i=0;i<len; ++i) {
+		TCounter counter;
+		resize(counter, alphabetSize + 1, 0);
+		counterValues[i] = counter;
+	}
+
+	// Count all 
+	TMatIter matIt = begin(mat, Standard());
+	TMatIter matItEnd = end(mat, Standard());
+	TCounterIt countIt = begin(counterValues, Standard());
+	TSize pos = 0;
+	for(; matIt != matItEnd; ++matIt, ++countIt, ++pos) {
+		if (pos % len == 0) countIt = begin(counterValues, Standard());
+		if (*matIt != specialGap) {
+			if (*matIt == gapChar) ++value(*countIt, alphabetSize);
+			else ++value(*countIt, ordValue((TAlphabet) *matIt));
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TGappedCons, typename TAlignDepth, typename TAlphabet>
+inline void
+consensusCalling(String<TValue, TSpec> const& mat,
+				 TGappedCons& gappedConsensus,
+				 TAlignDepth maxCoverage,
+				 TAlphabet,
+				 Bayesian)
+{
+	typedef double TProbability;
+	typedef String<TProbability> TProbabilityDistribution;
+	typedef String<TProbabilityDistribution> TPositionalPrDist;
+	typedef typename Iterator<TPositionalPrDist, Standard>::Type TPosPrDistIter;
+
+	typedef typename Size<String<TValue, TSpec> >::Type TSize;
+	TSize alphabetSize = ValueSize<TAlphabet>::VALUE;
+	TValue gapChar = gapValue<TValue>();
+	TValue specialGap = '.';
+
+	// Set-up the counters
+	typedef String<TSize> TCounter;
+	typedef String<TCounter> TCounters;
+	TCounters counterValues;
+	_countLetters(mat, counterValues, maxCoverage, TAlphabet() );
+
+
+	// Initialization
+	TSize len = length(mat) / maxCoverage;
+	TProbabilityDistribution backroundDist;
+	resize(backroundDist, alphabetSize + 1, ((TProbability) 1 / (TProbability) (alphabetSize + 1)));
+	
+	// Get an initial consensus
+	typedef typename Iterator<TCounters, Standard>::Type TCounterIt;
+	TCounterIt countIt = begin(counterValues, Standard());
+	TCounterIt countItEnd = end(counterValues, Standard());
+	TPositionalPrDist posPrDist;
+	TValue c = TAlphabet();
+	for(;countIt != countItEnd; ++countIt) {
+		TSize max = 0;
+		typedef typename Iterator<TCounter, Standard>::Type TCIt;
+		TCIt cIt = begin(*countIt, Standard());
+		TCIt cItEnd = end(*countIt, Standard());
+		TSize pos = 0;
+		for(;cIt != cItEnd; ++cIt, ++pos) {
+			if (*cIt > max) {
+				max = *cIt;
+				c = (pos == alphabetSize) ? gapChar : (TValue) TAlphabet(pos);
+			}
+		}
+		TProbabilityDistribution prDist;
+		resize(prDist, alphabetSize + 1, 0);
+		if (c == gapChar) prDist[alphabetSize] = 1;
+		else prDist[ordValue((TAlphabet) c)] = 1;
+		appendValue(posPrDist, prDist, Generous());
+	}
+
+	TSize run = 1;
+	TProbabilityDistribution pI;
+	TProbabilityDistribution pIJ;
+	TProbabilityDistribution pIOld;
+	TProbabilityDistribution pIJOld;
+	while (run) {
+		// Store the values from the last iteration
+		pIOld = pI;
+		pIJOld = pIJ;
+
+		// Count all letters in the consensus
+		TProbabilityDistribution nI;
+		resize(nI, alphabetSize + 1, 0);
+		TPosPrDistIter itPosPrDist = begin(posPrDist, Standard());
+		TPosPrDistIter itPosPrDistEnd = end(posPrDist, Standard());
+		for(;itPosPrDist!=itPosPrDistEnd; ++itPosPrDist) 
+			for(TSize i = 0; i<(alphabetSize + 1); ++i) 
+				nI[i] += (*itPosPrDist)[i];
+	
+		// Composition probabilities
+		clear(pI);
+		resize(pI, alphabetSize + 1);
+		TProbability lenPosPrDist = (TProbability) length(posPrDist);
+		for(TSize i = 0; i<length(pI); ++i) 
+			pI[i] = nI[i] / lenPosPrDist;
+		
+
+		// Count all letters that agree / disagree with the consensus
+		TProbabilityDistribution nIJ;
+		resize(nIJ, (alphabetSize + 1) * (alphabetSize + 1), 0);
+		typedef String<TValue, TSpec> TMatrix;
+		typedef typename Iterator<TMatrix, Standard>::Type TMatIter;
+		TMatIter matIt = begin(mat, Standard());
+		TMatIter matItEnd = end(mat, Standard());
+		itPosPrDist = begin(posPrDist, Standard());
+		TSize pos = 0;
+		for(; matIt != matItEnd; ++matIt, ++itPosPrDist, ++pos) {
+			if (pos % len == 0) itPosPrDist = begin(posPrDist, Standard());
+			TValue c = *matIt;
+			if (c != specialGap) {
+				TSize fragJ = (c != gapChar) ? ordValue(TAlphabet(c)) : alphabetSize;
+				for(TSize consI = 0; consI<(alphabetSize + 1); ++consI) 
+					nIJ[consI * (alphabetSize + 1) + fragJ] += (*itPosPrDist)[consI];	
+			}
+		}
+
+		// Sequencing error probabilities
+		clear(pIJ);
+		resize(pIJ, (alphabetSize + 1) * (alphabetSize + 1));
+		TProbability sumIJ = 0;
+		for(TSize diag = 0; diag<(alphabetSize + 1); ++diag) sumIJ += nIJ[diag * (alphabetSize + 1) + diag];
+		for(TSize consI = 0; consI<(alphabetSize + 1); ++consI) 
+			for(TSize fragJ = 0; fragJ<(alphabetSize + 1); ++fragJ)
+				pIJ[consI * (alphabetSize + 1) + fragJ] = nIJ[consI * (alphabetSize + 1) + fragJ] / sumIJ;
+	
+		// Recompute positional probability distribution
+		itPosPrDist = begin(posPrDist, Standard());
+		TSize col = 0;
+		for(;itPosPrDist!=itPosPrDistEnd; ++itPosPrDist, ++col) {
+			TProbabilityDistribution prDist;
+			resize(prDist, alphabetSize + 1);
+			for(TSize consI = 0; consI<(alphabetSize + 1); ++consI) {
+				TProbability numerator = pI[consI];
+				TProbability denominator = 0;
+				for(TSize allI = 0; allI<(alphabetSize + 1); ++allI) {
+					TProbability denominatorSub = value(pI, allI);
+					for(TSize row = 0; row < maxCoverage; ++row) {
+						TValue c = mat[row * len + col];
+						if (c != specialGap) {
+							TSize fragJ = (c != gapChar) ? ordValue(TAlphabet(c)) : alphabetSize;
+							if (allI == consI) 
+								numerator *= pIJ[allI * (alphabetSize + 1) + fragJ]; 
+							denominatorSub *= pIJ[allI * (alphabetSize + 1) + fragJ]; 
+						}
+					}
+					denominator += denominatorSub;
+				}
+				prDist[consI] = numerator / denominator;
+			}
+			*itPosPrDist = prDist;
+		}	
+
+		// Check termination criterion
+		TProbability eps = 0.00001;
+		typedef typename Iterator<TProbabilityDistribution, Standard>::Type TProbIter;
+		TProbIter pIter = begin(pIOld, Standard());
+		TProbIter pIterCompare = begin(pI, Standard());
+		TProbIter pIterEnd = end(pIOld, Standard());
+		TSize runOld = run;
+		for(;pIter != pIterEnd; ++pIter, ++pIterCompare) {
+			if (*pIter > *pIterCompare) {
+				if (*pIter - *pIterCompare > eps) {
+					++run;
+					break;
+				}
+			} else {
+				if (*pIterCompare - *pIter > eps) {
+					++run;
+					break;
+				}
+			}
+		}
+		if (runOld == run) {
+			pIter = begin(pIJOld, Standard());
+			pIterCompare = begin(pIJ, Standard());
+			pIterEnd = end(pIJOld, Standard());
+			for(;pIter != pIterEnd; ++pIter, ++pIterCompare) {
+				if (*pIter > *pIterCompare) {
+					if (*pIter - *pIterCompare > eps) {
+						++run;
+						break;
+					}
+				} else {
+					if (*pIterCompare - *pIter > eps) {
+						++run;
+						break;
+					}
+				}
+			}
+		}
+
+		if (runOld == run) {
+			std::cout << "Iterations: " << run << std::endl;
+			run = 0;
+		}
+	}
+	
+	// Compute the most likely consensus
+	TPosPrDistIter itPosPrDist = begin(posPrDist, Standard());
+	TPosPrDistIter itPosPrDistEnd = end(posPrDist, Standard());
+	clear(gappedConsensus);
+	for(;itPosPrDist!=itPosPrDistEnd; ++itPosPrDist) {
+		TProbability max = 0;
+		TSize ind = 0;
+		for(TSize consI = 0; consI<(alphabetSize + 1); ++consI) {
+			if ((*itPosPrDist)[consI] > max) {
+				max = (*itPosPrDist)[consI];
+				ind = consI;
+			}
+		}
+		if (ind == alphabetSize) appendValue(gappedConsensus, gapChar);
+		else appendValue(gappedConsensus, TAlphabet(ind));
+	}
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TFragSpec, typename TConfig, typename TContigId>
+inline void
+consensusCalling(FragmentStore<TFragSpec, TConfig>& fragStore,
+				 TContigId contigId,
+				 Bayesian)
+{
+	SEQAN_CHECKPOINT
+
+	typedef FragmentStore<TFragSpec, TConfig> TFragmentStore;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename TFragmentStore::TReadSeq TReadSeq;
+	typedef typename Value<TReadSeq>::Type TAlphabet;
+	typedef char TValue;
+
+	// Convert the contig to an alignment matrix
+	typedef String<TValue> TAlignMat;
+	TAlignMat mat;
+	TSize maxCoverage;
+	convertAlignment(fragStore, mat, contigId, maxCoverage);
+
+	// Call the consensus
+	String<TValue> gappedConsensus;
+	consensusCalling(mat, gappedConsensus, maxCoverage, TAlphabet(), Bayesian());
+
+	// Assign the new consensus
+	assignGappedConsensus(fragStore, gappedConsensus, contigId);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TGappedCons, typename TAlignDepth, typename TAlphabet>
+inline void
+consensusCalling(String<TValue, TSpec> const& mat,
+				 TGappedCons& gappedConsensus,
+				 TAlignDepth maxCoverage,
+				 TAlphabet,
+				 MajorityVote)
+{
+	typedef typename Size<String<TValue, TSpec> >::Type TSize;
+	TSize alphabetSize = ValueSize<TAlphabet>::VALUE;
+	TValue gapChar = gapValue<TValue>();
+	
+	// Set-up the counters
+	typedef String<TSize> TCounter;
+	typedef String<TCounter> TCounters;
+	TCounters counterValues;
+	_countLetters(mat, counterValues, maxCoverage, TAlphabet() );
+	
+	// Get the consensus
+	typedef typename Iterator<TCounters, Standard>::Type TCounterIt;
+	TCounterIt countIt = begin(counterValues, Standard());
+	TCounterIt countItEnd = end(counterValues, Standard());
+	clear(gappedConsensus);
+	TSize max = 0;
+	TValue c = TValue();
+	TSize pos = 0;
+	for(;countIt != countItEnd; ++countIt) {
+		max = 0;	
+		typedef typename Iterator<TCounter, Standard>::Type TCIt;
+		TCIt cIt = begin(*countIt, Standard());
+		TCIt cItEnd = end(*countIt, Standard());
+		pos = 0;
+		for(;cIt != cItEnd; ++cIt, ++pos) {
+			if (*cIt > max) {
+				max = *cIt;
+				c = (pos == alphabetSize) ? gapChar : (TValue) TAlphabet(pos);
+			}
+		}
+		appendValue(gappedConsensus, c);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TFragSpec, typename TConfig, typename TContigId>
+inline void
+consensusCalling(FragmentStore<TFragSpec, TConfig>& fragStore,
+				 TContigId contigId,
+				 MajorityVote)
+{
+	typedef FragmentStore<TFragSpec, TConfig> TFragmentStore;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename TFragmentStore::TReadSeq TReadSeq;
+	typedef typename Value<TReadSeq>::Type TAlphabet;
+	typedef char TValue;
+
+	// Convert the contig to an alignment matrix
+	typedef String<TValue> TAlignMat;
+	TAlignMat mat;
+	TSize maxCoverage;
+	convertAlignment(fragStore, mat, contigId, maxCoverage);
+
+	// Call the consensus
+	String<TValue> gappedConsensus;
+	consensusCalling(mat, gappedConsensus, maxCoverage, TAlphabet(), MajorityVote());
+
+	// Assign the new consensus
+	assignGappedConsensus(fragStore, gappedConsensus, contigId);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Old proprietary FastaReadFormat
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Format.value.FastaReadFormat:
+	Fasta read format to write a multi-read alignment.
+..include:seqan/consensus.h
+*/
+
+struct FastaReadFormat_;
+typedef Tag<FastaReadFormat_> const FastaReadFormat;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TSpec, typename TConfig>
+inline void 
+write(TFile & file,
+	  FragmentStore<TSpec, TConfig>& fragStore,
+	  FastaReadFormat) 
+{
+	SEQAN_CHECKPOINT
+	// Basic types
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename TFragmentStore::TContigPos TContigPos;
+	typedef typename Value<TFile>::Type TValue;
+	typedef char TMultiReadChar;
+	TMultiReadChar gapChar = gapValue<TMultiReadChar>();
+
+	typedef typename Iterator<typename TFragmentStore::TContigStore, Standard>::Type TContigIter;
+	TContigIter contigIt = begin(fragStore.contigStore, Standard() );
+	TContigIter contigItEnd = end(fragStore.contigStore, Standard() );
+	for(TSize idCount = 0;contigIt != contigItEnd; ++contigIt, ++idCount) {
+		// Alignment matrix
+		typedef String<TMultiReadChar> TAlignMat;
+		TAlignMat mat;
+		TSize maxCoverage;
+		String<TSize> readSlot;
+		convertAlignment(fragStore, mat, idCount, maxCoverage, readSlot);
+		TSize len = length(mat) / maxCoverage;
+		
+		// Gapped consensus sequence
+		typedef String<TMultiReadChar> TGappedConsensus;
+		TGappedConsensus gappedConsensus;
+		getGappedConsensus(fragStore, gappedConsensus, idCount);
+
+		// Print the alignment matrix
+		String<TSize> coverage;
+		resize(coverage, len, 0);
+		typedef typename Iterator<TGappedConsensus, Standard>::Type TConsIter;
+		TConsIter itCons = begin(gappedConsensus, Standard());
+		TSize winSize = 60;
+		int offset = 2;
+		TSize column = 0;
+		while (column<len) {
+			TSize window_end = column + winSize;
+			if (window_end >= len) window_end = len;
+			// Position
+			for(int i = 0; i<offset - 2; ++i) _streamPut(file,' ');
+			_streamWrite(file,"Pos: ");
+			_streamPutInt(file, column);
+			_streamPut(file,'\n');
+			// Ruler
+			for(int i = 0; i<offset + 3; ++i) _streamPut(file,' ');
+			for(TSize local_col = 1; local_col<window_end - column + 1; ++local_col) {
+				if ((local_col % 10)==0) _streamPut(file, ':');
+				else if ((local_col % 5)==0) _streamPut(file, '.');
+				else _streamPut(file, ' ');
+			}
+			_streamPut(file,'\n');
+			// Matrix
+			for(TSize row = 0; row<maxCoverage; ++row) {
+				TSize tmp = row;
+				int off = 0;
+				while (tmp / 10 != 0) {
+					tmp /= 10;
+					++off;
+				}
+				for(int i = 0; i<offset - off; ++i) _streamPut(file,' ');
+				_streamPutInt(file, row);
+				_streamPut(file,':');
+				_streamPut(file,' ');
+				for(TSize local_col = column; local_col<window_end; ++local_col) {
+					_streamPut(file, mat[row * len + local_col]);
+					if (mat[row * len + local_col] != '.') ++coverage[local_col];
+				}
+				_streamPut(file,'\n');
+			}
+			_streamPut(file,'\n');
+	
+			// Consensus
+			for(int i = 0; i<offset; ++i) _streamPut(file,' ');
+			_streamWrite(file,"C: ");
+			for(unsigned int local_col = column; local_col<window_end; ++local_col, ++itCons) 
+				_streamPut(file, *itCons);
+			_streamPut(file,'\n');
+			for(int i = 0; i<offset-1; ++i) _streamPut(file,' ');
+			_streamWrite(file,">2: ");
+			for(unsigned int local_col = column; local_col<window_end; ++local_col) {
+				if (coverage[local_col] > 2) _streamPut(file, gappedConsensus[local_col]);
+				else _streamPut(file, gapChar);
+			}
+			_streamPut(file,'\n');
+			_streamPut(file,'\n');
+			column+=winSize;
+		}
+		_streamPut(file,'\n');
+		_streamPut(file,'\n');
+
+		// Print all aligned reads belonging to this contig
+
+		// Sort according to contigId
+		sortAlignedReads(fragStore.alignedReadStore, SortContigId());
+	
+		// Find range of the given contig
+		typedef typename Iterator<typename TFragmentStore::TAlignedReadStore, Standard>::Type TAlignIter;
+		TAlignIter alignIt = lowerBoundAlignedReads(fragStore.alignedReadStore, idCount, SortContigId());
+		TAlignIter alignItEnd = upperBoundAlignedReads(fragStore.alignedReadStore, idCount, SortContigId());
+
+		// Sort the reads according to the begin position
+		sortAlignedReads(infix(fragStore.alignedReadStore, alignIt - begin(fragStore.alignedReadStore, Standard()), alignItEnd - begin(fragStore.alignedReadStore, Standard())), SortBeginPos());
+		TAlignIter alignItTmp = lowerBoundAlignedReads(fragStore.alignedReadStore, idCount, SortContigId());
+		TAlignIter alignItTmpEnd = upperBoundAlignedReads(fragStore.alignedReadStore, idCount, SortContigId());
+		String<std::pair<TSize, TSize> > idToPos;
+		reserve(idToPos, alignItTmpEnd - alignItTmp);
+		for(TSize iCount = 0; alignItTmp!=alignItTmpEnd; ++iCount, ++alignItTmp) 
+			appendValue(idToPos, std::make_pair(alignItTmp->id, readSlot[iCount]));
+		::std::sort(begin(idToPos, Standard()), end(idToPos, Standard()));
+
+		// Sort the reads according to the id
+		sortAlignedReads(infix(fragStore.alignedReadStore, alignIt - begin(fragStore.alignedReadStore, Standard()), alignItEnd - begin(fragStore.alignedReadStore, Standard())), SortId());
+		alignIt = lowerBoundAlignedReads(fragStore.alignedReadStore, idCount, SortContigId());
+		alignItEnd = upperBoundAlignedReads(fragStore.alignedReadStore, idCount, SortContigId());
+
+		bool noNamesPresent = (length(fragStore.readNameStore) == 0);
+		for(TSize iCount = 0;alignIt != alignItEnd; ++alignIt, ++iCount) {
+
+			// Print all reads
+			_streamWrite(file,"typ:");
+			if (!noNamesPresent) {
+				_streamPut(file,'R');
+				_streamPutInt(file, iCount);
+			} else _streamWrite(file, fragStore.readNameStore[alignIt->readId]);
+			_streamPut(file,'\n');
+			_streamWrite(file,"seq:");
+			_streamWrite(file, fragStore.readSeqStore[alignIt->readId]);
+			_streamPut(file,'\n');
+			_streamWrite(file,"Pos:");
+			_streamPutInt(file, alignIt->beginPos);
+			_streamPut(file,',');
+			_streamPutInt(file, alignIt->endPos);
+			_streamPut(file,'\n');
+#ifndef CELERA_OFFSET
+			TSize begClr = 0;
+			TSize endClr = 0;
+			getClrRange(fragStore, *alignIt, begClr, endClr);
+			_streamWrite(file,"clr:");
+			_streamPutInt(file, begClr);
+			_streamPut(file,',');
+			_streamPutInt(file, endClr);
+			_streamPut(file,'\n');
+#endif
+			std::stringstream gapCoords;
+			TSize letterCount = 0;
+			TSize gapCount = 0;
+			for(TContigPos column = _min(alignIt->beginPos, alignIt->endPos); column < _max(alignIt->beginPos, alignIt->endPos); ++column) {
+				if (mat[idToPos[iCount].second * len + column] == gapChar) {
+					++gapCount;
+					gapCoords << letterCount << ' ';
+				} else ++letterCount;
+			}
+			_streamWrite(file,"dln:");
+			_streamPutInt(file, gapCount);
+			_streamPut(file,'\n');
+			_streamWrite(file,"del:");
+			_streamWrite(file, gapCoords.str().c_str());
+			_streamPut(file,'\n');
+			_streamPut(file,'\n');
+
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Read simulator format: Simple fasta read file with positions
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TFile, typename TSpec, typename TConfig, typename TFilePath>
+inline bool 
+_convertSimpleReadFile(TFile& file,
+					   FragmentStore<TSpec, TConfig>& fragStore,
+					   TFilePath& filePath, 
+					   bool moveToFront)
+{
+	SEQAN_CHECKPOINT
+	// Basic types
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Id<TFragmentStore>::Type TId;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename Value<TFile>::Type TValue;
+	typedef typename TFragmentStore::TContigPos TPos;
+	typedef typename TFragmentStore::TReadSeq TReadSeq;
+
+	// All fragment store element types
+	typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigElement;
+	typedef typename Value<typename TFragmentStore::TLibraryStore>::Type TLibraryStoreElement;
+	typedef typename Value<typename TFragmentStore::TMatePairStore>::Type TMatePairElement;
+	typedef typename Value<typename TFragmentStore::TReadStore>::Type TReadStoreElement;
+	typedef typename Value<typename TFragmentStore::TAlignedReadStore>::Type TAlignedElement;
+	
+
+	// All maps to mirror file ids to our internal ids
+	typedef std::map<TId, TId> TIdMap;
+	TIdMap libIdMap;
+	TIdMap frgIdMap;
+	TIdMap readIdMap;
+
+
+	// Parse the file and convert the internal ids
+	TPos maxPos = 0;
+	TPos minPos = MaxValue<TPos>::VALUE;
+	TId count = 0;
+	TValue c;
+	if ((!file) || (_streamEOF(file))) return false;
+	else c = _streamGet(file);
+	while (!_streamEOF(file)) {
+		if (_streamEOF(file)) break;
+
+		// New read?
+		if (c == '>') {
+			TAlignedElement alignEl;
+			TId id = count;
+			TId fragId = count;
+			TId repeatId = 0;
+			
+			c = _streamGet(file);
+			_parseSkipWhitespace(file, c);
+
+			// Get the layout positions
+			alignEl.beginPos = _parseReadNumber(file, c);
+			c = _streamGet(file);
+			_parseSkipWhitespace(file, c);
+			alignEl.endPos = _parseReadNumber(file, c);
+			
+			// Any attributes?
+			String<char> eid;
+			String<char> qlt;
+			TReadSeq seq;
+			if (c == '[') {
+				String<char> fdIdentifier;
+				while (c != ']') {
+					c = _streamGet(file);
+					_parseSkipWhitespace(file, c);
+					clear(fdIdentifier);
+					_parseReadIdentifier(file, fdIdentifier, c);
+					if (fdIdentifier == "id") {
+						c = _streamGet(file);
+						id = _parseReadNumber(file, c);
+					} else if (fdIdentifier == "fragId") {
+						c = _streamGet(file);
+						fragId = _parseReadNumber(file, c);
+					} else if (fdIdentifier == "repeatId") {
+						c = _streamGet(file);
+						repeatId = _parseReadNumber(file, c);
+					} else if (fdIdentifier == "eid") {
+						c = _streamGet(file);
+						while ((c != ',') && (c != ']')) {
+							appendValue(eid, c, Generous());
+							c = _streamGet(file);
+						}
+					} else if (fdIdentifier == "qlt") {
+						c = _streamGet(file);
+						while ((c != ',') && (c != ']')) {
+							appendValue(qlt, c, Generous());
+							c = _streamGet(file);
+						}
+					} else {
+						// Jump to next attribute
+						while ((c != ',') && (c != ']')) {
+							c = _streamGet(file);
+						}
+					}
+				}
+			}
+			_parseSkipLine(file, c);
+			_parseSkipWhitespace(file, c);
+			while ((!_streamEOF(file)) && (c != '>')) {
+				_parseReadSequenceData(file,c, seq);
+				_parseSkipWhitespace(file, c);
+			}
+			
+			// Set quality
+			typedef typename Iterator<TReadSeq, Standard>::Type TReadIter;
+			typedef typename Iterator<String<char> >::Type TQualIter;
+			TReadIter begIt = begin(seq, Standard() );
+			TReadIter begItEnd = begin(seq, Standard() );
+			if (length(qlt)) {
+				TQualIter qualIt = begin(qlt);
+				TQualIter qualItEnd = end(qlt);
+				for(;qualIt != qualItEnd; goNext(qualIt), goNext(begIt)) assignQualityValue(value(begIt), value(qualIt));
+			} else {
+				for(;begIt != begItEnd; goNext(begIt)) assignQualityValue(value(begIt), 'D');
+			}
+
+			// Set eid if not given
+			if (empty(eid)) {
+				std::stringstream input;
+				input << "R" << id;
+				input << "-" << repeatId;
+				eid = input.str().c_str();
+			}
+
+			// Insert the read
+			readIdMap.insert(std::make_pair(id, length(fragStore.readStore)));
+			appendRead(fragStore, seq, fragId);
+			appendValue(fragStore.readNameStore, eid, Generous());
+
+			// Insert an aligned read
+			TSize readLen = length(seq);
+			if (alignEl.beginPos < alignEl.endPos) {
+				if ((TPos)readLen != alignEl.endPos - alignEl.beginPos) {
+					alignEl.endPos = alignEl.beginPos + readLen;
+				}
+				if (alignEl.beginPos < minPos) minPos = alignEl.beginPos;
+				if (alignEl.endPos > maxPos) maxPos = alignEl.endPos;
+			} else {
+				if ((TPos)readLen != alignEl.beginPos - alignEl.endPos) {
+					alignEl.beginPos = alignEl.endPos + readLen;
+				}
+				if (alignEl.endPos < minPos) minPos = alignEl.endPos;
+				if (alignEl.beginPos > maxPos) maxPos = alignEl.beginPos;
+			}
+			alignEl.readId = id;
+			alignEl.pairMatchId =  fragId;
+			alignEl.contigId = 0;
+			alignEl.id = length(fragStore.alignedReadStore);
+			appendValue(fragStore.alignedReadStore, alignEl, Generous());
+			++count;
+		} else {
+			_parseSkipLine(file, c);
+		}
+	}
+
+	// Read contig or reference sequence
+	TContigElement contigEl;
+	std::string fileName = filePath + 'S';
+	FILE* strmRef = fopen(fileName.c_str(), "rb");
+	String<char> contigEid = "C0";
+	if ((strmRef) && (!_streamEOF(strmRef))) {
+		c = _streamGet(strmRef);
+		while (!_streamEOF(strmRef)) {
+			if (_streamEOF(strmRef)) break;
+			if (c == '>') {
+				clear(contigEid);
+				c = _streamGet(strmRef);
+				while ((c != '\r') && (c != '\n')) {
+					appendValue(contigEid, c, Generous());
+					c = _streamGet(strmRef);
+				}
+				_parseSkipLine(strmRef, c);
+				_parseSkipWhitespace(strmRef, c);
+				while ((!_streamEOF(strmRef)) && (c != '>')) {
+					_parseReadSequenceData(strmRef,c,contigEl.seq);
+					_parseSkipWhitespace(strmRef, c);
+				}
+			} else {
+				_parseSkipLine(strmRef, c);
+			}
+		}
+		fclose(strmRef);
+	}
+	if (empty(contigEl.seq)) {
+		typedef typename TFragmentStore::TContigGapAnchor TContigGapAnchor;
+		if (moveToFront) appendValue(contigEl.gaps, TContigGapAnchor(0, maxPos - minPos), Generous());
+		else appendValue(contigEl.gaps, TContigGapAnchor(0, maxPos), Generous());
+	}
+	appendValue(fragStore.contigStore, contigEl, Generous());
+	appendValue(fragStore.contigNameStore, contigEid, Generous());
+
+
+	// Read fragments
+	fileName = filePath + 'F';
+	FILE* strmFrag = fopen(fileName.c_str(), "rb");
+	if ((strmFrag) && (!_streamEOF(strmFrag))) {
+		c = _streamGet(strmFrag);
+		while (!_streamEOF(strmFrag)) {
+			if (_streamEOF(strmFrag)) break;
+			if (c == '>') {
+				TMatePairElement matePairEl;
+				c = _streamGet(strmFrag);
+				_parseSkipWhitespace(strmFrag, c);
+
+				// Get the fragment id
+				TId id = _parseReadNumber(strmFrag, c);
+			
+				// Any attributes?
+				std::stringstream input;
+				input << "F" << id;
+				String<char> eid(input.str().c_str());
+				if (c == '[') {
+					String<char> fdIdentifier;
+					while (c != ']') {
+						c = _streamGet(strmFrag);
+						_parseSkipWhitespace(strmFrag, c);
+						clear(fdIdentifier);
+						_parseReadIdentifier(strmFrag, fdIdentifier, c);
+						if (fdIdentifier == "libId") {
+							c = _streamGet(strmFrag);
+							matePairEl.libId = _parseReadNumber(strmFrag, c);
+						} else if (fdIdentifier == "eid") {
+							clear(eid);
+							c = _streamGet(strmFrag);
+							while ((c != ',') && (c != ']')) {
+								appendValue(eid, c, Generous());
+								c = _streamGet(strmFrag);
+							}
+						} else {
+							// Jump to next attribute
+							while ((c != ',') && (c != ']')) {
+								c = _streamGet(strmFrag);
+							}
+						}
+					}
+				}
+				_parseSkipLine(strmFrag, c);
+				_parseSkipWhitespace(strmFrag, c);
+
+				// Read the two reads belonging to this mate pair
+				matePairEl.readId[0] = _parseReadNumber(strmFrag, c);
+				c = _streamGet(strmFrag);
+				_parseSkipWhitespace(strmFrag, c);
+				matePairEl.readId[1] = _parseReadNumber(strmFrag, c);
+				_parseSkipLine(strmFrag, c);
+
+				// Insert mate pair
+				if (matePairEl.readId[0] != matePairEl.readId[1]) {
+					frgIdMap.insert(std::make_pair(id, length(fragStore.matePairStore)));
+					appendValue(fragStore.matePairStore, matePairEl, Generous());
+					appendValue(fragStore.matePairNameStore, eid, Generous());
+				}
+			} else {
+				_parseSkipLine(strmFrag, c);
+			}
+		}
+		fclose(strmFrag);
+	}
+	
+
+	// Read libraries
+	fileName = filePath + 'L';
+	FILE* strmLib = fopen(fileName.c_str(), "rb");
+	if ((strmLib) && (!_streamEOF(strmLib))) {
+		c = _streamGet(strmLib);
+		while (!_streamEOF(strmLib)) {
+			if (_streamEOF(strmLib)) break;
+			if (c == '>') {
+
+				TLibraryStoreElement libEl;
+				c = _streamGet(strmLib);
+				_parseSkipWhitespace(strmLib, c);
+
+				// Get the fragment id
+				TId id = _parseReadNumber(strmLib, c);
+			
+				// Any attributes?
+				std::stringstream input;
+				input << "L" << id;
+				String<char> eid(input.str().c_str());
+				if (c == '[') {
+					String<char> fdIdentifier;
+					while (c != ']') {
+						c = _streamGet(strmLib);
+						_parseSkipWhitespace(strmLib, c);
+						clear(fdIdentifier);
+						_parseReadIdentifier(strmLib, fdIdentifier, c);
+						if (fdIdentifier == "eid") {
+							clear(eid);
+							c = _streamGet(strmLib);
+							while ((c != ',') && (c != ']')) {
+								appendValue(eid, c, Generous());
+								c = _streamGet(strmLib);
+							}
+						} else {
+							// Jump to next attribute
+							while ((c != ',') && (c != ']')) {
+								c = _streamGet(strmLib);
+							}
+						}
+					}
+				}
+				_parseSkipLine(strmLib, c);
+				_parseSkipWhitespace(strmLib, c);
+
+				// Read the mean and standard deviation
+				libEl.mean = _parseReadNumber(strmLib, c);
+				c = _streamGet(strmLib);
+				_parseSkipWhitespace(strmLib, c);
+				libEl.std = _parseReadNumber(strmLib, c);
+				_parseSkipLine(strmLib, c);
+
+				// Insert mate pair
+				libIdMap.insert(std::make_pair(id, length(fragStore.libraryStore)));
+				appendValue(fragStore.libraryStore, libEl, Generous());
+				appendValue(fragStore.libraryNameStore, eid, Generous());
+			} else {
+				_parseSkipLine(strmLib, c);
+			}
+		}
+		fclose(strmLib);
+	}
+	
+	
+	// Renumber all ids
+	typedef typename TIdMap::const_iterator TIdMapIter;
+	typedef typename Iterator<typename TFragmentStore::TMatePairStore>::Type TMateIter;
+	TMateIter mateIt = begin(fragStore.matePairStore);
+	TMateIter mateItEnd = end(fragStore.matePairStore);
+	for(;mateIt != mateItEnd; goNext(mateIt)) {
+		if (mateIt->libId != TMatePairElement::INVALID_ID) {
+			TIdMapIter libIdPos = libIdMap.find(mateIt->libId);
+			if (libIdPos != libIdMap.end()) mateIt->libId = libIdPos->second;
+			else mateIt->libId = TMatePairElement::INVALID_ID;
+		}
+		if (mateIt->readId[0] != TMatePairElement::INVALID_ID) {
+			TIdMapIter readIdPos = readIdMap.find(mateIt->readId[0]);
+			if (readIdPos != readIdMap.end()) mateIt->readId[0] = readIdPos->second;
+			else mateIt->readId[0] = TMatePairElement::INVALID_ID;
+		}
+		if (mateIt->readId[1]!= TMatePairElement::INVALID_ID) {
+			TIdMapIter readIdPos = readIdMap.find(mateIt->readId[1]);
+			if (readIdPos != readIdMap.end()) mateIt->readId[1] = readIdPos->second;
+			else mateIt->readId[0] = TMatePairElement::INVALID_ID;
+		}
+	}
+	typedef typename Iterator<typename TFragmentStore::TReadStore>::Type TReadIter;
+	TReadIter readIt = begin(fragStore.readStore);
+	TReadIter readItEnd = end(fragStore.readStore);
+	for(;readIt != readItEnd; goNext(readIt)) {
+		if (readIt->matePairId != TReadStoreElement::INVALID_ID) {
+			TIdMapIter mateIdPos = frgIdMap.find(readIt->matePairId);
+			if (mateIdPos != frgIdMap.end()) readIt->matePairId = mateIdPos->second;
+			else readIt->matePairId = TReadStoreElement::INVALID_ID;
+		}
+	}
+	typedef typename Iterator<typename TFragmentStore::TAlignedReadStore>::Type TAlignIter;
+	TAlignIter alignIt = begin(fragStore.alignedReadStore);
+	TAlignIter alignItEnd = end(fragStore.alignedReadStore);
+	for(;alignIt != alignItEnd; goNext(alignIt)) {
+		if (alignIt->readId != TAlignedElement::INVALID_ID) {
+			TIdMapIter readIdPos = readIdMap.find(alignIt->readId);
+			if (readIdPos != readIdMap.end()) alignIt->readId = readIdPos->second;
+			else alignIt->readId = TAlignedElement::INVALID_ID;
+		}
+		if (moveToFront) {
+			alignIt->beginPos -= minPos;
+			alignIt->endPos -= minPos;
+		}
+	}
+	return true;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Rudimentary write functions for CeleraFrg and Celera Cgb
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TSpec, typename TConfig>
+inline void 
+_writeCeleraFrg(TFile& target,
+				FragmentStore<TSpec, TConfig>& fragStore) 
+{
+
+	SEQAN_CHECKPOINT
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename TFragmentStore::TReadPos TReadPos;
+
+	// Iterate over all aligned reads to get the clear ranges
+	typedef Pair<TReadPos, TReadPos> TClrRange;
+	String<TClrRange> clearStr;
+	resize(clearStr, length(fragStore.readStore));
+	typedef typename Iterator<typename TFragmentStore::TAlignedReadStore>::Type TAlignIter;
+	TAlignIter alignIt = begin(fragStore.alignedReadStore);
+	TAlignIter alignItEnd = end(fragStore.alignedReadStore);
+	for(;alignIt != alignItEnd; goNext(alignIt)) {
+		TReadPos begClr = 0;
+		TReadPos endClr = 0;
+		getClrRange(fragStore, value(alignIt), begClr, endClr);
+		value(clearStr, alignIt->readId) = TClrRange(begClr, endClr);
+	}
+
+	// Write Reads
+	typedef typename Iterator<typename TFragmentStore::TReadStore>::Type TReadIter;
+	TReadIter readIt = begin(fragStore.readStore);
+	TReadIter readItEnd = end(fragStore.readStore);
+	bool noNamesPresent = (length(fragStore.readNameStore) == 0);
+	for(TSize idCount = 0;readIt != readItEnd; goNext(readIt), ++idCount) {
+		_streamWrite(target,"{FRG\n");
+		_streamWrite(target,"act:");
+		_streamPut(target, 'A');
+		_streamPut(target, '\n');
+		_streamWrite(target,"acc:");
+		_streamPutInt(target, idCount + 1);
+		_streamPut(target, '\n');
+		_streamWrite(target,"typ:");
+		_streamPut(target, 'R');
+		_streamPut(target, '\n');
+		if (!noNamesPresent) {
+			_streamWrite(target,"src:\n");
+			_streamWrite(target, value(fragStore.readNameStore, idCount));
+			_streamWrite(target, "\n.\n");
+		}
+		_streamWrite(target,"etm:");
+		_streamPut(target, '0');
+		_streamPut(target, '\n');
+		_streamWrite(target,"seq:\n");
+		typedef typename Iterator<typename TFragmentStore::TReadSeq>::Type TSeqIter;
+		typedef typename Value<typename TFragmentStore::TReadSeq>::Type TAlphabet;
+		TSeqIter seqIt = begin(value(fragStore.readSeqStore, idCount));
+		TSeqIter seqItEnd = end(value(fragStore.readSeqStore, idCount));
+		for(TSize k = 0;seqIt!=seqItEnd;goNext(seqIt), ++k) {
+			if ((k % 70 == 0) && (k != 0)) _streamPut(target, '\n');
+			_streamPut(target, getValue(seqIt));
+		}
+		_streamWrite(target, "\n.\n");
+		_streamWrite(target,"qlt:\n");
+		seqIt = begin(value(fragStore.readSeqStore, idCount));
+		for(TSize k = 0;seqIt!=seqItEnd;goNext(seqIt), ++k) {
+			if ((k % 70 == 0) && (k != 0)) _streamPut(target, '\n');
+			Ascii c = ' ';
+			convertQuality(c, getQualityValue(value(seqIt)));
+			_streamPut(target, c);
+		}
+		_streamWrite(target, "\n.\n");
+		// Note: Clear range does not have to be ordered, e.g. no indication for reverse complemented reads, this is happening in cgb records
+		_streamWrite(target,"clr:");
+		_streamPutInt(target, (value(clearStr, idCount)).i1);
+		_streamPut(target, ',');
+		_streamPutInt(target, (value(clearStr, idCount)).i2);
+		_streamPut(target, '\n');
+		_streamWrite(target,"}\n");
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TFile, typename TSpec, typename TConfig>
+inline void 
+_writeCeleraCgb(TFile& target,
+				FragmentStore<TSpec, TConfig>& fragStore) 
+{
+	SEQAN_CHECKPOINT
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename Id<TFragmentStore>::Type TId;
+	typedef typename TFragmentStore::TReadPos TReadPos;
+
+
+	// Write the first contig
+	TId contigId = 0;
+
+	// Sort the reads according to position
+	sortAlignedReads(fragStore.alignedReadStore, SortBeginPos());
+
+	// Write Header
+	_streamWrite(target,"{IUM\nacc:0\nsrc:\ngen> @@ [0,0]\n.\ncov:0.000\nsta:X\nfur:X\nabp:0\nbbp:0\n");
+	_streamWrite(target,"len:");
+	_streamPutInt(target, length((value(fragStore.contigStore, contigId)).seq));
+	_streamPut(target, '\n');
+	_streamWrite(target,"cns:\n.\nqlt:\n.\nfor:0\n");
+	_streamWrite(target,"nfr:");
+	_streamPutInt(target, length(fragStore.readStore));
+	_streamPut(target, '\n');
+
+	// Write reads
+	typedef typename Iterator<typename TFragmentStore::TAlignedReadStore>::Type TAlignIter;
+	TAlignIter alignIt = begin(fragStore.alignedReadStore);
+	TAlignIter alignItEnd = end(fragStore.alignedReadStore);
+	TSize offsetLeft = _min(alignIt->beginPos, alignIt->endPos);
+	for(;alignIt != alignItEnd; goNext(alignIt)) {
+		if (contigId != alignIt->contigId) continue;
+		_streamWrite(target,"{IMP\n");
+		_streamWrite(target,"typ:");
+		_streamPut(target, 'R');
+		_streamPut(target, '\n');
+		_streamWrite(target,"mid:");
+		_streamPutInt(target, alignIt->readId + 1);
+		_streamPut(target, '\n');
+		_streamWrite(target,"con:");
+		_streamPut(target, '0');
+		_streamPut(target, '\n');
+		_streamWrite(target,"pos:");
+		_streamPutInt(target, alignIt->beginPos - offsetLeft);
+		_streamPut(target, ',');
+		_streamPutInt(target, alignIt->endPos - offsetLeft);
+		_streamPut(target, '\n');
+		_streamWrite(target,"dln:0\n");
+		_streamWrite(target,"del:\n");
+		_streamWrite(target,"}\n");
+	}
+	_streamWrite(target,"}\n");
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/consensus/consensus_generated_forwards.h b/src/SeqAn-1.3/seqan/consensus/consensus_generated_forwards.h
new file mode 100644
index 0000000..7e07cba
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/consensus/consensus_generated_forwards.h
@@ -0,0 +1,304 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_CONSENSUS_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_CONSENSUS_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Bayesian_
+
+struct Bayesian_;       	// "projects/library/seqan/consensus/consensus_base.h"(83)
+
+//____________________________________________________________________________
+// ConsensusOptions
+
+struct ConsensusOptions;       	// "projects/library/seqan/consensus/consensus_base.h"(95)
+
+//____________________________________________________________________________
+// ConsensusScore_
+
+struct ConsensusScore_;       	// "projects/library/seqan/consensus/consensus_score.h"(52)
+
+//____________________________________________________________________________
+// FastaReadFormat_
+
+struct FastaReadFormat_;       	// "projects/library/seqan/consensus/consensus_base.h"(1102)
+
+//____________________________________________________________________________
+// FractionalScore_
+
+struct FractionalScore_;       	// "projects/library/seqan/consensus/consensus_score.h"(57)
+
+//____________________________________________________________________________
+// LessPair_
+
+template <typename TSize> struct LessPair_;       	// "projects/library/seqan/consensus/consensus_library.h"(92)
+
+//____________________________________________________________________________
+// MajorityVote_
+
+struct MajorityVote_;       	// "projects/library/seqan/consensus/consensus_base.h"(74)
+
+//____________________________________________________________________________
+// OverlapLibrary_
+
+struct OverlapLibrary_;       	// "projects/library/seqan/consensus/consensus_base.h"(52)
+
+//____________________________________________________________________________
+// WeightedConsensusScore
+
+template <typename TScore1, typename TScore2> struct WeightedConsensusScore;       	// "projects/library/seqan/consensus/consensus_score.h"(63)
+
+//____________________________________________________________________________
+// _LessTripel
+
+template <typename TSize> struct _LessTripel;       	// "projects/library/seqan/consensus/consensus_library.h"(103)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Bayesian
+
+typedef Tag<Bayesian_> const Bayesian;       	// "projects/library/seqan/consensus/consensus_base.h"(84)
+
+//____________________________________________________________________________
+// ConsensusScore
+
+typedef Tag<ConsensusScore_> const ConsensusScore;       	// "projects/library/seqan/consensus/consensus_score.h"(53)
+
+//____________________________________________________________________________
+// FastaReadFormat
+
+typedef Tag<FastaReadFormat_> const FastaReadFormat;       	// "projects/library/seqan/consensus/consensus_base.h"(1103)
+
+//____________________________________________________________________________
+// FractionalScore
+
+typedef Tag<FractionalScore_> const FractionalScore;       	// "projects/library/seqan/consensus/consensus_score.h"(58)
+
+//____________________________________________________________________________
+// MajorityVote
+
+typedef Tag<MajorityVote_> const MajorityVote;       	// "projects/library/seqan/consensus/consensus_base.h"(75)
+
+//____________________________________________________________________________
+// OverlapLibrary
+
+typedef Tag<OverlapLibrary_> const OverlapLibrary;       	// "projects/library/seqan/consensus/consensus_base.h"(53)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _convertSimpleReadFile
+
+template <typename TFile, typename TSpec, typename TConfig, typename TFilePath> inline bool _convertSimpleReadFile(TFile& file, FragmentStore<TSpec, TConfig>& fragStore, TFilePath& filePath, bool moveToFront);       	// "projects/library/seqan/consensus/consensus_base.h"(1290)
+
+//____________________________________________________________________________
+// _countLetters
+
+template <typename TValue, typename TSpec, typename TCounters, typename TSize, typename TAlphabet> inline void _countLetters(String<TValue, TSpec> const& mat, TCounters& counterValues, TSize alignDepth, TAlphabet);       	// "projects/library/seqan/consensus/consensus_base.h"(742)
+
+//____________________________________________________________________________
+// _getAlignmentStatistics
+
+template <typename TSize, typename TCargo1, typename TCargo2> inline void _getAlignmentStatistics(Nothing&, TSize, TSize, TSize, TCargo1, TCargo2);       	// "projects/library/seqan/consensus/consensus_library.h"(51)
+template <typename TValue, typename TSpec, typename TSize, typename TCargo1, typename TCargo2> inline void _getAlignmentStatistics(String<TValue, TSpec>& dist, TSize i, TSize j, TSize nseq, TCargo1, TCargo2 quality);       	// "projects/library/seqan/consensus/consensus_library.h"(65)
+template <typename TCargo, typename TSpec, typename TSize, typename TCargo1, typename TCargo2> inline void _getAlignmentStatistics(Graph<Undirected<TCargo, TSpec> >& dist, TSize i, TSize j, TSize, TCargo1, TCargo2 quality);       	// "projects/library/seqan/consensus/consensus_library.h"(80)
+
+//____________________________________________________________________________
+// _loadContigReads
+
+template <typename TValue, typename TStrSpec, typename TPosPair, typename TStringSpec, typename TSpec, typename TConfig, typename TId> inline void _loadContigReads(StringSet<TValue, Owner<TStrSpec> >& strSet, String<TPosPair, TStringSpec>& startEndPos, FragmentStore<TSpec, TConfig> const& fragStore, TId const contigId);       	// "projects/library/seqan/consensus/consensus_base.h"(166)
+
+//____________________________________________________________________________
+// _writeCeleraCgb
+
+template <typename TFile, typename TSpec, typename TConfig> inline void _writeCeleraCgb(TFile& target, FragmentStore<TSpec, TConfig>& fragStore);       	// "projects/library/seqan/consensus/consensus_base.h"(1749)
+
+//____________________________________________________________________________
+// _writeCeleraFrg
+
+template <typename TFile, typename TSpec, typename TConfig> inline void _writeCeleraFrg(TFile& target, FragmentStore<TSpec, TConfig>& fragStore);       	// "projects/library/seqan/consensus/consensus_base.h"(1667)
+
+//____________________________________________________________________________
+// appendSegmentMatches
+
+template <typename TString, typename TSpec, typename TId, typename TDiagList, typename TBegEndPos, typename TScore, typename TSize, typename TSegmentMatches, typename TScoreValues, typename TDistance> inline void appendSegmentMatches(StringSet<TString, TSpec> const& str, String<Pair<TId, TId> > const& pList, TDiagList const& dList, TBegEndPos const& begEndPos, TScore const& score_type, TSize thresholdMatchlength, TSize thresholdQuality, TSize maxOvl, TSegmentMatches& matches, TScoreValue [...]
+
+//____________________________________________________________________________
+// assignGappedConsensus
+
+template <typename TSpec, typename TConfig, typename TGappedConsensus, typename TSize> inline void assignGappedConsensus(FragmentStore<TSpec, TConfig>& fragStore, TGappedConsensus& gappedCons, TSize contigId);       	// "projects/library/seqan/consensus/consensus_base.h"(389)
+
+//____________________________________________________________________________
+// assignProfile
+
+template <typename TValue, typename TString> inline void assignProfile(Score<TValue, ConsensusScore>& me, TString const& profile);       	// "projects/library/seqan/consensus/consensus_score.h"(99)
+template <typename TValue, typename TString> inline void assignProfile(Score<TValue, FractionalScore>& me, TString const& profile);       	// "projects/library/seqan/consensus/consensus_score.h"(211)
+template <typename TValue, typename TScore1, typename TScore2, typename TString> inline void assignProfile(Score<TValue, WeightedConsensusScore<TScore1, TScore2> >& me, TString const& profile);       	// "projects/library/seqan/consensus/consensus_score.h"(317)
+
+//____________________________________________________________________________
+// consensusAlignment
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSize, typename TConfigOptions> inline void consensusAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& gOut, String<Pair<TSize, TSize> >& begEndPos, TConfigOptions const& consOpt);       	// "projects/library/seqan/consensus/consensus_base.h"(436)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSize> inline void consensusAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& gOut, String<Pair<TSize, TSize> >& begEndPos);       	// "projects/library/seqan/consensus/consensus_base.h"(494)
+
+//____________________________________________________________________________
+// consensusCalling
+
+template <typename TValue, typename TSpec, typename TGappedCons, typename TAlignDepth, typename TAlphabet> inline void consensusCalling(String<TValue, TSpec> const& mat, TGappedCons& gappedConsensus, TAlignDepth maxCoverage, TAlphabet, Bayesian);       	// "projects/library/seqan/consensus/consensus_base.h"(787)
+template <typename TFragSpec, typename TConfig, typename TContigId> inline void consensusCalling(FragmentStore<TFragSpec, TConfig>& fragStore, TContigId contigId, Bayesian);       	// "projects/library/seqan/consensus/consensus_base.h"(989)
+template <typename TValue, typename TSpec, typename TGappedCons, typename TAlignDepth, typename TAlphabet> inline void consensusCalling(String<TValue, TSpec> const& mat, TGappedCons& gappedConsensus, TAlignDepth maxCoverage, TAlphabet, MajorityVote);       	// "projects/library/seqan/consensus/consensus_base.h"(1021)
+template <typename TFragSpec, typename TConfig, typename TContigId> inline void consensusCalling(FragmentStore<TFragSpec, TConfig>& fragStore, TContigId contigId, MajorityVote);       	// "projects/library/seqan/consensus/consensus_base.h"(1065)
+
+//____________________________________________________________________________
+// convertAlignment
+
+template <typename TSpec, typename TConfig, typename TMatrix, typename TSize2, typename TSize, typename TReadSlot> inline bool convertAlignment(FragmentStore<TSpec, TConfig>& fragStore, TMatrix& mat, TSize2 contigId, TSize& coverage, TReadSlot& slot);       	// "projects/library/seqan/consensus/consensus_base.h"(215)
+template <typename TSpec, typename TConfig, typename TMatrix, typename TSize2, typename TSize> inline bool convertAlignment(FragmentStore<TSpec, TConfig>& fragStore, TMatrix& mat, TSize2 contigId, TSize& coverage);       	// "projects/library/seqan/consensus/consensus_base.h"(329)
+template <typename TSpec, typename TConfig, typename TMatrix> inline bool convertAlignment(FragmentStore<TSpec, TConfig>& fragStore, TMatrix& mat);       	// "projects/library/seqan/consensus/consensus_base.h"(341)
+
+//____________________________________________________________________________
+// getGappedConsensus
+
+template <typename TSpec, typename TConfig, typename TGappedConsensus, typename TSize> inline void getGappedConsensus(FragmentStore<TSpec, TConfig>& fragStore, TGappedConsensus& gappedConsensus, TSize contigId);       	// "projects/library/seqan/consensus/consensus_base.h"(355)
+
+//____________________________________________________________________________
+// insertGap
+
+template <typename TPos, typename TGapAnchor, typename TSpec, typename TGapPos> inline int insertGap(AlignedReadStoreElement<TPos, TGapAnchor, TSpec>& alignedRead, TGapPos const gapPos);       	// "projects/library/seqan/consensus/consensus_realign.h"(84)
+template <typename TAlignedReads, typename TSpec, typename TGapPos> inline int insertGap(String<TAlignedReads, TSpec>& alignedReadStore, TGapPos const gapPos);       	// "projects/library/seqan/consensus/consensus_realign.h"(144)
+
+//____________________________________________________________________________
+// reAlign
+
+template <typename TFragSpec, typename TConfig, typename TAlignedRead, typename TSpec, typename TConsensus, typename TScore, typename TMethod, typename TBandwidth> void reAlign(FragmentStore<TFragSpec, TConfig>& fragStore, String<TAlignedRead, TSpec>& contigReads, TConsensus& consensus, TScore& consScore, TMethod const rmethod, TBandwidth const bandwidth, bool includeReference, double & timeBeforeAlign, double & timeAlign, double & timeAfterAlign );       	// "projects/library/seqan/cons [...]
+template <typename TSpec, typename TConfig, typename TScore, typename TId, typename TMethod, typename TBandwidth> void reAlign(FragmentStore<TSpec, TConfig>& fragStore, TScore& consScore, TId const contigId, TMethod const rmethod, TBandwidth const bandwidth, bool includeReference);       	// "projects/library/seqan/consensus/consensus_realign.h"(523)
+template <typename TSpec, typename TConfig, typename TScore, typename TId, typename TBandwidth> inline void reAlign(FragmentStore<TSpec, TConfig>& fragStore, TScore& consScore, TId const contigId, TBandwidth const bandwidth, bool includeReference);       	// "projects/library/seqan/consensus/consensus_realign.h"(757)
+
+//____________________________________________________________________________
+// removeGap
+
+template <typename TPos, typename TGapAnchor, typename TSpec, typename TGapPos> inline void removeGap(AlignedReadStoreElement<TPos, TGapAnchor, TSpec>& alignedRead, TGapPos const gapPos);       	// "projects/library/seqan/consensus/consensus_realign.h"(47)
+template <typename TAlignedReads, typename TSpec, typename TGapPos> inline void removeGap(String<TAlignedReads, TSpec>& alignedReadStore, TGapPos const gapPos);       	// "projects/library/seqan/consensus/consensus_realign.h"(68)
+
+//____________________________________________________________________________
+// score
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue score(Score<TValue, ConsensusScore> const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &, TSeq2 const &seq2);       	// "projects/library/seqan/consensus/consensus_score.h"(177)
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue score(Score<TValue, FractionalScore> const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &seq1, TSeq2 const &seq2);       	// "projects/library/seqan/consensus/consensus_score.h"(282)
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue score(Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &seq1, TSeq2 const &seq2);       	// "projects/library/seqan/consensus/consensus_score.h"(381)
+
+//____________________________________________________________________________
+// scoreConsensus
+
+template <typename TConsensus> inline int scoreConsensus(TConsensus& consensus);       	// "projects/library/seqan/consensus/consensus_realign.h"(161)
+
+//____________________________________________________________________________
+// scoreGapExtendHorizontal
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendHorizontal( Score<TValue, ConsensusScore> const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/consensus/consensus_score.h"(128)
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendHorizontal( Score<TValue, FractionalScore> const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &seq1, TSeq2 const &);       	// "projects/library/seqan/consensus/consensus_score.h"(235)
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendHorizontal( Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &seq1, TSeq2 const &seq2);       	// "projects/library/seqan/consensus/consensus_score.h"(332)
+
+//____________________________________________________________________________
+// scoreGapExtendVertical
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendVertical( Score<TValue, ConsensusScore> const &, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/consensus/consensus_score.h"(153)
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendVertical( Score<TValue, FractionalScore> const &, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/consensus/consensus_score.h"(259)
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendVertical( Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me, TPos1 pos1, TPos2 pos2, TSeq1 const & seq1, TSeq2 const & seq2);       	// "projects/library/seqan/consensus/consensus_score.h"(357)
+
+//____________________________________________________________________________
+// scoreGapOpenHorizontal
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenHorizontal( Score<TValue, ConsensusScore> const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/consensus/consensus_score.h"(140)
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenHorizontal( Score<TValue, FractionalScore> const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &seq1, TSeq2 const &);       	// "projects/library/seqan/consensus/consensus_score.h"(247)
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenHorizontal( Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &seq1, TSeq2 const &seq2);       	// "projects/library/seqan/consensus/consensus_score.h"(344)
+
+//____________________________________________________________________________
+// scoreGapOpenVertical
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenVertical( Score<TValue, ConsensusScore> const &, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/consensus/consensus_score.h"(165)
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenVertical( Score<TValue, FractionalScore> const &, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/consensus/consensus_score.h"(271)
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenVertical( Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me, TPos1 pos1, TPos2 pos2, TSeq1 const & seq1, TSeq2 const & seq2);       	// "projects/library/seqan/consensus/consensus_score.h"(369)
+
+//____________________________________________________________________________
+// selectPairs
+
+template <typename TString, typename TSpec, typename TBegEndPos, typename TSize, typename TPairList, typename TPos, typename TSpec2> inline void selectPairs(StringSet<TString, TSpec> const& str, TBegEndPos const& begEndPos, TSize bandwidth, TPairList& pList, String<Pair<TPos, TPos>, TSpec2>& dList);       	// "projects/library/seqan/consensus/consensus_library.h"(120)
+
+//____________________________________________________________________________
+// selectPairsIndel
+
+template <typename TString, typename TSpec, typename TBegEndPos, typename TSize, typename TPairList, typename TPos, typename TSpec2> inline void selectPairsIndel(StringSet<TString, TSpec> const& str, TBegEndPos const& begEndPos, TSize lookAround, TPairList& pList, String<Pair<TPos, TPos>, TSpec2>& dList);       	// "projects/library/seqan/consensus/consensus_library.h"(340)
+
+//____________________________________________________________________________
+// updateContig
+
+template <typename TFragSpec, typename TConfig, typename TStringSet, typename TCargo, typename TSpec, typename TContigId> inline void updateContig(FragmentStore<TFragSpec, TConfig>& fragStore, Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TContigId contigId);       	// "projects/library/seqan/consensus/consensus_base.h"(507)
+
+//____________________________________________________________________________
+// write
+
+template <typename TFile, typename TSpec, typename TConfig> inline void write(TFile & file, FragmentStore<TSpec, TConfig>& fragStore, FastaReadFormat);       	// "projects/library/seqan/consensus/consensus_base.h"(1112)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/consensus/consensus_library.h b/src/SeqAn-1.3/seqan/consensus/consensus_library.h
new file mode 100644
index 0000000..979730a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/consensus/consensus_library.h
@@ -0,0 +1,580 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Tobias Rausch <rausch at embl.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_CONSENSUS_LIBRARY_H
+#define SEQAN_HEADER_CONSENSUS_LIBRARY_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize, typename TCargo1, typename TCargo2>
+inline void 
+_getAlignmentStatistics(Nothing&,
+						 TSize,
+						 TSize,
+						 TSize,
+						 TCargo1,
+						 TCargo2)
+{
+	SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSpec, typename TSize, typename TCargo1, typename TCargo2>
+inline void 
+_getAlignmentStatistics(String<TValue, TSpec>& dist,
+						 TSize i,
+						 TSize j,
+						 TSize nseq,
+						 TCargo1,
+						 TCargo2 quality)
+{
+	SEQAN_CHECKPOINT
+	dist[i*nseq + j] = (TValue) (100 - quality);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TSize, typename TCargo1, typename TCargo2>
+inline void 
+_getAlignmentStatistics(Graph<Undirected<TCargo, TSpec> >& dist,
+						 TSize i,
+						 TSize j,
+						 TSize,
+						 TCargo1,
+						 TCargo2 quality)
+{
+	SEQAN_CHECKPOINT
+	addEdge(dist, i, j, (TCargo) (100 - quality));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Layout-based pair selection
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize>
+struct LessPair_ :
+	public ::std::unary_function<Pair<TSize, TSize>, bool>
+{
+	inline bool 
+	operator() (Pair<TSize, TSize> const& a1, Pair<TSize, TSize> const& a2) const {
+		if (a1.i1 == a2.i1) return (a1.i2 < a2.i2);
+		else return (a1.i1 < a2.i1);
+	}
+};
+
+template<typename TSize>
+struct _LessTripel :
+	public ::std::unary_function<Pair<TSize, Triple<TSize, TSize, TSize> >, bool>
+{
+	inline bool 
+	operator() (Pair<TSize, Triple<TSize, TSize, TSize> > const& a1, Pair<TSize, Triple<TSize, TSize, TSize> > const& a2) {
+		return (a1.i1 < a2.i1);
+	}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TBegEndPos, typename TSize, typename TPairList, typename TPos, typename TSpec2>
+inline void 
+selectPairs(StringSet<TString, TSpec> const& str,
+			TBegEndPos const& begEndPos,
+			TSize bandwidth,							
+			TPairList& pList,
+			String<Pair<TPos, TPos>, TSpec2>& dList)
+{
+	SEQAN_CHECKPOINT
+	typedef String<Pair<TPos, TPos>, TSpec2>  TDistanceList;
+	typedef StringSet<TString, TSpec> TStringSet;
+	typedef Pair<TPos, TPos> TDiagPair;
+	typedef typename Value<TPairList>::Type TPair;
+	typedef typename Iterator<TPairList, Standard>::Type TPairIter;
+	typedef typename Iterator<TBegEndPos, Standard>::Type TBegEndIter;
+
+	// Initialization
+	TSize nseq = length(str);
+
+	// Workaround for strange celera behaviour (just for contained reads)
+#ifdef CELERA_OFFSET
+	TSize contained_offset=200;
+#else
+	TSize contained_offset=0;
+#endif
+	
+	// Sort the reads by their first index position
+	TBegEndIter begEndIt = begin(begEndPos, Standard());
+	TBegEndIter begEndItEnd = end(begEndPos, Standard());
+	typedef Triple<TSize, TSize, TSize> TInfo;
+	typedef String<Pair<TSize, TInfo> > TPosIndexList;
+	typedef typename Iterator<TPosIndexList, Standard>::Type TPosIter;
+	TPosIndexList posIndex;
+	resize(posIndex, length(begEndPos));
+	TPosIter posIndexIt = begin(posIndex, Standard());
+	TPosIter posIndexItEnd = end(posIndex, Standard());
+	for(TSize index = 0;begEndIt != begEndItEnd; ++begEndIt, ++posIndexIt, ++index) 
+		*posIndexIt = ((*begEndIt).i1 < (*begEndIt).i2) ? Pair<TSize, TInfo>((*begEndIt).i1,TInfo(index, (*begEndIt).i1, (*begEndIt).i2)) : Pair<TSize, TInfo>((*begEndIt).i2,TInfo(index, (*begEndIt).i1, (*begEndIt).i2));
+	std::sort(begin(posIndex, Standard() ), end(posIndex, Standard() ), _LessTripel<TSize>() );
+
+	// The expected overlap by a pair of reads (represented by its index)
+	typedef String<Pair<TSize, TSize> > TOverlapIndexList;
+	TOverlapIndexList ovlIndex;
+	TSize pairLen = 0;  // Pair Counter
+	TPos const initialRadius = (bandwidth + 1) / 2;
+	TPos const lengthDivider = 5;	// Overlap / 2^lengthDivider is added to the radius
+
+	// Find all overlapping reads
+	TDistanceList preDList;
+	TPairList prePList;
+	reserve(preDList, nseq * 40);
+	reserve(prePList, nseq * 40);
+	reserve(ovlIndex, nseq * 40);
+	posIndexIt = begin(posIndex, Standard());
+	posIndexItEnd = end(posIndex, Standard());
+	for(;posIndexIt != posIndexItEnd; ++posIndexIt) {
+		TSize index1 = ((*posIndexIt).i2).i1;
+		TPos posIi1 = ((*posIndexIt).i2).i2;
+		TPos posIi2 = ((*posIndexIt).i2).i3;
+		bool forwardI = (posIi1 < posIi2) ? true : false;
+		TSize lenI = (posIi1 < posIi2) ? posIi2 - posIi1 : posIi1 - posIi2;
+		TPosIter posIndexIt2 = posIndexIt;
+		++posIndexIt2;
+		for(;posIndexIt2 != posIndexItEnd; ++posIndexIt2) {
+			if ((*posIndexIt).i1 + lenI <= (*posIndexIt2).i1) break;
+			TSize index2 = ((*posIndexIt2).i2).i1;
+			TPos posJi1 = ((*posIndexIt2).i2).i2;
+			TPos posJi2 = ((*posIndexIt2).i2).i3;
+
+			// Diagonal boundaries of the band
+			// Initialization values are used if one read is contained in the other 
+			TSize lenJ = (posJi1 < posJi2) ? posJi2 - posJi1 : posJi1 - posJi2;
+			bool forwardJ = (posJi1 < posJi2) ? true : false;
+			TPos diagLow = -1 * (TPos) lenJ;
+			TPos diagHigh = (TPos) lenI;
+			TPos radius = initialRadius;		// Increased by overlap length
+
+			// Read orientations
+			if (forwardI) {
+				// 1) Forward - Forward
+				if (forwardJ) {
+					if ((posJi2 < posIi2) && (posJi1 < posIi1)) {
+						TPos offset = (posIi1 - posJi1);
+						radius += (posJi2 - posJi1 - offset) >> lengthDivider;
+						if (-1 * offset - radius > diagLow) diagLow = -1 * offset - radius;
+						if (-1 * offset + radius < diagHigh) diagHigh = -1 * offset + radius;
+					} else if ((posJi1 > posIi1) && (posJi2 > posIi2)) {
+						TPos offset = (posJi1 - posIi1);
+						radius += (posIi2 - posIi1 - offset) >> lengthDivider;
+						if (offset + radius < diagHigh) diagHigh = offset + radius;
+						if (offset - radius > diagLow) diagLow = offset - radius;
+					} else {
+						radius += contained_offset;
+						if (posIi1 < posJi1) {
+							TPos offset = (posJi1 - posIi1);
+							radius += (posJi2 - posJi1) >> lengthDivider;
+							if (offset + radius < diagHigh) diagHigh = offset + radius;
+							if (offset - radius > diagLow) diagLow = offset - radius;
+						} else {
+							TPos offset = (posIi1 - posJi1);
+							radius += (posIi2 - posIi1) >> lengthDivider;
+							if (-1 * offset + radius < diagHigh) diagHigh = -1 * offset + radius;
+							if (-1 * offset - radius > diagLow) diagLow = -1 * offset - radius;
+						}
+					}
+				} else { // 2) Forward - Reverse
+					if ((posJi1 < posIi2) && (posJi2 < posIi1)) {
+						TPos offset = (posIi1 - posJi2);
+						radius += (posJi1 - posJi2 - offset) >> lengthDivider;
+						if (-1 * offset + radius < diagHigh) diagHigh = -1 * offset + radius;
+						if (-1 * offset - radius > diagLow) diagLow = -1 * offset - radius;
+					} else if ((posJi2 > posIi1) && (posJi1 > posIi2)) {
+						TPos offset = (posJi2 - posIi1);
+						radius += (posIi2 - posIi1 - offset) >> lengthDivider;
+						if (offset + radius < diagHigh) diagHigh = offset + radius;
+						if (offset - radius > diagLow) diagLow = offset - radius;
+					} else {
+						radius += contained_offset;  
+						if (posIi1 < posJi2) {
+							TPos offset = (posJi2 - posIi1);
+							radius += (posJi1 - posJi2) >> lengthDivider;
+							if (offset + radius < diagHigh) diagHigh = offset + radius;
+							if (offset - radius > diagLow) diagLow = offset - radius;
+						} else {
+							TPos offset = (posIi1 - posJi2);
+							radius += (posIi2 - posIi1) >> lengthDivider;
+							if (-1 * offset + radius < diagHigh) diagHigh = -1 * offset + radius;
+							if (-1 * offset - radius > diagLow) diagLow = -1 * offset - radius;
+						}	
+					}
+				}
+			} else { 
+				// 3) Reverse - Forward
+				if (forwardJ) {
+					if ((posIi1 > posJi2) && (posIi2 > posJi1)) {
+						TPos offset = (posIi2 - posJi1);
+						radius += (posJi2 - posJi1 - offset) >> lengthDivider;
+						if (-1 * offset - radius > diagLow) diagLow = -1 * offset - radius;
+						if (-1 * offset + radius < diagHigh) diagHigh = -1 * offset + radius;
+					} else if ((posJi1 > posIi2) && (posJi2 > posIi1)) {
+						TPos offset = (posJi1 - posIi2);
+						radius += (posIi1 - posIi2 - offset) >> lengthDivider;
+						if (offset + radius < diagHigh) diagHigh = offset + radius;
+						if (offset - radius > diagLow) diagLow = offset - radius;
+					} else {
+						radius += contained_offset;  
+						if (posIi2 < posJi1) {
+							TPos offset = (posJi1 - posIi2);
+							radius += (posJi2 - posJi1) >> lengthDivider;
+							if (offset + radius < diagHigh) diagHigh = offset + radius;
+							if (offset - radius > diagLow) diagLow = offset - radius;
+						} else {
+							TPos offset = (posIi2 - posJi1);
+							radius += (posIi1 - posIi2) >> lengthDivider;
+							if (-1 * offset + radius < diagHigh) diagHigh = -1 * offset + radius;
+							if (-1 * offset - radius > diagLow) diagLow = -1 * offset - radius;
+						}
+					}
+				} else { // 4) Reverse - Reverse
+					if ((posJi1 < posIi1) && (posJi2 < posIi2)) {
+						TPos offset = (posIi2 - posJi2);
+						radius += (posJi1 - posJi2 - offset) >> lengthDivider;
+						if (-1 * offset + radius < diagHigh) diagHigh = -1 * offset + radius;
+						if (-1 * offset - radius > diagLow) diagLow = -1 * offset - radius;
+					} else if ((posJi2 > posIi2) && (posJi1 > posIi1)) {
+						TPos offset = (posJi2 - posIi2);
+						radius += (posIi1 - posIi2 - offset) >> lengthDivider;
+						if (offset + radius < diagHigh) diagHigh = offset + radius;
+						if (offset - radius > diagLow) diagLow = offset - radius;
+					} else {
+						radius += contained_offset;  
+						if (posIi2 < posJi2) {
+							TPos offset = (posJi2 - posIi2);
+							radius += (posJi1 - posJi2) >> lengthDivider;
+							if (offset + radius < diagHigh) diagHigh = offset + radius;
+							if (offset - radius > diagLow) diagLow = offset - radius;
+						} else {
+							TPos offset = (posIi2 - posJi2);
+							radius += (posIi1 - posIi2) >> lengthDivider;
+							if (-1 * offset + radius < diagHigh) diagHigh = -1 * offset + radius;
+							if (-1 * offset - radius > diagLow) diagLow = -1 * offset - radius;
+						}
+					}
+				}
+			}
+
+			// Append this pair of reads
+			if (index1 < index2) {
+				appendValue(prePList, TPair(positionToId(str, index1), positionToId(str, index2)), Generous());
+				appendValue(preDList, TDiagPair(diagLow, diagHigh), Generous());
+			} else {
+				appendValue(prePList, TPair(positionToId(str, index2), positionToId(str, index1)), Generous());
+				appendValue(preDList, TDiagPair(-1 * diagHigh, -1 * diagLow), Generous());
+			}
+			// Estimate the overlap quality
+			TPos avgDiag = (diagLow + diagHigh) / 2;
+			if (avgDiag < 0) avgDiag *= -1;
+			appendValue(ovlIndex, Pair<TSize, TSize>((TSize) (avgDiag), pairLen), Generous()); 
+			++pairLen;
+		}
+	}
+
+	// Sort the pairs, better expected overlaps come first
+	std::sort(begin(ovlIndex, Standard() ), end(ovlIndex, Standard() ), LessPair_<TSize>() );
+	typedef typename Iterator<TOverlapIndexList, Standard>::Type TOVLIter;
+	TOVLIter itOvl = begin(ovlIndex, Standard());
+	TOVLIter itOvlEnd = end(ovlIndex, Standard());
+	reserve(dList, pairLen);
+	reserve(pList, pairLen);
+	for(;itOvl != itOvlEnd; ++itOvl) {
+		TSize count = (*itOvl).i2;
+		appendValue(dList, preDList[count], Generous());
+		appendValue(pList, prePList[count], Generous());
+	}
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TBegEndPos, typename TSize, typename TPairList, typename TPos, typename TSpec2>
+inline void 
+selectPairsIndel(StringSet<TString, TSpec> const& str,
+				 TBegEndPos const& begEndPos,
+				 TSize lookAround,
+				 TPairList& pList,
+				 String<Pair<TPos, TPos>, TSpec2>& dList)
+{	
+	SEQAN_CHECKPOINT	
+	typedef String<Pair<TPos, TPos>, TSpec2>  TDistanceList;
+	typedef StringSet<TString, TSpec> TStringSet;
+	typedef Pair<TPos, TPos> TDiagPair;
+	typedef typename Value<TPairList>::Type TPair;
+	typedef typename Iterator<TBegEndPos, Standard>::Type TBegEndIter;
+	
+	TBegEndIter beIt = begin(begEndPos, Standard());
+	TBegEndIter beItEnd = end(begEndPos, Standard());
+	TSize index1 = 0;
+	for(;beIt != beItEnd; ++beIt, ++index1) {
+		TPos beg2 = (beIt->i2 < beIt->i1) ? beIt->i2 : beIt->i1;
+		TPos diagHigh = (beIt->i2 < beIt->i1) ? beIt->i1 - beIt->i2 : beIt->i2 - beIt->i1;
+		TBegEndIter beIt2 = beIt;
+		TSize index2 = index1 + 1;
+		for(;++beIt2 != beItEnd; ++index2) {
+			TPos beg1 = (beIt2->i2 < beIt2->i1) ? beIt2->i2 : beIt2->i1;
+			TPos diagLow = (beIt2->i2 < beIt2->i1) ? beIt2->i2 - beIt2->i1 : beIt2->i1 - beIt2->i2;
+			TPos diff = (beg1 > beg2) ? beg1 - beg2 : beg2 - beg1;
+			if (diff < (TPos) lookAround) {
+				appendValue(pList, TPair(positionToId(str, index1), positionToId(str, index2)), Generous());
+				appendValue(dList, TDiagPair(diagLow, diagHigh), Generous());
+			}
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TId, typename TDiagList, typename TBegEndPos, typename TScore, typename TSize, typename TSegmentMatches, typename TScoreValues, typename TDistance>
+inline void 
+appendSegmentMatches(StringSet<TString, TSpec> const& str,
+					 String<Pair<TId, TId> > const& pList,
+					 TDiagList const& dList,
+					 TBegEndPos const& begEndPos,
+					 TScore const& score_type,
+					 TSize thresholdMatchlength,
+					 TSize thresholdQuality,
+					 TSize maxOvl,
+					 TSegmentMatches& matches,
+					 TScoreValues& scores,
+					 TDistance& dist,
+					 OverlapLibrary)
+{
+	SEQAN_CHECKPOINT
+	typedef StringSet<TString, Dependent<> > TStringSet;
+	typedef String<Pair<TId, TId> > TPairList;
+	typedef typename Value<TScoreValues>::Type TScoreValue;
+	typedef typename Iterator<TPairList, Standard>::Type TPairIter;
+	typedef typename Iterator<TDiagList, Standard>::Type TDiagIter;
+
+	// Initialization
+	TSize nseq = length(str);
+	_resizeWithRespectToDistance(dist, nseq);
+
+	// "Front" and "Back"-overlap counter for each read
+	String<TSize> frontOvl;
+	String<TSize> backOvl;
+	resize(frontOvl, nseq, 0);
+	resize(backOvl, nseq, 0);
+	
+	// Pairwise alignments
+	String<bool> aligned;
+	resize(aligned, length(pList), true);
+	typedef Iterator<String<bool>, Standard>::Type TBoolIter;
+	TBoolIter itAligned = begin(aligned, Standard());
+	TPairIter itPair = begin(pList, Standard());
+	TDiagIter itDiag = begin(dList, Standard());
+	TPairIter itPairEnd = end(pList, Standard());
+	TSize dropCount = 0;
+	for(;itPair != itPairEnd; ++itPair, ++itDiag, ++itAligned) {
+		TId id1 = itPair->i1;
+		TId id2 = itPair->i2;
+		TSize seq1 = idToPosition(str, id1);
+		TSize seq2 = idToPosition(str, id2);
+		if ((frontOvl[seq1] > maxOvl) && (backOvl[seq1] > maxOvl) &&
+			(frontOvl[seq2] > maxOvl) && (backOvl[seq2] > maxOvl)) {
+				++dropCount;
+				continue;
+		}
+
+
+		// Make a pairwise string-set
+		TStringSet pairSet;
+		assignValueById(pairSet, const_cast<StringSet<TString, TSpec>&>(str), id1);
+		assignValueById(pairSet, const_cast<StringSet<TString, TSpec>&>(str), id2);
+		
+
+		// Overlap alignment
+		TSize from = length(matches);
+		TScoreValue myScore = globalAlignment(matches, pairSet, score_type, AlignConfig<true,true,true,true>(), itDiag->i1, itDiag->i2, BandedGotoh() );
+		TSize to = length(matches);
+
+		// Determine a sequence weight
+		TSize matchLen = 0;
+		TSize overlapLen = 0;
+		TSize alignLen = 0;
+		if (from != to) getAlignmentStatistics(matches, pairSet, from, to, matchLen, overlapLen, alignLen);
+
+
+		// Get only the good overlap alignments
+		if ((overlapLen) && ((matchLen * 100) / overlapLen >= thresholdQuality) && (matchLen >= thresholdMatchlength)) {
+
+			//// Debug Code
+			//Graph<Alignment<TStringSet, TSize> > tmp(pairSet);
+			//globalAlignment(tmp, pairSet, score_type, AlignConfig<true,true,true,true>(), (value(itDiag)).i1, (value(itDiag)).i2, BandedGotoh() );
+			////globalAlignment(tmp, pairSet, score_type, Gotoh() );
+			//std::cout << "Match length: " << matchLen << std::endl;
+			//std::cout << "Overlap length: " << overlapLen << std::endl;
+			//std::cout << "Align length: " << alignLen << std::endl;
+			//std::cout << "Quality: " << quality << std::endl;
+			//std::cout << tmp << std::endl;
+
+			// Create a corresponding edge
+			if (seq1<seq2) _getAlignmentStatistics(dist, seq1, seq2, nseq, matchLen, (matchLen * 100) / overlapLen);
+			else _getAlignmentStatistics(dist, seq2, seq1, nseq, matchLen, (matchLen * 100) / overlapLen);
+			
+			// Record the scores
+			resize(scores, to);
+			typedef typename Iterator<TScoreValues, Standard>::Type TScoreIter;
+			TScoreIter itScore = begin(scores, Standard());
+			TScoreIter itScoreEnd = end(scores, Standard());
+			itScore += from;
+			for(;itScore != itScoreEnd; ++itScore) 
+				*itScore = myScore;
+
+			// Update the overlap counter
+			TSize lenLast = matches[from].len; 
+			if (matches[to - 1].begin1 == 0) ++frontOvl[seq1];
+			if (matches[to - 1].begin2 == 0) ++frontOvl[seq2];
+			if (matches[from].begin1 + lenLast == length(pairSet[0])) ++backOvl[seq1];
+			if (matches[from].begin2 + lenLast == length(pairSet[1])) ++backOvl[seq2];
+		} else {
+			resize(matches, from);
+			*itAligned = false;
+		}
+	}
+	//std::cout << "Filtration ration: " << (double) dropCount / (double) length(pList) << std::endl;
+
+	// Find sequences that have no overlap in the front or back
+	String<TSize> noFront;
+	String<TSize> noBack;
+	for(TSize seqI = 0; seqI < nseq; ++seqI) {
+		if (frontOvl[seqI] == 0) appendValue(noFront, seqI, Generous());
+		else if (backOvl[seqI] == 0) appendValue(noBack, seqI, Generous());
+	}
+	// Drop the first and the last sequence
+	typedef typename Iterator<TBegEndPos, Standard>::Type TBegEndIter;
+	TBegEndIter begEndIt = begin(begEndPos, Standard());
+	TBegEndIter begEndItEnd = end(begEndPos, Standard());
+	TSize minVal = maxValue<TSize>();
+	TSize maxVal = 0;
+	for(;begEndIt != begEndItEnd; ++begEndIt) {
+		TSize pos1 = begEndIt->i1;
+		TSize pos2 = begEndIt->i2;
+		if (pos1 > pos2) { TSize tmp = pos1; pos1 = pos2; pos2 = tmp;}
+		if (pos1 < minVal) minVal = pos1;
+		if (pos2 > maxVal) maxVal = pos2;
+	}
+	// Insert all remaining sequences into a string
+	String<TSize> unalignedReads;
+	for(TSize i = 0; i < (TSize) length(noFront); ++i) {
+		TSize p1 = begEndPos[noFront[i]].i1;
+		TSize p2 = begEndPos[noFront[i]].i2;
+		if (p1 > p2) {TSize tmp = p1; p1 = p2; p2 = tmp; }
+		if (p1 != minVal) appendValue(unalignedReads, noFront[i], Generous());
+	}
+	for(TSize i = 0; i < (TSize) length(noBack); ++i) {
+		TSize p1 = begEndPos[noBack[i]].i1;
+		TSize p2 = begEndPos[noBack[i]].i2;
+		if (p1 > p2) {TSize tmp = p1; p1 = p2; p2 = tmp; }
+		if (p2 != maxVal) appendValue(unalignedReads, noBack[i], Generous());
+	}
+	TSize countUnalignedReads = length(unalignedReads);
+	//std::cout << "Unaligned reads: " << countUnalignedReads << std::endl;
+	if (countUnalignedReads > 0) {
+		// Sort unaligned reads
+		::std::sort(begin(unalignedReads, Standard()), end(unalignedReads, Standard()));
+		
+		// Realign all unaligned sequences
+		itPair = begin(pList, Standard());
+		itDiag = begin(dList, Standard());
+		itAligned = begin(aligned, Standard());
+		for(;itPair != itPairEnd; ++itPair, ++itDiag, ++itAligned) {
+			if (*itAligned == true) continue;
+			TId id1 = itPair->i1;
+			TId id2 = itPair->i2;
+			TSize seq1 = idToPosition(str, id1);
+			TSize seq2 = idToPosition(str, id2);
+			if ((!::std::binary_search(begin(unalignedReads, Standard()), end(unalignedReads, Standard()), seq1)) &&
+				(!::std::binary_search(begin(unalignedReads, Standard()), end(unalignedReads, Standard()), seq2))) 
+				continue;
+			if ((frontOvl[seq1] > maxOvl) && (backOvl[seq1] > maxOvl) &&
+				(frontOvl[seq2] > maxOvl) && (backOvl[seq2] > maxOvl)) 
+				continue;
+
+			// Make a pairwise string-set
+			TStringSet pairSet;
+			assignValueById(pairSet, const_cast<StringSet<TString, TSpec>&>(str), id1);
+			assignValueById(pairSet, const_cast<StringSet<TString, TSpec>&>(str), id2);
+		
+			// Overlap alignment
+			TSize from = length(matches);
+			TScoreValue myScore = globalAlignment(matches, pairSet, score_type, AlignConfig<true,true,true,true>(), Gotoh() );
+			TSize to = length(matches);
+
+			// Determine a sequence weight
+			TSize matchLen = 0;
+			TSize overlapLen = 0;
+			TSize alignLen = 0;
+			getAlignmentStatistics(matches, pairSet, from, to, matchLen, overlapLen, alignLen);
+
+			if (((matchLen * 100) / overlapLen >= 80) && (matchLen >= 5)) {
+				// Create a corresponding edge
+				if (seq1<seq2) _getAlignmentStatistics(dist, seq1, seq2, nseq, matchLen, (matchLen * 100) / overlapLen);
+				else _getAlignmentStatistics(dist, seq2, seq1, nseq, matchLen, (matchLen * 100) / overlapLen);
+
+				// Record the scores
+				resize(scores, to);
+				typedef typename Iterator<TScoreValues, Standard>::Type TScoreIter;
+				TScoreIter itScore = begin(scores, Standard());
+				TScoreIter itScoreEnd = end(scores, Standard());
+				itScore+=from;
+				for(;itScore != itScoreEnd; ++itScore) *itScore = myScore;
+
+				// Update the overlap counter
+				TSize lenLast = matches[from].len; 
+				if (matches[to - 1].begin1 == 0) ++frontOvl[seq1];
+				if (matches[to - 1].begin2 == 0) ++frontOvl[seq2];
+				if (matches[from].begin1 + lenLast == length(pairSet[0])) ++backOvl[seq1];
+				if (matches[from].begin2 + lenLast == length(pairSet[1])) ++backOvl[seq2];
+			} else resize(matches, from);
+		}
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/consensus/consensus_realign.h b/src/SeqAn-1.3/seqan/consensus/consensus_realign.h
new file mode 100644
index 0000000..b1b89dd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/consensus/consensus_realign.h
@@ -0,0 +1,763 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Tobias Rausch <rausch at embl.de>
+// ==========================================================================
+
+#ifndef SEQAN_CONSENSUS_CONSENSUS_REALIGN_H_
+#define SEQAN_CONSENSUS_CONSENSUS_REALIGN_H_
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TPos, typename TGapAnchor, typename TSpec, typename TGapPos>
+inline void
+removeGap(AlignedReadStoreElement<TPos, TGapAnchor, TSpec>& alignedRead,
+		  TGapPos const gapPos) 
+{
+	typedef String<TGapAnchor> TGaps;
+	typedef typename Iterator<TGaps, Standard>::Type TGapIter;
+	if (gapPos < (TGapPos) alignedRead.beginPos) {
+		--alignedRead.beginPos; --alignedRead.endPos;
+	} else if (gapPos < (TGapPos) alignedRead.endPos) {
+		--alignedRead.endPos;
+		TGapIter gapIt = upperBoundGapAnchor(alignedRead.gaps, gapPos - alignedRead.beginPos, SortGapPos() );
+		TGapIter gapItEnd = end(alignedRead.gaps, Standard());
+		// Note: We might create empty gaps here
+		for(;gapIt != gapItEnd; ++gapIt) 
+			--(gapIt->gapPos);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlignedReads, typename TSpec, typename TGapPos>
+inline void
+removeGap(String<TAlignedReads, TSpec>& alignedReadStore,
+		  TGapPos const gapPos) 
+{
+	typedef String<TAlignedReads, TSpec> TAlignedReadStore;
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type TAlignIter;
+
+	TAlignIter alignIt = begin(alignedReadStore, Standard());
+	TAlignIter alignItEnd = end(alignedReadStore, Standard());
+	for(;alignIt != alignItEnd; ++alignIt) 
+		removeGap(*alignIt, gapPos);
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TPos, typename TGapAnchor, typename TSpec, typename TGapPos>
+inline int
+insertGap(AlignedReadStoreElement<TPos, TGapAnchor, TSpec>& alignedRead,
+		  TGapPos const gapPos) 
+{
+	typedef String<TGapAnchor> TGaps;
+	typedef typename Iterator<TGaps, Standard>::Type TGapIter;
+	
+	if (gapPos <= alignedRead.beginPos) {
+		++alignedRead.beginPos; ++alignedRead.endPos;
+		return 0;
+	} else if (gapPos < alignedRead.endPos) {
+		++alignedRead.endPos;
+		TGapIter gapIt = lowerBoundGapAnchor(alignedRead.gaps, gapPos - alignedRead.beginPos, SortGapPos() );
+		TGapIter gapItEnd = end(alignedRead.gaps, Standard());
+		TGapPos insertPos = (gapPos - alignedRead.beginPos);
+		if (gapIt == gapItEnd) {
+			int gapLen = 0;
+			if (gapItEnd != begin(alignedRead.gaps)) {
+				--gapItEnd;
+				gapLen = (int) gapItEnd->gapPos - (int) gapItEnd->seqPos;
+			}
+			appendValue(alignedRead.gaps, TGapAnchor(insertPos - gapLen, insertPos + 1), Generous());
+		}
+		else {		
+			int gapPrev = 0;
+			if (gapIt != begin(alignedRead.gaps)) {
+				TGapIter gapPrevious = gapIt;
+				--gapPrevious;
+				gapPrev = (int) gapPrevious->gapPos - (int) gapPrevious->seqPos;
+			}
+			// If gap is within an existing gap, extend this gap
+			if ((gapIt->gapPos - (((int) gapIt->gapPos - (int) gapIt->seqPos) - gapPrev) <= insertPos) && (gapIt->gapPos >= insertPos)) {
+				for(;gapIt != gapItEnd; ++gapIt) 
+					++(gapIt->gapPos);
+			} else {
+				// Otherwise, create a new gap
+				TGapAnchor tmp = value(gapIt);
+				++tmp.gapPos;
+				gapIt->gapPos = insertPos + 1;
+				gapIt->seqPos = insertPos - gapPrev;
+				do {
+					++gapIt;
+					TGapAnchor newTmp;
+					if (gapIt != gapItEnd) {
+						newTmp = *gapIt;
+						++newTmp.gapPos;
+						*gapIt = tmp;
+					} else appendValue(alignedRead.gaps, tmp, Generous() );
+					tmp = newTmp;
+				} while (gapIt != gapItEnd);
+			}
+		}
+		return 1;
+	}
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlignedReads, typename TSpec, typename TGapPos>
+inline int
+insertGap(String<TAlignedReads, TSpec>& alignedReadStore,
+		  TGapPos const gapPos) 
+{
+	typedef String<TAlignedReads, TSpec> TAlignedReadStore;
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type TAlignIter;
+
+	int numGaps = 0;
+	TAlignIter alignIt = begin(alignedReadStore, Standard());
+	TAlignIter alignItEnd = end(alignedReadStore, Standard());
+	for(;alignIt != alignItEnd; ++alignIt) 
+		numGaps += insertGap(*alignIt, gapPos);
+	return numGaps;
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template<typename TConsensus>
+inline int
+scoreConsensus(TConsensus& consensus)
+{
+	typedef typename Size<TConsensus>::Type TSize;
+	typedef typename Iterator<TConsensus, Standard>::Type TConsIter;
+
+	// Compute the score
+	int score = 0;
+	TConsIter itCons = begin(consensus, Standard() );
+	TConsIter itConsEnd = end(consensus, Standard() );
+	TSize maxCount = 0;
+	TSize sumCount = 0;
+	TSize tmp;
+	for(;itCons != itConsEnd; ++itCons) {
+		maxCount = 0; sumCount = 0;
+		for(TSize i = 0; i < ValueSize<typename Value<TConsensus>::Type>::VALUE; ++i) {
+			if ((tmp = (*itCons).count[i]) > maxCount) maxCount = tmp;
+			sumCount += tmp;
+		}
+		score += (sumCount - maxCount);
+	}
+	return score;
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+// Perform one realignment round.
+// TODO(holtgrew): Rename to reflect this more clearly.
+// TODO(holtgrew): TConsensus/consensus are profiles, really.
+template<typename TFragSpec, typename TConfig, typename TAlignedRead, typename TSpec, typename TConsensus, typename TScore, typename TMethod, typename TBandwidth>
+void 
+reAlign(FragmentStore<TFragSpec, TConfig>& fragStore,
+		String<TAlignedRead, TSpec>& contigReads,
+		TConsensus& consensus,
+		TScore& consScore,
+		TMethod const rmethod,
+		TBandwidth const bandwidth,
+		bool includeReference,
+        double & timeBeforeAlign,
+        double & timeAlign,
+        double & timeAfterAlign
+        )
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef String<TAlignedRead, TSpec> TAlignedReadStore;
+	typedef typename TFragmentStore::TReadPos TReadPos;
+	typedef typename TFragmentStore::TReadSeq TReadSeq;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename TFragmentStore::TReadGapAnchor TGapAnchor;
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type TAlignedReadIter;
+	typedef typename Iterator<TConsensus, Standard>::Type TConsIter;
+
+	// Initialization
+	typedef typename Value<TConsensus>::Type TProfileChar;
+	TSize gapPos = ValueSize<TProfileChar>::VALUE - 1;
+
+	// Remove each fragment and realign it to the profile.
+	TAlignedReadIter beg = begin(contigReads, Standard());
+	TAlignedReadIter alignIt = begin(contigReads, Standard());
+	TAlignedReadIter alignItEnd = end(contigReads, Standard());
+	if (includeReference)
+        --alignItEnd;
+	TConsensus bandConsensus;
+	TConsensus myRead;
+	TConsensus newConsensus;
+    int i = 0;
+	for (; alignIt != alignItEnd; ++alignIt) {
+        double tBegin = sysTime();
+        if (i++ > 1000 || i == 1) {
+            printf("realigning %u/%u\r", unsigned(alignIt-beg), unsigned(alignItEnd-beg));
+            if (i != 1)
+                i = 0;
+            fflush(stdout);
+        }
+		//// Debug code
+		//for(TSize i = 0; i<length(consensus); ++i) {
+		//	std::cout << consensus[i] << std::endl;
+		//}
+		//TAlignedReadIter debugIt = begin(contigReads, Standard() );
+		//TAlignedReadIter debugItEnd = end(contigReads, Standard() );
+		//for(;debugIt != debugItEnd; goNext(debugIt)) {
+		//	std::cout << debugIt->beginPos << ',' << debugIt->endPos << ':';
+		//	typedef typename Iterator<String<TGapAnchor> , Standard>::Type TGapIter;
+		//	TGapIter gapIt = begin(debugIt->gaps, Standard());
+		//	TGapIter gapItEnd = end(debugIt->gaps, Standard());
+		//	for(;gapIt != gapItEnd; goNext(gapIt)) {
+		//		std::cout << '(' << gapIt->seqPos << ',' << gapIt->gapPos << ')' << ',';
+		//	}
+		//	std::cout << std::endl;
+		//}
+
+		TSize itConsPos = 0;
+		TConsIter itCons = begin(consensus, Standard());
+		TConsIter itConsEnd = end(consensus, Standard());
+
+		// Initialize the consensus of the band.
+		clear(myRead);
+		resize(myRead, length(fragStore.readSeqStore[alignIt->readId]), TProfileChar());
+		resize(bandConsensus, 2 * bandwidth + (alignIt->endPos - alignIt->beginPos), Generous());
+		TConsIter bandConsIt = begin(bandConsensus);
+		TConsIter myReadIt = begin(myRead);
+		TReadPos bandOffset = 0;
+		if (bandwidth < (TBandwidth) alignIt->beginPos) {
+			bandOffset = alignIt->beginPos - bandwidth;
+			itCons += bandOffset; itConsPos += bandOffset;
+			SEQAN_ASSERT_LEQ(itCons, itConsEnd);
+		}
+		int leftDiag = (alignIt->beginPos - bandOffset) - bandwidth;
+		int rightDiag = leftDiag + 2 * bandwidth;
+		int increaseBand = 0;
+		int removedBeginPos = 0;
+		int removedEndPos = 0;
+		for (TReadPos iPos = bandOffset; iPos < alignIt->beginPos && itCons != itConsEnd; ++itCons, ++bandConsIt, ++itConsPos, ++iPos)
+			*bandConsIt = *itCons; // fill in positions left of readbegin
+		TSize itConsPosBegin = itConsPos;  // start position of read basically, right? if(itConsPosBegin != alignIt->beginPos) std::cout <<"nicht unbedingt gleich\n";
+		alignIt->beginPos = alignIt->endPos = 0; // So this read is discarded in all gap operations
+
+		// Remove sequence from profile (and add to the consensus??)  // TODO(holtgrew): Add to consensus part right?
+		typedef typename Iterator<TReadSeq, Standard>::Type TReadIter;
+		TReadIter itRead = begin(fragStore.readSeqStore[alignIt->readId], Standard());
+		TReadIter itReadEnd = end(fragStore.readSeqStore[alignIt->readId], Standard());
+		typedef typename Iterator<String<TGapAnchor>, Standard>::Type TReadGapsIter;
+		TReadGapsIter itGaps = begin(alignIt->gaps, Standard());
+		TReadGapsIter itGapsEnd = end(alignIt->gaps, Standard());
+		TReadPos old = 0;
+		int diff = 0;
+		TReadPos clippedBeginPos = 0;
+		TReadPos clippedEndPos = 0;
+		SEQAN_ASSERT_LT(itRead, itReadEnd);
+		if ((itGaps != itGapsEnd) && (itGaps->gapPos == 0)) {
+			old = itGaps->seqPos;
+			clippedBeginPos = old; // gaps at beginning? or really clipped?
+			//std::cout << "clippedBeginPos = " << clippedBeginPos << std::endl;
+			itRead += old;
+			diff -= old;
+			++itGaps;
+			SEQAN_ASSERT_LT(itRead, itReadEnd);
+		}
+		for (; itGaps != itGapsEnd && itCons != itConsEnd; ++itGaps) {
+			// limit should never be larger than read length 
+			TReadPos limit = itGaps->seqPos;
+			SEQAN_ASSERT_LT(itGaps->seqPos, (TReadPos)length(fragStore.readSeqStore[alignIt->readId]));
+			int newDiff = (itGaps->gapPos - limit);
+			SEQAN_ASSERT_LT(itGaps->gapPos, (TReadPos)length(consensus));
+			if (diff > newDiff) {
+				clippedEndPos = diff - newDiff;
+				limit -= clippedEndPos;
+			}
+			for (; old < limit && itCons != itConsEnd && itRead != itReadEnd; ++old, ++itRead) {
+                //SEQAN_ASSERT_LT(itCons, itConsEnd);
+				--(*itCons).count[ordValue(*itRead)];
+				if (!empty(*itCons)) {
+					*bandConsIt = *itCons; 
+					++bandConsIt;
+					++itConsPos;
+					removedEndPos = 0;
+				} else {
+					if (itConsPosBegin != itConsPos) {
+						++increaseBand;
+						++removedEndPos;
+					} else ++removedBeginPos;
+					removeGap(contigReads, itConsPos);
+				}
+				(*myReadIt).count[0] = ordValue(*itRead); 
+				++myReadIt;
+				++itCons;
+                //SEQAN_ASSERT_LT(itRead, itReadEnd);
+			}
+			for (; diff < newDiff && itCons != itConsEnd; ++diff) {
+				++increaseBand;
+				//SEQAN_ASSERT_LT(itCons, itConsEnd);
+				--(*itCons).count[gapPos];
+				if (!empty(*itCons)) {
+					*bandConsIt = *itCons; 
+					++bandConsIt;
+					++itConsPos;
+				} else removeGap(contigReads, itConsPos);
+				++itCons;
+			}
+		}
+		if (!clippedEndPos) {
+			for (; itRead!=itReadEnd && itCons != itConsEnd; ++itRead) {
+				//SEQAN_ASSERT_LT(itCons, itConsEnd);
+                //SEQAN_ASSERT_LT(itRead, itReadEnd);
+				--(*itCons).count[ordValue(*itRead)];  //subtract the read base to get bandConsensus wo myRead
+				if (!empty(*itCons)) {
+					*bandConsIt = *itCons; 
+					++bandConsIt;
+					++itConsPos;
+					removedEndPos = 0;
+				} else {  // only gaps left in this column after removing myRead
+					if (itConsPosBegin != itConsPos) {
+						++increaseBand;
+						++removedEndPos; 
+					} else ++removedBeginPos;
+					removeGap(contigReads, itConsPos);
+				}
+				(*myReadIt).count[0] = ordValue(*itRead);   
+				++myReadIt;
+				++itCons;
+			}
+		}
+		bool singleton = (itConsPosBegin == itConsPos);
+		increaseBand -= removedEndPos;
+
+		// Go further up to the bandwidth
+		for (TReadPos iPos = 0; ((itCons != itConsEnd) && (iPos < (TReadPos) bandwidth)); ++itCons, ++iPos, ++bandConsIt)
+            *bandConsIt = *itCons;
+		resize(bandConsensus, bandConsIt - begin(bandConsensus, Standard()), Generous());
+		resize(myRead, myReadIt - begin(myRead, Standard()), Generous());
+
+		// Realign the consensus with the sequence.
+		typedef StringSet<TConsensus, Dependent<> > TStringSet;
+		TStringSet pairSet;
+		appendValue(pairSet, bandConsensus);
+		appendValue(pairSet, myRead);
+
+		//for(TSize i = 0; i<length( pairSet[0]); ++i) {
+		//	std::cout <<  pairSet[0][i] << std::endl;
+		//}
+		//std::cout << "_______________" << std::endl;
+		//for(TSize i = 0; i<length( pairSet[1]); ++i) {
+		//	std::cout <<   pairSet[1][i] << std::endl;
+		//}
+		//std::cout << "..............." << std::endl;
+
+		typedef String<Fragment<> > TFragmentString;
+		TFragmentString matches;
+		assignProfile(consScore, bandConsensus);
+
+        double tBegAlign = sysTime();
+		leftDiag -= removedBeginPos;
+		rightDiag -= removedBeginPos;
+		if (!singleton) {
+			if (rmethod == 0)
+                globalAlignment(matches, pairSet, consScore, AlignConfig<true,false,false,true>(), _max(leftDiag - increaseBand, -1 * (int) length(pairSet[1])), _min(rightDiag + increaseBand, (int) length(pairSet[0])), BandedNeedlemanWunsch());
+			else if (rmethod == 1)
+                globalAlignment(matches, pairSet, consScore, AlignConfig<true,false,false,true>(), _max(leftDiag - increaseBand, -1 * (int) length(pairSet[1])), _min(rightDiag + increaseBand, (int) length(pairSet[0])), BandedGotoh());
+		}
+        double tEndAlign = sysTime();
+
+		//// Debug code
+		//Graph<Alignment<TStringSet, void, WithoutEdgeId> > g1(pairSet);
+		//int sc1 = globalAlignment(g1, consScore, AlignConfig<true,false,false,true>(), _max(leftDiag - increaseBand, -1 * (int) length(pairSet[1])), _min(rightDiag + increaseBand, (int) length(pairSet[0])), BandedGotoh());
+		//std::cout << sc1 << std::endl;
+		//std::cout << g1 << std::endl;
+		
+		// Add the read back to the consensus and build the new consensus.
+		resize(newConsensus, length(bandConsensus) + length(myRead), Generous());
+		TConsIter newConsIt = begin(newConsensus, Standard());
+		TConsIter bandIt = begin(bandConsensus, Standard());
+		TConsIter bandItEnd = end(bandConsensus, Standard());
+		typedef typename Iterator<TFragmentString, Standard>::Type TFragIter;
+		TFragIter fragIt = end(matches, Standard());
+		TFragIter fragItEnd = begin(matches, Standard());
+		TReadPos consPos = 0;
+		TReadPos readPos = 0;
+		TReadPos alignPos = 0;
+		clear(alignIt->gaps);
+		diff = 0;
+		if (clippedBeginPos) {
+			appendValue(alignIt->gaps, TGapAnchor(clippedBeginPos, 0), Generous() );
+			diff -= clippedBeginPos;
+		}
+		bool firstMatch = true;
+		if (fragIt != fragItEnd) { // walk through segment matches that represent read-msa alignment
+			do {
+				--fragIt;
+				int gapLen = fragIt->begin1 - consPos;
+				if (firstMatch) gapLen = 0; // gap between two adjacent segment matches
+				while (consPos < (TReadPos)fragIt->begin1) { // cons stretch before newCons start
+					SEQAN_ASSERT_LT(bandIt, bandItEnd);
+					SEQAN_ASSERT_LT(newConsIt, end(newConsensus,Standard()));
+					if (!firstMatch) ++(*bandIt).count[gapPos]; // fill with gaps if we are between two segment matches
+					*newConsIt = *bandIt;
+					++newConsIt;
+					++bandIt; 
+					++consPos; 
+					++alignPos;
+				}
+				while (readPos < (TReadPos)fragIt->begin2) { // read stretch before newCons start
+					SEQAN_ASSERT_LT(readPos, (TReadPos)length(fragStore.readSeqStore[alignIt->readId]));
+					SEQAN_ASSERT_LT(newConsIt, end(newConsensus,Standard()));
+					if (gapLen) {
+						diff += gapLen; // add gap of length gaplen to readGaps
+						appendValue(alignIt->gaps, TGapAnchor(clippedBeginPos + readPos, clippedBeginPos + readPos + diff), Generous() );
+						gapLen = 0; // do this only once
+					}
+					int numGaps = insertGap(contigReads, bandOffset + alignPos);
+					TProfileChar tmpChar;
+					++tmpChar.count[myRead[readPos].count[0]];
+					tmpChar.count[gapPos] += numGaps;
+					*newConsIt = tmpChar; ++newConsIt;
+					++readPos; ++alignPos;
+				}
+				for (TSize i = 0; i<fragIt->len; ++i, ++bandIt, ++consPos, ++readPos, ++alignPos, ++newConsIt) {
+					SEQAN_ASSERT_LT(bandIt, bandItEnd);
+					SEQAN_ASSERT_LT(readPos, (TReadPos)length(fragStore.readSeqStore[alignIt->readId]));
+					SEQAN_ASSERT_LT(newConsIt, end(newConsensus,Standard()));
+					if (firstMatch) {
+						firstMatch = false;
+						alignIt->beginPos = bandOffset + consPos;
+					} else if (gapLen) {
+						diff += gapLen;
+						appendValue(alignIt->gaps, TGapAnchor(clippedBeginPos + readPos, clippedBeginPos + readPos + diff), Generous() );
+						gapLen = 0;
+					}
+					SEQAN_ASSERT_LT(bandIt, bandItEnd);
+					++(*bandIt).count[myRead[readPos].count[0]];
+					*newConsIt = *bandIt; 
+				}
+			} while (fragIt != fragItEnd);
+		}
+		
+		for (; readPos < (TReadPos)length(myRead); ++readPos) {
+			int numGaps = insertGap(contigReads, bandOffset + alignPos);
+			TProfileChar tmpChar;
+			++tmpChar.count[myRead[readPos].count[0]];
+			tmpChar.count[gapPos] += numGaps;
+			SEQAN_ASSERT_LT(newConsIt, end(newConsensus,Standard()));
+			*newConsIt = tmpChar; ++newConsIt;
+			++alignPos;
+		}
+		if (singleton) alignIt->beginPos = bandOffset;
+		alignIt->endPos = alignIt->beginPos + clippedBeginPos + readPos + diff;
+		if (clippedEndPos) {
+			diff -= clippedEndPos;
+			appendValue(alignIt->gaps, TGapAnchor(clippedBeginPos + readPos + clippedEndPos, clippedBeginPos + readPos + clippedEndPos + diff), Generous() );
+		}
+		for (; bandIt != bandItEnd; ++bandIt, ++newConsIt) 
+		{
+			SEQAN_ASSERT_LT(newConsIt, end(newConsensus,Standard()));
+			*newConsIt = *bandIt;
+		}
+		resize(newConsensus, newConsIt - begin(newConsensus, Standard()), Generous());
+
+		infix(consensus, bandOffset, itCons - begin(consensus)) = newConsensus;
+        double tEnd = sysTime();
+
+        timeBeforeAlign += tBegAlign - tBegin;
+        timeAlign += tEndAlign - tBegAlign;
+        timeAfterAlign += tEnd -tEndAlign;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+// TODO(holtgrew): realignmentMethod should not be optional or moved to the end of the list.
+// TODO(holtgrew): The method should be selected with an enum instead of an int.
+/**
+.Function.reAlign:
+..summary:Perform realignment similar to Anson-Myers algorithm.
+..signature:reAlignment(fragmentStore, consensusScore, contigId, [realignmentMethod,] bandwidth, includeReference)
+..category:Alignments
+..remark:The consensus sequence will be appended to the readSeqStore of fragmentStore if includeReference is true.
+*/
+template<typename TSpec, typename TConfig, typename TScore, typename TId, typename TMethod, typename TBandwidth>
+void 
+reAlign(FragmentStore<TSpec, TConfig>& fragStore,
+		TScore& consScore,
+		TId const contigId,
+		TMethod const rmethod,
+		TBandwidth const bandwidth,
+		bool includeReference)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename TFragmentStore::TAlignedReadStore TAlignedReadStore;
+	typedef typename TFragmentStore::TReadPos TReadPos;
+	
+	typedef typename TFragmentStore::TContigStore		TContigStore;
+	typedef typename Value<TContigStore>::Type		TContig;
+	typedef typename TFragmentStore::TContigPos 		TContigPos;
+	typedef typename TFragmentStore::TContigSeq 		TContigSeq;
+	typedef Gaps<TContigSeq, AnchorGaps<typename TContig::TGapAnchors> >	TContigGaps;
+	
+	typedef typename TFragmentStore::TReadSeq TReadSeq;
+	typedef typename TFragmentStore::TReadGapAnchor TGapAnchor;
+	typedef typename Value<typename TFragmentStore::TReadSeq>::Type TStoreAlphabet;
+	typedef typename BaseAlphabet<TStoreAlphabet>::Type TAlphabet;
+	typedef typename Value<TAlignedReadStore>::Type TAlignedElement;
+	typedef typename Value<typename TFragmentStore::TReadStore>::Type TReadElement;
+
+    double beginTime, endTime;
+    
+    beginTime = sysTime();
+    // TODO(holtgrew): Unnecessary, only required once.
+	// Sort according to contigId
+	sortAlignedReads(fragStore.alignedReadStore, SortContigId());
+	
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type TAlignIter;
+	TAlignIter alignIt = lowerBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+	TAlignIter alignItEnd = upperBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+
+	// Sort the reads according to their begin position.
+	sortAlignedReads(infix(fragStore.alignedReadStore, alignIt - begin(fragStore.alignedReadStore, Standard()), alignItEnd - begin(fragStore.alignedReadStore, Standard())), SortBeginPos());
+	alignIt = lowerBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+	alignItEnd = upperBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+    endTime = sysTime();
+    std::cerr << "TIME sorting " << endTime - beginTime << std::endl;
+
+    beginTime = sysTime();
+	// Copy all reads belonging to this contig and reverse complement them if necessary.
+	TAlignedReadStore contigReads;  // TODO(holtgrew): Rather contigAlignedReads?
+	TReadPos maxPos = 0;
+	TReadPos minPos = MaxValue<TReadPos>::VALUE;
+	for (; alignIt != alignItEnd; ++alignIt) {
+		if (alignIt->beginPos > alignIt->endPos) {
+			reverseComplement(fragStore.readSeqStore[alignIt->readId]);
+			TAlignedElement alignedEl = *alignIt;
+			TReadPos tmp = alignedEl.beginPos;
+			alignedEl.beginPos = alignedEl.endPos;
+			alignedEl.endPos = tmp;
+			if (alignedEl.beginPos < minPos)
+                minPos = alignedEl.beginPos;
+			if (alignedEl.endPos > maxPos)
+                maxPos = alignedEl.endPos;
+			appendValue(contigReads, alignedEl, Generous() );
+		} else {
+			if (alignIt->beginPos < minPos)
+                minPos = alignIt->beginPos;
+			if (alignIt->endPos > maxPos)
+                maxPos = alignIt->endPos;
+			appendValue(contigReads, value(alignIt), Generous() );
+		}
+	}
+
+    // Append reference sequence to aligned reads for contigs if requested to do so.
+	if (includeReference) {
+		TId dummyReadId = length(fragStore.readSeqStore);
+		appendRead(fragStore, fragStore.contigStore[contigId].seq);
+		appendValue(fragStore.readNameStore, fragStore.contigNameStore[contigId], Generous());
+		fragStore.contigNameStore[contigId] += "Consensus_";
+        
+		TAlignedElement el;
+		el.readId = dummyReadId;
+		el.contigId = contigId;
+		minPos = el.beginPos = 0;
+		TContigGaps contigGaps(fragStore.contigStore[contigId].seq, fragStore.contigStore[contigId].gaps);
+		maxPos = el.endPos = _max(maxPos,(TReadPos)positionSeqToGap(contigGaps,length(fragStore.contigStore[contigId].seq)-1)+1);
+		maxPos = el.endPos = _max(maxPos,(TReadPos)length(fragStore.contigStore[contigId].seq));
+		el.gaps = fragStore.contigStore[contigId].gaps;
+		appendValue(contigReads, el, Generous());
+	}
+    endTime = sysTime();
+    std::cerr << "TIME copying " << endTime - beginTime << std::endl;
+
+    beginTime = sysTime();
+	// Create the consensus sequence
+	TSize gapPos = ValueSize<TAlphabet>::VALUE;
+	typedef ProfileType<TAlphabet> TProfile;
+	typedef String<TProfile> TProfileString;
+	typedef typename Iterator<TProfileString, Standard>::Type TConsIter;
+	TProfileString consensus;
+	resize(consensus, maxPos - minPos, TProfile());
+
+	TConsIter itCons = begin(consensus, Standard() );
+	TConsIter itConsEnd = end(consensus, Standard());
+	TAlignIter contigReadsIt = begin(contigReads, Standard() );
+	TAlignIter contigReadsItEnd = end(contigReads, Standard() );
+	for(;contigReadsIt != contigReadsItEnd; ++contigReadsIt) {
+		contigReadsIt->beginPos -= minPos;
+		contigReadsIt->endPos -= minPos;
+		itCons = begin(consensus, Standard() );
+		itCons += contigReadsIt->beginPos;
+
+		typedef typename Iterator<TReadSeq, Standard>::Type TReadIter;
+		TReadIter itRead = begin(fragStore.readSeqStore[contigReadsIt->readId], Standard() );
+		TReadIter itReadEnd = end(fragStore.readSeqStore[contigReadsIt->readId], Standard() );
+		typedef typename Iterator<String<typename TFragmentStore::TReadGapAnchor>, Standard>::Type TReadGapsIter;
+		TReadGapsIter itGaps = begin(contigReadsIt->gaps, Standard() );
+		TReadGapsIter itGapsEnd = end(contigReadsIt->gaps, Standard() );
+
+		TReadPos old = 0;
+		int diff = 0;
+		bool clippedEnd = false;
+		if ((itGaps != itGapsEnd) && (itGaps->gapPos == 0)) {
+			old = itGaps->seqPos;
+			itRead += old;
+			diff -= old;
+			++itGaps;
+		}
+		for(;itGaps != itGapsEnd; ++itGaps) {
+			TReadPos limit = itGaps->seqPos;
+			int newDiff = (itGaps->gapPos - limit);
+			SEQAN_ASSERT_LT(itGaps->gapPos, (int)length(consensus));
+			if (diff > newDiff) {
+				limit -= (diff - newDiff);
+				clippedEnd = true;
+			}
+			for(;old < limit && itRead != itReadEnd && itCons != itConsEnd; ++old, ++itRead) 
+			{
+				SEQAN_ASSERT_LT(itRead, itReadEnd);
+				++(value(itCons++)).count[ordValue(*itRead)];
+			}
+			for(;diff < newDiff; ++diff) 
+				++(value(itCons++)).count[gapPos];
+		}
+		if (!clippedEnd) {
+			for( ; itRead!=itReadEnd && itCons != itConsEnd;++itRead) 
+				++(value(itCons++)).count[ordValue(*itRead)];
+		}
+	}
+    endTime = sysTime();
+    std::cerr << "TIME consensus " << endTime - beginTime << std::endl;
+	
+    beginTime = sysTime();
+    double tBefore = 0, tAlign = 0, tAfter = 0;
+	reAlign(fragStore, contigReads, consensus, consScore, rmethod, bandwidth, includeReference, tBefore, tAlign, tAfter);
+    fprintf(stderr, "TIME before align: %f s\nTIME align: %f s\nTIME after align: %f s\n", tBefore, tAlign, tAfter);
+    endTime = sysTime();
+    std::cerr << "TIME realign " << endTime - beginTime << std::endl;
+	int score = scoreConsensus(consensus);
+	int oldScore = score + 1;
+	while(score < oldScore) {
+		std::cout << "Score: " << score << std::endl;
+		oldScore = score;
+        double beginTime = sysTime();
+        double tBefore = 0, tAlign = 0, tAfter = 0;
+		reAlign(fragStore, contigReads, consensus, consScore, rmethod, bandwidth, includeReference, tBefore, tAlign, tAfter);
+        fprintf(stderr, "TIME before align: %f s\nTIME align: %f s\nTIME after align: %f s\n", tBefore, tAlign, tAfter);
+        double endTime = sysTime();
+        std::cerr << "TIME realign " << endTime - beginTime << std::endl;
+		score = scoreConsensus(consensus);
+	}
+	std::cout << "FinalScore: " << score << std::endl;
+
+    beginTime = sysTime();
+	// Update all the aligned reads and the new consensus
+	alignIt = lowerBoundAlignedReads(fragStore.alignedReadStore, contigId, SortContigId());
+	TAlignIter contigReadIt = begin(contigReads, Standard());
+	for (; alignIt != alignItEnd; ++alignIt) {
+		if (alignIt->beginPos > alignIt->endPos) {
+			reverseComplement(fragStore.readSeqStore[alignIt->readId]);
+			alignIt->beginPos = contigReadIt->endPos;
+			alignIt->endPos = contigReadIt->beginPos;
+		} else {
+			alignIt->beginPos = contigReadIt->beginPos;
+			alignIt->endPos = contigReadIt->endPos;
+		}
+		// Remove empty gap anchors
+		clear(alignIt->gaps);
+		typedef typename Iterator<TGapAnchor, Standard>::Type TGapIter;
+		TGapIter gapIt = begin(contigReadIt->gaps, Standard());
+		TGapIter gapItEnd = end(contigReadIt->gaps, Standard());
+		int diff = 0;
+		for(;gapIt != gapItEnd; ++gapIt) {
+			if ((int) gapIt->gapPos - (int) gapIt->seqPos != diff) {
+				diff = (int) gapIt->gapPos - (int) gapIt->seqPos;
+				appendValue(alignIt->gaps, *gapIt, Generous() );
+			}
+		}
+		++contigReadIt;
+	}
+	typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigElement;
+	TContigElement& contigEl = fragStore.contigStore[contigId];
+	typedef typename Iterator<TProfileString, Standard>::Type TConsIter;
+	TConsIter itConsensus = begin(consensus, Standard());
+	TConsIter itConsensusEnd = end(consensus, Standard());
+	char gapChar = gapValue<char>();
+	TSize gapLen = 0;
+	TContigPos contigPos = 0;
+	int diff = 0;
+	clear(contigEl.seq);
+	clear(contigEl.gaps);
+	for (; itConsensus != itConsensusEnd; ++itConsensus, ++contigPos) {
+		if ((char) *itConsensus == gapChar) ++gapLen;
+		else {
+			if (gapLen) {
+				diff += (int) gapLen;
+				appendValue(contigEl.gaps, TGapAnchor(contigPos - diff, contigPos), Generous() );
+				gapLen = 0;
+			}
+			// TODO(weese): Here we convert from ProfileChar<Dna5>->Dna5->Dna5Q
+			// instead diverting through Dna5 we could think of directly converting
+			// a profile to a quality value, e.g. like the base caller Phred does.
+			// Therefore the conversion ProfileChar<Dna5> <-> Dna5Q needs to be
+			// defined.
+			appendValue(contigEl.seq, (TAlphabet)value(itConsensus), Generous() );
+		}
+
+	}
+	if (includeReference) 
+		appendValue(fragStore.alignedReadStore, contigReads[length(contigReads) - 1], Generous() );
+    endTime = sysTime();
+    std::cerr << "TIME finalizing " << endTime - beginTime << std::endl;
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+// Forwards to the overload that accepts the alignment method.
+template<typename TSpec, typename TConfig, typename TScore, typename TId, typename TBandwidth>
+inline void 
+reAlign(FragmentStore<TSpec, TConfig>& fragStore,
+		TScore& consScore,
+		TId const contigId,
+		TBandwidth const bandwidth,
+		bool includeReference)
+{
+	reAlign(fragStore, consScore, contigId, 0, bandwidth, includeReference);
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_CONSENSUS_CONSENSUS_REALIGN_H_
diff --git a/src/SeqAn-1.3/seqan/consensus/consensus_score.h b/src/SeqAn-1.3/seqan/consensus/consensus_score.h
new file mode 100644
index 0000000..f7cc565
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/consensus/consensus_score.h
@@ -0,0 +1,388 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Tobias Rausch <rausch at embl.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQAN_CONSENSUS_SCORE_H
+#define SEQAN_HEADER_SEQAN_CONSENSUS_SCORE_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+static const int SEQAN_CONSENSUS_UNITY = 1 << 20;
+
+//////////////////////////////////////////////////////////////////////////////
+// Consensus score tags
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct ConsensusScore_;
+typedef Tag<ConsensusScore_> const ConsensusScore;
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct FractionalScore_;
+typedef Tag<FractionalScore_> const FractionalScore;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TScore1, typename TScore2>
+struct WeightedConsensusScore;
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Scoring classes
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// ConsensusScore
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+class Score<TValue, ConsensusScore>
+{
+public:
+	String<TValue> consensus_set;		// Is the alphabet character part of the consensus set for each column
+
+public:
+	Score() {}
+
+};
+
+template <typename TValue, typename TString>
+inline void
+assignProfile(Score<TValue, ConsensusScore>& me,
+			  TString const& profile)
+{
+	typedef typename Size<TString>::Type TSize;
+	TSize alphSize = ValueSize<typename Value<TString>::Type>::VALUE;
+	resize(me.consensus_set, alphSize * length(profile));
+
+	typedef typename Iterator<TString, Standard>::Type TIter;
+	typedef typename Iterator<String<TValue>, Standard>::Type TConsSetIter;
+	TConsSetIter itConsSet = begin(me.consensus_set, Standard());
+	TIter it = begin(profile, Standard());
+	TIter itEnd = end(profile, Standard());
+	TSize maxCount = 0;
+	for(;it!=itEnd;++it) {
+		maxCount = 0;
+		for(TSize i = 0; i<alphSize; ++i)
+			if ((*it).count[i] > maxCount) maxCount = (*it).count[i];
+		for(TSize i = 0; i<alphSize; ++i, ++itConsSet)
+			*itConsSet = ((*it).count[i] == maxCount)? 0 : (-SEQAN_CONSENSUS_UNITY);
+	}
+}
+
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendHorizontal(
+	Score<TValue, ConsensusScore> const & me,
+	TPos1 pos1,
+	TPos2 pos2,
+	TSeq1 const &,
+	TSeq2 const &)
+{
+	return ((int) pos2 < 0) ? -SEQAN_CONSENSUS_UNITY : me.consensus_set[pos1 * (ValueSize<typename Value<TSeq1>::Type>::VALUE) + (ValueSize<typename Value<TSeq1>::Type>::VALUE - 1)];
+}
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenHorizontal(
+	Score<TValue, ConsensusScore> const & me,
+	TPos1 pos1,
+	TPos2 pos2,
+	TSeq1 const &,
+	TSeq2 const &)
+{
+	return ((int) pos2 < 0) ? -2 * SEQAN_CONSENSUS_UNITY : 2 * me.consensus_set[pos1 * (ValueSize<typename Value<TSeq1>::Type>::VALUE) + (ValueSize<typename Value<TSeq1>::Type>::VALUE - 1)];
+}
+
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendVertical(
+	Score<TValue, ConsensusScore> const &,
+	TPos1,
+	TPos2,
+	TSeq1 const &,
+	TSeq2 const &)
+{
+	return -SEQAN_CONSENSUS_UNITY;
+}
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenVertical(
+	Score<TValue, ConsensusScore> const &,
+	TPos1,
+	TPos2,
+	TSeq1 const &,
+	TSeq2 const &)
+{
+	return -2 * SEQAN_CONSENSUS_UNITY;
+}
+
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+score(Score<TValue, ConsensusScore> const & me,
+	  TPos1 pos1,
+	  TPos2 pos2,
+	  TSeq1 const &,
+	  TSeq2 const &seq2)
+{
+	return me.consensus_set[pos1 * (ValueSize<typename Value<TSeq1>::Type>::VALUE) + seq2[pos2].count[0]];
+}
+
+
+
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FractionalScore
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+class Score<TValue, FractionalScore>
+{
+public:
+	String<int> sum;		// Total number of profile characters in each column
+
+public:
+	Score() {}
+};
+
+
+template <typename TValue, typename TString>
+inline void
+assignProfile(Score<TValue, FractionalScore>& me,
+			  TString const& profile)
+{
+	typedef typename Size<TString>::Type TSize;
+	resize(me.sum, length(profile));
+	typedef typename Iterator<TString, Standard>::Type TIter;
+	typedef typename Iterator<String<int>, Standard>::Type TSumIter;
+	TSumIter itSum = begin(me.sum, Standard());
+	TIter it = begin(profile, Standard());
+	TIter itEnd = end(profile, Standard());
+	for(;it!=itEnd;++it, ++itSum) {
+		*itSum = 0;
+		for(TSize i = 0; i < (TSize) ValueSize<typename Value<TString>::Type>::VALUE; ++i) 
+			*itSum += (*it).count[i];
+	}
+}
+
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendHorizontal(
+	Score<TValue, FractionalScore> const & me,
+	TPos1 pos1,
+	TPos2 pos2,
+	TSeq1 const &seq1,
+	TSeq2 const &)
+{
+	return (( (int) pos2 < 0) || (!me.sum[pos1])) ? -SEQAN_CONSENSUS_UNITY : ((TValue) (( (int) seq1[pos1].count[ValueSize<typename Value<TSeq1>::Type>::VALUE - 1] - me.sum[pos1]) * SEQAN_CONSENSUS_UNITY) / me.sum[pos1]);
+}
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenHorizontal(
+	Score<TValue, FractionalScore> const & me,
+	TPos1 pos1,
+	TPos2 pos2,
+	TSeq1 const &seq1,
+	TSeq2 const &)
+{
+	return (( (int) pos2 < 0) || (!me.sum[pos1])) ? -SEQAN_CONSENSUS_UNITY : ((TValue) (( (int) seq1[pos1].count[ValueSize<typename Value<TSeq1>::Type>::VALUE - 1] - me.sum[pos1]) * SEQAN_CONSENSUS_UNITY) / me.sum[pos1]);
+}
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendVertical(
+	Score<TValue, FractionalScore> const &,
+	TPos1,
+	TPos2,
+	TSeq1 const &,
+	TSeq2 const &)
+{
+	return -SEQAN_CONSENSUS_UNITY;
+}
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenVertical(
+	Score<TValue, FractionalScore> const &,
+	TPos1,
+	TPos2,
+	TSeq1 const &,
+	TSeq2 const &)
+{
+	return -SEQAN_CONSENSUS_UNITY;
+}
+
+template <typename TValue, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+score(Score<TValue, FractionalScore> const & me,
+	  TPos1 pos1,
+	  TPos2 pos2,
+	  TSeq1 const &seq1,
+	  TSeq2 const &seq2)
+{
+	return (!me.sum[pos1]) ? -SEQAN_CONSENSUS_UNITY : ((TValue) (((int) seq1[pos1].count[seq2[pos2].count[0]] - me.sum[pos1]) * SEQAN_CONSENSUS_UNITY) / me.sum[pos1]);
+}
+
+
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// WeightedConsensusScore
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TScore1, typename TScore2>
+class Score<TValue, WeightedConsensusScore<TScore1, TScore2> >
+{
+public:
+	TScore1 sc1;
+	TScore2 sc2;
+
+public:
+	Score() {}
+
+};
+
+
+template <typename TValue, typename TScore1, typename TScore2, typename TString>
+inline void
+assignProfile(Score<TValue, WeightedConsensusScore<TScore1, TScore2> >& me,
+			  TString const& profile)
+{
+	assignProfile(me.sc1, profile);
+	assignProfile(me.sc2, profile);
+}
+
+
+
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendHorizontal(
+	Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me,
+	TPos1 pos1,
+	TPos2 pos2,
+	TSeq1 const &seq1,
+	TSeq2 const &seq2)
+{
+	return (scoreGapExtendHorizontal(me.sc1, pos1, pos2, seq1, seq2) + scoreGapExtendHorizontal(me.sc2, pos1, pos2, seq1, seq2)) / (TValue) 2;
+}
+
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenHorizontal(
+	Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me,
+	TPos1 pos1,
+	TPos2 pos2,
+	TSeq1 const &seq1,
+	TSeq2 const &seq2)
+{
+	return (scoreGapOpenHorizontal(me.sc1, pos1, pos2, seq1, seq2) + scoreGapOpenHorizontal(me.sc2, pos1, pos2, seq1, seq2)) / (TValue) 2;
+}
+
+
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendVertical(
+	Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me,
+	TPos1 pos1,
+	TPos2 pos2,
+	TSeq1 const & seq1,
+	TSeq2 const & seq2)
+{
+	return (scoreGapExtendVertical(me.sc1, pos1, pos2, seq1, seq2) + scoreGapExtendVertical(me.sc2, pos1, pos2, seq1, seq2)) / (TValue) 2;
+}
+
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenVertical(
+	Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me,
+	TPos1 pos1,
+	TPos2 pos2,
+	TSeq1 const & seq1,
+	TSeq2 const & seq2)
+{
+	return (scoreGapOpenVertical(me.sc1, pos1, pos2, seq1, seq2) + scoreGapOpenVertical(me.sc2, pos1, pos2, seq1, seq2)) / (TValue) 2;
+}
+
+
+template <typename TValue, typename TScore1, typename TScore2, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+score(Score<TValue, WeightedConsensusScore<TScore1, TScore2> > const & me,
+	  TPos1 pos1,
+	  TPos2 pos2,
+	  TSeq1 const &seq1,
+	  TSeq2 const &seq2)
+{
+	return (score(me.sc1, pos1, pos2, seq1, seq2) + score(me.sc2, pos1, pos2, seq1, seq2)) / (TValue) 2;
+}
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/file.h b/src/SeqAn-1.3/seqan/file.h
new file mode 100644
index 0000000..39b59cf
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file.h
@@ -0,0 +1,113 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_H
+#define SEQAN_HEADER_FILE_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <iostream>
+#include <climits>
+#include <cstdio>
+#include <list>
+#include <vector>
+#include <map>
+#include <cmath>
+
+#include <seqan/sequence.h>
+#include <seqan/modifier.h>
+
+
+//____________________________________________________________________________
+
+#include <seqan/file/file_forwards.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/file/file_generated_forwards.h>
+#endif
+
+#include <seqan/file/cstream.h>
+#include <seqan/file/stream.h>
+
+#include <seqan/file/chunk_collector.h>
+#include <seqan/file/meta.h>
+
+//____________________________________________________________________________
+// files
+
+#include <seqan/file/file_base.h>
+#include <seqan/file/file_cstyle.h>
+#include <seqan/system.h>	// async file (default file type of File<>)
+
+#include <seqan/file/file_array.h>
+/*#include <seqan/system/file_sync.h>
+#include <seqan/system/system_event.h>
+#include <seqan/system/file_async.h>
+*/
+
+//____________________________________________________________________________
+// file formats
+
+#include <seqan/file/file_filereaderiterator.h>
+#include <seqan/file/file_filereader.h>
+
+#include <seqan/file/file_format.h>
+
+#include <seqan/file/stream_algorithms.h>
+
+//file formats for sequences
+#include <seqan/file/file_format_raw.h>
+#include <seqan/file/file_format_fasta.h>
+#include <seqan/file/file_format_embl.h>
+#include <seqan/file/file_format_genbank.h>
+
+//file formats for alignments
+#include <seqan/file/file_format_fasta_align.h>
+
+//others
+#include <seqan/file/file_format_cgviz.h>
+
+//____________________________________________________________________________
+
+//#include <seqan/file/file_format_guess.h>
+
+//____________________________________________________________________________
+// external strings
+
+#include <seqan/file/file_page.h>
+#include <seqan/file/file_page_raid0.h>
+#include <seqan/file/string_external.h>
+#include <seqan/file/string_mmap.h>
+#include <seqan/file/file_format_mmap.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/chunk_collector.h b/src/SeqAn-1.3/seqan/file/chunk_collector.h
new file mode 100644
index 0000000..d62ba09
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/chunk_collector.h
@@ -0,0 +1,554 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_CHUNK_COLLECTOR_H
+#define SEQAN_HEADER_CHUNK_COLLECTOR_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal.ChunkCollector_:
+..cat:Classes
+..summary:Reads piecewise from stream, collects pieces (chunks) in a vector.
+..signature:ChunkCollector_<Host>
+..param.Host:Type of host object that is used as allocator.
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct ChunkLength
+{
+	enum { VALUE = 1024 };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// StreamChunkCollector_ class: collects content of a stream in chunks
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+class ChunkCollector_
+{
+public:
+	THost * data_host;
+	typename Size<THost>::Type data_length;
+
+	typedef ::std::vector<typename Value<THost>::Type *, ToStdAllocator<THost, typename Value<THost>::Type *> > Chunk_Holder;
+	Chunk_Holder data_chunks; 
+
+public:
+	static int const CHUNK_LENGTH = ChunkLength<ChunkCollector_>::VALUE;
+
+public:
+	ChunkCollector_(THost & _host):
+		data_host(& _host),
+		data_length(0),
+		data_chunks(typename Chunk_Holder::allocator_type(_host))
+	{
+	}
+
+	~ChunkCollector_()
+	{
+		clear(*this);
+	}
+
+};
+
+template <typename THost>
+inline void
+clear(ChunkCollector_<THost> & me)
+{
+   typedef ChunkCollector_<THost> TChunkCollector;
+   typedef typename TChunkCollector::Chunk_Holder Chunk_Holder;
+      
+	typename Chunk_Holder::iterator it = me.data_chunks.begin();
+	typename Chunk_Holder::iterator it_end = me.data_chunks.end();
+
+	for (; it != it_end; ++it)
+	{
+		deallocate(me.data_host, *it, TChunkCollector::CHUNK_LENGTH);
+	}
+
+	me.data_chunks.clear();
+	me.data_length = 0;
+}
+
+template <typename THost>
+inline typename Size<THost>::Type
+length(ChunkCollector_<THost> const & me)
+{
+	return me.data_length;
+}
+
+template <typename THost>
+inline void
+_setLength(ChunkCollector_<THost> & me, typename Size<THost>::Type new_length)
+{
+	me.data_length = new_length;
+}
+
+template <typename THost>
+inline int
+chunkCount(ChunkCollector_<THost> const & me)
+{
+	return me.data_chunks.size();
+}
+
+template <typename THost>
+inline typename Value<THost>::Type *
+getChunk(ChunkCollector_<THost> const & me, int chunk_number)
+{
+	return me.data_chunks[chunk_number];
+}
+
+template <typename THost>
+inline typename Value<THost>::Type *
+createChunk(ChunkCollector_<THost> & me)
+{
+   typedef ChunkCollector_<THost> TChunkCollector;
+	typename Value<THost>::Type * new_chunk;
+	allocate(me.data_host, new_chunk, TChunkCollector::CHUNK_LENGTH);
+	me.data_chunks.push_back(new_chunk);
+	return new_chunk;
+}
+	
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+struct Host<ChunkCollector_<THost> >
+{
+	typedef THost Type;
+};
+
+template <typename THost>
+struct Host<ChunkCollector_<THost> const >
+{
+	typedef THost Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+struct Value<ChunkCollector_<THost> >
+{
+	typedef typename Value<THost>::Type Type;
+};
+
+template <typename THost>
+struct Value<ChunkCollector_<THost> const >
+{
+	typedef typename Value<THost>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+struct GetValue<ChunkCollector_<THost> >
+{
+	typedef typename GetValue<THost>::Type Type;
+};
+
+template <typename THost>
+struct GetValue<ChunkCollector_<THost> const >
+{
+	typedef typename GetValue<THost>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+struct Size<ChunkCollector_<THost> >
+{
+	typedef typename Size<THost>::Type Type;
+};
+
+template <typename THost>
+struct Size<ChunkCollector_<THost> const >
+{
+	typedef typename Size<THost>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct AssignStreamToChunkCollector_
+{
+	template <typename THost, typename TSource>
+	static inline void 
+	assign_(ChunkCollector_<THost> & target,
+		TSource & source)
+	{
+		clear(target);
+
+		while (!_streamEOF(source))
+		{
+			typename Value<THost>::Type * chunk = createChunk(target);
+			typename Size<THost>::Type count = _streamRead(chunk, source, ChunkLength< ChunkCollector_<THost> >::VALUE);
+			_setLength(target, length(target) + count);
+		}
+	}
+
+	template <typename THost, typename TSource>
+	static inline void 
+	assign_(ChunkCollector_<THost> & target,
+		TSource & source,
+		typename Size< ChunkCollector_<THost> >::Type limit)
+	{
+		clear(target);
+
+		while (!_streamEOF(source))
+		{
+			typename Value<THost>::Type * chunk = createChunk(target);
+			typename Size<THost>::Type count = _streamRead(chunk, source, ChunkLength< ChunkCollector_<THost> >::VALUE);
+			_setLength(target, length(target) + count);
+
+			if (length(target) >= limit)
+			{
+				_setLength(target, limit);
+				break;
+			}
+		}
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSource>
+inline void 
+assign(ChunkCollector_<THost> & target,
+	   TSource & source)
+{
+	AssignStreamToChunkCollector_::assign_(target, source);
+}
+template <typename THost, typename TSource>
+inline void 
+assign(ChunkCollector_<THost> & target,
+	   TSource const & source)
+{
+	AssignStreamToChunkCollector_::assign_(target, source);
+}
+
+template <typename THost, typename TSource, typename TSize>
+inline void 
+assign(ChunkCollector_<THost> & target,
+	   TSource & source,
+	   TSize limit)
+{
+	AssignStreamToChunkCollector_::assign_(target, source, limit);
+}
+template <typename THost, typename TSource, typename TSize>
+inline void 
+assign(ChunkCollector_<THost> & target,
+	   TSource const & source,
+	   TSize limit)
+{
+	AssignStreamToChunkCollector_::assign_(target, source, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TExpand>
+struct AssignChunkCollectorToString_
+{
+	template <typename TTarget, typename TSource>
+	static void assign_(
+		TTarget & target, 
+		TSource & source)
+	{
+		typename Size<TTarget>::Type part_length = _clearSpace(target, length(source), TExpand());
+
+		int i_end = chunkCount(source);
+		typename Value<TTarget>::Type * pos = begin(target);
+		for (int i = 0; i < i_end; ++i)
+		{
+			bool is_last_chunk = ( part_length <= ChunkLength<TSource>::VALUE);
+			typename Size<TTarget>::Type chunk_length = (is_last_chunk) ? part_length : ChunkLength<TSource>::VALUE;
+			typename Value<TSource>::Type * chunk = getChunk(source, i);
+			
+			arrayConstructCopy(chunk, chunk + chunk_length, pos);
+			if (is_last_chunk) break;
+			pos += chunk_length;
+		}
+	}
+
+	template <typename TTarget, typename TSource>
+	static void assign_(
+		TTarget & target, 
+		TSource & source,
+		typename Size<TTarget>::Type limit)
+	{
+		typename Size<TTarget>::Type part_length = _clearSpace(target, length(source), limit, TExpand());
+
+		int i_end = chunkCount(source);
+		typename Value<TTarget>::Type * pos = begin(target);
+		for (int i = 0; i < i_end; ++i)
+		{
+			bool is_last_chunk = ( part_length <= ChunkLength<TSource>::VALUE);
+			typename Size<TTarget>::Type chunk_length = (is_last_chunk) ? part_length : ChunkLength<TSource>::VALUE;
+			typename Value<TSource>::Type * chunk = getChunk(source, i);
+			
+			arrayConstructCopy(chunk, chunk + chunk_length, pos);
+			if (is_last_chunk) break;
+			pos += chunk_length;
+		}
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand>
+inline void 
+assign(String<TTargetValue, TTargetSpec> & target,
+	   ChunkCollector_<TSourceHost> const & source,
+	   Tag<TExpand> const /*tag*/)
+{
+	AssignChunkCollectorToString_<Tag<TExpand> const>::assign_(target, source);
+}
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand>
+inline void 
+assign(String<TTargetValue, TTargetSpec> & target,
+	   ChunkCollector_<TSourceHost> const & source,
+	   typename Size< String<TTargetValue, TTargetSpec> >::Type limit,
+	   Tag<TExpand> const /*tag*/)
+{
+	AssignChunkCollectorToString_<Tag<TExpand> const>::assign_(target, source, limit);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TExpand>
+struct AppendChunkCollectorToString_
+{
+	template <typename TTarget, typename TSource>
+	static void append_(
+		TTarget & target, 
+		TSource & source)
+	{
+		typedef typename Size<TTarget>::Type TSize;
+		TSize target_length_old = length(target);
+		TSize part_length = _clearSpace(target, length(source), target_length_old, target_length_old, TExpand());
+
+		int i_end = chunkCount(source);
+		typename Value<TTarget>::Type * pos = begin(target) + target_length_old; //begin(target) was possibly changed by _clearSpace
+		for (int i = 0; i < i_end; ++i)
+		{
+			bool is_last_chunk = ( part_length <= ChunkLength<TSource>::VALUE);
+			typename Size<TTarget>::Type chunk_length = (is_last_chunk) ? part_length : (TSize) ChunkLength<TSource>::VALUE;
+			typename Value<TSource>::Type * chunk = getChunk(source, i);
+			
+			arrayConstructCopy(chunk, chunk + chunk_length, pos);
+			if (is_last_chunk) break;
+			pos += chunk_length;
+		}
+	}
+
+	template <typename TTarget, typename TSource>
+	static void append_(
+		TTarget & target, 
+		TSource & source,
+		typename Size<TTarget>::Type limit)
+	{
+		typedef typename Size<TTarget>::Type TSize;
+		TSize target_length_old = length(target);
+		TSize part_length = _clearSpace(target, length(source), target_length_old, target_length_old, limit, TExpand());
+
+		int i_end = chunkCount(source);
+		typename Value<TTarget>::Type * pos = begin(target) + target_length_old; //begin(target) was possibly changed by _clearSpace
+		for (int i = 0; i < i_end; ++i)
+		{
+			bool is_last_chunk = ( part_length <= ChunkLength<TSource>::VALUE);
+			typename Size<TTarget>::Type chunk_length = (is_last_chunk) ? part_length : (TSize) ChunkLength<TSource>::VALUE;
+			typename Value<TSource>::Type * chunk = getChunk(source, i);
+			
+			arrayConstructCopy(chunk, chunk + chunk_length, pos);
+			if (is_last_chunk) break;
+			pos += chunk_length;
+		}
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand>
+inline void 
+append(String<TTargetValue, TTargetSpec> & target,
+	   ChunkCollector_<TSourceHost> const & source,
+	   Tag<TExpand> const )
+{
+	AppendChunkCollectorToString_<Tag<TExpand> const>::append_(target, source);
+}
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand>
+inline void 
+append(String<TTargetValue, TTargetSpec> & target,
+	   ChunkCollector_<TSourceHost> const & source,
+	   typename Size< String<TTargetValue, TTargetSpec> >::Type limit,
+	   Tag<TExpand> const )
+{
+	AppendChunkCollectorToString_<Tag<TExpand> const>::append_(target, source, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TExpand>
+struct ReplaceChunkCollectorToString_
+{
+	template <typename TTarget, typename TSource>
+	static void replace_(
+		TTarget & target,
+		typename Size<TTarget>::Type pos_begin,
+		typename Size<TTarget>::Type pos_end,
+		TSource & source)
+	{
+		typename Size<TTarget>::Type part_length = _clearSpace(target, length(source), pos_begin, pos_end, TExpand());
+
+		int i_end = chunkCount(source);
+		typename Value<TTarget>::Type * pos = begin(target) + pos_begin;
+		for (int i = 0; i < i_end; ++i)
+		{
+			bool is_last_chunk = ( part_length <= ChunkLength<TSource>::VALUE);
+			typename Size<TTarget>::Type chunk_length = (is_last_chunk) ? part_length : ChunkLength<TSource>::VALUE;
+			typename Value<TSource>::Type * chunk = getChunk(source, i);
+			
+			arrayConstructCopy(chunk, chunk + chunk_length, pos);
+			if (is_last_chunk) break;
+			pos += chunk_length;
+		}
+	}
+
+	template <typename TTarget, typename TSource>
+	static void replace_(
+		TTarget & target, 
+		typename Size<TTarget>::Type pos_begin,
+		typename Size<TTarget>::Type pos_end,
+		TSource & source,
+		typename Size<TTarget>::Type limit)
+	{
+		typename Size<TTarget>::Type part_length = _clearSpace(target, length(source), pos_begin, pos_end, limit, TExpand());
+
+		int i_end = chunkCount(source);
+		typename Value<TTarget>::Type * pos = begin(target) + pos_begin;
+		for (int i = 0; i < i_end; ++i)
+		{
+			bool is_last_chunk = ( part_length <= ChunkLength<TSource>::VALUE);
+			typename Size<TTarget>::Type chunk_length = (is_last_chunk) ? part_length : ChunkLength<TSource>::VALUE;
+			typename Value<TSource>::Type * chunk = getChunk(source, i);
+			
+			arrayConstructCopy(chunk, chunk + chunk_length, pos);
+			if (is_last_chunk) break;
+			pos += chunk_length;
+		}
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand>
+inline void 
+replace(String<TTargetValue, TTargetSpec> & target,
+		typename Size< String<TTargetValue, TTargetSpec> >::Type pos_begin,
+		typename Size< String<TTargetValue, TTargetSpec> >::Type pos_end,
+	   ChunkCollector_<TSourceHost> const & source,
+	   Tag<TExpand> const /*tag*/)
+{
+	ReplaceChunkCollectorToString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand>
+inline void 
+replace(String<TTargetValue, TTargetSpec> & target,
+		typename Size< String<TTargetValue, TTargetSpec> >::Type pos_begin,
+		typename Size< String<TTargetValue, TTargetSpec> >::Type pos_end,
+	   ChunkCollector_<TSourceHost> const & source,
+	   typename Size< String<TTargetValue, TTargetSpec> >::Type limit,
+	   Tag<TExpand> const /*tag*/)
+{
+	ReplaceChunkCollectorToString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTargetValue, typename TSourceHost, typename TExpand>
+inline void 
+replace(TTargetValue * target,
+		size_t pos_begin,
+		size_t pos_end,
+		ChunkCollector_<TSourceHost> const & source,
+		Tag<TExpand> const /*tag*/)
+{
+	ReplaceChunkCollectorToString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+
+template <typename TTargetValue, typename TSourceHost, typename TExpand>
+inline void 
+replace(TTargetValue * target,
+		size_t pos_begin,
+		size_t pos_end,
+		ChunkCollector_<TSourceHost> const & source,
+		size_t limit,
+		Tag<TExpand> const /*tag*/)
+{
+	ReplaceChunkCollectorToString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+//____________________________________________________________________________
+/*
+template <typename TTargetValue, typename TSourceHost, typename TExpand>
+inline void 
+replace(TTargetValue * target,
+		size_t pos_begin,
+		size_t pos_end,
+	   ChunkCollector_<TSourceHost> const & source,
+	   Tag<TExpand> const tag)
+{
+	ReplaceChunkCollectorToString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand>
+inline void 
+replace(String<TTargetValue, TTargetSpec> & target,
+		typename Size< String<TTargetValue, TTargetSpec> >::Type pos_begin,
+		typename Size< String<TTargetValue, TTargetSpec> >::Type pos_end,
+	   ChunkCollector_<TSourceHost> const & source,
+	   typename Size< String<TTargetValue, TTargetSpec> >::Type limit,
+	   Tag<TExpand> const tag)
+{
+	ReplaceChunkCollectorToString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/cstream.h b/src/SeqAn-1.3/seqan/file/cstream.h
new file mode 100644
index 0000000..93257ec
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/cstream.h
@@ -0,0 +1,307 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_CSTREAM_H
+#define SEQAN_HEADER_CSTREAM_H
+ 
+#include <cstdio>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Adaption."std::FILE *":
+..summary:Standard library C style streams.
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// Position is now defined in file/file_cstyle.h
+/*
+template <>
+struct Position<FILE *>
+{
+	typedef long Type;
+};
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <>
+struct Value<FILE *>
+{
+	typedef char Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <>
+struct Position<FILE *>
+{
+	typedef ::std::fpos_t Type;
+};
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct IsTellAndSeekStream_;
+
+template <>
+struct IsTellAndSeekStream_<FILE *>
+{
+	typedef True Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+inline bool 
+_streamOpen(::std::FILE * & me, String<char> path, bool for_read = true)
+{
+SEQAN_CHECKPOINT
+	if (for_read)
+	{
+		me = fopen(toCString(path), "rb");
+	}
+	else
+	{
+		me = fopen(toCString(path), "wb");
+	}
+	return (me != 0);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+inline void 
+_streamClose(::std::FILE * & me)
+{
+SEQAN_CHECKPOINT
+	if (me)
+	{
+		fclose(me);
+		me = 0;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamEOF.param.stream.type:Adaption."std::FILE *"
+
+inline bool 
+_streamEOF(::std::FILE * me)
+{
+SEQAN_CHECKPOINT
+	int c = fgetc(me);
+    ungetc(c, me);
+	return (c == EOF) || ferror(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamRead.param.stream.type:Adaption."std::FILE *"
+
+template <typename TValue>
+inline size_t 
+_streamRead(TValue * target,
+			::std::FILE * source,
+			size_t limit)
+{
+SEQAN_CHECKPOINT
+	return ::std::fread(target, sizeof(TValue), limit, source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamGet.param.stream.type:Adaption."std::FILE *"
+
+inline char 
+_streamGet(::std::FILE * source)
+{
+SEQAN_CHECKPOINT
+	return getc(source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamPut.param.stream.type:Adaption."std::FILE *"
+
+inline void
+_streamPut(::std::FILE * target,
+		   char character)
+{
+SEQAN_CHECKPOINT
+	putc(character, target);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamPut.param.stream.type:Adaption."std::FILE *"
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamTellG.param.stream.type:Adaption."std::FILE *"
+
+inline Position<FILE *>::Type
+_streamTellG(FILE * me)
+{
+SEQAN_CHECKPOINT
+	return ::std::ftell(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamTellP.param.stream.type:Adaption."std::FILE *"
+
+inline Position<FILE *>::Type
+_streamTellP(FILE * me)
+{
+SEQAN_CHECKPOINT
+	return ::std::ftell(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamSeekG.param.stream.type:Adaption."std::FILE *"
+
+inline void
+_streamSeekG(FILE * me,
+			 Position<FILE *>::Type pos)
+{
+SEQAN_CHECKPOINT
+	::std::fseek(me, pos, SEEK_SET);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamSeekP.param.stream.type:Adaption."std::FILE *"
+
+inline void
+_streamSeekP(FILE * me,
+			 Position<FILE *>::Type pos)
+{
+SEQAN_CHECKPOINT
+	::std::fseek(me, pos, SEEK_SET);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamSeek2G.param.stream.type:Adaption."std::FILE *"
+
+inline void
+_streamSeek2G(FILE * me,
+	 int off)
+{
+SEQAN_CHECKPOINT
+	::std::fseek(me, off, SEEK_CUR);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Internal._streamUnget.param.stream.type:Adaption."std::FILE *"
+
+inline void
+_streamUnget(::std::FILE * stream)
+{
+SEQAN_CHECKPOINT
+	_streamSeek2G(stream, -1);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// holder<FILE *>
+
+template <typename THolder>
+inline void
+_holderDeallocate(THolder &, FILE *)
+{
+}
+template <typename THolder>
+inline FILE *
+_holderAllocatePointer(THolder &, FILE * data)
+{
+	return data;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Stream operators for FILE *
+//////////////////////////////////////////////////////////////////////////////
+
+
+// ISO C++ operators are only allowed for classes, not for pointers
+
+/*
+template <typename TSource>
+inline FILE *
+operator << (FILE * target, 
+			 TSource & source)
+{
+SEQAN_CHECKPOINT
+	write(target, source);
+	return target;
+}
+template <typename TSource>
+inline FILE *
+operator << (FILE * target, 
+			 TSource const & source)
+{
+SEQAN_CHECKPOINT
+	write(target, source);
+	return target;
+}
+
+//____________________________________________________________________________
+
+template <typename TTarget>
+inline FILE *
+operator >> (FILE * source, 
+			 TTarget & target)
+{
+SEQAN_CHECKPOINT
+	read(source, target);
+	return source;
+}
+template <typename TTarget>
+inline FILE *
+operator >> (FILE * source, 
+			 TTarget const & target)
+{
+SEQAN_CHECKPOINT
+	read(source, target);
+	return source;
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_array.h b/src/SeqAn-1.3/seqan/file/file_array.h
new file mode 100644
index 0000000..d1a6a71
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_array.h
@@ -0,0 +1,439 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_ARRAY_H
+#define SEQAN_HEADER_FILE_ARRAY_H
+
+#include <sstream>
+#include <iomanip>
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	//template < __int64 FILE_SIZE = 2*1024*1024*1024-1, typename TFile = File<> >
+	//struct Chained;
+
+	//template < unsigned FileCount_ = 2, typename TFile = File<> >
+	//struct Striped;
+
+
+    template < __int64 FILE_SIZE, typename TFile >
+    struct Size< File< Chained<FILE_SIZE, TFile> > >
+    {
+        typedef __int64 Type;
+    };
+
+    template < __int64 FILE_SIZE, typename TFile >
+    struct Position< File< Chained<FILE_SIZE, TFile> > >
+    {
+        typedef __int64 Type;
+    };
+
+    template < __int64 FILE_SIZE, typename TFile >
+    struct Difference< File< Chained<FILE_SIZE, TFile> > >
+    {
+        typedef __int64 Type;
+    };
+
+    template < __int64 FILE_SIZE, typename TFile >
+    struct AsyncRequest< File< Chained<FILE_SIZE, TFile> > >
+    {
+		typedef typename AsyncRequest<TFile>::Type Type;
+    };
+
+
+    template < unsigned FileCount_, typename TFile >
+    struct Size< File< Striped<FileCount_, TFile> > >
+    {
+        typedef __int64 Type;
+    };
+
+    template < unsigned FileCount_, typename TFile >
+    struct Position< File< Striped<FileCount_, TFile> > >
+    {
+        typedef __int64 Type;
+    };
+
+    template < unsigned FileCount_, typename TFile >
+    struct Difference< File< Striped<FileCount_, TFile> > >
+    {
+        typedef __int64 Type;
+    };
+
+    template < unsigned FileCount_, typename TFile >
+    struct AsyncRequest< File< Striped<FileCount_, TFile> > >
+    {
+		typedef typename AsyncRequest<TFile>::Type Type;
+    };
+
+
+	template < unsigned FileCount_, typename TFile >
+	class File< Striped<FileCount_, TFile> >: public Tuple< TFile, FileCount_ > {
+		File(void * /*dummy = NULL*/) {}	// to be compatible with the FILE*(NULL) constructor
+		operator bool() const { return (*this)[0]; }
+	};
+
+    template < __int64 FILE_SIZE, typename TFile >
+	class File< Chained<FILE_SIZE, TFile> >: public String< TFile > {
+		typedef String< TFile > Base;
+
+		::std::string	baseName;
+		int				openMode;
+		__int64			fileSize;
+		bool			temporary;
+
+		File(void * /*dummy = NULL*/) :	// to be compatible with the FILE*(NULL) constructor
+			fileSize(0),
+			_realign(false) {}
+
+	private:
+		
+		bool _realign;
+	
+		template < typename TSize, typename TValue >
+		inline void _alignFloor(TSize _size, TValue const *) {
+			__int64 alignment = sizeof(TValue) * sectorSize(TFile());
+			fileSize = (_size / alignment) * alignment;
+		}
+
+		template < typename TSize, typename TValue >
+		inline void _alignCeil(TSize _size, TValue const *) {
+			__int64 alignment = sizeof(TValue) * sectorSize(TFile());
+			fileSize = ((_size + alignment - 1) / alignment) * alignment;
+		}
+
+	public:
+	
+		inline ::std::string getFileName(int i) const { 
+			::std::stringstream strm;
+			strm << baseName << '.' << ::std::setfill('0') << ::std::setw(3) << i;
+			return strm.str();
+		}
+
+		inline operator bool() const { 
+			return (*this)[0]; 
+		}
+
+		inline unsigned fileCount() const {
+			return length(*(Base*)this);
+		}
+
+		inline TFile& getFile(int fileNo) {
+			unsigned _oldFileCount = fileCount();
+			if (fileNo > 0 && static_cast<unsigned>(fileNo) >= _oldFileCount) {
+				resize(*(Base*)this, fileNo + 1);
+				for(unsigned i = _oldFileCount; i <= static_cast<unsigned>(fileNo); ++i)  // Cast OK since fileNo > 0 checked above.
+					if (temporary)
+						openTemp((*this)[i], openMode);
+					else
+						open((*this)[i], getFileName(i).c_str(), openMode);
+			}
+			return (*this)[fileNo];
+		}
+
+		inline void tryOpen() {
+			unsigned fileCount = 0;
+			while (fileExists(getFileName(fileCount).c_str())) ++fileCount;
+			if (fileCount) {
+				fileSize = size(getFile(0));
+				_realign = (fileCount == 1);
+				getFile(fileCount - 1);
+			} 
+		}
+
+		// fileSize dependent functions
+
+		template < typename TValue >
+		inline void adjustFileSize(TValue const *dummy) {
+			if (_realign) {
+				_alignCeil(fileSize, dummy);
+				_realign = false;
+				if (fileSize < FILE_SIZE)
+					fileSize = 0;
+			}
+			if (!fileSize) 
+				_alignFloor(FILE_SIZE, dummy);
+		}
+
+		template < typename TPos, typename TOffset, typename TValue >
+		inline TFile& getFileAndOffset(TPos offset, TOffset &fileOffset, TValue const *dummy) {
+			adjustFileSize(dummy);
+			offset *= sizeof(TValue);
+			fileOffset = (offset % fileSize) / sizeof(TValue);
+			return getFile(offset / fileSize);
+		}
+
+		template < typename TOffset, typename TValue >
+		inline __int64 restAt(TOffset fileOffset, TValue const *dummy) {
+			adjustFileSize(dummy);
+			__int64 restBytes = fileSize;
+			restBytes -= fileOffset * sizeof(TValue);
+			return restBytes / sizeof(TValue);
+		}
+
+		inline void resizeArray(__int64 _newSize) {
+			if (fileSize) {
+				unsigned _oldFileCount = fileCount();
+				unsigned _newFileCount = enclosingBlocks(_newSize, fileSize);
+				for(unsigned i = _newFileCount; i < _oldFileCount; ++i) {
+					close((*this)[i]);
+					if (!temporary) fileUnlink(getFileName(i).c_str());
+				}
+				resize(*(Base*)this, _newFileCount);
+				if (_newFileCount) {
+					typename Size<TFile>::Type lastFileSize = _newSize % fileSize;
+					if (fileSize) resize((*this)[_newFileCount - 1], lastFileSize);
+				}
+			}
+		}
+
+        inline void clearInternals() {
+			clear(*(Base*)this);
+            fileSize = 0;
+            _realign = false;
+		}
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // generic open/close interface
+    template < typename TFileArray >
+    inline bool _openTempFArray(TFileArray &me, int openMode) {
+		bool result = true;
+		for(int i = 0; i < length(me); ++i)
+			result &= openTemp(me[i], openMode);
+		return result;
+    }
+
+    template < typename TFileArray >
+    inline bool _openTempFArray(TFileArray &me) {
+		return _openTempFArray(me, DefaultOpenTempMode<TFileArray>::VALUE);
+	}
+
+    template < typename TFileArray >
+    inline bool _reopenFArray(TFileArray &me, int openMode) {
+		bool result = true;
+		for(int i = 0; i < length(me); ++i)
+			result &= reopen(me[i], openMode);
+		return result;
+    }
+
+    template < typename TFileArray >
+    inline bool _closeFArray(TFileArray &me) {
+		bool result = true;
+		for(int i = 0; i < length(me); ++i)
+			if (me[i]) result &= close(me[i]);
+		return result;
+    }
+
+    template < typename TFileArray >
+    inline unsigned _sectorSizeFArray(TFileArray &me, int /*openMode*/) {
+		return sectorSize(me[0]);
+    }
+
+    template < typename TFileArray >
+    inline typename Size<TFileArray>::Type
+	_sizeFArray(TFileArray &me) {
+        typename Size<TFileArray>::Type sum = 0;
+		for(int i = 0; i < length(me); ++i)
+			sum += size(me[i]);
+		return sum;
+    }
+
+    template < typename TFileArray >
+    inline bool _flushFArray(TFileArray &me) {
+		bool result = true;
+		for(int i = 0; i < length(me); ++i)
+			result &= flush(me[i]);
+		return result;
+    }
+
+    template < typename TFileArray, typename TRequest >
+    inline bool _cancelFArray(TFileArray &me, TRequest &request) {
+		bool result = true;
+		for(int i = 0; i < length(me); ++i)
+			result &= cancel(me[i], &request);
+		return result;
+    }
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // standard file array wrappers
+
+    template < __int64 FILE_SIZE, typename TFile >
+	inline unsigned length(File< Chained<FILE_SIZE, TFile> > const &me) {
+		return me.fileCount();
+	}
+
+    template < unsigned FileCount_, typename TFile >
+	inline unsigned length(File< Striped<FileCount_, TFile> > const &/*me*/) {
+		return FileCount_;
+	}
+
+    template < __int64 FILE_SIZE, typename TFile >
+	inline bool open(File< Chained<FILE_SIZE, TFile> > &me, const char *fileName, int openMode) {
+		me.baseName = fileName;
+		me.openMode = openMode;
+		me.temporary = false;
+		me.tryOpen();
+		return true;
+	}
+
+    template < __int64 FILE_SIZE, typename TFile >
+	inline bool openTemp(File< Chained<FILE_SIZE, TFile> > &me, int openMode) {
+		me.openMode = openMode;
+		me.temporary = true;
+		return true;
+	}
+
+    template < unsigned FileCount_, typename TFile >
+	inline bool openTemp(File< Striped<FileCount_, TFile> > &me, int openMode) {
+		return _openTempFArray(me, openMode);
+	}
+
+    template < __int64 FILE_SIZE, typename TFile >
+	inline bool close(File< Chained<FILE_SIZE, TFile> > &me) {
+        _closeFArray(me);
+        me.clearInternals();
+        return true;
+    }
+
+    template < unsigned FileCount_, typename TFile >
+	inline bool close(File< Striped<FileCount_, TFile> > &me) {	return _closeFArray(me); }
+
+    template < __int64 FILE_SIZE, typename TFile >
+	__int64 size(File< Chained<FILE_SIZE, TFile> > &me) {
+		return _sizeFArray(me);
+	}
+
+    template < unsigned FileCount_, typename TFile >
+	__int64 size(File< Striped<FileCount_, TFile> > &me) {
+		return _sizeFArray(me);
+	}
+
+    template < __int64 FILE_SIZE, typename TFile, typename TSize >
+    inline void resize(File< Chained<FILE_SIZE, TFile> > &me, TSize new_length) {
+		me.resizeArray(new_length);
+    }
+
+    template < __int64 FILE_SIZE, typename TFile, typename TValue, typename TSize >
+	inline void allocate(File< Chained<FILE_SIZE, TFile> > const &me, TValue* &data, TSize count) {
+		allocate(me[0], data, count);
+	}
+
+    template < __int64 FILE_SIZE, typename TFile, typename TValue, typename TSize >
+	inline void deallocate(File< Chained<FILE_SIZE, TFile> > const &me, TValue* &data, TSize count) {
+		deallocate(me[0], data, count);
+	}
+
+    template < unsigned FileCount_, typename TFile, typename TValue, typename TSize >
+	inline void allocate(File< Striped<FileCount_, TFile> > const &me, TValue* &data, TSize count) {
+		allocate(me[0], data, count);
+	}
+
+    template < unsigned FileCount_, typename TFile, typename TValue, typename TSize >
+	inline void deallocate(File< Striped<FileCount_, TFile> > const &me, TValue* &data, TSize count) {
+		deallocate(me[0], data, count);
+	}
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // read/write wrappers
+
+    template < __int64 FILE_SIZE, typename TFile, typename TValue, typename TSize, typename TOffset >
+    inline bool readAt(File< Chained<FILE_SIZE, TFile> > &me, TValue *memPtr, TSize count, TOffset offset) {
+		TOffset fileOfs = 0;
+		while (count) {
+			TFile &file = me.getFileAndOffset(offset, fileOfs, memPtr);
+			TSize xmitSize = _min(me.restAt(fileOfs, memPtr), (__int64)count);
+			if (!readAt(file, memPtr, xmitSize, fileOfs)) return false;
+			count -= xmitSize;
+			offset += xmitSize;
+			memPtr += xmitSize;
+		}
+		return true;
+    }
+    
+    template < __int64 FILE_SIZE, typename TFile, typename TValue, typename TSize, typename TOffset >
+    inline bool writeAt(File< Chained<FILE_SIZE, TFile> > &me, TValue const *memPtr, TSize count, TOffset offset) {
+		TOffset fileOfs = 0;
+		while (count) {
+			TFile &file = me.getFileAndOffset(offset, fileOfs, memPtr);
+			TSize xmitSize = _min(me.restAt(fileOfs, memPtr), (__int64)count);
+			if (!writeAt(file, memPtr, xmitSize, fileOfs)) return false;
+			count -= xmitSize;
+			offset += xmitSize;
+			memPtr += xmitSize;
+		}
+		return true;
+    }
+
+    template < __int64 FILE_SIZE, typename TFile, typename TValue, typename TSize, typename TOffset, typename TRequest >
+    inline bool asyncReadAt(File< Chained<FILE_SIZE, TFile> > &me, TValue *memPtr, TSize count, TOffset offset, TRequest &req) {
+		TOffset fileOfs = 0;
+		while (count) {
+			TFile &file = me.getFileAndOffset(offset, fileOfs, memPtr);
+			TSize xmitSize = _min(me.restAt(fileOfs, memPtr), (__int64)count);
+			if (count != xmitSize) {
+				if (!readAt(file, memPtr, xmitSize, fileOfs)) return false;
+			} else
+				if (!asyncReadAt(file, memPtr, xmitSize, fileOfs, req)) return false;
+			count -= xmitSize;
+			offset += xmitSize;
+			memPtr += xmitSize;
+		}
+		return true;
+    }
+    
+    template < __int64 FILE_SIZE, typename TFile, typename TValue, typename TSize, typename TOffset, typename TRequest  >
+    inline bool asyncWriteAt(File< Chained<FILE_SIZE, TFile> > &me, TValue const *memPtr, TSize count, TOffset offset, TRequest &req) {
+		TOffset fileOfs = 0;
+		while (count) {
+			TFile &file = me.getFileAndOffset(offset, fileOfs, memPtr);
+			TSize xmitSize = _min(me.restAt(fileOfs, memPtr), (__int64)count);
+			if (count != xmitSize) {
+				if (!writeAt(file, memPtr, xmitSize, fileOfs)) return false;
+			} else
+				if (!asyncWriteAt(file, memPtr, xmitSize, fileOfs, req)) return false;
+			count -= xmitSize;
+			offset += xmitSize;
+			memPtr += xmitSize;
+		}
+		return true;
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/file/file_base.h b/src/SeqAn-1.3/seqan/file/file_base.h
new file mode 100644
index 0000000..9dfcc85
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_base.h
@@ -0,0 +1,759 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_BASE_H
+#define SEQAN_HEADER_FILE_BASE_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	// To override the system's default temporary directory use the following:
+	//#define SEQAN_DEFAULT_TMPDIR "/var/tmp"
+
+	// To use direct I/O access define SEQAN_DIRECTIO (not completely tested yet)
+	//#define SEQAN_DIRECTIO
+
+
+/**
+.Spec.Sync:
+..cat:Files
+..general:Class.File
+..summary:File structure supporting synchronous input/output access.
+..signature:File<Sync<> >
+..remarks:This class suports pseudo-asynchronous access methods, i.e. the methods to initiate a I/O request return after request completion.
+..include:seqan/file.h
+*/
+
+	template <typename TSpec = void>
+    struct Sync;
+
+/**
+.Spec.Async:
+..cat:Files
+..general:Class.File
+..summary:File structure supporting synchronous and asynchronous input/output access.
+..signature:File<Async<> >
+..include:seqan/file.h
+*/
+
+	template <typename TSpec = void>
+    struct Async;
+
+
+/**
+.Class.File:
+..cat:Input/Output
+..summary:Represents a file.
+..signature:File<TSpec>
+..param.TSpec:The specializing type.
+...default:$Async<>$, see @Spec.Async at .
+..include:seqan/file.h
+*/
+
+	template <typename TSpec = Async<> >
+    class File;
+
+/**
+.Spec.Chained:
+..cat:Files
+..general:Class.File
+..summary:Splits a large file into a chain of smaller files.
+..signature:File<Chained<FileSize, TFile> >
+..param.FileSize:The maximal split file size in byte.
+...default:2^31-1 (~2GB)
+..param.TFile:Underlying @Class.File@ type.
+...default:$File<>$, see @Class.File at .
+..remarks:This file type uses a chain of $TFile$ files, whose file sizes are at most $FileSize$ bytes.
+Chained Files should be used for file systems or $TFile$ types that don't support large files (e.g. FAT32, C-style FILE*).
+..remarks:The chain can be used as if it were one contiguous file.
+..include:seqan/file.h
+*/
+
+	// chained file's default filesize is 2gb-1byte (fat16 filesize limitation)
+	template < __int64 FileSize_ = ~(((__int64)1) << 63), typename TFile = File<> >
+	struct Chained;
+
+/**
+.Spec.Striped:
+..cat:Files
+..general:Class.File
+..summary:Stripes a file across multiple files.
+..signature:File<Chained<FileCount, TFile> >
+..param.FileCount:The number of files used for striping.
+...default:2
+..param.TFile:Underlying @Class.File@ type.
+...default:$File<>$, see @Class.File at .
+..remarks:This file type uses a software striping without redundance (see RAID0) to accelerate I/O access when using more than one disks.
+..remarks:Striped files should only be used in @Class.Pool at s or external Strings as they only support block operations and no random accesses.
+..include:seqan/file.h
+*/
+
+	template < unsigned FileCount_ = 2, typename TFile = File<> >
+	struct Striped;
+
+    enum FileOpenMode {
+        OPEN_RDONLY     = 1,
+        OPEN_WRONLY     = 2,
+        OPEN_RDWR       = 3,
+        OPEN_MASK       = 3,
+        OPEN_CREATE     = 4,
+        OPEN_APPEND     = 8,
+        OPEN_ASYNC      = 16,
+		OPEN_TEMPORARY	= 32,
+		OPEN_QUIET		= 128
+    };
+
+	template <typename T>
+	struct DefaultOpenMode {
+		enum { VALUE = OPEN_RDWR | OPEN_CREATE | OPEN_APPEND };
+	};
+
+	template <typename T>
+	struct DefaultOpenTempMode {
+		enum { VALUE = OPEN_RDWR | OPEN_CREATE };
+	};
+
+    enum FileSeekMode {
+        SEEK_BEGIN   = 0,
+        SEEK_CURRENT = 1
+#ifndef SEEK_END
+      , SEEK_END     = 2
+#endif
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // result type of asynch. functions
+    // you have to call release(AsyncRequest<T>) after a finished *event based* transfer
+	struct AsyncDummyRequest {};
+
+/**
+.Class.AsyncRequest:
+..cat:Input/Output
+..summary:Associated with an asynchronous I/O request.
+..signature:AsyncRequest<TFile>
+..param.TFile:A File type.
+..remarks:This structure is used to identify asynchronous requests after their initiation.
+..include:seqan/file.h
+*/
+
+    template < typename T >
+    struct AsyncRequest
+    {
+        typedef AsyncDummyRequest Type;
+    };
+/*
+    //////////////////////////////////////////////////////////////////////////////
+    // event to represent asynchronous transfers
+    // you can wait for it or test it
+    template < typename T >
+    struct aEvent
+    {
+        typedef DummyEvent Type;
+    };
+
+    ////////////////////////////////////////////////////////////////////////////////
+    // callback hint parameter type
+    // hint lets you recognize the finished asynch. transfer in your own callback routine
+    template < typename T >
+    struct aHint
+    {
+        typedef void Type;
+    };
+
+    //////////////////////////////////////////////////////////////////////////////
+    // callback function interface
+    template < typename T >
+    struct aCallback
+    {
+        typedef void Type(aHint<T> *);
+    };
+
+    //////////////////////////////////////////////////////////////////////////////
+    // file queue interface
+    template < typename T >
+    struct aQueue
+    {
+        typedef Nothing Type;
+    };
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // generic open/close interface
+
+/**
+.Function.open:
+..summary:Opens a file.
+..cat:Input/Output
+..signature:open(file, fileName[, openMode])
+..param.file:A File object.
+...type:Class.File
+..param.fileName:C-style character string containing the file name.
+..param.openMode:The combination of flags defining how the file should be opened.
+...remarks:To open a file read-only, write-only or to read and write use $OPEN_RDONLY$, $OPEN_WRONLY$, or $OPEN_RDWR$.
+...remarks:To create or overwrite a file add $OPEN_CREATE$.
+...remarks:To append a file if existing add $OPEN_APPEND$.
+...remarks:To circumvent problems, files are always opened in binary mode.
+...default:$OPEN_RDWR | OPEN_CREATE | OPEN_APPEND$
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/file.h
+*/
+
+    template < typename TSpec >
+    inline bool open(File<TSpec> &me, const char *fileName, int openMode) 
+	{
+        return me.open(fileName, openMode);
+    }
+
+    template < typename TSpec >
+    inline bool open(File<TSpec> &me, const char *fileName) 
+	{
+		return open(me, fileName, DefaultOpenMode<File<TSpec> >::VALUE);
+    }
+
+/**
+.Function.openTemp:
+..summary:Opens a temporary file.
+..cat:Input/Output
+..signature:openTemp(file)
+..param.file:A File object.
+...type:Class.File
+..remarks:After closing this file will automatically be deleted.
+..remarks:The openmode (see @Function.open@) is $OPEN_RDWR | OPEN_CREATE$.
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/file.h
+*/
+
+    template < typename TSpec >
+    inline bool openTemp(File<TSpec> &me) 
+	{
+        return me.openTemp();
+    }
+
+    template < typename TSpec >
+    inline bool openTemp(File<TSpec> &me, int openMode) 
+	{
+        return me.openTemp(openMode);
+    }
+
+    template < typename File >
+    inline void reopen(File &, int) 
+	{
+	}
+    
+/**
+.Function.close:
+..cat:Input/Output
+..summary:Closes a file.
+..signature:close(file)
+..param.file:A File object.
+...type:Class.File
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/file.h
+*/
+
+    template < typename TSpec >
+    inline bool close(File<TSpec> & me) 
+	{
+        return me.close();
+    }
+
+    template < typename TSpec >
+    inline unsigned sectorSize(File<TSpec> const & /*me*/) 
+	{
+        return 4096;
+    }
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // generic read(At)/write(At) interface
+
+/**
+.Function.read:
+..cat:Input/Output
+..summary:Loads records from a file.
+..signature:read(file, memPtr, count)
+..param.file:A File object.
+...type:Class.File
+..param.memPtr:A pointer to the first destination record in memory.
+..param.count:The amount of records to be read.
+..returns:A $bool$ which is $true$ on success.
+..remarks:The records are read from the position pointed by the current file pointer (see @Function.seek@).
+..include:seqan/file.h
+*/
+
+	template < typename TSpec, typename TValue, typename TSize >
+    inline bool read(File<TSpec> & me, TValue *memPtr, TSize const count) 
+	{
+		return me.read(memPtr, count * sizeof(TValue));
+    }
+    
+/**
+.Function.write:
+..cat:Input/Output
+..summary:Saves records to a file.
+..signature:write(file, memPtr, count)
+..param.file:A File object.
+...type:Class.File
+..param.memPtr:A pointer to the first source record in memory.
+..param.count:The amount of records to be written.
+..returns:A $bool$ which is $true$ on success.
+..remarks:The records are written at the position pointed by the current file pointer (see @Function.seek@).
+..include:seqan/file.h
+*/
+
+	template < typename TSpec, typename TValue, typename TSize >
+    inline bool write(File<TSpec> & me, TValue const *memPtr, TSize const count) 
+	{
+		return me.write(memPtr, count * sizeof(TValue));
+    }
+
+/**
+.Function.readAt:
+..summary:Loads records from a specific position in a file.
+..cat:Input/Output
+..signature:readAt(file, memPtr, count, fileOfs)
+..param.file:A File object.
+...type:Class.File
+..param.memPtr:A pointer to the first destination record in memory.
+..param.count:The amount of records to be read.
+..param.fileOfs:The absolute file position in bytes measured from the beginning.
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/file.h
+*/
+
+    template < typename TFile, typename TValue, typename TSize, typename TPos >
+    inline bool readAt(TFile & me, TValue *memPtr, TSize const count, TPos const fileOfs) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		seek(me, (pos_t)fileOfs * (pos_t)sizeof(TValue));
+		return read(me, memPtr, count);
+    }
+    
+/**
+.Function.writeAt:
+..summary:Saves records to a specific position in a file.
+..cat:Input/Output
+..signature:writeAt(file, memPtr, count, fileOfs)
+..param.file:A File object.
+...type:Class.File
+..param.memPtr:A pointer to the first source record in memory.
+..param.count:The amount of records to be written.
+..param.fileOfs:The absolute file position in bytes measured from the beginning.
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/file.h
+*/
+
+    template < typename TFile, typename TValue, typename TSize, typename TPos >
+    inline bool writeAt(TFile & me, TValue const *memPtr, TSize const count, TPos const fileOfs) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		seek(me, (pos_t)fileOfs * (pos_t)sizeof(TValue));
+		return write(me, memPtr, count);
+    }
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // generic seek/tell/size/resize interface
+
+/**
+.Function.seek:
+..summary:Changes the current file pointer.
+..cat:Input/Output
+..signature:seek(file, fileOfs[, origin])
+..param.file:A File object.
+...type:Class.File
+..param.fileOfs:A file offset measured in bytes relative to $origin$.
+..param.origin:Selects the origin from where to calculate the new position.
+...default:$SEEK_BEGIN$
+...remarks:For $SEEK_BEGIN$, $SEEK_CURRENT$, or $SEEK_END$ the origin is the beginning, the current pointer, or the end of the file.
+..returns:The new file position measured in bytes from the beginning.
+..include:seqan/file.h
+*/
+
+	template < typename TSpec, typename TPos >
+    inline typename Position< File<TSpec> >::Type seek(File<TSpec> &me, TPos const fileOfs, int origin) 
+	{
+		typedef typename Position< File<TSpec> >::Type TFilePos;
+		TFilePos newOfs = me.seek(fileOfs, origin);
+        #ifdef SEQAN_DEBUG_OR_TEST_
+			if (origin == SEEK_BEGIN && newOfs != (TFilePos)fileOfs) {
+				::std::cerr << "seek returned " << ::std::hex << newOfs << " instead of " << fileOfs << ::std::dec << ::std::endl;
+			}
+        #endif
+        return newOfs;
+    }
+    
+	template < typename TSpec, typename TPos >
+    inline typename Position< File<TSpec> >::Type seek(File<TSpec> &me, TPos const fileOfs) 
+	{
+		return seek(me, fileOfs, SEEK_BEGIN);
+	}
+/**
+.Function.tell:
+..summary:Gets the current file pointer.
+..cat:Input/Output
+..signature:tell(file)
+..param.file:A File object.
+...type:Class.File
+..returns:The current file position measured in bytes from the beginning.
+..include:seqan/file.h
+*/
+
+    template < typename TSpec >
+    inline typename Position< File<TSpec> >::Type tell(File<TSpec> &me) 
+	{
+        return me.tell();
+    }
+
+/**
+.Function.rewind:
+..summary:Sets the current file pointer to the beginning.
+..cat:Input/Output
+..signature:rewind(file)
+..param.file:A File object.
+...type:Class.File
+..remarks:Calls @Function.seek@$(file, 0)$ by default.
+..include:seqan/file.h
+*/
+
+    template < typename File >
+    inline void rewind(File &me) 
+	{
+		seek(me, 0);
+    }
+    
+/**
+.Function.size:
+..summary:Gets the file size.
+..cat:Input/Output
+..signature:size(file)
+..param.file:A File object.
+...type:Class.File
+..returns:The file size measured in bytes.
+..include:seqan/file.h
+*/
+
+    template < typename TSpec >
+    inline typename Size<File<TSpec> >::Type size(File<TSpec> &me) 
+	{
+        typename Size<File<TSpec> >::Type old_pos = tell(me);
+        typename Size<File<TSpec> >::Type result = seek(me, 0, SEEK_END);
+        seek(me, old_pos, SEEK_BEGIN);
+        return result;
+    }
+
+/**
+.Function.resize:
+..cat:Input/Output
+..signature:resize(file, new_length)
+..param.file:A File object.
+...type:Class.File
+..param.new_length:The new file size measured in bytes.
+..include:seqan/file.h
+*/
+
+    template < typename TSpec, typename TSize >
+    inline void resize(File<TSpec> &me, TSize new_length) 
+	{
+        typename Size<File<TSpec> >::Type old_pos = tell(me);
+        seek(me, new_length, SEEK_BEGIN);
+        setEof(me);
+        seek(me, old_pos, SEEK_BEGIN);
+    }
+
+/**
+.Function.setEof:
+..summary:Sets the file end to the current pointer.
+..cat:Input/Output
+..signature:setEof(file)
+..param.file:A File object.
+...type:Class.File
+..include:seqan/file.h
+*/
+
+    template < typename TSpec >
+    inline bool setEof(File<TSpec> &/*me*/) 
+	{ 
+		return true; 
+	}
+
+
+    //////////////////////////////////////////////////////////////////////
+    // Pseudo asynchronous Methods
+    //////////////////////////////////////////////////////////////////////
+
+    //////////////////////////////////////////////////////////////////////
+    // callback based read/write
+/*
+    template < typename File, typename TValue, typename TSize,
+               typename aCallback, typename aHint >
+    inline typename AsyncRequest<File>::Type
+    asyncRead(File & me, TValue *memPtr, TSize const count,
+        aCallback* cb, aHint* hint)
+    {
+        result = read(me, memPtr, count);
+        cb(hint);
+        return NULL;
+    }
+    
+    template < typename File, typename TValue, typename TSize,
+               typename aCallback, typename aHint >
+    inline typename AsyncRequest<File>::Type
+    asyncWrite(File & me, TValue const *memPtr, TSize const count,
+        aCallback* cb, aHint* hint)
+    {
+        write(me, memPtr, count);
+        cb(hint);
+        return NULL;
+    }
+
+    template < typename File, typename TValue, typename TSize, typename TPos,
+               typename aCallback, typename aHint >
+    inline typename AsyncRequest<File>::Type
+    asyncReadAt(File & me, TValue *memPtr, TSize const count, TPos const fileOfs,
+        aCallback* cb, aHint* hint)
+    {
+        readAt(me, memPtr, count, fileOfs);
+        cb(hint);
+        return NULL;
+    }
+    
+    template < typename File, typename TValue, typename TSize, typename TPos,
+               typename aCallback, typename aHint >
+    inline typename AsyncRequest<File>::Type
+    asyncWriteAt(File & me, TValue const *memPtr, TSize const count, TPos const fileOfs,
+        aCallback* cb, aHint* hint)
+    {
+        result = writeAt(me, memPtr, count, fileOfs);
+        cb(hint);
+        return NULL;
+    }
+
+
+    //////////////////////////////////////////////////////////////////////
+    // event based read/write
+
+    template < typename File, typename TValue, typename TSize,
+               typename aEvent >
+    inline typename AsyncRequest<File>::Type
+    asyncRead(File & me, TValue *memPtr, TSize const count,
+        aEvent &event)
+    {
+        read(me, memPtr, count);
+        event.signal();
+        return NULL;
+    }
+    
+    template < typename File, typename TValue, typename TSize,
+               typename aEvent >
+    inline typename AsyncRequest<File>::Type
+    asyncWrite(File & me, TValue const *memPtr, TSize const count,
+        aEvent &event)
+    {
+        write(me, memPtr, count);
+        event.signal();
+        return NULL;
+    }
+
+    template < typename File, typename TValue, typename TSize, typename TPos,
+               typename aEvent >
+    inline typename AsyncRequest<File>::Type
+    asyncReadAt(File & me, TValue *memPtr, TSize const count, TPos const fileOfs,
+        aEvent &event)
+    {
+        readAt(me, memPtr, count, fileOfs);
+        event.signal();
+        return NULL;
+    }
+    
+    template < typename File, typename TValue, typename TSize, typename TPos,
+               typename aEvent >
+    inline typename AsyncRequest<File>::Type
+    asyncWriteAt(File & me, TValue const *memPtr, TSize const count, TPos const fileOfs,
+        aEvent &event)
+    {
+        writeAt(me, memPtr, count, fileOfs);
+        event.signal();
+        return NULL;
+    }
+*/
+
+    //////////////////////////////////////////////////////////////////////
+    // queue-less request based pseudo asychronous read/write
+
+/**
+.Function.asyncReadAt:
+..summary:Asynchronously loads records from a specific position in a file.
+..cat:Input/Output
+..signature:asyncReadAt(file, memPtr, count, fileOfs, request)
+..param.file:A File object.
+...type:Class.File
+..param.memPtr:A pointer to the first destination record in memory.
+..param.count:The amount of records to be read.
+..param.fileOfs:The absolute file position in bytes measured from the beginning.
+..param.request:Reference to a structure that will be associated with this asynchronous request.
+...type:Class.AsyncRequest
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/file.h
+*/
+
+    template < typename File, typename TValue, typename TSize, typename TPos,
+               typename AsyncRequest >
+    inline bool 
+	asyncReadAt(File & me, TValue *memPtr, TSize const count, TPos const fileOfs,
+        AsyncRequest &)
+    {
+        return readAt(me, memPtr, count, fileOfs);
+    }
+    
+/**
+.Function.asyncWriteAt:
+..summary:Asynchronously saves records to a specific position in a file.
+..cat:Input/Output
+..signature:asyncWriteAt(file, memPtr, count, fileOfs, request)
+..param.file:A File object.
+...type:Class.File
+..param.memPtr:A pointer to the first source record in memory.
+..param.count:The amount of records to be written.
+..param.fileOfs:The absolute file position in bytes measured from the beginning.
+..param.request:Reference to a structure that will be associated with this asynchronous request.
+...type:Class.AsyncRequest
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/file.h
+*/
+
+    template < typename File, typename TValue, typename TSize, typename TPos,
+               typename AsyncRequest >
+    inline bool
+	asyncWriteAt(File & me, TValue const *memPtr, TSize const count, TPos const fileOfs,
+        AsyncRequest &)
+    {
+        return writeAt(me, memPtr, count, fileOfs);
+    }
+
+	
+	//////////////////////////////////////////////////////////////////////
+    // pseudo queue specific functions
+
+/**
+.Function.flush:
+..summary:Waits for all open requests to complete.
+..cat:Input/Output
+..signature:flush(file)
+..param.file:A File object.
+...type:Class.File
+..remarks:$flush$ returns after all pending requests are completed.
+..include:seqan/file.h
+*/
+
+    template < typename TSpec >
+    inline void flush(File<TSpec> &) 
+	{
+	}
+
+/**
+.Function.waitFor:
+..summary:Waits for an asynchronous request to complete.
+..cat:Input/Output
+..signature:waitFor(request[, timeout_millis])
+..param.request:Reference to an AsyncRequest object.
+...type:Class.AsyncRequest
+..param.timeout_millis:Timout value in milliseconds.
+...remarks:A value of 0 can be used to test for completion without waiting.
+...default:Infinity.
+..returns:A $bool$ which is $true$ on completion and $false$ on timeout.
+..remarks:$waitFor$ suspends the calling process until $request$ is completed or after $timeout_millis$ milliseconds.
+..include:seqan/file.h
+*/
+
+    inline bool waitFor(AsyncDummyRequest &) 
+	{ 
+		return true; 
+	}
+
+	template < typename TTime >
+    inline bool waitFor(AsyncDummyRequest &, TTime) 
+	{ 
+		return true; 
+	}
+
+	// deprecated
+	template < typename TSpec, typename AsyncRequest >
+    inline void release(File<TSpec> &, AsyncRequest &) 
+	{
+	}
+
+/**
+.Function.cancel:
+..summary:Cancels an asynchronous request.
+..cat:Input/Output
+..signature:cancel(file, request)
+..param.file:A File object.
+...type:Class.File
+..param.request:Reference to an AsyncRequest object.
+...type:Class.AsyncRequest
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/file.h
+*/
+
+    template < typename TSpec, typename AsyncRequest >
+    inline bool cancel(File<TSpec> &, AsyncRequest &) 
+	{
+		return true; 
+	}
+
+
+	// little helpers
+
+	template <typename T1, typename T2> inline
+	T1 enclosingBlocks(T1 _size, T2 _blockSize) 
+	{
+		return (_size + _blockSize - 1) / _blockSize;
+	}
+
+	template <typename T1, typename T2> inline
+	T1 alignSize(T1 _size, T2 _aligning) 
+	{
+        if (_size < _aligning)
+            return _aligning;
+        else
+		    return (_size / _aligning) * (T1)_aligning;
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/file/file_cstyle.h b/src/SeqAn-1.3/seqan/file/file_cstyle.h
new file mode 100644
index 0000000..f93f338
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_cstyle.h
@@ -0,0 +1,245 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_CSTYLE_H
+#define SEQAN_HEADER_FILE_CSTYLE_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/*    template <>
+    struct Value< FILE* >
+    {
+	    typedef unsigned char Type;
+    };
+*/
+/*  already defined in "seqan/cstream.h" ...
+
+    template <>
+    struct Position< FILE* >
+    {
+	    typedef long Type;
+    };
+*/
+/*
+    template <>
+    struct Size< FILE* >
+    {
+	    typedef size_t Type;
+    };
+*/
+/*
+
+    template <>
+    struct Position< FILE* >
+    {
+	    typedef long Type;
+    };
+*/
+    template <>
+    struct Difference< FILE* >
+    {
+	    typedef long Type;
+    };
+
+
+	inline const char * 
+	_getCStyleOpenMode(int openMode) 
+	{
+		switch (openMode & OPEN_MASK) {
+            case OPEN_WRONLY:
+                if (!(openMode & OPEN_APPEND))
+                    if (openMode & OPEN_CREATE)
+                        return "w";
+                    else
+                        return "r+";
+                else
+                    return "a";
+            case OPEN_RDWR:
+                if (!(openMode & OPEN_APPEND))
+                    if (openMode & OPEN_CREATE)
+                        return "w+";
+                    else
+                        return "r+";
+                else
+                    return "a+";
+			default:
+		        return "r";
+		}
+    }
+
+    inline bool 
+	open(FILE* &me, const char *fileName, int openMode) 
+	{
+		SEQAN_PROADD(SEQAN_PROOPENFILES, 1);
+        return (me = fopen(fileName, _getCStyleOpenMode(openMode))) != NULL;
+    }
+
+    inline bool 
+	open(FILE* &me, const char *fileName) 
+	{
+		return open(me, fileName, DefaultOpenMode<FILE*>::VALUE);
+	}
+
+    inline bool 
+	openTemp(FILE* &me) 
+	{
+		SEQAN_PROSUB(SEQAN_PROOPENFILES, 1);
+        return (me = tmpfile()) != NULL;
+    }
+
+    inline bool 
+	close(FILE* me) 
+	{
+		SEQAN_PROSUB(SEQAN_PROOPENFILES, 1);
+        return fclose(me) == 0;
+    }
+
+    inline unsigned 
+	sectorSize(FILE* const &) 
+	{
+        return 4096;
+    }
+
+    template < typename TPos >
+    inline Size<FILE*>::Type 
+	seek(FILE* me, TPos const fileOfs, int origin) 
+	{
+        fseek(me, fileOfs, origin);
+		return ftell(me);
+    }
+    template < typename TPos >
+    inline Size<FILE*>::Type 
+	seek(FILE* me, TPos const fileOfs) 
+	{
+		return seek(me, fileOfs, SEEK_BEGIN);
+    }
+
+    inline Size<FILE*>::Type 
+	tell(FILE* me) 
+	{
+		return ftell(me);
+    }
+
+    template < typename TValue, typename TSize >
+    inline bool 
+	read(FILE* me, TValue *memPtr, TSize const count) 
+	{
+        SEQAN_PROADD(SEQAN_PROIO, (sizeof(TValue) * count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+        SEQAN_PROTIMESTART(tw);
+        bool result = fread(memPtr, sizeof(TValue), count, me) == (size_t)count;
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+        return result;
+    }
+
+    template < typename TValue, typename TSize >
+    inline bool 
+	write(FILE* me, TValue const *memPtr, TSize const count) 
+	{
+        SEQAN_PROADD(SEQAN_PROIO, (sizeof(TValue) * count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+        SEQAN_PROTIMESTART(tw);
+        bool result = fwrite(memPtr, sizeof(TValue), count, me) == (size_t)count;
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+        return result;
+    }
+
+    template < typename TValue, typename TSize, typename TPos >
+    inline bool 
+	readAt(FILE* me, TValue *memPtr, TSize const count, TPos const fileOfs) 
+	{
+		typedef typename Position<FILE*>::Type pos_t;
+		seek(me, (pos_t)fileOfs * (pos_t)sizeof(TValue));
+        SEQAN_PROADD(SEQAN_PROIO, (sizeof(TValue) * count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+        SEQAN_PROTIMESTART(tw);
+        bool result = fread(memPtr, sizeof(TValue), count, me) == (size_t)count;
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+        return result;
+    }
+    
+    template < typename TValue, typename TSize, typename TPos >
+    inline bool 
+	writeAt(FILE* me, TValue const *memPtr, TSize const count, TPos const fileOfs) 
+	{
+		typedef typename Position<FILE*>::Type pos_t;
+		seek(me, (pos_t)fileOfs * (pos_t)sizeof(TValue));
+        SEQAN_PROADD(SEQAN_PROIO, (sizeof(TValue) * count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+        SEQAN_PROTIMESTART(tw);
+        bool result = fwrite(memPtr, sizeof(TValue), count, me) == (size_t)count;
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+        return result;
+    }
+
+    inline Size<FILE*>::Type 
+	size(FILE* me) 
+	{
+        Size<FILE*>::Type old_pos = tell(me);
+        Size<FILE*>::Type result = 0;
+        if (seek(me, 0, SEEK_END) == 0)
+            result = tell(me);
+        seek(me, old_pos, SEEK_BEGIN);
+        return result;
+    }
+
+    template < typename TSize >
+    inline void 
+	resize(FILE* me, TSize new_length) 
+	{
+        Size<FILE*>::Type old_pos = tell(me);
+        seek(me, new_length, SEEK_BEGIN);
+        seek(me, old_pos, SEEK_BEGIN);
+    }
+
+	inline bool 
+	flush(FILE*) 
+	{
+		return true; 
+	}
+
+    template < typename AsyncRequest >
+	inline void 
+	release(FILE*, AsyncRequest &) 
+	{
+	}
+
+    template < typename AsyncRequest >
+    inline bool 
+	cancel(FILE*, AsyncRequest &) 
+	{
+		return true; 
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/file/file_filereader.h b/src/SeqAn-1.3/seqan/file/file_filereader.h
new file mode 100644
index 0000000..394e0e5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_filereader.h
@@ -0,0 +1,954 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_FILEREADER_H
+#define SEQAN_HEADER_FILE_FILEREADER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template <typename TFormat, typename TFile, typename TSpec>
+struct FileReader;
+
+//////////////////////////////////////////////////////////////////////////////
+// FileReader String
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.File Reader String:
+..cat:Strings
+..cat:Files
+..general:Class.String
+..summary:Read sequence data from file.
+..signature:String<TValue, FileReader<TFormat, TFile, TSpec> >
+..param.TValue:The value type, that is the type of the items/characters stored in the string.
+...metafunction:Metafunction.Value
+..param.TFormat:A file format.
+...type:Tag.File Format
+..param.TFile:A file.
+..param.TSpec:A further specializing type.
+...default:@Tag.Default@
+..include:seqan/file.h
+*/
+
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+class String<TValue, FileReader<TFormat, TFile, TSpec> >
+{
+public:
+	enum
+	{
+		BLOCK_SIZE = 0x1000
+	};
+
+	typedef typename Position<TFile>::Type TFilePosition;
+
+	typedef typename Size<TFile>::Type TFileSize;
+	typedef String<TFileSize> TABL;
+
+	typedef typename Position<TABL>::Type TABLPosition;
+
+	typedef String<TValue> TBuf;
+
+	TFile *data_file;
+	bool data_file_owner;
+	TFilePosition data_file_begin;		//file pointer to begin of data in file
+	TABL data_abl;						//accumulated block lengths
+	TABLPosition data_active_block;		//number of active block
+	TFileSize data_active_block_begin;	//begin position of active block
+	TFileSize data_active_block_end;	//end position of active block
+	TBuf data_buf;						//data of active block
+	bool data_scanned;					//true if the complete string was scanned
+
+
+	//TODO
+	//String()...
+
+	String(TFile & fl_)
+		: data_scanned(false)
+	{
+		reserve(data_buf, (size_t) BLOCK_SIZE, Exact());
+
+		data_file = &fl_;
+		data_file_owner = false;
+		_constructFileReaderString(*this);
+	}
+	template <typename TString>
+	String(TString const & str_)
+		: data_scanned(false)
+	{
+		reserve(data_buf, (size_t) BLOCK_SIZE, Exact());
+
+		data_file = new TFile();
+		data_file_owner = true;
+		if (!_streamOpen(value(data_file), str_))
+		{
+			clear(data_file);
+		}
+		else
+		{
+			_constructFileReaderString(*this);
+		}
+	}
+	~String()
+	{
+		if (data_file_owner && data_file != NULL)
+		{
+			_streamClose(value(data_file));
+			delete data_file;
+			data_file = NULL;
+		}
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+//template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec>
+//struct Iterator<String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec>;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+struct Value<String<TValue, FileReader<TFormat, TFile, TSpec> > >
+{
+	typedef TValue Type;
+};
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+struct GetValue<String<TValue, FileReader<TFormat, TFile, TSpec> > >
+{
+	typedef TValue Type;
+};
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+struct Reference<String<TValue, FileReader<TFormat, TFile, TSpec> > >
+{
+	typedef TValue Type;
+};
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+struct Size<String<TValue, FileReader<TFormat, TFile, TSpec> > >:
+	Size<TFile>
+{
+};
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+struct Difference<String<TValue, FileReader<TFormat, TFile, TSpec> > >:
+	Difference<TFile>
+{
+};
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+struct Position<String<TValue, FileReader<TFormat, TFile, TSpec> > >:
+	Position<TFile>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+inline TFile &
+_dataFile(String<TValue, FileReader<TFormat, TFile, TSpec> > & me)
+{
+	return value(me.data_file);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPosition>
+inline void
+_loadBlockFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me,
+							TPosition blocknum)
+{
+	typedef String<TValue, FileReader<TFormat, TFile, TSpec> > TString;
+
+	typedef typename Size<TFile>::Type TFileSize;
+	typedef String<TFileSize> TABL;
+	typedef typename Position<TABL>::Type TABLPosition;
+	TABLPosition blocknum2 = blocknum;
+
+	if (blocknum2 > length(me.data_abl))
+	{
+		if (me.data_scanned)
+		{
+			_loadBlockFileReaderString(me, length(me.data_abl) - 1);
+		}
+		else
+		{
+			for (TABLPosition bp = length(me.data_abl); !me.data_scanned && (bp <= blocknum2); ++bp)
+			{
+				_loadBlockFileReaderString(me, bp);
+			}
+		}
+	}
+	else
+	{
+		typedef Iter<TFile, FileReader<TFormat> > TFileReaderIt;
+		_streamSeekG(_dataFile(me), me.data_file_begin + blocknum2 * TString::BLOCK_SIZE);
+		TABLPosition end_filepos = me.data_file_begin + (blocknum2 + 1) * TString::BLOCK_SIZE;
+		TFileReaderIt fit(_dataFile(me), false);
+
+		unsigned int len;
+		resize(me.data_buf, static_cast<TFileSize>(TString::BLOCK_SIZE));  // Maybe too large, but will shrink below.
+		for (len = 0; !atEnd(fit) && (fit.data_file_pos < end_filepos); goNext(fit))
+		{
+			me.data_buf[len] = value(fit);
+			++len;
+		}
+		resize(me.data_buf, len);
+
+		if (blocknum2 == length(me.data_abl))
+		{
+			if (blocknum2 > 0)
+			{
+				appendValue(me.data_abl, me.data_abl[blocknum2-1] + length(me.data_buf));
+			}
+			else
+			{
+				appendValue(me.data_abl, length(me.data_buf));
+			}
+
+			if (atEnd(fit))
+			{
+				me.data_scanned = true;
+			}
+		}
+
+		me.data_active_block = blocknum2;
+		me.data_active_block_begin = (blocknum2) ? me.data_abl[blocknum2 - 1] : 0;
+		me.data_active_block_end = me.data_abl[blocknum2];
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPosition>
+inline unsigned int
+_findBlockFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me,
+							TPosition pos)
+{
+	typedef typename Size<TFile>::Type TFileSize;
+
+	while (!me.data_scanned && (me.data_abl[length(me.data_abl) - 1] <= static_cast<TFileSize>(pos)))
+	{
+		_loadBlockFileReaderString(me, length(me.data_abl));
+	}
+
+	if (static_cast<TFileSize>(pos) >= me.data_abl[length(me.data_abl) - 1])
+	{//pos greater than file length
+		return length(me.data_abl);
+	}
+
+	return ::std::lower_bound(begin(me.data_abl, Standard()), end(me.data_abl, Standard()), (TFileSize) pos) - begin(me.data_abl, Standard());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+inline void
+_constructFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me)
+{
+	//find begin of data in file
+	typedef Iter<TFile, FileReader<TFormat> > TFileReaderIt;
+	TFileReaderIt fit(_dataFile(me));
+	me.data_file_begin = fit.data_file_pos;
+
+	_loadBlockFileReaderString(me, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//tests whether block_number will exist when the file was scanned completely
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TUint>
+inline bool
+_isValidBlockFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me,
+							   TUint block_number)
+{
+	typedef typename Size<TFile>::Type TFileSize;
+	TFileSize block_number2 = block_number;
+
+	while (!me.data_scanned && (length(me.data_abl) <= block_number2))
+	{
+		_loadBlockFileReaderString(me, length(me.data_abl));
+	}
+	return (length(me.data_abl) > block_number2);
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+inline void
+_loadCompleteFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me)
+{
+	if (!me.data_scanned)
+	{//scan the whole sequence
+		typedef typename Position<TFile>::Type TPosition;
+		_loadBlockFileReaderString(me, maxValue<TPosition>());
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+ 
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+inline void const * 
+id(String<TValue, FileReader<TFormat, TFile, TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return &me;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPos>
+inline TValue
+value(String<TValue, FileReader<TFormat, TFile, TSpec> > & me,
+	  TPos pos)
+{
+	typedef typename Size<TFile>::Type TFileSize;
+	TFileSize pos2 = pos;
+
+	if ((me.data_active_block_begin > pos2) || (me.data_active_block_end <= pos2))
+	{//change block
+		_loadBlockFileReaderString(me, _findBlockFileReaderString(me, pos2));
+	}
+	return me.data_buf[pos2 - me.data_active_block_begin];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+inline typename Size< String<TValue, FileReader<TFormat, TFile, TSpec> > >::Type
+length(String<TValue, FileReader<TFormat, TFile, TSpec> > & me)
+{
+	_loadCompleteFileReaderString(me);
+
+	return me.data_abl[length(me.data_abl) - 1];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec>
+inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec >::Type
+begin(String<TValue, FileReader<TFormat, TFile, TSpec> > & me,
+	  Tag<TIteratorSpec> const)
+{
+	typedef typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec >::Type TIterator;
+	return TIterator(me);
+}
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec>
+inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> > const, TIteratorSpec >::Type
+begin(String<TValue, FileReader<TFormat, TFile, TSpec> > const & me,
+	  Tag<TIteratorSpec> const)
+{
+	typedef String<TValue, FileReader<TFormat, TFile, TSpec> > TString;
+	typedef typename Iterator< TString const, TIteratorSpec >::Type TIterator;
+	return TIterator(const_cast<TString &>(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec>
+inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec >::Type
+end(String<TValue, FileReader<TFormat, TFile, TSpec> > & me,
+	Tag<TIteratorSpec> const)
+{
+	typedef typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec >::Type TIterator;
+	return TIterator(me, GoEnd());
+}
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec>
+inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> > const, TIteratorSpec >::Type
+end(String<TValue, FileReader<TFormat, TFile, TSpec> > const & me,
+	Tag<TIteratorSpec> const)
+{
+	typedef String<TValue, FileReader<TFormat, TFile, TSpec> > TString;
+	typedef typename Iterator< TString const, TIteratorSpec >::Type TIterator;
+	return TIterator(const_cast<TString &>(me), GoEnd());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPosition, typename TIteratorSpec>
+inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec >::Type
+iter(String<TValue, FileReader<TFormat, TFile, TSpec> > & me,
+	 TPosition pos,
+	 Tag<TIteratorSpec> const)
+{
+	typedef typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec >::Type TIterator;
+	return TIterator(me, pos);
+}
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPosition, typename TIteratorSpec>
+inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> > const, TIteratorSpec >::Type
+iter(String<TValue, FileReader<TFormat, TFile, TSpec> > const & me,
+	 TPosition pos,
+	 Tag<TIteratorSpec> const)
+{
+	typedef String<TValue, FileReader<TFormat, TFile, TSpec> > TString;
+	typedef typename Iterator< TString const, TIteratorSpec >::Type TIterator;
+	return TIterator(const_cast<TString &>(me), pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Iterator for FileReader String
+// (note: do not confuse with FileReader Iterator, see file_filereaderiterator.h)
+//////////////////////////////////////////////////////////////////////////////
+
+struct FileReaderIterator;
+
+//helper meta function for storing types associated with file reader string.
+//Due to a bug in VC++, FileReaderTypes_ is instantiated for arbitrary TContainer types
+//when instantiating Iter<TContainer, FileReaderIterator>
+//"ABL" = "active buffer lengths" table
+template <typename T>
+struct FileReaderTypes_
+{// dummy implementation to make VC++ happy
+	typedef int TABLPosition;
+	typedef int TBuf;
+};
+template <typename TValue, typename TFormat, typename TFile, typename TSpec>
+struct FileReaderTypes_<String<TValue, FileReader<TFormat, TFile, TSpec> > >
+{
+	typedef typename Size<TFile>::Type TFileSize;
+	typedef String<TFileSize> TABL;
+	typedef typename Position<TABL>::Type TABLPosition;
+	typedef String<TValue> TBuf;
+};
+
+
+template <typename TContainer>
+class Iter<TContainer, FileReaderIterator>
+{
+public:
+	typedef typename FileReaderTypes_<TContainer>::TABLPosition TABLPosition;
+	typedef typename FileReaderTypes_<TContainer>::TBuf TBuf;
+
+	typedef typename Position<TBuf>::Type TBufPosition;
+	typedef typename Size<TBuf>::Type TBufSize;
+
+	TContainer * data_container;
+	TABLPosition data_abl_pos;		//number of block
+	TBufPosition data_buf_pos;		//number of char in block
+	TBufSize data_buf_len;			//length of block
+	bool data_atEnd;				//true if iterator is atEnd
+
+	Iter(TContainer & cont_)
+		: data_container(& cont_)
+	{
+		goBegin(*this);
+	}
+
+	Iter(TContainer & cont_, GoEnd)
+		: data_container(& cont_)
+	{
+		goEnd(*this);
+	}
+
+	template <typename TPos>
+	Iter(TContainer & cont_, TPos pos_)
+		: data_container(& cont_)
+	{
+		setPosition(*this, pos_);
+	}
+
+	Iter(Iter const & other_)
+		: data_container(other_.data_container)
+		, data_abl_pos(other_.data_abl_pos)
+		, data_buf_pos(other_.data_buf_pos)
+		, data_buf_len(other_.data_buf_len)
+		, data_atEnd(other_.data_atEnd)
+	{
+	}
+
+	Iter &
+	operator = (Iter const & other_)
+	{
+		data_container = other_.data_container;
+		data_abl_pos = other_.data_abl_pos;
+		data_buf_pos = other_.data_buf_pos;
+		data_buf_len = other_.data_buf_len;
+		data_atEnd = other_.data_atEnd;
+
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec>
+struct Iterator<String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec>
+{
+	typedef Iter<String<TValue, FileReader<TFormat, TFile, TSpec> >, FileReaderIterator> Type;
+};
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec>
+struct Iterator<String<TValue, FileReader<TFormat, TFile, TSpec> > const, TIteratorSpec>
+{
+	typedef Iter<String<TValue, FileReader<TFormat, TFile, TSpec> >, FileReaderIterator> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+struct Value<Iter<TContainer, FileReaderIterator> >:
+	Value<TContainer>
+{
+};
+template <typename TContainer>
+struct GetValue<Iter<TContainer, FileReaderIterator> >:
+	Value<TContainer>
+{
+};
+template <typename TContainer>
+struct Reference<Iter<TContainer, FileReaderIterator> >:
+	Value<TContainer>
+{
+};
+
+template <typename TContainer>
+struct Size<Iter<TContainer, FileReaderIterator> >:
+	Size<TContainer>
+{
+};
+template <typename TContainer>
+struct Difference<Iter<TContainer, FileReaderIterator> >:
+	Difference<TContainer>
+{
+};
+template <typename TContainer>
+struct Position<Iter<TContainer, FileReaderIterator> >:
+	Position<TContainer>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline typename GetValue<Iter<TContainer, FileReaderIterator> >::Type
+getValue(Iter<TContainer, FileReaderIterator> & it)
+{
+	TContainer & cont = *(it.data_container);
+	if (cont.data_active_block != it.data_abl_pos)
+	{
+		_loadBlockFileReaderString(cont, it.data_abl_pos);
+	}
+	return cont.data_buf[it.data_buf_pos];
+}
+template <typename TContainer>
+inline typename GetValue<Iter<TContainer, FileReaderIterator> >::Type
+getValue(Iter<TContainer, FileReaderIterator> const & it)
+{
+	TContainer & cont = *(it.data_container);
+	if (cont.data_active_block != it.data_abl_pos)
+	{
+		_loadBlockFileReaderString(cont, it.data_abl_pos);
+	}
+	return cont.data_buf[it.data_buf_pos];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline typename Reference<Iter<TContainer, FileReaderIterator> >::Type
+value(Iter<TContainer, FileReaderIterator> & it)
+{
+	return getValue(it);
+}
+template <typename TContainer>
+inline typename Reference<Iter<TContainer, FileReaderIterator> >::Type
+value(Iter<TContainer, FileReaderIterator> const & it)
+{
+	return getValue(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline TContainer &
+container(Iter<TContainer, FileReaderIterator> & it)
+{
+	return *(it.data_container);
+}
+template <typename TContainer>
+inline TContainer &
+container(Iter<TContainer, FileReaderIterator> const & it)
+{
+	return *(it.data_container);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline typename Position<Iter<TContainer, FileReaderIterator> >::Type
+position(Iter<TContainer, FileReaderIterator> const & it)
+{
+	TContainer & cont = *(it.data_container);
+	if (it.data_atEnd)
+	{
+		return length(cont);
+	}
+	else
+	{
+		if (it.data_abl_pos)
+		{
+			return cont.data_abl[it.data_abl_pos-1] + it.data_buf_pos;
+		}
+		else
+		{
+			return it.data_buf_pos;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TPos>
+inline void
+setPosition(Iter<TContainer, FileReaderIterator> & it,
+			TPos pos)
+{
+    typedef typename Size<TContainer>::Type TSize;
+	TContainer & cont = *(it.data_container);
+	it.data_abl_pos = _findBlockFileReaderString(cont, pos);
+	it.data_atEnd = (cont.data_scanned && (static_cast<TSize>(pos) >= length(cont)));
+	if (it.data_atEnd)
+	{
+		it.data_buf_pos = 0;
+		it.data_buf_len = 0;
+	}
+	else
+	{
+		if (it.data_abl_pos == 0)
+		{
+			it.data_buf_pos = pos;
+		}
+		else
+		{
+			it.data_buf_pos = pos - cont.data_abl[it.data_abl_pos - 1];
+		}
+		if (cont.data_active_block != it.data_abl_pos)
+		{
+			_loadBlockFileReaderString(cont, it.data_abl_pos);
+		}
+		it.data_buf_len = length(cont.data_buf);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline void
+goNext(Iter<TContainer, FileReaderIterator> & it)
+{
+	++it.data_buf_pos;
+	if (it.data_buf_pos >= it.data_buf_len)
+	{
+		if (!it.data_atEnd)
+		{
+			it.data_buf_pos = 0;
+			++it.data_abl_pos;
+
+			TContainer & cont = *(it.data_container);
+			it.data_atEnd = !_isValidBlockFileReaderString(cont, it.data_abl_pos);
+			if (it.data_atEnd)
+			{//at end
+				it.data_buf_len = 0;
+			}
+			else
+			{//not at end
+				if (cont.data_active_block != it.data_abl_pos)
+				{
+					_loadBlockFileReaderString(cont, it.data_abl_pos);
+				}
+				it.data_buf_len = length(cont.data_buf);
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline void
+goPrevious(Iter<TContainer, FileReaderIterator> & it)
+{
+	if (it.data_buf_pos > 0)
+	{
+		--it.data_buf_pos;
+	}
+	else
+	{
+		TContainer & cont = *(it.data_container);
+		if (it.data_atEnd)
+		{
+			//_loadCompleteFileReaderString(cont);// length(cont) will do it
+			it.data_atEnd = (length(cont) == 0);
+			it.data_abl_pos = length(cont.data_abl) - 1;
+		}
+		else if (it.data_abl_pos)
+		{
+			--it.data_abl_pos;
+		}
+		else return; //already in begin pos
+
+		if (cont.data_active_block != it.data_abl_pos)
+		{
+			_loadBlockFileReaderString(cont, it.data_abl_pos);
+		}
+		it.data_buf_len = length(cont.data_buf);
+		it.data_buf_pos = it.data_buf_len - 1;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline void
+goBegin(Iter<TContainer, FileReaderIterator> & it)
+{
+	it.data_abl_pos = 0;
+	it.data_buf_pos = 0;
+
+	TContainer & cont = *(it.data_container);
+	if (_isValidBlockFileReaderString(cont, 0))
+	{
+		it.data_buf_len = cont.data_abl[0];
+		it.data_atEnd = false;
+	}
+	else
+	{
+		it.data_buf_len = 0;
+		it.data_atEnd = true;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline void
+goEnd(Iter<TContainer, FileReaderIterator> & it)
+{
+	it.data_abl_pos = 0;
+	it.data_buf_pos = 0;
+	it.data_buf_len = 0;
+	it.data_atEnd = true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool
+atEnd(Iter<TContainer, FileReaderIterator> & it)
+{
+	return it.data_atEnd;
+}
+template <typename TContainer>
+inline bool
+atEnd(Iter<TContainer, FileReaderIterator> const & it)
+{
+	return it.data_atEnd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool
+atBegin(Iter<TContainer, FileReaderIterator> & it)
+{
+	return (it.data_abl_pos == 0) && (it.data_buf_pos == 0);
+}
+template <typename TContainer>
+inline bool
+atBegin(Iter<TContainer, FileReaderIterator> const & it)
+{
+	return (it.data_abl_pos == 0) && (it.data_buf_pos == 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator ==
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator == (Iter<TContainer, FileReaderIterator> const & left,
+			 Iter<TContainer, FileReaderIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return (atEnd(left) == atEnd(right)) && ((atEnd(left) && atEnd(right)) || position(left) == position(right));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator !=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator != (Iter<TContainer, FileReaderIterator> const & left,
+			 Iter<TContainer, FileReaderIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return (atEnd(left) != atEnd(right)) || (position(left) != position(right));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator < / >
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator < (Iter<TContainer, FileReaderIterator> const & left,
+			Iter<TContainer, FileReaderIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return (atEnd(right) && !atEnd(left)) || (position(left) < position(right));
+}
+
+template <typename TContainer>
+inline bool 
+operator > (Iter<TContainer, FileReaderIterator> const & left,
+			Iter<TContainer, FileReaderIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return (atEnd(left) && !atEnd(right)) || (position(left) > position(right));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator <= / >=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer>
+inline bool 
+operator <= (Iter<TContainer, FileReaderIterator> const & left,
+			 Iter<TContainer, FileReaderIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return atEnd(right) || (position(left) <= position(right));
+}
+
+template <typename TContainer>
+inline bool 
+operator >= (Iter<TContainer, FileReaderIterator> const & left,
+			 Iter<TContainer, FileReaderIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return atEnd(left) || (position(left) >= position(right));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, FileReaderIterator>  
+operator + (Iter<TContainer, FileReaderIterator> const & left,
+			TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, FileReaderIterator>(container(left), position(left) + right);
+}
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, FileReaderIterator>  
+operator + (TIntegral left,
+			Iter<TContainer, FileReaderIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, FileReaderIterator>(container(right), position(right) + left);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, FileReaderIterator> &
+operator += (Iter<TContainer, FileReaderIterator> & left,
+			 TIntegral right)
+{
+SEQAN_CHECKPOINT
+	left.data_buf_pos += right;
+	if (left.data_buf_pos >= left.data_buf_len)
+	{
+		setPosition(left, position(left) + right);
+	}
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, FileReaderIterator>  
+operator - (Iter<TContainer, FileReaderIterator> const & left,
+			TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Iter<TContainer, FileReaderIterator>(container(left), position(left) - right);
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer>
+inline typename Difference<Iter<TContainer, FileReaderIterator> >::Type  
+operator - (Iter<TContainer, FileReaderIterator> const & left,
+			Iter<TContainer, FileReaderIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return position(left) - position(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TIntegral>
+inline Iter<TContainer, FileReaderIterator> &
+operator -= (Iter<TContainer, FileReaderIterator> & left,
+			TIntegral right)
+{
+SEQAN_CHECKPOINT
+	if (left.data_buf_pos < right)
+	{
+		setPosition(left, position(left) - right);
+	}
+	else
+	{
+		left.data_buf_pos -= right;
+	}
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_filereaderiterator.h b/src/SeqAn-1.3/seqan/file/file_filereaderiterator.h
new file mode 100644
index 0000000..9e3aaa2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_filereaderiterator.h
@@ -0,0 +1,157 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_FILE_FILEREADEITERATOR_H
+#define SEQAN_HEADER_FILE_FILEREADEITERATOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFormat, typename TFile = FILE*, typename TSpec = Default>
+struct FileReader;
+
+// Manual forward for the skipMeta goBegin() overload.
+//template <typename TFile, typename TFormat, typename TFile2, typename TSpec>
+//void
+//goBegin(Iter<TFile, FileReader<TFormat, TFile2, TSpec> > & it, bool skip_meta);
+
+//////////////////////////////////////////////////////////////////////////////
+// FileReader: an iterator that scans through the data of a file
+// note: this is not the iterator of the FileReader string (see file_filereader.h)
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TFormat, typename TFile2, typename TSpec>
+class Iter<TFile, FileReader<TFormat, TFile2, TSpec> >
+{
+public:
+	typedef typename Value<TFile>::Type TValue;
+	typedef typename Position<TFile>::Type TPosition;
+
+	TPosition data_file_pos;	//position of the last read char relative to data begin (only valid if data_eof == false)
+	TFile * data_host;		//the host file
+	TValue data_char;		//the last read char
+	bool data_eof;			//true if reached end of record
+//	TFilePosition data_begin_pos;
+
+	Iter(TFile & file_, bool skip_meta = true):
+		data_file_pos(0),
+		data_host(& file_),
+		data_eof(false)
+	{
+		data_char = _streamGet(file_);
+		goBegin(*this, skip_meta);
+	}
+	Iter(Iter const & other_):
+		data_file_pos(other_.data_file_pos),
+		data_host(other_.data_host),
+		data_char(other_.data_char),
+		data_eof(other_.data_eof)
+	{
+	}
+	~Iter() 
+	{
+	}
+
+	Iter const &
+	operator = (Iter const & other_)
+	{
+		data_file_pos = other_.data_file_pos;
+		data_host = other_.data_host;
+		data_char = other_.data_char;
+		data_eof = other_.data_eof;
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TFormat, typename TFile2, typename TSpec>
+struct Value< Iter<TFile, FileReader<TFormat, TFile2, TSpec> > >:
+	Value<TFile>
+{
+};
+
+template <typename TFile, typename TFormat, typename TFile2, typename TSpec>
+struct GetValue< Iter<TFile, FileReader<TFormat, TFile2, TSpec> > >
+{
+	typedef typename Value< Iter<TFile, FileReader<TFormat, TFile2, TSpec> > >::Type Type;
+};
+
+template <typename TFile, typename TFormat, typename TFile2, typename TSpec>
+struct Reference< Iter<TFile, FileReader<TFormat, TFile2, TSpec> > >
+{
+	typedef typename Value< Iter<TFile, FileReader<TFormat, TFile2, TSpec> > >::Type & Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TFormat, typename TFile2, typename TSpec>
+inline TFile &
+host(Iter<TFile, FileReader<TFormat, TFile2, TSpec> > & it)
+{
+	return *(it.data_host);
+}
+
+
+template <typename TFile, typename TFormat, typename TFile2, typename TSpec>
+inline typename Reference<Iter<TFile, FileReader<TFormat, TFile2, TSpec> > >::Type
+value(Iter<TFile, FileReader<TFormat, TFile2, TSpec> > & it)
+{
+	return it.data_char;
+}
+
+template <typename TFile, typename TFormat, typename TFile2, typename TSpec>
+inline typename GetValue<Iter<TFile, FileReader<TFormat, TFile2, TSpec> > >::Type
+getValue(Iter<TFile, FileReader<TFormat, TFile2, TSpec> > & it)
+{
+	return it.data_char;
+}
+
+template <typename TFile, typename TFormat, typename TFile2, typename TSpec>
+inline bool
+atEnd(Iter<TFile, FileReader<TFormat, TFile2, TSpec> > & it)
+{
+	return it.data_eof;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_format.h b/src/SeqAn-1.3/seqan/file/file_format.h
new file mode 100644
index 0000000..9adbada
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_format.h
@@ -0,0 +1,705 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_FORMAT_H
+#define SEQAN_HEADER_FILE_FORMAT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.File Format:
+..summary:A file format.
+..include:seqan/file.h
+*/
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//Base Class for all FileFormat classes
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.FileFormat:
+..cat:Input/Output
+..summary:Object that stores a file format.
+..signature:FileFormat<File, Data [, Format [, Meta] ]>
+..see:Tag.File Format
+..include:seqan/file.h
+*/
+
+template <
+	typename TFile, 
+	typename TData,
+	typename TMeta,
+	typename TFormat = void >
+struct FileFormat:
+	public FileFormat<TFile, TData, TMeta, void>
+{
+public:
+	typedef typename Size<TData>::Type TSize;
+
+	FileFormat() {}
+	FileFormat(FileFormat const &) {}
+	~FileFormat() {}
+	FileFormat const & operator =(FileFormat const &) { return *this; }
+
+	inline void * 
+	formatID_() const
+	{
+SEQAN_CHECKPOINT
+		return ClassIdentifier_<TFormat>::getID();
+	}
+
+	virtual void
+	read_(TFile & file, TData & data) const
+	{
+SEQAN_CHECKPOINT
+		read(file, data, TFormat());
+	}
+	virtual void
+	read_(TFile & file, TData & data, TSize limit) const
+	{
+SEQAN_CHECKPOINT
+		read(file, data, limit, TFormat());
+	}
+
+	virtual void
+	readMeta_(TFile & file, TMeta & meta) const
+	{
+SEQAN_CHECKPOINT
+		readMeta(file, meta, TFormat());
+	}
+
+	virtual void
+	goNext_(TFile & file) const
+	{
+SEQAN_CHECKPOINT
+		goNext(file, TFormat());
+	}
+
+	virtual TSize
+	length_(TFile & file) const
+	{
+SEQAN_CHECKPOINT
+		length(file, TFormat());
+	}
+
+	virtual void
+	write_(TFile & file, TData & data) const
+	{
+SEQAN_CHECKPOINT
+		write(file, data, TFormat());
+	}
+	virtual void
+	write_(TFile & file, TData & data, TMeta & meta) const
+	{
+SEQAN_CHECKPOINT
+		write(file, data, meta, TFormat());
+	}
+};
+
+//____________________________________________________________________________
+
+//base class for all file format classes 
+
+template <typename TFile, typename TData, typename TMeta>
+struct FileFormat<TFile, TData, TMeta, void>
+{
+public:
+	typedef typename Size<TData>::Type TSize;
+
+	FileFormat() {}
+	FileFormat(FileFormat const &) {}
+	~FileFormat() {}
+	FileFormat const & operator =(FileFormat const &) { return *this; }
+
+	virtual void *
+	formatID_() const = 0;
+
+	virtual void
+	read_(TFile & file, TData & data) const = 0;
+	virtual void
+	read_(TFile & file, TData & data, TSize limit) const = 0;
+
+	virtual void
+	readMeta_(TFile & file, TMeta & meta) const = 0;
+
+	virtual void
+	goNext_(TFile & file) const = 0;
+
+	virtual TSize
+	length_(TFile & file) const = 0;
+
+	virtual void
+	write_(TFile & file, TData & data) const = 0;
+	virtual void
+	write_(TFile & file, TData & data, TMeta & meta) const = 0;
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Wrapper for functions to virtuals
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat>
+inline void *
+formatID(FileFormat<TFile, TData, TMeta, TFormat> const & file_format)
+{
+SEQAN_CHECKPOINT
+	return file_format.formatID_();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.Fileformat#read:
+..cat:Input/Output
+..summary:Loads a record from file.
+..signature:read(file, data [, meta], format)
+..signature:read(file, data [, meta], tag)
+..param.file:An input file.
+..param.data:A container that gets the data read from $file$.
+..param.meta:A container that gets meta data from $file$. (optional)
+..param.format:A file format object.
+...type:Class.FileFormat.File Format object
+..param.tag:A file format tag.
+...type:Tag.File Format.File Format tag
+..remarks:The result of this operation is stored in $data$.
+..remarks:The function leaves $file$ at the position for reading the next record.
+..see:Function.assign
+..include:seqan/file.h
+*/
+template <typename TFile, typename TData, typename TMeta, typename TFormat>
+inline void
+read(TFile & file,
+	 TData & data,
+	 FileFormat<TFile, TData, TMeta, TFormat> const & file_format)
+{
+SEQAN_CHECKPOINT
+	file_format.read_(file, data);
+}
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TSize>
+inline void
+read(TFile & file,
+	 TData & data,
+	 TSize limit,
+	 FileFormat<TFile, TData, TMeta, TFormat> const & file_format)
+{
+SEQAN_CHECKPOINT
+	file_format.read_(file, data, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.readMeta:
+..cat:Input/Output
+..summary:Read meta information from file.
+..signature:readMeta(file, meta, file_format)
+..param.file:A file that contains data in the format specified by $file_format$.
+..param.meta:A data structure that is able to store meta informations stored in $file$.
+..param.file_format:A file format.
+..returns.param.meta:The meta data read from $file$.
+...type:Tag.File Format
+..include:seqan/file.h
+*/
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat>
+inline void
+readMeta(TFile & file,
+		 TMeta & meta,
+		 FileFormat<TFile, TData, TMeta, TFormat> const & file_format)
+{
+SEQAN_CHECKPOINT
+	file_format.readMeta_(file, meta);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.goNext:
+..cat:Input/Output
+..include:seqan/file.h
+*/
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat>
+inline void
+goNext(TFile & file,
+	   FileFormat<TFile, TData, TMeta, TFormat> const & file_format)
+{
+SEQAN_CHECKPOINT
+	file_format.goNext_(file);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.length:
+..cat:Input/Output
+..include:seqan/file.h
+*/
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat>
+inline void
+length(TFile & file,
+	   FileFormat<TFile, TData, TMeta, TFormat> const & file_format)
+{
+SEQAN_CHECKPOINT
+	file_format.length_(file);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.Fileformat#write:
+..cat:Input/Output
+..summary:Writes to stream.
+..signature:write(stream, source)
+..signature:write(stream, begin, end)
+..param.stream: A stream object.
+...type:Adaption."std::iostream"
+..param.source: Container that is written to $stream$.
+..param.begin: Iterator to the first character of the range.
+..param.end: Iterator behind the last character of the range.
+..remarks:The content of $source$ is written 'as-is' to $stream$.
+..include:seqan/file.h
+*/
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat>
+inline void
+write(TFile & file,
+	  TData & data,
+	  FileFormat<TFile, TData, TMeta, TFormat> const & file_format)
+{
+SEQAN_CHECKPOINT
+	file_format.write_(file, data);
+}
+template <typename TFile, typename TData, typename TMeta, typename TFormat>
+inline void
+write(TFile & file,
+	  TData & data,
+	  TMeta & meta,
+	  FileFormat<TFile, TData, TMeta, TFormat> const & file_format)
+{
+SEQAN_CHECKPOINT
+	file_format.write_(file, data, meta);
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Comparison of two FileFormat objects
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFileLeft, typename TDataLeft, typename TMetaLeft, typename TFormatLeft, typename TFileRight, typename TDataRight, typename TMetaRight, typename TFormatRight>
+inline bool
+operator == (FileFormat<TFileLeft, TDataLeft, TMetaLeft, TFormatLeft> const & left, 
+			 FileFormat<TFileRight, TDataRight, TMetaRight, TFormatRight> const & right)
+{
+SEQAN_CHECKPOINT
+	return formatID(left) == formatID(right);
+}
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TFormat2>
+inline bool
+operator == (FileFormat<TFile, TData, TMeta, TFormat> const & left, 
+			 Tag<TFormat2> const)
+{
+SEQAN_CHECKPOINT
+	return formatID(left) == ClassIdentifier_<Tag<TFormat2> const>::getID();
+}
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TFormat2>
+inline bool
+operator == (Tag<TFormat2> const,
+			 FileFormat<TFile, TData, TMeta, TFormat> const & right)
+{
+SEQAN_CHECKPOINT
+	return ClassIdentifier_<Tag<TFormat2> const>::getID() == formatID(right);
+}
+
+//____________________________________________________________________________
+
+template <typename TFileLeft, typename TDataLeft, typename TMetaLeft, typename TFormatLeft, typename TFileRight, typename TDataRight, typename TMetaRight, typename TFormatRight>
+inline bool
+operator != (FileFormat<TFileLeft, TDataLeft, TMetaLeft, TFormatLeft> const & left, 
+			 FileFormat<TFileRight, TDataRight, TMetaRight, TFormatRight> const & right)
+{
+SEQAN_CHECKPOINT
+	return formatID(left) != formatID(right);
+}
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TFormat2>
+inline bool
+operator != (FileFormat<TFile, TData, TMeta, TFormat> const & left, 
+			 Tag<TFormat2> const)
+{
+SEQAN_CHECKPOINT
+	return formatID(left) != ClassIdentifier_<Tag<TFormat2> const>::getID();
+}
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TFormat2>
+inline bool
+operator != (Tag<TFormat2> const,
+			 FileFormat<TFile, TData, TMeta, TFormat> const & right)
+{
+SEQAN_CHECKPOINT
+	return ClassIdentifier_<Tag<TFormat2> const>::getID() != formatID(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// allgemeine Funktionen fuer Streams
+//////////////////////////////////////////////////////////////////////////////
+//TODO??? Das muss in eine extra Datei
+
+
+/*
+template <typename TStream, typename TIterator>
+inline void
+write(TStream & target,
+	  TIterator begin_,
+	  TIterator end_)
+{
+	while (begin_ != end_)
+	{
+		_streamPut(target, convert<char>(*begin_));
+		++begin_;
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename TStream, typename TSource>
+inline void
+write(TStream & target,
+	  TSource const & source)
+{
+	write(target, begin(source), end(source));
+}
+//TODO???: Spezialisierungen zum blockweise schreiben bei contiguous strings von char
+//Anmerkungen: write wird nach dem zweiten Argument (source) spezialisiert!
+
+//____________________________________________________________________________
+
+template <typename TStream, typename TSource>
+inline void
+write(TStream & target,
+	  TSource const & source,
+	  typename Size<TSource>::Type limit_)
+{
+	if (length(source) > limit_)
+	{
+		write(target, begin(source), begin(source) + limit_);
+	}
+	else
+	{
+		write(target, begin(source), end(source));
+	}
+}
+
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+// Helper function for scanning a stream
+// c = next character, pass it to the next call of the function
+
+template <typename TFile, typename TString, typename TChar>
+inline void
+_streamAppendLine(TFile & file,
+				   TString & str,
+				   TChar & c)
+{
+	while (true)
+	{
+		if (_streamEOF(file)) break;
+
+		if (c == '\r')
+		{
+			c = _streamGet(file);
+			if (c == '\n') 
+			{
+				c = _streamGet(file);
+			}
+			break;
+		}
+		if (c == '\n')
+		{
+			c = _streamGet(file);
+			break;
+		}
+
+		appendValue(str, c);
+
+		c = _streamGet(file);
+	}
+}
+//____________________________________________________________________________
+
+template <typename TFile, typename TChar>
+inline void
+_streamCountLine(TFile & file,
+				  TChar & c)
+
+{
+	while (true)
+	{
+		if (_streamEOF(file)) break;
+
+		if (c == '\r')
+		{
+			c = _streamGet(file);
+			if (c == '\n') 
+			{
+				c = _streamGet(file);
+			}
+			break;
+		}
+		if (c == '\n')
+		{
+			c = _streamGet(file);
+			break;
+		}
+
+		c = _streamGet(file);
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TChar>
+inline typename Size<TFile>::Type
+_streamSkipLine(TFile & file,
+				 TChar & c)
+
+{
+	typename Size<TFile>::Type count = 0;
+	while (true)
+	{
+		if (_streamEOF(file)) break;
+
+		if (c == '\r')
+		{
+			c = _streamGet(file);
+			if (c == '\n') 
+			{
+				c = _streamGet(file);
+			}
+			break;
+		}
+		if (c == '\n')
+		{
+			c = _streamGet(file);
+			break;
+		}
+
+		++count;
+
+		c = _streamGet(file);
+	}
+
+	return count;
+}
+
+
+
+
+////////////////////////////////////////////////////////////////////////////
+//new ones
+
+//new ones for streams
+template<typename TFile, typename TChar>
+inline void 
+_streamSkipWhitespace(TFile& file, TChar& c)
+{
+	if ((c!=' ') && (c != '\t')) return;
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if ((c!=' ') && (c != '\t')) break;
+	}
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TFile, typename TChar>
+inline String<char>
+_streamReadWord(TFile & file, TChar& c)
+{
+	// Read word
+	String<char> str(c);
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (!_streamIsLetter(c)) break;
+		append(str, c);
+	}
+	return str;
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+template<typename TChar>
+inline bool
+_streamIsLetter(TChar const c)
+{
+	return ((c == 'a') || (c == 'b') || (c == 'c') || (c == 'd') || (c == 'e') || 
+			(c == 'f') || (c == 'g') || (c == 'h') || (c == 'i') || (c == 'j') ||
+			(c == 'k') || (c == 'l') || (c == 'm') || (c == 'n') || (c == 'o') || 
+			(c == 'p') || (c == 'q') || (c == 'r') || (c == 's') || (c == 't') ||
+			(c == 'u') || (c == 'v') || (c == 'w') || (c == 'x') || (c == 'y') || 
+			(c == 'z') || (c == 'A') || (c == 'B') || (c == 'C') || (c == 'D') ||
+			(c == 'E') || (c == 'F') || (c == 'G') || (c == 'H') || (c == 'I') || 
+			(c == 'J') || (c == 'K') || (c == 'L') || (c == 'M') || (c == 'N') ||
+			(c == 'O') || (c == 'P') || (c == 'Q') || (c == 'R') || (c == 'S') || 
+			(c == 'T') || (c == 'U') || (c == 'V') || (c == 'W') || (c == 'X') ||
+			(c == 'Y') || (c == 'Z'));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//new ones for strings
+
+template <typename TString, typename TIter>
+inline typename Size<TString>::Type
+_stringSkipLine(TString & str,
+				 TIter & it)
+
+{
+	typename Size<TString>::Type count = 0;
+	typename Iterator<TString,Standard>::Type end_it = end(str,Standard());
+	while (true)
+	{
+		if (it == end_it) break;
+
+		if (*it == '\r')
+		{
+			++it;
+			if (*it == '\n') 
+			{
+				++it;
+			}
+			break;
+		}
+		if (*it == '\n')
+		{
+			++it;
+			break;
+		}
+
+		++count;
+		++it;
+	}
+
+	return count;
+}
+
+/////////////////////////////////////////////////////////////////////////
+
+template <typename TString1, typename TString2, typename TIter>
+inline void
+_stringAppendLine(TString1 & str,
+				   TString2 & a_str,
+				   TIter & it)
+{
+	typename Iterator<TString1,Standard>::Type end_it = end(str,Standard());
+	while (true)
+	{
+		if (it == end_it) break;
+
+		if (*it == '\r')
+		{
+			++it; 
+			if (*it == '\n') 
+			{
+				++it;
+			}
+			break;
+		}
+		if (*it == '\n')
+		{
+			++it;
+			break;
+		}
+
+		appendValue(a_str, getValue(it));
+		++it;
+	}
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TIter>
+inline void 
+_stringSkipWhitespace(TString& str, TIter& it)
+{
+	typename Iterator<TString,Standard>::Type end_it = end(str,Standard())-1;
+	while (it != end_it) {
+		if ((*it!=' ') && (*it != '\t')) break;
+		++it;
+	}
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TIter>
+inline int
+_stringReadNumber(TString & str, TIter& it)
+{
+	// Read number
+	typename Iterator<TString,Standard>::Type end_it = end(str,Standard())-1;
+	String<char> numstr(getValue(it));
+	while (it != end_it) {
+		++it;
+		if (!_parseIsDigit(*it)) break;
+		append(numstr, getValue(it));
+	}
+ 	return atoi(toCString(numstr));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_format_cgviz.h b/src/SeqAn-1.3/seqan/file/file_format_cgviz.h
new file mode 100644
index 0000000..ac79574
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_format_cgviz.h
@@ -0,0 +1,240 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_CGVIZ_H
+#define SEQAN_HEADER_FILE_CGVIZ_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - CGViz
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Tag.File Format.tag.CGViz:
+	CGViz file format for sequences. Only output.
+..include:seqan/file.h
+*/
+struct TagCGViz_;
+typedef Tag<TagCGViz_> const CGViz;
+
+/////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// goNext
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile>
+void goNext(TFile & file, CGViz) {
+	SEQAN_CHECKPOINT;
+    (void) file; // When compiled without assertions.
+	SEQAN_ASSERT(!_streamEOF(file))
+	
+	return;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// write
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec>
+void _writeImpl(TFile& target, Align<TSource, TSpec>& align, TStringContainer& ids, CGViz) {
+	SEQAN_CHECKPOINT
+
+	typedef Align<TSource, TSpec> const TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Position<typename Rows<TAlign>::Type>::Type TRowsPosition;
+	typedef typename Position<TAlign>::Type TPosition;
+	TRowsPosition row_count = length(rows(align));
+	if (row_count < 2) return;
+
+	unsigned int pair=1;
+	unsigned int count=0;
+	for(TRowsPosition i=0;i<row_count-1;++i) {
+		for(TRowsPosition j=i+1;j<row_count;++j) {
+			
+			// Print header
+			_streamWrite(target, "{DATA dat"); 
+			_streamPutInt(target, pair);
+			_streamPut(target, '\n');
+			_streamWrite(target, "[__GLOBAL__] dimension=2:\n"); 
+						
+			TPosition begin_ = beginPosition(cols(align));
+			TPosition end_ = endPosition(cols(align));
+		
+			bool match = false;
+			while(begin_ < end_) {
+				if ((row(align, i)[begin_]==row(align, j)[begin_]) && (row(align, i)[begin_]!='-')) {
+					if (!match) {
+						match=true;
+						_streamPutInt(target, toSourcePosition(row(align,i),begin_+1));
+						_streamPut(target, ' ');
+						_streamPutInt(target, toSourcePosition(row(align,j),begin_+1));
+						_streamPut(target, ' ');
+					}
+				}
+				if ((row(align, i)[begin_]!=row(align, j)[begin_]) || (row(align, i)[begin_]=='-') || (row(align, j)[begin_]=='-')) {
+					if (match) {
+						_streamPutInt(target, toSourcePosition(row(align,i),begin_));
+						_streamPut(target, ' ');
+						_streamPutInt(target, toSourcePosition(row(align,j),begin_));
+						_streamPut(target, '\n');
+						match=false;
+					}
+				}
+				begin_++;
+			}
+			if (match) {
+				_streamPutInt(target, toSourcePosition(row(align,i),begin_));
+				_streamPut(target, ' ');
+				_streamPutInt(target, toSourcePosition(row(align,j),begin_));
+				_streamPut(target, '\n');
+				match=false;
+			}
+			_streamPut(target, '}');
+			_streamPut(target, '\n');
+
+			// Write footer
+			_streamWrite(target, "{GLYPH Glyph");
+			_streamPutInt(target, pair);
+			_streamPut(target, '\n');
+			_streamWrite(target, "drawerName=Lines\n");
+			_streamWrite(target, "lineWidth=3\n");
+			_streamPut(target, '}');
+			_streamPut(target, '\n');
+			_streamWrite(target, "{PANE Pane");
+			_streamPutInt(target, pair);
+			_streamPut(target, '\n');
+			_streamWrite(target, "uLabel=");
+			_streamWrite(target, getValue(ids,i));
+			_streamPut(target, '\n');
+			_streamWrite(target, "uStop=");
+			_streamPutInt(target, length(source(row(align,i))));
+			_streamPut(target, '\n');
+			_streamWrite(target, "vLabel=");
+			_streamWrite(target, getValue(ids,j));
+			_streamPut(target, '\n');
+			_streamWrite(target, "vStop=");
+			_streamPutInt(target, length(source(row(align,j))));
+			_streamPut(target, '\n');
+			_streamPut(target, '}');
+			_streamPut(target, '\n');
+			_streamWrite(target, "{WINDOW Window");
+			_streamPutInt(target, pair);
+			_streamPut(target, '\n');
+			_streamPut(target, '}');
+			_streamPut(target, '\n');
+			_streamWrite(target, "{FEEDER Feeder<");
+			_streamPutInt(target, pair);
+			_streamPut(target, '>');
+			_streamPut(target, ' ');
+			_streamPutInt(target, count);
+			_streamPut(target, ' ');
+			_streamPutInt(target, count+1);
+			_streamPut(target, '\n');
+			_streamPut(target, '}');
+			_streamPut(target, '\n');
+			++count;
+			_streamWrite(target, "{THREADER Threader<");
+			_streamPutInt(target, pair);
+			_streamPut(target, '>');
+			_streamPut(target, ' ');
+			_streamPutInt(target, count);
+			_streamPut(target, ' ');
+			_streamPutInt(target, count+1);
+			_streamPut(target, '\n');
+			_streamPut(target, '}');
+			_streamPut(target, '\n');
+			++count;
+			_streamWrite(target, "{ANCHOR Anchor<");
+			_streamPutInt(target, pair);
+			_streamPut(target, '>');
+			_streamPut(target, ' ');
+			_streamPutInt(target, count);
+			_streamPut(target, ' ');
+			_streamPutInt(target, count+1);
+			_streamPut(target, '\n');
+			_streamPut(target, '}');
+			_streamPut(target, '\n');
+			count+=2;
+			++pair;
+		}
+	}
+}
+
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TSource, typename TSpec>
+void write(TFile & file, Align<TSource, TSpec>& align, CGViz) {
+	SEQAN_CHECKPOINT
+	_writeImpl(file, align, String<String<char> >(), CGViz());
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec>
+void write(TFile & file, Align<TSource, TSpec> & align, TStringContainer& ids, CGViz) {
+	SEQAN_CHECKPOINT
+	_writeImpl(file, align, ids, CGViz());
+}
+
+
+//VisualC++ const array bug workaround
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec>
+void write(TFile & file, Align<TSource, TSpec>* align, TStringContainer & ids, CGViz) {
+	SEQAN_CHECKPOINT
+	_writeImpl(file, align, ids, CGViz());
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec, typename TMeta>
+void write(TFile & file, Align<TSource, TSpec> & align, TStringContainer& ids, TMeta &, CGViz) {
+	SEQAN_CHECKPOINT
+	_writeImpl(file, align, ids, CGViz());
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_format_embl.h b/src/SeqAn-1.3/seqan/file/file_format_embl.h
new file mode 100644
index 0000000..b265e34
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_format_embl.h
@@ -0,0 +1,639 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_EMBL_H
+#define SEQAN_HEADER_FILE_EMBL_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - Embl
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.File Format.tag.Embl:EMBL format for sequences.
+..include:seqan/file.h
+*/
+struct TagEmbl_;
+typedef Tag<TagEmbl_> const Embl;
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FileReader Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TFile2, typename TSpec>
+inline void
+goBegin(Iter<TFile, FileReader<Embl, TFile2, TSpec> > & it, bool skip_meta)
+{
+SEQAN_CHECKPOINT
+	if (skip_meta)
+	{
+		while (true)
+		{
+			if (_streamEOF(host(it)))
+			{
+				it.data_eof = true;
+				return;
+			}
+			if (it.data_char == '/')
+			{//end of record
+				_streamSkipLine(host(it), it.data_char);
+				it.data_eof = true;
+				return;
+			}
+			if (it.data_char == ' ')
+			{
+				break;
+			}
+			//skip meta line
+			_streamSkipLine(host(it), it.data_char);
+		}
+	}
+
+	//find first character
+	while (true)
+	{
+		if (_streamEOF(host(it)))
+		{
+			it.data_eof = true;
+			return;
+		}
+		if ((it.data_char != ' ') && ((it.data_char < '0') || (it.data_char > '9')))
+		{
+			if ((it.data_char != '\n') && (it.data_char != '\r')) break;
+
+			it.data_char = _streamGet(host(it));
+			if (it.data_char == '/')
+			{//end of record
+				_streamSkipLine(host(it), it.data_char);
+				it.data_eof = true;
+				return;
+			}
+		}
+		else
+		{
+			it.data_char = _streamGet(host(it));
+		}
+	}
+
+//	it.data_file_pos = _streamTellG(host(it));
+	it.data_file_pos -= 1;
+	it.data_eof = _streamEOF(host(it));
+}
+
+
+template <typename TFile, typename TFile2, typename TSpec>
+inline void
+goBegin(Iter<TFile, FileReader<Embl, TFile2, TSpec> > & it)
+{
+    SEQAN_CHECKPOINT;
+    goBegin(it, true);
+}
+
+
+template <typename TFile, typename TFile2, typename TSpec>
+inline void
+goNext(Iter<TFile, FileReader<Embl, TFile2, TSpec> > & it)
+{
+SEQAN_CHECKPOINT
+	do
+	{
+		it.data_char = _streamGet(host(it));
+		if (_streamEOF(host(it)))
+		{
+			it.data_eof = true;
+			return;
+		}
+		it.data_file_pos += 1;
+
+		if ((it.data_char == '\n') || (it.data_char == '\r'))
+		{//linebreak detected: find begin of next line
+			do
+			{
+				it.data_char = _streamGet(host(it));
+				if (_streamEOF(host(it)))
+				{
+					it.data_eof = true;
+					return;
+				}
+				it.data_file_pos += 1;
+			} while ((it.data_char == '\n') || (it.data_char == '\r'));
+
+			if (it.data_char == '/')
+			{//end of record
+				_streamSkipLine(host(it), it.data_char);
+				_streamUnget(host(it));
+				it.data_eof = true;
+				return;
+			}
+		}
+	} while ((it.data_char == ' ') || ((it.data_char >= '0') && (it.data_char <= '9')));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// File Format Access Function
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TData>
+inline void
+read(TFile & file,
+	 TData & data,
+	 Embl)
+{
+SEQAN_CHECKPOINT
+	Iter<TFile, FileReader<Embl> > it(file);
+
+	clear(data);
+	while (!atEnd(it))
+	{
+		appendValue(data, getValue(it));
+		goNext(it);
+	}
+}
+
+template <typename TFile, typename TData, typename TSize>
+inline void
+read(TFile & file,
+	 TData & data,
+	 TSize limit,
+	 Embl)
+{
+SEQAN_CHECKPOINT
+	typename Size<TData>::Type siz = length(data);
+	Iter<TFile, FileReader<Embl> > it(file);
+
+	clear(data);
+	while (!atEnd(it) && (siz < limit))
+	{
+		appendValue(data, getValue(it));
+		goNext(it);
+	}
+	while (!atEnd(it))
+	{
+		goNext(it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+template <typename TFile, typename TMeta>
+inline void
+readMeta(TFile & file,
+		 TMeta & meta,
+		 Embl)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TMeta>::Type TValue;
+
+	clear(meta);
+	if (_streamEOF(file))
+	{
+		return;
+	}
+
+	TValue c = _streamGet(file);
+
+	while (!_streamEOF(file))
+	{
+		if (c == ' ')
+		{//end of meta data
+			_streamUnget(file);
+			return;
+		}
+		if (c == '/')
+		{//end of record
+			_streamSkipLine(file, c);
+			_streamUnget(file);
+			return;
+		}
+
+		_streamAppendLine(file, meta, c);
+		appendValue(meta, '\n');
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/**
+.Function.readLineType:
+..cat:Input/Output
+..summary:Reads the information belonging to the two-character line code specified.
+..signature:readLineType(file,data,key,Embl);
+..param.file:The input file or string.
+...remarks:This function works on an open file stream or on the string data obtained from calling Function.readMeta
+..param.data:The target container that will be filled.
+..param.key:The two-character code specifying the file entry to be read, e.g. "AC" for the acession number line or "DE" for the description line. 
+..see:Function.readMeta
+..see:Function.readFeature
+..include:seqan/file.h
+*/
+template<typename TFile, typename TData, typename TKey>
+inline void
+readLineType(TFile & file,
+			 TData & data,
+			 TKey key,
+			 Embl)
+
+{
+SEQAN_CHECKPOINT
+
+	//this function is meant to be used for two letter codes only 
+	SEQAN_ASSERT_TRUE(length(key)==2); ;
+
+	typedef typename Value<TFile>::Type TValue;
+	typedef typename Position<TFile>::Type TPosition;
+
+	clear(data);
+	if(_streamEOF(file))
+		return;
+	
+	TPosition pos = _streamTellG(file);
+	TValue c = _streamGet(file);
+	while (!_streamEOF(file))
+	{
+		if(c == '/')
+		{
+			_streamSeekG(file,pos);
+			return;
+		}
+		if(c == key[0])
+		{
+			c = _streamGet(file);
+			if(c == key[1])
+			{
+				for(unsigned int i = 0; i < 4; ++i)
+					c = _streamGet(file);
+				_streamAppendLine(file, data, c);
+				while(!_streamEOF(file) && _streamReadWord(file,c) == key)
+				{
+					appendValue(data, '\n');
+					for(unsigned int i = 0; i < 3; ++i)
+						c = _streamGet(file);
+					_streamAppendLine(file, data, c);
+				}
+				_streamSeekG(file,pos);
+				return;
+			}
+		}
+		_streamSkipLine(file, c);
+	}
+
+	_streamSeekG(file,pos);
+	
+}
+
+
+
+template<typename TData, typename TValue, typename TSpec, typename TKey>
+inline void
+readLineType(String<TValue,TSpec> & meta,
+			 TData & data,
+			 TKey key,
+			 Embl)
+
+{
+SEQAN_CHECKPOINT
+
+	//this function is meant to be used for two letter codes only 
+	SEQAN_ASSERT_TRUE(length(key)==2); ;
+
+	typedef typename Iterator<String<TValue,TSpec>,Standard>::Type TIterator;
+	typedef typename Position<String<TValue,TSpec> >::Type TPosition;
+
+	clear(data);
+	if(empty(meta))
+		return;
+	
+	TIterator it = begin(meta,Standard());
+	TIterator end_it = end(meta,Standard());
+
+	while (it != end_it)
+	{
+		if(*it == '/')
+			return;
+
+		if(*it == key[0])
+		{
+			++it;
+			if(*it == key[1])
+			{
+				it+=4;
+				_stringAppendLine(meta, data, it);
+				while(it!=end_it && *it==key[0] && *(++it)==key[1])
+				{
+					appendValue(data, '\n');
+					it+=4;
+					_stringAppendLine(meta, data, it);
+				}
+				return;
+			}
+		}
+		_stringSkipLine(meta, it);
+	}
+
+	
+}
+
+
+/**
+.Function.readFeature:
+..cat:Input/Output
+..summary:Finds the first feature specified by 'key' starting from position 'start' in the feature table (the feature table can be
+obtained by calling readLineType with the two-character code "FT").
+..signature:readFeature(ft_string,start,data,key,Embl);
+..param.ft_string:The feature table.
+..param.start:Position in feature table where search begins.
+..param.data:The target container that will be filled.
+..param.key:The key word specifying the feature to be read, e.g. "mRNA" or "CDS".
+..return:The position behind the feature if found, 0 otherwise.
+..see:Function.readMeta
+..see:Function.readFeature
+..include:seqan/file.h
+*/
+//read parts of feature table (those that belong to key)
+template<typename TData, typename TKey, typename TString>
+inline typename Position<TString>::Type
+readFeature(TString & str,
+			typename Position<TString>::Type start_pos,
+			TData & data,
+			TKey key,
+			Embl)
+
+{
+SEQAN_CHECKPOINT
+
+	typedef typename Iterator<TString,Standard>::Type TIterator;
+	typedef typename Position<TString>::Type TPosition;
+
+	clear(data);
+	if(empty(str) || start_pos >= length(str))
+		return 0;
+	
+	TIterator it = iter(str,start_pos,Standard());
+	TIterator end_it = end(str,Standard());
+
+	while (it != end_it)
+	{
+		if(*it == key[0])
+		{
+			++it;
+			bool found = true;
+			for(unsigned int i = 1; i < length(key); ++i)
+			{
+				if(key[i] != *it)
+				{
+					found = false;
+					break;
+				}
+				++it;
+			}
+			if(found)
+			{
+				_stringSkipWhitespace(str,it);
+				_stringAppendLine(str, data, it);
+				while(it!=end_it && *it == ' ')
+				{
+					appendValue(data, '\n');
+					_stringSkipWhitespace(str,it);
+					_stringAppendLine(str, data, it);
+				}
+				return position(it,str);
+			}
+		}
+		_stringSkipLine(str, it);
+	}
+
+	return 0;
+	
+}
+	
+
+
+//////////////////////////////////////////////////////////////////////////////
+template <typename TFile>
+inline void
+goNext(TFile & file,
+	   Embl)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TFile>::Type TValue;
+
+	if (_streamEOF(file))
+	{
+		return;
+	}
+
+	while (!_streamEOF(file))
+	{
+		TValue c = _streamGet(file);
+		if (c == '/')
+		{//end of record
+			_streamSkipLine(file, c);
+			_streamUnget(file);
+			return;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <typename TFile>
+inline void
+length(TFile & file,
+	   Embl)
+{
+SEQAN_CHECKPOINT
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TData>
+inline void
+write(TFile & file,
+	  TData & data,
+	  Embl)
+{
+SEQAN_CHECKPOINT
+	enum
+	{
+		BLOCK_SIZE = 10,
+		BLOCKS_PER_LINE = 6,
+		FIRST_INDENT = 5
+	};
+	char const * NUM_BLOCK_FORMAT = "%9d";
+
+	typedef typename Size<TData>::Type TSize;
+	typedef typename Iterator<TData, Standard>::Type TIterator;
+
+	TSize count = 0;
+	int block_count = 0;
+	int char_in_block_count = 0;
+	TIterator it = begin(data, Standard());
+	TIterator it_end = end(data, Standard());
+
+	while (it != it_end)
+	{
+		//write indent
+		for (int j = 0; j < FIRST_INDENT; ++j) _streamPut(file, ' ');
+
+		//write rest of line
+		while (true)
+		{
+			//write next character
+			if (it != it_end)
+			{
+				_streamPut(file, *it);
+				++it;
+				++count;
+			}
+			else
+			{//no more chars left: fill up with ' '
+				_streamPut(file, ' ');
+			}
+			++char_in_block_count;
+
+			if (char_in_block_count >= BLOCK_SIZE)
+			{//end of block
+				char_in_block_count = 0;
+				_streamPut(file, ' ');
+				++block_count;
+
+				if (block_count >= BLOCKS_PER_LINE)
+				{//enough blocks: write end of line
+					block_count = 0;
+					_streamPutInt(file, count, NUM_BLOCK_FORMAT);
+					_streamPut(file, '\n');
+					break; //end of line
+				}
+			}
+		}
+	}
+
+	write(file, "//\n");
+}
+
+template <typename TFile, typename TData, typename TMeta>
+inline void
+write(TFile & file,
+	  TData & data,
+	  TMeta & meta,
+	  Embl)
+{
+SEQAN_CHECKPOINT
+	write(file, meta);
+	write(file, data, Embl());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*leere Vorlage
+template <typename TFile, typename TData>
+inline void
+read(TFile & file,
+	 TData & data,
+	 Embl)
+{
+SEQAN_CHECKPOINT
+}
+
+template <typename TFile, typename TData, typename TSize>
+inline void
+read(TFile & file,
+	 TData & data,
+	 TSize limit,
+	 Embl)
+{
+SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TMeta>
+inline void
+readMeta(TFile & file,
+		 TMeta & meta,
+		 Embl)
+{
+SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile>
+inline void
+goNext(TFile & file,
+	   Embl)
+{
+SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile>
+inline void
+length(TFile & file,
+	   Embl)
+{
+SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TData>
+inline void
+write(TFile & file,
+	  TData & data,
+	  Embl)
+{
+SEQAN_CHECKPOINT
+}
+template <typename TFile, typename TData, typename TMeta>
+inline void
+write(TFile & file,
+	  TData & data,
+	  TMeta & meta,
+	  Embl)
+{
+SEQAN_CHECKPOINT
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_format_fasta.h b/src/SeqAn-1.3/seqan/file/file_format_fasta.h
new file mode 100644
index 0000000..e02bf8c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_format_fasta.h
@@ -0,0 +1,587 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_FASTA_H
+#define SEQAN_HEADER_FILE_FASTA_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - Fasta
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.File Format.tag.Fasta:
+	FASTA file format for sequences.
+..include:seqan/file.h
+*/
+struct TagFasta_;
+typedef Tag<TagFasta_> const Fasta;
+
+//////////////////////////////////////////////////////////////////////////////
+// Filereader
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TFile2, typename TSpec>
+inline void
+goBegin(Iter<TFile, FileReader<Fasta, TFile2, TSpec> > & it, bool skip_meta)
+{
+	if (_streamEOF(host(it)))
+	{
+		it.data_eof = true;
+		return;
+	}
+
+	if (skip_meta && (it.data_char == '>'))
+	{
+		//skip meta line
+		_streamSkipLine(host(it), it.data_char);
+	}
+
+	//eliminate linebreaks
+	while ((it.data_char == '\n') || (it.data_char == '\r'))
+	{
+		if (_streamEOF(host(it)))
+		{
+			it.data_eof = true;
+			return;
+		}
+		it.data_char = _streamGet(host(it));
+	}
+
+	if (it.data_char == '>')
+	{//end of record
+		it.data_eof = true;
+		_streamUnget(host(it));
+		return;
+	}
+
+	it.data_file_pos = _streamTellG(host(it)) - 1;
+	it.data_eof = _streamEOF(host(it));
+}
+template <typename TFile, typename TFile2, typename TSpec>
+inline void
+goBegin(Iter<TFile, FileReader<Fasta, TFile2, TSpec> > & it)
+{
+	goBegin(it, true);
+}
+
+
+template <typename TFile, typename TFile2, typename TSpec>
+inline void
+goNext(Iter<TFile, FileReader<Fasta, TFile2, TSpec> > & it)
+{
+/*
+	if (_streamEOF(host(it)))
+	{
+		it.data_eof = true;
+		return;
+	}
+*/
+	it.data_char = _streamGet(host(it));
+	++it.data_file_pos;
+
+	if (_streamEOF(host(it)))
+	{
+		it.data_eof = true;
+		return;
+	}
+
+	if ((it.data_char == '\n') || (it.data_char == '\r'))
+	{//linebreak detected: find begin of next line
+		do
+		{
+			it.data_char = _streamGet(host(it));
+			if (_streamEOF(host(it)))
+			{
+				it.data_eof = true;
+				return;
+			}
+			++it.data_file_pos;
+		} while ((it.data_char == '\n') || (it.data_char == '\r'));
+
+		if (it.data_char == '>')
+		{//end of record
+			_streamUnget(host(it));
+			it.data_eof = true;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// FileFormat Interface
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/////////////////////////////////////////////////////////////////////////
+//count_valid: zaehlt die nicht-Zeilenumbrueche (input/output)
+//count_all: zaehlt alle Zeichen incl. Zeilenumbrueche (input/output)
+//returns: zuletzt gelesenes Zeichen = das erste hinter dem Zeilenumbruch bzw. eof
+//the last read char is not counted!
+//count_valid and count_all are not resetted but counted up
+template <typename TFile, typename TSize>
+inline typename Value<TFile>::Type
+_fastaScanLine(TFile & file,
+				 TSize & count_valid,
+				 TSize & count_all)
+{
+SEQAN_CHECKPOINT
+	SEQAN_ASSERT(!_streamEOF(file))
+
+	TSize count = 0;
+	typename Value<TFile>::Type c;
+
+	do
+	{
+		c = _streamGet(file);
+		if (c == '\n' || c == '\r')
+		{
+			while (!_streamEOF(file))
+			{
+				++count_all;
+				c = _streamGet(file);
+				if (c != '\n' && c != '\r')
+					break;
+			}
+			break;
+		}
+
+		++count;
+	} while (!_streamEOF(file));
+	
+	count_valid += count;
+	count_all += count;
+	return c;
+}
+
+
+/////////////////////////////////////////////////////////////////////////
+template <typename TFile, typename TSize>
+inline void
+_readNCharsFromFile(TFile & file, TSize count)
+{
+SEQAN_CHECKPOINT
+	for (TSize i = 0; i < count; ++i)
+	{
+		_streamGet(file);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// read
+//////////////////////////////////////////////////////////////////////////////
+
+// TODO(holtgrew): The interface of this function does not correlate with documentation where the third parameter is metadata!
+template <typename TFile, typename TData, typename TSize>
+void
+read(TFile & file,
+	 TData & data,
+	 TSize limit,
+	 Fasta)
+{
+SEQAN_CHECKPOINT
+
+	SEQAN_ASSERT(!_streamEOF(file))
+	clear(data);
+
+	//determine begin position
+	typename Value<TFile>::Type c_first = _streamGet(file);
+	SEQAN_ASSERT(!_streamEOF(file))
+
+	typename Position<TFile>::Type begin_pos = _streamTellG(file);
+	typename Size<TData>::Type count_valid = 1; //"valid" characters read (without line breaks)
+	typename Size<TData>::Type count_all = 1;	//all characters read (with line breaks)
+
+	if (_streamEOF(file))
+	{
+		return;
+	}	
+
+	if (c_first == '>')
+	{//there is an id line: skip it
+		c_first = _fastaScanLine(file, count_valid, count_all);
+	}
+
+	if ((c_first == '>') || _streamEOF(file)) 
+	{//another id line = empty entry
+		_streamSeekG(file, begin_pos);
+		_readNCharsFromFile(file, count_all-1);
+		return;
+	}
+
+	begin_pos = _streamTellG(file);
+
+	count_valid = 1;
+	count_all = 1;
+	typename Value<TFile>::Type c;
+	bool eof_reached = false;
+	//determine length
+	while (true)
+	{
+		c = _fastaScanLine(file, count_valid, count_all);
+		if (_streamEOF(file)) 
+		{//end of file: stop searching
+			eof_reached = true;
+			break;
+		}
+		if (c == '>')
+		{//next entry found: stop seaching
+			break;
+		}
+		if ((c != '\n') && (c != '\r'))
+		{
+			++count_valid; //count c
+		}
+		++count_all;
+	}
+
+	//reserve space
+	typename Size<TData>::Type count = count_valid;
+	if (count > limit)
+		count = limit;
+	
+	resize(data, count);
+	if (count > length(data))
+		count = length(data);
+
+	//read sequence
+	_streamSeekG(file, begin_pos);
+
+	typename Position<TData>::Type pos = 0;
+	c = c_first;
+	while (true)
+	{
+		if ((c != '\n') && (c != '\r'))
+		{
+			data[pos] = c;
+			++pos;
+		}
+		if (pos >= count) break;
+
+		c = _streamGet(file);
+		--count_all;
+	}
+
+	//move file ptr to next entry
+	_readNCharsFromFile(file, count_all - 1);
+	if(eof_reached)
+		_streamGet(file);
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TData>
+void
+read(TFile & file,
+	 TData & data,
+	 Fasta tag)
+{
+SEQAN_CHECKPOINT
+	typedef typename Size<TData>::Type TSize;
+	read(file, data, maxValue<TSize>(), tag);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// readID
+//////////////////////////////////////////////////////////////////////////////
+ 
+//the ID is the complete first line (without the leading '>'-sign)
+
+template <typename TFile, typename TString>
+void
+readID(TFile & file,
+	   TString & id,
+	   Fasta)
+{
+SEQAN_CHECKPOINT
+	SEQAN_ASSERT(!_streamEOF(file))
+
+	typename Position<TFile>::Type start_pos = _streamTellG(file);
+
+	typename Value<TFile>::Type c = _streamGet(file);
+	if (c != '>')
+	{
+		clear(id);
+	}
+	else
+	{
+		typename Size<TString>::Type count_valid = 0;
+		typename Size<TString>::Type count_all = 0;
+		_fastaScanLine(file, count_valid, count_all);
+
+		if (! count_valid)
+		{
+			clear(id);
+		}
+		else
+		{
+			resize(id, count_valid);
+			if (length(id) < count_valid)
+			{
+				count_valid = length(id);
+			}
+
+			_streamSeekG(file, start_pos);
+			c = _streamGet(file); //pop the '>' character
+			for (typename Position<TString>::Type pos = 0; count_valid; --count_valid)
+			{
+				id[pos] = _streamGet(file);
+				++pos;
+			}
+		}
+	}
+	_streamSeekG(file, start_pos);
+}
+
+//short ID, read fasta header up to first whitespace
+template <typename TFile, typename TString>
+void
+readShortID(TFile & file,
+	   TString & id,
+	   Fasta)
+{
+SEQAN_CHECKPOINT
+	SEQAN_ASSERT(!_streamEOF(file))
+
+	typename Position<TFile>::Type start_pos = _streamTellG(file);
+
+	typename Value<TFile>::Type c = _streamGet(file);
+	if (c != '>')
+	{
+		clear(id);
+	}
+	else
+	{
+		typename Size<TString>::Type count_valid = 0;
+		typename Size<TString>::Type count_all = 0;
+		_fastaScanLine(file, count_valid, count_all);
+
+		if (! count_valid)
+		{
+			clear(id);
+		}
+		else
+		{
+			resize(id, count_valid);
+			if (length(id) < count_valid)
+			{
+				count_valid = length(id);
+			}
+
+			_streamSeekG(file, start_pos);
+			c = _streamGet(file); //pop the '>' character
+			for (typename Position<TString>::Type pos = 0; count_valid; --count_valid)
+			{
+				id[pos] = _streamGet(file);
+				if(id[pos]=='\t' || id[pos]=='\b' || id[pos]==' ')
+				{
+					resize(id,pos);
+					break;
+				}
+				++pos;
+			}
+		}
+	}
+	_streamSeekG(file, start_pos);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// readMeta
+//////////////////////////////////////////////////////////////////////////////
+
+//Fasta file records have no meta data
+
+template <typename TFile, typename TMeta>
+void
+readMeta(TFile & file,
+		 TMeta & meta,
+		 Fasta)
+{
+SEQAN_CHECKPOINT
+	readID(file, meta, Fasta());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// goNext
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile>
+void
+goNext(TFile & file,
+	   Fasta)
+{
+SEQAN_CHECKPOINT
+	SEQAN_ASSERT(!_streamEOF(file))
+
+//	bool found_data = false;
+	while (true)
+	{
+		typename Value<TFile>::Type c = _streamGet(file);
+
+		if (_streamEOF(file)) return;
+
+		if (c == '\n' || c == '\r')
+		{
+			do {
+				c = _streamGet(file);
+				if (_streamEOF(file)) return;
+			} while (c == '\n' || c == '\r');
+/*
+// weese: I changed the following lines, as otherwises empty
+//        sequences (seq1) will be overread. See:
+// >seq1
+// >seq2
+// ACTGGT
+			if (c != '>')
+			{
+				found_data = true;
+			}
+			else if (found_data)
+			{
+				_streamUnget(file);
+				return;
+			}
+*/			if (c == '>')
+			{
+				_streamUnget(file);
+				return;
+			}
+		}
+	}
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// write
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TFile, typename TString, typename TData>
+void
+_writeImpl(TFile & file,
+			TData & data,
+			TString & id,
+			Fasta)
+{
+SEQAN_CHECKPOINT
+	_streamPut(file, '>');
+	_streamWrite(file, id);
+	_streamPut(file, '\n');
+
+	//typename Iterator<TData, Standard>::Type it = begin(data, Standard());
+	//typename Iterator<TData, Standard>::Type it_end = end(data, Standard());
+	typename Iterator<TData>::Type it = begin(data);
+	typename Iterator<TData>::Type it_end = end(data);
+
+	int i = 0;
+
+	for (; it < it_end; ++it)
+	{
+		if (i == 60)
+		{
+			_streamPut(file, '\n');
+			i = 0;
+		}
+		++i;
+
+		_streamPut(file, *it);
+	}
+	_streamPut(file, '\n');
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TString, typename TData, typename TMeta>
+void
+write(TFile & file,
+	  TData & data,
+	  Fasta)
+{
+SEQAN_CHECKPOINT
+	_writeImpl(file, data, "", Fasta());
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TString, typename TData>
+void
+write(TFile & file,
+	  TData & data,
+	  TString & id,
+	  Fasta)
+{
+SEQAN_CHECKPOINT
+	_writeImpl(file, data, id, Fasta());
+}
+
+
+//VisualC++ const array bug workaround
+template <typename TFile, typename TString, typename TDataValue>
+void
+write(TFile & file,
+	  TDataValue * data,
+	  TString & id,
+	  Fasta)
+{
+SEQAN_CHECKPOINT
+	_writeImpl(file, data, id, Fasta());
+
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TString, typename TData, typename TMeta>
+void
+write(TFile & file,
+	  TData & data,
+	  TString & id,
+	  TMeta &,
+	  Fasta)
+{
+SEQAN_CHECKPOINT
+	_writeImpl(file, data, id, Fasta());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_format_fasta_align.h b/src/SeqAn-1.3/seqan/file/file_format_fasta_align.h
new file mode 100644
index 0000000..151ca33
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_format_fasta_align.h
@@ -0,0 +1,339 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <doering at mdc-berlin.de>
+// ==========================================================================
+// Support for writing and reading FASTA alignment files.
+// ==========================================================================
+
+#ifndef SEQAN_FILE_FILE_FORMAT_FASTA_ALIGN_H_
+#define SEQAN_FILE_FILE_FORMAT_FASTA_ALIGN_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Forward Declarations
+// ===========================================================================
+
+//forward declarations
+template <typename T>
+struct Row;
+
+template <typename T>
+struct Rows;
+
+// ===========================================================================
+// Tags, Enums, Classes, Specializations
+// ===========================================================================
+
+/**
+.Tag.File Format.tag.Fasta alignment:
+	FASTA alignment file format for sequences.
+..include:seqan/file.h
+*/
+struct FastaAlign_;
+typedef Tag<FastaAlign_> FastaAlign;
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TFile, typename TSize>
+void _fastaAlignScanLine(TFile & file, TSize & count) {
+
+	SEQAN_CHECKPOINT;
+	SEQAN_ASSERT(!_streamEOF(file))
+
+	while (true) {
+		typename Value<TFile>::Type c = _streamGet(file);
+
+		if (_streamEOF(file)) return;
+		if (c == '\n') return;
+
+		if ((c != '\r') && (c!='-'))
+			++count;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// read
+//////////////////////////////////////////////////////////////////////////////
+template <typename TFile, typename TSource, typename TSpec>
+void read(TFile & file, Align<TSource, TSpec> & align, FastaAlign const &) {
+    SEQAN_CHECKPOINT;
+
+	SEQAN_ASSERT_NOT(_streamEOF(file));
+	
+	typedef typename Value<TSource>::Type TSourceValue;
+	typedef typename Size<TSourceValue>::Type TSize;
+	typedef typename Position<TFile>::Type TFilePos;
+	typedef Triple<TFilePos, TFilePos, TSize> TTriple;
+	TSize limit = maxValue<TSize>();
+
+	//Determine begin position, end position and length of each sequence
+	String<TTriple> beg_end_length;
+	
+	TFilePos begin_pos;
+	TFilePos end_pos;
+	typename Value<TFile>::Type c;
+	TSize count;
+
+	while (!_streamEOF(file)) {
+		begin_pos = _streamTellG(file);
+		count = 0;
+		SEQAN_ASSERT_NOT(_streamEOF(file));
+
+	
+		c = _streamGet(file);
+		
+		// Skip id
+		if (c == '>') {
+			_fastaAlignScanLine(file, count);
+			begin_pos = _streamTellG(file);
+			count = 0;
+		} else {  //If no id first letter belongs to sequence
+			count = 1;
+		}
+
+		// Count letters
+		while (true) {
+			_fastaAlignScanLine(file, count);
+
+			typename Value<TFile>::Type c = _streamGet(file);
+			if (c == '>') {
+				_streamSeek2G(file, -1);
+				end_pos = _streamTellG(file);
+				break;
+			}
+			if (_streamEOF(file)) {
+				end_pos = _streamTellG(file);
+				break;
+			}
+			if ((c != '\n') && (c != '\r') && (c!='-'))	{
+				++count;
+			}
+		}
+		if (count > limit) {
+			count = limit;
+		}
+
+		appendValue(beg_end_length, TTriple(begin_pos, end_pos, count));
+	}
+
+	// Resize alignment data structure
+	TSize numRows=length(beg_end_length);
+	resize(rows(align), numRows);	//rows
+		
+	typedef Align<TSource, TSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	
+	for(TSize i=0;i<numRows;++i) {
+		TSize begin = beg_end_length[i].i1;
+//		TSize end = beg_end_length[i].i2;
+		count = beg_end_length[i].i3;
+		
+		//Reserve space
+		clear(row(align,i));
+		createSource(row(align,i));
+		resize(source(row(align,i)),count);
+		if (length(source(row(align,i))) < count) {
+			count = length(source(row(align,i)));
+		}
+		setClippedEndPosition(row(align,i),count);
+		
+		//Read sequence
+		_streamSeekG(file, begin);
+
+		typename Position<TSource>::Type pos;
+		for (pos = 0; pos < count; ) {
+			c = _streamGet(file);
+			if ((c != '\n') && (c != '\r') && (c != '-'))	{
+				source(row(align,i))[pos] = c;
+				++pos;
+			}
+			if (c=='-') {
+				insertGap(row(align,i), toViewPosition(row(align,i), pos));
+			}
+		}
+	}
+
+	_streamSeekG(file, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// readIDs
+//////////////////////////////////////////////////////////////////////////////
+ 
+template <typename TFile, typename TStringContainer>
+void readIDs(TFile& file, TStringContainer& ids, FastaAlign) {
+	
+	SEQAN_CHECKPOINT;
+	
+    SEQAN_ASSERT_NOT(_streamEOF(file));
+
+	typedef typename Value<TStringContainer>::Type TString;
+	typename Position<TFile>::Type start_pos;
+	typename Value<TFile>::Type c;
+
+
+	TString id;
+	while(true) {
+		c = _streamGet(file);
+		while ((!_streamEOF(file)) && (c != '>')) c = _streamGet(file);
+		if (!_streamEOF(file)) {
+			start_pos = _streamTellG(file);
+			typename Size<TString>::Type count = 0;
+			_fastaAlignScanLine(file, count);
+			if (! count) clear(id);
+			else {
+				resize(id, count);
+				if (length(id) < count)	{
+					count = length(id);
+				}
+				_streamSeekG(file, start_pos);
+				for (typename Position<TString>::Type pos = 0; pos<count; ++pos) {
+					id[pos] = _streamGet(file);
+				}
+			}
+			appendValue(ids, id);
+		} else {
+			break;
+		}
+	}
+	_streamSeekG(file, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// readMeta
+//////////////////////////////////////////////////////////////////////////////
+
+//Fasta file records have no meta data
+
+template <typename TFile, typename TMeta>
+void readMeta(TFile & /*file*/, TMeta & meta, FastaAlign) {
+	SEQAN_CHECKPOINT
+	clear(meta);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// goNext
+//////////////////////////////////////////////////////////////////////////////
+template <typename TFile>
+void goNext(TFile & file, FastaAlign) {
+	SEQAN_CHECKPOINT;
+	(void) file; // When compiled without assertions.
+	SEQAN_ASSERT_NOT(_streamEOF(file));
+	
+	return;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// write
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec>
+void _writeImpl(TFile & file, Align<TSource, TSpec> const & align, TStringContainer const & ids, FastaAlign const &) {
+	SEQAN_CHECKPOINT
+
+	typedef Align<TSource, TSpec> const TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Position<typename Rows<TAlign>::Type>::Type TRowsPosition;
+	typedef typename Position<TAlign>::Type TPosition;
+	TRowsPosition row_count = length(rows(align));
+
+	for(TRowsPosition i=0;i<row_count;++i) {
+		TRow & row_ = row(align, i);	
+	
+		typedef typename Iterator<typename Row<TAlign>::Type const, Standard>::Type TIter;
+		TIter begin_ = iter(row_, beginPosition(cols(align)));
+		TIter end_ = iter(row_, endPosition(cols(align)));
+	
+		_streamPut(file, '>');
+		_streamWrite(file, getValue(ids,i));
+		_streamPut(file, '\n');
+
+		int chars=0;
+		while(begin_ != end_) {
+			if (chars == 60) {
+				_streamPut(file, '\n');
+				chars = 0;
+			}
+			if (isGap(begin_)) _streamPut(file, gapValue<char>());
+			else _streamPut(file, getValue(source(begin_)));
+			chars++;
+			++begin_;
+		}
+		_streamPut(file, '\n');
+	}
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TSource, typename TSpec>
+void write(TFile & file, Align<TSource, TSpec> const & align, FastaAlign const & ) {
+	SEQAN_CHECKPOINT
+	_writeImpl(file, align, String<String<char> >(), FastaAlign());
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec>
+void write(TFile & file, Align<TSource, TSpec> const & align, TStringContainer const & ids, FastaAlign const & ) {
+	SEQAN_CHECKPOINT
+	_writeImpl(file, align, ids, FastaAlign());
+}
+
+
+//VisualC++ const array bug workaround
+// TODO(holtgrew): Superflous?!
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec>
+void write(TFile & file, Align<TSource, TSpec> const * align, TStringContainer const & ids, FastaAlign const & ) {
+	SEQAN_CHECKPOINT
+	_writeImpl(file, align, ids, FastaAlign());
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec, typename TMeta>
+void write(TFile & file, Align<TSource, TSpec> const & align, TStringContainer const & ids, TMeta &, FastaAlign const & ) {
+	SEQAN_CHECKPOINT;
+	_writeImpl(file, align, ids, FastaAlign());
+}
+
+}  // namespace seqan
+
+#endif   // #ifndef SEQAN_FILE_FILE_FORMAT_FASTA_ALIGN_H_
diff --git a/src/SeqAn-1.3/seqan/file/file_format_genbank.h b/src/SeqAn-1.3/seqan/file/file_format_genbank.h
new file mode 100644
index 0000000..4913daf
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_format_genbank.h
@@ -0,0 +1,381 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_GENBANK_H
+#define SEQAN_HEADER_FILE_GENBANK_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - Genbank
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.File Format.tag.Genbank:
+	Genbank format for sequences from the Genbank database.
+..include:seqan/file.h
+*/
+struct TagGenbank_;
+typedef Tag<TagGenbank_> const Genbank;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FileReader Iterator
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TFile2, typename TSpec>
+inline void
+goBegin(Iter<TFile, FileReader<Genbank, TFile2, TSpec> > & it, bool skip_meta)
+{
+SEQAN_CHECKPOINT
+	String<char> line;
+
+	if (_streamEOF(host(it)))
+	{//end of file
+		it.data_eof = true;
+		return;
+	}
+
+	if (skip_meta && (it.data_char != ' '))
+	{//skip metadata block
+		while (true)
+		{
+			if (it.data_char == '/')
+			{//end of record
+				_streamSkipLine(host(it), it.data_char);
+				it.data_eof = true;
+				return;
+			}
+			if ((it.data_char == 'O') || (it.data_char == 'o'))
+			{
+				clear(line);
+				_streamAppendLine(host(it), line, it.data_char);
+				if ((prefix(line, 6) == "ORIGIN") || (prefix(line, 6) == "origin"))
+				{//end of metadata
+					break;
+				}
+			}
+			//skip meta line
+			_streamSkipLine(host(it), it.data_char);
+
+			if (_streamEOF(host(it)))
+			{//end of file
+				it.data_eof = true;
+				return;
+			}
+		}
+	}
+
+	//find first character
+	while (true)
+	{
+		if (_streamEOF(host(it)))
+		{//end of file
+			it.data_eof = true;
+			return;
+		}
+		if ((it.data_char != ' ') && ((it.data_char < '0') || (it.data_char > '9')))
+		{
+			if ((it.data_char != '\n') && (it.data_char != '\r'))
+			{//fist char found
+				break;
+			}
+
+			it.data_char = _streamGet(host(it));
+			if (it.data_char == '/')
+			{//end of record
+				_streamSkipLine(host(it), it.data_char);
+				it.data_eof = true;
+				return;
+			}
+		}
+		else
+		{
+			it.data_char = _streamGet(host(it));
+		}
+	}
+
+	it.data_file_pos = _streamTellG(host(it));
+	it.data_file_pos -=1;
+	it.data_eof = _streamEOF(host(it));
+}
+
+
+template <typename TFile, typename TFile2, typename TSpec>
+inline void
+goBegin(Iter<TFile, FileReader<Genbank, TFile2, TSpec> > & it)
+{
+    SEQAN_CHECKPOINT;
+    goBegin(it, true);
+}
+
+
+template <typename TFile, typename TFile2, typename TSpec>
+inline void
+goNext(Iter<TFile, FileReader<Genbank, TFile2, TSpec> > & it)
+{
+SEQAN_CHECKPOINT
+	do
+	{
+		it.data_char = _streamGet(host(it));
+		if (_streamEOF(host(it)))
+		{
+			it.data_eof = true;
+			return;
+		}
+		it.data_file_pos += 1;
+
+		if ((it.data_char == '\n') || (it.data_char == '\r'))
+		{//linebreak detected: find begin of next line
+			do
+			{
+				it.data_char = _streamGet(host(it));
+				if (_streamEOF(host(it)))
+				{
+					it.data_eof = true;
+					return;
+				}
+				it.data_file_pos += 1;
+			} while ((it.data_char == '\n') || (it.data_char == '\r'));
+
+			if (it.data_char == '/')
+			{//end of record
+				_streamSkipLine(host(it), it.data_char);
+				_streamUnget(host(it));
+				//it.data_file_pos is invalid now
+				it.data_eof = true;
+				return;
+			}
+		}
+	} while ((it.data_char == ' ') || ((it.data_char >= '0') && (it.data_char <= '9')));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// File Format Access Function
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TData>
+inline void
+read(TFile & file,
+	 TData & data,
+	 Genbank)
+{
+SEQAN_CHECKPOINT
+	Iter<TFile, FileReader<Genbank> > it(file);
+
+	clear(data);
+	while (!atEnd(it))
+	{
+		appendValue(data, getValue(it));
+		goNext(it);
+	}
+}
+
+template <typename TFile, typename TData, typename TSize>
+inline void
+read(TFile & file,
+	 TData & data,
+	 TSize limit,
+	 Genbank)
+{
+SEQAN_CHECKPOINT
+	typename Size<TData>::Type siz = length(data);
+	Iter<TFile, FileReader<Genbank> > it(file);
+
+	clear(data);
+	while (!atEnd(it) && (siz < limit))
+	{
+		appendValue(data, getValue(it));
+		goNext(it);
+	}
+	while (!atEnd(it))
+	{
+		goNext(it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TMeta>
+inline void
+readMeta(TFile & file,
+		 TMeta & meta,
+		 Genbank)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TMeta>::Type TValue;
+	String<char> line;
+
+	clear(meta);
+
+	if (_streamEOF(file))
+	{
+		return;
+	}
+
+	TValue c = _streamGet(file);
+
+	while (!_streamEOF(file))
+	{
+		clear(line);
+		_streamAppendLine(file, line, c);
+
+		if (c == '/')
+		{//end of record
+			_streamUnget(file);
+			break;
+		}
+
+		append(meta, line);
+		appendValue(meta, '\n');
+
+		if ((prefix(line, 6) == "ORIGIN") || (prefix(line, 6) == "origin"))
+		{//end of metadata
+			_streamUnget(file);
+			break;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile>
+inline void
+goNext(TFile & file,
+	   Genbank)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TFile>::Type TValue;
+
+	if (_streamEOF(file))
+	{
+		return;
+	}
+
+	while (!_streamEOF(file))
+	{
+		TValue c = _streamGet(file);
+		if (c == '/')
+		{//end of record
+			_streamSkipLine(file, c);
+			_streamUnget(file);
+			return;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <typename TFile>
+inline void
+length(TFile & file,
+	   Genbank)
+{
+SEQAN_CHECKPOINT
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TData>
+inline void
+write(TFile & file,
+	  TData & data,
+	  Genbank)
+{
+SEQAN_CHECKPOINT
+	enum
+	{
+		BLOCK_SIZE = 10,
+		BLOCKS_PER_LINE = 6
+	};
+	char const * NUM_BLOCK_FORMAT = "%9d";
+
+	typedef typename Size<TData>::Type TSize;
+	typedef typename Iterator<TData, Standard>::Type TIterator;
+
+	TSize count = 0;
+	TIterator it = begin(data, Standard());
+	TIterator it_end = end(data, Standard());
+
+	while (it != it_end)
+	{
+		//write count 
+		_streamPutInt(file, count+1, NUM_BLOCK_FORMAT);
+
+		int block_count = 0;
+		int char_in_block_count = BLOCK_SIZE;
+
+		//write rest of line
+		while (it != it_end)
+		{
+			if (char_in_block_count == BLOCK_SIZE)
+			{//begin new block
+				if (block_count >= BLOCKS_PER_LINE)
+				{//end of line
+					_streamPut(file, '\n');
+					break;
+				}
+				_streamPut(file, ' ');
+				char_in_block_count = 0;
+				++block_count;
+			}
+
+			//write next character
+			_streamPut(file, *it);
+			++it;
+			++count;
+			++char_in_block_count;
+		}
+	}
+
+	write(file, "\n//\n");
+}
+
+template <typename TFile, typename TData, typename TMeta>
+inline void
+write(TFile & file,
+	  TData & data,
+	  TMeta & meta,
+	  Genbank)
+{
+SEQAN_CHECKPOINT
+	write(file, meta);
+	write(file, data, Genbank());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_format_guess.h b/src/SeqAn-1.3/seqan/file/file_format_guess.h
new file mode 100644
index 0000000..9771c8b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_format_guess.h
@@ -0,0 +1,116 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_GUESS_H
+#define SEQAN_HEADER_FILE_GUESS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// guessFileFormat
+//////////////////////////////////////////////////////////////////////////////
+
+//guessFileFormat braucht auch data, weil die FileFormat-Klasse von TData
+//abhaengig, und das ist so, weil sonst die Kombination von Templates mit
+//virtuellen Funktionen nicht funktionieren wuerde.
+/**
+.Function.guessFileFormat:
+..cat:Input/Output
+..summary:Tries to determine the format of a file.
+..signature:guessFileFormat(file, data)
+..param.file: An input file.
+..param.data: The target container.
+...remarks:This container is not modified by this function.
+..returns:A file format object instance that represents the determined file format.
+...type:Class.FileFormat
+..remarks:The $data$-argument is used here as a tag to determine the type of the target.
+..see:Function.Fileformat#read
+..see:Tag.File Format
+..include:seqan/file.h
+*/
+template <typename TFile, typename TData, typename TMeta>
+inline FileFormat<TFile, TData, TMeta, void> 
+guessFileFormat(TFile & file,
+				TData & data)
+{
+SEQAN_CHECKPOINT
+	typename Position<TFile>::Type old_pos = _streamTellG(file);
+	typename Value<TFile>::Type c;
+
+	_streamSeekG(file, 0); /// move to beginning of file
+	c = _streamGet(file);
+		
+	if (c=='>') 
+	{
+		_streamSeekG(file, old_pos);
+		return getFileFormatInstance<TFile, TData, Fasta, TMeta>();
+	}
+	
+	if (c=='L')
+	{
+		_streamSeekG(file, old_pos);
+		return getFileFormatInstance<TFile, TData, Genbank, TMeta>();
+	}
+
+	if (c=='I')
+	{
+		_streamSeekG(file, old_pos);
+		return getFileFormatInstance<TFile, TData, Embl, TMeta>();
+	}
+
+	else
+	{
+		_streamSeekG(file, old_pos);
+		return getFileFormatInstance<TFile, TData, Raw, TMeta>();
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/* DOCH NICHT:
+template <typename TTarget, typename TSource>
+inline void
+read(TTarget & target,
+	 TSource & source)
+{
+SEQAN_CHECKPOINT
+	read(target, source, guessFileFormat(target, source));
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_format_mmap.h b/src/SeqAn-1.3/seqan/file/file_format_mmap.h
new file mode 100644
index 0000000..e9ffd23
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_format_mmap.h
@@ -0,0 +1,1372 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_FILE_FORMAT_MMAP_H
+#define SEQAN_HEADER_FILE_FORMAT_MMAP_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Shortcut.MultiFasta
+..summary:A sequence file mapped in memory as a StringSet of concatenated sequence file fragments.
+..cat:Input/Output
+..signature:MultiSeqFile
+..shortcutfor:Spec.ConcatDirect
+..shortcutfor:Spec.MMap String
+...signature:StringSet<String<char, MMap<> >, Owner<ConcatDirect<> > >
+..status:deprecated, will be removed in favour of @Shortcut.MultiSeqFile@
+*/
+
+/**
+.Shortcut.MultiSeqFile
+..summary:A sequence file mapped in memory as a StringSet of concatenated sequence file fragments.
+..cat:Input/Output
+..signature:MultiSeqFile
+..shortcutfor:Spec.ConcatDirect
+..shortcutfor:Spec.MMap String
+...signature:StringSet<String<char, MMap<> >, Owner<ConcatDirect<> > >
+*/
+
+	// define memory mapped stringset
+	typedef StringSet<String<char, MMap<> >, Owner<ConcatDirect<> > >	MultiFasta;	//deprecated (use MultiSeqFile instead)
+	typedef StringSet<String<char, MMap<> >, Owner<ConcatDirect<> > >	MultiSeqFile;
+
+
+	template <typename TValue>
+	inline bool
+	_isLineBreak(TValue value)
+	{
+		return (value == '\n' || value == '\r');
+	}
+
+	template <typename TIterator>
+	inline bool
+	_seekLineBreak(TIterator &it, TIterator itEnd)
+	{
+		while (!_isLineBreak(*it))
+			if (++it == itEnd) return false;
+		return true;
+	}
+
+	template <typename TIterator>
+	inline bool
+	_seekNonLineBreak(TIterator &it, TIterator itEnd)
+	{
+		if (*it == '\n')
+		{
+			if (++it == itEnd) return false;
+			if (*it == '\r')
+				if (++it == itEnd) return false;
+		} else
+			if (*it == '\r')
+			{
+				if (++it == itEnd) return false;
+				if (*it == '\n')
+					if (++it == itEnd) return false;
+			}
+		return true;
+	}
+
+        // Returns true iff value is a whitespace.
+	template <typename TValue>
+	inline bool
+	_isWhiteSpace(TValue value)
+	{
+		return (value == ' ' || value == '\t' || value == '\r' || value == '\n');
+	}
+
+        // Increment iterator until end of sequence or *it is a whitespace.
+	template <typename TIterator>
+	inline bool
+	_seekWhiteSpace(TIterator &it, TIterator itEnd)
+	{
+		while (!_isWhiteSpace(*it))
+			if (++it == itEnd) return false;
+		return true;
+	}
+
+	template <typename TIterator>
+	inline bool
+	_seekTab(TIterator& it, TIterator itEnd)
+	{
+		for (; it != itEnd; ++it)
+			if (*it == '\t') return true;
+		return false;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - Fasta
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.guessFormat:
+..summary:Guesses a file format from the contents of a sequence file.
+..cat:Input/Output
+..signature:guessFormat(text, formatTag)
+..param.text:A string storing the contents of a sequence file.
+...see:Class.String
+..param.formatTag:A file format tag.
+...type:Tag.File Format
+...type:Class.AutoSeqFormat
+..returns:$true$ if the format represented by $formatTag$ was recognized in $text$.
+..see:Function.guessFormatFromFilename
+..include:seqan/file.h
+*/
+
+	// test for Fasta format
+	template < typename TSeq >
+	inline bool
+	guessFormat(
+		TSeq const & seq,
+		Fasta)
+	{
+		return seq[0] == '>';
+	}
+	
+/**
+.Function.guessFormatFromFilename:
+..summary:Guesses a file format from a sequence file name.
+..cat:Input/Output
+..signature:guessFormatFromFilename(fileName, formatTag)
+..param.fileName:A filename of a sequence file.
+...see:Class.String
+..param.formatTag:A file format tag.
+...type:Tag.File Format
+...type:Class.AutoSeqFormat
+..returns:$true$ if the format represented by $formatTag$ was recognized in $fileName$.
+..see:Function.guessFormatFromFilename
+..include:seqan/file.h
+*/
+
+	template < typename TFilename >
+	inline bool
+	guessFormatFromFilename(
+		TFilename const & fname,
+		Fasta)
+	{
+		typedef typename Value<TFilename>::Type									TValue;
+		typedef ModifiedString<TFilename, ModView<FunctorLowcase<TValue> > >	TLowcase;
+		
+		typename Size<TFilename>::Type len = length(fname);
+		TLowcase lowcaseFname(fname);
+
+		if (len >= 3)
+		{
+			if (suffix(lowcaseFname, len - 3) == ".fa") return true;
+		}
+		if (len >= 4)
+		{
+			if (suffix(lowcaseFname, len - 4) == ".fas") return true;
+			if (suffix(lowcaseFname, len - 4) == ".faa") return true;	// FASTA Amino Acid file 
+			if (suffix(lowcaseFname, len - 4) == ".ffn") return true;	// FASTA nucleotide coding regions file
+			if (suffix(lowcaseFname, len - 4) == ".fna") return true;	// FASTA Nucleic Acid file
+			if (suffix(lowcaseFname, len - 4) == ".frn") return true;
+		}
+		if (len >= 6)
+		{
+			if (suffix(lowcaseFname, len - 6) == ".fasta") return true;
+		}
+		return false;
+	}
+	
+/**
+.Function.split:
+..summary:Divides the contents of a sequence file into sequence file fragments separated by a file format specific delimiter.
+..cat:Input/Output
+..signature:split(stringSet, formatTag)
+..param.stringSet:A @Spec.ConcatDirect@ StringSet. The concat member (concatenation string) contains the contents of a sequence file.
+...type:Spec.ConcatDirect
+...type:Shortcut.MultiSeqFile
+..param.formatTag:A file format tag.
+...type:Tag.File Format
+...type:Class.AutoSeqFormat
+..remarks:The @Memvar.ConcatDirect#concat@ member should contain the contents of the sequence file by a prior call of @Function.open at .
+..remarks:This function expects a @Spec.ConcatDirect@ StringSet and divides the underlying concatenation string into 
+sequence fragments separated by a file format specific delimiter.
+After calling this function, the StringSet length is the number of sequence fragments and each fragment can be retrieved by @Function.value@ or @Function.getValue at .
+..see:Function.guessFormat
+..include:seqan/file.h
+*/
+
+	// split stringset into single Fasta sequences
+	template < typename TValue, typename TConfig, typename TDelimiter >
+	inline void
+	split(
+		StringSet<String<TValue, MMap<TConfig> >, Owner<ConcatDirect<TDelimiter> > > &me, 
+		Fasta)
+	{
+		typedef String<TValue, MMap<TConfig> >						TString;
+		typedef StringSet<TString, ConcatDirect<TDelimiter> >		TStringSet;
+		typedef typename Iterator<TString const, Standard>::Type	TIterator;
+
+		clear(me.limits);
+
+		TIterator itBeg = begin(me.concat, Standard());
+		TIterator itEnd = end(me.concat, Standard());
+		bool newLine = true;
+		for (TIterator it = itBeg; it != itEnd; ++it)
+		{
+			TValue c = *it;
+			if (newLine && c == '>')
+				appendValue(me.limits, it - itBeg, Generous());
+			newLine = _isLineBreak(c);
+		}
+		if (empty(me.limits))
+			appendValue(me.limits, 0);
+		appendValue(me.limits, itEnd - itBeg);
+	}
+	
+/**
+.Function.assignSeq:
+..summary:Extracts the sequence part of a sequence file fragment.
+..cat:Input/Output
+..signature:assignSeq(sequence, seqFragment, formatTag)
+..param.sequence:The resulting sequence of the fragment.
+...type:Class.String
+..param.seqFragment:A sequence file fragment.
+...type:Class.String
+..param.formatTag:A file format tag.
+...type:Tag.File Format
+...type:Class.AutoSeqFormat
+..remarks:After calling @Function.split@ on a @Spec.ConcatDirect@ StringSet to divide a file into fragments, 
+this function can be used to extract the sequence of every fragment in the StringSet.
+..see:Function.split
+..include:seqan/file.h
+*/
+
+	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignSeq(
+		TSeq & dst,
+		TFastaSeq const & fasta,
+		Fasta)
+	{
+		typedef typename Iterator<TFastaSeq const, Standard>::Type	TIterator;
+		typedef typename Iterator<TSeq, Standard>::Type				TDstIterator;
+
+		TIterator it = begin(fasta, Standard());
+		TIterator itEnd = end(fasta, Standard());
+
+		clear(dst);
+		
+		// skip Fasta id
+		if (it == itEnd) return;
+		if (*it == '>')
+		{
+			if (!_seekLineBreak(it, itEnd)) return;
+			if (!_seekNonLineBreak(it, itEnd)) return;
+		}
+
+		// copy sequence
+		resize(dst, itEnd - it);		
+		TDstIterator dit = begin(dst, Standard());
+		for (; it != itEnd; ++it)
+			if (!_isLineBreak(*it))
+			{
+				*dit = *it;
+				++dit;
+			}
+		resize(dst, dit - begin(dst, Standard()));
+	}
+
+/**
+.Function.assignSeqId:
+..summary:Extracts the sequence id of a sequence file fragment.
+..cat:Input/Output
+..signature:assignSeqId(id, seqFragment, formatTag)
+..param.id:The resulting sequence id of the fragment (e.g. Fasta Id).
+...type:Shortcut.CharString
+..param.seqFragment:A sequence file fragment.
+...type:Class.String
+..param.formatTag:A file format tag.
+...type:Tag.File Format
+...type:Class.AutoSeqFormat
+..remarks:After calling @Function.split@ on a @Spec.ConcatDirect@ StringSet to divide a file into fragments, 
+this function can be used to extract the sequence id of every fragment in the StringSet.
+..see:Function.split
+..include:seqan/file.h
+*/
+
+	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignSeqId(
+		TSeq & dst,
+		TFastaSeq const & fasta,
+		Fasta)
+	{
+		typedef typename Iterator<TFastaSeq const, Standard>::Type	TIterator;
+
+		TIterator itBeg = begin(fasta, Standard());
+		TIterator itEnd = end(fasta, Standard());
+		TIterator it = itBeg;
+		
+		clear(dst);
+		if (it == itEnd) return;
+		if (*it == '>')
+		{
+			_seekLineBreak(it, itEnd);
+			assign(dst, infix(fasta, 1, it - itBeg));
+		}
+	}
+
+/**
+.Function.assignCroppedSeqId:
+..summary:Extracts the sequence id up to the first whitespace of a sequence file fragment.
+..cat:Input/Output
+..signature:assignCroppedSeqId(id, seqFragment, formatTag)
+..param.id:The resulting cropped sequence id of the fragment (e.g. Fasta Id).
+...note:The resulting id contains no whitespaces.
+...type:Shortcut.CharString
+..param.seqFragment:A sequence file fragment.
+...type:Class.String
+..param.formatTag:A file format tag.
+...type:Tag.File Format
+...type:Class.AutoSeqFormat
+..remarks:After calling @Function.split@ on a @Spec.ConcatDirect@ StringSet to divide a file into fragments, 
+this function can be used to extract the sequence id up to the first whitespace of every fragment in the StringSet.
+..see:Function.split
+..include:seqan/file.h
+*/
+
+	// Assign sequence id up to first whitespace.
+	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignCroppedSeqId(
+		TSeq & dst,
+		TFastaSeq const & fasta,
+		Fasta)
+	{
+		typedef typename Iterator<TFastaSeq const, Standard>::Type	TIterator;
+
+		TIterator itBeg = begin(fasta, Standard());
+		TIterator itEnd = end(fasta, Standard());
+		TIterator it = itBeg;
+		
+		clear(dst);
+		if (it == itEnd) return;
+		if (*it == '>')
+		{
+			_seekWhiteSpace(it, itEnd);
+			assign(dst, infix(fasta, 1, it - itBeg));
+		}
+	}
+
+/**
+.Function.assignQual:
+..summary:Extracts the quality values of a sequence file fragment.
+..cat:Input/Output
+..signature:assignQual(qualities, seqFragment, formatTag)
+..param.qualities:The resulting quality values encoded in ASCII.
+...remarks:The quality values are encoded in ASCII and must be manually converted into zero-based values.
+...type:Shortcut.CharString
+..param.seqFragment:A sequence file fragment.
+...type:Class.String
+..param.formatTag:A file format tag.
+...type:Tag.File Format
+...type:Class.AutoSeqFormat
+..remarks:After calling @Function.split@ on a @Spec.ConcatDirect@ StringSet to divide a file into fragments, 
+this function can be used to extract the sequence quality values of every fragment in the StringSet.
+..see:Function.split
+..include:seqan/file.h
+*/
+
+  	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignQual(
+		TSeq & dst,
+		TFastaSeq const &,
+		Fasta)
+	{
+		clear(dst);
+	}
+	
+/**
+.Function.assignQualId:
+..summary:Extracts the quality value id of a sequence file fragment.
+..cat:Input/Output
+..signature:assignQualId(id, seqFragment, formatTag)
+..param.id:The resulting quality value id of a sequence (e.g. Fastq Quality Id).
+...type:Shortcut.CharString
+..param.seqFragment:A sequence file fragment.
+...type:Class.String
+..param.formatTag:A file format tag.
+...type:Tag.File Format
+...type:Class.AutoSeqFormat
+..remarks:After calling @Function.split@ on a @Spec.ConcatDirect@ StringSet to divide a file into fragments, 
+this function can be used to extract the quality value id of every fragment in the StringSet.
+..see:Function.split
+..include:seqan/file.h
+*/
+
+	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignQualId(
+		TSeq & dst,
+		TFastaSeq const &,
+		Fasta)
+	{
+		clear(dst);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - Fastq (Fasta extension for quality values)
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.File Format.tag.Fastq:
+	FASTQ file format for sequences.
+..include:seqan/file.h
+*/
+struct TagFastq_;
+typedef Tag<TagFastq_> const Fastq;
+
+	// test for Fastq format
+	template < typename TSeq >
+	inline bool
+	guessFormat(
+		TSeq const & seq,
+		Fastq)
+	{
+		return seq[0] == '@';
+	}
+	
+	template < typename TFilename >
+	inline bool
+	guessFormatFromFilename(
+		TFilename const & fname,
+		Fastq)
+	{
+		typedef typename Value<TFilename>::Type									TValue;
+		typedef ModifiedString<TFilename, ModView<FunctorLowcase<TValue> > >	TLowcase;
+		
+		typename Size<TFilename>::Type len = length(fname);
+		TLowcase lowcaseFname(fname);
+
+		if (len >= 3)
+		{
+			if (suffix(lowcaseFname, len - 3) == ".fq") return true;
+		}
+		if (len >= 6)
+		{
+			if (suffix(lowcaseFname, len - 6) == ".fastq") return true;
+		}
+		return false;
+	}
+	
+	// split stringset into single Fasta sequences
+	template < typename TValue, typename TConfig, typename TDelimiter >
+	inline void
+	split(
+		StringSet<String<TValue, MMap<TConfig> >, Owner<ConcatDirect<TDelimiter> > > &me, 
+		Fastq)
+	{
+		typedef String<TValue, MMap<TConfig> >						TString;
+		typedef StringSet<TString, ConcatDirect<TDelimiter> >		TStringSet;
+		typedef typename Iterator<TString const, Standard>::Type	TIterator;
+
+		clear(me.limits);
+
+		TIterator itBeg = begin(me.concat, Standard());
+		TIterator itEnd = end(me.concat, Standard());
+		bool newLine = true;
+		for (TIterator it = itBeg; it != itEnd; ++it)
+		{
+			if (newLine && *it == '@')
+				appendValue(me.limits, it - itBeg, Generous());
+			if (newLine && *it == '+')
+			{
+				// skip qualitity fasta id
+				if (!_seekLineBreak(it, itEnd)) break;
+				if (!_seekNonLineBreak(it, itEnd)) break;
+				// skip qualitity values
+				if (!_seekLineBreak(it, itEnd)) break;
+			}
+			newLine = _isLineBreak(*it);
+		}
+		if (empty(me.limits))
+			appendValue(me.limits, 0);
+		appendValue(me.limits, itEnd - itBeg);
+	}
+
+	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignSeq(
+		TSeq & dst,
+		TFastaSeq const & fasta,
+		Fastq)
+	{
+		typedef typename Iterator<TFastaSeq const, Standard>::Type	TIterator;
+		typedef typename Iterator<TSeq, Standard>::Type				TDstIterator;
+
+		TIterator it = begin(fasta, Standard());
+		TIterator itEnd = end(fasta, Standard());
+
+		clear(dst);
+		
+		// skip Fasta id
+		if (it == itEnd) return;
+		if (*it == '@')
+		{
+			if (!_seekLineBreak(it, itEnd)) return;
+			if (!_seekNonLineBreak(it, itEnd)) return;
+		}
+
+		// copy sequence
+		resize(dst, itEnd - it);		
+		TDstIterator dit = begin(dst, Standard());
+		for (; it != itEnd; ++it) 
+		{
+			if (_isLineBreak(*it))
+			{
+				if (!_seekNonLineBreak(it, itEnd)) break;
+				if (*it == '+') break;
+			}
+			*dit = *it;
+			++dit;
+		}
+		resize(dst, dit - begin(dst, Standard()));
+	}
+
+	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignSeqId(
+		TSeq & dst,
+		TFastaSeq const & fasta,
+		Fastq)
+	{
+		typedef typename Iterator<TFastaSeq const, Standard>::Type	TIterator;
+
+		TIterator itBeg = begin(fasta, Standard());
+		TIterator itEnd = end(fasta, Standard());
+		TIterator it = itBeg;
+		
+		clear(dst);
+		if (it == itEnd) return;
+		if (*it == '@')
+		{
+			_seekLineBreak(it, itEnd);
+			assign(dst, infix(fasta, 1, it - itBeg));
+		}
+	}
+
+        // Assign sequence id up to first whitespace.
+	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignCroppedSeqId(
+		TSeq & dst,
+		TFastaSeq const & fasta,
+		Fastq)
+	{
+		typedef typename Iterator<TFastaSeq const, Standard>::Type	TIterator;
+
+		TIterator itBeg = begin(fasta, Standard());
+		TIterator itEnd = end(fasta, Standard());
+		TIterator it = itBeg;
+		
+		clear(dst);
+		if (it == itEnd) return;
+		if (*it == '@')
+		{
+			_seekWhiteSpace(it, itEnd);
+			assign(dst, infix(fasta, 1, it - itBeg));
+		}
+	}
+
+	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignQual(
+		TSeq & dst,
+		TFastaSeq const & fasta,
+		Fastq)
+	{
+		typedef typename Iterator<TFastaSeq const, Standard>::Type	TIterator;
+		typedef typename Iterator<TSeq, Standard>::Type				TDstIterator;
+
+		TIterator it = begin(fasta, Standard());
+		TIterator itEnd = end(fasta, Standard());
+
+		clear(dst);
+		
+		if (it == itEnd) return;
+		if (*it == '@')
+		{
+			// seek quality id
+			do {
+				if (!_seekLineBreak(it, itEnd)) return;
+				if (!_seekNonLineBreak(it, itEnd)) return;
+			} while (*it != '+');
+
+			// skip quality id
+			if (!_seekLineBreak(it, itEnd)) return;
+			if (!_seekNonLineBreak(it, itEnd)) return;
+
+			// copy sequence
+			resize(dst, itEnd - it);		
+			TDstIterator dit = begin(dst, Standard());
+			for (; it != itEnd; ++it)
+				if (!_isLineBreak(*it))
+				{
+					*dit = *it;
+					++dit;
+				}
+			resize(dst, dit - begin(dst, Standard()));
+		}
+	}
+
+	template <typename TSeq, typename TFastaSeq>
+	inline void
+	assignQualId(
+		TSeq & dst,
+		TFastaSeq const & fasta,
+		Fastq)
+	{
+		typedef typename Iterator<TFastaSeq const, Standard>::Type	TIterator;
+
+		TIterator itBeg = begin(fasta, Standard());
+		TIterator itEnd = end(fasta, Standard());
+		TIterator it1 = itBeg;
+		
+		clear(dst);
+		if (it1 == itEnd) return;
+		if (*it1 == '@')
+		{
+			do {
+				if (!_seekLineBreak(it1, itEnd)) return;
+				if (!_seekNonLineBreak(it1, itEnd)) return;
+			} while (*it1 != '+');
+			TIterator it2 = it1;
+			_seekLineBreak(it2, itEnd);
+			assign(dst, infix(fasta, (it1 - itBeg) + 1, it2 - itBeg));
+		}
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - QSeq (used by Illumina for most of their read files)
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.File Format.tag.QSeq:
+	QSeq format, used for most of the Illumina read files.
+..include:seqan/file.h
+*/
+	struct QSeq_;
+	typedef Tag<QSeq_> const QSeq;
+
+	// FIXME The following enum is more or less arbitrary since the information
+	// in a QSeq file may differ depending on where they come from. Not sure if
+	// this is something that needs to be fixed here, rather than in the Illu-
+	// mina pipeline itself.
+	//
+	// Also, this enum is quite convoluted but I don't feel like spilling a lot
+	// of common symbols (e.g. 'X', 'Y') into the SeqAn namespace.
+	struct QSeqEntry {
+		enum {
+			MachineName,
+			Run,
+			Lane,
+			Tile,
+			X,
+			Y,
+			Index,
+			Read,
+			Sequence,
+			Quality,
+			Filter
+		};
+	};
+
+	template < typename TString >
+	inline bool _isQSeqFile(TString const& filename)
+	{
+        unsigned int const namelen = 19;
+        unsigned int const pathlen = length(filename);
+        if (pathlen < namelen) return false;
+		::std::string str;
+		assign(str, suffix(filename, pathlen - namelen));
+		::std::istringstream is(str);
+		unsigned int num;
+		// Format (as regex): /^s_\d_\d_\d{4}_qseq.txt$/
+		return is.get() == 's' && is.get() == '_' &&
+			isdigit(is.get()) && is.get() == '_' &&
+			isdigit(is.get()) && is.get() == '_' &&
+			is >> num &&
+			getline(is, str) && str == "_qseq.txt" && is.eof();
+	}
+
+//	// Needed?
+//	template < typename TString >
+//	inline TString _getFirstFile(
+//		char const* dirname,
+//		QSeq)
+//	{
+//		Directory dir(dirname);
+//		
+//		for ( ; dir; ++dir)
+//			if (_isQSeqFile(*dir))
+//				return *dir;
+//	}
+//
+//	template < typename TString >
+//	inline String< TString >
+//	_getAllFiles(
+//		char const* dirname,
+//		QSeq)
+//	{
+//		String< TString > ret;
+//		Directory dir(dirname);
+//
+//		for (; dir; ++dir)
+//			if (_isQSeqFile(*dir))
+//				appendValue(ret, *dir);
+//
+//		return ret;
+//	}
+
+	// test for QSeq format
+	template < typename TSeq >
+	inline bool
+	guessFormat(
+		TSeq const & seq,
+		QSeq)
+	{
+		typedef typename Iterator<TSeq const>::Type TIter;
+		TIter front = begin(seq);
+		TIter const back = end(seq);
+		if (!_seekTab(front, back)) return false;
+		::std::string token_base;
+		assign(token_base, seq);
+		::std::istringstream is(token_base);
+		::std::string mname;
+		unsigned int numval;
+		// Actual information encoded in qseq file may vary. Take a few guesses:
+		//     machine name, run number, lane number, tile number
+		is >> mname >> numval >> numval >> numval;
+		return is.good();
+	}
+	
+	template < typename TFilename >
+	inline bool
+	guessFormatFromFilename(
+		TFilename const & fname,
+		QSeq)
+	{
+		// QSeq files come in a variety of ways throughout the Gerald pipeline.
+		// In this simplest case, "sorted.txt" is a file in a fragment genome
+		// directory, each corresponding to 10MB worth of DNA.
+		static CharString const standalone_name = "sorted.txt";
+		typename Size<TFilename>::Type len = length(fname);
+        bool const bLen = len >= length(standalone_name);
+        bool const bSuff = suffix(fname, len - length(standalone_name)) == standalone_name;
+		return (bLen && bSuff) || _isQSeqFile(fname);
+	}
+
+	// split stringset into single QSeq sequences
+	template < typename TValue, typename TConfig, typename TDelimiter >
+	inline void
+	split(
+		StringSet<String<TValue, MMap<TConfig> >, Owner<ConcatDirect<TDelimiter> > > &me, 
+		QSeq)
+	{
+		typedef String<TValue, MMap<TConfig> >						TString;
+		typedef StringSet<TString, ConcatDirect<TDelimiter> >		TStringSet;
+		typedef typename Iterator<TString const, Standard>::Type	TIterator;
+
+		clear(me.limits);
+
+		TIterator const front = begin(me.concat, Standard());
+		TIterator const back = end(me.concat, Standard());
+
+		appendValue(me.limits, 0, Generous());
+		for (TIterator i = front; i != back; ++i)
+			if (_isLineBreak(*i))
+				appendValue(me.limits, i - front, Generous());
+
+		if (!_isLineBreak(*(back - 1))) // Ignore final line break.
+			appendValue(me.limits, back - front);
+	}
+
+	template <typename TSequence, typename TSource>
+	void assignQSeqEntry(
+		TSequence& destination,
+		TSource const& source,
+		unsigned int entry
+	) {
+		typedef typename Iterator<TSource const>::Type TIterator;
+
+		TIterator const front = begin(source, Standard());
+		TIterator const back = end(source, Standard());
+
+		TIterator infixStart = front;
+
+		for (unsigned int i = QSeqEntry::MachineName; i < entry; ++i) {
+			_seekTab(infixStart, back);
+			++infixStart;
+		}
+
+		SEQAN_ASSERT(infixStart != back);
+
+		TIterator infixEnd = infixStart + 1;
+		_seekTab(infixEnd, back);
+
+		assign(destination, infix(source, infixStart - front, infixEnd - front));
+	}
+
+	template <typename TSeq, typename TQSeqSeq>
+	inline void
+	assignSeq(
+		TSeq & dst,
+		TQSeqSeq const & fasta,
+		QSeq)
+	{
+		assignQSeqEntry(dst, fasta, QSeqEntry::Sequence);
+	}
+
+	template <typename TSeq, typename TQSeqSeq>
+	inline void
+	assignSeqId(
+		TSeq & dst,
+		TQSeqSeq const & fasta,
+		QSeq)
+	{
+		// For now: just return the whole line.
+		typename Position<TQSeqSeq const>::Type front = 0;
+		while (_isLineBreak(fasta[front]))
+			++front;
+		assign(dst, infix(fasta, front, length(fasta)));
+	}
+
+        // Assign sequence id up to first whitespace.
+	template <typename TSeq, typename TQSeqSeq>
+	inline void
+	assignCroppedSeqId(
+		TSeq & dst,
+		TQSeqSeq const & fasta,
+		QSeq)
+	{
+		// For now: just return the whole line.
+		typename Position<TQSeqSeq const>::Type front = 0;
+		while (_isWhiteSpace(fasta[front]))
+			++front;
+		assign(dst, infix(fasta, front, length(fasta)));
+	}
+
+	template <typename TSeq, typename TQSeqSeq>
+	inline void
+	assignQual(
+		TSeq & dst,
+		TQSeqSeq const & fasta,
+		QSeq)
+	{
+		assignQSeqEntry(dst, fasta, QSeqEntry::Quality);
+	}
+
+	template <typename TSeq, typename TQSeqSeq>
+	inline void
+	assignQualId(
+		TSeq & dst,
+		TQSeqSeq const & fasta,
+		QSeq)
+	{
+		assignSeqId(dst, fasta, QSeq());
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - Raw (multiple sequences, separated by line breaks)
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.File Format.tag.Raw:
+	Raw file format for sequences.
+..include:seqan/file.h
+*/
+struct TagRaw_;
+typedef Tag<TagRaw_> const Raw;
+
+	// test for Fastq format
+	template < typename TSeq >
+	inline bool
+	guessFormat(
+		TSeq const &,
+		Raw)
+	{
+		return true;
+	}
+	
+	template < typename TFilename >
+	inline bool
+	guessFormatFromFilename(
+		TFilename const & fname,
+		Raw)
+	{
+		typedef typename Value<TFilename>::Type									TValue;
+		typedef ModifiedString<TFilename, ModView<FunctorLowcase<TValue> > >	TLowcase;
+		
+		typename Size<TFilename>::Type len = length(fname);
+		TLowcase lowcaseFname(fname);
+
+		if (len >= 3)
+		{
+			if (suffix(lowcaseFname, len - 3) == ".txt") return true;
+		}
+		if (len >= 6)
+		{
+			if (suffix(lowcaseFname, len - 6) == ".seq") return true;
+		}
+		return false;
+	}
+	
+	// split stringset into single Fasta sequences
+	template < typename TValue, typename TConfig, typename TDelimiter >
+	inline void
+	split(
+		StringSet<String<TValue, MMap<TConfig> >, Owner<ConcatDirect<TDelimiter> > > &me, 
+		Raw)
+	{
+		typedef String<TValue, MMap<TConfig> >						TString;
+		typedef StringSet<TString, ConcatDirect<TDelimiter> >		TStringSet;
+		typedef typename Iterator<TString const, Standard>::Type	TIterator;
+
+		clear(me.limits);
+
+		TIterator itBeg = begin(me.concat, Standard());
+		TIterator itEnd = end(me.concat, Standard());
+		bool newLine = true;
+		for (TIterator it = itBeg; it != itEnd; ++it)
+		{
+			if (newLine)
+				appendValue(me.limits, it - itBeg, Generous());
+			newLine = _isLineBreak(*it);
+		}
+		appendValue(me.limits, itEnd - itBeg);
+	}
+
+	template <typename TSeq, typename TRawSeq>
+	inline void
+	assignSeq(
+		TSeq & dst,
+		TRawSeq const & fasta,
+		Raw)
+	{
+		typedef typename Iterator<TRawSeq const, Standard>::Type	TIterator;
+		typedef typename Iterator<TSeq, Standard>::Type				TDstIterator;
+
+		TIterator it = begin(fasta, Standard());
+		TIterator itEnd = end(fasta, Standard());
+
+		clear(dst);
+		if (it == itEnd) return;
+
+		// copy sequence
+		resize(dst, itEnd - it);		
+		TDstIterator dit = begin(dst, Standard());
+		for (; it != itEnd; ++it) 
+		{
+			if (_isLineBreak(*it)) continue;
+			*dit = *it;
+			++dit;
+		}
+		resize(dst, dit - begin(dst, Standard()));
+	}
+	
+  	template <typename TSeq, typename TRawSeq>
+	inline void
+	assignSeqId(
+		TSeq & dst,
+		TRawSeq const &,
+		Raw)
+	{
+		clear(dst);
+	}
+	
+  	template <typename TSeq, typename TRawSeq>
+	inline void
+	assignCroppedSeqId(
+		TSeq & dst,
+		TRawSeq const &,
+		Raw)
+	{
+		clear(dst);
+	}
+	
+  	template <typename TSeq, typename TRawSeq>
+	inline void
+	assignQual(
+		TSeq & dst,
+		TRawSeq const &,
+		Raw)
+	{
+		clear(dst);
+	}
+	
+  	template <typename TSeq, typename TRawSeq>
+	inline void
+	assignQualId(
+		TSeq & dst,
+		TRawSeq const &,
+		Raw)
+	{
+		clear(dst);
+	}
+	
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - Auto-Format
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.AutoSeqFormat
+..summary:Auto-detects and stores a file format.
+..cat:Input/Output
+..general:Class.TagSelector
+..signature:AutoSeqFormat
+..remarks:Currently, it is defined as $TagSelector<SeqFormats>$, with:
+...code:
+	typedef
+		TagList<Fastq,
+		TagList<Fasta,
+		TagList<QSeq,
+		TagList<Raw> > > > 						SeqFormats;
+..include:seqan/file.h
+*/
+
+	typedef
+		TagList<Fastq,
+		TagList<Fasta,
+		TagList<QSeq,
+		TagList<Raw> > > > 						SeqFormats;
+	typedef TagSelector<SeqFormats>				AutoSeqFormat;
+
+//____________________________________________________________________________
+// guess file format
+
+	template < typename TFileSeq >
+	inline bool
+	guessFormat(
+		TFileSeq const &,
+		TagSelector<> &format)
+	{
+		format.tagId = 0;
+		return false;
+	}
+	
+	template < typename TFileSeq, typename TTagList >
+	inline bool
+	guessFormat(
+		TFileSeq const & seq,
+		TagSelector<TTagList> &format)
+	{
+		if (guessFormat(seq, typename TTagList::Type()))
+		{
+			if (format.tagId == 0)
+			{
+				format.tagId = Length<TTagList>::VALUE;			// if tagId == 0 then store detected format
+				return true;
+			} else
+				return format.tagId == Length<TTagList>::VALUE;	// if tagId != 0 then compare detected format with tagId
+		}
+		return guessFormat(seq, static_cast<typename TagSelector<TTagList>::Base &>(format));
+	}
+	
+//____________________________________________________________________________
+// guess file format from filename
+
+	template < typename TFilename >
+	inline bool
+	guessFormatFromFilename(
+		TFilename const &,
+		TagSelector<> &format)
+	{
+		format.tagId = 0;
+		return false;
+	}
+	
+	template < typename TFilename, typename TTagList >
+	inline bool
+	guessFormatFromFilename(
+		TFilename const & fname,
+		TagSelector<TTagList> &format)
+	{
+		if (guessFormatFromFilename(fname, typename TTagList::Type()))
+		{
+			if (format.tagId == 0)
+			{
+				format.tagId = Length<TTagList>::VALUE;			// if tagId == 0 then store detected format
+				return true;
+			} else
+				return format.tagId == Length<TTagList>::VALUE;	// if tagId != 0 then compare detected format with tagId
+		}
+		return guessFormatFromFilename(fname, static_cast<typename TagSelector<TTagList>::Base &>(format));
+	}
+
+//____________________________________________________________________________
+// split stringset into single sequences
+
+	template < typename TValue, typename TConfig, typename TDelimiter >
+	inline void
+	split(
+		StringSet<String<TValue, MMap<TConfig> >, Owner<ConcatDirect<TDelimiter> > > &, 
+		TagSelector<void> const &)
+	{
+	}
+	
+	template < typename TValue, typename TConfig, typename TDelimiter, typename TTagList >
+	inline void
+	split(
+		StringSet<String<TValue, MMap<TConfig> >, Owner<ConcatDirect<TDelimiter> > > &me, 
+		TagSelector<TTagList> const &format)
+	{
+		if (format.tagId == Length<TTagList>::VALUE)
+			split(me, typename TTagList::Type());
+		else
+			split(me, static_cast<typename TagSelector<TTagList>::Base const &>(format));
+	}
+	
+//____________________________________________________________________________
+// assignSeq
+
+	template <typename TSeq, typename TFileSeq>
+	inline void
+	assignSeq(
+		TSeq &,
+		TFileSeq const &,
+		TagSelector<> const &)
+	{
+	}
+
+	template <typename TSeq, typename TFileSeq, typename TTagList>
+	inline void
+	assignSeq(
+		TSeq & dst,
+		TFileSeq const & seq,
+		TagSelector<TTagList> const &format)
+	{
+		if (format.tagId == Length<TTagList>::VALUE)
+			assignSeq(dst, seq, typename TTagList::Type());
+		else
+			assignSeq(dst, seq, static_cast<typename TagSelector<TTagList>::Base const &>(format));
+	}
+
+//____________________________________________________________________________
+// assignSeqId
+
+	template <typename TSeqId, typename TFileSeq>
+	inline void
+	assignSeqId(
+		TSeqId &,
+		TFileSeq const &,
+		TagSelector<> const &)
+	{
+	}
+
+	template <typename TSeqId, typename TFileSeq, typename TTagList>
+	inline void
+	assignSeqId(
+		TSeqId & dst,
+		TFileSeq const & seq,
+		TagSelector<TTagList> const &format)
+	{
+		if (format.tagId == Length<TTagList>::VALUE)
+			assignSeqId(dst, seq, typename TTagList::Type());
+		else
+			assignSeqId(dst, seq, static_cast<typename TagSelector<TTagList>::Base const &>(format));
+	}
+
+//____________________________________________________________________________
+// assignCroppedSeqId
+
+	template <typename TSeqId, typename TFileSeq>
+	inline void
+	assignCroppedSeqId(
+		TSeqId &,
+		TFileSeq const &,
+		TagSelector<> const &)
+	{
+	}
+
+	template <typename TSeqId, typename TFileSeq, typename TTagList>
+	inline void
+	assignCroppedSeqId(
+		TSeqId & dst,
+		TFileSeq const & seq,
+		TagSelector<TTagList> const &format)
+	{
+		if (format.tagId == Length<TTagList>::VALUE)
+			assignCroppedSeqId(dst, seq, typename TTagList::Type());
+		else
+			assignCroppedSeqId(dst, seq, static_cast<typename TagSelector<TTagList>::Base const &>(format));
+	}
+
+//____________________________________________________________________________
+// assignQual
+
+	template <typename TSeq, typename TFileSeq>
+	inline void
+	assignQual(
+		TSeq &,
+		TFileSeq const &,
+		TagSelector<> const &)
+	{
+	}
+	
+	template <typename TSeq, typename TFileSeq, typename TTagList>
+	inline void
+	assignQual(
+		TSeq & dst,
+		TFileSeq const & seq,
+		TagSelector<TTagList> const &format)
+	{
+		if (format.tagId == Length<TTagList>::VALUE)
+			assignQual(dst, seq, typename TTagList::Type());
+		else
+			assignQual(dst, seq, static_cast<typename TagSelector<TTagList>::Base const &>(format));
+	}
+
+//____________________________________________________________________________
+// assignQualId
+
+	template <typename TSeq, typename TFileSeq>
+	inline void
+	assignQualId(
+		TSeq &,
+		TFileSeq const &,
+		TagSelector<> const &)
+	{
+	}
+	
+	template <typename TSeq, typename TFileSeq, typename TTagList>
+	inline void
+	assignQualId(
+		TSeq & dst,
+		TFileSeq const & seq,
+		TagSelector<TTagList> const &format)
+	{
+		if (format.tagId == Length<TTagList>::VALUE)
+			assignQualId(dst, seq, typename TTagList::Type());
+		else
+			assignQualId(dst, seq, static_cast<typename TagSelector<TTagList>::Base const &>(format));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// Directory import
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.appendSeqs:
+..summary:Appends all sequences stored in files of directory to a StringSet.
+..cat:Input/Output
+..signature:appendSeqs(seqSet, dirName, formatTag)
+..param.seqSet:A @Class.StringSet@ of sequences to append to.
+...type:Class.StringSet
+..param.dirName:A path to a directory or single file.
+...type:Class.String
+..param.formatTag:A file format tag.
+...type:Tag.File Format
+...type:Class.AutoSeqFormat
+..remarks:This function scans a directory and searches for filenames corresponding to the sequence format store in $formatTag$, 
+opens them and append their contained sequences to the $seqSet$.
+If $formatTag$ is a @Class.AutoSeqFormat@ object, the file format is set to the first known sequence format guessed from a file name.
+..see:Function.assignSeq
+..include:seqan/file.h
+*/
+
+	template <typename TSeqSet, typename TFilename, typename TSeqFormat>
+	inline void
+	appendSeqs(
+		TSeqSet &seqSet,
+		TFilename &dirname,
+		TSeqFormat format)
+	{
+		typedef typename Value<TSeqSet>::Type TSeq;
+		
+		Directory		dir(dirname);
+		TSeq			seq;
+		MultiSeqFile	multiSeqFile;
+		
+		if (!atEnd(dir))
+		{
+			// dirname is path of a directory
+			CharString fname = dirname;
+#ifdef PLATFORM_WINDOWS
+			appendValue(fname, '\\');
+#else
+			appendValue(fname, '/');
+#endif
+			size_t len = length(fname);
+
+			for (; !atEnd(dir); goNext(dir))
+			{
+				assign(suffix(fname, len), value(dir));
+				if (guessFormatFromFilename(fname, format))
+				{
+					if (!open(multiSeqFile.concat, toCString(fname), OPEN_RDONLY)) continue;
+
+					split(multiSeqFile, format);
+					unsigned seqCount = length(multiSeqFile);
+					
+					reserve(seqSet, length(seqSet) + seqCount, Generous());					
+					for(unsigned i = 0; i < seqCount; ++i)
+					{
+						assignSeq(seq, multiSeqFile[i], format);
+						appendValue(seqSet, seq, Generous());
+					}
+					close(multiSeqFile.concat);
+				}
+			}
+		} 
+		else
+		{
+			// dirname is path of a file
+			if (guessFormatFromFilename(dirname, format))
+			{
+				if (!open(multiSeqFile.concat, toCString(dirname), OPEN_RDONLY)) return;
+
+				split(multiSeqFile, format);
+				unsigned seqCount = length(multiSeqFile);
+				
+				reserve(seqSet, length(seqSet) + seqCount, Generous());					
+				for(unsigned i = 0; i < seqCount; ++i)
+				{
+					assignSeq(seq, multiSeqFile[i], format);
+					appendValue(seqSet, seq, Generous());
+				}
+				close(multiSeqFile.concat);
+			}
+		}
+	}
+	
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/file/file_format_raw.h b/src/SeqAn-1.3/seqan/file/file_format_raw.h
new file mode 100644
index 0000000..c84a9d5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_format_raw.h
@@ -0,0 +1,319 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_RAW_H
+#define SEQAN_HEADER_FILE_RAW_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// File Formats - Raw
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.File Format.tag.Raw:
+	The file contains data in a raw format.
+..remark:It is supposed that the file contains one single piece of data, 
+that is the file cannot store multiple records.
+..include:seqan/file.h
+*/
+
+struct TagRaw_;
+typedef Tag<TagRaw_> const Raw;
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// read
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TData, typename TTag>
+struct ReadRaw_;
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TData>
+struct ReadRaw_<TFile, TData, True>
+{
+	template <typename TSize>
+	inline static void
+	read_(TFile & file,
+		TData & data,
+		TSize _limit)
+	{
+SEQAN_CHECKPOINT
+		SEQAN_ASSERT(!_streamEOF(file))
+
+		typename Size<TData>::Type limit = _limit;
+
+		//determine length
+		typename Position<TFile>::Type begin_pos = _streamTellG(file);
+		typename Size<TData>::Type count;
+		typename Position<TData>::Type pos;
+
+		for (count = 0; !_streamEOF(file) && count != limit; ++count)
+			_streamGet(file);
+
+		//reserve space
+		resize(data, count);
+
+		if (!count) return;
+
+		if (length(data) < count)
+			count = length(data);
+
+		//read sequence
+		_streamSeekG(file, begin_pos);
+
+		for (pos = 0; pos < count; ++pos)
+			assignValue(data, pos, _streamGet(file));
+	}
+
+//____________________________________________________________________________
+
+	inline static void
+	read_(TFile & file,	
+		TData & data)
+	{
+SEQAN_CHECKPOINT
+		typedef typename Size<TData>::Type TSize;
+		read(file, data, maxValue<TSize>());
+	}
+
+};
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TData>
+struct ReadRaw_<TFile, TData, False>
+{
+	static void
+	read_(TFile & file,
+		TData & data)
+	{
+SEQAN_CHECKPOINT
+
+		clear(data);
+		if (!_streamEOF(file))
+		{
+SEQAN_CHECKPOINT
+			ChunkCollector_<TData> chunk_collector(data);
+			assign(chunk_collector, file);
+			append(data, chunk_collector);
+		}
+	}
+
+//____________________________________________________________________________
+
+	template <typename TSize>
+	static void
+	read_(TFile & file,
+		TData & data,
+		TSize limit)
+	{
+SEQAN_CHECKPOINT
+
+		clear(data);
+		if (!_streamEOF(file))
+		{
+SEQAN_CHECKPOINT
+			ChunkCollector_<TData> chunk_collector(data);
+			assign(chunk_collector, file, limit);
+			append(data, chunk_collector, limit);
+		}
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TFile, typename TData>
+void
+read(TFile & file,
+	 TData & data,
+	 Raw)
+{
+SEQAN_CHECKPOINT
+	ReadRaw_<TFile, TData, typename IsTellAndSeekStream_<TFile>::Type>::read_(file, data);
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TData, typename TSize>
+void
+read(TFile & file,
+	 TData & data,
+	 TSize limit,
+	 Raw)
+{
+SEQAN_CHECKPOINT
+	ReadRaw_<TFile, TData, typename IsTellAndSeekStream_<TFile>::Type>::read_(file, data, limit);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// readID
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TString>
+void
+readID(TFile & /*file*/,
+	   TString & id,
+	   Raw)
+{
+SEQAN_CHECKPOINT
+	clear(id);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// readMeta
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TMeta>
+void
+readMeta(TFile & /*file*/,
+		 TMeta & meta,
+		 Raw)
+{
+SEQAN_CHECKPOINT
+	clear(meta);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// goNext
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile>
+void
+goNext(TFile & file,
+	   Raw)
+{
+SEQAN_CHECKPOINT
+  (void) file;  // When compiled without assertions.
+	SEQAN_ASSERT_TRUE(!_streamEOF(file));
+
+//??? TODO: set file to eof
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// write
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TFile, typename TData>
+void
+write(TFile & file,
+	  TData const & data,
+	  Raw)
+{
+SEQAN_CHECKPOINT
+	_streamWrite(file, data);
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TData, typename TString>
+void
+write(TFile & file,
+	  TData const & data,
+	  TString const &,
+	  Raw)
+{
+SEQAN_CHECKPOINT
+	_streamWrite(file, data);
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TString, typename TData, typename TMeta>
+void
+write(TFile & file,
+	  TData const & data,
+	  TString const &,
+	  TMeta const &,
+	  Raw)
+{
+SEQAN_CHECKPOINT
+	_streamWrite(file, data);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// default functions
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TFile, typename TData>
+void
+read(TFile & file,
+	 TData & data)
+{
+	read(file, data, Raw());
+}
+
+template <typename TFile, typename TData, typename TSize>
+void
+read(TFile & file,
+	 TData & data,
+	 TSize limit)
+{
+SEQAN_CHECKPOINT
+	read(file, data, limit, Raw());
+}
+
+//____________________________________________________________________________
+
+template <typename TFile, typename TData>
+void
+write(TFile & file,
+	  TData & data)
+{
+SEQAN_CHECKPOINT
+	write(file, data, "", Raw());
+}
+template <typename TFile, typename TData>
+void
+write(TFile & file,
+	  TData const & data)
+{
+SEQAN_CHECKPOINT
+	write(file, data, "", Raw());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/file_forwards.h b/src/SeqAn-1.3/seqan/file/file_forwards.h
new file mode 100644
index 0000000..1e0ebef
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_forwards.h
@@ -0,0 +1,56 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_FORWARDS_H 
+#define SEQAN_HEADER_FILE_FORWARDS_H 
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN 
+{
+    
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TSpec>
+class Align;
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/file/file_generated_forwards.h b/src/SeqAn-1.3/seqan/file/file_generated_forwards.h
new file mode 100644
index 0000000..5b81afd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_generated_forwards.h
@@ -0,0 +1,1371 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_FILE_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_FILE_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AppendChunkCollectorToString_
+
+template <typename TExpand> struct AppendChunkCollectorToString_;       	// "projects/library/seqan/file/chunk_collector.h"(354)
+
+//____________________________________________________________________________
+// AssignChunkCollectorToString_
+
+template <typename TExpand> struct AssignChunkCollectorToString_;       	// "projects/library/seqan/file/chunk_collector.h"(284)
+
+//____________________________________________________________________________
+// AssignStreamToChunkCollector_
+
+struct AssignStreamToChunkCollector_;       	// "projects/library/seqan/file/chunk_collector.h"(206)
+
+//____________________________________________________________________________
+// Async
+
+template <typename TSpec > struct Async;       	// "projects/library/seqan/file/file_base.h"(72)
+
+//____________________________________________________________________________
+// AsyncDummyRequest
+
+struct AsyncDummyRequest;       	// "projects/library/seqan/file/file_base.h"(160)
+
+//____________________________________________________________________________
+// AsyncRequest
+
+template <typename T > struct AsyncRequest;       	// "projects/library/seqan/file/file_base.h"(174)
+
+//____________________________________________________________________________
+// Chained
+
+template <__int64 FileSize_ , typename TFile > struct Chained;       	// "projects/library/seqan/file/file_base.h"(106)
+
+//____________________________________________________________________________
+// ChunkCollector_
+
+template <typename THost> class ChunkCollector_;       	// "projects/library/seqan/file/chunk_collector.h"(63)
+
+//____________________________________________________________________________
+// ChunkLength
+
+template <typename T> struct ChunkLength;       	// "projects/library/seqan/file/chunk_collector.h"(53)
+
+//____________________________________________________________________________
+// DefaultOpenMode
+
+template <typename T> struct DefaultOpenMode;       	// "projects/library/seqan/file/file_base.h"(139)
+
+//____________________________________________________________________________
+// DefaultOpenTempMode
+
+template <typename T> struct DefaultOpenTempMode;       	// "projects/library/seqan/file/file_base.h"(144)
+
+//____________________________________________________________________________
+// Dynamic
+
+template <typename TSpec > struct Dynamic;       	// "projects/library/seqan/file/file_page.h"(236)
+
+//____________________________________________________________________________
+// ExtStringConstIterator
+
+template <typename TExtString > struct ExtStringConstIterator;       	// "projects/library/seqan/file/string_external.h"(285)
+
+//____________________________________________________________________________
+// ExtStringFwdConstIterator
+
+template <typename TExtString > struct ExtStringFwdConstIterator;       	// "projects/library/seqan/file/string_external.h"(619)
+
+//____________________________________________________________________________
+// ExtStringFwdIterator
+
+template <typename TExtString > struct ExtStringFwdIterator;       	// "projects/library/seqan/file/string_external.h"(388)
+
+//____________________________________________________________________________
+// ExtStringIterator
+
+template <typename TExtString > struct ExtStringIterator;       	// "projects/library/seqan/file/string_external.h"(183)
+
+//____________________________________________________________________________
+// External
+
+template <typename TConfig > struct External;       	// "projects/library/seqan/file/string_external.h"(176)
+
+//____________________________________________________________________________
+// ExternalConfig
+
+template <typename TFile_ , unsigned PAGE_SIZE_ , unsigned FRAMES_ > struct ExternalConfig;       	// "projects/library/seqan/file/string_external.h"(99)
+
+//____________________________________________________________________________
+// ExternalConfigLarge
+
+template <typename TFile_ , unsigned PAGE_SIZE_ , unsigned FRAMES_ > struct ExternalConfigLarge;       	// "projects/library/seqan/file/string_external.h"(135)
+
+//____________________________________________________________________________
+// ExternalConfigSize
+
+template <typename TSize_, typename TFile_ , unsigned PAGE_SIZE_ , unsigned FRAMES_ > struct ExternalConfigSize;       	// "projects/library/seqan/file/string_external.h"(168)
+
+//____________________________________________________________________________
+// File
+
+template <typename TSpec > class File;       	// "projects/library/seqan/file/file_base.h"(86)
+
+//____________________________________________________________________________
+// FileFormat
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat > struct FileFormat;       	// "projects/library/seqan/file/file_format.h"(74)
+
+//____________________________________________________________________________
+// FileReader
+
+template <typename TFormat, typename TFile, typename TSpec> struct FileReader;       	// "projects/library/seqan/file/file_filereader.h"(40)
+
+//____________________________________________________________________________
+// FileReaderIterator
+
+struct FileReaderIterator;       	// "projects/library/seqan/file/file_filereader.h"(425)
+
+//____________________________________________________________________________
+// FileReaderTypes_
+
+template <typename T> struct FileReaderTypes_;       	// "projects/library/seqan/file/file_filereader.h"(433)
+
+//____________________________________________________________________________
+// Fixed
+
+template <unsigned PageSize_ > struct Fixed;       	// "projects/library/seqan/file/file_page.h"(266)
+
+//____________________________________________________________________________
+// IsTellAndSeekStream_
+
+template <typename T> struct IsTellAndSeekStream_;       	// "projects/library/seqan/file/stream.h"(191)
+template <typename T> struct IsTellAndSeekStream_;       	// "projects/library/seqan/file/cstream.h"(75)
+
+//____________________________________________________________________________
+// MMap
+
+template <typename TConfig > struct MMap;       	// "projects/library/seqan/file/string_mmap.h"(50)
+
+//____________________________________________________________________________
+// MMapConfig
+
+template <typename TFile_ , typename TSize_ > struct MMapConfig;       	// "projects/library/seqan/file/string_mmap.h"(44)
+
+//____________________________________________________________________________
+// PageBucket
+
+template <typename TValue > struct PageBucket;       	// "projects/library/seqan/file/file_page.h"(168)
+
+//____________________________________________________________________________
+// PageBucketExtended
+
+template <typename TValue > struct PageBucketExtended;       	// "projects/library/seqan/file/file_page.h"(176)
+
+//____________________________________________________________________________
+// PageChain
+
+template <typename TPageFrame > struct PageChain;       	// "projects/library/seqan/file/file_page.h"(581)
+
+//____________________________________________________________________________
+// PageContainer
+
+template <typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS > struct PageContainer;       	// "projects/library/seqan/file/file_page.h"(720)
+
+//____________________________________________________________________________
+// PageFrame
+
+template <typename TValue, typename TFile, typename TSpec > struct PageFrame;       	// "projects/library/seqan/file/file_page.h"(207)
+
+//____________________________________________________________________________
+// ReadRaw_
+
+template <typename TFile, typename TData, typename TTag> struct ReadRaw_;       	// "projects/library/seqan/file/file_format_raw.h"(60)
+
+//____________________________________________________________________________
+// ReplaceChunkCollectorToString_
+
+template <typename TExpand> struct ReplaceChunkCollectorToString_;       	// "projects/library/seqan/file/chunk_collector.h"(427)
+
+//____________________________________________________________________________
+// SimpleBuffer
+
+template <typename TValue > struct SimpleBuffer;       	// "projects/library/seqan/file/file_page.h"(48)
+
+//____________________________________________________________________________
+// Striped
+
+template <unsigned FileCount_ , typename TFile > struct Striped;       	// "projects/library/seqan/file/file_base.h"(124)
+
+//____________________________________________________________________________
+// Sync
+
+template <typename TSpec > struct Sync;       	// "projects/library/seqan/file/file_base.h"(60)
+
+//____________________________________________________________________________
+// TagCGViz_
+
+struct TagCGViz_;       	// "projects/library/seqan/file/file_format_cgviz.h"(49)
+
+//____________________________________________________________________________
+// TagEmbl_
+
+struct TagEmbl_;       	// "projects/library/seqan/file/file_format_embl.h"(47)
+
+//____________________________________________________________________________
+// TagFasta_
+
+struct TagFasta_;       	// "projects/library/seqan/file/file_format_fasta.h"(48)
+
+//____________________________________________________________________________
+// TagGenbank_
+
+struct TagGenbank_;       	// "projects/library/seqan/file/file_format_genbank.h"(48)
+
+//____________________________________________________________________________
+// TagRaw_
+
+struct TagRaw_;       	// "projects/library/seqan/file/file_format_raw.h"(50)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// FastaAlign_
+
+struct FastaAlign_;       	// "projects/library/seqan/file/file_format_fasta_align.h"(62)
+
+//____________________________________________________________________________
+// Row
+
+template <typename T> struct Row;       	// "projects/library/seqan/file/file_format_fasta_align.h"(48)
+
+//____________________________________________________________________________
+// Rows
+
+template <typename T> struct Rows;       	// "projects/library/seqan/file/file_format_fasta_align.h"(51)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// CGViz
+
+typedef Tag<TagCGViz_> const CGViz;       	// "projects/library/seqan/file/file_format_cgviz.h"(50)
+
+//____________________________________________________________________________
+// Embl
+
+typedef Tag<TagEmbl_> const Embl;       	// "projects/library/seqan/file/file_format_embl.h"(48)
+
+//____________________________________________________________________________
+// Fasta
+
+typedef Tag<TagFasta_> const Fasta;       	// "projects/library/seqan/file/file_format_fasta.h"(49)
+
+//____________________________________________________________________________
+// Genbank
+
+typedef Tag<TagGenbank_> const Genbank;       	// "projects/library/seqan/file/file_format_genbank.h"(49)
+
+//____________________________________________________________________________
+// Raw
+
+typedef Tag<TagRaw_> const Raw;       	// "projects/library/seqan/file/file_format_raw.h"(51)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// FastaAlign
+
+typedef Tag<FastaAlign_> FastaAlign;       	// "projects/library/seqan/file/file_format_fasta_align.h"(63)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _allocateStorage
+
+template <typename TValue, typename TConfig, typename TSize > inline typename Value<String<TValue, MMap<TConfig> > >::Type * _allocateStorage(String<TValue, MMap<TConfig> > &me, TSize new_capacity);       	// "projects/library/seqan/file/string_mmap.h"(681)
+
+//____________________________________________________________________________
+// _cancelFArray
+
+template <typename TFileArray, typename TRequest > inline bool _cancelFArray(TFileArray &me, TRequest &request);       	// "projects/library/seqan/file/file_array.h"(284)
+
+//____________________________________________________________________________
+// _closeFArray
+
+template <typename TFileArray > inline bool _closeFArray(TFileArray &me);       	// "projects/library/seqan/file/file_array.h"(254)
+
+//____________________________________________________________________________
+// _constructFileReaderString
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec> inline void _constructFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me);       	// "projects/library/seqan/file/file_filereader.h"(277)
+
+//____________________________________________________________________________
+// _dataFile
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec> inline TFile & _dataFile(String<TValue, FileReader<TFormat, TFile, TSpec> > & me);       	// "projects/library/seqan/file/file_filereader.h"(178)
+
+//____________________________________________________________________________
+// _deallocateStorage
+
+template <typename TValue, typename TConfig, typename TSize > inline void _deallocateStorage(String<TValue, MMap<TConfig> > & , TValue * , TSize );       	// "projects/library/seqan/file/string_mmap.h"(701)
+
+//____________________________________________________________________________
+// _ensureFileIsOpen
+
+template <typename TValue, typename TConfig > inline void _ensureFileIsOpen(String<TValue, MMap<TConfig> > &me);       	// "projects/library/seqan/file/string_mmap.h"(764)
+
+//____________________________________________________________________________
+// _fastaScanLine
+
+template <typename TFile, typename TSize> inline typename Value<TFile>::Type _fastaScanLine(TFile & file, TSize & count_valid, TSize & count_all);       	// "projects/library/seqan/file/file_format_fasta.h"(158)
+
+//____________________________________________________________________________
+// _findBlockFileReaderString
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPosition> inline unsigned int _findBlockFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me, TPosition pos);       	// "projects/library/seqan/file/file_filereader.h"(256)
+
+//____________________________________________________________________________
+// _flushFArray
+
+template <typename TFileArray > inline bool _flushFArray(TFileArray &me);       	// "projects/library/seqan/file/file_array.h"(276)
+
+//____________________________________________________________________________
+// _getCStyleOpenMode
+
+inline const char * _getCStyleOpenMode(int openMode);       	// "projects/library/seqan/file/file_cstyle.h"(80)
+
+//____________________________________________________________________________
+// _holderAllocatePointer
+
+template <typename THolder> inline FILE * _holderAllocatePointer(THolder &, FILE * data);       	// "projects/library/seqan/file/cstream.h"(250)
+
+//____________________________________________________________________________
+// _holderDeallocate
+
+template <typename THolder> inline void _holderDeallocate(THolder &, FILE *);       	// "projects/library/seqan/file/cstream.h"(245)
+
+//____________________________________________________________________________
+// _isValidBlockFileReaderString
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TUint> inline bool _isValidBlockFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me, TUint block_number);       	// "projects/library/seqan/file/file_filereader.h"(294)
+
+//____________________________________________________________________________
+// _loadBlockFileReaderString
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPosition> inline void _loadBlockFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me, TPosition blocknum);       	// "projects/library/seqan/file/file_filereader.h"(189)
+
+//____________________________________________________________________________
+// _loadCompleteFileReaderString
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec> inline void _loadCompleteFileReaderString(String<TValue, FileReader<TFormat, TFile, TSpec> > & me);       	// "projects/library/seqan/file/file_filereader.h"(311)
+
+//____________________________________________________________________________
+// _map
+
+template <typename TValue, typename TConfig > inline bool _map(String<TValue, MMap<TConfig> > &me, size_t new_capacity);       	// "projects/library/seqan/file/string_mmap.h"(378)
+template <typename TValue, typename TConfig > inline bool _map(String<TValue, MMap<TConfig> > &me, size_t new_capacity);       	// "projects/library/seqan/file/string_mmap.h"(557)
+
+//____________________________________________________________________________
+// _openTempFArray
+
+template <typename TFileArray > inline bool _openTempFArray(TFileArray &me, int openMode);       	// "projects/library/seqan/file/file_array.h"(233)
+template <typename TFileArray > inline bool _openTempFArray(TFileArray &me);       	// "projects/library/seqan/file/file_array.h"(241)
+
+//____________________________________________________________________________
+// _readNCharsFromFile
+
+template <typename TFile, typename TSize> inline void _readNCharsFromFile(TFile & file, TSize count);       	// "projects/library/seqan/file/file_format_fasta.h"(193)
+
+//____________________________________________________________________________
+// _reallocateStorage
+
+template <typename TValue, typename TConfig, typename TSize > inline typename Value<String<TValue, MMap<TConfig> > >::Type * _reallocateStorage( String<TValue, MMap<TConfig> > &me, TSize new_capacity);       	// "projects/library/seqan/file/string_mmap.h"(692)
+
+//____________________________________________________________________________
+// _remap
+
+template <typename TValue, typename TConfig, typename TCapSize > inline bool _remap(String<TValue, MMap<TConfig> > &me, TCapSize new_capacity);       	// "projects/library/seqan/file/string_mmap.h"(455)
+template <typename TValue, typename TConfig, typename TCapSize > inline bool _remap(String<TValue, MMap<TConfig> > &me, TCapSize new_capacity);       	// "projects/library/seqan/file/string_mmap.h"(609)
+
+//____________________________________________________________________________
+// _reopenFArray
+
+template <typename TFileArray > inline bool _reopenFArray(TFileArray &me, int openMode);       	// "projects/library/seqan/file/file_array.h"(246)
+
+//____________________________________________________________________________
+// _sectorSizeFArray
+
+template <typename TFileArray > inline unsigned _sectorSizeFArray(TFileArray &me, int );       	// "projects/library/seqan/file/file_array.h"(262)
+
+//____________________________________________________________________________
+// _setCapacity
+
+template <typename TValue, typename TConfig > inline void _setCapacity( String<TValue, MMap<TConfig> > & me, size_t new_capacity);       	// "projects/library/seqan/file/string_mmap.h"(277)
+
+//____________________________________________________________________________
+// _setLength
+
+template <typename TValue, typename TConfig > inline void _setLength( String<TValue, MMap<TConfig> > & me, size_t new_length);       	// "projects/library/seqan/file/string_mmap.h"(265)
+template <typename THost> inline void _setLength(ChunkCollector_<THost> & me, typename Size<THost>::Type new_length);       	// "projects/library/seqan/file/chunk_collector.h"(118)
+
+//____________________________________________________________________________
+// _sizeFArray
+
+template <typename TFileArray > inline typename Size<TFileArray>::Type _sizeFArray(TFileArray &me);       	// "projects/library/seqan/file/file_array.h"(268)
+
+//____________________________________________________________________________
+// _streamAppendLine
+
+template <typename TFile, typename TString, typename TChar> inline void _streamAppendLine(TFile & file, TString & str, TChar & c);       	// "projects/library/seqan/file/file_format.h"(451)
+
+//____________________________________________________________________________
+// _streamClose
+
+inline void _streamClose(::std::FILE * & me);       	// "projects/library/seqan/file/cstream.h"(105)
+
+//____________________________________________________________________________
+// _streamCountLine
+
+template <typename TFile, typename TChar> inline void _streamCountLine(TFile & file, TChar & c);       	// "projects/library/seqan/file/file_format.h"(483)
+
+//____________________________________________________________________________
+// _streamEOF
+
+template <typename TValue, typename TTraits> inline bool _streamEOF(::std::basic_istream<TValue, TTraits> const & me);       	// "projects/library/seqan/file/stream.h"(221)
+inline bool _streamEOF(::std::FILE * me);       	// "projects/library/seqan/file/cstream.h"(120)
+
+//____________________________________________________________________________
+// _streamGet
+
+template <typename TValue, typename TTraits> inline TValue _streamGet(::std::basic_istream<TValue, TTraits> & source);       	// "projects/library/seqan/file/stream.h"(269)
+inline char _streamGet(::std::FILE * source);       	// "projects/library/seqan/file/cstream.h"(147)
+
+//____________________________________________________________________________
+// _streamIsLetter
+
+template <typename TChar> inline bool _streamIsLetter(TChar const c);       	// "projects/library/seqan/file/file_format.h"(583)
+
+//____________________________________________________________________________
+// _streamOpen
+
+inline bool _streamOpen(::std::FILE * & me, String<char> path, bool for_read );       	// "projects/library/seqan/file/cstream.h"(87)
+
+//____________________________________________________________________________
+// _streamPeek
+
+template <typename TValue, typename TTraits> inline TValue _streamPeek(::std::basic_istream<TValue, TTraits> & source);       	// "projects/library/seqan/file/stream.h"(289)
+
+//____________________________________________________________________________
+// _streamPut
+
+template <typename TValue, typename TTraits, typename TChar> inline void _streamPut(::std::basic_ostream<TValue, TTraits> & target, TChar character);       	// "projects/library/seqan/file/stream.h"(329)
+inline void _streamPut(::std::FILE * target, char character);       	// "projects/library/seqan/file/cstream.h"(159)
+
+//____________________________________________________________________________
+// _streamPutFloat
+
+template <typename TStream> inline void _streamPutFloat(TStream & target, double number, char const * format_string);       	// "projects/library/seqan/file/stream_algorithms.h"(85)
+template <typename TStream> inline void _streamPutFloat(TStream & target, double number);       	// "projects/library/seqan/file/stream_algorithms.h"(95)
+
+//____________________________________________________________________________
+// _streamPutInt
+
+template <typename TStream> inline void _streamPutInt(TStream & target, int number, char const * format_string);       	// "projects/library/seqan/file/stream_algorithms.h"(56)
+template <typename TStream> inline void _streamPutInt(TStream & target, int number);       	// "projects/library/seqan/file/stream_algorithms.h"(66)
+
+//____________________________________________________________________________
+// _streamRead
+
+template <typename TValue, typename TTraits> inline ::std::streamsize _streamRead(TValue * target, ::std::basic_istream<TValue, TTraits> & source, ::std::streamsize limit);       	// "projects/library/seqan/file/stream.h"(248)
+template <typename TValue> inline size_t _streamRead(TValue * target, ::std::FILE * source, size_t limit);       	// "projects/library/seqan/file/cstream.h"(136)
+
+//____________________________________________________________________________
+// _streamReadWord
+
+template <typename TFile, typename TChar> inline String<char> _streamReadWord(TFile & file, TChar& c);       	// "projects/library/seqan/file/file_format.h"(567)
+
+//____________________________________________________________________________
+// _streamSeek2G
+
+template <typename TValue, typename TTraits> inline void _streamSeek2G(::std::basic_istream<TValue, TTraits> & me, int off);       	// "projects/library/seqan/file/stream.h"(436)
+inline void _streamSeek2G(FILE * me, int off);       	// "projects/library/seqan/file/cstream.h"(222)
+
+//____________________________________________________________________________
+// _streamSeekG
+
+template <typename TValue, typename TTraits> inline void _streamSeekG(::std::basic_istream<TValue, TTraits> & me, typename Position< ::std::basic_istream<TValue, TTraits> >::Type pos);       	// "projects/library/seqan/file/stream.h"(389)
+inline void _streamSeekG(FILE * me, Position<FILE *>::Type pos);       	// "projects/library/seqan/file/cstream.h"(198)
+
+//____________________________________________________________________________
+// _streamSeekP
+
+template <typename TValue, typename TTraits> inline void _streamSeekP(::std::basic_ostream<TValue, TTraits> & me, typename Position< ::std::basic_ostream<TValue, TTraits> >::Type pos);       	// "projects/library/seqan/file/stream.h"(413)
+inline void _streamSeekP(FILE * me, Position<FILE *>::Type pos);       	// "projects/library/seqan/file/cstream.h"(210)
+
+//____________________________________________________________________________
+// _streamSkipLine
+
+template <typename TFile, typename TChar> inline typename Size<TFile>::Type _streamSkipLine(TFile & file, TChar & c);       	// "projects/library/seqan/file/file_format.h"(514)
+
+//____________________________________________________________________________
+// _streamSkipWhitespace
+
+template <typename TFile, typename TChar> inline void _streamSkipWhitespace(TFile& file, TChar& c);       	// "projects/library/seqan/file/file_format.h"(553)
+
+//____________________________________________________________________________
+// _streamTellG
+
+template <typename TValue, typename TTraits> inline typename Position< ::std::basic_istream<TValue, TTraits> >::Type _streamTellG(::std::basic_istream<TValue, TTraits> & me);       	// "projects/library/seqan/file/stream.h"(348)
+inline Position<FILE *>::Type _streamTellG(FILE * me);       	// "projects/library/seqan/file/cstream.h"(175)
+
+//____________________________________________________________________________
+// _streamTellP
+
+template <typename TValue, typename TTraits> inline typename Position< ::std::basic_ostream<TValue, TTraits> >::Type _streamTellP(::std::basic_ostream<TValue, TTraits> & me);       	// "projects/library/seqan/file/stream.h"(367)
+inline Position<FILE *>::Type _streamTellP(FILE * me);       	// "projects/library/seqan/file/cstream.h"(186)
+
+//____________________________________________________________________________
+// _streamUnget
+
+template <typename TValue, typename TTraits> inline void _streamUnget(::std::basic_istream<TValue, TTraits> & source);       	// "projects/library/seqan/file/stream.h"(308)
+inline void _streamUnget(::std::FILE * stream);       	// "projects/library/seqan/file/cstream.h"(233)
+
+//____________________________________________________________________________
+// _streamWrite
+
+template <typename TTarget, typename T1, typename T2, typename TCompression> inline void _streamWrite(TTarget & target, Pair<T1, T2, TCompression> const & source);       	// "projects/library/seqan/file/stream_algorithms.h"(107)
+template <typename TTarget, typename T1, typename T2, typename T3, typename TCompression> inline void _streamWrite(TTarget & target, Triple<T1, T2, T3, TCompression> const & source);       	// "projects/library/seqan/file/stream_algorithms.h"(117)
+template <typename TTarget, typename TSource> inline void _streamWrite(TTarget & target, TSource const & source);       	// "projects/library/seqan/file/stream_algorithms.h"(141)
+
+//____________________________________________________________________________
+// _streamWriteRange
+
+template <typename TTarget, typename TIterator> inline void _streamWriteRange(TTarget & target, TIterator begin_, TIterator end_);       	// "projects/library/seqan/file/stream_algorithms.h"(206)
+
+//____________________________________________________________________________
+// _streamWriteSeq
+
+template <typename TTarget, typename TSource> inline void _streamWriteSeq(TTarget & target, TSource const & source, False const);       	// "projects/library/seqan/file/stream_algorithms.h"(153)
+template <typename TTarget, typename TSource> inline void _streamWriteSeq(TTarget & target, TSource const & source, True const);       	// "projects/library/seqan/file/stream_algorithms.h"(164)
+template <typename TTarget, typename TSourceValue> inline void _streamWriteSeq(TTarget & target, TSourceValue const * source, True const);       	// "projects/library/seqan/file/stream_algorithms.h"(181)
+
+//____________________________________________________________________________
+// _stringAppendLine
+
+template <typename TString1, typename TString2, typename TIter> inline void _stringAppendLine(TString1 & str, TString2 & a_str, TIter & it);       	// "projects/library/seqan/file/file_format.h"(643)
+
+//____________________________________________________________________________
+// _stringReadNumber
+
+template <typename TString, typename TIter> inline int _stringReadNumber(TString & str, TIter& it);       	// "projects/library/seqan/file/file_format.h"(687)
+
+//____________________________________________________________________________
+// _stringSkipLine
+
+template <typename TString, typename TIter> inline typename Size<TString>::Type _stringSkipLine(TString & str, TIter & it);       	// "projects/library/seqan/file/file_format.h"(607)
+
+//____________________________________________________________________________
+// _stringSkipWhitespace
+
+template <typename TString, typename TIter> inline void _stringSkipWhitespace(TString& str, TIter& it);       	// "projects/library/seqan/file/file_format.h"(674)
+
+//____________________________________________________________________________
+// _unmap
+
+template <typename TValue, typename TConfig > inline bool _unmap(String<TValue, MMap<TConfig> > &me);       	// "projects/library/seqan/file/string_mmap.h"(424)
+template <typename TValue, typename TConfig > inline bool _unmap(String<TValue, MMap<TConfig> > &me);       	// "projects/library/seqan/file/string_mmap.h"(586)
+
+//____________________________________________________________________________
+// _writeImpl
+
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec> void _writeImpl(TFile& target, Align<TSource, TSpec>& align, TStringContainer& ids, CGViz);       	// "projects/library/seqan/file/file_format_cgviz.h"(76)
+template <typename TFile, typename TString, typename TData> void _writeImpl(TFile & file, TData & data, TString & id, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(501)
+
+//____________________________________________________________________________
+// alignSize
+
+template <typename T1, typename T2> inline T1 alignSize(T1 _size, T2 _aligning);       	// "projects/library/seqan/file/file_base.h"(750)
+
+//____________________________________________________________________________
+// allocPage
+
+template <typename TValue, typename TSize, typename T > inline void allocPage(SimpleBuffer<TValue> &pf, TSize size, T const & me);       	// "projects/library/seqan/file/file_page.h"(126)
+template <typename TValue, typename TFile, typename TSpec, typename T > inline void allocPage(PageFrame<TValue, TFile, TSpec> &pf, T const & me);       	// "projects/library/seqan/file/file_page.h"(389)
+
+//____________________________________________________________________________
+// allocate
+
+template <__int64 FILE_SIZE, typename TFile, typename TValue, typename TSize > inline void allocate(File< Chained<FILE_SIZE, TFile> > const &me, TValue* &data, TSize count);       	// "projects/library/seqan/file/file_array.h"(352)
+template <unsigned FileCount_, typename TFile, typename TValue, typename TSize > inline void allocate(File< Striped<FileCount_, TFile> > const &me, TValue* &data, TSize count);       	// "projects/library/seqan/file/file_array.h"(362)
+
+//____________________________________________________________________________
+// append
+
+template <typename TValue, typename TConfig, typename TSource, typename TExpand > inline void append(String<TValue, External<TConfig> > &target, TSource const &source, Tag<TExpand> const expand);       	// "projects/library/seqan/file/string_external.h"(1960)
+template <typename TValue, typename TConfig, typename TSourceValue, typename TExpand > inline void append(String<TValue, External<TConfig> > &target, TSourceValue * source, Tag<TExpand> const expand);       	// "projects/library/seqan/file/string_external.h"(1981)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand> inline void append(String<TTargetValue, TTargetSpec> & target, ChunkCollector_<TSourceHost> const & source, Tag<TExpand> const );       	// "projects/library/seqan/file/chunk_collector.h"(410)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand> inline void append(String<TTargetValue, TTargetSpec> & target, ChunkCollector_<TSourceHost> const & source, typename Size< String<TTargetValue, TTargetSpec> >::Type limit, Tag<TExpand> const );       	// "projects/library/seqan/file/chunk_collector.h"(419)
+
+//____________________________________________________________________________
+// appendValue
+
+template <typename TValue, typename TConfig, typename TExpand > inline void appendValue(String<TValue, External<TConfig> > &me, TValue const &Val_, Tag<TExpand> const expand);       	// "projects/library/seqan/file/string_external.h"(1898)
+
+//____________________________________________________________________________
+// assign
+
+template <typename TValue, typename TConfig, typename TSource, typename TExpand > inline void assign( String<TValue, External<TConfig> > &target, TSource const &source, Tag<TExpand> const);       	// "projects/library/seqan/file/string_external.h"(2032)
+template <typename TValue, typename TConfig, typename TSourceValue, typename TExpand > inline void assign( String<TValue, External<TConfig> > &target, TSourceValue * source, Tag<TExpand> const);       	// "projects/library/seqan/file/string_external.h"(2055)
+template <typename THost, typename TSource> inline void assign(ChunkCollector_<THost> & target, TSource & source);       	// "projects/library/seqan/file/chunk_collector.h"(251)
+template <typename THost, typename TSource> inline void assign(ChunkCollector_<THost> & target, TSource const & source);       	// "projects/library/seqan/file/chunk_collector.h"(258)
+template <typename THost, typename TSource, typename TSize> inline void assign(ChunkCollector_<THost> & target, TSource & source, TSize limit);       	// "projects/library/seqan/file/chunk_collector.h"(267)
+template <typename THost, typename TSource, typename TSize> inline void assign(ChunkCollector_<THost> & target, TSource const & source, TSize limit);       	// "projects/library/seqan/file/chunk_collector.h"(275)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand> inline void assign(String<TTargetValue, TTargetSpec> & target, ChunkCollector_<TSourceHost> const & source, Tag<TExpand> const );       	// "projects/library/seqan/file/chunk_collector.h"(336)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand> inline void assign(String<TTargetValue, TTargetSpec> & target, ChunkCollector_<TSourceHost> const & source, typename Size< String<TTargetValue, TTargetSpec> >::Type limit, Tag<TExpand> const );       	// "projects/library/seqan/file/chunk_collector.h"(345)
+
+//____________________________________________________________________________
+// asyncReadAt
+
+template <typename File, typename TValue, typename TSize, typename TPos, typename AsyncRequest > inline bool asyncReadAt(File & me, TValue *memPtr, TSize const count, TPos const fileOfs, AsyncRequest &);       	// "projects/library/seqan/file/file_base.h"(639)
+template <__int64 FILE_SIZE, typename TFile, typename TValue, typename TSize, typename TOffset, typename TRequest > inline bool asyncReadAt(File< Chained<FILE_SIZE, TFile> > &me, TValue *memPtr, TSize count, TOffset offset, TRequest &req);       	// "projects/library/seqan/file/file_array.h"(404)
+
+//____________________________________________________________________________
+// asyncWriteAt
+
+template <typename File, typename TValue, typename TSize, typename TPos, typename AsyncRequest > inline bool asyncWriteAt(File & me, TValue const *memPtr, TSize const count, TPos const fileOfs, AsyncRequest &);       	// "projects/library/seqan/file/file_base.h"(664)
+template <__int64 FILE_SIZE, typename TFile, typename TValue, typename TSize, typename TOffset, typename TRequest > inline bool asyncWriteAt(File< Chained<FILE_SIZE, TFile> > &me, TValue const *memPtr, TSize count, TOffset offset, TRequest &req);       	// "projects/library/seqan/file/file_array.h"(421)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename TExtString> inline bool atBegin(ExtStringIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(947)
+template <typename TExtString> inline bool atBegin(ExtStringIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(949)
+template <typename TExtString> inline bool atBegin(ExtStringConstIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(952)
+template <typename TExtString> inline bool atBegin(ExtStringConstIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(954)
+template <typename TExtString> inline bool atBegin(ExtStringFwdIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(957)
+template <typename TExtString> inline bool atBegin(ExtStringFwdIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(961)
+template <typename TExtString> inline bool atBegin(ExtStringFwdConstIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(966)
+template <typename TExtString> inline bool atBegin(ExtStringFwdConstIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(970)
+template <typename TContainer> inline bool atBegin(Iter<TContainer, FileReaderIterator> & it);       	// "projects/library/seqan/file/file_filereader.h"(784)
+template <typename TContainer> inline bool atBegin(Iter<TContainer, FileReaderIterator> const & it);       	// "projects/library/seqan/file/file_filereader.h"(790)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TExtString> inline bool atEnd(ExtStringIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(976)
+template <typename TExtString> inline bool atEnd(ExtStringIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(978)
+template <typename TExtString> inline bool atEnd(ExtStringConstIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(981)
+template <typename TExtString> inline bool atEnd(ExtStringConstIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(983)
+template <typename TExtString> inline bool atEnd(ExtStringFwdIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(986)
+template <typename TExtString> inline bool atEnd(ExtStringFwdIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(990)
+template <typename TExtString> inline bool atEnd(ExtStringFwdConstIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(995)
+template <typename TExtString> inline bool atEnd(ExtStringFwdConstIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(999)
+template <typename TContainer> inline bool atEnd(Iter<TContainer, FileReaderIterator> & it);       	// "projects/library/seqan/file/file_filereader.h"(769)
+template <typename TContainer> inline bool atEnd(Iter<TContainer, FileReaderIterator> const & it);       	// "projects/library/seqan/file/file_filereader.h"(775)
+
+//____________________________________________________________________________
+// back
+
+template <typename TValue, typename TConfig > inline TValue & back(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1943)
+template <typename TValue, typename TConfig > inline TValue const & back(String<TValue, External<TConfig> > const &me);       	// "projects/library/seqan/file/string_external.h"(1950)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TValue, typename TConfig > inline typename Iterator<String<TValue, MMap<TConfig> > , Standard>::Type begin(String<TValue, MMap<TConfig> > & me, Standard);       	// "projects/library/seqan/file/string_mmap.h"(208)
+template <typename TValue, typename TConfig > inline typename Iterator<String<TValue, MMap<TConfig> > const, Standard>::Type begin(String<TValue, MMap<TConfig> > const & me, Standard);       	// "projects/library/seqan/file/string_mmap.h"(216)
+template <typename TValue, typename TConfig, typename TSpec > inline typename Iterator<String<TValue, External<TConfig> >, Tag<TSpec> const>::Type begin(String<TValue, External<TConfig> > &me, Tag<TSpec> const);       	// "projects/library/seqan/file/string_external.h"(1848)
+template <typename TValue, typename TConfig, typename TSpec > inline typename Iterator<String<TValue, External<TConfig> > const, Tag<TSpec> const>::Type begin(String<TValue, External<TConfig> > const &me, Tag<TSpec> const);       	// "projects/library/seqan/file/string_external.h"(1856)
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec> inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec >::Type begin(String<TValue, FileReader<TFormat, TFile, TSpec> > & me, Tag<TIteratorSpec> const);       	// "projects/library/seqan/file/file_filereader.h"(363)
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec> inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> > const, TIteratorSpec >::Type begin(String<TValue, FileReader<TFormat, TFile, TSpec> > const & me, Tag<TIteratorSpec> const);       	// "projects/library/seqan/file/file_filereader.h"(371)
+template <typename TValue > inline TValue* begin(SimpleBuffer<TValue> &pf, Standard);       	// "projects/library/seqan/file/file_page.h"(141)
+template <typename TValue > inline TValue const * begin(SimpleBuffer<TValue> const &pf, Standard);       	// "projects/library/seqan/file/file_page.h"(146)
+template <typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS > inline typename Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS>, Standard >::Type begin( PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> &pageCont, Standard const);       	// "projects/library/seqan/file/file_page.h"(931)
+template <typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS > inline typename Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const, Standard >::Type begin( PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const &pageCont, Standard const);       	// "projects/library/seqan/file/file_page.h"(940)
+
+//____________________________________________________________________________
+// cancel
+
+template <typename TValue, typename TConfig > inline void cancel(String<TValue, MMap<TConfig> > &);       	// "projects/library/seqan/file/string_mmap.h"(363)
+template <typename TValue, typename TConfig > inline void cancel(String<TValue, MMap<TConfig> > &me);       	// "projects/library/seqan/file/string_mmap.h"(540)
+template <typename TValue, typename TConfig > inline void cancel(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1579)
+template <typename AsyncRequest > inline bool cancel(FILE*, AsyncRequest &);       	// "projects/library/seqan/file/file_cstyle.h"(239)
+template <typename TSpec, typename AsyncRequest > inline bool cancel(File<TSpec> &, AsyncRequest &);       	// "projects/library/seqan/file/file_base.h"(735)
+template <typename TValue, typename TFile, typename TSpec > inline bool cancel(PageFrame<TValue, TFile, TSpec> &pf, TFile &file);       	// "projects/library/seqan/file/file_page.h"(491)
+
+//____________________________________________________________________________
+// cancelAndFree
+
+template <typename TValue, typename TConfig > inline void cancelAndFree(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1597)
+
+//____________________________________________________________________________
+// capacity
+
+template <typename TValue, typename TConfig > inline typename Size<String<TValue, MMap<TConfig> > >::Type capacity(String<TValue, MMap<TConfig> > & me);       	// "projects/library/seqan/file/string_mmap.h"(245)
+template <typename TValue, typename TConfig > inline typename Size<String<TValue, MMap<TConfig> > >::Type capacity(String<TValue, MMap<TConfig> > const & me);       	// "projects/library/seqan/file/string_mmap.h"(253)
+template <typename TValue, typename TConfig > inline typename Size< String<TValue, External<TConfig> > >::Type capacity(String<TValue, External<TConfig> > const &me);       	// "projects/library/seqan/file/string_external.h"(1800)
+
+//____________________________________________________________________________
+// chunkCount
+
+template <typename THost> inline int chunkCount(ChunkCollector_<THost> const & me);       	// "projects/library/seqan/file/chunk_collector.h"(125)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TValue, typename TConfig > inline void clear(String<TValue, MMap<TConfig> > &me);       	// "projects/library/seqan/file/string_mmap.h"(662)
+template <typename TValue, typename TConfig > inline void clear(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1528)
+template <typename THost> inline void clear(ChunkCollector_<THost> & me);       	// "projects/library/seqan/file/chunk_collector.h"(92)
+
+//____________________________________________________________________________
+// close
+
+template <typename TValue, typename TConfig > inline bool close(String<TValue, MMap<TConfig> > &me);       	// "projects/library/seqan/file/string_mmap.h"(805)
+template <typename TValue, typename TConfig > inline bool close(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1771)
+inline bool close(FILE* me);       	// "projects/library/seqan/file/file_cstyle.h"(125)
+template <typename TSpec > inline bool close(File<TSpec> & me);       	// "projects/library/seqan/file/file_base.h"(289)
+template <__int64 FILE_SIZE, typename TFile > inline bool close(File< Chained<FILE_SIZE, TFile> > &me);       	// "projects/library/seqan/file/file_array.h"(327)
+template <unsigned FileCount_, typename TFile > inline bool close(File< Striped<FileCount_, TFile> > &me);       	// "projects/library/seqan/file/file_array.h"(334)
+
+//____________________________________________________________________________
+// container
+
+template <typename TExtString> inline TExtString & container(ExtStringIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(926)
+template <typename TExtString> inline TExtString & container(ExtStringIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(928)
+template <typename TExtString> inline TExtString & container(ExtStringConstIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(931)
+template <typename TExtString> inline TExtString & container(ExtStringConstIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(933)
+template <typename TExtString> inline TExtString & container(ExtStringFwdIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(936)
+template <typename TExtString> inline TExtString & container(ExtStringFwdIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(938)
+template <typename TExtString> inline TExtString & container(ExtStringFwdConstIterator<TExtString> &it);       	// "projects/library/seqan/file/string_external.h"(941)
+template <typename TExtString> inline TExtString & container(ExtStringFwdConstIterator<TExtString> const &it);       	// "projects/library/seqan/file/string_external.h"(943)
+template <typename TContainer> inline TContainer & container(Iter<TContainer, FileReaderIterator> & it);       	// "projects/library/seqan/file/file_filereader.h"(596)
+template <typename TContainer> inline TContainer & container(Iter<TContainer, FileReaderIterator> const & it);       	// "projects/library/seqan/file/file_filereader.h"(602)
+
+//____________________________________________________________________________
+// createChunk
+
+template <typename THost> inline typename Value<THost>::Type * createChunk(ChunkCollector_<THost> & me);       	// "projects/library/seqan/file/chunk_collector.h"(139)
+
+//____________________________________________________________________________
+// deallocate
+
+template <__int64 FILE_SIZE, typename TFile, typename TValue, typename TSize > inline void deallocate(File< Chained<FILE_SIZE, TFile> > const &me, TValue* &data, TSize count);       	// "projects/library/seqan/file/file_array.h"(357)
+template <unsigned FileCount_, typename TFile, typename TValue, typename TSize > inline void deallocate(File< Striped<FileCount_, TFile> > const &me, TValue* &data, TSize count);       	// "projects/library/seqan/file/file_array.h"(367)
+
+//____________________________________________________________________________
+// enclosingBlocks
+
+template <typename T1, typename T2> inline T1 enclosingBlocks(T1 _size, T2 _blockSize);       	// "projects/library/seqan/file/file_base.h"(744)
+
+//____________________________________________________________________________
+// end
+
+template <typename TValue, typename TConfig > inline typename Iterator<String<TValue, MMap<TConfig> > , Standard>::Type end(String<TValue, MMap<TConfig> > & me, Standard);       	// "projects/library/seqan/file/string_mmap.h"(227)
+template <typename TValue, typename TConfig > inline typename Iterator<String<TValue, MMap<TConfig> > const, Standard>::Type end(String<TValue, MMap<TConfig> > const & me, Standard);       	// "projects/library/seqan/file/string_mmap.h"(235)
+template <typename TValue, typename TConfig, typename TSpec > inline typename Iterator<String<TValue, External<TConfig> >, Tag<TSpec> const>::Type end(String<TValue, External<TConfig> > &me, Tag<TSpec> const);       	// "projects/library/seqan/file/string_external.h"(1864)
+template <typename TValue, typename TConfig, typename TSpec > inline typename Iterator<String<TValue, External<TConfig> > const, Tag<TSpec> const>::Type end(String<TValue, External<TConfig> > const &me, Tag<TSpec> const);       	// "projects/library/seqan/file/string_external.h"(1872)
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec> inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec >::Type end(String<TValue, FileReader<TFormat, TFile, TSpec> > & me, Tag<TIteratorSpec> const);       	// "projects/library/seqan/file/file_filereader.h"(383)
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TIteratorSpec> inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> > const, TIteratorSpec >::Type end(String<TValue, FileReader<TFormat, TFile, TSpec> > const & me, Tag<TIteratorSpec> const);       	// "projects/library/seqan/file/file_filereader.h"(391)
+template <typename TValue > inline TValue * end(SimpleBuffer<TValue> &pf, Standard);       	// "projects/library/seqan/file/file_page.h"(151)
+template <typename TValue > inline TValue const * end(SimpleBuffer<TValue> const &pf, Standard);       	// "projects/library/seqan/file/file_page.h"(156)
+template <typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS > inline typename Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS>, Standard >::Type end( PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> &pageCont, Standard const);       	// "projects/library/seqan/file/file_page.h"(949)
+template <typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS > inline typename Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const, Standard >::Type end( PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const &pageCont, Standard const);       	// "projects/library/seqan/file/file_page.h"(958)
+
+//____________________________________________________________________________
+// equiDistantAlignedDistribution
+
+template <typename TValue, typename TSize, typename T, class Function > inline unsigned equiDistantAlignedDistribution( SimpleBuffer<TValue> &_clusterBuffer, unsigned aligning, unsigned _bufferSize, T const &me, TSize _size, unsigned _pageSize, Function const &Func_);       	// "projects/library/seqan/file/file_page.h"(1034)
+
+//____________________________________________________________________________
+// equiDistantDistribution
+
+template <typename TValue, typename TSize, typename T, class Function > inline bool equiDistantDistribution( SimpleBuffer<TValue> &_clusterBuffer, unsigned _bufferSize, T const &me, TSize _size, unsigned _pageSize, Function const &Func_);       	// "projects/library/seqan/file/file_page.h"(972)
+
+//____________________________________________________________________________
+// flush
+
+template <typename TValue, typename TConfig > inline void flush(String<TValue, MMap<TConfig> > &);       	// "projects/library/seqan/file/string_mmap.h"(356)
+template <typename TValue, typename TConfig > inline void flush(String<TValue, MMap<TConfig> > &me);       	// "projects/library/seqan/file/string_mmap.h"(532)
+template <typename TValue, typename TConfig > inline void flush(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1559)
+inline bool flush(FILE*);       	// "projects/library/seqan/file/file_cstyle.h"(226)
+template <typename TSpec > inline void flush(File<TSpec> &);       	// "projects/library/seqan/file/file_base.h"(685)
+
+//____________________________________________________________________________
+// flushAndFree
+
+template <typename TValue, typename TConfig > inline int flushAndFree(String<TValue, MMap<TConfig> > &);       	// "projects/library/seqan/file/string_mmap.h"(370)
+template <typename TValue, typename TConfig > inline int flushAndFree(String<TValue, MMap<TConfig> > &me);       	// "projects/library/seqan/file/string_mmap.h"(548)
+template <typename TValue, typename TConfig > inline void flushAndFree(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1626)
+
+//____________________________________________________________________________
+// formatID
+
+template <typename TFile, typename TData, typename TMeta, typename TFormat> inline void * formatID(FileFormat<TFile, TData, TMeta, TFormat> const & file_format);       	// "projects/library/seqan/file/file_format.h"(185)
+
+//____________________________________________________________________________
+// freePage
+
+template <typename TValue, typename T > inline void freePage(SimpleBuffer<TValue> &pf, T const & me);       	// "projects/library/seqan/file/file_page.h"(133)
+template <typename TValue, typename TFile, typename TSpec, typename T > inline void freePage(PageFrame<TValue, TFile, TSpec> &pf, T const & me);       	// "projects/library/seqan/file/file_page.h"(400)
+
+//____________________________________________________________________________
+// front
+
+template <typename TValue, typename TConfig > inline TValue & front(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1929)
+template <typename TValue, typename TConfig > inline TValue const & front(String<TValue, External<TConfig> > const &me);       	// "projects/library/seqan/file/string_external.h"(1936)
+
+//____________________________________________________________________________
+// getChunk
+
+template <typename THost> inline typename Value<THost>::Type * getChunk(ChunkCollector_<THost> const & me, int chunk_number);       	// "projects/library/seqan/file/chunk_collector.h"(132)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TContainer> inline typename GetValue<Iter<TContainer, FileReaderIterator> >::Type getValue(Iter<TContainer, FileReaderIterator> & it);       	// "projects/library/seqan/file/file_filereader.h"(556)
+template <typename TContainer> inline typename GetValue<Iter<TContainer, FileReaderIterator> >::Type getValue(Iter<TContainer, FileReaderIterator> const & it);       	// "projects/library/seqan/file/file_filereader.h"(567)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename TFile, typename TFile2, typename TSpec> inline void goBegin(Iter<TFile, FileReader<Embl, TFile2, TSpec> > & it, bool skip_meta);       	// "projects/library/seqan/file/file_format_embl.h"(59)
+template <typename TFile, typename TFile2, typename TSpec> inline void goBegin(Iter<TFile, FileReader<Embl, TFile2, TSpec> > & it);       	// "projects/library/seqan/file/file_format_embl.h"(120)
+template <typename TFile, typename TFile2, typename TSpec> inline void goBegin(Iter<TFile, FileReader<Fasta, TFile2, TSpec> > & it, bool skip_meta);       	// "projects/library/seqan/file/file_format_fasta.h"(58)
+template <typename TFile, typename TFile2, typename TSpec> inline void goBegin(Iter<TFile, FileReader<Fasta, TFile2, TSpec> > & it);       	// "projects/library/seqan/file/file_format_fasta.h"(95)
+template <typename TContainer> inline void goBegin(Iter<TContainer, FileReaderIterator> & it);       	// "projects/library/seqan/file/file_filereader.h"(735)
+template <typename TFile, typename TFile2, typename TSpec> inline void goBegin(Iter<TFile, FileReader<Genbank, TFile2, TSpec> > & it, bool skip_meta);       	// "projects/library/seqan/file/file_format_genbank.h"(59)
+template <typename TFile, typename TFile2, typename TSpec> inline void goBegin(Iter<TFile, FileReader<Genbank, TFile2, TSpec> > & it);       	// "projects/library/seqan/file/file_format_genbank.h"(137)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename TContainer> inline void goEnd(Iter<TContainer, FileReaderIterator> & it);       	// "projects/library/seqan/file/file_filereader.h"(757)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TFile> void goNext(TFile & file, CGViz);       	// "projects/library/seqan/file/file_format_cgviz.h"(61)
+template <typename TFile, typename TFile2, typename TSpec> inline void goNext(Iter<TFile, FileReader<Embl, TFile2, TSpec> > & it);       	// "projects/library/seqan/file/file_format_embl.h"(129)
+template <typename TFile> inline void goNext(TFile & file, Embl);       	// "projects/library/seqan/file/file_format_embl.h"(450)
+template <typename TFile, typename TFile2, typename TSpec> inline void goNext(Iter<TFile, FileReader<Fasta, TFile2, TSpec> > & it);       	// "projects/library/seqan/file/file_format_fasta.h"(103)
+template <typename TFile> void goNext(TFile & file, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(447)
+template <typename TFile> void goNext(TFile & file, Raw);       	// "projects/library/seqan/file/file_format_raw.h"(220)
+template <typename TContainer> inline void goNext(Iter<TContainer, FileReaderIterator> & it);       	// "projects/library/seqan/file/file_filereader.h"(669)
+template <typename TFile, typename TData, typename TMeta, typename TFormat> inline void goNext(TFile & file, FileFormat<TFile, TData, TMeta, TFormat> const & file_format);       	// "projects/library/seqan/file/file_format.h"(268)
+template <typename TFile, typename TFile2, typename TSpec> inline void goNext(Iter<TFile, FileReader<Genbank, TFile2, TSpec> > & it);       	// "projects/library/seqan/file/file_format_genbank.h"(146)
+template <typename TFile> inline void goNext(TFile & file, Genbank);       	// "projects/library/seqan/file/file_format_genbank.h"(276)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename TContainer> inline void goPrevious(Iter<TContainer, FileReaderIterator> & it);       	// "projects/library/seqan/file/file_filereader.h"(701)
+
+//____________________________________________________________________________
+// guessFileFormat
+
+template <typename TFile, typename TData, typename TMeta> inline FileFormat<TFile, TData, TMeta, void> guessFileFormat(TFile & file, TData & data);       	// "projects/library/seqan/file/file_format_guess.h"(65)
+
+//____________________________________________________________________________
+// id
+
+template <typename TValue, typename TConfig > inline void const * id(String<TValue, External<TConfig> > const &me);       	// "projects/library/seqan/file/string_external.h"(2075)
+template <typename TValue, typename TFormat, typename TFile, typename TSpec> inline void const * id(String<TValue, FileReader<TFormat, TFile, TSpec> > const & me);       	// "projects/library/seqan/file/file_filereader.h"(324)
+
+//____________________________________________________________________________
+// iter
+
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPosition, typename TIteratorSpec> inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> >, TIteratorSpec >::Type iter(String<TValue, FileReader<TFormat, TFile, TSpec> > & me, TPosition pos, Tag<TIteratorSpec> const);       	// "projects/library/seqan/file/file_filereader.h"(404)
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPosition, typename TIteratorSpec> inline typename Iterator< String<TValue, FileReader<TFormat, TFile, TSpec> > const, TIteratorSpec >::Type iter(String<TValue, FileReader<TFormat, TFile, TSpec> > const & me, TPosition pos, Tag<TIteratorSpec> const);       	// "projects/library/seqan/file/file_filereader.h"(413)
+
+//____________________________________________________________________________
+// length
+
+template <typename TValue, typename TConfig > inline typename Size< String<TValue, External<TConfig> > >::Type length(String<TValue, External<TConfig> > const &me);       	// "projects/library/seqan/file/string_external.h"(1793)
+template <typename TValue, typename TFormat, typename TFile, typename TSpec> inline typename Size< String<TValue, FileReader<TFormat, TFile, TSpec> > >::Type length(String<TValue, FileReader<TFormat, TFile, TSpec> > & me);       	// "projects/library/seqan/file/file_filereader.h"(351)
+template <__int64 FILE_SIZE, typename TFile > inline unsigned length(File< Chained<FILE_SIZE, TFile> > const &me);       	// "projects/library/seqan/file/file_array.h"(296)
+template <unsigned FileCount_, typename TFile > inline unsigned length(File< Striped<FileCount_, TFile> > const & );       	// "projects/library/seqan/file/file_array.h"(301)
+template <typename TFile, typename TData, typename TMeta, typename TFormat> inline void length(TFile & file, FileFormat<TFile, TData, TMeta, TFormat> const & file_format);       	// "projects/library/seqan/file/file_format.h"(285)
+template <typename THost> inline typename Size<THost>::Type length(ChunkCollector_<THost> const & me);       	// "projects/library/seqan/file/chunk_collector.h"(111)
+template <typename TValue > inline typename Size<SimpleBuffer<TValue> >::Type length(SimpleBuffer<TValue> const &me);       	// "projects/library/seqan/file/file_page.h"(116)
+template <typename TValue, typename TFile, unsigned PageSize_ > inline typename Size<PageFrame<TValue, TFile, Fixed<PageSize_> > >::Type length(PageFrame<TValue, TFile, Fixed<PageSize_> > const & );       	// "projects/library/seqan/file/file_page.h"(339)
+template <typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS > inline typename Size< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> >::Type length(PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const &pageCont);       	// "projects/library/seqan/file/file_page.h"(922)
+
+//____________________________________________________________________________
+// mmapAdvise
+
+template <typename TValue, typename TConfig, typename TScheme, typename TBeginPos, typename TEndPos > inline int mmapAdvise(String<TValue, MMap<TConfig> > & , TScheme const & , TBeginPos const &, TEndPos const &);       	// "projects/library/seqan/file/string_mmap.h"(349)
+template <typename TValue, typename TConfig, typename TScheme, typename TBeginPos, typename TEndPos > inline int mmapAdvise(String<TValue, MMap<TConfig> > &me, TScheme const & scheme, TBeginPos const & beginPos, TEndPos const & endPos);       	// "projects/library/seqan/file/string_mmap.h"(521)
+template <typename TValue, typename TConfig, typename TScheme > inline int mmapAdvise(String<TValue, MMap<TConfig> > &me, TScheme scheme);       	// "projects/library/seqan/file/string_mmap.h"(672)
+
+//____________________________________________________________________________
+// open
+
+template <typename TValue, typename TConfig > inline bool open(String<TValue, MMap<TConfig> > &me, const char *fileName, int openMode);       	// "projects/library/seqan/file/string_mmap.h"(709)
+template <typename TValue, typename TConfig > inline bool open(String<TValue, MMap<TConfig> > &me, const char *fileName);       	// "projects/library/seqan/file/string_mmap.h"(725)
+template <typename TValue, typename TConfig > inline bool open(String<TValue, MMap<TConfig> > &me, typename TConfig::TFile file);       	// "projects/library/seqan/file/string_mmap.h"(733)
+template <typename TValue, typename TConfig > inline bool open(String<TValue, External<TConfig> > &me, const char *fileName, int openMode);       	// "projects/library/seqan/file/string_external.h"(1663)
+template <typename TValue, typename TConfig > inline bool open(String<TValue, External<TConfig> > &me, const char *fileName);       	// "projects/library/seqan/file/string_external.h"(1686)
+template <typename TValue, typename TConfig > inline bool open(String<TValue, External<TConfig> > &me, typename TConfig::TFile file);       	// "projects/library/seqan/file/string_external.h"(1696)
+inline bool open(FILE* &me, const char *fileName, int openMode);       	// "projects/library/seqan/file/file_cstyle.h"(105)
+inline bool open(FILE* &me, const char *fileName);       	// "projects/library/seqan/file/file_cstyle.h"(112)
+template <typename TSpec > inline bool open(File<TSpec> &me, const char *fileName, int openMode);       	// "projects/library/seqan/file/file_base.h"(236)
+template <typename TSpec > inline bool open(File<TSpec> &me, const char *fileName);       	// "projects/library/seqan/file/file_base.h"(242)
+template <__int64 FILE_SIZE, typename TFile > inline bool open(File< Chained<FILE_SIZE, TFile> > &me, const char *fileName, int openMode);       	// "projects/library/seqan/file/file_array.h"(306)
+
+//____________________________________________________________________________
+// openTemp
+
+template <typename TValue, typename TConfig > inline bool openTemp(String<TValue, MMap<TConfig> > &me);       	// "projects/library/seqan/file/string_mmap.h"(753)
+template <typename TValue, typename TConfig > inline bool openTemp(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1728)
+inline bool openTemp(FILE* &me);       	// "projects/library/seqan/file/file_cstyle.h"(118)
+template <typename TSpec > inline bool openTemp(File<TSpec> &me);       	// "projects/library/seqan/file/file_base.h"(261)
+template <typename TSpec > inline bool openTemp(File<TSpec> &me, int openMode);       	// "projects/library/seqan/file/file_base.h"(267)
+template <__int64 FILE_SIZE, typename TFile > inline bool openTemp(File< Chained<FILE_SIZE, TFile> > &me, int openMode);       	// "projects/library/seqan/file/file_array.h"(315)
+template <unsigned FileCount_, typename TFile > inline bool openTemp(File< Striped<FileCount_, TFile> > &me, int openMode);       	// "projects/library/seqan/file/file_array.h"(322)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TContainer> inline bool operator!= (Iter<TContainer, FileReaderIterator> const & left, Iter<TContainer, FileReaderIterator> const & right);       	// "projects/library/seqan/file/file_filereader.h"(815)
+template <typename TFileLeft, typename TDataLeft, typename TMetaLeft, typename TFormatLeft, typename TFileRight, typename TDataRight, typename TMetaRight, typename TFormatRight> inline bool operator!= (FileFormat<TFileLeft, TDataLeft, TMetaLeft, TFormatLeft> const & left, FileFormat<TFileRight, TDataRight, TMetaRight, TFormatRight> const & right);       	// "projects/library/seqan/file/file_format.h"(367)
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TFormat2> inline bool operator!= (FileFormat<TFile, TData, TMeta, TFormat> const & left, Tag<TFormat2> const);       	// "projects/library/seqan/file/file_format.h"(376)
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TFormat2> inline bool operator!= (Tag<TFormat2> const, FileFormat<TFile, TData, TMeta, TFormat> const & right);       	// "projects/library/seqan/file/file_format.h"(385)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, FileReaderIterator> operator+ (Iter<TContainer, FileReaderIterator> const & left, TIntegral right);       	// "projects/library/seqan/file/file_filereader.h"(872)
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, FileReaderIterator> operator+ (TIntegral left, Iter<TContainer, FileReaderIterator> const & right);       	// "projects/library/seqan/file/file_filereader.h"(880)
+
+//____________________________________________________________________________
+// operator+=
+
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, FileReaderIterator> & operator+= (Iter<TContainer, FileReaderIterator> & left, TIntegral right);       	// "projects/library/seqan/file/file_filereader.h"(893)
+
+//____________________________________________________________________________
+// operator-
+
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, FileReaderIterator> operator- (Iter<TContainer, FileReaderIterator> const & left, TIntegral right);       	// "projects/library/seqan/file/file_filereader.h"(911)
+template <typename TContainer> inline typename Difference<Iter<TContainer, FileReaderIterator> >::Type operator- (Iter<TContainer, FileReaderIterator> const & left, Iter<TContainer, FileReaderIterator> const & right);       	// "projects/library/seqan/file/file_filereader.h"(922)
+
+//____________________________________________________________________________
+// operator-=
+
+template <typename TContainer, typename TIntegral> inline Iter<TContainer, FileReaderIterator> & operator-= (Iter<TContainer, FileReaderIterator> & left, TIntegral right);       	// "projects/library/seqan/file/file_filereader.h"(935)
+
+//____________________________________________________________________________
+// operator<
+
+template <typename TContainer> inline bool operator< (Iter<TContainer, FileReaderIterator> const & left, Iter<TContainer, FileReaderIterator> const & right);       	// "projects/library/seqan/file/file_filereader.h"(828)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TValue > ::std::ostream& operator<<(::std::ostream &out, const PageBucketExtended<TValue> &pb);       	// "projects/library/seqan/file/file_page.h"(181)
+template <typename TValue, typename TFile, typename TSpec > ::std::ostream& operator<<(::std::ostream &out, const PageFrame<TValue, TFile, TSpec > &pf);       	// "projects/library/seqan/file/file_page.h"(358)
+
+//____________________________________________________________________________
+// operator<=
+
+template <typename TContainer> inline bool operator<= (Iter<TContainer, FileReaderIterator> const & left, Iter<TContainer, FileReaderIterator> const & right);       	// "projects/library/seqan/file/file_filereader.h"(850)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TContainer> inline bool operator== (Iter<TContainer, FileReaderIterator> const & left, Iter<TContainer, FileReaderIterator> const & right);       	// "projects/library/seqan/file/file_filereader.h"(802)
+template <typename TFileLeft, typename TDataLeft, typename TMetaLeft, typename TFormatLeft, typename TFileRight, typename TDataRight, typename TMetaRight, typename TFormatRight> inline bool operator== (FileFormat<TFileLeft, TDataLeft, TMetaLeft, TFormatLeft> const & left, FileFormat<TFileRight, TDataRight, TMetaRight, TFormatRight> const & right);       	// "projects/library/seqan/file/file_format.h"(338)
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TFormat2> inline bool operator== (FileFormat<TFile, TData, TMeta, TFormat> const & left, Tag<TFormat2> const);       	// "projects/library/seqan/file/file_format.h"(347)
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TFormat2> inline bool operator== (Tag<TFormat2> const, FileFormat<TFile, TData, TMeta, TFormat> const & right);       	// "projects/library/seqan/file/file_format.h"(356)
+
+//____________________________________________________________________________
+// operator>
+
+template <typename TContainer> inline bool operator> (Iter<TContainer, FileReaderIterator> const & left, Iter<TContainer, FileReaderIterator> const & right);       	// "projects/library/seqan/file/file_filereader.h"(837)
+
+//____________________________________________________________________________
+// operator>=
+
+template <typename TContainer> inline bool operator>= (Iter<TContainer, FileReaderIterator> const & left, Iter<TContainer, FileReaderIterator> const & right);       	// "projects/library/seqan/file/file_filereader.h"(859)
+
+//____________________________________________________________________________
+// pageSize
+
+template <typename TValue > inline typename Size<SimpleBuffer<TValue> >::Type pageSize(SimpleBuffer<TValue> &me);       	// "projects/library/seqan/file/file_page.h"(99)
+template <typename TValue, typename TFile, unsigned PageSize_ > inline typename Size<PageFrame<TValue, TFile, Fixed<PageSize_> > >::Type pageSize(PageFrame<TValue, TFile, Fixed<PageSize_> > & );       	// "projects/library/seqan/file/file_page.h"(345)
+
+//____________________________________________________________________________
+// pop_back
+
+template <typename TValue, typename TConfig > inline void pop_back(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1922)
+
+//____________________________________________________________________________
+// position
+
+template <typename TContainer> inline typename Position<Iter<TContainer, FileReaderIterator> >::Type position(Iter<TContainer, FileReaderIterator> const & it);       	// "projects/library/seqan/file/file_filereader.h"(611)
+
+//____________________________________________________________________________
+// push
+
+template <typename TValue, typename TConfig > inline void push(String<TValue, External<TConfig> > &me, TValue const &Val_);       	// "projects/library/seqan/file/string_external.h"(1909)
+
+//____________________________________________________________________________
+// push_back
+
+template <typename TValue, typename TConfig > inline void push_back(String<TValue, External<TConfig> > &me, TValue const &Val_);       	// "projects/library/seqan/file/string_external.h"(1916)
+
+//____________________________________________________________________________
+// read
+
+template <typename TFile, typename TData> inline void read(TFile & file, TData & data, Embl);       	// "projects/library/seqan/file/file_format_embl.h"(174)
+template <typename TFile, typename TData, typename TSize> inline void read(TFile & file, TData & data, TSize limit, Embl);       	// "projects/library/seqan/file/file_format_embl.h"(192)
+template <typename TFile, typename TData, typename TSize> void read(TFile & file, TData & data, TSize limit, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(213)
+template <typename TFile, typename TData> void read(TFile & file, TData & data, Fasta tag);       	// "projects/library/seqan/file/file_format_fasta.h"(310)
+template <typename TFile, typename TData> void read(TFile & file, TData & data, Raw);       	// "projects/library/seqan/file/file_format_raw.h"(164)
+template <typename TFile, typename TData, typename TSize> void read(TFile & file, TData & data, TSize limit, Raw);       	// "projects/library/seqan/file/file_format_raw.h"(177)
+template <typename TFile, typename TData> void read(TFile & file, TData & data);       	// "projects/library/seqan/file/file_format_raw.h"(281)
+template <typename TFile, typename TData, typename TSize> void read(TFile & file, TData & data, TSize limit);       	// "projects/library/seqan/file/file_format_raw.h"(290)
+template <typename TValue, typename TSize > inline bool read(FILE* me, TValue *memPtr, TSize const count);       	// "projects/library/seqan/file/file_cstyle.h"(159)
+template <typename TSpec, typename TValue, typename TSize > inline bool read(File<TSpec> & me, TValue *memPtr, TSize const count);       	// "projects/library/seqan/file/file_base.h"(319)
+template <typename TFile, typename TData, typename TMeta, typename TFormat> inline void read(TFile & file, TData & data, FileFormat<TFile, TData, TMeta, TFormat> const & file_format);       	// "projects/library/seqan/file/file_format.h"(215)
+template <typename TFile, typename TData, typename TMeta, typename TFormat, typename TSize> inline void read(TFile & file, TData & data, TSize limit, FileFormat<TFile, TData, TMeta, TFormat> const & file_format);       	// "projects/library/seqan/file/file_format.h"(226)
+template <typename TFile, typename TData> inline void read(TFile & file, TData & data, Genbank);       	// "projects/library/seqan/file/file_format_genbank.h"(192)
+template <typename TFile, typename TData, typename TSize> inline void read(TFile & file, TData & data, TSize limit, Genbank);       	// "projects/library/seqan/file/file_format_genbank.h"(210)
+
+//____________________________________________________________________________
+// readAt
+
+template <typename TValue, typename TSize, typename TPos > inline bool readAt(FILE* me, TValue *memPtr, TSize const count, TPos const fileOfs);       	// "projects/library/seqan/file/file_cstyle.h"(181)
+template <typename TFile, typename TValue, typename TSize, typename TPos > inline bool readAt(TFile & me, TValue *memPtr, TSize const count, TPos const fileOfs);       	// "projects/library/seqan/file/file_base.h"(359)
+template <__int64 FILE_SIZE, typename TFile, typename TValue, typename TSize, typename TOffset > inline bool readAt(File< Chained<FILE_SIZE, TFile> > &me, TValue *memPtr, TSize count, TOffset offset);       	// "projects/library/seqan/file/file_array.h"(376)
+
+//____________________________________________________________________________
+// readBucket
+
+template <typename TValue, unsigned FILE_COUNT, typename TFile > inline unsigned readBucket( PageBucket<TValue> &b, int pageNo, unsigned pageSize, unsigned dataSize, File< Striped<FILE_COUNT, TFile> > &file);       	// "projects/library/seqan/file/file_page_raid0.h"(146)
+template <typename TValue, typename TFile > inline unsigned readBucket(PageBucket<TValue> &b, int pageNo, unsigned pageSize, unsigned dataSize, TFile &file);       	// "projects/library/seqan/file/file_page.h"(524)
+
+//____________________________________________________________________________
+// readFeature
+
+template <typename TData, typename TKey, typename TString> inline typename Position<TString>::Type readFeature(TString & str, typename Position<TString>::Type start_pos, TData & data, TKey key, Embl);       	// "projects/library/seqan/file/file_format_embl.h"(395)
+
+//____________________________________________________________________________
+// readID
+
+template <typename TFile, typename TString> void readID(TFile & file, TString & id, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(328)
+template <typename TFile, typename TString> void readID(TFile & , TString & id, Raw);       	// "projects/library/seqan/file/file_format_raw.h"(192)
+
+//____________________________________________________________________________
+// readLastPage
+
+template <typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec, typename TSize > inline bool readLastPage( int pageNo, PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, TSpec> &pf, File< Striped<FILE_COUNT, TFile> > &file, TSize size);       	// "projects/library/seqan/file/file_page_raid0.h"(96)
+template <typename TValue, typename TFile, typename TSpec, typename TSize> inline bool readLastPage(int pageNo, PageFrame<TValue, TFile, TSpec> &pf, TFile &file, TSize size);       	// "projects/library/seqan/file/file_page.h"(440)
+
+//____________________________________________________________________________
+// readLineType
+
+template <typename TFile, typename TData, typename TKey> inline void readLineType(TFile & file, TData & data, TKey key, Embl);       	// "projects/library/seqan/file/file_format_embl.h"(270)
+template <typename TData, typename TValue, typename TSpec, typename TKey> inline void readLineType(String<TValue,TSpec> & meta, TData & data, TKey key, Embl);       	// "projects/library/seqan/file/file_format_embl.h"(327)
+
+//____________________________________________________________________________
+// readMeta
+
+template <typename TFile, typename TMeta> inline void readMeta(TFile & file, TMeta & meta, Embl);       	// "projects/library/seqan/file/file_format_embl.h"(215)
+template <typename TFile, typename TMeta> void readMeta(TFile & file, TMeta & meta, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(433)
+template <typename TFile, typename TMeta> void readMeta(TFile & , TMeta & meta, Raw);       	// "projects/library/seqan/file/file_format_raw.h"(206)
+template <typename TFile, typename TData, typename TMeta, typename TFormat> inline void readMeta(TFile & file, TMeta & meta, FileFormat<TFile, TData, TMeta, TFormat> const & file_format);       	// "projects/library/seqan/file/file_format.h"(251)
+template <typename TFile, typename TMeta> inline void readMeta(TFile & file, TMeta & meta, Genbank);       	// "projects/library/seqan/file/file_format_genbank.h"(234)
+
+//____________________________________________________________________________
+// readPage
+
+template <typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec > inline bool readPage( int pageNo, PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, TSpec> &pf, File< Striped<FILE_COUNT, TFile> > &file);       	// "projects/library/seqan/file/file_page_raid0.h"(52)
+template <typename TValue, typename TFile, typename TSpec > inline bool readPage(int pageNo, PageFrame<TValue, TFile, TSpec> &pf, TFile &file);       	// "projects/library/seqan/file/file_page.h"(413)
+template <typename TValue, typename TFile, typename TSpec > inline bool readPage(PageFrame<TValue, TFile, Dynamic<TSpec> > &pf, TFile &file);       	// "projects/library/seqan/file/file_page.h"(506)
+
+//____________________________________________________________________________
+// readShortID
+
+template <typename TFile, typename TString> void readShortID(TFile & file, TString & id, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(375)
+
+//____________________________________________________________________________
+// release
+
+template <typename AsyncRequest > inline void release(FILE*, AsyncRequest &);       	// "projects/library/seqan/file/file_cstyle.h"(233)
+template <typename TSpec, typename AsyncRequest > inline void release(File<TSpec> &, AsyncRequest &);       	// "projects/library/seqan/file/file_base.h"(717)
+
+//____________________________________________________________________________
+// reopen
+
+template <typename File > inline void reopen(File &, int);       	// "projects/library/seqan/file/file_base.h"(273)
+
+//____________________________________________________________________________
+// replace
+
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand> inline void replace(String<TTargetValue, TTargetSpec> & target, typename Size< String<TTargetValue, TTargetSpec> >::Type pos_begin, typename Size< String<TTargetValue, TTargetSpec> >::Type pos_end, ChunkCollector_<TSourceHost> const & source, Tag<TExpand> const );       	// "projects/library/seqan/file/chunk_collector.h"(485)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceHost, typename TExpand> inline void replace(String<TTargetValue, TTargetSpec> & target, typename Size< String<TTargetValue, TTargetSpec> >::Type pos_begin, typename Size< String<TTargetValue, TTargetSpec> >::Type pos_end, ChunkCollector_<TSourceHost> const & source, typename Size< String<TTargetValue, TTargetSpec> >::Type limit, Tag<TExpand> const );       	// "projects/library/seqan/file/chunk_collector.h"(497)
+template <typename TTargetValue, typename TSourceHost, typename TExpand> inline void replace(TTargetValue * target, size_t pos_begin, size_t pos_end, ChunkCollector_<TSourceHost> const & source, Tag<TExpand> const );       	// "projects/library/seqan/file/chunk_collector.h"(510)
+template <typename TTargetValue, typename TSourceHost, typename TExpand> inline void replace(TTargetValue * target, size_t pos_begin, size_t pos_end, ChunkCollector_<TSourceHost> const & source, size_t limit, Tag<TExpand> const );       	// "projects/library/seqan/file/chunk_collector.h"(522)
+
+//____________________________________________________________________________
+// reserve
+
+template <typename TValue, typename TConfig, typename TSize, typename TExpand > inline typename Size< String<TValue, External<TConfig> > >::Type reserve( String<TValue, External<TConfig> > &me, TSize new_capacity, Tag<TExpand> const expand);       	// "projects/library/seqan/file/string_external.h"(1839)
+template <typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS, typename TExpand > inline void reserve( PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> &pageCont, unsigned Count_, Tag<TExpand> const expand);       	// "projects/library/seqan/file/file_page.h"(899)
+
+//____________________________________________________________________________
+// resize
+
+template <typename TValue, typename TConfig, typename TNewSize, typename TExpand > inline typename Size< String<TValue, External<TConfig> > >::Type resize( String<TValue, External<TConfig> > &me, TNewSize new_length, Tag<TExpand> const expand);       	// "projects/library/seqan/file/string_external.h"(1812)
+template <typename TSize > inline void resize(FILE* me, TSize new_length);       	// "projects/library/seqan/file/file_cstyle.h"(218)
+template <typename TSpec, typename TSize > inline void resize(File<TSpec> &me, TSize new_length);       	// "projects/library/seqan/file/file_base.h"(491)
+template <__int64 FILE_SIZE, typename TFile, typename TSize > inline void resize(File< Chained<FILE_SIZE, TFile> > &me, TSize new_length);       	// "projects/library/seqan/file/file_array.h"(347)
+template <typename TValue, typename TSize > inline void resize(SimpleBuffer<TValue> &me, TSize size);       	// "projects/library/seqan/file/file_page.h"(121)
+template <typename TValue, typename TFile, typename TSpec, typename TSize > inline void resize(PageFrame<TValue, TFile, Dynamic<TSpec> > &me, TSize size);       	// "projects/library/seqan/file/file_page.h"(327)
+template <typename TValue, typename TFile, unsigned PageSize_, typename TSize > inline void resize(PageFrame<TValue, TFile, Fixed<PageSize_> > & , TSize );       	// "projects/library/seqan/file/file_page.h"(350)
+template <typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS > inline void resize( PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> &pageCont, unsigned Count_);       	// "projects/library/seqan/file/file_page.h"(907)
+
+//____________________________________________________________________________
+// rewind
+
+template <typename File > inline void rewind(File &me);       	// "projects/library/seqan/file/file_base.h"(455)
+
+//____________________________________________________________________________
+// save
+
+template <typename TValue, typename TConfig > inline bool save(String<TValue, MMap<TConfig> > const & , const char * , int );       	// "projects/library/seqan/file/string_mmap.h"(778)
+template <typename TValue, typename TConfig > inline bool save(String<TValue, MMap<TConfig> > const & , const char * );       	// "projects/library/seqan/file/string_mmap.h"(786)
+template <typename TValue, typename TConfig > inline bool save(String<TValue, MMap<TConfig> > const & , typename TConfig::TFile );       	// "projects/library/seqan/file/string_mmap.h"(794)
+template <typename TValue, typename TConfig > inline bool save(String<TValue, External<TConfig> > const & , const char * , int );       	// "projects/library/seqan/file/string_external.h"(1739)
+template <typename TValue, typename TConfig > inline bool save(String<TValue, External<TConfig> > const & , const char * );       	// "projects/library/seqan/file/string_external.h"(1747)
+template <typename TValue, typename TConfig > inline bool save(String<TValue, External<TConfig> > const & , typename TConfig::TFile );       	// "projects/library/seqan/file/string_external.h"(1755)
+
+//____________________________________________________________________________
+// sectorSize
+
+inline unsigned sectorSize(FILE* const &);       	// "projects/library/seqan/file/file_cstyle.h"(132)
+template <typename TSpec > inline unsigned sectorSize(File<TSpec> const & );       	// "projects/library/seqan/file/file_base.h"(295)
+
+//____________________________________________________________________________
+// seek
+
+template <typename TPos > inline Size<FILE*>::Type seek(FILE* me, TPos const fileOfs, int origin);       	// "projects/library/seqan/file/file_cstyle.h"(139)
+template <typename TPos > inline Size<FILE*>::Type seek(FILE* me, TPos const fileOfs);       	// "projects/library/seqan/file/file_cstyle.h"(146)
+template <typename TSpec, typename TPos > inline typename Position< File<TSpec> >::Type seek(File<TSpec> &me, TPos const fileOfs, int origin);       	// "projects/library/seqan/file/file_base.h"(409)
+template <typename TSpec, typename TPos > inline typename Position< File<TSpec> >::Type seek(File<TSpec> &me, TPos const fileOfs);       	// "projects/library/seqan/file/file_base.h"(422)
+
+//____________________________________________________________________________
+// setEof
+
+template <typename TSpec > inline bool setEof(File<TSpec> & );       	// "projects/library/seqan/file/file_base.h"(510)
+
+//____________________________________________________________________________
+// setPageSize
+
+template <typename TValue, typename TSize > inline void setPageSize(SimpleBuffer<TValue> &me, TSize size);       	// "projects/library/seqan/file/file_page.h"(104)
+
+//____________________________________________________________________________
+// setPosition
+
+template <typename TContainer, typename TPos> inline void setPosition(Iter<TContainer, FileReaderIterator> & it, TPos pos);       	// "projects/library/seqan/file/file_filereader.h"(636)
+
+//____________________________________________________________________________
+// size
+
+inline Size<FILE*>::Type size(FILE* me);       	// "projects/library/seqan/file/file_cstyle.h"(206)
+template <typename TSpec > inline typename Size<File<TSpec> >::Type size(File<TSpec> &me);       	// "projects/library/seqan/file/file_base.h"(472)
+template <__int64 FILE_SIZE, typename TFile > __int64 size(File< Chained<FILE_SIZE, TFile> > &me);       	// "projects/library/seqan/file/file_array.h"(337)
+template <unsigned FileCount_, typename TFile > __int64 size(File< Striped<FileCount_, TFile> > &me);       	// "projects/library/seqan/file/file_array.h"(342)
+template <typename TValue > inline typename Size<SimpleBuffer<TValue> >::Type size(SimpleBuffer<TValue> const &me);       	// "projects/library/seqan/file/file_page.h"(110)
+template <typename TValue, typename TFile, unsigned PageSize_ > inline typename Size<PageFrame<TValue, TFile, Fixed<PageSize_> > >::Type size(PageFrame<TValue, TFile, Fixed<PageSize_> > & );       	// "projects/library/seqan/file/file_page.h"(333)
+
+//____________________________________________________________________________
+// tell
+
+inline Size<FILE*>::Type tell(FILE* me);       	// "projects/library/seqan/file/file_cstyle.h"(152)
+template <typename TSpec > inline typename Position< File<TSpec> >::Type tell(File<TSpec> &me);       	// "projects/library/seqan/file/file_base.h"(438)
+
+//____________________________________________________________________________
+// value
+
+template <typename TValue, typename TConfig, typename TPos > inline typename Reference<String<TValue, External<TConfig> > >::Type value(String<TValue, External<TConfig> > &me, TPos pos);       	// "projects/library/seqan/file/string_external.h"(1881)
+template <typename TValue, typename TConfig, typename TPos > inline typename Reference<String<TValue, External<TConfig> > const>::Type value(String<TValue, External<TConfig> > const &me, TPos pos);       	// "projects/library/seqan/file/string_external.h"(1888)
+template <typename TValue, typename TFormat, typename TFile, typename TSpec, typename TPos> inline TValue value(String<TValue, FileReader<TFormat, TFile, TSpec> > & me, TPos pos);       	// "projects/library/seqan/file/file_filereader.h"(335)
+template <typename TContainer> inline typename Reference<Iter<TContainer, FileReaderIterator> >::Type value(Iter<TContainer, FileReaderIterator> & it);       	// "projects/library/seqan/file/file_filereader.h"(581)
+template <typename TContainer> inline typename Reference<Iter<TContainer, FileReaderIterator> >::Type value(Iter<TContainer, FileReaderIterator> const & it);       	// "projects/library/seqan/file/file_filereader.h"(587)
+
+//____________________________________________________________________________
+// waitFor
+
+inline bool waitFor(AsyncDummyRequest &);       	// "projects/library/seqan/file/file_base.h"(704)
+template <typename TTime > inline bool waitFor(AsyncDummyRequest &, TTime);       	// "projects/library/seqan/file/file_base.h"(710)
+template <typename TValue, typename TFile, typename TSpec > inline bool waitFor(PageFrame<TValue, TFile, TSpec> &pf);       	// "projects/library/seqan/file/file_page.h"(468)
+template <typename TValue, typename TFile, typename TSpec, typename TTime > inline bool waitFor(PageFrame<TValue, TFile, TSpec> &pf, TTime timeOut);       	// "projects/library/seqan/file/file_page.h"(480)
+
+//____________________________________________________________________________
+// waitForAll
+
+template <typename TValue, typename TConfig > inline void waitForAll(String<TValue, MMap<TConfig> > &);       	// "projects/library/seqan/file/string_mmap.h"(335)
+template <typename TValue, typename TConfig > inline void waitForAll(String<TValue, External<TConfig> > &me);       	// "projects/library/seqan/file/string_external.h"(1538)
+
+//____________________________________________________________________________
+// write
+
+template <typename TFile, typename TSource, typename TSpec> void write(TFile & file, Align<TSource, TSpec>& align, CGViz);       	// "projects/library/seqan/file/file_format_cgviz.h"(204)
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec> void write(TFile & file, Align<TSource, TSpec> & align, TStringContainer& ids, CGViz);       	// "projects/library/seqan/file/file_format_cgviz.h"(212)
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec> void write(TFile & file, Align<TSource, TSpec>* align, TStringContainer & ids, CGViz);       	// "projects/library/seqan/file/file_format_cgviz.h"(220)
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec, typename TMeta> void write(TFile & file, Align<TSource, TSpec> & align, TStringContainer& ids, TMeta &, CGViz);       	// "projects/library/seqan/file/file_format_cgviz.h"(228)
+template <typename TFile, typename TData> inline void write(TFile & file, TData & data, Embl);       	// "projects/library/seqan/file/file_format_embl.h"(488)
+template <typename TFile, typename TData, typename TMeta> inline void write(TFile & file, TData & data, TMeta & meta, Embl);       	// "projects/library/seqan/file/file_format_embl.h"(554)
+template <typename TFile, typename TString, typename TData, typename TMeta> void write(TFile & file, TData & data, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(535)
+template <typename TFile, typename TString, typename TData> void write(TFile & file, TData & data, TString & id, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(548)
+template <typename TFile, typename TString, typename TDataValue> void write(TFile & file, TDataValue * data, TString & id, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(561)
+template <typename TFile, typename TString, typename TData, typename TMeta> void write(TFile & file, TData & data, TString & id, TMeta &, Fasta);       	// "projects/library/seqan/file/file_format_fasta.h"(576)
+template <typename TFile, typename TData> void write(TFile & file, TData const & data, Raw);       	// "projects/library/seqan/file/file_format_raw.h"(240)
+template <typename TFile, typename TData, typename TString> void write(TFile & file, TData const & data, TString const &, Raw);       	// "projects/library/seqan/file/file_format_raw.h"(253)
+template <typename TFile, typename TString, typename TData, typename TMeta> void write(TFile & file, TData const & data, TString const &, TMeta const &, Raw);       	// "projects/library/seqan/file/file_format_raw.h"(267)
+template <typename TFile, typename TData> void write(TFile & file, TData & data);       	// "projects/library/seqan/file/file_format_raw.h"(301)
+template <typename TFile, typename TData> void write(TFile & file, TData const & data);       	// "projects/library/seqan/file/file_format_raw.h"(309)
+template <typename TValue, typename TSize > inline bool write(FILE* me, TValue const *memPtr, TSize const count);       	// "projects/library/seqan/file/file_cstyle.h"(170)
+template <typename TSpec, typename TValue, typename TSize > inline bool write(File<TSpec> & me, TValue const *memPtr, TSize const count);       	// "projects/library/seqan/file/file_base.h"(339)
+template <typename TFile, typename TData, typename TMeta, typename TFormat> inline void write(TFile & file, TData & data, FileFormat<TFile, TData, TMeta, TFormat> const & file_format);       	// "projects/library/seqan/file/file_format.h"(312)
+template <typename TFile, typename TData, typename TMeta, typename TFormat> inline void write(TFile & file, TData & data, TMeta & meta, FileFormat<TFile, TData, TMeta, TFormat> const & file_format);       	// "projects/library/seqan/file/file_format.h"(322)
+template <typename TFile, typename TData> inline void write(TFile & file, TData & data, Genbank);       	// "projects/library/seqan/file/file_format_genbank.h"(314)
+template <typename TFile, typename TData, typename TMeta> inline void write(TFile & file, TData & data, TMeta & meta, Genbank);       	// "projects/library/seqan/file/file_format_genbank.h"(370)
+
+//____________________________________________________________________________
+// writeAt
+
+template <typename TValue, typename TSize, typename TPos > inline bool writeAt(FILE* me, TValue const *memPtr, TSize const count, TPos const fileOfs);       	// "projects/library/seqan/file/file_cstyle.h"(194)
+template <typename TFile, typename TValue, typename TSize, typename TPos > inline bool writeAt(TFile & me, TValue const *memPtr, TSize const count, TPos const fileOfs);       	// "projects/library/seqan/file/file_base.h"(381)
+template <__int64 FILE_SIZE, typename TFile, typename TValue, typename TSize, typename TOffset > inline bool writeAt(File< Chained<FILE_SIZE, TFile> > &me, TValue const *memPtr, TSize count, TOffset offset);       	// "projects/library/seqan/file/file_array.h"(390)
+
+//____________________________________________________________________________
+// writeBucket
+
+template <typename TValue, unsigned FILE_COUNT, typename TFile > inline bool writeBucket( PageBucket<TValue> &b, int pageNo, unsigned pageSize, File< Striped<FILE_COUNT, TFile> > &file);       	// "projects/library/seqan/file/file_page_raid0.h"(170)
+template <typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec > inline bool writeBucket( PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, Dynamic<TSpec> > &pf, unsigned &pageOfs, File< Striped<FILE_COUNT, TFile> > &file);       	// "projects/library/seqan/file/file_page_raid0.h"(191)
+template <typename TValue, typename TFile > inline bool writeBucket(PageBucket<TValue> &b, int pageNo, unsigned pageSize, TFile &file);       	// "projects/library/seqan/file/file_page.h"(543)
+template <typename TValue, typename TFile, typename TSpec > inline bool writeBucket(PageFrame<TValue, TFile, Dynamic<TSpec> > &pf, unsigned &pageOfs, TFile &file);       	// "projects/library/seqan/file/file_page.h"(560)
+
+//____________________________________________________________________________
+// writeLastPage
+
+template <typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec, typename TSize > inline bool writeLastPage( PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, TSpec> &pf, int pageNo, File< Striped<FILE_COUNT, TFile> > &file, TSize size);       	// "projects/library/seqan/file/file_page_raid0.h"(118)
+template <typename TValue, typename TFile, typename TSpec, typename TSize > inline bool writeLastPage(PageFrame<TValue, TFile, TSpec> &pf, int pageNo, TFile &file, TSize size);       	// "projects/library/seqan/file/file_page.h"(454)
+
+//____________________________________________________________________________
+// writePage
+
+template <typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec > inline bool writePage( PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, TSpec> &pf, int pageNo, File< Striped<FILE_COUNT, TFile> > &file);       	// "projects/library/seqan/file/file_page_raid0.h"(74)
+template <typename TValue, typename TFile, typename TSpec > inline bool writePage(PageFrame<TValue, TFile, TSpec> &pf, int pageNo, TFile &file);       	// "projects/library/seqan/file/file_page.h"(427)
+template <typename TValue, typename TFile, typename TSpec > inline bool writePage(PageFrame<TValue, TFile, Dynamic<TSpec> > &pf, TFile &file);       	// "projects/library/seqan/file/file_page.h"(515)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _fastaAlignScanLine
+
+template <typename TFile, typename TSize> void _fastaAlignScanLine(TFile & file, TSize & count);       	// "projects/library/seqan/file/file_format_fasta_align.h"(74)
+
+//____________________________________________________________________________
+// _writeImpl
+
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec> void _writeImpl(TFile & file, Align<TSource, TSpec> const & align, TStringContainer const & ids, FastaAlign const &);       	// "projects/library/seqan/file/file_format_fasta_align.h"(269)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TFile> void goNext(TFile & file, FastaAlign);       	// "projects/library/seqan/file/file_format_fasta_align.h"(255)
+
+//____________________________________________________________________________
+// read
+
+template <typename TFile, typename TSource, typename TSpec> void read(TFile & file, Align<TSource, TSpec> & align, FastaAlign const &);       	// "projects/library/seqan/file/file_format_fasta_align.h"(94)
+
+//____________________________________________________________________________
+// readIDs
+
+template <typename TFile, typename TStringContainer> void readIDs(TFile& file, TStringContainer& ids, FastaAlign);       	// "projects/library/seqan/file/file_format_fasta_align.h"(200)
+
+//____________________________________________________________________________
+// readMeta
+
+template <typename TFile, typename TMeta> void readMeta(TFile & , TMeta & meta, FastaAlign);       	// "projects/library/seqan/file/file_format_fasta_align.h"(245)
+
+//____________________________________________________________________________
+// write
+
+template <typename TFile, typename TSource, typename TSpec> void write(TFile & file, Align<TSource, TSpec> const & align, FastaAlign const & );       	// "projects/library/seqan/file/file_format_fasta_align.h"(307)
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec> void write(TFile & file, Align<TSource, TSpec> const & align, TStringContainer const & ids, FastaAlign const & );       	// "projects/library/seqan/file/file_format_fasta_align.h"(315)
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec> void write(TFile & file, Align<TSource, TSpec> const * align, TStringContainer const & ids, FastaAlign const & );       	// "projects/library/seqan/file/file_format_fasta_align.h"(324)
+template <typename TFile, typename TStringContainer, typename TSource, typename TSpec, typename TMeta> void write(TFile & file, Align<TSource, TSpec> const & align, TStringContainer const & ids, TMeta &, FastaAlign const & );       	// "projects/library/seqan/file/file_format_fasta_align.h"(332)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/file/file_page.h b/src/SeqAn-1.3/seqan/file/file_page.h
new file mode 100644
index 0000000..a47df98
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_page.h
@@ -0,0 +1,1093 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_PAGE_H
+#define SEQAN_HEADER_FILE_PAGE_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// base class for memory buffers
+
+	template < typename TValue >
+	struct SimpleBuffer 
+	{
+		typedef	typename Size<SimpleBuffer>::Type		TSize;
+		typedef	typename Iterator<SimpleBuffer>::Type	TIterator;
+
+		TIterator	begin;      // the beginning of the buffer
+        TIterator	end;        // end of valid data
+        TSize		pageSize;   // size of allocated memory
+
+        SimpleBuffer():
+            begin(NULL),
+            end(NULL) {}
+
+        SimpleBuffer(TIterator _begin, TIterator _end):
+            begin(_begin),
+            end(_end) {}
+
+        SimpleBuffer(TIterator _begin, TSize _size):
+            begin(_begin),
+            end(_begin + _size) {}
+
+        SimpleBuffer(TSize _pageSize):
+            begin(NULL),
+            end(NULL),
+            pageSize(_pageSize) {}
+
+        inline TValue       & operator[](TSize i)       { return begin[i]; }
+        inline TValue const & operator[](TSize i) const { return begin[i]; }
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// meta-function interface
+
+	template < typename TValue >
+    struct Value< SimpleBuffer<TValue> >	{ typedef TValue Type; };
+
+    template < typename TValue >
+	struct Size< SimpleBuffer<TValue> >		{ typedef size_t Type; };
+
+    template < typename TValue >
+    struct Iterator< SimpleBuffer<TValue>, Standard >		{ typedef TValue *Type; };
+
+    template < typename TValue >
+    struct Iterator< SimpleBuffer<TValue> const, Standard >	{ typedef TValue const *Type; };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// global interface
+
+    template < typename TValue >
+    inline typename Size<SimpleBuffer<TValue> >::Type
+    pageSize(SimpleBuffer<TValue> &me) {
+        return me.pageSize;
+    }
+
+    template < typename TValue, typename TSize >
+    inline void setPageSize(SimpleBuffer<TValue> &me, TSize size) {
+        me.pageSize = size;
+    }
+
+    template < typename TValue >
+    inline typename Size<SimpleBuffer<TValue> >::Type
+    size(SimpleBuffer<TValue> const &me) {
+        return me.end - me.begin;
+    }
+
+    template < typename TValue >
+    inline typename Size<SimpleBuffer<TValue> >::Type
+    length(SimpleBuffer<TValue> const &me) {
+        return me.end - me.begin;
+    }
+
+    template < typename TValue, typename TSize >
+    inline void resize(SimpleBuffer<TValue> &me, TSize size) {
+        me.end = me.begin + size;
+    }
+
+    template < typename TValue, typename TSize, typename T >
+	inline void allocPage(SimpleBuffer<TValue> &pf, TSize size, T const & me) {
+        setPageSize(pf, size);
+        allocate(me, pf.begin, pageSize(pf));
+        resize(pf, size);
+	}
+
+	template < typename TValue, typename T > inline
+	void freePage(SimpleBuffer<TValue> &pf, T const & me) {
+		deallocate(me, pf.begin, pageSize(pf));
+		pf.begin = NULL;
+        resize(pf, 0);
+        setPageSize(pf, 0);
+	}
+
+	template < typename TValue >
+	inline TValue* begin(SimpleBuffer<TValue> &pf, Standard) {
+		return pf.begin;
+	}
+
+	template < typename TValue >
+	inline TValue const * begin(SimpleBuffer<TValue> const &pf, Standard) {
+		return pf.begin;
+	}
+
+	template < typename TValue >
+	inline TValue * end(SimpleBuffer<TValue> &pf, Standard) {
+		return pf.end;
+	}
+
+	template < typename TValue >
+	inline TValue const * end(SimpleBuffer<TValue> const &pf, Standard) {
+		return pf.end;
+	}
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// a bucket is a structure to represent a small window of a page
+    // used by algorithms which need a global view of all pages (merge sort, mapper)
+
+	template < typename TValue >
+    struct PageBucket
+	{
+		typedef	typename Iterator<PageBucket>::Type TIterator;
+
+        unsigned    pageOfs;                // begin of bucket window with relation to page begin
+        TIterator	begin, cur, end;        // begin/end of buckets memory buffer and a pointer
+    };
+
+    template < typename TValue >
+    struct PageBucketExtended : public PageBucket< TValue > {
+		int     	pageNo;		            // related page (needed by merger sort)
+    };
+
+	template < typename TValue >
+    ::std::ostream& operator<<(::std::ostream &out, const PageBucketExtended<TValue> &pb) {
+        for(TValue *cur = pb.begin; cur != pb.end; cur++)
+            out << *cur << " ";
+        return out;
+    }
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// meta-function interface
+
+	template < typename TValue >
+    struct Value< PageBucket<TValue> >		{ typedef TValue Type; };
+
+    template < typename TValue >
+    struct Size< PageBucket<TValue> >		{ typedef size_t Type; };
+
+    template < typename TValue >
+    struct Iterator< PageBucket<TValue>, Standard >			{ typedef TValue *Type; };
+
+    template < typename TValue >
+    struct Iterator< PageBucket<TValue> const, Standard >	{ typedef TValue const *Type; };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TValue, typename TFile, typename TSpec >
+    struct PageFrame;    
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TValue, typename TFile, typename TSpec >
+    struct Value< PageFrame< TValue, TFile, TSpec > > {
+        typedef TValue Type;
+    };
+
+	template < typename TValue, typename TFile, typename TSpec >
+    struct Size< PageFrame< TValue, TFile, TSpec > > {
+        typedef size_t Type;
+    };
+
+	template < typename TValue, typename TFile, typename TSpec >
+    struct Iterator< PageFrame< TValue, TFile, TSpec >, Standard > {
+        typedef TValue *Type;
+    };
+
+	template < typename TValue, typename TFile, typename TSpec >
+    struct Iterator< PageFrame< TValue, TFile, TSpec > const, Standard> {
+        typedef TValue const *Type;
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// page frame of dynamic size
+
+    template < typename TSpec = void >
+    struct Dynamic;
+
+    template < typename TValue, typename TFile >
+	struct PageFrame< TValue, TFile, Dynamic<> >: public SimpleBuffer< TValue >
+	{
+		typedef TFile							File;
+		typedef SimpleBuffer<TValue>	        TBase;
+        typedef typename AsyncRequest<TFile>::Type  AsyncRequest;
+
+        enum Status		{ READY, READING, WRITING };
+
+		bool			dirty;		// data needs to be written to disk before freeing
+		unsigned   		pageNo;		// maps frames to pages (reverse vector mapper)
+        AsyncRequest        request;    // request structure of the async io process
+		Status			status;
+        PageFrame       *next;      // next buffer in a chained list
+
+        PageFrame():
+			TBase(),
+            dirty(false),
+            pageNo(MaxValue<unsigned>::VALUE),
+			status(READY),
+			next(NULL) {}
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// page frame of static size
+
+    template < unsigned PageSize_ >
+    struct Fixed;
+
+    typedef ::std::list<Position<String<void*> >::Type>		PageLRUList;    // least recently usage list
+	typedef PageLRUList::iterator	PageLRUEntry;
+
+    template < typename TValue,
+               typename TFile,
+               unsigned PageSize_ >
+	struct PageFrame<TValue, TFile, Fixed<PageSize_> >
+	{
+		typedef TFile								File;
+        typedef typename AsyncRequest<TFile>::Type		AsyncRequest;
+		typedef	typename Size<PageFrame>::Type		TSize;
+		typedef	typename Iterator<PageFrame>::Type	TIterator;
+
+		enum            { PageSize = PageSize_ };
+		enum Status		{ READY, READING, WRITING };
+		enum DataStatus	{ ON_DISK = -1, UNINITIALIZED = -2 };
+		enum Priority	{ NORMAL_LEVEL = 0, PREFETCH_LEVEL = 1, ITERATOR_LEVEL = 2, PERMANENT_LEVEL = 3 };
+
+		bool			dirty;		// data needs to be written to disk before freeing
+		int     		pageNo;		// maps frames to pages (reverse vector mapper)
+		TIterator		begin;	    // start address of page memory
+        AsyncRequest        request;    // request structure of the async io process
+		Status			status;
+		DataStatus		dataStatus;
+		PageLRUEntry	lruEntry;   // priority based lru
+        Priority        priority;
+
+		PageFrame():
+            dirty(false),
+            pageNo(-1),
+			begin(NULL),
+			status(READY),
+			dataStatus(UNINITIALIZED),
+            priority(NORMAL_LEVEL) {}
+
+		inline TValue       & operator[](TSize i)       { return begin[i]; }
+        inline TValue const & operator[](TSize i) const { return begin[i]; }
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// meta-function interface
+
+	template < typename TValue, typename TFile, unsigned PageSize_ >
+    struct Iterator< PageFrame< TValue, TFile, Fixed<PageSize_> >, Standard >
+    {
+        typedef VolatilePtr<TValue> Type;
+    };
+
+	template < typename TValue, typename TFile, unsigned PageSize_ >
+    struct Iterator< PageFrame< TValue, TFile, Fixed<PageSize_> > const, Standard>
+    {
+        typedef VolatilePtr<TValue> const Type;
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// global interface
+
+	template < typename TValue, typename TFile, typename TSpec, typename TSize >
+    inline void resize(PageFrame<TValue, TFile, Dynamic<TSpec> > &me, TSize size) {
+        me.end = me.begin + size;
+    }
+
+    template < typename TValue, typename TFile, unsigned PageSize_ >
+    inline typename Size<PageFrame<TValue, TFile, Fixed<PageSize_> > >::Type
+    size(PageFrame<TValue, TFile, Fixed<PageSize_> > &/*me*/) {
+        return PageSize_;
+    }
+
+    template < typename TValue, typename TFile, unsigned PageSize_ >
+    inline typename Size<PageFrame<TValue, TFile, Fixed<PageSize_> > >::Type
+    length(PageFrame<TValue, TFile, Fixed<PageSize_> > const &/*me*/) {
+        return PageSize_;
+    }
+
+    template < typename TValue, typename TFile, unsigned PageSize_ >
+    inline typename Size<PageFrame<TValue, TFile, Fixed<PageSize_> > >::Type
+    pageSize(PageFrame<TValue, TFile, Fixed<PageSize_> > &/*me*/) {
+        return PageSize_;
+    }
+
+    template < typename TValue, typename TFile, unsigned PageSize_, typename TSize >
+    inline void resize(PageFrame<TValue, TFile, Fixed<PageSize_> > &/*me*/, TSize /*size*/) {}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// various page frame methods
+
+	template < typename TValue, typename TFile, typename TSpec >
+    ::std::ostream& operator<<(::std::ostream &out, const PageFrame<TValue, TFile, TSpec > &pf) 
+	{
+        out << "PageFrame @ " << pf.pageNo;
+        if (pf.dirty)
+            out << " DIRTY";
+        else
+            out << " CLEAN";
+
+        switch (pf.status) {
+			case PageFrame<TValue, TFile, TSpec >::READY:
+                out << " READY";
+                break;
+			case PageFrame<TValue, TFile, TSpec >::READING:
+                out << " READING";
+                break;
+			case PageFrame<TValue, TFile, TSpec >::WRITING:
+                out << " WRITING";
+        }
+
+        if (pf.dataStatus == pf.ON_DISK)
+            out << " ON_DISK";
+        else
+            out << " UNITIALIZED";
+
+        out << " Prio:" << pf.priority;
+        out << " Buffer:" << (TValue*)pf.begin;
+
+        return out;
+	}
+
+	template < typename TValue, typename TFile, typename TSpec, typename T > inline
+	void allocPage(PageFrame<TValue, TFile, TSpec> &pf, T const & me) 
+	{
+		TValue* tmp = NULL;
+		allocate(me, tmp, pageSize(pf));
+		pf.begin = tmp;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "allocPage: " << ::std::hex << tmp << ::std::dec << ::std::endl;
+		#endif
+	}
+
+	template < typename TValue, typename TFile, typename TSpec, typename T > inline
+	void freePage(PageFrame<TValue, TFile, TSpec> &pf, T const & me) 
+	{
+		#ifdef SEQAN_VVERBOSE
+			if ((TValue*)pf.begin)
+				::std::cerr << "freePage:  " << ::std::hex << (TValue*)pf.begin << ::std::dec << ::std::endl;
+		#endif
+        nukeCopies(pf.begin);
+		deallocate(me, (TValue*)pf.begin, pageSize(pf));
+		pf.begin = NULL;
+        resize(pf, 0);
+	}
+
+	template < typename TValue, typename TFile, typename TSpec > inline
+	bool readPage(int pageNo, PageFrame<TValue, TFile, TSpec> &pf, TFile &file) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "readPage:  " << ::std::hex << (TValue*)pf.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << ::std::endl;
+		#endif
+		pf.dirty = false;
+		pf.status = pf.READING;
+//        resize(pf, pageSize(pf));
+		return asyncReadAt(file, (TValue*)pf.begin, size(pf), (pos_t)pageNo * (pos_t)pageSize(pf), pf.request);
+	}
+
+	template < typename TValue, typename TFile, typename TSpec > inline
+	bool writePage(PageFrame<TValue, TFile, TSpec> &pf, int pageNo, TFile &file) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "writePage: " << ::std::hex << (TValue*)pf.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << ::std::endl;
+		#endif
+		pf.status = pf.WRITING;
+//        resize(pf, pageSize(pf));
+		return asyncWriteAt(file, (TValue*)pf.begin, size(pf), (pos_t)pageNo * (pos_t)pageSize(pf), pf.request);
+	}
+
+	template < typename TValue, typename TFile, typename TSpec, typename TSize> inline
+    bool readLastPage(int pageNo, PageFrame<TValue, TFile, TSpec> &pf, TFile &file, TSize size) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "readPage:  " << ::std::hex << (TValue*)pf.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << " size " << size << ::std::endl;
+		#endif
+		pf.dirty = false;
+		pf.status = pf.READY;
+//        resize(pf, size);
+		return readAt(file, (TValue*)pf.begin, size, (pos_t)pageNo * (pos_t)pageSize(pf));
+	}
+
+	template < typename TValue, typename TFile, typename TSpec, typename TSize > inline
+	bool writeLastPage(PageFrame<TValue, TFile, TSpec> &pf, int pageNo, TFile &file, TSize size) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "writePage: " << ::std::hex << (TValue*)pf.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << " size " << size << ::std::endl;
+		#endif
+		pf.dirty = false;
+		pf.status = pf.READY;
+//        resize(pf, size);
+		return writeAt(file, (TValue*)pf.begin, size, (pos_t)pageNo * (pos_t)pageSize(pf));
+	}
+
+	template < typename TValue, typename TFile, typename TSpec > inline
+	bool waitFor(PageFrame<TValue, TFile, TSpec> &pf) 
+	{
+		if ((pf.status != pf.READY) && waitFor(pf.request)) 
+		{
+			pf.status = pf.READY;
+			pf.dirty = false;
+            return true;
+		}
+        return false;
+	}
+
+	template < typename TValue, typename TFile, typename TSpec, typename TTime > inline
+	bool waitFor(PageFrame<TValue, TFile, TSpec> &pf, TTime timeOut) 
+	{
+		if ((pf.status != pf.READY) && waitFor(pf.request, timeOut)) {
+			pf.status = pf.READY;
+			pf.dirty = false;
+			return true;
+		}
+        return false;
+	}
+
+	template < typename TValue, typename TFile, typename TSpec > inline
+	bool cancel(PageFrame<TValue, TFile, TSpec> &pf, TFile &file) 
+	{
+        waitFor(pf, 0);
+		if (pf.status != pf.READY) 
+		{
+            if (!cancel(file, pf.request)) return false;
+            pf.status = pf.READY;
+        }
+        return true;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// page based read/write methods used by Pool classes
+
+    template < typename TValue, typename TFile, typename TSpec > inline
+	bool readPage(PageFrame<TValue, TFile, Dynamic<TSpec> > &pf, TFile &file) 
+	{
+        if (size(pf) == pageSize(pf))
+            return readPage(pf.pageNo, pf, file);
+        else
+            return readLastPage(pf.pageNo, pf, file, size(pf));
+	}
+
+	template < typename TValue, typename TFile, typename TSpec > inline
+	bool writePage(PageFrame<TValue, TFile, Dynamic<TSpec> > &pf, TFile &file) 
+	{
+        if (size(pf) == pageSize(pf))
+            return writePage(pf, pf.pageNo, file);
+        else
+            return writeLastPage(pf, pf.pageNo, file, size(pf));
+	}
+
+	template < typename TValue, typename TFile > inline
+	unsigned readBucket(PageBucket<TValue> &b, int pageNo, unsigned pageSize, unsigned dataSize, TFile &file) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+        unsigned readSize = _min(dataSize - b.pageOfs, (unsigned)(b.end - b.begin));
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "readBucket:  " << ::std::hex << b.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << " at " << (pos_t)pageNo * (pos_t)pageSize + b.pageOfs;
+			::std::cerr << " size " << readSize << ::std::endl;
+		#endif
+        if (readSize && readAt(file, b.begin, readSize, (pos_t)pageNo * (pos_t)pageSize + b.pageOfs)) {
+            b.pageOfs += readSize;
+            b.cur = b.begin;
+            b.end = b.begin + readSize;
+            return readSize;
+        } else
+            return 0;
+	}
+
+	template < typename TValue, typename TFile > inline
+	bool writeBucket(PageBucket<TValue> &b, int pageNo, unsigned pageSize, TFile &file) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "writeBucket: " << ::std::hex << b.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << " at " << (pos_t)pageNo * (pos_t)pageSize + b.pageOfs;
+			::std::cerr << " size " << b.cur - b.begin << ::std::endl;
+		#endif
+        if ((b.cur == b.begin) || writeAt(file, b.begin, b.cur - b.begin, (pos_t)pageNo * (pos_t)pageSize + b.pageOfs)) {
+            b.pageOfs += b.cur - b.begin;
+            b.cur = b.begin;
+            return true;
+        } else
+            return false;
+	}
+
+	template < typename TValue, typename TFile, typename TSpec > inline
+	bool writeBucket(PageFrame<TValue, TFile, Dynamic<TSpec> > &pf, unsigned &pageOfs, TFile &file) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "writeBucket: " << ::std::hex << pf.begin;
+			::std::cerr << " from page " << ::std::dec << pf.pageNo << " at " << (pos_t)pf.pageNo * (pos_t)pageSize(pf) + pageOfs;
+			::std::cerr << " size " << size(pf) << ::std::endl;
+		#endif
+        if (pf.end == pf.begin) return true;
+        if (asyncWriteAt(file, pf.begin, size(pf), (pos_t)pf.pageNo * (pos_t)pageSize(pf) + pageOfs, pf.request)) {
+            pf.status = pf.WRITING;
+            pageOfs += size(pf);
+            return true;
+        } else
+            return false;
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+
+    template < typename TPageFrame >
+    struct PageChain 
+	{
+        TPageFrame          *first, *last;
+        unsigned            frames, maxFrames;
+        
+        PageChain(unsigned _maxFrames = UINT_MAX):
+            first(NULL),
+            last(NULL),
+            frames(0),
+            maxFrames(_maxFrames)
+        {
+            for(unsigned i = 0; i < _maxFrames; ++i)
+                pushBack();
+        }
+        
+        ~PageChain()
+        {
+            while (first)
+                popFront();
+        }
+        
+        inline TPageFrame & operator[](int k) 
+		{
+            TPageFrame *p = first;
+            for (; k > 0; --k)
+                p = p->next;
+            return *p;
+        }
+        
+        inline TPageFrame const & operator[](int k) const 
+		{
+            TPageFrame *p = first;
+            for (; k > 0; --k)
+                p = p->next;
+            return *p;
+        }
+
+        inline TPageFrame * getReadyPage() 
+		{
+            if (!first || (frames < maxFrames && waitFor(*first, 0)))
+                return pushBack();
+            else {
+                waitFor(*first);
+                return firstToEnd();
+            }
+        }
+
+        template < typename TFile >
+        inline void cancelAll(TFile &file) 
+		{
+            TPageFrame *p = first;
+            for (; p != NULL; p = p->next)
+                cancel(*p, file);
+        }
+
+        inline void waitForAll() 
+		{
+            TPageFrame *p = first;
+            for (; p != NULL; p = p->next)
+                waitFor(*p);
+        }
+
+    private:
+
+        inline TPageFrame * firstToEnd() 
+		{
+            last->next = first;
+            last = first;
+            first = first->next;
+            last->next = NULL;
+            return last;
+        }
+
+        inline TPageFrame * pushBack() 
+		{
+            TPageFrame * p = new TPageFrame();
+            if (p) {
+                if (last)
+                    last->next = p;
+                else
+                    first = p;
+                last = p;
+                ++frames;
+            }
+            return p;
+        }
+
+        inline TPageFrame * popFront() 
+		{
+            TPageFrame *p = first;
+            if (p) {
+                first = first->next;
+                if (!first) last = NULL;
+                --frames;
+                delete p;
+            }
+            return p;
+        }
+    };
+
+	//////////////////////////////////////////////////////////////////////////////
+	// meta-function interface
+
+    template < typename TPageFrame >    
+	struct Value< PageChain<TPageFrame> > 
+	{
+		typedef TPageFrame Type;
+	};
+
+    template < typename TPageFrame >    
+	struct Size< PageChain<TPageFrame> > 
+	{
+		typedef unsigned Type;
+	};
+
+    template < typename TPageFrame >    
+	struct Iterator< PageChain<TPageFrame> > 
+	{
+		typedef TPageFrame *Type;
+	};
+
+    template < typename TPageFrame >    
+	struct Iterator< PageChain<TPageFrame> const > 
+	{
+		typedef TPageFrame const *Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// page container with lru mechanism
+	// the lru strategy uses different priorities
+	// the page with the least priority is used first
+	// 0..random access pages
+	// 1..forward iterator pages
+	// 2..quasi permanent pages
+
+    template < typename TPageFrame,
+               unsigned FRAMES,
+               unsigned PRIORITY_LEVELS = TPageFrame::PERMANENT_LEVEL + 1 >
+	struct PageContainer
+	{
+		typedef String<TPageFrame>					TPages;
+		typedef typename Position<TPages>::Type		TPos;
+
+		enum { PriorityLevels = PRIORITY_LEVELS };
+
+		TPages			pages;
+        PageLRUList		*lruList;
+
+		PageContainer()
+		{
+			lruList = new PageLRUList[PRIORITY_LEVELS];
+			resize(pages, FRAMES, Exact());
+            for(TPos i = 0; i < FRAMES; ++i)
+			    pages[i].lruEntry = lruList[0].insert(lruList[0].end(), i);
+        }
+
+		~PageContainer()
+		{
+			delete[] lruList;
+		}
+
+        inline TPageFrame       & operator[](TPos i)       { return pages[i]; }
+        inline TPageFrame const & operator[](TPos i) const { return pages[i]; }
+
+		inline void push_back() 
+		{
+			TPos last = endPosition(pages);
+			resize(pages, last + 1);
+			pages[last].lruEntry = lruList[0].insert(lruList[0].end(), last);
+		}
+
+		inline void erase(int frameNo) 
+		{
+			lruList[pages[frameNo].priority].erase(pages[frameNo].lruEntry);
+            seqan::erase(pages, frameNo);
+		}
+
+        inline void rename(int frameNo) 
+		{
+            *(pages[frameNo].lruEntry) = frameNo;
+        }
+
+		inline void pop_back() 
+		{
+			lruList[back(pages).priority].erase(back(pages).lruEntry);
+			seqan::erase(pages, endPosition(pages) - 1);
+		}
+
+
+		//////////////////////////////////////////////////////////////////////////////
+		// lru strategy interface
+
+		inline void upgrade(const TPageFrame &pf) 
+		{
+			lruList[pf.priority].splice(lruList[pf.priority].begin(), lruList[pf.priority], pf.lruEntry);
+			pf.lruEntry = lruList[pf.priority].begin();
+		}
+
+		inline void downgrade(const TPageFrame &pf) 
+		{
+			lruList[pf.priority].splice(lruList[pf.priority].end(), lruList[pf.priority], pf.lruEntry);
+			pf.lruEntry = lruList[pf.priority].end();
+			--pf.lruEntry;
+		}
+
+		inline void upgrade(TPageFrame &pf, int newPriority) 
+		{
+			lruList[newPriority].splice(lruList[newPriority].begin(), lruList[pf.priority], pf.lruEntry);
+			pf.lruEntry = lruList[newPriority].begin();
+			pf.priority = static_cast<typename TPageFrame::Priority> (newPriority);
+		}
+
+		inline void downgrade(TPageFrame &pf, int newPriority) 
+		{
+			lruList[newPriority].splice(lruList[newPriority].end(), lruList[pf.priority], pf.lruEntry);
+			pf.lruEntry = lruList[newPriority].end();
+			--pf.lruEntry;
+			pf.priority = static_cast<typename TPageFrame::Priority> (newPriority);
+		}
+
+		inline void _dump() 
+		{
+			for(unsigned i = 0; i < PRIORITY_LEVELS; ++i) {
+                ::std::cerr << "|";
+                PageLRUList::const_iterator I = lruList[i].end();
+                PageLRUList::const_iterator first = lruList[i].begin();
+				while (I != first) {
+					--I;
+                    TPageFrame &pf = pages[*I];
+                    ::std::cerr << pf.pageNo;
+                    if (pf.dirty) ::std::cerr << "*";
+                    else          ::std::cerr << " ";
+                    if (pf.status == TPageFrame::READY) ::std::cerr << "  ";
+                    else                                ::std::cerr << ". ";
+				};
+            }
+            ::std::cerr << ::std::endl;
+		}
+
+        // Function is a functor which is called with a PageFrame object,
+        // that is dirty or not READY (in an IO transfer)
+		template <class Function>
+		inline int mru(Function Func_, unsigned maxLevel = PRIORITY_LEVELS - 1) 
+		{
+			for(unsigned i = 0; i <= maxLevel; ++i) {
+                PageLRUList::const_iterator I = lruList[i].end();
+                PageLRUList::const_iterator first = lruList[i].begin();
+				while (I != first) {
+					--I;
+					TPageFrame& pf = pages[*I];
+					if (pf.status == TPageFrame::READY && !pf.dirty)
+						return *I;
+					else
+						if (Func_(pf)) return *I;
+				};
+            }
+			#ifdef SEQAN_VVERBOSE
+				::std::cerr << "ALL PAGES DIRTY Or IN USE (try to use const iterators) :-(" << ::std::endl;
+			#endif
+			return -1;
+		}
+
+		inline int mruDirty() 
+		{
+            for(unsigned i = 0; i < PRIORITY_LEVELS; ++i)
+                if (!lruList[i].empty())
+                    return lruList[i].back();
+			return -1;
+		}
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// meta-function interface
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	struct Host< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> > 
+	{
+		typedef String<TPageFrame> Type;
+	};
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	struct Host< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const > 
+	{
+		typedef String<TPageFrame> const Type;
+	};
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	struct Value< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> > 
+	{
+		typedef TPageFrame Type;
+	};
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	struct Size< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> >:
+		public Size< typename Host< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> >::Type> {};
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	struct Position< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> >:
+		public Position< typename Host< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> >::Type> {};
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	struct Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> >:
+		public Iterator< typename Host< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> >::Type> {};
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	struct Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const >:
+		public Iterator< typename Host< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const>::Type> {};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// global interface
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS, typename TExpand >
+	inline void reserve(
+		PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> &pageCont,
+		unsigned Count_,
+		Tag<TExpand> const expand)
+	{
+		reserve(pageCont.pages, Count_, expand);
+	}
+
+    template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	inline void resize(
+		PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> &pageCont, 
+		unsigned Count_) 
+	{
+		unsigned Size_ = length(pageCont.pages);
+		if (Size_ < Count_) {
+			reserve(pageCont.pages, Count_);
+            for(unsigned i = Size_; i < Count_; ++i)
+                pageCont.push_back();
+		} else 
+			if (Size_ > Count_)
+				for(unsigned i = Count_; i < Size_; ++i)
+					pageCont.pop_back();
+	}
+
+    template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	inline typename Size< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> >::Type
+	length(PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const &pageCont) 
+	{
+		return length(pageCont.pages);
+	}
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	inline typename Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS>, Standard >::Type
+	begin(
+		PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> &pageCont,
+		Standard const) 
+	{
+		return begin(pageCont.pages, Standard());
+	}
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	inline typename Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const, Standard >::Type
+	begin(
+		PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const &pageCont,
+		Standard const) 
+	{
+		return begin(pageCont.pages, Standard());
+	}
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	inline typename Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS>, Standard >::Type
+	end(
+		PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> &pageCont,
+		Standard const) 
+	{
+		return end(pageCont.pages, Standard());
+	}
+
+	template < typename TPageFrame, unsigned FRAMES, unsigned PRIORITY_LEVELS >
+	inline typename Iterator< PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const, Standard >::Type
+	end(
+		PageContainer<TPageFrame, FRAMES, PRIORITY_LEVELS> const &pageCont,
+		Standard const) 
+	{
+		return end(pageCont.pages, Standard());
+	}
+
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+
+    template < typename TValue, typename TSize, typename T, class Function >
+    inline bool equiDistantDistribution(
+        SimpleBuffer<TValue> &_clusterBuffer, unsigned _bufferSize, T const &me,
+        TSize _size, unsigned _pageSize,
+        Function const &Func_)
+    {
+        unsigned _pages         = enclosingBlocks(_size, (unsigned)_pageSize);
+        if (!_pages) {
+			::std::cerr << "equiDistantDistribution: _pages is null!" << ::std::endl;
+            return false;
+        }
+
+        if (_bufferSize < _pages) {
+			::std::cerr << "equiDistantDistribution: clusterBufferSize is too small -> raised to " << _pages << ::std::endl;
+            _bufferSize = _pages;
+        }
+
+        unsigned lastPageSize   = _size % _pageSize;
+        unsigned pages          = _pages;
+
+        if ((TSize)_bufferSize > _size)
+            _bufferSize = _size;
+
+        allocPage(_clusterBuffer, _bufferSize, me);
+        PageBucketExtended<TValue> pb;
+        pb.begin = _clusterBuffer.begin;
+
+        unsigned clusterSize = _bufferSize / pages;
+        if (lastPageSize > 0 && clusterSize >= lastPageSize) {
+            // last page bucket would get more memory than page would need
+            // --> exclude from equi-size distribution
+            if (--pages) {
+                _bufferSize -= lastPageSize;
+                clusterSize = _bufferSize / pages;
+            }
+        }
+
+        if (pages) {
+            unsigned remainder = _bufferSize % pages;
+            for(unsigned i = 0, numerator = 0; i < pages; ++i) {
+                pb.end = pb.begin + clusterSize;
+                if ((numerator += remainder) >= pages) {    // simple bresenham for distribution
+                    numerator -= pages;
+                    ++pb.end;
+                }
+                pb.cur = pb.begin;
+                pb.pageOfs = 0;
+			    Func_(pb);
+                pb.begin = pb.end;
+            }
+        }
+
+        if (pages < _pages) {
+            pb.end = pb.begin + lastPageSize;
+            pb.cur = pb.begin;
+            pb.pageOfs = 0;
+			Func_(pb);
+        }
+
+        return true;
+    }
+
+    template < typename TValue, typename TSize, typename T, class Function >
+    inline unsigned equiDistantAlignedDistribution(
+        SimpleBuffer<TValue> &_clusterBuffer, unsigned aligning, unsigned _bufferSize, T const &me,
+        TSize _size, unsigned _pageSize,
+        Function const &Func_)
+    {
+        unsigned _pages         = enclosingBlocks(_size, (unsigned)_pageSize);
+        if (!_pages) {
+			::std::cerr << "equiDistantDistribution: _pages is null!" << ::std::endl;
+            return 0;
+        }
+
+        if (_bufferSize < _pages) {
+			::std::cerr << "equiDistantAlignedDistribution: clusterBufferSize is too small -> raised to " << _pages << ::std::endl;
+            _bufferSize = _pages;
+        }
+
+        unsigned lastPageSize   = _size % _pageSize;
+        unsigned pages          = _pages;
+
+        if ((TSize)_bufferSize > _size)
+            _bufferSize = _size;
+
+        unsigned clusterSize = _bufferSize / pages;
+        unsigned aclusterSize = (clusterSize / aligning) * aligning;
+        if (clusterSize - aclusterSize > aligning / 2)
+            aclusterSize += aligning;
+
+		if (aclusterSize != 0) {
+
+			if (lastPageSize > 0 && aclusterSize > lastPageSize) {
+				// last page bucket would get more memory than page would need
+				// --> exclude from equi-size distribution
+				--pages;
+				allocPage(_clusterBuffer, aclusterSize * pages + lastPageSize, me);
+			} else
+				allocPage(_clusterBuffer, aclusterSize * pages, me);
+
+			PageBucketExtended<TValue> pb;
+			pb.begin = _clusterBuffer.begin;
+
+			if (pages) {
+				for(unsigned i = 0; i < pages; ++i) {
+					pb.end = pb.begin + aclusterSize;
+					pb.cur = pb.begin;
+					pb.pageOfs = 0;
+					Func_(pb);
+					pb.begin = pb.end;
+				}
+			}
+
+			if (pages < _pages) {
+				pb.end = pb.begin + lastPageSize;
+				pb.cur = pb.begin;
+				pb.pageOfs = 0;
+				Func_(pb);
+			}
+		}
+
+        return aclusterSize;
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/file/file_page_raid0.h b/src/SeqAn-1.3/seqan/file/file_page_raid0.h
new file mode 100644
index 0000000..6ec502a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/file_page_raid0.h
@@ -0,0 +1,209 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_PAGE_RAID0_H
+#define SEQAN_HEADER_FILE_PAGE_RAID0_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // page based read/write for striped files
+
+	template < typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec >
+	inline bool 
+	readPage(
+		int pageNo, 
+		PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, TSpec> &pf, 
+		File< Striped<FILE_COUNT, TFile> > &file)
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "readPage:  " << ::std::hex << (TValue*)pf.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << ::std::endl;
+		#endif
+		pf.dirty = false;
+		pf.status = pf.READING;
+		return asyncReadAt(
+			file[pageNo % FILE_COUNT], 
+			(TValue*)pf.begin, 
+			size(pf), 
+			(pos_t)(pageNo / FILE_COUNT) * (pos_t)pageSize(pf), 
+			pf.request);
+	}
+
+	template < typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec >
+	inline bool 
+	writePage(
+		PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, TSpec> &pf, 
+		int pageNo, 
+		File< Striped<FILE_COUNT, TFile> > &file)
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "writePage: " << ::std::hex << (TValue*)pf.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << ::std::endl;
+		#endif
+		pf.status = pf.WRITING;
+		return asyncWriteAt(
+			file[pageNo % FILE_COUNT], 
+			(TValue*)pf.begin, 
+			size(pf), 
+			(pos_t)(pageNo / FILE_COUNT) * (pos_t)pageSize(pf), 
+			pf.request);
+	}
+
+	template < typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec, typename TSize >
+	inline bool 
+	readLastPage(
+		int pageNo, 
+		PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, TSpec> &pf, 
+		File< Striped<FILE_COUNT, TFile> > &file,
+		TSize size)
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "readPage:  " << ::std::hex << (TValue*)pf.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << " size " << size << ::std::endl;
+		#endif
+		pf.dirty = false;
+		pf.status = pf.READY;
+		return readAt(
+			file[pageNo % FILE_COUNT], 
+			(TValue*)pf.begin, 
+			size, 
+			(pos_t)(pageNo / FILE_COUNT) * (pos_t)pageSize(pf));
+	}
+
+	template < typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec, typename TSize >
+	inline bool 
+	writeLastPage(
+		PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, TSpec> &pf, 
+		int pageNo, 
+		File< Striped<FILE_COUNT, TFile> > &file,
+		TSize size)
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "writePage: " << ::std::hex << (TValue*)pf.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << " size " << size << ::std::endl;
+		#endif
+		pf.dirty = false;
+		pf.status = pf.READY;
+//        resize(pf, size);
+		return writeAt(
+			file[pageNo % FILE_COUNT], 
+			(TValue*)pf.begin, 
+			size, 
+			(pos_t)(pageNo / FILE_COUNT) * (pos_t)pageSize(pf));
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// bucket based read/write methods for striped files
+
+	template < typename TValue, unsigned FILE_COUNT, typename TFile >
+	inline unsigned 
+	readBucket(
+		PageBucket<TValue> &b, 
+		int pageNo, 
+		unsigned pageSize, 
+		unsigned dataSize, 
+		File< Striped<FILE_COUNT, TFile> > &file) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+        unsigned readSize = _min(dataSize - b.pageOfs, (unsigned)(b.end - b.begin));
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "readBucket:  " << ::std::hex << b.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << " at " << (pos_t)(pageNo / FILE_COUNT) * (pos_t)pageSize + b.pageOfs;
+			::std::cerr << " size " << readSize << ::std::endl;
+		#endif
+        if (readSize && readAt(file[pageNo % FILE_COUNT], b.begin, readSize, (pos_t)(pageNo / FILE_COUNT) * (pos_t)pageSize + b.pageOfs)) {
+            b.pageOfs += readSize;
+            b.cur = b.begin;
+            b.end = b.begin + readSize;
+            return readSize;
+        } else
+            return 0;
+	}
+
+	template < typename TValue, unsigned FILE_COUNT, typename TFile >
+	inline bool 
+	writeBucket(
+		PageBucket<TValue> &b,
+		int pageNo, 
+		unsigned pageSize, 
+		File< Striped<FILE_COUNT, TFile> > &file) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "writeBucket: " << ::std::hex << b.begin;
+			::std::cerr << " from page " << ::std::dec << pageNo << " at " << (pos_t)(pageNo / FILE_COUNT) * (pos_t)pageSize + b.pageOfs;
+			::std::cerr << " size " << b.cur - b.begin << ::std::endl;
+		#endif
+        if ((b.cur == b.begin) || writeAt(file[pageNo % FILE_COUNT], b.begin, b.cur - b.begin, (pos_t)(pageNo / FILE_COUNT) * (pos_t)pageSize + b.pageOfs)) {
+            b.pageOfs += b.cur - b.begin;
+            b.cur = b.begin;
+            return true;
+        } else
+            return false;
+	}
+
+	template < typename TValue, unsigned FILE_COUNT, typename TFile, typename TSpec >
+	inline bool 
+	writeBucket(
+		PageFrame<TValue, File< Striped<FILE_COUNT, TFile> >, Dynamic<TSpec> > &pf, 
+		unsigned &pageOfs, 
+		File< Striped<FILE_COUNT, TFile> > &file) 
+	{
+		typedef typename Position<TFile>::Type pos_t;
+		#ifdef SEQAN_VVERBOSE
+			::std::cerr << "writeBucket: " << ::std::hex << pf.begin;
+			::std::cerr << " from page " << ::std::dec << pf.pageNo << " at " << (pos_t)(pf.pageNo / FILE_COUNT) * (pos_t)pageSize(pf) + pageOfs;
+			::std::cerr << " size " << size(pf) << ::std::endl;
+		#endif
+        if (pf.end == pf.begin) return true;
+        if (asyncWriteAt(file[pf.pageNo % FILE_COUNT], pf.begin, size(pf), (pos_t)(pf.pageNo / FILE_COUNT) * (pos_t)pageSize(pf) + pageOfs, pf.request)) {
+            pf.status = pf.WRITING;
+            pageOfs += size(pf);
+            return true;
+        } else
+            return false;
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/file/meta.h b/src/SeqAn-1.3/seqan/file/meta.h
new file mode 100644
index 0000000..ee80c35
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/meta.h
@@ -0,0 +1,48 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_META_H
+#define SEQAN_HEADER_FILE_META_H
+
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/stream.h b/src/SeqAn-1.3/seqan/file/stream.h
new file mode 100644
index 0000000..19048e0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/stream.h
@@ -0,0 +1,446 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STREAM_H
+#define SEQAN_HEADER_STREAM_H
+
+#include <iosfwd>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Adaption."std::iostream":
+..summary:Standard library stream classes.
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+	
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_ios<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ios<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_streambuf<TValue, TTraits> >
+{
+	typedef typename ::std::basic_streambuf<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_istream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_istream<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_ostream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ostream<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_iostream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_iostream<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_stringbuf<TValue, TTraits> >
+{
+	typedef typename ::std::basic_stringbuf<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_istringstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_istringstream<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_ostringstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ostringstream<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_stringstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_stringstream<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_filebuf<TValue, TTraits> >
+{
+	typedef typename ::std::basic_filebuf<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_ifstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ifstream<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_ofstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ofstream<TValue, TTraits>::pos_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Position< ::std::basic_fstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_fstream<TValue, TTraits>::pos_type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+	
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_ios<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ios<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_streambuf<TValue, TTraits> >
+{
+	typedef typename ::std::basic_streambuf<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_istream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_istream<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_ostream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ostream<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_iostream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_iostream<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_stringbuf<TValue, TTraits> >
+{
+	typedef typename ::std::basic_stringbuf<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_istringstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_istringstream<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_ostringstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ostringstream<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_stringstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_stringstream<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_filebuf<TValue, TTraits> >
+{
+	typedef typename ::std::basic_filebuf<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_ifstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ifstream<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_ofstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_ofstream<TValue, TTraits>::char_type Type;
+};
+template <typename TValue, typename TTraits>
+struct Value< ::std::basic_fstream<TValue, TTraits> >
+{
+	typedef typename ::std::basic_fstream<TValue, TTraits>::char_type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**.interal.IsTellAndSeekStream_:
+..summary:Determines whether stream supports tell and seek functions.
+..cat:Metafunction
+*/
+
+template <typename T>
+struct IsTellAndSeekStream_
+{
+	typedef False Type;
+};
+
+
+template <typename TValue, typename TTraits>
+struct IsTellAndSeekStream_< ::std::basic_ifstream<TValue, TTraits> >
+{
+	typedef True Type;
+};
+template <typename TValue, typename TTraits>
+struct IsTellAndSeekStream_< ::std::basic_fstream<TValue, TTraits> >
+{
+	typedef True Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamEOF:
+..summary:Test stream for being in eof or error state.
+..cat:Streams
+..signature:_streamEOF(stream)
+..param.stream:A stream object.
+...type:Adaption."std::iostream"
+..returns:$true$, if stream is at end of file or was set to error state, $false$ otherwise.
+*/
+template <typename TValue, typename TTraits>
+inline bool 
+_streamEOF(::std::basic_istream<TValue, TTraits> const & me)
+{
+SEQAN_CHECKPOINT
+	// Andreas missed the fact that eof() of a stream is true after reading the eof character
+	// So reading the last character eof() is false, reading beyond eof() is true
+	// To fix that we use peek() to get the next character and compare it with the eof character
+	typedef ::std::basic_istream<TValue, TTraits> TStream;
+	return me.fail() || const_cast<TStream &>(me).peek() == TTraits::eof();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+ 
+/**
+.Internal._streamRead:
+..summary:Read some characters from stream into a buffer.
+..cat:Streams
+..signature:_streamRead(target, stream, limit)
+..param.target:A buffer that is filled.
+..param.stream:An input stream.
+...type:Adaption."std::iostream"
+..param.limit:The maximal number of characters that is read from $stream$.
+..returns:The number of characters read from $stream$.
+*/
+template <typename TValue, typename TTraits>
+inline ::std::streamsize 
+_streamRead(TValue * target,
+			::std::basic_istream<TValue, TTraits> & source,
+			::std::streamsize limit)
+{
+SEQAN_CHECKPOINT
+	source.read(target, limit);
+	return source.gcount();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamGet:
+..summary:Read one character from stream.
+..cat:Streams
+..signature:_streamGet(stream)
+..param.stream:An input stream.
+...type:Adaption."std::iostream"
+..returns:The character read.
+*/
+
+template <typename TValue, typename TTraits>
+inline TValue 
+_streamGet(::std::basic_istream<TValue, TTraits> & source)
+{
+SEQAN_CHECKPOINT
+	return source.get();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamPeek:
+..summary:Return the next character to be read from stream.
+..cat:Streams
+..signature:_streamPeek(stream)
+..param.stream:An input stream.
+...type:Adaption."std::iostream"
+..returns:The character to be read.
+*/
+
+template <typename TValue, typename TTraits>
+inline TValue 
+_streamPeek(::std::basic_istream<TValue, TTraits> & source)
+{
+SEQAN_CHECKPOINT
+	return source.peek();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamUnget:
+..summary:Put the last read character back into stream.
+..cat:Streams
+..signature:_streamUnget(stream)
+..param.stream:An input stream.
+...type:Adaption."std::iostream"
+*/
+
+template <typename TValue, typename TTraits>
+inline void
+_streamUnget(::std::basic_istream<TValue, TTraits> & source)
+{
+SEQAN_CHECKPOINT
+	source.unget();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamPut:
+..summary:Writes one character to stream.
+..cat:Streams
+..signature:_streamPut(stream, character)
+..param.stream:An input stream.
+...type:Adaption."std::iostream"
+..param.character:A character that is written to $stream$.
+*/
+
+template <typename TValue, typename TTraits, typename TChar>
+inline void
+_streamPut(::std::basic_ostream<TValue, TTraits> & target,
+		   TChar character)
+{
+SEQAN_CHECKPOINT
+	target.put(convert<TValue>(character));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamTellG:
+..cat:Streams
+..summary:Gets current position of input stream.
+..signature:_streamTellG(stream)
+..param.stream:An input stream.
+...type:Adaption."std::iostream"
+..returns:The current position in $stream$.
+*/
+template <typename TValue, typename TTraits>
+inline typename Position< ::std::basic_istream<TValue, TTraits> >::Type
+_streamTellG(::std::basic_istream<TValue, TTraits> & me)
+{
+SEQAN_CHECKPOINT
+	return me.tellg();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Internal._streamTellP:
+..cat:Streams
+..summary:Gets current position of output stream.
+..signature:_streamTellP(stream)
+..param.stream:An ouput stream.
+...type:Adaption."std::iostream"
+..returns:The current position in $stream$.
+..see:Internal._streamTellG
+*/
+template <typename TValue, typename TTraits>
+inline typename Position< ::std::basic_ostream<TValue, TTraits> >::Type
+_streamTellP(::std::basic_ostream<TValue, TTraits> & me)
+{
+SEQAN_CHECKPOINT
+	return me.tellp();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamSeekG:
+..summary:Moves input stream to a position.
+..cat:Streams
+..signature:_streamSeekG(stream, position)
+..param.stream:An input stream.
+...type:Adaption."std::iostream"
+..param.position:A position within the stream.
+...remarks:Use @Function._streamTellG@ to get valid stream positions.
+..see:Internal._streamTellG
+*/
+template <typename TValue, typename TTraits>
+inline void
+_streamSeekG(::std::basic_istream<TValue, TTraits> & me,
+	 typename Position< ::std::basic_istream<TValue, TTraits> >::Type pos)
+{
+SEQAN_CHECKPOINT
+	me.clear();
+	me.seekg(pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamSeekP:
+..summary:Moves output stream to a position.
+..cat:Streams
+..signature:_streamSeekP(stream, position)
+..param.stream:An output stream.
+...type:Adaption."std::iostream"
+..param.position:A position within the stream.
+...remarks:Use @Function._streamTellP@ to get valid stream positions.
+..see:Internal._streamTellP
+..see:Internal._streamSeekG
+*/
+template <typename TValue, typename TTraits>
+inline void
+_streamSeekP(::std::basic_ostream<TValue, TTraits> & me,
+	 typename Position< ::std::basic_ostream<TValue, TTraits> >::Type pos)
+{
+SEQAN_CHECKPOINT
+	me.clear();
+	me.seekp(pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamSeek2G:
+..summary:Moves input stream position relative to current position.
+..cat:Streams
+..signature:_streamSeek2G(stream, offset)
+..param.stream:An input stream.
+...type:Adaption."std::iostream"
+..param.offset:The amout the position is changed.
+...remarks:If this value is negative.
+..see:Internal._streamSeekG
+*/
+template <typename TValue, typename TTraits>
+inline void
+_streamSeek2G(::std::basic_istream<TValue, TTraits> & me,
+	 int off)
+{
+SEQAN_CHECKPOINT
+	me.seekg(off, ::std::ios_base::cur);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/stream_algorithms.h b/src/SeqAn-1.3/seqan/file/stream_algorithms.h
new file mode 100644
index 0000000..2ba6386
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/stream_algorithms.h
@@ -0,0 +1,221 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STREAM_ALGORITHMS_H
+#define SEQAN_HEADER_STREAM_ALGORITHMS_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Internal._streamPutInt:
+..summary:Converts an integer to a character and writes it to stream.
+..cat:Streams
+..signature:_streamPutInt(stream, number [, format_string])
+..param.target:An output stream.
+...type:Adaption."std::iostream"
+..param.number:A number that is written to $stream$.
+*/
+template <typename TStream>
+inline void
+_streamPutInt(TStream & target,
+			  int number, 
+			  char const * format_string)
+{
+SEQAN_CHECKPOINT
+	char str[BitsPerValue<int>::VALUE];
+	sprintf(str, format_string, number);
+	_streamWrite(target, str);
+}
+template <typename TStream>
+inline void
+_streamPutInt(TStream & target,
+			  int number)
+{
+SEQAN_CHECKPOINT
+	_streamPutInt(target, number, "%d");
+}
+
+/**
+.Internal._streamPutFloat:
+..summary:Converts a float to a character and writes it to stream.
+..cat:Streams
+..signature:_streamPutFloat(stream, number [, format_string])
+..param.target:An output stream.
+...type:Adaption."std::iostream"
+..param.number:A number that is written to $stream$.
+*/
+template <typename TStream>
+inline void
+_streamPutFloat(TStream & target,
+			  double number, 
+			  char const * format_string)
+{
+    SEQAN_CHECKPOINT;
+	char str[BitsPerValue<float>::VALUE];
+	sprintf(str, format_string, number);
+	_streamWrite(target, str);
+}
+template <typename TStream>
+inline void
+_streamPutFloat(TStream & target,
+				double number)
+{
+    SEQAN_CHECKPOINT;
+	_streamPutFloat(target, number, "%f");
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTarget, typename T1, typename T2, typename TCompression>
+inline void
+_streamWrite(TTarget & target,
+			 Pair<T1, T2, TCompression> const & source)
+{
+SEQAN_CHECKPOINT
+	_streamWrite(target, getValueI1(source));
+	_streamWrite(target, getValueI2(source));
+}
+
+template <typename TTarget, typename T1, typename T2, typename T3, typename TCompression>
+inline void
+_streamWrite(TTarget & target,
+			 Triple<T1, T2, T3, TCompression> const & source)
+{
+SEQAN_CHECKPOINT
+	_streamWrite(target, getValueI1(source));
+	_streamWrite(target, getValueI2(source));
+	_streamWrite(target, getValueI3(source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/**
+.Internal._streamWrite:
+..summary:Writes a sequence to stream.
+..cat:Streams
+..signature:_streamWrite(stream, sequence)
+..param.stream:An input stream.
+..param.sequence:A sequence that is written to $stream$.
+*/
+
+template <typename TTarget, typename TSource>
+inline void
+_streamWrite(TTarget & target,
+			 TSource const & source)
+{
+SEQAN_CHECKPOINT
+	_streamWriteSeq(target, source, typename IsSequence<TSource const>::Type());
+}
+
+//____________________________________________________________________________
+
+template <typename TTarget, typename TSource>
+inline void
+_streamWriteSeq(TTarget & target,
+				TSource const & source,
+				False const)
+{
+	_streamPut(target, source);
+}
+
+//____________________________________________________________________________
+
+template <typename TTarget, typename TSource>
+inline void
+_streamWriteSeq(TTarget & target,
+				TSource const & source,
+				True const)
+{
+SEQAN_CHECKPOINT
+	typename Iterator<TSource const, Standard>::Type it = begin(source, Standard());
+	typename Iterator<TSource const, Standard>::Type it_end = end(source, Standard());
+
+	for (; it != it_end; ++it)
+	{
+		typename GetValue<TSource const>::Type val_ = getValue(it);
+		_streamWrite(target, val_);
+	}
+}
+
+template <typename TTarget, typename TSourceValue>
+inline void
+_streamWriteSeq(TTarget & target,
+			    TSourceValue const * source,
+				True const)
+{
+SEQAN_CHECKPOINT
+
+	for (; !atEnd(source); ++source)
+	{
+		_streamWrite(target, *source);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Internal._streamWriteRange:
+..summary:Writes a range to stream.
+..cat:Streams
+..signature:_streamWriteRange(stream, begin_iterator, end_iterator)
+..param.stream:An input stream.
+..param.sequence:A sequence that is written to $stream$.
+*/
+
+template <typename TTarget, typename TIterator>
+inline void
+_streamWriteRange(TTarget & target,
+				  TIterator begin_,
+				  TIterator end_)
+{
+SEQAN_CHECKPOINT
+	for (; begin_ != end_; ++begin_)
+	{
+		_streamPut(target, *begin_);
+	}
+}
+
+
+	
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/file/string_external.h b/src/SeqAn-1.3/seqan/file/string_external.h
new file mode 100644
index 0000000..924f03a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/string_external.h
@@ -0,0 +1,2081 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STRING_EXTERNAL_H
+#define SEQAN_HEADER_STRING_EXTERNAL_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Spec.External String:
+..cat:Strings
+..general:Class.String
+..summary:String that is stored in external memory.
+..signature:String<TValue, External<> >
+..signature:String<TValue, External<TConfig> >
+..param.TValue:The value type, that is the type of the items/characters stored in the string.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.TConfig:A structure to configure the external string.
+...type:Tag.ExternalConfig
+...type:Tag.ExternalConfigLarge
+...type:Tag.ExternalConfigSize
+...default:@Tag.ExternalConfig@
+..remarks:The External String enables to access sequences larger than the available internal memory (RAM)
+by using external memory (e.g. Hard disk, Network storage, ...) via a @Class.File@ object.
+Sequences of nearly arbitrary size can be accessed even larger than the logically addressable memory,
+i.e. they can in particular contain more than 2^32 elements on a 32bit system (see Tag.ExternalConfigLarge).
+See the @Memfunc.ExtString#String.constructor@ for more details.
+..remarks:This String also supports fast appending and removing of values at the end (see @Spec.Block String@, @Function.appendValue@)
+..remarks:The External String implements a LRU mechanism to swap out pages.
+The External String's @Metafunction.Iterator@ detects a forward or backward iteration and asynchronously prefetches pages that
+certainly will be accessed and automatically swaps out pages that certainly won't be accessed any more in the iteration
+process.
+..remarks:The String is implemented like a virtual memory manager.
+It divides its character sequence into pages of a fixed length (e.g. 1MB) and maintains a
+page table with information for each page (e.g. resides in memory or was swapped out, is dirty and needs to be saved, ...).
+Besides the page table the String also contains a size-limited list of page frames. A page frame is reserved internal
+memory for a page. When accessing values of a page that is stored in external memory, the page is loaded to a page frame
+first. In case that there is no page frame free, another page is swapped out before to free a page frame.
+..include:seqan/file.h
+*/
+
+/**
+.Tag.ExternalConfig:
+..cat:Strings
+..summary:Standard configuration for the @Spec.External String at .
+..signature:String<TValue, External< ExternalConfig<> > >
+..signature:String<TValue, External< ExternalConfig<TFile[, pageSize[, frames]]> > >
+..param.TFile:Type of file the External String will be based on.
+...type:Class.File
+..param.pageSize:A positive integer that specifies the number of values in one page.
+...remarks:This should be a power of 2, to speed up transfer and calculations.
+...default:2^20
+..param.frames:A positive integer that specifies the maximum number of pages that should reside in internal memory.
+...remarks:To enable prefetching and automatic swap-out, $frames$ should be greater than 1.
+...default:2
+..remarks:When using this configuration, the @Metafunction.Size@ type of the @Spec.External String@ is $unsigned int$.
+Thus, with this configuration at most 4.294.967.296 values can be stored in an @Spec.External String@ on a 32bit system.
+For a larger size type, use @Tag.ExternalConfigLarge at .
+..include:seqan/file.h
+*/
+    // standard external string
+    // size is uint32
+    template < typename TFile_ = File<>,				// default file type
+               unsigned PAGE_SIZE_ = 4 * 1024 * 1024,	// 1MTypes per default
+			   unsigned FRAMES_ = 2 >					// simultanous frames
+    struct ExternalConfig {
+        typedef TFile_ TFile;
+        typedef unsigned TSize;
+        enum { PAGE_SIZE = PAGE_SIZE_ };
+        enum { FRAMES = FRAMES_ };
+    };
+
+/**
+.Tag.ExternalConfigLarge:
+..cat:Strings
+..summary:Large size type configuration for the @Spec.External String at .
+..signature:String<TValue, External< ExternalConfigLarge<> > >
+..signature:String<TValue, External< ExternalConfigLarge<TFile[, pageSize[, frames]]> > >
+..param.TFile:Type of file the External String will be based on.
+...type:Class.File
+..param.pageSize:A positive integer that specifies the number of values in one page.
+...remarks:This should be a power of 2, to speed up transfer and calculations.
+...default:2^20
+..param.frames:A positive integer that specifies the maximum number of pages that should reside in internal memory.
+...remarks:To enable prefetching and automatic swap-out, $frames$ should be greater than 1.
+...default:2
+..remarks:When using this configuration, the @Metafunction.Size@ type of the @Spec.External String@ is the @Metafunction.Size@
+type of $TFile$. Normally this is a 64bit integer. For a smaller size type, use @Tag.ExternalConfig at .
+..remarks:Some data structures store size type values (e.g. suffix arrays in @Class.Index@). To save memory,
+you should think of using @Tag.ExternalConfig at .
+..include:seqan/file.h
+*/
+    // the same as ExternalConfig
+    // but size type is size type of TFile_ (i.e. uint64)
+    //
+    // ATTENTION:
+    // pipes use the size type 
+    // uint64 blows up your suffix arrays, lcp-tables, ...
+    template < typename TFile_ = File<>,				// default file type
+               unsigned PAGE_SIZE_ = 1 * 1024 * 1024,	// 1MTypes per default
+			   unsigned FRAMES_ = 2 >					// simultanous frames
+    struct ExternalConfigLarge {
+        typedef TFile_ TFile;
+        typedef typename Size<TFile_>::Type TSize;
+        enum { PAGE_SIZE = PAGE_SIZE_ };
+        enum { FRAMES = FRAMES_ };
+    };
+
+/**
+.Tag.ExternalConfigSize:
+..cat:Strings
+..summary:Arbitrary size type configuration for the @Spec.External String at .
+..signature:String<TValue, External< ExternalConfigSize< TSize > > >
+..signature:String<TValue, External< ExternalConfigSize< TSize, TFile[, pageSize[, frames]]> > >
+..param.TSize:Size type the External String will return via @Metafunction.Size at .
+..param.TFile:Type of file the External String will be based on.
+...type:Class.File
+..param.pageSize:A positive integer that specifies the number of values in one page.
+...remarks:This should be a power of 2, to speed up transfer and calculations.
+...default:2^20
+..param.frames:A positive integer that specifies the maximum number of pages that should reside in internal memory.
+...remarks:To enable prefetching and automatic swap-out, $frames$ should be greater than 1.
+...default:2
+..remarks:When using this configuration, the @Metafunction.Size@ type of the @Spec.External String@ is the @Metafunction.Size@
+type of $TFile$. Normally this is a 64bit integer. For a smaller size type, use @Tag.ExternalConfig at .
+..remarks:Some data structures store size type values (e.g. suffix arrays in @Class.Index@). To save memory,
+you should think of using @Tag.ExternalConfig at .
+..include:seqan/file.h
+*/
+    // custom size type
+    template < typename TSize_,
+		       typename TFile_ = File<>,				// default file type
+               unsigned PAGE_SIZE_ = 1 * 1024 * 1024,	// 1MTypes per default
+			   unsigned FRAMES_ = 2 >					// simultanous frames
+    struct ExternalConfigSize {
+		typedef TSize_ TSize;
+        typedef TFile_ TFile;
+        enum { PAGE_SIZE = PAGE_SIZE_ };
+        enum { FRAMES = FRAMES_ };
+    };
+
+    template < typename TConfig = ExternalConfig<> >
+    struct External;
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// random External String iterator
+	template < typename TExtString >
+	struct ExtStringIterator
+	{
+		typedef ExtStringIterator						TIterator;
+        typedef ExtStringIterator						TStdIterator;
+
+        typedef typename Value<TExtString>::Type		TValue;
+		typedef typename Size<TExtString>::Type			TSize;
+		typedef typename Difference<TExtString>::Type	TDifference;
+		typedef typename TExtString::TVolatilePtr		TVolatilePtr;
+
+        enum { PAGE_SIZE = TExtString::PAGE_SIZE };
+
+		TSize		offset;
+		TExtString	*extString;
+
+
+	    ExtStringIterator():
+			offset(0),
+			extString(NULL) {}
+
+	    explicit ExtStringIterator(TExtString *_extString, TSize _offset):
+			extString(_extString),
+			offset(_offset) {}
+
+		//////////////////////////////////////////////////////////////////////////////
+		// iterator conversion interface
+
+        ExtStringIterator(const TStdIterator &I):
+			offset(I.offset),
+			extString(I.extString) {}
+
+		//////////////////////////////////////////////////////////////////////////////
+		// iterator arithmetic
+
+        inline TDifference operator- (const TIterator &I) const {
+			return offset - I.offset;
+		}
+		
+		inline TIterator operator- (TDifference delta) const {
+			return TIterator(extString, offset - delta);
+		}
+		
+		inline TIterator& operator-= (TDifference delta) const {
+			offset -= delta;
+			return *this;
+		}
+		
+		inline TIterator operator+ (TDifference delta) const {
+			return TIterator(extString, offset + delta);
+		}
+		
+		inline TIterator& operator+= (TDifference delta) const {
+			offset += delta;
+			return *this;
+		}
+		
+		inline TValue & operator* () const {
+			return (*extString)[offset];
+		}
+    
+/*		inline TValue const & operator* () const {
+			return (*extString)[offset];
+		}
+*/  
+		inline TIterator& operator++ () {
+			++offset; return *this;
+		}
+
+		inline TIterator operator++ (int) {
+			TIterator before = *this;
+			++offset; return before;
+		}
+
+		inline TIterator& operator-- () {
+			--offset; return *this;
+		}
+
+		inline TIterator operator-- (int) {
+			TIterator before = *this;
+			--offset; return before;
+		}
+
+		inline bool operator== (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return offset == I.offset;
+		}
+
+		inline bool operator!= (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return offset != I.offset;
+		}
+
+		inline bool operator< (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return offset < I.offset;
+		}
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// const random External String iterator
+	template < typename TExtString >
+	struct ExtStringConstIterator
+	{
+		typedef ExtStringConstIterator					TIterator;
+        typedef ExtStringIterator<TExtString>			TStdIterator;
+        typedef ExtStringConstIterator					TStdConstIterator;
+
+        typedef typename Value<TExtString>::Type		TValue;
+		typedef typename Size<TExtString>::Type			TSize;
+		typedef typename Difference<TExtString>::Type	TDifference;
+		typedef typename TExtString::TVolatilePtr	    TVolatilePtr;
+
+        enum { PAGE_SIZE = TExtString::PAGE_SIZE };
+
+		TSize		offset;
+		TExtString	*extString;
+		
+		
+	    ExtStringConstIterator():
+			offset(0),
+			extString(NULL) {}
+
+	    explicit ExtStringConstIterator(TExtString *_extString, TSize _offset):
+			extString(_extString),
+			offset(_offset) {}
+
+		//////////////////////////////////////////////////////////////////////////////
+		// iterator conversion interface
+
+		ExtStringConstIterator(const TStdIterator &I):
+			offset(I.offset),
+			extString(I.extString) {}
+
+		ExtStringConstIterator(const TStdConstIterator &I):
+			offset(I.offset),
+			extString(I.extString) {}
+
+		//////////////////////////////////////////////////////////////////////////////
+		// iterator arithmetic
+
+		inline TDifference operator- (const TIterator &I) const {
+			return offset - I.offset;
+		}
+		
+		inline TIterator operator- (TDifference delta) const {
+			return TIterator(extString, offset - delta);
+		}
+		
+		inline TIterator& operator-= (TDifference delta) const {
+			offset -= delta;
+			return *this;
+		}
+		
+		inline TIterator operator+ (TDifference delta) const {
+			return TIterator(extString, offset + delta);
+		}
+		
+		inline TIterator& operator+= (TDifference delta) const {
+			offset += delta;
+			return *this;
+		}
+		
+		inline TValue const & operator* () const {
+			return (*extString)[offset];
+		}
+    
+		inline TIterator& operator++ () {
+			++offset; return *this;
+		}
+
+		inline TIterator operator++ (int) {
+			TIterator before = *this;
+			++offset; return before;
+		}
+
+		inline TIterator& operator-- () {
+			--offset; return *this;
+		}
+
+		inline TIterator operator-- (int) {
+			TIterator before = *this;
+			--offset; return before;
+		}
+
+		inline bool operator== (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return offset == I.offset;
+		}
+
+		inline bool operator!= (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return offset != I.offset;
+		}
+
+		inline bool operator< (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return offset < I.offset;
+		}		
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// forward External String iterator
+	template < typename TExtString >
+    struct ExtStringFwdIterator
+	{
+		typedef ExtStringFwdIterator					TIterator;
+        typedef ExtStringIterator<TExtString>			TStdIterator;
+        typedef ExtStringConstIterator<TExtString>		TStdConstIterator;
+
+		typedef typename Value<TExtString>::Type		TValue;
+		typedef typename Size<TExtString>::Type			TSize;
+		typedef typename Difference<TExtString>::Type	TDifference;
+		typedef typename TExtString::TVolatilePtr	    TVolatilePtr;
+
+        enum { PAGE_SIZE = TExtString::PAGE_SIZE };
+
+
+		TExtString		*extString;
+
+        bool            dirty;
+		int     		pageNo;
+		unsigned		pageOfs;
+        int             prefetch;   // -n .. prefetch n pages downwards, n .. prefetch n pages upwards, 0 .. disabled
+		TVolatilePtr	begin;
+		
+	    ExtStringFwdIterator():
+			extString(NULL),
+			pageNo(0),
+			pageOfs(0),
+            prefetch(0),
+			begin(NULL) {}
+
+		ExtStringFwdIterator(const TIterator &I):
+			extString(I.extString),
+			pageNo(I.pageNo),
+			pageOfs(I.pageOfs),
+            prefetch(I.prefetch),
+			begin(NULL) {}
+
+	    explicit ExtStringFwdIterator(TExtString *_extString, TSize _offset):
+			extString(_extString),
+			pageNo(_offset / PAGE_SIZE),
+			pageOfs(_offset % PAGE_SIZE),
+            prefetch(0),
+			begin(NULL) {}
+
+		explicit ExtStringFwdIterator(TExtString *_extString, TSize _pageNo, TSize _pageOfs):
+			extString(_extString),
+			pageNo(_pageNo),
+			pageOfs(_pageOfs),
+            prefetch(0),
+			begin(NULL) {}
+
+		~ExtStringFwdIterator() {
+			invalidate();
+		}
+
+		//////////////////////////////////////////////////////////////////////////////
+		// iterator conversion interface
+
+		ExtStringFwdIterator(const TStdIterator &I):
+			extString(I.extString),
+			pageNo(I.offset / PAGE_SIZE),
+            pageOfs(I.offset % PAGE_SIZE),
+            prefetch(0),
+			begin(NULL) {}
+
+		inline TIterator& operator=(TStdIterator const & Right_) {
+			invalidate();
+			pageNo = Right_.offset / PAGE_SIZE;
+			pageOfs = Right_.offset % PAGE_SIZE;
+            extString = Right_.extString;
+			return *this;
+		}
+
+        inline operator TStdIterator() const {
+            return TStdIterator(extString, (TSize)pageNo * (TSize)PAGE_SIZE + pageOfs);
+        }
+
+        inline operator TStdConstIterator() const {
+            return TStdConstIterator(extString, (TSize)pageNo * (TSize)PAGE_SIZE + pageOfs);
+        }
+
+		inline TIterator& operator=(TIterator const & Right_) {
+			invalidate();
+			extString = Right_.extString;
+			pageNo = Right_.pageNo;
+			pageOfs = Right_.pageOfs;
+            prefetch = Right_.prefetch;
+			return *this;
+		}
+
+		//////////////////////////////////////////////////////////////////////////////
+		// iterator arithmetic
+
+		inline TDifference operator- (const TIterator &I) const {
+			return (TDifference)(pageNo - I.pageNo) * (TDifference)PAGE_SIZE + (pageOfs - I.pageOfs);
+		}
+		
+		inline TIterator operator- (TDifference delta) const {
+			TDifference dPNo  = delta / PAGE_SIZE;
+			TDifference dPOfs = delta % PAGE_SIZE;
+			if (pageOfs >= dPOfs)
+				return TIterator(extString, pageNo - dPNo, pageOfs - dPOfs);
+			else
+				return TIterator(extString, pageNo - dPNo - 1, PAGE_SIZE + pageOfs - dPOfs);
+		}
+		
+		inline TIterator& operator-= (TDifference delta) {
+			TDifference dPNo  = delta / PAGE_SIZE;
+			TDifference dPOfs = delta % PAGE_SIZE;
+			if (pageOfs < dPOfs) {
+				++dPNo;
+				pageOfs = PAGE_SIZE + pageOfs - dPOfs;
+			} else
+				pageOfs -= dPOfs;
+			if (dPNo) invalidate(0);
+			pageNo -= dPNo;
+			return *this;
+		}
+		
+		inline TIterator operator+ (TDifference delta) const {
+			TDifference dPNo  = delta / PAGE_SIZE;
+			TDifference nPOfs = pageOfs + delta % PAGE_SIZE;
+			if (nPOfs < PAGE_SIZE)
+				return TIterator(extString, pageNo + dPNo, nPOfs);
+			else
+				return TIterator(extString, pageNo + dPNo + 1, nPOfs - PAGE_SIZE);
+		}
+		
+		inline TIterator& operator+= (TDifference delta) {
+			TDifference dPNo  = delta / PAGE_SIZE;
+			TDifference nPOfs = pageOfs + delta % PAGE_SIZE;
+			if (nPOfs >= PAGE_SIZE) {
+				++dPNo;
+				nPOfs -= PAGE_SIZE;
+			}
+			if (dPNo) invalidate(0);
+			pageNo += dPNo;
+			pageOfs = nPOfs;
+			return *this;
+		}
+		
+		inline void validate() const {
+			typename TExtString::TPageFrame &pf = extString->getSharedPage(pageNo, prefetch);
+            const_cast<TIterator*>(this)->dirty = pf.dirty;
+			const_cast<TIterator*>(this)->begin = pf.begin;
+		}
+
+        inline void invalidate(int _prefetch = 0) const {
+            if (begin) {
+                const_cast<TIterator*>(this)->begin = NULL;
+				extString->releasePage(pageNo, (prefetch != 0) || (_prefetch != 0));
+                const_cast<TIterator*>(this)->prefetch = _prefetch;
+            }
+		}
+
+		inline TValue & operator* () const {
+			if (!begin) validate();
+            // synchronize PageFrame dirty flag on dirty false->true change
+            if (!dirty) {
+                const_cast<TIterator*>(this)->dirty = true;
+    			extString->getPage(pageNo).dirty = true;
+            }
+			return const_cast<TIterator*>(this)->begin[pageOfs];
+		}
+/*    
+		inline TValue const & operator* () const {
+			if (!begin) validate();
+			return begin[pageOfs];
+		}
+*/    
+		inline TIterator& operator++ () {
+			if (++pageOfs == PAGE_SIZE) {
+				invalidate(1);
+				pageOfs = 0;
+				++pageNo;
+			}
+			return *this;
+		}
+
+		inline TIterator operator++ (int) {
+			TIterator before = *this;
+			if (++pageOfs == PAGE_SIZE) {
+				invalidate(1);
+				pageOfs = 0;
+				++pageNo;
+			}
+			return before;
+		}
+
+		inline TIterator& operator-- () {
+			if (pageOfs)
+				--pageOfs;
+			else {
+				invalidate(-1);
+				pageOfs = PAGE_SIZE - 1;
+				--pageNo;
+			}
+			return *this;
+		}
+
+		inline TIterator operator-- (int) {
+			TIterator before = *this;
+			if (pageOfs)
+				--pageOfs;
+			else {
+				invalidate(-1);
+				pageOfs = PAGE_SIZE - 1;
+				--pageNo;
+			}
+			return before;
+		}
+
+		inline bool operator== (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return pageNo == I.pageNo && pageOfs == I.pageOfs;
+		}
+
+		inline bool operator!= (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return pageNo != I.pageNo || pageOfs != I.pageOfs;
+		}
+
+		inline bool operator< (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return pageNo < I.pageNo || (pageNo == I.pageNo && pageOfs < I.pageOfs);
+		}
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// const forward External String iterator
+	template < typename TExtString >
+    struct ExtStringFwdConstIterator
+	{
+		typedef ExtStringFwdConstIterator				TIterator;
+        typedef ExtStringIterator<TExtString>			TStdIterator;
+        typedef ExtStringConstIterator<TExtString>		TStdConstIterator;
+        typedef ExtStringFwdIterator<TExtString>		TFwdIterator;
+
+		typedef typename Value<TExtString>::Type		TValue;
+		typedef typename Size<TExtString>::Type			TSize;
+		typedef typename Difference<TExtString>::Type	TDifference;
+		typedef typename TExtString::TVolatilePtr	    TVolatilePtr;
+
+		enum { PAGE_SIZE = TExtString::PAGE_SIZE };
+
+		
+		TExtString		*extString;
+
+		int     		pageNo;
+		unsigned		pageOfs;
+        int             prefetch;   // -n .. prefetch n pages downwards, n .. prefetch n pages upwards, 0 .. disabled
+		TVolatilePtr	begin;
+		
+
+        ExtStringFwdConstIterator():
+			extString(NULL),
+			pageNo(0),
+			pageOfs(0),
+            prefetch(0),
+			begin(NULL) {}
+
+		ExtStringFwdConstIterator(const TIterator &I):
+			extString(I.extString),
+			pageNo(I.pageNo),
+			pageOfs(I.pageOfs),
+            prefetch(I.prefetch),
+			begin(NULL) {}
+
+		ExtStringFwdConstIterator(const TFwdIterator &I):
+			extString(I.extString),
+			pageNo(I.pageNo),
+			pageOfs(I.pageOfs),
+            prefetch(I.prefetch),
+			begin(NULL) {}
+
+		~ExtStringFwdConstIterator() {
+			invalidate();
+		}
+
+	    ExtStringFwdConstIterator(TExtString *_extString, TSize _offset):
+			extString(_extString),
+			pageNo(_offset / PAGE_SIZE),
+			pageOfs(_offset % PAGE_SIZE),
+            prefetch(0),
+			begin(NULL) {}
+
+		ExtStringFwdConstIterator(TExtString *_extString, TSize _pageNo, TSize _pageOfs):
+			extString(_extString),
+			pageNo(_pageNo),
+			pageOfs(_pageOfs),
+            prefetch(0),
+			begin(NULL) {}
+
+		//////////////////////////////////////////////////////////////////////////////
+		// iterator conversion interface
+
+		ExtStringFwdConstIterator(TStdIterator &I):
+			extString(I.extString),
+			pageNo(I.offset / PAGE_SIZE),
+            pageOfs(I.offset % PAGE_SIZE),
+            prefetch(0),
+			begin(NULL) {}
+
+        ExtStringFwdConstIterator(TStdConstIterator const &I):
+			extString(I.extString),
+			pageNo(I.offset / PAGE_SIZE),
+            pageOfs(I.offset % PAGE_SIZE),
+            prefetch(0),
+			begin(NULL) {}
+
+		inline TIterator& operator=(TStdIterator const & Right_) {
+			invalidate();
+			pageNo = Right_.offset / PAGE_SIZE;
+			pageOfs = Right_.offset % PAGE_SIZE;
+            extString = Right_.extString;
+			return *this;
+		}
+
+		inline TIterator& operator=(TStdConstIterator const & Right_) {
+			invalidate();
+			pageNo = Right_.offset / PAGE_SIZE;
+			pageOfs = Right_.offset % PAGE_SIZE;
+            extString = Right_.extString;
+			return *this;
+		}
+
+        inline operator TStdConstIterator() const {
+            return TStdConstIterator(extString, (TSize)pageNo * (TSize)PAGE_SIZE + pageOfs);
+        }
+
+		inline TIterator& operator=(TIterator const & Right_) {
+			invalidate();
+			extString = Right_.extString;
+			pageNo = Right_.pageNo;
+			pageOfs = Right_.pageOfs;
+            prefetch = Right_.prefetch;
+			return *this;
+		}
+
+		inline TIterator& operator=(TFwdIterator const & Right_) {
+			invalidate();
+			extString = Right_.extString;
+			pageNo = Right_.pageNo;
+			pageOfs = Right_.pageOfs;
+            prefetch = Right_.prefetch;
+			return *this;
+		}
+
+		//////////////////////////////////////////////////////////////////////////////
+		// iterator arithmetic
+
+		inline TDifference operator- (const TIterator &I) const {
+			return (TDifference)(pageNo - I.pageNo) * (TDifference)PAGE_SIZE + (pageOfs - I.pageOfs);
+		}
+		
+		inline TIterator operator- (TDifference delta) const {
+			TDifference dPNo  = delta / PAGE_SIZE;
+			TDifference dPOfs = delta % PAGE_SIZE;
+			if (pageOfs >= dPOfs)
+				return TIterator(extString, pageNo - dPNo, pageOfs - dPOfs);
+			else
+				return TIterator(extString, pageNo - dPNo - 1, PAGE_SIZE + pageOfs - dPOfs);
+		}
+		
+		inline TIterator& operator-= (TDifference delta) {
+			TDifference dPNo  = delta / PAGE_SIZE;
+			TDifference dPOfs = delta % PAGE_SIZE;
+			if (pageOfs < dPOfs) {
+				++dPNo;
+				pageOfs = PAGE_SIZE + pageOfs - dPOfs;
+			} else
+				pageOfs -= dPOfs;
+			if (dPNo) invalidate(0);
+			pageNo -= dPNo;
+			return *this;
+		}
+
+		inline TIterator operator+ (TDifference delta) const {
+			TDifference dPNo  = delta / PAGE_SIZE;
+			TDifference nPOfs = pageOfs + delta % PAGE_SIZE;
+			if (nPOfs < PAGE_SIZE)
+				return TIterator(extString, pageNo + dPNo, nPOfs);
+			else
+				return TIterator(extString, pageNo + dPNo + 1, nPOfs - PAGE_SIZE);
+		}
+		
+		inline TIterator& operator+= (TDifference delta) {
+			TDifference dPNo  = delta / PAGE_SIZE;
+			TDifference nPOfs = pageOfs + delta % PAGE_SIZE;
+			if (nPOfs >= PAGE_SIZE) {
+				++dPNo;
+				nPOfs -= PAGE_SIZE;
+			}
+			if (dPNo) invalidate(0);
+			pageNo += dPNo;
+			pageOfs = nPOfs;
+			return *this;
+		}
+		
+		inline void validate() const {
+			typename TExtString::TPageFrame &pf = extString->getSharedPage(pageNo, prefetch);
+			const_cast<TIterator*>(this)->begin = pf.begin;
+		}
+
+        inline void invalidate(int _prefetch = 0) const {
+            if (begin) {
+                const_cast<TIterator*>(this)->begin = NULL;
+				extString->releasePage(pageNo, (prefetch != 0) || (_prefetch != 0));
+                const_cast<TIterator*>(this)->prefetch = _prefetch;
+            }
+		}
+
+		inline TValue const & operator* () const {
+			if (!begin) validate();
+			return begin[pageOfs];
+		}
+    
+		inline TIterator& operator++ () {
+			if (++pageOfs == PAGE_SIZE) {
+				invalidate(1);
+				pageOfs = 0;
+				++pageNo;
+			}
+			return *this;
+		}
+
+		inline TIterator operator++ (int) {
+			TIterator before = *this;
+			if (++pageOfs == PAGE_SIZE) {
+				invalidate(1);
+				pageOfs = 0;
+				++pageNo;
+			}
+			return before;
+		}
+
+		inline TIterator& operator-- () {
+			if (pageOfs)
+				--pageOfs;
+			else {
+				invalidate(-1);
+				pageOfs = PAGE_SIZE - 1;
+				--pageNo;
+			}
+			return *this;
+		}
+
+		inline TIterator operator-- (int) {
+			TIterator before = *this;
+			if (pageOfs)
+				--pageOfs;
+			else {
+				invalidate(-1);
+				pageOfs = PAGE_SIZE - 1;
+				--pageNo;
+			}
+			return before;
+		}
+
+		inline bool operator== (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return pageNo == I.pageNo && pageOfs == I.pageOfs;
+		}
+
+		inline bool operator!= (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return pageNo != I.pageNo || pageOfs != I.pageOfs;
+		}
+
+		inline bool operator< (const TIterator &I) const {
+			SEQAN_ASSERT(extString == I.extString);
+			return pageNo < I.pageNo || (pageNo == I.pageNo && pageOfs < I.pageOfs);
+		}
+
+	};
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// iterator metafunctions
+
+	template < typename TString >
+    struct Container< ExtStringIterator<TString> >			{ typedef TString Type; };
+	template < typename TString >
+    struct Container< ExtStringConstIterator<TString> >		{ typedef TString Type; };
+	template < typename TString >
+    struct Container< ExtStringFwdIterator<TString> >		{ typedef TString Type; };
+	template < typename TString >
+    struct Container< ExtStringFwdConstIterator<TString> >	{ typedef TString Type; };
+
+	template < typename TString >
+    struct Value< ExtStringIterator<TString> >				{ typedef typename Value<TString>::Type Type; };
+	template < typename TString >
+    struct Value< ExtStringConstIterator<TString> >			{ typedef typename Value<TString>::Type Type; };
+	template < typename TString >
+    struct Value< ExtStringFwdIterator<TString> >			{ typedef typename Value<TString>::Type Type; };
+	template < typename TString >
+    struct Value< ExtStringFwdConstIterator<TString> >		{ typedef typename Value<TString>::Type Type; };
+
+	template < typename TString >
+	struct Reference< ExtStringConstIterator<TString> >:
+		public Reference<TString const> {};
+
+	template < typename TString >
+	struct Reference< ExtStringFwdConstIterator<TString> >:
+		public Reference<TString const> {};
+
+	template < typename TString >
+    struct Size< ExtStringIterator<TString> >				{ typedef typename Size<TString>::Type Type; };
+	template < typename TString >
+    struct Size< ExtStringConstIterator<TString> >			{ typedef typename Size<TString>::Type Type; };
+	template < typename TString >
+    struct Size< ExtStringFwdIterator<TString> >			{ typedef typename Size<TString>::Type Type; };
+	template < typename TString >
+    struct Size< ExtStringFwdConstIterator<TString> >		{ typedef typename Size<TString>::Type Type; };
+
+	template < typename TString >
+    struct Position< ExtStringIterator<TString> >			{ typedef typename Position<TString>::Type Type; };
+	template < typename TString >
+    struct Position< ExtStringConstIterator<TString> >		{ typedef typename Position<TString>::Type Type; };
+	template < typename TString >
+    struct Position< ExtStringFwdIterator<TString> >		{ typedef typename Position<TString>::Type Type; };
+	template < typename TString >
+    struct Position< ExtStringFwdConstIterator<TString> >	{ typedef typename Position<TString>::Type Type; };
+
+	template < typename TString >
+    struct Difference< ExtStringIterator<TString> >			{ typedef typename Difference<TString>::Type Type; };
+	template < typename TString >
+    struct Difference< ExtStringConstIterator<TString> >	{ typedef typename Difference<TString>::Type Type; };
+	template < typename TString >
+    struct Difference< ExtStringFwdIterator<TString> >		{ typedef typename Difference<TString>::Type Type; };
+	template < typename TString >
+    struct Difference< ExtStringFwdConstIterator<TString> > { typedef typename Difference<TString>::Type Type; };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+    // global interface
+
+	template <typename TExtString>
+	inline TExtString &	container(ExtStringIterator<TExtString> &it) { return *(it.extString); }
+	template <typename TExtString>
+	inline TExtString &	container(ExtStringIterator<TExtString> const &it) { return *(it.extString); }
+
+	template <typename TExtString>
+	inline TExtString &	container(ExtStringConstIterator<TExtString> &it) { return *(it.extString); }
+	template <typename TExtString>
+	inline TExtString &	container(ExtStringConstIterator<TExtString> const &it) { return *(it.extString); }
+
+	template <typename TExtString>
+	inline TExtString &	container(ExtStringFwdIterator<TExtString> &it) { return *(it.extString); }
+	template <typename TExtString>
+	inline TExtString &	container(ExtStringFwdIterator<TExtString> const &it) { return *(it.extString); }
+
+	template <typename TExtString>
+	inline TExtString &	container(ExtStringFwdConstIterator<TExtString> &it) { return *(it.extString); }
+	template <typename TExtString>
+	inline TExtString &	container(ExtStringFwdConstIterator<TExtString> const &it) { return *(it.extString); }
+//____________________________________________________________________________
+
+	template <typename TExtString>
+	inline bool	atBegin(ExtStringIterator<TExtString> &it) { return it.offset == 0; }
+	template <typename TExtString>
+	inline bool	atBegin(ExtStringIterator<TExtString> const &it) { return it.offset == 0; }
+
+	template <typename TExtString>
+	inline bool	atBegin(ExtStringConstIterator<TExtString> &it) { return it.offset == 0; }
+	template <typename TExtString>
+	inline bool	atBegin(ExtStringConstIterator<TExtString> const &it) { return it.offset == 0; }
+
+	template <typename TExtString>
+	inline bool	atBegin(ExtStringFwdIterator<TExtString> &it) { 
+		return it.pageNo == 0 && it.pageOfs == 0;
+	}
+	template <typename TExtString>
+	inline bool	atBegin(ExtStringFwdIterator<TExtString> const &it) {
+		return it.pageNo == 0 && it.pageOfs == 0;
+	}
+
+	template <typename TExtString>
+	inline bool	atBegin(ExtStringFwdConstIterator<TExtString> &it) { 
+		return it.pageNo == 0 && it.pageOfs == 0;
+	}
+	template <typename TExtString>
+	inline bool	atBegin(ExtStringFwdConstIterator<TExtString> const &it) {
+		return it.pageNo == 0 && it.pageOfs == 0;
+	}
+//____________________________________________________________________________
+
+	template <typename TExtString>
+	inline bool	atEnd(ExtStringIterator<TExtString> &it) { return it.offset == it.extString->data_size; }
+	template <typename TExtString>
+	inline bool	atEnd(ExtStringIterator<TExtString> const &it) { return it.offset == it.extString->data_size; }
+
+	template <typename TExtString>
+	inline bool	atEnd(ExtStringConstIterator<TExtString> &it) { return it.offset == it.extString->data_size; }
+	template <typename TExtString>
+	inline bool	atEnd(ExtStringConstIterator<TExtString> const &it) { return it.offset == it.extString->data_size; }
+
+	template <typename TExtString>
+	inline bool	atEnd(ExtStringFwdIterator<TExtString> &it) { 
+		return TExtString::PAGE_SIZE * it.pageNo + it.pageOfs == it.extString->data_size;
+	}
+	template <typename TExtString>
+	inline bool	atEnd(ExtStringFwdIterator<TExtString> const &it) {
+		return TExtString::PAGE_SIZE * it.pageNo + it.pageOfs == it.extString->data_size;
+	}
+
+	template <typename TExtString>
+	inline bool	atEnd(ExtStringFwdConstIterator<TExtString> &it) { 
+		return TExtString::PAGE_SIZE * it.pageNo + it.pageOfs == it.extString->data_size;
+	}
+	template <typename TExtString>
+	inline bool	atEnd(ExtStringFwdConstIterator<TExtString> const &it) {
+		return TExtString::PAGE_SIZE * it.pageNo + it.pageOfs == it.extString->data_size;
+	}
+
+
+	
+	
+	
+	
+	//////////////////////////////////////////////////////////////////////////////
+    // External String
+    //////////////////////////////////////////////////////////////////////////////
+
+    template < typename TValue,
+               typename TConfig >
+	class String<TValue, External<TConfig> >
+	{
+	public:
+        enum { FRAMES    = TConfig::FRAMES,
+               PAGE_SIZE = TConfig::PAGE_SIZE };
+
+        typedef typename TConfig::TFile							TFile;
+        typedef typename TConfig::TSize							TSize;
+
+		typedef String<int>										TPageTable;
+		typedef PageFrame<TValue, TFile, Fixed<PAGE_SIZE> >		TPageFrame;
+		typedef PageContainer<TPageFrame, FRAMES>		        TCache;
+		typedef VolatilePtr<TValue>								TVolatilePtr;
+
+		TPageTable			pager;
+		TCache				cache;
+		TFile				file;
+        bool                _temporary, _ownFile;
+		TSize				data_size;
+        int                 lastDiskPage;       // the last page on disk and in mem 
+        unsigned            lastDiskPageSize;   // can be smaller than PAGE_SIZE
+
+		String(TSize size = 0):
+            file(NULL),
+			data_size(0)
+        {
+            _temporary = true;
+            _ownFile = false;
+            lastDiskPage = 0;       // actually, these values need not to be initialized
+            lastDiskPageSize = 0;   // here, because of "write before read"
+
+			resize(*this, size);
+        }
+
+/*
+	private:	// making these C'tors private clashes with Holder<external String>
+		String(String &) {}
+		String(String const &) {}
+
+	public:
+*/
+		String(String &) { SEQAN_ABORT("Aborted attempt to copy a String<..,External<..> >") }
+		String(String const &) { SEQAN_ABORT("Aborted attempt to copy a String<..,External<..> >") }
+
+/**
+.Memfunc.ExtString#String:
+..class:Spec.External String
+..summary:Constructor
+..signature:String<TValue, External<TConfig> > ()
+..signature:String<TValue, External<TConfig> > (file)
+..signature:String<TValue, External<TConfig> > (fileName[, openMode])
+..param.file:The @Spec.External String@ will use the file associated with $file$.
+...remarks:You must ensure that $file$ is open, as the string won't call @Function.open@ and @Function.close@ on it.
+...type:Class.File
+..param.fileName:The @Spec.External String@ will @Function.open@ the file with the path $fileName$.
+..param.openMode:File mode for @Function.open at .
+..remarks:When a file or file name is given, this file will be used for the @Spec.External String at .
+If the file exists, this file will be used and determines the strings length and content.
+If the file doesn't exist, a new and empty file will be created and used for the string.
+In both cases, the string won't delete the file in the destructor.
+..remarks:
+When no file is given (default c'tor) the string will be empty and no file is used until the string 
+needs to swap out page frames. Then a temporary file will be used which will be deleted when the string is destroyed.
+..remarks:
+Instead of giving $file$ or $fileName$ to the constructor, you could also use the default constructor and call @Function.open@
+or @Function.openTemp@ afterwards to reach the same behaviour.
+*/
+		String(TFile &_file)
+        {
+			open(*this, _file);
+        }
+
+		String(const char *fileName, int openMode = DefaultOpenMode<TFile>::VALUE):
+			file(NULL)
+        {
+			open(*this, fileName, openMode);
+        }
+
+		~String() 
+		{
+			close(*this);
+		}
+
+		inline TValue & operator[] (TSize offset) {
+			TPageFrame &pf = getPage(offset / PAGE_SIZE);
+			pf.dirty = true;
+			return pf[offset % PAGE_SIZE];
+		}
+
+		inline TValue const & operator[] (TSize offset) const {
+			return const_cast<String*>(this)->getPage(offset / PAGE_SIZE)[offset % PAGE_SIZE];
+		}
+
+	    template <typename TSource>
+	    inline String & operator= (TSource const & source)
+	    {
+		    assign(*this, source);
+		    return *this;
+	    }
+
+	    inline String & operator= (String const & source)
+	    {
+		    assign(*this, source);
+		    return *this;
+	    }
+
+        inline operator bool() 
+		{
+            return file;
+        }
+
+		//////////////////////////////////////////////////////////////////////////////
+		// swapping interface
+
+		// when a page has to be swapped out and file is not open, open a temporary file
+		inline void _ensureFileIsOpen() 
+		{
+			if (!file) 
+			{
+				_temporary = true;
+				if (!(_ownFile = openTemp(file)))
+					::std::cerr << "External String couldn't open temporary file" << ::std::endl;
+			}
+		}
+
+		// for debugging
+        void _dumpCache() 
+		{
+            for(int i = 0; i < length(cache); ++i) 
+			{
+                TPageFrame &pf = cache[i];
+                ::std::cerr << "[" << pf.pageNo << "]";
+                if (pf.dirty)
+                    ::std::cerr << "*";
+                else
+                    ::std::cerr << " ";
+
+                if (pf.status == TPageFrame::READY)
+                    ::std::cerr << "   ";
+                else
+                    ::std::cerr << ".  ";
+            }
+            ::std::cerr << ::std::endl;
+        }
+
+        // return a priority for a page frame (the higher is more persistent)
+        inline typename TPageFrame::Priority getPriority(int /*pageNo*/) const 
+		{
+/*            if (keepFirst && pageNo < (int)(length(cache)) - 10) // save 1 for random access
+                return TPageFrame::PERMANENT_LEVEL;
+            else*/
+                return TPageFrame::NORMAL_LEVEL;
+        }
+
+		// write page to disk if dirty and remove from page table now or after finishing IO
+		inline void flush(TPageFrame &pf) 
+		{
+            if (pf.status == TPageFrame::READY && pf.dirty) {    // write if dirty and not i/o transferring
+				nukeCopies(pf.begin);				            // proceeding writes should wait and set dirty bit
+
+                if (pf.priority > TPageFrame::NORMAL_LEVEL && pf.priority <= TPageFrame::ITERATOR_LEVEL)
+					cache.upgrade(pf, TPageFrame::PREFETCH_LEVEL);
+
+				_ensureFileIsOpen();
+				if (pf.pageNo != (int)(data_size / (TSize)PAGE_SIZE))
+    				writePage(pf, pf.pageNo, file);
+                else {
+                    lastDiskPage = data_size / PAGE_SIZE;
+                    lastDiskPageSize = data_size % PAGE_SIZE;
+				    writeLastPage(pf, pf.pageNo, file, lastDiskPageSize);
+                }
+                pf.dataStatus = TPageFrame::ON_DISK;
+			}
+		}
+
+		// write page synchronously to disk if dirty and remove from page table
+		inline void swapOutAndWait(TPageFrame &pf) 
+		{
+			nukeCopies(pf.begin);      				// proceeding writes should wait and set dirty bit
+
+            if (pf.status != TPageFrame::READY) {            
+				pager[pf.pageNo] = TPageFrame::ON_DISK;		// page is not dirty and on disk
+				waitFor(pf);                                // after finishing i/o transfer
+                pf.pageNo = -1;                             // cut back link
+                return;
+            }
+
+			if (pf.dirty) {                                 // write if dirty
+				_ensureFileIsOpen();
+                if (pf.pageNo != (int)(data_size / (TSize)PAGE_SIZE)) {
+    				writePage(pf, pf.pageNo, file);
+                    if (pf.pageNo >= lastDiskPage)
+                        lastDiskPage = -1;       			// make lastDiskPage(Size) invalid because file size is aligned
+                } else {
+				    writeLastPage(pf, pf.pageNo, file, data_size % PAGE_SIZE);
+                    lastDiskPage = data_size / PAGE_SIZE;
+                    lastDiskPageSize = data_size % PAGE_SIZE;
+                }
+				pager[pf.pageNo] = TPageFrame::ON_DISK;		// page is marked to be on disk
+				waitFor(pf);
+			} else
+				pager[pf.pageNo] = pf.dataStatus;			// restore original data status
+
+            pf.pageNo = -1;                                 // cut back link
+		}
+
+		struct testIODone : public ::std::unary_function<TPageFrame&,bool> 
+		{
+			String &me;
+			testIODone(String &_me): me(_me) {}
+
+			inline bool operator() (TPageFrame &pf) {
+                if (waitFor(pf, 0)) {
+                    if (pf.pageNo >= me.lastDiskPage)
+                        me.lastDiskPage = -1;    // make lastDiskPage(Size) invalid because file size is aligned
+                    return true;
+                } else
+                    return false;
+			}
+		};
+
+        inline TPageFrame &getPage(
+            int pageNo,
+            typename TPageFrame::Priority maxLevel,
+            typename TPageFrame::Priority newLevel,
+            int prefetchPages)
+        {
+			int frameNo = pager[pageNo];
+			if (frameNo >= 0) {					// cache hit
+
+				TPageFrame &pf = cache[frameNo];
+				cache.upgrade(
+                    pf, 
+                    _max(pf.priority, newLevel));    		// update lru order
+
+				if (waitFor(pf))    						// wait for i/o transfer to complete
+                    if (pf.pageNo >= lastDiskPage) {
+                        lastDiskPage = -1;       			// make lastDiskPage(Size) invalid because file size is aligned
+                    }
+
+                if (prefetchPages > 0) prefetch(pageNo + 1, pageNo + 1 + prefetchPages, frameNo);
+                else if (prefetchPages < 0) prefetch(pageNo + prefetchPages, pageNo, frameNo);
+
+				return pf;
+
+			} else {							// cache miss
+
+				typename TPageFrame::DataStatus dataStatus = static_cast<typename TPageFrame::DataStatus>(frameNo);
+				frameNo = cache.mru(testIODone(*this), maxLevel);   // try to get an undirty and READY pageframe
+				if (frameNo < 0)							// if there is none,
+					frameNo = cache.mruDirty();				// get the most recently used dirty frame
+				TPageFrame &pf = cache[frameNo];
+
+				// *** frame is choosen ***
+
+				if (pf.begin)
+					swapOutAndWait(pf);						// write synchronously to disk, if page is dirty
+				else
+					allocPage(pf, file);                    // allocate memory if page is virgin
+
+				// *** frame is free now ***
+
+				pf.dataStatus = dataStatus;
+				if (dataStatus == TPageFrame::ON_DISK)
+				{
+                    if (pageNo != lastDiskPage)
+					    readPage(pageNo, pf, file);
+                    else
+                        readLastPage(pageNo, pf, file, lastDiskPageSize);
+				}
+				pager[pageNo] = frameNo;					// assign new page to page table
+				pf.pageNo = pageNo;							// set back link
+				cache.upgrade(
+                    pf,
+                    _max(getPriority(pageNo), newLevel));    // update lru order
+
+                if (prefetchPages > 0) prefetch(pageNo + 1, pageNo + 1 + prefetchPages, frameNo);
+                else if (prefetchPages < 0) prefetch(pageNo + prefetchPages, pageNo, frameNo);
+                
+                waitFor(pf);    							// wait for i/o transfer to complete
+				return pf;
+			}
+		}
+        
+		inline TPageFrame &getPage(int pageNo)
+        {
+			return getPage(pageNo, TPageFrame::NORMAL_LEVEL, TPageFrame::NORMAL_LEVEL, 0);
+		}
+
+        // prefetch is non-blocking and should speed up swapping
+		inline void prefetch(int pageBegin, int pageEnd, int except = -1) 
+		{
+            if (!file) return;
+            if (pageBegin < 0)					pageBegin = 0;
+            if (pageEnd >= (int)length(pager))	pageEnd = (int)length(pager) - 1;
+            for(int pageNo = pageBegin; pageNo < pageEnd; ++pageNo) {
+			    int frameNo = pager[pageNo];
+				typename TPageFrame::DataStatus dataStatus = static_cast<typename TPageFrame::DataStatus>(frameNo);
+                if (dataStatus == TPageFrame::ON_DISK &&             // prefetch only if page is on disk
+                    pageNo != lastDiskPage)                         // reading the last page is blocking
+                {   
+				    frameNo = cache.mru(
+                        testIODone(*this),
+                        TPageFrame::NORMAL_LEVEL);                   // choose undirty and ready page
+
+                    if (frameNo < 0 || frameNo == except) return;   // no lowlevel-page left for prefetching
+				    TPageFrame &pf = cache[frameNo];
+                    #ifdef SEQAN_VERBOSE
+						::std::cerr << "prefetch: page " << pageNo << ::std::endl;
+                    #endif
+
+                    // *** frame is choosen ***
+
+				    if (pf.begin)
+					    swapOutAndWait(pf);						    // write synchronously to disk, if page is dirty
+				    else
+					    allocPage(pf, file);                        // allocate memory if page is virgin
+
+    				// *** frame is free now ***
+
+    				pf.dataStatus = dataStatus;
+                    readPage(pageNo, pf, file);
+				    pager[pageNo] = frameNo;					    // assign new page to page table
+    				pf.pageNo = pageNo;							    // set back link
+                    cache.upgrade(pf, TPageFrame::PREFETCH_LEVEL);  // update lru order
+                }
+            }
+		}
+		
+	    template < typename T >
+		inline static int _prefetchIffAsync(int /*prefetchPages*/, T const &) {
+			return 0;
+		}
+		
+		template < typename TSpec >
+		inline static int _prefetchIffAsync(int prefetchPages, File<Async<TSpec> > const &) {
+			return prefetchPages;
+		}
+
+		inline TPageFrame &getSharedPage(int pageNo, int prefetchPages = 0) 
+		{
+			return getPage(
+                pageNo, 
+                TPageFrame::PREFETCH_LEVEL, 
+                TPageFrame::ITERATOR_LEVEL,
+                _prefetchIffAsync(prefetchPages, file));
+		}
+
+		inline void releasePage(int pageNo, bool writeThrough = false) 
+		{
+			int frameNo = pager[pageNo];
+			if (frameNo >= 0)							// release only cached pages
+			{								        
+				TPageFrame &pf = cache[frameNo];
+				if (pf.begin.isLonely() && pf.priority <= TPageFrame::ITERATOR_LEVEL) 
+				{
+					cache.upgrade(pf, _max(getPriority(pageNo), TPageFrame::NORMAL_LEVEL));
+                    if (writeThrough) 
+					{
+                        #ifdef SEQAN_VERBOSE
+                            if (pf.dirty)
+								::std::cerr << "writeThrough: page " << pageNo << ::std::endl;
+                        #endif
+					    flush(pf);							        // write if dirty
+                    }
+				}
+			}
+		}
+        
+        inline void rename(unsigned frameNo) 
+		{
+			TPageFrame &pf = cache[frameNo];
+            cache.rename(frameNo);                                  // update lru entry
+            if (pf.pageNo >= 0)
+                pager[pf.pageNo] = frameNo;					        // update back link
+        }
+
+        // change the number of in-mem pageframes
+        // more pages mean less swapping, 
+        // less pages mean more free mem
+        inline void resizeCache(unsigned newFrames) 
+		{
+            unsigned oldFrames = length(cache);
+            if (data_size)
+                newFrames = _min(newFrames, (unsigned) enclosingBlocks(data_size, (unsigned)PAGE_SIZE));
+            if (newFrames < oldFrames) {
+                flush(*this);
+                for(unsigned i = newFrames; i < oldFrames; ++i) {
+    			    int frameNo = cache.mruDirty();             // get the most recently used frame (can be dirty)
+                    if (frameNo < 0) break;
+				    TPageFrame &pf = cache[frameNo];
+
+				    // *** frame is choosen ***
+
+                    if (pf.begin) {
+					    swapOutAndWait(pf);						// write synchronously to disk, if page is dirty
+        				freePage(pf, file);                     // free memory
+                    }
+
+                    cache.erase(frameNo);                       // erase page frame from cache
+
+                    for(unsigned j = frameNo; j < length(cache); ++j)
+                        rename(j);                              // update remaining pages
+                }
+            } else if (oldFrames < newFrames) {
+                resize(cache, newFrames);
+            }
+        }
+
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// handler that manages a simple memory buffer
+/*    template < typename TValue,
+               typename TConfig,
+			   typename TSpec >
+	struct BufferHandler< Pipe< String<TValue, External<TConfig> >, Source<TSpec> > >
+    {
+        typedef TValue                                                      TValue;
+        typedef typename Size< String<TValue, External<TConfig> > >::Type   TSize;
+        typedef SimpleBuffer<TValue, TSize>									SimpleBuffer;
+
+        typedef Pipe< String<TValue, External<TConfig> >, Source<TSpec> > Pipe;
+
+		Pipe			&pipe;
+        int             pageNo;
+
+		BufferHandler(Pipe &_pipe):
+			pipe(_pipe) {}
+
+        inline SimpleBuffer& begin() {
+            return pipe.in.getPage(pageNo = 0);
+        }
+
+        inline SimpleBuffer& next() {
+            return pipe.in.getPage(++pageNo);
+        }
+
+        inline void process() {}
+        inline void end() {}
+        inline void cancel() {}
+    };*/
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // meta-function interface
+
+    template < typename TValue, typename TConfig >
+    struct Size< String<TValue, External<TConfig> > >
+    {
+        typedef typename String<TValue, External<TConfig> >::TSize Type;
+    };
+
+    template < typename TValue, typename TConfig >
+    struct Difference< String<TValue, External<TConfig> > >
+    {
+		typedef typename MakeSigned_<typename String<TValue, External<TConfig> >::TSize>::Type Type;
+    };
+
+    template < typename TValue, typename TConfig, typename TSpec >
+    struct Iterator< String<TValue, External<TConfig> > const, Tag<TSpec> const >
+    {
+        typedef ExtStringFwdConstIterator< String<TValue, External<TConfig> > > Type;
+    };
+
+    template < typename TValue, typename TConfig, typename TSpec >
+    struct Iterator< String<TValue, External<TConfig> >, Tag<TSpec> const > 
+    {
+        typedef ExtStringFwdIterator< String<TValue, External<TConfig> > > Type;
+    };
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig >
+	struct DefaultOverflowExplicit<String<TValue, External<TConfig> > >
+	{
+		typedef Generous Type;
+	};
+
+    template < typename TValue, typename TConfig >
+	struct DefaultOverflowImplicit<String<TValue, External<TConfig> > >
+	{
+		typedef Generous Type;
+	};
+//____________________________________________________________________________
+
+/*
+    template < typename TValue, typename TConfig >
+	struct DefaultIteratorSpec< String<TValue, External<TConfig> > > {
+		typedef Standard Type;
+	};
+	
+    template < typename TValue, typename TConfig >
+	struct DefaultIteratorSpec< String<TValue, External<TConfig> > const > {
+		typedef Standard Type;
+	};
+*/
+
+    template < typename TValue, typename TConfig >
+	struct AllowsFastRandomAccess< String<TValue, External<TConfig> > >
+	{
+		typedef False Type;
+		enum { VALUE = false };
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+    // global interface
+
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig >
+    inline void 
+    clear(String<TValue, External<TConfig> > &me) 
+	{
+		clear(me.pager);
+        resize(me, 0);
+    }
+//____________________________________________________________________________
+
+	// wait until IO of every page is finished
+    template < typename TValue, typename TConfig >
+	inline void 
+	waitForAll(String<TValue, External<TConfig> > &me)
+	{
+		typedef typename String<TValue, External<TConfig> >::TCache	TCache;
+		typedef typename Iterator<TCache, Standard>::Type			TIter;
+
+		TIter f = begin(me.cache, Standard());
+		TIter fEnd = end(me.cache, Standard());
+
+		for(; f != fEnd ; ++f)
+			waitFor(*f);
+	}
+	
+/**
+.Function.flush:
+..signature:flush(string)
+..param.string:An external string. All dirty pages are flushed to disk.
+...type:Spec.External String
+..include:seqan/file.h
+*/
+    template < typename TValue, typename TConfig >
+    inline void 
+	flush(String<TValue, External<TConfig> > &me) 
+	{
+		typedef typename String<TValue, External<TConfig> >::TCache	TCache;
+		typedef typename Iterator<TCache, Standard>::Type			TIter;
+
+		// write all dirty pages to disk
+		if (me.file)
+		{
+			TIter f = begin(me.cache, Standard());
+			TIter fEnd = end(me.cache, Standard());
+
+			for(; f != fEnd ; ++f)
+				if ((*f).begin) me.flush(*f);
+			waitForAll(me);
+		}
+    }
+
+	// cancel all transactions
+    template < typename TValue, typename TConfig >
+	inline void 
+	cancel(String<TValue, External<TConfig> > &me)
+	{
+		typedef typename String<TValue, External<TConfig> >::TCache	TCache;
+		typedef typename Iterator<TCache, Standard>::Type			TIter;
+
+		if (me.file) 
+		{
+			TIter f = begin(me.cache, Standard());
+			TIter fEnd = end(me.cache, Standard());
+
+			for(; f != fEnd ; ++f)
+				if ((*f).begin) cancel(*f, me.file);
+		}
+	}
+
+	// cancel all transactions and free allocated pages
+    template < typename TValue, typename TConfig >
+	inline void 
+	cancelAndFree(String<TValue, External<TConfig> > &me)
+	{
+		typedef String<TValue, External<TConfig> >					TExtString;
+		typedef typename TExtString::TPageFrame						TPageFrame;
+		typedef typename String<TValue, External<TConfig> >::TCache	TCache;
+		typedef typename Iterator<TCache, Standard>::Type			TIter;
+
+		if (me.file) 
+		{
+			TIter f = begin(me.cache, Standard());
+			TIter fEnd = end(me.cache, Standard());
+
+			for(; f != fEnd ; ++f) 
+			{
+				if ((*f).begin) cancel(*f, me.file);
+				if ((*f).pageNo >= 0) 
+				{
+					me.pager[(*f).pageNo] = (*f).dataStatus;
+					(*f).pageNo = TPageFrame::UNINITIALIZED;
+				}
+//				::std::cerr << *f << ::std::endl;
+				if ((*f).begin) freePage(*f, me.file);
+			}
+		}
+	}
+
+	// flush and free all allocated pages
+    template < typename TValue, typename TConfig >
+	inline void 
+	flushAndFree(String<TValue, External<TConfig> > &me)
+	{
+		typedef String<TValue, External<TConfig> >			TExtString;
+		typedef typename TExtString::TPageFrame				TPageFrame;
+		typedef typename TExtString::TCache					TCache;
+		typedef typename Iterator<TCache, Standard>::Type	TIter;
+
+		if (me.file) 
+		{
+			flush(me);
+
+			TIter f = begin(me.cache, Standard());
+			TIter fEnd = end(me.cache, Standard());
+
+			for(; f != fEnd ; ++f) 
+			{
+				if ((*f).pageNo >= 0) 
+				{
+					me.pager[(*f).pageNo] = (*f).dataStatus;
+					(*f).pageNo = TPageFrame::UNINITIALIZED;
+				}
+//				::std::cerr << *f << ::std::endl;
+				if ((*f).begin) freePage(*f, me.file);
+			}
+		}
+	}
+//____________________________________________________________________________
+/**
+.Function.open:
+..signature:open(string, fileName[, openMode]))
+..param.string:An external string.
+...type:Spec.External String
+..include:seqan/file.h
+*/
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    open(String<TValue, External<TConfig> > &me, const char *fileName, int openMode) 
+	{
+		typedef String<TValue, External<TConfig> >			TExtString;
+		typedef typename TExtString::TPageFrame				TPageFrame;
+
+		me._temporary = false;
+		if ((me._ownFile = open(me.file, fileName, openMode)))
+            me.data_size = size(me.file) / sizeof(TValue);
+        else
+            me.data_size = 0;
+
+		resize(me.pager, enclosingBlocks(me.data_size, 
+			(unsigned)me.PAGE_SIZE), (me.data_size)? 
+				TPageFrame::ON_DISK: 
+				TPageFrame::UNINITIALIZED);
+
+        me.lastDiskPage = me.data_size / me.PAGE_SIZE;
+        me.lastDiskPageSize = me.data_size % me.PAGE_SIZE;
+		return me._ownFile;
+    }
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    open(String<TValue, External<TConfig> > &me, const char *fileName) 
+	{
+		typedef String<TValue, External<TConfig> >	TExtString;
+		typedef typename TExtString::TFile			TFile;
+
+		return open(me, fileName, DefaultOpenMode<TFile>::VALUE);
+    }
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    open(String<TValue, External<TConfig> > &me, typename TConfig::TFile file) 
+	{
+		typedef String<TValue, External<TConfig> >	TExtString;
+		typedef typename TExtString::TPageFrame		TPageFrame;
+
+		me.file = file;
+        me._temporary = false;
+        me._ownFile = false;
+        if (me.file)
+            me.data_size = size(me.file) / sizeof(TValue);
+        else
+            me.data_size = 0;
+
+		resize(me.pager, enclosingBlocks(me.data_size, 
+			(unsigned)me.PAGE_SIZE), (me.data_size)? 
+				TPageFrame::ON_DISK: 
+				TPageFrame::UNINITIALIZED);
+
+        me.lastDiskPage = me.data_size / me.PAGE_SIZE;
+        me.lastDiskPageSize = me.data_size % me.PAGE_SIZE;
+		return me._file;
+    }
+
+/**
+.Function.openTemp:
+..signature:openTemp(string)
+..param.string:An external string.
+...type:Spec.External String
+..include:seqan/file.h
+*/
+	template < typename TValue, typename TConfig >
+    inline bool 
+    openTemp(String<TValue, External<TConfig> > &me) 
+	{
+        me._temporary = true;
+        me.lastDiskPage = 0;
+        me.lastDiskPageSize = 0;
+		clear(me.pager);
+		return me._ownFile = openTemp(me.file);
+    }
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    save(String<TValue, External<TConfig> > const &/*me*/, const char * /*fileName*/, int /*openMode*/) {
+		// External Strings are persistent, thus there is no need to save them
+		//ExtStringsDontNeedToBeSaved error;
+		return true;
+	}
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    save(String<TValue, External<TConfig> > const &/*me*/, const char * /*fileName*/) {
+		// External Strings are persistent, thus there is no need to save them
+		//ExtStringsDontNeedToBeSaved error;
+		return true;
+	}
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    save(String<TValue, External<TConfig> > const &/*me*/, typename TConfig::TFile /*file*/) {
+		// External Strings are persistent, thus there is no need to save them
+		//ExtStringsDontNeedToBeSaved error;
+		return true;
+	}
+//____________________________________________________________________________
+/**
+.Function.close:
+..signature:close(string)
+..param.string:An external string.
+...type:Spec.External String
+..include:seqan/file.h
+*/
+	template < typename TValue, typename TConfig >
+    inline bool 
+    close(String<TValue, External<TConfig> > &me) 
+	{
+		// close associated file
+		if (me._temporary)
+			cancelAndFree(me);
+		else
+			flushAndFree(me);
+		clear(me.pager);
+
+		if (me._ownFile) 
+		{
+			me._ownFile = false;
+			return close(me.file);
+		} 
+		else
+			return true;
+    }
+//____________________________________________________________________________
+///.Function.length.param.object.type:Class.Shape
+
+	template < typename TValue, typename TConfig >
+    inline typename Size< String<TValue, External<TConfig> > >::Type
+    length(String<TValue, External<TConfig> > const &me)
+    {
+        return me.data_size;
+    }
+
+	template < typename TValue, typename TConfig >
+    inline typename Size< String<TValue, External<TConfig> > >::Type
+    capacity(String<TValue, External<TConfig> > const &me)
+    {
+		typedef typename Size< String<TValue, External<TConfig> > >::Type TSize;
+        return (TSize)capacity(me.pager) * (TSize)me.PAGE_SIZE;
+    }
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig, typename TNewSize, typename TExpand >
+    inline typename Size< String<TValue, External<TConfig> > >::Type
+    resize(
+	    String<TValue, External<TConfig> > &me,
+		TNewSize new_length,
+		Tag<TExpand> const expand)
+	{
+		typedef String<TValue, External<TConfig> >	TString;
+		typedef typename TString::TPageFrame		TPageFrame;
+		typedef typename Size<TString>::Type		TSize;
+
+		resize(me.pager, enclosingBlocks(new_length, (unsigned)me.PAGE_SIZE), TPageFrame::UNINITIALIZED, expand);
+        if ((TSize)new_length < me.data_size && me.file) 
+		{
+			// wait for all pending transfers
+            waitForAll(me);
+
+			// before shrinking the file size
+            resize(me.file, (TSize)new_length * (TSize)sizeof(TValue));
+            me.lastDiskPage = new_length / me.PAGE_SIZE;
+            me.lastDiskPageSize = new_length % me.PAGE_SIZE;
+        }
+		me.data_size = new_length;
+		return length(me);
+	}
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig, typename TSize, typename TExpand >
+    inline typename Size< String<TValue, External<TConfig> > >::Type
+    reserve(
+	    String<TValue, External<TConfig> > &me,
+		TSize new_capacity,
+		Tag<TExpand> const expand)
+	{
+		reserve(me.pager, enclosingBlocks(new_capacity, (unsigned)me.PAGE_SIZE), expand);
+		return capacity(me);
+	}
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig, typename TSpec >
+    inline typename Iterator<String<TValue, External<TConfig> >, Tag<TSpec> const>::Type
+    begin(String<TValue, External<TConfig> > &me, Tag<TSpec> const) 
+	{
+		typedef String<TValue, External<TConfig> > TString;
+		return typename Iterator<TString, Tag<TSpec> const>::Type (&me, 0);
+    }
+
+    template < typename TValue, typename TConfig, typename TSpec >
+    inline typename Iterator<String<TValue, External<TConfig> > const, Tag<TSpec> const>::Type
+    begin(String<TValue, External<TConfig> > const &me, Tag<TSpec> const) 
+	{
+		typedef String<TValue, External<TConfig> > TString;
+		return typename Iterator<TString const, Tag<TSpec> const>::Type (const_cast<TString*>(&me), 0);
+    }
+
+    template < typename TValue, typename TConfig, typename TSpec >
+    inline typename Iterator<String<TValue, External<TConfig> >, Tag<TSpec> const>::Type
+    end(String<TValue, External<TConfig> > &me, Tag<TSpec> const) 
+	{
+		typedef String<TValue, External<TConfig> > TString;
+		return typename Iterator<TString, Tag<TSpec> const>::Type (&me, length(me));
+    }
+
+    template < typename TValue, typename TConfig, typename TSpec >
+    inline typename Iterator<String<TValue, External<TConfig> > const, Tag<TSpec> const>::Type
+    end(String<TValue, External<TConfig> > const &me, Tag<TSpec> const) 
+	{
+		typedef String<TValue, External<TConfig> > TString;
+		return typename Iterator<TString const, Tag<TSpec> const>::Type (const_cast<TString*>(&me), length(me));
+    }
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig, typename TPos >
+    inline typename Reference<String<TValue, External<TConfig> > >::Type 
+    value(String<TValue, External<TConfig> > &me, TPos pos)
+    {
+	    return me[pos];
+    }
+
+    template < typename TValue, typename TConfig, typename TPos >
+    inline typename Reference<String<TValue, External<TConfig> > const>::Type 
+    value(String<TValue, External<TConfig> > const &me, TPos pos)
+    {
+	    return me[pos];
+    }
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig, typename TExpand >
+	inline void
+	appendValue(String<TValue, External<TConfig> > &me, 
+				TValue const &Val_,
+				Tag<TExpand> const expand)
+	{
+		resize(me, me.data_size + 1, expand);
+		back(me) = Val_;
+	}
+
+//____________________________________________________________________________
+// stack interface
+
+    template < typename TValue, typename TConfig >
+    inline void
+    push(String<TValue, External<TConfig> > &me, TValue const &Val_)
+    {
+		appendValue(me, Val_);
+    }
+
+    template < typename TValue, typename TConfig >
+    inline void
+    push_back(String<TValue, External<TConfig> > &me, TValue const &Val_)
+    {
+		appendValue(me, Val_);
+    }
+
+    template < typename TValue, typename TConfig >
+	inline void pop_back(String<TValue, External<TConfig> > &me)
+    {
+		resize(me, me.data_size - 1);
+	}
+
+    template < typename TValue, typename TConfig >
+	inline TValue &
+	front(String<TValue, External<TConfig> > &me)
+    {
+		return me[0];
+	}
+
+    template < typename TValue, typename TConfig >
+	inline TValue const &
+	front(String<TValue, External<TConfig> > const &me)
+    {
+		return me[0];
+	}
+
+    template < typename TValue, typename TConfig >
+	inline TValue &
+	back(String<TValue, External<TConfig> > &me)
+    {
+		return me[me.data_size - 1];
+	}
+
+    template < typename TValue, typename TConfig >
+	inline TValue const &
+	back(String<TValue, External<TConfig> > const &me)
+    {
+		return me[me.data_size - 1];
+	}
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig, typename TSource, typename TExpand >
+	inline void
+	append(String<TValue, External<TConfig> > &target, 
+				TSource const &source,
+				Tag<TExpand> const expand)
+	{
+		typedef String<TValue, External<TConfig> >					TTarget;
+        typedef typename Iterator<TSource const, Standard>::Type	ISource;
+        typedef typename Iterator<TTarget, Standard>::Type			ITarget;
+
+        ITarget it_target       = end(target, Standard());
+		
+		resize(target, length(target) + length(source), expand);
+		
+        ISource it_source       = begin(source, Standard());
+        ISource it_source_end   = end(source, Standard());
+		
+		for (; it_source != it_source_end; ++it_source, ++it_target)
+			*it_target = *it_source;
+	}
+
+	template < typename TValue, typename TConfig, typename TSourceValue, typename TExpand >
+	inline void
+	append(String<TValue, External<TConfig> > &target, 
+				TSourceValue * source,
+				Tag<TExpand> const expand)
+	{
+		typedef String<TValue, External<TConfig> >					TTarget;
+        typedef typename Iterator<TSourceValue *, Standard>::Type	ISource;
+        typedef typename Iterator<TTarget, Standard>::Type			ITarget;
+
+        ITarget it_target       = end(target, Standard());
+		
+		resize(target, length(target) + length(source), expand);
+		
+        ISource it_source       = begin(source, Standard());
+        ISource it_source_end   = end(source, Standard());
+		
+		for (; it_source != it_source_end; ++it_source, ++it_target)
+			*it_target = *it_source;
+	}
+
+
+/*
+    template < typename TSpec >
+	std::ostream& operator<<(std::ostream &out, String<char, TSpec > &p) {
+
+        typename Iterator< String<char, TSpec > >::Type _cur = begin(p), _end = end(p);
+        while (_cur != _end) {
+		    out << *_cur;
+            ++_cur;
+        }
+		return out;
+	}
+
+    template < typename TValue, typename TSpec >
+	std::ostream& operator<<(std::ostream &out, String<TValue, TSpec > &p) {
+
+        typename Iterator< String<TValue, TSpec > >::Type _cur = begin(p), _end = end(p);
+        while (_cur != _end) {
+		    out << *_cur << " ";
+            ++_cur;
+        }
+		return out;
+	}
+*/
+//____________________________________________________________________________
+// sequence -> external string
+
+    template < typename TValue,
+               typename TConfig,
+               typename TSource,
+			   typename TExpand >
+    inline void assign(
+		String<TValue, External<TConfig> > &target, 
+		TSource const &source, 
+		Tag<TExpand> const) 
+	{
+		typedef String<TValue, External<TConfig> >					TTarget;
+        typedef typename Iterator<TSource const, Standard>::Type	ISource;
+        typedef typename Iterator<TTarget, Standard>::Type			ITarget;
+
+        resize(target, length(source));
+
+        ISource it_source       = begin(source, Standard());
+        ISource it_source_end   = end(source, Standard());
+        ITarget it_target       = begin(target, Standard());
+		
+		for (; it_source != it_source_end; ++it_source, ++it_target)
+			*it_target = *it_source;
+    }
+
+    template < typename TValue,
+               typename TConfig,
+               typename TSourceValue,
+			   typename TExpand >
+    inline void assign(
+		String<TValue, External<TConfig> > &target, 
+		TSourceValue * source,
+		Tag<TExpand> const) 
+	{
+		typedef String<TValue, External<TConfig> >					TTarget;
+        typedef typename Iterator<TSourceValue *, Standard>::Type	ISource;
+        typedef typename Iterator<TTarget, Standard>::Type			ITarget;
+
+        resize(target, length(source));
+
+        ISource it_source       = begin(source, Standard());
+        ISource it_source_end   = end(source, Standard());
+        ITarget it_target       = begin(target, Standard());
+		
+		for (; it_source != it_source_end; ++it_source, ++it_target)
+			*it_target = *it_source;
+    }
+
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig >
+    inline void const * 
+    id(String<TValue, External<TConfig> > const &me)
+    {
+        return &(*begin(me.pager));
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/file/string_mmap.h b/src/SeqAn-1.3/seqan/file/string_mmap.h
new file mode 100644
index 0000000..7a330ec
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/file/string_mmap.h
@@ -0,0 +1,832 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STRING_MMAP_H
+#define SEQAN_HEADER_STRING_MMAP_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+    template < typename TFile_ = File<>,				// default file type
+               typename TSize_ = size_t >				// size type
+    struct MMapConfig {
+        typedef TFile_ TFile;
+        typedef TSize_ TSize;
+    };
+
+    template < typename TConfig = MMapConfig<> >
+    struct MMap;
+	
+	
+	//////////////////////////////////////////////////////////////////////////////
+    // Memory Mapped String
+    //////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.MMap String:
+..cat:Strings
+..general:Class.String
+..summary:String that is stored in external memory. Uses memory mapping.
+..signature:String<TValue, MMap<> >
+..signature:String<TValue, MMap<TConfig> >
+..param.TValue:The value type, that is the type of the items/characters stored in the string.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.TConfig:A structure to configure the memory mapped string.
+...type:Tag.ExternalConfig
+...type:Tag.ExternalConfigLarge
+...type:Tag.ExternalConfigSize
+...default:@Tag.ExternalConfig@
+..remarks:The MMap String enables to access sequences larger than the available physical memory (RAM) by using
+external memory (e.g. Hard disk, Network storage, ...) mapped into memory.
+The size of the string is limited by external memory and the logical address space (4GB on a 32bit OS).
+See the @Memfunc.ExtString#String.constructor@ for more details.
+..remarks:This String also supports fast appending and removing of values at the end (see @Spec.Block String@, @Function.appendValue@)
+..include:seqan/file.h
+*/
+
+#ifdef PLATFORM_WINDOWS
+
+		enum MMapAdviseScheme {
+			MMAP_NORMAL = 0,
+			MMAP_RANDOM = 0,
+			MMAP_SEQUENTIAL = 0,
+			MMAP_WILLNEED = 0,
+			MMAP_DONTNEED = 0
+		};
+
+#else
+
+		enum MMapAdviseScheme {
+			MMAP_NORMAL = POSIX_MADV_NORMAL,
+			MMAP_RANDOM = POSIX_MADV_RANDOM,
+			MMAP_SEQUENTIAL = POSIX_MADV_SEQUENTIAL,
+			MMAP_WILLNEED = POSIX_MADV_WILLNEED,
+			MMAP_DONTNEED = POSIX_MADV_DONTNEED
+		};
+
+#endif
+
+    template < typename TValue,
+               typename TConfig >
+	class String<TValue, MMap<TConfig> >
+	{
+	public:
+
+        typedef typename TConfig::TFile		TFile;
+        typedef typename TConfig::TSize		TSize;
+
+		TValue				*data_begin;
+		TValue				*data_end;
+		TSize				data_capacity;
+
+		TFile				file;
+		int					_openMode;
+        bool                _temporary, _ownFile;
+
+#ifdef PLATFORM_WINDOWS
+        HANDLE				handle;
+#endif
+		MMapAdviseScheme	scheme;
+
+		String(TSize size = 0):
+			data_begin(0),
+			data_end(0),
+			data_capacity(0),
+            file(NULL),
+			scheme(MMAP_NORMAL)
+        {
+            _temporary = true;
+            _ownFile = false;
+
+			resize(*this, size);
+        }
+
+		String(TFile &_file):
+			data_begin(0),
+			data_end(0),
+			data_capacity(0),
+            file(NULL),
+			scheme(MMAP_NORMAL)
+        {
+			open(*this, _file);
+        }
+
+		String(const char *fileName, int openMode = DefaultOpenMode<TFile>::VALUE):
+			data_begin(0),
+			data_end(0),
+			data_capacity(0),
+            file(NULL),
+			scheme(MMAP_NORMAL)
+        {
+			open(*this, fileName, openMode);
+        }
+
+		template <typename TSource>
+		String & operator =(TSource const & source)
+		{
+	SEQAN_CHECKPOINT
+			assign(*this, source);
+			return *this;
+		}
+		String & operator =(String const & source)
+		{
+	SEQAN_CHECKPOINT
+			assign(*this, source);
+			return *this;
+		}
+
+		~String() 
+		{
+			close(*this);
+		}
+
+//____________________________________________________________________________
+
+		template <typename TPos>
+		inline typename Reference<String>::Type
+		operator [] (TPos pos)
+		{
+	SEQAN_CHECKPOINT
+			return value(*this, pos);
+		}
+
+		template <typename TPos>
+		inline typename Reference<String const>::Type 
+		operator [] (TPos pos) const
+		{
+	SEQAN_CHECKPOINT
+			return value(*this, pos);
+		}
+
+//____________________________________________________________________________
+
+        inline operator bool() 
+   	{
+            return file;
+        }
+
+//____________________________________________________________________________
+
+};
+
+   template < typename TValue, typename TConfig >
+	inline typename Iterator<String<TValue, MMap<TConfig> > , Standard>::Type
+	begin(String<TValue, MMap<TConfig> > & me,
+		Standard)
+	{
+SEQAN_CHECKPOINT
+		return me.data_begin;
+	}
+   template < typename TValue, typename TConfig >
+	inline typename Iterator<String<TValue, MMap<TConfig> >  const, Standard>::Type
+	begin(String<TValue, MMap<TConfig> > const & me,
+		Standard)
+	{
+SEQAN_CHECKPOINT
+		return me.data_begin;
+	}
+
+//____________________________________________________________________________
+
+   template < typename TValue, typename TConfig >
+   inline typename Iterator<String<TValue, MMap<TConfig> > , Standard>::Type
+	end(String<TValue, MMap<TConfig> > & me,
+		Standard)
+	{
+SEQAN_CHECKPOINT
+		return me.data_end;
+	}
+   template < typename TValue, typename TConfig >
+	inline typename Iterator<String<TValue, MMap<TConfig> >  const, Standard>::Type
+	end(String<TValue, MMap<TConfig> > const & me,
+		Standard)
+	{
+SEQAN_CHECKPOINT
+		return me.data_end;
+	}
+
+//____________________________________________________________________________
+
+   template < typename TValue, typename TConfig >
+	inline typename Size<String<TValue, MMap<TConfig> > >::Type
+	capacity(String<TValue, MMap<TConfig> > & me) 
+	{
+SEQAN_CHECKPOINT
+		return me.data_capacity;
+	}
+
+   template < typename TValue, typename TConfig >
+	inline typename Size<String<TValue, MMap<TConfig> > >::Type
+	capacity(String<TValue, MMap<TConfig> > const & me) 
+	{
+SEQAN_CHECKPOINT
+		return me.data_capacity;
+	}
+
+//____________________________________________________________________________
+
+   template < typename TValue, typename TConfig >
+	inline void 
+	_setLength(
+		String<TValue, MMap<TConfig> > & me, 
+		size_t new_length)
+	{
+SEQAN_CHECKPOINT
+		me.data_end = me.data_begin + new_length;
+	}
+
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig >
+   inline void 
+	_setCapacity(
+		String<TValue, MMap<TConfig> > & me, 
+		size_t new_capacity)
+	{
+SEQAN_CHECKPOINT
+		me.data_capacity = new_capacity;
+	}
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // meta-function interface
+
+    template < typename TValue, typename TConfig >
+    struct Size< String<TValue, MMap<TConfig> > >
+    {
+        typedef size_t Type;
+    };
+
+    template < typename TValue, typename TConfig >
+    struct Difference< String<TValue, MMap<TConfig> > >
+    {
+		typedef typename MakeSigned_<size_t>::Type Type;
+    };
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig >
+	struct DefaultOverflowExplicit<String<TValue, MMap<TConfig> > >
+	{
+		typedef Generous Type;
+	};
+
+    template < typename TValue, typename TConfig >
+	struct DefaultOverflowImplicit<String<TValue, MMap<TConfig> > >
+	{
+		typedef Generous Type;
+	};
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig >
+	struct IsContiguous< String<TValue, MMap<TConfig> > >
+	{
+		typedef True Type;
+		enum { VALUE = true };
+	};
+
+    template < typename TValue, typename TConfig >
+	struct AllowsFastRandomAccess< String<TValue, MMap<TConfig> > >
+	{
+		typedef False Type;
+		enum { VALUE = false };
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+    // global interface
+
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig >
+	inline void 
+	waitForAll(String<TValue, MMap<TConfig> > &)
+	{
+	}
+	
+#ifdef PLATFORM_WINDOWS
+
+    static SECURITY_ATTRIBUTES MMapStringDefaultAttributes = {
+        sizeof(SECURITY_ATTRIBUTES),
+        NULL,
+        true
+    };
+
+    template < typename TValue, typename TConfig, typename TScheme, typename TBeginPos, typename TEndPos >
+	inline int
+	mmapAdvise(String<TValue, MMap<TConfig> > &/*me*/, TScheme const & /*scheme*/, TBeginPos const &, TEndPos const &)
+	{
+		return 0;
+	}
+		
+    template < typename TValue, typename TConfig >
+    inline void 
+	flush(String<TValue, MMap<TConfig> > &) 
+	{
+    }
+
+	// cancel all transactions
+    template < typename TValue, typename TConfig >
+	inline void 
+	cancel(String<TValue, MMap<TConfig> > &)
+	{
+	}
+
+	// flush and free all allocated pages
+    template < typename TValue, typename TConfig >
+	inline int
+	flushAndFree(String<TValue, MMap<TConfig> > &)
+	{
+		return 0;
+	}
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    _map(String<TValue, MMap<TConfig> > &me, size_t new_capacity) 
+	{
+		if (new_capacity > 0) 
+		{
+			resize(me.file, new_capacity * sizeof(TValue));
+			DWORD prot = 0;
+			DWORD access = 0;
+			if ((me._openMode & OPEN_MASK) == OPEN_RDONLY) 
+			{
+				prot = PAGE_READONLY;
+				access = FILE_MAP_READ;
+			} else {
+				prot = PAGE_READWRITE;
+				access = FILE_MAP_ALL_ACCESS;
+			}
+            LARGE_INTEGER largeSize;
+			largeSize.QuadPart = new_capacity;
+			largeSize.QuadPart *= sizeof(TValue);
+
+			me.handle = CreateFileMapping(me.file.handle, &MMapStringDefaultAttributes, prot, largeSize.HighPart, largeSize.LowPart, NULL);
+			if (me.handle == NULL)
+			{
+			#ifdef SEQAN_DEBUG
+				::std::cerr << "CreateFileMapping failed. (ErrNo=" << GetLastError() << ")" << ::std::endl;
+			#endif
+				return false;
+			}
+
+			void *addr = MapViewOfFile(me.handle, access, 0, 0, 0);	
+			if (addr == NULL)
+			{
+			#ifdef SEQAN_DEBUG
+				::std::cerr << "MapViewOfFile failed. (ErrNo=" << GetLastError() << ")" << ::std::endl;
+			#endif
+				return false;
+			}
+				
+			me.data_begin = (TValue *) addr;
+			_setLength(me, new_capacity);
+			_setCapacity(me, new_capacity);
+		}
+		return true;
+	}
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    _unmap(String<TValue, MMap<TConfig> > &me) 
+	{
+		bool result = true;
+		if (me.data_begin) 
+		{
+			if (UnmapViewOfFile(me.data_begin) == 0)
+			{
+			#ifdef SEQAN_DEBUG
+				::std::cerr << "UnmapViewOfFile failed. (ErrNo=" << GetLastError() << ")" << ::std::endl;
+			#endif
+				result = false;
+			}
+			
+			if (CloseHandle(me.handle) == 0)
+			{
+			#ifdef SEQAN_DEBUG
+				::std::cerr << "CloseHandle failed. (ErrNo=" << GetLastError() << ")" << ::std::endl;
+			#endif
+				result = false;
+			}
+			
+			resize(me.file, length(me) * sizeof(TValue));
+			me.data_begin = NULL;
+			me.data_end = NULL;
+			me.data_capacity = 0;
+		}
+		return result;
+	}
+
+	template < typename TValue, typename TConfig, typename TCapSize >
+    inline bool 
+    _remap(String<TValue, MMap<TConfig> > &me, TCapSize new_capacity) 
+	{
+		typedef typename Size< String<TValue, MMap<TConfig> > >::Type TSize;
+
+		if (me.data_begin) 
+		{
+			if (new_capacity > 0) 
+			{
+				TSize seq_length = length(me);
+				
+				DWORD prot = 0;
+				DWORD access = 0;
+				if ((me._openMode & OPEN_MASK) == OPEN_RDONLY) 
+				{
+					prot = PAGE_READONLY;
+					access = FILE_MAP_READ;
+				} else {
+					prot = PAGE_READWRITE;
+					access = FILE_MAP_ALL_ACCESS;
+				}
+				LARGE_INTEGER largeSize;
+				largeSize.QuadPart = new_capacity;
+				largeSize.QuadPart *= sizeof(TValue);
+
+				bool result = true;
+				result &= (UnmapViewOfFile(me.data_begin) != 0);
+				result &= (CloseHandle(me.handle) != 0);
+
+				HANDLE handle = CreateFileMapping(me.file.handle, &MMapStringDefaultAttributes, prot, largeSize.HighPart, largeSize.LowPart, NULL);
+				if (handle == NULL)
+				{
+				#ifdef SEQAN_DEBUG
+					::std::cerr << "CreateFileMapping failed. (ErrNo=" << GetLastError() << ")" << ::std::endl;
+				#endif
+					return false;
+				}
+
+				void *addr = MapViewOfFile(handle, access, 0, 0, 0);	
+				if (addr == NULL)
+				{
+				#ifdef SEQAN_DEBUG
+					::std::cerr << "MapViewOfFile failed. (ErrNo=" << GetLastError() << ")" << ::std::endl;
+				#endif
+					return false;
+				}
+
+				if (capacity(me) > new_capacity)
+					resize(me.file, new_capacity * sizeof(TValue));
+
+				me.handle = handle;
+				me.data_begin = (TValue*) addr;
+				_setLength(me, seq_length);
+				_setCapacity(me, new_capacity);
+				return true;
+			} else
+				return _unmap(me);
+		} else
+			return _allocateStorage(me, new_capacity) != NULL;
+	}
+
+#else
+
+///.Function.flush.param.string.type:Spec.MMap String
+
+    template < typename TValue, typename TConfig, typename TScheme, typename TBeginPos, typename TEndPos >
+	inline int
+	mmapAdvise(String<TValue, MMap<TConfig> > &me, TScheme const & scheme, TBeginPos const & beginPos, TEndPos const & endPos)
+	{
+		me.scheme = scheme;
+//		posix_fadvise(me.file.handle, beginPos * sizeof(TValue), (endPos - beginPos) * sizeof(TValue), scheme);
+		if (scheme == MMAP_DONTNEED)
+			msync(me.data_begin + beginPos, (endPos - beginPos) * sizeof(TValue), MS_INVALIDATE);
+		return posix_madvise(me.data_begin + beginPos, (endPos - beginPos) * sizeof(TValue), scheme);
+	}
+		
+    template < typename TValue, typename TConfig >
+    inline void 
+	flush(String<TValue, MMap<TConfig> > &me) 
+	{
+		msync(me.data_begin, length(me) * sizeof(TValue), MS_SYNC);
+    }
+
+	// cancel all transactions
+    template < typename TValue, typename TConfig >
+	inline void 
+	cancel(String<TValue, MMap<TConfig> > &me)
+	{
+		msync(me.data_begin, capacity(me) * sizeof(TValue), MS_INVALIDATE);
+	}
+
+	// flush and free all allocated pages
+    template < typename TValue, typename TConfig >
+	inline int
+	flushAndFree(String<TValue, MMap<TConfig> > &me)
+	{
+		return posix_madvise(me.data_begin, capacity(me) * sizeof(TValue), MADV_DONTNEED);
+	}
+	
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    _map(String<TValue, MMap<TConfig> > &me, size_t new_capacity) 
+	{
+		if (new_capacity > 0) 
+		{
+			_ensureFileIsOpen(me);
+			resize(me.file, new_capacity * sizeof(TValue));
+			int prot = 0;
+			if (me._openMode & OPEN_RDONLY) prot |= PROT_READ;
+			if (me._openMode & OPEN_WRONLY) prot |= PROT_WRITE;
+			void *addr = mmap(NULL, new_capacity * sizeof(TValue), prot, MAP_SHARED, me.file.handle, 0);
+			mmapAdvise(me, me.scheme);
+			
+			if (addr == MAP_FAILED)
+			{
+			#ifdef SEQAN_DEBUG
+				::std::cerr << "mmap failed. errno=" << errno << " (" << ::strerror(errno) << ")" << ::std::endl;
+			#endif
+				return false;
+			}
+				
+			me.data_begin = (TValue *) addr;
+			_setLength(me, new_capacity);
+			_setCapacity(me, new_capacity);
+		}
+		return true;
+	}
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    _unmap(String<TValue, MMap<TConfig> > &me) 
+	{
+		if (me.data_begin) 
+		{
+			int error = munmap(me.data_begin, capacity(me) * sizeof(TValue));
+			if (error != 0)
+			{
+			#ifdef SEQAN_DEBUG
+				::std::cerr << "munmap failed. errno=" << errno << " (" << ::strerror(errno) << ")" << ::std::endl;
+			#endif
+				return false;
+			}
+			
+			resize(me.file, length(me) * sizeof(TValue));
+			me.data_begin = NULL;
+			me.data_end = NULL;
+			me.data_capacity = 0;
+		}
+		return true;
+	}
+
+	template < typename TValue, typename TConfig, typename TCapSize >
+    inline bool 
+    _remap(String<TValue, MMap<TConfig> > &me, TCapSize new_capacity) 
+	{
+		typedef typename Size< String<TValue, MMap<TConfig> > >::Type TSize;
+
+		if (me.data_begin)
+		{
+			if (new_capacity > 0) 
+			{
+				TSize seq_length = length(me);
+				
+				_ensureFileIsOpen(me);
+				if (capacity(me) < new_capacity)
+					resize(me.file, new_capacity * sizeof(TValue));
+
+#ifdef MREMAP_MAYMOVE
+				void *addr = mremap(me.data_begin, capacity(me) * sizeof(TValue), new_capacity * sizeof(TValue), MREMAP_MAYMOVE);
+				mmapAdvise(me, me.scheme);
+#else
+				// for BSD systems without mremap(..) like Mac OS X ...
+				int prot = 0;
+				if (me._openMode & OPEN_RDONLY) prot |= PROT_READ;
+				if (me._openMode & OPEN_WRONLY) prot |= PROT_WRITE;
+	//			void *addr = mmap(me.data_begin, new_capacity * sizeof(TValue), prot, MAP_SHARED | MAP_FIXED, me.file.handle, 0);
+				munmap(me.data_begin, capacity(me) * sizeof(TValue));
+				void *addr = mmap(NULL, new_capacity * sizeof(TValue), prot, MAP_SHARED, me.file.handle, 0);
+				mmapAdvise(me, me.scheme);
+#endif
+
+				if (addr == MAP_FAILED) 
+				{
+				#ifdef SEQAN_DEBUG
+					::std::cerr << "mremap failed. errno=" << errno << " (" << ::strerror(errno) << ")" << ::std::endl;
+				#endif
+					return false;
+				}
+
+				if (capacity(me) > new_capacity)
+					resize(me.file, new_capacity * sizeof(TValue));
+
+				me.data_begin = (TValue*) addr;
+				_setLength(me, seq_length);
+				_setCapacity(me, new_capacity);
+				return true;
+			} else
+				return _unmap(me);
+		} else
+			return _map(me, new_capacity);
+	}
+
+#endif
+
+	template < typename TValue, typename TConfig >
+    inline void 
+    clear(String<TValue, MMap<TConfig> > &me) 
+	{
+		cancel(me);
+		_unmap(me);
+		resize(me.file, 0);
+	}
+//____________________________________________________________________________
+
+    template < typename TValue, typename TConfig, typename TScheme >
+	inline int
+	mmapAdvise(String<TValue, MMap<TConfig> > &me, TScheme scheme)
+	{
+		return mmapAdvise(me, scheme, 0, capacity(me));
+	}
+		
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig, typename TSize >
+    inline typename Value<String<TValue, MMap<TConfig> > >::Type * 
+    _allocateStorage(String<TValue, MMap<TConfig> > &me, TSize new_capacity) 
+	{
+		TSize size = _computeSizeForCapacity(me, new_capacity);
+		_map(me, size);
+		return NULL;
+	}
+
+	template < typename TValue, typename TConfig, typename TSize >
+    inline typename Value<String<TValue, MMap<TConfig> > >::Type * 
+    _reallocateStorage(
+		String<TValue, MMap<TConfig> > &me,
+		TSize new_capacity) 
+	{
+		TSize size = _computeSizeForCapacity(me, new_capacity);
+		_remap(me, size);
+		return NULL;
+	}
+
+	template < typename TValue, typename TConfig, typename TSize >
+    inline void
+    _deallocateStorage(String<TValue, MMap<TConfig> > &/*me*/, TValue * /*ptr*/, TSize /*capacity*/)
+	{
+	}
+//____________________________________________________________________________
+///.Function.open.param.string.type:Spec.MMap String
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    open(String<TValue, MMap<TConfig> > &me, const char *fileName, int openMode) 
+	{
+		close(me);
+		me._temporary = false;
+				
+		if ((me._ownFile = open(me.file, fileName, openMode))) 
+		{
+			me._openMode = openMode;
+			return _map(me, (size_t)(size(me.file) / sizeof(TValue)));
+		}
+
+		return false;
+    }
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    open(String<TValue, MMap<TConfig> > &me, const char *fileName) 
+	{
+		typedef typename String<TValue, MMap<TConfig> >::TFile	TFile;
+		return open(me, fileName, DefaultOpenMode<TFile>::VALUE);
+    }
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    open(String<TValue, MMap<TConfig> > &me, typename TConfig::TFile file) 
+	{
+		close(me);
+		me.file = file;
+        me._temporary = false;
+        me._ownFile = false;
+
+		if (me.file) 
+		{
+			me._openMode = OPEN_RDWR;
+			return _map(me, size(me.file) / sizeof(TValue));
+		}
+
+		return false;
+    }
+
+///.Function.openTemp.param.string.type:Spec.MMap String
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    openTemp(String<TValue, MMap<TConfig> > &me) 
+	{
+		close(me);
+        me._temporary = true;
+		me._openMode = OPEN_RDWR;
+		
+		return me._ownFile = openTemp(me.file);
+    }
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig >
+	inline void _ensureFileIsOpen(String<TValue, MMap<TConfig> > &me) 
+	{
+		if (!me.file)
+		{
+			me._temporary = true;
+			me._openMode = OPEN_RDWR;
+
+			if (!(me._ownFile = openTemp(me.file)))
+				::std::cerr << "Memory Mapped String couldn't open temporary file" << ::std::endl;
+		}
+	}
+//____________________________________________________________________________
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    save(String<TValue, MMap<TConfig> > const &/*me*/, const char * /*fileName*/, int /*openMode*/) {
+		// Memory Mapped Strings are persistent, thus there is no need to save them
+		//MMapStringsDontNeedToBeSaved error;
+		return true;
+	}
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    save(String<TValue, MMap<TConfig> > const &/*me*/, const char * /*fileName*/) {
+		// Memory Mapped Strings are persistent, thus there is no need to save them
+		//MMapStringsDontNeedToBeSaved error;
+		return true;
+	}
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    save(String<TValue, MMap<TConfig> > const &/*me*/, typename TConfig::TFile /*file*/) {
+		// Memory Mapped Strings are persistent, thus there is no need to save them
+		//MMapStringsDontNeedToBeSaved error;
+		return true;
+	}
+//____________________________________________________________________________
+///.Function.flush.close.string.type:Spec.MMap String
+
+	template < typename TValue, typename TConfig >
+    inline bool 
+    close(String<TValue, MMap<TConfig> > &me) 
+	{
+		if (me.file) 
+		{
+			// close associated file
+			if (me._temporary) 
+			{
+				me._temporary = false;
+				cancel(me);
+			}
+
+			_unmap(me);
+
+			if (me._ownFile) 
+			{
+				me._ownFile = false;
+				return close(me.file);
+			}
+		}
+		return true;
+    }
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find.h b/src/SeqAn-1.3/seqan/find.h
new file mode 100644
index 0000000..a687b15
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find.h
@@ -0,0 +1,95 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_H
+#define SEQAN_HEADER_FIND_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <cmath>
+
+#include <deque>
+
+#include <seqan/sequence.h>
+#include <seqan/modifier.h>
+#include <seqan/score.h>
+#include <seqan/graph_types.h>
+#include <seqan/graph_algorithms.h>
+#include <seqan/map.h>
+
+//____________________________________________________________________________
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/find/find_generated_forwards.h>
+#endif
+
+#include <seqan/find/find_base.h>
+#include <seqan/find/find_pattern_base.h>
+
+//____________________________________________________________________________
+// exact pattern matching
+#include <seqan/find/find_simple.h>
+#include <seqan/find/find_horspool.h>
+#include <seqan/find/find_shiftand.h>
+#include <seqan/find/find_shiftor.h>
+#include <seqan/find/find_bndm.h>
+#include <seqan/find/find_bom.h>
+
+//____________________________________________________________________________
+//complex pattern matching
+#include <seqan/find/find_wild_shiftand.h>
+
+//____________________________________________________________________________
+//multiple pattern search
+#include <seqan/find/find_ahocorasick.h>
+#include <seqan/find/find_multiple_shiftand.h>
+#include <seqan/find/find_set_horspool.h>
+
+//#include <seqan/find/find_multi.h> //wegwerfen
+#include <seqan/find/find_wumanber.h> 
+#include <seqan/find/find_multiple_bfam.h>
+
+//____________________________________________________________________________
+// approximate pattern matching
+#include <seqan/find/find_begin.h>
+
+#include <seqan/find/find_score.h>
+#include <seqan/find/find_myers_ukkonen.h>
+#include <seqan/find/find_abndm.h>
+#include <seqan/find/find_pex.h>
+
+#include <seqan/find/find_hamming_simple.h>
+
+//____________________________________________________________________________
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find/find_abndm.h b/src/SeqAn-1.3/seqan/find/find_abndm.h
new file mode 100644
index 0000000..22f3e7a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_abndm.h
@@ -0,0 +1,639 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Stephan Aiche <aiche at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_ABNDMALGO_H
+#define SEQAN_HEADER_FIND_ABNDMALGO_H
+
+// uncomment this for verbose output of the ABNDM ALGO
+//#define SEQAN_DEBUG_ABNDM
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+#ifdef SEQAN_DEBUG_ABNDM
+inline void _printMask(String <unsigned> const &  mask,String <char> name)
+{
+    unsigned len = length(mask);
+    std::cout << name << ": ";
+    for(unsigned int j=0;j<len;++j) {
+        for(unsigned int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+            std::cout << ((mask[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+        }
+        std::cout << " ";
+    }
+    std::cout << ::std::endl;
+}
+
+inline void _printMask(String <unsigned> const &  mask,unsigned start, unsigned len,String <char> name)
+{
+    std::cout << name << ": ";
+    for(unsigned int j=start;j<start + len;++j) {
+        for(unsigned int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+            std::cout << ((mask[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+        }
+        std::cout << " ";
+    }
+    std::cout << ::std::endl;
+}
+
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// AbndmAlgo
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.AbndmAlgo:
+..summary: Approximate Backward Nondeterministic Dawg Matching algorithm. Approximate string matching using bit parallelism.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, AbndmAlgo>
+..param.TNeedle:The needle type.
+...type:Class.String
+..remarks.text:The types of the needle and the haystack have to match.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.AbndmAlgo
+
+
+struct AbndmAlgo; 
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+struct FindBeginPatternSpec< Pattern<TNeedle, AbndmAlgo> >:
+	DefaultFindBeginPatternSpec<>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, AbndmAlgo>:
+	public FindBegin_<Pattern<TNeedle, AbndmAlgo> >
+{
+//////////////////////////////////////////////////////////////////////////////
+public:
+    typedef unsigned int TWord;
+    Holder<TNeedle> data_host;
+
+    String<TWord>       b_table;    // called B in Navarro
+    String<TWord>       r_table;    // called R in Navarro
+
+    TWord blockCount;
+    TWord last;
+    TWord needleLength;				// e.g., needleLength=33 --> blockCount=2 (iff w=32 bits)
+    TWord haystackLength;
+    TWord limit;                    // the maximal accepted error
+    TWord cP;  // save current position of the nfa
+
+    bool findNext;
+
+    Pattern<TNeedle,MyersUkkonen> verifier;
+//////////////////////////////////////////////////////////////////////////////
+
+    Pattern() {}
+
+    template <typename TNeedle2>
+    Pattern(TNeedle2 const & ndl)
+        : limit(1),cP(0),verifier(ndl,-1)
+	{
+            setHost(*this, ndl);
+	}
+
+    template <typename TNeedle2>
+    Pattern(TNeedle2 const & ndl, int _limit = -1)
+		: limit(- _limit)
+		, cP(0)
+		, verifier(ndl,_limit)
+	{
+		SEQAN_CHECKPOINT
+		setHost(*this, ndl);
+	}
+
+
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+void _printR(Pattern<TNeedle, AbndmAlgo> & me) 
+{
+    ::std::cout << "R ----------------------------- " << ::std::endl;
+    for(unsigned i = 0;i <= me.limit;++i)
+    {
+        _printMask(me.r_table,me.blockCount * i, me.blockCount ," ");
+    }
+    ::std::cout << " ------------------------------ " << ::std::endl;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, AbndmAlgo> & me, TNeedle2 const& needle) 
+{
+SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+    typedef typename Value<TNeedle>::Type TValue;
+
+    me.cP = 0;
+    me.findNext = false;
+
+    me.needleLength = length(needle);
+    if (me.needleLength<1) 
+        me.blockCount = 1;
+    else 
+        me.blockCount = ((me.needleLength-1) / BitsPerValue<TWord>::VALUE)+1;
+			
+    clear(me.b_table);
+    resize(me.b_table, me.blockCount * ValueSize<TValue>::VALUE, 0, Exact());
+
+    for (TWord j = 0; j < me.needleLength; ++j) {
+        // Determine character position in array table
+        TWord pos = convert<TWord>(getValue(needle,j));
+        me.b_table[me.blockCount*pos + j / BitsPerValue<TWord>::VALUE] |= (1<<(j%BitsPerValue<TWord>::VALUE));
+    }
+
+#ifdef SEQAN_DEBUG_ABNDM
+    std::cout << "Needle:   " << needle << ::std::endl;    
+    std::cout << "|Needle|: " << length(needle) << ::std::endl;
+    std::cout << "Alphabet size: " << ValueSize<TValue>::VALUE << ::std::endl;
+
+    for(unsigned i=0;i<ValueSize<TValue>::VALUE;++i) {
+        if (((i<97) && (4 < i) ) || (i>122)) continue;
+        std::cout << static_cast<TValue>(i) << ": ";
+        for(unsigned int j=0;j<me.blockCount;++j) {
+            for(int bit_pos=0;bit_pos<BitsPerValue<unsigned>::VALUE;++bit_pos) {
+                std::cout << ((me.b_table[me.blockCount*i+j] & (1<<(bit_pos % BitsPerValue<unsigned>::VALUE))) !=0);
+            }
+            std::cout << " ";
+        }
+        std::cout << ::std::endl;
+    }
+#endif
+    clear(me.r_table); // init is only possible if we know the the error count
+
+    me.data_host = needle;
+    setHost(me.verifier,needle);
+}
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, AbndmAlgo> & me, TNeedle2 & needle)
+{
+    setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+inline void _patternInit (Pattern<TNeedle, AbndmAlgo> & me) 
+{
+    SEQAN_CHECKPOINT
+	clear(me.r_table);
+    resize(me.r_table, me.blockCount * (me.limit + 1), 0, Exact());
+    me.findNext = false;
+    me.last = 0;
+	_findBeginInit(me, needle(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, AbndmAlgo> >::Type & 
+host(Pattern<TNeedle, AbndmAlgo> & me)
+{
+    SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, AbndmAlgo> const>::Type & 
+host(Pattern<TNeedle, AbndmAlgo> const & me)
+{
+    SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.getScore.param.pattern.type:Spec.AbndmAlgo
+
+template <typename TNeedle>
+int getScore(Pattern<TNeedle, AbndmAlgo > & me) 
+{
+    SEQAN_CHECKPOINT
+	return getScore(me.verifier);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFinder, typename TNeedle>
+inline bool _findAbndmSmallNeedle(TFinder & finder, Pattern<TNeedle, AbndmAlgo> & me) 
+{
+    SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+
+    typedef typename Host<TFinder>::Type    THost;
+    typedef Segment<THost>                  THostSegment;
+    typedef Finder<THostSegment>            THSFinder;
+
+    TWord j,nR,oR,i,cB;
+    TWord startPos = position(finder);
+
+    // if returned from previous search we need to check the current position for additional matches    
+    if(me.findNext)
+    {
+        // reset the finder
+        TWord offset = startPos - me.cP;
+        finder -= offset;
+        int end = me.cP + me.needleLength + me.limit;
+        // adjust end if it points over the edges of host(finder)
+        end = (end > static_cast<int>(length(host(finder))) ? length(host(finder)) : end);
+
+        THostSegment s(infix(host(finder),me.cP, end));
+        THSFinder f(s);
+#ifdef SEQAN_DEBUG_ABNDM
+        ::std::cout << "additional verification of current position" << ::std::endl;
+        ::std::cout << "initialized on: " << s << ::std::endl;
+        ::std::cout << "parameters are: " << me.cP << " " << (me.cP + me.needleLength + me.limit) << ::std::endl;
+        ::std::cout << "original start pos: " << startPos << ::std::endl;
+#endif
+
+        while(find(f,me.verifier,- (int) me.limit)){
+            TWord newP = position(finder) + position(f);
+#ifdef SEQAN_DEBUG_ABNDM
+            ::std::cout << "found on new position: " << newP << ::std::endl; 
+#endif
+            if(newP > startPos){
+                finder += position(f);
+                return true;
+            }
+        }
+#ifdef SEQAN_DEBUG_ABNDM
+        ::std::cout << "additional verification done .. shifted by last=" << me.last << ::std::endl << ::std::endl;
+#endif 
+        finder += me.last;
+        me.cP += me.last;
+    }
+    
+    me.cP = position(finder);
+    // walk on  
+    while (position(finder) <= me.haystackLength - me.needleLength) 
+    {
+        SEQAN_CHECKPOINT
+            j = me.needleLength - me.limit - 1;
+        me.last = j;
+    
+        // init R_0
+        TWord pos = convert<TWord>(*(finder + j));
+
+        me.r_table[0] = me.b_table[pos];				    
+        nR = 0 - 1;
+	for(i = 1;i <= me.limit;++i) me.r_table[i] = nR;
+
+#ifdef SEQAN_DEBUG_ABNDM
+        ::std::cout << "reading " << *(finder + j) << ::std::endl;
+        _printMask(me.b_table[pos],"");
+        _printR(me);
+#endif
+        // process R_1 .. R_limit
+        while((nR != 0) && (j != 0))
+        {
+            pos = convert<TWord>(*(finder + j - 1));
+            cB = me.b_table[pos];
+            oR = me.r_table[0];
+            nR = (oR >> 1) & cB;
+            me.r_table[0] = nR;
+            for(i = 1;i <= me.limit;++i)
+            {
+                nR = ((me.r_table[i] >> 1) & cB) | oR | ((oR | nR) >> 1);
+                oR = me.r_table[i];
+                me.r_table[i] = nR;
+            }
+#ifdef SEQAN_DEBUG_ABNDM
+            ::std::cout << "reading " << *(finder + j - 1) << ::std::endl;
+            _printMask(me.b_table[pos],"");
+            _printR(me);
+#endif
+            --j;
+            if((nR & 1) != 0){
+                if(j > 0){
+#ifdef SEQAN_DEBUG_ABNDM
+                    ::std::cout << "last bit is set so last is set to " << j << ::std::endl;
+#endif 
+                    me.last = j;
+                }
+                else // verify
+                {
+                    // call find 
+                    int end = me.cP + me.needleLength + me.limit;
+                    // adjust end if it points over the edges of host(finder)
+                    end = (end > static_cast<int>(length(host(finder))) ? length(host(finder)) : end);
+
+                    THostSegment s(infix(host(finder),me.cP, end));
+                    THSFinder f(s);
+                    
+#ifdef SEQAN_DEBUG_ABNDM
+                    ::std::cout << "found verifiable prefix" << ::std::endl;
+                    // init finder on infix 
+                    ::std::cout << "parameters are " << me.cP << " " << (me.cP + me.needleLength + me.limit) << ::std::endl;
+		    ::std::cout << "init finder on: " << s << ::std::endl;
+#endif                  
+                    // try to find the sequence
+                    while(find(f,me.verifier,- (int) me.limit)){
+                        TWord nP = position(finder) + position(f);
+                        if(nP > startPos){
+                            finder += position(f);
+                            me.findNext = true;
+                            return true;
+                        }
+                    }
+                }  
+            }
+        }
+#ifdef SEQAN_DEBUG_ABNDM
+        ::std::cout << "automaton runs out of active stats so window is shifted by last=" << me.last << ::std::endl << ::std::endl;
+#endif 
+
+        finder += me.last;
+        me.cP += me.last;
+    }
+    return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool _findAbndmLargeNeedle(TFinder & finder, Pattern<TNeedle, AbndmAlgo> & me) 
+{
+    SEQAN_CHECKPOINT
+        typedef unsigned int TWord;
+    TWord carryPattern = (1<< (BitsPerValue<TWord>::VALUE - 1));
+    typedef typename Host<TFinder>::Type    THost;
+    typedef Segment<THost>                  THostSegment;
+    typedef Finder<THostSegment>            THSFinder;
+
+    TWord j,i;
+    String<TWord> nR,oR;
+    TWord startPos = position(finder);
+
+    // if returned from previous search we need to check the current position for additional matches    
+    if(me.findNext)
+    {
+        // reset the finder
+        TWord offset = startPos - me.cP;
+        finder -= offset;
+
+        int end = me.cP + me.needleLength + me.limit;
+        // adjust end if it points over the edges of host(finder)
+        end = (end > static_cast<int>(length(host(finder))) ? length(host(finder)) : end);
+
+        THostSegment s(infix(host(finder),me.cP, end));
+        THSFinder f(s);
+#ifdef SEQAN_DEBUG_ABNDM
+        ::std::cout << "additional verification of current position" << ::std::endl;
+        ::std::cout << "initialized on: " << s << ::std::endl;
+        ::std::cout << "parameters are: " << me.cP << " " << (me.cP + me.needleLength + me.limit) << ::std::endl;
+        ::std::cout << "original start pos: " << startPos << ::std::endl;
+#endif
+
+        while(find(f,me.verifier,- (int) me.limit)){
+            TWord newP = position(finder) + position(f);
+#ifdef SEQAN_DEBUG_ABNDM
+            ::std::cout << "found on new position: " << newP << ::std::endl; 
+#endif
+            if(newP > startPos){
+                finder += position(f);
+                return true;
+            }
+        }
+#ifdef SEQAN_DEBUG_ABNDM
+        ::std::cout << "additional verification done .. shifted by last=" << me.last << ::std::endl << ::std::endl;
+#endif 
+        finder += me.last;
+        me.cP += me.last;
+    }else me.cP = position(finder);
+    // walk on  
+    while (position(finder) <= me.haystackLength - me.needleLength) 
+    {
+        SEQAN_CHECKPOINT
+            j = me.needleLength - me.limit - 1;
+        me.last = j;
+
+#ifdef SEQAN_DEBUG_ABNDM    
+	::std::cout << "starting new frame ending at position " << me.cP + j << ::std::endl;
+#endif
+        // init R_0
+        TWord pos = convert<TWord>(*(finder + j));
+	for(int block = me.blockCount - 1;block >= 0;--block){
+            me.r_table[block] = me.b_table[pos * me.blockCount + block];
+	}
+        //me.r_table[0] = me.b_table[pos];				    
+        
+	resize(nR,me.blockCount,0 - 1);
+	resize(oR,me.blockCount,0);
+	// nR = 0 - 1;
+	//for(i = me.blockCount;i <= me.limit * me.blockCount;++i) me.r_table[i] = 0 - 1;//set all states in r_table to 1
+	for(i = 1;i <= me.limit;++i){
+            for(int block = me.blockCount - 1;block >= 0;--block){
+                me.r_table[me.blockCount * i + block] = 0 -1 ;
+            }
+	}
+
+	// track active states in nR
+	TWord nRTrack = 1;
+
+#ifdef SEQAN_DEBUG_ABNDM
+        ::std::cout << "reading " << *(finder + j) << ::std::endl;
+        _printMask(me.b_table,pos * me.blockCount, me.blockCount," ");
+        _printR(me);
+#endif
+        while((nRTrack != 0) && (j != 0))
+        {
+            // get current letter
+            pos = convert<TWord>(*(finder + j - 1));
+
+            bool carry = 0;
+            for(int block = me.blockCount -1;block >= 0;--block){
+                oR[block] = me.r_table[block];	    
+                bool nCarry=((oR[block] & 1) != 0);	    
+                TWord toR = oR[block] >> 1;
+                if(carry) toR |= carryPattern;
+                carry = nCarry;
+                nR[block] = toR & me.b_table[pos*me.blockCount + block];
+                me.r_table[block] = nR[block];
+            }
+	    
+	    
+            for(i = 1;i <= me.limit;++i){
+                bool rCarry = 0;
+                bool nCarry = 0;
+                for(int block = me.blockCount - 1;block >= 0;--block){
+                    bool nRCarry = ((me.r_table[i * me.blockCount + block] & 1) != 0);
+                    bool nNCarry = (((oR[block] | nR[block]) & 1) != 0);
+
+                    TWord rPattern = (rCarry ? carryPattern : 0);
+                    TWord nPattern = (nCarry ? carryPattern : 0);
+                    nR[block] = (((me.r_table[i * me.blockCount + block] >> 1) | rPattern) & me.b_table[pos*me.blockCount + block]) | (((oR[block] | nR[block]) >> 1) | nPattern) | oR[block];
+                    rCarry = nRCarry;
+                    nCarry = nNCarry;
+                    oR[block] = me.r_table[i  * me.blockCount + block];
+                    me.r_table[i * me.blockCount + block] = nR[block];
+                }
+            }
+#ifdef SEQAN_DEBUG_ABNDM
+            ::std::cout << "reading " << *(finder + j - 1) << ::std::endl;
+ 	    _printMask(me.b_table,pos*me.blockCount, me.blockCount," ");
+            _printR(me);
+#endif
+            --j;
+            // track active states in nR
+            nRTrack = 0;
+            for(i = 0;i < me.blockCount;++i) nRTrack |= nR[i];
+
+            if((nR[0] & 1) != 0){
+                if(j > 0){
+#ifdef SEQAN_DEBUG_ABNDM
+                    ::std::cout << "last bit is set so last is set to " << j << ::std::endl;
+#endif 
+                    me.last = j;
+                }
+                else // verify
+                {
+                    // call find 
+                    int end = me.cP + me.needleLength + me.limit;
+                    // adjust end if it points over the edges of host(finder)
+                    end = (end > static_cast<int>(length(host(finder))) ? length(host(finder)) : end);
+
+                    THostSegment s(infix(host(finder),me.cP, end));
+                    THSFinder f(s);
+                    
+#ifdef SEQAN_DEBUG_ABNDM
+                    ::std::cout << "found verifiable prefix" << ::std::endl;
+                    // init finder on infix 
+                    ::std::cout << "parameters are " << me.cP << " " << (me.cP + me.needleLength + me.limit) << ::std::endl;
+                    ::std::cout << "init finder on: " << s << ::std::endl;
+#endif                  
+                    // try to find the sequence
+                    while(find(f,me.verifier,- (int) me.limit)){
+                        TWord nP = position(finder) + position(f);
+                        if(nP > startPos){
+                            finder += position(f);
+#ifdef SEQAN_DEBUG_ABNDM
+                            ::std::cout << "found pattern at position " << position(finder) << ::std::endl;
+#endif
+                            me.findNext = true;
+                            return true;
+                        }
+                    }
+                }  
+            }
+        }
+#ifdef SEQAN_DEBUG_ABNDM
+        ::std::cout << "automaton runs out of active stats so window is shifted by last=" << me.last << ::std::endl << ::std::endl;
+#endif 
+
+        finder += me.last;
+        me.cP += me.last;
+    }
+    return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.scoreLimit.param.pattern.type:Spec.AbndmAlgo
+
+template <typename TNeedle>
+inline int 
+scoreLimit(Pattern<TNeedle, AbndmAlgo > const & me)
+{
+    SEQAN_CHECKPOINT
+	return - (int) me.limit;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.setScoreLimit.param.pattern.type:Spec.AbndmAlgo
+
+template <typename TNeedle, typename TScoreValue>
+inline void 
+setScoreLimit(Pattern<TNeedle, AbndmAlgo > & me, 
+              TScoreValue _limit)
+{
+    SEQAN_CHECKPOINT
+        setScoreLimit(me.verifier,_limit);
+    me.limit = (- _limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFinder, typename TNeedle>
+inline bool find (TFinder & finder, 
+                  Pattern<TNeedle, AbndmAlgo > & me)
+{
+    SEQAN_CHECKPOINT
+	if (empty(finder)) {
+            _patternInit(me);
+            _finderSetNonEmpty(finder);
+            me.haystackLength = length(container(finder));
+	} 
+
+	bool ret;
+    if (me.blockCount == 1) {
+        ret = _findAbndmSmallNeedle(finder, me);
+    } else {
+        ret = _findAbndmLargeNeedle(finder, me);
+    }
+	if (ret) 
+	{
+		_setFinderEnd(finder);
+	}
+	return ret;
+
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool find (TFinder & finder, 
+                  Pattern<TNeedle, AbndmAlgo > & me, 
+                  int const k)
+{
+    SEQAN_CHECKPOINT
+	setScoreLimit(me, k);
+    return find(finder, me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_ABNDMALGO_H
diff --git a/src/SeqAn-1.3/seqan/find/find_ahocorasick.h b/src/SeqAn-1.3/seqan/find/find_ahocorasick.h
new file mode 100644
index 0000000..f8e0a60
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_ahocorasick.h
@@ -0,0 +1,323 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Tobias Rausch <rausch at embl.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_AHOCORASICK_H
+#define SEQAN_HEADER_FIND_AHOCORASICK_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// AhoCorasick
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.AhoCorasick:
+..summary: Multiple exact string matching using Aho-Corasick.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, AhoCorasick>
+..param.TNeedle:The needle type, a string of keywords.
+...type:Class.String
+..remarks.text:The types of the keywords in the needle container and the haystack have to match.
+..remarks.text:Matching positions do not come in order because we report beginning positions of matches.
+..remarks.text:Likewise, if multiple keywords match at a given position no pre-specified order is guaranteed.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.AhoCorasick
+
+struct AhoCorasick_;
+typedef Tag<AhoCorasick_> AhoCorasick;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, AhoCorasick> {
+//____________________________________________________________________________
+private:
+	Pattern(Pattern const& other);
+	Pattern const& operator=(Pattern const & other);
+
+//____________________________________________________________________________
+public:
+	typedef typename Size<TNeedle>::Type TSize;
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Value<TKeyword>::Type TAlphabet;
+	typedef Graph<Automaton<TAlphabet> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	
+	Holder<TNeedle> data_host;
+	String<TVertexDescriptor> data_supplyMap;
+	String<String<TSize> > data_terminalStateMap;
+	TGraph data_graph;
+
+	// To restore the automaton after a hit
+	String<TSize> data_endPositions;	// All remaining keyword indices
+	TSize data_keywordIndex;			// Current keyword that produced a hit
+	TSize data_needleLength;			// Last length of needle to reposition finder
+	TVertexDescriptor data_lastState;   // Last state in the trie
+
+//____________________________________________________________________________
+
+	Pattern() {
+	}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		SEQAN_CHECKPOINT
+		setHost(*this, ndl);
+	}
+
+	~Pattern() {
+		SEQAN_CHECKPOINT
+	}
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Host Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, AhoCorasick> >
+{
+	typedef TNeedle Type;
+};
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, AhoCorasick> const>
+{
+	typedef TNeedle const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+inline void
+_createAcTrie(Pattern<TNeedle, AhoCorasick> & me)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TNeedle>::Type TSize;
+	typedef typename Position<TNeedle>::Type TPosition;
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Value<TKeyword>::Type TAlphabet;
+	typedef Graph<Automaton<TAlphabet> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+
+	// Create regular trie
+	createTrie(me.data_graph,me.data_terminalStateMap, host(me));
+
+	// Create parent map
+	String<TVertexDescriptor> parentMap;
+	String<TAlphabet> parentCharMap;
+	resizeVertexMap(me.data_graph,parentMap);
+	resizeVertexMap(me.data_graph,parentCharMap);
+	for(TPosition i = 0;i<length(parentMap);++i) {
+		assignProperty(parentMap, i, nilVal);
+	}
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	TEdgeIterator itEd(me.data_graph);
+	for(;!atEnd(itEd);goNext(itEd)) {
+		assignProperty(parentMap, targetVertex(itEd), sourceVertex(itEd));
+		assignProperty(parentCharMap, targetVertex(itEd), label(itEd));
+	}
+
+	// Build AC
+	TVertexDescriptor root = getRoot(me.data_graph);
+	resizeVertexMap(me.data_graph,me.data_supplyMap);
+	assignProperty(me.data_supplyMap, root, nilVal);
+
+	// Bfs Traversal
+	typedef typename Iterator<TGraph, BfsIterator>::Type TBfsIterator;
+	TBfsIterator it(me.data_graph,root);
+	for(;!atEnd(it);goNext(it)) {
+		if (atBegin(it)) continue;
+		TVertexDescriptor parent = getProperty(parentMap, *it);
+		TAlphabet sigma = getProperty(parentCharMap, *it);
+		TVertexDescriptor down = getProperty(me.data_supplyMap, parent);
+		while ((down != nilVal) &&
+			(getSuccessor(me.data_graph, down, sigma) == nilVal)) 
+		{
+			down = getProperty(me.data_supplyMap, down);
+		}
+		if (down != nilVal) {
+			assignProperty(me.data_supplyMap, *it, getSuccessor(me.data_graph, down, sigma));
+			String<TPosition> endPositions = getProperty(me.data_terminalStateMap, getProperty(me.data_supplyMap, *it));
+			if (!empty(endPositions)) {
+				String<TPosition> endPositionsCurrent = getProperty(me.data_terminalStateMap, *it);
+				typedef typename Iterator<String<TPosition>, Rooted >::Type TStringIterator;
+				TStringIterator sit = begin(endPositions);
+				for(;!atEnd(sit);goNext(sit)) {
+					appendValue(endPositionsCurrent, *sit);
+				}
+				assignProperty(me.data_terminalStateMap, *it, endPositionsCurrent);
+			}
+		} else {
+			assignProperty(me.data_supplyMap, *it, root);
+		}
+
+	}
+}
+
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, AhoCorasick> & me, TNeedle2 const & needle) {
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(!empty(needle));
+	setValue(me.data_host, needle);
+	clear(me.data_graph);
+	clear(me.data_supplyMap);
+	clear(me.data_endPositions);
+	clear(me.data_terminalStateMap);
+	_createAcTrie(me);
+	me.data_needleLength = 0;
+
+
+	//fstream strm;
+	//strm.open(TEST_PATH "my_trie.dot", ios_base::out | ios_base::trunc);
+	//String<String<char> > nodeMap;
+	//_createTrieNodeAttributes(me.data_graph, me.data_terminalStateMap, nodeMap);
+	//String<String<char> > edgeMap;
+	//_createEdgeAttributes(me.data_graph,edgeMap);
+	//write(strm,me.data_graph,nodeMap,edgeMap,DotDrawing());
+	//strm.close();
+	// Supply links
+	//for(unsigned int i=0;i<length(me.data_supplyMap);++i) {
+	//	std::cout << i << "->" << getProperty(me.data_supplyMap,i) << ::std::endl;
+	//}
+}
+
+template <typename TNeedle, typename TNeedle2>
+inline void 
+setHost (Pattern<TNeedle, AhoCorasick> & me, TNeedle2 & needle)
+{
+	setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline void _patternInit (Pattern<TNeedle, AhoCorasick> & me) 
+{
+SEQAN_CHECKPOINT
+	clear(me.data_endPositions);
+	me.data_keywordIndex = 0;
+	me.data_lastState = getRoot(me.data_graph);
+}
+
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline typename Size<TNeedle>::Type
+position(Pattern<TNeedle, AhoCorasick> & me)
+{
+	return me.data_keywordIndex;
+}
+
+
+template <typename TFinder, typename TNeedle>
+inline bool find(TFinder & finder, Pattern<TNeedle, AhoCorasick> & me) {
+	SEQAN_CHECKPOINT
+	typedef typename Size<TNeedle>::Type TSize;
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Value<TKeyword>::Type TAlphabet;
+	typedef Graph<Automaton<TAlphabet> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	
+	if (empty(finder)) {
+		_patternInit(me);
+		_finderSetNonEmpty(finder);
+	} else {
+		finder += me.data_needleLength;
+		++finder; // Set forward the finder
+	}
+
+	// Process left-over hits
+	if (!empty(me.data_endPositions)) {
+		--finder; // Set back the finder
+		me.data_keywordIndex = me.data_endPositions[length(me.data_endPositions)-1];
+		me.data_needleLength = length(value(host(me), me.data_keywordIndex))-1;
+		if (length(me.data_endPositions) > 1) resize(me.data_endPositions, (length(me.data_endPositions)-1));
+		else clear(me.data_endPositions);
+		finder -= me.data_needleLength;
+		_setFinderLength(finder, me.data_needleLength+1);
+		_setFinderEnd(finder, position(finder)+length(finder));
+		return true;
+	}
+
+	TVertexDescriptor current = me.data_lastState;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	while (!atEnd(finder)) {
+		while ((getSuccessor(me.data_graph, current, *finder) == nilVal) &&
+			(getProperty(me.data_supplyMap, current) != nilVal))
+		{
+			current = getProperty(me.data_supplyMap,current);
+		}
+		if (getSuccessor(me.data_graph, current, *finder) != nilVal) {
+			current = getSuccessor(me.data_graph, current, *finder);
+		}
+		else {
+			current = getRoot(me.data_graph);
+		}
+		me.data_endPositions = getProperty(me.data_terminalStateMap,current);
+		if (!empty(me.data_endPositions)) {
+			me.data_keywordIndex = me.data_endPositions[length(me.data_endPositions)-1];
+			me.data_needleLength = length(value(host(me), me.data_keywordIndex))-1;
+			if (length(me.data_endPositions) > 1) resize(me.data_endPositions, length(me.data_endPositions)-1);
+			else clear(me.data_endPositions);
+			me.data_lastState = current;
+			finder -= me.data_needleLength;
+			_setFinderLength(finder, me.data_needleLength+1);
+			_setFinderEnd(finder, position(finder)+length(finder));
+			return true;
+		}
+		++finder;
+	}
+	return false;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_AHOCORASICK_H
diff --git a/src/SeqAn-1.3/seqan/find/find_base.h b/src/SeqAn-1.3/seqan/find/find_base.h
new file mode 100644
index 0000000..af91906
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_base.h
@@ -0,0 +1,885 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Definition of the class Finder and supporting tags and metafunctions.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_BASE_H
+#define SEQAN_HEADER_FIND_BASE_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Tags
+
+/**
+.Tag.FindInfix:
+..summary:Find needle as a substring of haystack (infix search).
+..see:Tag.FindPrefix
+..see:Spec.Myers
+..see:Spec.DPSearch
+..include:seqan/find.h
+ */
+struct FindInfix;
+
+	
+/**
+.Tag.FindPrefix:
+..summary:Find needle as a prefix of the haystack (prefix serach)
+..see:Tag.FindInfix
+..see:Spec.Myers
+..see:Spec.DPSearch
+..include:seqan/find.h
+*/
+struct FindPrefix;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.DefaultFinder:
+..cat:Searching
+..summary:Default @Class.Finder@ specialization type.
+..signature:DefaultFinder<THaystack>::Type
+..param.THaystack:The given haystack type.
+..returns:Is $void$ by default and @Tag.Index Find Algorithm.EsaFindMlr@ if $THaystack$ is an @Class.Index at .
+..include:seqan/find.h
+*/
+template < typename TObject >
+struct DefaultFinder 
+{
+	typedef void Type;
+};
+
+/**
+.Metafunction.DefaultPattern:
+..cat:Searching
+..summary:Default @Class.Pattern@ specialization type.
+..signature:DefaultPattern<TNeedle>::Type
+..param.TNeedle:The given needle type.
+..returns:Is $void$ by default.
+..include:seqan/find.h
+*/
+template < typename TObject >
+struct DefaultPattern 
+{
+	typedef void Type;
+};
+
+/**
+.Metafunction.Haystack:
+..summary:Returns the haystack type of a @Class.Finder@ type.
+..cat:Searching
+..signature:Haystack<TFinder>::Type
+..param.TFinder:A @Class.Finder@ type.
+...type:Class.Finder
+..returns:The haystack type of $TFinder$, i.e. $THaystack$ for $Finder<THaystack, TSpec>$.
+This is an alias to function @Function.host@ of the pattern function.
+..see:Function.host
+..include:seqan/find.h
+*/
+
+template <typename TFinder>
+struct Haystack 
+{
+	typedef typename Container<TFinder>::Type Type;
+};
+
+/**
+.Metafunction.Needle:
+..summary:Returns the needle type of a @Class.Pattern@ type.
+..cat:Searching
+..signature:Needle<TPattern>::Type
+..param.TPattern:A @Class.Pattern@ type.
+...type:Class.Pattern
+..returns:The needle type of $TPattern$, i.e. $TNeedle$ for $Pattern<TNeedle, TSpec>$.
+..include:seqan/find.h
+*/
+
+template <typename TPattern>
+struct Needle 
+{
+	typedef typename Host<TPattern>::Type Type;
+};
+
+template <typename THost, typename TSpec>
+struct Needle<Segment<THost, TSpec> > 
+{
+	typedef Segment<THost, TSpec> Type;
+};
+
+template <typename THost, typename TSpec>
+struct Needle<Segment<THost, TSpec> const> 
+{
+	typedef Segment<THost, TSpec> const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.find:
+..summary:Search for a @Class.Pattern@ in a @Class.Finder@ object.
+..cat:Searching
+..signature:find(finder, pattern)
+..signature:find(finder, pattern, k)
+..param.finder:The @Class.Finder@ object to search through.
+...remarks:For online-algorithm $patterns$, finder can also be an arbitrary @Concept.Rooted Iterator at .
+...type:Class.Finder
+...type:Concept.Rooted Iterator
+..param.pattern:The @Class.Pattern@ object to search for.
+...remarks:For index $finders$, pattern can also be a Sequence.
+...type:Class.Pattern
+..param.k:Desired minimal score (for approximate matching).
+...remarks:$k$ has to be a number <= 0.
+...remarks:Differences are deletions, insertions and substitutions.
+..returns:$boolean$ that indicates whether an occurence of $pattern$ was found or not.
+..remarks:Repeated calls of this function iterate through all occurences of $pattern$.
+..include:seqan/find.h
+*/
+
+/**
+.Class.Finder:
+..summary:Holds the haystack and a current search context.
+..cat:Searching
+..signature:Finder<THaystack[, TSpec]>
+..param.THaystack:The haystack type.
+...type:Class.String
+...type:Class.Index
+..param.TSpec:The index-algorithm to search with (Optional).
+...default:The result of @Metafunction.DefaultFinder@
+...remarks:Leave empty for online pattern matching (see @Class.Pattern@).
+...remarks:If $THaystack$ is an @Class.Index@, then $TSpec$ specifies the index search algorithm.
+..remarks:$position(finder)$ returns the position of the current hit in the haystack.
+If $THaystack$ is a set of strings or an index of a set of strings, then $position(finder)$ returns a @Class.Pair@ $(hayNo, pos)$,
+in which $hayNo$ is the haystack index and $pos$ the local position of the hit.
+..remarks:Use $clear(finder)$ to reset a finder object and search from the beginning.
+..include:seqan/find.h
+*/
+
+///.Function.clear.param.object.type:Class.Finder
+///.Function.position.param.iterator.type:Class.Finder
+
+template < typename THaystack, typename TSpec = typename DefaultFinder<THaystack>::Type >
+class Finder
+{
+	typedef typename Iterator<THaystack, Rooted>::Type TIterator;
+	typedef typename Position<THaystack>::Type TPosition;
+	typedef typename Size<THaystack>::Type TSize;
+
+public:
+	TIterator data_iterator;
+	TPosition data_endPos; //note: we need this since iterator could point to begin or end (depending on pattern type)
+	TSize data_length;
+	bool _needReinit;					// if true, the Pattern needs to be reinitialized
+	bool _beginFind_called;					// if false, then findBegin was not yet called for this match position (see findBegin default implementation)
+
+/**
+.Memfunc.Finder#Finder:
+..class:Class.Finder
+..summary:Constructor
+..signature:Finder()
+ */
+	Finder()
+		: data_endPos(0)
+		, data_length(0)
+		, _needReinit(true)
+		, _beginFind_called(false)
+	{}
+
+	/**
+.Memfunc.Finder#Finder:
+..signature:Finder(haystack)
+..param.haystack:The haystack to work on, $THaystack$.
+	 */
+	Finder(THaystack & haystack)
+		: data_iterator(begin(haystack, Rooted()))
+		, data_endPos(0)
+		, data_length(0)
+		, _needReinit(true) 
+		, _beginFind_called(false)
+	{}
+
+	/**
+.Memfunc.Finder#Finder:
+..signature:Finder(iter)
+..param.iter:The iterator to work on, either const or non-const.
+	 */
+	Finder(TIterator &iter)
+		: data_iterator(iter)
+		, data_endPos(0)
+		, data_length(0)
+		, _needReinit(true) 
+		, _beginFind_called(false)
+	{}
+
+	Finder(TIterator const &iter)
+		: data_iterator(iter)
+		, data_endPos(0)
+		, data_length(0)
+		, _needReinit(true) 
+		, _beginFind_called(false)
+	{}
+	
+	/**
+.Memfunc.Finder#Finder:
+..signature:Finder(orig)
+..param.orig:Finder object to copy from (copy constructor).
+...type:Class.Finder
+	 */
+	Finder(Finder const &orig)
+		: data_iterator(orig.data_iterator)
+		, data_endPos(orig.data_endPos)
+		, data_length(orig.data_length)
+		, _needReinit(orig._needReinit) 
+		, _beginFind_called(orig._beginFind_called)
+	{}
+
+	~Finder() {}
+
+//____________________________________________________________________________
+
+	Finder const &
+	operator = (Finder const & other)
+	{
+		data_iterator = other.data_iterator;
+		data_endPos = other.data_endPos;
+		data_length = other.data_length;
+		_needReinit = other._needReinit;
+		_beginFind_called = other._beginFind_called;
+		return *this;
+	}
+
+//____________________________________________________________________________
+
+	inline typename Reference<TIterator>::Type 
+	operator* () 
+	{
+SEQAN_CHECKPOINT
+		return value(hostIterator(*this));
+	}
+
+	inline typename Reference<TIterator const>::Type 
+	operator* () const
+	{
+SEQAN_CHECKPOINT
+		return value(hostIterator(*this));
+	}
+
+//____________________________________________________________________________
+
+	operator TIterator () const
+	{
+SEQAN_CHECKPOINT
+		return data_iterator;
+	}
+
+//____________________________________________________________________________
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THaystack, typename TSpec>
+inline void
+_setFinderEnd(Finder<THaystack, TSpec> & me)
+{//shortcut: move end position to iterator position +1
+	me._beginFind_called = false;
+	me.data_endPos = position(me)+1;
+}
+template <typename THaystack, typename TSpec, typename TPosition>
+inline void
+_setFinderEnd(Finder<THaystack, TSpec> & me,
+			  TPosition end_pos)
+{
+	me._beginFind_called = false;
+	me.data_endPos = end_pos;
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec, typename TSize>
+inline void
+_setFinderLength(Finder<THaystack, TSpec> & me,
+				 TSize _length)
+{
+	me.data_length = _length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.beginPosition.param.object.type:Class.Finder
+
+template <typename THaystack, typename TSpec>
+inline typename Position<THaystack>::Type 
+beginPosition(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_endPos - me.data_length;
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Position<THaystack const>::Type
+beginPosition(Finder<THaystack, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_endPos - me.data_length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.begin.param.object.type:Class.Finder
+
+template <typename THaystack, typename TSpec, typename TTag>
+inline typename Iterator<THaystack, Tag<TTag> const>::Type
+begin(Finder<THaystack, TSpec> & me,
+	  Tag<TTag> const tag)
+{
+SEQAN_CHECKPOINT
+	return iter(haystack(me), beginPosition(me), tag);
+}
+
+template <typename THaystack, typename TSpec, typename TTag>
+inline typename Iterator<THaystack const, Tag<TTag> const>::Type
+begin(Finder<THaystack, TSpec> const & me,
+	  Tag<TTag> const tag)
+{
+SEQAN_CHECKPOINT
+	return iter(haystack(me), beginPosition(me), tag);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.endPosition.param.object.type:Class.Finder
+
+template <typename THaystack, typename TSpec>
+inline typename Position<THaystack>::Type 
+endPosition(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_endPos;
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Position<THaystack const>::Type
+endPosition(Finder<THaystack, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_endPos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.end.param.object.type:Class.Finder
+
+template <typename THaystack, typename TSpec, typename TTag>
+inline typename Iterator<THaystack, Tag<TTag> const>::Type
+end(Finder<THaystack, TSpec> & me,
+	Tag<TTag> const tag)
+{
+SEQAN_CHECKPOINT
+	return iter(haystack(me), endPosition(me), tag);
+}
+
+template <typename THaystack, typename TSpec, typename TTag>
+inline typename Iterator<THaystack const, Tag<TTag> const>::Type
+end(Finder<THaystack, TSpec> const & me,
+	Tag<TTag> const tag)
+{
+SEQAN_CHECKPOINT
+	return iter(haystack(me), endPosition(me), tag);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.length.param.object.type:Class.Finder
+
+template <typename THaystack, typename TSpec>
+inline typename Size<THaystack>::Type 
+length(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_length;
+}
+template <typename THaystack, typename TSpec>
+inline typename Size<THaystack const>::Type 
+length(Finder<THaystack, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.infix:
+..description:Segment of the last found match in haystack.
+..signature:Infix infix(finder)
+..param.finder:An online finder.
+...type:Class.Finder
+..returns:An @Metafunction.Infix.infix@ of the @Metafunction.Haystack.haystack at .
+...metafunction:Metafunction.Infix
+..remarks:This function works only correct if the begin position of the match was already found,
+see @Function.findBegin at .
+..include:seqan/find.h
+*/
+template <typename THaystack, typename TSpec>
+inline typename Infix<THaystack>::Type
+infix(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Infix<THaystack>::Type TInfix;
+	return infix(haystack(me), beginPosition(me), endPosition(me));
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Infix<THaystack const>::Type
+infix(Finder<THaystack, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Infix<THaystack const>::Type TInfix;
+	return infix(haystack(me), beginPosition(me), endPosition(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THaystack, typename TSpec>
+inline typename Parameter_<THaystack>::Type 
+host(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return container(hostIterator(me));
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Parameter_<THaystack>::Type 
+host(Finder<THaystack, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return container(hostIterator(me));
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Parameter_<THaystack>::Type 
+container(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return container(hostIterator(me));
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Parameter_<THaystack>::Type 
+container(Finder<THaystack, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return container(hostIterator(me));
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline void
+setHost(Finder<THaystack, TSpec> & me, 
+		typename Parameter_<THaystack>::Type container_)
+{
+SEQAN_CHECKPOINT
+	setContainer(hostIterator(me), container_);
+	goBegin(me);
+}
+
+template <typename THaystack, typename TSpec>
+inline void
+setContainer(Finder<THaystack, TSpec> & me, 
+			 typename Parameter_<THaystack>::Type container_)
+{
+SEQAN_CHECKPOINT
+	setContainer(hostIterator(me), container_);
+	goBegin(me);
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline typename Iterator<THaystack, Rooted>::Type &
+hostIterator(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_iterator;
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Iterator<THaystack, Rooted>::Type const &
+hostIterator(Finder<THaystack, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_iterator;
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline bool
+empty(Finder<THaystack, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return me._needReinit;
+}
+
+template <typename THaystack, typename TSpec>
+inline void
+clear(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	me._needReinit = true;
+}
+
+//____________________________________________________________________________
+
+template <typename T>
+inline void
+_finderSetNonEmpty(T & me)
+{
+SEQAN_CHECKPOINT
+	goBegin(me);
+}
+
+
+template <typename THaystack, typename TSpec>
+inline void
+_finderSetNonEmpty(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	me._needReinit = false;
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline bool
+atBegin(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return (!empty(me) && atBegin(hostIterator(me)));
+}
+
+template <typename THaystack, typename TSpec>
+inline bool
+atEnd(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return (!empty(me) && atEnd(hostIterator(me)));
+}
+
+//____________________________________________________________________________
+
+/**
+.Function.goBegin
+..signature:goBegin(finder)
+...param.finder:Finder object to go to beginning in.
+..include:seqan/find.h
+ */
+template <typename THaystack, typename TSpec>
+inline void
+goBegin(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	//_finderSetNonEmpty(me);
+	goBegin(hostIterator(me));
+}
+
+/**
+.Function.goEnd
+..signature:goEnd(finder)
+...param.finder:Finder object to go to end in.
+..include:seqan/find.h
+ */
+template <typename THaystack, typename TSpec>
+inline void
+goEnd(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	//_finderSetNonEmpty(me);
+	goEnd(hostIterator(me));
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline typename Position<Finder<THaystack, TSpec> >::Type
+position(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	if (empty(me)) return 0;
+	return position(hostIterator(me));
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Position<Finder<THaystack, TSpec> >::Type
+position(Finder<THaystack, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	if (empty(me)) return 0;
+	return position(hostIterator(me));
+}
+
+//____________________________________________________________________________
+/**
+.Function.setPosition:
+..cat:Searching
+..summary:Sets the position of a finder.
+..signature:setPosition(finder, pos)
+..param.finder:A finder.
+...class:Class.Finder
+..param.pos:A position.
+...metafunction:Metafunction.Position
+..see:Function.position
+..include:seqan/find.h
+*/
+
+template <typename THaystack, typename TSpec, typename TPosition>
+inline void 
+setPosition(Finder<THaystack, TSpec> & me, TPosition pos_)
+{
+SEQAN_CHECKPOINT
+	setPosition(hostIterator(me), pos_);
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline Finder<THaystack, TSpec> &
+operator--(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	--hostIterator(me);
+	return me;
+}
+
+template <typename THaystack, typename TSpec>
+inline Finder<THaystack, TSpec> &
+operator++(Finder<THaystack, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+/*			if (beforeBegin()) {
+		goBegin(hostIterator(me));
+	} else*/
+		++hostIterator(me);
+	return me;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THaystack, typename TSpec, typename TIntegral>
+inline Finder<THaystack, TSpec> const
+operator + (Finder<THaystack, TSpec> const & left, TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Finder<THaystack, TSpec>(hostIterator(left) + right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THaystack, typename TSpec, typename TIntegral>
+inline Finder<THaystack, TSpec> &
+operator += (Finder<THaystack, TSpec> & left,
+				TIntegral right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) += right;
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THaystack, typename TSpec, typename TIntegral>
+inline Finder<THaystack, TSpec> const
+operator - (Finder<THaystack, TSpec> const & left, TIntegral right)
+{
+SEQAN_CHECKPOINT
+	return Finder<THaystack, TSpec>(hostIterator(left) - right);
+}
+
+template <typename THaystack, typename TSpec, typename TIntegral>
+inline typename Difference<Finder<THaystack, TSpec> const>::Type
+operator - (Finder<THaystack, TSpec> const & left, Finder<THaystack, TSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	return hostIterator(left) - hostIterator(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THaystack, typename TSpec, typename TIntegral>
+inline Finder<THaystack, TSpec> &
+operator -= (Finder<THaystack, TSpec> & left,
+				TIntegral right)
+{
+SEQAN_CHECKPOINT
+	hostIterator(left) -= right;
+	return left;
+}
+
+//____________________________________________________________________________
+
+
+/**
+.Function.setHaystack:
+..summary:Sets the haystack of a @Class.Finder@ object.
+..cat:Searching
+..signature:setHaystack(finder, haystack)
+..param.finder:The @Class.Finder@ object to search with.
+...type:Class.Finder
+..param.haystack:The haystack object the finder searches through.
+...type:Class.String
+..include:seqan/find.h
+*/
+
+template < typename THaystack, typename TSpec >
+inline void
+setHaystack(Finder<THaystack, TSpec> &obj, THaystack const &hstk) {
+	setHost(obj, hstk);
+}
+
+/**
+.Function.haystack:
+..summary:Returns the haystack of a @Class.Finder@ object.
+..cat:Searching
+..signature:haystack(finder)
+..param.finder:The @Class.Finder@ object to search through.
+...type:Class.Finder
+..returns:The haystack object.
+..remarks:The result type is @Metafunction.Haystack@$<TFinder>::Type$ for finder of type $TFinder$.
+..include:seqan/find.h
+*/
+
+template < typename TObject >
+inline typename Haystack<TObject>::Type &
+haystack(TObject &obj) {
+	return container(obj);
+}
+
+template < typename TObject >
+inline typename Haystack<TObject const>::Type &
+haystack(TObject const &obj) {
+	return container(obj);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Container.param.T.type:Class.Finder
+template <typename THaystack, typename TSpec>
+struct Container< Finder<THaystack, TSpec> > {
+	typedef THaystack Type;
+};
+
+template <typename THaystack, typename TSpec>
+struct Container< Finder<THaystack, TSpec> const> {
+	typedef THaystack const Type;
+};
+
+
+///.Metafunction.Host.param.T.type:Class.Finder
+template <typename THaystack, typename TSpec>
+struct Host< Finder<THaystack, TSpec> > {
+	typedef THaystack Type;
+};
+
+template <typename THaystack, typename TSpec>
+struct Host< Finder<THaystack, TSpec> const> {
+	typedef THaystack const Type;
+};
+
+
+///.Metafunction.Value.param.T.type:Class.Finder
+template <typename THaystack, typename TSpec>
+struct Value< Finder<THaystack, TSpec> > {
+	typedef typename Value<THaystack>::Type Type;
+};
+
+template <typename THaystack, typename TSpec>
+struct Position< Finder<THaystack, TSpec> >:
+	Position<THaystack> {};
+
+
+///.Metafunction.Difference.param.T.type:Class.Finder
+template <typename THaystack, typename TSpec>
+struct Difference< Finder<THaystack, TSpec> > {
+	typedef typename Difference<THaystack>::Type Type;
+};
+
+template <typename THaystack, typename TSpec>
+struct Size< Finder<THaystack, TSpec> > {
+	typedef typename Size<THaystack>::Type Type;
+};
+
+
+///.Metafunction.Iterator.param.T.type:Class.Finder
+template <typename THaystack, typename TSpec, typename TIteratorSpec>
+struct Iterator< Finder<THaystack, TSpec>, TIteratorSpec >
+{
+	typedef typename Iterator<THaystack>::Type Type;
+};
+
+template <typename THaystack, typename TSpec, typename TIteratorSpec>
+struct Iterator< Finder<THaystack, TSpec> const, TIteratorSpec >
+{
+	typedef typename Iterator<THaystack>::Type Type;
+};
+
+
+// TODO(holtgrew): Document DefaultGetIterator at main location, first.
+// .Metafunction.DefaultGetIterator.param.T.type:Class.Finder
+template <typename THaystack, typename TSpec>
+struct DefaultGetIteratorSpec< Finder<THaystack, TSpec> >:
+	DefaultGetIteratorSpec< THaystack >
+{
+};
+
+template <typename THaystack, typename TSpec>
+struct DefaultGetIteratorSpec< Finder<THaystack, TSpec> const>:
+	DefaultGetIteratorSpec< THaystack const>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find/find_begin.h b/src/SeqAn-1.3/seqan/find/find_begin.h
new file mode 100644
index 0000000..9e01968
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_begin.h
@@ -0,0 +1,395 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_BEGIN_H
+#define SEQAN_HEADER_FIND_BEGIN_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Forward declarations of Pattern Specs that could be used prefix search
+
+//see find_score.h
+template <typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+struct DPSearch;
+
+//see finder_myers_ukkonen.h
+template <typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+struct Myers;
+
+
+//____________________________________________________________________________
+
+// TODO(holtgrew): Difference to DefaultPattern?
+/**
+.Metafunction.DefaultFindBeginPatternSpec:
+..summary:Type of the default findBegin pattern specialization, given a score.
+..signature:DefaultBeginPatternSpec<TScore>
+..param.TScore:A score type.
+...type:Class.Score
+..returns.param.Type:The pattern specialization to use as a default.
+..include:seqan/find.h
+ */
+template <typename TScore = EditDistanceScore, typename THasState = True>
+struct DefaultFindBeginPatternSpec
+{
+	typedef DPSearch<TScore, FindPrefix, void> Type;
+};
+
+template <typename THasState>
+struct DefaultFindBeginPatternSpec<EditDistanceScore, THasState>
+{
+	// typedef Myers<FindPrefix, void, True> Type;
+	typedef Myers<FindPrefix, THasState, void> Type;
+};
+
+//____________________________________________________________________________
+//must be implemented for all patterns that do approximate infix finding
+
+template <typename TPattern>
+struct FindBeginPatternSpec 
+{
+	typedef void Type; //void means: no find begin (see FindBegin_)
+};
+
+//____________________________________________________________________________
+// Metafunction FindBeginPattern: pattern used to find the begin of an approximate match
+
+template <typename TPattern>
+struct FindBeginPattern
+{
+	typedef typename Needle<TPattern>::Type TNeedle_;
+	typedef ModifiedString<TNeedle_, ModReverse> TReverseNeedle_;
+	typedef typename FindBeginPatternSpec<TPattern>::Type TFindBeginPatternSpec_;
+	typedef Pattern<TReverseNeedle_, TFindBeginPatternSpec_> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Base class for approximate finders that manages findBegin stuff
+
+template <typename TPattern, typename TFindBeginPatternSpec = typename FindBeginPatternSpec<TPattern>::Type >
+struct FindBegin_
+{
+	typedef typename FindBeginPattern<TPattern>::Type TFindBeginPattern_;
+
+	TFindBeginPattern_ data_findBeginPattern;
+};
+
+template <typename TPattern>
+struct FindBegin_ <TPattern, void>
+{
+//need no findBegin if FindBeginPatternSpec is void
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFindBeginPatternSpec>
+struct FindBeginImpl_
+{
+	template <typename TPattern, typename TNeedle>
+	static inline void
+	_findBeginInit(TPattern & pattern, TNeedle & needle_)
+	{
+//		setNeedle(pattern.data_findBeginPattern, reverseString(needle(pattern)));
+		setHost(needle(pattern.data_findBeginPattern), needle_);
+		setScoringScheme(pattern.data_findBeginPattern, scoringScheme(pattern));
+	}
+//____________________________________________________________________________
+
+	template <typename TFinder, typename TPattern, typename TLimit>
+	static inline bool
+	findBegin(TFinder & finder, TPattern & pattern, TLimit limit)
+	{
+		typedef typename FindBeginPattern<TPattern>::Type TFindBeginPattern;
+		typedef typename Haystack<TFinder>::Type THaystack;
+		typedef ModifiedString<THaystack, ModReverse> TReverseHaystack;
+		typedef Finder<TReverseHaystack> TBeginFinder;
+		typedef typename Position<THaystack>::Type TPosition;
+
+		TFindBeginPattern & find_begin_pattern = pattern.data_findBeginPattern;
+		setScoreLimit(find_begin_pattern, limit);
+
+		//build begin_finder
+		TBeginFinder begin_finder;
+		THaystack & hayst = haystack(finder);
+		setContainer(host(hostIterator(begin_finder)), hayst);
+		TPosition begin_finder_beginPosition = position(finder);
+		TPosition begin_finder_position;
+
+		if (!finder._beginFind_called)
+		{//start finding
+			finder._beginFind_called = true;
+			_setFinderLength(finder, 0);
+			clear(begin_finder);
+			begin_finder_position = begin_finder_beginPosition;
+		}
+		else
+		{//resume finding
+			_finderSetNonEmpty(begin_finder);
+			SEQAN_ASSERT(length(finder) > 0)
+			begin_finder_position = endPosition(finder) - length(finder);
+		}
+		setPosition(host(hostIterator(begin_finder)), begin_finder_position);
+		_setFinderEnd(begin_finder);
+		_setFinderLength(begin_finder, length(finder));
+
+		bool begin_found = find(begin_finder, find_begin_pattern);
+		if (begin_found)
+		{//new begin found: report in finder
+			_setFinderLength(finder, begin_finder_beginPosition - position(host(hostIterator(begin_finder)))+1);
+		}
+		return begin_found;
+	}
+	template <typename TFinder, typename TPattern>
+	static inline bool
+	findBegin(TFinder & finder, TPattern & pattern)
+	{
+		return findBegin(finder, pattern, scoreLimit(pattern));
+	}
+
+//____________________________________________________________________________
+
+	template <typename TPattern>
+	static inline typename Value<typename ScoringScheme<TPattern>::Type>::Type
+	getBeginScore(TPattern & pattern)
+	{
+		return getScore(pattern.data_findBeginPattern);
+	}
+};
+
+
+// TODO(holtgrew): Copy-and-paste code from above.
+template <typename THasState>
+struct FindBeginImpl_<Myers<FindPrefix, THasState, void> >
+{
+	template <typename TPattern, typename TNeedle>
+	static inline void
+	_findBeginInit(TPattern & pattern, TNeedle & needle_)
+	{
+//		setNeedle(pattern.data_findBeginPattern, reverseString(needle(pattern)));
+		setHost(pattern.data_findBeginPattern, reverseString(needle_));
+//         _patternFirstInit(pattern.data_findBeginPattern, host(pattern));
+	}
+//____________________________________________________________________________
+
+	template <typename TFinder, typename TPattern, typename TLimit>
+	static inline bool
+	findBegin(TFinder & finder, TPattern & pattern, TLimit limit)
+	{
+		typedef typename FindBeginPattern<TPattern>::Type TFindBeginPattern;
+		typedef typename Haystack<TFinder>::Type THaystack;
+		typedef ModifiedString<THaystack, ModReverse> TReverseHaystack;
+		typedef Finder<TReverseHaystack> TBeginFinder;
+		typedef typename Position<THaystack>::Type TPosition;
+
+		TFindBeginPattern & find_begin_pattern = pattern.data_findBeginPattern;
+		setScoreLimit(find_begin_pattern, limit);
+
+		//build begin_finder
+		TBeginFinder begin_finder;
+		THaystack & hayst = haystack(finder);
+		setContainer(host(hostIterator(begin_finder)), hayst);
+		TPosition begin_finder_beginPosition = position(finder);
+		TPosition begin_finder_position;
+
+		if (!finder._beginFind_called)
+		{//start finding
+			finder._beginFind_called = true;
+			_setFinderLength(finder, 0);
+			clear(begin_finder);
+			begin_finder_position = begin_finder_beginPosition;
+		}
+		else
+		{//resume finding
+			_finderSetNonEmpty(begin_finder);
+			SEQAN_ASSERT(length(finder) > 0)
+			begin_finder_position = endPosition(finder) - length(finder);
+		}
+		setPosition(host(hostIterator(begin_finder)), begin_finder_position);
+		_setFinderEnd(begin_finder);
+		_setFinderLength(begin_finder, length(finder));
+
+		bool begin_found = find(begin_finder, find_begin_pattern);
+		if (begin_found)
+		{//new begin found: report in finder
+			_setFinderLength(finder, begin_finder_beginPosition - position(host(hostIterator(begin_finder)))+1);
+		}
+		return begin_found;
+	}
+	template <typename TFinder, typename TPattern>
+	static inline bool
+	findBegin(TFinder & finder, TPattern & pattern)
+	{
+		return findBegin(finder, pattern, scoreLimit(pattern));
+	}
+
+//____________________________________________________________________________
+
+	template <typename TPattern>
+	static inline typename Value<typename ScoringScheme<TPattern>::Type>::Type
+	getBeginScore(TPattern & pattern)
+	{
+		return getScore(pattern.data_findBeginPattern);
+	}
+};
+
+//default implementation of findBegin emulates the behaviour 
+//of findBegin for approximate string matching algorithms
+//for exact algorithms:
+//the first call returns true ("begin position found")
+//the next calls return false ("no further begin position found")
+//no searching needed, since the exact algorithms set the 
+//match length manually via "_setFinderLength" (it's the needle length)
+
+template <>
+struct FindBeginImpl_<void>
+{
+	template <typename TPattern, typename TNeedle>
+	static inline void
+	_findBeginInit(TPattern &, TNeedle &)
+	{
+	}
+
+	template <typename TFinder, typename TPattern, typename TLimit>
+	static inline bool
+	findBegin(TFinder & finder, TPattern &, TLimit)
+	{
+		if (!finder._beginFind_called)
+		{
+			finder._beginFind_called = true;
+			return true;
+		}
+		return false;
+	}
+	template <typename TFinder, typename TPattern>
+	static inline bool
+	findBegin(TFinder & finder, TPattern & pattern)
+	{
+		return findBegin(finder, pattern, 0);
+	}
+
+	template <typename TPattern>
+	static inline typename Value<typename ScoringScheme<TPattern>::Type>::Type
+	getBeginScore(TPattern & pattern)
+	{
+		return getScore(pattern);
+	}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//initialize pattern of begin finding
+template <typename TPattern, typename TNeedle>
+inline void
+_findBeginInit(TPattern & pattern, TNeedle & needle_)
+{
+	typedef typename FindBeginPatternSpec<TPattern>::Type TFindBeginPatternSpec;
+	return FindBeginImpl_<TFindBeginPatternSpec>::_findBeginInit(pattern, needle_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//find begin main interface 
+
+/**
+.Function.findBegin:
+..summary:Search the begin of an approximate match.
+..cat:Searching
+..signature:findBegin(finder, pattern [, limit])
+..param.finder:The @Class.Finder@ object to search through.
+...type:Class.Finder
+..param.pattern:The @Class.Pattern@ object to search for.
+...remarks:This must be a pattern for approximate string matching.
+...type:Class.Pattern
+..param.limit:The score limit.
+...default:The limit used during the last @Function.find@ call, see @Function.getScore at .
+...remarks:All occurrences that score at least $limit$ are reported.
+..returns:$boolean$ that indicates whether an begin position was found.
+..remarks:The function @Function.find@ successfully called be called - that is an end position was found - before calling $findBegin$ to find a begin position.
+..see:Function.getBeginScore
+..see:Function.find
+..include:seqan/find.h
+*/
+template <typename TFinder, typename TPattern>
+inline bool
+findBegin(TFinder & finder,
+		  TPattern & pattern)
+{
+	typedef typename FindBeginPatternSpec<TPattern>::Type TFindBeginPatternSpec;
+	return FindBeginImpl_<TFindBeginPatternSpec>::findBegin(finder, pattern);
+}
+template <typename TFinder, typename TPattern, typename TLimit>
+inline bool
+findBegin(TFinder & finder,
+		  TPattern & pattern,
+		  TLimit limit)
+{
+	typedef typename FindBeginPatternSpec<TPattern>::Type TFindBeginPatternSpec;
+	return FindBeginImpl_<TFindBeginPatternSpec>::findBegin(finder, pattern, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**.Function.getBeginScore
+..cat:Searching
+..summary:Score of the last match found by @Function.findBegin@ during approximate searching.
+..signature:getBeginScore(pattern)
+..param.pattern:A @Concept.Pattern|pattern@ that can be used for approximate searching.
+...type:Spec.DPSearch
+..returns:The score of the last match found using $pattern$.
+...remarks:The value is set after a successfully call of @Function.findBegin at .
+If no match was found, the value is undefined.
+..see:Function.findBegin
+..see:Function.getScore
+*/
+
+template <typename TPattern>
+inline typename Value<typename ScoringScheme<TPattern>::Type>::Type
+getBeginScore(TPattern & pattern)
+{
+	typedef typename FindBeginPatternSpec<TPattern>::Type TFindBeginPatternSpec;
+	return FindBeginImpl_<TFindBeginPatternSpec>::getBeginScore(pattern);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find/find_bndm.h b/src/SeqAn-1.3/seqan/find/find_bndm.h
new file mode 100644
index 0000000..6aa0db3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_bndm.h
@@ -0,0 +1,261 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_BNDMALGO_H
+#define SEQAN_HEADER_FIND_BNDMALGO_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// BndmAlgo
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.BndmAlgo:
+..summary: Backward Nondeterministic Dawg Matching algorithm. Exact string matching using bit parallelism.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, BndmAlgo>
+..param.TNeedle:The needle type.
+...type:Class.String
+..remarks.text:The types of the needle and the haystack have to match.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.BndmAlgo
+
+struct BndmAlgo_;
+typedef Tag<BndmAlgo_> BndmAlgo;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, BndmAlgo> {
+//____________________________________________________________________________
+public:
+	typedef unsigned int TWord;
+
+	Holder<TNeedle> data_host;
+	String<TWord> table;			// Look up table for each character in the alphabet (called B in "Navarro")
+	String<TWord> activeFactors;	// The active factors in the pattern (called D in "Navarro")
+	TWord needleLength;				// e.g., needleLength=33 --> blockCount=2 (iff w=32 bits)
+	TWord haystackLength;			// Length of haystack
+	TWord blockCount;				// #unsigned ints required to store needle
+	TWord last;
+
+//____________________________________________________________________________
+
+	Pattern() {}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		setHost(*this, ndl);
+	}
+
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, BndmAlgo> & me, TNeedle2 const& needle) {
+	SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+	typedef typename Value<TNeedle>::Type TValue;
+
+	me.needleLength = length(needle);
+	if (me.needleLength<1) me.blockCount=1;
+	else me.blockCount=((me.needleLength-1) / BitsPerValue<TWord>::VALUE)+1;
+			
+	clear(me.table);
+	resize(me.table, me.blockCount * ValueSize<TValue>::VALUE, 0, Exact());
+
+	for (TWord j = 0; j < me.needleLength; ++j) {
+		// Determine character position in array table
+		TWord pos = convert<TWord>(getValue(needle,j));
+		me.table[me.blockCount*pos + j / BitsPerValue<TWord>::VALUE] |= (1<<(j%BitsPerValue<TWord>::VALUE));
+	}
+
+	setValue(me.data_host, needle);
+	/*
+	// Debug code
+	std::cout << "Alphabet size: " << ValueSize<TValue>::VALUE << ::std::endl;
+	std::cout << "Needle length: " << me.needleLength << ::std::endl;
+	std::cout << "Block count: " << me.blockCount << ::std::endl;
+
+	for(unsigned int i=0;i<ValueSize<TValue>::VALUE;++i) {
+		if ((i<97) || (i>122)) continue;
+		std::cout << static_cast<char>(i) << ": ";
+		for(int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+				std::cout << ((me.table[me.blockCount*i+j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+	}
+	*/
+}
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, BndmAlgo> & me, TNeedle2 & needle)
+{
+	setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline void _patternInit (Pattern<TNeedle, BndmAlgo> & me) 
+{
+SEQAN_CHECKPOINT
+	clear(me.activeFactors);
+	resize(me.activeFactors, me.blockCount, 0, Exact());
+	me.last = 0;
+}
+
+
+//____________________________________________________________________________
+
+
+template <typename TFinder, typename TNeedle>
+inline bool _findBndmSmallNeedle(TFinder & finder, 
+								  Pattern<TNeedle, BndmAlgo> & me) {
+	SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+	if (me.haystackLength < me.needleLength) return false;
+	while (position(finder) <= me.haystackLength - me.needleLength) 
+	{
+		me.last=me.needleLength;
+		TWord j=me.needleLength;
+		me.activeFactors[0]=~0;
+		while (me.activeFactors[0]!=0) 
+		{
+			TWord pos = convert<TWord>(*(finder+j-1));
+			me.activeFactors[0] = (me.activeFactors[0] & me.table[me.blockCount*pos]);
+			j--;
+			if ((me.activeFactors[0] & 1) != 0) 
+			{
+				if (j>0) me.last=j;
+				else
+				{
+					_setFinderEnd(finder, position(finder) + me.needleLength);
+					return true;
+				}
+			}
+			me.activeFactors[0] = me.activeFactors[0] >> 1;
+		}
+		finder+=me.last;
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool _findBndmLargeNeedle(TFinder & finder, Pattern<TNeedle, BndmAlgo> & me) {
+	SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+	TWord carryPattern = (1<< (BitsPerValue<TWord>::VALUE - 1));
+	while (position(finder) <= me.haystackLength - me.needleLength) {
+		me.last=me.needleLength;
+		TWord j=me.needleLength;
+		for(TWord block=0;block<me.blockCount;++block) me.activeFactors[block]=~0;
+		bool zeroPrefSufMatch = false;
+		while (!zeroPrefSufMatch) {
+			TWord pos = convert<TWord>(*(finder+j-1));
+
+			/*	
+			// Debug code
+			std::cout << "   ";
+			for(int j=0;j<me.blockCount;++j) {
+				for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+					std::cout << ((me.activeFactors[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+				}
+			}
+			std::cout << ::std::endl;
+			*/
+
+			for(TWord block=0;block<me.blockCount;++block) me.activeFactors[block] &= me.table[me.blockCount*pos+block];
+			j--;
+			if ((me.activeFactors[0] & 1) != 0) 
+			{
+				if (j>0) me.last=j;
+				else 
+				{
+					_setFinderEnd(finder, position(finder) + me.needleLength);
+					return true;
+				}
+			}
+			bool carry=0;
+			zeroPrefSufMatch=true;
+			for(int block=me.blockCount-1;block>=0;--block) {
+				bool newCarry=((me.activeFactors[block] & 1)!=0); 
+				me.activeFactors[block]>>=1;
+				if (carry) me.activeFactors[block]|=carryPattern;
+				carry=newCarry;
+				if (me.activeFactors[block]!=0) zeroPrefSufMatch=false;
+			}
+		}
+		finder+=me.last;
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool find(TFinder & finder, Pattern<TNeedle, BndmAlgo> & me) {
+	SEQAN_CHECKPOINT
+
+	if (empty(finder)) {
+		_patternInit(me);
+		_setFinderLength(finder, length(needle(me)));
+		_finderSetNonEmpty(finder);
+		me.haystackLength = length(container(finder));
+	} else
+		finder+=me.last;
+
+	// Fast algorithm for needles < machine word?
+	if (me.blockCount == 1) {
+		return _findBndmSmallNeedle(finder, me);
+	} else {
+		return _findBndmLargeNeedle(finder, me);
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_SHIFTAND_H
diff --git a/src/SeqAn-1.3/seqan/find/find_bom.h b/src/SeqAn-1.3/seqan/find/find_bom.h
new file mode 100644
index 0000000..af20d41
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_bom.h
@@ -0,0 +1,242 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Tobias Rausch <rausch at embl.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_BOM_H
+#define SEQAN_HEADER_FIND_BOM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// BomAlgo
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Bfam:
+..summary:Backward Factor Automaton Matching algorithm.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, Bfam<TAutomaton> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..param.TAutomaton:A tag that specifies the used automaton.
+...default:@Spec.Bfam<Oracle>@
+..remarks.text:To be used in combination with the default specialization of @Class.Finder at .
+..include:seqan/find.h
+*/
+
+/**
+.Spec.Bfam<Oracle>:
+..summary:Backward Oracle Matching algorithm.
+..general:Spec.Bfam
+..cat:Searching
+..signature:Pattern<TNeedle, Bfam<Oracle> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..remarks.text:To be used in combination with the default specialization of @Class.Finder at .
+..see:Spec.Bfam<Trie>
+..include:seqan/find.h
+*/
+/**
+.Spec.Bfam<Trie>:
+..summary:Backward Suffix Trie Matching algorithm.
+..general:Spec.Bfam
+..cat:Searching
+..signature:Pattern<TNeedle, Bfam<Trie> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..remarks.text:To be used in combination with the default specialization of @Class.Finder at .
+..see:Spec.Bfam<Oracle>
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.Bfam
+
+struct Oracle; //Oracle Tag => "BOM"
+struct Trie; //Trie Tag => "BTM"
+
+template <typename TSpec = Oracle>
+struct Bfam; //backward factor automaton searching
+
+typedef Bfam<Oracle> BomAlgo; //deprecated, still there for compatibility reasons
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TSpec>
+class Pattern<TNeedle, Bfam<TSpec> > {
+//____________________________________________________________________________
+public:
+	typedef typename Value<TNeedle>::Type TAlphabet;
+	typedef typename Size<TNeedle>::Type TSize;
+	Holder<TNeedle> data_host;
+	TSize needleLength;
+	TSize haystackLength;
+	TSize step;
+	Graph<Automaton<TAlphabet, void, WithoutEdgeId> > automaton;
+
+//____________________________________________________________________________
+
+	Pattern() {
+	}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+SEQAN_CHECKPOINT
+		setHost(*this, ndl);
+	}
+
+	~Pattern() {
+		SEQAN_CHECKPOINT
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Host Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, BomAlgo> >
+{
+	typedef TNeedle Type;
+};
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, BomAlgo> const>
+{
+	typedef TNeedle const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+//Bfam<Oracle>: BOM Algorithm
+template <typename TNeedle, typename TNeedle2>
+inline void 
+setHost (Pattern<TNeedle, Bfam<Oracle> > & me, TNeedle2 const& needle) 
+{
+	SEQAN_CHECKPOINT
+	me.needleLength = length(needle);
+	clear(me.automaton);
+	createOracleOnReverse(me.automaton,needle);
+	setValue(me.data_host, needle);
+}
+
+//Bfam<Trie>: BTM Algorithm (the same as BOM, but with an trie)
+template <typename TNeedle, typename TNeedle2>
+inline void 
+setHost (Pattern<TNeedle, Bfam<Trie> > & me, TNeedle2 const& needle) 
+{
+	SEQAN_CHECKPOINT;
+	typedef typename Position<TNeedle>::Type TPosition;
+	me.needleLength = length(needle);
+	clear(me.automaton);
+
+	String<String<TPosition> > terminal_state_map; //dummy
+	typedef typename Value<TNeedle2 const>::Type TValue;
+	String<TValue> reverse_string = needle;
+	reverse(reverse_string);
+
+	createSuffixTrie(me.automaton, terminal_state_map, reverse_string);
+
+	setValue(me.data_host, needle);
+}
+
+template <typename TNeedle, typename TNeedle2, typename TSpec>
+inline void 
+setHost (Pattern<TNeedle, Bfam<TSpec> > & me, TNeedle2 & needle)
+{
+	setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle, typename TSpec>
+inline void _patternInit (Pattern<TNeedle, Bfam<TSpec> > & me) 
+{
+SEQAN_CHECKPOINT
+	me.step = 0;
+}
+
+
+//____________________________________________________________________________
+
+
+template <typename TFinder, typename TNeedle, typename TSpec>
+inline bool 
+find(TFinder & finder, Pattern<TNeedle, Bfam<TSpec> > & me) 
+{
+	SEQAN_CHECKPOINT
+	
+	if (empty(finder)) {
+		_patternInit(me);
+		_setFinderLength(finder, length(needle(me)));
+		_finderSetNonEmpty(finder);
+		me.haystackLength = length(container(finder));
+	} else
+		finder+=me.step;
+
+	if (me.haystackLength < me.needleLength) return false;
+	typedef typename Value<TNeedle>::Type TAlphabet;
+	typedef Graph<Automaton<TAlphabet> > TOracle;
+	typedef typename Size<TNeedle>::Type TSize;
+	typedef typename VertexDescriptor<TOracle>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TOracle>::Type TEdgeDescriptor;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	while (position(finder) <= me.haystackLength - me.needleLength) {
+		TVertexDescriptor current = getRoot(me.automaton);
+		TSize j = me.needleLength;
+		while ((j>0) &&	(current != nilVal))
+		{
+			TAlphabet c = *(finder+(j-1));
+			current = targetVertex(me.automaton, findEdge(me.automaton, current, c));
+			--j;
+		}
+		if (current != nilVal) {
+			me.step = j + 1;
+			_setFinderEnd(finder, position(finder) + me.needleLength);
+			return true;
+		}
+		finder += j + 1;
+	}
+	return false;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_SHIFTAND_H
diff --git a/src/SeqAn-1.3/seqan/find/find_generated_forwards.h b/src/SeqAn-1.3/seqan/find/find_generated_forwards.h
new file mode 100644
index 0000000..f62f5f2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_generated_forwards.h
@@ -0,0 +1,1062 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_FIND_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_FIND_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AbndmAlgo
+
+struct AbndmAlgo;       	// "projects/library/seqan/find/find_abndm.h"(92)
+
+//____________________________________________________________________________
+// AhoCorasick_
+
+struct AhoCorasick_;       	// "projects/library/seqan/find/find_ahocorasick.h"(61)
+
+//____________________________________________________________________________
+// AlignTextBanded
+
+template <typename TSpec, typename TFinderCharSetPolicy , typename TPatternCharSetPolicy > struct AlignTextBanded;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(78)
+
+//____________________________________________________________________________
+// Bfam
+
+template <typename TSpec > struct Bfam;       	// "projects/library/seqan/find/find_bom.h"(90)
+
+//____________________________________________________________________________
+// BndmAlgo_
+
+struct BndmAlgo_;       	// "projects/library/seqan/find/find_bndm.h"(59)
+
+//____________________________________________________________________________
+// DPSearch
+
+template <typename TScore, typename TSpec , typename TFindBeginPatternSpec > struct DPSearch;       	// "projects/library/seqan/find/find_score.h"(47)
+template <typename TScore, typename TSpec, typename TFindBeginPatternSpec> struct DPSearch;       	// "projects/library/seqan/find/find_begin.h"(49)
+
+//____________________________________________________________________________
+// DefaultFindBeginPatternSpec
+
+template <typename TScore , typename THasState > struct DefaultFindBeginPatternSpec;       	// "projects/library/seqan/find/find_begin.h"(70)
+
+//____________________________________________________________________________
+// DefaultFinder
+
+template <typename TObject > struct DefaultFinder;       	// "projects/library/seqan/find/find_base.h"(82)
+
+//____________________________________________________________________________
+// DefaultPattern
+
+template <typename TObject > struct DefaultPattern;       	// "projects/library/seqan/find/find_base.h"(97)
+
+//____________________________________________________________________________
+// FileReader
+
+template <typename TFormat, typename TFile, typename TSpec> struct FileReader;       	// "projects/library/seqan/find/find_horspool.h"(297)
+
+//____________________________________________________________________________
+// FindBeginImpl_
+
+template <typename TFindBeginPatternSpec> struct FindBeginImpl_;       	// "projects/library/seqan/find/find_begin.h"(124)
+
+//____________________________________________________________________________
+// FindBeginPattern
+
+template <typename TPattern> struct FindBeginPattern;       	// "projects/library/seqan/find/find_begin.h"(95)
+
+//____________________________________________________________________________
+// FindBeginPatternSpec
+
+template <typename TPattern> struct FindBeginPatternSpec;       	// "projects/library/seqan/find/find_begin.h"(86)
+
+//____________________________________________________________________________
+// FindBegin_
+
+template <typename TPattern, typename TFindBeginPatternSpec > struct FindBegin_;       	// "projects/library/seqan/find/find_begin.h"(107)
+
+//____________________________________________________________________________
+// FindInfix
+
+struct FindInfix;       	// "projects/library/seqan/find/find_base.h"(56)
+
+//____________________________________________________________________________
+// FindPrefix
+
+struct FindPrefix;       	// "projects/library/seqan/find/find_base.h"(67)
+
+//____________________________________________________________________________
+// Finder
+
+template <typename THaystack, typename TSpec > class Finder;       	// "projects/library/seqan/find/find_base.h"(197)
+
+//____________________________________________________________________________
+// HammingSimple_
+
+struct HammingSimple_;       	// "projects/library/seqan/find/find_hamming_simple.h"(59)
+
+//____________________________________________________________________________
+// Haystack
+
+template <typename TFinder> struct Haystack;       	// "projects/library/seqan/find/find_base.h"(116)
+
+//____________________________________________________________________________
+// Hierarchical
+
+struct Hierarchical;       	// "projects/library/seqan/find/find_pex.h"(44)
+
+//____________________________________________________________________________
+// Horspool_
+
+struct Horspool_;       	// "projects/library/seqan/find/find_horspool.h"(58)
+
+//____________________________________________________________________________
+// MultiBfam
+
+template <typename TSpec > struct MultiBfam;       	// "projects/library/seqan/find/find_multiple_bfam.h"(75)
+
+//____________________________________________________________________________
+// MultiPatternFinder_
+
+struct MultiPatternFinder_;       	// "projects/library/seqan/find/find_multi.h"(43)
+
+//____________________________________________________________________________
+// MultipleShiftAnd_
+
+struct MultipleShiftAnd_;       	// "projects/library/seqan/find/find_multiple_shiftand.h"(59)
+
+//____________________________________________________________________________
+// Myers
+
+template <typename TSpec, typename THasState, typename TFindBeginPatternSpec> struct Myers;       	// "projects/library/seqan/find/find_begin.h"(53)
+template <typename TSpec , typename THasState , typename TFindBeginPatternSpec > struct Myers;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(70)
+
+//____________________________________________________________________________
+// MyersLargePattern_
+
+template <typename TNeedle, typename TSpec> struct MyersLargePattern_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(377)
+
+//____________________________________________________________________________
+// MyersLargeState_
+
+template <typename TNeedle, typename TSpec> struct MyersLargeState_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(250)
+
+//____________________________________________________________________________
+// MyersSmallAlphabet_
+
+template <typename TValue> struct MyersSmallAlphabet_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(163)
+
+//____________________________________________________________________________
+// MyersSmallPattern_
+
+template <typename TNeedle, typename TSpec> struct MyersSmallPattern_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(345)
+
+//____________________________________________________________________________
+// MyersSmallStateBandedShift_
+
+template <typename TNeedle, typename TSmallAlphabet> struct MyersSmallStateBandedShift_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(211)
+
+//____________________________________________________________________________
+// MyersSmallState_
+
+template <typename TNeedle, typename TSpec> struct MyersSmallState_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(197)
+
+//____________________________________________________________________________
+// MyersUkkonenHP0_
+
+template <typename T> struct MyersUkkonenHP0_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(152)
+
+//____________________________________________________________________________
+// NMatchesAll_
+
+struct NMatchesAll_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(74)
+
+//____________________________________________________________________________
+// NMatchesN_
+
+struct NMatchesN_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(73)
+
+//____________________________________________________________________________
+// NMatchesNone_
+
+struct NMatchesNone_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(72)
+
+//____________________________________________________________________________
+// Needle
+
+template <typename TPattern> struct Needle;       	// "projects/library/seqan/find/find_base.h"(133)
+
+//____________________________________________________________________________
+// NonHierarchical
+
+struct NonHierarchical;       	// "projects/library/seqan/find/find_pex.h"(45)
+
+//____________________________________________________________________________
+// Oracle
+
+struct Oracle;       	// "projects/library/seqan/find/find_bom.h"(86)
+
+//____________________________________________________________________________
+// Pattern
+
+template <typename TNeedle, typename TSpec > class Pattern;       	// "projects/library/seqan/find/find_pattern_base.h"(64)
+
+//____________________________________________________________________________
+// PatternState
+
+template <typename TPattern> struct PatternState;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(477)
+
+//____________________________________________________________________________
+// PatternState_
+
+template <typename TNeedle, typename TSpec> class PatternState_;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(284)
+
+//____________________________________________________________________________
+// Pex
+
+template <typename TVerification, typename TMultiFinder > struct Pex;       	// "projects/library/seqan/find/find_pex.h"(49)
+
+//____________________________________________________________________________
+// PexMultiFinder
+
+template <typename T> struct PexMultiFinder;       	// "projects/library/seqan/find/find_pex.h"(77)
+
+//____________________________________________________________________________
+// PexRange_
+
+template <typename TPosition,typename TScore,typename TVerifier,typename TNeedle> struct PexRange_;       	// "projects/library/seqan/find/find_pex.h"(88)
+
+//____________________________________________________________________________
+// ScoringScheme
+
+template <typename TNeedle> struct ScoringScheme;       	// "projects/library/seqan/find/find_pattern_base.h"(150)
+
+//____________________________________________________________________________
+// SetHorspool_
+
+struct SetHorspool_;       	// "projects/library/seqan/find/find_set_horspool.h"(59)
+
+//____________________________________________________________________________
+// ShiftAnd_
+
+struct ShiftAnd_;       	// "projects/library/seqan/find/find_shiftand.h"(59)
+
+//____________________________________________________________________________
+// ShiftOr_
+
+struct ShiftOr_;       	// "projects/library/seqan/find/find_shiftor.h"(59)
+
+//____________________________________________________________________________
+// Trie
+
+struct Trie;       	// "projects/library/seqan/find/find_bom.h"(87)
+
+//____________________________________________________________________________
+// WildShiftAnd_
+
+struct WildShiftAnd_;       	// "projects/library/seqan/find/find_wild_shiftand.h"(66)
+
+//____________________________________________________________________________
+// WuManberHash_
+
+template <typename TNeedle, int Q> struct WuManberHash_;       	// "projects/library/seqan/find/find_wumanber.h"(117)
+
+//____________________________________________________________________________
+// WuManberImpl_
+
+template <typename TNeedle, int Q> struct WuManberImpl_;       	// "projects/library/seqan/find/find_wumanber.h"(125)
+
+//____________________________________________________________________________
+// WuManber_
+
+struct WuManber_;       	// "projects/library/seqan/find/find_wumanber.h"(58)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AhoCorasick
+
+typedef Tag<AhoCorasick_> AhoCorasick;       	// "projects/library/seqan/find/find_ahocorasick.h"(62)
+
+//____________________________________________________________________________
+// BndmAlgo
+
+typedef Tag<BndmAlgo_> BndmAlgo;       	// "projects/library/seqan/find/find_bndm.h"(60)
+
+//____________________________________________________________________________
+// BomAlgo
+
+typedef Bfam<Oracle> BomAlgo;       	// "projects/library/seqan/find/find_bom.h"(92)
+
+//____________________________________________________________________________
+// HammingSimple
+
+typedef Tag<HammingSimple_> HammingSimple;       	// "projects/library/seqan/find/find_hamming_simple.h"(60)
+
+//____________________________________________________________________________
+// Horspool
+
+typedef Tag<Horspool_> Horspool;       	// "projects/library/seqan/find/find_horspool.h"(59)
+
+//____________________________________________________________________________
+// MultipatternFinder
+
+typedef Tag<MultiPatternFinder_> MultipatternFinder;       	// "projects/library/seqan/find/find_multi.h"(44)
+
+//____________________________________________________________________________
+// MultipleShiftAnd
+
+typedef Tag<MultipleShiftAnd_> MultipleShiftAnd;       	// "projects/library/seqan/find/find_multiple_shiftand.h"(60)
+
+//____________________________________________________________________________
+// MyersUkkonen
+
+typedef Myers<FindInfix, True, void> MyersUkkonen;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(96)
+
+//____________________________________________________________________________
+// MyersUkkonenBanded
+
+typedef Myers<AlignTextBanded<FindInfix, NMatchesN_, NMatchesN_>, True, void> MyersUkkonenBanded;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(142)
+
+//____________________________________________________________________________
+// MyersUkkonenGlobal
+
+typedef Myers<FindPrefix, True, void> MyersUkkonenGlobal;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(112)
+
+//____________________________________________________________________________
+// MyersUkkonenGlobalBanded
+
+typedef Myers<AlignTextBanded<FindPrefix, NMatchesN_, NMatchesN_>, True, void> MyersUkkonenGlobalBanded;       	// "projects/library/seqan/find/find_myers_ukkonen.h"(143)
+
+//____________________________________________________________________________
+// PexHierarchical
+
+typedef Pex<Hierarchical,AhoCorasick>   PexHierarchical;       	// "projects/library/seqan/find/find_pex.h"(51)
+
+//____________________________________________________________________________
+// PexNonHierarchical
+
+typedef Pex<NonHierarchical,AhoCorasick>  PexNonHierarchical;       	// "projects/library/seqan/find/find_pex.h"(52)
+
+//____________________________________________________________________________
+// SBomAlgo
+
+typedef MultiBfam<Oracle> SBomAlgo;       	// "projects/library/seqan/find/find_multiple_bfam.h"(77)
+
+//____________________________________________________________________________
+// SetHorspool
+
+typedef Tag<SetHorspool_> SetHorspool;       	// "projects/library/seqan/find/find_set_horspool.h"(60)
+
+//____________________________________________________________________________
+// ShiftAnd
+
+typedef Tag<ShiftAnd_> ShiftAnd;       	// "projects/library/seqan/find/find_shiftand.h"(60)
+
+//____________________________________________________________________________
+// ShiftOr
+
+typedef Tag<ShiftOr_> ShiftOr;       	// "projects/library/seqan/find/find_shiftor.h"(60)
+
+//____________________________________________________________________________
+// WildShiftAnd
+
+typedef Tag<WildShiftAnd_> WildShiftAnd;       	// "projects/library/seqan/find/find_wild_shiftand.h"(67)
+
+//____________________________________________________________________________
+// WuManber
+
+typedef Tag<WuManber_> WuManber;       	// "projects/library/seqan/find/find_wumanber.h"(59)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _buildAutomatonMultiBfam
+
+template <typename TNeedle, typename TStrs> inline void _buildAutomatonMultiBfam(Pattern<TNeedle, MultiBfam<Oracle> > & me, TStrs const & strs);       	// "projects/library/seqan/find/find_multiple_bfam.h"(137)
+template <typename TNeedle, typename TStrs> inline void _buildAutomatonMultiBfam(Pattern<TNeedle, MultiBfam<Trie> > & me, TStrs const & strs);       	// "projects/library/seqan/find/find_multiple_bfam.h"(145)
+
+//____________________________________________________________________________
+// _createAcTrie
+
+template <typename TNeedle> inline void _createAcTrie(Pattern<TNeedle, AhoCorasick> & me);       	// "projects/library/seqan/find/find_ahocorasick.h"(135)
+
+//____________________________________________________________________________
+// _createTree
+
+template <typename TNeedle, typename TMultiFinder> void _createTree(Pattern<TNeedle, Pex<Hierarchical, TMultiFinder > > &me, unsigned start, unsigned end, unsigned k, unsigned parent, unsigned direction, unsigned idx, unsigned plen);       	// "projects/library/seqan/find/find_pex.h"(532)
+
+//____________________________________________________________________________
+// _dataHost
+
+template <typename TNeedle, typename TSpec> inline Holder<TNeedle> & _dataHost(Pattern<TNeedle, TSpec> & me);       	// "projects/library/seqan/find/find_pattern_base.h"(164)
+template <typename TNeedle, typename TSpec> inline Holder<TNeedle> & _dataHost(Pattern<TNeedle, TSpec> const & me);       	// "projects/library/seqan/find/find_pattern_base.h"(170)
+
+//____________________________________________________________________________
+// _findAbndmLargeNeedle
+
+template <typename TFinder, typename TNeedle> inline bool _findAbndmLargeNeedle(TFinder & finder, Pattern<TNeedle, AbndmAlgo> & me);       	// "projects/library/seqan/find/find_abndm.h"(400)
+
+//____________________________________________________________________________
+// _findAbndmSmallNeedle
+
+template <typename TFinder, typename TNeedle> inline bool _findAbndmSmallNeedle(TFinder & finder, Pattern<TNeedle, AbndmAlgo> & me);       	// "projects/library/seqan/find/find_abndm.h"(266)
+
+//____________________________________________________________________________
+// _findBeginInit
+
+template <typename TPattern, typename TNeedle> inline void _findBeginInit(TPattern & pattern, TNeedle & needle_);       	// "projects/library/seqan/find/find_begin.h"(322)
+
+//____________________________________________________________________________
+// _findBndmLargeNeedle
+
+template <typename TFinder, typename TNeedle> inline bool _findBndmLargeNeedle(TFinder & finder, Pattern<TNeedle, BndmAlgo> & me);       	// "projects/library/seqan/find/find_bndm.h"(190)
+
+//____________________________________________________________________________
+// _findBndmSmallNeedle
+
+template <typename TFinder, typename TNeedle> inline bool _findBndmSmallNeedle(TFinder & finder, Pattern<TNeedle, BndmAlgo> & me);       	// "projects/library/seqan/find/find_bndm.h"(159)
+
+//____________________________________________________________________________
+// _findHammingSimpleCharsEqual
+
+template <typename TAlphabet, typename TNeedle> inline bool _findHammingSimpleCharsEqual(TAlphabet const & a, TAlphabet const & b, Pattern<TNeedle, HammingSimple> const &);       	// "projects/library/seqan/find/find_hamming_simple.h"(162)
+template <typename TNeedle> inline bool _findHammingSimpleCharsEqual(Dna5 const & ndlChar, Dna5 const & hstckChar, Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find/find_hamming_simple.h"(168)
+template <typename TNeedle> inline bool _findHammingSimpleCharsEqual(Dna5Q const & a, Dna5 const & b, Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find/find_hamming_simple.h"(180)
+template <typename TNeedle> inline bool _findHammingSimpleCharsEqual(Dna5 const & a, Dna5Q const & b, Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find/find_hamming_simple.h"(186)
+template <typename TNeedle> inline bool _findHammingSimpleCharsEqual(Dna5Q const & a, Dna5Q const & b, Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find/find_hamming_simple.h"(192)
+
+//____________________________________________________________________________
+// _findHorspool
+
+template <typename TFinder, typename TNeedle2> bool _findHorspool(TFinder & finder, Pattern<TNeedle2, Horspool> & me, bool find_first);       	// "projects/library/seqan/find/find_horspool.h"(140)
+template <typename TValue, typename TFormat, typename TFile, typename FileReaderTSpec, typename TFinderSpec, typename TNeedle2> bool _findHorspool(Finder<String<TValue, FileReader<TFormat, TFile, FileReaderTSpec> >, TFinderSpec > & finder, Pattern<TNeedle2, Horspool> & me, bool find_first);       	// "projects/library/seqan/find/find_horspool.h"(304)
+
+//____________________________________________________________________________
+// _findMyersLargePatterns
+
+template <typename TFinder, typename TNeedle, typename TSpec, typename THasState, typename THasState2, typename TFindBeginPatternSpec, typename TSize> inline bool _findMyersLargePatterns (TFinder & finder, Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern, PatternState_<TNeedle, Myers<TSpec, THasState2, TFindBeginPatternSpec> > & state, TSize haystack_length);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1285)
+
+//____________________________________________________________________________
+// _findMyersSmallPatterns
+
+template <typename TFinder, typename TNeedle, typename TSpec, typename THasState, typename THasState2, typename TFindBeginPatternSpec, typename TSize> inline bool _findMyersSmallPatterns( TFinder & finder, Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern, PatternState_<TNeedle, Myers<TSpec, THasState2, TFindBeginPatternSpec> > & state, TSize haystack_length);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1401)
+
+//____________________________________________________________________________
+// _findMyersSmallPatternsBanded
+
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec> finline bool _findMyersSmallPatternsBanded( TFinder & finder, TNeedle const & needle, PatternState_<TNeedle2, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1460)
+
+//____________________________________________________________________________
+// _findScoreSimpleProportional
+
+template <typename TFinder, typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec> bool _findScoreSimpleProportional(TFinder & finder, Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me);       	// "projects/library/seqan/find/find_score.h"(376)
+
+//____________________________________________________________________________
+// _findShiftAndLargeNeedle
+
+template <typename TFinder, typename TNeedle> bool _findShiftAndLargeNeedle(TFinder & finder, Pattern<TNeedle, MultipleShiftAnd> & me);       	// "projects/library/seqan/find/find_multiple_shiftand.h"(330)
+template <typename TFinder, typename TNeedle> inline bool _findShiftAndLargeNeedle(TFinder & finder, Pattern<TNeedle, WildShiftAnd> & me);       	// "projects/library/seqan/find/find_wild_shiftand.h"(625)
+template <typename TFinder, typename TNeedle> inline bool _findShiftAndLargeNeedle(TFinder & finder, Pattern<TNeedle, ShiftAnd> & me);       	// "projects/library/seqan/find/find_shiftand.h"(236)
+
+//____________________________________________________________________________
+// _findShiftAndSmallNeedle
+
+template <typename TFinder, typename TNeedle> bool _findShiftAndSmallNeedle(TFinder & finder, Pattern<TNeedle, MultipleShiftAnd> & me);       	// "projects/library/seqan/find/find_multiple_shiftand.h"(276)
+template <typename TFinder, typename TNeedle> inline bool _findShiftAndSmallNeedle(TFinder & finder, Pattern<TNeedle, WildShiftAnd> & me);       	// "projects/library/seqan/find/find_wild_shiftand.h"(602)
+template <typename TFinder, typename TNeedle> inline bool _findShiftAndSmallNeedle(TFinder & finder, Pattern<TNeedle, ShiftAnd> & me);       	// "projects/library/seqan/find/find_shiftand.h"(213)
+
+//____________________________________________________________________________
+// _findShiftOrLargeNeedle
+
+template <typename TFinder, typename TNeedle> inline bool _findShiftOrLargeNeedle(TFinder & finder, Pattern<TNeedle, ShiftOr> & me);       	// "projects/library/seqan/find/find_shiftor.h"(269)
+
+//____________________________________________________________________________
+// _findShiftOrSmallNeedle
+
+template <typename TFinder, typename TNeedle> inline bool _findShiftOrSmallNeedle(TFinder & finder, Pattern<TNeedle, ShiftOr> & me);       	// "projects/library/seqan/find/find_shiftor.h"(233)
+
+//____________________________________________________________________________
+// _finderInit
+
+template <typename TNeedle> inline void _finderInit(Pattern<TNeedle, HammingSimple> & me);       	// "projects/library/seqan/find/find_hamming_simple.h"(133)
+
+//____________________________________________________________________________
+// _finderSetNonEmpty
+
+template <typename T> inline void _finderSetNonEmpty(T & me);       	// "projects/library/seqan/find/find_base.h"(568)
+template <typename THaystack, typename TSpec> inline void _finderSetNonEmpty(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(577)
+
+//____________________________________________________________________________
+// _getCharacterClass
+
+template <typename TValue,typename TNeedle2> String <unsigned> _getCharacterClass(TNeedle2 const & host,unsigned start,unsigned end);       	// "projects/library/seqan/find/find_wild_shiftand.h"(296)
+
+//____________________________________________________________________________
+// _getRoot
+
+template <typename TNeedle, typename TMultiFinder> int _getRoot(Pattern<TNeedle, Pex<NonHierarchical, TMultiFinder > > & me);       	// "projects/library/seqan/find/find_pex.h"(238)
+template <typename TNeedle, typename TMultiFinder> int _getRoot(Pattern<TNeedle, Pex<Hierarchical, TMultiFinder > > &);       	// "projects/library/seqan/find/find_pex.h"(245)
+
+//____________________________________________________________________________
+// _isUnsigned
+
+inline bool _isUnsigned(String<char> const & number);       	// "projects/library/seqan/find/find_wild_shiftand.h"(134)
+
+//____________________________________________________________________________
+// _lengthWithoutWildcards
+
+template <typename TNeedle> unsigned _lengthWithoutWildcards(TNeedle const & needle);       	// "projects/library/seqan/find/find_wild_shiftand.h"(224)
+
+//____________________________________________________________________________
+// _myersAdjustBitmask
+
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec, typename TValue, typename TShift> finline void _myersAdjustBitmask(PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > &state, TValue const value, TShift, True);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(876)
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec, typename TValue, typename TShift> finline void _myersAdjustBitmask(PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > &state, TValue const value, TShift const shift, False);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(929)
+
+//____________________________________________________________________________
+// _myersGetBitmask
+
+template <typename TNeedle, typename TSpec, typename TValue, typename TShift> finline typename PatternState_<TNeedle, TSpec>::TWord _myersGetBitmask(PatternState_<TNeedle, TSpec> &state, TValue const value, TShift, True);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(902)
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec, typename TValue, typename TShift> finline typename PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> >::TWord _myersGetBitmask(PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > &state, TValue const value, TShift const shift, False);       	// "projects/libr [...]
+
+//____________________________________________________________________________
+// _myersPostInit
+
+template <typename TNeedle, typename TSpec> finline void _myersPostInit(PatternState_<TNeedle, TSpec> &state, True);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(867)
+template <typename TNeedle, typename TSpec> finline void _myersPostInit(PatternState_<TNeedle, TSpec> &, False);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(923)
+
+//____________________________________________________________________________
+// _myersPreInit
+
+template <typename TNeedle, typename TSpec> finline void _myersPreInit(PatternState_<TNeedle, TSpec> &state, True);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(858)
+template <typename TNeedle, typename TSpec> finline void _myersPreInit(PatternState_<TNeedle, TSpec> &state, False);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(914)
+
+//____________________________________________________________________________
+// _myersSetHost
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2> inline void _myersSetHost(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > &, TNeedle2 const &);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(639)
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2> inline void _myersSetHost(Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > & pattern, TNeedle2 const & ndl);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(645)
+
+//____________________________________________________________________________
+// _patternFirstInit
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2> inline void _patternFirstInit(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, TNeedle2 & needle);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(494)
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2> inline void _patternFirstInit(Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > & pattern, TNeedle2 & ndl);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(535)
+
+//____________________________________________________________________________
+// _patternInit
+
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, MultipleShiftAnd> & me);       	// "projects/library/seqan/find/find_multiple_shiftand.h"(233)
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, Horspool> &);       	// "projects/library/seqan/find/find_horspool.h"(130)
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, AbndmAlgo> & me);       	// "projects/library/seqan/find/find_abndm.h"(224)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec> inline void _patternInit (Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me);       	// "projects/library/seqan/find/find_score.h"(310)
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, SetHorspool> & me);       	// "projects/library/seqan/find/find_set_horspool.h"(190)
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, WildShiftAnd> & me);       	// "projects/library/seqan/find/find_wild_shiftand.h"(553)
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, ShiftAnd> & me);       	// "projects/library/seqan/find/find_shiftand.h"(202)
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, ShiftOr> & me);       	// "projects/library/seqan/find/find_shiftor.h"(202)
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, WuManber> & me);       	// "projects/library/seqan/find/find_wumanber.h"(457)
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, BndmAlgo> & me);       	// "projects/library/seqan/find/find_bndm.h"(146)
+template <typename TNeedle, typename TFinder, typename TMultiFinder> void _patternInit(Pattern<TNeedle, Pex<NonHierarchical, TMultiFinder > > &me, TFinder &);       	// "projects/library/seqan/find/find_pex.h"(291)
+template <typename TNeedle, typename TFinder, typename TMultiFinder> void _patternInit(Pattern<TNeedle, Pex<Hierarchical, TMultiFinder > > &me, TFinder &);       	// "projects/library/seqan/find/find_pex.h"(570)
+template <typename TNeedle, typename TSpec> inline void _patternInit (Pattern<TNeedle, Bfam<TSpec> > & me);       	// "projects/library/seqan/find/find_bom.h"(191)
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, AhoCorasick> & me);       	// "projects/library/seqan/find/find_ahocorasick.h"(241)
+template <typename TNeedle, typename TAutomaton> inline void _patternInit (Pattern<TNeedle, MultiBfam<TAutomaton> > & me);       	// "projects/library/seqan/find/find_multiple_bfam.h"(245)
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TFinder> inline bool _patternInit(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern, PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & state, TFinder &);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(815)
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec, typename TFinder> inline bool _patternInit(Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & pattern, TFinder & finder);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1267)
+
+//____________________________________________________________________________
+// _patternInitSmallStateBanded
+
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec> inline bool _patternInitSmallStateBanded( TFinder &finder, TNeedle2 const & needle, PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(981)
+
+//____________________________________________________________________________
+// _patternMatchNOfFinder
+
+template <typename TNeedle> inline void _patternMatchNOfFinder(Pattern<TNeedle, HammingSimple> & pattern, bool matchN);       	// "projects/library/seqan/find/find_hamming_simple.h"(102)
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline void _patternMatchNOfFinder(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, bool match);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(619)
+template <typename TNeedle, typename TSpec, typename THasState> inline void _patternMatchNOfFinder(Pattern<TNeedle, Myers<TSpec, THasState, void> > & pattern, bool match);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(629)
+
+//____________________________________________________________________________
+// _patternMatchNOfFinderImpl
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline void _patternMatchNOfFinderImpl(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, bool match);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(598)
+
+//____________________________________________________________________________
+// _patternMatchNOfPattern
+
+template <typename TNeedle> inline void _patternMatchNOfPattern(Pattern<TNeedle, HammingSimple> & pattern, bool matchN);       	// "projects/library/seqan/find/find_hamming_simple.h"(91)
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline void _patternMatchNOfPattern(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, bool match);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(579)
+template <typename TNeedle, typename TSpec, typename THasState> inline void _patternMatchNOfPattern(Pattern<TNeedle, Myers<TSpec, THasState, void> > & pattern, bool match);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(589)
+
+//____________________________________________________________________________
+// _patternMatchNOfPatternImpl
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline void _patternMatchNOfPatternImpl(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, bool match);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(543)
+
+//____________________________________________________________________________
+// _printMask
+
+inline void _printMask(String <unsigned> const & mask,String <char> name);       	// "projects/library/seqan/find/find_abndm.h"(47)
+inline void _printMask(String <unsigned> const & mask,unsigned start, unsigned len,String <char> name);       	// "projects/library/seqan/find/find_abndm.h"(60)
+
+//____________________________________________________________________________
+// _printR
+
+template <typename TNeedle> void _printR(Pattern<TNeedle, AbndmAlgo> & me);       	// "projects/library/seqan/find/find_abndm.h"(155)
+
+//____________________________________________________________________________
+// _setFinderEnd
+
+template <typename THaystack, typename TSpec> inline void _setFinderEnd(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(318)
+template <typename THaystack, typename TSpec, typename TPosition> inline void _setFinderEnd(Finder<THaystack, TSpec> & me, TPosition end_pos);       	// "projects/library/seqan/find/find_base.h"(326)
+
+//____________________________________________________________________________
+// _setFinderLength
+
+template <typename THaystack, typename TSpec, typename TSize> inline void _setFinderLength(Finder<THaystack, TSpec> & me, TSize _length);       	// "projects/library/seqan/find/find_base.h"(337)
+
+//____________________________________________________________________________
+// _setHostMultiBfam
+
+template <typename TNeedle, typename TAutomaton, typename TNeedle2> void _setHostMultiBfam(Pattern<TNeedle, MultiBfam<TAutomaton> > & me, TNeedle2 const & needle_);       	// "projects/library/seqan/find/find_multiple_bfam.h"(154)
+
+//____________________________________________________________________________
+// _setHostWuManber
+
+template <typename TNeedle, typename TNeedle2> void _setHostWuManber(Pattern<TNeedle, WuManber> & me, TNeedle2 const & needle_);       	// "projects/library/seqan/find/find_wumanber.h"(351)
+
+//____________________________________________________________________________
+// _startVerifyMultiBfam
+
+template <typename TNeedle, typename TAutomaton, typename THaystackIterator> inline bool _startVerifyMultiBfam(Pattern<TNeedle, MultiBfam<TAutomaton> > &, THaystackIterator);       	// "projects/library/seqan/find/find_multiple_bfam.h"(260)
+template <typename TNeedle, typename THaystackIterator> inline bool _startVerifyMultiBfam(Pattern<TNeedle, MultiBfam<Oracle> > & me, THaystackIterator tit);       	// "projects/library/seqan/find/find_multiple_bfam.h"(269)
+
+//____________________________________________________________________________
+// _stateInit
+
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec> bool _stateInit( TFinder &finder, TNeedle const & needle, PatternState_<TNeedle2, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1215)
+
+//____________________________________________________________________________
+// _validate
+
+template <typename TNeedle2> bool _validate(TNeedle2 const & needle);       	// "projects/library/seqan/find/find_wild_shiftand.h"(146)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename THaystack, typename TSpec> inline bool atBegin(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(587)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename THaystack, typename TSpec> inline bool atEnd(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(595)
+
+//____________________________________________________________________________
+// begin
+
+template <typename THaystack, typename TSpec, typename TTag> inline typename Iterator<THaystack, Tag<TTag> const>::Type begin(Finder<THaystack, TSpec> & me, Tag<TTag> const tag);       	// "projects/library/seqan/find/find_base.h"(367)
+template <typename THaystack, typename TSpec, typename TTag> inline typename Iterator<THaystack const, Tag<TTag> const>::Type begin(Finder<THaystack, TSpec> const & me, Tag<TTag> const tag);       	// "projects/library/seqan/find/find_base.h"(376)
+
+//____________________________________________________________________________
+// beginPosition
+
+template <typename TNeedle, typename TSpec> inline typename Position<Pattern<TNeedle, TSpec> >::Type & beginPosition(Pattern<TNeedle, TSpec> & me);       	// "projects/library/seqan/find/find_pattern_base.h"(197)
+template <typename TNeedle, typename TSpec> inline typename Position<Pattern<TNeedle, TSpec> const >::Type & beginPosition(Pattern<TNeedle, TSpec> const & me);       	// "projects/library/seqan/find/find_pattern_base.h"(203)
+template <typename THaystack, typename TSpec> inline typename Position<THaystack>::Type beginPosition(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(347)
+template <typename THaystack, typename TSpec> inline typename Position<THaystack const>::Type beginPosition(Finder<THaystack, TSpec> const & me);       	// "projects/library/seqan/find/find_base.h"(355)
+
+//____________________________________________________________________________
+// clear
+
+template <typename THaystack, typename TSpec> inline void clear(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(558)
+
+//____________________________________________________________________________
+// container
+
+template <typename THaystack, typename TSpec> inline typename Parameter_<THaystack>::Type container(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(492)
+template <typename THaystack, typename TSpec> inline typename Parameter_<THaystack>::Type container(Finder<THaystack, TSpec> const & me);       	// "projects/library/seqan/find/find_base.h"(500)
+
+//____________________________________________________________________________
+// empty
+
+template <typename THaystack, typename TSpec> inline bool empty(Finder<THaystack, TSpec> const & me);       	// "projects/library/seqan/find/find_base.h"(550)
+
+//____________________________________________________________________________
+// end
+
+template <typename THaystack, typename TSpec, typename TTag> inline typename Iterator<THaystack, Tag<TTag> const>::Type end(Finder<THaystack, TSpec> & me, Tag<TTag> const tag);       	// "projects/library/seqan/find/find_base.h"(407)
+template <typename THaystack, typename TSpec, typename TTag> inline typename Iterator<THaystack const, Tag<TTag> const>::Type end(Finder<THaystack, TSpec> const & me, Tag<TTag> const tag);       	// "projects/library/seqan/find/find_base.h"(416)
+
+//____________________________________________________________________________
+// endPosition
+
+template <typename TNeedle, typename TSpec> inline typename Position<Pattern<TNeedle, TSpec> >::Type & endPosition(Pattern<TNeedle, TSpec> & me);       	// "projects/library/seqan/find/find_pattern_base.h"(221)
+template <typename TNeedle, typename TSpec> inline typename Position<Pattern<TNeedle, TSpec> const >::Type & endPosition(Pattern<TNeedle, TSpec> const & me);       	// "projects/library/seqan/find/find_pattern_base.h"(227)
+template <typename THaystack, typename TSpec> inline typename Position<THaystack>::Type endPosition(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(387)
+template <typename THaystack, typename TSpec> inline typename Position<THaystack const>::Type endPosition(Finder<THaystack, TSpec> const & me);       	// "projects/library/seqan/find/find_base.h"(395)
+
+//____________________________________________________________________________
+// find
+
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, MultipleShiftAnd> & me);       	// "projects/library/seqan/find/find_multiple_shiftand.h"(405)
+template <typename TFinder, typename TNeedle2> bool find(TFinder & finder, Pattern<TNeedle2, Horspool> & me);       	// "projects/library/seqan/find/find_horspool.h"(440)
+template <typename TFinder, typename TNeedle> inline bool find (TFinder & finder, Pattern<TNeedle, AbndmAlgo > & me);       	// "projects/library/seqan/find/find_abndm.h"(604)
+template <typename TFinder, typename TNeedle> inline bool find (TFinder & finder, Pattern<TNeedle, AbndmAlgo > & me, int const k);       	// "projects/library/seqan/find/find_abndm.h"(630)
+template <typename TFinder, typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec> inline bool find(TFinder & finder, Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me);       	// "projects/library/seqan/find/find_score.h"(479)
+template <typename TFinder, typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec> inline bool find(TFinder & finder, Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, int const limit_);       	// "projects/library/seqan/find/find_score.h"(489)
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, SetHorspool> & me);       	// "projects/library/seqan/find/find_set_horspool.h"(228)
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, WildShiftAnd> & me);       	// "projects/library/seqan/find/find_wild_shiftand.h"(666)
+template <typename TFinder, typename TNeedle> inline bool find(TFinder &finder, Pattern<TNeedle, HammingSimple> &me);       	// "projects/library/seqan/find/find_hamming_simple.h"(199)
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, ShiftAnd> & me);       	// "projects/library/seqan/find/find_shiftand.h"(278)
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, ShiftOr> & me);       	// "projects/library/seqan/find/find_shiftor.h"(313)
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, WuManber> & me);       	// "projects/library/seqan/find/find_wumanber.h"(468)
+template <typename THaystack, typename THaystack2, typename TNeedle> inline bool find(Finder<THaystack, MultipatternFinder> & me, THaystack2 & hstk, TNeedle const & ndl);       	// "projects/library/seqan/find/find_multi.h"(143)
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, Simple> & me);       	// "projects/library/seqan/find/find_simple.h"(118)
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, BndmAlgo> & me);       	// "projects/library/seqan/find/find_bndm.h"(240)
+template <typename TFinder, typename TNeedle, typename TMultiFinder> inline bool find (TFinder & finder, Pattern<TNeedle, Pex<NonHierarchical, TMultiFinder > > & me);       	// "projects/library/seqan/find/find_pex.h"(380)
+template <typename TFinder, typename TNeedle, typename TMultiFinder> inline bool find (TFinder & finder, Pattern<TNeedle, Pex<Hierarchical, TMultiFinder > > & me);       	// "projects/library/seqan/find/find_pex.h"(613)
+template <typename TFinder, typename TNeedle, typename TSpec> inline bool find(TFinder & finder, Pattern<TNeedle, Bfam<TSpec> > & me);       	// "projects/library/seqan/find/find_bom.h"(203)
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, AhoCorasick> & me);       	// "projects/library/seqan/find/find_ahocorasick.h"(261)
+template <typename TFinder, typename TAutomaton, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, MultiBfam<TAutomaton> > & me);       	// "projects/library/seqan/find/find_multiple_bfam.h"(293)
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec> inline bool find (TFinder & finder, TNeedle const & needle, PatternState_<TNeedle2, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1549)
+template <typename TFinder, typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec> inline bool find (TFinder & finder, Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > const & pattern, PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state);       	// "projects/library/seqan/find/find_myers_ukkon [...]
+template <typename TFinder, typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline bool find (TFinder & finder, Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern, PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & state);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1597)
+template <typename TFinder, typename TNeedle, typename TSpec, typename TFindBeginPatternSpec> inline bool find (TFinder & finder, Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & pattern);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1641)
+template <typename TFinder, typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline bool find (TFinder & finder, Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern, PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & state, int const minScore);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1651)
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFindBeginPatternSpec> inline bool find (TFinder & finder, TNeedle const & needle, PatternState_<TNeedle2, Myers<TSpec, True, TFindBeginPatternSpec> > & state, int const minScore);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1661)
+template <typename TFinder, typename TNeedle, typename TSpec, typename TFindBeginPatternSpec> inline bool find (TFinder & finder, Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & pattern, int const minScore);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(1670)
+
+//____________________________________________________________________________
+// findBegin
+
+template <typename TFinder, typename TPattern> inline bool findBegin(TFinder & finder, TPattern & pattern);       	// "projects/library/seqan/find/find_begin.h"(354)
+template <typename TFinder, typename TPattern, typename TLimit> inline bool findBegin(TFinder & finder, TPattern & pattern, TLimit limit);       	// "projects/library/seqan/find/find_begin.h"(363)
+
+//____________________________________________________________________________
+// getBeginScore
+
+template <typename TPattern> inline typename Value<typename ScoringScheme<TPattern>::Type>::Type getBeginScore(TPattern & pattern);       	// "projects/library/seqan/find/find_begin.h"(386)
+
+//____________________________________________________________________________
+// getScore
+
+template <typename TNeedle> int getScore(Pattern<TNeedle, AbndmAlgo > & me);       	// "projects/library/seqan/find/find_abndm.h"(257)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec> inline typename Value<TScore>::Type getScore(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me);       	// "projects/library/seqan/find/find_score.h"(301)
+template <typename TNeedle> inline int getScore(const Pattern<TNeedle, HammingSimple> &me);       	// "projects/library/seqan/find/find_hamming_simple.h"(147)
+template <typename TNeedle, typename TVerification, typename TMultiFinder> int getScore(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me);       	// "projects/library/seqan/find/find_pex.h"(255)
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec> inline int getScore(PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > const & state);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(799)
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec> inline int getScore(Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > const & state);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(805)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename THaystack, typename TSpec> inline void goBegin(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(611)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename THaystack, typename TSpec> inline void goEnd(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(626)
+
+//____________________________________________________________________________
+// haystack
+
+template <typename TObject > inline typename Haystack<TObject>::Type & haystack(TObject &obj);       	// "projects/library/seqan/find/find_base.h"(792)
+template <typename TObject > inline typename Haystack<TObject const>::Type & haystack(TObject const &obj);       	// "projects/library/seqan/find/find_base.h"(798)
+
+//____________________________________________________________________________
+// host
+
+template <typename TNeedle, typename TSpec> inline typename Host<Pattern<TNeedle, TSpec> >::Type & host(Pattern<TNeedle, TSpec> & me);       	// "projects/library/seqan/find/find_pattern_base.h"(263)
+template <typename TNeedle, typename TSpec> inline typename Host<Pattern<TNeedle, TSpec> const>::Type & host(Pattern<TNeedle, TSpec> const & me);       	// "projects/library/seqan/find/find_pattern_base.h"(271)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, MultipleShiftAnd>const>::Type & host(Pattern<TNeedle, MultipleShiftAnd> & me);       	// "projects/library/seqan/find/find_multiple_shiftand.h"(251)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, MultipleShiftAnd>const>::Type & host(Pattern<TNeedle, MultipleShiftAnd> const & me);       	// "projects/library/seqan/find/find_multiple_shiftand.h"(259)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, AbndmAlgo> >::Type & host(Pattern<TNeedle, AbndmAlgo> & me);       	// "projects/library/seqan/find/find_abndm.h"(238)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, AbndmAlgo> const>::Type & host(Pattern<TNeedle, AbndmAlgo> const & me);       	// "projects/library/seqan/find/find_abndm.h"(246)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec> inline typename Host<Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > >::Type & host(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me);       	// "projects/library/seqan/find/find_score.h"(174)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec> inline typename Host<Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > const>::Type & host(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > const & me);       	// "projects/library/seqan/find/find_score.h"(182)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, SetHorspool>const>::Type & host(Pattern<TNeedle, SetHorspool> & me);       	// "projects/library/seqan/find/find_set_horspool.h"(203)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, SetHorspool>const>::Type & host(Pattern<TNeedle, SetHorspool> const & me);       	// "projects/library/seqan/find/find_set_horspool.h"(211)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, WildShiftAnd>const>::Type & host(Pattern<TNeedle, WildShiftAnd> & me);       	// "projects/library/seqan/find/find_wild_shiftand.h"(585)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, WildShiftAnd>const>::Type & host(Pattern<TNeedle, WildShiftAnd> const & me);       	// "projects/library/seqan/find/find_wild_shiftand.h"(593)
+template <typename TNeedle> inline TNeedle host(Pattern<TNeedle, ShiftAnd> const & pattern);       	// "projects/library/seqan/find/find_shiftand.h"(151)
+template <typename TNeedle> inline TNeedle host(Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find/find_shiftand.h"(174)
+template <typename TNeedle> inline TNeedle host(Pattern<TNeedle, ShiftOr> const & pattern);       	// "projects/library/seqan/find/find_shiftor.h"(151)
+template <typename TNeedle> inline TNeedle host(Pattern<TNeedle, ShiftOr> & pattern);       	// "projects/library/seqan/find/find_shiftor.h"(174)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, WuManber> >::Type & host(Pattern<TNeedle, WuManber> & me);       	// "projects/library/seqan/find/find_wumanber.h"(430)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, WuManber> const>::Type & host(Pattern<TNeedle, WuManber> const & me);       	// "projects/library/seqan/find/find_wumanber.h"(438)
+template <typename TNeedle, typename TVerification, typename TMultiFinder> inline typename Host<Pattern<TNeedle, Pex<TVerification,TMultiFinder > > >::Type & host(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me);       	// "projects/library/seqan/find/find_pex.h"(221)
+template <typename TNeedle, typename TVerification, typename TMultiFinder> inline typename Host<Pattern<TNeedle, Pex<TVerification,TMultiFinder > > const>::Type & host(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > const & me);       	// "projects/library/seqan/find/find_pex.h"(229)
+template <typename TNeedle, typename TAutomaton> inline typename Host<Pattern<TNeedle, MultiBfam<TAutomaton> > >::Type & host(Pattern<TNeedle, MultiBfam<TAutomaton> > & me);       	// "projects/library/seqan/find/find_multiple_bfam.h"(218)
+template <typename TNeedle, typename TAutomaton> inline typename Host<Pattern<TNeedle, MultiBfam<TAutomaton> > const>::Type & host(Pattern<TNeedle, MultiBfam<TAutomaton> > const & me);       	// "projects/library/seqan/find/find_multiple_bfam.h"(226)
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec> inline typename Host<Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > >::Type & host(Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > & pattern);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(677)
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec> inline typename Host<Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > const>::Type & host(Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > const & pattern);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(686)
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline TNeedle host(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(695)
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline TNeedle host(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(719)
+template <typename THaystack, typename TSpec> inline typename Parameter_<THaystack>::Type host(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(476)
+template <typename THaystack, typename TSpec> inline typename Parameter_<THaystack>::Type host(Finder<THaystack, TSpec> const & me);       	// "projects/library/seqan/find/find_base.h"(484)
+
+//____________________________________________________________________________
+// hostIterator
+
+template <typename THaystack, typename TSpec> inline typename Iterator<THaystack, Rooted>::Type & hostIterator(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(532)
+template <typename THaystack, typename TSpec> inline typename Iterator<THaystack, Rooted>::Type const & hostIterator(Finder<THaystack, TSpec> const & me);       	// "projects/library/seqan/find/find_base.h"(540)
+
+//____________________________________________________________________________
+// infix
+
+template <typename THaystack, typename TSpec> inline typename Infix<THaystack>::Type infix(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(456)
+template <typename THaystack, typename TSpec> inline typename Infix<THaystack const>::Type infix(Finder<THaystack, TSpec> const & me);       	// "projects/library/seqan/find/find_base.h"(465)
+
+//____________________________________________________________________________
+// init
+
+template <typename THaystack> inline void init(Finder<THaystack, MultipatternFinder> & me);       	// "projects/library/seqan/find/find_multi.h"(131)
+
+//____________________________________________________________________________
+// length
+
+template <typename THaystack, typename TSpec> inline typename Size<THaystack>::Type length(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(427)
+template <typename THaystack, typename TSpec> inline typename Size<THaystack const>::Type length(Finder<THaystack, TSpec> const & me);       	// "projects/library/seqan/find/find_base.h"(434)
+
+//____________________________________________________________________________
+// needle
+
+template <typename TObject > inline typename Needle<TObject>::Type & needle(TObject &obj);       	// "projects/library/seqan/find/find_pattern_base.h"(298)
+template <typename TObject > inline typename Needle<TObject const>::Type & needle(TObject const &obj);       	// "projects/library/seqan/find/find_pattern_base.h"(305)
+template <typename TNeedle, typename TSpec > inline typename Needle< Pattern<TNeedle, TSpec> >::Type & needle(Pattern<TNeedle, TSpec> & obj);       	// "projects/library/seqan/find/find_pattern_base.h"(315)
+template <typename TNeedle, typename TSpec > inline typename Needle< Pattern<TNeedle, TSpec> const>::Type & needle(Pattern<TNeedle, TSpec> const & obj);       	// "projects/library/seqan/find/find_pattern_base.h"(322)
+template <typename TNeedle> inline TNeedle needle(Pattern<TNeedle, ShiftAnd> const & pattern);       	// "projects/library/seqan/find/find_shiftand.h"(184)
+template <typename TNeedle> inline TNeedle needle(Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find/find_shiftand.h"(192)
+template <typename TNeedle> inline TNeedle needle(Pattern<TNeedle, ShiftOr> const & pattern);       	// "projects/library/seqan/find/find_shiftor.h"(184)
+template <typename TNeedle> inline TNeedle needle(Pattern<TNeedle, ShiftOr> & pattern);       	// "projects/library/seqan/find/find_shiftor.h"(192)
+template <typename THaystack> inline unsigned int & needle(Finder<THaystack, MultipatternFinder> & me);       	// "projects/library/seqan/find/find_multi.h"(105)
+template <typename THaystack> inline unsigned int const & needle(Finder<THaystack, MultipatternFinder> const & me);       	// "projects/library/seqan/find/find_multi.h"(112)
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline TNeedle needle(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(730)
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec> inline TNeedle needle(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(738)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename THaystack, typename TSpec, typename TIntegral> inline Finder<THaystack, TSpec> const operator+ (Finder<THaystack, TSpec> const & left, TIntegral right);       	// "projects/library/seqan/find/find_base.h"(704)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename THaystack, typename TSpec> inline Finder<THaystack, TSpec> & operator++(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(688)
+
+//____________________________________________________________________________
+// operator+=
+
+template <typename THaystack, typename TSpec, typename TIntegral> inline Finder<THaystack, TSpec> & operator+= (Finder<THaystack, TSpec> & left, TIntegral right);       	// "projects/library/seqan/find/find_base.h"(717)
+
+//____________________________________________________________________________
+// operator-
+
+template <typename THaystack, typename TSpec, typename TIntegral> inline Finder<THaystack, TSpec> const operator- (Finder<THaystack, TSpec> const & left, TIntegral right);       	// "projects/library/seqan/find/find_base.h"(730)
+template <typename THaystack, typename TSpec, typename TIntegral> inline typename Difference<Finder<THaystack, TSpec> const>::Type operator- (Finder<THaystack, TSpec> const & left, Finder<THaystack, TSpec> const & right);       	// "projects/library/seqan/find/find_base.h"(738)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename THaystack, typename TSpec> inline Finder<THaystack, TSpec> & operator--(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(679)
+
+//____________________________________________________________________________
+// operator-=
+
+template <typename THaystack, typename TSpec, typename TIntegral> inline Finder<THaystack, TSpec> & operator-= (Finder<THaystack, TSpec> & left, TIntegral right);       	// "projects/library/seqan/find/find_base.h"(751)
+
+//____________________________________________________________________________
+// position
+
+template <typename TNeedle> inline typename Size<TNeedle>::Type position(Pattern<TNeedle, MultipleShiftAnd> & me);       	// "projects/library/seqan/find/find_multiple_shiftand.h"(270)
+template <typename TNeedle> inline typename Size<TNeedle>::Type position(Pattern<TNeedle, SetHorspool> & me);       	// "projects/library/seqan/find/find_set_horspool.h"(222)
+template <typename TNeedle> inline typename Size<TNeedle>::Type position(Pattern<TNeedle, WuManber> & me);       	// "projects/library/seqan/find/find_wumanber.h"(448)
+template <typename TNeedle> inline typename Size<TNeedle>::Type position(Pattern<TNeedle, AhoCorasick> & me);       	// "projects/library/seqan/find/find_ahocorasick.h"(255)
+template <typename TNeedle, typename TAutomaton> inline typename Size<TNeedle>::Type position(Pattern<TNeedle, MultiBfam<TAutomaton> > & me);       	// "projects/library/seqan/find/find_multiple_bfam.h"(236)
+template <typename THaystack, typename TSpec> inline typename Position<Finder<THaystack, TSpec> >::Type position(Finder<THaystack, TSpec> & me);       	// "projects/library/seqan/find/find_base.h"(637)
+template <typename THaystack, typename TSpec> inline typename Position<Finder<THaystack, TSpec> >::Type position(Finder<THaystack, TSpec> const & me);       	// "projects/library/seqan/find/find_base.h"(646)
+
+//____________________________________________________________________________
+// score
+
+template <typename TNeedle> inline int score(const Pattern<TNeedle, HammingSimple> &me);       	// "projects/library/seqan/find/find_hamming_simple.h"(140)
+
+//____________________________________________________________________________
+// scoreLimit
+
+template <typename TNeedle> inline int scoreLimit(Pattern<TNeedle, AbndmAlgo > const & me);       	// "projects/library/seqan/find/find_abndm.h"(580)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec> inline typename Value<TScore>::Type scoreLimit(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > const & me);       	// "projects/library/seqan/find/find_score.h"(256)
+template <typename TNeedle, typename TVerification, typename TMultiFinder> inline int scoreLimit(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > const & me);       	// "projects/library/seqan/find/find_pex.h"(266)
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec> inline int scoreLimit(PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > const & state);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(751)
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec> inline int scoreLimit(Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > const & pattern);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(759)
+
+//____________________________________________________________________________
+// scoringScheme
+
+template <typename TNeedle, typename TSpec> inline typename ScoringScheme<Pattern<TNeedle, TSpec> >::Type scoringScheme(Pattern<TNeedle, TSpec> &);       	// "projects/library/seqan/find/find_pattern_base.h"(362)
+template <typename TNeedle, typename TSpec> inline typename ScoringScheme<Pattern<TNeedle, TSpec> const>::Type scoringScheme(Pattern<TNeedle, TSpec> const &);       	// "projects/library/seqan/find/find_pattern_base.h"(369)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec> inline TScore const & scoringScheme(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me);       	// "projects/library/seqan/find/find_score.h"(214)
+
+//____________________________________________________________________________
+// segment
+
+template <typename TNeedle, typename TSpec> inline typename Infix<TNeedle>::Type segment(Pattern<TNeedle, TSpec> & me);       	// "projects/library/seqan/find/find_pattern_base.h"(244)
+template <typename TNeedle, typename TSpec> inline typename Infix<TNeedle>::Type segment(Pattern<TNeedle, TSpec> const & me);       	// "projects/library/seqan/find/find_pattern_base.h"(251)
+
+//____________________________________________________________________________
+// setBeginPosition
+
+template <typename TNeedle, typename TSpec, typename TPosition> inline void setBeginPosition(Pattern<TNeedle, TSpec> & me, TPosition _pos);       	// "projects/library/seqan/find/find_pattern_base.h"(212)
+
+//____________________________________________________________________________
+// setContainer
+
+template <typename THaystack, typename TSpec> inline void setContainer(Finder<THaystack, TSpec> & me, typename Parameter_<THaystack>::Type container_);       	// "projects/library/seqan/find/find_base.h"(521)
+
+//____________________________________________________________________________
+// setEndPosition
+
+template <typename TNeedle, typename TSpec, typename TPosition> inline void setEndPosition(Pattern<TNeedle, TSpec> & me, TPosition _pos);       	// "projects/library/seqan/find/find_pattern_base.h"(235)
+
+//____________________________________________________________________________
+// setHaystack
+
+template <typename THaystack, typename TSpec > inline void setHaystack(Finder<THaystack, TSpec> &obj, THaystack const &hstk);       	// "projects/library/seqan/find/find_base.h"(774)
+
+//____________________________________________________________________________
+// setHost
+
+template <typename TNeedle, typename TSpec, typename TNeedle2> inline void setHost(Pattern<TNeedle, TSpec> & me, TNeedle2 const & ndl);       	// "projects/library/seqan/find/find_pattern_base.h"(182)
+template <typename TNeedle, typename TSpec, typename TNeedle2> inline void setHost(Pattern<TNeedle, TSpec> & me, TNeedle2 & ndl);       	// "projects/library/seqan/find/find_pattern_base.h"(189)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, MultipleShiftAnd> & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_multiple_shiftand.h"(139)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, MultipleShiftAnd> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_multiple_shiftand.h"(224)
+template <typename TNeedle, typename TNeedle2> void setHost(Pattern<TNeedle, Horspool> & me, TNeedle2 const & ndl);       	// "projects/library/seqan/find/find_horspool.h"(91)
+template <typename TNeedle, typename TNeedle2> void setHost(Pattern<TNeedle, Horspool> & horsp, TNeedle2 & ndl);       	// "projects/library/seqan/find/find_horspool.h"(122)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, AbndmAlgo> & me, TNeedle2 const& needle);       	// "projects/library/seqan/find/find_abndm.h"(168)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, AbndmAlgo> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_abndm.h"(216)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TNeedle2> void setHost(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, TNeedle2 & ndl);       	// "projects/library/seqan/find/find_score.h"(194)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TNeedle2> void setHost(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, TNeedle2 const & ndl);       	// "projects/library/seqan/find/find_score.h"(202)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, SetHorspool> & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_set_horspool.h"(127)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, SetHorspool> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_set_horspool.h"(181)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, WildShiftAnd> & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_wild_shiftand.h"(324)
+template <typename TNeedle, typename TNeedle2> inline void setHost (Pattern<TNeedle, WildShiftAnd> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_wild_shiftand.h"(544)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, HammingSimple> & me, const TNeedle2 & needle, int k);       	// "projects/library/seqan/find/find_hamming_simple.h"(113)
+template <typename TNeedle, typename TNeedle2> void setHost(Pattern<TNeedle, HammingSimple> &horsp, TNeedle2 &ndl, int k);       	// "projects/library/seqan/find/find_hamming_simple.h"(126)
+template <typename TNeedle, typename TNeedle2> inline void setHost(Pattern<TNeedle, ShiftAnd> & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_shiftand.h"(98)
+template <typename TNeedle, typename TNeedle2> inline void setHost(Pattern<TNeedle, ShiftAnd> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_shiftand.h"(142)
+template <typename TNeedle, typename TNeedle2> inline void setHost(Pattern<TNeedle, ShiftOr> & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_shiftor.h"(98)
+template <typename TNeedle, typename TNeedle2> inline void setHost(Pattern<TNeedle, ShiftOr> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_shiftor.h"(142)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, WuManber> & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_wumanber.h"(413)
+template <typename TNeedle, typename TNeedle2> inline void setHost(Pattern<TNeedle, WuManber> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_wumanber.h"(421)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, Simple> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_simple.h"(102)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, Simple> & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_simple.h"(108)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, BndmAlgo> & me, TNeedle2 const& needle);       	// "projects/library/seqan/find/find_bndm.h"(97)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, BndmAlgo> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_bndm.h"(137)
+template <typename TNeedle, typename TNeedle2, typename TVerification, typename TMultiFinder> void setHost (Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_pex.h"(201)
+template <typename TNeedle, typename TNeedle2, typename TVerification, typename TMultiFinder> void setHost (Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_pex.h"(212)
+template <typename TNeedle, typename TNeedle2> inline void setHost (Pattern<TNeedle, Bfam<Oracle> > & me, TNeedle2 const& needle);       	// "projects/library/seqan/find/find_bom.h"(151)
+template <typename TNeedle, typename TNeedle2> inline void setHost (Pattern<TNeedle, Bfam<Trie> > & me, TNeedle2 const& needle);       	// "projects/library/seqan/find/find_bom.h"(163)
+template <typename TNeedle, typename TNeedle2, typename TSpec> inline void setHost (Pattern<TNeedle, Bfam<TSpec> > & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_bom.h"(182)
+template <typename TNeedle, typename TNeedle2> void setHost (Pattern<TNeedle, AhoCorasick> & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_ahocorasick.h"(203)
+template <typename TNeedle, typename TNeedle2> inline void setHost (Pattern<TNeedle, AhoCorasick> & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_ahocorasick.h"(232)
+template <typename TNeedle, typename TAutomaton, typename TNeedle2> void setHost (Pattern<TNeedle, MultiBfam<TAutomaton> > & me, TNeedle2 const & needle);       	// "projects/library/seqan/find/find_multiple_bfam.h"(201)
+template <typename TNeedle, typename TAutomaton, typename TNeedle2> inline void setHost(Pattern<TNeedle, MultiBfam<TAutomaton> > & me, TNeedle2 & needle);       	// "projects/library/seqan/find/find_multiple_bfam.h"(209)
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2> inline void setHost(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, TNeedle2 & ndl);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(652)
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2> inline void setHost(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, TNeedle2 const & ndl);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(663)
+template <typename THaystack, typename TSpec> inline void setHost(Finder<THaystack, TSpec> & me, typename Parameter_<THaystack>::Type container_);       	// "projects/library/seqan/find/find_base.h"(511)
+
+//____________________________________________________________________________
+// setNeedle
+
+template <typename TNeedle, typename TSpec > inline void setNeedle(Pattern<TNeedle, TSpec> &obj, TNeedle const &ndl);       	// "projects/library/seqan/find/find_pattern_base.h"(340)
+template <typename THaystack> inline void setNeedle(Finder<THaystack, MultipatternFinder> & me, unsigned int const needleIndex_);       	// "projects/library/seqan/find/find_multi.h"(121)
+
+//____________________________________________________________________________
+// setPosition
+
+template <typename THaystack, typename TSpec, typename TPosition> inline void setPosition(Finder<THaystack, TSpec> & me, TPosition pos_);       	// "projects/library/seqan/find/find_base.h"(669)
+
+//____________________________________________________________________________
+// setScoreLimit
+
+template <typename TNeedle, typename TScoreValue> inline void setScoreLimit(Pattern<TNeedle, AbndmAlgo > & me, TScoreValue _limit);       	// "projects/library/seqan/find/find_abndm.h"(593)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TScoreValue> inline void setScoreLimit(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, TScoreValue _limit);       	// "projects/library/seqan/find/find_score.h"(277)
+template <typename TNeedle> inline void setScoreLimit(Pattern<TNeedle, HammingSimple> & me, int _limit);       	// "projects/library/seqan/find/find_hamming_simple.h"(154)
+template <typename TNeedle, typename TScoreValue,typename TVerification, typename TMultiFinder> inline void setScoreLimit(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me, TScoreValue _limit);       	// "projects/library/seqan/find/find_pex.h"(279)
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec, typename TScoreValue> inline void setScoreLimit(PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & state, TScoreValue minScore);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(773)
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec, typename TScoreValue> inline void setScoreLimit(Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & pattern, TScoreValue minScore);       	// "projects/library/seqan/find/find_myers_ukkonen.h"(783)
+
+//____________________________________________________________________________
+// setScoringScheme
+
+template <typename TNeedle, typename TSpec, typename TScore2> inline void setScoringScheme(Pattern<TNeedle, TSpec> & , TScore2 & );       	// "projects/library/seqan/find/find_pattern_base.h"(391)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TScore2> inline void setScoringScheme(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, TScore2 & score);       	// "projects/library/seqan/find/find_score.h"(226)
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TScore2> inline void setScoringScheme(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, TScore2 const & score);       	// "projects/library/seqan/find/find_score.h"(235)
+
+//____________________________________________________________________________
+// valid
+
+template <typename TNeedle> inline bool valid(Pattern <TNeedle,WildShiftAnd> & me);       	// "projects/library/seqan/find/find_wild_shiftand.h"(566)
+template <typename TNeedle> inline bool valid(Pattern <TNeedle,WildShiftAnd> const & me);       	// "projects/library/seqan/find/find_wild_shiftand.h"(574)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/find/find_hamming_simple.h b/src/SeqAn-1.3/seqan/find/find_hamming_simple.h
new file mode 100644
index 0000000..8c5f642
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_hamming_simple.h
@@ -0,0 +1,272 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Status: Testing.  Should work, some performance improvements possible,
+// see TODOs.
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_FIND_FIND_SIMPLE_H_
+#define SEQAN_FIND_FIND_SIMPLE_H_
+
+#include <algorithm>
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+/**
+.Spec.HammingSimpleFinder:
+..summary:A brute force online searching algorithm for approximate string matching with hamming distance.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, HammingSimple>
+..param.TNeedle:The needle type.
+...type:Class.String
+..remarks:This specialization should only be used if no other is applicable or for verification purposes.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.HammingSimpleFinder
+
+struct HammingSimple_;
+typedef Tag<HammingSimple_> HammingSimple;
+
+
+template <typename TNeedle>
+class Pattern<TNeedle, HammingSimple> {
+public:
+    // The holder for the needle.
+    Holder<TNeedle> data_host;
+
+    // The maximal distance.  Must be >= 0, i.e. -score.
+    int maxDistance;
+
+    // The current distance, >= 0, i.e. -current score.
+    int distance;
+
+    // TODO(holtgrew): This is extremely hacky, works only with Dna5.
+    // Flags -- ..1xx activate, ..01 match pattern, ..10 match finder.
+    unsigned matchNFlags;
+
+    Pattern() : maxDistance(-1), distance(0), matchNFlags(0) {}
+
+    template <typename TNeedle2>
+    Pattern(const TNeedle2 &ndl, int k = -1) : matchNFlags(0) {
+        SEQAN_CHECKPOINT;
+        setHost(*this, ndl, k);
+    }
+};
+
+
+template <typename TNeedle>
+inline void _patternMatchNOfPattern(Pattern<TNeedle, HammingSimple> & pattern, bool matchN)
+{
+    if (matchN)
+        pattern.matchNFlags |= 1;  // |= 01b
+    else
+        pattern.matchNFlags &= 2;  // &= 10b
+    pattern.matchNFlags |= 4;
+}
+
+
+template <typename TNeedle>
+inline void _patternMatchNOfFinder(Pattern<TNeedle, HammingSimple> & pattern, bool matchN)
+{
+    if (matchN)
+        pattern.matchNFlags |= 2;  // |= 10b
+    else
+        pattern.matchNFlags &= 1;  // &= 01b
+    pattern.matchNFlags |= 4;
+}
+
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, HammingSimple> & me, 
+              const TNeedle2 & needle, int k) {
+    SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_NOT(empty(needle));
+    SEQAN_ASSERT_LEQ_MSG(k, 0, "Are you confusing distances and scores?");
+
+    setValue(me.data_host, needle);
+    me.maxDistance = -k;
+}
+
+
+template <typename TNeedle, typename TNeedle2>
+void
+setHost(Pattern<TNeedle, HammingSimple> &horsp, TNeedle2 &ndl, int k) {
+    SEQAN_CHECKPOINT;
+    setHost(horsp, reinterpret_cast<const TNeedle2&>(ndl), k);
+}
+
+
+template <typename TNeedle>
+inline void _finderInit(Pattern<TNeedle, HammingSimple> & me) {
+    SEQAN_CHECKPOINT;
+    (void) me;  // Suppress unused variable warning.
+}
+
+
+template <typename TNeedle>
+inline int score(const Pattern<TNeedle, HammingSimple> &me) {
+    SEQAN_CHECKPOINT;
+    return -me.distance;
+}
+
+
+template <typename TNeedle>
+inline int getScore(const Pattern<TNeedle, HammingSimple> &me) {
+    SEQAN_CHECKPOINT;
+    return -me.distance;
+}
+
+
+template <typename TNeedle>
+inline void setScoreLimit(Pattern<TNeedle, HammingSimple> & me, int _limit) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_LEQ(_limit, 0);
+    me.maxDistance = -_limit;
+}
+
+
+template <typename TAlphabet, typename TNeedle>
+inline bool _findHammingSimpleCharsEqual(TAlphabet const & a, TAlphabet const & b, Pattern<TNeedle, HammingSimple> const &) {
+    return a == b;
+}
+
+
+template <typename TNeedle>
+inline bool _findHammingSimpleCharsEqual(Dna5 const & ndlChar, Dna5 const & hstckChar, Pattern<TNeedle, HammingSimple> const & pattern) {
+    if (ndlChar == Dna5('N') && pattern.matchNFlags & 1) {
+        return true;
+    } else if (hstckChar == Dna5('N') && pattern.matchNFlags & 2) {
+        return true;
+    } else {
+        return ndlChar == hstckChar;
+    }
+}
+
+
+template <typename TNeedle>
+inline bool _findHammingSimpleCharsEqual(Dna5Q const & a, Dna5 const & b, Pattern<TNeedle, HammingSimple> const & pattern) {
+    return _findHammingSimpleCharsEqual(convert<Dna5>(a), b, pattern);
+}
+
+
+template <typename TNeedle>
+inline bool _findHammingSimpleCharsEqual(Dna5 const & a, Dna5Q const & b, Pattern<TNeedle, HammingSimple> const & pattern) {
+    return _findHammingSimpleCharsEqual(a, convert<Dna5>(b), pattern);
+}
+
+
+template <typename TNeedle>
+inline bool _findHammingSimpleCharsEqual(Dna5Q const & a, Dna5Q const & b, Pattern<TNeedle, HammingSimple> const & pattern) {
+    return _findHammingSimpleCharsEqual(convert<Dna5>(a), convert<Dna5>(b), pattern);
+}
+
+
+template <typename TFinder, typename TNeedle>
+inline bool find(TFinder &finder, 
+                 Pattern<TNeedle, HammingSimple> &me) {
+    SEQAN_CHECKPOINT;
+
+    typedef typename Haystack<TFinder>::Type THaystack;
+    typedef typename Size<THaystack>::Type TSize;
+
+    // Shortcuts to haystack and needle.
+    const THaystack &hstk = haystack(finder);
+    const TNeedle &ndl = needle(me);
+
+    // If the needle is longer than the haystack then we cannot find anything.
+    if (length(hstk) < length(ndl))
+        return false;
+
+    // Initialize or advance finder, depending whether it has been
+    // initialized before.
+    if (empty(finder)) {
+        _finderInit(me);
+        _setFinderLength(finder, length(needle(me)));
+        _finderSetNonEmpty(finder);
+    } else {
+        finder += 1;
+    }
+
+    // Check whether we are beyond the last possible match position.
+    if (position(finder) > length(hstk) - length(ndl))
+        return false;
+
+    // TODO(holtgrew): Switch from indices to iterators to improve performance.
+
+    // Perform a naive search for the needle in the haystack such that
+    // the difference is <= me.maxDistance.
+    //
+    // If a special behaviour is enabled for N then we use a different case.
+    TSize i;
+    if (!(me.matchNFlags & 6u)) {
+        // No special behaviour for N.
+        for (i = position(finder); i <= length(hstk) - length(ndl); ++i) {
+            me.distance = 0;  // Reset mismatch count.
+            for (TSize j = 0; j < length(ndl); ++j) {
+                me.distance += (ndl[j] != hstk[i + j]);
+                if (me.distance > me.maxDistance)
+                    break;
+            }
+            if (me.distance <= me.maxDistance)
+                break;
+        }
+    } else {
+        // Special behaviour for N enabled.
+        for (i = position(finder); i <= length(hstk) - length(ndl); ++i) {
+            me.distance = 0;  // Reset mismatch count.
+            for (TSize j = 0; j < length(ndl); ++j) {
+                me.distance += !(_findHammingSimpleCharsEqual(ndl[j], hstk[i + j], me));
+                if (me.distance > me.maxDistance)
+                    break;
+            }
+            if (me.distance <= me.maxDistance)
+                break;
+        }
+    }
+
+    // Return false if we did not break out of the for-loop but it
+    // stopped normally.
+    if (i > length(hstk) - length(ndl))
+        return false;
+
+    _setFinderEnd(finder, i + length(ndl));
+    setPosition(finder, beginPosition(finder));
+    return true; 
+}
+
+}  // namespace SEQAN_NAMESPACE_MAIN
+
+#endif  // SEQAN_FIND_FIND_SIMPLE_H_
diff --git a/src/SeqAn-1.3/seqan/find/find_horspool.h b/src/SeqAn-1.3/seqan/find/find_horspool.h
new file mode 100644
index 0000000..41ede76
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_horspool.h
@@ -0,0 +1,476 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_HORSPOOL_H
+#define SEQAN_HEADER_FIND_HORSPOOL_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Horspool
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Horspool:
+..summary: Exact string matching using Horspool's algorithm (1980).
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, Horspool>
+..param.TNeedle:The needle type.
+...type:Class.String
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.Horspool
+
+struct Horspool_;
+typedef Tag<Horspool_> Horspool;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, Horspool>
+{
+//____________________________________________________________________________
+
+public:
+	typedef typename Size<TNeedle>::Type TSize;
+
+	Holder<TNeedle>		data_host;
+	String<TSize>		data_map;
+
+//____________________________________________________________________________
+
+public:
+	Pattern() {}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		setHost(*this, ndl);
+	}
+//____________________________________________________________________________
+};
+
+
+template <typename TNeedle, typename TNeedle2>
+void
+setHost(Pattern<TNeedle, Horspool> & me, TNeedle2 const & ndl)
+{
+	typedef typename Value<TNeedle>::Type TValue;
+	typedef typename Size<TNeedle>::Type TSize;
+
+	SEQAN_ASSERT(!empty(ndl));
+
+	TSize value_size = ValueSize<TValue>::VALUE;
+
+	//make room for map
+	resize(me.data_map, value_size);
+
+	//fill map
+	typename Value<String<TSize> >::Type jump_width = length(ndl); //das ist so umstaendlich wegen VC++ 2003
+	arrayFill(begin(me.data_map, Standard()), begin(me.data_map, Standard()) + value_size, jump_width);
+
+	typename Iterator<TNeedle2 const, Standard>::Type it;
+	it = begin(ndl, Standard());
+	while (jump_width > 1)
+	{
+		--jump_width;
+		unsigned int pos_ = *it; //conversion value type to unsigned int
+		me.data_map[pos_] = jump_width;
+		++it;
+	}
+
+	me.data_host = ndl;
+}
+
+template <typename TNeedle, typename TNeedle2>
+void
+setHost(Pattern<TNeedle, Horspool> & horsp, TNeedle2 & ndl)
+{
+	setHost(horsp, reinterpret_cast<TNeedle2 const &>(ndl));
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline void _patternInit (Pattern<TNeedle, Horspool> &) {}
+
+
+//____________________________________________________________________________
+
+template <typename TFinder, typename TNeedle2>
+bool
+_findHorspool(TFinder & finder, 
+			  Pattern<TNeedle2, Horspool> & me,
+			  bool find_first)
+{
+SEQAN_CHECKPOINT
+	typedef typename Haystack<TFinder>::Type THaystack;
+	THaystack & hayst = haystack(finder);
+
+	typedef Pattern<TNeedle2, Horspool> TPattern;
+	typedef typename Needle<TPattern>::Type TNeedle;
+	TNeedle & ndl = needle(me);
+
+	typedef typename Size<TNeedle>::Type TNeedleSize;
+	TNeedleSize ndl_size = length(ndl);
+
+	typedef typename Iterator<THaystack, Standard>::Type THaystackIterator;
+	THaystackIterator haystack_end = end(hayst, Standard());
+	THaystackIterator it = begin(hayst, Standard());
+	it += position(finder) + ndl_size - 1; //it points to the last character
+	THaystackIterator it_next = it;
+
+	typedef typename Iterator<TNeedle, Standard>::Type TNeedleIterator;
+	TNeedleIterator nit; //needle iterator
+	TNeedleIterator nit_begin = begin(ndl, Standard());
+	TNeedleIterator nit_end = end(ndl, Standard()) - 1; //here the verification begins
+
+	unsigned int char_i;
+
+	if (find_first)
+	{
+		goto VALIDATE;
+	}
+
+MOVE_FURTHER:
+	//move to next position
+	char_i = *it; //conversion to unsigned integer
+	it_next = it + me.data_map[char_i];
+	if (it_next >= haystack_end)
+	{//found nothing
+		return false;
+	}
+
+	it = it_next;
+
+VALIDATE:
+	//validate current position
+	for (nit = nit_end; nit >= nit_begin; --nit)
+	{
+		if (*nit != *it_next)
+		{//invalid!
+			goto MOVE_FURTHER;
+		}
+		--it_next;
+	}
+
+	//valid! return hit
+	_setFinderEnd(finder, it - begin(hayst, Standard()) + 1);
+	setPosition(finder, beginPosition(finder));
+	return true;
+}
+
+//____________________________________________________________________________
+// Sentinel variant (not used at the moment)
+//TODO: if not enough space at the end of the haystack: call non-sentinel search
+/*
+template <typename TFinder, typename TNeedle2>
+bool
+find_horspool_sentinel(TFinder & finder, 
+					   Pattern<TNeedle2, Horspool> & me,
+					   bool find_first)
+{
+SEQAN_CHECKPOINT
+	typedef typename Haystack<TFinder>::Type THaystack;
+	THaystack & hayst = haystack(finder);
+	
+
+	typedef Pattern<TNeedle2, Horspool> TPattern;
+	typedef typename Needle<TPattern>::Type TNeedle;
+	TNeedle & ndl = needle(me);
+
+	//implant sentinel
+	typename Size<THaystack>::Type old_haystack_size = length(hayst);
+	if (find_first)
+	{
+		typedef typename Position<TFinder>::Type TFinderPosition;
+		TFinderPosition finder_pos = position(finder);
+
+		append(hayst, ndl, Exact());
+		if (length(hayst) != old_haystack_size + length(ndl))
+		{//not enough place in haystack
+//TODO!!!
+printf("error!");
+return false;
+		}
+		setPosition(finder, finder_pos);
+	}
+	else
+	{
+		_setLength(hayst, old_haystack_size + length(ndl));
+	}
+
+	typedef typename Size<TNeedle>::Type TNeedleSize;
+	TNeedleSize ndl_size = length(ndl);
+
+	typedef typename Iterator<THaystack, Standard>::Type THaystackIterator;
+	THaystackIterator it = begin(hayst, Standard());
+	THaystackIterator haystack_end = it + old_haystack_size;
+	it += position(finder) + ndl_size - 1; //it points to the last character
+
+	typedef typename Iterator<TNeedle, Standard>::Type TNeedleIterator;
+	TNeedleIterator nit; //needle iterator
+	TNeedleIterator nit_begin = begin(ndl, Standard());
+	TNeedleIterator nit_end = end(ndl, Standard()) - 1; //here the verification begins
+
+	typedef typename Value<TNeedle>::Type TNeedleValue;
+	TNeedleValue char_needle_last = *nit_end;
+	TNeedleValue char_haystack_last;
+
+	char_haystack_last = *it;
+
+	if (find_first)
+	{
+		goto VALIDATE;
+	}
+
+	//main loop
+MOVE_FURTHER:
+	it += me.data_map[_ord(char_haystack_last)];
+	char_haystack_last = *it;
+	if (char_haystack_last != char_needle_last) goto MOVE_FURTHER;
+
+
+	if (it >= haystack_end)
+	{//found nothing
+		resize(hayst, old_haystack_size);
+		return false;
+	}
+
+VALIDATE:
+	//validate current position
+	THaystackIterator it_back = it;
+	for (nit = nit_end; nit >= nit_begin; --nit)
+	{
+		if (*nit != *it_back)
+		{//invalid!
+			goto MOVE_FURTHER;
+		}
+		--it_back;
+	}
+
+	//valid! return hit
+	setPosition(finder, it - begin(hayst, Standard()) - ndl_size + 1);
+	resize(hayst, old_haystack_size);
+	return true;
+}
+*/
+//____________________________________________________________________________
+//spec for file reader haystacks
+
+template <typename TFormat, typename TFile, typename TSpec>
+struct FileReader;
+
+template <typename TValue, typename TFormat, typename TFile, typename FileReaderTSpec, typename TFinderSpec, typename TNeedle2>
+bool
+_findHorspool(Finder<String<TValue, FileReader<TFormat, TFile, FileReaderTSpec> >, TFinderSpec > & finder, 
+			  Pattern<TNeedle2, Horspool> & me,
+			  bool find_first)
+{
+SEQAN_CHECKPOINT
+	typedef Finder<String<TValue, FileReader<TFormat, TFile, FileReaderTSpec> >, TFinderSpec > TFinder;
+	typedef typename Haystack<TFinder>::Type THaystack;
+	THaystack & hayst = haystack(finder);
+
+	typedef Pattern<TNeedle2, Horspool> TPattern;
+	typedef typename Needle<TPattern>::Type TNeedle;
+	TNeedle & ndl = needle(me);
+
+	typedef typename Size<TNeedle>::Type TNeedleSize;
+	TNeedleSize ndl_size = length(ndl);
+
+	typedef typename Iterator<THaystack, Standard>::Type THaystackIterator;
+	THaystackIterator it(hayst, position(finder) + ndl_size - 1); //it points to the last character
+
+	typedef typename Iterator<TNeedle, Standard>::Type TNeedleIterator;
+	TNeedleIterator nit; //needle iterator
+	TNeedleIterator nit_begin = begin(ndl, Standard());
+	TNeedleIterator nit_end = end(ndl, Standard()) - 1; //here the verification begins
+
+	unsigned int char_i;
+
+	if (find_first)
+	{
+		goto VALIDATE;
+	}
+
+MOVE_FURTHER:
+	//move to next position
+	char_i = *it; //conversion to unsigned integer
+	it += me.data_map[char_i];
+	if (atEnd(it))
+	{//found nothing
+		return false;
+	}
+
+VALIDATE:
+	//validate current position
+	for (nit = nit_end; nit >= nit_begin; --nit)
+	{
+		if (*nit != *it)
+		{//invalid!
+			it += (nit_end - nit);
+			goto MOVE_FURTHER;
+		}
+		--it;
+	}
+
+	//valid! return hit
+	setPosition(finder, it - begin(hayst, Standard()) + 1);
+	return true;
+
+}
+
+//____________________________________________________________________________
+/* groepl variante 
+(Beruht vermutlich auf einem Missverstehen von Navarro/Raffinot Seite 26:
+Mit "the main loop can be 'unrolled'" ist dort naemlich 
+"the INNER loop can be 'unrolled'" gemeint.)
+
+template <typename TFinder, typename TNeedle2>
+bool
+_findHorspool(TFinder & finder, 
+	Pattern<TNeedle2, Horspool> & me,
+	bool find_first)
+{
+SEQAN_CHECKPOINT
+	typedef typename Haystack<TFinder>::Type THaystack;
+	THaystack & hayst = haystack(finder);
+
+	typedef Pattern<TNeedle2, Horspool> TPattern;
+	typedef typename Needle<TPattern>::Type TNeedle;
+	TNeedle & ndl = needle(me);
+
+	typename Size<TNeedle>::Type ndl_size = length(ndl);
+
+	typedef typename Iterator<THaystack, Standard>::Type THaystackIterator;
+	THaystackIterator haystack_end = end(hayst, Standard());
+	THaystackIterator it = begin(hayst, Standard());
+	it += position(finder) + ndl_size - 1; //it points to the last character
+	THaystackIterator it2;
+
+	typedef typename Iterator<TNeedle, Standard>::Type TNeedleIterator;
+	TNeedleIterator nit; //needle iterator
+	TNeedleIterator nit_begin = begin(ndl, Standard());
+	TNeedleIterator nit_end = end(ndl, Standard()) - 2; //here the verification begins
+
+	typedef typename Value<TNeedle>::Type TNeedleValue;
+	TNeedleValue last_needle_char = value(ndl, ndl_size - 1);
+
+	unsigned int char_i;
+
+	if (!find_first)
+	{
+		++it;
+	}
+
+MOVE_FURTHER:
+	//scan for the last character
+	while (true)
+	{
+		if (it >= haystack_end)
+		{//found nothing
+			return false;
+		}
+		if (*it == last_needle_char) 
+		{
+			break;
+		}
+		++it;
+	}
+
+VALIDATE:
+	it2 = it;
+	//validate current position
+	for (nit = nit_end; nit >= nit_begin; --nit)
+	{
+		--it2;
+		if (*nit != *it2)
+		{//invalid! skip!
+			char_i = *it; //conversion to unsigned integer
+			it += me.data_map[char_i];
+			goto MOVE_FURTHER;
+		}
+	}
+
+	//valid! return hit
+	setPosition(finder, it - begin(hayst, Standard()) - ndl_size + 1);
+	return true;
+}
+*/
+
+template <typename TFinder, typename TNeedle2>
+bool
+find(TFinder & finder, Pattern<TNeedle2, Horspool> & me)
+{
+SEQAN_CHECKPOINT
+	bool find_first = empty(finder);
+	if (find_first)
+	{
+		_patternInit(me);
+		_setFinderLength(finder, length(needle(me)));
+		_finderSetNonEmpty(finder);
+	}
+
+	SEQAN_ASSERT(length(needle(me)) > 0)
+
+	return _findHorspool(finder, me, find_first);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Host
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, Horspool> >
+{
+	typedef TNeedle Type;
+};
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, Horspool> const>
+{
+	typedef TNeedle const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find/find_multi.h b/src/SeqAn-1.3/seqan/find/find_multi.h
new file mode 100644
index 0000000..6aea3c8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_multi.h
@@ -0,0 +1,160 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_MULTI_H
+#define SEQAN_HEADER_FIND_MULTI_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct MultiPatternFinder_;
+typedef Tag<MultiPatternFinder_> MultipatternFinder;
+	
+//____________________________________________________________________________
+
+template <typename THaystack>
+class Finder<THaystack, MultipatternFinder>
+{
+//____________________________________________________________________________
+private:
+	unsigned int data_pattern;
+
+public:
+	Finder():
+		data_pattern(0)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Finder(Finder const & other_):
+		data_pattern(other_.data_pattern)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	~Finder()
+	{
+SEQAN_CHECKPOINT
+	}
+//____________________________________________________________________________
+
+	Finder & 
+	operator = (Finder const & other_)
+	{
+SEQAN_CHECKPOINT
+		data_pattern = other_.data_pattern;
+		return *this;
+	}
+//____________________________________________________________________________
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <typename THaystack, typename TNeedle>
+bool
+findNext(Finder & me,
+		 THaystack & hstk,
+		 TNeedle const & ndl)
+{
+SEQAN_CHECKPOINT
+	++hstk;
+	return find(me, hstk, ndl);
+}*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+};
+
+template <typename THaystack>
+inline unsigned int &
+needle(Finder<THaystack, MultipatternFinder> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_pattern;
+}
+template <typename THaystack>
+inline unsigned int const &
+needle(Finder<THaystack, MultipatternFinder> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_pattern;
+}
+//____________________________________________________________________________
+
+template <typename THaystack>
+inline void
+setNeedle(Finder<THaystack, MultipatternFinder> & me, unsigned int const needleIndex_)
+{
+SEQAN_CHECKPOINT
+	me.data_pattern = needleIndex_;
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack>
+inline void
+init(Finder<THaystack, MultipatternFinder> & me)
+{
+SEQAN_CHECKPOINT
+	me.data_pattern = 0;
+}
+//____________________________________________________________________________
+
+
+template <typename THaystack, typename THaystack2, typename TNeedle>
+inline bool
+find(Finder<THaystack, MultipatternFinder> & me,
+	 THaystack2 & hstk,
+	 TNeedle const & ndl)
+{
+SEQAN_CHECKPOINT
+	while ( needle(me) < length(ndl) )
+	{
+		Finder<THaystack2, Horspool> horspool(ndl[needle(me)]);
+		bool found = find(horspool, hstk, ndl[needle(me)]);
+		if (found)
+		{
+			return true;
+		}
+		setPosition(hstk, 0);
+		++needle(me);
+	}
+	return false;
+}
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find/find_multiple_bfam.h b/src/SeqAn-1.3/seqan/find/find_multiple_bfam.h
new file mode 100644
index 0000000..1a17087
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_multiple_bfam.h
@@ -0,0 +1,401 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_MULTIPLE_BFAM_H
+#define SEQAN_HEADER_FIND_MULTIPLE_BFAM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// MultiBfam
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.MultiBfam:
+..general:Class.Pattern
+..cat:Searching
+..summary:Multi-Pattern Backward Factor Automaton Matching.
+..signature:Pattern<TNeedle, MultiBfam<TAutomaton> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..param.TAutomaton:A tag that specifies the used automaton.
+...default:@Spec.MultiBfam<Oracle>@
+..see:Spec.Bfam
+..include:seqan/find.h
+*/
+/**
+.Spec.MultiBfam<Oracle>:
+..general:Spec.MultiBfam
+..cat:Searching
+..summary:Multi-Pattern Backward Factor Automaton Matching using an oracle automaton.
+..signature:Pattern<TNeedle, MultiBfam<Oracle> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..see:Spec.Bfam<Oracle>
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.MultiBfam
+
+//struct Oracle //defined in find_bom.h
+
+template <typename TSpec = Oracle>
+struct MultiBfam; //multiple backward factor automaton searching
+
+typedef MultiBfam<Oracle> SBomAlgo; //deprecated
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TSpec>
+class Pattern<TNeedle, MultiBfam<TSpec> > 
+{
+//____________________________________________________________________________
+public:
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Position<TNeedle>::Type TNeedlePosition;
+	typedef typename Size<TKeyword>::Type TSize;
+	typedef typename Value<TKeyword>::Type TValue;
+	typedef Graph<Automaton<TValue, void, WithoutEdgeId> > TGraph;
+
+	//searching data: these members are initialized in _patternInit or during search
+	TNeedlePosition * position;		//pointer to last found position
+	TNeedlePosition * position_end; //end of list in verify
+			//note: if to_verify_begin == to_verify_end then searching in Haystack must go on
+
+	//preprocessed data: these members are initialized in setHost
+	Holder<TNeedle> needle;
+	TGraph automaton; //automaton of the reverse lmin-prefixes of the keywords
+	String<String<TNeedlePosition> > terminals; //map of terminal states in automaton
+
+	TSize lmin;	//min length of keyword
+
+//____________________________________________________________________________
+
+	Pattern():
+		lmin(0)
+	{
+	}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		SEQAN_CHECKPOINT
+		setHost(*this, ndl);
+	}
+
+	~Pattern() 
+	{
+	}
+//____________________________________________________________________________
+
+private:
+	Pattern(Pattern const& other);
+	Pattern const & operator=(Pattern const & other);
+
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TNeedle, typename TStrs>
+inline void
+_buildAutomatonMultiBfam(Pattern<TNeedle, MultiBfam<Oracle> > & me, 
+						  TStrs const & strs)
+{
+	createSetOracle(me.automaton, me.terminals, strs);
+}
+
+template <typename TNeedle, typename TStrs>
+inline void
+_buildAutomatonMultiBfam(Pattern<TNeedle, MultiBfam<Trie> > & me, 
+						  TStrs const & strs)
+{
+	createSetSuffixTrie(me.automaton, me.terminals, strs);
+}
+
+//____________________________________________________________________________
+
+template <typename TNeedle, typename TAutomaton, typename TNeedle2>
+void _setHostMultiBfam(Pattern<TNeedle, MultiBfam<TAutomaton> > & me, 
+						TNeedle2 const & needle_)
+{
+SEQAN_CHECKPOINT
+	typedef typename Iterator<TNeedle, Standard>::Type TNeedleIterator;
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Value<TKeyword>::Type TValue;
+	typedef typename Size<TKeyword>::Type TSize;
+
+	//me.needle
+	setValue(me.needle, needle_);
+	TNeedle & ndl = needle(me);
+
+	//determine lmin
+	TSize len = length(ndl);
+	if (len == 0)
+	{
+		me.lmin = 0;
+		return;
+	}
+
+	me.lmin = length(ndl[0]);
+	for (TSize i = 1; i < len; ++i)
+	{
+		TSize len = length(ndl[i]);
+		if (len < me.lmin)
+		{
+			me.lmin = len;
+		}
+	}
+
+	if (me.lmin == 0) return;
+
+	//collect reverse prefixes for automaton
+	String<String<TValue> > strs;
+	resize(strs, len);
+	for (unsigned int i = 0; i < len; ++i)
+	{
+		strs[i] = prefix(ndl[i], me.lmin);
+		reverse(strs[i]);
+	}
+
+	//build automaton
+	_buildAutomatonMultiBfam(me, strs);
+}
+
+template <typename TNeedle, typename TAutomaton, typename TNeedle2>
+void setHost (Pattern<TNeedle, MultiBfam<TAutomaton> > & me, 
+			  TNeedle2 const & needle) 
+{
+	_setHostMultiBfam(me, needle);
+}
+
+template <typename TNeedle, typename TAutomaton, typename TNeedle2>
+inline void 
+setHost(Pattern<TNeedle, MultiBfam<TAutomaton> > & me, 
+		TNeedle2 & needle)
+{
+	_setHostMultiBfam(me, needle);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TAutomaton>
+inline typename Host<Pattern<TNeedle, MultiBfam<TAutomaton> > >::Type & 
+host(Pattern<TNeedle, MultiBfam<TAutomaton> > & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.needle);
+}
+
+template <typename TNeedle, typename TAutomaton>
+inline typename Host<Pattern<TNeedle, MultiBfam<TAutomaton> > const>::Type & 
+host(Pattern<TNeedle, MultiBfam<TAutomaton> > const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.needle);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TAutomaton>
+inline typename Size<TNeedle>::Type
+position(Pattern<TNeedle, MultiBfam<TAutomaton> > & me)
+{
+	return *(me.position);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//called when search begins
+template <typename TNeedle, typename TAutomaton>
+inline void _patternInit (Pattern<TNeedle, MultiBfam<TAutomaton> > & me) 
+{
+SEQAN_CHECKPOINT
+	me.position = 0;
+	me.position_end = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//test whether the me.lmin prefix of the *(me.position)-th pattern matches haystack beginning at *it
+//the Haystack is long enough that *(it+me.lmin) is a valid value.
+//default implementation: it is assumed that if me.automaton parses a me.lmin-length string S, then S is a pattern
+template <typename TNeedle, typename TAutomaton, typename THaystackIterator>
+inline bool 
+_startVerifyMultiBfam(Pattern<TNeedle, MultiBfam<TAutomaton> > &, 
+					   THaystackIterator) 
+{
+	return true;
+}
+
+//specialization for oracles: must test explicitely, since set-oracles may also parse me.lmin-length strings that are no patterns
+template <typename TNeedle, typename THaystackIterator>
+inline bool 
+_startVerifyMultiBfam(Pattern<TNeedle, MultiBfam<Oracle> > & me, 
+					   THaystackIterator tit) 
+{
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Iterator<TKeyword, Standard>::Type TKeywordIterator;
+	TKeyword & keyword = needle(me)[*(me.position)];
+	TKeywordIterator kit = begin(keyword);
+	TKeywordIterator kit_end = kit + me.lmin;
+	while (kit != kit_end)
+	{
+		if (*kit != *tit)
+		{
+			return false;
+		}
+		++kit;
+		++tit;
+	}
+
+	return true;
+}
+
+//____________________________________________________________________________
+
+template <typename TFinder, typename TAutomaton, typename TNeedle>
+inline bool find(TFinder & finder, 
+				 Pattern<TNeedle, MultiBfam<TAutomaton> > & me) 
+{
+SEQAN_CHECKPOINT
+	typedef typename Haystack<TFinder>::Type THaystack;
+	typedef typename Iterator<THaystack, Standard>::Type THaystackIterator;
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Value<TKeyword>::Type TValue;
+	typedef typename Size<TKeyword>::Type TSize;
+	typedef typename Iterator<TKeyword, Standard>::Type TKeywordIterator;
+	typedef Graph<Automaton<TValue, void, WithoutEdgeId> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+
+	if (me.lmin == 0) return false;
+
+	//some variables
+	THaystackIterator haystack_end = end(haystack(finder));
+	THaystackIterator it1;
+	THaystackIterator it1_end = haystack_end - me.lmin + 1;
+	THaystackIterator it2;
+	TGraph & automaton = me.automaton;
+	TVertexDescriptor root = getRoot(automaton);
+	TVertexDescriptor nil = getNil<TVertexDescriptor>();
+	TVertexDescriptor current;
+	TKeywordIterator kit;
+	TKeywordIterator kit_end;
+	THaystackIterator tit;
+	TKeyword * p_keyword;
+	TSize len;
+
+	if (empty(finder)) 
+	{
+//START
+		_patternInit(me);
+		_finderSetNonEmpty(finder);
+		it1 = hostIterator(finder);
+	} 
+	else 
+	{
+//RESUME
+		it1 = hostIterator(finder);
+		goto VERIFY_NEXT;
+	}
+
+//SEARCH
+	while (it1 < it1_end)
+	{
+		it2 = it1 + me.lmin; //me.lmin > 0 => it1 != it2
+		current = root;
+		while (true)
+		{
+			--it2;
+			current = getSuccessor(automaton, current, *it2);
+			if (current == nil)
+			{
+//SKIP
+				it1 = it2 + 1;
+				break;
+			}
+			if (it1 == it2)
+			{
+//VERIFY
+				me.position = begin(property(me.terminals, current), Standard());
+				me.position_end = end(property(me.terminals, current), Standard());
+				SEQAN_ASSERT(me.position != me.position_end)
+
+				if (_startVerifyMultiBfam(me, it1)) //this returns true if the lmin-length prefixe matches
+				{
+					while (me.position != me.position_end)
+					{
+						p_keyword = & needle(me)[*me.position];
+						len = length(*p_keyword);
+						if ((it1 + len) <= haystack_end)
+						{
+							//compare rest
+							kit = begin(*p_keyword) + me.lmin;
+							kit_end = end(*p_keyword);
+							tit = it1 + me.lmin;
+							while (true)
+							{
+								if (kit == kit_end)
+								{
+//MATCH FOUND
+									setPosition(finder, it1 - begin(haystack(finder), Standard()));
+									_setFinderLength(finder, length(needle(*p_keyword)));
+									_setFinderEnd(finder, position(finder) + length(finder));
+									return true;
+								}
+								if (*kit != *tit) break;
+								++kit;
+								++tit;
+							}
+						}
+VERIFY_NEXT:
+						++me.position;
+					}
+				}
+				++it1;
+				break;
+			}
+
+		}
+	}
+	return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find/find_multiple_shiftand.h b/src/SeqAn-1.3/seqan/find/find_multiple_shiftand.h
new file mode 100644
index 0000000..1f727e4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_multiple_shiftand.h
@@ -0,0 +1,436 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Tobias Rausch <rausch at embl.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_MULTIPLESHIFTAND_H
+#define SEQAN_HEADER_FIND_MULTIPLESHIFTAND_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Multiple ShiftAnd
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.MultipleShiftAnd:
+..summary: Multiple exact string matching using bit parallelism. The total size of the patterns should fit into a computer word.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, MultipleShiftAnd>
+..param.TNeedle:The needle type, a string of keywords.
+...type:Class.String
+..remarks.text:The types of all keywords in the needle and the haystack have to match.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.MultipleShiftAnd
+
+struct MultipleShiftAnd_;
+typedef Tag<MultipleShiftAnd_> MultipleShiftAnd;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, MultipleShiftAnd> {
+//____________________________________________________________________________
+private:
+	Pattern(Pattern const& other);
+	Pattern const& operator=(Pattern const & other);
+
+//____________________________________________________________________________
+public:
+	typedef unsigned int TWord;
+	typedef typename Size<TNeedle>::Type TSize;
+	Holder<TNeedle> data_host;
+	TWord* table;			// Look up table for each character in the alphabet (called B in "Navarro")
+	TWord* prefSufMatch;	// Set of all the prefixes of needle that match a suffix of haystack (called D in "Navarro")
+	TWord* di;				// Initialization word
+	TWord* df;				// Final test word
+	TWord alphabetSize;		// e.g., char --> 256
+	TWord totalLength;		// Lenght of concatenated keywords
+	TWord blockCount;		// #unsigned ints required to store needle	
+	std::deque<Pair<TSize, TSize> > data_keyword;  // All keywords that produced a hit here
+	TSize data_keywordIndex;  // Last keyword index
+	TSize data_needleLength;  // Last needle length
+
+//____________________________________________________________________________
+
+	Pattern() {
+		table = 0;
+		prefSufMatch=0;
+		di = 0;
+		df = 0;
+	}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		table = 0;
+		prefSufMatch=0;
+		di = 0;
+		df = 0;
+		setHost(*this, ndl);
+	}
+
+	~Pattern() {
+		SEQAN_CHECKPOINT
+		if (table != 0) {
+			deallocate(this, table, alphabetSize * blockCount);
+			deallocate(this, prefSufMatch, blockCount);
+			deallocate(this, di, blockCount);
+			deallocate(this, df, blockCount);
+		}
+	}		
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Host Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, MultipleShiftAnd> >
+{
+	typedef TNeedle Type;
+};
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, MultipleShiftAnd> const>
+{
+	typedef TNeedle const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, MultipleShiftAnd> & me, TNeedle2 const & needle) {
+	SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Value<TKeyword>::Type TAlphabet;
+	if (me.table != 0) {
+		deallocate(me, me.table, me.alphabetSize * me.blockCount);
+		deallocate(me, me.di, me.blockCount);
+		deallocate(me, me.df, me.blockCount);
+	}
+
+	typename Iterator<TNeedle2 const, Rooted>::Type it = begin(needle);
+	me.totalLength = 0;
+	for(;!atEnd(it);goNext(it)) {
+		me.totalLength += length(*it);
+	}
+	me.alphabetSize = ValueSize<TAlphabet>::VALUE;
+	if (me.totalLength<1) me.blockCount=1;
+	else me.blockCount=((me.totalLength-1) / BitsPerValue<TWord>::VALUE)+1;
+			
+	allocate (me, me.table, me.blockCount * me.alphabetSize);
+	arrayFill (me.table, me.table + me.blockCount * me.alphabetSize, 0);
+
+	allocate (me, me.di, me.blockCount);
+	arrayFill (me.di, me.di + me.blockCount, 0);
+
+	allocate (me, me.df, me.blockCount);
+	arrayFill (me.df, me.df + me.blockCount, 0);
+
+	goBegin(it);
+	TWord j = 0;
+	for(;!atEnd(it);goNext(it)) {
+		me.di[j / BitsPerValue<TWord>::VALUE] |= (1<<(j%BitsPerValue<TWord>::VALUE));
+		for (TWord posInKeyword = 0; posInKeyword < length(*it); ++posInKeyword) {
+			// Determine character position in array table
+			TWord index = convert<TWord>(getValue(*it,posInKeyword));
+			me.table[me.blockCount*index + j / BitsPerValue<TWord>::VALUE] |= (1<<(j%BitsPerValue<TWord>::VALUE));
+			++j;
+		}
+		me.df[(j - 1) / BitsPerValue<TWord>::VALUE] |= (1<<((j-1)%BitsPerValue<TWord>::VALUE));
+	}
+	setValue(me.data_host, needle);
+
+	/*
+	// Debug code
+	std::cout << "Alphabet size: " << me.alphabetSize << ::std::endl;
+	std::cout << "Needle length: " << me.totalLength << ::std::endl;
+	std::cout << "Block count: " << me.blockCount << ::std::endl;
+	std::cout << "K: ";
+	goBegin(it);
+	for(;!atEnd(it);goNext(it)) {
+		std::cout << *it;
+	}
+	std::cout << ::std::endl;
+	std::cout << "Table: " << ::std::endl;
+	for(unsigned int i=0;i<me.alphabetSize;++i) {
+		//if ((i<97) || (i>122)) continue;
+		std::cout << TAlphabet(i) << ": ";
+		for(int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+				std::cout << ((me.table[me.blockCount*i+j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+	}
+	std::cout << "DI and DF: " << ::std::endl;
+	std::cout << "I: ";
+	for(int j=0;j<me.blockCount;++j) {
+		for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+			std::cout << ((me.di[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+		}
+	}
+	std::cout << ::std::endl;
+	std::cout << "F: ";
+	for(int j=0;j<me.blockCount;++j) {
+		for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+			std::cout << ((me.df[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+		}
+	}
+	std::cout << ::std::endl;
+	*/
+}
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, MultipleShiftAnd> & me, TNeedle2 & needle)
+{
+	setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline void _patternInit (Pattern<TNeedle, MultipleShiftAnd> & me) 
+{
+SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+
+	if (me.prefSufMatch != 0) {
+		deallocate(me, me.prefSufMatch, me.blockCount);
+	}
+	allocate (me, me.prefSufMatch, me.blockCount);
+	arrayFill (me.prefSufMatch, me.prefSufMatch + me.blockCount, 0);
+	me.data_keyword.clear();
+	me.data_keywordIndex = 0;
+}
+
+//____________________________________________________________________________
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, MultipleShiftAnd>const>::Type & 
+host(Pattern<TNeedle, MultipleShiftAnd> & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, MultipleShiftAnd>const>::Type & 
+host(Pattern<TNeedle, MultipleShiftAnd> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline typename Size<TNeedle>::Type
+position(Pattern<TNeedle, MultipleShiftAnd> & me)
+{
+	return me.data_keywordIndex;
+}
+
+
+template <typename TFinder, typename TNeedle>
+bool _findShiftAndSmallNeedle(TFinder & finder, Pattern<TNeedle, MultipleShiftAnd> & me) {
+	SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+	typedef typename Size<TNeedle>::Type TSize;
+	while (!atEnd(finder)) {
+		TWord pos = convert<TWord>(*finder);
+		me.prefSufMatch[0] = ((me.prefSufMatch[0] << 1) | me.di[0]) & me.table[me.blockCount*pos];
+
+		/*
+		// Debug code
+		std::cout << "   ";
+		for(int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+				std::cout << ((me.prefSufMatch[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+		*/
+
+		if ((me.prefSufMatch[0] & me.df[0]) != 0) {
+			// Check which pattern has matched
+			typename Iterator<TNeedle, Rooted>::Type it = begin(value(me.data_host));
+			TWord j = 0;
+			for(;!atEnd(it);goNext(it)) {
+				j += length(*it);
+				TWord test = (1<<((j-1)%BitsPerValue<TWord>::VALUE));
+				/*
+				// Debug code
+				std::cout << "Tes";
+				for(int j=0;j<me.blockCount;++j) {
+					for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+						std::cout << ((test & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+					}
+				}
+				std::cout << ::std::endl;
+				*/
+				if ((me.prefSufMatch[0] & test) != 0) {
+					me.data_keyword.push_back(Pair<TSize,TSize>(position(it),length(*it)));
+				}
+			}
+			me.data_keywordIndex = (me.data_keyword.front()).i1;
+			me.data_needleLength = (me.data_keyword.front()).i2;
+			me.data_keyword.pop_front();
+			_setFinderEnd(finder);
+			_setFinderLength(finder, me.data_needleLength);
+			finder -= (me.data_needleLength - 1);
+			return true;
+		}
+		goNext(finder);
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+bool _findShiftAndLargeNeedle(TFinder & finder, Pattern<TNeedle, MultipleShiftAnd> & me) {
+	SEQAN_CHECKPOINT
+	typedef typename Size<TNeedle>::Type TSize;
+	typedef unsigned int TWord;
+	while (!atEnd(finder)) {
+		TWord pos = convert<TWord>(*finder);
+		TWord carry = 1;
+		for(TWord block=0;block<me.blockCount;++block) {
+			bool newCarry = ((me.prefSufMatch[block] & (1<< (BitsPerValue<TWord>::VALUE - 1)))!=0); 
+			me.prefSufMatch[block]<<=1;
+			me.prefSufMatch[block]|=carry;
+			carry = newCarry;
+		}
+		for(TWord block=0;block<me.blockCount;++block) me.prefSufMatch[block] |= me.di[block];
+		for(TWord block=0;block<me.blockCount;++block) me.prefSufMatch[block] &= me.table[me.blockCount*pos+block];
+
+		/*
+		// Debug code
+		std::cout << "   ";
+		for(int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+				std::cout << ((me.prefSufMatch[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+		*/
+
+		bool match = false;
+		for(TWord block=0;block<me.blockCount;++block) {
+			if ((me.prefSufMatch[block] & me.df[block]) != 0) {
+				match = true;
+				break;
+			}
+		}
+		if (match) {
+			// Check which pattern has matched
+			typename Iterator<TNeedle, Rooted>::Type it = begin(value(me.data_host));
+			TWord j = 0;
+			for(;!atEnd(it);goNext(it)) {
+				j += length(*it);
+				TWord* test;
+				allocate (me, test, me.blockCount);
+				arrayFill (test, test + me.blockCount, 0);
+				test[(j - 1) / BitsPerValue<TWord>::VALUE] |= (1<<((j-1)%BitsPerValue<TWord>::VALUE));
+
+				/*
+				// Debug code
+				std::cout << "Tes";
+				for(int i=0;i<me.blockCount;++i) {
+					for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+						std::cout << ((test[i] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+					}
+				}
+				std::cout << ::std::endl;
+				*/
+
+				if ((me.prefSufMatch[(j - 1) / BitsPerValue<TWord>::VALUE] & test[(j - 1) / BitsPerValue<TWord>::VALUE]) != 0) {
+					me.data_keyword.push_back(Pair<TSize,TSize>(position(it),length(*it)));			
+				}
+				deallocate(me, test, me.blockCount);
+			}
+			me.data_keywordIndex = (me.data_keyword.front()).i1;
+			me.data_needleLength = (me.data_keyword.front()).i2;
+			me.data_keyword.pop_front();
+			_setFinderEnd(finder);
+			_setFinderLength(finder, me.data_needleLength);
+			finder -= (me.data_needleLength - 1);
+			return true;
+		}
+		goNext(finder);
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool find(TFinder & finder, Pattern<TNeedle, MultipleShiftAnd> & me) {
+	SEQAN_CHECKPOINT
+
+	// Check for left-over keywords
+	if ((!empty(finder)) &&
+		(!me.data_keyword.empty())) {
+		finder += me.data_needleLength - 1;
+		me.data_keywordIndex = (me.data_keyword.front()).i1;
+		me.data_needleLength = (me.data_keyword.front()).i2;
+		me.data_keyword.pop_front();
+		finder -= (me.data_needleLength - 1);
+		return true;
+	}
+
+
+	if (empty(finder)) {
+		_patternInit(me);
+		_finderSetNonEmpty(finder);
+	} else
+		finder += me.data_needleLength;
+
+	// Fast algorithm for needles < machine word?
+	if (me.blockCount == 1) {
+		return _findShiftAndSmallNeedle(finder, me);
+	} else {
+		return _findShiftAndLargeNeedle(finder, me);
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_MULTIPLESHIFTAND_H
diff --git a/src/SeqAn-1.3/seqan/find/find_myers_ukkonen.h b/src/SeqAn-1.3/seqan/find/find_myers_ukkonen.h
new file mode 100644
index 0000000..3fd8d6f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_myers_ukkonen.h
@@ -0,0 +1,1677 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_MYERS_UKKONEN_H
+#define SEQAN_HEADER_FIND_MYERS_UKKONEN_H
+
+namespace SEQAN_NAMESPACE_MAIN 
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// MyersUkkonen
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Myers:
+..cat:Pattern Matching
+..general:Class.Pattern
+..summary:Provides fast approximate searching of one string in another using Myer's fast bit-parallel algorithm with application of the Ukkonen-trick.
+..signature:Pattern<TNeedle, Myers< [TSpec [, TFindBeginPatternSpec] ]> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..param.TSpec:Specialization tag.
+...default:Tag.FindInfix
+...remarks:This could be @Tag.FindInfix@ for infix search or $FindPrefix$ for prefix search.
+..param.TFindBeginPatternSpec:Specialization of @Class.Pattern@ used to find the begin of matches.
+...default:@Metafunction.DefaultFindBeginPatternSpec@
+...metafunctin:@Metafunction.FindBeginPatternSpec@
+...remarks:This must be a finder for prefix search, e.g. @Spec.DPSearch|$DPSearch<TScore, FindPrefix>$@ or @Spec.Myers|$Myers<FindPrefix>$@.
+Specify $void$ to suppress prefix searching.
+..remarks.text:The needle-length must be smaller than the highest number that can be stored in an unsigned int.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.Myers
+
+template <typename TSpec = FindInfix, 
+		  typename THasState = True,
+		  typename TFindBeginPatternSpec = typename DefaultFindBeginPatternSpec<EditDistanceScore, THasState>::Type>
+struct Myers {};
+
+struct NMatchesNone_;
+struct NMatchesN_;
+struct NMatchesAll_;
+
+//FindInfix and FindPrefix are defined int find_base.h
+template <typename TSpec, typename TFinderCharSetPolicy = NMatchesN_, typename TPatternCharSetPolicy = NMatchesN_>
+struct AlignTextBanded; // search query in a parallelogram
+
+// TODO(holtgrew): Really deprecated?
+//deprecated shortcuts:
+
+/**
+.Shortcut.MyersUkkonen:
+..status:deprecated, use $Myers<FindInfix>$
+..cat:Pattern Matching
+..summary:Semin-global (query-global, text-local) pattern matching without findBegin() support.
+..signature:MyersUkkonen
+..shortcutfor:Spec.Myers
+...signature:Myers<FindInfix, void>
+..see:Spec.Myers
+..see:Shortcut.MyersUkkonenBanded
+..see:Shortcut.MyersUkkonenGlobal
+..see:Shortcut.MyersUkkonenGlobalBanded
+*/
+typedef Myers<FindInfix, True, void> MyersUkkonen;
+
+
+/**
+.Shortcut.MyersUkkonenGlobal:
+..status:deprecated, use $Myers<FindPrefix>$
+..cat:Pattern Matching
+..summary:Global (query-global, text-global) pattern matching without findBegin() support.
+..signature:MyersUkkonen
+..shortcutfor:Spec.Myers
+...signature:Myers<FindPrefix, void>
+..see:Spec.Myers
+..see:Shortcut.MyersUkkonenGlobalBanded
+..see:Shortcut.MyersUkkonen
+..see:Shortcut.MyersUkkonenBanded
+*/
+typedef Myers<FindPrefix, True, void> MyersUkkonenGlobal;
+
+
+/**
+.Shortcut.MyersUkkonenBanded:
+..status:deprecated, use $Myers<AlignTextBanded<FindInfix, NMatchesN_, NMatchesN_> >$
+..cat:Pattern Matching
+..summary:Semin-global (query-global, text-local) pattern matching without findBegin() support.
+..signature:MyersUkkonen
+..shortcutfor:Spec.Myers
+...signature:Myers<AlignTextBanded, void>
+..see:Spec.Myers
+..see:Shortcut.MyersUkkonen
+..see:Shortcut.MyersUkkonenGlobal
+..see:Shortcut.MyersUkkonenGlobalBanded
+*/
+
+/**
+.Shortcut.MyersUkkonenGlobalBanded:
+..status:deprecated, use $Myers<AlignTextBanded<FindPrefix, NMatchesN_, NMatchesN_> >$
+..cat:Pattern Matching
+..summary:global (query-global, text-global) pattern matching without findBegin() support.
+..signature:MyersUkkonen
+..shortcutfor:Spec.Myers
+...signature:Myers<MyersUkkonenGlobalBanded, void>
+..see:Spec.Myers
+..see:Shortcut.MyersUkkonen
+..see:Shortcut.MyersUkkonenGlobal
+..see:Shortcut.MyersUkkonenBanded
+*/
+typedef Myers<AlignTextBanded<FindInfix, NMatchesN_, NMatchesN_>, True, void> MyersUkkonenBanded;
+typedef Myers<AlignTextBanded<FindPrefix, NMatchesN_, NMatchesN_>, True, void> MyersUkkonenGlobalBanded;
+
+
+//____________________________________________________________________________
+// bit 0 of the HP bit-vector
+// 0 for begin-gap-free haystack
+// 1 for global alignments of haystack
+
+template <typename T>
+struct MyersUkkonenHP0_ {
+	enum { VALUE = 0 };
+};
+
+template <>
+struct MyersUkkonenHP0_<FindPrefix> {
+	enum { VALUE = 1 };
+};
+
+template <typename TValue>
+struct MyersSmallAlphabet_:
+	public Eval<ValueSize<TValue>::VALUE <= 8> {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//overwrite FindBegin_ to define host member if find begin is switched on
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TFindBeginPatternSpec2>
+struct FindBegin_< Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> >, TFindBeginPatternSpec2>
+{
+private:
+	typedef Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > TPattern;
+	typedef typename FindBeginPattern<TPattern>::Type TFindBeginPattern;
+
+public:
+	TFindBeginPattern data_findBeginPattern;
+// 	Holder<TNeedle>	data_host;	//defines the 
+	typedef False HasHost;
+};
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+struct FindBegin_< Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> >, void>
+{
+	typedef False HasHost;
+//need no findBegin if FindBeginPatternSpec is void
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// State Data
+//////////////////////////////////////////////////////////////////////////////
+
+// small state
+template <typename TNeedle, typename TSpec>
+struct MyersSmallState_
+{
+#ifdef SEQAN_SSE2_INT128
+	typedef Sse2Int128 TWord;
+#else
+	typedef unsigned long TWord;
+#endif
+
+	TWord VP0;					// VP[0] (saves one dereferentiation)
+	TWord VN0;					// VN[0]
+    unsigned int errors;		// the current number of errors
+    unsigned int maxErrors;		// the maximal number of errors allowed
+};
+
+template <typename TNeedle, typename TSmallAlphabet>
+struct MyersSmallStateBandedShift_ {};
+template <typename TNeedle>
+struct MyersSmallStateBandedShift_<TNeedle, False> {
+    typedef typename Value<TNeedle>::Type TValue;
+    unsigned short shift[ValueSize<TValue>::VALUE];
+};
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP>
+struct MyersSmallState_<TNeedle, AlignTextBanded<TSpec, TFinderCSP, TPatternCSP> >:
+    public MyersSmallStateBandedShift_<TNeedle, typename MyersSmallAlphabet_<typename Value<TNeedle>::Type>::Type>
+{
+#ifdef SEQAN_SSE2_INT128
+	typedef Sse2Int128 TWord;
+#else
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR
+	typedef unsigned char TWord;
+#else
+	typedef unsigned long TWord;
+#endif
+#endif
+    typedef typename Value<TNeedle>::Type TValue;
+
+    TWord bitMasks[ValueSize<TValue>::VALUE];
+	TWord VP0;					// VP[0] (saves one dereferentiation)
+	TWord VN0;					// VN[0]
+    unsigned short errors;      // the current number of errors
+    unsigned short maxErrors;   // the maximal number of errors allowed
+    unsigned short leftClip;    // clip that many characters from the text begin
+//    unsigned short rightClip;   // stop alignment that many characters before the end   <<<< currently unused (autom. determined)
+    
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR
+    String<int> DPMat;
+#endif
+    MyersSmallState_():
+        leftClip(0) {}
+};
+
+// large state
+template <typename TNeedle, typename TSpec>
+struct MyersLargeState_
+{
+#ifdef SEQAN_SSE2_INT128
+	typedef Sse2Int128 TWord;
+#else
+	typedef unsigned long TWord;
+#endif
+	unsigned lastBlock;			// the block containing the last active cell
+	String<TWord> VP;
+	String<TWord> VN;
+	TWord scoreMask;			// the mask with a bit set at the position of the last active cell
+};
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP>
+struct MyersLargeState_<TNeedle, AlignTextBanded<TSpec, TFinderCSP, TPatternCSP> >
+{
+#ifdef SEQAN_SSE2_INT128
+	typedef Sse2Int128 TWord;
+#else
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR
+	typedef unsigned char TWord;
+#else
+	typedef unsigned long TWord;
+#endif
+#endif
+	unsigned lastBlock;			// the block containing the last active cell
+	unsigned blockCount;		// the number of blocks
+	String<TWord> VP;
+	String<TWord> VN;
+};
+
+// TODO: should go elsewhere
+// template <typename TNeedle, typename TSpec>
+// class Pattern{};
+// TODO: should go elsewhere
+template <typename TNeedle, typename TSpec>
+class PatternState_{};
+
+
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec>
+class PatternState_<TNeedle, Myers<TSpec, False, TFindBeginPatternSpec> > {};
+
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec>
+class PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> >:
+    public MyersSmallState_<TNeedle, TSpec>
+{	
+public:
+    typedef MyersSmallState_<TNeedle, TSpec>    TSmallState;
+    typedef MyersLargeState_<TNeedle, TSpec>    TLargeState;
+    typedef typename TSmallState::TWord         TWord;
+
+	enum { MACHINE_WORD_SIZE = sizeof(TWord) * 8 };
+
+	TLargeState *largeState;
+
+//____________________________________________________________________________
+
+	PatternState_():
+		largeState(NULL) {}
+
+	PatternState_(PatternState_ const & other):
+        TSmallState(other),
+		largeState(NULL)
+	{
+		if (other.largeState)
+			largeState = new TLargeState(*other.largeState);
+	}
+
+	~PatternState_()
+	{
+		delete largeState;
+	}
+	
+	PatternState_ &
+	operator = (PatternState_ const & other)
+	{
+        TSmallState::operator=(other);
+		if (other.largeState)
+		{
+			if (largeState == NULL)
+				largeState = new TLargeState;
+			(*largeState) = *(other.largeState);
+		} else {
+			delete largeState;
+            largeState = NULL;
+        }
+		return *this;
+	}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Pattern Data
+//////////////////////////////////////////////////////////////////////////////
+ 
+template <typename TNeedle, typename TSpec>
+struct MyersSmallPattern_
+{
+#ifdef SEQAN_SSE2_INT128
+	typedef Sse2Int128 TWord;
+#else
+	typedef unsigned long TWord;
+#endif
+
+	String<TWord> bitMasks;		// encode the needle with bitmasks for each alphabet character
+	unsigned needleSize;        // needle size
+
+    MyersSmallPattern_():
+        needleSize(0) {}
+};
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP>
+struct MyersSmallPattern_<TNeedle, AlignTextBanded<TSpec, TFinderCSP, TPatternCSP> >
+{
+#ifdef SEQAN_SSE2_INT128
+	typedef Sse2Int128 TWord;
+#else
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR
+	typedef unsigned char TWord;
+#else
+	typedef unsigned long TWord;
+#endif
+#endif
+
+	Holder<TNeedle> data_host;  // needle holder (the banded version needs no preprocessed bitmasks)
+};
+
+// large basic pattern
+template <typename TNeedle, typename TSpec>
+struct MyersLargePattern_
+{
+#ifdef SEQAN_SSE2_INT128
+	typedef Sse2Int128 TWord;
+#else
+	typedef unsigned long TWord;
+#endif
+
+	unsigned blockCount;		// the number of blocks
+	TWord finalScoreMask;		// a mask with a bit set on the position of the last row
+};
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP>
+struct MyersLargePattern_<TNeedle, AlignTextBanded<TSpec, TFinderCSP, TPatternCSP> > {};
+
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+class Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> >:
+    public MyersSmallPattern_<TNeedle, TSpec>,
+    public FindBegin_<Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > >,
+	public PatternState_<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> >
+{
+	
+public:
+    typedef MyersSmallPattern_<TNeedle, TSpec>      TSmallPattern;
+    typedef MyersLargePattern_<TNeedle, TSpec>      TLargePattern;
+    typedef typename TSmallPattern::TWord           TWord;
+	
+	enum { MACHINE_WORD_SIZE = sizeof(TWord) * 8 };
+
+	typedef PatternState_<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > TPatternState;
+
+	TLargePattern *largePattern;	// extra preprocessing info for large patterns
+
+//____________________________________________________________________________
+
+	Pattern():
+		largePattern(NULL) {}
+
+	Pattern(int _limit):
+		largePattern(NULL) 
+	{
+		setScoreLimit(*this, _limit);
+	}
+
+	Pattern(Pattern const & other) :
+        TSmallPattern(other),
+        TPatternState(other),
+        largePattern(NULL)
+	{
+		if (other.largePattern)
+			largePattern = new TLargePattern(*other.largePattern);
+	}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl, int _limit = -1):
+		largePattern(NULL)
+	{
+		setScoreLimit(*this, _limit);
+		setHost(*this, ndl);
+	}
+
+	~Pattern()
+	{
+		delete largePattern;
+	}
+
+	Pattern &
+	operator = (Pattern const & other)
+	{
+        TSmallPattern::operator=(other);
+        TPatternState::operator=(other);
+		if (other.largePattern)
+        {
+            if (largePattern == NULL)
+                largePattern = new TLargePattern;
+            (*largePattern) = *(other.largePattern);
+        } else {
+            delete largePattern;
+            largePattern = NULL;
+        }
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+struct FindBeginPatternSpec <Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > > 
+{
+	typedef TFindBeginPatternSpec Type;
+};
+template <typename TNeedle, typename THasState, typename TFindBeginPatternSpec>
+struct FindBeginPatternSpec <Pattern<TNeedle, Myers<FindPrefix, THasState, TFindBeginPatternSpec> > >
+{// no find begin for FindPrefix
+	typedef void Type;
+};
+
+
+template <typename TPattern>
+struct PatternState {};
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+struct PatternState<Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > >
+{
+	typedef PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2>
+inline void _patternFirstInit(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, 
+							  TNeedle2 & needle)
+{
+SEQAN_CHECKPOINT
+
+	typedef typename Pattern<TNeedle, Myers<TSpec, TFindBeginPatternSpec> >::TWord TWord;
+	typedef typename Value<TNeedle>::Type TValue;
+
+	pattern.needleSize = length(needle);
+	unsigned blockCount = (pattern.needleSize + pattern.MACHINE_WORD_SIZE - 1) / pattern.MACHINE_WORD_SIZE;
+
+	if (blockCount > 1) 
+	{
+		if (pattern.largePattern == NULL)
+			pattern.largePattern = new MyersLargePattern_<TNeedle, TSpec>();
+
+		pattern.largePattern->blockCount = blockCount;
+		pattern.largePattern->finalScoreMask = (TWord)1 << ((pattern.needleSize + pattern.MACHINE_WORD_SIZE - 1) % pattern.MACHINE_WORD_SIZE);
+	} 
+	else 
+	{
+		delete pattern.largePattern;
+		pattern.largePattern = NULL;
+	}
+
+	clear(pattern.bitMasks);
+	resize(pattern.bitMasks, (ValueSize<TValue>::VALUE + 1) * blockCount, 0, Exact());
+
+	// encoding the letters as bit-vectors
+    for (unsigned j = 0; j < pattern.needleSize; j++)
+		pattern.bitMasks[
+			blockCount * ordValue(convert<typename Value<TNeedle>::Type>(getValue(needle, j)))
+			+ j / pattern.MACHINE_WORD_SIZE
+		] |= (TWord)1 << (j % pattern.MACHINE_WORD_SIZE);
+		//pattern.bitMasks[pattern.blockCount * ordValue((CompareType< Value< TNeedle >::Type, Value< Container< THaystack >::Type >::Type >::Type) needle[j]) + j/pattern.MACHINE_WORD_SIZE] = pattern.bitMasks[pattern.blockCount * ordValue((CompareType< Value< TNeedle >::Type, Value< Container< THaystack >::Type >::Type >::Type) needle[j]) + j/MACHINE_WORD_SIZE] | ((TWord)1 << (j%MACHINE_WORD_SIZE));
+		
+	_findBeginInit(pattern, needle);
+}
+
+
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2>
+inline void _patternFirstInit(Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > & pattern, 
+							  TNeedle2 & ndl)
+{
+	_findBeginInit(pattern, ndl);
+}
+
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline void _patternMatchNOfPatternImpl(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, 
+										bool match)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> >::TWord TWord;
+	typedef typename Value<TNeedle>::Type TValue;
+	unsigned blockCount = (pattern.largePattern == NULL)? 1: pattern.largePattern->blockCount;
+
+	// letters are encoded as bit-vectors
+	for (unsigned j = 0; j < pattern.needleSize; j++)
+	{
+		TWord bit = (TWord)1 << (j % pattern.MACHINE_WORD_SIZE);
+		bool allNull = true;
+		int idx = j / pattern.MACHINE_WORD_SIZE;
+
+		for (int i = 0; i < 4; ++i, idx += blockCount)
+			allNull &= (pattern.bitMasks[idx] & bit) == (TWord)0;
+
+		if (allNull)
+		{	// all bits are 0 => this letter must be 'N'
+			if (match)
+			{
+				for (; idx >= 0; idx -= blockCount)
+					pattern.bitMasks[idx] |= bit;
+			} else
+			{
+				for (; idx >= 0; idx -= blockCount)
+					pattern.bitMasks[idx] &= ~bit;
+			}
+		}
+	}
+}
+
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline void 
+_patternMatchNOfPattern(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, bool match)
+{
+    SEQAN_CHECKPOINT;
+    _patternMatchNOfPatternImpl(pattern, match);
+    _patternMatchNOfPatternImpl(pattern.data_findBeginPattern, match);
+}
+
+
+template <typename TNeedle, typename TSpec, typename THasState>
+inline void 
+_patternMatchNOfPattern(Pattern<TNeedle, Myers<TSpec, THasState, void> > & pattern, bool match)
+{
+    SEQAN_CHECKPOINT;
+    _patternMatchNOfPatternImpl(pattern, match);
+}
+
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline void 
+_patternMatchNOfFinderImpl(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, bool match)
+{
+	SEQAN_CHECKPOINT;
+
+	typedef typename Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> >::TWord TWord;
+	unsigned blockCount = (pattern.largePattern == NULL)? 1: pattern.largePattern->blockCount;
+
+	// letters are encoded as bit-vectors
+	if (match)
+	{
+		for (unsigned j = 0; j < pattern.needleSize; j++)
+			pattern.bitMasks[blockCount * 4 + j / pattern.MACHINE_WORD_SIZE] |= (TWord)1 << (j % pattern.MACHINE_WORD_SIZE);
+	} else {
+		for (unsigned j = 0; j < pattern.needleSize; j++)
+			pattern.bitMasks[blockCount * 4 + j / pattern.MACHINE_WORD_SIZE] &= ~((TWord)1 << (j % pattern.MACHINE_WORD_SIZE));
+	}
+}
+
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline void 
+_patternMatchNOfFinder(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, bool match)
+{
+    SEQAN_CHECKPOINT;
+    _patternMatchNOfFinderImpl(pattern, match);
+    _patternMatchNOfFinderImpl(pattern.data_findBeginPattern, match);
+}
+
+
+template <typename TNeedle, typename TSpec, typename THasState>
+inline void 
+_patternMatchNOfFinder(Pattern<TNeedle, Myers<TSpec, THasState, void> > & pattern, bool match)
+{
+    SEQAN_CHECKPOINT;
+    _patternMatchNOfFinderImpl(pattern, match);
+}
+
+
+// data_host is not used anymore, the needle can be reconstructed from the bitmasks
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2>
+inline void 
+_myersSetHost(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > &, TNeedle2 const &) 
+{
+}
+
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2>
+inline void 
+_myersSetHost(Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > & pattern, TNeedle2 const & ndl) 
+{
+	setValue(pattern.data_host, ndl);
+}
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2>
+inline void 
+setHost(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, TNeedle2 & ndl)
+{
+	SEQAN_CHECKPOINT;
+	typedef Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > TPattern;
+	_myersSetHost(pattern, ndl);
+	_patternFirstInit(pattern, ndl);
+}
+
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TNeedle2>
+inline void 
+setHost(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern, TNeedle2 const & ndl) 
+{
+	SEQAN_CHECKPOINT;
+	typedef Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > TPattern;
+	_myersSetHost(pattern, ndl);
+	_patternFirstInit(pattern, ndl);
+}
+
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec>
+inline typename Host<Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > >::Type & 
+host(Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > & pattern)
+{
+SEQAN_CHECKPOINT
+	return value(pattern.data_host);
+}
+
+
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec>
+inline typename Host<Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > const>::Type & 
+host(Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > const & pattern)
+{
+SEQAN_CHECKPOINT
+	return value(pattern.data_host);
+}
+
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline TNeedle
+host(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern)
+{
+SEQAN_CHECKPOINT
+
+	typedef typename Pattern<TNeedle, Myers<TSpec, TFindBeginPatternSpec> >::TWord TWord;
+	typedef typename Value<TNeedle>::Type TValue;
+
+	TNeedle temp;
+	resize(temp, pattern.needleSize, Exact());
+
+	unsigned blockCount = (pattern.needleSize + pattern.MACHINE_WORD_SIZE - 1) / pattern.MACHINE_WORD_SIZE;
+	TValue v = TValue();
+	for (unsigned i = 0; i < length(pattern.bitMasks); i += blockCount)
+	{
+		for (unsigned j = 0; j < pattern.needleSize; j++)
+			if ((pattern.bitMasks[i + j / pattern.MACHINE_WORD_SIZE] & (TWord)1 << (j % pattern.MACHINE_WORD_SIZE)) != (TWord)0)
+				temp[j] = v;
+		++v;
+	}
+	return temp;
+}
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline TNeedle
+host(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern)
+{
+SEQAN_CHECKPOINT
+	typedef Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > TPattern;
+	return host(const_cast<TPattern const &>(pattern));
+}
+
+//____________________________________________________________________________
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline TNeedle
+needle(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern)
+{
+SEQAN_CHECKPOINT
+	return host(pattern);
+}
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline TNeedle
+needle(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > & pattern)
+{
+SEQAN_CHECKPOINT
+	typedef Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > TPattern;
+	return host(const_cast<TPattern const &>(pattern));
+}
+
+//____________________________________________________________________________
+
+///.Function.scoreLimit.param.pattern.type:Spec.Myers
+
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec>
+inline int 
+scoreLimit(PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > const & state)
+{
+SEQAN_CHECKPOINT
+	return - (int) state.maxErrors;
+}
+
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec>
+inline int
+scoreLimit(Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > const & pattern)
+{
+SEQAN_CHECKPOINT
+	return - (int) pattern.maxErrors;
+}
+
+
+//____________________________________________________________________________
+
+///.Function.setScoreLimit.param.pattern.type:Spec.Myers
+
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec, typename TScoreValue>
+inline void 
+setScoreLimit(PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & state,
+           TScoreValue minScore)
+{
+SEQAN_CHECKPOINT
+    // we need to convert the minimal score into a maximal penalty
+    // that is why minScore is negated
+    state.maxErrors = -minScore;
+}
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec, typename TScoreValue>
+inline void 
+setScoreLimit(Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & pattern, 
+           TScoreValue minScore)
+{
+SEQAN_CHECKPOINT
+    // we need to convert the minimal score into a maximal penalty
+    // that is why minScore is negated
+    pattern.maxErrors = -minScore;
+}
+
+
+
+//____________________________________________________________________________
+
+///.Function.getScore.param.pattern.type:Spec.Myers
+
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec>
+inline int 
+getScore(PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > const & state)
+{
+	return -(int)state.errors;
+}
+template<typename TNeedle, typename TSpec, typename TFindBeginPatternSpec>
+inline int 
+getScore(Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > const & state)
+{
+	return -(int)state.errors;
+}
+
+
+template <typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec, typename TFinder>
+inline bool 
+_patternInit(Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern, 
+		     PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & state,
+		     TFinder &)
+{
+SEQAN_CHECKPOINT
+    typedef MyersLargeState_<TNeedle, TSpec> TLargeState;
+    typedef typename TLargeState::TWord TWord;
+
+	if (pattern.largePattern == NULL)
+	{
+		state.errors = pattern.needleSize;
+		state.VP0 = ~(TWord)0;
+		state.VN0 = 0;
+        delete state.largeState;
+        state.largeState = NULL;
+	} 
+	else 
+	{
+		if (state.largeState == NULL)
+			state.largeState = new TLargeState;
+		
+		TLargeState &largeState = *state.largeState;
+		// localMaxErrors either stores the maximal number of errors (me.maxErrors) or the needle size minus one.
+		// It is used for the mask computation and setting the initial score (the minus one is there because of the Ukkonen trick).
+		int localMaxErrors = _min(state.maxErrors, pattern.needleSize - 1);
+		state.errors = localMaxErrors + 1;
+		largeState.scoreMask = (TWord)1 << (localMaxErrors % pattern.MACHINE_WORD_SIZE);
+		largeState.lastBlock = localMaxErrors / pattern.MACHINE_WORD_SIZE; 
+		if (largeState.lastBlock >= pattern.largePattern->blockCount)
+			largeState.lastBlock = pattern.largePattern->blockCount - 1;
+
+		clear(largeState.VP);
+		resize(largeState.VP, pattern.largePattern->blockCount, ~(TWord)0, Exact());
+
+		clear(largeState.VN);
+		resize(largeState.VN, pattern.largePattern->blockCount, 0, Exact());
+	}
+    return true;
+}
+
+//____________________________________________________________________________
+// bitmask operations - small alphabet
+
+template <typename TNeedle, typename TSpec>
+finline void 
+_myersPreInit(PatternState_<TNeedle, TSpec> &state, True) 
+{
+	typedef typename Value<TNeedle>::Type TValue;
+    for (unsigned i = 0; i < ValueSize<TValue>::VALUE; ++i)
+        state.bitMasks[i] = 0;
+}
+
+template <typename TNeedle, typename TSpec>
+finline void 
+_myersPostInit(PatternState_<TNeedle, TSpec> &state, True) 
+{
+	typedef typename Value<TNeedle>::Type TValue;
+	for (unsigned i = 0; i < ValueSize<TValue>::VALUE; ++i)
+		state.bitMasks[i] >>= 1;
+}
+
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec, typename TValue, typename TShift>
+finline void 
+_myersAdjustBitmask(PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > &state, TValue const value, TShift, True) 
+{
+	typedef typename PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> >::TWord TWord;
+    
+    // compiler will optimize that
+    if (IsSameType<TPatternCSP, NMatchesAll_>::VALUE && value == unknownValue<TValue>())
+    {
+        for (unsigned i = 0; i < ValueSize<TValue>::VALUE; ++i)
+            state.bitMasks[i] = (state.bitMasks[i] >> 1) | ((TWord)1 << (BitsPerValue<TWord>::VALUE - 1));
+    } 
+    else
+    {
+        for (unsigned i = 0; i < ValueSize<TValue>::VALUE; ++i)
+            state.bitMasks[i] >>= 1;
+        if (!(IsSameType<TPatternCSP, NMatchesNone_>::VALUE && value == unknownValue<TValue>()))
+            state.bitMasks[ordValue(value)] |= (TWord)1 << (BitsPerValue<TWord>::VALUE - 1);
+    }
+
+    if (IsSameType<TFinderCSP, NMatchesAll_>::VALUE)
+        state.bitMasks[ordValue(unknownValue<TValue>())] |= (TWord)1 << (BitsPerValue<TWord>::VALUE - 1);
+    if (IsSameType<TFinderCSP, NMatchesNone_>::VALUE)
+        state.bitMasks[ordValue(unknownValue<TValue>())] &= ~((TWord)1 << (BitsPerValue<TWord>::VALUE - 1));
+}
+
+template <typename TNeedle, typename TSpec, typename TValue, typename TShift>
+finline typename PatternState_<TNeedle, TSpec>::TWord
+_myersGetBitmask(PatternState_<TNeedle, TSpec> &state, TValue const value, TShift, True) 
+{
+	return state.bitMasks[ordValue(value)];
+}
+
+
+
+//____________________________________________________________________________
+// bitmask operations - large alphabet
+
+template <typename TNeedle, typename TSpec>
+finline void 
+_myersPreInit(PatternState_<TNeedle, TSpec> &state, False) 
+{
+	typedef typename Value<TNeedle>::Type TValue;
+    memset(state.bitMasks, 0, (ValueSize<TValue>::VALUE + 1) * sizeof(state.bitMasks[0]));
+    memset(state.shift, 0, ValueSize<TValue>::VALUE * sizeof(state.shift[0]));
+}
+
+template <typename TNeedle, typename TSpec>
+finline void 
+_myersPostInit(PatternState_<TNeedle, TSpec> &, False) 
+{
+}
+
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec, typename TValue, typename TShift>
+finline void 
+_myersAdjustBitmask(PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > &state, TValue const value, TShift const shift, False) 
+{
+	typedef typename PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> >::TWord TWord;
+    
+    if (IsSameType<TPatternCSP, NMatchesNone_>::VALUE && value == unknownValue<TValue>())
+        return;
+    
+    register unsigned ord = ordValue(value);
+	register unsigned short x = shift - state.shift[ord];
+	if (x < BitsPerValue<TWord>::VALUE)
+		state.bitMasks[ord] = (state.bitMasks[ord] >> x) | ((TWord)1 << (BitsPerValue<TWord>::VALUE - 1));
+	else
+		state.bitMasks[ord] = (TWord)1 << (BitsPerValue<TWord>::VALUE - 1);
+	state.shift[ord] = shift;
+}
+
+template <typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec, typename TValue, typename TShift>
+finline typename PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> >::TWord
+_myersGetBitmask(PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > &state, TValue const value, TShift const shift, False) 
+{
+	typedef typename PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> >::TWord TWord;
+
+    if (IsSameType<TFinderCSP, NMatchesNone_>::VALUE && value == unknownValue<TValue>())
+        return 0;
+
+    if (IsSameType<TFinderCSP, NMatchesAll_>::VALUE && value == unknownValue<TValue>())
+        return (shift < BitsPerValue<TWord>::VALUE)? -1 << shift: -1;
+    
+    register unsigned ord = ordValue(value);
+    register TWord res;
+    register TShift x = shift - state.shift[ord];
+	if (x < BitsPerValue<TWord>::VALUE) 
+		res = state.bitMasks[ord] >> x;
+	else
+		res = 0;
+    
+    if (IsSameType<TPatternCSP, NMatchesAll_>::VALUE)
+    {
+        ord = ordValue(unknownValue<TValue>());
+        x = shift - state.shift[ord];
+        if (x < BitsPerValue<TWord>::VALUE) 
+            res |= state.bitMasks[ord] >> x;
+    }
+    return res;
+}
+
+
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec>
+inline bool 
+_patternInitSmallStateBanded(
+    TFinder &finder,
+	TNeedle2 const & needle, 
+    PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state)
+{
+	typedef Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > TPattern;
+	typedef typename TPattern::TWord TWord;
+	typedef typename Iterator<TNeedle const, Standard>::Type TIter;
+	typedef typename Value<TNeedle>::Type TValue;
+
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR
+    int col = state.leftClip + 1;
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR_DUMP
+    std::cerr << "     ";
+    for (int i = length(needle); i != 0; --i)
+        std::cerr << std::setw(5) << needle[i - 1];
+    std::cerr << std::endl;
+    std::cerr << "     ";
+    for (int i = length(needle); i >= 0; --i)
+        std::cerr << std::setw(5) << state.DPMat[i];
+    std::cerr << std::endl;
+#endif
+#endif
+
+    _myersPreInit(state, typename MyersSmallAlphabet_<TValue>::Type());
+
+	typename Size<TNeedle>::Type const ndlLength = length(needle);
+	
+	// Initialize row 0 either with zeros or increasing numbers
+	// This can be realized using the following DP pattern and
+	// assuming character mismatches at rows -1, -2,...
+	// Thus we initialize the bitmasks and VN with 0.
+	// VP depends on global/local alignment
+	//
+	//  0  1  2  3  4   -2 -2 -2 -2 -2   (row -2)
+	//  0  1  2  3  4   -1 -1 -1 -1 -1   (row -1)
+	//	0  1  2  3  4    0  0  0  0  0   (row  0)
+	//  1                1
+	//	    global           local
+	//
+	//  VP = 100...      VP = 111...
+	//
+
+    register TWord VP = (MyersUkkonenHP0_<TSpec>::VALUE == 1)? (TWord)1 << ((int)BitsPerValue<TWord>::VALUE-1): -1; // HP[0]==1 <-> global, HP[0]==0 <-> local
+    register TWord VN = 0;
+	
+	// Errors are counted along the lowest diagonal and the
+	// lowest row of the band.
+	// The errors in the top-left corner are 0.
+	//
+	// 0 * * * *
+	//   x * * * *
+	//     x * * * *
+	//       x x x x x
+	//
+	//       |-------|
+	//     diagWidth + 1 = 5
+	//
+	// diagWidth = length(container(finder)) + state.leftClip + state.rightClip - length(needle)
+	
+    register unsigned errors = 0;
+	TIter ndlIter = begin(needle, Standard());
+	TIter ndlEnd;
+	
+	// The errors along the diagonal can only increase or stay the same.
+	// There is only the last row of length diagWidth where errors can decrease.
+	// If errors exceeds cutOff it cannot reach maxErrors again.
+	
+	
+	typename Size<TFinder>::Type const columns = length(container(hostIterator(finder))) + state.leftClip;
+    register unsigned cutOff = state.maxErrors;
+	if (columns > ndlLength)
+	{
+		cutOff += columns - ndlLength;		// clipping case *0
+		ndlEnd = end(needle, Standard());
+	} else {
+        errors += ndlLength - columns;
+		ndlEnd = ndlIter + columns;			// clipping case *1
+	}
+
+//    std::cerr<<std::hex<<"\t  "<<std::setw(17)<<' '<<"\tVN"<<std::setw(17)<<VN<<"\tVP"<<std::setw(17)<<VP<<std::dec<<std::endl;
+
+	register unsigned short shift = 0;
+	
+	if (state.leftClip != 0)
+	{
+		//////////////////////////////////////////////////////////////////
+		// PART 0: go down the parallelogram in a empty (clipped) area
+		//////////////////////////////////////////////////////////////////
+
+		errors += state.leftClip;
+		if (errors > ndlLength) errors = ndlLength;
+		if (errors > cutOff) return false;
+
+	// leftClip = 2
+	//   |-|
+	//
+	//   . . * * *
+	//     . * * * *
+	//       * * * * *
+	//         * * * * .
+	//           * * * . .
+	//             * * . . .
+	//
+	//                 |---|
+	//               rightClip = 3
+    //
+	// We divide the parallelogam into 3 sections:
+	//
+	//   A A A A
+	//     A A A B
+	//       A A B B
+	//         A B B C
+	//           B B C C
+	//             B C C C
+	//               C C C C
+	//
+	// Depending on where the clipping ends we identify 4 different clipping cases:
+	//
+	//	 case 00            case 10            case 01            case 11
+	//   . . * *            . . . .            . . * *            . . . .
+	//     . * * *            . . . *            . * * *            . . . *
+	//       * * * *            . . * *            * * * .            . . * .
+	//         * * * *            . * * *            * * . .            . * . .
+	//           * * * .            * * * .            * . . .            * . . .
+	//             * * . .            * * . .            . . . .            . . . .
+	//
+
+		// adjust bitmasks (errors = number of needle chars to preprocess)
+		for (; shift < errors; ++ndlIter, ++shift)
+			_myersAdjustBitmask(state, getValue(ndlIter), shift, typename MyersSmallAlphabet_<TValue>::Type());
+
+		// initialise left column with
+		//
+		//  0  1  2  3  4   -2 -2 -2 -2 -2
+		//  0  1  2  3  4   -1 -1 -1 -1 -1
+		//	0  1  2  3  4    0  0  0  0  0
+		//	1                1
+		//	2   global       2   local
+		//	3                3
+		//	4                4
+		//
+		//  VP = 111100...   VP = 111111...
+		if (errors < (unsigned)BitsPerValue<TWord>::VALUE-1)
+			VP |= ((TWord) -1) << ((unsigned)BitsPerValue<TWord>::VALUE-1 - errors);
+		else
+			VP = -1;
+	}
+
+    for (; ndlIter != ndlEnd; ++ndlIter, goNext(finder), ++shift)
+    {
+		//////////////////////////////////////////////////////////////////
+        // PART 1: go down the parallelogram
+		//////////////////////////////////////////////////////////////////
+        
+        // adjust bitmask
+        _myersAdjustBitmask(state, getValue(ndlIter), shift, typename MyersSmallAlphabet_<TValue>::Type());
+        
+		/////////////////////////
+        // DIAGONAL MYERS CORE
+		
+		// VP/VN --> D0  (original Myers)
+        register TWord X = _myersGetBitmask(state, ordValue(*finder), shift, typename MyersSmallAlphabet_<TValue>::Type()) | VN;
+        register TWord D0 = ((VP + (X & VP)) ^ VP) | X;
+		
+		// adjust errors corresponding to rightmost bit of D0
+        errors += (~D0 >> (BitsPerValue<TWord>::VALUE - 1)) & 1;
+        if (errors > cutOff) return false;
+
+		// D0 --> HP/HN  (original Myers)
+        register TWord HN = VP & D0;
+        register TWord HP = VN | ~(VP | D0);
+    //    const int PADDING = sizeof(TWord)*2 + 1;
+    //    std::cerr << std::hex;
+    //    std::cerr << "\tD0"<<std::setw(PADDING)<<(__uint64)D0<<"\tHN"<<std::setw(PADDING)<<(__uint64)HN<<"\tHP"<<std::setw(PADDING)<<(__uint64)HP << std::endl;
+
+		// moving register down corresponds to shifting HP/HN up (right shift)
+		// HP/HN --> shift --> VP/VN (modified Myers)
+        X = D0 >> 1;
+        VN = X & HP;
+        VP = HN | ~(X | HP);
+    //    std::cerr << "\t  "<<std::setw(PADDING)<<' '<<"\tVN"<<std::setw(PADDING)<<(__uint64)VN<<"\tVP"<<std::setw(PADDING)<<(__uint64)VP << std::endl;
+    //    std::cerr << std::dec;
+    
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR_DUMP
+        std::cerr << "diag ";        
+#endif
+        int val = errors;
+        state.DPMat[(col-state.leftClip)*(length(needle)+1)+col] = val;
+        for (int i = length(needle); i >=0; --i)
+        {
+            if (i > col)
+            {
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR_DUMP
+                std::cerr << "     ";
+#endif
+            } else
+            {
+                int shft = (int)BitsPerValue<TWord>::VALUE-1 - (col-i);
+                if (shft >= 0)
+                {
+                    if (i < col)
+                    {
+                        TWord mask = (TWord)1 << (shft);
+                        val -= ((VP & mask) != (TWord)0)? 1:0;
+                        val += ((VN & mask) != (TWord)0)? 1:0;
+                    }
+                    state.DPMat[(col-state.leftClip)*(length(needle)+1)+i] = val;
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR_DUMP
+                    std::cerr << std::setw(5) << val;
+                } else
+                {
+                    std::cerr << "     ";
+#endif
+                }
+            }
+        }
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR_DUMP
+        std::cerr << std::setw(5) << *finder;
+        std::cerr << std::setw(5) << errors << std::endl;
+#endif
+        ++col;
+#endif
+    }
+    state.VP0 = VP;
+    state.VN0 = VN;
+    state.errors = errors;
+    _myersPostInit(state, typename MyersSmallAlphabet_<TValue>::Type());
+    return true;
+}
+
+
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec>
+bool _stateInit(
+	TFinder &finder,
+	TNeedle const & needle,
+	PatternState_<TNeedle2, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state)
+{
+SEQAN_CHECKPOINT
+	typedef PatternState_<TNeedle2, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > TState;
+    typedef typename TState::TWord TWord;
+    typedef typename TState::TLargeState TLargeState;
+	typedef typename Value<TNeedle>::Type TValue;
+
+//	unsigned diagWidth = length(container(hostIterator(finder))) + state.leftClip - length(needle);
+//	unsigned blockCount = diagWidth / state.MACHINE_WORD_SIZE + 1;
+	unsigned blockCount = 1;
+
+//    SEQAN_ASSERT_GEQ(length(container(hostIterator(finder))), length(needle));
+
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR
+    clear(state.DPMat);
+    resize(state.DPMat, (length(container(finder)) + 1) * (length(needle) + 1), -9);
+    for (unsigned i = 0; i <= length(needle); ++i)
+        state.DPMat[i] = i;
+    for (unsigned i = 0; i <= length(container(finder)); ++i)
+        state.DPMat[i * (length(needle) + 1)] = 0;
+#endif
+
+	if (blockCount <= 1)
+    {
+        delete state.largeState;
+        state.largeState = NULL;
+        return _patternInitSmallStateBanded(finder, needle, state);
+	}
+	else
+	{
+		// TODO: is that good here?
+		if (state.largeState == NULL)
+			state.largeState = new TLargeState;
+		
+		TLargeState &largeState = *state.largeState;
+        largeState.blockCount = blockCount;
+
+		clear(largeState.VP);
+		resize(largeState.VP, blockCount, ~0, Exact());
+
+		clear(largeState.VN);
+		resize(largeState.VN, blockCount, 0, Exact());
+        
+        state.errors = 0;
+        
+        return true;
+	}
+}
+
+template <typename TNeedle, typename TSpec, typename TFindBeginPatternSpec, typename TFinder>
+inline bool 
+_patternInit(Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & pattern, TFinder & finder)
+{
+    SEQAN_CHECKPOINT;
+    return _patternInit(pattern, pattern, finder);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Myers-Ukkonen for semi-global edit-distance-alignments
+// (version for needles longer than one machineword)
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TFinder, typename TNeedle, typename TSpec, typename THasState, typename THasState2, typename TFindBeginPatternSpec, typename TSize>
+inline bool _findMyersLargePatterns (TFinder & finder, 
+									 Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern,
+									 PatternState_<TNeedle, Myers<TSpec, THasState2, TFindBeginPatternSpec> > & state,
+									 TSize haystack_length) 
+{
+SEQAN_CHECKPOINT
+	typedef MyersLargePattern_<TNeedle, TSpec> TLargePattern;
+	typedef MyersLargeState_<TNeedle, TSpec> TLargeState;
+    typedef typename TLargeState::TWord TWord;
+    
+	TWord X, D0, HN, HP, temp;
+	TWord carryD0, carryHP, carryHN;
+	unsigned shift, limit, currentBlock;
+    
+	TLargePattern &largePattern = *pattern.largePattern;
+	TLargeState &largeState = *state.largeState;
+
+	while (position(finder) < haystack_length) 
+	{
+		carryD0 = carryHN = 0;
+		carryHP = (int)MyersUkkonenHP0_<TSpec>::VALUE; // FIXME: replace Noting with TSpec
+
+		// if the active cell is the last of it's block, one additional block has to be calculated
+		limit = largeState.lastBlock + (unsigned)(largeState.scoreMask >> (pattern.MACHINE_WORD_SIZE - 1));
+
+		if (limit == largePattern.blockCount)
+			limit--;
+
+		shift = largePattern.blockCount * ordValue((typename Value< TNeedle >::Type) *finder);
+
+		// computing the necessary blocks, carries between blocks following one another are stored
+		for (currentBlock = 0; currentBlock <= limit; currentBlock++) 
+		{
+			X = pattern.bitMasks[shift + currentBlock] | largeState.VN[currentBlock];
+	
+			temp = largeState.VP[currentBlock] + (X & largeState.VP[currentBlock]) + carryD0;
+			if (carryD0 != (TWord)0)
+				carryD0 = temp <= largeState.VP[currentBlock];
+			else
+				carryD0 = temp < largeState.VP[currentBlock];
+			
+			D0 = (temp ^ largeState.VP[currentBlock]) | X;
+			HN = largeState.VP[currentBlock] & D0;
+			HP = largeState.VN[currentBlock] | ~(largeState.VP[currentBlock] | D0);
+			
+			X = (HP << 1) | carryHP;
+			carryHP = HP >> (pattern.MACHINE_WORD_SIZE - 1);
+			
+			largeState.VN[currentBlock] = X & D0;
+
+			temp = (HN << 1) | carryHN;
+			carryHN = HN >> (pattern.MACHINE_WORD_SIZE - 1);
+								
+		 	largeState.VP[currentBlock] = temp | ~(X | D0);
+
+			// if the current block is the one containing the last active cell
+			// the new number of errors is computed
+			if (currentBlock == largeState.lastBlock) {
+				if ((HP & largeState.scoreMask) != (TWord)0)
+					state.errors++;
+				else if ((HN & largeState.scoreMask) != (TWord)0)
+					state.errors--;
+			}
+		}
+
+		// updating the last active cell
+		while (state.errors > state.maxErrors) {
+			if ((largeState.VP[largeState.lastBlock] & largeState.scoreMask) != (TWord)0)
+				state.errors--;
+			else if ((largeState.VN[largeState.lastBlock] & largeState.scoreMask) != (TWord)0)
+				state.errors++;
+
+			largeState.scoreMask >>= 1;
+			if (largeState.scoreMask == (TWord)0) 
+			{
+				largeState.lastBlock--;
+				if (IsSameType<TSpec, FindPrefix>::VALUE && largeState.lastBlock == (unsigned)-1)
+					break;
+				largeState.scoreMask = (TWord)1 << (pattern.MACHINE_WORD_SIZE - 1);
+			}
+		}
+
+		if ((largeState.scoreMask == largePattern.finalScoreMask) && (largeState.lastBlock == largePattern.blockCount - 1))
+		{
+			_setFinderEnd(finder);
+			if (IsSameType<TSpec, FindPrefix>::VALUE)
+			{
+				_setFinderLength(finder, endPosition(finder));
+			}
+			return true;
+		}
+		else {
+			largeState.scoreMask <<= 1;
+			if (!largeState.scoreMask) {
+				largeState.scoreMask = 1;
+				largeState.lastBlock++;
+			}
+			
+			if ((largeState.VP[largeState.lastBlock] & largeState.scoreMask) != (TWord)0)
+				state.errors++;
+			else if ((largeState.VN[largeState.lastBlock] & largeState.scoreMask) != (TWord)0)
+				state.errors--;
+		}
+
+//		SEQAN_ASSERT (state.errors >= 0);
+
+		goNext(finder);
+	}
+
+	return false;
+}
+
+
+template <typename TFinder, typename TNeedle, typename TSpec, typename THasState, typename THasState2, typename TFindBeginPatternSpec, typename TSize>
+inline bool 
+_findMyersSmallPatterns(
+	TFinder & finder, 
+	Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern,
+	PatternState_<TNeedle, Myers<TSpec, THasState2, TFindBeginPatternSpec> > & state,
+	TSize haystack_length) 
+{
+SEQAN_CHECKPOINT
+
+	typedef typename Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> >::TWord TWord;
+
+	TWord X, D0, HN, HP;
+	TWord lastBit = (TWord)1 << (pattern.needleSize - 1);
+
+	// computing the blocks
+	while (position(finder) < haystack_length) 
+	{
+		X = pattern.bitMasks[ordValue((typename Value<TNeedle>::Type) *finder)] | state.VN0;
+		
+		D0 = ((state.VP0 + (X & state.VP0)) ^ state.VP0) | X;
+		HN = state.VP0 & D0;
+		HP = state.VN0 | ~(state.VP0 | D0);
+		X = (HP << 1) | (TWord)(int)MyersUkkonenHP0_<TSpec>::VALUE; // FIXME: replace Nothing by TSpec
+		state.VN0 = X & D0;
+		state.VP0 = (HN << 1) | ~(X | D0);
+
+		if ((HP & lastBit) != (TWord)0)
+			state.errors++;
+		else if ((HN & lastBit) != (TWord)0)
+			state.errors--;
+
+		if (state.errors <= state.maxErrors)
+		{
+			_setFinderEnd(finder);
+			if (IsSameType<TSpec, FindPrefix>::VALUE)
+			{
+				_setFinderLength(finder, endPosition(finder));
+			}
+			return true;
+		}
+		// 
+		// if (IsSameType<TSpec, FindPrefix>::VALUE)
+		// {//limit haystack length during prefix search
+		// 
+		// }
+		
+		goNext(finder);
+	}
+
+	return false;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Myers-Ukkonen as a banded alignment
+// the band includes the main diagonal and the diagonals above
+// the band width is (blockCount * MACHINE_WORD_SIZE)
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec>
+finline bool 
+_findMyersSmallPatternsBanded(
+	TFinder & finder, 
+	TNeedle const & needle,
+    PatternState_<TNeedle2, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state)
+{
+SEQAN_CHECKPOINT
+	typedef PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > TState;
+	typedef typename TState::TWord TWord;
+	typedef typename Iterator<TNeedle const, Standard>::Type TIter;
+	typedef typename Value<TNeedle>::Type TValue;
+
+    register TWord VP = state.VP0;
+    register TWord VN = state.VN0;
+    register TWord errors = state.errors;
+    register TWord const maxErrors = state.maxErrors;
+	register unsigned short const shift = length(needle);
+
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR
+    unsigned col = position(finder) + 1;
+#endif
+
+	for (; !atEnd(finder); goNext(finder))
+    {
+		// PART 2: go right
+
+		// normal Myers
+		register TWord X = _myersGetBitmask(state, ordValue(*finder), shift, typename MyersSmallAlphabet_<TValue>::Type()) | VN;
+		register TWord D0 = ((VP + (X & VP)) ^ VP) | X;
+		register TWord HN = VP & D0;
+		register TWord HP = VN | ~(VP | D0);
+	//    const int PADDING = sizeof(TWord)*2 + 1;
+	//    std::cerr << std::hex;
+	//    std::cerr << "\tD0"<<std::setw(PADDING)<<(__uint64)D0<<"\tHN"<<std::setw(PADDING)<<(__uint64)HN<<"\tHP"<<std::setw(PADDING)<<(__uint64)HP<<std::endl;
+		X = (HP << 1) | 1;
+		VN = X & D0;
+		VP = (HN << 1) | ~(X | D0);
+	//    std::cerr << "\t  "<<std::setw(PADDING)<<' '<<"\tVN"<<std::setw(PADDING)<<(__uint64)VN<<"\tVP"<<std::setw(PADDING)<<(__uint64)VP<<std::endl;
+	//    std::cerr << std::dec;
+		errors += (HP >> (BitsPerValue<TWord>::VALUE - 2)) & 1;
+        errors -= (HN >> (BitsPerValue<TWord>::VALUE - 2)) & 1;
+
+        // shift bitmasks and states
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR_DUMP
+        std::cerr << "horiz";
+#endif
+        int val = errors;
+        state.DPMat[col*(length(needle)+1)+length(needle)] = val;
+        for (int i = length(needle); i >= 0; --i)
+        {
+            int shft = (int)BitsPerValue<TWord>::VALUE-1 - (length(needle)-i);
+            if (shft >= 0)
+            {
+                if (i < (int)length(needle))
+                {
+                    TWord mask = (TWord)1 << (shft);
+                    val -= ((VP & mask) != (TWord)0)? 1:0;
+                    val += ((VN & mask) != (TWord)0)? 1:0;
+                }
+                state.DPMat[col*(length(needle)+1)+i] = val;
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR_DUMP
+                std::cerr << std::setw(5) << val;
+            } else {
+                std::cerr << "     ";
+#endif
+            }
+        }
+#ifdef SEQAN_DEBUG_MYERSBITVECTOR_DUMP
+        std::cerr << std::setw(5) << *finder;
+        std::cerr << std::setw(5) << errors << std::endl;
+#endif
+        ++col;
+#endif
+
+        if (errors <= maxErrors)
+        {
+            state.VP0 = VP;
+            state.VN0 = VN;
+            state.errors = errors;
+            return true;
+        }
+    }
+    return false;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// find
+
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename TFindBeginPatternSpec>
+inline bool find (TFinder & finder, 
+				  TNeedle const & needle,
+                  PatternState_<TNeedle2, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state)
+{
+	typedef typename Haystack<TFinder>::Type THaystack;
+	typedef typename Size<THaystack>::Type TSize;
+
+	if (empty(finder))
+	{
+		_finderSetNonEmpty(finder);
+		if (!_stateInit(finder, needle, state))
+        {
+            goEnd(finder);
+            return false;
+        }
+            
+        if (state.errors <= state.maxErrors)
+        {
+            goPrevious(finder);
+            return true;
+        }
+		//TODO: adapt myers-ukkonnen to dynamically change maxErrors
+	}
+	else
+	{
+		if (atEnd(finder)) return false;
+		goNext(finder);
+	}
+
+	// distinguish between the version for needles not longer than one machineword and the version for longer needles
+	if (state.largeState == NULL) 
+		return _findMyersSmallPatternsBanded(finder, needle, state);
+//	else
+//		return _findMyersLargePatterns(finder, needle, state);
+	return false;
+}
+
+// First two for AlignTextBanded
+template <typename TFinder, typename TNeedle, typename TSpec, typename TFinderCSP, typename TPatternCSP, typename THasState, typename TFindBeginPatternSpec>
+inline bool find (TFinder & finder, 
+				  Pattern<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, THasState, TFindBeginPatternSpec> > const & pattern,
+                  PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP, TPatternCSP>, True, TFindBeginPatternSpec> > & state)
+{
+SEQAN_CHECKPOINT
+	return find(finder, host(pattern), state);
+}
+
+template <typename TFinder, typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline bool find (TFinder & finder,
+				  Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern,
+				  PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & state)
+{
+SEQAN_CHECKPOINT
+	typedef typename Haystack<TFinder>::Type THaystack;
+	typedef typename Size<THaystack>::Type TSize;
+
+	TSize prefix_begin_position; //for prefix search: the position where the prefix begins
+
+	if (empty(finder))
+	{
+		_patternInit(pattern, state, finder);
+		_finderSetNonEmpty(finder);
+
+		prefix_begin_position = position(finder);
+
+		//TODO: adapt myers-ukkonnen to dynamically change maxErrors
+	}
+	else
+	{
+		if (atEnd(finder)) return false;
+		goNext(finder);
+
+		prefix_begin_position = beginPosition(finder);
+	}
+
+	TSize haystack_length = length(container(hostIterator(finder)));
+	// limit search width for prefix search
+	if (IsSameType<TSpec, FindPrefix>::VALUE)
+	{
+		TSize maxlen = prefix_begin_position + pattern.needleSize - scoreLimit(state) + 1;
+		if (haystack_length > maxlen)
+			haystack_length = maxlen;
+	}
+
+	// distinguish between the version for needles not longer than one machineword and the version for longer needles
+	if (pattern.largePattern == NULL) 
+		return _findMyersSmallPatterns(finder, pattern, state, haystack_length);
+	else
+		return _findMyersLargePatterns(finder, pattern, state, haystack_length);
+}
+
+
+template <typename TFinder, typename TNeedle, typename TSpec, typename TFindBeginPatternSpec>
+inline bool find (TFinder & finder,
+				  Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & pattern)
+{
+	return find(finder, pattern, pattern);
+}
+
+
+template <typename TFinder, typename TNeedle, typename TSpec, typename THasState, typename TFindBeginPatternSpec>
+inline bool find (TFinder & finder,
+				  Pattern<TNeedle, Myers<TSpec, THasState, TFindBeginPatternSpec> > const & pattern,
+				  PatternState_<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & state,
+				  int const minScore)
+{
+	setScoreLimit(state, minScore);
+	return find(finder, pattern, state);
+}
+
+template <typename TFinder, typename TNeedle, typename TNeedle2, typename TSpec, typename TFindBeginPatternSpec>
+inline bool find (TFinder & finder,
+				  TNeedle const & needle,
+				  PatternState_<TNeedle2, Myers<TSpec, True, TFindBeginPatternSpec> > & state,
+				  int const minScore)
+{
+	setScoreLimit(state, minScore);
+	return find(finder, needle, state);
+}
+
+template <typename TFinder, typename TNeedle, typename TSpec, typename TFindBeginPatternSpec>
+inline bool find (TFinder & finder,
+				  Pattern<TNeedle, Myers<TSpec, True, TFindBeginPatternSpec> > & pattern,
+				  int const minScore)
+{
+	return find(finder, pattern, pattern, minScore); //static cast
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
diff --git a/src/SeqAn-1.3/seqan/find/find_pattern_base.h b/src/SeqAn-1.3/seqan/find/find_pattern_base.h
new file mode 100644
index 0000000..1c46f2e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_pattern_base.h
@@ -0,0 +1,398 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Definition of the class Pattern and supporting functions and
+// metafunctions.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_PATTERN_BASE_H
+#define SEQAN_HEADER_FIND_PATTERN_BASE_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.Pattern:
+..summary:Holds the needle and preprocessing data (depends on algorithm).
+..cat:Searching
+..signature:Pattern<TNeedle[, TSpec]>
+..param.TNeedle:The needle type.
+...type:Class.String
+..param.TSpec:The online-algorithm to search with.
+...remarks:Leave empty for index-based pattern matching (see @Class.Index@).
+...default:The result of @Metafunction.DefaultPattern@
+..remarks:If $TNeedle$ is a set of strings, then $position(pattern)$ returns the index of the currently matching needle.
+..include:seqan/find.h
+*/
+
+template < typename TNeedle, typename TSpec = typename DefaultPattern<TNeedle>::Type >
+class Pattern;
+
+//default implementation
+template < typename TNeedle >
+class Pattern<TNeedle, void>
+{
+public:
+	typedef typename Position<TNeedle>::Type TNeedlePosition;
+
+	Holder<TNeedle> data_host;
+	TNeedlePosition data_begin_position;
+	TNeedlePosition data_end_position;
+
+	Pattern() {}
+
+	template <typename TNeedle_>
+	Pattern(TNeedle_ & ndl):
+		data_host(ndl) {}
+
+	template <typename TNeedle_>
+	Pattern(TNeedle_ const & ndl):
+		data_host(ndl) {}
+
+};
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TNeedle, typename TSpec>
+struct Container< Pattern<TNeedle, TSpec> > {
+	typedef TNeedle Type;
+};
+
+template <typename TNeedle, typename TSpec>
+struct Container< Pattern<TNeedle, TSpec> const > {
+	typedef TNeedle const Type;
+};
+
+///.Metafunction.Host.param.T.type:Class.Pattern
+template <typename TNeedle, typename TSpec>
+struct Host< Pattern<TNeedle, TSpec> > {
+	typedef TNeedle Type;
+};
+
+template <typename TNeedle, typename TSpec>
+struct Host< Pattern<TNeedle, TSpec> const > {
+	typedef TNeedle const Type;
+};
+
+
+template <typename TPattern, typename TSpec>
+struct Value< Pattern<TPattern, TSpec> > {
+	typedef typename Value<TPattern>::Type Type;
+};
+
+template <typename TPattern, typename TSpec>
+struct Position< Pattern<TPattern, TSpec> > {
+	typedef typename Position<TPattern>::Type Type;
+};
+
+template <typename TPattern, typename TSpec>
+struct Difference< Pattern<TPattern, TSpec> > {
+	typedef typename Difference<TPattern>::Type Type;
+};
+
+template <typename TPattern, typename TSpec>
+struct Size< Pattern<TPattern, TSpec> > {
+	typedef typename Size<TPattern>::Type Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.ScoringScheme:
+..summary:Returns the scoring scheme of an approximate searching algorithm.
+..cat:Searching
+..signature:ScoringScheme<TPattern>::Type
+..param.TPattern:A @Class.Pattern@ type.
+...type:Class.Pattern
+..returns:The scoring scheme.
+...default:@Shortcut.EditDistanceScore@
+..include:seqan/find.h
+*/
+
+template <typename TNeedle>
+struct ScoringScheme
+{
+	typedef EditDistanceScore Type;
+};
+template <typename TNeedle>
+struct ScoringScheme<TNeedle const>:
+	ScoringScheme<TNeedle>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TSpec>
+inline Holder<TNeedle> & 
+_dataHost(Pattern<TNeedle, TSpec> & me) 
+{ 
+	return me.data_host;
+}
+template <typename TNeedle, typename TSpec>
+inline Holder<TNeedle> & 
+_dataHost(Pattern<TNeedle, TSpec> const & me) 
+{
+	return const_cast<Holder<TNeedle> &>(me.data_host);
+}
+
+//host access: see basic_host.h
+
+
+//???TODO: Diese Funktion entfernen! (sobald setHost bei anderen pattern nicht mehr eine Art "assignHost" ist)
+template <typename TNeedle, typename TSpec, typename TNeedle2>
+inline void 
+setHost(Pattern<TNeedle, TSpec> & me,
+		TNeedle2 const & ndl) 
+{
+	 me.data_host = ndl; //assign => Pattern haelt eine Kopie => doof!
+}
+template <typename TNeedle, typename TSpec, typename TNeedle2>
+inline void 
+setHost(Pattern<TNeedle, TSpec> & me,
+		TNeedle2 & ndl) 
+{ 
+	 me.data_host = ndl; //assign => Pattern haelt eine Kopie => doof!
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TSpec>
+inline typename Position<Pattern<TNeedle, TSpec> >::Type & 
+beginPosition(Pattern<TNeedle, TSpec> & me) 
+{
+	return me.data_begin_position;
+}
+template <typename TNeedle, typename TSpec>
+inline typename Position<Pattern<TNeedle, TSpec> const >::Type & 
+beginPosition(Pattern<TNeedle, TSpec> const & me) 
+{
+	return me.data_begin_position;
+}
+
+
+template <typename TNeedle, typename TSpec, typename TPosition>
+inline void
+setBeginPosition(Pattern<TNeedle, TSpec> & me, 
+				 TPosition _pos) 
+{
+	me.data_begin_position = _pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TSpec>
+inline typename Position<Pattern<TNeedle, TSpec> >::Type & 
+endPosition(Pattern<TNeedle, TSpec> & me) 
+{
+	return me.data_end_position;
+}
+template <typename TNeedle, typename TSpec>
+inline typename Position<Pattern<TNeedle, TSpec> const >::Type & 
+endPosition(Pattern<TNeedle, TSpec> const & me) 
+{
+	return me.data_end_position;
+}
+
+template <typename TNeedle, typename TSpec, typename TPosition>
+inline void
+setEndPosition(Pattern<TNeedle, TSpec> & me, 
+			   TPosition _pos) 
+{
+	me.data_end_position = _pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TSpec>
+inline typename Infix<TNeedle>::Type 
+segment(Pattern<TNeedle, TSpec> & me) 
+{
+	typedef typename Infix<TNeedle>::Type TInfix;
+	return TInfix(host(me), me.data_begin_position, me.data_end_position);
+}
+template <typename TNeedle, typename TSpec>
+inline typename Infix<TNeedle>::Type 
+segment(Pattern<TNeedle, TSpec> const & me) 
+{
+	typedef typename Infix<TNeedle>::Type TInfix;
+	return TInfix(host(me), me.data_begin_position, me.data_end_position);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.host.param.object.type:Class.Pattern
+
+template <typename TNeedle, typename TSpec>
+inline typename Host<Pattern<TNeedle, TSpec> >::Type & 
+host(Pattern<TNeedle, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+template <typename TNeedle, typename TSpec>
+inline typename Host<Pattern<TNeedle, TSpec> const>::Type & 
+host(Pattern<TNeedle, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.needle:
+..summary:Returns the needle of a @Class.Pattern@ object (not implemented for some online-algorithms).
+..cat:Searching
+..signature:needle(pattern)
+..param.pattern:The @Class.Pattern@ object to search with.
+...type:Class.Pattern
+..returns:The needle object to search for.
+..remarks:The result type is @Metafunction.Needle@$<TPattern>::Type$ for pattern of type $TPattern$.
+This is an alias to function @Function.host@ of the pattern function.
+..see:Function.host
+..include:seqan/find.h
+*/
+///.Function.host.remarks:Aliased to @Function.needle@ and @Function.haystack@ for classes @Class.Pattern@ and @Class.Finder at .
+
+
+template < typename TObject >
+inline typename Needle<TObject>::Type &
+needle(TObject &obj) 
+{
+	return obj;
+}
+
+template < typename TObject >
+inline typename Needle<TObject const>::Type &
+needle(TObject const &obj) 
+{
+	return obj;
+}
+
+
+///.Function.position.param.iterator.type:Class.Pattern
+
+template < typename TNeedle, typename TSpec >
+inline typename Needle< Pattern<TNeedle, TSpec> >::Type &
+needle(Pattern<TNeedle, TSpec> & obj) 
+{
+	return host(obj);
+}
+
+template < typename TNeedle, typename TSpec >
+inline typename Needle< Pattern<TNeedle, TSpec> const>::Type &
+needle(Pattern<TNeedle, TSpec> const & obj) 
+{
+	return host(obj);
+}
+
+/**
+.Function.setNeedle:
+..summary:Sets the needle of a @Class.Pattern@ object and optionally induces preprocessing.
+..cat:Searching
+..signature:setNeedle(pattern, needle)
+..param.pattern:The @Class.Pattern@ object to search with.
+...type:Class.Pattern
+..param.needle:The needle object to search for.
+...type:Class.String
+..include:seqan/find.h
+*/
+
+template < typename TNeedle, typename TSpec >
+inline void
+setNeedle(Pattern<TNeedle, TSpec> &obj, TNeedle const &ndl) {
+	setHost(obj, ndl);
+}
+
+
+//____________________________________________________________________________
+
+/**.Function.scoringScheme
+..cat:Searching
+..summary:The @glos:scoring scheme@ used for finding or aligning.
+..signature:scoringScheme(obj)
+..param.obj:Object that holds a @glos:scoring scheme@
+...type:Class.Pattern
+..returns:The @glos:scoring scheme@ used in $obj$
+...default:@Shortcut.EditDistanceScore@
+..see:glos:scoring scheme
+..see:Metafunction.ScoringScheme
+*/
+
+template <typename TNeedle, typename TSpec>
+inline typename ScoringScheme<Pattern<TNeedle, TSpec> >::Type 
+scoringScheme(Pattern<TNeedle, TSpec> &)
+{
+SEQAN_CHECKPOINT
+	return typename ScoringScheme<Pattern<TNeedle, TSpec> >::Type();
+}
+template <typename TNeedle, typename TSpec>
+inline typename ScoringScheme<Pattern<TNeedle, TSpec> const>::Type 
+scoringScheme(Pattern<TNeedle, TSpec> const &)
+{
+SEQAN_CHECKPOINT
+	return typename ScoringScheme<Pattern<TNeedle, TSpec> const>::Type();
+}
+
+//____________________________________________________________________________
+
+/**.Function.setScoringScheme
+..cat:Searching
+..summary:Sets the @glos:scoring scheme@ used for finding or aligning.
+..signature:setScoringScheme(obj, score)
+..param.obj:Object that holds a @glos:scoring scheme at .
+...type:Class.Pattern
+..param.score:The new @glos:scoring scheme@ used by $obj$.
+..see:glos:scoring scheme
+..see:Function.scoringScheme
+*/
+
+template <typename TNeedle, typename TSpec, typename TScore2>
+inline void
+setScoringScheme(Pattern<TNeedle, TSpec> & /*me*/, 
+				 TScore2 & /*score*/)
+{
+//dummy implementation for compatibility reasons
+}
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find/find_pex.h b/src/SeqAn-1.3/seqan/find/find_pex.h
new file mode 100644
index 0000000..5fe1993
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_pex.h
@@ -0,0 +1,726 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Stephan Aiche <aiche at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_PEX_H
+#define SEQAN_HEADER_FIND_PEX_H
+
+// uncomment this for verbose debug output
+//#define SEQAN_DEBUG_PEX
+
+namespace SEQAN_NAMESPACE_MAIN 
+{
+
+struct Hierarchical;			
+struct NonHierarchical;
+
+
+template <typename TVerification, typename TMultiFinder = WuManber>
+struct Pex;
+
+typedef Pex<Hierarchical,AhoCorasick>      PexHierarchical;
+typedef Pex<NonHierarchical,AhoCorasick>   PexNonHierarchical;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TVerification, typename TMultiFinder>
+struct FindBeginPatternSpec< Pattern<TNeedle, Pex<TVerification , TMultiFinder > > >:
+	DefaultFindBeginPatternSpec<>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.PexMultiFinder:
+..summary:Determines the multiple exact string matching algorithm used by the Pex algorithm.
+..signature:PexMultiFinder< Pattern<TNeedle,Pex<TVerification,TMultiFinder> > >::Type
+..param.TMultiFinder:The specification for the multiple exact string matching algorithm that should be used with the Pex algorithm.
+..returns.param.Type:Pattern type of the multiple exact string matching algorithm for the specified Pattern.
+..see:Spec.Pex
+..remarks: For a description of Pattern usage see @Class.Pattern at .
+..remarks: Overload this Metafunction if you want to use something else for verification then $Pattern<String<Segment<TNeedle> > , TMultiFinder>$.
+..include:seqan/find.h
+*/
+
+template<typename T>
+struct PexMultiFinder;
+
+template<typename TNeedle, typename TVerification, typename TMultiFinder>
+struct PexMultiFinder< Pattern<TNeedle, Pex<TVerification , TMultiFinder > > >
+{
+  typedef Pattern<String<Segment<TNeedle> > , TMultiFinder> Type;
+};
+ 
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TPosition,typename TScore,typename TVerifier,typename TNeedle>
+struct PexRange_{
+  TPosition start,end;
+  TScore error;
+  TVerifier verifier;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Pex:
+..summary: Provides a fast approximate string matching filter that splits the needle into several pieces that are searched with a multiple exact string matching algorithm and later verified.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, Pex<TVerification,TMultiFinder> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..param.TVerification: Determines if the hierarchical verification proposed by Navarro and Baeza-Yates is used or not.
+..param.TMultiFinder: Specifies the algorithm for the multiple exact string matching algorithm
+...type:Spec.AhoCorasick
+..remarks: There are two defaults available $PexHierarchical$ and $PexNonHierarchical$ (e.g. $Pattern<String<char> ,PexHierarchical> $) that both use the @Spec.AhoCorasick@ algorithm for the multiple exact string matching.
+..include:seqan/find.h
+*/
+///.Class.Pattern.param.TSpec.type:Spec.Pex
+
+/**
+.Spec.Hierarchical:
+..summary: By using this Specialization the hierarchical verification is enabled.
+..general:Spec.Pex
+..cat:Searching
+..signature:Pattern<TNeedle, Pex<Hierarchical,TMultiFinder> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..param.TMultiFinder: Specifies the algorithm for the multiple exact string matching algorithm
+..include:seqan/find.h
+*/
+///.Spec.Pex.param.TVerification.type:Spec.Hierarchical
+/**
+.Spec.NonHierarchical:
+..summary: By using this Specialization the hierarchical verification is disabled.
+..general:Spec.Pex
+..cat:Searching
+..signature:Pattern<TNeedle, Pex<NonHierarchical,TMultiFinder> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..param.TMultiFinder: Specifies the algorithm for the multiple exact string matching algorithm
+..include:seqan/find.h
+*/
+///.Spec.Pex.param.TVerification.type:Spec.NonHierarchical
+
+template <typename TNeedle, typename TVerification, typename TMultiFinder>
+class Pattern<TNeedle, Pex<TVerification, TMultiFinder > >:
+	public FindBegin_<Pattern<TNeedle, Pex<TVerification, TMultiFinder > > >
+{
+ public:
+   typedef typename Position<TNeedle>::Type TPosition;
+   typedef unsigned TScore;
+   typedef Pattern<TNeedle, MyersUkkonen > TVerifier;
+   typedef typename PexMultiFinder< 
+                       Pattern<TNeedle, Pex<TVerification,TMultiFinder > > 
+                                  >::Type TMFinder; 
+  
+   // the maximal accepted error
+   TScore limit;
+   // reference to the needle
+   Holder<TNeedle> data_host;
+   // pattern object for the multi pattern search
+   TMFinder multiPattern;
+   // needles for the multi pattern search
+   String<Segment<TNeedle> >  splitted_needles;
+   
+   // data store for the verification tree respectively the splitted needle
+   ::std::map<unsigned, PexRange_<TPosition,TScore,TVerifier,TNeedle> > range_table;
+   // map leafs of the tree to parts of the needle
+   ::std::map<unsigned, unsigned> leaf_map;
+
+   // store the infixes for the verifiers
+   String<Segment<TNeedle> > segment_store;
+  
+   // track position where the last occurence was found
+   unsigned lastFPos;
+   unsigned lastFNdl;
+   
+   // indicator to track if we already found an occurence
+   bool findNext,patternNeedsInit; 
+
+   unsigned needleLength;
+
+   Pattern() {}
+
+   template <typename TNeedle2>
+   Pattern(TNeedle2 const & ndl)
+     : limit(1)
+   {
+     setHost(*this, ndl);
+   }
+
+   template <typename TNeedle2>
+   Pattern(TNeedle2 const & ndl, int _limit = -1)
+     : limit(- _limit)
+   {
+SEQAN_CHECKPOINT
+     setHost(*this, ndl);
+   }
+
+   ~Pattern() {
+     SEQAN_CHECKPOINT
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2, typename TVerification, typename TMultiFinder>
+void setHost (Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me, TNeedle2 const & needle) 
+{
+  // initialisation of the find-tree etc. will be done when patternInit
+  // is called to assure that we already know the scoreLimit
+  me.data_host = needle;
+  me.needleLength = length(needle);
+  me.findNext = false;
+  me.patternNeedsInit = true;
+}
+
+template <typename TNeedle, typename TNeedle2, typename TVerification, typename TMultiFinder>
+void setHost (Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me, TNeedle2 & needle)
+{
+  setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TVerification, typename TMultiFinder>
+inline typename Host<Pattern<TNeedle, Pex<TVerification,TMultiFinder > > >::Type & 
+host(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me)
+{
+SEQAN_CHECKPOINT
+  return value(me.data_host);
+}
+
+template <typename TNeedle, typename TVerification, typename TMultiFinder>
+inline typename Host<Pattern<TNeedle, Pex<TVerification,TMultiFinder > > const>::Type & 
+host(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > const & me)
+{
+SEQAN_CHECKPOINT
+  return value(me.data_host);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TMultiFinder>
+int _getRoot(Pattern<TNeedle, Pex<NonHierarchical, TMultiFinder > > & me) 
+{
+SEQAN_CHECKPOINT
+  return length(me.splitted_needles);
+}
+
+template <typename TNeedle, typename TMultiFinder>
+int _getRoot(Pattern<TNeedle, Pex<Hierarchical, TMultiFinder > > &) 
+{
+SEQAN_CHECKPOINT
+  return 1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.getScore.param.pattern.type:Spec.Pex
+
+template <typename TNeedle, typename TVerification, typename TMultiFinder>
+int getScore(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me) 
+{
+SEQAN_CHECKPOINT
+  return getScore(me.range_table[_getRoot(me)].verifier);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.scoreLimit.param.pattern.type:Spec.Pex
+
+template <typename TNeedle, typename TVerification, typename TMultiFinder>
+inline int 
+scoreLimit(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > const & me)
+{
+SEQAN_CHECKPOINT
+  return - (int) me.limit;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.setScoreLimit.param.pattern.type:Spec.Pex
+
+template <typename TNeedle, typename TScoreValue,typename TVerification, typename TMultiFinder>
+inline void 
+setScoreLimit(Pattern<TNeedle, Pex<TVerification,TMultiFinder > > & me, 
+			  TScoreValue _limit)
+{
+SEQAN_CHECKPOINT
+  me.patternNeedsInit = true;
+  me.limit = (- _limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//   PexNonHierarchical -- functions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TFinder, typename TMultiFinder>
+void _patternInit(Pattern<TNeedle, Pex<NonHierarchical, TMultiFinder > > &me, TFinder &)
+{
+SEQAN_CHECKPOINT
+  typedef typename Position<TNeedle>::Type TPosition;
+  typedef unsigned TScore;
+  typedef Pattern<TNeedle,MyersUkkonen> TVerifier;
+
+/*
+  // split pattern
+  unsigned k = me.limit + 1;
+  unsigned seg_len = me.needleLength / k; //::std::floor(me.needleLength/k); 
+  
+  clear(me.splitted_needles);
+  clear(me.range_table);
+  clear(me.segment_store);
+  unsigned s = 0;
+  unsigned c = 0;
+  unsigned i = 0;
+  while(s < me.needleLength)
+  { 
+    PexRange_<TPosition,TScore,TVerifier,TNeedle> pr;
+    pr.start = s;
+    pr.end = (c == me.limit ? me.needleLength : s + seg_len);
+    pr.error = 0;
+
+	insert(me.range_table,i,pr);
+    appendValue(me.splitted_needles,infix(value(me.data_host),pr.start,pr.end));
+    s += (c == me.limit ? me.needleLength : seg_len);
+    ++c;
+    ++i;
+  }
+*/
+  //split pattern (improved)
+  unsigned k = me.limit + 1;
+
+  clear(me.splitted_needles);
+  clear(me.range_table);
+  clear(me.segment_store);
+  unsigned int pos = 0;
+  for (unsigned int i = 0; i < k; ++i)
+  {
+    PexRange_<TPosition,TScore,TVerifier,TNeedle> pr;
+    pr.start = pos;
+    pr.end = (pos = me.needleLength * (i + 1) / k);
+    pr.error = 0;
+
+	insert(me.range_table, i, pr);
+    appendValue(me.splitted_needles, infix(value(me.data_host), pr.start, pr.end));
+  }
+//*/
+
+  me.lastFPos = 0;
+  me.lastFNdl = 0;
+
+  // insert complete needle in range table to use the verifier
+  appendValue(me.segment_store,infix(value(me.data_host),0,me.needleLength));
+  PexRange_<TPosition,TScore,TVerifier,TNeedle> pr;
+  pr.start = 0;
+  pr.end = me.needleLength;
+  pr.error = me.limit;
+  setHost(pr.verifier,me.segment_store[0]);
+  setScoreLimit(pr.verifier, - static_cast<int>(me.limit));  
+  insert(me.range_table,length(me.splitted_needles),pr);
+  
+  // init multipattern finder
+  setHost(me.multiPattern,me.splitted_needles);
+  
+  me.patternNeedsInit = false;
+  me.findNext = false;
+  _findBeginInit(me, needle(me));
+
+#ifdef SEQAN_DEBUG_PEX
+  ::std::cout << " -------------------------------------------------  " << ::std::endl;
+  ::std::cout << "                   PATTERN INIT                     " << ::std::endl;
+  ::std::cout << "Needle:   " << value(me.data_host) << ::std::endl;
+  ::std::cout << "|Needle|: " << me.needleLength << ::std::endl;
+  ::std::cout << "seg_len:  " << me.needleLength / k << ::std::endl;
+  ::std::cout << "limit:    " << me.limit << ::std::endl;
+  ::std::cout << "k:        " << k << ::std::endl;
+  ::std::cout << "computed following needles for multipattern search: " << ::std::endl;
+  for(unsigned i = 0;i < length(me.splitted_needles);++i)  ::std::cout << me.splitted_needles[i] << ::std::endl;
+  ::std::cout << " -------------------------------------------------  " << ::std::endl;
+#endif  
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFinder, typename TNeedle, typename TMultiFinder>
+inline bool find (TFinder & finder, Pattern<TNeedle, Pex<NonHierarchical, TMultiFinder > > & me)
+{
+SEQAN_CHECKPOINT
+
+  typedef typename Host<TFinder>::Type    THost;
+  typedef Segment<THost>                  THostSegment;
+  typedef Finder<THostSegment>            THSFinder;
+  TFinder mf(finder);
+  unsigned startPos;
+
+  if (empty(finder))
+  {
+    _finderSetNonEmpty(finder);
+  }
+  if(me.patternNeedsInit)
+  {
+     _patternInit(me, finder);
+  }
+
+  if(me.findNext){
+    startPos = position(finder);
+    int start = me.lastFPos - me.range_table[me.lastFNdl].start - me.limit;
+    int end   = me.lastFPos + (me.needleLength - me.range_table[me.lastFNdl].start) + me.limit;
+    
+    // adjust start and end if they point over the edges of host(finder)
+    start = (start < 0 ? 0 : start);
+    end = (end > static_cast<int>(length(host(finder))) ? length(host(finder)) : end);
+
+    THostSegment s(infix(host(finder),start,end));
+    THSFinder f(s);
+
+    while(find(f,me.range_table[_getRoot(me)].verifier))
+    {
+      unsigned nP = start + position(f);
+      if(nP > startPos){
+	// compute new position
+	unsigned offset = nP - position(finder);
+	finder += offset;
+	me.findNext = true;
+	_setFinderEnd(finder);
+	return true;
+      }
+    }
+    // reset mf finder to old position
+    unsigned mf_offset = position(finder) - me.lastFPos;
+    mf -= mf_offset;
+  }
+  me.findNext = false;
+  startPos = position(finder);
+
+  while(find(mf,me.multiPattern))
+  {
+    int s = position(mf) - me.range_table[position(me.multiPattern)].start - me.limit;
+    int e   = position(mf) + (me.needleLength - me.range_table[position(me.multiPattern)].start) + me.limit;
+
+    // adjust start and end if they point over the edges of host(finder)
+    s = (s < 0 ? 0 : s);
+    e = (e > static_cast<int>(length(host(finder))) ? length(host(finder)) : e);
+
+    THostSegment i(infix(host(mf),s,e));
+    THSFinder f(i);
+    while(find(f,me.range_table[_getRoot(me)].verifier))
+    {
+      unsigned nP = s + position(f);
+      if(nP > startPos){
+	// compute new position
+	unsigned offset = nP - position(finder);
+	finder += offset;
+	me.lastFPos = position(mf);
+	me.lastFNdl = position(me.multiPattern);
+	me.findNext = true;	  
+	_setFinderEnd(finder);
+	return true;
+      }
+    }
+  }
+  // set finder to end position
+  unsigned t = length(host(finder))- position(finder);
+  finder += t;
+
+  return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//   PexHierarchical -- functions
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <typename TNeedle, typename TMultiFinder>
+void _createTree(Pattern<TNeedle, Pex<Hierarchical, TMultiFinder > > &me, unsigned start, unsigned end,
+		 unsigned k, unsigned parent, unsigned direction ,unsigned idx, unsigned plen)
+{
+  //create tree like proposed in Navarro & Raffinot
+  // direction == 0 .. choose left child in the tree
+  // direction == 1 .. choose right child in the tree
+
+#ifdef SEQAN_DEBUG_PEX
+  ::std::cout << "called _createTree:" << ::std::endl;
+  ::std::cout << "  start: " << start << ::std::endl;
+  ::std::cout << "  end  : " << end << ::std::endl;
+  ::std::cout << "  seq  : " << infix(value(me.data_host),start,end + 1) << ::std::endl;
+  ::std::cout << "  k    : " << k << ::std::endl;
+  ::std::cout << "  paren: " << parent << ::std::endl;
+  ::std::cout << "  direc: " << direction << ::std::endl;
+  ::std::cout << "  idx  : " << idx << ::std::endl;
+  ::std::cout << "  plen : " << plen << ::std::endl;
+  ::std::cout << " ----------------------------- " << ::std::endl;
+#endif
+  typedef typename Position<TNeedle>::Type TPosition;
+  typedef unsigned TScore;
+  typedef Pattern<TNeedle,MyersUkkonen> TVerifier; 
+
+  PexRange_<TPosition,TScore,TVerifier,TNeedle> pr;
+  pr.start = start;
+  pr.end = end;
+  pr.error = k;
+
+  appendValue(me.segment_store,infix(value(me.data_host),pr.start,pr.end + 1));
+  setScoreLimit(pr.verifier, - static_cast<int>(pr.error));
+  setHost(pr.verifier, me.segment_store[length(me.segment_store) - 1]);
+  
+  unsigned left = k/2 + 1; //::std::ceil(static_cast<double>(k + 1)/2);
+  unsigned cur_idx = (parent << 1) + direction;
+
+  // insert pr into the tree
+  insert(me.range_table,cur_idx,pr);
+  
+  if(k == 0){
+    appendValue(me.splitted_needles,infix(value(me.data_host),pr.start,pr.end + 1));
+#ifdef SEQAN_DEBUG_PEX
+    ::std::cout << "inserted : " << me.splitted_needles[length(me.splitted_needles) - 1] << " into splitted needles" << ::std::endl;
+    ::std::cout << "assign to leaf_map " << length(me.splitted_needles) - 1 << " value " << cur_idx << ::std::endl;
+    ::std::cout << " ----------------------------- " << ::std::endl;
+#endif
+    me.leaf_map[length(me.splitted_needles) - 1] = cur_idx;
+  }else{
+    // recusivly create the rest of the tree
+//    _createTree(me, start, start + left * plen - 1, ::std::floor(static_cast<double>(left * k)/ static_cast<double>(k + 1)),cur_idx,0,idx,plen);
+    _createTree(me, start, start + left * plen - 1, left * k / (k+1),cur_idx,0,idx,plen);
+//    _createTree(me,  start + left * plen, end, ::std::floor(static_cast<double>((k + 1 - left)*k)/ static_cast<double>(k + 1)),cur_idx,1,idx + left,plen);
+    _createTree(me,  start + left * plen, end, (k + 1 - left)*k / (k+1),cur_idx,1,idx + left,plen);
+  }
+}
+*/
+template <typename TNeedle, typename TMultiFinder>
+void _createTree(Pattern<TNeedle, Pex<Hierarchical, TMultiFinder > > &me, 
+				 unsigned start, unsigned end,
+				 unsigned k, 
+				 unsigned parent, 
+				 unsigned direction,
+				 unsigned idx, 
+				 unsigned plen)
+{
+  typedef typename Position<TNeedle>::Type TPosition;
+  typedef unsigned TScore;
+  typedef Pattern<TNeedle,MyersUkkonen> TVerifier; 
+
+  PexRange_<TPosition,TScore,TVerifier,TNeedle> pr;
+  pr.start = start;
+  pr.end = end;
+  pr.error = k;
+
+  appendValue(me.segment_store,infix(value(me.data_host),pr.start,pr.end + 1));
+  setScoreLimit(pr.verifier, - static_cast<int>(pr.error));
+  setHost(pr.verifier, me.segment_store[length(me.segment_store) - 1]);
+  
+  unsigned cur_idx = (parent << 1) + direction;
+
+  // insert pr into the tree
+  insert(me.range_table,cur_idx,pr);
+  
+  if(k == 0)
+  {
+    appendValue(me.splitted_needles,infix(value(me.data_host),pr.start,pr.end + 1));
+    me.leaf_map[length(me.splitted_needles) - 1] = cur_idx;
+  }
+  else
+  {
+	  unsigned int lower_2power = 1 << log2(k+1);
+	  unsigned int len = end - start+1;
+	  unsigned int right_k = lower_2power/2-1;
+	  unsigned int left_k = k - right_k-1;
+	  unsigned int left_len = len * (left_k+1) / (k+1);
+	  _createTree(me, start, start + left_len-1, left_k, cur_idx, 0, idx,plen);
+	  _createTree(me, start + left_len, end, right_k, cur_idx, 1, idx + (left_k+1),plen);
+  }
+}
+
+template <typename TNeedle, typename TFinder, typename TMultiFinder>
+void _patternInit(Pattern<TNeedle, Pex<Hierarchical, TMultiFinder > > &me, TFinder &)
+{
+SEQAN_CHECKPOINT
+  typedef typename Position<TNeedle>::Type TPosition;
+  typedef unsigned TScore;
+  typedef Pattern<TNeedle,MyersUkkonen> TVerifier;
+
+  unsigned k = me.limit + 1;
+  unsigned plen = me.needleLength / k; //::std::floor(static_cast<double>(me.needleLength)/static_cast<double>(k));
+  
+  // reset
+  clear(me.splitted_needles);
+  clear(me.range_table);
+  clear(me.leaf_map);
+  clear(me.segment_store);
+
+  // build the verification tree
+  _createTree(me, 0, me.needleLength - 1,me.limit, 0, 1 , 0, plen);
+
+  me.lastFPos = 0;
+  me.lastFNdl = 0;
+  setHost(me.multiPattern, me.splitted_needles);
+  me.patternNeedsInit = false;
+  me.findNext = false;
+
+  _findBeginInit(me, needle(me));
+
+#ifdef SEQAN_DEBUG_PEX
+  ::std::cout << " -------------------------------------------------  " << ::std::endl;
+  ::std::cout << "                   PATTERN INIT                     " << ::std::endl;
+  ::std::cout << "Needle:   " << value(me.data_host) << ::std::endl;
+  ::std::cout << "|Needle|: " << me.needleLength << ::std::endl;
+  ::std::cout << "limit:    " << me.limit << ::std::endl;
+  ::std::cout << "k:        " << k << ::std::endl;
+  ::std::cout << "computed following needles for multipattern search: " << ::std::endl;
+  for(unsigned i = 0;i < length(me.splitted_needles);++i)  ::std::cout << me.splitted_needles[i] << ::std::endl;
+  ::std::cout << " -------------------------------------------------  " << ::std::endl;
+#endif  
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFinder, typename TNeedle, typename TMultiFinder>
+inline bool find (TFinder & finder, Pattern<TNeedle, Pex<Hierarchical, TMultiFinder > > & me)
+{
+SEQAN_CHECKPOINT
+
+  typedef typename Host<TFinder>::Type    THost;
+  typedef Segment<THost>                  THostSegment;
+  typedef Finder<THostSegment>            THSFinder;
+  TFinder mf(finder);
+  unsigned startPos;
+
+  if (empty(finder))
+  {
+    _finderSetNonEmpty(finder);
+  }
+  if(me.patternNeedsInit)
+  {
+     _patternInit(me, finder);
+  }
+  if(me.findNext){
+    // we found an occurence
+    startPos = position(finder);
+    unsigned pnode = _getRoot(me); // use root 
+    unsigned in = me.range_table[me.leaf_map[me.lastFNdl]].start;
+    
+    int p1 = me.lastFPos - (in - me.range_table[pnode].start) - me.range_table[pnode].error;
+    int p2 = me.lastFPos + (me.range_table[pnode].end - in + 1) + me.range_table[pnode].error;
+
+    // adjust start and end if they point over the edges of host(finder)
+    p1 = (p1 < 0 ? 0 : p1);
+    p2 = (p2 > static_cast<int>(length(host(finder))) ? length(host(finder)) : p2);
+    THostSegment i(infix(host(mf),p1,p2));
+    THSFinder f(i);
+
+    while(find(f,me.range_table[pnode].verifier))
+    {
+      unsigned nP = p1 + position(f);
+      if(nP > startPos)
+	{
+	  // compute new position
+	  unsigned offset = nP - position(finder);
+	  finder += offset;
+	  me.findNext = true;
+	  _setFinderEnd(finder);
+	  return true;
+	}      
+    }
+    // reset mf finder to old position
+    unsigned mf_offset = position(finder) - me.lastFPos;
+    mf -= mf_offset;
+  }
+  me.findNext = false;
+  startPos = position(finder);
+
+  while(find(mf,me.multiPattern))
+  {
+    // get found leaf
+    unsigned node = me.leaf_map[position(me.multiPattern)];
+    unsigned in = me.range_table[node].start;
+    node = node >> 1;
+    bool cand = true;
+
+    while( cand && node != 1) // stop when reaching root
+    {
+      int p1 = position(mf) - (in - me.range_table[node].start) - me.range_table[node].error;
+      int p2 = position(mf) + (me.range_table[node].end - in + 1) + me.range_table[node].error;
+
+      // adjust start and end if they point over the edges of host(finder)
+      p1 = (p1 < 0 ? 0 : p1);
+      p2 = (p2 > static_cast<int>(length(host(finder))) ? length(host(finder)) : p2);
+      THostSegment i(infix(host(mf),p1,p2));
+      THSFinder f(i);
+      cand = find(f,me.range_table[node].verifier);
+      node = node >> 1;
+    }
+    // if we verfied till here .. verify the complete pattern
+    if(cand){
+      // we found an occurence
+      node = _getRoot(me); // use root 
+      int p1 = position(mf) - (in - me.range_table[node].start) - me.range_table[node].error;
+      int p2 = position(mf) + (me.range_table[node].end - in + 1) + me.range_table[node].error;
+
+      // adjust start and end if they point over the edges of host(finder)
+      p1 = (p1 < 0 ? 0 : p1);
+      p2 = (p2 > static_cast<int>(length(host(finder))) ? length(host(finder)) : p2);
+      THostSegment i(infix(host(mf),p1,p2));
+      THSFinder f(i);
+      while(find(f,me.range_table[node].verifier))
+      {
+	unsigned nP = p1 + position(f);
+	if(nP > startPos)
+	{
+	  // compute new position
+	  unsigned offset = nP - position(finder);
+	  finder += offset;
+	  me.lastFPos = position(mf);
+	  me.lastFNdl = position(me.multiPattern);
+	  me.findNext = true;
+	  _setFinderEnd(finder);
+	  return true;
+	}      
+      }
+    }
+  }
+  // nothing more to find -> set finder to end position
+  unsigned t = length(host(finder))- position(finder);
+  finder += t;
+
+  return false;
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_..
+
diff --git a/src/SeqAn-1.3/seqan/find/find_score.h b/src/SeqAn-1.3/seqan/find/find_score.h
new file mode 100644
index 0000000..76bbcca
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_score.h
@@ -0,0 +1,500 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_SCORE_H
+#define SEQAN_HEADER_FIND_SCORE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// DPSearch
+//////////////////////////////////////////////////////////////////////////////
+
+//template <typename TScore, typename TSpec = FindInfix, typename TFindBeginPatternSpec = DPSearch<TScore, FindPrefix, void> >
+template <typename TScore, typename TSpec = FindInfix, typename TFindBeginPatternSpec = typename DefaultFindBeginPatternSpec<TScore>::Type>
+struct DPSearch;
+
+/**
+.Spec.DPSearch:
+..cat:Searching
+..general:Class.Pattern
+..summary:A dynamic programming algorithm for approximate string-matching with a user-definable scoring function.
+..signature:Pattern<TNeedle, DPSearch<TScore [, TSpec [, TFindBeginPatternSpec] ]> >
+..param.TNeedle:The needle type.
+...type:Class.String
+..param.TScore:The scoring function.
+...type:Class.Score
+..remarks.text:The algorithm is based on the Sellers/Needleman-Wunsch dynamic progamming algorithm. 
+The $Pattern$ object only contains the right-most column of the dynamic programming matrix.
+...note:At the moment, the algorithm only works on linear gap costs.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Class.Score
+
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+class Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> >:
+	public FindBegin_<Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > >
+{
+public:
+	typedef typename Value<TScore>::Type TScoreValue;
+
+	Holder<TNeedle>		data_host;
+	TScore				data_score;
+	TScoreValue			data_limit;
+	String<TScoreValue>	data_tab;
+	TScoreValue			data_maxscore;  //score of the needle matching itself (needed for banding FindPrefix)
+
+public: 
+	Pattern(): 
+		data_limit(0)
+	{ 
+SEQAN_CHECKPOINT
+	}
+
+	Pattern(TNeedle & _needle, 
+			TScore const & _score_func, 
+			TScoreValue _limit = 0): 
+		data_score(_score_func),
+		data_limit(_limit)
+	{ 
+SEQAN_CHECKPOINT
+		setHost(*this, _needle);
+	}
+
+	Pattern(TNeedle & _needle,
+			TScoreValue _limit = 0): 
+		data_limit(_limit)
+	{ 
+SEQAN_CHECKPOINT
+		setHost(*this, _needle);
+	}
+
+	Pattern(TScoreValue _limit): 
+		data_limit(_limit)
+	{ 
+SEQAN_CHECKPOINT
+		create(data_score);
+	}
+
+	Pattern(Pattern const & other): 
+		data_host( other.data_host ),
+		data_score( other.data_score ), 
+		data_limit( other.data_limit ),
+		data_tab( other.data_tab ),
+		data_maxscore( other.data_maxscore)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	inline Pattern & 
+	operator = (Pattern const & other) 
+	{ 
+SEQAN_CHECKPOINT
+		this->data_host = other.data_host;
+		this->data_score = other.data_score;
+		this->data_limit = other.data_limit;
+		this->data_tab = other.data_tab;
+		this->data_maxscore = other.data_maxscore;
+
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+struct ScoringScheme <Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > >
+{
+	typedef TScore Type;
+};
+
+
+//DEPRECATED
+//.Metafunction.ScoreValue.param.T.type:Spec.DPSearch
+//template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+//class ScoreValue <Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > >:
+//	Value<TScore>
+//{
+//};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+struct FindBeginPatternSpec <Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > > 
+{
+	typedef TFindBeginPatternSpec Type;
+};
+template <typename TNeedle, typename TScore, typename TFindBeginPatternSpec>
+struct FindBeginPatternSpec <Pattern<TNeedle, DPSearch<TScore, FindPrefix, TFindBeginPatternSpec> > >
+{// no find begin for FindPrefix
+	typedef void Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+inline typename Host<Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > >::Type & 
+host(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+inline typename Host<Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > const>::Type & 
+host(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> >  const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+
+//____________________________________________________________________________
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TNeedle2>
+void 
+setHost(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, 
+		TNeedle2 & ndl)
+{
+	me.data_host = ndl;
+	clear(me.data_tab);
+}
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TNeedle2>
+void 
+setHost(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, 
+		TNeedle2 const & ndl)
+{
+	me.data_host = ndl;
+	clear(me.data_tab);
+}
+
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+inline TScore const & 
+scoringScheme(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_score;
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TScore2>
+inline void
+setScoringScheme(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, 
+				 TScore2 & score)
+{
+SEQAN_CHECKPOINT
+	me.data_score = score;
+	clear(me.data_tab);
+}
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TScore2>
+inline void
+setScoringScheme(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, 
+				 TScore2 const & score)
+{
+SEQAN_CHECKPOINT
+	me.data_score = score;
+	clear(me.data_tab);
+}
+
+//____________________________________________________________________________
+
+
+/**.Function.scoreLimit
+..cat:Searching
+..summary:The minimal score a match must reach in approximate searching.
+..signature:scoreLimit(pattern)
+..param.pattern:A @Concept.Pattern|pattern@ that can be used for approximate searching.
+...type:Spec.DPSearch
+..returns:The current score limit of $pattern$.
+*/
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+inline typename Value<TScore>::Type 
+scoreLimit(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_limit;
+}
+
+//____________________________________________________________________________
+
+/**.Function.setScoreLimit
+..cat:Searching
+..summary:Sets the minimal score a match must reach in approximate searching.
+..signature:setScoreLimit(pattern, limit)
+..param.pattern:A @Concept.Pattern|pattern@ that can be used for approximate searching.
+...type:Spec.DPSearch
+..param.limit:The new score limit.
+..see:Function.scoreLimit
+*/
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec, typename TScoreValue>
+inline void 
+setScoreLimit(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me, 
+			  TScoreValue _limit)
+{
+SEQAN_CHECKPOINT
+	me.data_limit = _limit;
+}
+
+//____________________________________________________________________________
+// returns the score of the last hit position found (note:position = end of occurrence in haystack)
+
+/**.Function.getScore
+..cat:Searching
+..summary:Score of the last found match in approximate searching.
+..signature:getScore(pattern)
+..param.pattern:A @Concept.Pattern|pattern@ that can be used for approximate searching.
+...type:Spec.DPSearch
+..returns:The score of the last match found using $pattern$.
+...remarks:If no match was found, the value is undefined.
+..see:Function.scoreLimit
+..see:Function.setScoreLimit
+..see:Function.find
+*/
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+inline typename Value<TScore>::Type
+getScore(Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me)
+{
+	return front(me.data_tab);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+inline void _patternInit (Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me) 
+{
+	typedef Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > TPattern;
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TPattern>::Type TSize;
+	typedef String<TScoreValue> TTab;
+	typedef typename Iterator<TTab, Standard>::Type TIterator;
+	typedef typename Iterator<TNeedle, Standard>::Type TNeedleIterator;
+
+	TScore const & scoring = scoringScheme(me);
+	TScoreValue score_gap = scoreGapExtend(scoring);
+
+	TTab & string_tab = me.data_tab;
+
+	//allocate enough memory for one column of DP matrix
+
+	TSize need_length = length(needle(me));
+	SEQAN_ASSERT(need_length);
+
+	resize(string_tab, need_length);
+	SEQAN_ASSERT(length(string_tab) >= need_length);
+
+//	if (length(_dataNeedle(me)) < got_length) throw(0); //???TODO: Throw "not enough memory" exception
+
+	//init matrix
+	//note: The column is stored in reverse order
+	TIterator tab_end = begin(string_tab, Standard());
+	TIterator tab = end(string_tab, Standard());
+	
+	TScoreValue x = score_gap;
+
+	while (tab > tab_end)
+	{
+		--tab;
+		*tab = x;
+		x += score_gap;
+	}
+
+	if (IsSameType<TSpec, FindPrefix>::VALUE)
+	{//compute data_maxscore
+		me.data_maxscore = 0;
+		TNeedleIterator it = begin(needle(me), Standard());
+		TNeedleIterator it_end = end(needle(me), Standard());
+		for (; it != it_end; ++it)
+		{
+			me.data_maxscore += score(scoring, *it, *it);
+		}
+
+	}
+
+	_findBeginInit(me, needle(me));
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// find, findNext
+//////////////////////////////////////////////////////////////////////////////
+
+//proportional gap cost: Needleman-Wunsch 
+
+//???TODO: Ukkonen trick?
+//???TODO: Finder for affine gap costs?
+
+template <typename TFinder, typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+bool 
+_findScoreSimpleProportional(TFinder & finder, Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me)
+{
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef String<TScoreValue> TTab;
+	typedef typename Iterator<TTab, Standard>::Type TTabIterator;
+	typedef typename Iterator<TNeedle const, Standard>::Type TNeedleIterator;
+	typedef typename Value<typename Haystack<TFinder>::Type>::Type THaystackValue;
+	typedef typename Haystack<TFinder>::Type THaystack;
+	typedef typename Size<THaystack>::Type TSize;
+
+	String<TScoreValue> & string_tab = me.data_tab;
+	TScore const & scoring = scoringScheme(me);
+
+	TScoreValue score_gap = scoreGapExtend(scoring);
+//	TScoreValue score_match = scoreMatch(scoringScheme(me));
+//	TScoreValue score_mismatch = scoreMismatch(scoringScheme(me));
+
+	TSize prefix_begin_position;	
+
+	if (empty(finder))
+	{
+		clear(me.data_tab);
+		_patternInit(me);
+		_finderSetNonEmpty(finder);
+		prefix_begin_position = position(finder);
+	}
+	else
+	{
+		goNext(finder);
+		prefix_begin_position = beginPosition(finder);
+	}
+
+	
+	TSize haystack_length = length(container(hostIterator(finder)));
+
+	//limit search width for prefix search
+	if (IsSameType<TSpec, FindPrefix>::VALUE && (score_gap < 0))
+	{
+		TSize maxlen = prefix_begin_position + length(needle(me)) + ((scoreLimit(me) - me.data_maxscore) / score_gap) + 1;
+		if (haystack_length > maxlen)
+		{
+			haystack_length = maxlen;
+		}
+	}
+
+	//start searching
+
+	TTabIterator tab_begin = end(string_tab, Standard());
+
+	TNeedle const & ndl = needle(me);
+	TNeedleIterator it_begin = begin(ndl, Standard());
+	TNeedleIterator it_end = end(ndl, Standard());
+
+	//for each character in haystack, do...
+	for (; position(finder) < haystack_length; ++finder)
+	{
+		//get character
+		THaystackValue c = *finder;
+
+		//init some variables
+		TNeedleIterator it = it_begin;
+		TScoreValue * tab = tab_begin;
+		TScoreValue h = (IsSameType<TSpec, FindPrefix>::VALUE) ? score_gap * (position(finder)-prefix_begin_position) : 0;
+		TScoreValue v = (IsSameType<TSpec, FindPrefix>::VALUE) ? h + score_gap : 0;
+
+		//fill the column
+		while (it < it_end)
+		{
+			--tab; //note: the column is stored in "reverse order"
+
+//			TScoreValue m2 = (c == *it) ? h + score_match : h + score_mismatch;
+//char d = *it;
+			TScoreValue m2 = h + score(scoring, c, *it);
+			h = *tab;
+			TScoreValue m1 = (h > v) ? h + score_gap : v + score_gap;
+
+			v = (m1 > m2) ? m1 : m2;
+			*tab = v;
+
+			++it;
+		}
+
+		if (*tab >= scoreLimit(me) )
+		{//found a hit
+			_setFinderEnd(finder);
+			if (IsSameType<TSpec, FindPrefix>::VALUE)
+			{
+				_setFinderLength(finder, endPosition(finder));
+			}
+			return true;
+		}
+
+	}
+
+	//found nothing
+	return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFinder, typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+inline bool 
+find(TFinder & finder, 
+	 Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me)
+{
+	SEQAN_ASSERT(scoreGapOpen(scoringScheme(me)) == scoreGapExtend(scoringScheme(me))) //this finder is only defined for linear gap costs
+	return _findScoreSimpleProportional(finder, me);
+}
+
+template <typename TFinder, typename TNeedle, typename TScore, typename TSpec, typename TFindBeginPatternSpec>
+inline bool 
+find(TFinder & finder, 
+	 Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPatternSpec> > & me,
+	 int const limit_)
+{
+	SEQAN_ASSERT(scoreGapOpen(scoringScheme(me)) == scoreGapExtend(scoringScheme(me))) //this finder is only defined for linear gap costs
+	setScoreLimit(me, limit_);
+	return _findScoreSimpleProportional(finder, me);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find/find_set_horspool.h b/src/SeqAn-1.3/seqan/find/find_set_horspool.h
new file mode 100644
index 0000000..325d06f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_set_horspool.h
@@ -0,0 +1,301 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Tobias Rausch <rausch at embl.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_SETHORSPOOL_H
+#define SEQAN_HEADER_FIND_SETHORSPOOL_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Set Horspool Algorithm
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.SetHorspool:
+..summary: Multiple exact string matching using set horspool algorithm.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, SetHorspool>
+..param.TNeedle:The needle type, a string of keywords.
+...type:Class.String
+..remarks.text:The types of all keywords in the needle and the haystack have to match.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.SetHorspool
+
+struct SetHorspool_;
+typedef Tag<SetHorspool_> SetHorspool;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, SetHorspool> {
+//____________________________________________________________________________
+private:
+	Pattern(Pattern const& other);
+	Pattern const& operator=(Pattern const & other);
+
+//____________________________________________________________________________
+public:
+	typedef typename Size<TNeedle>::Type TSize;
+	typedef typename Value<TNeedle>::Type TValue;
+	typedef typename Value<TValue>::Type TAlphabet;
+	typedef Graph<Automaton<TAlphabet> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	
+	Holder<TNeedle> data_host;
+	Graph<Automaton<TAlphabet> > data_reverseTrie;  // Search trie
+	String<String<TSize> > data_terminalStateMap;
+	String<TSize> data_dMap;	// Jump table
+	TSize data_lmin;
+	String<TSize> data_endPositions;	// All remaining keyword indices
+	TSize data_keywordIndex;			// Current keyword that produced a hit
+	TSize data_needleLength;			// Last length of needle to reposition finder
+	TVertexDescriptor data_lastState;   // Last state in the trie
+
+//____________________________________________________________________________
+
+	Pattern() {
+	}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		setHost(*this, ndl);
+	}
+
+	~Pattern() {
+		SEQAN_CHECKPOINT
+	}		
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Host Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, SetHorspool> >
+{
+	typedef TNeedle Type;
+};
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, SetHorspool> const>
+{
+	typedef TNeedle const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, SetHorspool> & me, TNeedle2 const & needle) {
+	SEQAN_CHECKPOINT
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Size<TKeyword>::Type TSize;
+	typedef typename Value<TKeyword>::Type TAlphabet;
+
+	// clean-up
+	clear(me.data_reverseTrie);
+	clear(me.data_terminalStateMap);
+	clear(me.data_endPositions);
+	clear(me.data_dMap);
+	me.data_lmin=0;
+
+	// Create Trie
+	createTrieOnReverse(me.data_reverseTrie,me.data_terminalStateMap,needle);
+	assignRoot(me.data_reverseTrie,0);
+	setValue(me.data_host, needle);
+
+	// Create jump map
+	TSize alphabet_size = ValueSize<TAlphabet>::VALUE;
+	resize(me.data_dMap, alphabet_size);
+	me.data_lmin = _getInfinity<TSize>();
+	typename Iterator<TNeedle2 const, Rooted>::Type it = begin(needle);
+	for(;!atEnd(it);goNext(it)) {
+		TSize tmp = length(*it);
+		if (tmp<me.data_lmin) me.data_lmin = tmp;
+	}
+	for(TSize i=0;i<alphabet_size;++i) {
+		me.data_dMap[i]=me.data_lmin;
+	}
+	goBegin(it);
+	for(;!atEnd(it);goNext(it)) {
+		for(TSize pos = 0;pos < length(*it) - 1; ++pos) {
+			TSize ind = ordValue((TAlphabet)(*it)[pos]);	
+			if ((length(*it)- 1 - pos) < me.data_dMap[ind]) {
+				me.data_dMap[ind] = (length(*it) - 1 - pos);
+			}
+		}
+	}
+
+	/*
+	fstream strm;
+	strm.open(TEST_PATH "my_trie.dot", ios_base::out | ios_base::trunc);
+	String<String<char> > nodeMap;
+	_createTrieNodeNames(me.data_reverseTrie, me.data_terminalStateMap, nodeMap);
+	String<String<char> > edgeMap;
+	_createEdgeNames(me.data_reverseTrie,edgeMap);
+	write(strm,me.data_reverseTrie,nodeMap,edgeMap,DotDrawing());
+	strm.close();
+	*/
+}
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, SetHorspool> & me, TNeedle2 & needle)
+{
+	setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline void _patternInit (Pattern<TNeedle, SetHorspool> & me) 
+{
+SEQAN_CHECKPOINT
+	clear(me.data_endPositions);
+	me.data_keywordIndex = 0;
+	me.data_lastState = getRoot(me.data_reverseTrie);
+}
+
+
+//____________________________________________________________________________
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, SetHorspool>const>::Type & 
+host(Pattern<TNeedle, SetHorspool> & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, SetHorspool>const>::Type & 
+host(Pattern<TNeedle, SetHorspool> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline typename Size<TNeedle>::Type
+position(Pattern<TNeedle, SetHorspool> & me)
+{
+	return me.data_keywordIndex;
+}
+
+
+template <typename TFinder, typename TNeedle>
+inline bool find(TFinder & finder, Pattern<TNeedle, SetHorspool> & me) {
+	SEQAN_CHECKPOINT
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Size<TKeyword>::Type TSize;
+	typedef typename Value<TKeyword>::Type TAlphabet;
+	typedef Graph<Automaton<TAlphabet> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+
+	TVertexDescriptor current = getRoot(me.data_reverseTrie); 
+
+	// Process left-over hits
+	if ((!empty(finder)) &&
+		(!empty(me.data_endPositions))) {
+		finder += me.data_needleLength;
+		current = me.data_lastState;
+		me.data_keywordIndex = me.data_endPositions[length(me.data_endPositions)-1];
+		me.data_needleLength = length(getValue(host(me), me.data_keywordIndex))-1;
+		if (length(me.data_endPositions) > 1) resize(me.data_endPositions, (length(me.data_endPositions)-1));
+		else clear(me.data_endPositions);
+		me.data_lastState = current;
+		finder -= me.data_needleLength;
+		return true;
+	}
+
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	TSize j = 0;
+	if (empty(finder)) {
+		_patternInit(me);
+		_finderSetNonEmpty(finder);
+		finder += me.data_lmin - 1;
+	} else {
+		finder += me.data_needleLength;
+		j = me.data_needleLength + 1;
+		current = me.data_lastState;
+	}
+
+	TSize haystackLength = length(container(finder));
+	bool oldMatch = true;
+	// Do not change to !atEnd(finder) because of jump map!
+	while(position(finder) < haystackLength) {
+		while ((position(finder)>=j) && 
+				(getSuccessor(me.data_reverseTrie, current, *(finder-j))!= nilVal))
+		{
+			me.data_endPositions = getProperty(me.data_terminalStateMap,current);
+			if ((!oldMatch) && (!empty(me.data_endPositions))) break;
+			current = getSuccessor(me.data_reverseTrie, current, *(finder-j));
+			if (current == nilVal) break;
+			++j;
+			oldMatch = false;
+		}
+		me.data_endPositions = getProperty(me.data_terminalStateMap,current);
+		if ((!oldMatch) &&
+			(!empty(me.data_endPositions)))
+		{
+			me.data_keywordIndex = me.data_endPositions[length(me.data_endPositions)-1];
+			me.data_needleLength = length(getValue(host(me), me.data_keywordIndex))-1;
+			if (length(me.data_endPositions) > 1) resize(me.data_endPositions, length(me.data_endPositions)-1);
+			else clear(me.data_endPositions);
+			me.data_lastState = current;
+			finder -= me.data_needleLength;
+			return true;
+		}
+		oldMatch = false;
+		TSize ind = ordValue(*finder);
+		setPosition(finder, position(finder) + getValue(me.data_dMap, ind));
+		j = 0;
+		current = getRoot(me.data_reverseTrie);
+	}
+	return false;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_SETHORSPOOL_H
diff --git a/src/SeqAn-1.3/seqan/find/find_shiftand.h b/src/SeqAn-1.3/seqan/find/find_shiftand.h
new file mode 100644
index 0000000..c00d089
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_shiftand.h
@@ -0,0 +1,297 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_SHIFTAND_H
+#define SEQAN_HEADER_FIND_SHIFTAND_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// ShiftAnd
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.ShiftAnd:
+..summary: Exact string matching using bit parallelism. The Shift-And algorithm is applicable to search small patterns in texts using a small alphabet.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, ShiftAnd>
+..param.TNeedle:The needle type.
+...type:Class.String
+..remarks.text:The types of the needle and the haystack have to match.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.ShiftAnd
+
+struct ShiftAnd_;
+typedef Tag<ShiftAnd_> ShiftAnd;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, ShiftAnd> {
+//____________________________________________________________________________
+public:
+	typedef unsigned int TWord;
+	enum { MACHINE_WORD_SIZE = sizeof(TWord) * 8 };
+
+//	Holder<TNeedle> data_host;
+	String<TWord> bitMasks;			// Look up table for each character in the alphabet (called B in "Navarro")
+	String<TWord> prefSufMatch;		// Set of all the prefixes of needle that match a suffix of haystack (called D in "Navarro")
+	TWord needleLength;				// e.g., needleLength=33 --> blockCount=2 (iff w=32 bits)
+	TWord blockCount;				// #unsigned ints required to store needle	
+
+//____________________________________________________________________________
+
+	Pattern() {}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		setHost(*this, ndl);
+	}
+
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2>
+inline void
+setHost(Pattern<TNeedle, ShiftAnd> & me, TNeedle2 const & needle) 
+{
+	SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+	typedef typename Value<TNeedle>::Type TValue;
+	
+	me.needleLength = length(needle);
+	if (me.needleLength < 1)
+		me.blockCount = 1;
+	else
+		me.blockCount = (me.needleLength - 1) / BitsPerValue<TWord>::VALUE + 1;
+	
+	clear(me.bitMasks);
+	resize(me.bitMasks, me.blockCount * ValueSize<TValue>::VALUE, 0, Exact());
+
+	for (TWord j = 0; j < me.needleLength; ++j)
+		me.bitMasks[
+			me.blockCount * ordValue(convert<TValue>(getValue(needle, j)))
+			+ j / me.MACHINE_WORD_SIZE
+		] |= (TWord)1 << (j % me.MACHINE_WORD_SIZE);
+
+//	setValue(me.data_host, needle);
+
+	/*
+	// Debug code
+	std::cout << "Alphabet size: " << ValueSize<TValue>::VALUE << ::std::endl;
+	std::cout << "Needle length: " << me.needleLength << ::std::endl;
+	std::cout << "Block count: " << me.blockCount << ::std::endl;
+
+	for(unsigned int i=0;i<ValueSize<TValue>::VALUE;++i) {
+		if ((i<97) || (i>122)) continue;
+		std::cout << static_cast<char>(i) << ": ";
+		for(int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+				std::cout << ((me.bitMasks[me.blockCount*i+j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+	}
+	*/
+}
+
+template <typename TNeedle, typename TNeedle2>
+inline void 
+setHost(Pattern<TNeedle, ShiftAnd> & me, TNeedle2 & needle)
+{
+	setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//____________________________________________________________________________
+
+template <typename TNeedle>
+inline TNeedle
+host(Pattern<TNeedle, ShiftAnd> const & pattern)
+{
+SEQAN_CHECKPOINT
+
+	typedef typename Pattern<TNeedle, ShiftAnd>::TWord TWord;
+	typedef typename Value<TNeedle>::Type TValue;
+
+	TNeedle temp;
+	resize(temp, pattern.needleLength, Exact());
+
+	TValue v = TValue();
+	for (unsigned i = 0; i < length(pattern.bitMasks); i += pattern.blockCount)
+	{
+		for (unsigned j = 0; j < pattern.needleLength; j++)
+			if ((pattern.bitMasks[i + j / pattern.MACHINE_WORD_SIZE] & (TWord)1 << (j % pattern.MACHINE_WORD_SIZE)) != (TWord)0)
+				temp[j] = v;
+		++v;
+	}
+	return temp;
+}
+
+template <typename TNeedle>
+inline TNeedle
+host(Pattern<TNeedle, ShiftAnd> & pattern)
+{
+SEQAN_CHECKPOINT
+	return host(const_cast<Pattern<TNeedle, ShiftAnd> const &>(pattern));
+}
+
+//____________________________________________________________________________
+
+template <typename TNeedle>
+inline TNeedle
+needle(Pattern<TNeedle, ShiftAnd> const & pattern)
+{
+SEQAN_CHECKPOINT
+	return host(pattern);
+}
+
+template <typename TNeedle>
+inline TNeedle
+needle(Pattern<TNeedle, ShiftAnd> & pattern)
+{
+SEQAN_CHECKPOINT
+	return host(const_cast<Pattern<TNeedle, ShiftAnd> const &>(pattern));
+}
+
+//____________________________________________________________________________
+
+template <typename TNeedle>
+inline void 
+_patternInit (Pattern<TNeedle, ShiftAnd> & me) 
+{
+SEQAN_CHECKPOINT
+	clear(me.prefSufMatch);
+	resize(me.prefSufMatch, me.blockCount, 0, Exact());
+}
+
+//____________________________________________________________________________
+
+template <typename TFinder, typename TNeedle>
+inline bool 
+_findShiftAndSmallNeedle(TFinder & finder, Pattern<TNeedle, ShiftAnd> & me) 
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TNeedle>::Type TValue;
+	typedef unsigned int TWord;
+	TWord compare = (TWord)1 << (me.needleLength - 1);
+	while (!atEnd(finder)) 
+	{
+		TWord pos = ordValue(convert<TValue>(getValue(finder)));
+		me.prefSufMatch[0] = ((me.prefSufMatch[0] << 1) | (TWord)1) & me.bitMasks[pos];
+		if ((me.prefSufMatch[0] & compare) != 0) 
+		{
+			_setFinderEnd(finder);
+			finder -= me.needleLength - 1;
+			return true; 
+		}
+		goNext(finder);
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool 
+_findShiftAndLargeNeedle(TFinder & finder, Pattern<TNeedle, ShiftAnd> & me) 
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TNeedle>::Type TValue;
+	typedef unsigned int TWord;
+	
+	TWord compare = (TWord)1 << ((me.needleLength - 1) % BitsPerValue<TWord>::VALUE);
+	while (!atEnd(finder)) 
+	{
+		TWord pos = ordValue(convert<TValue>(getValue(finder)));
+		TWord carry = 1;
+		for(TWord block = 0; block < me.blockCount; ++block)
+		{
+			bool newCarry = (me.prefSufMatch[block] & ((TWord)1<< (BitsPerValue<TWord>::VALUE - 1))) != 0; 
+			me.prefSufMatch[block] <<= 1;
+			me.prefSufMatch[block] |= carry;
+			carry = newCarry;
+		}
+		for(TWord block = 0; block < me.blockCount; ++block)
+			me.prefSufMatch[block] &= me.bitMasks[me.blockCount * pos + block];
+		if ((me.prefSufMatch[me.blockCount-1] & compare) != 0) 
+		{
+			_setFinderEnd(finder);
+			finder -= me.needleLength - 1;
+			return true; 
+		}
+
+		/*
+		// Debug code
+		std::cout << "   ";
+		for(int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+				std::cout << ((me.prefSufMatch[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+		*/
+		goNext(finder);
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool find(TFinder & finder, Pattern<TNeedle, ShiftAnd> & me) {
+	SEQAN_CHECKPOINT
+
+	if (empty(finder)) {
+		_patternInit(me);
+		_setFinderLength(finder, me.needleLength);
+		_finderSetNonEmpty(finder);
+	} else
+		finder += me.needleLength;
+
+	// Fast algorithm for needles < machine word?
+	if (me.blockCount == 1)
+		return _findShiftAndSmallNeedle(finder, me);
+	else
+		return _findShiftAndLargeNeedle(finder, me);
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_SHIFTAND_H
diff --git a/src/SeqAn-1.3/seqan/find/find_shiftor.h b/src/SeqAn-1.3/seqan/find/find_shiftor.h
new file mode 100644
index 0000000..0c4858b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_shiftor.h
@@ -0,0 +1,332 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_SHIFTOR_H
+#define SEQAN_HEADER_FIND_SHIFTOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// ShiftOr
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.ShiftOr:
+..summary: Exact string matching using bit parallelism. The Shift-Or algorithm is applicable to search small patterns in texts using a small alphabet.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, ShiftOr>
+..param.TNeedle:The needle type.
+...type:Class.String
+..remarks.text:The types of the needle and the haystack have to match.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.ShiftOr
+
+struct ShiftOr_;
+typedef Tag<ShiftOr_> ShiftOr;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, ShiftOr> {
+//____________________________________________________________________________
+public:
+	typedef unsigned int TWord;
+	enum { MACHINE_WORD_SIZE = sizeof(TWord) * 8 };
+
+//	Holder<TNeedle> data_host;
+	String<TWord> bitMasks;			// Look up table for each character in the alphabet (called B in "Navarro")
+	String<TWord> prefSufMatch;		// Set of all the prefixes of needle that match a suffix of haystack (called D in "Navarro")
+	TWord needleLength;				// e.g., needleLength=33 --> blockCount=2 (iff w=32 bits)
+	TWord blockCount;				// #unsigned ints required to store needle	
+
+//____________________________________________________________________________
+
+	Pattern() {}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		setHost(*this, ndl);
+	}
+
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2>
+inline void 
+setHost(Pattern<TNeedle, ShiftOr> & me, TNeedle2 const & needle) 
+{
+	SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+	typedef typename Value<TNeedle>::Type TValue;
+	
+	me.needleLength = length(needle);
+	if (me.needleLength < 1)
+		me.blockCount = 1;
+	else
+		me.blockCount = (me.needleLength - 1) / BitsPerValue<TWord>::VALUE + 1;
+	
+	clear(me.bitMasks);
+	resize(me.bitMasks, me.blockCount * ValueSize<TValue>::VALUE, (TWord)~0, Exact());
+
+	for (TWord j = 0; j < me.needleLength; ++j)
+		me.bitMasks[
+			me.blockCount * ordValue(convert<TValue>(getValue(needle, j)))
+			+ j / me.MACHINE_WORD_SIZE
+		] ^= (TWord)1 << (j % me.MACHINE_WORD_SIZE);
+
+//	setValue(me.data_host, needle);
+
+	/*
+	// Debug code
+	std::cout << "Alphabet size: " << ValueSize<TValue>::VALUE << ::std::endl;
+	std::cout << "Needle length: " << me.needleLength << ::std::endl;
+	std::cout << "Block count: " << me.blockCount << ::std::endl;
+
+	for(unsigned int i=0;i<ValueSize<TValue>::VALUE;++i) {
+		if ((i<97) || (i>122)) continue;
+		std::cout << static_cast<char>(i) << ": ";
+		for(int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+				std::cout << ((me.bitMasks[me.blockCount*i+j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+	}
+	*/
+}
+
+template <typename TNeedle, typename TNeedle2>
+inline void 
+setHost(Pattern<TNeedle, ShiftOr> & me, TNeedle2 & needle)
+{
+	setHost(me, const_cast<TNeedle2 const &>(needle));
+}
+
+//____________________________________________________________________________
+
+template <typename TNeedle>
+inline TNeedle
+host(Pattern<TNeedle, ShiftOr> const & pattern)
+{
+SEQAN_CHECKPOINT
+
+	typedef typename Pattern<TNeedle, ShiftOr>::TWord TWord;
+	typedef typename Value<TNeedle>::Type TValue;
+
+	TNeedle temp;
+	resize(temp, pattern.needleLength, Exact());
+
+	TValue v = TValue();
+	for (unsigned i = 0; i < length(pattern.bitMasks); i += pattern.blockCount)
+	{
+		for (unsigned j = 0; j < pattern.needleLength; j++)
+			if ((pattern.bitMasks[i + j / pattern.MACHINE_WORD_SIZE] & (TWord)1 << (j % pattern.MACHINE_WORD_SIZE)) == (TWord)0)
+				temp[j] = v;
+		++v;
+	}
+	return temp;
+}
+
+template <typename TNeedle>
+inline TNeedle
+host(Pattern<TNeedle, ShiftOr> & pattern)
+{
+SEQAN_CHECKPOINT
+	return host(const_cast<Pattern<TNeedle, ShiftOr> const &>(pattern));
+}
+
+//____________________________________________________________________________
+
+template <typename TNeedle>
+inline TNeedle
+needle(Pattern<TNeedle, ShiftOr> const & pattern)
+{
+SEQAN_CHECKPOINT
+	return host(pattern);
+}
+
+template <typename TNeedle>
+inline TNeedle
+needle(Pattern<TNeedle, ShiftOr> & pattern)
+{
+SEQAN_CHECKPOINT
+	return host(const_cast<Pattern<TNeedle, ShiftOr> const &>(pattern));
+}
+
+//____________________________________________________________________________
+
+template <typename TNeedle>
+inline void 
+_patternInit (Pattern<TNeedle, ShiftOr> & me) 
+{
+SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+
+	clear(me.prefSufMatch);
+	resize(me.prefSufMatch, me.blockCount, (TWord) ~0, Exact());
+}
+
+//____________________________________________________________________________
+
+/*
+template <typename TFinder, typename TNeedle>
+bool _findShiftOrSmallNeedle(TFinder & finder, Pattern<TNeedle, ShiftOr> & me) {
+	SEQAN_CHECKPOINT
+	typedef unsigned int TWord;
+	TWord compare= (~(1 << (me.needleLength-1)));
+	while (!atEnd(finder)) {
+		TWord pos = convert<TWord>(*finder);
+		me.prefSufMatch[0] = (me.prefSufMatch[0] << 1) | me.bitMasks[me.blockCount*pos];
+		if ((me.prefSufMatch[0] | compare) != (TWord) ~0) {
+			finder-=(me.needleLength-1);
+			return true; 
+		}
+		goNext(finder);
+	}
+	return false;
+}
+*/
+template <typename TFinder, typename TNeedle>
+inline bool 
+_findShiftOrSmallNeedle(TFinder & finder, Pattern<TNeedle, ShiftOr> & me) 
+{
+SEQAN_CHECKPOINT
+	typedef typename Haystack<TFinder>::Type THaystack;
+	typedef typename Value<TNeedle>::Type TValue;
+	THaystack & hstk = haystack(finder);
+
+	typedef typename Iterator<THaystack, Standard>::Type THaystackIterator;
+	THaystackIterator hayit = iter(hstk, position(finder));
+	THaystackIterator hayit_end = end(hstk, Standard());
+
+	typedef unsigned int TWord;
+	TWord mask = (TWord)1 << (me.needleLength - 1);
+	TWord pref_suf_match = me.prefSufMatch[0];
+
+	for (; hayit < hayit_end; ++hayit)
+	{
+		pref_suf_match <<= 1;				//shift...
+		pref_suf_match |= me.bitMasks[ordValue(convert<TValue>(getValue(hayit)))];	//...or
+
+		if (pref_suf_match & mask) 
+			continue;
+
+		//found a hit!
+		//set finder to start position
+		_setFinderEnd(finder, (hayit - begin(hstk, Standard())) + 1);
+		setPosition(finder,  beginPosition(finder)); 
+		//save machine state
+		me.prefSufMatch[0] = pref_suf_match; 
+		return true;
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool 
+_findShiftOrLargeNeedle(TFinder & finder, Pattern<TNeedle, ShiftOr> & me) 
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TNeedle>::Type TValue;
+	typedef unsigned int TWord;
+
+	TWord compare = ~((TWord)1 << ((me.needleLength - 1) % BitsPerValue<TWord>::VALUE));
+	while (!atEnd(finder))
+	{
+		TWord pos = ordValue(convert<TValue>(getValue(finder)));
+		TWord carry = 0;
+		for(TWord block = 0; block < me.blockCount; ++block)
+		{
+			bool newCarry = (me.prefSufMatch[block] & ((TWord)1 << (BitsPerValue<TWord>::VALUE - 1))) != 0;
+			me.prefSufMatch[block] <<= 1;
+			me.prefSufMatch[block] |= carry;
+			carry = newCarry;
+		}
+		for(TWord block = 0; block < me.blockCount; ++block)
+			me.prefSufMatch[block] |= me.bitMasks[me.blockCount * pos + block];
+		if ((me.prefSufMatch[me.blockCount - 1] | compare) != (TWord) ~0) 
+		{
+			_setFinderEnd(finder);
+			finder -= me.needleLength - 1;
+			return true;  
+		}
+
+		/*
+		// Debug code
+		std::cout << "   ";
+		for(int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+				std::cout << ((me.prefSufMatch[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+		*/
+		goNext(finder);
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool 
+find(TFinder & finder, Pattern<TNeedle, ShiftOr> & me) 
+{
+SEQAN_CHECKPOINT
+	if (empty(finder)) {
+		_patternInit(me);
+		_setFinderLength(finder, me.needleLength);
+		_finderSetNonEmpty(finder);
+	} else
+		finder += me.needleLength;
+
+	// Fast algorithm for needles < machine word?
+	if (me.blockCount == 1) {
+		return _findShiftOrSmallNeedle(finder, me);
+	} else {
+		return _findShiftOrLargeNeedle(finder, me);
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_SHIFTOR_H
diff --git a/src/SeqAn-1.3/seqan/find/find_simple.h b/src/SeqAn-1.3/seqan/find/find_simple.h
new file mode 100644
index 0000000..ebf4183
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_simple.h
@@ -0,0 +1,162 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_SIMPLE_H
+#define SEQAN_HEADER_FIND_SIMPLE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Simple Finder
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Simple Finder:
+..summary:A brute force online searching algorithm.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, Simple>
+..param.TNeedle:The needle type.
+...type:Class.String
+..remarks:This specialization should only be used if no other is applicable.
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.Simple Finder
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, Simple> {
+//____________________________________________________________________________
+public:
+	Holder<TNeedle> data_host;
+
+//____________________________________________________________________________
+
+	Pattern() {}
+
+	Pattern(Pattern const & other):
+		data_host(other.data_host)
+	{
+	}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		setHost(*this, ndl);
+	}
+
+	~Pattern(){}
+
+	Pattern const & 
+	operator = (Pattern const & other)
+	{
+		data_host = other.data_host;
+		return *this;
+	}
+
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, Simple> & me, 
+			  TNeedle2 & needle) 
+{
+	setValue(me.data_host, needle);
+}
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, Simple> & me, 
+			  TNeedle2 const & needle) 
+{
+	setValue(me.data_host, needle);
+}
+
+//____________________________________________________________________________
+
+
+template <typename TFinder, typename TNeedle>
+inline bool find(TFinder & finder, 
+				 Pattern<TNeedle, Simple> & me) 
+{
+SEQAN_CHECKPOINT
+	typedef typename Haystack<TFinder>::Type THaystack;
+	typedef typename Size<THaystack>::Type TSize;
+	typedef typename Iterator<THaystack, Standard>::Type THaystackIterator;
+
+	if (empty(finder))
+	{
+		_setFinderLength(finder, length(needle(me)));
+		_finderSetNonEmpty(finder);
+	}
+	else ++finder;
+
+	THaystack const & hstk = haystack(finder);
+	TNeedle const & ndl = needle(me);
+
+	THaystackIterator res = ::std::search(begin(hstk, Standard())+position(finder), end(hstk, Standard()), begin(ndl, Standard()), end(ndl, Standard()));
+
+	if (res == end(hstk)) return false;
+
+	_setFinderEnd(finder, (res - begin(hstk, Standard())) + length(ndl));
+	setPosition(finder, beginPosition(finder));
+	return true; 
+
+/*
+	TSize n = length(hstk);
+	TSize m = length(ndl);
+	while (position(finder)+m <= n)
+	{
+		if (ndl == infix(hstk, position(finder), position(finder)+m))
+		{
+			_setFinderEnd(finder, position(finder)+m);
+			return true; 
+		}
+		++finder;
+	}
+	return false;
+*/
+}
+
+//____________________________________________________________________________
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find/find_wild_shiftand.h b/src/SeqAn-1.3/seqan/find/find_wild_shiftand.h
new file mode 100644
index 0000000..cc69d0f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_wild_shiftand.h
@@ -0,0 +1,689 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Stefan Aiche <aiche at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_WILD_SHIFTAND_H
+#define SEQAN_HEADER_FIND_WILD_SHIFTAND_H
+
+// uncomment this for detailed debug output
+//#define SEQAN_WILD_SHIFTAND_DEBUG
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// ShiftAnd with Wildcards
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.WildShiftAnd:
+..summary: Exact string matching with wildcards using bit parallelism. The Shift-And algorithm is applicable to search small patterns in texts using a small alphabet.
+..general:Class.Pattern
+..cat:Searching
+..signature:Pattern<TNeedle, WildShiftAnd>
+..param.TNeedle:The needle type.
+...type:Class.String
+..remarks.text:The supported wildcards are $*$ (zero or more occurence), $+$ (one or more occurences), $?$ (optional character), $.$ 
+(every character), character classes (e.g. $[a-z]$) and bounded repeats (e.g. ${n,m}$).
+..remarks.text:After the find-Method returned the Finder will point to the last position of the occurence
+..remarks.text:We encourage the user to intialize the Pattern with a $String<char>$ (@Function.setHost@ or the C'tor).
+If you use for instance $String <Dna>$ instead you won't be able to specify wildcards
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.WildShiftAnd
+
+struct WildShiftAnd_;
+typedef Tag<WildShiftAnd_> WildShiftAnd;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, WildShiftAnd> {
+//____________________________________________________________________________
+public:
+	typedef unsigned TWord;
+
+	Holder<TNeedle> data_host;
+	String<TWord> table;			// Look up table for each character in the alphabet (called B in "Navarro")
+	
+	String<TWord> s_table;			// marks all positions, that can remain active, after reading a specific character (called S in "Navarro")
+	String<TWord> a_table;			// marks all positions of optional characters in the pattern (called A in "Navarro")
+	String<TWord> i_table;			// marks all positions in the pattern, that preceed a block of optional characters (called I in "Navarro")
+	String<TWord> f_table;			// marks all end-positions of blocks of optional characters (called F in "Navarro")
+	
+	String<TWord> prefSufMatch;		// Set of all the prefixes of needle that match a suffix of haystack (called D in "Navarro")
+	String<TWord> df;				// additional bit mask to enable flooding of bits
+	
+	TWord needleLength;				// e.g., needleLength=33 --> blockCount=2 (iff w=32 bits)
+	TWord character_count;			// number of normal characters in the needle
+	TWord blockCount;				// #unsigned ints required to store needle	
+
+	bool _valid;					// is the pattern valid or not
+
+//____________________________________________________________________________
+
+	Pattern()
+		: _valid(false)
+		{}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+		: _valid(false) {
+		setHost(*this, ndl);
+	}
+
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+// debug method to visualize bitmasks
+inline void _printMask(String <unsigned> const &  mask,unsigned line,String <char> name)
+{
+	unsigned len = length(mask);
+	std::cout << name << " " << line << "   ";
+	for(unsigned int j=0;j<len;++j) {
+		for(unsigned int bit_pos=0;bit_pos<BitsPerValue<unsigned int>::VALUE;++bit_pos) {
+			std::cout << ((mask[j] & (1<<(bit_pos % BitsPerValue<unsigned int>::VALUE))) !=0);
+		}
+		std::cout << " ";
+	}
+	std::cout << ::std::endl;
+}
+*/
+
+//____________________________________________________________________________
+//								VALIDATION
+
+inline bool _isUnsigned(String<char> const & number)
+{
+	unsigned int len = length(number);
+	for(unsigned int i = 0;i < len;++i){
+		if(!(convert<unsigned int>(getValue(number,i)) <= 57 && convert<unsigned int>(getValue(number,i)) >= 47))
+			return false;
+	}
+	return true;
+}
+
+// check if the pattern is valid
+template <typename TNeedle2>
+bool _validate(TNeedle2 const & needle)
+{
+	typedef unsigned TWord;
+	
+	TWord nl = length(needle);
+	TWord len = nl;
+	TWord i = 0;
+	
+	while (i < nl){
+		if (convert<char>(getValue(needle,i)) == '['){
+			// check if class ends
+		  while(i < nl && convert<char>(getValue(needle,i)) != ']')++i;
+			if(i == nl)	return false;
+		}
+		else if(convert<char>(getValue(needle,i)) == '*' || convert<char>(getValue(needle,i)) == '+' || convert<char>(getValue(needle,i)) == '?'){
+			// check for consecutive runs of +,*,?
+			++i;
+			if(convert<char>(getValue(needle,i)) == '*' || convert<char>(getValue(needle,i)) == '+' || convert<char>(getValue(needle,i)) == '?')
+				return false;
+			++i;
+		}
+		else if(convert<char>(getValue(needle,i)) == '{'){
+SEQAN_CHECKPOINT
+			String <char> number;
+			TWord n,m;
+			n = m = 0;
+			--len;++i; // get to the first number
+			while(i < nl && convert<char>(getValue(needle,i)) != '}' && convert<char>(getValue(needle,i)) != ',') {			
+SEQAN_CHECKPOINT
+				append(number,convert<char>(getValue(needle,i)));
+				--len;++i;
+			}
+			// class didn't ended
+			if(i == nl)	return false;
+			
+			// isNumber
+			if(!_isUnsigned(number)) return false;
+			n = atoi(toCString(number));
+			
+			// check the second number
+			if (convert<char>(getValue(needle,i)) == ','){
+SEQAN_CHECKPOINT
+				--len;++i;
+				clear(number);
+				while(i < nl && convert<char>(getValue(needle,i)) != '}') {			
+SEQAN_CHECKPOINT
+					append(number,convert<char>(getValue(needle,i)));
+					--len;++i;
+				}
+			
+				// class didn't ended
+				if(i == nl) return false;
+				
+				// isNumber
+				if(!_isUnsigned(number)) return false;
+				m = atoi(toCString(number));
+				--len;
+			}
+			else --len;
+			
+			// check if optional part is greater or equal then fixed
+			if(m < n && m != 0)	return false;
+		}
+		else if(convert<char>(getValue(needle,i)) == '\\'){
+SEQAN_CHECKPOINT
+			// check if there exists a next character
+			if(i == nl - 1)	return false;
+			else ++i;
+		}
+		++i;
+	}
+	return true;
+}
+
+/* 
+  determine the original pattern length -- wo wildcard-chars
+  currently supported +,*,[..],?,.,{n,m}
+*/
+template <typename TNeedle>
+unsigned _lengthWithoutWildcards(TNeedle const & needle) {
+
+	typedef unsigned TWord;
+
+	TWord nl = length(needle);
+	TWord len = nl;
+	TWord i = 0;
+	while(i < nl) {
+		if(convert<char>(getValue(needle,i)) == '+'){
+SEQAN_CHECKPOINT
+			--len;
+		}
+		else if(convert<char>(getValue(needle,i)) == '*'){
+SEQAN_CHECKPOINT
+			--len;
+		}
+		else if(convert<char>(getValue(needle,i)) == '?'){
+SEQAN_CHECKPOINT
+			--len;
+		}
+		else if(convert<char>(getValue(needle,i)) == '['){
+SEQAN_CHECKPOINT
+			while(convert<char>(getValue(needle,i)) != ']') {			
+SEQAN_CHECKPOINT
+				--len;++i;
+			}
+		}
+		else if(convert<char>(getValue(needle,i)) == '{'){
+SEQAN_CHECKPOINT
+			String <char> number;
+			TWord n,m;
+			n = m = 0;
+			--len;++i; // get to the first number
+			while(convert<char>(getValue(needle,i)) != '}' && convert<char>(getValue(needle,i)) != ',') {			
+SEQAN_CHECKPOINT
+				append(number,convert<char>(getValue(needle,i)));
+				--len;++i;
+			}
+			// we also have to read the second number
+			n = atoi(toCString(number));
+			if (convert<char>(getValue(needle,i)) == ','){
+SEQAN_CHECKPOINT
+				--len;++i;
+				//lets get m
+				clear(number);
+				while(convert<char>(getValue(needle,i)) != '}') {			
+SEQAN_CHECKPOINT
+					append(number,convert<char>(getValue(needle,i)));
+					--len;++i;
+				}
+				m = atoi(toCString(number));
+				--len;
+			}
+			else
+				--len;
+			
+			len += (m != 0 ? m : n) - 1;
+		}
+		else if(convert<char>(getValue(needle,i)) == '\\'){
+SEQAN_CHECKPOINT
+			--len;++i; // next character could be a \ too
+		}
+		++i;
+	}
+
+	return len;
+}
+
+/*
+	returns all character codes contained in the class
+*/
+template <typename TValue,typename TNeedle2>
+String <unsigned> _getCharacterClass(TNeedle2 const & host,unsigned start,unsigned end){
+	typedef unsigned TWord;
+	String <unsigned> ret;
+	unsigned pos = start;
+	while (pos < end){
+SEQAN_CHECKPOINT
+		if(convert<char>(getValue(host,pos)) != '-')
+			append(ret,convert<TWord>(convert<TValue>(getValue(host,pos))));
+		else{
+SEQAN_CHECKPOINT
+			// could be a range
+			if (pos > start && pos < end && (convert<TWord>(convert<TValue>(getValue(host,pos-1))) < convert<TWord>(convert<TValue>(getValue(host,pos+1)))) ){
+				unsigned r_s = convert<TWord>(convert<TValue>(getValue(host,pos-1))) + 1;
+				while(r_s < convert<TWord>(convert<TValue>(getValue(host,pos+1)))){
+					append(ret,r_s);
+					++r_s;
+				}
+			}
+			else // or simply a '-'
+				append(ret,convert<TWord>(convert<TValue>(getValue(host,pos))));
+		}
+		++pos;
+	}
+	return ret;
+}
+
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, WildShiftAnd> & me, TNeedle2 const & needle) {
+SEQAN_CHECKPOINT
+	me._valid = _validate(needle);
+
+	if(!valid(me)) return;
+
+	typedef unsigned TWord;
+	typedef typename Value<TNeedle>::Type TValue;
+	
+	me.needleLength = length(needle);
+	me.character_count = _lengthWithoutWildcards(needle);
+
+	if (me.character_count<1) me.blockCount=1;
+	else me.blockCount=((me.character_count-1) / BitsPerValue<TWord>::VALUE)+1;
+	
+	clear(me.table);
+	resize(me.table, me.blockCount * ValueSize<TValue>::VALUE, 0, Exact());
+
+	clear(me.s_table);
+	resize(me.s_table, me.blockCount * ValueSize<TValue>::VALUE, 0, Exact());
+
+	clear(me.a_table);
+	resize(me.a_table,me.blockCount,0,Exact());
+
+	int i = -1;
+	String <TWord> last_char; // stores the character (or characters) that were read in the last step
+	TWord j=0;
+	while(j < me.needleLength){
+SEQAN_CHECKPOINT
+		if (convert<char>(getValue(needle,j)) == '+'){
+SEQAN_CHECKPOINT
+			TWord len = length(last_char);
+			for (unsigned int k = 0; k < len; ++k)
+				me.s_table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+		} 
+		else if (convert<char>(getValue(needle,j)) == '?'){
+SEQAN_CHECKPOINT
+			me.a_table[i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+		}
+		else if (convert<char>(getValue(needle,j)) == '*'){
+SEQAN_CHECKPOINT
+			TWord len = length(last_char);
+			for (unsigned int k = 0; k < len; ++k)
+				me.s_table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+			me.a_table[i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+		}
+		else if(convert<char>(getValue(needle,j)) == '['){
+SEQAN_CHECKPOINT
+			/* find characters in class */
+			TWord e = j;
+			while(convert<char>(getValue(needle,e)) != ']') ++e;
+			/* get character codes of class */
+			last_char = _getCharacterClass<TValue>(needle,j+1,e);
+			TWord len = length(last_char);			
+			
+			/* add class to the mask */
+			++i;
+			for (unsigned int k = 0; k < len; ++k){
+SEQAN_CHECKPOINT
+				me.table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+			}
+			j = e;
+		}
+		else if(convert<char>(getValue(needle,j)) == '.'){ // matches all characters in the current alphabet
+SEQAN_CHECKPOINT
+			clear(last_char);
+			++i;
+			for(unsigned int l = 0;l < ValueSize<TValue>::VALUE;++l){
+				append(last_char,l);
+				me.table[me.blockCount*l + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+			}
+			
+		}
+		else if(convert<char>(getValue(needle,j)) == '\\'){ // handle escape characters
+SEQAN_CHECKPOINT
+			/* goto next character use this for the bit mask */
+			++i;++j;
+			clear(last_char);
+			append(last_char, convert<TWord>(convert<TValue>(getValue(needle,j))));
+			me.table[me.blockCount*last_char[0] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));			
+		}
+		else if(convert<char>(getValue(needle,j)) == '{'){ // handle bounded character repeats
+SEQAN_CHECKPOINT
+			String <char> number;
+			TWord n,m,r;
+			TWord len = length(last_char);			
+			n = m = 0;
+			++j;
+			while(convert<char>(getValue(needle,j)) != '}' && convert<char>(getValue(needle,j)) != ',') {			
+SEQAN_CHECKPOINT
+				append(number,convert<char>(getValue(needle,j)));
+				++j;
+			}
+			n = atoi(toCString(number));
+			if (convert<char>(getValue(needle,j)) == ','){
+SEQAN_CHECKPOINT
+				++j;
+				clear(number);
+				while(convert<char>(getValue(needle,j)) != '}') {			
+SEQAN_CHECKPOINT
+					append(number,convert<char>(getValue(needle,j)));
+					++j;
+				}
+				m = atoi(toCString(number));
+			}
+			// we already have seen one required occurence of the character (last_char)
+			n -= 1;
+			r = 0;
+			while(r < n){ // add n normal characters
+SEQAN_CHECKPOINT
+				++i;
+				for (unsigned int k = 0; k < len; ++k){
+					me.table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+				}
+				++r;
+			}
+			++r; // correct the -1 of n to get in the correct relation to m
+			while (r < m){ // if there was no m specified this won't be used
+SEQAN_CHECKPOINT
+				// add m - n charaters and make them optional
+				++i;
+				for (unsigned int k = 0; k < len; ++k){
+SEQAN_CHECKPOINT
+					me.table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+				}
+				me.a_table[i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+				++r;
+			}			
+		}
+
+		else // we have a character here
+		{
+SEQAN_CHECKPOINT
+			// determine character position in array table
+			clear(last_char);
+			append(last_char, convert<TWord>(convert<TValue>(getValue(needle,j))));
+			++i;
+			me.table[me.blockCount*last_char[0] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+		}
+		++j;
+	}
+
+	clear(me.i_table);
+	resize(me.i_table,me.blockCount,0,Exact());
+
+	clear(me.f_table);
+	resize(me.f_table,me.blockCount,0,Exact());
+
+	for (unsigned int i = 0; i < me.character_count; ++i){
+SEQAN_CHECKPOINT
+		if ((me.a_table[i / BitsPerValue<TWord>::VALUE] & (1 << (i % BitsPerValue<TWord>::VALUE))) != 0){
+SEQAN_CHECKPOINT
+			if ((me.f_table[i / BitsPerValue<TWord>::VALUE] & (1 << ((i-1) % BitsPerValue<TWord>::VALUE))) == 0){
+SEQAN_CHECKPOINT
+
+				if(i > 0)
+					me.i_table[(i-1) / BitsPerValue<TWord>::VALUE] |= 1 << ((i-1) % BitsPerValue<TWord>::VALUE);
+				me.f_table[i / BitsPerValue<TWord>::VALUE] |= 1 << (i % BitsPerValue<TWord>::VALUE);
+#ifdef SEQAN_WILD_SHIFTAND_DEBUG
+				std::cout << "Update F and I" << std::endl;
+				_printMask(me.f_table,0,"F ");
+				_printMask(me.i_table,0,"I ");
+				_printMask(me.a_table,0,"A ");
+				std::cout << std::endl;
+#endif
+			}
+			else{
+SEQAN_CHECKPOINT
+				TWord curBlock = i / BitsPerValue<TWord>::VALUE;
+				for (unsigned int k = 0; k < me.blockCount; ++k){
+SEQAN_CHECKPOINT
+					if(k != curBlock)
+						me.f_table[i / BitsPerValue<TWord>::VALUE] &= ~0;
+					else
+						me.f_table[i / BitsPerValue<TWord>::VALUE] &= ~(1 << ((i-1) % BitsPerValue<TWord>::VALUE));
+
+				}
+				//me.f_table[i / BitsPerValue<TWord>::VALUE] &= ~(1 << ((i-1) % BitsPerValue<TWord>::VALUE));
+				me.f_table[i / BitsPerValue<TWord>::VALUE] |= 1 << (i % BitsPerValue<TWord>::VALUE);
+#ifdef SEQAN_WILD_SHIFTAND_DEBUG
+				std::cout << "Update F" << std::endl;
+				_printMask(me.f_table,0,"F ");
+				std::cout << std::endl;
+#endif
+			}
+		}
+	}
+
+	setValue(me.data_host, needle);
+
+#ifdef SEQAN_WILD_SHIFTAND_DEBUG	
+	// Debug code
+	std::cout << "Alphabet size: " << ValueSize<TValue>::VALUE << ::std::endl;
+	std::cout << "Needle length (with wildcards): " << me.needleLength << ::std::endl;
+	std::cout << "Needle length (wo wildcards): " << me.character_count << ::std::endl;
+	std::cout << "Block count: " << me.blockCount << ::std::endl;
+
+	std::cout << "Needle:" << needle << ::std::endl;
+
+	_printMask(me.f_table,0,"F ");
+	_printMask(me.i_table,0,"I ");
+	_printMask(me.a_table,0,"A ");
+	std::cout << std::endl << std::endl;
+
+	for(unsigned i=0;i<ValueSize<TValue>::VALUE;++i) {
+		if (((i<97) && (4 < i) ) || (i>122)) continue;
+		std::cout << static_cast<TValue>(i) << ": ";
+		for(unsigned int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned>::VALUE;++bit_pos) {
+				std::cout << ((me.table[me.blockCount*i+j] & (1<<(bit_pos % BitsPerValue<unsigned>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+	}
+#endif
+
+}
+
+template <typename TNeedle, typename TNeedle2>
+inline void setHost (Pattern<TNeedle, WildShiftAnd> & me, TNeedle2 & needle)
+{
+	setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline void _patternInit (Pattern<TNeedle, WildShiftAnd> & me) 
+{
+SEQAN_CHECKPOINT
+	clear(me.prefSufMatch);
+	resize(me.prefSufMatch, me.blockCount, 0, Exact());
+
+	clear(me.df);
+	resize(me.df, me.blockCount, 0, Exact());
+
+}
+
+//____________________________________________________________________________
+template <typename TNeedle>
+inline bool valid(Pattern <TNeedle,WildShiftAnd> & me)
+{
+SEQAN_CHECKPOINT
+	return me._valid;
+}
+
+//____________________________________________________________________________
+template <typename TNeedle>
+inline bool valid(Pattern <TNeedle,WildShiftAnd> const & me)
+{
+SEQAN_CHECKPOINT
+	return me._valid;
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, WildShiftAnd>const>::Type & 
+host(Pattern<TNeedle, WildShiftAnd> & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, WildShiftAnd>const>::Type & 
+host(Pattern<TNeedle, WildShiftAnd> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+//____________________________________________________________________________
+
+
+template <typename TFinder, typename TNeedle>
+inline bool _findShiftAndSmallNeedle(TFinder & finder, Pattern<TNeedle, WildShiftAnd> & me) {
+SEQAN_CHECKPOINT
+	typedef unsigned TWord;
+	TWord compare = (1 << (me.character_count-1));
+	while (!atEnd(finder)) {
+SEQAN_CHECKPOINT
+		TWord pos = convert<TWord>(*finder);
+		/* added  | (me.prefSufMatch[0] & me.s_table[me.blockCount*pos]) at the end of the line */
+		me.prefSufMatch[0] = (((me.prefSufMatch[0] << 1) | 1) & me.table[me.blockCount*pos]) | (me.prefSufMatch[0] & me.s_table[me.blockCount*pos]) ;
+
+		/* additional bit operations */
+		me.df[0] = me.prefSufMatch[0] | me.f_table[0];
+		me.prefSufMatch[0] |= ((me.a_table[0] & (~(me.df[0] - me.i_table[0]))) ^ me.df[0]);
+		if ((me.prefSufMatch[0] & compare) != 0) {
+SEQAN_CHECKPOINT
+			return true; 
+		}
+		goNext(finder);
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool _findShiftAndLargeNeedle(TFinder & finder, Pattern<TNeedle, WildShiftAnd> & me) {
+SEQAN_CHECKPOINT
+	typedef unsigned TWord;
+	const TWord all1 = ~0;	
+	TWord compare = (1 << ((me.character_count-1) % BitsPerValue<TWord>::VALUE));
+
+	while (!atEnd(finder)) {
+SEQAN_CHECKPOINT
+		TWord pos = convert<TWord>(*finder);
+		TWord carry = 1;
+		TWord wc_carry = 0;
+		// shift of blocks with carry
+		for(TWord block=0;block<me.blockCount;++block) {
+SEQAN_CHECKPOINT
+			bool newCarry = ((me.prefSufMatch[block] & (1<< (BitsPerValue<TWord>::VALUE - 1)))!=0); 
+			me.prefSufMatch[block] = (((me.prefSufMatch[block] << 1) | carry) & me.table[me.blockCount*pos+block]) | (me.prefSufMatch[block] & me.s_table[me.blockCount*pos+block]) ;
+			carry = newCarry;
+			
+			me.df[block] = me.prefSufMatch[block] | me.f_table[block];
+			TWord Z = me.df[block] - me.i_table[block] - wc_carry;
+			wc_carry = ((me.df[block] < Z) || (me.i_table[block]==all1 && wc_carry)) ? 1 : 0;
+			me.prefSufMatch[block] |= (me.a_table[block] & (~Z ^ me.df[block]));
+		}
+
+#ifdef SEQAN_WILD_SHIFTAND_DEBUG
+		std::cout << "reading " << *finder << std::endl;
+		_printMask(me.prefSufMatch,position(finder),"D ");
+		_printMask(me.df,position(finder),"Df");
+		std::cout << std::endl;
+#endif
+		
+		// check for match
+		if ((me.prefSufMatch[me.blockCount-1] & compare) != 0)
+			return true; 
+
+		goNext(finder);
+	}
+	return false;
+}
+
+template <typename TFinder, typename TNeedle>
+inline bool find(TFinder & finder, Pattern<TNeedle, WildShiftAnd> & me) {
+SEQAN_CHECKPOINT
+
+	if (empty(finder)) {
+		_patternInit(me);
+		_finderSetNonEmpty(finder);
+
+		if(!valid(me))
+			return false;
+	} 
+	else
+		goNext(finder);	
+
+	// Fast algorithm for needles < machine word?
+	if (me.blockCount == 1) {
+		return _findShiftAndSmallNeedle(finder, me);
+	} else {
+		return _findShiftAndLargeNeedle(finder, me);
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_WILD_SHIFTAND_H
diff --git a/src/SeqAn-1.3/seqan/find/find_wumanber.h b/src/SeqAn-1.3/seqan/find/find_wumanber.h
new file mode 100644
index 0000000..61cf268
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find/find_wumanber.h
@@ -0,0 +1,482 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_WUMANBER_H
+#define SEQAN_HEADER_FIND_WUMANBER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// WuManber
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.WuManber:
+..general:Class.Pattern
+..cat:Searching
+..summary:Online-algorithm for multi-pattern search.
+..signature:Pattern<TNeedle, WuManber>
+..param.TNeedle:The needle type.
+...type:Class.String
+..include:seqan/find.h
+*/
+
+///.Class.Pattern.param.TSpec.type:Spec.WuManber
+
+struct WuManber_;
+typedef Tag<WuManber_> WuManber;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, WuManber> 
+{
+//____________________________________________________________________________
+public:
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Position<TNeedle>::Type TNeedlePosition;
+	typedef typename Size<TKeyword>::Type TSize;
+	typedef typename Value<TKeyword>::Type TValue;
+
+	//searching data: these members are initialized in _patternInit
+	TNeedlePosition position; //last found keyword
+	TNeedlePosition * to_verify_begin; //next entry in verify
+	TNeedlePosition * to_verify_end; //end of list in verify
+			//note: if to_verify_begin == to_verify_end then searching in Haystack must go on
+
+	//preprocessed data: these members are initialized in setHost
+	Holder<TNeedle> needle;
+	String<TNeedlePosition> verify_tab; //table of keywords to verify depending on the last value (HASH)
+	String<TNeedlePosition *> verify; //directory into verify_tab
+	String<TSize> shift; //table of skip widths (SHIFT)
+
+	TSize lmin;	//min length of keyword
+	unsigned char q; //length of hashed q-grams
+//____________________________________________________________________________
+
+	Pattern():
+		lmin(0)
+	{
+	}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+		SEQAN_CHECKPOINT
+		setHost(*this, ndl);
+	}
+
+	~Pattern() 
+	{
+	}
+//____________________________________________________________________________
+
+private:
+	Pattern(Pattern const& other);
+	Pattern const & operator=(Pattern const & other);
+
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+//forward
+template <typename TNeedle, int Q>
+struct WuManberHash_;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//implementation kernel of WuManber 
+
+template <typename TNeedle, int Q>
+struct WuManberImpl_
+{
+//____________________________________________________________________________
+
+	typedef Pattern<TNeedle, WuManber> TPattern;
+
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Position<TNeedle>::Type TNeedlePosition;
+	typedef typename Iterator<TNeedle, Standard>::Type TNeedleIterator;
+
+	typedef typename Size<TKeyword>::Type TSize;
+	typedef typename Value<TKeyword>::Type TValue;
+	typedef typename Iterator<TKeyword, Standard>::Type TIterator;
+
+//____________________________________________________________________________
+
+	enum 
+	{
+		C = BitsPerValue<TValue>::VALUE, //bits per value
+		W = (C*Q <= 16) ? C*Q : 16,	//bits per hash values
+
+		DIR_SIZE = 1 << W,			//size of verify_dir and shift_dir
+
+		//shift width for Q = 2:
+		SHIFT = (W > 2*C) ? C : W-C,			
+
+		//shift widths for Q = 3:
+		SHIFT_LEFT = (W > 3*C) ? 2*C : W-C,
+		SHIFT_MIDDLE = SHIFT_LEFT / 2
+	};
+//____________________________________________________________________________
+
+	inline static unsigned short
+	hash(TValue * vals)
+	{
+		return WuManberHash_<TNeedle, Q>::hash(vals);
+	}
+//____________________________________________________________________________
+
+	inline static void
+	initialize(TPattern & me)
+	{
+		//note: me.needle, me.q, and me.lmin were already set in setHost before initialize was called
+
+		//some variables
+		TNeedleIterator pit;
+		TNeedleIterator pit_end = end(needle(me));
+
+		TSize k = length(needle(me));
+
+		//resize and init tables
+		resize(me.verify_tab, (unsigned) k);
+		resize(me.verify, (unsigned) DIR_SIZE+1);
+		resize(me.shift, (unsigned) DIR_SIZE);
+
+		arrayFill(begin(me.shift), begin(me.shift) + (unsigned) DIR_SIZE, me.lmin-Q+1); //maximal shift width is me.lmin-B+1
+
+		//init counters
+		unsigned int verify_count[DIR_SIZE];
+		arrayFill(verify_count, verify_count + DIR_SIZE, 0);
+
+		//1: first scan: fill me.shift and count verify
+		for (pit = begin(needle(me)); pit != pit_end; ++pit)
+		{
+			unsigned short hash;
+			TIterator kit = begin(*pit);
+			for (unsigned int i = 0; i <= me.lmin-Q; ++i)
+			{
+				hash = WuManberHash_<TNeedle, Q>::hash(kit + i);
+				if (me.shift[hash] > me.lmin-Q - i)
+				{
+					me.shift[hash] = me.lmin-Q - i;
+				}
+			}
+			++(verify_count[hash]);
+		}
+
+		//2: add up and convert to pointers
+		TNeedlePosition * verify_ptr = begin(me.verify_tab);
+		
+		me.verify[0] = verify_ptr;
+		unsigned int sum = 0;
+		for (unsigned int i = 0; i < DIR_SIZE; ++i)
+		{
+			me.verify[i+1] = verify_ptr + sum;
+			sum += verify_count[i];
+		}
+
+		//3: second scan: fill verify and shift
+		pit = begin(needle(me));
+		for (unsigned int i = 0; pit != pit_end; ++i, ++pit)
+		{
+			unsigned short hash_plus_1;
+			hash_plus_1 = WuManberHash_<TNeedle, Q>::hash(begin(*pit) + me.lmin-Q) + 1;
+
+			//write into verify_tab
+			*(me.verify[hash_plus_1]) = i;
+
+			//update verify
+			++me.verify[hash_plus_1];
+		}
+	}
+//____________________________________________________________________________
+
+	template <typename TFinder>
+	static inline bool
+	find(TFinder & finder, TPattern & me) 
+	{
+		typedef typename Haystack<TFinder>::Type THaystack;
+		typedef typename Iterator<THaystack, Standard>::Type THaystackIterator;
+
+		THaystackIterator tit;
+		THaystackIterator haystack_end = end(haystack(finder));
+		THaystackIterator tit_end = haystack_end - Q + 1;
+		unsigned short hash;
+
+		if (empty(finder)) 
+		{
+//START
+			_patternInit(me);
+			_finderSetNonEmpty(finder);
+			tit = hostIterator(finder) + me.lmin-Q;
+		} 
+		else 
+		{
+//RESUME
+			tit = hostIterator(finder) + me.lmin-Q;
+			goto VERIFY;
+		}
+
+//SEARCH
+		while (tit < tit_end)
+		{
+			hash = WuManberHash_<TNeedle, Q>::hash(tit);
+
+			if (me.shift[hash])
+			{
+//SHIFT
+				tit += me.shift[hash];
+			}
+			else
+			{
+				me.to_verify_begin = me.verify[hash];
+				me.to_verify_end = me.verify[hash+1];
+//VERIFY
+VERIFY:
+				while (me.to_verify_begin != me.to_verify_end)
+				{
+					me.position = *me.to_verify_begin;
+					++me.to_verify_begin;
+
+					TKeyword & kw = needle(me)[me.position];
+
+					TIterator pit = begin(kw, Standard());
+					TIterator pit_end = end(kw, Standard());
+					THaystackIterator tit2 = tit - (me.lmin-Q);
+
+					if ((pit_end - pit) > (haystack_end - tit2)) continue; //rest of haystack too short
+
+					while (true)
+					{
+						if (pit == pit_end)
+						{
+//FOUND
+							setPosition(finder, tit - (me.lmin-Q) - begin(haystack(finder), Standard()));
+							_setFinderLength(finder, length(kw));
+							_setFinderEnd(finder, position(finder) + length(finder));
+							return true;
+						}
+						if (*pit != *tit2) break;
+						++pit;
+						++tit2;
+					}
+				}
+
+				++tit;
+			}
+		}
+//END
+		return false;
+	}
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//implementation of hash function
+
+template <typename TNeedle>
+struct WuManberHash_<TNeedle, 1>
+{
+	template <typename TIterator>
+	inline static unsigned short
+	hash(TIterator vals)
+	{
+		return ordValue(*vals);
+	}
+};
+template <typename TNeedle>
+struct WuManberHash_<TNeedle, 2>
+{
+	template <typename TIterator>
+	inline static unsigned short
+	hash(TIterator vals)
+	{
+		return ordValue(*vals)
+			+ (ordValue(*(vals+1)) << WuManberImpl_<TNeedle, 2>::SHIFT);
+	}
+};
+template <typename TNeedle>
+struct WuManberHash_<TNeedle, 3>
+{
+	template <typename TIterator>
+	inline static unsigned short
+	hash(TIterator vals)
+	{
+		return ordValue(*vals) 
+			+ (ordValue(*(vals+1)) << WuManberImpl_<TNeedle, 3>::SHIFT_MIDDLE)
+			+ (ordValue(*(vals+2)) << WuManberImpl_<TNeedle, 3>::SHIFT_LEFT);
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2>
+void _setHostWuManber(Pattern<TNeedle, WuManber> & me, 
+					   TNeedle2 const & needle_)
+{
+SEQAN_CHECKPOINT
+SEQAN_ASSERT(!empty(needle_));
+
+	typedef typename Iterator<TNeedle, Standard>::Type TNeedleIterator;
+	typedef typename Value<TNeedle>::Type TKeyword;
+	typedef typename Value<TKeyword>::Type TValue;
+	typedef typename Size<TKeyword>::Type TSize;
+
+	//me.needle
+	setValue(me.needle, needle_);
+
+	//determine lmin
+	me.lmin = length(needle(me)[0]);
+	for (TNeedleIterator it = begin(needle(me)) + 1; it != end(needle(me)); ++it)
+	{
+		TSize len = length(*it);
+		if (len < me.lmin)
+		{
+			me.lmin = len;
+		}
+	}
+
+	if (me.lmin == 0) return;
+
+	//compute q:
+	unsigned int C = BitsPerValue<TValue>::VALUE;
+	if (C > 12)
+	{
+		me.q = 1;
+	}
+	else 
+	{
+		//according to Wu & Manber: B = log_c(2mk) "is a good value"
+		//i.e. C^B = 2mk
+		//m = lmin
+		//k = length(needle)
+		//our heuristic: take B = 2 if C^2 >= mk, else B = 3
+
+		if (C * C >= me.lmin * length(needle(me)))
+		{
+			me.q = 2;
+		}
+		else
+		{
+			me.q = 3;
+		}
+	}
+	if (me.q > me.lmin) 
+	{
+		me.q = me.lmin;
+	}
+
+	//rest of preprocessing is done in WuManberImpl_
+	if (me.q == 2) WuManberImpl_<TNeedle, 2>::initialize(me);
+	else if (me.q == 3) WuManberImpl_<TNeedle, 3>::initialize(me);
+	else WuManberImpl_<TNeedle, 1>::initialize(me);
+}
+
+template <typename TNeedle, typename TNeedle2>
+void setHost (Pattern<TNeedle, WuManber> & me, 
+			  TNeedle2 const & needle) 
+{
+	_setHostWuManber(me, needle);
+}
+
+template <typename TNeedle, typename TNeedle2>
+inline void 
+setHost(Pattern<TNeedle, WuManber> & me, 
+		TNeedle2 & needle)
+{
+	_setHostWuManber(me, needle);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, WuManber> >::Type & 
+host(Pattern<TNeedle, WuManber> & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.needle);
+}
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, WuManber> const>::Type & 
+host(Pattern<TNeedle, WuManber> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.needle);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+inline typename Size<TNeedle>::Type
+position(Pattern<TNeedle, WuManber> & me)
+{
+	return me.position;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//called when search begins
+template <typename TNeedle>
+inline void _patternInit (Pattern<TNeedle, WuManber> & me) 
+{
+SEQAN_CHECKPOINT
+	me.to_verify_begin = 0;
+	me.to_verify_end = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFinder, typename TNeedle>
+inline bool find(TFinder & finder, 
+				 Pattern<TNeedle, WuManber> & me) 
+{
+SEQAN_CHECKPOINT
+
+	if (me.lmin == 0) return false;
+
+	if (me.q == 2) return WuManberImpl_<TNeedle, 2>::find(finder, me);
+	else if (me.q == 3) return WuManberImpl_<TNeedle, 3>::find(finder, me);
+	else return WuManberImpl_<TNeedle, 1>::find(finder, me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find2.h b/src/SeqAn-1.3/seqan/find2.h
new file mode 100644
index 0000000..fe5f287
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2.h
@@ -0,0 +1,79 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Umbrella header for the find module.
+// ==========================================================================
+
+#ifndef SEQAN_SEQAN_FIND_H_
+#define SEQAN_SEQAN_FIND_H_
+
+// Prerequisites.
+#include <cmath>
+
+#include <deque>
+
+#include <seqan/align.h>
+#include <seqan/basic.h>
+#include <seqan/sequence.h>
+#include <seqan/score.h>
+//#include <seqan/modifier.h>
+//#include <seqan/graph_types.h>
+//#include <seqan/graph_algorithms.h>
+//#include <seqan/map.h>
+//#include <seqan/find.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/find2/find2_generated_forwards.h>
+#endif
+
+#include <seqan/find2/find_base.h>
+#include <seqan/find2/find_finder_default.h>
+
+// Exact pattern matching.
+#include <seqan/find2/find_exact_shiftand.h>
+#include <seqan/find2/find_exact_simple.h>
+
+// Complex pattern matching.
+#include <seqan/find2/find_pattern_wild_shiftand.h>
+
+// Multiple exact pattern search.
+#include <seqan/find2/find_multiple_exact_simple.h>
+
+// Approximate pattern matching with Hamming distance.
+#include <seqan/find2/find_hamming_simple.h>
+
+// Approximate matching with linear/affine gap costs, edit distance etc.
+#include <seqan/find2/find_approx_find_begin.h>  // findBegin() support
+#include <seqan/find2/find_approx_dpsearch.h>
+
+#endif  // SEQAN_SEQAN_FIND_H_
diff --git a/src/SeqAn-1.3/seqan/find2/find2_generated_forwards.h b/src/SeqAn-1.3/seqan/find2/find2_generated_forwards.h
new file mode 100644
index 0000000..303aa03
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find2_generated_forwards.h
@@ -0,0 +1,477 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_FIND2_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_FIND2_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// ApproxFindBegin_
+
+template <typename TNeedle, typename TScore, typename HasFindBeginSupport> struct ApproxFindBegin_;       	// "projects/library/seqan/find2/find_approx_find_begin.h"(57)
+
+//____________________________________________________________________________
+// DPSearch
+
+template <typename TScore, typename TSpec , typename TFindBeginPatternSpec > struct DPSearch;       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(63)
+
+//____________________________________________________________________________
+// FindInfix_
+
+struct FindInfix_;       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(54)
+
+//____________________________________________________________________________
+// FindPrefix_
+
+struct FindPrefix_;       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(58)
+
+//____________________________________________________________________________
+// FindState_
+
+struct FindState_;       	// "projects/library/seqan/find2/find_base.h"(43)
+
+//____________________________________________________________________________
+// Finder
+
+template <typename THaystack, typename TSpec > struct Finder;       	// "projects/library/seqan/find2/find_base.h"(61)
+
+//____________________________________________________________________________
+// HammingSimple_
+
+struct HammingSimple_;       	// "projects/library/seqan/find2/find_hamming_simple.h"(43)
+
+//____________________________________________________________________________
+// MultipleSimple_
+
+struct MultipleSimple_;       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(43)
+
+//____________________________________________________________________________
+// Needle
+
+template <typename TPattern> struct Needle;       	// "projects/library/seqan/find2/find_base.h"(65)
+
+//____________________________________________________________________________
+// Pattern
+
+template <typename TNeedle, typename TSpec> struct Pattern;       	// "projects/library/seqan/find2/find_base.h"(57)
+
+//____________________________________________________________________________
+// ScoringScheme
+
+template <typename TPattern> struct ScoringScheme;       	// "projects/library/seqan/find2/find_base.h"(76)
+
+//____________________________________________________________________________
+// ShiftAnd_
+
+struct ShiftAnd_;       	// "projects/library/seqan/find2/find_exact_shiftand.h"(45)
+
+//____________________________________________________________________________
+// UseScoreLimit_
+
+struct UseScoreLimit_;       	// "projects/library/seqan/find2/find_approx_find_begin.h"(101)
+
+//____________________________________________________________________________
+// UseScore_
+
+struct UseScore_;       	// "projects/library/seqan/find2/find_approx_find_begin.h"(95)
+
+//____________________________________________________________________________
+// WildShiftAnd_
+
+struct WildShiftAnd_;       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(50)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// FindInfix
+
+typedef Tag<FindInfix_> FindInfix;       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(55)
+
+//____________________________________________________________________________
+// FindPrefix
+
+typedef Tag<FindPrefix_> FindPrefix;       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(59)
+
+//____________________________________________________________________________
+// HammingSimple
+
+typedef Tag<HammingSimple_> HammingSimple;       	// "projects/library/seqan/find2/find_hamming_simple.h"(44)
+
+//____________________________________________________________________________
+// MultipleSimple
+
+typedef Tag<MultipleSimple_> MultipleSimple;       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(44)
+
+//____________________________________________________________________________
+// ShiftAnd
+
+typedef Tag<ShiftAnd_> ShiftAnd;       	// "projects/library/seqan/find2/find_exact_shiftand.h"(46)
+
+//____________________________________________________________________________
+// UseScore
+
+typedef Tag<UseScore_> UseScore;       	// "projects/library/seqan/find2/find_approx_find_begin.h"(96)
+
+//____________________________________________________________________________
+// UseScoreLimit
+
+typedef Tag<UseScoreLimit_> UseScoreLimit;       	// "projects/library/seqan/find2/find_approx_find_begin.h"(102)
+
+//____________________________________________________________________________
+// WildShiftAnd
+
+typedef Tag<WildShiftAnd_> WildShiftAnd;       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(51)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _findBeginImpl
+
+template <typename TNeedle, typename TScore, typename THaystack, typename TTag> bool _findBeginImpl(ApproxFindBegin_<TNeedle, TScore, True> & findBeginStruct, TScore const & scoringScheme, typename Value<TScore>::Type const & findScore, typename Position<TNeedle>::Type const & endPosition, THaystack const & haystack, TNeedle const & needle, Tag<TTag> const & tag);       	// "projects/library/seqan/find2/find_approx_find_begin.h"(160)
+
+//____________________________________________________________________________
+// _findBeginScoreLimit
+
+template <typename TNeedle, typename TScore> inline typename Value<TScore>::Type _findBeginScoreLimit(ApproxFindBegin_<TNeedle, TScore, True> const &, typename Value<TScore>::Type const & findScore, typename Value<TScore>::Type const &, UseScore const &);       	// "projects/library/seqan/find2/find_approx_find_begin.h"(137)
+template <typename TNeedle, typename TScore> inline typename Value<TScore>::Type _findBeginScoreLimit(ApproxFindBegin_<TNeedle, TScore, True> const &, typename Value<TScore>::Type const &, typename Value<TScore>::Type const & findScoreLimit, UseScoreLimit const &);       	// "projects/library/seqan/find2/find_approx_find_begin.h"(147)
+
+//____________________________________________________________________________
+// _findShiftAndLargeNeedle
+
+template <typename THaystack, typename TNeedle> inline bool _findShiftAndLargeNeedle(Finder<THaystack, Default> & finder, Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(260)
+
+//____________________________________________________________________________
+// _findShiftAndSmallNeedle
+
+template <typename THaystack, typename TNeedle> inline bool _findShiftAndSmallNeedle(Finder<THaystack, Default> & finder, Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(238)
+
+//____________________________________________________________________________
+// _findWildShiftAndGetCharacterClass
+
+inline void _findWildShiftAndGetCharacterClass( CharString & result, CharString const & host, Position<CharString>::Type begin, Position<CharString>::Type end);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(524)
+
+//____________________________________________________________________________
+// _findWildShiftAndIsValid
+
+inline bool _findWildShiftAndIsValid(CharString const & needle);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(337)
+
+//____________________________________________________________________________
+// _findWildShiftAndLargeNeedle
+
+template <typename THaystack, typename TNeedle> inline bool _findWildShiftAndLargeNeedle(Finder<THaystack, Default> & finder, Pattern<TNeedle, WildShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(795)
+
+//____________________________________________________________________________
+// _findWildShiftAndLengthWithoutWildcards
+
+inline Position<CharString>::Type _findWildShiftAndLengthWithoutWildcards(CharString const & needle);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(456)
+
+//____________________________________________________________________________
+// _findWildShiftAndSmallNeedle
+
+template <typename THaystack, typename TNeedle> inline bool _findWildShiftAndSmallNeedle(Finder<THaystack, Default> & finder, Pattern<TNeedle, WildShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(764)
+
+//____________________________________________________________________________
+// _initFindBegin
+
+template <typename TNeedle, typename TScore> void _initFindBegin(ApproxFindBegin_<TNeedle, TScore, True> & findBeginStruct, typename Position<TNeedle>::Type const & needleLength, TScore const & scoringScheme, int scoreLimit);       	// "projects/library/seqan/find2/find_approx_find_begin.h"(108)
+
+//____________________________________________________________________________
+// _initPattern
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> inline void _initPattern(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(273)
+template <typename TNeedle> void _initPattern(Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(86)
+
+//____________________________________________________________________________
+// _initializePattern
+
+template <typename TNeedle> void _initializePattern(Pattern<TNeedle, WildShiftAnd> & me);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(558)
+
+//____________________________________________________________________________
+// _isUnsigned
+
+inline bool _isUnsigned(CharString const & number);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(297)
+
+//____________________________________________________________________________
+// _setEndPositionShiftAndLargeNeedle
+
+template <typename THaystack, typename TNeedle> inline bool _setEndPositionShiftAndLargeNeedle(Finder<THaystack, Default> & finder, Pattern<TNeedle, ShiftAnd> & pattern, typename Position<THaystack>::Type const & pos);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(380)
+
+//____________________________________________________________________________
+// _setEndPositionShiftAndSmallNeedle
+
+template <typename THaystack, typename TNeedle> inline bool _setEndPositionShiftAndSmallNeedle(Finder<THaystack, Default> & finder, Pattern<TNeedle, ShiftAnd> & pattern, typename Position<THaystack>::Type const & pos);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(360)
+
+//____________________________________________________________________________
+// begin
+
+template <typename THaystack, typename TTag> typename Iterator<THaystack const>::Type begin(Finder<THaystack, Default> const & finder, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_finder_default.h"(73)
+template <typename THaystack, typename TTag> typename Iterator<THaystack const>::Type begin(Finder<THaystack, Default> & finder, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_finder_default.h"(84)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, Simple> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_exact_simple.h"(122)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, Simple> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_exact_simple.h"(132)
+template <typename TNeedle, typename TStringSetSpec, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(142)
+template <typename TNeedle, typename TStringSetSpec, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(152)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, HammingSimple> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_hamming_simple.h"(152)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, HammingSimple> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_hamming_simple.h"(162)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, WildShiftAnd> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(151)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, WildShiftAnd> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(161)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(201)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(211)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, ShiftAnd> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(163)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, ShiftAnd> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(173)
+
+//____________________________________________________________________________
+// beginPosition
+
+template <typename THaystack> typename Position<THaystack const>::Type beginPosition(Finder<THaystack, Default> const & finder);       	// "projects/library/seqan/find2/find_finder_default.h"(112)
+template <typename THaystack> typename Position<THaystack>::Type beginPosition(Finder<THaystack, Default> & finder);       	// "projects/library/seqan/find2/find_finder_default.h"(122)
+template <typename TNeedle> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, Simple> const & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(159)
+template <typename TNeedle> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, Simple> & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(169)
+template <typename TNeedle, typename TStringSetSpec> typename Position<TNeedle>::Type beginPosition(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(179)
+template <typename TNeedle, typename TStringSetSpec> typename Position<TNeedle>::Type beginPosition(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(189)
+template <typename TNeedle> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(192)
+template <typename TNeedle> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, HammingSimple> & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(202)
+template <typename TNeedle> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, WildShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(187)
+template <typename TNeedle> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, WildShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(197)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(237)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(247)
+template <typename TNeedle> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, ShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(200)
+template <typename TNeedle> typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(210)
+
+//____________________________________________________________________________
+// buildAlignment
+
+template <typename THaystack, typename TNeedle, typename TAlignSeq, typename TAlignSpec> bool buildAlignment(Finder<THaystack, Default> &finder, Pattern<TNeedle, Simple> &pattern, Align<TAlignSeq, TAlignSpec> &outAlignment);       	// "projects/library/seqan/find2/find_exact_simple.h"(321)
+template <typename THaystack, typename TNeedle, typename TStringSetSpec, typename TAlignSeq, typename TAlignSpec> bool buildAlignment(Finder<THaystack, Default> &finder, Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> &pattern, Align<TAlignSeq, TAlignSpec> &outAlignment);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(448)
+template <typename THaystack, typename TNeedle, typename TAlignSeq, typename TAlignSpec> bool buildAlignment(Finder<THaystack, Default> &finder, Pattern<TNeedle, HammingSimple> &pattern, Align<TAlignSeq, TAlignSpec> &outAlignment);       	// "projects/library/seqan/find2/find_hamming_simple.h"(360)
+template <typename THaystack, typename TNeedle, typename TAlignSeq, typename TAlignSpec> bool buildAlignment(Finder<THaystack, Default> &finder, Pattern<TNeedle, WildShiftAnd> &pattern, Align<TAlignSeq, TAlignSpec> &outAlignment);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(273)
+template <typename THaystack, typename TNeedle, typename TScore, typename TDPSearchSpec, typename TAlignSeq, typename TAlignSpec> bool buildAlignment(Finder<THaystack, Default> &finder, Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, True> > &pattern, Align<TAlignSeq, TAlignSpec> &outAlignment);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(547)
+template <typename THaystack, typename TNeedle, typename TAlignSeq, typename TAlignSpec> bool buildAlignment(Finder<THaystack, Default> &finder, Pattern<TNeedle, ShiftAnd> &pattern, Align<TAlignSeq, TAlignSpec> &outAlignment);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(470)
+
+//____________________________________________________________________________
+// end
+
+template <typename THaystack, typename TTag> typename Iterator<THaystack const>::Type end(Finder<THaystack, Default> const & finder, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_finder_default.h"(93)
+template <typename THaystack, typename TTag> typename Iterator<THaystack const>::Type end(Finder<THaystack, Default> & finder, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_finder_default.h"(104)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, Simple> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_exact_simple.h"(140)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, Simple> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_exact_simple.h"(151)
+template <typename TNeedle, typename TStringSetSpec, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(160)
+template <typename TNeedle, typename TStringSetSpec, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(171)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, HammingSimple> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_hamming_simple.h"(170)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, HammingSimple> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_hamming_simple.h"(184)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, WildShiftAnd> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(169)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, WildShiftAnd> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(179)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(219)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(229)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, ShiftAnd> const & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(181)
+template <typename TNeedle, typename TTag> typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, ShiftAnd> & pattern, Tag<TTag> const & spec);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(192)
+
+//____________________________________________________________________________
+// endPosition
+
+template <typename THaystack> typename Position<THaystack>::Type endPosition(Finder<THaystack, Default> const & finder);       	// "projects/library/seqan/find2/find_finder_default.h"(130)
+template <typename THaystack> typename Position<THaystack>::Type endPosition(Finder<THaystack, Default> & finder);       	// "projects/library/seqan/find2/find_finder_default.h"(140)
+template <typename TNeedle> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, Simple> const & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(177)
+template <typename TNeedle> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, Simple> & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(188)
+template <typename TNeedle, typename TStringSetSpec> typename Position<TNeedle>::Type endPosition(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(197)
+template <typename TNeedle, typename TStringSetSpec> typename Position<TNeedle>::Type endPosition(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(208)
+template <typename TNeedle> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(210)
+template <typename TNeedle> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, HammingSimple> & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(224)
+template <typename TNeedle> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, WildShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(205)
+template <typename TNeedle> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, WildShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(215)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(255)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(265)
+template <typename TNeedle> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, ShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(218)
+template <typename TNeedle> typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(229)
+
+//____________________________________________________________________________
+// find
+
+template <typename THaystack, typename TNeedle> bool find(Finder<THaystack, Default> & finder, Pattern<TNeedle, Simple> & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(197)
+template <typename THaystack, typename TNeedle, typename TStringSetSpec> bool find(Finder<THaystack, Default> & finder, Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(217)
+template <typename THaystack, typename TNeedle> bool find(Finder<THaystack, Default> & finder, Pattern<TNeedle, HammingSimple> & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(233)
+template <typename THaystack, typename TNeedle> bool find(Finder<THaystack, Default> & finder, Pattern<TNeedle, WildShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(837)
+template <typename THaystack, typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> bool find(Finder<THaystack, Default> & finder, Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(301)
+template <typename THaystack, typename TNeedle> inline bool find(Finder<THaystack, Default> & finder, Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(290)
+
+//____________________________________________________________________________
+// findBegin
+
+template <typename THaystack, typename TNeedle> bool findBegin(Finder<THaystack, Default> & finder, Pattern<TNeedle, Simple> & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(248)
+template <typename THaystack, typename TNeedle, typename TStringSetSpec> bool findBegin(Finder<THaystack, Default> & finder, Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(302)
+template <typename THaystack, typename TNeedle> bool findBegin(Finder<THaystack, Default> & finder, Pattern<TNeedle, HammingSimple> & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(288)
+template <typename THaystack, typename TNeedle, typename TScore, typename TFindBeginScoreLimitTag> bool findBegin(Finder<THaystack, Default> & finder, Pattern<TNeedle, DPSearch<TScore, FindInfix, True> > & pattern, TFindBeginScoreLimitTag const & tag);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(391)
+template <typename THaystack, typename TNeedle, typename TScore, typename TFindBeginSpec, typename TFindBeginScoreLimitTag> bool findBegin(Finder<THaystack, Default> & finder, Pattern<TNeedle, DPSearch<TScore, FindPrefix, TFindBeginSpec> > & pattern, TFindBeginScoreLimitTag const &);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(419)
+template <typename THaystack, typename TNeedle, typename TScore, typename TDPSearchSpec> bool findBegin(Finder<THaystack, Default> & finder, Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, True> > & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(446)
+template <typename THaystack, typename TNeedle> bool findBegin(Finder<THaystack, Default> & finder, Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(336)
+
+//____________________________________________________________________________
+// findBeginScore
+
+template <typename TNeedle, typename TScore> typename Value<typename ScoringScheme<Pattern<TNeedle, DPSearch<TScore, FindInfix, True> > >::Type>::Type findBeginScore(Pattern<TNeedle, DPSearch<TScore, FindInfix, True> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(366)
+template <typename TNeedle, typename TScore, typename TFindBeginSpec> typename Value<typename ScoringScheme<Pattern<TNeedle, DPSearch<TScore, FindPrefix, TFindBeginSpec> > >::Type>::Type findBeginScore(Pattern<TNeedle, DPSearch<TScore, FindPrefix, TFindBeginSpec> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(378)
+
+//____________________________________________________________________________
+// getScoreLimit
+
+template <typename TNeedle> int getScoreLimit(Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(82)
+
+//____________________________________________________________________________
+// haystack
+
+template <typename THaystack> THaystack const & haystack(Finder<THaystack, Default> const & finder);       	// "projects/library/seqan/find2/find_finder_default.h"(65)
+
+//____________________________________________________________________________
+// host
+
+template <typename TNeedle> TNeedle const & host(Pattern<TNeedle, Simple> const & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(72)
+template <typename TNeedle> TNeedle const & host(Pattern<TNeedle, Simple> & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(80)
+template <typename TNeedle, typename TStringSetSpec> StringSet<TNeedle, TStringSetSpec> const & host(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(79)
+template <typename TNeedle, typename TStringSetSpec> StringSet<TNeedle, TStringSetSpec> const & host(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(87)
+template <typename TNeedle> TNeedle const & host(Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(102)
+template <typename TNeedle> TNeedle const & host(Pattern<TNeedle, HammingSimple> & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(110)
+template <typename TNeedle> TNeedle const & host(Pattern<TNeedle, WildShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(101)
+template <typename TNeedle> TNeedle const & host(Pattern<TNeedle, WildShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(109)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> TNeedle const & host(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(151)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> TNeedle const & host(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(159)
+template <typename TNeedle> TNeedle const & host(Pattern<TNeedle, ShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(113)
+template <typename TNeedle> TNeedle const & host(Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(121)
+
+//____________________________________________________________________________
+// infix
+
+template <typename THaystack> Segment<THaystack const, InfixSegment> infix(Finder<THaystack, Default> & finder);       	// "projects/library/seqan/find2/find_finder_default.h"(148)
+template <typename TNeedle> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, Simple> const & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(104)
+template <typename TNeedle> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, Simple> & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(114)
+template <typename TNeedle, typename TStringSetSpec> Segment<TNeedle const, InfixSegment> infix(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(123)
+template <typename TNeedle, typename TStringSetSpec> Segment<TNeedle const, InfixSegment> infix(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(134)
+template <typename TNeedle> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(134)
+template <typename TNeedle> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, HammingSimple> & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(144)
+template <typename TNeedle> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, WildShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(133)
+template <typename TNeedle> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, WildShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(143)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(183)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(193)
+template <typename TNeedle> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, ShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(145)
+template <typename TNeedle> Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, ShiftAnd> & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(155)
+
+//____________________________________________________________________________
+// length
+
+template <typename TNeedle> typename Position<TNeedle>::Type length(Pattern<TNeedle, Simple> const & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(95)
+template <typename TNeedle, typename TStringSetSpec> typename Position<StringSet<TNeedle, TStringSetSpec> >::Type length(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(112)
+template <typename TNeedle> typename Position<TNeedle>::Type length(Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(125)
+template <typename TNeedle> typename Position<TNeedle>::Type length(Pattern<TNeedle, WildShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(124)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> typename Position<TNeedle>::Type length(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(174)
+template <typename TNeedle> typename Position<TNeedle>::Type length(Pattern<TNeedle, ShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(136)
+
+//____________________________________________________________________________
+// needle
+
+template <typename TNeedle> TNeedle const & needle(Pattern<TNeedle, Simple> const & pattern);       	// "projects/library/seqan/find2/find_exact_simple.h"(88)
+template <typename TNeedle> TNeedle const & needle(Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(118)
+template <typename TNeedle> TNeedle const & needle(Pattern<TNeedle, WildShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(117)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> TNeedle const & needle(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(167)
+template <typename TNeedle> TNeedle const & needle(Pattern<TNeedle, ShiftAnd> const & pattern);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(129)
+
+//____________________________________________________________________________
+// needleIndex
+
+template <typename TNeedle, typename TStringSetSpec> typename Position<StringSet<TNeedle, TStringSetSpec> >::Type needleIndex(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(102)
+
+//____________________________________________________________________________
+// needles
+
+template <typename TNeedle, typename TStringSetSpec> StringSet<TNeedle, TStringSetSpec> const & needles(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(95)
+
+//____________________________________________________________________________
+// score
+
+template <typename TNeedle> int score(Pattern<TNeedle, HammingSimple> const & pattern);       	// "projects/library/seqan/find2/find_hamming_simple.h"(89)
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> typename Value<TScore>::Type const & score(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(138)
+
+//____________________________________________________________________________
+// scoreLimit
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> typename Value<TScore>::Type const & scoreLimit(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(131)
+
+//____________________________________________________________________________
+// scoringScheme
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> TScore const & scoringScheme(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(124)
+
+//____________________________________________________________________________
+// setBeginPosition
+
+template <typename THaystack, typename TNeedle, typename TPosition> bool setBeginPosition(Finder<THaystack, Default> & finder, Pattern<TNeedle, Simple> & pattern, TPosition const & pos);       	// "projects/library/seqan/find2/find_exact_simple.h"(305)
+template <typename THaystack, typename TNeedle, typename TStringSetSpec, typename TPos> bool setBeginPosition(Finder<THaystack, Default> & finder, Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern, TPos const & pos);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(386)
+template <typename THaystack, typename TNeedle, typename TPosition> bool setBeginPosition(Finder<THaystack, Default> & finder, Pattern<TNeedle, HammingSimple> & pattern, TPosition const & pos);       	// "projects/library/seqan/find2/find_hamming_simple.h"(348)
+template <typename THaystack, typename TNeedle, typename TPosition> bool setBeginPosition(Finder<THaystack, Default> & finder, Pattern<TNeedle, ShiftAnd> & pattern, TPosition const & pos);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(455)
+
+//____________________________________________________________________________
+// setEndPosition
+
+template <typename THaystack, typename TNeedle, typename TPosition> bool setEndPosition(Finder<THaystack, Default> & finder, Pattern<TNeedle, Simple> & pattern, TPosition const & pos);       	// "projects/library/seqan/find2/find_exact_simple.h"(271)
+template <typename THaystack, typename TNeedle, typename TStringSetSpec, typename TPos> bool setEndPosition(Finder<THaystack, Default> & finder, Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern, TPos const & pos);       	// "projects/library/seqan/find2/find_multiple_exact_simple.h"(325)
+template <typename THaystack, typename TNeedle, typename TPosition> bool setEndPosition(Finder<THaystack, Default> & finder, Pattern<TNeedle, HammingSimple> & pattern, TPosition const & pos);       	// "projects/library/seqan/find2/find_hamming_simple.h"(311)
+template <typename THaystack, typename TNeedle, typename TPosition> bool setEndPosition(Finder<THaystack, Default> & finder, Pattern<TNeedle, WildShiftAnd> & pattern, TPosition const & pos);       	// "projects/library/seqan/find2/find_pattern_wild_shiftand.h"(236)
+template <typename THaystack, typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin> bool setEndPosition(Finder<THaystack, Default> & finder, Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern, typename Position<THaystack>::Type const & pos);       	// "projects/library/seqan/find2/find_approx_dpsearch.h"(456)
+template <typename THaystack, typename TNeedle> bool setEndPosition(Finder<THaystack, Default> & finder, Pattern<TNeedle, ShiftAnd> & pattern, typename Position<THaystack>::Type const & pos);       	// "projects/library/seqan/find2/find_exact_shiftand.h"(409)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/find2/find_approx_dpsearch.h b/src/SeqAn-1.3/seqan/find2/find_approx_dpsearch.h
new file mode 100644
index 0000000..60c250b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find_approx_dpsearch.h
@@ -0,0 +1,603 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Approximate string matching with linear and affine gap costs based
+// on Sellers' (Sellers, 1980) algorithm based on the Needleman-Wunsch
+// (Needleman and Wunsch, 1970) algorithm.  Described in the SeqAn book
+// Section 9.3.1, p.154ff.
+//
+//   Needleman, S. B. and C. D. Wunsch (1970).  A general method
+//     applicable to the search for similarities in the amino acid
+//     sequence of two proteins. J. Molecular Biol. 48, 443-453.
+//   Sellers, P. H. (1980).  The theory and computations of evolutionary
+//     distances: Pattern recognition. Journal of Algorithms 1, 359-373.
+// ==========================================================================
+
+#ifndef SEQAN_FIND2_FIND_APPROX_DPSEARCH_H_
+#define SEQAN_FIND2_FIND_APPROX_DPSEARCH_H_
+
+// TODO(holtgrew): Document accessor for scoring scheme on whitepaper?
+
+namespace seqan {
+
+struct FindInfix_;
+typedef Tag<FindInfix_> FindInfix;
+
+
+struct FindPrefix_;
+typedef Tag<FindPrefix_> FindPrefix;
+
+
+template <typename TScore, typename TSpec = FindInfix, typename TFindBeginPatternSpec = True>
+struct DPSearch;
+
+
+// The simple dynamic programming implementation following Sellers'
+// algorithm.
+//
+// TODO(holtgrew): Rename TScore to TScoringScheme?  Also: Rename Score class to ScoringScheme?
+// TODO(holtgrew): Support affine gap costs, documented in book, code does not allow this.
+// TODO(holtgrew): Add FindPrefix support.
+template <typename TNeedle_, typename TScore, typename TSpec, typename TSupportFindBegin>
+struct Pattern<TNeedle_, DPSearch<TScore, TSpec, TSupportFindBegin> >
+        : public ApproxFindBegin_<TNeedle_, TScore, TSupportFindBegin> {
+    typedef Pattern<TNeedle_, DPSearch<TScore, TSpec, TSupportFindBegin> > TPattern;
+    typedef TNeedle_ TNeedle;
+    typedef typename Value<TScore>::Type TScoreValue;
+    typedef String<TScoreValue> TMatrixColumn;
+
+    // The pattern's state.
+    FindState_::TState _state;
+
+    // The needle we work on.
+    Holder<TNeedle> _host;
+
+    // The minimal score of a match.
+    TScoreValue _scoreLimit;
+
+    // The scoring scheme to use.
+    TScore _scoringScheme;
+
+    // The current score of a match, in book: v.
+    TScoreValue _currentScore;
+
+    // The matrix column from the DP search algorithm.
+    TMatrixColumn _matrixColumn;
+
+    Pattern() : _state(FindState_::STATE_EMPTY) { SEQAN_CHECKPOINT; }
+
+    template <typename TNeedle2>
+    Pattern(TNeedle2 & needle, int scoreLimit)
+        : _state(FindState_::STATE_INITIAL), _host(needle), _scoreLimit(scoreLimit) {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_EQ_MSG(scoreGapOpen(_scoringScheme), scoreGapExtend(_scoringScheme), "The DPSearch Pattern only works with linear gap costs.");
+    }
+
+    template <typename TNeedle2>
+    Pattern(TNeedle2 & needle, int scoreLimit, TScore scoringScheme)
+        : _state(FindState_::STATE_INITIAL), _host(needle), _scoreLimit(scoreLimit),
+          _scoringScheme(scoringScheme) {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_EQ_MSG(scoreGapOpen(_scoringScheme), scoreGapExtend(_scoringScheme), "The DPSearch Pattern only works with linear gap costs.");
+    }
+};
+
+
+template <typename TNeedle, typename TScore, typename TSpec, typename TSupportFindBegin>
+struct ScoringScheme<Pattern<TNeedle, DPSearch<TScore, TSpec, TSupportFindBegin> > > {
+	typedef TScore Type;
+};
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+TScore const & scoringScheme(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    return pattern._scoringScheme;
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+typename Value<TScore>::Type const & scoreLimit(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    return pattern._scoreLimit;
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+typename Value<TScore>::Type const & score(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    // State of pattern should be in "found", "found begin" or "found
+    // no begin" state.
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_NOTFOUND);
+    return pattern._currentScore;
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+TNeedle const & host(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern._host);
+}
+
+
+// TODO(holtgrew): Workaround for default host implementation for non-const type.
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+TNeedle const & host(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    return host(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+TNeedle const & needle(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    return host(pattern);
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+typename Position<TNeedle>::Type length(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_BEGIN_FOUND || pattern._state == TPattern::STATE_FOUND);
+    return length(needle(pattern));
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return infix(needle(pattern), 0u, length(needle(pattern)));
+}
+
+
+// TODO(holtgrew): Workaround for default infix implementation for non-const type.
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    return infix(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_BEGIN_FOUND || pattern._state == TPattern::STATE_FOUND);
+    return begin(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default begin implementation for non-const type.
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    return begin(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_BEGIN_FOUND || pattern._state == TPattern::STATE_FOUND);
+    return end(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default end implementation for non-const type.
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    return end(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_BEGIN_FOUND || pattern._state == TPattern::STATE_FOUND);
+    return 0u;
+}
+
+
+// TODO(holtgrew): Workaround for default beginPosition implementation for non-const type.
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    return beginPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_BEGIN_FOUND || pattern._state == TPattern::STATE_FOUND);
+    return length(needle(pattern));
+}
+
+
+// TODO(holtgrew): Workaround for default endPosition implementation for non-const type.
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    return endPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+inline void _initPattern(Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern) {
+    SEQAN_CHECKPOINT;
+	typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TPattern>::Type TSize;
+	typedef typename TPattern::TMatrixColumn TMatrixColumn;
+	typedef typename Iterator<TMatrixColumn, Standard>::Type TIterator;
+	typedef typename Iterator<TNeedle, Standard>::Type TNeedleIterator;
+
+    // Get some shortcuts.
+	TScore const & myScoringScheme = scoringScheme(pattern);
+	TScoreValue const gapScore = scoreGap(myScoringScheme);
+	TMatrixColumn & matrixColumn = pattern._matrixColumn;
+
+	// Allocate memory for the matrix column and fill it with the
+    // scores for aligning with an end position of 0 and only deletes.
+	resize(matrixColumn, length(needle(pattern)));
+    TScoreValue s = gapScore;
+    for (TIterator it = begin(matrixColumn, Standard()); it != end(matrixColumn, Standard()); ++it) {
+        *it = s;
+        s += gapScore;
+    }
+    SEQAN_ASSERT_EQ(static_cast<TScoreValue>(length(needle(pattern)) + 1) * gapScore, s);
+}
+
+
+template <typename THaystack, typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+bool find(Finder<THaystack, Default> & finder,
+          Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    typedef typename Position<TNeedle>::Type TPosition;
+	typedef typename Value<TScore>::Type TScoreValue;
+
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+
+    // Do not continue if the state is "not found".
+    if (finder._state == TPattern::STATE_NOTFOUND)
+        return false;
+    // Initialize finder and pattern if state is "initial".  Otherwise
+    // advance at least by one (if not set to of haystack with
+    // setEndPosition()).
+    if (finder._state == TPattern::STATE_INITIAL) {
+        finder._beginPosition = 0u;
+        finder._endPosition = 0u;
+        _initPattern(pattern);
+    } else if (finder._state == TPattern::STATE_NO_HIT) {
+        if (finder._endPosition == length(haystack(finder)))
+            return false;
+    }
+
+    // The actual find implementation follows.
+    //
+    // Get some shortcuts.
+    TScore const & myScore = scoringScheme(pattern);
+
+    // Search for the next match.
+    for (TPosition j = finder._endPosition; j < length(haystack(finder)); ++j) {
+        // Compute best score if the end of needle would align at j.
+        // pattern._currentScore is the "v" from the book.  This
+        // initialization depends on whether we are doing a prefix
+        // search or an infix search.
+        TScoreValue d = IsSameType<TDPSearchSpec, FindInfix>::VALUE ? 0 : (j * scoreGap(myScore));
+        pattern._currentScore = IsSameType<TDPSearchSpec, FindInfix>::VALUE ? 0 : ((j + 1) * scoreGap(myScore));
+        for (TPosition i = 0; i < length(pattern._matrixColumn); ++i) {
+            TScoreValue h = pattern._matrixColumn[i];
+            pattern._currentScore = _max(d + score(myScore, haystack(finder)[j], needle(pattern)[i]),
+                                         _max(pattern._currentScore, h) + scoreGap(myScore));
+            pattern._matrixColumn[i] = pattern._currentScore;
+            d = h;
+        }
+        if (pattern._currentScore >= scoreLimit(pattern)) {
+            // Found a match, update the state and report the match.
+            finder._state = TFinder::STATE_FOUND;
+            pattern._state = TPattern::STATE_FOUND;
+            // Update finder._endPosition to end instead of "last" position.
+            finder._endPosition = j + 1;
+            return true;
+        }
+    }
+    // No match found, update state accordingly.
+    finder._state = TFinder::STATE_NOTFOUND;
+    pattern._state = TPattern::STATE_NOTFOUND;
+	return false;
+}
+
+
+// findBeginScore() only works if the Pattern object has the necessary
+// state information via ApproxFindBegin_<..., True>.
+template <typename TNeedle, typename TScore>
+typename Value<typename ScoringScheme<Pattern<TNeedle, DPSearch<TScore, FindInfix, True> > >::Type>::Type
+findBeginScore(Pattern<TNeedle, DPSearch<TScore, FindInfix, True> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, FindInfix, True> > TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return pattern._findBeginCurrentScore;
+}
+
+
+// findBeginScore() also works if we are doing a prefix search.  In
+// this case, findBegin() is superflous.
+template <typename TNeedle, typename TScore, typename TFindBeginSpec>
+typename Value<typename ScoringScheme<Pattern<TNeedle, DPSearch<TScore, FindPrefix, TFindBeginSpec> > >::Type>::Type
+findBeginScore(Pattern<TNeedle, DPSearch<TScore, FindPrefix, TFindBeginSpec> > const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, DPSearch<TScore, FindPrefix, TFindBeginSpec> > TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return score(pattern);
+}
+
+
+// findBegin() only works if the Pattern object has the necessary
+// state information via ApproxFindBegin_<..., True>
+template <typename THaystack, typename TNeedle, typename TScore, typename TFindBeginScoreLimitTag>
+bool findBegin(Finder<THaystack, Default> & finder,
+               Pattern<TNeedle, DPSearch<TScore, FindInfix, True> > & pattern,
+               TFindBeginScoreLimitTag const & tag) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, DPSearch<TScore, FindInfix, True> > TPattern;
+    // State of finder and pattern should be in sync and in "found" or
+    // "found begin" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    // Initialize findBegin() data if necessary.
+    if (pattern._state == TPattern::STATE_FOUND)
+        _initFindBegin(pattern, length(needle(pattern)), scoringScheme(pattern), scoreLimit(pattern));
+    bool res = _findBeginImpl(pattern, scoringScheme(pattern), score(pattern), endPosition(finder), haystack(finder), needle(pattern), tag);
+    if (res) {
+        finder._state = TFinder::STATE_BEGIN_FOUND;
+        pattern._state = TPattern::STATE_BEGIN_FOUND;
+        finder._beginPosition = finder._endPosition - pattern._findBeginMatchLength;
+    }
+    return res;
+}
+
+
+// findBegin() also works if we are doing a prefix search only.  In
+// this case, an actual search is superflous and we can always return
+// true after updating the state.
+template <typename THaystack, typename TNeedle, typename TScore, typename TFindBeginSpec, typename TFindBeginScoreLimitTag>
+bool findBegin(Finder<THaystack, Default> & finder,
+               Pattern<TNeedle, DPSearch<TScore, FindPrefix, TFindBeginSpec> > & pattern,
+               TFindBeginScoreLimitTag const &) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, DPSearch<TScore, FindPrefix, TFindBeginSpec> > TPattern;
+    // State of finder and pattern should be in sync and in "found" or
+    // "found begin" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    finder._beginPosition = 0;
+    if (pattern._state == TPattern::STATE_FOUND) {
+        finder._state = TFinder::STATE_BEGIN_FOUND;
+        pattern._state = TPattern::STATE_BEGIN_FOUND;
+        return true;
+    } else {
+        finder._state = TFinder::STATE_BEGIN_NOTFOUND;
+        pattern._state = TPattern::STATE_BEGIN_NOTFOUND;
+        return false;
+    }
+}
+
+
+// If not given,t he find begin score limit tag is FindBeginScore and
+// the score from the find() search is used for the score limit of the
+// findBegin() search.
+template <typename THaystack, typename TNeedle, typename TScore, typename TDPSearchSpec>
+bool findBegin(Finder<THaystack, Default> & finder,
+               Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, True> > & pattern) {
+    SEQAN_CHECKPOINT;
+    return findBegin(finder, pattern, UseScore());
+}
+
+
+// The execution of this function is costly, O(length(needle)) for most realistic scoring schemes.
+template <typename THaystack, typename TNeedle, typename TScore, typename TDPSearchSpec, typename TSupportFindBegin>
+bool setEndPosition(Finder<THaystack, Default> & finder,
+                    Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > & pattern,
+                    typename Position<THaystack>::Type const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef typename Position<THaystack>::Type TPosition;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, TSupportFindBegin> > TPattern;
+    typedef typename Value<TScore>::Type TScoreValue;
+    typedef typename Iterator<TNeedle, Standard>::Type TIterator;
+    SEQAN_ASSERT_LEQ_MSG(pos, length(haystack(finder)), "End position must be valid.");
+    SEQAN_ASSERT_EQ_MSG(scoreGapOpen(pattern._scoringScheme), scoreGapExtend(pattern._scoringScheme), "The DPSearch Pattern only works with linear gap costs.");
+
+    // Get some shortcuts.
+    TScore const & myScore = scoringScheme(pattern);
+
+    // In order to correctly initialize the matrix column, we have to
+    // start far enough left and perform some DP steps.  The exact
+    // number of steps depends on the scoring scheme.
+    //
+    // We make the assumption that the highest score is achieved if
+    // all entries of the needle are matched with themselves.  This
+    // score is taken as the base number for the computation.  We then
+    // compute how many indels X are required to make the score fall
+    // below the score limit.  We then start the DP search
+    // length(needle) + X positions left of position and search until
+    // the pattern's end aligns at pos.
+    //
+    // Start with computing the "base score" and getting the gap score.
+    TScoreValue baseScore = -pattern._scoreLimit;
+    for (TIterator it = begin(needle(pattern), Standard()); it != end(needle(pattern), Standard()); ++it)
+        baseScore += score(myScore, *it, *it);
+    TScoreValue gapScore = scoreGap(myScore);
+    // In the worst case, the search start position is 0.  This is the
+    // case if the gap penalty is non-negative or we are doing a
+    // prefix search.  Otherwise, compute the search start position.
+    TPosition searchStartPosition = 0;
+    if (!IsSameType<TDPSearchSpec, FindPrefix>::VALUE) {
+        double frac = (gapScore == 0) ? 1.0 : (1.0 * baseScore / gapScore);
+        if (frac <= 0.0) {
+            TPosition delta = length(needle(pattern)) - static_cast<TPosition>(frac);
+            if (delta < pos)
+                searchStartPosition = pos - delta;
+        }
+    }
+
+    // Re-initialize the pattern.
+    _initPattern(pattern);
+
+    // Perform the DP search until the pattern aligns at pos.
+    //
+    // Search for the next match.
+    TPosition j;
+    for (j = searchStartPosition; j < pos; ++j) {
+        // Compute best score if the end of needle would align at j.
+        // pattern._currentScore is the "v" from the book.
+        TScoreValue d = IsSameType<TDPSearchSpec, FindInfix>::VALUE ? 0 : (j * scoreGap(myScore));
+        pattern._currentScore = IsSameType<TDPSearchSpec, FindInfix>::VALUE ? 0 : ((j + 1) * scoreGap(myScore));
+        for (TPosition i = 0; i < length(pattern._matrixColumn); ++i) {
+            TScoreValue h = pattern._matrixColumn[i];
+            pattern._currentScore = _max(d + score(myScore, haystack(finder)[j], needle(pattern)[i]),
+                                         _max(pattern._currentScore, h) + scoreGap(myScore));
+            pattern._matrixColumn[i] = pattern._currentScore;
+            d = h;
+        }
+    }
+    // Update finder._endPosition to end instead of "last" position.
+    finder._endPosition = j;
+    // Update the state and return value depending on whether pos is a hit.
+    if (pattern._currentScore >= scoreLimit(pattern)) {
+        // Found a match, update the state and report the match.
+        finder._state = TFinder::STATE_FOUND;
+        pattern._state = TPattern::STATE_FOUND;
+        return true;
+    } else {
+        // Found no match.
+        finder._state = TFinder::STATE_NO_HIT;
+        pattern._state = TPattern::STATE_NO_HIT;
+        return false;
+    }
+}
+
+
+// Build the alignment resulting from the search result as specified by the
+// finder and the pattern.  If the state is not "begin found" then no alignment
+// is built and false is returned.
+//
+// The alignment can only be built if the Pattern has the necessary state
+// information.  This function is pretty costly since we internally use the
+// Needleman-Wunsch alignment algorithm for generating the alignment between
+// the computed begin and end positions in pattern and haystack.
+template <typename THaystack, typename TNeedle, typename TScore, typename TDPSearchSpec, typename TAlignSeq, typename TAlignSpec>
+bool buildAlignment(Finder<THaystack, Default> &finder,
+                    Pattern<TNeedle, DPSearch<TScore, TDPSearchSpec, True> > &pattern,
+                    Align<TAlignSeq, TAlignSpec> &outAlignment) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    typedef Align<TAlignSeq, TAlignSpec> TAlign;
+    typedef typename Row<TAlign>::Type TRow;
+    typedef typename Value<TScore>::Type TScoreValue;
+    typedef typename Position<THaystack>::Type TPosition;
+
+    // Both finder and pattern must be in the "found begin position" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // Can only build alignment if the state is "begin found".
+    if (finder._state != TFinder::STATE_BEGIN_FOUND)
+        return false;
+
+    // Initialize alignment with the two sequences.
+    resize(rows(outAlignment), 2);
+    assignSource(row(outAlignment, 0), haystack(finder));
+    assignSource(row(outAlignment, 1), needle(pattern));
+    // Now shift the needle's beginning to the begin position.
+    insertGaps(row(outAlignment, 1), 0, beginPosition(finder));
+
+    // Build the alignment with the matching infixes of finder and pattern.
+    typedef Align<Segment<THaystack const, InfixSegment> > TTempAlign;
+    TTempAlign tempAlignment;
+    resize(rows(tempAlignment), 2);
+    assignSource(row(tempAlignment, 0), infix(finder));
+    assignSource(row(tempAlignment, 1), infix(pattern));
+    globalAlignment(tempAlignment, scoringScheme(pattern));
+//     std::cout << tempAlignment;
+
+    // Copy over the gaps from the alignment.
+    typedef typename Cols<TTempAlign>::Type TColumns;
+    typedef typename Iterator<TColumns>::Type TIterator;
+    TPosition i = beginPosition(finder);
+//     std::cout << "length(cols(tempAlignment)) = " << length(cols(tempAlignment)) << std::endl;
+    // TODO(holtgrew): This does not work as expected.
+    for (TPosition j = 0; j < length(cols(tempAlignment)); ++j) {
+        if (value(col(tempAlignment, j), 0) == '-') {
+//             std::cout << "j = " << j << ", insertGaps(row(outAlignment, 0), " << i << ", 1)" << std::endl;
+            insertGaps(row(outAlignment, 0), i, 1);
+            i += 1;
+        } else if (value(col(tempAlignment, j), 1) == '-') {
+//             std::cout << "j = " << j << ", insertGaps(row(outAlignment, 1), " << i << ", 1)" << std::endl;
+            insertGaps(row(outAlignment, 1), i, 1);
+            i += 1;
+        }
+        i += 1;
+    }
+//     std::cout << tempAlignment;
+
+    return true;
+}
+
+}  // namespace seqan
+          
+#endif  // SEQAN_FIND2_FIND_APPROX_DPSEARCH_H_
diff --git a/src/SeqAn-1.3/seqan/find2/find_approx_find_begin.h b/src/SeqAn-1.3/seqan/find2/find_approx_find_begin.h
new file mode 100644
index 0000000..45b2f56
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find_approx_find_begin.h
@@ -0,0 +1,223 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// A simple implementation of the algorithms and datastructures required for
+// findBegin().  It is a "backwards" implementation of Sellers' algorithm (see
+// find_approx_dpsearch.h for references) for approximate prefix search.
+//
+// In order to support findBegin(), the approximate DP-based algorithms need
+// to store more information than only for the forward search.  If findBegin()
+// does not need to be supported, this information does not have to be stored.
+// For this reason, the functionality is centralized in the struct template
+// ApproxFindBegin_ that is to be used as the base class for the approximate
+// search patterns.
+//
+// If the parameter HasFindBeginSupport is set to True then the class gets the
+// information and functionality for findBegin(), if it is set to False, it
+// does not get this information.
+// ============================================================================
+
+#ifndef SEQAN_FIND2_FIND_APPROX_DPSEARCH_
+#define SEQAN_FIND2_FIND_APPROX_DPSEARCH_
+
+namespace seqan {
+
+// TODO(holtgrew): Add support for affine gap costs.
+template <typename TNeedle, typename TScore, typename HasFindBeginSupport>
+struct ApproxFindBegin_;
+
+
+// Implementation for no findBegin() support.
+template <typename TNeedle, typename TScore>
+struct ApproxFindBegin_<TNeedle, TScore, False> {};
+
+
+// Implementation for findBegin() support.
+template <typename TNeedle, typename TScore>
+struct ApproxFindBegin_<TNeedle, TScore, True> : public FindState_ {
+    // We use the position of the needle for the finder, too.  This is
+    // the best we can do with the split-up interface.
+    typedef typename Position<TNeedle>::Type TPosition;
+    // We will use a matrix column of score values for the dynamic
+    // programming and types for this.
+    typedef typename Value<TScore>::Type TScoreValue;
+    typedef String<TScoreValue> TMatrixColumn;
+
+    // The length of the match for findBegin().
+    TPosition _findBeginMatchLength;
+
+    // The score limit when searching backwards.
+    int _findBeginScoreLimit;
+
+    // The current score of the findBegin() call.
+    int _findBeginCurrentScore;
+
+    // The matrix column for the findBegin computation.
+    TMatrixColumn _findBeginMatrixColumn;
+
+    // The state of the begin search.
+    TState _findBeginState;
+};
+
+
+// Tag for findBegin().  Use score of forward search result when doing
+// find begin.
+struct UseScore_;
+typedef Tag<UseScore_> UseScore;
+
+
+// Tag for findBegin().  Use score limit of forward search when
+// doing find begin.
+struct UseScoreLimit_;
+typedef Tag<UseScoreLimit_> UseScoreLimit;
+
+
+// Called to initialize a ApproxFindBegin_ datastructure.
+template <typename TNeedle, typename TScore>
+void _initFindBegin(ApproxFindBegin_<TNeedle, TScore, True> & findBeginStruct,
+                    typename Position<TNeedle>::Type const & needleLength, TScore const & scoringScheme, int scoreLimit) {
+    SEQAN_CHECKPOINT;
+    typedef ApproxFindBegin_<TNeedle, TScore, True> TApproxFindBegin;
+    typedef typename Position<TNeedle>::Type TPosition;
+    typedef typename Value<TScore>::Type TScoreValue;
+    typedef String<TScoreValue> TMatrixColumn;
+    typedef typename Iterator<TMatrixColumn>::Type TIterator;
+
+    SEQAN_ASSERT_EQ_MSG(scoreGapOpen(scoringScheme), scoreGapOpen(scoringScheme), "findBegin() only supports linear gap costs at the moment.");
+
+    // Assumption: The end position must have been found already!  The
+    // caller has to ensure this.
+    findBeginStruct._findBeginState = TApproxFindBegin::STATE_FOUND;
+    findBeginStruct._findBeginMatchLength = 0;
+    findBeginStruct._findBeginScoreLimit = scoreLimit;
+    // Re-initialize the matrix column.
+    resize(findBeginStruct._findBeginMatrixColumn, needleLength);
+    TScoreValue gapValue = scoreGap(scoringScheme);
+    for (TIterator it = begin(findBeginStruct._findBeginMatrixColumn, Standard()); it != end(findBeginStruct._findBeginMatrixColumn, Standard()); ++it) {
+        *it = gapValue;
+        gapValue += scoreGap(scoringScheme);
+    }
+}
+
+
+template <typename TNeedle, typename TScore>
+inline typename Value<TScore>::Type _findBeginScoreLimit(ApproxFindBegin_<TNeedle, TScore, True> const &,
+                                                  typename Value<TScore>::Type const & findScore,
+                                                  typename Value<TScore>::Type const &,
+                                                  UseScore const &) {
+    SEQAN_CHECKPOINT;
+    return findScore;
+}
+
+
+template <typename TNeedle, typename TScore>
+inline typename Value<TScore>::Type _findBeginScoreLimit(ApproxFindBegin_<TNeedle, TScore, True> const &,
+                                                  typename Value<TScore>::Type const &,
+                                                  typename Value<TScore>::Type const & findScoreLimit,
+                                                  UseScoreLimit const &) {
+    SEQAN_CHECKPOINT;
+    return findScoreLimit;
+}
+
+
+// Actual implementation of findBegin() through ApproxFindBegin_.
+template <typename TNeedle, typename TScore, typename THaystack, typename TTag>
+bool _findBeginImpl(ApproxFindBegin_<TNeedle, TScore, True> & findBeginStruct,
+                    TScore const & scoringScheme,
+                    typename Value<TScore>::Type const & findScore,
+                    typename Position<TNeedle>::Type const & endPosition,
+                    THaystack const & haystack, TNeedle const & needle,
+                    Tag<TTag> const & tag) {
+    SEQAN_CHECKPOINT;
+    typedef ApproxFindBegin_<TNeedle, TScore, True> TApproxFindBegin;
+    typedef typename Position<TNeedle>::Type TPosition;
+    typedef typename Value<TScore>::Type TScoreValue;
+    SEQAN_ASSERT_EQ_MSG(scoreGapOpen(scoringScheme), scoreGapExtend(scoringScheme), "findBegin() only supports linear gap costs at the moment.");
+
+    // Finding the start of the match follows Seller's algorithm but
+    // works from the right to the left.
+
+    // TODO(holtgrew): Remove all commented out debug output code from this function.
+//     std::cout << "== start of findBegin() == " << std::endl;
+//     for (unsigned i = 0; i < length(findBeginStruct._findBeginMatrixColumn); ++i)
+//         std::cout << findBeginStruct._findBeginMatrixColumn[i] << " ";
+//     std::cout << std::endl;
+//     std::cout << "=====" << std::endl;
+
+    TScoreValue findBeginScoreLimit = _findBeginScoreLimit(findBeginStruct, findScore, findBeginStruct._findBeginScoreLimit, tag);
+
+    // Search for the next match.
+    for (TPosition & j = findBeginStruct._findBeginMatchLength; j < endPosition; ++j) {
+        // Compute best score if the begin of the match was j position
+        // left of the end.
+        findBeginStruct._findBeginCurrentScore = (j + 1) * scoreGap(scoringScheme);  // is v in SeqAn book
+        TScoreValue d = (j) * scoreGap(scoringScheme);
+        for (TPosition i = 0; i < length(findBeginStruct._findBeginMatrixColumn); ++i) {
+            TScoreValue h = findBeginStruct._findBeginMatrixColumn[i];
+            findBeginStruct._findBeginCurrentScore = _max(d + score(scoringScheme, haystack[endPosition - j - 1], needle[length(needle) - 1 - i]),
+                                                          _max(findBeginStruct._findBeginCurrentScore, h) + scoreGap(scoringScheme));
+            findBeginStruct._findBeginMatrixColumn[i] = findBeginStruct._findBeginCurrentScore;
+            d = h;
+        }
+//         std::cout << "== within of findBegin() == " << std::endl;
+//         for (unsigned i = 0; i < length(findBeginStruct._findBeginMatrixColumn); ++i)
+//             std::cout << findBeginStruct._findBeginMatrixColumn[i] << " ";
+//         std::cout << std::endl;
+//         std::cout << "=====" << std::endl;
+        if (findBeginStruct._findBeginCurrentScore >= findBeginScoreLimit) {
+//             std::cout << "== end of findBegin() == " << std::endl;
+//             for (unsigned i = 0; i < length(findBeginStruct._findBeginMatrixColumn); ++i)
+//                 std::cout << findBeginStruct._findBeginMatrixColumn[i] << " ";
+//             std::cout << std::endl;
+//             std::cout << "=====" << std::endl;
+            findBeginStruct._findBeginMatchLength += 1;
+            // Found a match, update the state and report the match.
+            findBeginStruct._findBeginState = TApproxFindBegin::STATE_BEGIN_FOUND;
+            return true;
+        }
+    }
+
+//     std::cout << "== end of findBegin() == " << std::endl;
+//     for (unsigned i = 0; i < length(findBeginStruct._findBeginMatrixColumn); ++i)
+//         std::cout << findBeginStruct._findBeginMatrixColumn[i] << " ";
+//     std::cout << std::endl;
+//     std::cout << "=====" << std::endl;
+
+    // No match found, update state accordingly.
+    findBeginStruct._findBeginState = TApproxFindBegin::STATE_BEGIN_NOTFOUND;
+	return false;
+}
+
+}
+
+#endif  // SEQAN_FIND2_FIND_APPROX_DPSEARCH_
diff --git a/src/SeqAn-1.3/seqan/find2/find_base.h b/src/SeqAn-1.3/seqan/find2/find_base.h
new file mode 100644
index 0000000..c6b471c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find_base.h
@@ -0,0 +1,83 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Basic definitions and types for the find module.
+// ==========================================================================
+
+#ifndef SEQAN_FIND2_FIND_BASE_H_
+#define SEQAN_FIND2_FIND_BASE_H_
+
+namespace seqan {
+
+// Contains the state for finder and patterns.
+struct FindState_ {
+    enum TState {
+        STATE_EMPTY,           // Finder/pattern is empty.
+        STATE_INITIAL,         // Finer/pattern has just been initialized.
+        STATE_FOUND,           // Found the end position of a hit.
+        STATE_NOTFOUND,        // No hit found, no more hits possible.
+        STATE_BEGIN_FOUND,     // Found begin position.
+        STATE_BEGIN_NOTFOUND,  // Found end but not begin, should not happen.
+        STATE_NO_HIT           // Set manually to non-hit.
+    };
+};
+
+
+template <typename TNeedle, typename TSpec>
+struct Pattern;
+
+
+template <typename THaystack, typename TSpec = Default>
+struct Finder;
+
+
+template <typename TPattern>
+struct Needle;
+
+
+template <typename TNeedle, typename TSpec>
+struct Needle<Pattern<TNeedle, TSpec> > {
+    typedef TNeedle Type;
+};
+
+
+// Metafunction for retrieving scoring schemes.
+template <typename TPattern>
+struct ScoringScheme;
+
+
+// TODO(holtgrew): Implement HasFeature<TPattern, SetEndPosition> and HasFeature<TPattern, SetBeginPosition>, HasFeature<TPattern, ScoreLimit>, HasFeature<TPattern, Score>?
+
+}  // namespace seqan
+
+#endif  // SEQAN_FIND2_FIND_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/find2/find_exact_shiftand.h b/src/SeqAn-1.3/seqan/find2/find_exact_shiftand.h
new file mode 100644
index 0000000..656a44c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find_exact_shiftand.h
@@ -0,0 +1,495 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Exact pattern matching using the Shift-And algorithm.
+// ==========================================================================
+
+#ifndef SEQAN_FIND2_FIND_EXACT_SHIFTAND_H_
+#define SEQAN_FIND2_FIND_EXACT_SHIFTAND_H_
+
+// TODO(holtgrew): Try to achieve a speedup using the LongWord class.
+
+namespace seqan {
+
+struct ShiftAnd_;
+typedef Tag<ShiftAnd_> ShiftAnd;
+
+
+template <typename TNeedle_>
+struct Pattern<TNeedle_, ShiftAnd> : FindState_ {
+    typedef TNeedle_ TNeedle;
+    typedef unsigned TWord;
+
+    // The pattern's state.
+    TState _state;
+
+    // The needle we store.
+    Holder<TNeedle> _host;
+    
+    String<TWord> _table;         // Lookup table for each character in the alphabet (called B in "Navarro")
+    String<TWord> _prefSufMatch;  // Set of all the prefixes of needle that match a suffix of haystack (called D in "Navarro")
+    TWord _blockCount;            // number of unsigneds required to store needle  
+
+
+    Pattern() : _state(STATE_EMPTY) {
+        SEQAN_CHECKPOINT;
+    }
+
+    explicit
+    Pattern(TNeedle & ndl)
+        : _state(STATE_INITIAL),
+          _host(ndl) {
+        SEQAN_CHECKPOINT;
+        _initPattern(*this);
+    }
+};
+
+
+template <typename TNeedle>
+struct Needle<Pattern<TNeedle, ShiftAnd> > {
+    typedef TNeedle Type;
+};
+
+
+template <typename TNeedle>
+void _initPattern(Pattern<TNeedle, ShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+	typedef typename TPattern::TWord TWord;
+	typedef typename Position<TNeedle>::Type TPosition;
+	typedef typename Value<TNeedle>::Type TAlphabet;
+
+    // Get some shortcuts.
+    TNeedle const & ndl = needle(pattern);
+    TPosition needleLength = length(ndl);
+    // Compute number of blocks required for the bitmasks.
+    pattern._blockCount = needleLength / BitsPerValue<TWord>::VALUE;
+    if (needleLength % BitsPerValue<TWord>::VALUE > 0)
+        pattern._blockCount += 1;
+    // Resize and initialize the "match/mismatch" word.
+	resize(pattern._prefSufMatch, pattern._blockCount, 0u, Exact());
+    // Resize and initialize the bitmask table.
+	resize(pattern._table, pattern._blockCount * ValueSize<TAlphabet>::VALUE, 0u, Exact());
+	for (TWord j = 0; j < needleLength; ++j) {
+		// Determine character position in array table.
+		TWord pos = ordValue(getValue(ndl, j));
+		pattern._table[pattern._blockCount * pos + j / BitsPerValue<TWord>::VALUE] |= (1 << (j % BitsPerValue<TWord>::VALUE));
+	}
+}
+
+
+template <typename TNeedle>
+TNeedle const & host(Pattern<TNeedle, ShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern._host);
+}
+
+
+// TODO(holtgrew): Workaround for default host implementation for non-const type.
+template <typename TNeedle>
+TNeedle const & host(Pattern<TNeedle, ShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    return host(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle>
+TNeedle const & needle(Pattern<TNeedle, ShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern._host);
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type length(Pattern<TNeedle, ShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return length(needle(pattern));
+}
+
+
+template <typename TNeedle>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, ShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return infix(needle(pattern), 0u, length(needle(pattern)));
+}
+
+
+// TODO(holtgrew): Workaround for default infix implementation for non-const type.
+template <typename TNeedle>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, ShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    return infix(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, ShiftAnd> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return begin(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default begin implementation for non-const type.
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, ShiftAnd> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    return begin(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, ShiftAnd> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return end(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default end implementation for non-const type.
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, ShiftAnd> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    return end(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, ShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return 0u;
+}
+
+
+// TODO(holtgrew): Workaround for default beginPosition implementation for non-const type.
+template <typename TNeedle>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, ShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    return beginPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, ShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return length(needle(pattern));
+}
+
+
+// TODO(holtgrew): Workaround for default endPosition implementation for non-const type.
+template <typename TNeedle>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, ShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    return endPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename THaystack, typename TNeedle>
+inline bool _findShiftAndSmallNeedle(Finder<THaystack, Default> & finder,
+                                       Pattern<TNeedle, ShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+	typedef typename Value<TNeedle>::Type TValue;
+	typedef unsigned int TWord;
+    typedef typename Position<TNeedle>::Type TPosition;
+    THaystack const & hstck = haystack(finder);
+    TPosition needleLength = length(needle(pattern));
+    TPosition haystackLength = length(hstck);
+	TWord compare = 1 << (needleLength - 1);
+	while (finder._endPosition < haystackLength) {
+		TWord pos = ordValue(hstck[finder._endPosition]);
+		pattern._prefSufMatch[0] = ((pattern._prefSufMatch[0] << 1) | 1) & pattern._table[pattern._blockCount * pos];
+		if ((pattern._prefSufMatch[0] & compare) != 0)
+			return true;
+        finder._endPosition += 1;
+	}
+	return false;
+}
+
+
+template <typename THaystack, typename TNeedle>
+inline bool _findShiftAndLargeNeedle(Finder<THaystack, Default> & finder,
+                                      Pattern<TNeedle, ShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+	typedef typename Value<TNeedle>::Type TValue;
+	typedef unsigned int TWord;
+    typedef typename Position<TNeedle>::Type TPosition;
+    THaystack const & hstck = haystack(finder);
+    TPosition needleLength = length(needle(pattern));
+    TPosition haystackLength = length(hstck);
+	TWord compare = 1 << ((needleLength - 1) % BitsPerValue<TWord>::VALUE);
+	while (finder._endPosition < haystackLength) {
+		TWord pos = ordValue(hstck[finder._endPosition]);
+		TWord carry = 1;
+		for (TWord block = 0; block < pattern._blockCount; ++block) {
+			bool newCarry = (pattern._prefSufMatch[block] & (1 << (BitsPerValue<TWord>::VALUE - 1))) != 0;
+			pattern._prefSufMatch[block] <<= 1;
+			pattern._prefSufMatch[block] |= carry;
+			carry = newCarry;
+		}
+		for (TWord block = 0; block < pattern._blockCount; ++block)
+            pattern._prefSufMatch[block] &= pattern._table[pattern._blockCount * pos + block];
+		if ((pattern._prefSufMatch[pattern._blockCount - 1] & compare) != 0)
+			return true; 
+        finder._endPosition += 1;
+	}
+	return false;
+}
+
+
+template <typename THaystack, typename TNeedle>
+inline bool find(Finder<THaystack, Default> & finder,
+                 Pattern<TNeedle, ShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    typedef typename Position<TNeedle>::Type TPosition;
+
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+
+    // Do not continue if the state is "not found".
+    if (finder._state == TPattern::STATE_NOTFOUND)
+        return false;
+    // Initialize finder if state is "initial".  Otherwise advance at
+    // least by one (if not set to of haystack with setEndPosition()).
+    if (finder._state == TPattern::STATE_INITIAL) {
+        finder._endPosition = 0;
+    } else if (finder._state == TPattern::STATE_NO_HIT) {
+        // Only advance if not at end if set manually to a "no hit" position.
+        if (finder._endPosition == length(haystack(finder))) {
+            finder._state = TPattern::STATE_NOTFOUND;
+            return false;
+        }
+    }
+
+    bool res;
+    if (pattern._blockCount == 1)
+        res = _findShiftAndSmallNeedle(finder, pattern);
+    else
+        res = _findShiftAndLargeNeedle(finder, pattern);
+    // Advance end position to make an "end" position from a "last" position.
+    finder._endPosition += 1;
+    if (res) {
+        finder._beginPosition = finder._endPosition - length(needle(pattern));
+        finder._state = TFinder::STATE_FOUND;
+        pattern._state = TPattern::STATE_FOUND;
+        return true;
+    } else {
+        finder._state = TFinder::STATE_NOTFOUND;
+        pattern._state = TPattern::STATE_NOTFOUND;
+        return false;
+    }
+}
+
+
+template <typename THaystack, typename TNeedle>
+bool findBegin(Finder<THaystack, Default> & finder,
+               Pattern<TNeedle, ShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    // State of finder and pattern should be in sync and in "found" or
+    // "found begin" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    if (pattern._state == TPattern::STATE_FOUND) {
+        finder._state = TFinder::STATE_BEGIN_FOUND;
+        pattern._state = TPattern::STATE_BEGIN_FOUND;
+        return true;
+    }
+    finder._state = TFinder::STATE_BEGIN_NOTFOUND;
+    pattern._state = TPattern::STATE_BEGIN_NOTFOUND;
+    return false;
+}
+
+
+
+template <typename THaystack, typename TNeedle>
+inline bool _setEndPositionShiftAndSmallNeedle(Finder<THaystack, Default> & finder,
+                                                 Pattern<TNeedle, ShiftAnd> & pattern,
+                                                 typename Position<THaystack>::Type const & pos) {
+    SEQAN_CHECKPOINT;
+	typedef typename Value<TNeedle>::Type TValue;
+    typedef typename Position<THaystack>::Type TPosition;
+	typedef unsigned int TWord;
+    THaystack const & hstck = haystack(finder);
+    TPosition needleLength = length(needle(pattern));
+	TWord compare = 1 << (needleLength - 1);
+	while (finder._endPosition < pos) {
+		TWord pos = ordValue(hstck[finder._endPosition]);
+		pattern._prefSufMatch[0] = ((pattern._prefSufMatch[0] << 1) | 1) & pattern._table[pattern._blockCount * pos];
+        finder._endPosition += 1;
+	}
+	return (pattern._prefSufMatch[0] & compare) != 0;
+}
+
+
+template <typename THaystack, typename TNeedle>
+inline bool _setEndPositionShiftAndLargeNeedle(Finder<THaystack, Default> & finder,
+                                                Pattern<TNeedle, ShiftAnd> & pattern,
+                                                typename Position<THaystack>::Type const & pos) {
+    SEQAN_CHECKPOINT;
+	typedef typename Value<TNeedle>::Type TValue;
+	typedef unsigned int TWord;
+    typedef typename Position<TNeedle>::Type TPosition;
+    THaystack const & hstck = haystack(finder);
+    TPosition needleLength = length(needle(pattern));
+	TWord compare = 1 << ((needleLength - 1) % BitsPerValue<TWord>::VALUE);
+	while (finder._endPosition < pos) {
+		TWord pos = ordValue(hstck[finder._endPosition]);
+		TWord carry = 1;
+		for (TWord block = 0; block < pattern._blockCount; ++block) {
+			bool newCarry = (pattern._prefSufMatch[block] & (1 << (BitsPerValue<TWord>::VALUE - 1))) != 0;
+			pattern._prefSufMatch[block] <<= 1;
+			pattern._prefSufMatch[block] |= carry;
+			carry = newCarry;
+		}
+		for (TWord block = 0; block < pattern._blockCount; ++block)
+            pattern._prefSufMatch[block] &= pattern._table[pattern._blockCount * pos + block];
+        finder._endPosition += 1;
+	}
+	return ((pattern._prefSufMatch[pattern._blockCount - 1] & compare) != 0);
+}
+
+
+// Sets end position and adjusts the bit pattern state.
+template <typename THaystack, typename TNeedle>
+bool setEndPosition(Finder<THaystack, Default> & finder,
+                    Pattern<TNeedle, ShiftAnd> & pattern,
+                    typename Position<THaystack>::Type const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    typedef typename Position<THaystack>::Type TPosition;
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // End position must not be right of the end of the haystack.
+    SEQAN_ASSERT_LEQ(static_cast<typename MakeUnsigned_<TPosition>::Type>(pos), length(haystack(finder)));
+    // Begin position must not be left of the beginning of the haystack.
+    SEQAN_ASSERT_GEQ(static_cast<typename MakeUnsigned_<TPosition>::Type>(pos), length(needle(pattern)));
+
+    // Set finder's end position if it is in the initial state.
+    if (finder._state == TPattern::STATE_INITIAL)
+        finder._endPosition = 0;
+
+    // Set the end position to the start position and search from
+    // there until pos is reached.
+    if (finder._endPosition > pos)
+        finder._endPosition = finder._endPosition - pos;
+    else
+        finder._endPosition = 0u;
+
+    bool ret;
+    if (pattern._blockCount == 1)
+        ret = _setEndPositionShiftAndSmallNeedle(finder, pattern, pos);
+    else
+        ret = _setEndPositionShiftAndLargeNeedle(finder, pattern, pos);
+
+    // Adjust state.
+    if (ret) {
+        finder._beginPosition = finder._endPosition - length(needle(pattern));
+        finder._state = TPattern::STATE_FOUND;
+        pattern._state = TPattern::STATE_FOUND;
+        return true;
+    } else {
+        finder._state = TPattern::STATE_NO_HIT;
+        pattern._state = TFinder::STATE_NO_HIT;
+        return false;
+    }
+}
+
+
+template <typename THaystack, typename TNeedle, typename TPosition>
+bool setBeginPosition(Finder<THaystack, Default> & finder,
+                    Pattern<TNeedle, ShiftAnd> & pattern,
+                    TPosition const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    return setEndPosition(finder, pattern, pos + length(needle(pattern)));
+}
+
+/*
+  Build the alignment resulting from the search result as specified by the
+  finder and the pattern.  If the state is not "begin found" then no alignment
+  is built and false is returned.
+*/
+template <typename THaystack, typename TNeedle, typename TAlignSeq, typename TAlignSpec>
+bool buildAlignment(Finder<THaystack, Default> &finder,
+                    Pattern<TNeedle, ShiftAnd> &pattern,
+                    Align<TAlignSeq, TAlignSpec> &outAlignment) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, ShiftAnd> TPattern;
+    typedef Align<TAlignSeq, TAlignSpec> TAlign;
+    typedef typename Row<TAlign>::Type TRow;
+
+    // Both finder and pattern must be in the "found begin position" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // Can only build alignment if the state is "begin found".
+    if (finder._state != TFinder::STATE_BEGIN_FOUND)
+        return false;
+
+    // Initialize alignment with the two sequences.
+    resize(rows(outAlignment), 2);
+    assignSource(row(outAlignment, 0), haystack(finder));
+    assignSource(row(outAlignment, 1), needle(pattern));
+    // Insert gap into the needle.
+    insertGaps(row(outAlignment, 1), 0, beginPosition(finder));
+
+    return true;
+}
+
+}  // namespace seqan
+          
+#endif  // SEQAN_FIND2_FIND_EXACT_SHIFTAND_H_
diff --git a/src/SeqAn-1.3/seqan/find2/find_exact_simple.h b/src/SeqAn-1.3/seqan/find2/find_exact_simple.h
new file mode 100644
index 0000000..6102e84
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find_exact_simple.h
@@ -0,0 +1,346 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Exact pattern matching using a naive implementation.
+// ==========================================================================
+
+#ifndef SEQAN_FIND2_FIND_EXACT_SIMPLE_H_
+#define SEQAN_FIND2_FIND_EXACT_SIMPLE_H_
+
+namespace seqan {
+
+template <typename TNeedle_>
+struct Pattern<TNeedle_, Simple> : FindState_ {
+    typedef TNeedle_ TNeedle;
+
+    // The pattern's state.
+    TState _state;
+
+    // The needle we store.
+    Holder<TNeedle> _host;
+
+    Pattern() : _state(STATE_EMPTY) {
+        SEQAN_CHECKPOINT;
+    }
+
+    explicit
+    Pattern(TNeedle & ndl)
+        : _state(STATE_INITIAL),
+          _host(ndl) {
+        SEQAN_CHECKPOINT;
+    }
+};
+
+
+template <typename TNeedle>
+struct Needle<Pattern<TNeedle, Simple> > {
+    typedef TNeedle Type;
+};
+
+
+template <typename TNeedle>
+TNeedle const & host(Pattern<TNeedle, Simple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern._host);
+}
+
+
+// TODO(holtgrew): Workaround for default host implementation for non-const type.
+template <typename TNeedle>
+TNeedle const & host(Pattern<TNeedle, Simple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    return host(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle>
+TNeedle const & needle(Pattern<TNeedle, Simple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern._host);
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type length(Pattern<TNeedle, Simple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return length(needle(pattern));
+}
+
+
+template <typename TNeedle>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, Simple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return infix(needle(pattern), 0u, length(needle(pattern)));
+}
+
+
+// TODO(holtgrew): Workaround for default infix implementation for non-const type.
+template <typename TNeedle>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, Simple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    return infix(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, Simple> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return begin(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default begin implementation for non-const type.
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, Simple> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    return begin(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, Simple> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return end(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default end implementation for non-const type.
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, Simple> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    return end(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, Simple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return 0u;
+}
+
+
+// TODO(holtgrew): Workaround for default beginPosition implementation for non-const type.
+template <typename TNeedle>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, Simple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    return beginPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, Simple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return length(needle(pattern));
+}
+
+
+// TODO(holtgrew): Workaround for default endPosition implementation for non-const type.
+template <typename TNeedle>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, Simple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    return endPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename THaystack, typename TNeedle>
+bool find(Finder<THaystack, Default> & finder,
+          Pattern<TNeedle, Simple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    typedef typename Position<TNeedle>::Type TPosition;
+
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+
+    // Do not continue if the state is "not found".
+    if (finder._state == TPattern::STATE_NOTFOUND)
+        return false;
+    // Initialize finder if state is "initial".  Otherwise advance at
+    // least by one (if not set to of haystack with setEndPosition()).
+    if (finder._state == TPattern::STATE_INITIAL) {
+        finder._beginPosition = 0u;
+        finder._endPosition = length(needle(pattern));
+    } else if (finder._state == TPattern::STATE_NO_HIT) {
+        // Only advance if not at end if set manually to a "no hit" position.
+        if (finder._endPosition == length(haystack(finder)))
+            return false;
+        finder._beginPosition += 1;
+    } else {
+        finder._beginPosition += 1;
+    }
+
+    // Search the needle in the haystack naively.
+    for (TPosition i = 0u; i < length(needle(pattern));) {
+        // Break out of loop if no more match is possible.
+        if (finder._beginPosition >= length(haystack(finder)) - length(needle(pattern))) {
+            finder._state = TFinder::STATE_NOTFOUND;
+            pattern._state = TPattern::STATE_NOTFOUND;
+            return false;
+        }
+        // Otherwise, go on searching.
+        if (needle(pattern)[i] != haystack(finder)[finder._beginPosition + i]) {
+            finder._beginPosition += 1;
+            i = 0u;
+            continue;
+        }
+        i += 1;
+    }
+    finder._endPosition = finder._beginPosition + length(needle(pattern));
+    finder._state = TFinder::STATE_FOUND;
+    pattern._state = TPattern::STATE_FOUND;
+    return true;
+}
+
+
+template <typename THaystack, typename TNeedle>
+bool findBegin(Finder<THaystack, Default> & finder,
+               Pattern<TNeedle, Simple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    // State of finder and pattern should be in sync and in "found" or
+    // "found begin" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    if (pattern._state == TPattern::STATE_FOUND) {
+        finder._state = TFinder::STATE_BEGIN_FOUND;
+        pattern._state = TPattern::STATE_BEGIN_FOUND;
+        return true;
+    }
+    finder._state = TFinder::STATE_BEGIN_NOTFOUND;
+    pattern._state = TPattern::STATE_BEGIN_NOTFOUND;
+    return false;
+}
+
+
+template <typename THaystack, typename TNeedle, typename TPosition>
+bool setEndPosition(Finder<THaystack, Default> & finder,
+                    Pattern<TNeedle, Simple> & pattern,
+                    TPosition const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // End position must not be right of the end of the haystack.
+    SEQAN_ASSERT_LEQ(static_cast<typename MakeUnsigned_<TPosition>::Type>(pos), length(haystack(finder)));
+    // Begin position must not be left of the beginning of the haystack.
+    SEQAN_ASSERT_GEQ(static_cast<typename MakeUnsigned_<TPosition>::Type>(pos), length(needle(pattern)));
+
+    // Set the end position.
+    finder._endPosition = pos;
+    finder._beginPosition = pos - length(needle(pattern));
+
+    // Check whether there is a hit at this position and update the
+    // state accordingly.
+    typedef typename Position<THaystack>::Type THaystackPos;
+    for (THaystackPos i = 0u; i < length(needle(pattern)); ++i) {
+        if (needle(pattern)[i] != haystack(finder)[finder._beginPosition + i]) {
+            finder._state = TPattern::STATE_NO_HIT;
+            pattern._state = TFinder::STATE_NO_HIT;
+            return false;
+        }
+    }
+    finder._state = TPattern::STATE_FOUND;
+    pattern._state = TPattern::STATE_FOUND;
+    return true;
+}
+
+
+template <typename THaystack, typename TNeedle, typename TPosition>
+bool setBeginPosition(Finder<THaystack, Default> & finder,
+                    Pattern<TNeedle, Simple> & pattern,
+                    TPosition const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    return setEndPosition(finder, pattern, pos + length(needle(pattern)));
+}
+
+
+/*
+  Build the alignment resulting from the search result as specified by the
+  finder and the pattern.  If the state is not "begin found" then no alignment
+  is built and false is returned.
+*/
+template <typename THaystack, typename TNeedle, typename TAlignSeq, typename TAlignSpec>
+bool buildAlignment(Finder<THaystack, Default> &finder,
+                    Pattern<TNeedle, Simple> &pattern,
+                    Align<TAlignSeq, TAlignSpec> &outAlignment) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    typedef Align<TAlignSeq, TAlignSpec> TAlign;
+    typedef typename Row<TAlign>::Type TRow;
+
+    // Both finder and pattern must be in the "found begin position" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // Can only build alignment if the state is "begin found".
+    if (finder._state != TFinder::STATE_BEGIN_FOUND)
+        return false;
+
+    // Initialize alignment with the two sequences.
+    resize(rows(outAlignment), 2);
+    assignSource(row(outAlignment, 0), haystack(finder));
+    assignSource(row(outAlignment, 1), needle(pattern));
+    // Insert gap into the needle.
+    insertGaps(row(outAlignment, 1), 0, beginPosition(finder));
+
+    return true;
+}
+
+}  // namespace seqan
+          
+#endif  // SEQAN_FIND2_FIND_EXACT_SIMPLE_H_
diff --git a/src/SeqAn-1.3/seqan/find2/find_finder_default.h b/src/SeqAn-1.3/seqan/find2/find_finder_default.h
new file mode 100644
index 0000000..97a409f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find_finder_default.h
@@ -0,0 +1,157 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Implementation of the default finder.
+// ==========================================================================
+
+#ifndef SEQAN_FIND2_FINDER_DEFAULT_H_
+#define SEQAN_FIND2_FINDER_DEFAULT_H_
+
+namespace seqan {
+
+template <typename THaystack_>
+struct Finder<THaystack_, Default> : FindState_ {
+    typedef THaystack_ THaystack;
+    typedef typename Position<THaystack>::Type TPosition;
+    typedef typename Iterator<THaystack>::Type TIterator;
+
+    TState _state;
+
+    Holder<THaystack> _holder;
+
+    // TODO(holtgrew): Maybe switch to an iterator based implementation?
+    TPosition _beginPosition;
+    TPosition _endPosition;
+
+    Finder(THaystack & haystack)
+        : _state(STATE_INITIAL),
+          _holder(haystack) {
+        SEQAN_CHECKPOINT;
+    }
+};
+
+
+template <typename THaystack>
+THaystack const & haystack(Finder<THaystack, Default> const & finder) {
+    SEQAN_CHECKPOINT;
+    return value(finder._holder);
+}
+
+
+template <typename THaystack, typename TTag>
+typename Iterator<THaystack const>::Type begin(Finder<THaystack, Default> const & finder,
+                                               Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    SEQAN_ASSERT_TRUE(finder._state == TFinder::STATE_BEGIN_FOUND);
+    return begin(haystack(finder), spec) + finder._beginPosition;
+}
+
+
+// TODO(holtgrew): Workaround for default begin implementation for non-const type.
+template <typename THaystack, typename TTag>
+typename Iterator<THaystack const>::Type begin(Finder<THaystack, Default> & finder,
+                                               Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    return begin(const_cast<TFinder const &>(finder), spec);
+}
+
+
+template <typename THaystack, typename TTag>
+typename Iterator<THaystack const>::Type end(Finder<THaystack, Default> const & finder,
+                                             Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    SEQAN_ASSERT_TRUE(finder._state == TFinder::STATE_BEGIN_FOUND || finder._state == TFinder::STATE_FOUND);
+    return begin(haystack(finder), spec) + finder._endPosition;
+}
+
+
+// TODO(holtgrew): Workaround for default end implementation for non-const type.
+template <typename THaystack, typename TTag>
+typename Iterator<THaystack const>::Type end(Finder<THaystack, Default> & finder,
+                                             Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    return end(const_cast<TFinder const &>(finder), spec);
+}
+
+
+template <typename THaystack>
+typename Position<THaystack const>::Type beginPosition(Finder<THaystack, Default> const & finder) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    SEQAN_ASSERT_TRUE(finder._state == TFinder::STATE_BEGIN_FOUND);
+    return finder._beginPosition;
+}
+
+
+// TODO(holtgrew): Workaround for default beginPosition implementation for non-const type.
+template <typename THaystack>
+typename Position<THaystack>::Type beginPosition(Finder<THaystack, Default> & finder) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    return beginPosition(const_cast<TFinder const &>(finder));
+}
+
+
+template <typename THaystack>
+typename Position<THaystack>::Type endPosition(Finder<THaystack, Default> const & finder) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    SEQAN_ASSERT_TRUE(finder._state == TFinder::STATE_BEGIN_FOUND || finder._state == TFinder::STATE_FOUND);
+    return finder._endPosition;
+}
+
+
+// TODO(holtgrew): Workaround for default endPosition implementation for non-const type.
+template <typename THaystack>
+typename Position<THaystack>::Type endPosition(Finder<THaystack, Default> & finder) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    return endPosition(const_cast<TFinder const &>(finder));
+}
+
+
+template <typename THaystack>
+Segment<THaystack const, InfixSegment> infix(Finder<THaystack, Default> & finder) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    SEQAN_ASSERT_TRUE(finder._state == TFinder::STATE_BEGIN_FOUND);
+    return infix(haystack(finder), beginPosition(finder), endPosition(finder));
+}
+
+}  // namespace seqan
+          
+#endif  // SEQAN_FIND2_FINDER_DEFAULT_H_
diff --git a/src/SeqAn-1.3/seqan/find2/find_hamming_simple.h b/src/SeqAn-1.3/seqan/find2/find_hamming_simple.h
new file mode 100644
index 0000000..52f70bd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find_hamming_simple.h
@@ -0,0 +1,384 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Approximate string matching with Hamming distance (also known as "k-Mismatch
+// Problem") using a naive algorithm.
+// ==========================================================================
+
+#ifndef SEQAN_FIND2_FIND_HAMMING_SIMPLE_H_
+#define SEQAN_FIND2_FIND_HAMMING_SIMPLE_H_
+
+namespace seqan {
+
+struct HammingSimple_;
+typedef Tag<HammingSimple_> HammingSimple;
+    
+template <typename TNeedle_>
+struct Pattern<TNeedle_, HammingSimple> : FindState_ {
+    typedef TNeedle_ TNeedle;
+
+    // The pattern's state.
+    TState _state;
+
+    // The needle we store.
+    Holder<TNeedle> _host;
+
+    // The lowest score to return hits for.
+    int _scoreLimit;
+    
+    // The score of the needle at the current position.
+    int _score;
+    
+    Pattern() : _state(STATE_EMPTY) {
+        SEQAN_CHECKPOINT;
+    }
+
+    Pattern(TNeedle & ndl, int scoreLimit)
+        : _state(STATE_INITIAL),
+          _host(ndl),
+          _scoreLimit(scoreLimit) {
+        SEQAN_CHECKPOINT;
+        }
+};
+
+
+template <typename TNeedle>
+struct Needle<Pattern<TNeedle, HammingSimple> > {
+    typedef typename Value<TNeedle>::Type Value;
+};
+
+
+template <typename TNeedle>
+int getScoreLimit(Pattern<TNeedle, HammingSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return pattern._scoreLimit;
+}
+
+
+template <typename TNeedle>
+int score(Pattern<TNeedle, HammingSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    // State of pattern should be in "found", "found begin" or "found
+    // no begin" state.
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_NOTFOUND);
+    return pattern._score;
+}
+
+
+template <typename TNeedle>
+TNeedle const & host(Pattern<TNeedle, HammingSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern._host);
+}
+
+
+// TODO(holtgrew): Workaround for default host implementation for non-const type.
+template <typename TNeedle>
+TNeedle const & host(Pattern<TNeedle, HammingSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    return host(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle>
+TNeedle const & needle(Pattern<TNeedle, HammingSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern._host);
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type length(Pattern<TNeedle, HammingSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return length(needle(pattern));
+}
+
+
+template <typename TNeedle>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, HammingSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return infix(needle(pattern), 0u, length(needle(pattern)));
+}
+
+
+// TODO(holtgrew): Workaround for default infix implementation for non-const type.
+template <typename TNeedle>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, HammingSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    return infix(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, HammingSimple> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return begin(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default begin implementation for non-const type.
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, HammingSimple> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    return begin(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, HammingSimple> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    // State of pattern should be in "found", "found begin" or "found
+    // no begin" state.
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_NOTFOUND);
+    return end(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default end implementation for non-const type.
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, HammingSimple> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    return end(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, HammingSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return 0u;
+}
+
+
+// TODO(holtgrew): Workaround for default beginPosition implementation for non-const type.
+template <typename TNeedle>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, HammingSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    return beginPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, HammingSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    // State of pattern should be in "found", "found begin" or "found
+    // no begin" state.
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_NOTFOUND);
+    return length(needle(pattern));
+}
+
+
+// TODO(holtgrew): Workaround for default endPosition implementation for non-const type.
+template <typename TNeedle>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, HammingSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    return endPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename THaystack, typename TNeedle>
+bool find(Finder<THaystack, Default> & finder,
+          Pattern<TNeedle, HammingSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    typedef typename Position<TNeedle>::Type TPosition;
+
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+
+    // Do not continue if the state is "not found".
+    if (finder._state == TPattern::STATE_NOTFOUND)
+        return false;
+    // Initialize finder if state is "initial".  Otherwise advance at
+    // least by one (if not set to of haystack with setEndPosition()).
+    if (finder._state == TPattern::STATE_INITIAL) {
+        finder._beginPosition = 0u;
+        finder._endPosition = length(needle(pattern));
+    } else if (finder._state == TPattern::STATE_NO_HIT) {
+        // Only advance if not at end if set manually to a "no hit" position.
+        if (finder._endPosition == length(haystack(finder)))
+            return false;
+        finder._beginPosition += 1;
+    } else {
+        finder._beginPosition += 1;
+    }
+
+    // Search the needle in the haystack naively.
+    int mismatchCount = 0;
+    for (TPosition i = 0u; i < length(needle(pattern));) {
+        // Break out of loop if no more match is possible.
+        if (finder._beginPosition >= length(haystack(finder)) - length(needle(pattern))) {
+            finder._state = TFinder::STATE_NOTFOUND;
+            pattern._state = TPattern::STATE_NOTFOUND;
+            return false;
+        }
+        mismatchCount += needle(pattern)[i] != haystack(finder)[finder._beginPosition + i];
+        // Otherwise, go on searching.  We count mismatches until we find too many.
+        if (mismatchCount > -getScoreLimit(pattern)) {
+            finder._beginPosition += 1;
+            mismatchCount = 0;
+            i = 0u;
+            continue;
+        }
+        i += 1;
+    }
+    finder._endPosition = finder._beginPosition + length(needle(pattern));
+    finder._state = TFinder::STATE_FOUND;
+    pattern._state = TPattern::STATE_FOUND;
+    pattern._score = -mismatchCount;
+    return true;
+}
+
+
+template <typename THaystack, typename TNeedle>
+bool findBegin(Finder<THaystack, Default> & finder,
+               Pattern<TNeedle, HammingSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    // State of finder and pattern should be in sync and in "found" or
+    // "found begin" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    if (pattern._state == TPattern::STATE_FOUND) {
+        finder._state = TFinder::STATE_BEGIN_FOUND;
+        pattern._state = TPattern::STATE_BEGIN_FOUND;
+        return true;
+    }
+    finder._state = TFinder::STATE_BEGIN_NOTFOUND;
+    pattern._state = TPattern::STATE_BEGIN_NOTFOUND;
+    return false;
+}
+
+
+template <typename THaystack, typename TNeedle, typename TPosition>
+bool setEndPosition(Finder<THaystack, Default> & finder,
+                    Pattern<TNeedle, HammingSimple> & pattern,
+                    TPosition const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // End position must not be right of the end of the haystack.
+    SEQAN_ASSERT_LEQ(static_cast<typename MakeUnsigned_<TPosition>::Type>(pos), length(haystack(finder)));
+    // Begin position must not be left of the beginning of the haystack.
+    SEQAN_ASSERT_GEQ(static_cast<typename MakeUnsigned_<TPosition>::Type>(pos), length(needle(pattern)));
+
+    // Set the end position.
+    finder._endPosition = pos;
+    finder._beginPosition = pos - length(needle(pattern));
+
+    // Check whether there is a hit at this position and update the
+    // state accordingly.
+    int mismatchCount = 0;
+    typedef typename Position<THaystack>::Type THaystackPos;
+    for (THaystackPos i = 0u; i < length(needle(pattern)); ++i) {
+        mismatchCount += (needle(pattern)[i] != haystack(finder)[finder._beginPosition + i]);
+        if (mismatchCount > -getScoreLimit(pattern)) {
+            finder._state = TPattern::STATE_NO_HIT;
+            pattern._state = TFinder::STATE_NO_HIT;
+            return false;
+        }
+    }
+    finder._state = TPattern::STATE_FOUND;
+    pattern._state = TPattern::STATE_FOUND;
+    pattern._score = -mismatchCount;
+    return true;
+}
+
+
+template <typename THaystack, typename TNeedle, typename TPosition>
+bool setBeginPosition(Finder<THaystack, Default> & finder,
+                      Pattern<TNeedle, HammingSimple> & pattern,
+                      TPosition const & pos) {
+    SEQAN_CHECKPOINT;
+    return setEndPosition(finder, pattern, pos + length(needle(pattern)));
+}
+
+
+// Build the alignment resulting from the search result as specified by the
+// finder and the pattern.  If the state is not "begin found" then no alignment
+// is built and false is returned.
+template <typename THaystack, typename TNeedle, typename TAlignSeq, typename TAlignSpec>
+bool buildAlignment(Finder<THaystack, Default> &finder,
+                    Pattern<TNeedle, HammingSimple> &pattern,
+                    Align<TAlignSeq, TAlignSpec> &outAlignment) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, HammingSimple> TPattern;
+    typedef Align<TAlignSeq, TAlignSpec> TAlign;
+    typedef typename Row<TAlign>::Type TRow;
+
+    // Both finder and pattern must be in the "found begin position" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // Can only build alignment if the state is "begin found".
+    if (finder._state != TFinder::STATE_BEGIN_FOUND)
+        return false;
+
+    // Initialize alignment with the two sequences.
+    resize(rows(outAlignment), 2);
+    assignSource(row(outAlignment, 0), haystack(finder));
+    assignSource(row(outAlignment, 1), needle(pattern));
+    insertGaps(row(outAlignment, 1), 0, beginPosition(finder));
+
+    return true;
+}
+
+}  // namespace seqan
+          
+#endif  // SEQAN_FIND2_FIND_HAMMING_SIMPLE_H_
diff --git a/src/SeqAn-1.3/seqan/find2/find_multiple_exact_simple.h b/src/SeqAn-1.3/seqan/find2/find_multiple_exact_simple.h
new file mode 100644
index 0000000..815ef4d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find_multiple_exact_simple.h
@@ -0,0 +1,473 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Exact pattern matching for multiple needles at once with a naive
+// implementation.
+// ==========================================================================
+
+#ifndef SEQAN_FIND2_FIND_MULTIPLE_EXACT_SIMPLE_H_
+#define SEQAN_FIND2_FIND_MULTIPLE_EXACT_SIMPLE_H_
+
+namespace seqan {
+
+struct MultipleSimple_;
+typedef Tag<MultipleSimple_> MultipleSimple;
+
+
+template <typename TNeedle_, typename TStringSetSpec>
+struct Pattern<StringSet<TNeedle_, TStringSetSpec>, MultipleSimple> : FindState_ {
+    typedef StringSet<TNeedle_, TStringSetSpec> TNeedleContainer;
+    typedef typename Position<TNeedleContainer>::Type TNeedleIndex;
+    typedef TNeedle_ TNeedle;
+    typedef typename Position<TNeedle>::Type TPosition;
+
+    // The needle set we work on.
+    Holder<TNeedleContainer> _host;
+
+    // The index of the needle that was searche for last.
+    TNeedleIndex _needleIndex;
+
+    // The pattern's state.
+    TState _state;
+
+    Pattern() : _state(STATE_EMPTY) { SEQAN_CHECKPOINT; }
+
+    Pattern(TNeedleContainer & needles)
+        : _host(needles),
+          _state(STATE_INITIAL)
+    { SEQAN_CHECKPOINT; }
+};
+
+
+template <typename TNeedle, typename TStringSetSpec>
+struct Needle<Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> > {
+    typedef TNeedle Value;
+};
+
+
+template <typename TNeedle, typename TStringSetSpec>
+StringSet<TNeedle, TStringSetSpec> const & host(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern._host);
+}
+
+
+// TODO(holtgrew): Workaround for default host implementation for non-const type.
+template <typename TNeedle, typename TStringSetSpec>
+StringSet<TNeedle, TStringSetSpec> const & host(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    return host(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TStringSetSpec>
+StringSet<TNeedle, TStringSetSpec> const & needles(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return host(pattern);
+}
+
+
+template <typename TNeedle, typename TStringSetSpec>
+typename Position<StringSet<TNeedle, TStringSetSpec> >::Type needleIndex(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return pattern._needleIndex;
+}
+
+
+template <typename TNeedle, typename TStringSetSpec>
+typename Position<StringSet<TNeedle, TStringSetSpec> >::Type length(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return length(needles(pattern)[pattern._needleIndex]);
+}
+
+
+template <typename TNeedle, typename TStringSetSpec>
+Segment<TNeedle const, InfixSegment>
+infix(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return infix(needles(pattern)[needleIndex(pattern)], 0, length(pattern));
+}
+
+
+// TODO(holtgrew): Workaround for default infix implementation for non-const type.
+template <typename TNeedle, typename TStringSetSpec>
+Segment<TNeedle const, InfixSegment>
+infix(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    return infix(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TStringSetSpec, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, Simple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return begin(needles(pattern)[needleIndex(pattern)], spec);
+}
+
+
+// TODO(holtgrew): Workaround for default begin implementation for non-const type.
+template <typename TNeedle, typename TStringSetSpec, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    return begin(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle, typename TStringSetSpec, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, Simple> TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return end(needles(pattern)[needleIndex(pattern)], spec);
+}
+
+
+// TODO(holtgrew): Workaround for default end implementation for non-const type.
+template <typename TNeedle, typename TStringSetSpec, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    return end(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle, typename TStringSetSpec>
+typename Position<TNeedle>::Type beginPosition(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, Simple> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return 0u;
+}
+
+
+// TODO(holtgrew): Workaround for default beginPosition implementation for non-const type.
+template <typename TNeedle, typename TStringSetSpec>
+typename Position<TNeedle>::Type beginPosition(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    return beginPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TStringSetSpec>
+typename Position<TNeedle>::Type endPosition(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    return length(needles(pattern)[needleIndex(pattern)]);
+}
+
+
+// TODO(holtgrew): Workaround for default endPosition implementation for non-const type.
+template <typename TNeedle, typename TStringSetSpec>
+typename Position<TNeedle>::Type endPosition(Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> TPattern;
+    return endPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename THaystack, typename TNeedle, typename TStringSetSpec>
+bool find(Finder<THaystack, Default> & finder,
+          Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef StringSet<TNeedle, TStringSetSpec> TStringSet;
+    typedef Pattern<TStringSet, MultipleSimple> TPattern;
+    typedef typename TPattern::TNeedleIndex TNeedleIndex;
+    typedef typename Position<TNeedle>::Type TPosition;
+
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+
+    // Get some shortcuts.
+    TNeedleIndex const kNeedleCount = length(needles(pattern));
+    THaystack const & hstck = haystack(finder);
+    TStringSet const & ndls = needles(pattern);
+    
+    // Do not continue if the state is "not found".
+    if (finder._state == TFinder::STATE_NOTFOUND)
+        return false;
+    // Initialize finder if state is "initial".  Otherwise advance at
+    // least by one (if not set to of haystack with setEndPosition()).
+    if (finder._state == TFinder::STATE_INITIAL) {
+        pattern._needleIndex = 0;
+        finder._beginPosition = 0u;
+        // The end position is set to the length of the shortest needle.
+        TPosition minNeedleLength = length(ndls[0]);
+        for (TNeedleIndex nidx = 0; nidx < length(ndls); ++nidx)
+            minNeedleLength = _min(minNeedleLength, length(ndls[nidx]));
+        finder._endPosition = minNeedleLength;
+    } else if (finder._state == TFinder::STATE_NO_HIT) {
+        // Only advance if not at end if set manually to a "no hit" position.
+        if (finder._endPosition == length(haystack(finder)))
+            return false;
+        // Go to next needle if possible and handle "overflow" in the
+        // needle index by incrementing the end position.
+        pattern._needleIndex += 1;
+        if (pattern._needleIndex >= kNeedleCount) {
+            pattern._needleIndex = 0;
+            finder._endPosition += 1;
+        }
+    } else {
+        // Go to next needle if possible and handle "overflow" in the
+        // needle index by incrementing the end position.
+        pattern._needleIndex += 1;
+        SEQAN_ASSERT_LEQ(pattern._needleIndex, kNeedleCount);
+        if (pattern._needleIndex == kNeedleCount) {
+            pattern._needleIndex = 0;
+            finder._endPosition += 1;
+        }
+    }
+
+    // Search the needle in the haystack naively.
+    for (; finder._endPosition <= length(hstck); ++finder._endPosition) {
+        for (; pattern._needleIndex < length(ndls); ++pattern._needleIndex) {
+            if (length(ndls[pattern._needleIndex]) > finder._endPosition)
+                continue;  // Needle does not fit left of current end position.
+            // Compare from needle and haystack from the left to the right.
+            TNeedle const & ndl = ndls[pattern._needleIndex];
+            TNeedleIndex needleLength = length(ndl);
+            bool match = true;
+            for (TPosition i = 0u; i < length(ndl); ++i) {
+                if (ndl[i] != hstck[finder._endPosition - needleLength + i]) {
+                    match = false;
+                    break;
+                }
+            }
+            // On success, update the finder and return true.
+            if (match) {
+                finder._beginPosition = finder._endPosition - needleLength;
+                finder._state = TFinder::STATE_FOUND;
+                pattern._state = TPattern::STATE_FOUND;
+                return true;
+            }
+            // If no matching location was found, this loop is left and the next
+            // needle is tried.
+        }
+        // Start with first needle for the next end position.
+        pattern._needleIndex = 0;
+    }
+    return false;
+}
+
+
+template <typename THaystack, typename TNeedle, typename TStringSetSpec>
+bool findBegin(Finder<THaystack, Default> & finder,
+               Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, Simple> TPattern;
+    typedef Finder<THaystack, Default> TFinder;
+    // State of finder and pattern should be in sync and either
+    // "found" or "found begin".
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    SEQAN_ASSERT_TRUE(pattern._state == TPattern::STATE_FOUND ||
+                      pattern._state == TPattern::STATE_BEGIN_FOUND);
+    if (pattern._state == TPattern::STATE_FOUND) {
+        pattern._state = TPattern::STATE_BEGIN_FOUND;
+        finder._state = TFinder::STATE_BEGIN_FOUND;
+        return true;
+    }
+    pattern._state = TPattern::STATE_BEGIN_NOTFOUND;
+    finder._state = TFinder::STATE_BEGIN_NOTFOUND;
+    return false;
+}
+
+
+template <typename THaystack, typename TNeedle, typename TStringSetSpec, typename TPos>
+bool setEndPosition(Finder<THaystack, Default> & finder,
+                    Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern,
+                    TPos const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef StringSet<TNeedle, TStringSetSpec> TStringSet;
+    typedef Pattern<TStringSet, MultipleSimple> TPattern;
+    typedef typename TPattern::TNeedleIndex TNeedleIndex;
+    typedef typename Position<TNeedle>::Type TPosition;
+
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+
+    // Get some shortcuts.
+    TNeedleIndex const kNeedleCount = length(needles(pattern));
+    THaystack const & hstck = haystack(finder);
+    TStringSet const & ndls = needles(pattern);
+
+    // Set the end position.
+    finder._endPosition = pos;
+
+    // Find the first needle that matches here, if any.
+    bool found = false;
+    for (pattern._needleIndex = 0; pattern._needleIndex < kNeedleCount; ++pattern._needleIndex) {
+        TNeedle const & ndl = ndls[pattern._needleIndex];
+        TPosition kNeedleLength = length(ndl);
+        // Skip needle if it does not fit left of current end position.
+        if (kNeedleLength > finder._endPosition)
+            continue;
+        bool mismatch = false;
+        for (TPosition i = 0; i < kNeedleLength; ++i) {
+            if (ndl[i] != hstck[finder._endPosition - kNeedleLength + i]) {
+                mismatch = true;
+                break;
+            }
+        }
+        // If we found a mismatch, try the next needle.
+        if (mismatch)
+            continue;
+        // Otherwise, we can leave this loop and have found a match
+        // for the needle pattern._needleIndex.
+        found = true;
+        break;
+    }
+    
+    if (found) {
+        finder._beginPosition = finder._endPosition - length(ndls[pattern._needleIndex]);
+        finder._state = TFinder::STATE_FOUND;
+        pattern._state = TPattern::STATE_FOUND;
+        return true;
+    } else {
+        finder._state = TFinder::STATE_NO_HIT;
+        pattern._state = TPattern::STATE_NO_HIT;
+        return false;
+    }
+}
+
+
+// For the multiple exact finder, setBeginPosition() cannot easily use
+// setEndPosition(), so we reimplement it.
+template <typename THaystack, typename TNeedle, typename TStringSetSpec, typename TPos>
+bool setBeginPosition(Finder<THaystack, Default> & finder,
+                      Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> & pattern,
+                      TPos const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef StringSet<TNeedle, TStringSetSpec> TStringSet;
+    typedef Pattern<TStringSet, MultipleSimple> TPattern;
+    typedef typename TPattern::TNeedleIndex TNeedleIndex;
+    typedef typename Position<TNeedle>::Type TPosition;
+
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+
+    // Get some shortcuts.
+    TNeedleIndex const kNeedleCount = length(needles(pattern));
+    THaystack const & hstck = haystack(finder);
+    TStringSet const & ndls = needles(pattern);
+
+    // Set the begin position.
+    finder._beginPosition = pos;
+
+    // Find the first needle that matches here, if any.
+    bool found = false;
+    for (pattern._needleIndex = 0; pattern._needleIndex < kNeedleCount; ++pattern._needleIndex) {
+        TNeedle const & ndl = ndls[pattern._needleIndex];
+        TPosition kNeedleLength = length(ndl);
+        // Skip needle if it does not fit right of current end position.
+        if (finder._beginPosition + kNeedleLength > length(haystack(finder)))
+            continue;
+        bool mismatch = false;
+        for (TPosition i = 0; i < kNeedleLength; ++i) {
+            if (ndl[i] != hstck[finder._beginPosition + i]) {
+                mismatch = true;
+                break;
+            }
+        }
+        // If we found a mismatch, try the next needle.
+        if (mismatch)
+            continue;
+        // Otherwise, we can leave this loop and have found a match
+        // for the needle pattern._needleIndex.
+        found = true;
+        break;
+    }
+    
+    if (found) {
+        finder._endPosition = finder._beginPosition + length(ndls[pattern._needleIndex]);
+        finder._state = TFinder::STATE_FOUND;
+        pattern._state = TPattern::STATE_FOUND;
+        return true;
+    } else {
+        finder._state = TFinder::STATE_NO_HIT;
+        pattern._state = TPattern::STATE_NO_HIT;
+        return false;
+    }
+}
+
+
+// Build the alignment resulting from the search result as specified by the
+// finder and the pattern.  If the state is not "begin found" then no alignment
+// is built and false is returned.
+template <typename THaystack, typename TNeedle, typename TStringSetSpec, typename TAlignSeq, typename TAlignSpec>
+bool buildAlignment(Finder<THaystack, Default> &finder,
+                    Pattern<StringSet<TNeedle, TStringSetSpec>, MultipleSimple> &pattern,
+                    Align<TAlignSeq, TAlignSpec> &outAlignment) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef StringSet<TNeedle, TStringSetSpec> TStringSet;
+    typedef Pattern<TStringSet, Simple> TPattern;
+    typedef Align<TAlignSeq, TAlignSpec> TAlign;
+    typedef typename Row<TAlign>::Type TRow;
+
+    // Both finder and pattern must be in the "found begin position" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // Can only build alignment if the state is "begin found".
+    if (finder._state != TFinder::STATE_BEGIN_FOUND)
+        return false;
+
+    // Initialize alignment with the two sequences.
+    resize(rows(outAlignment), 2);
+    assignSource(row(outAlignment, 0), haystack(finder));
+    assignSource(row(outAlignment, 1), needles(pattern)[needleIndex(pattern)]);
+    insertGaps(row(outAlignment, 1), 0, beginPosition(finder));
+
+    return true;
+}
+
+}  // namespace seqan
+          
+#endif  // SEQAN_FIND2_FIND_MULTIPLE_EXACT_SIMPLE_H_
diff --git a/src/SeqAn-1.3/seqan/find2/find_pattern_wild_shiftand.h b/src/SeqAn-1.3/seqan/find2/find_pattern_wild_shiftand.h
new file mode 100644
index 0000000..72c0eba
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find2/find_pattern_wild_shiftand.h
@@ -0,0 +1,874 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Stefan Aiche <aiche at fu-berlin.de>
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Wildcard pattern matching using a modification of the Shift-And Algorithm.
+// ==========================================================================
+
+#ifndef SEQAN_FIND2_FIND_PATTERN_WILD_SHIFTAND_H_
+#define SEQAN_FIND2_FIND_PATTERN_WILD_SHIFTAND_H_
+
+// TODO(holtgrew): This algorithm yields end positions. What about the start position?
+
+// Deactivate debugging for WildShiftAnd by default.
+#ifndef SEQAN_WILD_SHIFTAND_DEBUG
+#define SEQAN_WILD_SHIFTAND_DEBUG 0
+#endif  // SEQAN_WILD_SHIFTAND_DEBUG
+
+namespace seqan {
+
+struct WildShiftAnd_;
+typedef Tag<WildShiftAnd_> WildShiftAnd;
+
+
+template <typename TNeedle_>
+struct Pattern<TNeedle_, WildShiftAnd> : FindState_ {
+    typedef TNeedle_ TNeedle;
+	typedef unsigned TWord;
+
+    // The pattern's state.
+    TState _state;
+
+    // Holder with the needle's data.
+	Holder<TNeedle> data_host;
+
+    // TODO(holtgrew): Adjust naming of members to the style guide.
+	String<TWord> table;			// Look up table for each character in the alphabet (called B in "Navarro")
+	
+	String<TWord> s_table;			// marks all positions, that can remain active, after reading a specific character (called S in "Navarro")
+	String<TWord> a_table;			// marks all positions of optional characters in the pattern (called A in "Navarro")
+	String<TWord> i_table;			// marks all positions in the pattern, that preceed a block of optional characters (called I in "Navarro")
+	String<TWord> f_table;			// marks all end-positions of blocks of optional characters (called F in "Navarro")
+	
+	String<TWord> prefSufMatch;		// Set of all the prefixes of needle that match a suffix of haystack (called D in "Navarro")
+	String<TWord> df;				// additional bit mask to enable flooding of bits
+	
+	TWord needleLength;				// e.g., needleLength=33 --> blockCount=2 (iff w=32 bits)
+	TWord character_count;			// number of normal characters in the needle
+	TWord blockCount;				// number of unsigned ints required to store needle	
+
+    Pattern() : _state(STATE_EMPTY) {
+        SEQAN_CHECKPOINT;
+    }
+
+    explicit
+    Pattern(TNeedle & ndl)
+        : _state(STATE_INITIAL),
+          data_host(ndl) {
+        SEQAN_CHECKPOINT;
+        _initializePattern(*this);
+    }
+};
+
+
+template <typename TNeedle>
+struct Needle<Pattern<TNeedle, WildShiftAnd> > {
+    typedef typename Value<TNeedle>::Type Value;
+};
+
+
+template <typename TNeedle>
+TNeedle const & host(Pattern<TNeedle, WildShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern.data_host);
+}
+
+
+// TODO(holtgrew): Workaround for default host implementation for non-const type.
+template <typename TNeedle>
+TNeedle const & host(Pattern<TNeedle, WildShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    return host(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle>
+TNeedle const & needle(Pattern<TNeedle, WildShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    return value(pattern.data_host);
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type length(Pattern<TNeedle, WildShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return length(needle(pattern));
+}
+
+
+template <typename TNeedle>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, WildShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return infix(needle(pattern), 0u, length(needle(pattern)));
+}
+
+
+// TODO(holtgrew): Workaround for default infix implementation for non-const type.
+template <typename TNeedle>
+Segment<TNeedle const, InfixSegment> infix(Pattern<TNeedle, WildShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    return infix(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, WildShiftAnd> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return begin(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default begin implementation for non-const type.
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type begin(Pattern<TNeedle, WildShiftAnd> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    return begin(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, WildShiftAnd> const & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return end(needle(pattern), spec);
+}
+
+
+// TODO(holtgrew): Workaround for default end implementation for non-const type.
+template <typename TNeedle, typename TTag>
+typename Iterator<TNeedle const, Tag<TTag> const>::Type end(Pattern<TNeedle, WildShiftAnd> & pattern, Tag<TTag> const & spec) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    return end(const_cast<TPattern const &>(pattern), spec);
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, WildShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return 0u;
+}
+
+
+// TODO(holtgrew): Workaround for default beginPosition implementation for non-const type.
+template <typename TNeedle>
+typename Position<TNeedle>::Type beginPosition(Pattern<TNeedle, WildShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    return beginPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+template <typename TNeedle>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, WildShiftAnd> const & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_BEGIN_FOUND, pattern._state);
+    return length(needle(pattern));
+}
+
+
+// TODO(holtgrew): Workaround for default endPosition implementation for non-const type.
+template <typename TNeedle>
+typename Position<TNeedle>::Type endPosition(Pattern<TNeedle, WildShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    return endPosition(const_cast<TPattern const &>(pattern));
+}
+
+
+// template <typename THaystack, typename TNeedle>
+// bool findBegin(Finder<THaystack, Default> & finder,
+//                Pattern<TNeedle, WildShiftAnd> & pattern) {
+//     SEQAN_CHECKPOINT;
+//     // State of finder and pattern should be in sync.
+//     SEQAN_ASSERT_EQ(finder._state, pattern._state);
+//     typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+//     return finder._state == TPattern::STATE_BEGIN_FOUND;
+// }
+
+
+template <typename THaystack, typename TNeedle, typename TPosition>
+bool setEndPosition(Finder<THaystack, Default> & finder,
+                    Pattern<TNeedle, WildShiftAnd> & pattern,
+                    TPosition const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // End position must not be right of the end of the haystack.
+    SEQAN_ASSERT_LEQ(static_cast<typename MakeUnsigned_<TPosition>::Type>(pos), length(haystack(finder)));
+    // Begin position must not be left of the beginning of the haystack.
+    SEQAN_ASSERT_GEQ(static_cast<typename MakeUnsigned_<TPosition>::Type>(pos), length(needle(pattern)));
+
+    // Set the end position.
+    finder._endPosition = pos;
+    finder._beginPosition = pos - length(needle(pattern));
+
+    // Check whether there is a hit at this position and update the
+    // state accordingly.
+    typedef typename Position<THaystack>::Type THaystackPos;
+    for (THaystackPos i = 0u; i < length(needle(pattern)); ++i) {
+        if (needle(pattern)[i] != haystack(finder)[finder._beginPosition + i]) {
+            finder._state = TPattern::STATE_NO_HIT;
+            pattern._state = TFinder::STATE_NO_HIT;
+            return false;
+        }
+    }
+    finder._state = TPattern::STATE_BEGIN_FOUND;
+    pattern._state = TPattern::STATE_BEGIN_FOUND;
+    return true;
+}
+
+
+// Build the alignment resulting from the search result as specified by the
+// finder and the pattern.  If the state is not "begin found" then no alignment
+// is built and false is returned.
+template <typename THaystack, typename TNeedle, typename TAlignSeq, typename TAlignSpec>
+bool buildAlignment(Finder<THaystack, Default> &finder,
+                    Pattern<TNeedle, WildShiftAnd> &pattern,
+                    Align<TAlignSeq, TAlignSpec> &outAlignment) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    typedef Align<TAlignSeq, TAlignSpec> TAlign;
+    typedef typename Row<TAlign>::Type TRow;
+
+    // Both finder and pattern must be in the "found begin position" state.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+    // Can only build alignment if the state is "begin found".
+    if (finder._state != TFinder::STATE_BEGIN_FOUND)
+        return false;
+
+    // Initialize alignment with the two sequences.
+    resize(rows(outAlignment), 2);
+    assignSource(row(outAlignment, 0), haystack(finder));
+    assignSource(row(outAlignment, 1), needle(pattern));
+    insertGaps(row(outAlignment, 1), 0, beginPosition(finder));
+
+    return true;
+}
+
+
+// TODO(holtgrew): Should probably to into some utility header.
+inline bool _isUnsigned(CharString const & number) {
+    SEQAN_CHECKPOINT;
+    if (length(number) == 0u)
+        return false;
+
+    typedef Position<CharString>::Type TPosition;
+	for (TPosition i = 0; i < length(number); ++i) {
+        if (number[i] > '9' || number[i] < '0')
+            return false;
+	}
+	return true;
+}
+
+
+// The states used by the finite state machine that validates the regular
+// expressions of the WildShiftAnd algorithm.
+//
+// These regular expressions consist of sequences of characters, character
+// classes or the placeholder ".".  Each can be followed by a quantifier,
+// where quantifiers are characters from the set {*, +, ?} or explicit numbers
+// as in a{i, j}.
+enum FindWildShiftAndParserStates_ {
+    STATE_NO_CHAR,                    // Expecting character, character class or ".".
+    STATE_CHAR,                       // Read character, character class or ".".
+    STATE_ESCAPED,                    // Just read a backslash, next character is escaped.
+    STATE_CHAR_CLASS,                 // In a character class, read at least one character.
+    STATE_CHAR_CLASS_ESCAPED,         // Escape character in character class, a character must follow.
+    STATE_CHAR_CLASS_DASH,            // Just read a dash in a character class.
+    STATE_CHAR_CLASS_NO_CHAR,         // In a character class, expecting a char, no "-".
+    STATE_QUANTIFIER_BEGIN,           // Just read "{" from a quantifier.
+    STATE_QUANTIFIER_NUM1,            // Read at least one character from the first number.
+    STATE_QUANTIFIER_COMMA,           // Read comma, expecting first character of second number in quantifier.
+    STATE_QUANTIFIER_NUM2             // Read at least one character from second number.
+};
+
+
+// Check whether the pattern is valid.
+//
+// We use a finite state machine for the validation with the states of
+// the enum FindWildShiftAndParserStates_.
+inline bool _findWildShiftAndIsValid(CharString const & needle) {
+    SEQAN_CHECKPOINT;
+
+    if (length(needle) == 0)
+        return false;
+
+    typedef Iterator<CharString, Standard>::Type TIterator;
+
+    FindWildShiftAndParserStates_ state = STATE_NO_CHAR;
+
+    // TODO(holtgrew): Check i <= j in a{i, j}?
+
+    for (TIterator it = begin(needle, Standard()); it != end(needle, Standard()); ++it) {
+        switch (state) {
+            case STATE_NO_CHAR:
+                if (*it == '\\') {
+                    state = STATE_ESCAPED;
+                } else if (*it == '[') {
+                    state = STATE_CHAR_CLASS_NO_CHAR;
+                } else if (*it != '+' && *it != '*' && *it != '?' && *it != '{' && *it != '}' && *it != '-') {
+                    // No character, char class or "." here, must not be quantifier.
+                    state = STATE_CHAR;
+                } else {
+                    return false;
+                }
+                break;
+            case STATE_CHAR:
+                if (*it == '\\') {
+                    state = STATE_ESCAPED;
+                } else if (*it == '{') {
+                    state = STATE_QUANTIFIER_BEGIN;
+                } else if (*it == '[') {
+                    state = STATE_CHAR_CLASS_NO_CHAR;
+                } else if (*it == '+' || *it == '*' || *it == '?') {
+                    state = STATE_NO_CHAR;
+                } else if (*it == ']' || *it == '}' || *it == '-') {
+                    // Other special character have to be escaped.
+                    return false;
+                }
+                break;
+            case STATE_ESCAPED:
+                state = STATE_CHAR;
+                break;
+            case STATE_CHAR_CLASS:
+                if (*it == ']') {
+                    state = STATE_CHAR;
+                } else if (*it == '\\') {
+                    state = STATE_CHAR_CLASS_ESCAPED;
+                } else if (*it == '-') {
+                    state = STATE_CHAR_CLASS_DASH;
+                } else if (*it == '+' || *it == '*' || *it == '?' || *it == '{' || *it == '}' || *it == '.' || *it == '[') {
+                    // Other special character have to be escaped.
+                    return false;
+                }
+                break;
+            case STATE_CHAR_CLASS_ESCAPED:
+                state = STATE_CHAR_CLASS;
+                break;
+            case STATE_CHAR_CLASS_DASH:
+                if (*it == '+' || *it == '*' || *it == '?' || *it == '{' ||
+                    *it == '}' || *it == '.' || *it == '[' || *it == ']' ||
+                    *it == '-') {
+                    return false;
+                } else if (*it == '\\') {
+                    state = STATE_CHAR_CLASS_ESCAPED;
+                } else {
+                    state = STATE_CHAR_CLASS_NO_CHAR;
+                }
+                break;
+            case STATE_CHAR_CLASS_NO_CHAR:
+                if (*it == ']') {
+                    state = STATE_CHAR;
+                } else if (*it == '\\') {
+                    state = STATE_CHAR_CLASS_ESCAPED;
+                } else if (*it == '+' || *it == '*' || *it == '?' || *it == '{' || *it == '}' || *it == '.' || *it == '-' || *it == '[') {
+                    return false;
+                } else {
+                    state = STATE_CHAR_CLASS;
+                }
+                break;
+            case STATE_QUANTIFIER_BEGIN:
+                if (*it >= '0' && *it <= '9') {
+                    state = STATE_QUANTIFIER_NUM1;
+                } else {
+                    return false;
+                }
+                break;
+            case STATE_QUANTIFIER_NUM1:
+                if (*it == ',') {
+                    state = STATE_QUANTIFIER_COMMA;
+                } else if (*it < '0' || *it > '9') {
+                    return false;
+                }
+                break;
+            case STATE_QUANTIFIER_COMMA:
+                if (*it >= '0' && *it <= '9') {
+                    state = STATE_QUANTIFIER_NUM2;
+                } else {
+                    return false;
+                }
+                break;
+            case STATE_QUANTIFIER_NUM2:
+                if (*it == '}') {
+                    state = STATE_NO_CHAR;
+                } else if (*it < '0' || *it > '9') {
+                    return false;
+                }
+                break;
+        }
+    }
+
+    if (state == STATE_CHAR || state == STATE_NO_CHAR)
+        return true;
+    return false;
+}
+
+
+// Determine the pattern length without wildcard characters.  needle
+// must be a valid pattern.
+inline Position<CharString>::Type _findWildShiftAndLengthWithoutWildcards(CharString const & needle) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_TRUE(_findWildShiftAndIsValid(needle));
+
+    typedef Position<CharString>::Type TPosition;
+    TPosition result = 0u;
+
+    for (TPosition i = 0u; i < length(needle); ++i) {
+        char c = needle[i];
+
+        // Used in the switch statement below, must be defined before.
+        CharString number;
+        unsigned n, m;
+
+        switch (c) {
+            case '+':
+            case '*':
+            case '?':
+                // Skip quantifier characters.
+                continue;
+            case '[':
+                // Skip over character set, means one character.
+                while (needle[i] != ']')
+                    ++i;
+                result += 1;
+                break;
+            case '{':
+                // Skip over explicit quantifier, extract number of quantified
+                // characters.
+                ++i;
+                // Read first number.
+                while (needle[i] != ',') {
+                    appendValue(number, needle[i]);
+                    i += 1;
+                }
+                n = atoi(toCString(number));
+                i += 1;  // Skip comma.
+                // Read second number.
+                clear(number);
+                while (needle[i] != '}') {
+                    appendValue(number, needle[i]);
+                    i += 1;
+                }
+                m = atoi(toCString(number));
+
+                SEQAN_ASSERT_GEQ(m, n);
+                result += m - 1;
+                break;
+            case '\\':
+                // Escape-sequences count as one character.
+                result += 1;
+                i += 1;
+            default:
+                result += 1;
+                break;
+        }
+    }
+
+    return result;
+}
+
+
+// Build a string with all characters in the range [begin, end) in host into
+// result.
+//
+// TODO(holtgrew): We could simply use segments in the caller and a template argument for host instead of begin/end here.
+inline void _findWildShiftAndGetCharacterClass(
+        CharString & result, CharString const & host,
+        Position<CharString>::Type begin, Position<CharString>::Type end) {
+    SEQAN_CHECKPOINT;
+    typedef Position<CharString>::Type TPosition;
+    clear(result);
+
+    for (TPosition pos = begin; pos < end; ++pos) {
+        if (host[pos] == '\\') {
+            SEQAN_ASSERT_LT(pos + 1, end);
+            pos += 1;
+            appendValue(result, host[pos]);
+        } else if (host[pos] != '-') {
+            appendValue(result, host[pos]);
+        } else {
+            // Read end of range character.
+            SEQAN_ASSERT_LT(pos + 1, end);
+            char last;
+            if (host[pos + 1] == '\\') {
+                SEQAN_ASSERT_LT(pos + 2, end);
+                pos += 2;
+                last = host[pos];
+            } else {
+                pos += 1;
+                last = host[pos];
+            }
+            SEQAN_ASSERT_LEQ(back(result), last);
+            for (char c = back(result) + 1; c <= last; ++c)
+                appendValue(result, c);
+        }
+    }
+}
+
+
+// Called after the host has been set, does the precomputation.
+template <typename TNeedle>
+void _initializePattern(Pattern<TNeedle, WildShiftAnd> & me) {
+    SEQAN_CHECKPOINT;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    SEQAN_ASSERT_EQ(TPattern::STATE_INITIAL, me._state);
+    
+    TNeedle const & needle = value(me.data_host);
+
+	SEQAN_ASSERT_TRUE(_findWildShiftAndIsValid(needle));
+
+	typedef unsigned TWord;
+    // TODO(holtgrew): TValue will always be char?!?!
+	typedef typename Value<TNeedle>::Type TValue;
+	
+	me.needleLength = length(needle);
+	me.character_count = _findWildShiftAndLengthWithoutWildcards(needle);
+
+	if (me.character_count<1) me.blockCount=1;
+	else me.blockCount=((me.character_count-1) / BitsPerValue<TWord>::VALUE)+1;
+	
+	clear(me.table);
+	resize(me.table, me.blockCount * ValueSize<TValue>::VALUE, 0, Exact());
+
+	clear(me.s_table);
+	resize(me.s_table, me.blockCount * ValueSize<TValue>::VALUE, 0, Exact());
+
+	clear(me.a_table);
+	resize(me.a_table,me.blockCount,0,Exact());
+
+	clear(me.prefSufMatch);
+	resize(me.prefSufMatch, me.blockCount, 0, Exact());
+
+	clear(me.df);
+	resize(me.df, me.blockCount, 0, Exact());
+
+	int i = -1;
+	String <char> last_char; // stores the character (or characters) that were read in the last step
+	TWord j=0;
+	while(j < me.needleLength){
+		if (convert<char>(getValue(needle,j)) == '+'){
+			TWord len = length(last_char);
+			for (unsigned int k = 0; k < len; ++k)
+				me.s_table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+		} 
+		else if (convert<char>(getValue(needle,j)) == '?'){
+			me.a_table[i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+		}
+		else if (convert<char>(getValue(needle,j)) == '*'){
+			TWord len = length(last_char);
+			for (unsigned int k = 0; k < len; ++k)
+				me.s_table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+			me.a_table[i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+		}
+		else if(convert<char>(getValue(needle,j)) == '['){
+			/* find characters in class */
+			TWord e = j;
+			while(convert<char>(getValue(needle,e)) != ']') ++e;
+			/* get character codes of class */
+			_findWildShiftAndGetCharacterClass(last_char, needle, j+1, e);
+			TWord len = length(last_char);			
+			
+			/* add class to the mask */
+			++i;
+			for (unsigned int k = 0; k < len; ++k){
+				me.table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+			}
+			j = e;
+		}
+		else if(convert<char>(getValue(needle,j)) == '.'){ // matches all characters in the current alphabet
+			clear(last_char);
+			++i;
+			for(unsigned int l = 0;l < ValueSize<TValue>::VALUE;++l){
+				append(last_char,l);
+				me.table[me.blockCount*l + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+			}
+			
+		}
+		else if(convert<char>(getValue(needle,j)) == '\\'){ // handle escape characters
+			/* goto next character use this for the bit mask */
+			++i;++j;
+			clear(last_char);
+			append(last_char, convert<TWord>(convert<TValue>(getValue(needle,j))));
+			me.table[me.blockCount*last_char[0] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));			
+		}
+		else if(convert<char>(getValue(needle,j)) == '{'){ // handle bounded character repeats
+			String <char> number;
+			TWord n,m,r;
+			TWord len = length(last_char);			
+			n = m = 0;
+			++j;
+			while(convert<char>(getValue(needle,j)) != '}' && convert<char>(getValue(needle,j)) != ',') {			
+				append(number,convert<char>(getValue(needle,j)));
+				++j;
+			}
+			n = atoi(toCString(number));
+			if (convert<char>(getValue(needle,j)) == ','){
+				++j;
+				clear(number);
+				while(convert<char>(getValue(needle,j)) != '}') {			
+					append(number,convert<char>(getValue(needle,j)));
+					++j;
+				}
+				m = atoi(toCString(number));
+			}
+			// we already have seen one required occurence of the character (last_char)
+			n -= 1;
+			r = 0;
+			while(r < n){ // add n normal characters
+				++i;
+				for (unsigned int k = 0; k < len; ++k){
+					me.table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+				}
+				++r;
+			}
+			++r; // correct the -1 of n to get in the correct relation to m
+			while (r < m){ // if there was no m specified this won't be used
+				// add m - n charaters and make them optional
+				++i;
+				for (unsigned int k = 0; k < len; ++k){
+					me.table[me.blockCount*last_char[k] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+				}
+				me.a_table[i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+				++r;
+			}			
+		}
+
+		else // we have a character here
+		{
+			// determine character position in array table
+			clear(last_char);
+			append(last_char, convert<TWord>(convert<TValue>(getValue(needle,j))));
+			++i;
+			me.table[me.blockCount*last_char[0] + i / BitsPerValue<TWord>::VALUE] |= (1<<(i%BitsPerValue<TWord>::VALUE));
+		}
+		++j;
+	}
+
+	clear(me.i_table);
+	resize(me.i_table,me.blockCount,0,Exact());
+
+	clear(me.f_table);
+	resize(me.f_table,me.blockCount,0,Exact());
+
+	for (unsigned int i = 0; i < me.character_count; ++i){
+		if ((me.a_table[i / BitsPerValue<TWord>::VALUE] & (1 << (i % BitsPerValue<TWord>::VALUE))) != 0){
+			if ((me.f_table[i / BitsPerValue<TWord>::VALUE] & (1 << ((i-1) % BitsPerValue<TWord>::VALUE))) == 0){
+				if(i > 0)
+					me.i_table[(i-1) / BitsPerValue<TWord>::VALUE] |= 1 << ((i-1) % BitsPerValue<TWord>::VALUE);
+				me.f_table[i / BitsPerValue<TWord>::VALUE] |= 1 << (i % BitsPerValue<TWord>::VALUE);
+#if SEQAN_WILD_SHIFTAND_DEBUG
+				std::cout << "Update F and I" << std::endl;
+				_printMask(me.f_table,0,"F ");
+				_printMask(me.i_table,0,"I ");
+				_printMask(me.a_table,0,"A ");
+				std::cout << std::endl;
+#endif
+			}
+			else{
+				TWord curBlock = i / BitsPerValue<TWord>::VALUE;
+				for (unsigned int k = 0; k < me.blockCount; ++k){
+					if(k != curBlock)
+						me.f_table[i / BitsPerValue<TWord>::VALUE] &= ~0;
+					else
+						me.f_table[i / BitsPerValue<TWord>::VALUE] &= ~(1 << ((i-1) % BitsPerValue<TWord>::VALUE));
+
+				}
+				//me.f_table[i / BitsPerValue<TWord>::VALUE] &= ~(1 << ((i-1) % BitsPerValue<TWord>::VALUE));
+				me.f_table[i / BitsPerValue<TWord>::VALUE] |= 1 << (i % BitsPerValue<TWord>::VALUE);
+#if SEQAN_WILD_SHIFTAND_DEBUG
+				std::cout << "Update F" << std::endl;
+				_printMask(me.f_table,0,"F ");
+				std::cout << std::endl;
+#endif
+			}
+		}
+	}
+
+#if SEQAN_WILD_SHIFTAND_DEBUG	
+	// Debug code
+	std::cout << "Alphabet size: " << ValueSize<TValue>::VALUE << ::std::endl;
+	std::cout << "Needle length (with wildcards): " << me.needleLength << ::std::endl;
+	std::cout << "Needle length (wo wildcards): " << me.character_count << ::std::endl;
+	std::cout << "Block count: " << me.blockCount << ::std::endl;
+
+	std::cout << "Needle:" << needle << ::std::endl;
+
+	_printMask(me.f_table,0,"F ");
+	_printMask(me.i_table,0,"I ");
+	_printMask(me.a_table,0,"A ");
+	std::cout << std::endl << std::endl;
+
+	for(unsigned i=0;i<ValueSize<TValue>::VALUE;++i) {
+		if (((i<97) && (4 < i) ) || (i>122)) continue;
+		std::cout << static_cast<TValue>(i) << ": ";
+		for(unsigned int j=0;j<me.blockCount;++j) {
+			for(int bit_pos=0;bit_pos<BitsPerValue<unsigned>::VALUE;++bit_pos) {
+				std::cout << ((me.table[me.blockCount*i+j] & (1<<(bit_pos % BitsPerValue<unsigned>::VALUE))) !=0);
+			}
+		}
+		std::cout << ::std::endl;
+	}
+#endif
+}
+
+
+template <typename THaystack, typename TNeedle>
+inline bool _findWildShiftAndSmallNeedle(Finder<THaystack, Default> & finder,
+                                           Pattern<TNeedle, WildShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    THaystack const & hstck = haystack(finder);
+	typedef unsigned TWord;
+	TWord compare = (1 << (pattern.character_count - 1));
+    for (; finder._endPosition < length(hstck); ++finder._endPosition) {
+		TWord pos = convert<TWord>(hstck[finder._endPosition]);
+		// added  | (pattern.prefSufMatch[0] & pattern.s_table[pattern.blockCount*pos]) at the end of the line
+		pattern.prefSufMatch[0] = (((pattern.prefSufMatch[0] << 1) | 1) & pattern.table[pattern.blockCount*pos]) | (pattern.prefSufMatch[0] & pattern.s_table[pattern.blockCount*pos]);
+
+		// additional bit operations
+		pattern.df[0] = pattern.prefSufMatch[0] | pattern.f_table[0];
+		pattern.prefSufMatch[0] |= ((pattern.a_table[0] & (~(pattern.df[0] - pattern.i_table[0]))) ^ pattern.df[0]);
+		if ((pattern.prefSufMatch[0] & compare) != 0) {
+            // Found a match: Update states, positions and report the match.
+            finder._endPosition += 1;
+            finder._state = TFinder::STATE_FOUND;
+            pattern._state = TFinder::STATE_FOUND;
+			return true; 
+		}
+	}
+    finder._state = TFinder::STATE_NOTFOUND;
+    pattern._state = TFinder::STATE_NOTFOUND;
+	return false;
+}
+
+
+template <typename THaystack, typename TNeedle>
+inline bool _findWildShiftAndLargeNeedle(Finder<THaystack, Default> & finder,
+                                           Pattern<TNeedle, WildShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    THaystack const & hstck = haystack(finder);
+	typedef unsigned TWord;
+	const TWord all1 = ~0;	
+	TWord compare = (1 << ((pattern.character_count-1) % BitsPerValue<TWord>::VALUE));
+
+    for (; finder._endPosition < length(hstck); ++finder._endPosition) {
+		TWord pos = convert<TWord>(hstck[finder._endPosition]);
+		TWord carry = 1;
+		TWord wc_carry = 0;
+		// shift of blocks with carry
+		for(TWord block=0;block<pattern.blockCount;++block) {
+			bool newCarry = ((pattern.prefSufMatch[block] & (1<< (BitsPerValue<TWord>::VALUE - 1)))!=0); 
+			pattern.prefSufMatch[block] = (((pattern.prefSufMatch[block] << 1) | carry) & pattern.table[pattern.blockCount*pos+block]) | (pattern.prefSufMatch[block] & pattern.s_table[pattern.blockCount*pos+block]) ;
+			carry = newCarry;
+			
+			pattern.df[block] = pattern.prefSufMatch[block] | pattern.f_table[block];
+			TWord Z = pattern.df[block] - pattern.i_table[block] - wc_carry;
+			wc_carry = ((pattern.df[block] < Z) || (pattern.i_table[block]==all1 && wc_carry)) ? 1 : 0;
+			pattern.prefSufMatch[block] |= (pattern.a_table[block] & (~Z ^ pattern.df[block]));
+		}
+
+#if SEQAN_WILD_SHIFTAND_DEBUG
+		std::cout << "reading " << *finder << std::endl;
+		_printMask(pattern.prefSufMatch,position(finder),"D ");
+		_printMask(pattern.df,position(finder),"Df");
+		std::cout << std::endl;
+#endif
+		
+		// check for match
+		if ((pattern.prefSufMatch[pattern.blockCount-1] & compare) != 0)
+			return true; 
+	}
+	return false;
+}
+
+
+template <typename THaystack, typename TNeedle>
+bool find(Finder<THaystack, Default> & finder,
+          Pattern<TNeedle, WildShiftAnd> & pattern) {
+    SEQAN_CHECKPOINT;
+    typedef Finder<THaystack, Default> TFinder;
+    typedef Pattern<TNeedle, WildShiftAnd> TPattern;
+    typedef typename Position<TNeedle>::Type TPosition;
+
+    // State of finder and pattern should be in sync.
+    SEQAN_ASSERT_EQ(finder._state, pattern._state);
+
+    // Do not continue if the state is "not found".
+    if (finder._state == TPattern::STATE_NOTFOUND)
+        return false;
+    // Initialize finder if state is "initial".  Otherwise advance at
+    // least by one (if not set to of haystack with setEndPosition()).
+    if (finder._state == TPattern::STATE_INITIAL) {
+        _initializePattern(pattern);
+        finder._beginPosition = 0u;
+        finder._endPosition = 0u;
+    } else if (finder._state == TPattern::STATE_NO_HIT) {
+        // Only advance if not at end if set manually to a "no hit" position.
+        if (finder._endPosition == length(haystack(finder)))
+            return false;
+        finder._beginPosition += 1;
+    } else {
+        finder._beginPosition += 1;
+    }
+
+	// Use fast algorithm for needles < machine word if possible.
+	if (pattern.blockCount == 1)
+		return _findWildShiftAndSmallNeedle(finder, pattern);
+	else
+		return _findWildShiftAndLargeNeedle(finder, pattern);
+    return false;
+}
+
+}  // namespace seqan
+          
+#endif  // SEQAN_FIND2_FIND_PATTERN_WILD_SHIFTAND_H_
diff --git a/src/SeqAn-1.3/seqan/find_motif.h b/src/SeqAn-1.3/seqan/find_motif.h
new file mode 100644
index 0000000..5622408
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif.h
@@ -0,0 +1,75 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_MOTIF_H
+#define SEQAN_HEADER_FIND_MOTIF_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <algorithm>
+#include <numeric>
+#include <vector>
+#include <set>
+#include <cfloat>
+
+#include <seqan/sequence.h>
+#include <seqan/file.h>
+#include <seqan/index/shape_base.h>
+#include <seqan/index/shape_gapped.h>
+
+//____________________________________________________________________________
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/find_motif/find_motif_generated_forwards.h>
+#endif
+
+//____________________________________________________________________________
+
+#include <seqan/find_motif/sequence_model_types.h>
+
+#include <seqan/find_motif/pseudocount_base.h>
+#include <seqan/find_motif/pseudocount_mode_c.h>
+#include <seqan/find_motif/pseudocount_mode_p.h>
+
+#include <seqan/find_motif/frequency_distribution.h>
+#include <seqan/find_motif/profile.h>
+
+#include <seqan/find_motif/find_motif_base.h>
+#include <seqan/find_motif/find_motif_pms1.h>
+#include <seqan/find_motif/find_motif_pmsp.h>
+#include <seqan/find_motif/find_motif_projection.h>
+#include <seqan/find_motif/find_motif_epatternbranching.h>
+#include <seqan/find_motif/em_algorithm.h>
+
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/em_algorithm.h b/src/SeqAn-1.3/seqan/find_motif/em_algorithm.h
new file mode 100644
index 0000000..c9de284
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/em_algorithm.h
@@ -0,0 +1,870 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_EM_ALGORITHM_H
+#define SEQAN_HEADER_EM_ALGORITHM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.em:
+..summary:Represents the EM algorithm as used by MEME.
+..cat:Motif Search
+..signature:em(profile,dataset_start,t,l,oops_model)
+..signature:em(profile,dataset_start,t,l,gamma,zoops_model)
+..signature:em(profile,dataset_start,t,l,lambda,tcm_model)
+..param.profile:A StringSet of @Class.FrequencyDistribution|frequency distributions at .
+...type:Class.StringSet
+..param.dataset_start:An iterator pointing to the first input sequence of a given dataset.
+...type:Concept.Iterator
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..param.oops_model:The oops_model object.
+...type:Tag.Oops
+..param.zoops_model:The zoops_model object.
+...type:Tag.Zoops
+..param.tcm_model:The tcm_model object.
+...type:Tag.Tcm
+..param.gamma:The probability of sequence having a motif occurence.
+..param.lambda:The probability of starting a motif occurence 
+...remarks:$lambda$ is calculated by dividing $gamma$ by the length of the corresponding sequence.
+..remarks:This version of EM is used in the MEME program of Bailey and Elkan. It is a Bayesian
+          variant of the basic EM which allows multiple occurrences of a motif in any sequence and can 
+		  therefore be performed on sequences of one of the model types @Tag.Oops@, @Tag.Zoops@ and 
+		  @Tag.Tcm at . We use the EM algorithm of MEME for the refinement step of PROJECTION.
+..include:seqan/find_motif.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//	Oops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TProfile, typename TIter, typename TType>
+double
+em(TProfile & profile, 
+   TIter dataset_start, 
+   TType const & t,
+   TType const & l,
+   Oops const & oops)
+{
+	// matrix w - allocate space (memory)
+	TType row_size = t;
+	double ** matrix_w = new double*[row_size];
+	for(TType pos=0; pos<row_size; ++pos)
+	{
+		TType col_size = length(*(dataset_start+pos))-l+1;
+		matrix_w[pos] = new double[col_size];
+	}
+
+	// E-step: compute matrix z and joint log likelihood
+	double log_likelihood = 0;
+	_computeEStep(matrix_w,log_likelihood,profile,dataset_start,t,l,oops);
+
+	// M-step: refine profile
+	_computeMStep(profile,dataset_start,matrix_w,t,l,oops);
+
+	return log_likelihood;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeEStep:
+..summary:Represents the E-step of the EM algorithm for Oops models.
+..cat:Motif Search
+..signature:_computeEStep(matrix_w,joint_log_likelihood,profile,dataset_start,t,l,oops_model)
+..param.matrix_w:The matrix_w object.
+...remarks:w(i,j) is the probability that the motif pattern 
+            starts at position j in the i-th input sequence.
+..param.joint_log_likelihood:The joint log-likelihood.
+..param.profile:The profile object which is a set of frequency distributions.
+...type:Class.String
+....signature:String<TFrequencyDistribution>
+..param.dataset_start:n iterator pointing to the first input sequence of a given dataset.
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..param.oops_model:The oops_model object.
+...type:Tag.Oops
+..remarks:The joint log likelihood is not computed in the M-step as MEME does, but rather in the E-step
+          of the algorithm.
+..include:seqan/find_motif.h
+*/
+
+template<typename TMatrix, typename TProfile, typename TIter, typename TType>
+void
+_computeEStep(TMatrix & matrix_w, 
+	double & joint_log_likelihood,
+	TProfile & profile, 
+	TIter dataset_start, //start iterator of dataset 
+	TType const & t,
+	TType const & l,
+	Oops const & /*oops*/)
+{
+	typedef typename Value<TProfile>::Type TFrequencyDist;
+	typedef typename Value<TFrequencyDist>::Type TValue;
+	typedef String<TValue> TString;
+	typedef typename Position<TProfile>::Type TPos;
+	for(TPos pos=0; pos<length(profile); ++pos)
+	{
+		logarithmize(profile[pos]); 
+	}
+
+	//compute matrix w
+	TIter dataset_end = dataset_start+t;
+	while(dataset_start!=dataset_end)
+	{
+		TType seq_nr = t-(dataset_end-dataset_start);
+		TType m = length(*dataset_start)-l+1;
+		TFrequencyDist absLetterFrequencies;
+		absFreqOfLettersInSeq(absLetterFrequencies,begin(*dataset_start),end(*dataset_start));
+		typename Iterator<TString>::Type seq_iter, seq_end;
+		seq_iter = begin(*dataset_start);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			TFrequencyDist fd = absLetterFrequencies;
+			double sum_of_log_probs = 0;
+			for(TType h=0; h<l; ++h)
+			{
+				sum_of_log_probs += profile[h+1][(int)*(seq_iter+h)];
+				--fd[(int)*(seq_iter+h)];
+			}
+			sum_of_log_probs +=
+				(double)std::inner_product(begin(fd),end(fd),begin(profile[0]),(double)0);
+			matrix_w[seq_nr][m-(seq_end-seq_iter)] = sum_of_log_probs;
+			++seq_iter;
+		}
+		++dataset_start;
+	}
+
+	//
+	dataset_start -= t;
+	while(dataset_start!=dataset_end)
+	{
+		TType seq_nr = t-(dataset_end-dataset_start);
+		TType m = length(*dataset_start)-l+1;
+		joint_log_likelihood += (log((double)1)-log((double)m));
+
+		double log_of_sums = matrix_w[seq_nr][0];
+		TType j;
+		for(j=1; j<m; ++j)
+		{
+			if( (matrix_w[seq_nr][j]-log_of_sums)>DBL_MIN_EXP )
+			{
+				log_of_sums += log(1+exp(matrix_w[seq_nr][j]-log_of_sums));
+			}
+		}
+
+		for(j=0; j<m; ++j)
+		{
+			double prob = matrix_w[seq_nr][j];
+			matrix_w[seq_nr][j] -= log_of_sums;
+			matrix_w[seq_nr][j] = exp(matrix_w[seq_nr][j]);
+			joint_log_likelihood += matrix_w[seq_nr][j]*prob;
+		}
+
+		++dataset_start;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeStep_M:
+..summary:Represents the M-step of the EM algorithm for Oops models.
+          Refines the background and motif component.
+..cat:Motif Search
+..signature:_computeStep_M(profile,dataset_start,matrix_w,t,l,oops_model)
+..param.profile:The profile object which is a set of frequency distributions.
+...type:Class.String
+....signature:String<TFrequencyDistribution>
+..param.dataset_start:n iterator pointing to the first input sequence of a given dataset.
+..param.matrix_w:The matrix_w object.
+...remarks:w(i,j) is the probability that the motif pattern 
+            starts at position j in the i-th input sequence.
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..param.oops_model:The oops_model object.
+...type:Tag.Oops
+..remarks:The joint log likelihood is computed in the E-step of the algorithm.
+..include:seqan/find_motif.h
+*/
+
+template<typename TProfile, typename TIter, typename TMatrix, typename TType>
+void
+_computeMStep(TProfile & profile, 
+	TIter dataset_start,
+	TMatrix const & matrix_w,
+	TType const & t,
+	TType const & l,
+	Oops const & /*oops*/)
+{
+	typedef typename Value<TProfile>::Type TFrequencyDist;
+	typedef typename Value<TFrequencyDist>::Type TValue;
+	typedef typename Position<TProfile>::Type TPos;
+	TPos k = 0;
+	typedef String<TValue> TString;
+	
+	// total_counts_of_letters is used for the computation of the background frequency
+	TFrequencyDist total_counts_of_letters; //<-c
+	absFreqOfLettersInSetOfSeqs(total_counts_of_letters,dataset_start, dataset_start+t);
+
+	//
+	for(k=0; k<length(profile); ++k)
+	{
+		profile[k] = TFrequencyDist();
+	}
+
+	// refine motif component
+	TIter dataset_end = dataset_start+t;
+	while(dataset_start!=dataset_end)
+	{
+		TType seq_nr = t-(dataset_end-dataset_start);
+		TType m = length(*dataset_start)-l+1;
+		typename Iterator<TString>::Type seq_iter, seq_end, ptr;
+		seq_iter = begin(*dataset_start);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			ptr = seq_iter;
+			for(TType i=0; i<l; ++i)
+			{
+				profile[i+1][(int)*(ptr+i)] += matrix_w[seq_nr][m-(seq_end-seq_iter)];
+			}
+			++seq_iter;
+		}
+		++dataset_start;
+	}
+
+	for(k=1; k<length(profile); ++k)
+	{
+		total_counts_of_letters -= profile[k];
+	}
+
+	// refine background component
+	profile[0] = total_counts_of_letters;
+	
+	// addPseudocount (if necessary) & normalize
+	double epsilon = 0.1;
+	normalize(profile, Pseudocount<TValue, CMode>(epsilon));
+
+	// matrix w - deallocate space (memory)
+	for(TType pos=0; pos<t; ++pos)
+	{
+		delete[] matrix_w[pos];
+	}
+	delete[] matrix_w;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Zoops model
+//////////////////////////////////////////////////////////////////////////////
+
+// gamma=(1/t)*sum(i,1,t,Qi), Qi=sum(j,1,m,zij) (i=1,...,t)
+
+template<typename TProfile, typename TIter, typename TType>
+double
+em(TProfile & profile, 
+   TIter dataset_start, 
+   TType const & t,
+   TType const & l,
+   double & gamma,
+   Zoops const & zoops)
+{
+	// matrix w - allocate space (memory)
+	TType row_size = t;
+	double ** matrix_w = new double*[row_size];
+	for(TType pos=0; pos<row_size; ++pos)
+	{
+		TType col_size = length(*(dataset_start+pos))-l+1;
+		matrix_w[pos] = new double[col_size];
+	}
+
+	// compute matrix w and joint log likelihood, refine gamma
+	double log_likelihood = 0;
+	_computeEStep(matrix_w,log_likelihood,profile,dataset_start,gamma,t,l,zoops);
+
+	// refine profile
+	_computeMStep(profile,dataset_start,matrix_w,t,l,zoops);
+
+	return log_likelihood;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeEStep:
+..summary:Represents the E-step of the EM algorithm for Zoops models.
+..cat:Motif Search
+..signature:_computeEStep(matrix_w,joint_log_likelihood,profile,dataset_start,gamma,t,l,zoops_model)
+..param.matrix_w:The matrix_w object.
+...remarks:w(i,j) is the probability that the motif pattern 
+            starts at position j in the i-th input sequence.
+..param.joint_log_likelihood:The joint log-likelihood.
+..param.profile:The profile object which is a set of frequency distributions.
+...type:Class.String
+....signature:String<TFrequencyDistribution>
+..param.dataset_start:n iterator pointing to the first input sequence of a given dataset.
+..param.gamma:The probability of sequence having a motif occurence.
+...type:$double$
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..param.zoops_model:The oops_model object.
+...type:Tag.Zoops
+..remarks:The joint log likelihood is not computed in the M-step as MEME does, but rather in the E-step
+          of the algorithm.
+..remarks:The parameter gamma is reestimated during the E-step to save calculation time.
+..include:seqan/find_motif.h
+*/
+
+template<typename TMatrix, typename TProfile, typename TIter, typename TType>
+void
+_computeEStep(TMatrix & matrix_w,
+			  double & joint_log_likelihood,
+			  TProfile & profile,
+			  TIter dataset_start,
+			  double & gamma,
+			  TType const & t,
+			  TType const & l,
+			  Zoops const & /*zoops*/)
+{
+	typedef typename Value<TProfile>::Type TFrequencyDist;
+	typedef typename Value<TFrequencyDist>::Type TValue;
+	typedef String<TValue> TString;
+	typedef typename Position<TProfile>::Type TPos;
+	for(TPos pos=0; pos<length(profile); ++pos)
+	{
+		logarithmize(profile[pos]); 
+	}
+
+	double * log_probs_of_motifless_sequences = new double[t];
+
+	//compute matrix w
+	TIter dataset_end = dataset_start+t;
+	while(dataset_start!=dataset_end)
+	{
+		TType seq_nr = t-(dataset_end-dataset_start);
+		TType m = length(*dataset_start)-l+1;
+		TFrequencyDist absLetterFrequencies;
+		absFreqOfLettersInSeq(absLetterFrequencies,begin(*dataset_start),end(*dataset_start));
+		typename Iterator<TString>::Type seq_iter, seq_end;
+		seq_iter = begin(*dataset_start);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			TFrequencyDist fd = absLetterFrequencies;
+			double sum_of_log_probs = 0;
+			for(TType h=0; h<l; ++h)
+			{
+				sum_of_log_probs += profile[h+1][(int)*(seq_iter+h)];
+				--fd[(int)*(seq_iter+h)];
+			}
+			sum_of_log_probs +=
+				(double)std::inner_product(begin(fd),end(fd),begin(profile[0]),(double)0);
+			matrix_w[seq_nr][m-(seq_end-seq_iter)] = sum_of_log_probs;
+			++seq_iter;
+		}
+		log_probs_of_motifless_sequences[seq_nr] =
+			(double)std::inner_product(begin(absLetterFrequencies),
+									   end(absLetterFrequencies),
+									   begin(profile[0]),(double)0);
+		++dataset_start;
+	}
+
+	//
+	double lambda_i = 0; 
+	double sum_of_Q_i = 0;
+	dataset_start -= t;
+	while(dataset_start!=dataset_end)
+	{
+		TType seq_nr = t-(dataset_end-dataset_start);
+		TType m = length(*dataset_start)-l+1;
+		lambda_i = gamma/((double)m);
+		joint_log_likelihood += (log((double)1)-log((double)m));
+
+		double log_of_sums = matrix_w[seq_nr][0];
+		TType j;
+		for(j=1; j<m; ++j)
+		{
+			if( (matrix_w[seq_nr][j]-log_of_sums)>DBL_MIN_EXP )
+			{
+				log_of_sums += log(1+exp(matrix_w[seq_nr][j]-log_of_sums));
+			}
+		}
+		for(j=0; j<m; ++j)
+		{
+			double prob = matrix_w[seq_nr][j];
+			matrix_w[seq_nr][j] += log(lambda_i);
+			double exponent =
+				log_of_sums+log(lambda_i)-log_probs_of_motifless_sequences[seq_nr]-log(1-gamma);
+			if( exponent>DBL_MIN_EXP )
+			{
+				matrix_w[seq_nr][j] -=
+					(log_probs_of_motifless_sequences[seq_nr]+log(1-gamma)+log(1+exp(exponent)));
+			}
+			else
+			{
+				matrix_w[seq_nr][j] -= 
+					(log_probs_of_motifless_sequences[seq_nr]+log(1-gamma));
+			}
+			matrix_w[seq_nr][j] = exp(matrix_w[seq_nr][j]);
+			joint_log_likelihood += matrix_w[seq_nr][j]*prob;
+		}
+		double Q_i = 
+			std::accumulate(matrix_w[seq_nr],matrix_w[seq_nr]+m,(double)0);
+		sum_of_Q_i += Q_i;
+		joint_log_likelihood +=
+			((1-Q_i)*log_probs_of_motifless_sequences[seq_nr])
+		   +(Q_i*log(lambda_i))
+		   +((1-Q_i)*log(1-gamma));
+
+		++dataset_start;
+	}
+	delete[] log_probs_of_motifless_sequences;
+
+	// refine value of gamma
+	gamma =  sum_of_Q_i*((double)1/(double)t);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeStep_M:
+..summary:Represents the M-step of the EM algorithm for Zoops models.
+          Refines the background and motif component.
+..cat:Motif Search
+..signature:_computeStep_M(profile,dataset_start,matrix_w,t,l,zoops_model)
+..param.profile:The profile object which is a set of frequency distributions.
+...type:Class.String
+....signature:String<TFrequencyDistribution>
+..param.dataset_start:n iterator pointing to the first input sequence of a given dataset.
+..param.matrix_w:The matrix_w object.
+...remarks:w(i,j) is the probability that the motif pattern 
+            starts at position j in the i-th input sequence.
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..param.zoops_model:The zoops_model object.
+...type:Tag.Zoops
+..remarks:The joint log likelihood is computed in the E-step of the algorithm.
+..include:seqan/find_motif.h
+*/
+
+template<typename TProfile, typename TIter, typename TMatrix, typename TType>
+void
+_computeMStep(TProfile & profile,
+			  TIter dataset_start,
+			  TMatrix const & matrix_w,
+			  TType const & t,
+	          TType const & l,
+			  Zoops const & /*zoops*/)
+{
+	typedef typename Value<TProfile>::Type TFrequencyDist;
+	typedef typename Value<TFrequencyDist>::Type TValue;
+	typedef typename Position<TProfile>::Type TPos;
+	TPos k = 0;
+	typedef String<TValue> TString;
+	
+	// total_counts_of_letters is used for the computtation of the background frequency
+	TFrequencyDist total_counts_of_letters; //<-c
+	absFreqOfLettersInSetOfSeqs(total_counts_of_letters,dataset_start, dataset_start+t);
+
+	//
+	for(k=0; k<length(profile); ++k)
+	{
+		profile[k] = TFrequencyDist();
+	}
+
+	// refine motif component
+	TIter dataset_end = dataset_start+t;
+	while(dataset_start!=dataset_end)
+	{
+		TType seq_nr = t-(dataset_end-dataset_start);
+		TType m = length(*dataset_start)-l+1;
+		typename Iterator<TString>::Type seq_iter, seq_end, ptr;
+		seq_iter = begin(*dataset_start);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			ptr = seq_iter;
+			for(TType i=0; i<l; ++i)
+			{
+				profile[i+1][(int)*(ptr+i)] += matrix_w[seq_nr][m-(seq_end-seq_iter)];
+			}
+			++seq_iter;
+		}
+		++dataset_start;
+	}
+
+	for(k=1; k<length(profile); ++k)
+	{
+		total_counts_of_letters -= profile[k];
+	}
+
+	// refine background component
+	profile[0] = total_counts_of_letters;
+	
+	// addPseudocount (if necessary) & normalize
+	double epsilon = 0.1;
+	normalize(profile, Pseudocount<TValue, CMode>(epsilon));
+
+	// matrix w - deallocate space (memory)
+	for(TType pos=0; pos<t; ++pos)
+	{
+		delete[] matrix_w[pos];
+	}
+	delete[] matrix_w;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Tcm model
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+..remarks:Dataset X is converted into a new pseudo-dataset consisting of all the width-l
+          overlapping subsequences by running a window of width-l along each sequence Xi 
+          and writing down the string contained in the window. Then the new dataset is 
+          modeled as though it were generated by a two-component mixture model where each 
+          component generates a string of width-l.
+..remarks:Xij:=a width-l pseudo-sequence (=[Xij,Xij+1,...,Xij+l-1])
+..remarks:lambda=gamma/m
+*/
+
+template<typename TProfile, typename TIter, typename TType>
+double
+em(TProfile & profile,
+   TIter dataset_start,
+   TType const & t,
+   TType const & l,
+   double & lambda,
+   Tcm const & tcm)
+{
+	// matrix z - allocate space (memory)
+	TType row_size = t;
+	double ** matrix_w = new double*[row_size];
+	for(TType pos=0; pos<row_size; ++pos)
+	{
+		TType col_size = length(*(dataset_start+pos))-l+1;
+		matrix_w[pos] = new double[col_size];
+	}
+
+	// E-step: compute matrix w and the joint log likelihood
+	double log_likelihood = 0;
+	_computeEStep(matrix_w,log_likelihood,profile,dataset_start,lambda,t,l,tcm);
+
+	// M-step: refine profile
+	_computeMStep(profile,dataset_start,matrix_w,t,l,tcm);
+
+	return log_likelihood;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeEStep:
+..summary:Represents the E-step of the EM algorithm for Tcm models.
+..cat:Motif Search
+..signature:_computeEStep(matrix_w,joint_log_likelihood,profile,dataset_start,lambda,t,l,tcm_model)
+..param.matrix_w:The matrix_w object.
+...remarks:w(i,j) is the probability that the motif pattern 
+            starts at position j in the i-th input sequence.
+..param.joint_log_likelihood:The joint log-likelihood.
+..param.profile:The profile object which is a set of frequency distributions.
+...type:Class.String
+....signature:String<TFrequencyDistribution>
+..param.dataset_start:n iterator pointing to the first input sequence of a given dataset.
+..param.lambda:The probability of starting a motif occurence 
+...type:$double$
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..param.tcm_model:The tcm_model object.
+...type:Tag.Tcm
+..remarks:The joint log likelihood is not computed in the M-step as MEME does, but rather in the E-step
+          of the algorithm.
+..remarks:The parameter lambda is reestimated during the E-step to save calculation time.
+..include:seqan/find_motif.h
+*/
+
+template<typename TMatrix, typename TProfile, typename TIter, typename TType>
+void
+_computeEStep(TMatrix & matrix_w,
+			  double & joint_log_likelihood,
+			  TProfile & profile, 
+			  TIter dataset_start,
+			  double & lambda,
+			  TType const & t,
+			  TType const & l,
+			  Tcm const & /*tcm*/)
+{
+	typedef typename Value<TProfile>::Type TFrequencyDist;
+	typedef typename Value<TFrequencyDist>::Type TValue;
+	typedef String<TValue> TString;
+	typedef typename Position<TProfile>::Type TPos;
+	for(TPos pos=0; pos<length(profile); ++pos)
+	{
+		logarithmize(profile[pos]); 
+	}
+
+	//compute matrix w
+	double prev_lambda = lambda;
+	TIter dataset_end = dataset_start+t;
+	while(dataset_start!=dataset_end)
+	{
+		TType seq_nr = t-(dataset_end-dataset_start);
+		TType m = length(*dataset_start)-l+1;
+		double Q_i = 0;
+		typename Iterator<TString>::Type seq_iter, seq_end, ptr;
+		seq_iter = begin(*dataset_start);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			TType seq_pos = m-(seq_end-seq_iter);
+			ptr = seq_iter;
+			double log_prob_given_theta0 = 0;
+			double log_prob_given_theta1 = 0;
+			for(TType i=0; i<l; ++i)
+			{
+				log_prob_given_theta0 += profile[0][(int)*(ptr+i)];
+				log_prob_given_theta1 += profile[i+1][(int)*(ptr+i)];
+			}
+			double minuend = log_prob_given_theta1+log(prev_lambda);
+			double subtrahend = 0;
+			double exponent = minuend-log_prob_given_theta0-log((double)(1-prev_lambda));
+			if(exponent>DBL_MIN_EXP)
+			{
+				subtrahend =
+					log_prob_given_theta0+log((double)(1-prev_lambda))
+				   +log((double)(1+exp(exponent)));
+			}
+			else
+			{
+				subtrahend =
+					log_prob_given_theta0+log((double)(1-prev_lambda));
+			}
+
+			matrix_w[seq_nr][seq_pos] = exp(minuend-subtrahend);
+			Q_i += matrix_w[seq_nr][seq_pos];
+			joint_log_likelihood += ((double)(1-matrix_w[seq_nr][seq_pos]))*log_prob_given_theta0
+									+matrix_w[seq_nr][seq_pos]*log_prob_given_theta1
+									+((double)(1-matrix_w[seq_nr][seq_pos]))*log((double)(1-prev_lambda))
+									+matrix_w[seq_nr][seq_pos]*log(prev_lambda);
+			++seq_iter;
+		}
+		lambda += (Q_i/((double)m));
+		++dataset_start;
+	}
+	lambda = lambda/((double)t);
+
+	// apply a smoothing step to reduce the degree to which any two overlapping 
+	// subsequences can both be assigned to the motif component
+	dataset_start -= t;
+	_smoothingStep(matrix_w, dataset_start, t, l);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeStep_M:
+..summary:Represents the M-step of the EM algorithm for Tcm models.
+          Refines the background and motif component.
+..cat:Motif Search
+..signature:_computeStep_M(profile,dataset_start,matrix_w,t,l,tcm_model)
+..param.profile:The profile object which is a set of frequency distributions.
+...type:Class.String
+....signature:String<TFrequencyDistribution>
+..param.dataset_start:n iterator pointing to the first input sequence of a given dataset.
+..param.matrix_w:The matrix_w object.
+...remarks:w(i,j) is the probability that the motif pattern 
+            starts at position j in the i-th input sequence.
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..param.tcm_model:The tcm_model object.
+...type:Tag.Tcm
+..remarks:The joint log likelihood is computed in the E-step of the algorithm.
+..include:seqan/find_motif.h
+*/
+
+template<typename TProfile, typename TIter, typename TMatrix, typename TType>
+void
+_computeMStep(TProfile & profile,
+			  TIter dataset_start,
+			  TMatrix const & matrix_w,
+			  TType const & t,
+	          TType const & l,
+			  Tcm const & /*tcm*/)
+{
+	typedef typename Value<TProfile>::Type TFrequencyDist;
+	typedef typename Value<TFrequencyDist>::Type TValue;
+	typedef typename Position<TProfile>::Type TPos;
+	TPos k = 0;
+	typedef String<TValue> TString;
+	
+	//
+	for(k=0; k<length(profile); ++k)
+	{
+		profile[k] = TFrequencyDist();
+	}
+
+	// refine motif component
+	TIter dataset_end = dataset_start+t;
+	while(dataset_start!=dataset_end)
+	{
+		TType seq_nr = t-(dataset_end-dataset_start);
+		TType m = length(*dataset_start)-l+1;
+		typename Iterator<TString>::Type seq_iter, seq_end, ptr;
+		seq_iter = begin(*dataset_start);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			ptr = seq_iter;
+			for(TType i=0; i<l; ++i)
+			{
+				profile[i+1][(int)*(ptr+i)] += matrix_w[seq_nr][m-(seq_end-seq_iter)];
+				profile[0][(int)*(ptr+i)] += (double)(1-matrix_w[seq_nr][m-(seq_end-seq_iter)]);
+			}
+			++seq_iter;
+		}
+		++dataset_start;
+	}
+
+	// addPseudocount (if necessary) & normalize
+	double epsilon = 0.1;
+	normalize(profile, Pseudocount<TValue, CMode>(epsilon));
+
+	// matrix w - deallocate space (memory)
+	for(TType pos=0; pos<t; ++pos)
+	{
+		delete[] matrix_w[pos];
+	}
+	delete[] matrix_w;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//Subfunctions
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._smoothingStep:
+..summary:Applies a smoothing step to reduce the degree to which any two overlapping 
+          subsequences can both be assigned to the motif component.
+         (We do not want the model to predict that two overlapping substrings are both 
+          motif occurences.)
+..cat:Motif Search
+..signature:_smoothingStep(matrix_w,dataset_start,t,l)
+..param.matrix_w:The matrix_w object.
+...remarks:w(i,j) is the probability that the motif pattern 
+            starts at position j in the i-th input sequence.
+..param.dataset_start:An iterator pointing to the first input sequence of a given dataset.
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..remarks:Function is used by the EM algorithm for Tcm models.
+..include:seqan/find_motif.h
+*/
+
+template<typename TMatrix, typename TIter, typename TType>
+void
+_smoothingStep(TMatrix & matrix_w,
+			   TIter dataset_start,
+			   TType const & t,
+			   TType const & l)
+{
+	TType h = 0;
+	for(TType i=0; i<t; ++i)
+	{
+		TType m = length(*(dataset_start+i))-l+1;
+		for(TType s=0; s<l; ++s)
+		{
+			TType k = s;
+			double w_sum;
+			double w_max;
+			double factor;
+			while( ((m-k)/l)>=1 )
+			{
+				w_sum = 0;
+				w_max = 0;
+				factor = 0;
+
+				// w_sum:=sum of Zij in the current window of size l (l:=l)
+				w_sum = (double)(std::accumulate(matrix_w[i]+k, 
+										matrix_w[i]+k+l, (double)0));
+				// w_max:=the largest Zij in the current window
+				w_max =
+					(double)(*std::max_element(matrix_w[i]+k,matrix_w[i]+k+l));
+				if(w_sum>1.0)
+				{
+					factor = ((double)1-w_max)/(w_sum-w_max);
+					for(h=k; h<k+l; ++h)
+					{
+						if(matrix_w[i][h]!=w_max)
+						{
+							matrix_w[i][h] *= factor;
+						}
+					}
+				}
+				k += l;
+			}
+
+			if( (m-k)>1 )
+			{
+				w_sum = 0;
+				w_max = 0;
+				factor = 0;
+
+				// w_sum:=sum of Zij in the current window of size l (l:=l)
+				w_sum = (double)(std::accumulate(matrix_w[i]+k, 
+										matrix_w[i]+m, (double)0));
+				// w_max:=the largest Zij in the current window
+				w_max =
+					(double)(*std::max_element(matrix_w[i]+k,matrix_w[i]+m));
+				if(w_sum>1.0)
+				{
+					factor = ((double)1-w_max)/(w_sum-w_max);
+					for(h=k; h<m; ++h)
+					{
+						if(matrix_w[i][h]!=w_max)
+						{
+							matrix_w[i][h] *= factor;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+} // SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/find_motif_base.h b/src/SeqAn-1.3/seqan/find_motif/find_motif_base.h
new file mode 100644
index 0000000..a4d1a5e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/find_motif_base.h
@@ -0,0 +1,366 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_MOTIF_BASE_H
+#define SEQAN_HEADER_FIND_MOTIF_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.MotifFinder:
+..summary:Holds the algorithm parameter values and the motif instance(s) found by the appropriate
+          motif discovery algorithm.
+..cat:Motif Search
+..signature:MotifFinder<TValue, TSpec>
+..param.TValue:The type of sequences to be analyzed.
+...metafunction:Metafunction.Value
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..param.TSpec:The motif finding algorithm to search with.
+...type:Spec.Projection
+...type:Spec.EPatternBranching
+...type:Spec.Pms1
+...type:Spec.Pmsp
+..include:seqan/find_motif.h
+*/
+
+template <typename TValue, typename TSpec>
+class MotifFinder;
+
+//////////////////////////////////////////////////////////////////////////////
+//Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.MotifFinder
+
+template<typename TValue, typename TSpec>
+struct Value< MotifFinder<TValue, TSpec> >
+{
+	typedef TValue Type;
+};
+template<typename TValue, typename TSpec>
+struct Value< MotifFinder<TValue, TSpec> const>
+{
+	typedef TValue const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.findMotif:
+..summary:Represents the main function which is used to start the search for noticeable motif patterns.
+..cat:Motif Search
+..signature:findMotif(finder,dataset,seq_model)
+..param.finder:The @Class.MotifFinder@ object.
+...type:Class.MotifFinder
+..param.dataset:The dataset object representing the input sequences.
+...type:Class.StringSet
+..param.seq_model:The seq_model object.
+...type:Tag.Oops
+...type:Tag.Omops
+...type:Tag.Zoops
+...type:Tag.Tcm
+...remarks:The sequence models rely on different assumptions about the distribution of motif occurrences
+           across the sample sequences. 
+..remarks:The PROJECTION algorithm is able to run in @Tag.Oops@, @Tag.Zoops@ and @Tag.Tcm@ mode.
+..remarks:The ePatternBranching algorithm is able to run in @Tag.Oops@ and @Tag.Omops@ mode.
+..remarks:The Pms1 and Pmsp algorithm is able to run in  @Tag.Oops@,  @Tag.Omops@,  @Tag.Zoops@ and  
+          @Tag.Tcm@ mode.
+..include:seqan/find_motif.h
+*/
+
+/**
+.Function.factorial:
+..summary:Calculates the factorial value of any integer number.
+..cat:Motif Search
+..signature:factorial(value)
+..param.value:The value object.
+...remarks:$value$ must be a positive integer.
+..remarks:The factorial of a non-negative integer $value$ is 
+          the product of all positive integers less than or equal to $value$.  
+..include:seqan/find_motif.h
+*/
+
+template<typename TType>
+TType factorial(TType n)
+{
+    SEQAN_CHECKPOINT;
+
+	TType result = 0;
+
+	if(n==0)
+	{
+		result = 1;
+	}
+	else
+	{
+		result = n*factorial(n-1);
+	}
+   
+	return result;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.binomialCoefficient:
+..summary:Calculates the binomial coefficient C(n,k).
+..cat:Motif Search
+..signature:binomialCoefficient(n,k)
+..param.n:The first parameter object.
+...remarks:$n$ must be a positive integer.
+..param.k:The second parameter object.
+...remarks:$k$ must be a positive integer.
+..remarks:The binomial coefficient of $n$ and $k$ is equal to zero 
+          if $k$ is greater than $n$.   
+..include:seqan/find_motif.h
+*/
+
+template<typename TType>
+TType binomialCoefficient(TType n, TType k)
+{
+    SEQAN_CHECKPOINT;
+
+	//SEQAN_ASSERT(!(n<0) & !(k<0));
+	TType result = 1;
+	for(TType i=(n-k+1); i<=n; ++i)
+	{
+		result*=i;
+	}
+	result = result/factorial(k);
+	
+	return result;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.hammingDistance:
+..summary:Determines the Hamming distance between two sequences.
+..cat:Motif Search
+..signature:hammingDistance<TType>(begin1,end1,begin2)
+..param.TType:Distance type.
+..param.begin1:An iterator pointing to the beginning of the first sequence which is either
+              a @Shortcut.DnaString@ or a @Shortcut.Peptide at . 
+...type:Concept.Iterator
+...type:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+..param.end1:An iterator pointing to the end of the first sequence which is either
+            a @Shortcut.DnaString@ or a @Shortcut.Peptide at . 
+...type:Concept.Iterator
+...type:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+..param.begin2:An iterator pointing to the beginning of the second sequence which is either
+              a @Shortcut.DnaString@ or a @Shortcut.Peptide at . 
+...type:Concept.Iterator
+...type:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+..include:seqan/find_motif.h
+*/
+
+template<typename TType, typename TStringIterator>
+TType hammingDistance(TStringIterator start1, TStringIterator end1, TStringIterator start2)
+{
+    SEQAN_CHECKPOINT;
+
+	TType num_of_mismatches = 0;
+	while(start1!=end1)
+	{
+		if(*start1!=*start2)
+		{
+			++num_of_mismatches;
+		}
+		++start1;
+		++start2;
+	}
+
+	return num_of_mismatches;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.inverseHash:
+..summary:Determines the corresponding sequence pattern given the hash value.
+..cat:Motif Search
+..signature:inverseHash<TValue>(hash_value,alphabet_size,seq_size)
+..param.hash_value:The hash_value object.
+..param.alphabet_size:The alphabet_size object.
+...remarks:$alphabet_size$ is four for nucleotide sequences and twenty for amino acid sequences.
+..param.seq_size:The seq_size object representing the size of the corresponding sequence.
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TType>
+String<TValue>
+inverseHash(TType const & hash_value, 
+			typename Size<TValue>::Type const & alp_size, 
+			typename Size< String<TValue> >::Type const & seq_size)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef String<TValue> TString;
+	TString seq;
+	resize(seq, seq_size);
+
+	TType hash_val = hash_value;
+	typedef typename Position<TString>::Type TPos;
+	for(TPos i=0; i<seq_size; ++i)
+	{
+		int letter = hash_val%alp_size;
+		seq[i] = (TValue)letter;
+		hash_val = (hash_val-letter)/alp_size;
+	}
+
+	std::reverse(begin(seq), end(seq));
+	return seq;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.displayResult:
+..summary:Displays all found motif candidates. In the case of the Projection Motif Finder
+          the function displays the consensus pattern of the found motif candidate.
+..cat:Motif Search
+..signature:displayResult(motif_finder)
+..param.motif_finder:The @Class.MotifFinder@ object.
+...type:Class.MotifFinder
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TAlgorithm>
+void
+displayResult(MotifFinder<TValue, TAlgorithm> & finder)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef String<TValue> TString;
+	typedef String<TString> TStrings;
+
+	if(length(finder.set_of_motifs)!=0)
+	{
+		unsigned int counter = 0;
+		typename Iterator<TStrings>::Type iter = begin(finder.set_of_motifs);
+		for(; !atEnd(iter, finder.set_of_motifs); goNext(iter))
+		{
+			std::cout << "[" << counter << "]: " << *iter << "\n";
+			++counter;
+		}
+		std::cout << "\n";
+	}
+	else
+	{
+		std::cout << "NO MOTIF HAS BEEN FOUND!!!\n";
+	}
+}
+
+/////////////////////////////////////////////////////////////////////////
+/**
+.Metafunction.Motif:
+..summary:The string type of the finder.
+..signature:Motif<T>::Type
+..param.T:Finder for which the string type is determined.
+...type:Class.String
+..returns.param.Type:Underlying sequence type of finder $T$.
+..include:seqan/find_motif.h
+ */
+template <typename T>
+struct Motif;
+
+template <typename TValue, typename TSpec>
+struct Motif< MotifFinder<TValue,TSpec> >
+{
+	typedef String<TValue> Type;
+};
+
+/////////////////////////////////////////////////////////////////////////
+/**
+.Function.getMotif:
+..summary:Gets the motif out of a @Class.MotifFinder at .  If pos is given, the pos-th motif is returned, otherwise the first motif is returned.
+..cat:Motif Search
+..signature:getMotif(motifFinder, pos)
+..param.motifFinder:
+...type:Class.MotifFinder
+..param.pos:Position 
+..include:seqan/find_motif.h
+*/
+
+template <typename TValue, typename TSpec, typename TPosition>
+inline typename Motif<MotifFinder<TValue, TSpec> >::Type &
+getMotif(MotifFinder<TValue, TSpec> & me,
+		 TPosition pos)
+{
+    SEQAN_CHECKPOINT;
+	return me.set_of_motifs[pos];
+}
+
+///.Function.getMotif.signature:getMotif(motifFinder)
+template <typename TValue, typename TSpec>
+inline typename Motif<MotifFinder<TValue, TSpec> >::Type &
+getMotif(MotifFinder<TValue, TSpec> & me)
+{
+    SEQAN_CHECKPOINT;
+	return me.set_of_motifs[0];
+}
+
+/////////////////////////////////////////////////////////////////////////
+/**
+.Function.motifCount:
+..summary:Gets number of motifs in the @Class.MotifFinder at .
+..cat:Motif Search
+..signature:motifCount(motifFinder)
+..param.motifFinder:
+...type:Class.MotifFinder
+..include:seqan/find_motif.h
+*/
+
+template <typename TValue, typename TSpec>
+inline size_t
+motifCount(MotifFinder<TValue, TSpec> const & me)
+{
+    SEQAN_CHECKPOINT;
+	return length(me.set_of_motifs);
+}
+
+
+/////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/find_motif_epatternbranching.h b/src/SeqAn-1.3/seqan/find_motif/find_motif_epatternbranching.h
new file mode 100644
index 0000000..39b3c1b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/find_motif_epatternbranching.h
@@ -0,0 +1,768 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_MOTIF_EPatternBranching_H
+#define SEQAN_HEADER_FIND_MOTIF_EPatternBranching_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// EPatternBranching
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.EPatternBranching:
+..summary: Represents the ePatternBranching algorithm of Davila and Rajasekaran.
+..general:Class.MotifFinder
+..cat:Motif Search
+..signature:MotifFinder<TValue, EPatternBranching>
+..param.TValue:The type of sequences to be analyzed.
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..remarks:The @Spec.EPatternBranching@ algorithm is an extended version of the
+          well-known PatternBranching algorithm which was developed by Price et al. 
+		  It is a heuristic algorithm such as @Spec.Projection@ and uses a pattern-based
+		  approach. The algorithm searches in the space of possible motifs. The basic concept
+		  of @Spec.EPatternBranching@ remains the same as in the original PatternBranching algorithm
+		  Starting from each l-mer $x$ in the input sequences the algorithm iteratively searches
+		  around the vicinities of $x$ and finds the best neighbors by applying a specific function
+		  called bestNeighbors. At the end of each step, it selects those patterns from the set
+		  of best neighbors that fulfill a particular condition and that are therefore qualified
+		  for being a motif instance.
+..include:seqan/find_motif.h
+*/
+
+///.Class.MotifFinder.param.TSpec.type:Spec.EPatternBranching
+
+struct EPatternBranching_;
+typedef Tag<EPatternBranching_> const EPatternBranching;
+
+//////////////////////////////////////////////////////////////////////////////
+// MotifFinder - EPatternBranching Spec
+//
+// t:=dataset size (number of sequences)
+// n:=average sequence size
+// l:=motif size
+// d:=number of substitutions
+// h:=size of the neighborhood considering at first
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+class MotifFinder<TValue, EPatternBranching>
+{
+//_________________________________________________________________________________
+
+public:
+	typedef unsigned int TSize;
+	typedef String<TValue> TString;
+	typedef String<TString> TStrings;
+	typedef String<int> TIntAr;
+
+	TSize dataset_size;
+	TSize motif_size;
+	TSize num_of_substitutions;
+	bool has_exact_substitutions;
+	TSize neighborhood_size;
+	TStrings set_of_motifs; // result set
+
+//_________________________________________________________________________________
+
+	MotifFinder()
+	{
+    SEQAN_CHECKPOINT;
+	}
+	MotifFinder(TSize const & t_, 
+		        TSize const & l_, 
+				TSize const & d_, 
+				bool const & is_exact_, 
+				TSize const & h_):
+		dataset_size(t_),
+	    motif_size(l_),
+		num_of_substitutions(d_),
+		has_exact_substitutions(is_exact_),
+		neighborhood_size(h_)
+	{
+    SEQAN_CHECKPOINT;
+	}
+	MotifFinder(TSize const & t_, 
+		        TSize const & l_, 
+				TSize const & d_, 
+				bool const & is_exact_, 
+				TIntAr & n_ar_):
+		dataset_size(t_),
+	    motif_size(l_),
+		num_of_substitutions(d_),
+		has_exact_substitutions(is_exact_),
+		neighborhood_size(0)
+	{
+    SEQAN_CHECKPOINT;
+		neighborhood_size = 
+			computeH(dataset_size, motif_size, num_of_substitutions, is_exact_, n_ar_); 
+	}
+	MotifFinder(MotifFinder const & other_):
+	    dataset_size(other_.dataset_size),
+		motif_size(other_.motif_size),
+		num_of_substitutions(other_.num_of_substitutions),
+		has_exact_substitutions(other_.has_exact_substitutions),
+		neighborhood_size(other_.neighborhood_size)
+	{
+    SEQAN_CHECKPOINT;
+	}
+	~MotifFinder()
+	{
+    SEQAN_CHECKPOINT;
+	}
+
+	MotifFinder const &
+	operator = (MotifFinder const & other_)
+	{
+    SEQAN_CHECKPOINT;
+		if(this!=&other_)
+		{
+			dataset_size = other_.dataset_size;
+			motif_size = other_.motif_size;
+			num_of_substitutions = other_.num_of_substitutions;
+			has_exact_substitutions = other_.has_exact_substitutions;
+			neighborhood_size = other_.neighborhood_size;
+		}
+
+		return *this;
+	}
+
+//_________________________________________________________________________________
+
+}; // class MotifFinder<TValue, EPatternBranching>
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.computeH:
+..summary:Computes the size of the neighborhood considering at first.
+..cat:Motif Search
+..signature:computeH(t,l,d,is_exact,n_ar)
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.is_exact:The size of Hamming distance
+...type:$bool$
+..param.n_ar:The array with the sequence lengths of each input sequence.
+...remarks:If all input sequences have the same sequence lengths n_ar consists of t equal values.
+..include:seqan/find_motif.h
+*/
+
+template<typename TType, typename TIntAr>
+TType
+computeH(TType const & t, TType const & l, TType const & d, bool const & is_exact, TIntAr & n_ar) 
+{
+    SEQAN_CHECKPOINT;
+
+	TType d_bar = d-1;
+	double sum = 0; //probability p_d
+	double prob_P = 1;
+
+	if(is_exact)
+	{
+		sum = ((double)binomialCoefficient(l,d_bar))
+			*pow(0.75, (double)d_bar)*pow(0.25, (double)l-d_bar);
+	}
+	else
+	{
+		for(unsigned int i=0; i<=d_bar; ++i)
+		{
+			sum+= 
+				((double)binomialCoefficient(l,i))
+			   *pow(0.75, (double)i)*pow(0.25, (double)l-i);
+		}
+	}
+
+	do{
+		++d_bar;
+		if(is_exact)
+		{
+			sum = 0;
+			sum = ((double)binomialCoefficient(l,d_bar))
+				*pow(0.75, (double)d_bar)*pow(0.25, (double)l-d_bar);
+		}
+		else
+		{
+			sum += ((double)binomialCoefficient(l,d_bar))
+				  *pow(0.75, (double)d_bar)*pow(0.25, (double)l-d_bar);
+		}
+		prob_P = 1;
+		for(unsigned int i=0; i<t; ++i)
+		{
+			TType n = n_ar[i];
+			prob_P*= (double)(1-pow((double)1-sum, (double)(n-l+1)));
+		}
+	} while( (prob_P<0.95) & (d_bar<2*d-1) );
+
+	TType h = 2*d-d_bar-1;
+	if(h>=d)
+	{
+		h=0;
+	}
+	
+	return h;
+}
+
+/////////////////////////////////////////////////////////////////////////
+
+template<typename TSeqType, typename TStrings, typename TModel>
+inline void
+findMotif(MotifFinder<TSeqType ,EPatternBranching> & epb2, 
+		  TStrings & dataset, 
+		  TModel seq_model)
+{
+    SEQAN_CHECKPOINT;
+	ePatternBranching(epb2.set_of_motifs,
+		               dataset,
+					   epb2.motif_size,
+					   epb2.num_of_substitutions,
+					   epb2.has_exact_substitutions,
+					   epb2.neighborhood_size,
+					   seq_model);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.ePatternBranching:
+..summary:Represents the ePatternBranching algorithm.
+..cat:Motif Search
+..signature:ePatternBranching(result_set,dataset,l,d,is_exact,h,seq_model)
+..param.result_set:The result_set object.
+..param.dataset:The dataset object representing the input sequences.
+...type:Class.String
+...signature:String<TString>
+...param.TString:A @Class.String@ type
+....type:Class.String
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.is_exact:The size of Hamming distance.
+...type:$bool$
+..param.h:The size of the neighborhood considering at first.
+..param.seq_model:The seq_model object.
+...type:Tag.Oops
+...type:Tag.Omops
+..remarks:The ePatternBranching algorithm is able to run in Oops and Omops mode.
+..include:seqan/find_motif.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//	original version = Omops model
+//////////////////////////////////////////////////////////////////////////////
+
+//considering only the first input sequence
+template<typename TStrings, typename TType>
+void 
+ePatternBranching(TStrings & result_set,
+				   TStrings & dataset,
+				   TType const & l,
+				   TType const & d,
+				   bool const & is_exact,
+				   TType & h,
+				   Omops const & /*omops*/)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	typedef String<int> TIntAr;
+	//typename Size<TStrings>::Type t = length(dataset);
+	typename Iterator<TStrings>::Type ds_iter = begin(dataset);
+	Shape<TValue> shape(l);
+	std::set<int> result;
+
+	//we only consider l-mers from the first input sequence as starting points
+	typename Size<TString>::Type seq_len = length(*ds_iter);
+	typename Iterator<TString>::Type seq_iter = begin(*ds_iter);
+	typename Iterator<TString>::Type seq_end = begin(*ds_iter)+(seq_len-l+1);
+	while(seq_iter!=seq_end)
+	{	
+		//build set of h-neighborhood of l-mer x
+		std::vector<int> V;
+		createDVariants(V, seq_iter, l, h, is_exact, shape);
+		std::vector<int>::iterator V_iter = V.begin();
+		std::vector<int>::iterator V_end = V.end();
+		while(V_iter!=V_end)
+		{
+			TIntAr Chi;
+			resize(Chi, 1);
+			Chi[0] = *V_iter;
+			for(unsigned int j=h; j<=(d-1); ++j)
+			{
+				std::set<int> good_neighbors;
+				typename Iterator<TIntAr>::Type Chi_iter = begin(Chi);
+				typename Iterator<TIntAr>::Type Chi_end = end(Chi);
+				while(Chi_iter!=Chi_end)
+				{
+					std::set<int> neighbors;
+					bestNeighbors(neighbors,*Chi_iter,j,l,d,dataset);
+					std::set_union(good_neighbors.begin(),good_neighbors.end(),
+								   neighbors.begin(),neighbors.end(),
+								   std::inserter(good_neighbors, good_neighbors.end()));
+					++Chi_iter;
+				}
+				clear(Chi);
+				resize(Chi, good_neighbors.size());
+				std::copy(good_neighbors.begin(), good_neighbors.end(), begin(Chi));
+				good_neighbors.clear();
+			}
+			// filtering relevant motif candidates
+			// check if pattern occurs at least once in each sequence
+			typename Iterator<TIntAr>::Type ar_iter = begin(Chi);
+			typename Iterator<TIntAr>::Type ar_end = end(Chi);
+			while(ar_iter!=ar_end)
+			{
+				TString pattern =
+					inverseHash<TValue>(*ar_iter, ValueSize<TValue>::VALUE, l);
+				ds_iter = begin(dataset);
+				typename Iterator<TStrings>::Type ds_end = end(dataset);
+				bool hasOMOPS = true;
+				while((ds_iter!=ds_end) & hasOMOPS)
+				{
+					if(!(hasAtLeastOneOccurrence(begin(pattern),begin(*ds_iter),end(*ds_iter),l,d,is_exact)))
+					{
+						hasOMOPS = false;
+					}
+					++ds_iter;
+				}
+				if(hasOMOPS)
+				{
+					result.insert(*ar_iter);
+				}
+				++ar_iter;
+			}
+			++V_iter;
+		}
+		++seq_iter;
+	}
+	resize(result_set, result.size());
+	std::set<int>::iterator set_iter = result.begin();
+	std::set<int>::iterator set_end = result.end();
+	typename Position<TStrings>::Type pos = 0;
+	while(set_iter!=set_end)
+	{
+		TString l_mer = 
+			inverseHash<TValue>(*set_iter, ValueSize<TValue>::VALUE, l);
+		result_set[pos] = l_mer;
+		++set_iter;
+		++pos;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Oops model
+//////////////////////////////////////////////////////////////////////////////
+
+//we only consider l-mers from the first input sequence as starting points
+template<typename TStrings, typename TType>
+void 
+ePatternBranching(TStrings & result_set,
+				  TStrings & dataset,
+				  TType const & l,
+				  TType const & d, 
+				  bool const & is_exact,
+				  TType & h,
+				  Oops const & /*oops*/)
+{
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	typedef String<int> TIntAr;
+	//typename Size<TStrings>::Type t = length(dataset);
+	typename Iterator<TStrings>::Type ds_iter = begin(dataset);
+	Shape<TValue> shape(l);
+	std::set<int> result;
+
+	//we only consider l-mers from the first input sequence as starting points
+	typename Size<TString>::Type seq_len = length(*ds_iter);
+	typename Iterator<TString>::Type seq_iter = begin(*ds_iter);
+	typename Iterator<TString>::Type seq_end = begin(*ds_iter)+(seq_len-l+1);
+	while(seq_iter!=seq_end)
+	{
+		//build set of h-neighborhood of l-mer x
+		std::vector<int> V;
+		createDVariants(V, seq_iter, l, h, is_exact, shape);
+		std::vector<int>::iterator V_iter = V.begin();
+		std::vector<int>::iterator V_end = V.end();
+		while(V_iter!=V_end)
+		{
+			TIntAr Chi;
+			resize(Chi, 1);
+			Chi[0] = *V_iter;
+			for(unsigned int j=h; j<=(d-1); ++j)
+			{
+				std::set<int> good_neighbors;
+				typename Iterator<TIntAr>::Type Chi_iter = begin(Chi);
+				typename Iterator<TIntAr>::Type Chi_end = end(Chi);
+				while(Chi_iter!=Chi_end)
+				{
+					std::set<int> neighbors;
+					bestNeighbors(neighbors,*Chi_iter,j,l,d,dataset);
+					std::set_union(good_neighbors.begin(),good_neighbors.end(),
+								   neighbors.begin(),neighbors.end(),
+								   std::inserter(good_neighbors, good_neighbors.end()));
+					++Chi_iter;
+				}
+				clear(Chi);
+				resize(Chi, good_neighbors.size());
+				std::copy(good_neighbors.begin(), good_neighbors.end(), begin(Chi));
+				good_neighbors.clear();
+			}
+			// filtering relevant motif candidates
+			typename Iterator<TIntAr>::Type ar_iter = begin(Chi);
+			typename Iterator<TIntAr>::Type ar_end = end(Chi);
+			while(ar_iter!=ar_end)
+			{
+				TString pattern =
+					inverseHash<TValue>(*ar_iter, ValueSize<TValue>::VALUE, l);
+				ds_iter = begin(dataset);
+				typename Iterator<TStrings>::Type ds_end = end(dataset);
+				bool hasExactOOPS = true;
+				while((ds_iter!=ds_end) & hasExactOOPS)
+				{
+					if(!(hasExactOneOccurrence(begin(pattern),begin(*ds_iter),end(*ds_iter),l,d,is_exact)))
+					{
+						hasExactOOPS = false;
+					}
+					++ds_iter;
+				}
+				if(hasExactOOPS)
+				{
+					result.insert(*ar_iter);
+				}
+				++ar_iter;
+			}
+			++V_iter;
+		}
+		V.clear();
+		++seq_iter;
+	}
+	resize(result_set, result.size());
+	std::set<int>::iterator set_iter = result.begin();
+	std::set<int>::iterator set_end = result.end();
+	typename Position<TStrings>::Type pos = 0;
+	while(set_iter!=set_end)
+	{
+		TString l_mer = 
+			inverseHash<TValue>(*set_iter, ValueSize<TValue>::VALUE, l);
+		result_set[pos] = l_mer;
+		++set_iter;
+		++pos;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//Subfunctions
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.bestNeighbors:
+..summary:Represents the second version of GoodNeighbors described in the paper.
+..cat:Motif Search
+..signature:bestNeighbors(neighbors,l_mer,j,l,d,dataset)
+..param.neighbors:The set of best neighbors being in the Hamming distance 1-vicinity of l_mer.
+..param.l_mer:The respective pattern represented by an integer value (hash value) 
+              which is mapped to its best 1-neighborhood.
+...type:Class.String
+..param.j:The current iteration phase.
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.dataset:The dataset object representing the input sequences.
+...type:Class.String
+...signature:String<TString>
+...param.TString:A @Class.String@ type
+....type:Class.String
+..remarks:The function uses equations formulated in theorem 1.
+..include:seqan/find_motif.h
+*/
+
+template<typename TIntSet, typename TType, typename TStrings>
+void 
+bestNeighbors(TIntSet & neighbors, 
+			   int & l_mer, 
+			   TType const & j, 
+			   TType const & l,
+			   TType const & d,
+			   TStrings & dataset) 
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	typedef String<int> TIntArray;
+	typedef typename Position<TString>::Type TPos;
+	Shape<TValue> shape(l);
+	typename Size<TStrings>::Type t = length(dataset);
+	int seq_nr = 0;
+	int seq_pos = 0;
+	int beta = (int)((t-1)*(2*d-j-1));
+	TString l_mer_x = 
+		inverseHash<TValue>(l_mer,ValueSize<TValue>::VALUE,l);
+
+	//create distance matrix for x & compute maximum distance of x from dataset X
+	int max_dist_of_x = 0;
+	int ** hd_mat = new int*[t];
+	typename Iterator<TStrings>::Type ds_iter = begin(dataset);
+	for(; !atEnd(ds_iter, dataset); goNext(ds_iter))
+	{
+		int min_dist = INT_MAX;
+		typename Size<TString>::Type seq_len = length(*ds_iter);
+		typename Iterator<TString>::Type seq_iter = begin(*ds_iter);
+		typename Iterator<TString>::Type seq_end = begin(*ds_iter)+(seq_len-l+1);
+		hd_mat[seq_nr] = new int[seq_len-l+1];
+		seq_pos = 0;
+		while(seq_iter!=seq_end)
+		{
+			typename Iterator<TString>::Type x_iter = begin(l_mer_x);
+			typename Iterator<TString>::Type x_end = end(l_mer_x);
+			int dist = hammingDistance<int>(x_iter,x_end,seq_iter);
+			hd_mat[seq_nr][seq_pos] = dist;
+			if(dist<min_dist)
+			{
+				min_dist = dist;
+			}
+			++seq_iter;
+			++seq_pos;
+		}
+
+		if(min_dist>max_dist_of_x)
+		{
+			max_dist_of_x = min_dist;
+		}
+		++seq_nr;
+	}
+
+	// compute delta = max_dist_of_x-d
+	int uppercase_delta = max_dist_of_x-d;
+
+	//build set of 1-neighborhood of l-mer x
+	std::vector<int> V; 
+	createDVariants(V, begin(l_mer_x), l, (unsigned int)1, false, shape);
+	std::vector<int>::iterator V_iter = V.begin();
+	std::vector<int>::iterator V_end = V.end();
+	while(V_iter!=V_end)
+	{
+		if(l_mer==*V_iter)
+		{
+			neighbors.insert(*V_iter);
+		}
+		else
+		{
+			ds_iter = begin(dataset);
+			++ds_iter; // begin with the second sequence
+			TString l_mer_y = inverseHash<TValue>(*V_iter, ValueSize<TValue>::VALUE, l);
+			int sum_of_dist_y = 0;
+			int max_dist_of_y = 0;
+
+			// find out the mismatch position of both l-mers x and y 
+			TPos mismatch_pos = 0;
+			// TODO: Check if letter_in_x/y are used before initialization and remove '= TValue()'
+			TValue letter_in_x = 0; //base in x at the mismatch position
+			TValue letter_in_y = 0; //base in y at the mismatch position
+			for(TPos i=0; i<l; ++i)
+			{
+				if(l_mer_x[i]!=l_mer_y[i])
+				{
+					mismatch_pos = i;
+					letter_in_x = l_mer_x[mismatch_pos];
+					letter_in_y = l_mer_y[mismatch_pos];
+					i = l;
+				}
+			}
+			seq_nr = 0;
+			for(; !atEnd(ds_iter, dataset); goNext(ds_iter))
+			{
+				typename Size<TString>::Type seq_len = length(*ds_iter);
+				typename Iterator<TString>::Type seq_iter = begin(*ds_iter);
+				int m = seq_len-l+1; //#l-mers
+				typename Iterator<TString>::Type seq_end = begin(*ds_iter)+m;
+
+				int dist_x = *std::min_element(&hd_mat[seq_nr][0],&hd_mat[seq_nr][m]);
+				// num1:=#l-mers having distance dist_x to l_mer x
+				unsigned int num1 = 
+					std::count(&hd_mat[seq_nr][0], 
+							   &hd_mat[seq_nr][m], dist_x);
+				// num2:=#l-mers having distance (dist_x+1) to l_mer x
+				unsigned int num2 = 
+					std::count(&hd_mat[seq_nr][0], 
+							   &hd_mat[seq_nr][m], 
+							   dist_x+1);
+				unsigned int counter1 = 0;
+				unsigned int counter2 = 0;
+				unsigned int counter3 = 0;
+				seq_pos = 0;
+				while( (seq_iter!=seq_end) && (counter1<1))
+				{
+					if( (hd_mat[seq_nr][seq_pos]==dist_x) &
+						(letter_in_y==*(seq_iter+mismatch_pos)) )
+					{
+						++counter1;
+					}
+					else if( (hd_mat[seq_nr][seq_pos]==dist_x) &
+							 (letter_in_x==*(seq_iter+mismatch_pos)) )
+					{
+						++counter2;
+					}
+					else if( (hd_mat[seq_nr][seq_pos]==dist_x+1)& 
+							 (letter_in_y!=*(seq_iter+mismatch_pos)) )
+					{
+						++counter3;
+					}
+					++seq_iter;
+					++seq_pos;
+				}
+				int dist_y = dist_x;
+				if(counter1>0)
+				{
+					dist_y-=1;
+				}
+				else if( (counter2==num1) && (counter3==num2) )
+				{
+					dist_y+=1;
+				}
+
+				sum_of_dist_y+=dist_y;
+				if(dist_y>max_dist_of_y)
+				{
+					max_dist_of_y = dist_y;
+				}
+				++seq_nr;
+			}
+			int lowercase_delta = max_dist_of_y-max_dist_of_x;
+			if( (uppercase_delta == ((int) (d-j))) && (lowercase_delta==-1) && (sum_of_dist_y<=beta) )
+			{
+				neighbors.insert(*V_iter);
+			}
+			else if( (uppercase_delta==((int) (d-j-1))) && (lowercase_delta<=0) && (sum_of_dist_y<=beta) )
+			{
+				neighbors.insert(*V_iter);
+			}
+			else if( (uppercase_delta < ((int) (d-j-1))) && (sum_of_dist_y<=beta))
+			{
+				neighbors.insert(*V_iter);
+			}
+		}
+		++V_iter;
+	}
+	// delete hd_mat
+	for(unsigned int i=0; i<t; ++i)
+	{
+		delete[] hd_mat[i];
+	}
+	delete[] hd_mat;
+}
+
+/////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.hasAtLeastOneOccurrence:
+..summary:Checks if a given l-mer occurs at least once in a given sequence.
+..cat:Motif Search
+..signature:hasAtLeastOneOccurrence(l_mer_begin,seq_begin,seq_end,l,d,is_exact)
+..param.l_mer_begin:An iterator pointing to the beginning of a given l-mer pattern.
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.seq_begin:An iterator pointing to the beginning of a given sequence which is either
+              a string of @Spec.Dna@ or a string of @Spec.AminoAcid at . 
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.seq_end:An iterator pointing to the end of a given sequence pattern which is either
+            a string of @Spec.Dna@ or a string of @Spec.AminoAcid at .  
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.is_exact:The size of Hamming distance
+...type:$bool$
+..include:seqan/find_motif.h
+*/
+
+template<typename TStringIter, typename TType>
+bool
+hasAtLeastOneOccurrence(TStringIter l_mer_begin,
+		 TStringIter seq_begin,
+		 TStringIter seq_end,
+		 TType const & l,
+		 TType const & d,
+		 bool const & is_exact)
+{
+    SEQAN_CHECKPOINT;
+
+	bool result = false;
+	TType counter = 0;
+	while( (seq_begin!=(seq_end-l+1)) &&  (counter<1))
+	{
+		if(is_exact)
+		{
+			counter += (hammingDistance<TType>(seq_begin, seq_begin+l, l_mer_begin)==d) ? 1 : 0;
+		}
+		else
+		{
+			counter += (hammingDistance<TType>(seq_begin, seq_begin+l, l_mer_begin)<=d) ? 1 : 0;
+		}		
+		++seq_begin;
+	}
+
+	if(counter==1)
+	{
+		result = true;
+	}
+	return result;
+}
+
+/////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/find_motif_generated_forwards.h b/src/SeqAn-1.3/seqan/find_motif/find_motif_generated_forwards.h
new file mode 100644
index 0000000..5d12605
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/find_motif_generated_forwards.h
@@ -0,0 +1,472 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_FIND_MOTIF_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_FIND_MOTIF_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// CMode_
+
+struct CMode_;       	// "projects/library/seqan/find_motif/pseudocount_mode_c.h"(58)
+
+//____________________________________________________________________________
+// EPatternBranching_
+
+struct EPatternBranching_;       	// "projects/library/seqan/find_motif/find_motif_epatternbranching.h"(67)
+
+//____________________________________________________________________________
+// FrequencyDistribution
+
+template <typename TValue, typename TSpec > class FrequencyDistribution;       	// "projects/library/seqan/find_motif/frequency_distribution.h"(62)
+
+//____________________________________________________________________________
+// Motif
+
+template <typename T> struct Motif;       	// "projects/library/seqan/find_motif/find_motif_base.h"(304)
+
+//____________________________________________________________________________
+// MotifFinder
+
+template <typename TValue, typename TSpec> class MotifFinder;       	// "projects/library/seqan/find_motif/find_motif_base.h"(60)
+
+//____________________________________________________________________________
+// Omops
+
+struct Omops;       	// "projects/library/seqan/find_motif/sequence_model_types.h"(70)
+
+//____________________________________________________________________________
+// Oops
+
+struct Oops;       	// "projects/library/seqan/find_motif/sequence_model_types.h"(54)
+
+//____________________________________________________________________________
+// PMode_
+
+struct PMode_;       	// "projects/library/seqan/find_motif/pseudocount_mode_p.h"(59)
+
+//____________________________________________________________________________
+// Pms1_
+
+struct Pms1_;       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(64)
+
+//____________________________________________________________________________
+// Pmsp_
+
+struct Pmsp_;       	// "projects/library/seqan/find_motif/find_motif_pmsp.h"(60)
+
+//____________________________________________________________________________
+// Projection_
+
+struct Projection_;       	// "projects/library/seqan/find_motif/find_motif_projection.h"(61)
+
+//____________________________________________________________________________
+// Pseudocount
+
+template <typename TValue, typename TSpec> class Pseudocount;       	// "projects/library/seqan/find_motif/pseudocount_base.h"(57)
+
+//____________________________________________________________________________
+// Tcm
+
+struct Tcm;       	// "projects/library/seqan/find_motif/sequence_model_types.h"(115)
+
+//____________________________________________________________________________
+// Zoops
+
+struct Zoops;       	// "projects/library/seqan/find_motif/sequence_model_types.h"(86)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// CMode
+
+typedef Tag<CMode_> CMode;       	// "projects/library/seqan/find_motif/pseudocount_mode_c.h"(59)
+
+//____________________________________________________________________________
+// EPatternBranching
+
+typedef Tag<EPatternBranching_> const EPatternBranching;       	// "projects/library/seqan/find_motif/find_motif_epatternbranching.h"(68)
+
+//____________________________________________________________________________
+// PMode
+
+typedef Tag<PMode_> PMode;       	// "projects/library/seqan/find_motif/pseudocount_mode_p.h"(60)
+
+//____________________________________________________________________________
+// Pms1
+
+typedef Tag<Pms1_> const Pms1;       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(65)
+
+//____________________________________________________________________________
+// Pmsp
+
+typedef Tag<Pmsp_> const Pmsp;       	// "projects/library/seqan/find_motif/find_motif_pmsp.h"(61)
+
+//____________________________________________________________________________
+// Projection
+
+typedef Tag<Projection_> const Projection;       	// "projects/library/seqan/find_motif/find_motif_projection.h"(62)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _buildVariants
+
+template <typename TIntVect, typename TStringIter, typename TType, typename TBitset, typename TValue, typename TSpec> void _buildVariants(TIntVect & variants, TStringIter l_mer_begin, TType const & d, TBitset const & bitset, Shape<TValue, TSpec> & shape);       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(761)
+
+//____________________________________________________________________________
+// _computeBucketThreshold
+
+template <typename TType> TType _computeBucketThreshold(TType const & alp_size, TType const & l, TType const & d, TType const & m_total, TType const & k);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(284)
+
+//____________________________________________________________________________
+// _computeEStep
+
+template <typename TMatrix, typename TProfile, typename TIter, typename TType> void _computeEStep(TMatrix & matrix_w, double & joint_log_likelihood, TProfile & profile, TIter dataset_start, TType const & t, TType const & l, Oops const & );       	// "projects/library/seqan/find_motif/em_algorithm.h"(136)
+template <typename TMatrix, typename TProfile, typename TIter, typename TType> void _computeEStep(TMatrix & matrix_w, double & joint_log_likelihood, TProfile & profile, TIter dataset_start, double & gamma, TType const & t, TType const & l, Zoops const & );       	// "projects/library/seqan/find_motif/em_algorithm.h"(364)
+template <typename TMatrix, typename TProfile, typename TIter, typename TType> void _computeEStep(TMatrix & matrix_w, double & joint_log_likelihood, TProfile & profile, TIter dataset_start, double & lambda, TType const & t, TType const & l, Tcm const & );       	// "projects/library/seqan/find_motif/em_algorithm.h"(631)
+
+//____________________________________________________________________________
+// _computeLikelihoodRatioOfLMer
+
+template <typename TStrIter, typename TProfile> double _computeLikelihoodRatioOfLMer(TStrIter l_mer_begin, TStrIter l_mer_end, TProfile const & profile);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(1103)
+
+//____________________________________________________________________________
+// _computeLikelihoodRatioOfLMers
+
+template <typename TStrings, typename TProfile> double _computeLikelihoodRatioOfLMers(TStrings const & l_mers, TProfile const & profile);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(1145)
+
+//____________________________________________________________________________
+// _computeMStep
+
+template <typename TProfile, typename TIter, typename TMatrix, typename TType> void _computeMStep(TProfile & profile, TIter dataset_start, TMatrix const & matrix_w, TType const & t, TType const & l, Oops const & );       	// "projects/library/seqan/find_motif/em_algorithm.h"(235)
+template <typename TProfile, typename TIter, typename TMatrix, typename TType> void _computeMStep(TProfile & profile, TIter dataset_start, TMatrix const & matrix_w, TType const & t, TType const & l, Zoops const & );       	// "projects/library/seqan/find_motif/em_algorithm.h"(494)
+template <typename TProfile, typename TIter, typename TMatrix, typename TType> void _computeMStep(TProfile & profile, TIter dataset_start, TMatrix const & matrix_w, TType const & t, TType const & l, Tcm const & );       	// "projects/library/seqan/find_motif/em_algorithm.h"(728)
+
+//____________________________________________________________________________
+// _computeNumOfTrials
+
+template <typename TType> TType _computeNumOfTrials(TType const & t, TType const & l, TType const & d, TType const & k, TType const & s, double const & prob_q);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(337)
+
+//____________________________________________________________________________
+// _computeProjectionSize
+
+template <typename TType> TType _computeProjectionSize(TType const & alp_size, TType const & l, TType const & d, TType const & m_total);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(241)
+
+//____________________________________________________________________________
+// _filteringStep
+
+template <typename TBucketAr, typename TArray, typename TType, typename TStrings, typename TPositions> void _filteringStep(TBucketAr & buckets, TArray & count_ar, TType & num_of_relevant_buckets, TStrings & dataset, TPositions & positions, TType const & l, TType const & s);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(524)
+
+//____________________________________________________________________________
+// _getLMersWithTheLargestLikelihoodRatio
+
+template <typename TStrings, typename TIter, typename TType, typename TProfile> void _getLMersWithTheLargestLikelihoodRatio(TStrings & l_mers, TIter dataset_start, TIter dataset_end, TProfile const & profile, TType const & l);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(1035)
+
+//____________________________________________________________________________
+// _getVariantsOfBitset
+
+template <typename TStrings, typename TType> void _getVariantsOfBitset(TStrings & bitsets, TType const & l, TType const & d);       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(701)
+
+//____________________________________________________________________________
+// _refinementStep
+
+template <typename TString, typename TType> int _refinementStep(TString & consensus_seq, String<TString> const & l_mers, String<TString> & dataset, TType const & l, TType const & d, bool const & is_exact, Oops const & oops);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(593)
+template <typename TString, typename TType> int _refinementStep(TString & consensus_seq, String<TString> const & l_mers, String<TString> & dataset, TType const & l, TType const & d, bool const & is_exact, Omops const & );       	// "projects/library/seqan/find_motif/find_motif_projection.h"(676)
+template <typename TString, typename TType> int _refinementStep(TString & consensus_seq, String<TString> const & l_mers, String<TString> & dataset, TType const & l, TType const & d, bool const & is_exact, Zoops const & zoops);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(754)
+template <typename TString, typename TType> int _refinementStep(TString & consensus_seq, String<TString> const & l_mers, String<TString> & dataset, TType const & l, TType const & d, bool const & is_exact, Tcm const & tcm);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(856)
+
+//____________________________________________________________________________
+// _smoothingStep
+
+template <typename TMatrix, typename TIter, typename TType> void _smoothingStep(TMatrix & matrix_w, TIter dataset_start, TType const & t, TType const & l);       	// "projects/library/seqan/find_motif/em_algorithm.h"(803)
+
+//____________________________________________________________________________
+// absFreqOfLettersInSeq
+
+template <typename TValue, typename TSpec, typename TSeqIter> void absFreqOfLettersInSeq(FrequencyDistribution<TValue, TSpec> & fd, TSeqIter seq_start, TSeqIter seq_end);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(330)
+
+//____________________________________________________________________________
+// absFreqOfLettersInSetOfSeqs
+
+template <typename TValue, typename TSpec, typename TIter> void absFreqOfLettersInSetOfSeqs(FrequencyDistribution<TValue, TSpec> & fd, TIter seq_start, TIter seq_end);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(361)
+
+//____________________________________________________________________________
+// addValue
+
+template <typename TValue, typename TSpec, typename TType> void addValue(FrequencyDistribution<TValue, TSpec> & fd, TType const & val);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(386)
+
+//____________________________________________________________________________
+// backgroundFrequency
+
+template <typename TValue, typename TSpec,typename TDatasetIter> void backgroundFrequency(FrequencyDistribution<TValue, TSpec> & fd, TDatasetIter dataset_start, TDatasetIter dataset_end);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(415)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TValue, typename TSpec> inline typename Iterator< FrequencyDistribution<TValue, TSpec> >::Type begin(FrequencyDistribution<TValue, TSpec> & me);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(436)
+template <typename TValue, typename TSpec> inline typename Iterator< FrequencyDistribution<TValue, TSpec> >::Type begin(FrequencyDistribution<TValue, TSpec> const & me);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(442)
+
+//____________________________________________________________________________
+// bestNeighbors
+
+template <typename TIntSet, typename TType, typename TStrings> void bestNeighbors(TIntSet & neighbors, int & l_mer, TType const & j, TType const & l, TType const & d, TStrings & dataset);       	// "projects/library/seqan/find_motif/find_motif_epatternbranching.h"(520)
+
+//____________________________________________________________________________
+// binomialCoefficient
+
+template <typename TType> TType binomialCoefficient(TType n, TType k);       	// "projects/library/seqan/find_motif/find_motif_base.h"(156)
+
+//____________________________________________________________________________
+// choosePositions
+
+template <typename TAssociativeContainer, typename TType> void choosePositions(TAssociativeContainer & positions, TType const & l, TType const & k);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(958)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TValue, typename TSpec> void clear(FrequencyDistribution<TValue, TSpec> & fd);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(453)
+
+//____________________________________________________________________________
+// completeProfile
+
+template <typename TProfile> void completeProfile(TProfile & profile, typename Value<TProfile>::Type & background_distribution);       	// "projects/library/seqan/find_motif/profile.h"(188)
+
+//____________________________________________________________________________
+// computeH
+
+template <typename TType, typename TIntAr> TType computeH(TType const & t, TType const & l, TType const & d, bool const & is_exact, TIntAr & n_ar);       	// "projects/library/seqan/find_motif/find_motif_epatternbranching.h"(188)
+
+//____________________________________________________________________________
+// convertPatternToProfile
+
+template <typename TProfile, typename TIterStr> void convertPatternToProfile(TProfile & profile, TIterStr str_begin, TIterStr str_end);       	// "projects/library/seqan/find_motif/profile.h"(75)
+
+//____________________________________________________________________________
+// convertResidueToFrequencyDist
+
+template <typename TValue, typename TSpec> void convertResidueToFrequencyDist(FrequencyDistribution<TValue, TSpec> & fd, TValue const & residue);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(477)
+
+//____________________________________________________________________________
+// convertSetOfPatternsToProfile
+
+template <typename TProfile, typename TStrings, typename TPseudocountMode> void convertSetOfPatternsToProfile(TProfile & profile, TStrings & l_mers, TPseudocountMode & pseudocount);       	// "projects/library/seqan/find_motif/profile.h"(111)
+
+//____________________________________________________________________________
+// createDVariants
+
+template <typename TIntVect, typename TIterString, typename TType, typename TShape> void createDVariants(TIntVect & variants, TIterString l_mer_begin, TType const & l, TType const & d, bool is_exact, TShape & shape);       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(636)
+
+//____________________________________________________________________________
+// determineConsensusSeq
+
+template <typename TString, typename TProfile> void determineConsensusSeq(TString & consensus_seq, TProfile & profile, typename Size<TString>::Type const & l);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(1181)
+
+//____________________________________________________________________________
+// display
+
+template <typename TStrings> void display(TStrings & strings);       	// "projects/library/seqan/find_motif/profile.h"(220)
+
+//____________________________________________________________________________
+// displayResult
+
+template <typename TValue, typename TAlgorithm> void displayResult(MotifFinder<TValue, TAlgorithm> & finder);       	// "projects/library/seqan/find_motif/find_motif_base.h"(270)
+template <typename TValue> void displayResult(MotifFinder<TValue, Projection> & projection);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(1226)
+
+//____________________________________________________________________________
+// ePatternBranching
+
+template <typename TStrings, typename TType> void ePatternBranching(TStrings & result_set, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, TType & h, Omops const & );       	// "projects/library/seqan/find_motif/find_motif_epatternbranching.h"(297)
+template <typename TStrings, typename TType> void ePatternBranching(TStrings & result_set, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, TType & h, Oops const & );       	// "projects/library/seqan/find_motif/find_motif_epatternbranching.h"(400)
+
+//____________________________________________________________________________
+// em
+
+template <typename TProfile, typename TIter, typename TType> double em(TProfile & profile, TIter dataset_start, TType const & t, TType const & l, Oops const & oops);       	// "projects/library/seqan/find_motif/em_algorithm.h"(83)
+template <typename TProfile, typename TIter, typename TType> double em(TProfile & profile, TIter dataset_start, TType const & t, TType const & l, double & gamma, Zoops const & zoops);       	// "projects/library/seqan/find_motif/em_algorithm.h"(307)
+template <typename TProfile, typename TIter, typename TType> double em(TProfile & profile, TIter dataset_start, TType const & t, TType const & l, double & lambda, Tcm const & tcm);       	// "projects/library/seqan/find_motif/em_algorithm.h"(574)
+
+//____________________________________________________________________________
+// end
+
+template <typename TValue, typename TSpec> inline typename Iterator< FrequencyDistribution<TValue, TSpec> >::Type end(FrequencyDistribution<TValue, TSpec> & me);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(502)
+template <typename TValue, typename TSpec> inline typename Iterator< FrequencyDistribution<TValue, TSpec> const >::Type end(FrequencyDistribution<TValue, TSpec> const & me);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(508)
+
+//____________________________________________________________________________
+// factorial
+
+template <typename TType> TType factorial(TType n);       	// "projects/library/seqan/find_motif/find_motif_base.h"(121)
+
+//____________________________________________________________________________
+// findMotif
+
+template <typename TSeqType, typename TStrings, typename TModel> inline void findMotif(MotifFinder<TSeqType ,Pmsp> & finder, TStrings & dataset, TModel seq_model);       	// "projects/library/seqan/find_motif/find_motif_pmsp.h"(139)
+template <typename TSeqType, typename TStrings, typename TModel> inline void findMotif(MotifFinder<TSeqType ,EPatternBranching> & epb2, TStrings & dataset, TModel seq_model);       	// "projects/library/seqan/find_motif/find_motif_epatternbranching.h"(247)
+template <typename TSeqType, typename TStrings, typename TModel> void findMotif(MotifFinder<TSeqType, Projection> & finder, TStrings & dataset, TModel seq_model);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(395)
+template <typename TSeqType, typename TStrings, typename TModel> inline void findMotif(MotifFinder<TSeqType, Pms1> & finder, TStrings & dataset, TModel seq_model);       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(142)
+
+//____________________________________________________________________________
+// getMotif
+
+template <typename TValue, typename TSpec, typename TPosition> inline typename Motif<MotifFinder<TValue, TSpec> >::Type & getMotif(MotifFinder<TValue, TSpec> & me, TPosition pos);       	// "projects/library/seqan/find_motif/find_motif_base.h"(328)
+template <typename TValue, typename TSpec> inline typename Motif<MotifFinder<TValue, TSpec> >::Type & getMotif(MotifFinder<TValue, TSpec> & me);       	// "projects/library/seqan/find_motif/find_motif_base.h"(337)
+
+//____________________________________________________________________________
+// getScore
+
+template <typename TValue> inline int getScore(MotifFinder<TValue, Projection> & me);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(1246)
+
+//____________________________________________________________________________
+// hammingDistance
+
+template <typename TType, typename TStringIterator> TType hammingDistance(TStringIterator start1, TStringIterator end1, TStringIterator start2);       	// "projects/library/seqan/find_motif/find_motif_base.h"(198)
+
+//____________________________________________________________________________
+// hasAtLeastOneOccurrence
+
+template <typename TStringIter, typename TType> bool hasAtLeastOneOccurrence(TStringIter l_mer_begin, TStringIter seq_begin, TStringIter seq_end, TType const & l, TType const & d, bool const & is_exact);       	// "projects/library/seqan/find_motif/find_motif_epatternbranching.h"(739)
+
+//____________________________________________________________________________
+// hasExactOneOccurrence
+
+template <typename TStringIter, typename TType> bool hasExactOneOccurrence(TStringIter l_mer_begin, TStringIter seq_begin, TStringIter seq_end, TType const & l, TType const & d, bool const & is_exact);       	// "projects/library/seqan/find_motif/find_motif_pmsp.h"(763)
+
+//____________________________________________________________________________
+// inverseHash
+
+template <typename TValue, typename TType> String<TValue> inverseHash(TType const & hash_value, typename Size<TValue>::Type const & alp_size, typename Size< String<TValue> >::Type const & seq_size);       	// "projects/library/seqan/find_motif/find_motif_base.h"(234)
+
+//____________________________________________________________________________
+// length
+
+template <typename TValue, typename TSpec> inline typename Size< FrequencyDistribution<TValue, TSpec> >::Type length(FrequencyDistribution<TValue, TSpec> & me);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(519)
+template <typename TValue, typename TSpec> inline typename Size< FrequencyDistribution<TValue, TSpec> >::Type length(FrequencyDistribution<TValue, TSpec> const & me);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(526)
+
+//____________________________________________________________________________
+// logarithmize
+
+template <typename TValue, typename TSpec> void logarithmize(FrequencyDistribution<TValue, TSpec> & fd);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(545)
+
+//____________________________________________________________________________
+// motifCount
+
+template <typename TValue, typename TSpec> inline size_t motifCount(MotifFinder<TValue, TSpec> const & me);       	// "projects/library/seqan/find_motif/find_motif_base.h"(356)
+
+//____________________________________________________________________________
+// normalize
+
+template <typename TProfile> void normalize(TProfile & profile);       	// "projects/library/seqan/find_motif/profile.h"(159)
+template <typename TProfile, typename TValue> void normalize(TProfile & profile, Pseudocount<TValue, PMode> & mode);       	// "projects/library/seqan/find_motif/pseudocount_mode_p.h"(130)
+template <typename TProfile, typename TValue> void normalize(TProfile & profile, Pseudocount<TValue, CMode> const & mode);       	// "projects/library/seqan/find_motif/pseudocount_mode_c.h"(128)
+template <typename TValue, typename TSpec> void normalize(FrequencyDistribution<TValue, TSpec> & fd);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(570)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TValue, typename TSpec, typename TType> FrequencyDistribution<TValue, TSpec> operator* (FrequencyDistribution<TValue, TSpec> const & fd_, TType value_);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(181)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename TValue, typename TSpec> FrequencyDistribution<TValue, TSpec> operator+ (FrequencyDistribution<TValue, TSpec> const & lhs_, FrequencyDistribution<TValue, TSpec> const & rhs_);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(160)
+
+//____________________________________________________________________________
+// operator-
+
+template <typename TValue, typename TSpec> FrequencyDistribution<TValue, TSpec> operator- (FrequencyDistribution<TValue, TSpec> const & lhs_, FrequencyDistribution<TValue, TSpec> const & rhs_);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(171)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TValue, typename TSpec> inline std::ostream & operator<< (std::ostream & ostr, FrequencyDistribution<TValue, TSpec> & fd_);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(191)
+
+//____________________________________________________________________________
+// pms1
+
+template <typename TStrings, typename TType> void pms1(TStrings & result_set, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, Oops const & );       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(191)
+template <typename TStrings, typename TType> void pms1(TStrings & result_set, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, Omops const & );       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(309)
+template <typename TStrings, typename TType> void pms1(TStrings & result_set, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, Zoops const & model_type);       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(399)
+template <typename TStrings, typename TType> void pms1(TStrings & result_set, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, Tcm const & model_type);       	// "projects/library/seqan/find_motif/find_motif_pms1.h"(508)
+
+//____________________________________________________________________________
+// pmsp
+
+template <typename TStrings, typename TType> void pmsp(TStrings & result, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, Oops const & );       	// "projects/library/seqan/find_motif/find_motif_pmsp.h"(192)
+template <typename TStrings, typename TType> void pmsp(TStrings & result, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, Omops const & );       	// "projects/library/seqan/find_motif/find_motif_pmsp.h"(315)
+template <typename TStrings, typename TType> void pmsp(TStrings & result, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, Zoops const & model_type);       	// "projects/library/seqan/find_motif/find_motif_pmsp.h"(434)
+template <typename TStrings, typename TType> void pmsp(TStrings & result, TStrings & dataset, TType const & l, TType const & d, bool const & is_exact, Tcm const & model_type);       	// "projects/library/seqan/find_motif/find_motif_pmsp.h"(583)
+
+//____________________________________________________________________________
+// posOfMax
+
+template <typename TValue, typename TSpec> typename Position< FrequencyDistribution<TValue, TSpec> >::Type posOfMax(FrequencyDistribution<TValue, TSpec> & me);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(596)
+
+//____________________________________________________________________________
+// projectLMer
+
+template <typename TValue, typename TIter> inline std::set<int>::value_type projectLMer(std::set<int> & positions, TIter it);       	// "projects/library/seqan/find_motif/find_motif_projection.h"(984)
+
+//____________________________________________________________________________
+// sum
+
+template <typename TValue, typename TSpec> TSpec sum(FrequencyDistribution<TValue, TSpec> & me);       	// "projects/library/seqan/find_motif/frequency_distribution.h"(629)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/find_motif/find_motif_pms1.h b/src/SeqAn-1.3/seqan/find_motif/find_motif_pms1.h
new file mode 100644
index 0000000..9266618
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/find_motif_pms1.h
@@ -0,0 +1,822 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_MOTIF_PMS1_H
+#define SEQAN_HEADER_FIND_MOTIF_PMS1_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Pms1
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Pms1:
+..summary: Represents the Pms1 algorithm developed by Rajasekaran et al.
+..general:Class.MotifFinder
+..cat:Motif Search
+..signature:MotifFinder<TValue, Pms1>
+..param.TValue:The type of sequences to be analyzed.
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..remarks:The exact @Spec.Pms1|Pms1 algorithm@ (Planted Motif Search 1) searches in the space
+          of possible motifs such as @Spec.EPatternBranching at . The procedure of the algorithm
+		  is quite simple. For every l-mer in each input sequence the algorithm generates
+		  all possible length-l patterns in the Hamming distance $d$-neighborhood of $x$.
+		  The neighbor sets for each sequence are then intersected so that at the end of the process
+		  we get a group of l-mers or a single l-mer that occur(s) in each input sequence with $d$
+		  substitutions.
+..include:seqan/find_motif.h
+*/
+
+///.Class.MotifFinder.param.TSpec.type:Spec.Pms1
+
+struct Pms1_;
+typedef Tag<Pms1_> const Pms1;
+
+//////////////////////////////////////////////////////////////////////////////
+// MotifFinder - Pms1 Spec
+//
+// t:=dataset size (number of sequences)
+// n:=average sequence size
+// l:=motif size
+// d:=number of substitutions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+class MotifFinder<TValue, Pms1>
+{
+//_________________________________________________________________________________
+
+public:
+	typedef unsigned int TSize;
+	typedef String<TValue> TString;
+	typedef String<TString> TStrings; 
+
+	TSize motif_size;
+	TSize num_of_substitutions;
+	bool has_exact_substitutions;
+	TStrings set_of_motifs; // result set
+
+//_________________________________________________________________________________
+
+	MotifFinder()
+	{
+    SEQAN_CHECKPOINT;
+	}
+	MotifFinder(TSize const & l_, TSize const & d_, bool const & is_exact_):
+		motif_size(l_),
+		num_of_substitutions(d_),
+		has_exact_substitutions(is_exact_)
+	{
+    SEQAN_CHECKPOINT;
+	}
+	MotifFinder(MotifFinder const & other_):
+		motif_size(other_.motif_size),
+		num_of_substitutions(other_.num_of_substitutions),
+		has_exact_substitutions(other_.has_exact_substitutions)
+	{
+    SEQAN_CHECKPOINT;
+	}
+	~MotifFinder()
+	{
+    SEQAN_CHECKPOINT;
+	}
+
+	MotifFinder const &
+	operator = (MotifFinder const & other_)
+	{
+    SEQAN_CHECKPOINT;
+		if(this!=&other_)
+		{
+			motif_size = other_.motif_size;
+			num_of_substitutions = other_.num_of_substitutions;
+			has_exact_substitutions = other_.has_exact_substitutions;
+		}
+
+		return *this;
+	}
+//_________________________________________________________________________________
+
+}; // class MotifFinder<TValue, Pms1>
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSeqType, typename TStrings, typename TModel>
+inline void
+findMotif(MotifFinder<TSeqType, Pms1> & finder, 
+		  TStrings & dataset, 
+		  TModel seq_model)
+{
+    SEQAN_CHECKPOINT;
+	pms1(finder.set_of_motifs,
+		 dataset, 
+		 finder.motif_size, 
+		 finder.num_of_substitutions, 
+		 finder.has_exact_substitutions,
+		 seq_model);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.pms1:
+..summary:Represents the Pms1 algorithm.
+..cat:Motif Search
+..signature:pms1(result_set,dataset,l,d,is_exact,h,model_type)
+..param.result_set:The result_set object.
+..param.dataset:The dataset object representing the input sequences.
+...type:Class.String
+...signature:String<TString>
+...param.TString:A @Class.String@ type
+....type:Class.String
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.is_exact:The size of Hamming distance.
+...type:$bool$
+..param.model_type:The model_type object.
+...type:Tag.Oops
+...type:Tag.Omops
+...type:Tag.Zoops
+...type:Tag.Tcm
+..remarks:The Pms1 algorithm is able to run in Oops, Omops, Zoops and Tcm mode.
+..remarks:The resulted motif candidates found by the Pms1 algorithm will be stored in the result_set object.
+..include:seqan/find_motif.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//	Oops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStrings, typename TType>
+void 
+pms1(TStrings & result_set,
+	 TStrings & dataset,
+	 TType const & l,
+	 TType const & d, 
+	 bool const & is_exact,
+	 Oops const & /*model_type*/)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	Shape<TValue> shape(l);
+	// ----------------------------------------------------------------------------
+	// STEP 1:
+	// processing the first sequence.
+	// ----------------------------------------------------------------------------
+	typename Iterator<TStrings>::Type ds_iter = begin(dataset);
+	TString l_mer;
+	std::vector<int> var_of_l_mer, var_all;
+
+	typename Size<TString>::Type seq_len = length(*ds_iter);
+	typename Iterator<TString>::Type seq_iter = begin(*ds_iter);
+	typename Iterator<TString>::Type seq_end = begin(*ds_iter)+(seq_len-l+1);
+	while(seq_iter!=seq_end)
+	{
+		createDVariants(var_of_l_mer, seq_iter, l, d, is_exact, shape);
+		std::copy(var_of_l_mer.begin(), var_of_l_mer.end(), std::back_inserter(var_all));
+		var_of_l_mer.clear();
+		++seq_iter;
+	}
+
+	// sort var_all and filter d-variants that occur exactly once in the sequence
+	std::sort(var_all.begin(), var_all.end());
+	std::vector<int>::iterator vect_iter = var_all.begin();
+	std::vector<int>::iterator vect_end = var_all.end();
+	std::vector<int> var_unique;
+	while(vect_iter!=vect_end)
+	{
+		std::vector<int>::iterator upper_iter =
+			std::upper_bound(var_all.begin(),var_all.end(),*vect_iter);
+		int count = 
+			std::count(vect_iter, upper_iter, *vect_iter);
+		if(count==1)
+		{
+			var_unique.push_back(*vect_iter);
+		}
+		vect_iter+=count;
+	}
+	var_all.clear();
+	// ----------------------------------------------------------------------------
+	// STEP 2:
+	// processing the remaining input sequences
+	// ----------------------------------------------------------------------------
+	std::vector<int> var_unique2, result;
+	++ds_iter;
+	for(; !atEnd(ds_iter, dataset); goNext(ds_iter))
+	{
+		seq_len = length(*ds_iter);
+		seq_iter = begin(*ds_iter);
+		seq_end = begin(*ds_iter)+(seq_len-l+1);
+		while(seq_iter!=seq_end)
+		{
+			createDVariants(var_of_l_mer, seq_iter, l, d, is_exact, shape);
+			std::copy(var_of_l_mer.begin(), var_of_l_mer.end(), std::back_inserter(var_all));
+			var_of_l_mer.clear();
+			++seq_iter;
+		}
+		// sort var_all and filter d-variants that occur exactly once in the sequence
+		std::sort(var_all.begin(), var_all.end());
+		vect_iter = var_all.begin();
+		vect_end = var_all.end();
+		while(vect_iter!=vect_end)
+		{
+			std::vector<int>::iterator upper_iter =
+				std::upper_bound(var_all.begin(),var_all.end(),*vect_iter);
+			int count = 
+				std::count_if(vect_iter, upper_iter, std::bind2nd(std::equal_to<int>(), *vect_iter));
+			if(count==1)
+			{
+				var_unique2.push_back(*vect_iter);
+			}
+			vect_iter+=count;
+		}
+		var_all.clear();
+
+		//create an insert_iterator for int-vector result
+		std::insert_iterator< std::vector<int> > res_ins(result, result.begin());
+		std::set_intersection(var_unique.begin(), var_unique.end(),
+							  var_unique2.begin(), var_unique2.end(), res_ins);
+		var_unique2.clear();
+		var_unique.clear();
+		var_unique.resize(result.size());
+		std::copy(result.begin(),result.end(),var_unique.begin());
+		result.clear();
+	}
+	// ----------------------------------------------------------------------------
+	// STEP 3:
+	// insert the relevant d-variants into result set
+	// ----------------------------------------------------------------------------
+	resize(result_set, var_unique.size());
+	vect_iter = var_unique.begin();
+	vect_end = var_unique.end();
+	unsigned int variant_nr =0;
+	while(vect_iter!=vect_end)
+	{
+		l_mer = inverseHash<TValue>(*vect_iter, ValueSize<TValue>::VALUE, l);
+		result_set[variant_nr] = l_mer;
+		++variant_nr;
+		++vect_iter;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Omops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStrings, typename TType>
+void 
+pms1(TStrings & result_set,
+	 TStrings & dataset,
+	 TType const & l,
+	 TType const & d, 
+	 bool const & is_exact,
+	 Omops const & /*model_type*/)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	Shape<TValue> shape(l);
+	// ----------------------------------------------------------------------------
+	// STEP 1:
+	// processing the first sequence.
+	// ----------------------------------------------------------------------------
+	typename Iterator<TStrings>::Type ds_iter = begin(dataset);
+	TString l_mer;
+	std::vector<int> var_of_l_mer, var_all;
+
+	typename Size<TString>::Type seq_len = length(*ds_iter);
+	typename Iterator<TString>::Type seq_iter = begin(*ds_iter);
+	typename Iterator<TString>::Type seq_end = begin(*ds_iter)+(seq_len-l+1);
+	while(seq_iter!=seq_end)
+	{
+		createDVariants(var_of_l_mer, seq_iter, l, d, is_exact, shape);
+		std::copy(var_of_l_mer.begin(), var_of_l_mer.end(), std::back_inserter(var_all));
+		var_of_l_mer.clear();
+		++seq_iter;
+	}
+	// sort var_all and filter d-variants that occur exactly once in the sequence
+	std::sort(var_all.begin(), var_all.end());
+	std::vector<int> var_unique;
+	std::unique_copy(var_all.begin(), var_all.end(), std::back_inserter(var_unique));
+	var_all.clear();
+	// ----------------------------------------------------------------------------
+	// STEP 2:
+	// processing remaining input sequences
+	// ----------------------------------------------------------------------------
+	std::vector<int> var_unique2, result;
+	++ds_iter;
+	for(; !atEnd(ds_iter, dataset); goNext(ds_iter))
+	{
+		seq_len = length(*ds_iter);
+		seq_iter = begin(*ds_iter);
+		while(seq_iter!=begin(*ds_iter)+(seq_len-l+1))
+		{
+			createDVariants(var_of_l_mer, seq_iter, l, d, is_exact, shape);
+			std::copy(var_of_l_mer.begin(), var_of_l_mer.end(), std::back_inserter(var_all));
+			var_of_l_mer.clear();
+			++seq_iter;
+		}
+		// sort var_all and eliminate duplicates
+		std::sort(var_all.begin(), var_all.end());
+		std::unique_copy(var_all.begin(), var_all.end(), std::back_inserter(var_unique2));
+		var_all.clear();
+
+		//create an insert_iterator for int-vector result
+		std::insert_iterator< std::vector<int> > res_ins(result, result.begin());
+		std::set_intersection(var_unique.begin(), var_unique.end(),
+							  var_unique2.begin(), var_unique2.end(), res_ins);
+		var_unique2.clear();
+		var_unique.clear();
+		var_unique.resize(result.size());
+		std::copy(result.begin(),result.end(),var_unique.begin());
+		result.clear();
+	}
+	// ----------------------------------------------------------------------------
+	// STEP 3:
+	// insert relevant d-variants into result set
+	// ----------------------------------------------------------------------------
+	resize(result_set, var_unique.size());
+	typename std::vector<int>::iterator vect_iter = var_unique.begin();
+	typename std::vector<int>::iterator vect_end = var_unique.end();
+	unsigned int variant_nr =0;
+	while(vect_iter!=vect_end)
+	{
+		l_mer = inverseHash<TValue>(*vect_iter, ValueSize<TValue>::VALUE, l);
+		result_set[variant_nr] = l_mer;
+		++variant_nr;
+		++vect_iter;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Zoops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStrings, typename TType>
+void 
+pms1(TStrings & result_set,
+	 TStrings & dataset,
+	 TType const & l,
+	 TType const & d, 
+	 bool const & is_exact,
+	 Zoops const & model_type)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	Shape<TValue> shape(l);
+
+	// ----------------------------------------------------------------------------
+	// STEP 1:
+	// building d-variants for all l-mers from the input sequences and storing their
+	// corresponding hash-values (values of variants which occur exactly once 
+	// in an input sequence) in an int-string 'var_ar'.
+	// index_mat contains the variant's hash values for each sequence.
+	// ----------------------------------------------------------------------------
+	typename Size<TStrings>::Type t = length(dataset);
+	typename Iterator<TStrings>::Type ds_iter = begin(dataset);
+	TString l_mer;
+	std::vector<int> var_of_l_mer, var_all, result_vect;
+	for(; !atEnd(ds_iter, dataset); goNext(ds_iter))
+	{
+		typename Size<TString>::Type seq_len = length(*ds_iter);
+		typename Iterator<TString>::Type seq_iter = begin(*ds_iter);
+		typename Iterator<TString>::Type seq_end = begin(*ds_iter)+(seq_len-l+1);
+		while(seq_iter!=seq_end)
+		{
+			createDVariants(var_of_l_mer, seq_iter, l, d, is_exact, shape);
+			std::copy(var_of_l_mer.begin(), var_of_l_mer.end(), std::back_inserter(var_all));
+			var_of_l_mer.clear();
+			++seq_iter;
+		}
+		// sort var_all and filter d-variants that occur exactly once in the sequence
+		std::sort(var_all.begin(), var_all.end());
+		std::vector<int>::iterator vect_iter = var_all.begin();
+		std::vector<int>::iterator vect_end = var_all.end();
+		std::vector<int> var_unique;
+		while(vect_iter!=vect_end)
+		{
+			std::vector<int>::iterator upper_iter =
+				std::upper_bound(var_all.begin(),var_all.end(),*vect_iter);
+			int count = 
+				std::count(vect_iter, upper_iter, *vect_iter);
+			if(count==1)
+			{
+				var_unique.push_back(*vect_iter);
+			}
+			vect_iter+=count;
+		}
+		var_all.clear();
+
+		//create an insert_iterator for int-vector var_all
+		std::insert_iterator< std::vector<int> > res_ins(var_all, var_all.begin());
+		std::merge(result_vect.begin(), result_vect.end(),
+			       var_unique.begin(), var_unique.end(), res_ins);
+		var_unique.clear();
+		result_vect.clear();
+		result_vect.resize(var_all.size());
+		std::copy(var_all.begin(),var_all.end(),result_vect.begin());
+		var_all.clear();
+	}
+	// ----------------------------------------------------------------------------
+	// STEP 2:
+	// count votes of l-mers (d-variants) and insert relevant d-variants into result set
+	// ----------------------------------------------------------------------------
+	int lower_limit = (int) floor(t*(model_type.threshold)+0.5);
+	// count votes of relevant l-mers (d-variants)
+	std::vector<int>::iterator iter = result_vect.begin();
+	std::vector<int>::iterator end_iter = result_vect.end();
+	unsigned int num_of_results = 0;
+	while(iter!=end_iter)
+	{
+		std::vector<int>::iterator upper_iter =
+			std::upper_bound(result_vect.begin(),result_vect.end(),*iter);
+		int count = 
+			std::count(iter, upper_iter, *iter);
+		if( count>=lower_limit )
+		{
+			var_all.push_back(*iter);
+			++num_of_results;
+		}
+		iter+=count;
+	}
+	result_vect.clear();
+
+	resize(result_set, num_of_results);
+	num_of_results = 0;
+	iter = var_all.begin();
+	end_iter = var_all.end();
+	while(iter!=end_iter)
+	{
+		l_mer = inverseHash<TValue>(*iter, ValueSize<TValue>::VALUE, l);
+		result_set[num_of_results] = l_mer;
+		++num_of_results;
+		++iter;
+	}
+	var_all.clear();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Tcm model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStrings, typename TType>
+void 
+pms1(TStrings & result_set,
+	 TStrings & dataset,
+	 TType const & l,
+	 TType const & d, 
+	 bool const & is_exact,
+	 Tcm const & model_type)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	Shape<TValue> shape(l);
+	// ----------------------------------------------------------------------------
+	// STEP 1:
+	// building d-variants for all l-mers from the input sequences and storing their
+	// corresponding hash-values (values of variants which occur exactly once 
+	// in an input sequence) in an int-string 'var_ar'.
+	// index_mat contains the variant's hash values for each sequence.
+	// ----------------------------------------------------------------------------
+	typename Size<TStrings>::Type t = length(dataset);
+	typename Iterator<TStrings>::Type ds_iter = begin(dataset);
+	TString l_mer;
+	std::vector<int> var_of_l_mer, var_all, result_vect, unique_vect;
+	for(; !atEnd(ds_iter, dataset); goNext(ds_iter))
+	{
+		typename Size<TString>::Type seq_len = length(*ds_iter);
+		typename Iterator<TString>::Type seq_iter = begin(*ds_iter);
+		while(seq_iter!=begin(*ds_iter)+(seq_len-l+1))
+		{
+			createDVariants(var_of_l_mer, seq_iter, l, d, is_exact, shape);
+			std::copy(var_of_l_mer.begin(), var_of_l_mer.end(), std::back_inserter(var_all));
+			var_of_l_mer.clear();
+			++seq_iter;
+		}
+	
+		// sort var_all and filter d-variants that occur exactly once in the sequence
+		std::sort(var_all.begin(), var_all.end());
+		std::insert_iterator< std::vector<int> > res_ins1(unique_vect, unique_vect.begin());
+		std::unique_copy(var_all.begin(), var_all.end(), res_ins1);
+		var_all.clear();
+
+		//create an insert_iterator for int-vector var_all
+		std::insert_iterator< std::vector<int> > res_ins2(var_all, var_all.begin());
+		std::merge(result_vect.begin(), result_vect.end(),
+			       unique_vect.begin(), unique_vect.end(), res_ins2);
+		unique_vect.clear();
+		result_vect.clear();
+		result_vect.resize(var_all.size());
+		std::copy(var_all.begin(),var_all.end(),result_vect.begin());
+		var_all.clear();
+	}
+	// ----------------------------------------------------------------------------
+	// STEP 2:
+	// count votes of l-mers (d-variants) and insert relevant d-variants into result set
+	// ----------------------------------------------------------------------------
+	int lower_limit = (int) floor(t*(model_type.threshold)+0.5);
+
+	// count votes of relevant l-mers (d-variants)
+	std::vector<int>::iterator iter = result_vect.begin();
+	std::vector<int>::iterator end_iter = result_vect.end();
+	unsigned int num_of_results = 0;
+	while(iter!=end_iter)
+	{
+		std::vector<int>::iterator upper_iter =
+			std::upper_bound(result_vect.begin(),result_vect.end(),*iter);
+		int count = 
+			std::count(iter, upper_iter, *iter);
+		if( count>=lower_limit )
+		{
+			var_all.push_back(*iter);
+			++num_of_results;
+		}
+		iter+=count;
+	}
+	result_vect.clear();
+
+	resize(result_set, num_of_results);
+	num_of_results = 0;
+	iter = var_all.begin();
+	end_iter = var_all.end();
+	while(iter!=end_iter)
+	{
+		l_mer = inverseHash<TValue>(*iter, ValueSize<TValue>::VALUE, l);
+		result_set[num_of_results] = l_mer;
+		++num_of_results;
+		++iter;
+	}
+	var_all.clear();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//Subfunctions
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.createDVariants:
+..summary:Creates the d-variants of a given l-mer and computes their hash-values which will be
+          finally stored in array 'variants'.
+..cat:Motif Search
+..signature:createDVariants(variants,l_mer_begin,l,d,is_exact,shape)
+..param.variants:The set of d-variants of a given l-mer.
+...type:String<int>
+...remarks:The string holds the hash-values of each pattern being in the d-vicinity of a given l-mer.
+..param.l_mer_begin:An iterator pointing to the beginning of a given l-mer pattern.
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.is_exact:The size of Hamming distance
+...type:$bool$
+..param.shape:The @Class.Shape@ object.
+...type:Class.Shape
+...signature:Shape<TValue, SimpleShape>
+...remarks:Is used for computing the hash-value of each variant.
+..remarks: #d-variants = 
+                  - sum(i,0,d,binomialCoefficient(l,i)*(alp_size-1)^i), if is_exact=false
+                  - binomialCoefficient(l.d)*(alp_size-1)^d),           else
+..include:seqan/find_motif.h
+*/
+
+template<typename TIntVect, typename TIterString, typename TType, typename TShape>
+void 
+createDVariants(TIntVect & variants,
+				TIterString l_mer_begin,
+				TType const & l,
+				TType const & d,
+				bool is_exact,
+				TShape & shape)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef String<int> TIntArray;
+	String<TIntArray> bitsets;
+	if(is_exact)
+	{
+		// get all variants of bitsets consisting of d zeros(pos of mismatches)
+		// and (l-d) ones
+		_getVariantsOfBitset(bitsets, l, d);
+
+		typename Iterator< String<TIntArray> >::Type bitsets_iter = begin(bitsets);
+		typename Iterator< String<TIntArray> >::Type bitsets_end = end(bitsets);
+		while(bitsets_iter!=bitsets_end)
+		{
+			TIntVect hash_val_of_variants;
+			_buildVariants(hash_val_of_variants, l_mer_begin, d, *bitsets_iter, shape);
+			std::copy(hash_val_of_variants.begin(), hash_val_of_variants.end(), std::back_inserter(variants));
+			++bitsets_iter;
+		}
+		clear(bitsets);
+	}
+	else
+	{
+		for(unsigned int i=0; i<=d; ++i)
+		{
+			_getVariantsOfBitset(bitsets, l, i);
+			typename Iterator< String<TIntArray> >::Type bitsets_iter = begin(bitsets);
+			typename Iterator< String<TIntArray> >::Type bitsets_end = end(bitsets);
+			while(bitsets_iter!=bitsets_end)
+			{
+				TIntVect hash_val_of_variants;
+				_buildVariants(hash_val_of_variants, l_mer_begin, i, *bitsets_iter, shape);
+				std::copy(hash_val_of_variants.begin(), hash_val_of_variants.end(), std::back_inserter(variants));
+				++bitsets_iter;
+			}
+			clear(bitsets);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._getVariantsOfBitset:
+..summary:Builds all variants of bitsets consisting of d zeros & (l-d) ones which
+          will be stored in an seqan::String.
+..cat:Motif Search
+..signature:_getVariantsOfBitset(bitsets,l,d)
+..param.bitsets:The collection of bitsets.
+...type:Class.String
+...signature:String< String<int> >
+...remarks:Bitsets contains different length-l arrays consisting of d zero- (position of mismatches) 
+           and (l-d) one-values
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..remarks: #bitsets = binomialCoefficient(l,d).
+..include:seqan/find_motif.h
+*/
+
+template<typename TStrings, typename TType>
+void 
+_getVariantsOfBitset(TStrings & bitsets, 
+					 TType const & l, 
+					 TType const & d)
+{
+    SEQAN_CHECKPOINT;
+
+	unsigned int num_of_bitsets = binomialCoefficient(l, d);
+	resize(bitsets, num_of_bitsets);
+
+	typename Value<TStrings>::Type bitset;
+	resize(bitset, l);
+	std::fill(begin(bitset), end(bitset), 1);
+	std::fill_n(begin(bitset), d, 0);
+
+	for(typename Position<TStrings>::Type i=0;i<num_of_bitsets; ++i)
+	{
+		bitsets[i] = bitset;
+		std::next_permutation(begin(bitset), end(bitset));
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._buildVariants:
+..summary:Builds all d-variants of a given l-mer given the position(s) of mismatch(es) and 
+          then computes the hash-values for each variant which will be finally stored 
+          in an int-vector variants.
+..cat:Motif Search
+..signature:_buildVariants(variants,l_mer_begin,d,bitset,shape)
+..param.variants:The int-vector of d-variants of a given l-mer 
+...remarks:The vector holds the hash-values of each d-variant. 
+...type:vector<int>
+..param.l_mer_begin:An iterator pointing to the beginning of a given l-mer pattern.
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.d:The number of substitutions.
+..param.bitset:The bitset object.
+...type:Class.String
+...signature:String<int>
+...remarks:The length-l int-array consisting of d zeros (for mismatch positions)
+           & (l-d) ones)
+..param.shape:The @Class.Shape@ object.
+...type:Class.Shape
+...signature:Shape<TValue, SimpleShape>
+...remarks:Is used for computing the hash-value of each variant.
+..remarks: #variants = (alp_size-1)^d for a given bitset, d-value and l-mer.
+..include:seqan/find_motif.h
+*/
+
+template<typename TIntVect, typename TStringIter, typename TType, typename TBitset, typename TValue, typename TSpec>
+void
+_buildVariants(TIntVect & variants,
+			   TStringIter l_mer_begin,
+			   TType const & d,
+			   TBitset const & bitset,
+			   Shape<TValue, TSpec> & shape)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef String<TValue> TString;
+	typedef typename Position<TString>::Type TPos;
+
+	//build l-mer
+	TString l_mer;
+	resize(l_mer, length(bitset));
+	for(TPos i=0; i<length(l_mer); ++i)
+	{
+		l_mer[i] = *l_mer_begin;
+		++l_mer_begin;
+	}
+
+	// d-mers
+	unsigned int num_of_d_mers = 
+		(unsigned int) pow((double)ValueSize<TValue>::VALUE, (int)d);
+	for(unsigned int i=0; i<num_of_d_mers; ++i)
+	{
+		TString d_mer = inverseHash<TValue>(i, ValueSize<TValue>::VALUE, d);
+		TString variant = l_mer;
+
+		typename Position<TString>::Type pos_of_d_mer = 0;
+		typename Position<TString>::Type pos_of_variant = 0;
+		typename Iterator<TString>::Type iter = begin(variant);
+		typename Iterator<TString>::Type iter_end = end(variant);
+		while(iter!=iter_end)
+		{
+			if( bitset[pos_of_variant]==0)
+			{
+				if(l_mer[pos_of_variant]!=d_mer[pos_of_d_mer])
+				{
+					variant[pos_of_variant] = d_mer[pos_of_d_mer];
+					++pos_of_d_mer;
+					++pos_of_variant;
+					++iter;
+				}
+				else
+				{
+					iter = end(variant);
+				}
+			}
+			else
+			{
+				++iter;
+				++pos_of_variant;
+			}
+		}
+		if(pos_of_d_mer==d)
+		{
+			variants.push_back(hash(shape, begin(variant)));
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
diff --git a/src/SeqAn-1.3/seqan/find_motif/find_motif_pmsp.h b/src/SeqAn-1.3/seqan/find_motif/find_motif_pmsp.h
new file mode 100644
index 0000000..4cd919d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/find_motif_pmsp.h
@@ -0,0 +1,792 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_PMSP_H
+#define SEQAN_HEADER_FIND_PMSM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Pmsp
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Pmsp:
+..summary: Represents the Pmsp algorithm of Davila et al.
+..general:Class.MotifFinder
+..cat:Motif Search
+..signature:MotifFinder<TValue, Pmsp>
+..param.TValue:The type of sequences to be analyzed.
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..remarks:The @Spec.Pmsp|Pmsp algorithm@ is an improvement of the @Spec.Pms1|Pms1 algorithm at .
+          It examines each possible l-mer of the first input sequence, explores its neighborhood
+		  and finally checks whether an l-mer in the neighborhood is a motif instance.
+..include:seqan/find_motif.h
+*/
+
+///.Class.MotifFinder.param.TSpec.type:Spec.Pmsp
+
+struct Pmsp_;
+typedef Tag<Pmsp_> const Pmsp;
+
+//////////////////////////////////////////////////////////////////////////////
+// MotifFinder - Pmsp Spec
+//
+// t:=dataset size (number of sequences)
+// n:=average sequence size
+// l:=motif size
+// d:=number of substitutions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+class MotifFinder<TValue, Pmsp>
+{
+//_________________________________________________________________________________
+
+public:
+	typedef unsigned int TSize;
+	typedef String<TValue> TString;
+	typedef String<TString> TStrings;
+	
+	TSize motif_size;
+	TSize num_of_substitutions;
+	bool has_exact_substitutions;
+	TStrings set_of_motifs; // result set
+
+//_________________________________________________________________________________
+
+	MotifFinder()
+	{
+    SEQAN_CHECKPOINT;
+	}
+	MotifFinder(TSize const & l_, TSize const & d_, bool const & is_exact_):
+		motif_size(l_),
+		num_of_substitutions(d_),
+		has_exact_substitutions(is_exact_)
+	{
+    SEQAN_CHECKPOINT;
+	}
+	MotifFinder(MotifFinder const & other_):
+		motif_size(other_.motif_size),
+		num_of_substitutions(other_.num_of_substitutions),
+		has_exact_substitutions(other_.has_exact_substitutions)
+	{
+    SEQAN_CHECKPOINT;
+	}
+	~MotifFinder()
+	{
+    SEQAN_CHECKPOINT;
+	}
+
+	MotifFinder const &
+	operator = (MotifFinder const & other_)
+	{
+    SEQAN_CHECKPOINT;
+		if(this!=&other_)
+		{
+			motif_size = other_.motif_size;
+			num_of_substitutions = other_.num_of_substitutions;
+			has_exact_substitutions = other_.has_exact_substitutions;
+		}
+
+		return *this;
+	}
+
+//_________________________________________________________________________________
+
+}; // class MotifFinder<TValue, Pmsp>
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSeqType, typename TStrings, typename TModel>
+inline void
+findMotif(MotifFinder<TSeqType ,Pmsp> & finder, 
+		  TStrings & dataset, 
+		  TModel seq_model)
+{
+    SEQAN_CHECKPOINT;
+	pmsp(finder.set_of_motifs,
+		 dataset, 
+		 finder.motif_size, 
+		 finder.num_of_substitutions, 
+		 finder.has_exact_substitutions,
+		 seq_model);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.pmsp:
+..summary:Represents the Pmsp algorithm.
+          For each l-mer x in the first sequence (s0) Pmsp generates the set of neighbors of x (V)
+          and tries to guess if an l-mer y in that neighborhood is a motif by checking
+          whether there are l-mers in the rest sequences (s1,s2,...,st-1) that are at/at most 
+          distance d from it.
+..cat:Motif Search
+..signature:pms1(result_set,dataset,l,d,is_exact,h,model_type)
+..param.result_set:The result_set object.
+..param.dataset:The dataset object representing the input sequences.
+...type:Class.String
+...signature:String<TString>
+...param.TString:A @Class.String@ type
+....type:Class.String
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.is_exact:The size of Hamming distance.
+...type:$bool$
+..param.model_type:The model_type object.
+...type:Tag.Oops
+...type:Tag.Omops
+...type:Tag.Zoops
+...type:Tag.Tcm
+..remarks:The Pmsp algorithm is able to run in Oops, Omops, Zoops and Tcm mode.
+..remarks:The resulted motif candidates found by the Pmsp algorithm will be stored in the result_set object.
+..include:seqan/find_motif.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//	Oops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStrings, typename TType>
+void 
+pmsp(TStrings & result,
+	  TStrings & dataset,
+	  TType const & l,
+	  TType const & d, 
+	  bool const & is_exact,
+	  Oops const & /*model_type*/)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Position<TString>::Type TPos;
+
+	typename Size<TStrings>::Type t = length(dataset);
+	typename Iterator<TStrings>::Type ds_iter1 = begin(dataset);
+
+	typename Size<TString>::Type seq_len1 = length(*ds_iter1); 
+	typename Iterator<TString>::Type seq_iter1 = begin(*ds_iter1);
+	typename Iterator<TString>::Type seq_end1 = begin(*ds_iter1)+(seq_len1-l+1);
+	Shape<TValue> shape(l);
+	std::set<TString> result_set;
+	// ----------------------------------------------------------------------------
+	// STEP 1:
+	// create set of d-variants (set V) for every l-mer x in the first sequence.
+	// create set L[i] := set of l-mers in sequence s(i+1) 
+	//                    having a hamming distance of <=2d to x, i=0,...,(t-2).
+	// guess if an l-mer y in of neighborhood V is a motif by checking
+	// whether there are l-mers in the rest sequences (s1,s2,...,st-1) that are 
+	// at distance d from it.
+	// ----------------------------------------------------------------------------
+	std::vector<int> V;
+	String< String<TPos> > L;
+	//unsigned int count = 0;
+	while(seq_iter1!=seq_end1)
+	{
+		//construct set V
+		createDVariants(V, seq_iter1, l, d, is_exact, shape);
+		//construct set L
+		resize(L, t-1);
+		for(typename Position< String< String<TPos> > >::Type i=0; i<length(L); ++i)
+		{
+			String<TPos> pos_ar;
+			std::vector<TPos> pos_vect;
+
+			typename Size<TString>::Type seq_len2 = length(dataset[i+1]);
+			typename Iterator<TString>::Type seq_iter2 = begin(dataset[i+1]);
+			typename Iterator<TString>::Type seq_end2 = begin(dataset[i+1])+seq_len2-l+1;
+			int seq_pos = 0;
+			while(seq_iter2!=seq_end2)
+			{
+				if( hammingDistance<TType>(seq_iter2, seq_iter2+l, seq_iter1)<=2*d )
+				{
+					pos_vect.push_back(seq_pos);
+				}
+				++seq_iter2;
+				++seq_pos;
+			}
+			resize(pos_ar, pos_vect.size());
+			std::copy(pos_vect.begin(), pos_vect.end(), begin(pos_ar));
+			L[i] = pos_ar;
+			pos_vect.clear();
+		}
+		std::vector<int>::iterator v_iter = V.begin();
+		std::vector<int>::iterator v_end = V.end();
+		while(v_iter!=v_end)
+		{
+			TString l_mer = inverseHash<TValue>(*v_iter,ValueSize<TValue>::VALUE,l); 
+			if(hasExactOneOccurrence(begin(l_mer),begin(dataset[0]),end(dataset[0]),l,d,is_exact))
+			{
+				unsigned int number = 0;
+				bool isMotif = true;
+				for(typename Position< String< String<TPos> > >::Type i=0; i<length(L); ++i)
+				{
+					typename Iterator< String<TPos> >::Type l_iter = begin(L[i]);
+					typename Iterator< String<TPos> >::Type l_end = end(L[i]);
+					while((l_iter!=l_end) && (number<2))
+					{
+						TPos pos = *l_iter;
+						if(is_exact && hammingDistance<TType>(begin(dataset[i+1])+pos, begin(dataset[i+1])+pos+l, 
+							                          begin(l_mer))==d)
+						{
+							++number;
+						}
+						else if(!(is_exact) && 
+							      hammingDistance<TType>(begin(dataset[i+1])+pos, begin(dataset[i+1])+pos+l,
+								                        begin(l_mer))<=d)                  
+						{
+							++number;
+						}
+						++l_iter;
+					}
+					if(number!=1)
+					{
+						isMotif = false;
+						i = length(L);
+					}
+					number = 0;
+				}
+				if(isMotif)
+				{
+					result_set.insert(l_mer);
+				}
+			}
+			++v_iter;
+		}
+		V.clear();
+		++seq_iter1;
+		clear(L);
+	}
+	// ----------------------------------------------------------------------------
+	// STEP 2:
+	// collect motif candidates
+	// ----------------------------------------------------------------------------
+	resize(result, result_set.size());
+	std::copy(result_set.begin(), result_set.end(), begin(result));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Omops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStrings, typename TType>
+void 
+pmsp(TStrings & result,
+	  TStrings & dataset,
+	  TType  const & l,
+	  TType const & d, 
+	  bool const & is_exact,
+	  Omops const & /*model_type*/)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Position<TString>::Type TPos;
+
+	typename Size<TStrings>::Type t = length(dataset);
+	typename Iterator<TStrings>::Type ds_iter1 = begin(dataset);
+
+	typename Size<TString>::Type seq_len1 = length(*ds_iter1); 
+	typename Iterator<TString>::Type seq_iter1 = begin(*ds_iter1);
+	Shape<TValue> shape(l);
+	std::set<TString> result_set;
+	// ----------------------------------------------------------------------------
+	// STEP 1:
+	// create set of d-variants (set V) for every l-mer x in the first sequence.
+	// create set L[i] := set of l-mers in sequence s(i+1) 
+	//                    having a hamming distance of <=2d to x, i=0,...,(t-2).
+	// guess if an l-mer y in of neighborhood V is a motif by checking
+	// whether there are l-mers in the rest sequences (s1,s2,...,st-1) that are 
+	// at distance d from it.
+	// ----------------------------------------------------------------------------
+	std::vector<int> V;
+	String< String<TPos> > L;
+	while(seq_iter1!=(begin(*ds_iter1)+seq_len1-l+1))
+	{		
+		//construct set V
+		createDVariants(V, seq_iter1, l, d, is_exact, shape);	
+		//construct set L
+		resize(L, t-1);
+		for(typename Position< String< String<TPos> > >::Type i=0; i<length(L); ++i)
+		{
+			String<TPos> pos_ar;
+			std::vector<TPos> pos_vect;
+
+			typename Size<TString>::Type seq_len2 = length(dataset[i+1]);
+			typename Iterator<TString>::Type seq_iter2 = begin(dataset[i+1]);
+			typename Iterator<TString>::Type seq_end2 = begin(dataset[i+1])+seq_len2-l+1;
+			int seq_pos = 0;
+			while(seq_iter2!=seq_end2)
+			{
+				if( hammingDistance<TType>(seq_iter2, seq_iter2+l, seq_iter1)<=2*d )
+				{
+					pos_vect.push_back(seq_pos);
+				}
+				++seq_iter2;
+				++seq_pos;
+			}
+			resize(pos_ar, pos_vect.size());
+			std::copy(pos_vect.begin(), pos_vect.end(), begin(pos_ar));
+			L[i] = pos_ar;
+			pos_vect.clear();
+		}
+		std::vector<int>::iterator v_iter = V.begin();
+		std::vector<int>::iterator v_end = V.end();
+		while(v_iter!=v_end)
+		{
+			TString l_mer = inverseHash<TValue>(*v_iter,ValueSize<TValue>::VALUE,l);
+			unsigned int number = 0;
+			bool isMotif = true;
+			for(typename Position< String< String<TPos> > >::Type i=0; i<length(L); ++i)
+			{
+				typename Iterator< String<TPos> >::Type l_iter = begin(L[i]);
+				typename Iterator< String<TPos> >::Type l_end = end(L[i]);
+				while((l_iter!=l_end) && (number<1))
+				{
+					TPos pos = *l_iter;
+					if(is_exact && hammingDistance<TType>(begin(dataset[i+1])+pos, begin(dataset[i+1])+pos+l, 
+												  begin(l_mer))==d)
+					{
+						++number;
+					}
+					else if(!(is_exact) && 
+							  hammingDistance<TType>(begin(dataset[i+1])+pos, begin(dataset[i+1])+pos+l,
+													begin(l_mer))<=d)                              
+					{
+						++number;
+					}
+					++l_iter;
+				}
+				if(number!=1)
+				{
+					isMotif = false;
+					i=length(L);
+				}
+				number = 0;
+			}
+			if(isMotif)
+			{
+				result_set.insert(l_mer);
+			}
+
+			++v_iter;
+		}
+		V.clear();
+		++seq_iter1;
+		clear(L);
+	}
+	// ----------------------------------------------------------------------------
+	// STEP 2:
+	// collect motif candidates
+	// ----------------------------------------------------------------------------
+	resize(result, result_set.size());
+	std::copy(result_set.begin(), result_set.end(), begin(result));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Zoops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStrings, typename TType>
+void 
+pmsp(TStrings & result,
+	 TStrings & dataset,
+	 TType const & l,
+	 TType const & d, 
+	 bool const & is_exact,
+	 Zoops const & model_type)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Position<TStrings>::Type TPos1;
+	typedef typename Position<TString>::Type TPos2;
+
+	typename Size<TStrings>::Type t = length(dataset);
+	typename Iterator<TStrings>::Type ds_iter1 = begin(dataset);
+
+	std::set<TString> result_set;
+	TPos1 seq_nr = 0;
+	for(; !atEnd(ds_iter1, dataset); goNext(ds_iter1))
+	{
+		std::vector<TPos1> relevant_pos_vect;
+		for(TPos1 i=0; i<t; ++i)
+		{
+			if(i!=seq_nr)
+			{
+				relevant_pos_vect.push_back(i);
+			}
+		}
+		typename Size<TString>::Type seq_len1 = length(*ds_iter1);
+		typename Iterator<TString>::Type seq_iter1 = begin(*ds_iter1);
+		typename Iterator<TString>::Type seq_end1 = begin(*ds_iter1)+(seq_len1-l+1);
+		Shape<TValue> shape(l);
+		while(seq_iter1!=seq_end1)
+		{
+			//construct set V
+			std::vector<int> V;
+			createDVariants(V, seq_iter1, l, d, is_exact, shape);
+			//construct set L
+			String< String<TPos2> > L;
+			resize(L, t-1);
+			for(typename Position< String< String<TPos2> > >::Type i=0; i<length(L); ++i)
+			{
+				String<TPos2> pos_ar;
+				std::vector<TPos2> pos_vect;
+				typename Size<TString>::Type seq_len2 = length(dataset[relevant_pos_vect[i]]);
+				typename Iterator<TString>::Type seq_iter2 = begin(dataset[relevant_pos_vect[i]]);
+				typename Iterator<TString>::Type seq_end2 = begin(dataset[relevant_pos_vect[i]])+(seq_len2-l+1);
+				int seq_pos = 0;
+				while(seq_iter2!=seq_end2)
+				{
+					if( hammingDistance<TType>(seq_iter2, seq_iter2+l, seq_iter1)<=2*d )
+					{
+						pos_vect.push_back(seq_pos);
+					}
+					++seq_iter2;
+					++seq_pos;
+				}
+				resize(pos_ar, pos_vect.size());
+				std::copy(pos_vect.begin(), pos_vect.end(), begin(pos_ar));
+				L[i] = pos_ar;
+				pos_vect.clear();
+				clear(pos_ar);
+			}
+
+			std::vector<int>::iterator V_iter = V.begin();
+			std::vector<int>::iterator V_end = V.end();
+			while(V_iter!=V_end)
+			{
+				TString l_mer = inverseHash<TValue>(*V_iter, ValueSize<TValue>::VALUE, l);
+				typename std::set<TString>::iterator iter = result_set.find(l_mer);
+				if( (iter==result_set.end()) &&
+					hasExactOneOccurrence(begin(l_mer), 
+					                     begin(dataset[seq_nr]), 
+										 end(dataset[seq_nr]), l, d, is_exact) )
+				{
+					int lower_limit = (int) floor(t*(model_type.threshold)+0.5)-1;
+					bool isMotif = true;
+					unsigned int number = 0;
+					for(typename Position< String< String<TPos2> > >::Type i=0; i<length(L); ++i)
+					{
+						typename Iterator< String<TPos2> >::Type L_iter = begin(L[i]);
+						typename Iterator< String<TPos2> >::Type L_end = end(L[i]);
+						while((L_iter!=L_end) && (number<2))
+						{
+							TPos2 pos = *L_iter;
+							if(is_exact && 
+								hammingDistance<TType>(begin(dataset[relevant_pos_vect[i]])+pos, 
+												begin(dataset[relevant_pos_vect[i]])+pos+l, 
+												begin(l_mer))==d)
+							{
+								++number;
+							}
+							else
+							{
+								if((!is_exact) && 
+									hammingDistance<TType>(begin(dataset[relevant_pos_vect[i]])+pos, 
+													begin(dataset[relevant_pos_vect[i]])+pos+l, 
+													begin(l_mer))<=d)
+								{
+									++number;
+								}}
+
+							++L_iter;
+						}
+						if(number>1)
+						{
+							isMotif = false;
+							i = length(L);
+						}
+						else if(number==1)
+						{
+							--lower_limit;
+						}
+						if(lower_limit<=0)
+						{
+							i = length(L);
+						}
+						number = 0;
+					}
+					if(isMotif && (lower_limit<=0))
+					{
+						result_set.insert(l_mer);
+					}
+				}
+
+				++V_iter;
+			}
+			V.clear();
+			clear(L);
+			++seq_iter1;
+		}
+		relevant_pos_vect.clear();
+		++seq_nr;
+	}
+	// ----------------------------------------------------------------------------
+	// STEP 2:
+	// collect motif candidates
+	// ----------------------------------------------------------------------------
+	resize(result, result_set.size());
+	std::copy(result_set.begin(), result_set.end(), begin(result));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Tcm model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStrings, typename TType>
+void 
+pmsp(TStrings & result,
+	 TStrings & dataset,
+	 TType const & l,
+	 TType const & d, 
+	 bool const & is_exact,
+	 Tcm const & model_type)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Position<TStrings>::Type TPos1;
+	typedef typename Position<TString>::Type TPos2;
+
+	typename Size<TStrings>::Type t = length(dataset);
+	typename Iterator<TStrings>::Type ds_iter1 = begin(dataset);
+
+	std::set<TString> result_set;
+	TPos1 seq_nr = 0;
+	for(; !atEnd(ds_iter1, dataset); goNext(ds_iter1))
+	{
+		std::vector<TPos1> relevant_pos_vect;
+		for(TPos1 i=0; i<t; ++i)
+		{
+			if(i!=seq_nr)
+			{
+				relevant_pos_vect.push_back(i);
+			}
+		}
+		typename Size<TString>::Type seq_len1 = length(*ds_iter1);
+		typename Iterator<TString>::Type seq_iter1 = begin(*ds_iter1);
+		typename Iterator<TString>::Type seq_end1 = begin(*ds_iter1)+(seq_len1-l+1);
+		Shape<TValue> shape(l);
+		while(seq_iter1!=seq_end1)
+		{
+			//construct set V
+			std::vector<int> V;
+			createDVariants(V, seq_iter1, l, d, is_exact, shape);
+			//construct set L
+			String< String<TPos2> > L;
+			resize(L, t-1);
+			for(typename Position< String< String<TPos2> > >::Type i=0; i<length(L); ++i)
+			{
+				String<TPos2> pos_ar;
+				std::vector<TPos2> pos_vect;
+				typename Size<TString>::Type seq_len2 = length(dataset[relevant_pos_vect[i]]);
+				typename Iterator<TString>::Type seq_iter2 = begin(dataset[relevant_pos_vect[i]]);
+				typename Iterator<TString>::Type seq_end2 = begin(dataset[relevant_pos_vect[i]])+(seq_len2-l+1);
+				int seq_pos = 0;
+				while(seq_iter2!=seq_end2)
+				{
+					if( hammingDistance<TType>(seq_iter2, seq_iter2+l, seq_iter1)<=2*d )
+					{
+						pos_vect.push_back(seq_pos);
+					}
+					++seq_iter2;
+					++seq_pos;
+				}
+				resize(pos_ar, pos_vect.size());
+				std::copy(pos_vect.begin(), pos_vect.end(), begin(pos_ar));
+				L[i] = pos_ar;
+				pos_vect.clear();
+				clear(pos_ar);
+			}
+
+			std::vector<int>::iterator V_iter = V.begin();
+			std::vector<int>::iterator V_end = V.end();
+			while(V_iter!=V_end)
+			{
+				TString l_mer = inverseHash<TValue>(*V_iter, ValueSize<TValue>::VALUE, l);
+				typename std::set<TString>::iterator iter = result_set.find(l_mer);
+				if( iter==result_set.end() )
+				{
+					int lower_limit = (int) floor(t*(model_type.threshold)+0.5)-1;
+					bool isMotif = false;
+					unsigned int number = 0;
+					for(typename Position< String< String<TPos2> > >::Type i=0; i<length(L); ++i)
+					{
+						typename Iterator< String<TPos2> >::Type L_iter = begin(L[i]);
+						typename Iterator< String<TPos2> >::Type L_end = end(L[i]);
+						while((L_iter!=L_end) && (number<1))
+						{
+							TPos2 pos = *L_iter;
+							if((is_exact) && 
+								(hammingDistance<TType>(begin(dataset[relevant_pos_vect[i]])+pos, 
+												begin(dataset[relevant_pos_vect[i]])+pos+l, 
+												begin(l_mer))==d))
+							{
+								++number;
+							}
+							else if((!is_exact) && 
+								(hammingDistance<TType>(begin(dataset[relevant_pos_vect[i]])+pos, 
+												begin(dataset[relevant_pos_vect[i]])+pos+l, 
+												begin(l_mer))<=d))
+							{
+								++number;
+							}
+
+							++L_iter;
+						}
+						if(number==1)
+						{
+							--lower_limit;
+						}
+
+						if(lower_limit==0)
+						{
+							isMotif = true;
+							i = length(L);
+						}
+						number = 0;
+					}
+					if(isMotif)
+					{
+						result_set.insert(l_mer);
+					}
+				}
+
+				++V_iter;
+			}
+			V.clear();
+			clear(L);
+			++seq_iter1;
+		}
+		relevant_pos_vect.clear();
+		++seq_nr;
+	}
+	// ----------------------------------------------------------------------------
+	// STEP 2:
+	// collect motif candidates
+	// ----------------------------------------------------------------------------
+	resize(result, result_set.size());
+	std::copy(result_set.begin(), result_set.end(), begin(result));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//Subfunctions
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.hasExactOneOccurrence:
+..summary:Checks if a given l-mer occurs exactly once in a given sequence
+..cat:Motif Search
+..signature:hasExactOneOccurrence(l_mer_begin,seq_begin,seq_end,l,d,is_exact)
+..param.l_mer_begin:An iterator pointing to the beginning of a given l-mer pattern.
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.seq_begin:An iterator pointing to the beginning of a given sequence.
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.seq_end:An iterator pointing to the end of a given sequence.
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.is_exact:The size of Hamming distance
+...type:$bool$
+..include:seqan/find_motif.h
+*/
+
+template<typename TStringIter, typename TType>
+bool
+hasExactOneOccurrence(TStringIter l_mer_begin,
+					 TStringIter seq_begin,
+					 TStringIter seq_end,
+					 TType const & l,
+					 TType const & d,
+					 bool const & is_exact)
+{
+    SEQAN_CHECKPOINT;
+
+	bool result = false;
+	TType counter = 0;
+	while( (seq_begin!=(seq_end-l+1)) )
+	{
+		if(is_exact)
+		{
+			counter += (hammingDistance<TType>(seq_begin, seq_begin+l, l_mer_begin)==d) ? 1 : 0;
+		}
+		else
+		{
+			counter += (hammingDistance<TType>(seq_begin, seq_begin+l, l_mer_begin)<=d) ? 1 : 0;
+		}		
+		++seq_begin;
+	}
+
+	if(counter==1)
+	{
+		result = true;
+	}
+	return result;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/find_motif_projection.h b/src/SeqAn-1.3/seqan/find_motif/find_motif_projection.h
new file mode 100644
index 0000000..e9f699a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/find_motif_projection.h
@@ -0,0 +1,1256 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_MOTIF_PROJECTION_H
+#define SEQAN_HEADER_FIND_MOTIF_PROJECTION_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Projection
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Projection:
+..summary: Represents the PROJECTION algorithm of Buhler and Tompa.
+..general:Class.MotifFinder
+..cat:Motif Search
+..signature:MotifFinder<TValue, Projection>
+..param.TValue:The type of sequences to be analyzed.
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..remarks:The @Spec.Projection|Projection algorithm@ is a heuristic algorithm that does not guarantee
+          that the unknown motif will be found every time. We can increase the chance of success
+		  by performing a large number of independent trials to generate multiple guesses.
+		  In each trial, @Spec.Projection@ makes a preselection of sets of length-l patterns called l-mers
+		  which are likely to be a collection of motif instances (filtering step) and 
+		  refines them by some local searching techniques, e.g. @Function.em|EM algorithm@, Gibbs Sampling etc (refinement step).
+..include:seqan/find_motif.h
+*/
+
+struct Projection_;
+typedef Tag<Projection_> const Projection;
+
+//////////////////////////////////////////////////////////////////////////////
+// MotifFinder - Projection Spec
+//
+// t:=dataset size (number of sequences)
+// l:=motif size
+// m:=number of possible l-mers
+// d:=number of substitutions
+// k:=projection size
+// s:=bucket size
+// tr:=number of independent trials
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+class MotifFinder<TValue, Projection>
+{
+	enum { ALPHABET_SIZE = ValueSize<TValue>::VALUE };
+//____________________________________________________________________________________________
+	/*
+	enum { ALPHABET_SIZE = ValueSize<TValue>::VALUE };
+	typedef String<TValue> TString;
+	typedef String<TString> TStrings;
+	typedef typename Size<TStrings>::Type TSize1;
+	typedef typename Size<TString>::Type TSize2;*/
+
+//____________________________________________________________________________________________
+
+public:
+	typedef unsigned int TSize;
+	typedef String<TValue> TString;
+	typedef String<TString> TStrings;
+
+
+	TSize dataset_size;
+	TSize motif_size;
+	TSize total_num_of_l_mers;
+	TSize num_of_substitutions;
+	bool has_exact_substitutions;
+	TSize projection_size;
+	TSize bucket_threshold;
+	TSize num_of_trials;
+	TStrings set_of_motifs;
+	int score;
+
+//____________________________________________________________________________________________
+
+	MotifFinder():
+		dataset_size(0),
+		motif_size(0),
+		total_num_of_l_mers(0),
+		num_of_substitutions(0),
+		has_exact_substitutions(false),
+		projection_size(0),
+		bucket_threshold(0),
+		num_of_trials(0)
+	{
+    SEQAN_CHECKPOINT;
+	}
+	MotifFinder(TSize const & t_, 
+				TSize const & l_, 
+				TSize const & m_total_,
+				TSize const & d_,
+				bool const & is_exact_,
+				TSize const & k_,
+				TSize const & s_,
+				TSize const & tr_):
+		dataset_size(t_),
+		motif_size(l_),
+        total_num_of_l_mers(m_total_),
+		num_of_substitutions(d_),
+		has_exact_substitutions(is_exact_),
+		projection_size(k_),
+		bucket_threshold(s_),
+		num_of_trials(tr_)
+	{
+    SEQAN_CHECKPOINT;
+	}
+	MotifFinder(TSize const & t_, 
+				TSize const & l_, 
+				TSize const & m_total_,
+				TSize const & d_,
+				bool const & is_exact_):
+		dataset_size(t_),
+		motif_size(l_),
+		total_num_of_l_mers(m_total_),
+		num_of_substitutions(d_),
+		has_exact_substitutions(is_exact_),
+		projection_size(0),
+		bucket_threshold(0),
+		num_of_trials(0)
+	{
+    SEQAN_CHECKPOINT;
+
+		projection_size = 
+			_computeProjectionSize<TSize>(ALPHABET_SIZE,
+			                                     motif_size,
+								                 num_of_substitutions,
+								                 total_num_of_l_mers);
+		
+		bucket_threshold = 
+			_computeBucketThreshold<TSize>(ALPHABET_SIZE,
+			                                      motif_size,
+								                  num_of_substitutions,
+								                  total_num_of_l_mers,
+												  projection_size);
+
+		double prob_q = static_cast<double>(0.95);
+		num_of_trials = _computeNumOfTrials(dataset_size,
+								            motif_size,
+								            num_of_substitutions,
+								            projection_size,
+								            bucket_threshold,
+								            prob_q);
+	}
+	MotifFinder(MotifFinder const & other_):
+		dataset_size(other_.dataset_size),
+		motif_size(other_.motif_size),
+		total_num_of_l_mers(other_.total_num_of_l_mers),
+		num_of_substitutions(other_.num_of_substitutions),
+		has_exact_substitutions(other_.has_exact_substitutions),
+		projection_size(other_.projection_size),
+		bucket_threshold(other_.bucket_threshold),
+		num_of_trials(other_.num_of_trials)
+	{
+    SEQAN_CHECKPOINT;
+	}
+	~MotifFinder()
+	{
+    SEQAN_CHECKPOINT;
+	}
+
+	MotifFinder const &
+	operator = (MotifFinder const & other_)
+	{
+    SEQAN_CHECKPOINT;
+		if(this!=&other_)
+		{
+			this->dataset_size = other_.dataset_size;
+			this->motif_size = other_.motif_size;
+			this->total_num_of_l_mers = other_.total_num_of_l_mers;
+			this->num_of_substitutions = other_.number_of_substitutions;
+			this->has_exact_substitutions = other_.has_exact_substitutions;
+			this->projection_size = other_.projection_size;
+			this->bucket_threshold = other_.bucket_threshold;
+			this->num_of_trials = other_.num_of_trials;
+		}
+
+		return *this;
+	}
+
+//____________________________________________________________________________________________
+
+}; // class MotifFinder<TValue, Projection>
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeProjectionSize:
+..summary:Computes the projection size (k).
+..cat:Motif Search
+..signature:_computeProjectionSize(alp_size,l,d,m)
+..param.alp_size:The size of the sequence alphabet.
+...remarks:The alp_size object is four for nucleotide sequences and twenty for amino acid sequences.
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.m:The total number of possible l-mers of a given dataset.
+..include:seqan/find_motif.h
+*/
+
+template<typename TType> 
+TType
+_computeProjectionSize(TType const & alp_size,
+					   TType const & l, 
+					   TType const & d,
+					   TType const & m_total)
+{
+    SEQAN_CHECKPOINT;
+
+	TType result = static_cast<TType>(0);
+	double numerator = log(static_cast<double>(m_total));
+	double denominator = log(static_cast<double>(alp_size));
+	double fraction = (numerator/denominator);
+
+	if( fraction<static_cast<double>(l-d-1) )
+	{
+		result = static_cast<TType>(floor(fraction)+1);
+	}
+	else
+	{
+		result = l-d-1;
+	}
+
+	return result;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeBucketThreshold:
+..summary:Computes the bucket threshold size (s).
+..cat:Motif Search
+..signature:_computeBucketThreshold(alp_size,l,d,m,k)
+..param.alp_size:The size of the sequence alphabet.
+...remarks:The alp_size object is four for nucleotide sequences and twenty for amino acid sequences.
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.m:The total number of possible l-mers of a given dataset.
+..param.k:The projection size.
+..include:seqan/find_motif.h
+*/
+
+template<typename TType> 
+TType
+_computeBucketThreshold(TType const & alp_size,
+					    TType const & l, 
+					    TType const & d,
+					    TType const & m_total, 
+						TType const & k)
+{
+    SEQAN_CHECKPOINT;
+
+	TType result = 3; // or 4
+	double numerator = log(static_cast<double>(m_total));
+	double denominator = log(static_cast<double>(alp_size));
+	double fraction = (numerator/denominator);
+
+	if( fraction>=static_cast<double>(l-d-1) )
+	{
+		result =
+			static_cast<TType>(floor(static_cast<double>(m_total/
+			                          pow(static_cast<double>(alp_size), static_cast<double>(k))*2)));
+		if(result<1)
+		{
+			result = 1;
+		}
+	}
+
+	return result;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeNumOfTrials:
+..summary:Computes the number of independent trials (tr).
+..cat:Motif Search
+..signature:_computeNumOfTrials(t,l,d,k,s,prob_q)
+..param.t:The number of input sequences.
+..param.l:The size of the motif.
+..param.d:The number of substitutions.
+..param.k:The projection size.
+..param.s:The bucket threshold size.
+..param.prob_q:
+...remarks:The prob_q object represents the probability that the planted bucket contains "s" or 
+           more planted motif instances in at least one of the "tr" trials. Normally, we use 
+		   prob_q=0.95.	
+...type:$double$
+..remarks:tr>= log(1-q)/log(B), where p is the probability that each motif occurence hashes 
+          to the planted bucket and B is the probability that fewer than s planted occurences hash
+          to the planted buckes in a given trial
+..include:seqan/find_motif.h
+*/
+
+template<typename TType> 
+TType
+_computeNumOfTrials(TType const & t,
+					TType const & l,
+					TType const & d, 
+					TType const & k, 
+					TType const & s,
+					double const & prob_q)
+{
+    SEQAN_CHECKPOINT;
+
+	double prob_p =
+		static_cast<double>(binomialCoefficient( (l-d), k ))
+	   /static_cast<double>(binomialCoefficient(l,k));
+	
+	double prob_B = static_cast<double>(0);
+	for(unsigned int i=0; i<s; ++i)
+	{
+		prob_B+=
+			static_cast<double>(binomialCoefficient(t,i))
+		   *pow(prob_p, static_cast<double>(i))
+		   *pow(static_cast<double>(1)-prob_p, static_cast<double>(t-i));
+	}
+
+	double numerator = log(static_cast<double>(1)-prob_q);
+	double denominator = log(static_cast<double>(prob_B));
+	TType result = 
+		static_cast<TType>(ceil(static_cast<double>(numerator/denominator)-static_cast<double>(0.5)));
+
+	if(result<1)
+	{
+		result = 1;
+	}
+	
+	return result;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.findMotif (for PROJECTION)
+..summary:Represents the PROJECTION algorithm.
+..cat:Motif Search
+..signature:findMotif(finder,dataset,seq_model)
+..param.finder:The @Class.MotifFinder@ object.
+...type:Class.MotifFinder
+..param.dataset:The dataset object representing the input sequences.
+...type:Class.StringSet
+..param.seq_model:The seq_model object.
+...type:Tag.Oops
+...type:Tag.Zoops
+...type:Tag.Tcm
+...remarks:The sequence models rely on different assumptions about the distribution of motif occurrences
+           across the sample sequences. 
+..remarks:The PROJECTION algorithm which consists of two steps, the filtering and the refinement step,
+          is able to run in Oops, Zoops and Tcm mode.
+..remarks:The algorithm uses the EM procedure during the refinement phase which was introduced by Bailey 
+          and Elkan.
+..include:seqan/find_motif.h
+*/
+
+template<typename TSeqType, typename TStrings, typename TModel>
+void
+findMotif(MotifFinder<TSeqType, Projection> & finder, 
+		  TStrings & dataset,
+		  TModel seq_model)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Position<TString>::Type TPos;
+	typedef String<int> TArray; 
+	typedef std::vector<int> TBucket;
+	typedef typename Size<TArray>::Type TArSize;
+	typedef String<TBucket> TBuckets;
+
+	// dataset information
+	typedef typename Size<TStrings>::Type TStringsSize;
+	TStringsSize t = length(dataset);
+
+	// count_ar:=array of votes for each h(k-mer)
+	TArSize ar_size =
+		static_cast<TArSize>(pow(static_cast<double>(ValueSize<TSeqType>::VALUE), static_cast<int>(finder.projection_size)));
+	finder.score = -1;
+	//std::set< String<int> > occurred_positions;
+	for(unsigned int trial=0; trial<finder.num_of_trials; ++trial)
+	{
+		//
+		//std::cout << " . ";
+		//
+
+		TArray count_ar;
+		resize(count_ar, ar_size);
+
+		// ----------------------------------------------------------------------------
+		// STEP 1:
+		// filtering phase (:=key random projection phase)
+		// ----------------------------------------------------------------------------
+		// choose randomly k different positions
+		std::set<int> positions;
+		choosePositions(positions,finder.motif_size,finder.projection_size);
+
+		// array of collection of l-mers
+		TBuckets bucket_ar;
+		unsigned int num_of_relevant_buckets = 0;
+
+		_filteringStep(bucket_ar,
+					   count_ar,
+					   num_of_relevant_buckets,
+					   dataset,
+					   positions,
+					   finder.motif_size,
+					   finder.bucket_threshold);
+
+		// ----------------------------------------------------------------------------
+		// STEP 2:
+		// checking phase (:= local search-based refinement procedure)
+		// ----------------------------------------------------------------------------
+		TPos i = 0;
+		TPos j = 0;
+		while( (j<num_of_relevant_buckets) & (i<ar_size) )
+		{
+			unsigned int bucket_size = (bucket_ar[i]).size();
+			if(bucket_size>=finder.bucket_threshold)
+			{
+				++j;
+
+				TStrings l_mers;
+				resize(l_mers, bucket_size);
+				TBucket::iterator bucket_iter, bucket_end;
+				bucket_iter = (bucket_ar[i]).begin();
+				bucket_end = (bucket_ar[i]).end();
+				int bucket_element = 0;
+				while(bucket_iter!=bucket_end)
+				{
+					TString l_mer = 
+						inverseHash<TSeqType>(*bucket_iter, ValueSize<TSeqType>::VALUE, finder.motif_size);
+					l_mers[bucket_element] = l_mer;
+					++bucket_element;
+					++bucket_iter;
+				}
+
+				TString consensus_pat;
+				TStrings motif_instances;
+				int score = 
+					_refinementStep(consensus_pat,
+									l_mers,dataset,
+									finder.motif_size,
+									finder.num_of_substitutions,
+									finder.has_exact_substitutions,
+									seq_model);
+
+				if(score>finder.score)
+				{
+					finder.score = score;
+					if (!length(finder.set_of_motifs)) appendValue(finder.set_of_motifs, consensus_pat);
+					else finder.set_of_motifs[0] = consensus_pat;
+
+					if((TStringsSize) finder.score==t)
+					{
+						trial = finder.num_of_trials;
+						j = num_of_relevant_buckets;
+					}
+				}
+			}
+			++i;
+		}// end while( (j<num_of_relevant_buckets) & (i<ar_size) )
+	}// end for(unsigned int trial=0; trial<finder.num_of_trials; ++trial)
+	
+	//
+	//std::cout << "\n";
+	//
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._filteringStep:
+..summary:Given a position set with k different positions we compute a projection value
+          for each l-mer in the input sequences and store the specific l-mer in the appropriate
+		  bucket which is labeled with the specific projection value.
+..cat:Motif Search
+..signature:_filteringStep(buckets,count_ar,num_of_relevant_buckets,dataset,shape,l,s)
+..include:seqan/find_motif.h
+*/
+
+template<typename TBucketAr, typename TArray, typename TType, typename TStrings, typename TPositions>
+void 
+_filteringStep(TBucketAr & buckets, 
+			   TArray & count_ar,
+			   TType & num_of_relevant_buckets,
+			   TStrings & dataset,
+			   TPositions & positions,
+			   TType const & l,
+			   TType const & s)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Value<TBucketAr>::Type TBucket;
+	typename Iterator<TStrings>::Type ds_iter = begin(dataset);
+	typename Size<TArray>::Type ar_size = length(count_ar);
+	Shape<TValue> shape(l); //to compute hash value of l-mer x
+ 
+	// initialize pointer by setting it to null 
+	// (=std::fill(begin(count_ar),end(count_ar),0))
+	typename Iterator<TArray>::Type count_ar_iter = begin(count_ar) ;
+	typename Iterator<TArray>::Type count_ar_end = end(count_ar);
+	while(count_ar_iter!=count_ar_end)
+	{
+		*count_ar_iter = 0;
+		++count_ar_iter;
+	}
+
+	// go over input sequences & increment corresponding counter in count_ar
+	// fill l_mer_index with entries
+	resize(buckets, ar_size);
+	int y = 0; //hash-value of created k-mer
+	int x = 0; //hash-value of l-mer
+	for(; !atEnd(ds_iter, dataset); goNext(ds_iter))
+	{
+		typename Size<TString>::Type seq_length = length(*ds_iter);
+		typename Iterator<TString>::Type seq_iter = begin(*ds_iter);
+		typename Iterator<TString>::Type seq_end = begin(*ds_iter)+(seq_length-l+1);
+		while( seq_iter!=seq_end )
+		{
+			x = hash(shape, seq_iter);
+			y = projectLMer<TValue>(positions, seq_iter);
+	    	++count_ar[y];
+			(buckets[y]).push_back(x);
+			++seq_iter;
+		}
+	}
+
+	num_of_relevant_buckets = 
+		std::count_if(begin(count_ar),
+		              end(count_ar),
+					  bind2nd(std::greater_equal<int>(),static_cast<int>(s)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._refinementStep:
+..summary:Refines the collection of l-mers in each relevant bucket which contains at least s l-mers.
+..cat:Motif Search
+..signature:_refinementStep(consensus_seq,positions,l_mers,dataset,t,l,d,is_exact,model_type)
+..include:seqan/find_motif.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//	Oops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TType>
+int
+_refinementStep(TString & consensus_seq,
+			    String<TString> const & l_mers,
+			    String<TString> & dataset,
+				TType const & l,
+				TType const & d,
+				bool const & is_exact,
+				Oops const & oops)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef String<TString> TStrings;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Position<TString>::Type TPos;
+	typedef FrequencyDistribution<TValue> TFrequencyDistribution;
+	TType t = length(dataset);
+	int score = 0;
+
+	// compute background frequency
+	TFrequencyDistribution background;
+	backgroundFrequency(background, begin(dataset), end(dataset));
+
+	// step1: initial guess (profile) from bucket
+	double epsilon = 0.1;
+	Pseudocount<TValue, CMode> pseudocount_mode_c(epsilon);
+	String<TFrequencyDistribution> profile;
+	convertSetOfPatternsToProfile(profile, l_mers, pseudocount_mode_c);
+	completeProfile(profile, background);
+
+	// step2: refinement of initial profile with em: 5 trials
+	double likelihood_score = 0;
+	int iterations = 3; //5
+
+	while(iterations>0)
+	{
+		likelihood_score = em(profile, begin(dataset), t, l, oops);
+		--iterations;
+	}
+
+	determineConsensusSeq(consensus_seq, profile, l);
+	typename Iterator<TStrings>::Type ds_iter, ds_end;
+	ds_iter = begin(dataset);
+	ds_end = end(dataset);
+	typename Position<TStrings>::Type seq_nr;
+	do
+	{
+		seq_nr = t-(ds_end-ds_iter);
+		TPos m = (TPos)(length(*ds_iter)-l+1);
+		int * hd_ar = new int[m];
+		typename Iterator<TString>::Type seq_iter, seq_end, consensus_begin;
+		seq_iter = begin(*ds_iter);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			consensus_begin = begin(consensus_seq);
+			hd_ar[m-(seq_end-seq_iter)] = hammingDistance<int>(seq_iter, seq_iter+l, consensus_begin);
+			++seq_iter;
+		}
+
+		if( (!is_exact) & 
+			(count_if(hd_ar,hd_ar+m,bind2nd(std::less_equal<TType>(), d))==1) )
+		{
+			++score;
+		}
+		else if( is_exact & 
+			     (count_if(hd_ar,hd_ar+m,bind2nd(std::equal_to<TType>(), d))==1) )
+		{
+			++score;
+		}
+
+		delete[] hd_ar;
+		++ds_iter;
+	}
+	while( (ds_iter!=ds_end) & (score==(int) seq_nr+1) );
+
+	return score;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Omops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TType>
+int
+_refinementStep(TString & consensus_seq,
+			    String<TString> const & l_mers,
+			    String<TString> & dataset,
+				TType const & l,
+				TType const & d,
+				bool const & is_exact,
+				Omops const & /*omops*/)
+{
+	typedef String<TString> TStrings;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Position<TString>::Type TPos;
+	typedef FrequencyDistribution<TValue> TFrequencyDistribution;
+	TType t = length(dataset);
+	int score = 0;
+
+	// compute background frequency
+	TFrequencyDistribution background;
+	backgroundFrequency(background, begin(dataset), end(dataset));
+
+	// step1: initial guess (profile) from bucket
+	double epsilon = 0.1;
+	Pseudocount<TValue, CMode> pseudocount_mode_c(epsilon);
+	String<TFrequencyDistribution> profile;
+	convertSetOfPatternsToProfile(profile, l_mers, pseudocount_mode_c);
+	completeProfile(profile, background);
+
+	// step2: refinement of initial profile with em: 5 trials
+	double likelihood_score = 0;
+	int iterations = 3; //5
+
+	while(iterations>0)
+	{
+		likelihood_score = em(profile, begin(dataset), t, l, Oops());
+		--iterations;
+	}
+
+	determineConsensusSeq(consensus_seq, profile, l);
+	typename Iterator<TStrings>::Type ds_iter, ds_end;
+	ds_iter = begin(dataset);
+	ds_end = end(dataset);
+	typename Position<TStrings>::Type seq_nr;
+	do
+	{
+		seq_nr = t-(ds_end-ds_iter);
+		TPos m = (TPos)(length(*ds_iter)-l+1);
+		typename Iterator<TString>::Type seq_iter, seq_end, consensus_begin;
+		seq_iter = begin(*ds_iter);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			consensus_begin = begin(consensus_seq);
+			TType hd = hammingDistance<TType>(seq_iter, seq_iter+l, consensus_begin);
+
+			if( (!is_exact) & (hd<=d) )
+			{
+				++score;
+				seq_iter = seq_end-1;
+			}
+			else if( is_exact & (hd==d) )
+			{
+				++score;
+				seq_iter = seq_end-1;
+			}
+			++seq_iter;
+		}
+		++ds_iter;
+	}
+	while( (ds_iter!=ds_end) & (score== (int) seq_nr+1) );
+
+	return score;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Zoops model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TType>
+int
+_refinementStep(TString & consensus_seq,
+			    String<TString> const & l_mers,
+			    String<TString> & dataset,
+				TType const & l,
+				TType const & d,
+				bool const & is_exact,
+				Zoops const & zoops)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef String<TString> TStrings;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Position<TString>::Type TPos;
+	typedef FrequencyDistribution<TValue> TFrequencyDistribution;
+	TType t = length(dataset);
+	int score = 0;
+	int lower_limit = (int) floor(t*(zoops.threshold)+0.5);
+
+	// compute background frequency
+	TFrequencyDistribution background;
+	backgroundFrequency(background, begin(dataset), end(dataset));
+
+	// step1: initial guess (profile) from bucket
+	double epsilon = 0.1;
+	Pseudocount<TValue, CMode> pseudocount_mode_c(epsilon);
+	String<TFrequencyDistribution> profile;
+	convertSetOfPatternsToProfile(profile, l_mers, pseudocount_mode_c);
+	completeProfile(profile, background);
+
+	// step2: refinement of initial profile with em: 5 trials
+	double likelihood_score = 0;
+	double gamma = static_cast<double>(1)/sqrt(static_cast<double>(t));
+	int iterations = 3; //5
+	while(iterations>0)
+	{
+		likelihood_score = em(profile, begin(dataset), t, l, gamma, zoops);
+		--iterations;
+	}
+
+	determineConsensusSeq(consensus_seq, profile, l);
+	typename Iterator<TStrings>::Type ds_iter, ds_end;
+	ds_iter = begin(dataset);
+	ds_end = end(dataset);
+	typename Position<TStrings>::Type seq_nr;
+	do
+	{
+		seq_nr = t-(ds_end-ds_iter);
+		TPos m = (TPos)(length(*ds_iter)-l+1);
+		int * hd_ar = new int[m];
+		typename Iterator<TString>::Type seq_iter, seq_end, consensus_begin;
+		seq_iter = begin(*ds_iter);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			consensus_begin = begin(consensus_seq);
+			hd_ar[m-(seq_end-seq_iter)] = hammingDistance<int>(seq_iter, seq_iter+l, consensus_begin);
+			++seq_iter;
+		}
+
+		if(!is_exact)
+		{
+			TType num = count_if(hd_ar,hd_ar+m,bind2nd(std::less_equal<TType>(), d));
+			if(num>1)
+			{
+				ds_iter = ds_end-1;
+			}
+			else if(num==1)
+			{
+				++score;
+			}
+		}
+		else
+		{
+			TType num = count_if(hd_ar,hd_ar+m,bind2nd(std::equal_to<TType>(), d));
+			if(num>1)
+			{
+				ds_iter = ds_end-1;
+			}
+			else if(num==1)
+			{
+				++score;
+			}
+		}
+		delete[] hd_ar;
+		++ds_iter;
+	}
+	while(ds_iter!=ds_end);
+
+	if(score<lower_limit)
+	{
+		score = 0;
+	}
+
+	return score;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//	Tcm model
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TType>
+int 
+_refinementStep(TString & consensus_seq,
+			    String<TString> const & l_mers,
+			    String<TString> & dataset,
+				TType const & l,
+				TType const & d,
+				bool const & is_exact,
+				Tcm const & tcm)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef String<TString> TStrings;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Position<TString>::Type TPos;
+	typedef FrequencyDistribution<TValue> TFrequencyDistribution;
+	TType t = length(dataset);
+	int score = 0;
+	int lower_limit = (int) floor(t*(tcm.threshold)+0.5);
+
+	// compute background frequency
+	TFrequencyDistribution background;
+	backgroundFrequency(background, begin(dataset), end(dataset));
+
+	// step1: initial guess (profile) from bucket
+	double epsilon = 0.1;
+	Pseudocount<TValue, CMode> pseudocount_mode_c(epsilon);
+	String<TFrequencyDistribution> profile;
+	convertSetOfPatternsToProfile(profile, l_mers, pseudocount_mode_c);
+	completeProfile(profile, background);
+
+	// step2: refinement of initial profile with em: 5 trials
+	double gamma = static_cast<double>(1)/sqrt(static_cast<double>(t));
+	double lambda = 0;
+	typename Iterator<TStrings>::Type ds_iter, ds_end;
+	ds_iter = begin(dataset);
+	ds_end = end(dataset);
+	while(ds_iter!=ds_end)
+	{
+		TPos m = (TPos)(length(*ds_iter)-l+1);
+		lambda += (gamma/((double)m));
+		++ds_iter;
+	}
+	lambda = lambda/((double)t);
+
+	double likelihood_score = 0;
+	int iterations = 3; //3
+	while(iterations>0)
+	{
+		likelihood_score = em(profile, begin(dataset), t, l, lambda, tcm);
+		--iterations;
+	}
+
+	determineConsensusSeq(consensus_seq, profile, l);
+	ds_iter = begin(dataset);
+	typename Position<TStrings>::Type seq_nr;
+	do
+	{
+		seq_nr = t-(ds_end-ds_iter);
+		TPos m = (TPos)(length(*ds_iter)-l+1);
+		typename Iterator<TString>::Type seq_iter, seq_end, consensus_begin;
+		seq_iter = begin(*ds_iter);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			consensus_begin = begin(consensus_seq);
+			TType hd = hammingDistance<TType>(seq_iter, seq_iter+l, consensus_begin);
+
+			if( (!is_exact) & (hd<=d) )
+			{
+				++score;
+				seq_iter = seq_end-1;
+			}
+			else if( is_exact & (hd==d) )
+			{
+				++score;
+				seq_iter = seq_end-1;
+			}
+			++seq_iter;
+		}
+		++ds_iter;
+	}
+	while(ds_iter!=ds_end);
+
+	if(score<lower_limit)
+	{
+		score = 0;
+	}
+
+	return score;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//Subfunctions
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.choosePositions:
+..summary:Chooses randomly k different positions from {0,1,...,(l-1)}
+..cat:Motif Search
+..signature:choosePositions(positions,l,k)
+..param.positions:The set of k chosen positions.
+...type:$set<int>$
+..param.l:The size of the motif.
+..param.k:The projection size.
+..include:seqan/find_motif.h
+*/
+
+template<typename TAssociativeContainer, typename TType>
+void
+choosePositions(TAssociativeContainer & positions, TType const & l, TType const & k)
+{
+    SEQAN_CHECKPOINT;
+	while(positions.size()<k)
+	{
+		int position = rand() % l;
+		positions.insert(position);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.projectLMer:
+..summary:Based on set "positions" the function uses the letters of a given l-mer at
+          chosen k positions to compute an appropriate hash value of the new k-mer.
+..cat:Motif Search
+..signature:projectLMer(positions,l,k)
+..param.positions:The set of k chosen positions.
+...remarks:$positions$ is of type $set<int>$
+..param.k:An iterator pointing to the first positions of a given sequence.
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TIter>
+inline std::set<int>::value_type
+projectLMer(std::set<int> & positions, TIter it)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef std::set<int>::value_type THValue;
+	THValue prev_pos; //, cur_pos;
+
+	std::set<int>::iterator positions_iter, positions_end;
+	positions_iter = positions.begin();
+	positions_end = positions.end();
+	prev_pos = *positions_iter;
+	it += prev_pos;
+	THValue hValue = ordValue(*it);
+	++positions_iter;
+	while(positions_iter!=positions_end)
+	{
+		THValue cur_pos = *positions_iter;
+		goFurther(it, (cur_pos-prev_pos));
+		hValue = hValue * ValueSize<TValue>::VALUE + ordValue(*it);
+		prev_pos = cur_pos;
+		++positions_iter;
+	}
+
+	return hValue;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._getLMersWithTheLargestLikelihoodRatio:
+..summary:Forms a guess for the planted motif by selecting from each input sequence
+		  the l-mer x with the largest likelihood ratio.
+..signature:_getLMersWithTheLargestLikelihoodRatio(l_mers,positions,dataset_start,dataset_end,profile,l)
+..param.l_mers:The collection of t l-mers.
+..param.dataset_start:An iterator pointing to the first input sequence of a given dataset.
+..param.dataset_end:An iterator pointing to the last input sequence of a given dataset.
+..param.t:The number of input sequences.
+..param.profile:The profile object which is a set of frequency distributions.
+...type:Class.String
+....signature:String<TFrequencyDistribution>
+..param.l:The size of the motif.
+..include:seqan/find_motif.h
+*/
+
+template<typename TStrings, typename TIter, typename TType, typename TProfile>
+void
+_getLMersWithTheLargestLikelihoodRatio(TStrings & l_mers,
+									   TIter dataset_start,
+									   TIter dataset_end,
+									   TProfile const & profile,
+								       TType const & l)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Position<TStrings>::Type TPos1;
+	typedef typename Position<TString>::Type TPos2;
+	typename Size<TStrings>::Type t = (dataset_end-dataset_start);
+	resize(l_mers, t);
+	while(dataset_start!=dataset_end)
+	{
+		typename Position<TStrings>::Type seq_nr = t-(dataset_end-dataset_start);
+		TPos2 m = (TPos2)(length(*dataset_start)-l+1);
+		double * likelihood_ratio_mat = new double[m];
+		typename Iterator<TString>::Type seq_iter, seq_end;
+		seq_iter = begin(*dataset_start);
+		seq_end = seq_iter+m;
+		while(seq_iter!=seq_end)
+		{
+			likelihood_ratio_mat[m-(seq_end-seq_iter)] = 
+				_computeLikelihoodRatioOfLMer(seq_iter, seq_iter+l, profile);
+			++seq_iter;
+		}
+
+		TPos2 max_pos = 
+			(std::max_element(likelihood_ratio_mat, likelihood_ratio_mat+m)-likelihood_ratio_mat);
+		l_mers[seq_nr] = infix(*dataset_start, max_pos, max_pos+l);
+
+		delete[] likelihood_ratio_mat;
+		++dataset_start;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeLikelihoodRatioOfLMer:
+..summary:Computes the likelihood ratio of a given l-mer.
+..signature:_computeLikelihoodRatioOfLMer(l_mer_begin,l_mer_end,profile)
+..param.l_mer_begin:An iterator pointing to the beginning of a given l-mer pattern.
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.l_mer_end:An iterator pointing to the end of a given l-mer pattern.
+...type:Concept.Iterator Iterator
+....remarks:Standard conform iterator
+...type:Shortcut.DnaIterator
+....remarks:Iterator for @Shortcut.DnaString@ (a string of @Spec.Dna@).
+....see:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+....remarks:Iterator for @Shortcut.Peptide@ (a string of @Spec.AminoAcid@).
+....see:Shortcut.PeptideIterator
+..param.profile:The profile object which is a set of frequency distributions.
+...type:Class.String
+....signature:String<TFrequencyDistribution>
+..remarks:Computes the sum of log probabilites instead of the product of probabilites
+..include:seqan/find_motif.h
+*/
+
+template<typename TStrIter, typename TProfile>
+double
+_computeLikelihoodRatioOfLMer(TStrIter l_mer_begin, 
+							  TStrIter l_mer_end,
+							  TProfile const & profile)
+{
+    SEQAN_CHECKPOINT;
+
+	double result = 0;
+	unsigned int l = (unsigned int)(l_mer_end-l_mer_begin);
+	typedef typename Position<TProfile>::Type TPos;
+	TProfile log_profile = profile;
+	for(TPos i=0; i<length(log_profile); ++i)
+	{
+		logarithmize(log_profile[i]);
+	}
+
+	double motif_component = 0;
+	double backgr_component = 0;
+	while(l_mer_begin!=l_mer_end)
+	{
+		motif_component += log_profile[l-(l_mer_end-l_mer_begin)+1][(int)*l_mer_begin];
+		backgr_component += log_profile[0][(int)*l_mer_begin];
+		++l_mer_begin;
+	}
+	result = motif_component-backgr_component;
+
+	return exp(result);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeLikelihoodRatioOfLMers:
+..summary:Computes the likelihood ratio of a given set of l-mers.
+..signature:_computeLikelihoodRatioOfLMers(l_mers,profile)
+..param.l_mers:The collection of l-mers.
+..param.profile:The profile object which is a set of frequency distributions.
+...type:Class.String
+....signature:String<TFrequencyDistribution>
+..include:seqan/find_motif.h
+*/
+
+template<typename TStrings, typename TProfile>
+double
+_computeLikelihoodRatioOfLMers(TStrings const & l_mers, 
+							   TProfile const & profile)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Position<TStrings>::Type TPos;
+	double score = 1;
+	typename Size<TStrings>::Type num_of_l_mers = length(l_mers);
+	for(TPos i=0; i<num_of_l_mers; ++i)
+	{
+		score *= _computeLikelihoodRatioOfLMer(begin(l_mers[i]), end(l_mers[i]), profile);
+	}
+
+	return score;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.determineConsensusSeq:
+..summary:Determines the consensus pattern of a given profile.
+..cat:Motif Search
+..signature:determineConsensusSeq(consensus_seq,profile,l)
+..param.consensus_seq:The consensus pattern.
+...type:Class.String
+...type:Shortcut.DnaString
+...type:Shortcut.Peptide
+..param.profile:A StringSet of @Class.FrequencyDistribution|frequency distributions at .
+...type:Class.StringSet
+..param.l:The size of the motif.
+..include:seqan/find_motif.h
+*/
+
+template<typename TString, typename TProfile>
+void
+determineConsensusSeq(TString & consensus_seq,
+					  TProfile & profile,
+					  typename Size<TString>::Type const & l)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TString>::Type TValue;
+	typename Position<TString>::Type i;
+
+	resize(consensus_seq, l);
+	if(length(profile)==l) //profile only consists of the motif component
+	{
+		for(i=0; i<l; ++i)
+		{
+			consensus_seq[i] = 
+				static_cast<TValue>(posOfMax(profile[i]));
+		}
+	}
+	else
+	{
+		for(i=1; i<=l; ++i)
+		{
+			consensus_seq[i-1] = 
+				static_cast<TValue>(posOfMax(profile[i]));
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function.displayResult:
+..summary:Displays the consensus pattern of the found motif candidate.
+..cat:Motif Search
+..signature:displayResult(motif_finder)
+..param.motif_finder:The @Class.MotifFinder@ object.
+...type:Class.MotifFinder
+..param.dataset:The dataset object representing the input sequences.
+...type:Class.String
+...signature:String<TString>
+...param.TString:A @Class.String@ type
+....type:Class.String
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue>
+void
+displayResult(MotifFinder<TValue, Projection> & projection)
+{
+    SEQAN_CHECKPOINT;
+
+	if(length(projection.set_of_motifs)!=0)
+	{
+		std::cout << projection.set_of_motifs[0] << "\n";
+	}
+	else
+	{
+		std::cout << "NO MOTIF HAS BEEN FOUND!!!\n";
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+// Access Functions
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue>
+inline int
+getScore(MotifFinder<TValue, Projection> & me)
+{
+    SEQAN_CHECKPOINT;
+	return me.score;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/frequency_distribution.h b/src/SeqAn-1.3/seqan/find_motif/frequency_distribution.h
new file mode 100644
index 0000000..93334ad
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/frequency_distribution.h
@@ -0,0 +1,641 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FREQUENCY_DISTRIBUTION_H
+#define SEQAN_HEADER_FREQUENCY_DISTRIBUTION_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.FrequencyDistribution:
+..summary:Holds a collection of objects of a specific type, where each object represents
+          the frequency (absolute or relative probability) of a particular residue which is a member
+		  of a fixed sequence alphabet.
+..cat:Motif Search
+..signature:FrequencyDistribution<TValue[, TSpec]>
+..param.TValue:The type of sequence which is considered.
+...metafunction:Metafunction.Value
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..param.TSpec:The type of probability distribution. 
+...metafunction:Metafunction.Spec
+...default: $double$
+...remarks: It is preferable to use $double$.
+..remarks:The number of objects in @Class.FrequencyDistribution@ equals the size of the sequence alphabet.
+..include:seqan/find_motif.h
+*/
+
+template <typename TValue, typename TSpec = double>
+class FrequencyDistribution
+{
+//____________________________________________________________________________________________
+
+	enum { SIZE = ValueSize<TValue>::VALUE }; 
+
+//____________________________________________________________________________________________
+
+public:
+	String<TSpec> frequency_list;
+
+	// constructor & destructor
+	FrequencyDistribution()
+	{
+        resize(frequency_list, static_cast<unsigned>(SIZE), 0);
+	}
+//	FrequencyDistribution(TValue const & letter_)
+//	{
+//		resize(frequency_list, (unsigned int) SIZE);
+//		convertResidueToFrequencyDist(*this, letter_);
+//	}
+//	FrequencyDistribution(FrequencyDistribution const & other_)
+//	{
+//		frequency_list = other_.frequency_list; 
+//	}
+//	~FrequencyDistribution()
+//	{
+//	}
+
+//	// overloading operators
+//	FrequencyDistribution & 
+//	operator = (FrequencyDistribution const & other_)
+//	{
+//		if(this!=&other_)
+//		{
+//			clear(frequency_list);
+//			frequency_list = other_.frequency_list; 
+//		}
+//		return *this;
+//	}
+
+	FrequencyDistribution &
+	operator += (FrequencyDistribution const & other_)
+	{
+		for(unsigned int i=0; i<SIZE; ++i)
+		{
+			frequency_list[i]+=other_.frequency_list[i];
+		}
+
+		return *this;
+	}
+
+
+
+	FrequencyDistribution &
+	operator -= (FrequencyDistribution const & other_)
+	{
+		for(unsigned int i=0; i<SIZE; ++i)
+		{
+			frequency_list[i]-=other_.frequency_list[i];
+		}
+
+		return *this;
+	}
+
+	template<typename TType>
+	FrequencyDistribution &
+	operator *= (TType value_)
+	{
+		for(unsigned int i=0; i<SIZE; ++i)
+		{
+			frequency_list[i]*= (TSpec)value_;
+		}
+
+		return *this;
+	}
+
+	template<typename TPos>
+	inline TSpec &
+	operator [] (TPos index_)
+	{
+		return frequency_list[index_];
+	}
+
+	template<typename TPosition>
+	inline TSpec const & 
+	operator [] (TPosition const index_) const
+	{
+		return frequency_list[index_];
+	}
+
+
+//____________________________________________________________________________________________
+
+};
+
+template <typename TValue, typename TSpec>
+FrequencyDistribution<TValue, TSpec> 
+operator + (FrequencyDistribution<TValue, TSpec> const & lhs_, FrequencyDistribution<TValue, TSpec> const & rhs_)
+{
+	FrequencyDistribution<TValue, TSpec> ret(lhs_);
+	ret+=rhs_;
+
+	return ret;
+}
+
+
+template <typename TValue, typename TSpec>
+FrequencyDistribution<TValue, TSpec> 
+operator - (FrequencyDistribution<TValue, TSpec> const & lhs_, FrequencyDistribution<TValue, TSpec> const & rhs_)
+{
+	FrequencyDistribution<TValue, TSpec> ret(lhs_);
+	ret-=rhs_;
+
+	return ret;
+}
+
+template <typename TValue, typename TSpec, typename TType>
+FrequencyDistribution<TValue, TSpec> 
+operator * (FrequencyDistribution<TValue, TSpec> const & fd_, TType value_)
+{
+	FrequencyDistribution<TValue, TSpec> ret(fd_);
+	ret*=value_;
+
+	return ret;
+}
+
+template <typename TValue, typename TSpec>
+inline std::ostream & 
+operator << (std::ostream & ostr, FrequencyDistribution<TValue, TSpec> & fd_) 
+{ 
+	for(unsigned int i=0; i<FrequencyDistribution<TValue, TSpec>::SIZE; ++i)
+	{	
+		ostr.width(15);
+		ostr << std::left << fd_.frequency_list[i];
+	}
+	
+	return ostr;  
+} 
+
+
+//////////////////////////////////////////////////////////////////////////////
+//Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.FrequencyDistribution
+
+template <typename TValue, typename TSpec>
+struct Spec< FrequencyDistribution<TValue, TSpec> >
+{
+	typedef TSpec Type;
+};
+
+template <typename TValue, typename TSpec>
+struct Spec< FrequencyDistribution<TValue, TSpec> const>
+{
+	typedef TSpec Type;
+};
+
+//the following is a workaround for an error in GCC 4.1.2
+template <typename TValue>
+struct Spec< FrequencyDistribution<TValue, double> >
+{
+	typedef double Type;
+};
+template <typename TValue>
+struct Spec< FrequencyDistribution<TValue, double> const>
+{
+	typedef double Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Iterator.param.T.type:Class.FrequencyDistribution
+
+template <typename TValue, typename TSpec, typename TIteratorSpec>
+struct Iterator< FrequencyDistribution<TValue, TSpec>, TIteratorSpec >
+{
+	typedef String<TSpec> TString_;
+	typedef typename Iterator<TString_, TIteratorSpec>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Position.param.T.type:Class.FrequencyDistribution
+
+template<typename TValue, typename TSpec>
+struct Position< FrequencyDistribution<TValue, TSpec> >
+{
+	typedef String<TSpec> TString_;
+	typedef typename Position<TString_>::Type Type;
+};
+template<typename TValue, typename TSpec>
+struct Position< FrequencyDistribution<TValue, TSpec> const>
+{
+	typedef String<TSpec> TString_;
+	typedef typename Position<TString_ const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Size.param.T.type:Class.FrequencyDistribution
+
+template<typename TValue, typename TSpec>
+struct Size< FrequencyDistribution<TValue, TSpec> >
+{
+	typedef String<TSpec> TString_;
+	typedef typename Size<TString_>::Type Type;
+};
+template<typename TValue, typename TSpec>
+struct Size<FrequencyDistribution<TValue, TSpec> const>
+{
+	typedef String<TSpec> TString_;
+	typedef typename Size<TString_ const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.FrequencyDistribution
+/*
+.Metafunction.Value:
+..summary:Returns the sequence type of a @Class.FrequencyDistribution@ type
+	     (TValue for FrequencyDistribution<TValue, TSpec>).
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec>
+struct Value< FrequencyDistribution<TValue, TSpec> >
+{
+	typedef TValue Type;
+};
+template<typename TValue, typename TSpec>
+struct Value< FrequencyDistribution<TValue, TSpec> const>
+{
+	typedef TValue const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.absFreqOfLettersInSeq:
+..summary:Counts the number of times each residue of a fixed sequence alphabet occurs in a given sequence.
+..cat:Motif Search
+..signature:absFreqOfLettersInSeq(frequencies,begin,end)
+..param.frequencies:The @Class.FrequencyDistribution@ object which will hold the calculated frequencies.
+...type:Class.FrequencyDistribution
+..param.begin:An iterator pointing to the beginning of a given sequence which is either
+              a string of @Spec.Dna@ or a string of @Spec.AminoAcid at . 
+...type:Concept.Iterator
+...type:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+..param.end:An iterator pointing to the end of a given sequence which is either
+            a string of @Spec.Dna@ or a string of @Spec.AminoAcid at .  
+...type:Concept.Iterator
+...type:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec, typename TSeqIter> 
+void 
+absFreqOfLettersInSeq(FrequencyDistribution<TValue, TSpec> & fd,
+					  TSeqIter seq_start,
+					  TSeqIter seq_end) 
+{	
+	while(seq_start!=seq_end)
+	{
+		++fd[(int)*seq_start];
+		++seq_start;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.absFreqOfLettersInSetOfSeqs:
+..summary:Counts the number of times each residue of a fixed sequence alphabet occurs in a given set of sequences.
+..cat:Motif Search
+..signature:absFreqOfLettersInSetOfSeqs(frequencies,begin,end)
+..param.frequencies:The @Class.FrequencyDistribution@ object which holds the calculated frequencies.
+...type:Class.FrequencyDistribution
+..param.begin:An iterator pointing to the first sequence of a given set of sequences which is considered. 
+...type:Concept.Iterator
+..param.end:An iterator pointing to the last sequence of a given set of sequences which is considered. 
+...type:Concept.Iterator
+..remarks.text:This function is similar to @Function.absFreqOfLettersInSeq@ except that the function is performed
+               on a set of sequences.
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec, typename TIter>
+void
+absFreqOfLettersInSetOfSeqs(FrequencyDistribution<TValue, TSpec> & fd,
+							TIter seq_start,
+							TIter seq_end)
+{
+	while(seq_start!=seq_end)
+	{
+		absFreqOfLettersInSeq(fd, begin(*seq_start), end(*seq_start));
+		++seq_start;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.addValue:
+..summary:Adds a value of a specific type to each element of a given @Class.FrequencyDistribution@ object.
+..cat:Motif Search
+..signature:addValue(frequencies,value)
+..param.frequencies:The @Class.FrequencyDistribution@ object which holds the calculated frequencies.
+...type:Class.FrequencyDistribution
+..param.value:The value object which is added to each element of a @Class.FrequencyDistribution@ object.
+...remarks:The $value$ object should be identical in type to the elements of the @Class.FrequencyDistribution@ object.
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec, typename TType>
+void 
+addValue(FrequencyDistribution<TValue, TSpec> & fd, TType const & val)
+{
+	typedef typename Position< FrequencyDistribution<TValue, TSpec> >::Type TPos;
+	for(TPos i=0; i<length(fd); ++i)
+	{
+		fd[i]+= (TSpec)val;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.backgroundFrequency:
+..summary:Determines the background letter frequencies in a given dataset
+..cat:Motif Search
+..signature:backgroundFrequency(frequencies,begin,end)
+..param.frequencies:The @Class.FrequencyDistribution@ object which holds the calculated frequencies.
+...type:Class.FrequencyDistribution
+..param.begin:An iterator pointing to the first sequence of a given dataset (set of sequences) which is considered. 
+...type:Concept.Iterator
+..param.end:An iterator pointing to the last sequence of a given dataset (set of sequences) which is considered. 
+...type:Concept.Iterator
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec,typename TDatasetIter> 
+void 
+backgroundFrequency(FrequencyDistribution<TValue, TSpec> & fd,
+					TDatasetIter dataset_start,
+					TDatasetIter dataset_end)
+{
+	absFreqOfLettersInSetOfSeqs(fd, dataset_start, dataset_end);
+
+	// check for zero entries
+	if(std::find(begin(fd), end(fd), (TSpec)0)!= end(fd))
+	{
+		// add pseudocounts
+		double epsilon = 0.1;
+		seqan::Pseudocount<TValue, CMode> p(epsilon);
+		addValue(fd, p.pseudocount);
+	}
+	normalize(fd);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.begin.param.object.type:Class.FrequencyDistribution
+
+template <typename TValue, typename TSpec>
+inline typename Iterator< FrequencyDistribution<TValue, TSpec> >::Type
+begin(FrequencyDistribution<TValue, TSpec> & me)
+{
+	return begin(me.frequency_list);
+}
+template <typename TValue, typename TSpec>
+inline typename Iterator< FrequencyDistribution<TValue, TSpec> >::Type
+begin(FrequencyDistribution<TValue, TSpec> const & me)
+{
+	return begin(me.frequency_list);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.clear.param.object.type:Class.FrequencyDistribution
+
+template<typename TValue, typename TSpec>
+void 
+clear(FrequencyDistribution<TValue, TSpec> & fd) 
+{
+	fd = FrequencyDistribution<TValue, TSpec>();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.convertResidueToFrequencyDist:
+..summary:Coverts a residue to a frequency distribution (profile).
+..cat:Motif Search
+..signature:convertResidueToFrequencyDist(frequencies,residue)
+..param.frequencies:The @Class.FrequencyDistribution@ object representing the profile for a specific residue.
+...type:Class.FrequencyDistribution
+..param.residue:The residue object which is considered.
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..remarks:This function is used to convert a sequence pattern into a profile.
+..see:Function.convertPatternToProfile
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec>
+void 
+convertResidueToFrequencyDist(FrequencyDistribution<TValue, TSpec> & fd, TValue const & residue)
+{
+	typedef typename Position< FrequencyDistribution<TValue, TSpec> >::Type TPos;
+	TSpec probability = 
+		(TSpec)(0.5/(ValueSize<TValue>::VALUE-1));
+
+	for(TPos i=0; i<length(fd); ++i)
+	{
+		if(i==residue)
+		{
+			fd[i] = 0.5;
+		}
+		else
+		{
+			fd[i] = probability;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.end.param.object.type:Class.FrequencyDistribution
+
+template<typename TValue, typename TSpec>
+inline typename Iterator< FrequencyDistribution<TValue, TSpec> >::Type
+end(FrequencyDistribution<TValue, TSpec> & me)
+{
+	return begin(me)+length(me);
+}
+template<typename TValue, typename TSpec>
+inline typename Iterator< FrequencyDistribution<TValue, TSpec> const >::Type
+end(FrequencyDistribution<TValue, TSpec> const & me)
+{
+	return begin(me)+length(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.length.param.object.type:Class.FrequencyDistribution
+
+template<typename TValue, typename TSpec>
+inline typename Size< FrequencyDistribution<TValue, TSpec> >::Type
+length(FrequencyDistribution<TValue, TSpec> & me)
+{
+	return length(me.frequency_list);
+}
+
+template<typename TValue, typename TSpec>
+inline typename Size< FrequencyDistribution<TValue, TSpec> >::Type
+length(FrequencyDistribution<TValue, TSpec> const & me)
+{
+	return length(me.frequency_list);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.logarithmize:
+..summary:Logarithmizes each element of a given @Class.FrequencyDistribution@ object.
+..cat:Motif Search
+..signature:logarithmize(frequencies)
+..param.frequencies:The @Class.FrequencyDistribution@ object.
+...type:Class.FrequencyDistribution
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec>
+void 
+logarithmize(FrequencyDistribution<TValue, TSpec> & fd) 
+{
+	typedef FrequencyDistribution<TValue, TSpec> TFrequencyDistribution;
+	typedef typename Position<TFrequencyDistribution>::Type TPos;
+	
+	for(TPos i=0; i<length(fd); ++i)
+	{
+		fd[i] = (TSpec)log(fd[i]);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/* s. normalize() (profile.h)
+.Function.normalize:
+..summary:Determines the normalized frequencies.
+..cat:Motif Search
+..signature:normalize(frequencies)
+..param.frequencies:The @Class.FrequencyDistribution@ object.
+...type:Class.FrequencyDistribution
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec>
+void 
+normalize(FrequencyDistribution<TValue, TSpec> & fd)
+{
+	typedef FrequencyDistribution<TValue, TSpec> TFrequencyDistribution;
+	typedef typename Position<TFrequencyDistribution>::Type TPos;
+	
+	TSpec amount = sum(fd);
+	for(TPos i=0; i<length(fd); ++i)
+	{
+		fd[i] = (TSpec)(fd[i]/amount);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.posOfMax:
+..summary:Determines the residue position in a given @Class.FrequencyDistribution@ object with the maximum frequency.
+..cat:Motif Search
+..signature:posOfMax(frequencies)
+..param.frequencies:The @Class.FrequencyDistribution@ object.
+...type:Class.FrequencyDistribution
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec>
+typename Position< FrequencyDistribution<TValue, TSpec> >::Type
+posOfMax(FrequencyDistribution<TValue, TSpec> & me)
+{
+	typedef FrequencyDistribution<TValue, TSpec> TFrequencyDistribution; 
+	typedef typename Position<TFrequencyDistribution>::Type TPos;
+
+	TPos position = 0;
+	TSpec max_value = (TSpec)0;
+	for(TPos i=0; i<length(me); ++i)
+	{
+		if(me[i]>max_value)
+		{
+			position = i;
+			max_value = me[i];
+		}
+	}
+
+	return position;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.sum:
+..summary:Determines the sum of all frequencies in a given @Class.FrequencyDistribution@ object.
+..cat:Motif Search
+..signature:sum(frequencies)
+..param.frequencies:The @Class.FrequencyDistribution@ object.
+...type:Class.FrequencyDistribution
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec>
+TSpec 
+sum(FrequencyDistribution<TValue, TSpec> & me)
+{
+	TSpec amount = 
+		std::accumulate(begin(me), end(me), (TSpec)0);
+
+	return amount;
+}
+								
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/profile.h b/src/SeqAn-1.3/seqan/find_motif/profile.h
new file mode 100644
index 0000000..961858e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/profile.h
@@ -0,0 +1,242 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PROFILE_H
+#define SEQAN_HEADER_PROFILE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.convertPatternToProfile:
+..summary:Converts a pattern into a profile which consists of a set of frequency distributions.
+..cat:Motif Search
+..signature:convertPatternToProfile(profile,begin,end)
+..param.profile:A StringSet of @Class.FrequencyDistribution|frequency distributions at .
+...type:Class.StringSet
+..param.begin:An iterator pointing to the beginning of a given sequence pattern which is either
+              a @Shortcut.DnaString@ or a @Shortcut.Peptide at .
+...type:Concept.Iterator
+...type:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+..param.end:An iterator pointing to the end of a given sequence pattern which is either
+            a @Shortcut.DnaString@ or a @Shortcut.Peptide at .
+...type:Concept.Iterator
+...type:Shortcut.DnaIterator
+...type:Shortcut.PeptideIterator
+..remarks:The number of @Class.FrequencyDistribution@ objects which together form the profile
+          equals the length of the given sequence.
+..remarks:e.g.:$profile[0]$ represents the frequency distribution for the first residue of
+          the given sequence.
+..see:Function.convertResidueToFrequencyDist
+..include:seqan/find_motif.h
+*/
+
+template<typename TProfile, typename TIterStr>
+void 
+convertPatternToProfile(TProfile & profile,
+						TIterStr str_begin,
+						TIterStr str_end)
+{
+	typedef typename Position<TProfile>::Type TPos;
+	unsigned int str_size = str_end-str_begin;
+	resize(profile, str_size);
+	TPos pos = 0;
+	while(str_begin!=str_end)
+	{
+		convertResidueToFrequencyDist(profile[pos], *str_begin);
+		++str_begin;
+		++pos;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.convertSetOfPatternsToProfile:
+..summary:Converts a set of sequence patterns into a profile.
+..cat:Motif Search
+..signature:convertSetOfPatternsToProfile(profile,l_mers,pseudocount_mode)
+..param.profile:A StringSet of @Class.FrequencyDistribution|frequency distributions at .
+...type:Class.StringSet
+..param.l_mers:The set of sequence patterns.
+...type:Class.StringSet
+..param.pseudocount_mode:The @Class.Pseudocount@ object for determining the pseudocount method.
+...type:Class.Pseudocount
+..remarks:This function is used, for example, in the refinement step of the PROJECTION algorithm to convert
+          the collection of l-mers inside the corresponding buckets into a profile. 
+..include:seqan/find_motif.h
+*/
+
+template<typename TProfile, typename TStrings, typename TPseudocountMode>
+void
+convertSetOfPatternsToProfile(TProfile & profile,
+					 TStrings & l_mers, 
+					 TPseudocountMode & pseudocount)
+{
+	typedef typename Value<TStrings>::Type TString;
+	typedef typename Value<TProfile>::Type TFrequencyDistribution;
+
+	typename Size<TString>::Type l = length(l_mers[0]);
+	resize(profile, l);
+
+	typename Iterator<TStrings>::Type l_mers_iter, l_mers_end;
+	typename Iterator<TString>::Type l_mer_iter, l_mer_end;
+	l_mers_iter = begin(l_mers);
+	l_mers_end = end(l_mers);
+	while(l_mers_iter!=l_mers_end)
+	{
+		l_mer_iter = begin(*l_mers_iter);
+		l_mer_end = end(*l_mers_iter);
+		while(l_mer_iter!=l_mer_end)
+		{
+			++profile[(int)(l_mer_iter-begin(*l_mers_iter))][(int)*l_mer_iter];
+			++l_mer_iter;
+		}
+		++l_mers_iter;
+	}
+	normalize(profile, pseudocount);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.normalize:
+..summary:Determines the normalized frequencies.
+..cat:Motif Search
+..signature:normalize(container)
+..signature:normalize(profile,pseudocount_mode)
+..param.container:The @Class.FrequencyDistribution@ or @Class.StringSet@ (of @Class.FrequencyDistribution|frequency distributions@) object.
+...type:Class.FrequencyDistribution
+...type:Class.StringSet
+..param.profile:A StringSet of @Class.FrequencyDistribution|frequency distributions at .
+...type:Class.StringSet
+..param.pseudocount_mode:The @Class.Pseudocount@ object for determining the pseudocount method.
+...type:Class.Pseudocount
+..remarks:If necessary, pseudocounts are first added to the frequency values before normalizing them 
+          when the parameter $container$ is a StringSet of @Class.FrequencyDistribution|frequency distributions@ (profile).
+..include:seqan/find_motif.h
+*/
+
+template<typename TProfile>
+void 
+normalize(TProfile & profile)
+{
+	typename Iterator<TProfile>::Type iter = begin(profile);
+	typename Iterator<TProfile>::Type iter_end = end(profile);
+	while(iter!=iter_end)
+	{
+		normalize(*iter);
+		++iter;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.completeProfile:
+..summary:Concatenates the background frequency with the profile for the motif component.
+..cat:Motif Search
+..signature:completeProfile(profile,background_distribution)
+..param.profile:A StringSet of @Class.FrequencyDistribution|frequency distributions at .
+...type:Class.StringSet
+..param.background_distribution:The @Class.FrequencyDistribution@ object which represents the backround distribution.
+...type:Class.FrequencyDistribution
+..remarks:The first row of the final profile (probability matrix) represents the @Class.FrequencyDistribution|background distribution at .
+..include:seqan/find_motif.h
+*/
+
+template<typename TProfile>
+void 
+completeProfile(TProfile & profile,
+				typename Value<TProfile>::Type & background_distribution)
+{
+	TProfile copy(profile);
+	resize(profile, length(copy)+1);
+	profile[0] = background_distribution;
+
+	typename Iterator<TProfile>::Type iter = begin(copy);
+	int counter = 1;
+	for(; !atEnd(iter, copy); goNext(iter))
+	{
+		profile[counter] = *iter;
+		++counter;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.display:
+..summary:Displays a given set of strings.
+..cat:Motif Search
+..signature:display(strings)
+..param.strings:A StringSet.
+...type:Class.StringSet
+..remarks:This function can also be used to display a profile (probability matrix) 
+          which is a set of @Class.FrequencyDistribution|frequency distributions at .
+..include:seqan/find_motif.h
+*/
+
+
+template<typename TStrings>
+void 
+display(TStrings & strings)
+{
+	if(length(strings)!=0)
+	{
+		typename Iterator<TStrings>::Type iter = begin(strings);
+		int counter = 0;
+		for(; !atEnd(iter, strings); goNext(iter))
+		{
+			std::cout << "[" << counter << "]: " << *iter << "\n";
+			++counter;
+		}
+		std::cout << "\n";
+	}
+	else
+	{
+		std::cout << "EMPTY STRINGS !!!\n";
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+} // namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/pseudocount_base.h b/src/SeqAn-1.3/seqan/find_motif/pseudocount_base.h
new file mode 100644
index 0000000..8417a48
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/pseudocount_base.h
@@ -0,0 +1,80 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PSEUDOCOUNT_BASE_H
+#define SEQAN_HEADER_PSEUDOCOUNT_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.Pseudocount:
+..summary:Holds the pseudocounts for each residue of a given sequence alphabet.
+..cat:Motif Search
+..signature:Pseudocount<TValue, TSpec>
+..param.TValue:The type of sequence which is considered.
+...metafunction:Metafunction.Value
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..param.TSpec:Specialization tag for determining the pseudocount method.
+...type:Spec.CMode 
+...type:Spec.PMode
+..include:seqan/find_motif.h
+*/
+
+template<typename TValue, typename TSpec>
+class Pseudocount;
+
+//////////////////////////////////////////////////////////////////////////////
+//Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.Pseudocount
+
+template<typename TValue, typename TSpec>
+struct Value< Pseudocount<TValue, TSpec> >
+{
+	typedef TValue Type;
+};
+template<typename TValue, typename TSpec>
+struct Value< Pseudocount<TValue, TSpec> const>
+{
+	typedef TValue const Type;
+};
+
+/////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/pseudocount_mode_c.h b/src/SeqAn-1.3/seqan/find_motif/pseudocount_mode_c.h
new file mode 100644
index 0000000..dc05ed1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/pseudocount_mode_c.h
@@ -0,0 +1,165 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PSEUDOCOUNT_MODE_C_H
+#define SEQAN_HEADER_PSEUDOCOUNT_MODE_C_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// CMode
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.CMode:
+..summary: Represents the C ("constant") computation scheme for handling "zero" probabilities.
+..general:Class.Pseudocount
+..cat:Motif Search
+..signature:Pseudocount<TValue, CMode>
+..param.TValue:The type of sequence which is considered.
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..remarks:The pseudocount is identical for each residue (pseudocount = epsilon/alphabet_size).
+..include:seqan/find_motif.h
+*/
+
+///.Class.Pseudocount.param.TSpec.type:Spec.CMode
+
+struct CMode_;
+typedef Tag<CMode_> CMode;
+
+
+template<typename TValue>
+class Pseudocount<TValue, CMode>
+{
+
+//_____________________________________________________________________________________________
+
+public:
+	double pseudocount;
+	double epsilon;
+
+//_____________________________________________________________________________________________
+
+	Pseudocount():
+		pseudocount(0),
+		epsilon(0)
+	{
+	}
+	Pseudocount(double epsilon_):
+		pseudocount(0),
+		epsilon(epsilon_)
+	{
+		_computePseudocount();
+	}
+	Pseudocount(Pseudocount const & other_):
+		pseudocount(other_.pseudocount),
+		epsilon(other_.epsilon)
+	{
+	}
+	~Pseudocount()
+	{
+	}
+
+	Pseudocount const &
+	operator = (Pseudocount const & other_)
+	{
+		pseudocount = other_.pseudocount;
+		epsilon = other_.epsilon;
+
+		return *this;
+	}
+
+//_____________________________________________________________________________________________
+
+private:
+	inline void
+	_computePseudocount() 
+	{
+		// alphabet_size = ValueSize<TValue>::VALUE
+		pseudocount = 
+			(double)(epsilon/ValueSize<TValue>::VALUE);
+	}
+
+//_____________________________________________________________________________________________
+	
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+// Function.normalize (s. profile.h)
+
+template<typename TProfile, typename TValue>
+void 
+normalize(TProfile & profile, 
+		  Pseudocount<TValue, CMode> const & mode)
+{
+	typedef typename Value<TProfile>::Type TFreqDist;
+	typedef typename Spec<TFreqDist>::Type TFrequencyType;
+
+	typename Size<TProfile>::Type profile_size = length(profile);
+	for(typename Position<TProfile>::Type i=0; 
+		i<profile_size; 
+		++i)
+	{
+		typename Iterator<TFreqDist>::Type fd_begin = begin(profile[i]);
+		typename Iterator<TFreqDist>::Type fd_end = end(profile[i]);
+		if(std::find(fd_begin, fd_end, 0)!= fd_end)
+		{
+			// N:=row sum
+			TFrequencyType N = sum(profile[i]);
+
+			// add pseudocounts
+			for(typename Position<TFreqDist>::Type j=0; 
+				j<length(profile[i]); 
+				++j)
+			{
+				profile[i][j] = 
+					((TFrequencyType)(profile[i][j]+mode.pseudocount))/
+					((TFrequencyType)(N+mode.epsilon));
+			}
+		}
+		else
+		{
+			normalize(profile[i]);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/pseudocount_mode_p.h b/src/SeqAn-1.3/seqan/find_motif/pseudocount_mode_p.h
new file mode 100644
index 0000000..6bb7d2b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/pseudocount_mode_p.h
@@ -0,0 +1,165 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PSEUDOCOUNT_MODE_P_H
+#define SEQAN_HEADER_PSEUDOCOUNT_MODE_P_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// PMode
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.PMode:
+..summary: Represents the P computation scheme for handling "zero" probabilities.
+..general:Class.Pseudocount
+..cat:Motif Search
+..signature:Pseudocount<TValue, PMode>
+..param.TValue:The type of sequence which is considered.
+...type:Spec.Dna
+...type:Spec.AminoAcid
+..remarks:The P mode computation scheme distributes the pseudocounts among the various residue
+          according to their background probabilities.
+..include:seqan/find_motif.h
+*/
+
+///.Class.Pseudocount.param.TSpec.type:Spec.PMode
+
+struct PMode_;
+typedef Tag<PMode_> PMode;
+
+
+template<typename TValue>
+class Pseudocount<TValue, PMode>
+{
+	enum { SIZE = ValueSize<TValue>::VALUE };
+
+//_________________________________________________________________________________________________
+
+public:
+	double pseudocounts[SIZE];
+	double epsilon;
+
+//_________________________________________________________________________________________________
+
+	template<typename TFrequencyDistribution>
+	Pseudocount(double epsilon_, TFrequencyDistribution & background_):
+		epsilon(epsilon_)
+	{
+		_computePseudocount(background_); 
+	}
+	Pseudocount(Pseudocount const & other_):
+		pseudocounts(other_.pseudocounts),
+		epsilon(other_.epsilon)
+	{
+	}
+	~Pseudocount()
+	{
+	}
+
+	Pseudocount const &
+	operator = (Pseudocount const & other_)
+	{
+		this->pseudocount = other_.pseudocounts;
+		this->epsilon = other_.epsilon;
+
+		return *this;
+	}
+
+//_________________________________________________________________________________________________
+
+private:
+
+	template<typename TFrequencyDistribution>
+	void
+	_computePseudocount(TFrequencyDistribution & background_frequency) 
+	{
+		typedef typename Position< TFrequencyDistribution >::Type TPos;
+		
+		// calculating pseudocounts for each residue i.
+		// pseudocount = epsilon*fi
+		for(TPos i=0; i<length(background_frequency); ++i)
+		{
+			pseudocounts[i] = (double)(epsilon*background_frequency[i]);
+		}
+	}
+//_________________________________________________________________________________________________
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+// Function.normalize (s. profile.h)
+
+template<typename TProfile, typename TValue>
+void 
+normalize(TProfile & profile, Pseudocount<TValue, PMode> & mode)
+{
+	typedef typename Value<TProfile>::Type TFreqDist;
+	typedef typename Spec<TFreqDist>::Type TFrequencyType;
+
+	typename Size<TProfile>::Type profile_size = length(profile);
+	for(typename Position<TProfile>::Type i=0; 
+		i<profile_size; 
+		++i)
+	{
+		if(std::find(begin(profile[i]), end(profile[i]), 0)!=end(profile[i]))
+		{
+			// N:=row sum
+			TFrequencyType N = sum(profile[i]);
+
+			// add pseudocounts
+			for(typename Position<TFreqDist>::Type j=0; 
+				j<length(profile[i]); 
+				++j)
+			{
+				profile[i][j] = 
+					((TFrequencyType)(profile[i][j]+mode.pseudocounts[j]))/
+					((TFrequencyType)(N+mode.epsilon));
+			}
+		}
+		else
+		{
+			normalize(profile[i]);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/find_motif/sequence_model_types.h b/src/SeqAn-1.3/seqan/find_motif/sequence_model_types.h
new file mode 100644
index 0000000..fa05c3c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/find_motif/sequence_model_types.h
@@ -0,0 +1,136 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_MODEL_TYPES_H
+#define SEQAN_HEADER_SEQUENCE_MODEL_TYPES_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Tags
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Tag.Oops:
+..summary:Represents the One Occurrence Per Sequence model.
+..cat:Motif Search
+..remarks:The @Tag.Oops@ model, which was introduced by Lawrence and Reilly permits 
+          exactly one motif occurrence in each sequence.
+..include:seqan/find_motif.h
+*/
+
+struct Oops
+{
+	enum{VALUE=0};
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Omops:
+..summary:Represents the One or More Occurences Per Sequence model.
+..cat:Motif Search
+..remarks:The @Tag.Omops@ model is comparable with the @Tag.Tcm@ model with the one difference
+          that zero occurrence in a sample sequence is not permitted.
+..include:seqan/find_motif.h
+*/
+
+struct Omops
+{
+	enum{VALUE=1};
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Zoops:
+..summary:Represents the Zero or One Occurence Per Sequence model.
+..cat:Motif Search
+..remarks:The @Tag.Zoops@ model formulated by Bailey and Elkan permits at most one
+          motif occurrence in each sequence.
+..include:seqan/find_motif.h
+*/
+
+struct Zoops
+{
+	enum{VALUE=2};
+	double threshold;
+
+	Zoops():
+		threshold((double)0.5)
+	{
+	}
+	Zoops(double val):
+		threshold(val)
+	{
+	}
+	~Zoops()
+	{
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Tcm:
+..summary:Represents the Two-Component-Mixture Sequence model.
+..cat:Motif Search
+..remarks:The @Tag.Tcm@ model formulated by Bailey and Elkan permits any number pf
+          non-overlapping motif occurrences per sequence.
+..include:seqan/find_motif.h
+*/
+
+struct Tcm
+{
+	enum{VALUE=3};
+	double threshold;
+
+	Tcm():
+		threshold((double)0.5)
+	{
+	}
+	Tcm(double val):
+		threshold(val)
+	{
+	}
+	~Tcm()
+	{
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+} // namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_algorithms.h b/src/SeqAn-1.3/seqan/graph_algorithms.h
new file mode 100644
index 0000000..9c95c6e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_algorithms.h
@@ -0,0 +1,55 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALGORITHMS_H
+#define SEQAN_HEADER_GRAPH_ALGORITHMS_H
+
+// External / STL
+#include <set>
+#include <queue>
+
+// Seqan
+#include <seqan/graph_types.h>
+#include <seqan/random.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/graph_algorithms/graph_algorithms_generated_forwards.h>
+#endif
+
+// Graph algorithms
+#include <seqan/graph_algorithms/graph_algorithm_heap_tree.h>
+#include <seqan/graph_algorithms/graph_algorithm.h>
+#include <seqan/graph_algorithms/graph_algorithm_hmm.h>
+#include <seqan/graph_algorithms/graph_algorithm_lis_his.h>
+
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm.h b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm.h
new file mode 100644
index 0000000..aae8eaf
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm.h
@@ -0,0 +1,1991 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALGORITHM_H
+#define SEQAN_HEADER_GRAPH_ALGORITHM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Algorithms
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Elementary graph algorithms
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Breadth-first search
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.breadthFirstSearch:
+..cat:Graph
+..summary:Implements a breadth-first search on a graph.
+..remarks:Breadth-first search computes the distance from source to all reachable
+vertices. It also produces a breath-first tree where each node has a predecessor / parent.
+..signature:breadthFirstSearch(g, source, predecessor, distance)
+..param.g:In-parameter:A graph.
+...type:Spec.Undirected Graph
+...type:Spec.Directed Graph
+..param.source:In-parameter:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+...remarks:The breadth-first search is started from this vertex.
+..param.predecessor:Out-parameter:A property map.
+...remarks:The predecessor map stores implicitly the breadth-first tree.
+..param.distance:Out-parameter:A property map.
+...remarks:The distance map indicates at what depth a vertex was discovered.
+..returns:void.
+..see:Function.depthFirstSearch
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TVertexDescriptor, typename TPredecessorMap, typename TDistanceMap>
+void
+breadthFirstSearch(Graph<TSpec> const& g,
+					 TVertexDescriptor const source,
+					 TPredecessorMap& predecessor, 
+					 TDistanceMap& distance)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Value<TPredecessorMap>::Type TPredVal;
+	typedef typename Value<TDistanceMap>::Type TDistVal;
+
+	// Initialization
+	resizeVertexMap(g,predecessor);
+	resizeVertexMap(g,distance);
+	TPredVal nilPred = getNil<typename VertexDescriptor<TGraph>::Type>();
+	TDistVal infDist = _getInfinityDistance(distance);
+	
+	String<bool> tokenMap;
+	resizeVertexMap(g, tokenMap);
+	TVertexIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		assignProperty(tokenMap, getValue(it), false);
+		assignProperty(distance, getValue(it), infDist);
+		assignProperty(predecessor, getValue(it), nilPred);
+	}
+	assignProperty(tokenMap, source, true);
+	assignProperty(distance, source, 0);
+	assignProperty(predecessor, source, nilPred);
+	std::deque<TVertexDescriptor> queue;
+	queue.push_back(source);
+	
+	// Bfs
+	while (!queue.empty()) {
+		TVertexDescriptor u = queue.front();
+		queue.pop_front();
+		typedef typename Iterator<Graph<TSpec>, OutEdgeIterator>::Type TOutEdgeIterator;
+		TOutEdgeIterator itout(g,u);
+		for(;!atEnd(itout);goNext(itout)) {
+			TVertexDescriptor v = targetVertex(itout);
+			if (getProperty(tokenMap, v) == false) {
+				assignProperty(tokenMap, v, true);
+				assignProperty(distance, v, getProperty(distance,u) + 1);
+				assignProperty(predecessor, v, u);
+				queue.push_back(v);
+			}
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Depth-first search
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TVertexDescriptor, typename TTokenMap, typename TPredecessorMap, typename TDiscoveryTimeMap, typename TFinishingTimeMap, typename TVal>
+void
+_dfsVisit(Graph<TSpec> const& g,
+		   TVertexDescriptor const u,
+		   TTokenMap& tokenMap,
+		   TPredecessorMap& predecessor,
+		   TDiscoveryTimeMap& disc,
+		   TFinishingTimeMap& finish,
+		   TVal& time)
+{
+	SEQAN_CHECKPOINT
+
+	typedef typename Iterator<Graph<TSpec>, AdjacencyIterator>::Type TAdjacencyIterator;
+
+	assignProperty(tokenMap, u, true);
+	++time;
+	assignProperty(disc, u, time);
+	TAdjacencyIterator itad(g,u);
+	for(;!atEnd(itad);goNext(itad)) {
+		TVertexDescriptor v = getValue(itad);
+		if (getProperty(tokenMap, v) == false) {
+			assignProperty(predecessor, v, u);
+			_dfsVisit(g, v, tokenMap, predecessor, disc, finish, time);
+		}
+	}
+	++time;
+	assignProperty(finish, u, time);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.depthFirstSearch:
+..cat:Graph
+..summary:Implements a depth-first search on a graph.
+..remarks:In contrast to a breadth-first search the depth-first search is repeated from multiple sources if the graph is not connected.
+Hence, depth-first search produces a depth-first forest. To ensure each vertex ends up in exactly one tree we need not just a distance but a
+discovery and finishing time.
+..signature:depthFirstSearch(g, predecessor, discovery, finish)
+..param.g:In-parameter:A graph.
+...type:Spec.Undirected Graph
+...type:Spec.Directed Graph
+..param.predecessor:Out-parameter:A property map.
+...remarks:Predecessor subgraph produced by the depth-first search.
+..param.discovery:Out-parameter:A property map.
+...remarks:The discovery time of a vertex v.
+..param.finish:Out-parameter:A property map.
+...remarks:The time when v's adjacency list has been fully explored.
+..returns:void.
+..see:Function.breadthFirstSearch
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TPredecessorMap, typename TDiscoveryTimeMap, typename TFinishingTimeMap>
+void
+depthFirstSearch(Graph<TSpec> const& g,
+				   TPredecessorMap& predecessor,
+				   TDiscoveryTimeMap& disc,
+				   TFinishingTimeMap& finish)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Value<TPredecessorMap>::Type TPredVal;
+
+	// Initialization
+	resizeVertexMap(g,predecessor);
+	resizeVertexMap(g,disc);
+	resizeVertexMap(g,finish);
+	TPredVal nilPred = getNil<TVertexDescriptor>();
+		
+	String<bool> tokenMap;
+	resizeVertexMap(g, tokenMap);
+	TVertexIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		assignProperty(tokenMap, getValue(it), false);
+		assignProperty(predecessor, getValue(it), nilPred);
+	}
+
+	TSize time = 0;
+
+	goBegin(it);
+	for(;!atEnd(it);goNext(it)) {
+		TVertexDescriptor u = getValue(it);
+		if (getProperty(tokenMap, u) == false) {
+			_dfsVisit(g, u, tokenMap, predecessor, disc, finish, time);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Topological sort
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.topologicalSort:
+..cat:Graph
+..summary:Performs a topological sort on a directed acyclic graph (DAG).
+..remarks:A topological sort is a linear ordering of all its vertices such that if the graph contains an edge (u,v) then u appears before v in the ordering.
+..signature:topologicalSort(g, topSort)
+..param.g:In-parameter:A directed acyclic graph.
+...type:Spec.Directed Graph
+..param.topSort:Out-parameter:A linear ordering of the vertices.
+...type:Class.String
+..returns:void.
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TVertexDescriptor>
+void
+topologicalSort(Graph<TSpec> const& g,
+				 String<TVertexDescriptor>& topSort)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<Graph<TSpec> >::Type TSize;
+
+	// Initialization
+	String<TSize> predMap;
+	String<TSize> discoveryTimeMap;
+	String<TSize> finishingTimeMap;
+	
+	// Dfs
+	depthFirstSearch(g, predMap, discoveryTimeMap, finishingTimeMap);
+
+	// Order vertices
+	typedef ::std::pair<TSize, TVertexDescriptor> TTimeVertexPair;
+	std::priority_queue<TTimeVertexPair> q;
+	typedef typename Iterator<Graph<TSpec>, VertexIterator>::Type TVertexIterator;
+	TVertexIterator it(g);
+	for(;!atEnd(it);++it) {
+		q.push(std::make_pair(getProperty(finishingTimeMap, getValue(it)), getValue(it)));
+	}
+
+	// Create topological order
+	resize(topSort,numVertices(g));
+	TSize count=0;
+	while(!q.empty()) {
+		assignValue(topSort, count, q.top().second);
+		q.pop();
+		++count;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Strongly connected components
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.stronglyConnectedComponents:
+..cat:Graph
+..summary:Decomposes a directed graph into its strongly connected components.
+..signature:stronglyConnectedComponents(g, components)
+..param.g:In-parameter:A directed graph.
+...type:Spec.Directed Graph
+..param.components:Out-parameter:A property map.
+...remarks:Each vertex is mapped to a component id. If two vertices share the same id they are in the same component.
+..returns:void.
+..include:seqan/graph_algorithms.h
+*/
+
+template<typename TSpec, typename TComponents>
+void
+stronglyConnectedComponents(Graph<TSpec> const& g_source,
+							  TComponents& components)
+{
+	SEQAN_CHECKPOINT
+
+	// Initialization
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Value<TComponents>::Type TCompVal;
+	resizeVertexMap(g_source,components);
+	String<TSize> predMap;
+	String<TSize> discoveryTimeMap;
+	String<TSize> finishingTimeMap;
+	
+	// Dfs
+	depthFirstSearch(g_source, predMap, discoveryTimeMap, finishingTimeMap);
+
+	Graph<TSpec> g;
+	transpose(g_source, g);
+
+	// Second Dfs
+	String<TSize> predecessor;
+	String<TSize> disc;
+	String<TSize> finish;
+	resizeVertexMap(g,predecessor);
+	resizeVertexMap(g,disc);
+	resizeVertexMap(g,finish);
+	TCompVal nilPred = getNil<TVertexDescriptor>();
+	String<bool> tokenMap;
+	resizeVertexMap(g, tokenMap);
+	TVertexIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		assignProperty(components, getValue(it), nilPred);
+		assignProperty(tokenMap, getValue(it), false);
+		assignProperty(predecessor, getValue(it), nilPred);
+	}
+
+	// Order vertices
+	typedef ::std::pair<TSize, TVertexDescriptor> TTimeVertexPair;
+	std::priority_queue<TTimeVertexPair> q;
+	goBegin(it);
+	for(;!atEnd(it);++it) {
+		q.push(std::make_pair(getProperty(finishingTimeMap, getValue(it)), getValue(it)));
+	}
+
+	TSize time = 0;
+	TSize label = 0;
+	while(!q.empty()) {
+		TVertexDescriptor u = q.top().second;
+		q.pop();
+		if (getProperty(tokenMap, u) == false) {
+			_dfsVisit(g, u, tokenMap, predecessor, disc, finish, time);
+			TVertexIterator it_label(g);
+			for(;!atEnd(it_label);goNext(it_label)) {
+				if ((getProperty(tokenMap, getValue(it_label)) == true) &&
+					(getProperty(components, getValue(it_label)) == nilPred)) {
+					assignProperty(components, getValue(it_label), label);
+				}
+			}
+			++label;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Connected components
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TVertexDescriptor, typename TTokenMap, typename TComponents, typename TVal>
+void
+_connectedComponentVisit(Graph<TSpec> const& g,
+		  TVertexDescriptor const u,
+		  TTokenMap& tokenMap,
+		  TComponents& components,
+		  TVal& label)
+{
+	SEQAN_CHECKPOINT
+
+	typedef typename Iterator<Graph<TSpec>, AdjacencyIterator>::Type TAdjacencyIterator;
+
+	assignProperty(tokenMap, u, true);
+	assignProperty(components, u, label);
+	TAdjacencyIterator itad(g,u);
+	for(;!atEnd(itad);goNext(itad)) {
+		TVertexDescriptor v = getValue(itad);
+		if (getProperty(tokenMap, v) == false) {
+			_connectedComponentVisit(g, v, tokenMap, components, label);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.connectedComponents:
+..cat:Graph
+..summary:Decomposes an undirected graph into its connected components.
+..signature:connectedComponents(g, components)
+..param.g:In-parameter:An undirected graph.
+...type:Spec.Undirected Graph
+..param.components:Out-parameter:A property map.
+...remarks:Each vertex is mapped to a component id. If two vertices share the same id they are in the same component.
+..returns: The number of components.
+..include:seqan/graph_algorithms.h
+*/
+
+template<typename TSpec, typename TComponents>
+typename Size<Graph<TSpec> >::Type
+connectedComponents(Graph<TSpec> const& g_source,
+					 TComponents& components)
+{
+	SEQAN_CHECKPOINT
+
+	typedef typename Size<Graph<TSpec> >::Type TSize;
+	typedef typename Iterator<Graph<TSpec>, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<Graph<TSpec>, VertexIterator>::Type TVertexIterator;
+	typedef typename VertexDescriptor<Graph<TSpec> >::Type TVertexDescriptor;
+	clear(components);
+	resizeVertexMap(g_source,components);
+	
+	// Initialization
+	String<bool> tokenMap;
+	resize(tokenMap, getIdUpperBound(_getVertexIdManager(g_source)), false);
+
+	// Connected components
+	TSize label = 0;
+	TVertexIterator it(g_source);
+	for(;!atEnd(it);goNext(it)) {
+		TVertexDescriptor u = getValue(it);
+		if (getProperty(tokenMap, u) == false) {
+			_connectedComponentVisit(g_source, u, tokenMap, components, label);
+			++label;
+		}
+	}
+	return label;
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Minimum Spanning Trees
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Prim's algorithm
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.primsAlgorithm:
+..cat:Graph
+..summary:Computes a minimum spanning tree on a graph.
+..signature:primsAlgorithm(g, source, weight, predecessor)
+..param.g:In-parameter:An undirected graph.
+...type:Spec.Undirected Graph
+..param.source:In-parameter:A source vertex.
+...type:Metafunction.VertexDescriptor
+..param.weight:In-parameter:Edge weights.
+..param.predecessor:Out-parameter:A property map.
+...remarks:A property map that represents predecessor relationships among vertices. It determines a minimum spanning tree.
+..returns:void.
+..see:Function.kruskalsAlgorithm
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap>
+void
+primsAlgorithm(Graph<TSpec> const& g,
+				TVertexDescriptor const source,
+				TWeightMap const& weight,
+				TPredecessorMap& predecessor)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Value<TPredecessorMap>::Type TPred;
+	typedef typename Value<TWeightMap>::Type TWeight;
+
+	typedef ::std::pair<TWeight, TVertexDescriptor> TWeightVertexPair;
+	std::priority_queue<TWeightVertexPair, std::vector<TWeightVertexPair>, std::greater<TWeightVertexPair> > q;
+	
+	// Initialization
+	String<bool> tokenMap;
+	String<TWeight> key;
+	TPred nilPred = getNil<typename VertexDescriptor<TGraph>::Type>();
+	TWeight infWeight = _getInfinityDistance(weight);
+	resizeVertexMap(g,predecessor);
+	resizeVertexMap(g,tokenMap);
+	resizeVertexMap(g,key);
+
+	TVertexIterator it(g);
+	while(!atEnd(it)) {
+		TVertexDescriptor u = getValue(it);
+		if (u == source) q.push(std::make_pair(0, u));
+		assignProperty(predecessor, u, nilPred);
+		assignProperty(key, u, infWeight);
+		assignProperty(tokenMap, u, false);
+		goNext(it);
+	}
+
+	assignProperty(key, source, 0);
+	while(!q.empty()) {
+		TVertexDescriptor u = q.top().second;
+		q.pop();
+		if (getProperty(tokenMap, u)) continue;
+		assignProperty(tokenMap, u, true);
+		TOutEdgeIterator itOut(g,u);
+		while(!atEnd(itOut)) {
+			TVertexDescriptor v = targetVertex(itOut);
+			TWeight w = getProperty(weight, getValue(itOut));
+			if ((!getProperty(tokenMap, v)) &&
+				(w < getProperty(key, v))) {
+					assignProperty(predecessor, v, u);
+					assignProperty(key, v, w);
+					q.push(std::make_pair(w, v));
+			}
+			goNext(itOut);
+		}
+	}
+}
+
+template<typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap>
+void
+primsAlgorithmSpaceEfficient(Graph<TSpec> const& g,
+							   TVertexDescriptor const source,
+							   TWeightMap const& weight,
+							   TPredecessorMap& predecessor)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Value<TPredecessorMap>::Type TPred;
+	typedef typename Value<TWeightMap>::Type TWeight;
+
+	// Set-up the priority queue
+	typedef Pair<TVertexDescriptor, TWeight> TKeyValue;
+	typedef HeapTree<TKeyValue, std::less<TWeight>, KeyedHeap<> > TKeyedHeap;
+	TKeyedHeap priorityQueue;
+	
+	// Initialization
+	String<bool> tokenMap;
+	TPred nilPred = getNil<typename VertexDescriptor<TGraph>::Type>();
+	TWeight infWeight = _getInfinityDistance(weight);
+	resizeVertexMap(g,predecessor);
+	resizeVertexMap(g,tokenMap);
+
+	TVertexIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		TVertexDescriptor u = value(it);
+		heapInsert(priorityQueue, TKeyValue(u, infWeight));
+		assignProperty(predecessor, u, nilPred);
+		assignProperty(tokenMap, u, false);
+	}
+	heapChangeValue(priorityQueue, source, 0);
+
+	// Iterate until queue is empty
+	while(!empty(priorityQueue)) {
+		TKeyValue kv = heapExtractRoot(priorityQueue);
+		TVertexDescriptor u = kv.i1;
+		assignProperty(tokenMap, u, true);
+		if (kv.i2 == infWeight) continue;
+		TOutEdgeIterator itOut(g,u);
+		for(;!atEnd(itOut);goNext(itOut)) {
+			TVertexDescriptor v = targetVertex(itOut);
+			if (getProperty(tokenMap, v)) continue;
+			TWeight w = getProperty(weight, getValue(itOut));
+			if (w < heapGetValue(priorityQueue, v)) {
+				assignProperty(predecessor, v, u);
+				heapChangeValue(priorityQueue, v, w);
+			}
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Kruskal's algorithm
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TWeight, typename TPair>
+struct LessPairI1_ :
+	public ::std::unary_function<Pair<TWeight, TPair>, bool>
+{
+	inline bool 
+	operator() (Pair<TWeight, TPair> const& a1, Pair<TWeight, TPair> const& a2) const {
+		return (a1.i1 < a2.i1);
+	}
+};
+
+/**
+.Function.kruskalsAlgorithm:
+..cat:Graph
+..summary:Computes a minimum spanning tree on a graph.
+..signature:kruskalsAlgorithm(g, source, weight, edges)
+..param.g:In-parameter:An undirected graph.
+...type:Spec.Undirected Graph
+..param.source:In-parameter:A source vertex.
+...type:Metafunction.VertexDescriptor
+..param.weight:In-parameter:Edge weights.
+..param.edges:Out-parameter:Array of vertex descriptors.
+...remarks:Array or string where two consecutive entries are an edge.
+..returns:void.
+..see:Function.primsAlgorithm
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TEdges>
+void
+kruskalsAlgorithm(Graph<TSpec> const& g,
+				   TVertexDescriptor const,
+				   TWeightMap const& weight,
+				   TEdges& edges)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Value<TWeightMap>::Type TWeight;
+
+	typedef Pair<TVertexDescriptor, TVertexDescriptor> TVertexPair;
+	typedef Pair<TWeight, TVertexPair> TWeightEdgePair;
+	typedef String<TWeightEdgePair>  TEdgeList;
+	typedef typename Iterator<TEdgeList>::Type TEdgeListIter;
+	TEdgeList edgeList;
+
+	// Initialization
+	resize(edges, 2 * (numVertices(g) - 1));
+	String<String<TVertexDescriptor> > set;
+	String<TVertexDescriptor> id;
+	resizeVertexMap(g, set);
+	resizeVertexMap(g, id);
+	
+	// Make the sets
+	TVertexIterator it(g);
+	while(!atEnd(it)) {
+		TVertexDescriptor v = getValue(it);
+		appendValue(property(set, v), v);
+		assignProperty(id, v, v);
+		goNext(it);
+	}
+
+	// Sort the edges
+	TEdgeIterator itE(g);
+	for(;!atEnd(itE);goNext(itE)) appendValue(edgeList, TWeightEdgePair(getProperty(weight, getValue(itE)), TVertexPair(sourceVertex(itE),targetVertex(itE))));
+	std::sort(begin(edgeList, Standard() ), end(edgeList, Standard() ), LessPairI1_<TWeight, TVertexPair>() );
+
+	// Process each edge
+	TSize index = 0;
+	TEdgeListIter itEdgeList = begin(edgeList, Standard());
+	TEdgeListIter itEdgeListEnd = end(edgeList, Standard());
+	for(;itEdgeList!=itEdgeListEnd; goNext(itEdgeList)) {
+		TVertexDescriptor x = value(itEdgeList).i2.i1;
+		TVertexDescriptor y = value(itEdgeList).i2.i2;
+		if (getProperty(id, x) != getProperty(id,y)) {
+			TVertexDescriptor owner = getProperty(id, x);
+			assignValue(edges, index++, x);
+			assignValue(edges, index++, y);
+			typedef typename Iterator<String<TVertexDescriptor> >::Type TStrIterator;
+			TStrIterator strIt = begin(property(set,getProperty(id, y)));
+			TStrIterator strItEnd = end(property(set,getProperty(id, y)));
+			for(;strIt != strItEnd;goNext(strIt)) {				
+				TVertexDescriptor setMember = getValue(strIt);
+				appendValue(property(set, owner), setMember);
+				assignProperty(id, setMember, owner);
+			}		
+		}
+	}
+}
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Single-Source Shortest Paths
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPredecessorMap, typename TVertexDescriptor, typename TNameMap>
+inline void
+_printPath(Graph<TSpec> const& g,
+			TPredecessorMap const& predecessor,
+			TVertexDescriptor const source,
+			TVertexDescriptor const v,
+			TNameMap const& nameMap)
+{
+	if (source == v) {
+		std::cout << getProperty(nameMap, source);
+	} else if (getProperty(predecessor, v) == getNil<typename VertexDescriptor<Graph<TSpec> >::Type>()) {
+		std::cout << "No path from " << getProperty(nameMap, source) << " to " << getProperty(nameMap, v) << " exists.";
+	} else {
+		_printPath(g,predecessor, source, getProperty(predecessor, v), nameMap);
+		std::cout << "," << getProperty(nameMap, v);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPredecessorMap, typename TVertexDescriptor1, typename TVertexDescriptor2>
+inline void
+_printPath(Graph<TSpec> const& g,
+			TPredecessorMap const& predecessor,
+			TVertexDescriptor1 const source,
+			TVertexDescriptor2 const v)
+{
+	if (source == v) {
+		std::cout << source;
+	} else if (getProperty(predecessor, v) == getNil<typename VertexDescriptor<Graph<TSpec> >::Type>()) {
+		std::cout << "No path from " << source << " to " << v << " exists.";
+	} else {
+		_printPath(g,predecessor, source, getProperty(predecessor, v));
+		std::cout << "," << v;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPredecessorMap, typename TVertexDescriptor1, typename TVertexDescriptor2, typename TEdgeSet>
+inline bool
+_collectEdges(Graph<TSpec> const& g,
+			   TPredecessorMap const& predecessor,
+			   TVertexDescriptor1 const source,
+			   TVertexDescriptor2 const v,
+			   TEdgeSet& edgeSet)
+{
+	if ((TVertexDescriptor1) source == (TVertexDescriptor1) v) {
+		return true;
+	} else if (getProperty(predecessor, v) == getNil<typename VertexDescriptor<Graph<TSpec> >::Type>()) {
+		return false;
+	} else {
+		edgeSet.insert(findEdge(g, getProperty(predecessor, v), v));
+		return _collectEdges(g,predecessor, source, getProperty(predecessor, v), edgeSet);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPredecessorMap, typename TVertexDescriptor, typename TEdgeSet>
+inline bool
+_collectEdges(Graph<TSpec> const& g,
+			   TPredecessorMap const& predecessor,
+			   TVertexDescriptor const source,
+			   TEdgeSet& edgeSet)
+{
+	typedef Iterator<Graph<Undirected<> >, VertexIterator>::Type TVertexIterator;
+	TVertexIterator it(g);
+	for(;!atEnd(it); goNext(it)) {
+		if (!_collectEdges(g, predecessor, source, value(it), edgeSet)) {
+			edgeSet.clear();
+			return false;
+		}
+	}
+	return true;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap>
+inline void 
+_initializeSingleSource(Graph<TSpec> const& g,
+						  TVertexDescriptor const source,
+						  TWeightMap const& weight,
+						  TPredecessorMap& predecessor, 
+						  TDistanceMap& distance)
+{
+	typedef Graph<TSpec> TGraph;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Value<TPredecessorMap>::Type TPredVal;
+	typedef typename Value<TWeightMap>::Type TDistVal;
+	TPredVal nilPred = getNil<typename VertexDescriptor<TGraph>::Type>();
+	TDistVal infDist = _getInfinityDistance(weight);
+	
+	TVertexIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		assignProperty(distance, getValue(it), infDist);
+		assignProperty(predecessor, getValue(it), nilPred);
+	}
+	assignProperty(distance, source, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap, typename TVertexDescriptor, typename TEdgeDescriptor>
+inline void 
+_relax(Graph<TSpec> const& g,
+	    TWeightMap const& weight,
+		TPredecessorMap& predecessor, 
+		TDistanceMap& distance,
+		TVertexDescriptor const u,
+		TEdgeDescriptor const e)
+{
+	TVertexDescriptor v = targetVertex(g,e);
+	if (getProperty(distance, v) > getProperty(distance,u) + getProperty(weight,e)) {
+		assignProperty(distance, v, getProperty(distance,u) + getProperty(weight,e));
+		assignProperty(predecessor, v, u);
+	}
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// DAG Shortest Path
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.dagShortestPath:
+..cat:Graph
+..summary:Computes shortest paths from a single source in a directed acyclic graph (DAG).
+..signature:dagShortestPath(g, source, weight, predecessor, distance)
+..param.g:In-parameter:A directed acyclic graph.
+...type:Spec.Directed Graph
+..param.source:In-parameter:A source vertex.
+...type:Metafunction.VertexDescriptor
+..param.weight:In-parameter:A weight map.
+...remarks:In a directed acyclic graph edge weights can be negative because no cycles do exist.
+..param.predecessor:Out-parameter:A property map.
+...remarks:A property map that represents predecessor relationships among vertices. It determines a shortest-paths tree.
+..param.distance:Out-parameter:A property map.
+...remarks:Indicates for each vertex the distance from the source.
+..returns:void.
+..see:Function.bellmanFordAlgorithm
+..see:Function.dijkstra
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap>
+void
+dagShortestPath(Graph<TSpec> const& g,
+				  TVertexDescriptor const source,
+				  TWeightMap const& weight,
+				  TPredecessorMap& predecessor,
+				  TDistanceMap& distance)
+{
+	SEQAN_CHECKPOINT
+	typedef typename EdgeDescriptor<Graph<TSpec> >::Type TEdgeDescriptor;
+	typedef typename Iterator<Graph<TSpec>, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<Graph<TSpec>, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Iterator<String<TVertexDescriptor>, Rooted>::Type TStringIterator;
+	
+	// Initialization
+	resizeVertexMap(g,predecessor);
+	resizeVertexMap(g,distance);
+
+	// Topological sort
+	String<TVertexDescriptor> order;
+	topologicalSort(g, order);
+
+	_initializeSingleSource(g, source, weight, predecessor, distance);
+
+	//DAG Shortest Paths
+	TStringIterator it = begin(order);
+	while(!atEnd(it)) {
+		TOutEdgeIterator itout(g, getValue(it));
+		for(;!atEnd(itout);++itout) {
+			_relax(g,weight,predecessor, distance, getValue(it), getValue(itout));
+		}
+		goNext(it);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Bellman-Ford
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.bellmanFordAlgorithm:
+..cat:Graph
+..summary:Computes shortest paths from a single source in a directed graph.
+..remarks:Edge weights may be negative in the Bellman-Ford algorithm.
+The out parameters are only valid if the algorithm returns true.
+..signature:bellmanFordAlgorithm(g, source, weight, predecessor, distance)
+..param.g:In-parameter:A directed graph.
+...type:Spec.Directed Graph
+..param.source:In-parameter:A source vertex.
+...type:Metafunction.VertexDescriptor
+..param.weight:In-parameter:A weight map.
+...remarks:A property map with edge weights. Edge weights may be negative.
+..param.predecessor:Out-parameter:A property map.
+...remarks:A property map that represents predecessor relationships among vertices. It determines a shortest-paths tree.
+..param.distance:Out-parameter:A property map.
+...remarks:Indicates for each vertex the distance from the source.
+..returns:True if the graph has no negative weight cycles, false otherwise.
+..see:Function.dagShortestPath
+..see:Function.dijkstra
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap>
+bool 
+bellmanFordAlgorithm(Graph<TSpec> const& g,
+					   TVertexDescriptor const source,
+					   TWeightMap const& weight,
+					   TPredecessorMap& predecessor, 
+					   TDistanceMap& distance)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<Graph<TSpec> >::Type TSize;
+
+	// Initialization
+	typedef typename EdgeDescriptor<Graph<TSpec> >::Type TEdgeDescriptor;
+	typedef typename Iterator<Graph<TSpec>, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<Graph<TSpec>, OutEdgeIterator>::Type TOutEdgeIterator;
+	resizeVertexMap(g,predecessor);
+	resizeVertexMap(g,distance);
+	_initializeSingleSource(g, source, weight, predecessor, distance);
+
+	// Run Bellman-Ford
+	for(TSize i=0; i<numVertices(g) - 1; ++i) {
+		TVertexIterator it(g);
+		for(;!atEnd(it);goNext(it)) {
+			TVertexDescriptor u = getValue(it);
+			TOutEdgeIterator itout(g, u);
+			for(;!atEnd(itout);++itout) {
+				_relax(g,weight,predecessor, distance, u, getValue(itout));
+			}
+		}
+	}
+
+	TVertexIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		TVertexDescriptor u = getValue(it);
+		TOutEdgeIterator itout(g, u);
+		for(;!atEnd(itout);++itout) {
+			TVertexDescriptor v = targetVertex(g, getValue(itout));
+			if (getProperty(distance, v) > getProperty(distance,u) + getProperty(weight,getValue(itout))) {
+				return false;
+			}	
+		}
+	}
+	return true;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Dijkstra
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.dijkstra:
+..cat:Graph
+..summary:Computes shortest paths from a single source in a graph.
+..remarks:Edge weights have to be nonnegative.
+..signature:dijkstra(g, source, weight, predecessor, distance)
+..param.g:In-parameter:A graph.
+...type:Spec.Directed Graph
+..param.source:In-parameter:A source vertex.
+...type:Metafunction.VertexDescriptor
+..param.weight:In-parameter:A weight map.
+...remarks:A property map with edge weights. Edge weights have to be nonnegative.
+..param.predecessor:Out-parameter:A property map.
+...remarks:A property map that represents predecessor relationships among vertices. It determines a shortest-paths tree.
+..param.distance:Out-parameter:A property map.
+...remarks:Indicates for each vertex the distance from the source.
+..returns:void
+..see:Function.dagShortestPath
+..see:Function.bellmanFordAlgorithm
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap>
+void 
+dijkstra(Graph<TSpec> const& g,
+		 TVertexDescriptor const source,
+		 TWeightMap const& weight,
+		 TPredecessorMap& predecessor, 
+		 TDistanceMap& distance)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TDistanceMap>::Type TDistVal;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	
+	// Initialization
+	resizeVertexMap(g,predecessor);
+	resizeVertexMap(g,distance);
+
+	// S is initially empty
+	String<bool> setS;
+	resize(setS, getIdUpperBound(_getVertexIdManager(g)), false);
+
+	// Set-up the priority queue
+	typedef Pair<TVertexDescriptor, TDistVal> TKeyValue;
+	typedef HeapTree<TKeyValue, std::less<TDistVal>, KeyedHeap<> > TKeyedHeap;
+	TKeyedHeap priorityQueue;
+	TDistVal infDist = _getInfinityDistance(weight);
+	TVertexDescriptor nilVertex = getNil<typename VertexDescriptor<TGraph>::Type>();
+	TVertexIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		assignProperty(predecessor, value(it), nilVertex);
+		assignProperty(distance, value(it), infDist);
+		heapInsert(priorityQueue, TKeyValue(value(it), infDist));
+	}
+	assignProperty(distance, source, 0);
+	heapChangeValue(priorityQueue, source, 0);
+
+	// Run Dijkstra
+	while (!empty(priorityQueue)) {
+		// Extract min
+		TVertexDescriptor u = heapExtractRoot(priorityQueue).i1;
+		assignProperty(setS, u, true);
+		TOutEdgeIterator itout(g, u);
+		for(;!atEnd(itout);++itout) {
+			TVertexDescriptor v = targetVertex(itout);
+			if (property(setS, v) == true) continue;
+			if (getProperty(distance, v) > getProperty(distance,u) + getProperty(weight,value(itout))) {
+				assignProperty(distance, v, getProperty(distance,u) + getProperty(weight,value(itout)));
+				assignProperty(predecessor, v, u);
+				heapChangeValue(priorityQueue, v, getProperty(distance,u) + getProperty(weight,value(itout)));
+			}
+		}
+	}
+}
+
+//template<typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap>
+//void 
+//dijkstra(Graph<TSpec> const& g,
+//		 TVertexDescriptor const source,
+//		 TWeightMap const& weight,
+//		 TPredecessorMap& predecessor, 
+//		 TDistanceMap& distance)
+//{
+//	SEQAN_CHECKPOINT
+//	typedef Graph<TSpec> TGraph;
+//	typedef typename Size<TGraph>::Type TSize;
+//	typedef typename Value<TDistanceMap>::Type TDistVal;
+//	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+//	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+//	
+//	// Initialization
+//	resizeVertexMap(g,predecessor);
+//	resizeVertexMap(g,distance);
+//
+//	_initializeSingleSource(g, source, weight, predecessor, distance);
+//	
+//	String<bool> setS;
+//	resizeVertexMap(g, setS);
+//	TVertexIterator it(g);
+//	for(;!atEnd(it);++it) {
+//		assignProperty(setS, getValue(it), false);
+//	}
+//	TDistVal infDist = _getInfinityDistance(weight);
+//	TVertexDescriptor nilVertex = getNil<typename VertexDescriptor<TGraph>::Type>();
+//
+//	// Run Dijkstra
+//	TSize count = numVertices(g);
+//	while (count > 0) {
+//		// Extract min
+//		TDistVal min = infDist;
+//		TVertexDescriptor u = nilVertex;
+//		TVertexIterator it_find(g);
+//		for(;!atEnd(it_find);++it_find) {
+//			if(getProperty(setS,getValue(it_find))==true) continue;
+//			if ((u == nilVertex) ||
+//				(getProperty(distance,getValue(it_find))<getProperty(distance,u))) {
+//					u = getValue(it_find);
+//					min = getProperty(distance,getValue(it_find));
+//			}
+//		}
+//		assignProperty(setS, u, true);
+//		TOutEdgeIterator itout(g, u);
+//		for(;!atEnd(itout);++itout) {
+//			_relax(g,weight,predecessor, distance, u, getValue(itout));
+//		}
+//		--count;
+//	}
+//}
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// All-Pairs shortest paths
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPredecessor, typename TVertexDescriptor>
+inline void
+_printAllPairsShortestPath(Graph<TSpec> const& g,
+							   TPredecessor& predecessor, 
+							   TVertexDescriptor const i,
+							   TVertexDescriptor const j)
+{
+	typedef typename Size<TPredecessor>::Type TSize;
+	TSize len = getIdUpperBound(g.data_id_managerV);
+	if (i==j) {
+		std::cout << i;
+	} else if (getValue(predecessor, i*len+j) == getNil<typename VertexDescriptor<Graph<TSpec> >::Type>()) {
+		std::cout << "No path from " << i << " to " << j << " exists.";
+	} else {
+		_printAllPairsShortestPath(g,predecessor, i, (TVertexDescriptor) getValue(predecessor, i*len+j));
+		std::cout << "," << j;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TWeightMap, typename TMatrix, typename TPredecessor>
+void 
+_initializeAllPairs(Graph<TSpec> const& g,
+						TWeightMap const& weight,
+						TMatrix& matrix,
+						TPredecessor& predecessor)
+{
+	typedef Graph<TSpec> TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Value<TWeightMap>::Type TWeightVal;
+	typedef typename Value<TPredecessor>::Type TPredVal;
+	
+	// Create adjacency-like matrix
+	TSize len = getIdUpperBound(g.data_id_managerV);
+	resize(matrix, len * len);
+	resize(predecessor, len * len);
+	TWeightVal infWeight = _getInfinityDistance(weight);
+	TPredVal nilPred = getNil<TVertexDescriptor>();
+	for (TSize row=0;row < len;++row) {
+		for (TSize col=0;col < len;++col) {
+			if (row != col) assignValue(matrix, row*len + col, infWeight);
+			else assignValue(matrix, row*len + col, 0);
+			assignValue(predecessor, row*len + col, nilPred);
+		}
+	}
+
+	// Include edge weights and initial predecessors
+	TVertexIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		TVertexDescriptor u = getValue(it);
+		TOutEdgeIterator itout(g, u);
+		for(;!atEnd(itout);++itout) {
+			TVertexDescriptor v = targetVertex(g,getValue(itout));
+			assignValue(matrix, u*len + v, getProperty(weight, getValue(itout)));
+			assignValue(predecessor, u*len + v, u);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TMatrix, typename TPredecessor, typename TInfDist>
+void 
+_extendShortestPaths(TMatrix& local,
+					   TMatrix& w,
+					   TPredecessor& predecessor,
+					   TInfDist const infDist)
+{
+	typedef typename Value<TMatrix>::Type TMatrixVal;
+	typedef typename Value<TPredecessor>::Type TPredVal;
+	typedef typename Size<TMatrix>::Type TSize;
+	TMatrix oldLocal = local;
+	TPredecessor oldPredecessor = predecessor;
+	TSize len = (TSize) std::sqrt((double) length(oldLocal));
+	for(TSize i = 0; i<len;++i) {
+		for(TSize j = 0; j<len;++j) {
+			if (i==j) continue;
+			assignValue(local, i*len+j,infDist);
+			TPredVal ind = 0;
+			for(TSize k = 0; k<len;++k) {
+				TMatrixVal min1 = getValue(local, i*len+j);
+				TMatrixVal min2 = getValue(oldLocal, i*len+k) + getValue(w, k*len + j);
+				if (min2 < min1) {
+					assignValue(local, i*len+j,min2);
+					ind = k;
+				}
+			}
+			if (getValue(oldLocal, i*len+j) > getValue(local, i*len+j)) {
+				assignValue(predecessor, i*len+j,ind);
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// All-Pairs shortest path
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.allPairsShortestPath:
+..cat:Graph
+..summary:Finds shortest paths between all pairs of vertices in a graph.
+..signature:allPairsShortestPath(g, weight, distance, predecessor)
+..param.g:In-parameter:A directed graph.
+...type:Spec.Directed Graph
+..param.weight:In-parameter:A weight map.
+...remarks:A property map with edge weights. Edge weights may be negative.
+..param.distance:Out-parameter:A matrix with distances.
+...type:Class.Matrix
+...remarks:Entry (i,j) in this matrix indicates the distance from vertex i to vertex j.
+..param.predecessor:Out-parameter:A matrix with predecessors.
+...type:Class.Matrix
+...remarks:Entry (i,j) in this matrix indicates the predecessor of j on a shortest path from vertex i to vertex j.
+You can use _printAllPairsShortestPath(g, predecessor, i, j) to print the shortest path from i to j.
+..returns:void
+..see:Function.floydWarshallAlgorithm
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TWeightMap, typename TMatrix, typename TPredecessor>
+void 
+allPairsShortestPath(Graph<TSpec> const& g,
+						TWeightMap const& weight,
+						TMatrix& distMatrix,
+						TPredecessor& predecessor)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Value<TWeightMap>::Type TWeightVal;
+	TWeightVal infWeight = _getInfinityDistance(weight);
+
+	// Initialize first distance matrix
+	_initializeAllPairs(g,weight,distMatrix,predecessor);
+
+	TSize len = (TSize) sqrt((double) length(distMatrix));
+	TMatrix local = distMatrix;
+	for(TSize m=2;m<len;++m) {
+		_extendShortestPaths(local,distMatrix,predecessor, infWeight);
+	}
+	distMatrix = local;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Floyd-Warshall
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.floydWarshallAlgorithm:
+..cat:Graph
+..summary:Finds shortest paths between all pairs of vertices in a graph.
+..signature:floydWarshallAlgorithm(g, weight, distance, predecessor)
+..remarks:The graph must be free of negative-weight cycles.
+..param.g:In-parameter:A directed graph.
+...type:Spec.Directed Graph
+..param.weight:In-parameter:A weight map.
+...remarks:A property map with edge weights. Edge weights may be negative.
+..param.distance:Out-parameter:A matrix with distances.
+...type:Class.Matrix
+...remarks:Entry (i,j) in this matrix indicates the distance from vertex i to vertex j.
+..param.predecessor:Out-parameter:A matrix with predecessors.
+...type:Class.Matrix
+...remarks:Entry (i,j) in this matrix indicates the predecessor of j on a shortest path from vertex i to vertex j.
+You can use _printAllPairsShortestPath(g, predecessor, i, j) to print the shortest path from i to j.
+..returns:void
+..see:Function.allPairsShortestPath
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TWeightMap, typename TMatrix, typename TPredecessor>
+void 
+floydWarshallAlgorithm(Graph<TSpec> const& g,
+			   TWeightMap const& weight,
+			   TMatrix& distMatrix,
+			   TPredecessor& predecessor)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Value<TMatrix>::Type TMatrixVal;
+
+	// Initialize first distance matrix
+	_initializeAllPairs(g,weight,distMatrix,predecessor);
+
+	// Floyd-Warshall
+	TSize len = (TSize) std::sqrt((double) length(distMatrix));
+	TMatrix local = distMatrix;
+	for(TSize k=0;k<len;++k) {
+		for(TSize i=0;i<len;++i) {
+			for(TSize j=0;j<len;++j) {
+				TMatrixVal min1 = getValue(distMatrix, i*len+j);
+				TMatrixVal min2 = getValue(distMatrix, i*len+k) + getValue(distMatrix, k*len + j);
+				if (min2 < min1) {
+					assignValue(local, i*len+j,min2);
+					assignValue(predecessor, i*len+j,getValue(predecessor, k*len+j));
+				} else {
+					assignValue(local, i*len+j,min1);
+					assignValue(predecessor, i*len+j, getValue(predecessor, i*len+j));
+				}
+			}
+		}
+		distMatrix=local;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Transitive Closure
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.transitiveClosure:
+..cat:Graph
+..summary:Determines whether there is a path between any two given vertices or not.
+..signature:transitiveClosure(g, closure)
+..param.g:In-parameter:A directed graph.
+...type:Spec.Directed Graph
+..param.closure:Out-parameter:A matrix which indicates the closure.
+...type:Class.Matrix
+...remarks:Entry (i,j) in this matrix indicates whether there is a path from i to j in the graph or not.
+..returns:void
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TMatrix>
+void 
+transitiveClosure(Graph<TSpec> const& g,
+				   TMatrix& closure)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Value<TMatrix>::Type TMatrixVal;
+
+	// Initialize first closure matrix
+	getAdjacencyMatrix(g,closure);
+	TSize len = (TSize) std::sqrt((double) length(closure));
+	for (TSize diag=0;diag < len;++diag) assignValue(closure, diag*len+diag,1);
+
+	// Transitive Closure
+	TMatrix local = closure;
+	for (TSize k=0;k<len;++k) {
+		for(TSize i=0;i<len;++i) {
+			for(TSize j=0;j<len;++j) {
+				bool t_ij = static_cast<int>(getValue(closure, i*len+j)) > 0;
+                bool t_ik = static_cast<int>(getValue(closure, i*len+k)) > 0;
+                bool t_kj = static_cast<int>(getValue(closure, k*len+j)) > 0;
+				assignValue(local, i*len+j, t_ij || (t_ik && t_kj));
+			}
+		}
+		closure = local;
+	}
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Maximum Flow
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+template<typename TSpec, typename TCapMap, typename TFlowMap, typename TResidualGraph>
+void
+_buildResidualGraph(Graph<TSpec> const& g,
+					  TCapMap const& capacity,
+					  TFlowMap const& flow,
+					  TResidualGraph& rG)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Value<TFlowMap>::Type TFlow;
+	typedef typename Value<TCapMap>::Type TCap;
+
+	clear(rG);
+	TVertexIterator itV(g);
+	for(;!atEnd(itV);goNext(itV)) {
+		_createVertices(rG, getValue(itV));
+	}
+
+	TEdgeIterator itE(g);
+	for(;!atEnd(itE);goNext(itE)) {
+		typedef typename EdgeDescriptor<TResidualGraph>::Type TEdgeDescriptor;
+		TFlow f = getProperty(flow, getValue(itE));
+		TCap cap = getProperty(capacity, getValue(itE));
+		if (f > 0) {
+			TEdgeDescriptor e_rG = findEdge(rG, targetVertex(itE), sourceVertex(itE));
+			if (e_rG == 0) addEdge(rG, targetVertex(itE), sourceVertex(itE), f);
+			else cargo(e_rG) += f;
+		}
+		if (f < cap) {
+			TEdgeDescriptor e_rG = findEdge(rG, sourceVertex(itE), targetVertex(itE));
+			if (e_rG == 0) addEdge(rG, sourceVertex(itE), targetVertex(itE), cap - f);
+			else cargo(e_rG) += cap - f;			
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPredecessorMap, typename TVertexDescriptor>
+inline typename Size<Graph<TSpec> >::Type
+_getMinimumAug(Graph<TSpec> const& rG,
+				 TPredecessorMap& predecessor,
+				 TVertexDescriptor const source,
+				 TVertexDescriptor sink)
+{
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef TSize TFlow;
+	typedef typename Iterator<String<TVertexDescriptor>, Rooted>::Type TIterator;
+	
+	// Build secondary predecessor map just containing the path
+	TVertexDescriptor nilPred = getNil<typename VertexDescriptor<TGraph>::Type>();
+	String<TVertexDescriptor> predMap;
+	resizeVertexMap(rG, predMap);
+	TIterator it = begin(predMap);
+	for(;!atEnd(it);goNext(it)) {
+		*it = nilPred;
+	}
+
+	// Find minimum flow
+	TVertexDescriptor pred = getProperty(predecessor, sink);
+	TFlow f = getCargo(findEdge(rG, pred,sink));
+	assignProperty(predMap, sink, pred);
+	while(pred != source) {
+		sink = pred;
+		pred = getProperty(predecessor, sink);
+		TFlow f2 = getCargo(findEdge(rG, pred,sink));
+		assignProperty(predMap, sink, pred);
+		if (f2 < f) f = f2;
+	}
+
+	// Just return the augmenting path
+	predecessor = predMap;
+	return f;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Ford Fulkerson
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.fordFulkersonAlgorithm:
+..cat:Graph
+..summary:Computes a maximum flow in a directed graph.
+..signature:fordFulkersonAlgorithm(g, source, sink, capacity, flow)
+..param.g:In-parameter:A directed graph.
+...type:Spec.Directed Graph
+..param.source:In-parameter:A source vertex.
+...type:Metafunction.VertexDescriptor
+..param.sink:In-parameter:A sink vertex.
+...type:Metafunction.VertexDescriptor
+..param.capacity:In-parameter:A property map of edge capacities.
+..param.flow:Out-parameter:A property map with the flow of each edge.
+..returns:The value of the flow.
+..include:seqan/graph_algorithms.h
+*/
+template<typename TSpec, typename TVertexDescriptor, typename TCapMap, typename TFlowMap>
+typename Value<TFlowMap>::Type
+fordFulkersonAlgorithm(Graph<TSpec> const& g,
+			   TVertexDescriptor const source,
+			   TVertexDescriptor const sink,
+			   TCapMap const& capacity,
+			   TFlowMap& flow)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Value<TFlowMap>::Type TFlow;
+
+	// Initialization
+	TVertexDescriptor nilPred = getNil<typename VertexDescriptor<TGraph>::Type>();
+	resizeEdgeMap(g,flow);
+	TEdgeIterator itE(g);
+	for(;!atEnd(itE);goNext(itE)) {
+		assignProperty(flow, getValue(itE), 0);
+	}
+
+	// Build the residual graph
+	Graph<Directed<TFlow> > rG;
+	_buildResidualGraph(g,capacity, flow, rG);
+
+		
+	// Determine whether the sink is reachable
+	String<TVertexDescriptor> predMap;
+	String<TVertexDescriptor> distMap;
+	breadthFirstSearch(rG, source, predMap, distMap);
+	
+	while (getProperty(predMap, sink) != nilPred) {
+		TFlow inc = _getMinimumAug(rG, predMap, source, sink);
+		TEdgeIterator itEdge(g);
+		for(;!atEnd(itEdge);goNext(itEdge)) {
+			TVertexDescriptor u = sourceVertex(itEdge);
+			TVertexDescriptor v = targetVertex(itEdge);
+			TEdgeDescriptor e = getValue(itEdge);
+			if (getProperty(predMap, v) == u) assignProperty(flow, e, getProperty(flow, e) + inc);
+			if (getProperty(predMap, u) == v) assignProperty(flow, e, getProperty(flow, e) - inc);
+		}
+		// Build the residual graph
+		_buildResidualGraph(g,capacity, flow, rG);
+		// Determine whether the sink is reachable
+		clear(predMap);
+		clear(distMap);
+		breadthFirstSearch(rG, source, predMap, distMap);
+	}
+
+	TFlow valF = 0;
+	TOutEdgeIterator itOutEdge(g, source);
+	for(;!atEnd(itOutEdge);goNext(itOutEdge)) {
+		valF += getProperty(flow, getValue(itOutEdge));
+	}
+	return valF;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// ToDo: Not yet tested, use with care
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Matching
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Path Growing Algorithm
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TWeightMap, typename TEdgeMap>
+typename Value<TWeightMap>::Type
+pathGrowingAlgorithm(Graph<TSpec>& g,
+					   TWeightMap const& weightMap,
+					   TEdgeMap& edgeMap1)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Value<TWeightMap>::Type TValue;
+	typedef typename Size<Graph<TSpec> >::Type TSize;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+
+	// Make a copy of the graph
+	TGraph mutant(g);
+
+	// Initialy not a single edge is selected
+	resize(edgeMap1, getIdUpperBound(_getEdgeIdManager(g)), false);
+	TEdgeMap edgeMap2 = edgeMap1;
+	TValue edgeMap1Sum = 0;
+	TValue edgeMap2Sum = 0;
+	
+	// Run the algorithm
+	TSize i = 1;
+	while (numEdges(mutant) > 0) {
+		TVertexIterator itVert(mutant);
+		while (outDegree(mutant, *itVert) < 1) goNext(itVert);
+		TVertexDescriptor x = *itVert;
+		TVertexDescriptor y;
+		while (outDegree(mutant, x) >= 1) {
+			TOutEdgeIterator itOut(mutant, x);
+			TEdgeDescriptor e = *itOut;
+			TValue max = getProperty(weightMap, e);
+			y = targetVertex(itOut);
+			goNext(itOut);
+			for(;!atEnd(itOut);++itOut) {
+				if (getProperty(weightMap, *itOut) > max) {
+					e = *itOut;
+					max = getProperty(weightMap, e);
+					y = targetVertex(itOut);
+				}
+			}
+			if (i == 1) {
+				// Mark the edge for m1
+				assignProperty(edgeMap1, e, true);
+				edgeMap1Sum += max;
+			} else {
+				// Mark the edge for m2
+				assignProperty(edgeMap2, e, true);
+				edgeMap2Sum += max;
+			}
+			i = 3 - i;
+			removeVertex(mutant, x);
+			x = y;
+		}
+	}
+	
+
+	// Check whether we have to swap bool arrays
+	if (edgeMap2Sum > edgeMap1Sum) {
+		edgeMap1Sum = edgeMap2Sum;
+		edgeMap1 = edgeMap2;
+	}
+
+	return edgeMap1Sum;
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Weighted bipartite Matching
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TVertexMap, typename TEdges>
+inline typename Size<Graph<TSpec> >::Type
+bipartiteMatching(Graph<TSpec>& g,			  
+					TVertexMap& vertMap,
+					String<TEdges>& edges)
+{
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIter;
+
+	clear(edges);
+	TVertexDescriptor source = addVertex(g);
+	TVertexDescriptor target = addVertex(g);
+	TVertexIter itV(g);
+	for(;!atEnd(itV); goNext(itV)) {
+		if ((value(itV) != source) && (value(itV) != target)) {
+			if (getProperty(vertMap, value(itV)) == false) {
+				addEdge(g, source, value(itV));
+			} else {
+				addEdge(g, value(itV), target);
+			}
+		}
+	}
+
+	// Use Ford-Fulkerson to determine a matching
+	String<TSize> capMap;	
+	resizeEdgeMap(g,capMap);
+	typedef typename Iterator<String<TSize> >::Type TCapIter;
+	TCapIter capIt = begin(capMap);
+	TCapIter capItEnd = end(capMap);
+	for(;capIt != capItEnd; ++capIt) value(capIt) = 1;
+	String<TSize> flow;	
+	TSize valF = fordFulkersonAlgorithm(g, source, target, capMap, flow);
+
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	TEdgeIterator itEdge(g);
+	for(;!atEnd(itEdge);goNext(itEdge)) {
+		if (getProperty(flow, getValue(itEdge)) == 1) {
+			TVertexDescriptor sV = sourceVertex(itEdge);
+			TVertexDescriptor tV = targetVertex(itEdge);
+			if ((sV != source) && (tV != target)) appendValue(edges, TEdges(sV, tV));
+		}
+	}
+	removeVertex(g, source);
+	removeVertex(g, target);
+
+	return valF;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TVertexMap, typename TWeightMap, typename TEdges>
+inline typename Value<TWeightMap>::Type
+_weightedBipartiteMatching(Graph<TSpec>& g,
+							  TVertexMap& vertMap,
+							  TWeightMap& weightMap,
+							  String<TEdges>& edges)
+{
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIter;
+	typedef typename Value<TWeightMap>::Type TCargo;
+
+	TSize numVert = numVertices(g);
+	TCargo maxEdgeVal = 0;
+
+	// Find an initial labeling
+	String<TCargo> label;
+	resizeVertexMap(g, label);
+	TVertexIterator itV(g);
+	for(;!atEnd(itV); goNext(itV)) {
+		if (getProperty(vertMap, value(itV)) == true) value(label, value(itV)) = 0;
+		else {
+			TCargo maxCargo = 0;
+			for(TOutEdgeIter itOutE(g, value(itV));!atEnd(itOutE); goNext(itOutE)) {
+				if (property(weightMap, (value(itOutE))) > maxCargo) maxCargo = property(weightMap, (value(itOutE)));
+			}
+			value(label, value(itV)) = maxCargo;
+			if (maxCargo > maxEdgeVal) maxEdgeVal = maxCargo;
+		}
+	}
+
+	// Generate Equality Graph
+	typedef Graph<Directed<void> > TEqualityGraph;
+	typedef typename EdgeType<TEqualityGraph>::Type TEdgeStump;
+	TEqualityGraph equalGraph;
+	resize(equalGraph.data_vertex, length(_getVertexString(g)), (TEdgeStump*) 0);
+	equalGraph.data_id_managerV = g.data_id_managerV;
+	TEdgeIterator itE(g);
+	for(;!atEnd(itE); goNext(itE)) {
+		if (property(weightMap, (value(itE))) == property(label, sourceVertex(itE)) + property(label, targetVertex(itE))) {
+			// For the Ford-Fulkerson all edges must go from true to false
+			if (getProperty(vertMap, sourceVertex(itE)) == true) addEdge(equalGraph, targetVertex(itE), sourceVertex(itE));
+			else addEdge(equalGraph, sourceVertex(itE), targetVertex(itE));
+		}
+	}
+
+	// Find an initial bipartite matching
+	clear(edges);
+	TSize matchSize = bipartiteMatching(equalGraph, vertMap, edges);
+	
+
+	String<bool> free;
+	String<TVertexDescriptor> reverseMatchMap;
+	typedef std::set<TVertexDescriptor> TVertexSet;
+	TVertexSet setS;
+	TVertexSet setNeighborS;
+	TVertexSet setT;
+	while (matchSize != numVert / 2) {
+
+		// Initialization
+		setS.clear();
+		setT.clear();
+		setNeighborS.clear();
+		clear(free);
+		resize(free, getIdUpperBound(_getVertexIdManager(g)), true);
+		clear(reverseMatchMap);
+		resizeVertexMap(g, reverseMatchMap);
+		
+		// Find free vertex
+		typedef typename Iterator<String<TEdges> >::Type TStringEdgeIter;
+		TStringEdgeIter itSE = begin(edges);
+		TStringEdgeIter itSEEnd = end(edges);
+		for(;itSE != itSEEnd; goNext(itSE)) {
+			value(free, (value(itSE)).i1) = false;
+			value(free, (value(itSE)).i2) = false;
+			value(reverseMatchMap, (value(itSE)).i2) = (value(itSE)).i1;
+		}
+		TVertexIterator itVert(g);
+		for(;!atEnd(itVert); goNext(itVert)) {
+			if ((getProperty(vertMap, value(itVert)) == false) &&
+				(value(free, value(itVert)) == true)) {
+					setS.insert(value(itVert));
+					typedef typename Iterator<TEqualityGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+					TOutEdgeIterator itOE(equalGraph, value(itVert));
+					for(;!atEnd(itOE); ++itOE) {
+						setNeighborS.insert(targetVertex(itOE));
+						if (value(free, targetVertex(itOE)) == true) setT.insert(targetVertex(itOE));
+					}
+					break;
+			}
+		}
+
+		// Find matched vertices
+		typedef typename TVertexSet::iterator TVertexSetIter;
+		while (setNeighborS != setT) {
+			TVertexSet diffSet;
+			TVertexSetIter itT = setT.begin();
+			TVertexSetIter itTEnd = setT.end();
+			TVertexSetIter itN = setNeighborS.begin();
+			TVertexSetIter itNEnd = setNeighborS.end();
+			while (itN != itNEnd) {
+				if ((itT == itTEnd) || (*itN < *itT)) { diffSet.insert(*itN); ++itN; }
+				else { ++itN; ++itT; }
+			}
+			TVertexDescriptor y = *(diffSet.begin());
+			setT.insert(y);
+			setS.insert(value(reverseMatchMap, y));
+			typedef typename Iterator<TEqualityGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+			TOutEdgeIterator itOE(equalGraph, value(reverseMatchMap, y));
+			for(;!atEnd(itOE); ++itOE) {
+				setNeighborS.insert(targetVertex(itOE));
+				if (value(free, targetVertex(itOE)) == true) setT.insert(targetVertex(itOE));
+			}
+		}
+		clear(reverseMatchMap);
+	
+		// Update Labels
+		TCargo minVal = maxEdgeVal;
+		TEdgeIterator itEdge(g);
+		for(;!atEnd(itEdge); goNext(itEdge)) {
+			TVertexDescriptor sV = sourceVertex(itEdge);
+			TVertexDescriptor tV = targetVertex(itEdge);
+			if (property(vertMap, sV) == true) {	TVertexDescriptor tmp = sV;	sV = tV; tV = tmp;	}
+			if ((setS.find(sV) != setS.end()) &&
+				(setT.find(tV) == setT.end())) {
+				TCargo thisVal = getProperty(label, sV) + getProperty(label, tV) - getProperty(weightMap, (value(itEdge)));
+				if (thisVal < minVal) minVal = thisVal;
+			}
+		}
+		TVertexIterator myVertexIt(g);
+		for(;!atEnd(myVertexIt); goNext(myVertexIt)) {
+			if (setS.find(value(myVertexIt)) != setS.end()) value(label, value(myVertexIt)) -= minVal;
+			else if (setT.find(value(myVertexIt)) != setT.end()) value(label, value(myVertexIt)) += minVal;
+		}
+
+		// Build new equal graph
+		clear(equalGraph);
+		resize(equalGraph.data_vertex, length(_getVertexString(g)), (TEdgeStump*) 0);
+		equalGraph.data_id_managerV = g.data_id_managerV;
+		TEdgeIterator itE(g);
+		for(;!atEnd(itE); goNext(itE)) {
+			if (property(weightMap, (value(itE))) == property(label, sourceVertex(itE)) + property(label, targetVertex(itE))) {
+				if (property(vertMap, sourceVertex(itE)) == true) addEdge(equalGraph, targetVertex(itE), sourceVertex(itE));
+				else addEdge(equalGraph, sourceVertex(itE), targetVertex(itE));
+			}
+		}
+
+		// Create a new matching
+		clear(edges);
+		matchSize = bipartiteMatching(equalGraph, vertMap, edges);
+	}
+
+	typedef typename Iterator<String<TEdges> >::Type TStringEdgeIter;
+	TStringEdgeIter itSE = begin(edges);
+	TStringEdgeIter itSEEnd = end(edges);
+	TCargo sumWeight = 0;
+	for(;itSE != itSEEnd; goNext(itSE)) sumWeight += property(weightMap, findEdge(g, (value(itSE)).i1, (value(itSE)).i2));
+
+	return sumWeight;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TVertexMap, typename TWeightMap, typename TEdges>
+inline typename Value<TWeightMap>::Type
+weightedBipartiteMatching(Graph<TSpec>& g,
+							TVertexMap& vertMap,
+							TWeightMap& weightMap,
+							String<TEdges>& edges)
+{
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TWeightMap>::Type TCargo;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+
+	// Collect the two vertex sets, set1 is marked with false, set2 with true
+	typedef String<TVertexDescriptor> TVertexSet;
+	typedef typename Iterator<TVertexSet>::Type TVertexSetIter;
+	TVertexSet set1;
+	TVertexSet set2;
+	TVertexIterator itV(g);
+	for(;!atEnd(itV); goNext(itV)) {
+		if (property(vertMap, value(itV)) == false) appendValue(set1, value(itV));
+		else appendValue(set2, value(itV));
+	}
+	bool setIdentifier = true;		// Indicates what set needs more vertices
+	TSize maxN = length(set1);
+	if (maxN < length(set2)) {	maxN = length(set2); setIdentifier = false; }
+
+
+	// Copy the original graph
+	TGraph fullGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	resize(fullGraph.data_vertex, length(_getVertexString(g)), (TEdgeStump*) 0);
+	fullGraph.data_id_managerV = g.data_id_managerV;
+	TVertexMap myVertexMap = vertMap;
+	resize(myVertexMap, maxN + maxN, setIdentifier);
+	String<TCargo> myWeightMap;
+	resize(myWeightMap, maxN * maxN, 0);
+	TEdgeIterator itE(g);
+	typedef std::pair<TVertexDescriptor, TVertexDescriptor> TEdge;
+	typedef std::set<TEdge> TEdgeSet;
+	TEdgeSet edgeSet;
+	for(;!atEnd(itE); goNext(itE)) {
+		TVertexDescriptor sV = sourceVertex(itE);
+		TVertexDescriptor tV = targetVertex(itE);
+		TEdgeDescriptor e = addEdge(fullGraph, sV, tV);
+		if (sV < tV) edgeSet.insert(std::make_pair(sV, tV));
+		else edgeSet.insert(std::make_pair(tV, sV));
+		property(myWeightMap, e) = getProperty(weightMap, (value(itE)));
+	}
+
+	// Build a full graph
+	if (setIdentifier == false) {
+		TSize inc = maxN - length(set1);
+		for(TSize i = 0; i< inc; ++i) appendValue(set1, addVertex(fullGraph));
+	} else {
+		TSize inc = maxN - length(set2);
+		for(TSize i = 0; i<inc ; ++i) appendValue(set2, addVertex(fullGraph));
+	}
+	TVertexSetIter set1It = begin(set1);
+	TVertexSetIter set1ItEnd = end(set1);
+	for(;set1It != set1ItEnd; ++set1It) {
+		TVertexSetIter set2It = begin(set2);
+		TVertexSetIter set2ItEnd = end(set2);
+		for(;set2It != set2ItEnd; ++set2It) {
+			TVertexDescriptor sV = value(set1It);
+			TVertexDescriptor tV = value(set2It);
+			if (sV > tV) { TVertexDescriptor tmp = sV; sV = tV; tV = tmp; }
+			if (edgeSet.find(std::make_pair(sV, tV)) == edgeSet.end()) addEdge(fullGraph, sV, tV);
+		}
+	}
+
+	// Find a maximum weight matching
+	String<TEdges> pseudo_edges;
+	TCargo weight = _weightedBipartiteMatching(fullGraph, myVertexMap, myWeightMap, pseudo_edges);
+
+	// Copy the relevant edges
+	clear(edges);
+	typedef typename Iterator<String<TEdges> >::Type TEdgeIter;
+	TEdgeIter eIt = begin(pseudo_edges);
+	TEdgeIter eItEnd = end(pseudo_edges);
+	for(;eIt != eItEnd; ++eIt) {
+		TVertexDescriptor sV = (value(eIt)).i1;
+		TVertexDescriptor tV = (value(eIt)).i2;
+		if (sV > tV) { TVertexDescriptor tmp = sV; sV = tV; tV = tmp; }
+		if (edgeSet.find(std::make_pair(sV, tV)) != edgeSet.end()) appendValue(edges, value(eIt));
+	}
+	return weight;
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm_heap_tree.h b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm_heap_tree.h
new file mode 100644
index 0000000..bba7e8e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm_heap_tree.h
@@ -0,0 +1,514 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALGORITHM_HEAP_TREE_H
+#define SEQAN_HEADER_GRAPH_ALGORITHM_HEAP_TREE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// HeapTree Specs
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec = Default>
+struct KeylessHeap;	
+
+
+template<typename TSpec = Default>
+struct KeyedHeap;	
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Default HeapTree
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue = unsigned int, typename TPredicate = std::less<unsigned int>, typename TSpec = KeylessHeap<> >
+class HeapTree;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec>
+class HeapTree<TValue, TPredicate, KeylessHeap<TSpec> > 
+{
+public:	
+	typedef typename Size<HeapTree>::Type TSize;
+	String<TValue> data_value;
+	TSize data_heap_size;
+	TPredicate data_predicate;
+
+	
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	HeapTree() : data_heap_size(0) {
+		SEQAN_CHECKPOINT
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	HeapTree(HeapTree const& _other) {
+		SEQAN_CHECKPOINT
+		data_value = _other.data_value;
+		data_heap_size = _other.data_heap_size;
+		data_predicate = _other.data_predicate;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	~HeapTree() {
+		SEQAN_CHECKPOINT
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	HeapTree& operator=(HeapTree const& _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_value = _other.data_value;
+		data_heap_size = _other.data_heap_size;
+		data_predicate = _other.data_predicate;
+		return *this;
+	}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec>
+struct Value<HeapTree<TValue, TPredicate, TSpec> >
+{
+	typedef TValue Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec>
+struct Value<HeapTree<TValue, TPredicate, TSpec> const>
+{
+	typedef TValue Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize>
+inline TSize _left(TSize i) {
+	SEQAN_CHECKPOINT
+	return i << 1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize>
+inline TSize _right(TSize i) {
+	SEQAN_CHECKPOINT
+	return ((i << 1) + 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize>
+inline TSize _parent(TSize i) {
+	SEQAN_CHECKPOINT
+	return (i >> 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec>
+inline bool 
+empty(HeapTree<TValue, TPredicate, TSpec> const& mHeap) 
+{
+	SEQAN_CHECKPOINT
+	return (mHeap.data_heap_size == 0); 
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec>
+inline typename Size<HeapTree<TValue, TPredicate, TSpec> >::Type
+length(HeapTree<TValue, TPredicate, TSpec> const& mHeap)
+{ 
+	SEQAN_CHECKPOINT
+	return mHeap.data_heap_size;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec>
+inline TValue 
+heapRoot(HeapTree<TValue, TPredicate, TSpec>& mHeap) 
+{
+	return value(mHeap.data_value, 1);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec>
+inline TValue 
+heapRoot(HeapTree<TValue, TPredicate, TSpec> const& mHeap) 
+{
+	return value(mHeap.data_value, 1);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec, typename TObject>
+inline void 
+heapInsert(HeapTree<TValue, TPredicate, TSpec>& mHeap,
+		   TObject object) 
+{
+	SEQAN_CHECKPOINT
+	typedef HeapTree<TValue, TPredicate, TSpec> THeapTree;
+	typedef typename Size<THeapTree>::Type TSize;
+	
+	++mHeap.data_heap_size;
+	resize(mHeap.data_value, mHeap.data_heap_size + 1, Generous() );
+	TSize i = mHeap.data_heap_size;
+	_insertObject(mHeap, i, object);
+	while ((i>1) && (!(mHeap.data_predicate(value(mHeap.data_value, _parent(i)), value(mHeap.data_value, i))))) {
+		_swapObjects(mHeap, i, _parent(i));
+		i = _parent(i);
+	}
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec, typename TSize>
+inline void 
+heapify(HeapTree<TValue, TPredicate, TSpec>& mHeap,
+		TSize i) 
+{
+	SEQAN_CHECKPOINT
+	TSize l = _left(i);
+	TSize r = _right(i);
+	TSize largest = i;
+	if ((l <= (TSize) mHeap.data_heap_size) && (mHeap.data_predicate(value(mHeap.data_value, l), value(mHeap.data_value, i)))) largest = l;
+	if ((r <= (TSize) mHeap.data_heap_size) && (mHeap.data_predicate(value(mHeap.data_value, r), value(mHeap.data_value, largest)))) largest = r;
+	if (largest != i) {
+		_swapObjects(mHeap, i, largest);
+		heapify(mHeap, largest);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec, typename TITBegin, typename TITEnd>
+inline void 
+buildHeap(HeapTree<TValue, TPredicate, TSpec>& mHeap,
+		  TITBegin itBeg,
+		  TITEnd itEnd) 
+{
+	SEQAN_CHECKPOINT
+	typedef HeapTree<TValue, TPredicate, TSpec> THeapTree;
+	typedef typename Size<THeapTree>::Type TSize;
+
+	// Leave out the first element
+	resize(mHeap.data_value, (itEnd - itBeg) + 1);
+	value(mHeap.data_value, 0) = TValue();
+	mHeap.data_heap_size = 0;
+	for(;itBeg != itEnd; goNext(itBeg), ++mHeap.data_heap_size) {
+		_insertObject(mHeap, mHeap.data_heap_size + 1, value(itBeg));
+	}
+	for(TSize i = (mHeap.data_heap_size / 2); i>0; --i) heapify(mHeap, i);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec, typename TIndex1, typename TIndex2>
+inline void
+_swapObjects(HeapTree<TValue, TPredicate, KeylessHeap<TSpec> >& mHeap,
+			 TIndex1 i,
+			 TIndex2 j) 
+{
+	SEQAN_CHECKPOINT
+	TValue tmp = value(mHeap.data_value, i);
+	value(mHeap.data_value, i) = value(mHeap.data_value, j);
+	value(mHeap.data_value, j) = tmp;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec, typename TIndex, typename TObject>
+inline void
+_insertObject(HeapTree<TValue, TPredicate, KeylessHeap<TSpec> >& mHeap,
+			  TIndex i,
+			  TObject obj)
+{
+	SEQAN_CHECKPOINT
+	value(mHeap.data_value, i) = obj;
+}
+		
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec>
+inline TValue 
+heapExtractRoot(HeapTree<TValue, TPredicate, KeylessHeap<TSpec> >& mHeap) 
+{
+	SEQAN_CHECKPOINT
+	TValue rootVal = value(mHeap.data_value, 1);
+	value(mHeap.data_value, 1) = value(mHeap.data_value, mHeap.data_heap_size);
+	--mHeap.data_heap_size;
+	heapify(mHeap, 1);
+	return rootVal;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TPredicate, typename TSpec>
+inline void 
+clear(HeapTree<TValue, TPredicate, TSpec>& mHeap)
+{
+	clear(mHeap.data_value); 
+	mHeap.data_heap_size = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TITBegin, typename TITEnd, typename TPredicate>
+inline void 
+heapSort(TITBegin itBeg,
+		 TITEnd itEnd,
+		 TPredicate)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TITBegin>::Type TValue;
+	typedef typename Size<TITBegin>::Type TSize;
+	HeapTree<TValue, TPredicate> mHeap;
+	TITBegin itFill = itBeg;
+	buildHeap(mHeap, itBeg, itEnd);
+	for(TSize i = mHeap.data_heap_size; i>1; --i) {
+		value(itFill) = value(mHeap.data_value, 1);
+		goNext(itFill);
+		value(mHeap.data_value, 1) = value(mHeap.data_value, i);
+		--mHeap.data_heap_size;
+		heapify(mHeap, 1);
+	}
+	value(itFill) = value(mHeap.data_value, 2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TITBegin, typename TITEnd>
+inline void 
+heapSort(TITBegin itBeg,
+		 TITEnd itEnd)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TITBegin>::Type TValue;
+	heapSort(itBeg, itEnd, std::less<TValue>());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TKey, typename TValue, typename TPredicate>
+struct LessPairI2WithFunctor :
+	public ::std::unary_function<Pair<TKey, TValue>, bool>
+{
+	inline bool 
+	operator() (Pair<TKey, TValue> const& a1, Pair<TKey, TValue> const& a2) {
+		TPredicate private_Predicate;
+		return private_Predicate(a1.i2, a2.i2);
+	}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TKey, typename TValue, typename TPredicate, typename TSpec>
+class HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >
+{
+public:	
+	typedef typename Size<HeapTree>::Type TSize;
+	String<Pair<TKey, TValue> > data_value;
+	std::map<TKey, TSize> data_map;
+	TSize data_heap_size;
+	LessPairI2WithFunctor<TKey, TValue, TPredicate> data_predicate;
+	
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	HeapTree() : data_heap_size(0) {
+		SEQAN_CHECKPOINT
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	HeapTree(HeapTree const& _other) {
+		SEQAN_CHECKPOINT
+		data_value = _other.data_value;
+		data_map = _other.data_map;
+		data_heap_size = _other.data_heap_size;
+		data_predicate = _other.data_predicate;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	~HeapTree() {
+		SEQAN_CHECKPOINT
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	HeapTree& operator=(HeapTree const& _other) {
+		SEQAN_CHECKPOINT
+		data_value = _other.data_value;
+		data_map = _other.data_map;
+		data_heap_size = _other.data_heap_size;
+		data_predicate = _other.data_predicate;
+		return *this;
+	}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TKey, typename TValue, typename TPredicate, typename TSpec, typename TIndex1, typename TIndex2>
+inline void
+_swapObjects(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap,
+			 TIndex1 i,
+			 TIndex2 j) 
+{
+	SEQAN_CHECKPOINT
+	typedef HeapTree<Pair<TKey, TValue>, TPredicate, TSpec> THeapTree;
+	typedef typename Size<THeapTree>::Type TSize;
+	typedef std::map<TKey, TSize> TMap;
+	typedef typename TMap::iterator TMapIter;
+	// Swap keys
+	TMapIter pos1 = mHeap.data_map.find(value(mHeap.data_value, i).i1);
+	TMapIter pos2 = mHeap.data_map.find(value(mHeap.data_value, j).i1);
+	TSize tmpVal = pos1->second;
+	pos1->second = pos2->second;
+	pos2->second = tmpVal;
+
+	// Swap object in heap tree
+	Pair<TKey, TValue> tmp = value(mHeap.data_value, i);
+	value(mHeap.data_value, i) = value(mHeap.data_value, j);
+	value(mHeap.data_value, j) = tmp;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TKey, typename TValue, typename TPredicate, typename TSpec, typename TIndex, typename TObject>
+inline void
+_insertObject(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap,
+			  TIndex i,
+			  TObject obj)
+{
+	SEQAN_CHECKPOINT
+	typedef HeapTree<Pair<TKey, TValue>, TPredicate, TSpec> THeapTree;
+	typedef typename Size<THeapTree>::Type TSize;
+	value(mHeap.data_value, i) = obj;
+	if (!mHeap.data_map.insert(std::pair<TKey, TSize>(obj.i1, i)).second) {
+		mHeap.data_map.find(obj.i1)->second = i;
+	};
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TKey, typename TValue, typename TPredicate, typename TSpec>
+inline Pair<TKey, TValue> 
+heapExtractRoot(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap) 
+{
+	SEQAN_CHECKPOINT
+	Pair<TKey, TValue> rootVal = value(mHeap.data_value, 1);
+	mHeap.data_map.erase(mHeap.data_map.find(rootVal.i1));
+	if (mHeap.data_heap_size != 1) {
+		value(mHeap.data_value, 1) = value(mHeap.data_value, mHeap.data_heap_size);
+		mHeap.data_map.find(value(mHeap.data_value, 1).i1)->second = 1;
+	}
+	--mHeap.data_heap_size;
+	heapify(mHeap, 1);
+	return rootVal;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TKey, typename TValue, typename TPredicate, typename TSpec, typename TKey1, typename TValue2>
+inline void 
+heapChangeValue(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap,
+				TKey1 key,
+				TValue2 val) 
+{
+	SEQAN_CHECKPOINT
+	typedef HeapTree<Pair<TKey, TValue>, TPredicate, TSpec> THeapTree;
+	typedef typename Size<THeapTree>::Type TSize;
+	TSize i = mHeap.data_map.find(key)->second;
+	Pair<TKey, TValue> obj = Pair<TKey, TValue>(key,val);
+	if (!(mHeap.data_predicate(obj, value(mHeap.data_value, i)))) {
+		_insertObject(mHeap, i, obj);
+		heapify(mHeap, i);
+	} else {
+		_insertObject(mHeap, i, obj);
+		while ((i>1) && (!mHeap.data_predicate(value(mHeap.data_value, _parent(i)), value(mHeap.data_value, i)))) {
+			_swapObjects(mHeap, i, _parent(i));
+			i = _parent(i);
+		}
+	}
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TKey, typename TValue, typename TPredicate, typename TSpec, typename TKey1>
+inline TValue 
+heapGetValue(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap,
+			 TKey1 key) 
+{
+	SEQAN_CHECKPOINT
+	typedef HeapTree<Pair<TKey, TValue>, TPredicate, TSpec> THeapTree;
+	typedef typename Size<THeapTree>::Type TSize;
+	TSize i = mHeap.data_map.find(key)->second;
+	return value(mHeap.data_value, i).i2;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TKey, typename TValue, typename TPredicate, typename TSpec>
+inline void 
+clear(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap)
+{
+	clear(mHeap.data_value); 
+	mHeap.data_map.clear();
+	mHeap.data_heap_size = 0;
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm_hmm.h b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm_hmm.h
new file mode 100644
index 0000000..c083404
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm_hmm.h
@@ -0,0 +1,1162 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALGORITHM_HMM_H
+#define SEQAN_HEADER_GRAPH_ALGORITHM_HMM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Basic HMM algorithms
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.viterbiAlgorithm:
+..cat:Graph
+..summary:Implements the viterbi algorithm.
+..signature:viterbiAlgorithm(hmm, seq, path)
+..param.hmm:In-parameter:Input HMM.
+...type:Spec.Hmm
+..param.seq:In-parameter:Input sequence.
+..param.path:Out-parameter:State path.
+..returns:TCargo
+...remarks:Probability of the path.
+..see:Function.forwardAlgorithm
+..see:Function.backwardAlgorithm
+..include:seqan/graph_algorithms.h
+*/
+template<typename TAlphabet, typename TProbability, typename TSpec, typename TSequence, typename TPath>
+inline TProbability
+viterbiAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm,
+				 TSequence const& seq,
+				 TPath& path)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+
+	// Initialization
+	String<TProbability> vMat;
+	String<TSize> traceback;
+	TSize numCols = length(seq) + 2;
+	TSize numRows = getIdUpperBound(_getVertexIdManager(hmm));
+	resize(vMat, numCols * numRows, 0.0);
+	resize(traceback, numCols * numRows);
+	value(vMat, getBeginState(hmm)) = 1.0;
+	TVertexDescriptor bState = getBeginState(hmm);
+	TVertexDescriptor eState = getEndState(hmm);
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+
+	// Distinct between silent states and real states
+	typedef String<TVertexDescriptor> TStateSet;
+	typedef typename Iterator<TStateSet>::Type TStateIter;
+	TStateSet silentStates;
+	TStateSet realStates;
+	TVertexIterator itVertex(hmm);
+	for(;!atEnd(itVertex);goNext(itVertex)) {
+		if (isSilent(hmm, value(itVertex))) { 
+			appendValue(silentStates, value(itVertex));
+		} else {
+			appendValue(realStates, value(itVertex));
+		}
+	}
+
+	// Initialization for silent states connected to the begin state
+	TStateIter itSilentStateEnd = end(silentStates);
+	for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+		if ((value(itSilentState) == bState) || (value(itSilentState) == eState)) continue;
+		TProbability maxValue = 0.0;
+		TVertexDescriptor maxVertex = nilVertex;
+
+		for(TStateIter itBelow = begin(silentStates); itBelow != itSilentState; goNext(itBelow)) {
+			TProbability local = value(vMat, value(itBelow)) * getTransitionProbability(hmm, value(itBelow), value(itSilentState));
+			if (local > maxValue) {
+				maxValue = local;
+				maxVertex = value(itBelow);
+			}
+		}
+
+		// Set traceback vertex
+		if (maxVertex != nilVertex) {
+			value(vMat, value(itSilentState)) = maxValue;		
+			value(traceback, value(itSilentState)) = maxVertex;
+		}
+	}
+
+	// Recurrence
+	TSize len = length(seq);
+	for(TSize i=1; i<=len; ++i) {
+		// Iterate over real states
+		TStateIter itRealStateEnd = end(realStates);
+		for(TStateIter itRealState = begin(realStates); itRealState != itRealStateEnd; goNext(itRealState)) {
+			// Find maximum
+			TProbability maxValue = 0.0;
+			TVertexDescriptor maxVertex = nilVertex;
+			TVertexIterator itMax(hmm);
+			for(;!atEnd(itMax);++itMax) {
+				TProbability local = value(vMat, (i-1) * numRows + value(itMax)) * getTransitionProbability(hmm, value(itMax), value(itRealState));
+				if (local > maxValue) {
+					maxValue = local;
+					maxVertex = *itMax;
+				}
+			}
+			// Set traceback vertex
+			if (maxVertex != nilVertex) {
+				value(vMat, i * numRows + value(itRealState)) = maxValue * getEmissionProbability(hmm, value(itRealState), value(seq, i-1));
+				value(traceback, i * numRows + value(itRealState)) = maxVertex;
+			}
+		}
+
+		// Iterate over silent states
+		for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+			if ((value(itSilentState) == bState) || (value(itSilentState) == eState)) continue;
+			// Find maximum
+			TProbability maxValue = 0.0;
+			TVertexDescriptor maxVertex = nilVertex;
+	
+			// Iterate over real states
+			for(TStateIter itRealState = begin(realStates); itRealState != itRealStateEnd; goNext(itRealState)) {
+				TProbability local = value(vMat, i * numRows + value(itRealState)) * getTransitionProbability(hmm, value(itRealState), value(itSilentState));
+				if (local > maxValue) {
+					maxValue = local;
+					maxVertex = value(itRealState);
+				}
+			}
+			// Iterate over silent states in increasing order
+			for(TStateIter itBelow = begin(silentStates); itBelow != itSilentState; goNext(itBelow)) {
+				TProbability local = value(vMat, i * numRows + value(itBelow)) * getTransitionProbability(hmm, value(itBelow), value(itSilentState));
+				if (local > maxValue) {
+					maxValue = local;
+					maxVertex = value(itBelow);
+				}
+			}
+			// Set traceback vertex
+			if (maxVertex != nilVertex) {
+				value(traceback, i * numRows + value(itSilentState)) = maxVertex;
+				value(vMat, i * numRows + value(itSilentState)) = maxValue;		
+			}
+		}
+	}
+
+	// Termination
+	TProbability maxValue = 0.0;
+	TVertexDescriptor maxVertex = 0;
+	TVertexIterator itMax(hmm);
+	for(;!atEnd(itMax);++itMax) {
+		TProbability local = value(vMat, len * numRows + *itMax) * getTransitionProbability(hmm, value(itMax), eState);
+		if (local > maxValue) {
+			maxValue = local;
+			maxVertex = value(itMax);
+		}
+	}
+	value(traceback, (len + 1) * numRows + eState) = maxVertex;
+	if (maxVertex != nilVertex) value(vMat, (len+1) * numRows + eState) = maxValue;
+
+	// Traceback
+	if (maxValue > 0.0) {
+		clear(path);
+		TVertexDescriptor oldState = eState;
+		appendValue(path, oldState);
+		for(TSize i = len + 1; i>=1; --i) {
+			do {
+				if ((!isSilent(hmm, oldState)) || (oldState == eState)) oldState = value(traceback, i * numRows + oldState);
+				else oldState = value(traceback, (i - 1) * numRows + oldState);
+				appendValue(path, oldState);
+			} while ((isSilent(hmm, oldState)) && (oldState != bState));
+		}
+		std::reverse(begin(path), end(path));
+	}
+	
+	//// Debug code
+	//for(TSize i = 0; i<numRows; ++i) {
+	//	for(TSize j=0; j<numCols; ++j) {
+	//		std::cout << value(vMat, j*numRows + i) << ',';
+	//		//std::cout << value(traceback, j*numRows + i) << ',';
+	//	}
+	//	std::cout << std::endl;
+	//}
+	//for(TSize i = 0; i<length(path); ++i) {
+	//	std::cout << path[i] << ',';
+	//}
+	//std::cout << std::endl;
+
+	return value(vMat, (len+1) * numRows + eState);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TProbability, typename TSpec, typename TSequence, typename TForwardMatrix>
+inline TProbability
+_forwardAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm,
+				   TSequence const& seq,
+				   TForwardMatrix& fMat)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+
+	// Initialization
+	TSize numCols = length(seq) + 2;
+	TSize numRows = getIdUpperBound(_getVertexIdManager(hmm));
+	resize(fMat, numCols * numRows, 0.0);
+	value(fMat, getBeginState(hmm)) = 1.0;
+	TVertexDescriptor bState = getBeginState(hmm);
+	TVertexDescriptor eState = getEndState(hmm);
+
+	// Distinct between silent states and real states
+	typedef String<TVertexDescriptor> TStateSet;
+	typedef typename Iterator<TStateSet>::Type TStateIter;
+	TStateSet silentStates;
+	TStateSet realStates;
+	TVertexIterator itVertex(hmm);
+	for(;!atEnd(itVertex);goNext(itVertex)) {
+		if (isSilent(hmm, value(itVertex))) { 
+			appendValue(silentStates, value(itVertex));
+		} else {
+			appendValue(realStates, value(itVertex));
+		}
+	}
+
+	// Initialization for silent states connected to the begin state
+	TStateIter itSilentStateEnd = end(silentStates);
+	for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+		if ((value(itSilentState) == bState) || (value(itSilentState) == eState)) continue;
+		TProbability sumValue = 0.0;
+		for(TStateIter itBelow = begin(silentStates); itBelow != itSilentState; goNext(itBelow)) {
+			sumValue += value(fMat, value(itBelow)) * getTransitionProbability(hmm, value(itBelow), value(itSilentState));
+		}
+		value(fMat, value(itSilentState)) = sumValue;		
+	}
+
+	// Recurrence
+	TSize len = length(seq);
+	for(TSize i=1; i<=len; ++i) {
+		// Iterate over real states
+		TStateIter itRealStateEnd = end(realStates);
+		for(TStateIter itRealState = begin(realStates); itRealState != itRealStateEnd; goNext(itRealState)) {
+			TProbability sum = 0.0;
+			TVertexIterator itAll(hmm);
+			for(;!atEnd(itAll);++itAll) sum += value(fMat, (i-1) * numRows + value(itAll)) * getTransitionProbability(hmm, value(itAll), value(itRealState));
+			value(fMat, i * numRows + value(itRealState)) = getEmissionProbability(hmm, value(itRealState), seq[i-1]) * sum;
+		}
+
+		// Iterate over silent states
+		for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+			if ((value(itSilentState) == bState) || (value(itSilentState) == eState)) continue;
+			TProbability sumValue = 0.0;
+			// Iterate over real states
+			for(TStateIter itRealState = begin(realStates); itRealState != itRealStateEnd; goNext(itRealState)) {
+				sumValue += value(fMat, i * numRows + value(itRealState)) * getTransitionProbability(hmm, value(itRealState), value(itSilentState));
+			}
+			// Iterate over silent states in increasing order
+			for(TStateIter itBelow = begin(silentStates); itBelow != itSilentState; goNext(itBelow)) {
+				sumValue += value(fMat, i * numRows + value(itBelow)) * getTransitionProbability(hmm, value(itBelow), value(itSilentState));
+			}
+			value(fMat, i * numRows + value(itSilentState)) = sumValue;
+		}
+	}
+
+	// Termination
+	TProbability sum = 0.0;
+	TVertexIterator itAll(hmm);
+	for(;!atEnd(itAll);++itAll) {
+		sum += value(fMat, len * numRows + value(itAll)) * getTransitionProbability(hmm, value(itAll), eState);
+	}
+	value(fMat, (len+1) * numRows + eState) = sum;
+
+	//// Debug code
+	//for(TSize i = 0; i<numRows; ++i) {
+	//	for(TSize j=0; j<numCols; ++j) {
+	//		std::cout << value(fMat, j*numRows + i) << ',';
+	//	}
+	//	std::cout << std::endl;
+	//}
+
+	return value(fMat, (len+1) * numRows + eState);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.forwardAlgorithm:
+..cat:Graph
+..summary:Implements the forward algorithm.
+..signature:forwardAlgorithm(hmm, seq)
+..param.hmm:In-parameter:Input HMM.
+...type:Spec.Hmm
+..param.seq:In-parameter:Input sequence.
+..returns:TProbability
+...remarks:Probability of the sequence.
+..see:Function.viterbiAlgorithm
+..see:Function.backwardAlgorithm
+..include:seqan/graph_algorithms.h
+*/
+template<typename TAlphabet, typename TProbability, typename TSpec, typename TSequence>
+inline TProbability
+forwardAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm,
+				 TSequence const& seq)
+{
+	SEQAN_CHECKPOINT
+	String<TProbability> fMat;
+	return _forwardAlgorithm(hmm, seq, fMat);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TProbability, typename TSpec, typename TSequence, typename TBackwardMatrix>
+inline TProbability
+_backwardAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm,
+					TSequence const& seq,
+					TBackwardMatrix& bMat)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+
+	// Initialization
+	TSize numCols = length(seq) + 2;
+	TSize numRows = getIdUpperBound(_getVertexIdManager(hmm));
+	resize(bMat, numCols * numRows, 0.0);
+	TVertexDescriptor bState = getBeginState(hmm);
+	TVertexDescriptor eState = getEndState(hmm);
+	TSize len = length(seq);
+	value(bMat, (len + 1) * numRows + eState) = 1.0;
+	
+	// Distinct between silent states and real states
+	typedef String<TVertexDescriptor> TStateSet;
+	typedef typename Iterator<TStateSet>::Type TStateIter;
+	TStateSet silentStates;
+	TStateSet realStates;
+	TVertexIterator itVertex(hmm);
+	for(;!atEnd(itVertex);goNext(itVertex)) {
+		if (isSilent(hmm, value(itVertex))) { 
+			appendValue(silentStates, value(itVertex));
+		} else {
+			appendValue(realStates, value(itVertex));
+		}
+	}
+	// Reverse the silent states order
+	std::reverse(begin(silentStates), end(silentStates));
+
+	// Initialization for silent states connected to the end state
+	TStateIter itSilentStateEnd = end(silentStates);
+	for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+		if (value(itSilentState) == eState) continue;
+		TProbability sumValue = getTransitionProbability(hmm, value(itSilentState), eState);
+		for(TStateIter itAbove = begin(silentStates); itAbove != itSilentState; goNext(itAbove)) {
+			sumValue += value(bMat, len * numRows + value(itAbove)) * getTransitionProbability(hmm, value(itSilentState), value(itAbove));
+		}
+		value(bMat, len * numRows + value(itSilentState)) = sumValue;
+	}
+
+	// Initialization for real states
+	TStateIter itRealStateEnd = end(realStates);
+	for(TStateIter itRealState = begin(realStates); itRealState != itRealStateEnd; goNext(itRealState)) {
+		TProbability sumValue = getTransitionProbability(hmm, value(itRealState), eState);
+		for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+			sumValue += value(bMat, len * numRows + value(itSilentState)) * getTransitionProbability(hmm, value(itRealState), value(itSilentState));
+		}
+		value(bMat, len * numRows + value(itRealState)) = sumValue;
+	}
+
+	
+	// Recurrence
+	if (len > 0) {
+		for(TSize i=len - 1; i>0; --i) {
+			// Iterate over silent states
+			for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+				if ((value(itSilentState) == bState) || (value(itSilentState) == eState)) continue;
+				TProbability sumValue = 0.0;
+				// Iterate over real states
+				for(TStateIter itRealState = begin(realStates); itRealState != itRealStateEnd; goNext(itRealState)) {
+					sumValue += value(bMat, (i+1) * numRows + value(itRealState)) * getTransitionProbability(hmm, value(itSilentState), value(itRealState))* getEmissionProbability(hmm, value(itRealState), value(seq, i));
+				}
+				// Iterate over silent states in decreasing order
+				for(TStateIter itAbove = begin(silentStates); itAbove != itSilentState; goNext(itAbove)) {
+					if ((value(itAbove) == bState) || (value(itAbove) == eState)) continue;
+					sumValue += value(bMat, i * numRows + value(itAbove)) * getTransitionProbability(hmm, value(itSilentState), value(itAbove));
+				}
+				value(bMat, i * numRows + value(itSilentState)) = sumValue;
+			}
+
+			// Iteration over real states
+			for(TStateIter itRealState = begin(realStates); itRealState != itRealStateEnd; goNext(itRealState)) {
+				TProbability sumValue = 0.0;
+				// Iterate over silent states
+				for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+					if ((value(itSilentState) == bState) || (value(itSilentState) == eState)) continue;
+					sumValue += value(bMat, i * numRows + value(itSilentState)) * getTransitionProbability(hmm, value(itRealState), value(itSilentState));
+				}
+				// Iterate over real states
+				for(TStateIter itR = begin(realStates); itR != itRealStateEnd; goNext(itR)) {
+					sumValue += value(bMat, (i+1) * numRows + value(itR)) * getTransitionProbability(hmm, value(itRealState), value(itR)) * getEmissionProbability(hmm, value(itR), value(seq, i));
+				}
+				value(bMat, i * numRows + value(itRealState)) =  sumValue;
+			}
+		}
+	
+		// Termination
+		// Iterate over silent states
+		for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+			if ((value(itSilentState) == bState) || (value(itSilentState) == eState)) continue;
+			TProbability sumValue = 0.0;
+			// Iterate over real states
+			for(TStateIter itRealState = begin(realStates); itRealState != itRealStateEnd; goNext(itRealState)) {
+				sumValue += value(bMat, 1 * numRows + value(itRealState)) * getTransitionProbability(hmm, value(itSilentState), value(itRealState))* getEmissionProbability(hmm, value(itRealState), value(seq, 0));
+			}
+			// Iterate over silent states in decreasing order
+			for(TStateIter itAbove = begin(silentStates); itAbove != itSilentState; goNext(itAbove)) {
+				if ((value(itAbove) == bState) || (value(itAbove) == eState)) continue;
+				sumValue += value(bMat, value(itAbove)) * getTransitionProbability(hmm, value(itSilentState), value(itAbove));
+			}
+			value(bMat, value(itSilentState)) = sumValue;
+		}
+		// Sum up all values
+		TProbability sumValue = 0.0;
+		for(TStateIter itSilentState = begin(silentStates); itSilentState != itSilentStateEnd; goNext(itSilentState)) {
+			if ((value(itSilentState) == bState) || (value(itSilentState) == eState)) continue;
+			sumValue += value(bMat, value(itSilentState)) * getTransitionProbability(hmm, bState, value(itSilentState));
+		}
+		for(TStateIter itRealState = begin(realStates); itRealState != itRealStateEnd; goNext(itRealState)) {
+			sumValue += value(bMat, 1 * numRows + value(itRealState)) * getTransitionProbability(hmm, bState, value(itRealState)) * getEmissionProbability(hmm, value(itRealState), value(seq, 0));
+		}
+		value(bMat, bState) = sumValue;
+	}
+
+	//// Debug code
+	//for(TSize i = 0; i<numRows; ++i) {
+	//	for(TSize j=0; j<numCols; ++j) {
+	//		std::cout << value(bMat, j*numRows + i) << ',';
+	//	}
+	//	std::cout << std::endl;
+	//}
+
+	return value(bMat, bState);
+}
+	
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.backwardAlgorithm:
+..cat:Graph
+..summary:Implements the backward algorithm.
+..signature:backwardAlgorithm(hmm, seq)
+..param.hmm:In-parameter:Input HMM.
+...type:Spec.Hmm
+..param.seq:In-parameter:Input sequence.
+..returns:TProbability
+...remarks:Probability of the sequence.
+..see:Function.viterbiAlgorithm
+..see:Function.forwardAlgorithm
+..include:seqan/graph_algorithms.h
+*/
+template<typename TAlphabet, typename TProbability, typename TSpec, typename TSequence>
+inline TProbability
+backwardAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm,
+				  TSequence const& seq)
+{
+	SEQAN_CHECKPOINT
+	String<TProbability> bMat;
+	return _backwardAlgorithm(hmm, seq, bMat);
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.generateSequence:
+..cat:Graph
+..summary:Generates random state and alphabet sequences of a given HMM.
+..signature:generateSequence(hmm, sequences, states, numSeq, maxLength)
+..param.hmm:In-parameter:Input HMM.
+...type:Spec.Hmm
+..param.sequences:The StringSet of alphabet sequences.
+...type:Class.StringSet
+..param.sequences:The StringSet of state sequences.
+...type:Class.StringSet
+..param.numSeq:The number of sequences to generate.
+..param.maxLength:The maximum length of the sequences.
+...remarks:Sequences might be shorter if the end state is reached prior to maxLength. 
+..remarks: Because of silent states, generated alphabet and state sequences might have different length.
+..returns:void
+..include:seqan/graph_algorithms.h
+*/
+template<typename TAlphabet, typename TProbability, typename TSpec,typename TSequenceSet, typename TStateSeqSet, typename TSize>
+inline void
+generateSequence(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm,
+				 TSequenceSet& sequences,
+				 TStateSeqSet& states,
+				 TSize numSeq,
+				 TSize maxLength) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Value<TSequenceSet>::Type TSequence;
+	typedef typename Value<TStateSeqSet>::Type TStateSeq;
+	
+	// Initialization
+	mtRandInit();
+	clear(sequences);
+	clear(states);
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+	
+	// Simulate sequences
+	TVertexDescriptor currentState;
+	TVertexDescriptor endState = getEndState(hmm);
+	for(TSize i=0;i<numSeq;++i){
+		currentState = getBeginState(hmm);
+		TSequence seq;
+		TStateSeq stat;
+		appendValue(stat, getBeginState(hmm));
+		bool stop = false;
+		TSize pos = 0; 
+		while (pos < maxLength) {
+			TProbability prob = (double) (mtRand() % 100000) / (double) (100000);
+			TProbability compareProb = 0.0;
+			TOutEdgeIterator itState(hmm, currentState);
+			// Determine the next state
+			for(;!atEnd(itState);++itState) {
+				// Probability of the next transition
+				compareProb += getTransitionProbability(hmm, value(itState));
+				// Compare with random probability
+				if (prob <= compareProb){
+					TVertexDescriptor nextState = targetVertex(hmm, value(itState));
+					if (nextState == endState) {
+						stop = true;
+						break;
+					}
+					appendValue(stat, nextState);
+					if (!isSilent(hmm, nextState)) {
+						compareProb =0.0;
+						prob = (double) (mtRand() % 100000) / (double) (100000);
+						for (TSize c=0;c<alphSize;++c){
+							compareProb += getEmissionProbability(hmm,targetVertex(hmm, value(itState)), TAlphabet(c));
+							if (prob <= compareProb) {
+								appendValue(seq, TAlphabet(c));
+								++pos;
+								break;
+							}
+						}
+					}
+					currentState = nextState;
+					break;
+				}
+			}
+			if (stop==true) break;
+		}
+		appendValue(stat, getEndState(hmm));
+		appendValue(sequences, seq);
+		appendValue(states, stat);
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TProbability, typename TSpec,typename TSequenceSet, typename TSize>
+inline void
+generateSequence(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm,
+				 TSequenceSet& sequences,
+				 TSize numSeq,
+				 TSize maxLength) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	StringSet<String<TVertexDescriptor> > states;
+	generateSequence(hmm, sequences, states, numSeq, maxLength);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Training algorithms
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TProbability, typename TSpec,typename TEmissionCounter, typename TTransitionCounter>
+inline void 
+_parameterEstimator(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm,
+					 TEmissionCounter const& emission,
+					 TTransitionCounter const& transition)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Value<TTransitionCounter>::Type TCounterValue;
+	
+	// Initialization
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+	TCounterValue pseudoCount = (TCounterValue) 1.0;
+
+	// Estimate the parameters from the counter values
+	TVertexIterator itAll(hmm);
+	for(;!atEnd(itAll);++itAll){
+		if (!isSilent(hmm, value(itAll))) {
+			TCounterValue summedCount = (TCounterValue) (0.0);
+			for(TSize i=0; i<alphSize;++i) summedCount += (pseudoCount + value(value(emission, value(itAll)),i));
+			for(TSize i=0; i<alphSize;++i) emissionProbability(hmm,value(itAll),TAlphabet(i)) = (pseudoCount + value(value(emission, value(itAll)),i)) / summedCount;
+		}
+		TCounterValue summedCount = (TCounterValue) (0.0);
+		TOutEdgeIterator itOutSum(hmm,value(itAll));
+		for(;!atEnd(itOutSum);++itOutSum) summedCount += (pseudoCount + getProperty(transition, value(itOutSum)));
+		TOutEdgeIterator itOut(hmm, value(itAll));
+		for(;!atEnd(itOut);++itOut) transitionProbability(hmm, value(itOut)) = (pseudoCount + getProperty(transition, value(itOut))) / summedCount;
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TProbability, typename TSpec, typename TSequenceSet, typename TStateSeqSet>
+inline void 
+estimationWithStates(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm,
+					 TSequenceSet& sequences,
+					 TStateSeqSet& states)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TStateSeqSet>::Type TStateSeq;
+	typedef typename Value<TStateSeq>::Type TState;
+	typedef typename Value<TSequenceSet>::Type TSequence;
+	typedef typename Value<TSequence>::Type TChar;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+
+	// Initialization
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+	typedef String<TSize> TCountString;
+	TCountString transitionCounter;
+	resize(transitionCounter, getIdUpperBound(_getEdgeIdManager(hmm)), 0);
+	StringSet<TCountString> emissionCounter;
+	TSize numRows = getIdUpperBound(_getVertexIdManager(hmm));
+	for(TSize i =0; i<numRows;++i) {
+		TCountString emisCount;
+		resize(emisCount,alphSize,0);
+		appendValue(emissionCounter,emisCount);
+	}
+	
+	// Iterate over all sequences
+	for (TSize j=0;j<length(states);++j) {
+		TSize posSeq = 0;
+		for (TSize i = 0;i<length(value(states,j));++i) {
+			TState s = value(value(states,j),i);
+			if (!isSilent(hmm, s)) {
+				TAlphabet c = value(value(sequences,j),posSeq);
+				value(value(emissionCounter, s), ordValue(c)) += 1;
+				++posSeq;
+			}
+			if (i<(length(value(states,j))-1)) {
+				TEdgeDescriptor currEdge = findEdge(hmm, s, value(value(states,j), (i+1)));
+				property(transitionCounter, currEdge) += 1;
+			}
+		}
+	}
+
+	//// Debug Code
+	//typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	//TEdgeIterator itE(hmm);
+	//for(;!atEnd(itE);goNext(itE)) std::cout << sourceVertex(itE) << ',' << targetVertex(itE) << ':' << property(transitionCounter, value(itE)) << std::endl;
+	//for(TSize j=0; j<length(emissionCounter); ++j) {
+	//	for(TSize i=0;i<length(value(emissionCounter, j));++i) {
+	//		std::cout << j << ":" << TAlphabet(i) << '=' << value(value(emissionCounter, j), i) << std::endl;
+	//	}
+	//}
+
+	// Estimate Parameters
+	_parameterEstimator(hmm,emissionCounter, transitionCounter);
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TProbability, typename TSpec>
+inline void
+_fillHmmUniform(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	
+	// Initialization
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+	
+	// Iterate over all states
+	TVertexIterator itState(hmm);
+	for(;!atEnd(itState);goNext(itState)) {		//pass through the states of the hmm	
+		TSize oD = outDegree(hmm, value(itState));
+		TOutEdgeIterator itOut(hmm, value(itState));
+		for (;!atEnd(itOut);goNext(itOut)) transitionProbability(hmm, value(itOut)) = (TProbability) (1.0 / (double) (oD));
+		if (!isSilent(hmm, value(itState))) {
+			for(TSize i=0;i<alphSize;++i){
+				emissionProbability(hmm,value(itState),TAlphabet(i)) = (TProbability) (1.0 / (double) (alphSize));
+			}
+		}
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TProbability, typename TSpec, typename TRNG>
+inline void
+_fillHmmRandom(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm,
+                TRNG & rng)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	
+	// Initialization
+    Pdf<Uniform<TSize> > pdf(20, 99);
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+	
+	// Iterate over all states
+	TVertexIterator itState(hmm);
+	for(;!atEnd(itState);goNext(itState)) {		//pass through the states of the hmm	
+		TSize oD = outDegree(hmm, value(itState));
+		if (oD > 0) {
+			String<TSize> counts;
+			TSize sum = 0;
+			for(TSize i = 0;i<oD;++i) {
+				TSize rd = pickRandomNumber(rng, pdf);
+				sum += rd;
+				appendValue(counts, rd);
+			}
+			TSize pos = 0;
+			TOutEdgeIterator itOut(hmm, value(itState));
+			for (;!atEnd(itOut);goNext(itOut), ++pos) transitionProbability(hmm, value(itOut)) = (TProbability) ((double) (value(counts, pos)) / (double) (sum));
+		}	
+		if (!isSilent(hmm, value(itState))) {
+			String<TSize> counts;
+			TSize sum = 0;
+			for(TSize i = 0;i<alphSize;++i) {
+				TSize rd = pickRandomNumber(rng, pdf);
+				sum += rd;
+				appendValue(counts, rd);
+			}
+			for(TSize i=0;i<alphSize;++i) emissionProbability(hmm,value(itState),TAlphabet(i)) = (TProbability) ((double) (value(counts, i)) / (double) (sum));
+		}
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TProbability, typename TSpec, typename TRNG>
+inline void
+randomizeHmm(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm,
+             TRNG & /*rng*/)
+{
+	//_fillHmmRandom(hmm, rng);
+	_fillHmmUniform(hmm);
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequence, typename TSize>
+inline TProbability 
+_baumWelchAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec > >& hmm,
+					 StringSet<TSequence> const& seqSet,
+					 TSize maxIter,
+					 TProbability epsilon)
+{
+	
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef String<TProbability> TCountString;
+
+	// Initialization
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+	TProbability lastTotalModelProb = 0.0;
+
+	// Randomize current HMM so only topology is preserved
+	randomizeHmm(hmm);
+
+	// Iterative Optimization
+	for(TSize iter=0; iter<maxIter; ++iter){
+		std::cout << "Iteration: "<< iter << std::endl;
+		std::cout << hmm << std::endl;
+		TCountString transitionCounter;
+		resize(transitionCounter, getIdUpperBound(_getEdgeIdManager(hmm)), 0.0);
+		StringSet<TCountString> emissionCounter;
+		TSize numRows = getIdUpperBound(_getVertexIdManager(hmm));
+		for(TSize i =0; i<numRows;++i) {
+			TCountString emisCount;
+			resize(emisCount,alphSize, 0.0);
+			appendValue(emissionCounter,emisCount);
+		}
+						
+		// MaximationStep
+		// Determine new contributions
+		TProbability totalModelLogProb = 0.0;
+		for (TSize i=0; i <length(seqSet);++i){		//sequences
+			TSize len = length(value(seqSet,i));
+
+			// Forward algorithm
+			String<TProbability> fMat;
+			TProbability modelLogProb = _forwardAlgorithm(hmm, value(seqSet,i), fMat);
+			totalModelLogProb += modelLogProb;
+			
+			// Backward algorithm
+			String<TProbability> bMat;
+			_backwardAlgorithm(hmm, value(seqSet,i), bMat);
+			
+			// Use the posterior probabilities to estimate counter values
+			for (TSize j=0;j<len;++j){  
+				TAlphabet c = value(value(seqSet,i),j);
+				TAlphabet nextC = c;
+				if (j < (len - 1))  nextC = value(value(seqSet,i),(j+1));
+				
+				// Iterate over all states
+				TVertexIterator itAll(hmm);		
+				for(;!atEnd(itAll);++itAll) {
+					// Handle begin state
+					if (value(itAll) == beginState(hmm)) {
+						if (j == 0) {
+							TOutEdgeIterator itOut(hmm, value(itAll));
+							for(;!atEnd(itOut); goNext(itOut)) {
+								if (!isSilent(hmm, targetVertex(itOut))) {
+									property(transitionCounter, value(itOut)) += (value(fMat, beginState(hmm)) * getTransitionProbability(hmm, value(itOut)) * getEmissionProbability(hmm, targetVertex(itOut), c) * value(bMat, numRows + targetVertex(itOut)) / modelLogProb);
+								} else {
+									property(transitionCounter, value(itOut)) += (value(fMat, beginState(hmm)) * getTransitionProbability(hmm, value(itOut)) * value(bMat, targetVertex(itOut)) / modelLogProb);
+								}
+							}
+						
+						}
+						continue;
+					}
+					// Ignore the end state
+					if (value(itAll) == endState(hmm)) continue;
+
+					// Determine emission expectation values
+					if (!isSilent(hmm, value(itAll))) value(value(emissionCounter, value(itAll)),ordValue(c)) += ((value(fMat, (j+1) * numRows + value(itAll)) * value(bMat, (j+1) * numRows + value(itAll))) / modelLogProb);
+					
+					// Determine transition expectation values
+					TOutEdgeIterator itOut(hmm, value(itAll));
+					for(;!atEnd(itOut); goNext(itOut)) {
+						// Handle the end state
+						if ((j == (len - 1)) && (targetVertex(itOut)==endState(hmm))) {
+							property(transitionCounter, value(itOut)) += (value(fMat, (j+1) * numRows + value(itAll)) * getTransitionProbability(hmm, value(itAll),endState(hmm)) / modelLogProb);
+						} else {
+							if (!isSilent(hmm, targetVertex(itOut))) {
+								if (j < (len - 1)) property(transitionCounter, value(itOut)) += (value(fMat, (j+1) * numRows + value(itAll)) * getTransitionProbability(hmm, value(itOut)) * getEmissionProbability(hmm, targetVertex(itOut), nextC) * value(bMat, (j+2) * numRows + targetVertex(itOut)) / modelLogProb);
+							} else {
+								property(transitionCounter, value(itOut)) += (value(fMat, (j+1) * numRows + value(itAll)) * getTransitionProbability(hmm, value(itOut)) * value(bMat, (j+1) * numRows + targetVertex(itOut)) / modelLogProb);
+							}
+						}
+					}
+				}
+			}
+		}
+		// Expectation step
+		_parameterEstimator(hmm,emissionCounter, transitionCounter);
+		
+
+		// Termination?
+		if ((iter > 5) && ((totalModelLogProb - lastTotalModelProb) < epsilon)) {
+			lastTotalModelProb = totalModelLogProb;
+			break;
+		} else {
+			lastTotalModelProb = totalModelLogProb;
+		}
+	}
+	return lastTotalModelProb;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequence>
+inline TProbability 
+baumWelchAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec > >& hmm,
+				   StringSet<TSequence> const& seqSet)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	TSize maxIter = 100;
+	TProbability epsilon = 0.00001;
+	return _baumWelchAlgorithm(hmm, seqSet, maxIter, epsilon);
+}
+
+/*
+//////////////////////////////////////////////////////////////////////////////
+// Profile HMMs
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template < typename TAlphabet, typename TProbability, typename TSpec, typename TMat, typename TConsensus, typename TSize>
+inline void
+_profileHmmCounter(Graph<Hmm<TAlphabet, TProbability, TSpec> >& pHmm,
+					TMat const& matr,
+					TConsensus const& consensus,
+					TSize const& numRows,
+					TSize const& numCols)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Value<TConsensus>::Type TValue;
+
+	// Initialization
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+	TValue gapChar = gapValue<TValue>();
+	TVertexDescriptor begState = beginState(pHmm);
+	TVertexDescriptor eState = endState(pHmm);
+	TVertexDescriptor matchState = 1;
+	TVertexDescriptor insertState = 2;
+	TVertexDescriptor deleteState = 3;
+
+	typedef String<TProbability> TCountString;
+	TCountString transitionCounter;
+	resize(transitionCounter, getIdUpperBound(_getEdgeIdManager(pHmm)), 0.0);
+	StringSet<TCountString> emissionCounter;
+	TSize nR = getIdUpperBound(_getVertexIdManager(pHmm));
+	for(TSize i =0; i<nR;++i) {
+		TCountString emisCount;
+		resize(emisCount,alphSize, 0.0);
+		appendValue(emissionCounter,emisCount);
+	}
+
+
+	String<TVertexDescriptor> oldCol;
+	String<TVertexDescriptor> currCol;
+	resize(oldCol, numRows, begState);
+	resize(currCol, numRows, 0);
+	TEdgeDescriptor currEdge;
+	
+	for(TSize i = 0; i<length(consensus); ++i) {
+		//transitionvalues
+		
+		//being in insertState
+		if (value(consensus, i)==gapChar){
+			for(TSize j = 0; j<numRows; ++j){
+				if ((value(matr, j * numCols + i)!=gapChar)){
+					value(currCol,j) = insertState; 
+					currEdge = findEdge(pHmm, value(oldCol,j), value(currCol,j));
+					property(transitionCounter, currEdge) += 1;
+					value(oldCol,j) = value(currCol,j);
+				}
+				else if ((value(matr, j * numCols + i)==gapChar) ){
+					value(currCol,j) = value(oldCol,j);
+				}
+			}
+		}
+		//being in normal State
+		else{
+			for(TSize j = 0; j<numRows; ++j){
+				if(value(matr, j * numCols + i)!=gapChar) value(currCol,j) = matchState; 
+				else value(currCol,j) = deleteState;
+				currEdge = findEdge(pHmm, value(oldCol,j), value(currCol,j));
+				property(transitionCounter, currEdge) += 1;
+				value(oldCol,j)=value(currCol,j);
+			}
+		}
+		//emissionvalues
+		if (value(consensus, i)==gapChar) {
+			for(TSize j = 0; j<numRows; ++j) 
+				if(value(matr, j * numCols + i)!=gapChar) 
+					value(value(emissionCounter, insertState), ordValue( (TAlphabet)  value(matr, j * numCols + i) ) ) += 1;
+			
+			continue;
+		}
+		else 
+			for(TSize j = 0; j<numRows; ++j) 
+				if(value(matr, j * numCols + i)!=gapChar) 
+					value(value(emissionCounter, matchState), ordValue( (TAlphabet)  value(matr, j * numCols + i) ) ) += 1;
+		
+		matchState+=3;
+		if ((insertState+3)==eState) insertState+=2;
+		else insertState+=3;
+		deleteState+=3;
+	}
+	
+	//transition in endState
+	for(TSize j = 0; j<numRows; ++j){
+		currEdge = findEdge(pHmm,value(currCol,j),eState);
+		property(transitionCounter, currEdge) += 1;
+	}
+	
+	_parameterEstimator(pHmm, emissionCounter, transitionCounter);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TConsensus>
+inline void
+_createProfileHmm(Graph<Hmm<TAlphabet, TCargo, TSpec> >& pHmm,
+				   TConsensus const& consensus)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Value<TConsensus>::Type TValue;
+	
+	// Initialization
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+	TValue gapChar = gapValue<TValue>();
+	clear(pHmm);
+	
+	// Add begin state
+	TVertexDescriptor begState = addVertex(pHmm);
+	assignBeginState(pHmm, begState);
+	
+	// Add for each consensus letter 3 states
+	for (TSize i=0;i<length(consensus);++i){
+		if (value(consensus,i) == gapChar) continue;
+		addVertex(pHmm); addVertex(pHmm); addVertex(pHmm, true);
+	}
+	
+	// Add last insertion state
+	TVertexDescriptor lastIState = addVertex(pHmm);
+	
+	// Add end state
+	TVertexDescriptor endState = addVertex(pHmm);
+	assignEndState(pHmm, endState);
+	
+	// Is there no consensus letter?
+	if (lastIState == 1) {
+		clear(pHmm);
+		return;
+	}
+
+	// Remember the kind of state
+	TVertexDescriptor mState = 1;
+	TVertexDescriptor iState = 2;
+	TVertexDescriptor dState = 3;
+
+	// Add tranistions from begin state
+	addEdge(pHmm, begState, mState);
+	addEdge(pHmm, begState, iState);
+	addEdge(pHmm, begState, dState);
+
+	// Add all remaining transitions
+	for (TSize i=0;i<length(consensus);++i){	
+		if (value(consensus,i) == gapChar) continue;
+		else if ((mState + 3) == lastIState) {
+			addEdge(pHmm, iState, mState);	
+			addEdge(pHmm, iState, iState);
+			addEdge(pHmm, iState, dState);
+			break;
+		}
+		else{
+			addEdge(pHmm, mState, (mState+3));
+			addEdge(pHmm, iState, mState);
+			addEdge(pHmm, dState, (mState+3));
+			addEdge(pHmm, mState, (iState+3));
+			addEdge(pHmm, iState, iState);
+			addEdge(pHmm, dState, (iState+3));
+			addEdge(pHmm, mState, (dState+3));
+			addEdge(pHmm, iState, dState);
+			addEdge(pHmm, dState, (dState+3));
+			mState+=3;
+			iState+=3;
+			dState+=3;
+		}
+	}
+
+	// Transitions to the endState and the last I-state
+	addEdge(pHmm, mState, endState);
+	addEdge(pHmm, mState, lastIState);
+	addEdge(pHmm, lastIState, endState);
+	addEdge(pHmm, lastIState, lastIState);
+	addEdge(pHmm, dState, endState);
+	addEdge(pHmm, dState, lastIState);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//e.g.
+//String<char> matr = "-AT---GAG-G-AG-CT-C--A--GT-G-CT---G";
+//msaToProfileHmm(matr, hmm, 5);
+
+template<typename TAlignmentChar, typename TAlphabet, typename TProbability, typename TSpec, typename TSize>
+inline void 
+msaToProfileHmm(String<TAlignmentChar> const& matr,
+				Graph<Hmm<TAlphabet, TProbability, TSpec> >& pHmm,
+				TSize nSeq)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TProbability, TSpec> > THmm;
+	
+	// Consensus 
+	String<unsigned int> coverage;
+	String<char> gappedConsensus;
+	String<Dna> consensusSequence;
+	consensusCalling(matr, consensusSequence, gappedConsensus, coverage, nSeq, MajorityVote() );
+
+	// Build the HMM topology
+	_createProfileHmm(pHmm,gappedConsensus);
+
+	// Parameterize the pHmm
+	TSize numCols = length(matr) / nSeq;
+	_profileHmmCounter(pHmm, matr, gappedConsensus, nSeq, numCols);
+}
+
+*/
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm_lis_his.h b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm_lis_his.h
new file mode 100644
index 0000000..6351cb8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithm_lis_his.h
@@ -0,0 +1,405 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALGORITHM_LIS_HIS_H
+#define SEQAN_HEADER_GRAPH_ALGORITHM_LIS_HIS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// LIS: Longest Increasing Subsequence
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSortedSequence, typename TKey>
+inline typename TSortedSequence::const_iterator
+_previousInSortedSequence(TSortedSequence const& list, TKey const key) {
+	SEQAN_CHECKPOINT
+	typedef typename TSortedSequence::const_iterator TSortedSequenceIter;
+
+	TSortedSequenceIter a_k_it = list.lower_bound(key);
+	// Now we need to move one to the front
+
+	if (a_k_it != list.end()) {
+		// If we are at the beginning, no predecessor
+		if (a_k_it == list.begin()) a_k_it = list.end();
+		else --a_k_it;
+	} else {
+		// If we are at the end, the predecessor is the last element of the list
+		TSortedSequenceIter tmp = list.begin();
+		if (tmp != list.end()) {
+			do {
+				a_k_it = tmp;
+			} while(++tmp != list.end());
+		}
+	}
+	return a_k_it;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TSortedSequence, typename TIterator>
+inline typename TSortedSequence::const_iterator
+_nextInSortedSequence(TSortedSequence const& list, TIterator const& prev) {
+	SEQAN_CHECKPOINT
+	typedef typename TSortedSequence::const_iterator TSortedSequenceIter;
+		
+	TSortedSequenceIter b_l_it;
+	if (prev == list.end()) b_l_it = list.begin();
+	else b_l_it = list.upper_bound(*prev);
+
+	return b_l_it;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.longestIncreasingSubsequence:
+..summary:Computes the longest increasing subsequence.
+..cat:Alignments
+..signature:longestIncreasingSubsequence(str, pos)
+..param.str:In-parameter: An arbitrary string.
+...type:Class.String
+..param.pos:Out-parameter: A String with the positions that belong to the longest increasing subsequence.
+...remarks:
+The last position in pos indicates the first element in the longest increasing subsequence.
+That's why pos should be a Block-String (Stack).
+..include:seqan/graph_algorithms.h
+*/
+template<typename TString, typename TPositions>
+inline void
+longestIncreasingSubsequence(TString const& str, TPositions& pos) {
+	SEQAN_CHECKPOINT
+
+	// The list of decreasing covers, only the smallest number must be remembered
+	// See Gusfield
+	typedef std::pair<typename Value<TString>::Type, typename Position<TPositions>::Type> TKey;
+	typedef std::set<TKey, std::less<TKey> > TSortedSequence;
+	typedef typename TSortedSequence::const_iterator TSortedSequenceIter;
+	TSortedSequence list;
+
+	// The trace-back graph
+	typedef Graph<Directed<void, WithoutEdgeId> > TGraph;
+	typedef Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TGraph g;
+
+	// Walk through the sequence and build the decreasing covers
+	typedef typename Iterator<TString const, Rooted>::Type TStringIter;
+	TStringIter endIt = end(str);
+	for(TStringIter it = begin(str); it != endIt; ++it) {
+		// Get previous element
+		TSortedSequenceIter a_k_it = _previousInSortedSequence(list, std::make_pair(*it, 0)); 
+		
+		// Get next element
+		TSortedSequenceIter b_l_it = _nextInSortedSequence(list, a_k_it);
+		
+		// Delete from list
+		if (b_l_it != list.end()) list.erase(*b_l_it);
+
+		// Insert new list element
+		list.insert(std::make_pair(*it, position(it)));
+
+		// Create the corresponding node
+		// Note: The VertexDescriptor == position(it)
+		addVertex(g);
+
+
+		// Connect to predecessor
+		if (a_k_it != list.end()) addEdge(g, (TVertexDescriptor) position(it), (TVertexDescriptor) a_k_it->second);
+	}
+
+	// Trace-back
+	if (list.rbegin() == list.rend()) return;
+	else {
+		// Start with the maximal position in the list == Vertex Descriptor
+		TVertexDescriptor v = list.rbegin()->second;
+		while (true) {
+			appendValue(pos, v, Generous());
+			if (g.data_vertex[v]) v = (*g.data_vertex[v]).data_target;
+			else break;
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// LCS: Longest Common Subsequence
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.longestCommonSubsequence:
+..summary:Computes the longest common subsequence.
+..cat:Alignments
+..signature:longestCommonSubsequence(str1, str2, nSize, pos)
+..param.str1:In-parameter: An arbitrary string.
+...type:Class.String
+..param.str2:In-parameter: An arbitrary string.
+...type:Class.String
+..param.pos:Out-parameter: A String with pairs of positions that indicate the longest common subsequence.
+...remarks:
+..include:seqan/graph_algorithms.h
+*/
+template<typename TString1, typename TString2, typename TNeighborhoodSize, typename TFinalPos>
+inline void
+longestCommonSubsequence(TString1 const& str1,
+						 TString2 const& str2,
+						 TNeighborhoodSize nSize,
+						 TFinalPos& pos) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TString1>::Type TValue;
+	typedef typename Size<TString1>::Type TSize;
+	typedef typename Position<TString1>::Type TPos;
+	TSize alphabet_size = ValueSize<TValue>::VALUE;
+
+	// The occurences of each letter in the second string
+	typedef String<TPos> TPositions;
+	String<TPositions> occ;
+	resize(occ, alphabet_size, TPositions());
+	typedef typename Iterator<TString2 const, Standard>::Type TStringIter;
+	TStringIter itStr2 = begin(str2, Standard());
+	TStringIter endItStr2 = end(str2, Standard());
+	TPos current_pos = 0;
+	for(; itStr2 != endItStr2; ++itStr2, ++current_pos) appendValue(occ[ordValue(*itStr2)], current_pos, Generous());
+
+	// Build the combined string
+	String<TPos> finalSeq;
+	String<TPos> mapping;
+	TStringIter itStr1 = begin(str1, Standard());
+	TStringIter endItStr1 = end(str1, Standard());
+	current_pos = 0;
+	TPos diff = 0;
+	for(; itStr1 != endItStr1; ++itStr1, ++current_pos) {
+		TPositions& current_occ = occ[ordValue(*itStr1)];
+		for(int i = length(current_occ)-1; i>=0; --i) {
+			// Do we have a neighborhood
+			diff = (current_pos < current_occ[i]) ? current_occ[i] - current_pos : current_pos - current_occ[i];
+			if (diff > (TPos) nSize) continue;
+			appendValue(finalSeq, current_occ[i], Generous());
+			appendValue(mapping, current_pos, Generous());
+		}
+	}
+
+	// Call longest increasing subsequence
+	typedef String<TSize> TResult;
+	TResult result;
+	longestIncreasingSubsequence(finalSeq, result);
+	
+	// Insert the common pairs
+	typedef typename Iterator<TResult, Standard>::Type TResultIter;
+	TResultIter itResult = begin(result, Standard());
+	TResultIter endResult = end(result, Standard());
+	for(; itResult != endResult; ++itResult) 
+		appendValue(pos, std::make_pair(mapping[*itResult], finalSeq[*itResult]), Generous());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet>
+inline int
+globalAlignment(TAlign& align,
+				TStringSet const& str,
+				Lcs)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Id<TStringSet>::Type TId;
+	typedef typename Size<TStringSet>::Type TSize;
+	TId id1 = positionToId(str, 0);
+	TId id2 = positionToId(str, 1);
+		
+	// Lcs between first and second string
+	String<std::pair<TSize, TSize> > pos1;
+	longestCommonSubsequence(str[0], str[1], 100, pos1);
+	//longestCommonSubsequence(str[0], str[1], 800, pos1);
+
+	// Extend the matches as long as possible
+	TSize oldI = 0;
+	TSize oldJ = 0;
+	TSize totalLen = 0;
+	if (length(pos1)) {
+		TSize lenMatch = 1;				
+		int last = length(pos1)-1;		
+		TSize iBegin = pos1[last].first;
+		TSize jBegin = pos1[last].second;
+		for(int z = last - 1; z>=0; --z) {
+			if ((pos1[z].first == pos1[z+1].first + 1) &&
+				(pos1[z].second == pos1[z+1].second + 1)) 
+			{
+				++lenMatch;
+			} else {
+				if (oldI < iBegin) _alignTracePrint(align, str, id1, oldI, id2, (TSize) 0, (TSize) iBegin - oldI, 1);
+				if (oldJ < jBegin) _alignTracePrint(align, str, id1, (TSize) 0, id2, oldJ, (TSize) jBegin - oldJ, 2);
+				oldI = iBegin + lenMatch;
+				oldJ = jBegin + lenMatch;
+			
+				_alignTracePrint(align, str, id1, iBegin, id2, jBegin, lenMatch, 0);
+				totalLen += lenMatch;
+				lenMatch = 1;
+				iBegin = pos1[z].first;
+				jBegin = pos1[z].second;
+			}
+		}
+		// Process last match
+		if (oldI < iBegin) _alignTracePrint(align, str, id1, oldI, id2, (TSize) 0, (TSize) iBegin - oldI, 1);
+		if (oldJ < jBegin) _alignTracePrint(align, str, id1, (TSize) 0, id2, oldJ, (TSize) jBegin - oldJ, 2);
+		oldI = iBegin + lenMatch;
+		oldJ = jBegin + lenMatch;
+		_alignTracePrint(align, str, id1, iBegin, id2, jBegin, lenMatch, 0);
+		totalLen += lenMatch;
+	}
+	// Process left overs
+	if (oldI < length(str[0])) _alignTracePrint(align, str, id1, oldI, id2, (TSize) 0, (TSize) length(str[0]) - oldI,  1);
+	if (oldJ < length(str[1])) _alignTracePrint(align, str, id1, (TSize) 0, id2, oldJ, (TSize) length(str[1]) - oldJ, 2);
+	
+	return (int) totalLen;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// HIS: Heaviest Increasing Subsequence
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.heaviestIncreasingSubsequence:
+..summary:Computes the heaviest increasing subsequence.
+..cat:Alignments
+..signature:heaviestIncreasingSubsequence(str, weights, pos)
+..param.str:In-parameter: An arbitrary string.
+...type:Class.String
+..param.weights:In-parameter: A weight for each position in the string.
+..param.pos:Out-parameter: A String of positions that indicate the members of the heaviest increasing subsequence.
+...remarks:
+The last position in pos indicates the first member of the heaviest increasing subsequence.
+That's why pos should be a Block-String (Stack).
+Note that only members that contribute a weight are selected, that is, positions with associated weight=0 are ignored.
+..include:seqan/graph_algorithms.h
+*/
+template<typename TString, typename TWeightMap, typename TPositions>
+inline typename Value<TWeightMap>::Type
+heaviestIncreasingSubsequence(TString const& str, 
+							  TWeightMap const& weights, 
+							  TPositions& pos) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TString>::Type TSize;
+	typedef typename Value<TString>::Type TValue;
+	typedef typename Value<TPositions>::Type TPos;
+	typedef typename Value<TWeightMap>::Type TWeight;
+
+	// The list of decreasing covers, only the smallest element of each member must be remembered
+	typedef std::pair<TValue, std::pair<TWeight, TPos> > TKey;
+	typedef std::set<TKey, std::less<TKey> > TSortedSequence;
+	typedef typename TSortedSequence::const_iterator TSortedSequenceIter;
+	TSortedSequence list;
+	
+	// The trace-back graph
+	typedef Graph<Directed<void, WithoutEdgeId> > TGraph;
+	typedef VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TGraph g;
+
+	// Walk through the sequence and build the decreasing covers
+	typedef typename Iterator<TString const, Standard>::Type TStringIter;
+	TStringIter it = begin(str, Standard());
+	TStringIter endIt = end(str, Standard());
+	TSize pos_of_iterator = 0;
+	TWeight w = 0;
+	for(; it != endIt; ++it, ++pos_of_iterator) {
+		w = weights[pos_of_iterator];
+		// Letters that do not contribute a weight (e.g., w = 0) are excluded!
+		// Weights must increase!
+		if (w == 0) {
+			addVertex(g);  // Note: The vertex id corresponds to the position
+			continue;
+		}
+
+
+		// Get previous element
+		TSortedSequenceIter a_k_it = _previousInSortedSequence(list, std::make_pair(*it, std::make_pair(0, 0))); 
+		
+		// Get next element
+		TSortedSequenceIter b_l_it = _nextInSortedSequence(list, a_k_it);
+
+		// Determine new weight
+		if (a_k_it != list.end()) w += a_k_it->second.first;
+
+		// Delete from list
+		while ((b_l_it != list.end()) && 
+				(w >= b_l_it->second.first)) {
+					TSortedSequenceIter tmp = b_l_it;
+					b_l_it = _nextInSortedSequence(list, b_l_it);
+					list.erase(*tmp);
+		}
+
+		// Insert new list element
+		if ((b_l_it == list.end()) ||
+			(*it < b_l_it->first)) {
+				list.insert(std::make_pair(*it, std::make_pair(w, pos_of_iterator)));
+		}
+
+		// Create the corresponding node, pos_of_iterator == Vertex Descriptor
+		addVertex(g);
+
+		// Connect to predecessor
+		if (a_k_it != list.end()) addEdge(g, (TVertexDescriptor) pos_of_iterator, (TVertexDescriptor) a_k_it->second.second);
+	}
+
+	// Trace-back
+	w = 0;
+	if (list.rbegin() == list.rend()) return 0;
+	else {
+		// Last vertex is end of heaviest increasing subsequence
+		TVertexDescriptor v = list.rbegin()->second.second;
+		while (true) {
+			appendValue(pos, v, Generous());
+			w+=weights[v];
+			if (g.data_vertex[v]) v = (*g.data_vertex[v]).data_target;
+			else break;
+		}
+	}
+	return w;
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithms_generated_forwards.h b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithms_generated_forwards.h
new file mode 100644
index 0000000..4659300
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_algorithms/graph_algorithms_generated_forwards.h
@@ -0,0 +1,424 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_GRAPH_ALGORITHMS_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_GRAPH_ALGORITHMS_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// HeapTree
+
+template <typename TValue , typename TPredicate , typename TSpec > class HeapTree;       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(58)
+
+//____________________________________________________________________________
+// KeyedHeap
+
+template <typename TSpec > struct KeyedHeap;       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(48)
+
+//____________________________________________________________________________
+// KeylessHeap
+
+template <typename TSpec > struct KeylessHeap;       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(44)
+
+//____________________________________________________________________________
+// LessPairI1_
+
+template <typename TWeight, typename TPair> struct LessPairI1_;       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(619)
+
+//____________________________________________________________________________
+// LessPairI2WithFunctor
+
+template <typename TKey, typename TValue, typename TPredicate> struct LessPairI2WithFunctor;       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(341)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _backwardAlgorithm
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequence, typename TBackwardMatrix> inline TProbability _backwardAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm, TSequence const& seq, TBackwardMatrix& bMat);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(349)
+
+//____________________________________________________________________________
+// _baumWelchAlgorithm
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequence, typename TSize> inline TProbability _baumWelchAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec > >& hmm, StringSet<TSequence> const& seqSet, TSize maxIter, TProbability epsilon);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(811)
+
+//____________________________________________________________________________
+// _buildResidualGraph
+
+template <typename TSpec, typename TCapMap, typename TFlowMap, typename TResidualGraph> void _buildResidualGraph(Graph<TSpec> const& g, TCapMap const& capacity, TFlowMap const& flow, TResidualGraph& rG);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1414)
+
+//____________________________________________________________________________
+// _collectEdges
+
+template <typename TSpec, typename TPredecessorMap, typename TVertexDescriptor1, typename TVertexDescriptor2, typename TEdgeSet> inline bool _collectEdges(Graph<TSpec> const& g, TPredecessorMap const& predecessor, TVertexDescriptor1 const source, TVertexDescriptor2 const v, TEdgeSet& edgeSet);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(769)
+template <typename TSpec, typename TPredecessorMap, typename TVertexDescriptor, typename TEdgeSet> inline bool _collectEdges(Graph<TSpec> const& g, TPredecessorMap const& predecessor, TVertexDescriptor const source, TEdgeSet& edgeSet);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(788)
+
+//____________________________________________________________________________
+// _connectedComponentVisit
+
+template <typename TSpec, typename TVertexDescriptor, typename TTokenMap, typename TComponents, typename TVal> void _connectedComponentVisit(Graph<TSpec> const& g, TVertexDescriptor const u, TTokenMap& tokenMap, TComponents& components, TVal& label);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(406)
+
+//____________________________________________________________________________
+// _dfsVisit
+
+template <typename TSpec, typename TVertexDescriptor, typename TTokenMap, typename TPredecessorMap, typename TDiscoveryTimeMap, typename TFinishingTimeMap, typename TVal> void _dfsVisit(Graph<TSpec> const& g, TVertexDescriptor const u, TTokenMap& tokenMap, TPredecessorMap& predecessor, TDiscoveryTimeMap& disc, TFinishingTimeMap& finish, TVal& time);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(165)
+
+//____________________________________________________________________________
+// _extendShortestPaths
+
+template <typename TMatrix, typename TPredecessor, typename TInfDist> void _extendShortestPaths(TMatrix& local, TMatrix& w, TPredecessor& predecessor, TInfDist const infDist);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1209)
+
+//____________________________________________________________________________
+// _fillHmmRandom
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TRNG> inline void _fillHmmRandom(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm, TRNG & rng);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(752)
+
+//____________________________________________________________________________
+// _fillHmmUniform
+
+template <typename TAlphabet, typename TProbability, typename TSpec> inline void _fillHmmUniform(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(722)
+
+//____________________________________________________________________________
+// _forwardAlgorithm
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequence, typename TForwardMatrix> inline TProbability _forwardAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm, TSequence const& seq, TForwardMatrix& fMat);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(229)
+
+//____________________________________________________________________________
+// _getMinimumAug
+
+template <typename TSpec, typename TPredecessorMap, typename TVertexDescriptor> inline typename Size<Graph<TSpec> >::Type _getMinimumAug(Graph<TSpec> const& rG, TPredecessorMap& predecessor, TVertexDescriptor const source, TVertexDescriptor sink);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1454)
+
+//____________________________________________________________________________
+// _initializeAllPairs
+
+template <typename TSpec, typename TWeightMap, typename TMatrix, typename TPredecessor> void _initializeAllPairs(Graph<TSpec> const& g, TWeightMap const& weight, TMatrix& matrix, TPredecessor& predecessor);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1165)
+
+//____________________________________________________________________________
+// _initializeSingleSource
+
+template <typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap> inline void _initializeSingleSource(Graph<TSpec> const& g, TVertexDescriptor const source, TWeightMap const& weight, TPredecessorMap& predecessor, TDistanceMap& distance);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(810)
+
+//____________________________________________________________________________
+// _insertObject
+
+template <typename TValue, typename TPredicate, typename TSpec, typename TIndex, typename TObject> inline void _insertObject(HeapTree<TValue, TPredicate, KeylessHeap<TSpec> >& mHeap, TIndex i, TObject obj);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(270)
+template <typename TKey, typename TValue, typename TPredicate, typename TSpec, typename TIndex, typename TObject> inline void _insertObject(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap, TIndex i, TObject obj);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(432)
+
+//____________________________________________________________________________
+// _left
+
+template <typename TSize> inline TSize _left(TSize i);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(128)
+
+//____________________________________________________________________________
+// _nextInSortedSequence
+
+template <typename TSortedSequence, typename TIterator> inline typename TSortedSequence::const_iterator _nextInSortedSequence(TSortedSequence const& list, TIterator const& prev);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_lis_his.h"(76)
+
+//____________________________________________________________________________
+// _parameterEstimator
+
+template <typename TAlphabet, typename TProbability, typename TSpec,typename TEmissionCounter, typename TTransitionCounter> inline void _parameterEstimator(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm, TEmissionCounter const& emission, TTransitionCounter const& transition);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(626)
+
+//____________________________________________________________________________
+// _parent
+
+template <typename TSize> inline TSize _parent(TSize i);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(144)
+
+//____________________________________________________________________________
+// _previousInSortedSequence
+
+template <typename TSortedSequence, typename TKey> inline typename TSortedSequence::const_iterator _previousInSortedSequence(TSortedSequence const& list, TKey const key);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_lis_his.h"(47)
+
+//____________________________________________________________________________
+// _printAllPairsShortestPath
+
+template <typename TSpec, typename TPredecessor, typename TVertexDescriptor> inline void _printAllPairsShortestPath(Graph<TSpec> const& g, TPredecessor& predecessor, TVertexDescriptor const i, TVertexDescriptor const j);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1143)
+
+//____________________________________________________________________________
+// _printPath
+
+template <typename TSpec, typename TPredecessorMap, typename TVertexDescriptor, typename TNameMap> inline void _printPath(Graph<TSpec> const& g, TPredecessorMap const& predecessor, TVertexDescriptor const source, TVertexDescriptor const v, TNameMap const& nameMap);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(730)
+template <typename TSpec, typename TPredecessorMap, typename TVertexDescriptor1, typename TVertexDescriptor2> inline void _printPath(Graph<TSpec> const& g, TPredecessorMap const& predecessor, TVertexDescriptor1 const source, TVertexDescriptor2 const v);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(749)
+
+//____________________________________________________________________________
+// _relax
+
+template <typename TSpec, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap, typename TVertexDescriptor, typename TEdgeDescriptor> inline void _relax(Graph<TSpec> const& g, TWeightMap const& weight, TPredecessorMap& predecessor, TDistanceMap& distance, TVertexDescriptor const u, TEdgeDescriptor const e);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(836)
+
+//____________________________________________________________________________
+// _right
+
+template <typename TSize> inline TSize _right(TSize i);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(136)
+
+//____________________________________________________________________________
+// _swapObjects
+
+template <typename TValue, typename TPredicate, typename TSpec, typename TIndex1, typename TIndex2> inline void _swapObjects(HeapTree<TValue, TPredicate, KeylessHeap<TSpec> >& mHeap, TIndex1 i, TIndex2 j);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(256)
+template <typename TKey, typename TValue, typename TPredicate, typename TSpec, typename TIndex1, typename TIndex2> inline void _swapObjects(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap, TIndex1 i, TIndex2 j);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(406)
+
+//____________________________________________________________________________
+// _weightedBipartiteMatching
+
+template <typename TSpec, typename TVertexMap, typename TWeightMap, typename TEdges> inline typename Value<TWeightMap>::Type _weightedBipartiteMatching(Graph<TSpec>& g, TVertexMap& vertMap, TWeightMap& weightMap, String<TEdges>& edges);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1737)
+
+//____________________________________________________________________________
+// allPairsShortestPath
+
+template <typename TSpec, typename TWeightMap, typename TMatrix, typename TPredecessor> void allPairsShortestPath(Graph<TSpec> const& g, TWeightMap const& weight, TMatrix& distMatrix, TPredecessor& predecessor);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1267)
+
+//____________________________________________________________________________
+// backwardAlgorithm
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequence> inline TProbability backwardAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm, TSequence const& seq);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(499)
+
+//____________________________________________________________________________
+// baumWelchAlgorithm
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequence> inline TProbability baumWelchAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec > >& hmm, StringSet<TSequence> const& seqSet);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(926)
+
+//____________________________________________________________________________
+// bellmanFordAlgorithm
+
+template <typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap> bool bellmanFordAlgorithm(Graph<TSpec> const& g, TVertexDescriptor const source, TWeightMap const& weight, TPredecessorMap& predecessor, TDistanceMap& distance);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(943)
+
+//____________________________________________________________________________
+// bipartiteMatching
+
+template <typename TSpec, typename TVertexMap, typename TEdges> inline typename Size<Graph<TSpec> >::Type bipartiteMatching(Graph<TSpec>& g, TVertexMap& vertMap, String<TEdges>& edges);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1683)
+
+//____________________________________________________________________________
+// breadthFirstSearch
+
+template <typename TSpec, typename TVertexDescriptor, typename TPredecessorMap, typename TDistanceMap> void breadthFirstSearch(Graph<TSpec> const& g, TVertexDescriptor const source, TPredecessorMap& predecessor, TDistanceMap& distance);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(103)
+
+//____________________________________________________________________________
+// buildHeap
+
+template <typename TValue, typename TPredicate, typename TSpec, typename TITBegin, typename TITEnd> inline void buildHeap(HeapTree<TValue, TPredicate, TSpec>& mHeap, TITBegin itBeg, TITEnd itEnd);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(234)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TValue, typename TPredicate, typename TSpec> inline void clear(HeapTree<TValue, TPredicate, TSpec>& mHeap);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(294)
+template <typename TKey, typename TValue, typename TPredicate, typename TSpec> inline void clear(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(504)
+
+//____________________________________________________________________________
+// connectedComponents
+
+template <typename TSpec, typename TComponents> typename Size<Graph<TSpec> >::Type connectedComponents(Graph<TSpec> const& g_source, TComponents& components);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(441)
+
+//____________________________________________________________________________
+// dagShortestPath
+
+template <typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap> void dagShortestPath(Graph<TSpec> const& g, TVertexDescriptor const source, TWeightMap const& weight, TPredecessorMap& predecessor, TDistanceMap& distance);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(879)
+
+//____________________________________________________________________________
+// depthFirstSearch
+
+template <typename TSpec, typename TPredecessorMap, typename TDiscoveryTimeMap, typename TFinishingTimeMap> void depthFirstSearch(Graph<TSpec> const& g, TPredecessorMap& predecessor, TDiscoveryTimeMap& disc, TFinishingTimeMap& finish);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(215)
+
+//____________________________________________________________________________
+// dijkstra
+
+template <typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap, typename TDistanceMap> void dijkstra(Graph<TSpec> const& g, TVertexDescriptor const source, TWeightMap const& weight, TPredecessorMap& predecessor, TDistanceMap& distance);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1016)
+
+//____________________________________________________________________________
+// empty
+
+template <typename TValue, typename TPredicate, typename TSpec> inline bool empty(HeapTree<TValue, TPredicate, TSpec> const& mHeap);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(154)
+
+//____________________________________________________________________________
+// estimationWithStates
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequenceSet, typename TStateSeqSet> inline void estimationWithStates(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm, TSequenceSet& sequences, TStateSeqSet& states);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(663)
+
+//____________________________________________________________________________
+// floydWarshallAlgorithm
+
+template <typename TSpec, typename TWeightMap, typename TMatrix, typename TPredecessor> void floydWarshallAlgorithm(Graph<TSpec> const& g, TWeightMap const& weight, TMatrix& distMatrix, TPredecessor& predecessor);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1317)
+
+//____________________________________________________________________________
+// fordFulkersonAlgorithm
+
+template <typename TSpec, typename TVertexDescriptor, typename TCapMap, typename TFlowMap> typename Value<TFlowMap>::Type fordFulkersonAlgorithm(Graph<TSpec> const& g, TVertexDescriptor const source, TVertexDescriptor const sink, TCapMap const& capacity, TFlowMap& flow);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1514)
+
+//____________________________________________________________________________
+// forwardAlgorithm
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequence> inline TProbability forwardAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm, TSequence const& seq);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(336)
+
+//____________________________________________________________________________
+// generateSequence
+
+template <typename TAlphabet, typename TProbability, typename TSpec,typename TSequenceSet, typename TStateSeqSet, typename TSize> inline void generateSequence(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm, TSequenceSet& sequences, TStateSeqSet& states, TSize numSeq, TSize maxLength);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(532)
+template <typename TAlphabet, typename TProbability, typename TSpec,typename TSequenceSet, typename TSize> inline void generateSequence(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm, TSequenceSet& sequences, TSize numSeq, TSize maxLength);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(604)
+
+//____________________________________________________________________________
+// globalAlignment
+
+template <typename TAlign, typename TStringSet> inline int globalAlignment(TAlign& align, TStringSet const& str, Lcs);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_lis_his.h"(240)
+
+//____________________________________________________________________________
+// heapChangeValue
+
+template <typename TKey, typename TValue, typename TPredicate, typename TSpec, typename TKey1, typename TValue2> inline void heapChangeValue(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap, TKey1 key, TValue2 val);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(467)
+
+//____________________________________________________________________________
+// heapExtractRoot
+
+template <typename TValue, typename TPredicate, typename TSpec> inline TValue heapExtractRoot(HeapTree<TValue, TPredicate, KeylessHeap<TSpec> >& mHeap);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(280)
+template <typename TKey, typename TValue, typename TPredicate, typename TSpec> inline Pair<TKey, TValue> heapExtractRoot(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(447)
+
+//____________________________________________________________________________
+// heapGetValue
+
+template <typename TKey, typename TValue, typename TPredicate, typename TSpec, typename TKey1> inline TValue heapGetValue(HeapTree<Pair<TKey, TValue>, TPredicate, KeyedHeap<TSpec> >& mHeap, TKey1 key);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(491)
+
+//____________________________________________________________________________
+// heapInsert
+
+template <typename TValue, typename TPredicate, typename TSpec, typename TObject> inline void heapInsert(HeapTree<TValue, TPredicate, TSpec>& mHeap, TObject object);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(193)
+
+//____________________________________________________________________________
+// heapRoot
+
+template <typename TValue, typename TPredicate, typename TSpec> inline TValue heapRoot(HeapTree<TValue, TPredicate, TSpec>& mHeap);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(174)
+template <typename TValue, typename TPredicate, typename TSpec> inline TValue heapRoot(HeapTree<TValue, TPredicate, TSpec> const& mHeap);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(183)
+
+//____________________________________________________________________________
+// heapSort
+
+template <typename TITBegin, typename TITEnd, typename TPredicate> inline void heapSort(TITBegin itBeg, TITEnd itEnd, TPredicate);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(306)
+template <typename TITBegin, typename TITEnd> inline void heapSort(TITBegin itBeg, TITEnd itEnd);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(329)
+
+//____________________________________________________________________________
+// heapify
+
+template <typename TValue, typename TPredicate, typename TSpec, typename TSize> inline void heapify(HeapTree<TValue, TPredicate, TSpec>& mHeap, TSize i);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(214)
+
+//____________________________________________________________________________
+// heaviestIncreasingSubsequence
+
+template <typename TString, typename TWeightMap, typename TPositions> inline typename Value<TWeightMap>::Type heaviestIncreasingSubsequence(TString const& str, TWeightMap const& weights, TPositions& pos);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_lis_his.h"(321)
+
+//____________________________________________________________________________
+// kruskalsAlgorithm
+
+template <typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TEdges> void kruskalsAlgorithm(Graph<TSpec> const& g, TVertexDescriptor const, TWeightMap const& weight, TEdges& edges);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(648)
+
+//____________________________________________________________________________
+// length
+
+template <typename TValue, typename TPredicate, typename TSpec> inline typename Size<HeapTree<TValue, TPredicate, TSpec> >::Type length(HeapTree<TValue, TPredicate, TSpec> const& mHeap);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_heap_tree.h"(164)
+
+//____________________________________________________________________________
+// longestCommonSubsequence
+
+template <typename TString1, typename TString2, typename TNeighborhoodSize, typename TFinalPos> inline void longestCommonSubsequence(TString1 const& str1, TString2 const& str2, TNeighborhoodSize nSize, TFinalPos& pos);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_lis_his.h"(185)
+
+//____________________________________________________________________________
+// longestIncreasingSubsequence
+
+template <typename TString, typename TPositions> inline void longestIncreasingSubsequence(TString const& str, TPositions& pos);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_lis_his.h"(105)
+
+//____________________________________________________________________________
+// pathGrowingAlgorithm
+
+template <typename TSpec, typename TWeightMap, typename TEdgeMap> typename Value<TWeightMap>::Type pathGrowingAlgorithm(Graph<TSpec>& g, TWeightMap const& weightMap, TEdgeMap& edgeMap1);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1605)
+
+//____________________________________________________________________________
+// primsAlgorithm
+
+template <typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap> void primsAlgorithm(Graph<TSpec> const& g, TVertexDescriptor const source, TWeightMap const& weight, TPredecessorMap& predecessor);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(505)
+
+//____________________________________________________________________________
+// primsAlgorithmSpaceEfficient
+
+template <typename TSpec, typename TVertexDescriptor, typename TWeightMap, typename TPredecessorMap> void primsAlgorithmSpaceEfficient(Graph<TSpec> const& g, TVertexDescriptor const source, TWeightMap const& weight, TPredecessorMap& predecessor);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(562)
+
+//____________________________________________________________________________
+// randomizeHmm
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TRNG> inline void randomizeHmm(Graph<Hmm<TAlphabet, TProbability, TSpec> >& hmm, TRNG & );       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(798)
+
+//____________________________________________________________________________
+// stronglyConnectedComponents
+
+template <typename TSpec, typename TComponents> void stronglyConnectedComponents(Graph<TSpec> const& g_source, TComponents& components);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(327)
+
+//____________________________________________________________________________
+// topologicalSort
+
+template <typename TSpec, typename TVertexDescriptor> void topologicalSort(Graph<TSpec> const& g, String<TVertexDescriptor>& topSort);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(273)
+
+//____________________________________________________________________________
+// transitiveClosure
+
+template <typename TSpec, typename TMatrix> void transitiveClosure(Graph<TSpec> const& g, TMatrix& closure);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1368)
+
+//____________________________________________________________________________
+// viterbiAlgorithm
+
+template <typename TAlphabet, typename TProbability, typename TSpec, typename TSequence, typename TPath> inline TProbability viterbiAlgorithm(Graph<Hmm<TAlphabet, TProbability, TSpec> > const& hmm, TSequence const& seq, TPath& path);       	// "projects/library/seqan/graph_algorithms/graph_algorithm_hmm.h"(66)
+
+//____________________________________________________________________________
+// weightedBipartiteMatching
+
+template <typename TSpec, typename TVertexMap, typename TWeightMap, typename TEdges> inline typename Value<TWeightMap>::Type weightedBipartiteMatching(Graph<TSpec>& g, TVertexMap& vertMap, TWeightMap& weightMap, String<TEdges>& edges);       	// "projects/library/seqan/graph_algorithms/graph_algorithm.h"(1903)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/graph_align.h b/src/SeqAn-1.3/seqan/graph_align.h
new file mode 100644
index 0000000..d8b7b46
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align.h
@@ -0,0 +1,59 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_H
+#define SEQAN_HEADER_GRAPH_ALIGN_H
+
+// Seqan
+#include <seqan/graph_types.h>
+#include <seqan/graph_algorithms.h>
+#include <seqan/refinement.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/graph_align/graph_align_generated_forwards.h>
+#endif
+
+// Alignment
+#include <seqan/graph_align/graph_align_base.h>
+#include <seqan/graph_align/graph_align_config.h>
+#include <seqan/graph_align/graph_align_interface.h>
+#include <seqan/graph_align/graph_align_needleman_wunsch.h>
+#include <seqan/graph_align/graph_align_banded_needleman_wunsch.h>
+#include <seqan/graph_align/graph_align_gotoh.h>
+#include <seqan/graph_align/graph_align_banded_gotoh.h>
+#include <seqan/graph_align/graph_align_hirschberg.h>
+#include <seqan/graph_align/graph_align_smith_waterman.h>
+#include <seqan/graph_align/graph_align_smith_waterman_clump.h>
+#include <seqan/graph_align/graph_align_banded_smith_waterman_clump.h>
+
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_banded_gotoh.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_banded_gotoh.h
new file mode 100644
index 0000000..1856b88
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_banded_gotoh.h
@@ -0,0 +1,348 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_BANDED_GOTOH_H
+#define SEQAN_HEADER_GRAPH_ALIGN_BANDED_GOTOH_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment: Banded Gotoh Alignment, affine gap cost
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TValPair, typename TIndexPair, typename TDiagonal>
+inline void
+_alignBandedGotohTrace(TAlign& align,
+						  TStringSet const& str,
+						  TTrace const& trace,
+						  TValPair const& overallMaxValue,
+						  TIndexPair const& overallMaxIndex,
+						  TDiagonal const diagL,
+						  TDiagonal const diagU)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Id<TStringSet>::Type TId;
+	typedef typename Size<TTrace>::Type TSize;
+	typedef unsigned char TTraceValue;
+
+	// Gotoh back-trace values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+
+	// Initialization
+	TString const& str1 = str[0];
+	TString const& str2 = str[1];	
+	TId id1 = positionToId(const_cast<TStringSet&>(str), 0);
+	TId id2 = positionToId(const_cast<TStringSet&>(str), 1);
+	TSize len1 = length(str1) + 1;
+	TSize len2 = length(str2) + 1;
+	TSize lo_row = 0;
+	if (diagU <= 0) lo_row = -1 * diagU;
+	TSize diagonalWidth = (TSize) (diagU - diagL + 1);
+	
+	//// Debug stuff
+	//TColumn originalMat;
+	//resize(originalMat, len1 * len2);
+	//TSize count = 0;
+	//for(TSize i=0; i<len2; ++i) {
+	//	for(TSize j=0; j<len1; ++j) {
+	//		value(originalMat, i * len1 + j) = count;
+	//		std::cout << count << ',';
+	//		++count;
+	//	}
+	//	std::cout << std::endl;
+	//}
+	//std::cout << std::endl;
+
+	// Start the trace from the cell with the max value
+	TSize row = (overallMaxValue[0] > overallMaxValue[1]) ? overallMaxIndex[0] : overallMaxIndex[2];
+	TSize col = (overallMaxValue[0] > overallMaxValue[1]) ? overallMaxIndex[1] : overallMaxIndex[3];
+
+	// Handle the skipped sequence parts
+	TSize actualRow = row + lo_row;
+	TSize actualCol = col + diagL + actualRow;
+	if (actualCol + 1 < len1) _alignTracePrint(align, str, id1, actualCol, id2, actualRow, (len1 - (actualCol + 1)),  Horizontal);
+	if (actualRow + 1 < len2) _alignTracePrint(align, str, id1, actualCol, id2, actualRow, (len2 - (actualRow + 1)),  Vertical);
+
+	// Walk until we hit a border
+	TTraceValue tv = (trace[row * diagonalWidth + col] & 3);
+	TTraceValue oldTraceValue = tv;
+	TSize seqLen = 0;
+	bool hitBorder = false;
+	do {
+		actualRow = row + lo_row;
+		actualCol = col + diagL + actualRow;
+
+		// Direction changed, so make aligned segments
+		if (oldTraceValue != tv) {
+			_alignTracePrint(align, str, id1, actualCol, id2, actualRow, seqLen, oldTraceValue);
+			seqLen = 0;
+		}
+
+		// Check if we hit a border
+		if ((actualRow == 0) || (actualCol == 0)) hitBorder = true;
+		else {
+			//std::cout << row << ',' << col << ':' << value(originalMat, actualRow * len1 + actualCol) << std::endl; 
+			
+			// Last value was diagonal
+			if (tv == Diagonal) {
+				oldTraceValue = Diagonal;
+				tv = (trace[row * diagonalWidth + col] & 3);
+				if (tv == Diagonal) {--row; ++seqLen;}
+			} else if (tv == Horizontal) { // Last value was horizontal
+				oldTraceValue = Horizontal;
+				if ((col > 0) && ((trace[row * diagonalWidth + col] >> 2) & 1)) tv = Diagonal;
+				--col; ++seqLen;
+			} else { // Vertical
+				oldTraceValue = Vertical;
+				if ((col < diagonalWidth - 1) && ((trace[row * diagonalWidth + col] >> 3) & 1)) tv = Diagonal;
+				--row; ++col; ++seqLen;
+			}	
+		}
+	} while(!hitBorder);
+	
+	// Align left overs
+	if (seqLen) _alignTracePrint(align, str, id1, actualCol, id2, actualRow, seqLen, tv);
+
+	// Handle the remaining sequence
+	if (actualCol != 0) _alignTracePrint(align, str, (TId) id1, (TSize) 0, (TId) 0, (TSize) 0, (TSize) actualCol,  Horizontal);
+	else if (actualRow != 0) _alignTracePrint(align, str, (TId) 0, (TSize) 0, (TId) id2, (TSize) 0, (TSize) actualRow,  Vertical);
+
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TDiagonal, typename TAlignConfig>
+inline typename Value<TScore>::Type
+_alignBandedGotoh(TTrace& trace,
+					TStringSet const& str,
+					TScore const & sc,
+					TValPair& overallMaxValue,
+					TIndexPair& overallMaxIndex,
+					TDiagonal diagL,
+					TDiagonal diagU,
+					TAlignConfig const)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TTrace>::Type TTraceValue;
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Size<TTrace>::Type TSize;
+
+	// Initialization
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+	
+	TString const& str1 = str[0];
+	TString const& str2 = str[1];		
+	TSize len1 = length(str1) + 1;
+	TSize len2 = length(str2) + 1;
+	TSize diagonalWidth = (TSize) (diagU - diagL + 1);
+	TSize hi_diag = diagonalWidth;
+	TSize lo_diag = 0;
+	if (diagL > 0) lo_diag = 0;
+	else lo_diag = (diagU < 0) ? hi_diag : (TSize) (1 - diagL); 
+	TSize lo_row = (diagU <= 0) ? -diagU : 0;
+	TSize hi_row = len2;
+	if (len1 - diagL < hi_row) hi_row = len1 - diagL;
+	TSize height = hi_row - lo_row;
+	typedef String<TScoreValue> TColumn;
+	TColumn mat;
+	TColumn vertical;
+	resize(mat, diagonalWidth);
+	resize(vertical, diagonalWidth);
+	resize(trace, height * diagonalWidth);
+	overallMaxValue[0] = MinValue<TScoreValue>::VALUE;
+	overallMaxValue[1] = MinValue<TScoreValue>::VALUE;
+	overallMaxIndex[0] = diagonalWidth;
+	overallMaxIndex[1] = height;
+	overallMaxIndex[2] = diagonalWidth;
+	overallMaxIndex[3] = height;
+	
+	//// Debug stuff
+	//TColumn originalMat;
+	//resize(originalMat, len1 * len2);
+	//TSize count = 0;
+	//for(TSize i=0; i<len2; ++i) {
+	//	for(TSize j=0; j<len1; ++j) {
+	//		value(originalMat, i * len1 + j) = count;
+	//		std::cerr << count << ',';
+	//		++count;
+	//	}
+	//	std::cerr << std::endl;
+	//}
+	//std::cerr << std::endl;
+
+	// Classical DP with affine gap costs
+	typedef typename Iterator<TColumn, Standard>::Type TColIter;
+	typedef typename Iterator<TTrace, Standard>::Type TTraceIter;
+	TTraceValue tvMat = 0;
+	TSize actualRow = 0;
+	TSize actualCol = 0;
+	TScoreValue a = 0;
+	TScoreValue b = 0;
+	TScoreValue hori_val = 0;
+	for(TSize row = 0; row < height; ++row) {
+		actualRow = row + lo_row;
+		if (lo_diag > 0) --lo_diag;
+		if (row + lo_row >= len1 - diagU) --hi_diag;
+		TTraceIter traceIt = begin(trace, Standard()) + row * diagonalWidth + lo_diag;
+		TColIter vertIt = begin(vertical, Standard()) + lo_diag;
+		TColIter matIt = begin(mat, Standard()) + lo_diag;
+		hori_val = MinValue<TScoreValue>::VALUE;
+		for(TSize col = lo_diag; col<hi_diag; ++col, ++vertIt, ++matIt, ++traceIt) {
+			actualCol = col + diagL + actualRow;
+			//std::cerr << row << ',' << col << ':' << value(originalMat, actualRow * len1 + actualCol) << std::endl;
+
+			if ((actualRow != 0) && (actualCol != 0)) {
+				// Get the new maximum for vertical
+				*traceIt = 0;
+				if (col < diagonalWidth - 1) {
+					a = *(matIt + 1) + scoreGapOpenVertical(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+					b = (*(vertIt + 1) != MinValue<TScoreValue>::VALUE) ? *(vertIt + 1) + scoreGapExtendVertical(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2) : MinValue<TScoreValue>::VALUE;
+					if (a > b) {*vertIt = a; *traceIt = 1;}
+					else *vertIt = b;
+				} else *vertIt = MinValue<TScoreValue>::VALUE;
+
+				// Get the new maximum for horizontal
+				*traceIt <<= 1;
+				if (col > 0) {
+					a = *(matIt -1 ) + scoreGapOpenHorizontal(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+					b = (hori_val != MinValue<TScoreValue>::VALUE) ? hori_val + scoreGapExtendHorizontal(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2) : MinValue<TScoreValue>::VALUE;
+					if (a > b) {hori_val = a; *traceIt |= 1;}
+					else hori_val = b;
+				} else hori_val = MinValue<TScoreValue>::VALUE;
+
+				*traceIt <<= 2;
+				// Get the new maximum for mat
+				*matIt += score(const_cast<TScore&>(sc), actualCol-1, actualRow-1, str1, str2);
+				tvMat = Diagonal;
+				if (*vertIt > *matIt) {
+					*matIt = *vertIt;
+					tvMat = Vertical;
+				}
+				if (hori_val > *matIt) {
+					*matIt = hori_val;
+					tvMat = Horizontal;
+				}
+				*traceIt |= tvMat;
+			} else {
+				// Usual initialization for first row and column
+				if (actualRow == 0) {
+					if (actualCol != 0) {
+						_initFirstRow(TAlignConfig(), *matIt, scoreGapOpenHorizontal(sc, 0, -1, str1, str2) + (actualCol - 1) * scoreGapExtendHorizontal(sc, ((int) actualCol - 1), -1, str1, str2));
+						*vertIt = *matIt + scoreGapOpenVertical(sc, ((int) actualCol - 1), 0, str1, str2) - scoreGapExtendVertical(sc, ((int) actualCol - 1), 0, str1, str2);
+						hori_val = MinValue<TScoreValue>::VALUE;
+					} else {
+						*matIt = 0;
+						*vertIt = MinValue<TScoreValue>::VALUE;
+						hori_val = MinValue<TScoreValue>::VALUE;
+					}
+				} else {
+					_initFirstColumn(TAlignConfig(), *matIt, scoreGapOpenVertical(sc, -1, 0, str1, str2) + (actualRow - 1) * scoreGapExtendVertical(sc, -1, ((int) actualRow - 1), str1, str2));
+					hori_val = *matIt + scoreGapOpenHorizontal(sc, 0, ((int) actualRow - 1), str1, str2) - scoreGapExtendHorizontal(sc, 0, ((int) actualRow - 1), str1, str2);
+					*vertIt = MinValue<TScoreValue>::VALUE;
+				}
+			}
+
+			// Store the maximum
+			if (actualCol == len1 - 1) _lastColumn(TAlignConfig(), overallMaxValue, overallMaxIndex, *matIt, row, col);
+			if (actualRow == len2 - 1) _lastRow(TAlignConfig(), overallMaxValue, overallMaxIndex, *matIt, row, col);
+			//std::cerr << row << ',' << col << ':' << value(mat, row * diagonalWidth + col) << std::endl;
+			//std::cerr << row << ',' << col << ':' << value(horizontal, row * diagonalWidth + col) << std::endl;
+			//std::cerr << row << ',' << col << ':' << value(vertical, row * diagonalWidth + col) << std::endl;
+		}
+	}
+	return (overallMaxValue[0] > overallMaxValue[1]) ? overallMaxValue[0] : overallMaxValue[1];
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal>
+inline typename Value<TScore>::Type
+_globalAlignment(TAlign& align,
+				 TStringSet const& str,
+				 TScore const& sc,
+				 TAlignConfig const,
+				 TDiagonal diag1,
+				 TDiagonal diag2,
+				 BandedGotoh)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	  
+	// Maximum value
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[4];
+
+	// Create the trace
+	String<unsigned char> trace;
+	TScoreValue maxScore = _alignBandedGotoh(trace, str, sc, overallMaxValue, overallMaxIndex, (int) diag1, (int) diag2, TAlignConfig());
+	
+	// Follow the trace and create the graph
+	_alignBandedGotohTrace(align, str, trace, overallMaxValue, overallMaxIndex, (int) diag1, (int) diag2);
+
+	return maxScore;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal>
+inline typename Value<TScore>::Type
+_globalAlignment(TStringSet const& str,
+				 TScore const& sc,
+				 TAlignConfig const,
+				 TDiagonal diag1,
+				 TDiagonal diag2,
+				 BandedGotoh)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	  
+	// Maximum value
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[4];
+
+	// Calculate the score
+	String<unsigned char> trace;
+	return _alignBandedGotoh(trace, str, sc, overallMaxValue, overallMaxIndex, (int) diag1, (int) diag2, TAlignConfig());
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_banded_needleman_wunsch.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_banded_needleman_wunsch.h
new file mode 100644
index 0000000..22d9207
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_banded_needleman_wunsch.h
@@ -0,0 +1,508 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_BANDED_NEEDLEMAN_WUNSCH_H
+#define SEQAN_HEADER_GRAPH_ALIGN_BANDED_NEEDLEMAN_WUNSCH_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TValPair, typename TIndexPair, typename TDiagonal>
+inline void
+_alignBandedNeedlemanWunschTrace(TAlign& align,
+					   TStringSet const& str,
+					   TTrace const& trace,
+					   TValPair const& overallMaxValue,
+					   TIndexPair const& overallMaxIndex,
+					   TDiagonal const diagL,
+					   TDiagonal const diagU)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Id<TStringSet>::Type TId;
+	typedef typename Size<TTrace>::Type TSize;
+	typedef typename Value<TTrace>::Type TTraceValue;
+
+	// Traceback values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+
+	// Initialization
+	TString const& str1 = str[0];
+	TString const& str2 = str[1];	
+	TId id1 = positionToId(const_cast<TStringSet&>(str), 0);
+	TId id2 = positionToId(const_cast<TStringSet&>(str), 1);
+	TSize len1 = length(str1) + 1;
+	TSize len2 = length(str2) + 1;
+	TSize lo_row = (diagU <= 0) ? -1 * diagU : 0;
+	TSize diagonalWidth = (TSize) (diagU - diagL + 1);
+	
+	//// Debug stuff
+	//TColumn originalMat;
+	//resize(originalMat, len1 * len2);
+	//TSize count = 0;
+	//for(TSize i=0; i<len2; ++i) {
+	//	for(TSize j=0; j<len1; ++j) {
+	//		value(originalMat, i * len1 + j) = count;
+	//		std::cout << count << ',';
+	//		++count;
+	//	}
+	//	std::cout << std::endl;
+	//}
+	//std::cout << std::endl;
+
+	// Start the trace from the cell with the max value
+	TSize row = (overallMaxValue[0] > overallMaxValue[1]) ? overallMaxIndex[0] : overallMaxIndex[2];
+	TSize col = (overallMaxValue[0] > overallMaxValue[1]) ? overallMaxIndex[1] : overallMaxIndex[3];
+
+	// Handle the skipped sequence parts
+	TSize actualRow = row + lo_row;
+	TSize actualCol = col + diagL + actualRow;
+	if (actualCol + 1 < len1) _alignTracePrint(align, str, id1, actualCol, id2, actualRow, (len1 - (actualCol + 1)),  Horizontal);
+	if (actualRow + 1 < len2) _alignTracePrint(align, str, id1, actualCol, id2, actualRow, (len2 - (actualRow + 1)),  Vertical);
+
+	if ((actualRow != 0) && (actualCol != 0)) {
+		// Find initial direction
+		TTraceValue tv = trace[row * diagonalWidth + col];
+		if (tv == Horizontal) --col;
+		else if (tv == Vertical) {--row; ++col;} 
+		else --row;
+	
+		// Walk until we hit a border
+		TSize seqLen = 1;
+		TTraceValue newTv = tv;
+		while(true) {
+			actualRow = row + lo_row;
+			actualCol = col + diagL + actualRow;
+			newTv = trace[row * diagonalWidth + col];
+
+			// Check if we hit a border
+			if ((actualRow == 0) || (actualCol == 0)) break;
+			else {
+				//std::cout << row << ',' << col << ':' << value(originalMat, actualRow * len1 + actualCol) << std::endl; 
+				if (tv == Diagonal) {
+					if (newTv == Horizontal) {
+						_alignTracePrint(align, str, id1, actualCol, id2, actualRow, seqLen, tv);
+						--col; seqLen = 1;
+					} else if (newTv == Vertical) {
+						_alignTracePrint(align, str, id1, actualCol, id2, actualRow, seqLen, tv);
+						--row; ++col; seqLen = 1;
+					} else {
+						--row; ++seqLen;
+					}
+				} else {
+					if (tv == Horizontal) { 
+						if (newTv == Diagonal) {
+							_alignTracePrint(align, str, id1, actualCol, id2, actualRow, seqLen, tv);
+							--row; seqLen = 1;
+						} else if (newTv == Vertical) {
+							_alignTracePrint(align, str, id1, actualCol, id2, actualRow, seqLen, tv);
+							--row; ++col; seqLen = 1;
+						} else {
+							--col; ++seqLen;
+						}
+					} else { 
+						if (newTv == Diagonal) {
+							_alignTracePrint(align, str, id1, actualCol, id2, actualRow, seqLen, tv);
+							--row; seqLen = 1;
+						} else if (newTv == Horizontal) {
+							_alignTracePrint(align, str, id1, actualCol, id2, actualRow, seqLen, tv);
+							--col; seqLen = 1;
+						} else {
+							--row; ++col; ++seqLen;
+						}
+					}
+				}
+				tv = newTv;
+			}
+		}
+	
+		// Align left overs
+		if (seqLen) _alignTracePrint(align, str, id1, actualCol, id2, actualRow, seqLen, tv);
+	}
+
+	// Handle the remaining sequence
+	if (actualCol != 0) _alignTracePrint(align, str, (TId) id1, (TSize) 0, (TId) 0, (TSize) 0, (TSize) actualCol,  Horizontal);
+	else if (actualRow != 0) _alignTracePrint(align, str, (TId) 0, (TSize) 0, (TId) id2, (TSize) 0, (TSize) actualRow,  Vertical);
+
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TDiagonal, typename TAlignConfig>
+inline typename Value<TScore>::Type
+_alignBandedNeedlemanWunsch(TTrace& trace,
+				 TStringSet const& str,
+				 TScore const & sc,
+				 TValPair& overallMaxValue,
+				 TIndexPair& overallMaxIndex,
+				 TDiagonal diagL,
+				 TDiagonal diagU,
+				 TAlignConfig const)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TTrace>::Type TTraceValue;
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Size<TTrace>::Type TSize;
+
+	// Initialization
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+	TString const& str1 = str[0];
+	TString const& str2 = str[1];		
+	TSize len1 = length(str1) + 1;
+	TSize len2 = length(str2) + 1;
+	TSize diagonalWidth = (TSize) (diagU - diagL + 1);
+	TSize hi_diag = diagonalWidth;
+	TSize lo_diag = 0;
+	if (diagL > 0) lo_diag = 0;
+	else lo_diag = (diagU < 0) ? hi_diag : (TSize) (1 - diagL); 
+	TSize lo_row = (diagU <= 0) ? -diagU : 0;
+	TSize hi_row = len2;
+	if (len1 - diagL < hi_row) hi_row = len1 - diagL;
+	TSize height = hi_row - lo_row;
+
+	typedef String<TScoreValue> TRow;
+	TRow mat;
+	resize(mat, diagonalWidth);
+	resize(trace, height * diagonalWidth);
+	overallMaxValue[0] = MinValue<TScoreValue>::VALUE;
+	overallMaxValue[1] = MinValue<TScoreValue>::VALUE;
+	overallMaxIndex[0] = diagonalWidth;	overallMaxIndex[1] = height;
+	overallMaxIndex[2] = diagonalWidth;	overallMaxIndex[3] = height;
+	
+	//// Debug stuff
+	//String<TScoreValue> originalMat;
+	//resize(originalMat, len1 * len2);
+	//TSize count = 0;
+	//for(TSize i=0; i<len2; ++i) {
+	//	for(TSize j=0; j<len1; ++j) {
+	//		value(originalMat, i * len1 + j) = count;
+	//		std::cerr << count << ',';
+	//		++count;
+	//	}
+	//	std::cerr << std::endl;
+	//}
+	//std::cerr << std::endl;
+
+    // TODO(holtgrew): Surely, *linear* gap costs are meant in the comment below? The code below appears to be converted over from Gotoh, it might make sense to replace scoreGapExtend* with scoreGap to reflect that this is NW DP.
+    
+	// Classical DP with affine gap costs
+	typedef typename Iterator<TRow, Standard>::Type TRowIter;
+	typedef typename Iterator<TTrace, Standard>::Type TTraceIter;
+	TSize actualCol = 0;
+	TSize actualRow = 0;
+	TScoreValue verti_val = 0;
+	TScoreValue hori_val = 0;
+	for(TSize row = 0; row < height; ++row) {
+		actualRow = row + lo_row;
+		if (lo_diag > 0) --lo_diag;
+		if (row + lo_row >= len1 - diagU) --hi_diag;
+		TTraceIter traceIt = begin(trace, Standard()) + row * diagonalWidth + lo_diag;
+		TRowIter matIt = begin(mat, Standard()) + lo_diag;
+		hori_val = MinValue<TScoreValue>::VALUE;
+		for(TSize col = lo_diag; col<hi_diag; ++col, ++matIt, ++traceIt) {
+			actualCol = col + diagL + actualRow;
+			//std::cerr << row << ',' << col << ':' << value(originalMat, actualRow * len1 + actualCol) << std::endl;
+
+			if ((actualRow != 0) && (actualCol != 0)) {
+				// Get the new maximum for mat
+				*matIt += score(const_cast<TScore&>(sc), ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+				*traceIt = Diagonal;
+				if ((verti_val = (col < diagonalWidth - 1) ? *(matIt+1) + scoreGapExtendVertical(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2) : MinValue<TScoreValue>::VALUE) > *matIt) {
+					*matIt = verti_val;
+					*traceIt = Vertical;
+				}						
+				if ((hori_val = (col > 0) ? hori_val + scoreGapExtendHorizontal(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2) : MinValue<TScoreValue>::VALUE) > *matIt) {
+					*matIt = hori_val;
+					*traceIt = Horizontal;
+				}
+				hori_val = *matIt;				
+			} else {			
+				// Usual initialization for first row and column
+				if (actualRow == 0) _initFirstRow(TAlignConfig(), *matIt, (TScoreValue) actualCol * scoreGapExtendHorizontal(sc, ((int) actualCol - 1), -1, str1, str2));
+				else {
+					_initFirstColumn(TAlignConfig(), *matIt, (TScoreValue) actualRow * scoreGapExtendVertical(sc, -1, ((int) actualRow - 1), str1, str2));
+					hori_val = *matIt;
+				}
+			}
+
+			// Store the maximum
+			if (actualCol == len1 - 1) _lastColumn(TAlignConfig(), overallMaxValue, overallMaxIndex, *matIt, row, col);
+			if (actualRow == len2 - 1) _lastRow(TAlignConfig(), overallMaxValue, overallMaxIndex, *matIt, row, col);
+			//std::cerr << row << ',' << col << ':' << *matIt << std::endl;
+		}
+	}
+	return (overallMaxValue[0] > overallMaxValue[1]) ? overallMaxValue[0] : overallMaxValue[1];
+}
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TDiagonal, typename TAlignConfig>
+inline typename Value<TScore>::Type
+_alignBandedNeedlemanWunsch(TTrace& trace,
+			TStringSet const& str,
+			TScore const & sc,
+			TValPair& overallMaxValue,
+			TIndexPair& overallMaxIndex,
+			TDiagonal diagL,
+			TDiagonal diagU,
+			TAlignConfig const,
+			String<Pair<typename Value<TScore>::Type,int> > & maxCols,
+			unsigned minColNum)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TTrace>::Type TTraceValue;
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Size<TTrace>::Type TSize;
+
+//      ::std::cout << "hierrrrrrrrrr banded ali\n";
+	// Initialization
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+	TString const& str1 = str[0];
+	TString const& str2 = str[1];
+	TSize len1 = length(str1) + 1;
+	TSize len2 = length(str2) + 1;
+//      ::std::cout << "len1="<<len1 << " len2=" << len2 << ::std::endl;
+	TSize diagonalWidth = (TSize) (diagU - diagL + 1);
+	TSize hi_diag = diagonalWidth;
+	TSize lo_diag = 0;
+	if (diagL > 0) lo_diag = 0;
+	else lo_diag = (diagU < 0) ? hi_diag : (TSize) (1 - diagL);
+	TSize lo_row = (diagU <= 0) ? -diagU : 0;
+	TSize hi_row = len2;
+	if (len1 - diagL < hi_row) hi_row = len1 - diagL;
+	TSize height = hi_row - lo_row;
+
+	clear(maxCols);
+
+	typedef String<TScoreValue> TRow;
+	TRow mat;
+	resize(mat, diagonalWidth);
+	resize(trace, height * diagonalWidth);
+//      ::std::cout <<height << "<-hieght\n";
+	overallMaxValue[0] = MinValue<TScoreValue>::VALUE;
+	overallMaxValue[1] = MinValue<TScoreValue>::VALUE;
+	overallMaxIndex[0] = diagonalWidth;     overallMaxIndex[1] = height;
+	overallMaxIndex[2] = diagonalWidth;     overallMaxIndex[3] = height;
+
+	//// Debug stuff
+	//String<TScoreValue> originalMat;
+	//resize(originalMat, len1 * len2);
+	//TSize count = 0;
+	//for(TSize i=0; i<len2; ++i) {
+	//      for(TSize j=0; j<len1; ++j) {
+	//              value(originalMat, i * len1 + j) = count;
+	//              std::cerr << count << ',';
+	//              ++count;
+	//      }
+	//      std::cerr << std::endl;
+	//}
+//std::cerr << std::endl;
+
+	// Classical DP with affine gap costs
+	typedef typename Iterator<TRow, Standard>::Type TRowIter;
+	typedef typename Iterator<TTrace, Standard>::Type TTraceIter;
+	TSize actualCol = 0;
+	TSize actualRow = 0;
+	TScoreValue verti_val = 0;
+	TScoreValue hori_val = 0;
+	for(TSize row = 0; row < height; ++row) {
+		TScoreValue maxRowVal = MinValue<TScoreValue>::VALUE;
+		unsigned maxRowCol = 0;
+		actualRow = row + lo_row;
+		if (lo_diag > 0) --lo_diag;
+		if (row + lo_row >= len1 - diagU) --hi_diag;
+		TTraceIter traceIt = begin(trace, Standard()) + row * diagonalWidth + lo_diag;
+		TRowIter matIt = begin(mat, Standard()) + lo_diag;
+		hori_val = MinValue<TScoreValue>::VALUE;
+		for(TSize col = lo_diag; col<hi_diag; ++col, ++matIt, ++traceIt) {
+			actualCol = col + diagL + actualRow;
+			//std::cerr << row << ',' << col << ':' << value(originalMat, actualRow * len1 + actualCol) << std::endl;
+
+			if ((actualRow != 0) && (actualCol != 0)) {
+				// Get the new maximum for mat
+				*matIt += score(const_cast<TScore&>(sc), ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+				*traceIt = Diagonal;
+				if ((verti_val = (col < diagonalWidth - 1) ? *(matIt+1) + scoreGapExtendVertical(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2) : MinValue<TScoreValue>::VALUE) > *matIt) {
+					*matIt = verti_val;
+					*traceIt = Vertical;
+				}
+				if ((hori_val = (col > 0) ? hori_val + scoreGapExtendHorizontal(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2) : MinValue<TScoreValue>::VALUE) > *matIt) {
+					*matIt = hori_val;
+					*traceIt = Horizontal;
+				}
+				hori_val = *matIt;
+			} else {
+				// Usual initialization for first row and column
+				if (actualRow == 0) _initFirstRow(TAlignConfig(), *matIt, (TScoreValue) actualCol * scoreGapExtendHorizontal(sc, ((int) actualCol - 1), -1, str1, str2));
+				else {
+					_initFirstColumn(TAlignConfig(), *matIt, (TScoreValue) actualRow * scoreGapExtendVertical(sc, -1, ((int) actualRow - 1), str1, str2));
+					hori_val = *matIt;
+				}
+			}
+			if(*matIt > maxRowVal && actualCol >= minColNum)
+			{
+				maxRowVal = *matIt;
+				maxRowCol = actualCol;
+			}
+			// Store the maximum
+			if (actualCol == len1 - 1) _lastColumn(TAlignConfig(), overallMaxValue, overallMaxIndex, *matIt, row, col);
+			if (actualRow == len2 - 1) _lastRow(TAlignConfig(), overallMaxValue, overallMaxIndex, *matIt, row, col);
+			//std::cerr << row << ',' << col << ':' << *matIt << std::endl;
+		}
+		appendValue(maxCols,Pair<typename Value<TScore>::Type,int>(maxRowVal,maxRowCol));
+	//      std::cout << maxRowVal << ","<<maxRowCol << std::endl;
+	}
+	return (overallMaxValue[0] > overallMaxValue[1]) ? overallMaxValue[0] : overallMaxValue[1];
+}
+	
+template<typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal>
+inline typename Value<TScore>::Type
+_globalAlignment(TAlign& align,
+			TStringSet const& str,
+			TScore const& sc,
+			TAlignConfig const,
+			TDiagonal diag1,
+			TDiagonal diag2,
+			String<Pair<typename Value<TScore>::Type,int> > &maxCols,
+			unsigned minColNum,
+			BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	
+	// Maximum value
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[4];
+	
+	// Create the trace
+	String<TraceBack> trace;
+	TScoreValue maxScore = _alignBandedNeedlemanWunsch(trace, str, sc, overallMaxValue, overallMaxIndex, (int) diag1, (int) diag2, TAlignConfig(),maxCols, minColNum);
+	
+	// Follow the trace and create the graph
+	_alignBandedNeedlemanWunschTrace(align, str, trace, overallMaxValue, overallMaxIndex, (int) diag1, (int) diag2);
+	
+	return maxScore;
+}
+	
+	//////////////////////////////////////////////////////////////////////////////
+	
+template<typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal>
+inline typename Value<TScore>::Type
+_globalAlignment(TStringSet const& str,
+			TScore const& sc,
+			TAlignConfig const,
+			TDiagonal diag1,
+			TDiagonal diag2,
+			String<Pair<typename Value<TScore>::Type,int> > &maxCols,
+			unsigned minColNum,
+			BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	
+	// Maximum value
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[4];
+	
+	// Calculate the score
+	String<TraceBack> trace;
+	return _alignBandedNeedlemanWunsch(trace, str, sc, overallMaxValue, overallMaxIndex, (int) diag1, (int) diag2, TAlignConfig(),maxCols,minColNum);
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal>
+inline typename Value<TScore>::Type
+_globalAlignment(TAlign& align,
+				 TStringSet const& str,
+				 TScore const& sc,
+				 TAlignConfig const,
+				 TDiagonal diag1,
+				 TDiagonal diag2,
+				 BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	  
+	// Maximum value
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[4];
+	
+	// Create the trace
+	String<TraceBack> trace;
+	TScoreValue maxScore = _alignBandedNeedlemanWunsch(trace, str, sc, overallMaxValue, overallMaxIndex, (int) diag1, (int) diag2, TAlignConfig());
+	
+	// Follow the trace and create the graph
+	_alignBandedNeedlemanWunschTrace(align, str, trace, overallMaxValue, overallMaxIndex, (int) diag1, (int) diag2);
+
+	return maxScore;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal>
+inline typename Value<TScore>::Type
+_globalAlignment(TStringSet const& str,
+				 TScore const& sc,
+				 TAlignConfig const,
+				 TDiagonal diag1,
+				 TDiagonal diag2,
+				 BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	  
+	// Maximum value
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[4];
+	
+	// Calculate the score
+	String<TraceBack> trace;
+	return _alignBandedNeedlemanWunsch(trace, str, sc, overallMaxValue, overallMaxIndex, (int) diag1, (int) diag2, TAlignConfig());
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_banded_smith_waterman_clump.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_banded_smith_waterman_clump.h
new file mode 100755
index 0000000..b3ce208
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_banded_smith_waterman_clump.h
@@ -0,0 +1,356 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_BANDED_SMITH_WATERMAN_CLUMP_H
+#define SEQAN_HEADER_GRAPH_ALIGN_BANDED_SMITH_WATERMAN_CLUMP_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString>
+inline void
+_initAlign(Graph<Alignment<StringSet<TString, Dependent<> > > >& align,
+           StringSet<TString, Dependent<> > const& str) {
+SEQAN_CHECKPOINT
+	assignStringSet(align, str);
+}
+
+template<typename TString, typename TPos>
+inline void
+_finishAlign(Graph<Alignment<StringSet<TString, Dependent<> > > >&,
+             TPos,
+             TPos,
+             TPos,
+             TPos) {
+SEQAN_CHECKPOINT
+    // Nothing to be done?
+    //stringSet(g)[0] = infix(stringSet(g)[0], begin1, end1);
+    //stringSet(g)[1] = infix(stringSet(g)[1], begin2, end2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStringSet, typename TAlign, typename TTrace, typename TVal, typename TIndexPair, typename TDiagonal, typename TForbidden>
+inline void
+_alignBandedSmithWatermanTrace(TStringSet const& str,
+                       TAlign& align,
+                       TTrace const& trace,
+                       TVal const initialDir,
+                       TIndexPair const& indexPair,
+                       TDiagonal diagL,
+                       TDiagonal diagU,
+                       TForbidden& forbidden) {
+SEQAN_CHECKPOINT
+    typedef typename Value<TStringSet>::Type TString;
+    typedef typename Id<TStringSet>::Type TId;
+    typedef typename Size<TTrace>::Type TSize;
+    typedef typename Value<TTrace>::Type TTraceValue;
+
+    // Traceback values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2; TTraceValue Stop = 3;
+
+    // Initialization
+    _initAlign(align, str);
+    TString const& str1 = str[0];
+    TString const& str2 = str[1];
+    TId id1 = positionToId(const_cast<TStringSet&>(str), 0);
+    TId id2 = positionToId(const_cast<TStringSet&>(str), 1);
+    TSize len1 = length(str1);
+    TSize len2 = length(str2);
+    TSize lo_row = (diagU <= 0) ? -diagU : 0;
+    TSize diagonalWidth = (TSize) (diagU - diagL + 1);
+
+    // Start the trace from the cell with the max value
+    TSize row = indexPair[0];
+    TSize col = indexPair[1];
+    TSize endRow = indexPair[0] + lo_row;
+    TSize endCol = indexPair[1] + diagL + endRow;
+	TSize actualRow = row + lo_row;
+    TSize actualCol = col + diagL + actualRow;
+    if ((actualCol == 0) || (actualRow == 0)) return;
+	if (actualCol < len1) _alignTracePrint(align, str, id1, actualCol, id2, actualRow, len1 - actualCol, Horizontal);
+	if (actualRow < len2) _alignTracePrint(align, str, id1, actualCol, id2, actualRow, len2 - actualRow, Vertical);
+	_setForbiddenCell(forbidden, row+1, col+1, diagonalWidth);
+	
+    TTraceValue traceValue = initialDir;
+    TTraceValue nextTraceValue = traceValue;
+    if (traceValue == Diagonal) nextTraceValue = trace[(--row) * diagonalWidth + col];
+    else if (traceValue == Vertical) nextTraceValue = trace[(--row) * diagonalWidth + (++col)];
+    else if (traceValue == Horizontal) nextTraceValue = trace[row * diagonalWidth + (--col)];
+    actualRow = row + lo_row;
+    actualCol = col + diagL + actualRow;
+	if (nextTraceValue == Diagonal) _setForbiddenCell(forbidden, row+1, col+1, diagonalWidth);
+    TSize segLen = 1;
+	
+    while (nextTraceValue != Stop) {
+        if (traceValue == nextTraceValue) {
+            ++segLen;
+        } else {
+            _alignTracePrint(align, str, id1, actualCol, id2, actualRow, segLen, traceValue);
+            segLen = 1;
+        }
+        traceValue = nextTraceValue;
+        if (traceValue == Diagonal) nextTraceValue = trace[(--row) * diagonalWidth + col];
+        else if (traceValue == Vertical) nextTraceValue = trace[(--row) * diagonalWidth + (++col)];
+        else if (traceValue == Horizontal) nextTraceValue = trace[row * diagonalWidth + (--col)];
+        actualRow = row + lo_row;
+        actualCol = col + diagL + actualRow;
+		if (nextTraceValue == Diagonal) _setForbiddenCell(forbidden, row+1, col+1, diagonalWidth);
+    }
+    if (segLen) _alignTracePrint(align, str, id1, actualCol, id2, actualRow, segLen, traceValue);
+    
+	// Handle the remaining sequence
+	if (actualCol != 0) _alignTracePrint(align, str, (TId) id1, (TSize) 0, (TId) 0, (TSize) 0, (TSize) actualCol, Horizontal);
+	if (actualRow != 0) _alignTracePrint(align, str, (TId) 0, (TSize) 0, (TId) id2, (TSize) 0, (TSize) actualRow, Vertical);
+
+    _finishAlign(align, actualCol, endCol, actualRow, endRow);
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TIndexPair, typename TDiagonal, typename TForbidden>
+inline typename Value<TScore>::Type
+_alignBandedSmithWaterman(TTrace& trace,
+                 TStringSet const& str,
+                 TScore const& sc,
+                 typename Value<TTrace>::Type& initialDir,
+                 TIndexPair& indexPair,
+                 TDiagonal diagL,
+                 TDiagonal diagU,
+                 TForbidden forbidden) {
+SEQAN_CHECKPOINT
+    typedef typename Value<TTrace>::Type TTraceValue;
+    typedef typename Value<TScore>::Type TScoreValue;
+    typedef typename Value<TStringSet>::Type TString;
+    typedef typename Size<TTrace>::Type TSize;
+
+    // TraceBack values for Smith Waterman
+    TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2; TTraceValue Stop = 3;
+
+    // Initialization
+    TString const& str1 = str[0];
+    TString const& str2 = str[1];
+    TSize len1 = length(str1) + 1;
+    TSize len2 = length(str2) + 1;
+    TSize diagonalWidth = (TSize) (diagU - diagL + 1);
+    TSize hi_diag = diagonalWidth;
+    TSize lo_diag = 0;
+    if (diagL > 0) lo_diag = 0;
+    else lo_diag = (diagU < 0) ? hi_diag : (TSize) (1 - diagL);
+    TSize lo_row = (diagU <= 0) ? -diagU : 0;
+    TSize hi_row = len2;
+    if (len1 - diagL < hi_row) hi_row = len1 - diagL;
+    TSize height = hi_row - lo_row;
+
+    typedef String<TScoreValue> TColumn;
+    TColumn mat;
+    resize(mat, diagonalWidth, 0);
+    resize(trace, height * diagonalWidth, Stop);
+    
+    // Record the max score
+    TScoreValue score_max = 0;
+    indexPair[0] = 0; indexPair[1] = 0;
+    initialDir = Stop;
+
+    // Classical DP
+    //TScoreValue max_val = 0;
+    TSize actualCol, actualRow;
+    TScoreValue verti_val, hori_val;
+
+    // Initialize first row
+    typedef typename Iterator<TTrace, Standard>::Type TTraceIter;
+    typedef typename Iterator<TColumn, Standard>::Type TMatIter;
+    TTraceIter traceIt;
+    TMatIter matIt;
+    
+    if (lo_diag > 0) --lo_diag;
+    if (lo_row >= len1 - diagU) --hi_diag;
+
+    for (TSize row = 1; row < height; ++row) {
+        actualRow = row + lo_row;
+        if (lo_diag > 0) --lo_diag;
+        if (actualRow >= len1 - diagU) --hi_diag;
+        traceIt = begin(trace, Standard()) + row * diagonalWidth + lo_diag;
+        matIt = begin(mat, Standard()) + lo_diag;
+        hori_val = 0;
+        
+        for (TSize col = lo_diag; col < hi_diag; ++col, ++matIt, ++traceIt) {
+            actualCol = col + diagL + actualRow;
+            if (actualCol != 0) {
+                if (_isClumping(forbidden, col+1, row+1, diagonalWidth)) {
+                    *matIt = 0;
+                } else {
+                    // Get the new maximum for mat
+                    *matIt += score(const_cast<TScore&>(sc), ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+                    *traceIt = Diagonal;
+                }
+
+                // Get the new maximum for vertical
+                if (col < diagonalWidth - 1) {
+                    verti_val = *(matIt+1) + scoreGapExtendVertical(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+                } else {
+                    verti_val = -2;
+                }
+                if (verti_val > *matIt) {
+                    *matIt = verti_val;
+                    *traceIt = Vertical;
+                }
+
+                // Get the new maximum for horizontal
+                if (col > 0) {
+                    hori_val = hori_val + scoreGapExtendHorizontal(sc, ((int) actualCol - 1), ((int) actualRow - 1), str1, str2);
+                } else {
+                    hori_val = -2;
+                }
+                if (hori_val > *matIt) {
+                    *matIt = hori_val;
+                    *traceIt = Horizontal;
+                }
+
+                // Check if new maximum is greater than 0
+                if (0 > *matIt) {
+                    *matIt = 0;
+                    *traceIt = Stop;
+                    
+                }
+
+                // Record the new best score
+                if (*matIt > score_max) {
+                    indexPair[0] = row; indexPair[1] = col;
+                    score_max = *matIt;
+                    initialDir = *traceIt;
+                }
+            } else {
+                // Init first col
+                *matIt = 0;
+                *traceIt = Stop;
+            }
+            hori_val = *matIt;
+        }
+    }
+ //   // Debug code
+ //   std::cerr << std::endl;
+	//for(TSize i= 0; i<height;++i) {
+	//	for(TSize j= 0; j<diagonalWidth;++j) {
+	//		std::cerr << (TSize) getValue(trace, i*diagonalWidth + j) << ',';
+	//	}
+	//	std::cerr << std::endl;
+	//}
+	//std::cerr << "Max score: " << indexPair[0] << ',' << indexPair[1] << ':' << score_max << " (" << (TSize) initialDir << ")" << std::endl;
+    return score_max;
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TForbidden, typename TScore, typename TDiagonal>
+inline typename Value<TScore>::Type
+_localAlignment(TStringSet& str,
+                TAlign& align,	
+                TForbidden& forbidden,
+                TScore const& sc,
+                TDiagonal diag1,
+                TDiagonal diag2,
+                BandedSmithWatermanClump) {
+SEQAN_CHECKPOINT
+    typedef typename Value<TScore>::Type TScoreValue;
+    typedef typename Size<TStringSet>::Type TSize;
+    typedef unsigned char TDir;
+
+    // Maximum value
+    TScoreValue maxScore;
+    TSize indexPair[2];
+
+    // Create the trace
+    TDir initialDir;
+    String<TDir> trace;
+    maxScore = _alignBandedSmithWaterman(trace, str, sc, initialDir, indexPair, diag1, diag2, forbidden);
+
+    // Follow the trace and create the alignment
+    _alignBandedSmithWatermanTrace(str, align, trace, initialDir, indexPair, diag1, diag2, forbidden);
+
+    return maxScore;
+}
+
+template<typename TString, typename TAlignments, typename TScores, typename TScoreValue, typename TSpec2, typename TDiagonal>
+inline void
+_localAlignment(StringSet<TString, Dependent<> > const& str,
+				TAlignments& alignments,
+				TScores& scores,
+				Score<TScoreValue, TSpec2> const& sc,
+				TScoreValue minScore,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedSmithWatermanClump) {
+SEQAN_CHECKPOINT
+	typedef typename Value<TAlignments>::Type TAlign;
+	typedef typename Size<TString>::Type TSize;
+  
+	// For clumpping remember the used positions
+	TSize len1 = length(str[0]);
+	TSize len2 = length(str[1]);
+    TSize diagonalWidth = (TSize) (diag2 - diag1 + 1);
+    
+    TSize lo_row = (diag2 < 0) ? -diag2 : 0;
+    TSize hi_row = (len1 - diag1 < len2) ? len1 - diag1 : len2;
+    TSize height = hi_row - lo_row;
+
+	String<bool> forbidden;
+	resize(forbidden, (height+1) * diagonalWidth, false);//(len1+1) * (len2+1), false);
+
+	// Stop looking for local alignments, if their score is too low
+	while (true) {
+		// Create the local alignment
+        TAlign align;
+		TScoreValue local_score = _localAlignment(str, align, forbidden, sc, diag1, diag2, BandedSmithWatermanClump());
+
+        //// Debug code
+        //for (int i = 0; i < height; ++i) {
+        //    for (int j = 0; j < diagonalWidth; ++j) {
+        //        std::cerr << forbidden[i * diagonalWidth + j] << ", ";
+        //    }
+        //    std::cerr << std::endl;
+        //}
+
+		if (local_score >= minScore) {
+            appendValue(alignments, align);
+            appendValue(scores, local_score);
+		} else break;
+	}
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_base.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_base.h
new file mode 100644
index 0000000..ddcea0d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_base.h
@@ -0,0 +1,280 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_BASE_H
+#define SEQAN_HEADER_GRAPH_ALIGN_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment: Simple Traceback Alphabet
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T = void>
+struct TranslateTableByteToTraceback_
+{
+	static char const VALUE[256];
+};
+template <typename T>
+char const TranslateTableByteToTraceback_<T>::VALUE[256] = 
+{
+	0,   1,   2,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //0
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //1
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //2
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //3
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //4
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //5
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //6
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //7
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //8
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //9
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //10
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //11
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //12
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //13
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, //14
+	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  //15
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.TraceBack:
+..cat:Alphabets
+..summary: Trace back values.
+..general:Class.SimpleType
+..signature:TraceBack
+..remarks:
+...text:The @Metafunction.ValueSize@ of $TraceBack$ is 3. 
+The values are defined in the following way: 0=Diagonal Move, 1=Horizontal Move, 2=Vertical Move
+..see:Metafunction.ValueSize
+..include:seqan/graph_align.h
+*/
+struct TraceBack_ {};
+typedef SimpleType<unsigned char, TraceBack_> TraceBack;
+
+template <> struct ValueSize< TraceBack > { enum { VALUE = 3 }; };
+template <> struct BitsPerValue< TraceBack > { enum { VALUE = 2 }; };
+
+//////////////////////////////////////////////////////////////////////////////
+// helper class to store traceback
+
+template <typename TSize>
+struct AlignTraceback
+{
+	String<TSize> sizes;
+	String<TraceBack> tvs; //trace values: 0 = diagonal, 1 = horizontal, 2 = vertical
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment: Trace-back, internal functions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TStringSet, typename TId, typename TPos, typename TTraceValue>
+inline void
+_alignTracePrint(TFile& file,
+				   TStringSet const& str,
+				   TId const /*id1*/,
+				   TPos const pos1,
+				   TId const /*id2*/,
+				   TPos const pos2,
+				   TPos const segLen,
+				   TTraceValue const tv)
+{
+	// TraceBack values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+
+	if (segLen == 0) return;
+
+	if (tv == Horizontal) {
+		for (int i = pos1 + segLen - 1; i>= (int) pos1;--i) {
+			_streamPut(file, '(');
+			_streamPut(file, (str[0])[i]);
+			_streamPut(file, ',');
+			_streamPut(file, gapValue<char>());
+			_streamPut(file, ')');
+			_streamPut(file, '\n');
+		}
+	}
+	else if (tv == Vertical) {
+		for (int i = pos2 + segLen - 1; i>= (int) pos2;--i) {
+			_streamPut(file, '(');
+			_streamPut(file, gapValue<char>());
+			_streamPut(file, ',');
+			_streamPut(file, (str[1])[i]);
+			_streamPut(file, ')');
+			_streamPut(file, '\n');
+		}
+	}
+	else if (tv == Diagonal) {
+		int j = pos2 + segLen - 1;
+		for (int i = pos1 + segLen - 1; i>= (int) pos1;--i) {
+			_streamPut(file, '(');
+			_streamPut(file, (str[0])[i]);
+			_streamPut(file, ',');
+			_streamPut(file, (str[1])[j]);
+			_streamPut(file, ')');
+			_streamPut(file, '\n');
+			--j;
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TStringSet2, typename TId, typename TPos, typename TTraceValue>
+inline void
+_alignTracePrint(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				   TStringSet2 const&,
+				   TId const id1,
+				   TPos const pos1,
+				   TId const id2,
+				   TPos const pos2,
+				   TPos const segLen,
+				   TTraceValue const tv)
+{
+	SEQAN_CHECKPOINT
+
+	// TraceBack values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+
+	if (segLen == 0) return;
+
+	if (tv == Horizontal) addVertex(g, id1, pos1, segLen);
+	else if (tv == Vertical) addVertex(g, id2, pos2, segLen);
+	else if (tv == Diagonal) addEdge(g, addVertex(g, id1, pos1, segLen), addVertex(g, id2, pos2, segLen));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragment, typename TStringSet, typename TId, typename TPos, typename TTraceValue>
+inline void
+_alignTracePrint(String<TFragment>& matches,
+				   TStringSet const&,
+				   TId const id1,
+				   TPos const pos1,
+				   TId const id2,
+				   TPos const pos2,
+				   TPos const seqLen,
+				   TTraceValue const tv)
+{
+	SEQAN_CHECKPOINT
+	// Only the diagonal case
+	if ((seqLen) && (tv == 0)) {
+		appendValue(matches, TFragment(id1, pos1, id2, pos2, seqLen), Generous() );
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TVertexDescriptor, typename TSpec, typename TStringSet, typename TId, typename TPos, typename TTraceValue>
+inline void
+_alignTracePrint(String<String<TVertexDescriptor, TSpec> >& nodeString,
+				   TStringSet const& str,
+				   TId const,
+				   TPos const pos1,
+				   TId const,
+				   TPos const pos2,
+				   TPos const segLen,
+				   TTraceValue const tv)
+{
+	typedef String<TVertexDescriptor, TSpec> TVertexDescriptorString;
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename Iterator<TVertexDescriptorString>::Type TStringIter;
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+
+	// TraceBack values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+	
+	if (segLen == 0) return;
+	// Number of vertex descriptors in the first string at any position (e.g., group of 5 sequences = group of 5 vertex descriptors)
+	TSize len1 = length(getValue(getValue(str,0), 0));
+	// Number of vertex descriptors in the second string at any position (e.g., group of 5 sequences = group of 5 vertex descriptors)
+	TSize len2 = length(getValue(getValue(str,1), 0));
+
+	// Resize the node string
+	TSize index = length(nodeString);
+	resize(nodeString, index + segLen);
+
+	if (tv == Horizontal) {
+		for (int i = pos1 + segLen - 1; i>= (int) pos1;--i) {
+			resize(value(nodeString, index), len1 + len2, nilVertex);
+			TStringIter it = begin(value(nodeString, index));
+			for(TPos all = 0;all<len1;++all) {
+				*it = getValue(getValue(getValue(str,0),i), all);
+				goNext(it);
+			}
+			++index;
+		}
+	}
+	else if (tv == Vertical) {
+		for (int i = pos2 + segLen - 1; i>= (int) pos2;--i) {
+			resize(value(nodeString, index), len1 + len2, nilVertex);
+			TStringIter it = begin(value(nodeString, index));
+			it+=len1;
+			for(TPos all = 0;all<len2;++all) {
+				*it = getValue(getValue(getValue(str,1),i), all);
+				goNext(it);
+			}
+			++index;
+		}
+	}
+	else if (tv == Diagonal) {
+		int j = pos2 + segLen - 1;
+		for (int i = pos1 + segLen - 1; i>= (int) pos1;--i) {
+			resize(value(nodeString, index), len1 + len2);
+			TStringIter it = begin(value(nodeString, index));
+			for(TPos all = 0;all<len1;++all) {
+				*it = getValue(getValue(getValue(str,0),i), all);
+				goNext(it);
+			}
+			for(TPos all = 0;all<len2;++all) {
+				*it = getValue(getValue(getValue(str,1),j), all);
+				goNext(it);
+			}
+			++index;
+			--j;
+		}
+	}
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_config.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_config.h
new file mode 100644
index 0000000..4f91dde
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_config.h
@@ -0,0 +1,571 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_CONFIG_H
+#define SEQAN_HEADER_GRAPH_ALIGN_CONFIG_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//	Graph - AlignConfig
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.AlignConfig:
+..cat:Alignments
+..summary:The AlignConfig class encapsulates how DP is carried out. 
+It indicates at what ends gaps are free, the so-called free ends-space alignments.
+..signature:AlignConfig<bool TTop, bool TLeft, bool TRight, bool TBottom, TSpec>
+..param.TTop:If true then 0's in top row.
+...default:$false$
+..param.TLeft:If true then 0's in the left row.
+...default:$false$
+..param.TRight:If true then maximum is also searched in the last column.
+...default:$false$
+..param.TBottom:If true then maximum is also searched in the last row.
+...default:$false$
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_align.h
+*/
+template<bool TTop = false, bool TLeft = false, bool TRight = false, bool TBottom = false, typename TSpec = Default>
+class AlignConfig;
+
+// 1 config
+template<typename TSpec>
+class AlignConfig<false, false, false, false, TSpec> 
+{
+};
+
+// 2 config
+template<typename TSpec>
+class AlignConfig<false, false, false, true, TSpec> 
+{
+};
+
+// 3 config
+template<typename TSpec>
+class AlignConfig<false, false, true, false, TSpec> 
+{
+};
+
+// 4 config
+template<typename TSpec>
+class AlignConfig<false, false, true, true, TSpec> 
+{
+};
+
+// 5 config
+template<typename TSpec>
+class AlignConfig<false, true, false, false, TSpec> 
+{
+};
+
+// 6 config
+template<typename TSpec>
+class AlignConfig<false, true, false, true, TSpec> 
+{
+};
+
+// 7 config
+template<typename TSpec>
+class AlignConfig<false, true, true, false, TSpec> 
+{
+};
+
+// 8 config
+template<typename TSpec>
+class AlignConfig<false, true, true, true, TSpec> 
+{
+};
+
+// 9 config
+template<typename TSpec>
+class AlignConfig<true, false, false, false, TSpec> 
+{
+};
+
+// 10 config
+template<typename TSpec>
+class AlignConfig<true, false, false, true, TSpec> 
+{
+};
+
+// 11 config
+template<typename TSpec>
+class AlignConfig<true, false, true, false, TSpec> 
+{
+};
+
+// 12 config
+template<typename TSpec>
+class AlignConfig<true, false, true, true, TSpec> 
+{
+};
+
+// 13 config
+template<typename TSpec>
+class AlignConfig<true, true, false, false, TSpec> 
+{
+};
+
+// 14 config
+template<typename TSpec>
+class AlignConfig<true, true, false, true, TSpec> 
+{
+};
+
+// 15 config
+template<typename TSpec>
+class AlignConfig<true, true, true, false, TSpec> 
+{
+};
+
+// 16 config
+template<typename TSpec>
+class AlignConfig<true, true, true, true, TSpec> 
+{
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//	FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TRight, bool TBottom, typename TSpec, typename TElement, typename TCost>
+inline void
+_initFirstColumn(AlignConfig<TTop, false, TRight, TBottom, TSpec> const,
+				 TElement& element,
+				 TCost const cost)
+{
+	SEQAN_CHECKPOINT
+	element = cost;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TRight, bool TBottom, typename TSpec, typename TElement, typename TCost>
+inline void
+_initFirstColumn(AlignConfig<TTop, true, TRight, TBottom, TSpec> const,
+				 TElement& element,
+				 TCost const)
+{
+	SEQAN_CHECKPOINT
+	element = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TLeft, bool TRight, bool TBottom, typename TSpec, typename TElement, typename TCost>
+inline void
+_initFirstRow(AlignConfig<false, TLeft, TRight, TBottom, TSpec> const,
+			  TElement& element,
+			  TCost const cost)
+{
+	SEQAN_CHECKPOINT
+	element = cost;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TLeft, bool TRight, bool TBottom, typename TSpec, typename TElement, typename TCost>
+inline void
+_initFirstRow(AlignConfig<true, TLeft, TRight, TBottom, TSpec> const,
+			  TElement& element,
+			  TCost const)
+{
+	SEQAN_CHECKPOINT
+	element = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TRight, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2>
+inline void
+_lastRow(AlignConfig<TTop, TLeft, TRight, false, TSpec> const,
+		 TValue1&,
+		 TIndex1&,
+		 TValue2 const,
+		 TIndex2 const)
+{
+	SEQAN_CHECKPOINT
+	// Nop
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TRight, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2>
+inline void
+_lastRow(AlignConfig<TTop, TLeft, TRight, true, TSpec> const,
+		 TValue1& maxValue,
+		 TIndex1& maxIndex,
+		 TValue2 const val,
+		 TIndex2 const index)
+{
+	SEQAN_CHECKPOINT
+	if (val > maxValue[0]) {
+		maxValue[0] = val;
+		maxIndex[0] = index;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TBottom, typename TSpec, typename TValue1, typename TIndex1, typename TColumn>
+inline void
+_lastColumn(AlignConfig<TTop, TLeft, false, TBottom, TSpec> const,
+			TValue1& maxValue,
+			TIndex1&,
+			TColumn const& column)
+{
+	SEQAN_CHECKPOINT
+	maxValue[1] = column[length(column) - 1];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TBottom, typename TSpec, typename TValue1, typename TIndex1, typename TColumn>
+inline void
+_lastColumn(AlignConfig<TTop, TLeft, true, TBottom, TSpec> const,
+			TValue1& maxValue,
+			TIndex1& maxIndex,
+			TColumn const& column)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TColumn>::Type TSize;
+	typedef typename Iterator<TColumn, Standard>::Type TColIter;
+	TSize limit = length(column) - 1;
+	maxValue[1] = column[limit];
+	TColIter itCol = begin(column, Standard());
+	TColIter itColEnd = end(column, Standard());
+	for(TSize i = 0;itCol != itColEnd; ++i, ++itCol) {
+		if (*itCol > maxValue[1]) {
+			maxValue[1] = *itCol;
+			maxIndex[1] = i;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TScoreValue, bool TTop, bool TLeft, typename TSpec, typename TValue, typename TIndex, typename TSize>
+inline TScoreValue
+_maxOfAlignment(AlignConfig<TTop, TLeft, false, false, TSpec> const,
+				TValue& maxValue,
+				TIndex&,
+				TSize const,
+				TSize const)
+{
+	SEQAN_CHECKPOINT
+	return maxValue[1];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TScoreValue, bool TTop, bool TLeft, typename TSpec, typename TValue, typename TIndex, typename TSize>
+inline TScoreValue
+_maxOfAlignment(AlignConfig<TTop, TLeft, true, false, TSpec> const,
+				TValue& maxValue,
+				TIndex& maxIndex,
+				TSize const len1,
+				TSize const)
+{
+	SEQAN_CHECKPOINT
+	maxIndex[0] = len1;
+	return maxValue[1];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TScoreValue, bool TTop, bool TLeft, typename TSpec, typename TValue, typename TIndex, typename TSize>
+inline TScoreValue
+_maxOfAlignment(AlignConfig<TTop, TLeft, false, true, TSpec> const,
+				TValue& maxValue,
+				TIndex& maxIndex,
+				TSize const,
+				TSize const len2)
+{
+	SEQAN_CHECKPOINT
+	maxIndex[1] = len2;
+	return maxValue[0];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TScoreValue, bool TTop, bool TLeft, typename TSpec, typename TValue, typename TIndex, typename TSize>
+inline TScoreValue
+_maxOfAlignment(AlignConfig<TTop, TLeft, true, true, TSpec> const,
+				TValue& maxValue,
+				TIndex& maxIndex,
+				TSize const len1,
+				TSize const len2)
+{
+	SEQAN_CHECKPOINT
+	// Find the maximum
+	if (maxValue[1] > maxValue[0]) maxIndex[0] = len1;
+	else maxIndex[1] = len2;
+	return (maxValue[0] > maxValue[1]) ? maxValue[0] : maxValue[1];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TBottom, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2>
+inline void
+_lastColumn(AlignConfig<TTop, TLeft, false, TBottom, TSpec> const,
+			TValue1& maxValue,
+			TIndex1& maxIndex,
+			TValue2 const val,	
+			TIndex2 const row,
+			TIndex2 const col)
+{
+	SEQAN_CHECKPOINT
+	maxValue[1] = val; maxIndex[2] = row; maxIndex[3] = col;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TBottom, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2>
+inline void
+_lastColumn(AlignConfig<TTop, TLeft, true, TBottom, TSpec> const,
+			TValue1& maxValue,
+			TIndex1& maxIndex,
+			TValue2 const val,
+			TIndex2 const row,
+			TIndex2 const col)
+{
+	SEQAN_CHECKPOINT
+	if (val > maxValue[1]) {maxValue[1] = val; maxIndex[2] = row; maxIndex[3] = col; }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TRight, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2>
+inline void
+_lastRow(AlignConfig<TTop, TLeft, TRight, false, TSpec> const,		
+		 TValue1& maxValue,
+		 TIndex1& maxIndex,
+		 TValue2 const val,
+		 TIndex2 const row,
+		 TIndex2 const col)
+{
+	SEQAN_CHECKPOINT
+	maxValue[0] = val; maxIndex[0] = row; maxIndex[1] = col;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TRight, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2>
+inline void
+_lastRow(AlignConfig<TTop, TLeft, TRight, true, TSpec> const,
+		 TValue1& maxValue,
+		 TIndex1& maxIndex,
+		 TValue2 const val,
+		 TIndex2 const row,
+		 TIndex2 const col)
+{
+	SEQAN_CHECKPOINT
+	if (val > maxValue[0]) {maxValue[0] = val; maxIndex[0] = row; maxIndex[1] = col; }
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TLeft, bool TRight, bool TBottom, typename TSpec>
+inline bool
+_configValueTop(AlignConfig<true, TLeft, TRight, TBottom, TSpec> const)
+{
+	return true;
+}
+
+template<bool TLeft, bool TRight, bool TBottom, typename TSpec>
+inline bool
+_configValueTop(AlignConfig<false, TLeft, TRight, TBottom, TSpec> const)
+{
+	return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TRight, bool TBottom, typename TSpec>
+inline bool
+_configValueLeft(AlignConfig<TTop, true, TRight, TBottom, TSpec> const)
+{
+	return true;
+}
+
+template<bool TTop, bool TRight, bool TBottom, typename TSpec>
+inline bool
+_configValueLeft(AlignConfig<TTop, false, TRight, TBottom, TSpec> const)
+{
+	return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TBottom, typename TSpec>
+inline bool
+_configValueRight(AlignConfig<TTop, TLeft, true, TBottom, TSpec> const)
+{
+	return true;
+}
+
+template<bool TTop, bool TLeft, bool TBottom, typename TSpec>
+inline bool
+_configValueRight(AlignConfig<TTop, TLeft, false, TBottom, TSpec> const)
+{
+	return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TTop, bool TLeft, bool TRight, typename TSpec>
+inline bool
+_configValueBottom(AlignConfig<TTop, TLeft, TRight, true, TSpec> const)
+{
+	return true;
+}
+
+template<bool TTop, bool TLeft, bool TRight, typename TSpec>
+inline bool
+_configValueBottom(AlignConfig<TTop, TLeft, TRight, false, TSpec> const)
+{
+	return false;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScore, typename TAlignConfig> 
+inline typename Value<TScore>::Type
+_pairWiseSumOfPairsScore(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+						 TScore const& sc,
+						 TAlignConfig const)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Value<TStringSet>::Type TString;
+
+	
+	TString const& str1 = stringSet(g)[0];
+	TString const& str2 = stringSet(g)[1];	
+
+	// Convert the graph
+	typedef String<char> TAlignmentMatrix;
+	TAlignmentMatrix mat;
+	convertAlignment(g, mat);
+	char gapChar = gapValue<char>();
+
+	TSize offset = length(mat) / 2;
+	typedef typename Iterator<TAlignmentMatrix, Standard>::Type TIter;
+	TIter seq1It = begin(mat, Standard() );
+	TIter seq2It = begin(mat, Standard() ) + offset;
+	TIter seqItEnd = end(mat, Standard() );
+	bool seq1GapOpen = false;
+	bool seq2GapOpen = false;
+	bool initialTop = _configValueTop(TAlignConfig());
+	bool initialLeft = _configValueLeft(TAlignConfig());
+	bool initialRight = _configValueRight(TAlignConfig());
+	bool initialBottom = _configValueBottom(TAlignConfig());
+	TSize col = 0;
+	TSize row = 0;
+	TScoreValue totalScore = 0;
+	TScoreValue lastGap = 0;
+	for(;seq2It != seqItEnd; ++seq2It, ++seq1It) {
+		//std::cout << *seq1It << ',' << *seq2It << std::endl;
+		if ((*seq1It == gapChar) && (*seq2It == gapChar)) continue;
+		if (*seq1It == gapChar) {
+			if ((row == 0) && (initialTop)) {
+				initialTop = false;
+				totalScore = 0;
+			} 
+			if (seq1GapOpen) {
+				totalScore += scoreGapExtendHorizontal(sc, col, row, str1, str2);
+			} else {
+				lastGap = totalScore;
+				totalScore += scoreGapOpenHorizontal(sc, col, row, str1, str2);
+				seq1GapOpen = true;
+				seq2GapOpen = false;
+			}
+			++row;
+			if ((seq2It + 1 == seqItEnd) && (initialRight)) {
+				totalScore = lastGap;
+			}
+		} else if (*seq2It == gapChar) {
+			if ((col == 0) && (initialLeft)) {
+				initialLeft = false;
+				totalScore = 0;
+			}
+			if (seq2GapOpen) {
+				totalScore += scoreGapExtendVertical(sc, col, row, str1, str2);
+			} else {
+				lastGap = totalScore;
+				totalScore += scoreGapOpenVertical(sc, col, row, str1, str2);
+				seq2GapOpen = true;
+				seq1GapOpen = false;
+			}
+			++col;
+			if ((seq2It + 1 == seqItEnd) && (initialBottom)) {
+				totalScore = lastGap;
+			}
+		} else {
+			if ((row == 0) && (initialTop)) {
+				initialTop = false;
+				totalScore = 0;
+			} 
+			if ((col == 0) && (initialLeft)) {
+				initialLeft = false;
+				totalScore = 0;
+			}
+			seq1GapOpen = false; seq2GapOpen = false;
+			totalScore += score(const_cast<TScore&>(sc), col, row, str1, str2);
+			lastGap = totalScore;
+			++row; ++col;
+		}
+	}
+	return totalScore;
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_generated_forwards.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_generated_forwards.h
new file mode 100644
index 0000000..dffdc1d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_generated_forwards.h
@@ -0,0 +1,327 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_GRAPH_ALIGN_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AlignConfig
+
+template <bool TTop , bool TLeft , bool TRight , bool TBottom , typename TSpec > class AlignConfig;       	// "projects/library/seqan/graph_align/graph_align_config.h"(65)
+
+//____________________________________________________________________________
+// AlignTraceback
+
+template <typename TSize> struct AlignTraceback;       	// "projects/library/seqan/graph_align/graph_align_base.h"(96)
+
+//____________________________________________________________________________
+// TraceBack_
+
+struct TraceBack_;       	// "projects/library/seqan/graph_align/graph_align_base.h"(85)
+
+//____________________________________________________________________________
+// TranslateTableByteToTraceback_
+
+template <typename T > struct TranslateTableByteToTraceback_;       	// "projects/library/seqan/graph_align/graph_align_base.h"(47)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// TraceBack
+
+typedef SimpleType<unsigned char, TraceBack_> TraceBack;       	// "projects/library/seqan/graph_align/graph_align_base.h"(86)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _alignBandedGotoh
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TDiagonal, typename TAlignConfig> inline typename Value<TScore>::Type _alignBandedGotoh(TTrace& trace, TStringSet const& str, TScore const & sc, TValPair& overallMaxValue, TIndexPair& overallMaxIndex, TDiagonal diagL, TDiagonal diagU, TAlignConfig const);       	// "projects/library/seqan/graph_align/graph_align_banded_gotoh.h"(158)
+
+//____________________________________________________________________________
+// _alignBandedGotohTrace
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TValPair, typename TIndexPair, typename TDiagonal> inline void _alignBandedGotohTrace(TAlign& align, TStringSet const& str, TTrace const& trace, TValPair const& overallMaxValue, TIndexPair const& overallMaxIndex, TDiagonal const diagL, TDiagonal const diagU);       	// "projects/library/seqan/graph_align/graph_align_banded_gotoh.h"(54)
+
+//____________________________________________________________________________
+// _alignBandedNeedlemanWunsch
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TDiagonal, typename TAlignConfig> inline typename Value<TScore>::Type _alignBandedNeedlemanWunsch(TTrace& trace, TStringSet const& str, TScore const & sc, TValPair& overallMaxValue, TIndexPair& overallMaxIndex, TDiagonal diagL, TDiagonal diagU, TAlignConfig const);       	// "projects/library/seqan/graph_align/graph_align_banded_needleman_wunsch.h"(176)
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TDiagonal, typename TAlignConfig> inline typename Value<TScore>::Type _alignBandedNeedlemanWunsch(TTrace& trace, TStringSet const& str, TScore const & sc, TValPair& overallMaxValue, TIndexPair& overallMaxIndex, TDiagonal diagL, TDiagonal diagU, TAlignConfig const, String<Pair<typename Value<TScore>::Type,int> > & maxCols, unsigned minColNum);       	// "projects/library/seqan [...]
+
+//____________________________________________________________________________
+// _alignBandedNeedlemanWunschTrace
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TValPair, typename TIndexPair, typename TDiagonal> inline void _alignBandedNeedlemanWunschTrace(TAlign& align, TStringSet const& str, TTrace const& trace, TValPair const& overallMaxValue, TIndexPair const& overallMaxIndex, TDiagonal const diagL, TDiagonal const diagU);       	// "projects/library/seqan/graph_align/graph_align_banded_needleman_wunsch.h"(53)
+
+//____________________________________________________________________________
+// _alignBandedSmithWaterman
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TIndexPair, typename TDiagonal, typename TForbidden> inline typename Value<TScore>::Type _alignBandedSmithWaterman(TTrace& trace, TStringSet const& str, TScore const& sc, typename Value<TTrace>::Type& initialDir, TIndexPair& indexPair, TDiagonal diagL, TDiagonal diagU, TForbidden forbidden);       	// "projects/library/seqan/graph_align/graph_align_banded_smith_waterman_clump.h"(151)
+
+//____________________________________________________________________________
+// _alignBandedSmithWatermanTrace
+
+template <typename TStringSet, typename TAlign, typename TTrace, typename TVal, typename TIndexPair, typename TDiagonal, typename TForbidden> inline void _alignBandedSmithWatermanTrace(TStringSet const& str, TAlign& align, TTrace const& trace, TVal const initialDir, TIndexPair const& indexPair, TDiagonal diagL, TDiagonal diagU, TForbidden& forbidden);       	// "projects/library/seqan/graph_align/graph_align_banded_smith_waterman_clump.h"(73)
+
+//____________________________________________________________________________
+// _alignGotoh
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TAlignConfig> inline typename Value<TScore>::Type _alignGotoh(TTrace& trace, TStringSet const& str, TScore const & sc, TValPair& overallMaxValue, TIndexPair& overallMaxIndex, typename Value<TTrace>::Type& initialDir, TAlignConfig const);       	// "projects/library/seqan/graph_align/graph_align_gotoh.h"(163)
+
+//____________________________________________________________________________
+// _alignGotohTrace
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TIndexPair, typename TVal> inline void _alignGotohTrace(TAlign& align, TStringSet const& str, TTrace const& trace, TIndexPair const& overallMaxIndex, TVal const initialDir);       	// "projects/library/seqan/graph_align/graph_align_gotoh.h"(52)
+
+//____________________________________________________________________________
+// _alignHirschberg
+
+template <typename TTrace, typename TStringSet, typename TScoreValue, typename TSpec> TScoreValue _alignHirschberg(TTrace& trace, TStringSet const& str, Score<TScoreValue, TSpec> const& sc, Hirschberg);       	// "projects/library/seqan/graph_align/graph_align_hirschberg.h"(134)
+
+//____________________________________________________________________________
+// _alignHirschbergTrace
+
+template <typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TTrace> void _alignHirschbergTrace(TAlign& align, TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TTrace& trace);       	// "projects/library/seqan/graph_align/graph_align_hirschberg.h"(53)
+
+//____________________________________________________________________________
+// _alignNeedlemanWunsch
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TAlignConfig> inline typename Value<TScore>::Type _alignNeedlemanWunsch(TTrace & trace, TStringSet const & str, TScore const & _sc, TValPair & overallMaxValue, TIndexPair & overallMaxIndex, TAlignConfig const);       	// "projects/library/seqan/graph_align/graph_align_needleman_wunsch.h"(144)
+
+//____________________________________________________________________________
+// _alignNeedlemanWunschMatrix
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TIndexPair> inline void _alignNeedlemanWunschMatrix(TAlign&, TStringSet const&, TTrace const&, TIndexPair const&);       	// "projects/library/seqan/graph_align/graph_align_needleman_wunsch.h"(50)
+
+//____________________________________________________________________________
+// _alignNeedlemanWunschTrace
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TIndexPair> void _alignNeedlemanWunschTrace(TAlign& align, TStringSet const& str, TTrace const& trace, TIndexPair const& overallMaxIndex);       	// "projects/library/seqan/graph_align/graph_align_needleman_wunsch.h"(60)
+
+//____________________________________________________________________________
+// _alignSmithWaterman
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TIndexPair, typename TForbidden> inline typename Value<TScore>::Type _alignSmithWaterman(TTrace& trace, TStringSet const& str, TScore const & sc, typename Value<TTrace>::Type& initialDir, TIndexPair& indexPair, TForbidden& forbidden);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman.h"(212)
+
+//____________________________________________________________________________
+// _alignSmithWatermanTrace
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TVal, typename TIndexPair, typename TForbidden> inline void _alignSmithWatermanTrace(TAlign& align, TStringSet const& str, TTrace const& trace, TVal const initialDir, TIndexPair const& indexPair, TForbidden& forbidden);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman.h"(102)
+
+//____________________________________________________________________________
+// _alignTracePrint
+
+template <typename TFile, typename TStringSet, typename TId, typename TPos, typename TTraceValue> inline void _alignTracePrint(TFile& file, TStringSet const& str, TId const , TPos const pos1, TId const , TPos const pos2, TPos const segLen, TTraceValue const tv);       	// "projects/library/seqan/graph_align/graph_align_base.h"(117)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TStringSet2, typename TId, typename TPos, typename TTraceValue> inline void _alignTracePrint(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TStringSet2 const&, TId const id1, TPos const pos1, TId const id2, TPos const pos2, TPos const segLen, TTraceValue const tv);       	// "projects/library/seqan/graph_align/graph_align_base.h"(170)
+template <typename TFragment, typename TStringSet, typename TId, typename TPos, typename TTraceValue> inline void _alignTracePrint(String<TFragment>& matches, TStringSet const&, TId const id1, TPos const pos1, TId const id2, TPos const pos2, TPos const seqLen, TTraceValue const tv);       	// "projects/library/seqan/graph_align/graph_align_base.h"(196)
+template <typename TVertexDescriptor, typename TSpec, typename TStringSet, typename TId, typename TPos, typename TTraceValue> inline void _alignTracePrint(String<String<TVertexDescriptor, TSpec> >& nodeString, TStringSet const& str, TId const, TPos const pos1, TId const, TPos const pos2, TPos const segLen, TTraceValue const tv);       	// "projects/library/seqan/graph_align/graph_align_base.h"(216)
+
+//____________________________________________________________________________
+// _configValueBottom
+
+template <bool TTop, bool TLeft, bool TRight, typename TSpec> inline bool _configValueBottom(AlignConfig<TTop, TLeft, TRight, true, TSpec> const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(462)
+template <bool TTop, bool TLeft, bool TRight, typename TSpec> inline bool _configValueBottom(AlignConfig<TTop, TLeft, TRight, false, TSpec> const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(469)
+
+//____________________________________________________________________________
+// _configValueLeft
+
+template <bool TTop, bool TRight, bool TBottom, typename TSpec> inline bool _configValueLeft(AlignConfig<TTop, true, TRight, TBottom, TSpec> const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(430)
+template <bool TTop, bool TRight, bool TBottom, typename TSpec> inline bool _configValueLeft(AlignConfig<TTop, false, TRight, TBottom, TSpec> const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(437)
+
+//____________________________________________________________________________
+// _configValueRight
+
+template <bool TTop, bool TLeft, bool TBottom, typename TSpec> inline bool _configValueRight(AlignConfig<TTop, TLeft, true, TBottom, TSpec> const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(446)
+template <bool TTop, bool TLeft, bool TBottom, typename TSpec> inline bool _configValueRight(AlignConfig<TTop, TLeft, false, TBottom, TSpec> const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(453)
+
+//____________________________________________________________________________
+// _configValueTop
+
+template <bool TLeft, bool TRight, bool TBottom, typename TSpec> inline bool _configValueTop(AlignConfig<true, TLeft, TRight, TBottom, TSpec> const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(414)
+template <bool TLeft, bool TRight, bool TBottom, typename TSpec> inline bool _configValueTop(AlignConfig<false, TLeft, TRight, TBottom, TSpec> const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(421)
+
+//____________________________________________________________________________
+// _finishAlign
+
+template <typename TString, typename TPos> inline void _finishAlign(Graph<Alignment<StringSet<TString, Dependent<> > > >&, TPos, TPos, TPos, TPos);       	// "projects/library/seqan/graph_align/graph_align_banded_smith_waterman_clump.h"(55)
+
+//____________________________________________________________________________
+// _globalAlignment
+
+template <typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig> inline typename Value<TScore>::Type _globalAlignment(TAlign& align, TStringSet const& str, TScore const& sc, TAlignConfig const, Gotoh);       	// "projects/library/seqan/graph_align/graph_align_gotoh.h"(285)
+template <typename TStringSet, typename TScore, typename TAlignConfig> inline typename Value<TScore>::Type _globalAlignment(TStringSet const& str, TScore const& sc, TAlignConfig const, Gotoh);       	// "projects/library/seqan/graph_align/graph_align_gotoh.h"(312)
+template <typename TAlign, typename TStringSet, typename TScore, typename TSpec> inline typename Value<TScore>::Type _globalAlignment(TAlign& align, TStringSet const& str, TScore const& sc, AlignConfig<false, false, false, false, TSpec> const, Hirschberg);       	// "projects/library/seqan/graph_align/graph_align_hirschberg.h"(497)
+template <typename TStringSet, typename TScore, typename TSpec> inline typename Value<TScore>::Type _globalAlignment(TStringSet const& str, TScore const& sc, AlignConfig<false, false, false, false, TSpec> const, Hirschberg);       	// "projects/library/seqan/graph_align/graph_align_hirschberg.h"(520)
+template <typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig> inline typename Value<TScore>::Type _globalAlignment(TAlign& align, TStringSet const& str, TScore const& sc, TAlignConfig const, NeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_needleman_wunsch.h"(248)
+template <typename TStringSet, typename TScore, typename TAlignConfig> inline typename Value<TScore>::Type _globalAlignment(TStringSet const& str, TScore const& sc, TAlignConfig const, NeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_needleman_wunsch.h"(273)
+template <typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal> inline typename Value<TScore>::Type _globalAlignment(TAlign& align, TStringSet const& str, TScore const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedGotoh);       	// "projects/library/seqan/graph_align/graph_align_banded_gotoh.h"(302)
+template <typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal> inline typename Value<TScore>::Type _globalAlignment(TStringSet const& str, TScore const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedGotoh);       	// "projects/library/seqan/graph_align/graph_align_banded_gotoh.h"(331)
+template <typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal> inline typename Value<TScore>::Type _globalAlignment(TAlign& align, TStringSet const& str, TScore const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, String<Pair<typename Value<TScore>::Type,int> > &maxCols, unsigned minColNum, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_banded_needleman_wunsch.h"(403)
+template <typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal> inline typename Value<TScore>::Type _globalAlignment(TStringSet const& str, TScore const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, String<Pair<typename Value<TScore>::Type,int> > &maxCols, unsigned minColNum, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_banded_needleman_wunsch.h"(434)
+template <typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal> inline typename Value<TScore>::Type _globalAlignment(TAlign& align, TStringSet const& str, TScore const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_banded_needleman_wunsch.h"(461)
+template <typename TStringSet, typename TScore, typename TAlignConfig, typename TDiagonal> inline typename Value<TScore>::Type _globalAlignment(TStringSet const& str, TScore const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_banded_needleman_wunsch.h"(490)
+
+//____________________________________________________________________________
+// _initAlign
+
+template <typename TString> inline void _initAlign(Graph<Alignment<StringSet<TString, Dependent<> > > >& align, StringSet<TString, Dependent<> > const& str);       	// "projects/library/seqan/graph_align/graph_align_banded_smith_waterman_clump.h"(44)
+
+//____________________________________________________________________________
+// _initFirstColumn
+
+template <bool TTop, bool TRight, bool TBottom, typename TSpec, typename TElement, typename TCost> inline void _initFirstColumn(AlignConfig<TTop, false, TRight, TBottom, TSpec> const, TElement& element, TCost const cost);       	// "projects/library/seqan/graph_align/graph_align_config.h"(175)
+template <bool TTop, bool TRight, bool TBottom, typename TSpec, typename TElement, typename TCost> inline void _initFirstColumn(AlignConfig<TTop, true, TRight, TBottom, TSpec> const, TElement& element, TCost const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(187)
+
+//____________________________________________________________________________
+// _initFirstRow
+
+template <bool TLeft, bool TRight, bool TBottom, typename TSpec, typename TElement, typename TCost> inline void _initFirstRow(AlignConfig<false, TLeft, TRight, TBottom, TSpec> const, TElement& element, TCost const cost);       	// "projects/library/seqan/graph_align/graph_align_config.h"(199)
+template <bool TLeft, bool TRight, bool TBottom, typename TSpec, typename TElement, typename TCost> inline void _initFirstRow(AlignConfig<true, TLeft, TRight, TBottom, TSpec> const, TElement& element, TCost const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(211)
+
+//____________________________________________________________________________
+// _isClumping
+
+template <typename TSpec, typename TSize> inline bool _isClumping(String<bool, TSpec> const& forbidden, TSize row, TSize col, TSize len2);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman.h"(76)
+template <typename TSize> inline bool _isClumping(Nothing&, TSize, TSize, TSize);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman.h"(88)
+
+//____________________________________________________________________________
+// _lastColumn
+
+template <bool TTop, bool TLeft, bool TBottom, typename TSpec, typename TValue1, typename TIndex1, typename TColumn> inline void _lastColumn(AlignConfig<TTop, TLeft, false, TBottom, TSpec> const, TValue1& maxValue, TIndex1&, TColumn const& column);       	// "projects/library/seqan/graph_align/graph_align_config.h"(258)
+template <bool TTop, bool TLeft, bool TBottom, typename TSpec, typename TValue1, typename TIndex1, typename TColumn> inline void _lastColumn(AlignConfig<TTop, TLeft, true, TBottom, TSpec> const, TValue1& maxValue, TIndex1& maxIndex, TColumn const& column);       	// "projects/library/seqan/graph_align/graph_align_config.h"(271)
+template <bool TTop, bool TLeft, bool TBottom, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2> inline void _lastColumn(AlignConfig<TTop, TLeft, false, TBottom, TSpec> const, TValue1& maxValue, TIndex1& maxIndex, TValue2 const val, TIndex2 const row, TIndex2 const col);       	// "projects/library/seqan/graph_align/graph_align_config.h"(358)
+template <bool TTop, bool TLeft, bool TBottom, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2> inline void _lastColumn(AlignConfig<TTop, TLeft, true, TBottom, TSpec> const, TValue1& maxValue, TIndex1& maxIndex, TValue2 const val, TIndex2 const row, TIndex2 const col);       	// "projects/library/seqan/graph_align/graph_align_config.h"(373)
+
+//____________________________________________________________________________
+// _lastRow
+
+template <bool TTop, bool TLeft, bool TRight, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2> inline void _lastRow(AlignConfig<TTop, TLeft, TRight, false, TSpec> const, TValue1&, TIndex1&, TValue2 const, TIndex2 const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(228)
+template <bool TTop, bool TLeft, bool TRight, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2> inline void _lastRow(AlignConfig<TTop, TLeft, TRight, true, TSpec> const, TValue1& maxValue, TIndex1& maxIndex, TValue2 const val, TIndex2 const index);       	// "projects/library/seqan/graph_align/graph_align_config.h"(242)
+template <bool TTop, bool TLeft, bool TRight, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2> inline void _lastRow(AlignConfig<TTop, TLeft, TRight, false, TSpec> const, TValue1& maxValue, TIndex1& maxIndex, TValue2 const val, TIndex2 const row, TIndex2 const col);       	// "projects/library/seqan/graph_align/graph_align_config.h"(388)
+template <bool TTop, bool TLeft, bool TRight, typename TSpec, typename TValue1, typename TIndex1, typename TValue2, typename TIndex2> inline void _lastRow(AlignConfig<TTop, TLeft, TRight, true, TSpec> const, TValue1& maxValue, TIndex1& maxIndex, TValue2 const val, TIndex2 const row, TIndex2 const col);       	// "projects/library/seqan/graph_align/graph_align_config.h"(403)
+
+//____________________________________________________________________________
+// _localAlignment
+
+template <typename TAlign, typename TStringSet, typename TScore> inline typename Value<TScore>::Type _localAlignment(TAlign& align, TStringSet const& str, TScore const& sc, SmithWaterman);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman.h"(345)
+template <typename TStringSet, typename TScore> inline typename Value<TScore>::Type _localAlignment(TStringSet const& str, TScore const& sc, SmithWaterman);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman.h"(373)
+template <typename TAlign, typename TStringSet, typename TForbidden, typename TScore, typename TDiagonal> inline typename Value<TScore>::Type _localAlignment(TStringSet& str, TAlign& align, TForbidden& forbidden, TScore const& sc, TDiagonal diag1, TDiagonal diag2, BandedSmithWatermanClump);       	// "projects/library/seqan/graph_align/graph_align_banded_smith_waterman_clump.h"(284)
+template <typename TString, typename TAlignments, typename TScores, typename TScoreValue, typename TSpec2, typename TDiagonal> inline void _localAlignment(StringSet<TString, Dependent<> > const& str, TAlignments& alignments, TScores& scores, Score<TScoreValue, TSpec2> const& sc, TScoreValue minScore, TDiagonal diag1, TDiagonal diag2, BandedSmithWatermanClump);       	// "projects/library/seqan/graph_align/graph_align_banded_smith_waterman_clump.h"(314)
+template <typename TAlign, typename TStringSet, typename TForbidden, typename TScore> inline typename Value<TScore>::Type _localAlignment(TAlign& align, TStringSet& str, TForbidden& forbidden, TScore const& sc, SmithWatermanClump);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman_clump.h"(53)
+template <typename TString, typename TMatches, typename TScores, typename TScore, typename TSize1> inline void _localAlignment(StringSet<TString, Dependent<> > const& str, TMatches& matches, TScores& scores, TScore const& sc, TSize1 numAlignments, SmithWatermanClump);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman_clump.h"(94)
+
+//____________________________________________________________________________
+// _maxOfAlignment
+
+template <typename TScoreValue, bool TTop, bool TLeft, typename TSpec, typename TValue, typename TIndex, typename TSize> inline TScoreValue _maxOfAlignment(AlignConfig<TTop, TLeft, false, false, TSpec> const, TValue& maxValue, TIndex&, TSize const, TSize const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(296)
+template <typename TScoreValue, bool TTop, bool TLeft, typename TSpec, typename TValue, typename TIndex, typename TSize> inline TScoreValue _maxOfAlignment(AlignConfig<TTop, TLeft, true, false, TSpec> const, TValue& maxValue, TIndex& maxIndex, TSize const len1, TSize const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(310)
+template <typename TScoreValue, bool TTop, bool TLeft, typename TSpec, typename TValue, typename TIndex, typename TSize> inline TScoreValue _maxOfAlignment(AlignConfig<TTop, TLeft, false, true, TSpec> const, TValue& maxValue, TIndex& maxIndex, TSize const, TSize const len2);       	// "projects/library/seqan/graph_align/graph_align_config.h"(325)
+template <typename TScoreValue, bool TTop, bool TLeft, typename TSpec, typename TValue, typename TIndex, typename TSize> inline TScoreValue _maxOfAlignment(AlignConfig<TTop, TLeft, true, true, TSpec> const, TValue& maxValue, TIndex& maxIndex, TSize const len1, TSize const len2);       	// "projects/library/seqan/graph_align/graph_align_config.h"(340)
+
+//____________________________________________________________________________
+// _pairWiseSumOfPairsScore
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScore, typename TAlignConfig> inline typename Value<TScore>::Type _pairWiseSumOfPairsScore(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TScore const& sc, TAlignConfig const);       	// "projects/library/seqan/graph_align/graph_align_config.h"(481)
+
+//____________________________________________________________________________
+// _setForbiddenCell
+
+template <typename TSpec, typename TSize> inline void _setForbiddenCell(String<bool, TSpec>& forbidden, TSize len1, TSize len2, TSize numRows);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman.h"(53)
+template <typename TSize> inline void _setForbiddenCell(Nothing&, TSize, TSize, TSize);       	// "projects/library/seqan/graph_align/graph_align_smith_waterman.h"(65)
+
+//____________________________________________________________________________
+// globalAlignment
+
+template <typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TTag> inline TScoreValue globalAlignment(TAlign& file, TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(80)
+template <typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TTag> inline TScoreValue globalAlignment(TAlign& file, TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TAlignConfig const, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(94)
+template <typename TStringSet, typename TScoreValue, typename TSpec, typename TTag> inline TScoreValue globalAlignment(TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(106)
+template <typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TTag> inline TScoreValue globalAlignment(TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TAlignConfig const, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(119)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TTag> inline TScoreValue globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, Score<TScoreValue, TSpec2> const& sc, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(131)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TAlignConfig, typename TTag> inline TScoreValue globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, Score<TScoreValue, TSpec2> const& sc, TAlignConfig const, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(145)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TAlignConfig, typename TDiagonal> inline TScoreValue globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, Score<TScoreValue, TSpec2> const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(161)
+template <typename TString, typename TAlignSpec, typename TStringSet, typename TScoreValue, typename TScoreSpec, typename TDiagonal> inline TScoreValue globalAlignment(Align<TString, TAlignSpec> & align, TStringSet const & stringSet, Score<TScoreValue, TScoreSpec> const & sc, TDiagonal diag1, TDiagonal diag2, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(177)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TDiagonal> inline TScoreValue globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, Score<TScoreValue, TSpec2> const& sc, TDiagonal diag1, TDiagonal diag2, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(195)
+template <typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TDiagonal> inline TScoreValue globalAlignment(TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(210)
+template <typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TDiagonal> inline TScoreValue globalAlignment(TAlign& file, TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TDiagonal diag1, TDiagonal diag2, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(226)
+template <typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TDiagonal> inline TScoreValue globalAlignment(TAlign& file, TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedNeedlemanWunsch);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(242)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TAlignConfig, typename TDiagonal> inline TScoreValue globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, Score<TScoreValue, TSpec2> const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedGotoh);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(258)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TDiagonal> inline TScoreValue globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, Score<TScoreValue, TSpec2> const& sc, TDiagonal diag1, TDiagonal diag2, BandedGotoh);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(273)
+template <typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TDiagonal> inline TScoreValue globalAlignment(TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedGotoh);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(288)
+template <typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TDiagonal> inline TScoreValue globalAlignment(TAlign& file, TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TDiagonal diag1, TDiagonal diag2, BandedGotoh);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(304)
+template <typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TDiagonal> inline TScoreValue globalAlignment(TAlign& file, TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TAlignConfig const, TDiagonal diag1, TDiagonal diag2, BandedGotoh);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(320)
+template <typename TStringSet, typename TCargo, typename TSpec> inline int globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, Lcs);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(331)
+
+//____________________________________________________________________________
+// localAlignment
+
+template <typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TTag> inline TScoreValue localAlignment(TAlign& file, TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(365)
+template <typename TStringSet, typename TScoreValue, typename TSpec, typename TTag> inline TScoreValue localAlignment(TStringSet const& str, Score<TScoreValue, TSpec> const& sc, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(376)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TTag> inline TScoreValue localAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, Score<TScoreValue, TSpec2> const& sc, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(388)
+
+//____________________________________________________________________________
+// multiLocalAlignment
+
+template <typename TString, typename TMatches, typename TScores, typename TScoreValue, typename TSpec2, typename TSize, typename TTag> inline void multiLocalAlignment(StringSet<TString, Dependent<> > const& str, TMatches& matches, TScores& scores, Score<TScoreValue, TSpec2> const& sc, TSize numAlignments, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(431)
+template <typename TString, typename TAlignments, typename TScores, typename TScoreValue, typename TSpec2, typename TDiagonal, typename TTag> inline void multiLocalAlignment(StringSet<TString, Dependent<> > const& str, TAlignments& alignments, TScores& scores, Score<TScoreValue, TSpec2> const& sc, TScoreValue minScore, TDiagonal diag1, TDiagonal diag2, TTag);       	// "projects/library/seqan/graph_align/graph_align_interface.h"(445)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_gotoh.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_gotoh.h
new file mode 100644
index 0000000..9138c8d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_gotoh.h
@@ -0,0 +1,327 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_GOTOH_H
+#define SEQAN_HEADER_GRAPH_ALIGN_GOTOH_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment: Gotoh Alignment, affine gap cost
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TIndexPair, typename TVal>
+inline void
+_alignGotohTrace(TAlign& align,		 
+				   TStringSet const& str,
+				   TTrace const& trace,
+				   TIndexPair const& overallMaxIndex,
+				   TVal const initialDir)
+{
+	SEQAN_CHECKPOINT
+	
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename Value<TTrace>::Type TTraceValue;
+	typedef typename Id<TStringSet>::Type TId;
+
+	// Initialization
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+
+	
+	TId id1 = positionToId(const_cast<TStringSet&>(str), 0);
+	TId id2 = positionToId(const_cast<TStringSet&>(str), 1);
+	TSize len1 = overallMaxIndex[0];
+	TSize len2 = overallMaxIndex[1];
+	TSize numCols = length(str[0]);
+	TSize numRows = length(str[1]);
+	if (len1 < numCols) _alignTracePrint(align, str, id1, len1, id2, len2, numCols - len1,  Horizontal);
+	else if (len2 < numRows) _alignTracePrint(align, str, id1, len1, id2, len2, numRows - len2,  Vertical);
+	numRows = (numRows >> 1) + (numRows & 1);
+
+	if ((len1 != 0) && (len2 !=0)) {
+
+		// Initialize everything	
+		TTraceValue nextTraceValue = (len2 & 1) ? trace[(len1 - 1)*numRows + ((len2 - 1) >> 1)] >> 4 : trace[(len1 - 1)*numRows + ((len2 - 1) >> 1)];
+		TTraceValue tv = Diagonal;
+		if (initialDir == Diagonal) tv = (nextTraceValue & 3);
+		else if (initialDir == Horizontal) {
+			if ((nextTraceValue >> 2) & 1) _alignTracePrint(align, str, id1, --len1, id2, len2, (TSize) 1, Horizontal);
+			else tv = Horizontal;
+		} else if (initialDir == Vertical) {
+			if ((nextTraceValue >> 3) & 1) _alignTracePrint(align, str, id1, len1, id2, --len2, (TSize) 1, Vertical);
+			else tv = Vertical;
+		}
+		TSize segLen = 0;
+		TTraceValue tvOld = tv;
+
+		// Now follow the trace
+		do {
+			nextTraceValue = (len2 & 1) ? trace[(len1 - 1)*numRows + ((len2 - 1) >> 1)] >> 4 : trace[(len1 - 1)*numRows + ((len2 - 1) >> 1)];
+			if (tv == Diagonal) tv = (nextTraceValue & 3);
+			else if (tv == Horizontal) {
+				if ((nextTraceValue >> 2) & 1) tv = Diagonal; 
+				else tv =  Horizontal;
+			} else if (tv == Vertical) {
+				if ((nextTraceValue >> 3) & 1) tv =  Diagonal; 
+				else tv =  Vertical;
+			}
+			if (tv == Diagonal) {
+				if (tv != tvOld) {
+					if (tvOld == Vertical) --len2; 
+					else --len1;
+					_alignTracePrint(align, str, id1, len1, id2, len2, ++segLen, tvOld);
+					tvOld = tv; segLen = 0;
+				} else {
+					++segLen;
+					--len1; --len2;
+				}
+			} else if(tv == Horizontal) {
+				if (tv != tvOld) {
+					_alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+					if ((nextTraceValue >> 2) & 1) {
+						_alignTracePrint(align, str, id1, --len1, id2, len2, (TSize) 1,  Horizontal);
+						tv =  Diagonal; segLen = 0;
+					} else {
+						tvOld = tv; segLen = 1;
+						--len1;
+					}
+				} else {
+					++segLen;
+					--len1;
+				}
+			} else if (tv == Vertical) {
+				if (tv != tvOld) {
+					_alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+					if ((nextTraceValue >> 3) & 1) {
+						_alignTracePrint(align, str, id1, len1, id2, --len2, (TSize) 1,  Vertical);
+						tv =  Diagonal; segLen = 0;
+					} else {
+						tvOld = tv; segLen = 1;
+						--len2;
+					}
+				} else {
+					++segLen;
+					--len2;
+				}
+			}
+		} while ((len1 != 0) && (len2 !=0));
+
+		// Process left-overs
+		if (segLen) _alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+	}
+
+	// Handle the remaining sequence
+	if (len1 != 0) _alignTracePrint(align, str, (TId) id1, (TSize) 0, (TId) 0, (TSize) 0, (TSize) len1,  Horizontal);
+	else if (len2 != 0) _alignTracePrint(align, str, (TId) 0, (TSize) 0, (TId) id2, (TSize) 0, (TSize) len2,  Vertical);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TAlignConfig>
+inline typename Value<TScore>::Type
+_alignGotoh(TTrace& trace,	     
+			 TStringSet const& str,
+			 TScore const & sc,
+			 TValPair& overallMaxValue,
+			 TIndexPair& overallMaxIndex,
+			 typename Value<TTrace>::Type& initialDir,
+			 TAlignConfig const)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Value<TTrace>::Type TTraceValue;
+
+	// Traceback values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+
+
+	// The DP Matrix for diagonal walks
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef String<TScoreValue> TColumn;
+	typedef typename Size<TColumn>::Type TSize;
+	TColumn mat;
+	// The DP Matrix for gaps from the left
+	TColumn horizontal;
+	// The DP Matrix for gaps from the top
+	TScoreValue vert = 0;
+
+	// Initialization
+	TString const& str1 = str[0];
+	TString const& str2 = str[1];		
+	TSize len1 = length(str1);
+	TSize len2 = length(str2);
+	resize(mat, len2 + 1, Exact());   // One column for the diagonal matrix
+	resize(horizontal, len2 + 1, Exact());   // One column for the horizontal matrix
+	resize(trace, len1 * ((len2 + 1) >> 1), 0, Exact());
+	TTraceValue tvMat = 0;
+	
+	// Classical DP
+	typedef typename Iterator<TTrace, Standard>::Type TTraceIter;
+	TTraceIter it = begin(trace, Standard() );
+	overallMaxValue[0] = MinValue<TScoreValue>::VALUE;
+	overallMaxValue[1] = MinValue<TScoreValue>::VALUE;
+	overallMaxIndex[0] = len1;
+	overallMaxIndex[1] = len2;
+	
+	typedef typename Iterator<TColumn, Standard>::Type TColIter;
+	TColIter matIt = begin(mat, Standard());
+	*matIt = 0;
+	TColIter horiIt = begin(horizontal, Standard());
+	
+	TScoreValue a = 0;
+	TScoreValue b = 0;
+	TScoreValue max_val = 0;
+	for(TSize row = 1; row <= len2; ++row) {
+		_initFirstColumn(TAlignConfig(), *(++matIt), scoreGapOpenVertical(sc, -1, 0, str1, str2) + (row - 1) * scoreGapExtendVertical(sc, -1, row - 1, str1, str2));
+		*(++horiIt) = *matIt + scoreGapOpenHorizontal(sc, 0, row-1, str1, str2) - scoreGapExtendHorizontal(sc, 0, row-1, str1, str2);
+	}
+	_lastRow(TAlignConfig(), overallMaxValue, overallMaxIndex, *matIt, 0);
+	if (overallMaxIndex[0] == 0) initialDir = Vertical;
+	for(TSize col = 1; col <= len1; ++col) {
+		matIt = begin(mat, Standard());
+		horiIt = begin(horizontal, Standard());
+		TScoreValue diagValMat = *matIt;
+		_initFirstRow(TAlignConfig(), *matIt, scoreGapOpenHorizontal(sc, 0, -1, str1, str2) + (col - 1) * scoreGapExtendHorizontal(sc, col-1, -1, str1, str2));
+		vert = *matIt + scoreGapOpenVertical(sc, col-1, 0, str1, str2) - scoreGapExtendVertical(sc, col-1, 0, str1, str2);
+		TSize row = 1; 
+		while(row <= len2) {
+			// Get the new maximum for vertical
+			a = *matIt + scoreGapOpenVertical(sc, col-1, row-1, str1, str2);
+			b = vert + scoreGapExtendVertical(sc, col-1, row-1, str1, str2);
+			if (a > b) {vert = a; *it |= 1;}
+			else vert = b;
+
+			// Get the new maximum for left
+			*it <<= 1;
+			a = *(++matIt) + scoreGapOpenHorizontal(sc, col-1, row-1, str1, str2);
+			b = *(++horiIt) + scoreGapExtendHorizontal(sc, col-1, row-1, str1, str2);
+			if (a > b) {*horiIt = a; *it |= 1;}
+			else *horiIt = b;
+			
+			// Get the new maximum for mat
+			*it <<= 2;
+			max_val = diagValMat + score(const_cast<TScore&>(sc), col-1, row-1, str1, str2);
+			tvMat = Diagonal;
+			if (vert > max_val) {
+				max_val = vert;
+				tvMat = Vertical;
+			}
+			if (*horiIt > max_val) {
+				max_val = *horiIt;
+				tvMat = Horizontal;
+			}
+			*it |= tvMat;
+
+			// Assign the new diagonal values
+			diagValMat = *matIt;
+			*matIt = max_val;
+
+			if (row & 1) *it <<= 1; else ++it;
+			++row;
+		}
+		if (!(row & 1)) {*it <<= 3; ++it; }
+		_lastRow(TAlignConfig(), overallMaxValue, overallMaxIndex, *matIt, col);
+		// If we got a new index, store direction
+		if (overallMaxIndex[0] == col) initialDir = tvMat;
+	}
+	_lastColumn(TAlignConfig(), overallMaxValue, overallMaxIndex, mat);
+	
+	// If we got a new index, store direction
+	if ((overallMaxIndex[1] != len2)  && (overallMaxValue[1] > overallMaxValue[0])) 
+		initialDir = (horizontal[overallMaxIndex[1]] == mat[overallMaxIndex[1]]) ? Horizontal : Diagonal;
+
+	// If we end up in the bottom right corner, get direction
+	if ((overallMaxIndex[0] == len1) && (overallMaxIndex[1] == len2)) {
+		initialDir =  Diagonal;
+		if (horizontal[len2] == mat[len2]) initialDir =  Horizontal;
+		else if (vert == mat[len2]) initialDir =  Vertical;
+	}
+	return _maxOfAlignment<TScoreValue>(TAlignConfig(), overallMaxValue, overallMaxIndex, len1, len2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig>
+inline typename Value<TScore>::Type
+_globalAlignment(TAlign& align,
+				 TStringSet const& str,
+				 TScore const& sc,
+				 TAlignConfig const,
+				 Gotoh)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	  
+	// Trace
+	String<unsigned char> trace;
+	unsigned char initialDir;
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[2];
+
+	// Create the trace
+	TScoreValue maxScore = _alignGotoh(trace, str, sc, overallMaxValue, overallMaxIndex, initialDir, TAlignConfig());
+	// Follow the trace and create the graph
+	_alignGotohTrace(align, str, trace, overallMaxIndex, initialDir);
+
+	return maxScore;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScore, typename TAlignConfig>
+inline typename Value<TScore>::Type
+_globalAlignment(TStringSet const& str,
+				 TScore const& sc,
+				 TAlignConfig const,
+				 Gotoh)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	// Trace
+	String<unsigned char> trace;
+	unsigned char initialDir;
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[2];
+	return _alignGotoh(trace, str, sc, overallMaxValue, overallMaxIndex, initialDir, TAlignConfig());	
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_hirschberg.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_hirschberg.h
new file mode 100644
index 0000000..53966ba
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_hirschberg.h
@@ -0,0 +1,529 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_HIRSCHBERG_H
+#define SEQAN_HEADER_GRAPH_ALIGN_HIRSCHBERG_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment: Hirschberg Alignment
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+// Note: The hirschberg trace is different from all the other traces because it simply contains the trace points!!!
+template <typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TTrace>
+void
+_alignHirschbergTrace(TAlign& align,
+						TStringSet const& str,
+						Score<TScoreValue, TSpec> const& sc,
+						TTrace& trace)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename Id<TStringSet>::Type TId;
+	typedef unsigned char TTraceValue;   
+	
+	// TraceBack values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+		
+	TId id1 = positionToId(const_cast<TStringSet&>(str), 0);
+	TId id2 = positionToId(const_cast<TStringSet&>(str), 1);	 
+	TSize len1 = length(str[0]);
+	// Current trace point (currentPointer,len1)
+	TSize currentPointer = getValue(trace, len1);
+	// Next trace point (movePointer, len1 - 1);
+	TSize movePointer = getValue(trace, len1 - 1);
+	do {
+		// Diagonal walk
+		if (((currentPointer - movePointer) == 1)  &&
+			(scoreGapOpen(sc) + scoreGapOpen(sc) <= score(const_cast<Score<TScoreValue, TSpec>&>(sc), len1-1, movePointer, str[0], str[1]))) {
+			TSize segLen = 0;
+			while (((currentPointer - movePointer) == 1)   &&
+					(scoreGapOpen(sc) + scoreGapOpen(sc) <= score(const_cast<Score<TScoreValue, TSpec>&>(sc), len1-1, movePointer, str[0], str[1]))) {
+				++segLen;
+				--len1;
+				--currentPointer;
+				if (len1>0) movePointer = getValue(trace, len1 - 1);
+				else break;
+			}
+			_alignTracePrint(align, str, id1, len1, id2, currentPointer, segLen, Diagonal);
+		} // Diagonal walk, but gapOpen and gapOpen yields a higher score
+		// Note: The case gapExtension + gapOpen cannot occur because then we would have gotten a different trace point!!!
+		else if (((currentPointer - movePointer) == 1)  &&
+			(scoreGapOpen(sc) + scoreGapOpen(sc) > score(const_cast<Score<TScoreValue, TSpec>&>(sc), len1-1, movePointer, str[0], str[1]))) {
+				_alignTracePrint(align, str, id1, (TSize) 0, id2, --currentPointer, (TSize) 1, Vertical);
+				_alignTracePrint(align, str, id1, --len1, id2,(TSize) 0, (TSize) 1, Horizontal);
+				if (len1>0) movePointer = getValue(trace, len1 - 1);
+		} // Horizontal walk 
+		else if ((currentPointer - movePointer) == 0) {
+			TSize segLen = 0;
+			while ((currentPointer - movePointer) == 0) {
+				++segLen;
+				--len1;
+				if (len1>0) movePointer = getValue(trace, len1 - 1);
+				else break;
+			}
+			_alignTracePrint(align, str, id1, len1, id2, (TSize) 0, segLen, Horizontal);
+		} // Vertical walk 
+		else {
+			// Vertical walk finishes with a horizontal vs. vertical gap
+			if ((len1 > 2) && 
+				(movePointer - getValue(trace, len1 - 2) == 0) &&
+				(scoreGapExtend(sc) + scoreGapExtend(sc) > score(const_cast<Score<TScoreValue, TSpec>&>(sc), len1-1, movePointer, str[0], str[1]))) {
+					_alignTracePrint(align, str, id1, (TSize) 0, id2, (TSize) movePointer, (TSize) currentPointer - movePointer, Vertical);
+					currentPointer = movePointer;
+			} // Vertical walk that finishes with a diagonal, but gapOpen + gapOpen is better
+			else if ((scoreGapOpen(sc) + scoreGapOpen(sc) > score(const_cast<Score<TScoreValue, TSpec>&>(sc), len1-1, movePointer, str[0], str[1]))) {
+					_alignTracePrint(align, str, id1, (TSize) 0, id2, (TSize) movePointer, (TSize) currentPointer - movePointer, Vertical);
+					currentPointer = movePointer;
+			} // Normal vertical walk that continues with a diagonal walk
+			else {
+				_alignTracePrint(align, str, id1, (TSize) 0, id2, (TSize) movePointer + 1, (TSize) currentPointer - (movePointer + 1), Vertical);
+				currentPointer = movePointer + 1;
+			}
+		}
+	} while (len1 != 0);
+	// Maybe we have to align the last vertical piece
+	if (getValue(trace, 0) != 0) {
+		_alignTracePrint(align, str, id1, (TSize) 0, id2, (TSize) 0, (TSize) getValue(trace, 0), Vertical);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTrace, typename TStringSet, typename TScoreValue, typename TSpec>
+TScoreValue
+_alignHirschberg(TTrace& trace,
+				  TStringSet const& str,
+				  Score<TScoreValue, TSpec> const& sc,
+				  Hirschberg) 
+{
+	SEQAN_CHECKPOINT
+	typedef String<TScoreValue> TColumn;
+	typedef typename Iterator<TTrace, Standard>::Type TTraceIter;
+	typedef typename Value<TStringSet const>::Type TString;
+	typedef typename Iterator<TString const, Standard>::Type TStringIter;
+	typedef typename Size<TString>::Type TSize;
+	typedef typename Value<TString>::Type TCharacter;
+	typedef unsigned char TTraceValue;   
+
+	// TraceBack values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+	TScoreValue gap = scoreGapExtend(sc);
+	TScoreValue gapOpen = scoreGapOpen(sc);
+	TScoreValue maxVal = 0; // The final score
+
+	TSize len1 = length(str[0]);
+	TSize len2 = length(str[1]);
+	resize(trace, len1+1);  // The set of trace positions
+	typedef std::pair<TSize, TSize> TPoint;   // Trace Point...
+	typedef std::pair<TPoint, TTraceValue> TListElement;  // ... and how we traversed it
+	typedef std::list<TListElement> TMidPointQueue;  // List of tracepoints -> Iterative, not recursive
+	TMidPointQueue midpoints;
+	
+	// Walk multiple time through the whole DP Matrix
+	do {
+		// Initialization
+		TSize x1 = 0;	// Current alignment window
+		TSize x2 = 0;
+		TSize y1 = 0;
+		TSize y2 = 0;
+		bool firstRun = true;		
+		bool wasHorizontal = false;		// How we entered the alignment window
+		bool wasVertical = false;
+		TScoreValue upperLeft = 0;		// The old score for the upper left initialization of the DP matrix
+		TTraceValue oldWay = Diagonal;
+		
+		
+	  
+		// Now iterate through all tracepoints found so far
+		typename TMidPointQueue::iterator it = midpoints.begin();
+		do {
+			TTraceValue tvMat, tvHorizontal, tvVertical;  // Where did the maximum for the diagonal, horizontal, and vertical matrix came from
+
+			// Step1: Get the alignment window
+			if (firstRun) {
+				x1 = 0;
+				y1 = 0;
+				firstRun = false;
+			} else {
+				x1 = x2;
+				y1 = y2;
+				++it;
+			}
+
+			if (it == midpoints.end()) {
+				x2 = len1;
+				y2 = len2;
+				// In this case we don't care how we aligned len1, len2 before
+			} else {
+				TListElement p = *it;
+				x2 = p.first.first;
+				y2 = p.first.second;
+				oldWay = p.second;  // Old alignment direction is important, we have to restore it!!!
+			}
+
+			// Step2: Do the alignment
+			TSize middle = x1 + ((x2-x1)/2);		// New cut-point in global coordinates
+			TSize inf_middle = (TSize) ((x2-x1)/2);   // New cut-point in "infix" coordinates
+			TSize inf_len1 = x2-x1;
+			TSize inf_len2 = y2-y1;
+			TScoreValue tmp = 0;		
+
+			TScoreValue inf = minValue<TScoreValue>() / 2;
+			// The DP Matrix for diagonal walks
+			TColumn mat;
+			resize(mat, (inf_len2+1));   // One column for the diagonal matrix
+			
+			// The DP Matrix for gaps from the left
+			TColumn horizontal;
+			resize(horizontal, (inf_len2+1), inf); 
+			
+			// The DP Matrix for gaps from the top, a single value is enough
+			TScoreValue vert;
+			vert = inf;
+
+
+
+			// The pointers
+			// Every back pointer stores the row it came from, so (middle, row) determines the trace point
+			// Additionally, every pointer has to remember how its trace point was traversed
+			// We do need diagonal, vertical, and horizontal pointers!!!
+			// The vertical and horizontal once are sometimes fixed depending on the way how we leave the trace point!!!
+			typedef std::pair<TSize, TTraceValue> TBackPointer;
+			String<TBackPointer> verticalPointer;
+			String<TBackPointer> horizontalPointer;
+			String<TBackPointer> diagonalPointer;
+			TBackPointer diagonalPointerOld;
+			TBackPointer tmpPointer;
+
+			// Initialization
+			resize(horizontalPointer, (inf_len2+1));  
+			resize(verticalPointer, (inf_len2+1));  
+			resize(diagonalPointer, (inf_len2+1)); 
+				
+			// Classical DP
+			assignValue(mat, 0, upperLeft);
+			// Handle the base cases
+			if ((wasHorizontal) || (inf_len2 == 0)) {
+				assignValue(horizontalPointer, 0, std::make_pair(0, Horizontal));
+				assignValue(verticalPointer, 0, std::make_pair(0, Horizontal));
+				assignValue(diagonalPointer, 0, std::make_pair(0, Horizontal));
+			} else if (wasVertical) {
+				assignValue(horizontalPointer, 0, std::make_pair(0, Vertical));
+				assignValue(verticalPointer, 0, std::make_pair(0, Vertical));
+				assignValue(diagonalPointer, 0, std::make_pair(0, Vertical));
+			} else {
+				assignValue(horizontalPointer, 0, std::make_pair(0, Horizontal));
+				assignValue(verticalPointer, 0, std::make_pair(0, Vertical));
+				assignValue(diagonalPointer, 0, std::make_pair(0, Diagonal));
+			}
+			// Initialize the first column vector
+			for(TSize row = 1; row <= inf_len2; ++row) {
+				if (wasVertical) {
+					assignValue(mat, row, upperLeft + gap + (row - 1) * gap);
+					assignValue(horizontal, row, getValue(mat, row) + gapOpen - gap);
+				} else {
+					assignValue(mat, row, upperLeft + gapOpen + (row - 1) * gap);
+					assignValue(horizontal, row, getValue(mat, row) + gapOpen - gap);
+				}
+				// All pointers in the first column point back to 0,0
+				assignValue(verticalPointer, row, std::make_pair(0, Vertical));
+				assignValue(horizontalPointer, row, std::make_pair(0, Vertical));
+				assignValue(diagonalPointer, row, std::make_pair(0, Vertical));
+			}
+			// Now traverse all columns
+//			TStringIter strIter0 = begin(str[0]);
+//			strIter0 += x1;
+			for(TSize col = 1, posX = x1; col <= inf_len1; ++col, ++posX) {
+				//if ((x1+col) % 10 == 0) std::cout << x1+col << '-' << std::flush;
+
+				TScoreValue diagValMat = getValue(mat, 0);
+				// Initialize the first row (just the first element of each column vector)
+				if (wasHorizontal) {
+					assignValue(mat, 0, upperLeft + gap + (col - 1) * gap);
+					vert = getValue(mat, 0) + gapOpen - gap;
+				} else {			    
+					assignValue(mat, 0, upperLeft + gapOpen + (col - 1) * gap);
+					vert = getValue(mat, 0) + gapOpen - gap;
+				}
+				// If there are no rows we step horizontally !!!
+				if (inf_len2 < 1) {
+					tvHorizontal = Horizontal;
+					tvMat = Horizontal;
+					assignValue(horizontal,0,getValue(mat,0));
+				}
+				// Initialize the pointers
+				if (col >= inf_middle) {
+					diagonalPointerOld = getValue(diagonalPointer,0);  // Remember the old diagonal pointer
+					// All points in the first row point back to 0,0
+					assignValue(horizontalPointer, 0, std::make_pair(0, Horizontal));
+					assignValue(diagonalPointer, 0, std::make_pair(0, Horizontal));
+					assignValue(verticalPointer, 0, std::make_pair(0, Horizontal));
+				}
+//				TCharacter charTop = getValue(strIter0);
+//				goNext(strIter0);
+//				TStringIter strIter1 = begin(str[1]);
+//				strIter1 += y1;
+				for(TSize row = 1, posY = y1; row <= inf_len2; ++row, ++posY) {
+					// Get the new maximum for vertical
+					if ((tmp = getValue(mat, row - 1) + gapOpen) > vert + gap) {
+						vert = tmp;
+						tvVertical = Diagonal;
+					} else {
+						vert = vert + gap;
+						tvVertical = Vertical;
+					}
+					
+					// Get the new maximum for horizontal
+					if ((tmp = getValue(mat, row) + gapOpen) > getValue(horizontal, row) + gap) {
+						assignValue(horizontal, row, tmp);
+						tvHorizontal = Diagonal;
+					} else {
+						assignValue(horizontal, row, getValue(horizontal, row) + gap);
+						tvHorizontal = Horizontal;
+					}
+					
+					// Get the new maximum for diagonal
+					//TScoreValue sc_ = score(const_cast<Score<TScoreValue, Simple>&>(sc), charTop, getValue(str[1],y1+row-1));
+					//tmp = diagValMat + sc_;
+//					tmp = diagValMat + score(const_cast<Score<TScoreValue, TSpec>&>(sc), charTop, getValue(strIter1));	// deprecated
+//					goNext(strIter1);
+					tmp = diagValMat + score(const_cast<Score<TScoreValue, TSpec>&>(sc), posX, posY, str[0], str[1]);
+					tvMat = Diagonal;
+					if (vert > tmp) {
+						tmp = vert;
+						tvMat = Vertical;
+					}
+					if (getValue(horizontal, row) > tmp) {
+						tmp = getValue(horizontal,row);
+						tvMat = Horizontal;
+					}
+					
+					// Assign the new diagonal value
+					diagValMat = getValue(mat, row);
+					assignValue(mat, row, tmp);
+
+					// //Debug
+					//std::cout << "Diagonal: " << row << ',' << col << ':' << getValue(mat, row) << ';';
+					//std::cout << "Horizontal: " << row << ',' << col << ':' << getValue(horizontal, row) << ';';
+					//std::cout << "Vertical: " << row << ',' << col << ':' << vert << std::endl;
+					
+					if (col >= inf_middle) {
+						
+						// If we are at the middle, initialize the pointers
+						if (col == inf_middle) {
+							assignValue(diagonalPointer, row, std::make_pair(row, tvMat));
+							assignValue(verticalPointer, row, std::make_pair(row, tvMat));
+							// If the horizontal value is as good as the vertical one, take horizontal because a gap extension is cheaper then a gap opening
+							if ((tvMat == Vertical) && 
+								(getValue(mat, row) == getValue(horizontal, row))) {
+								assignValue(horizontalPointer, row, std::make_pair(row, Horizontal));
+							} else assignValue(horizontalPointer, row, std::make_pair(row, tvMat));
+							// Fix the vertical pointer
+							if (tvVertical== Vertical) {
+								// Overwrite the diagonal value
+								// If it is needed it is still in the diagonal pointer
+								if ((getValue(verticalPointer, row-1)).second == Diagonal) value(verticalPointer, row-1).second = Vertical;
+							
+								// If I have to pay a gapOpen anyway, I better pay it right away because more gap extensions might follow
+								else if ((getValue(verticalPointer, row-1)).second == Horizontal) value(verticalPointer, row-1).second = Vertical;
+							}
+						}
+
+						// Fix the horizontal pointer
+						if (col == inf_middle + 1) {
+							if (tvHorizontal == Horizontal) {
+								// Overwrite the diagonal value
+								// If it is needed it is still in the diagonal pointer
+								if ((getValue(horizontalPointer, row)).second == Diagonal) value(horizontalPointer, row).second = Horizontal;
+
+								// If I have to pay a gapOpen anyway, I better pay it right away because more gap extensions might follow
+								else if ((getValue(horizontalPointer, row)).second == Vertical) value(horizontalPointer, row).second = Horizontal;
+							}
+						}
+
+						// If we passed the middle we need to take care of the pointers
+						if (col > inf_middle) {
+							if (tvVertical == Diagonal) assignValue(verticalPointer, row, getValue(diagonalPointer, row - 1));
+							else assignValue(verticalPointer, row, getValue(verticalPointer, row-1));
+							if (tvHorizontal == Diagonal) assignValue(horizontalPointer, row, getValue(diagonalPointer, row));
+						
+							tmpPointer = getValue(diagonalPointer, row);
+							if (tvMat == Diagonal) assignValue(diagonalPointer, row, diagonalPointerOld);
+							else if (tvMat == Horizontal) assignValue(diagonalPointer, row, getValue(horizontalPointer, row));
+							else if (tvMat == Vertical) assignValue(diagonalPointer, row, getValue(verticalPointer, row));
+							diagonalPointerOld = tmpPointer;
+						}
+					}
+				}
+			}
+			// Alignment is done, what is the best trace point?
+			// If this is the first alignment iteration...
+			if (it == midpoints.end()) {
+				maxVal = getValue(mat, inf_len2);
+				tmpPointer = getValue(diagonalPointer, inf_len2);
+				if (getValue(horizontal, inf_len2) ==  maxVal) {
+					tmpPointer = getValue(horizontalPointer, inf_len2);
+				}
+				if (vert == maxVal) {
+					tmpPointer = getValue(verticalPointer, inf_len2);
+				}
+			} // ... and if it is not
+			else {
+				if (oldWay == Diagonal) {
+					maxVal = getValue(mat, inf_len2);
+					tmpPointer = getValue(diagonalPointer, inf_len2);
+					wasVertical = false;
+					wasHorizontal = false;
+				} else if (oldWay == Horizontal) {
+					maxVal = getValue(horizontal,inf_len2);
+					tmpPointer = getValue(horizontalPointer, inf_len2);
+					wasHorizontal = true;
+					wasVertical = false;
+				} else {
+					maxVal = vert;
+					tmpPointer = getValue(verticalPointer, inf_len2);
+					wasHorizontal = false;
+					wasVertical = true;
+				}
+			}
+
+
+
+			TSize cut = y1 + tmpPointer.first;
+			upperLeft = maxVal;
+
+			// Step3: Insert the new midpoint
+			if ((x2 - x1) > 1) {
+				it = midpoints.insert(it, std::make_pair(std::make_pair(middle,cut), tmpPointer.second));
+				++it;
+			}
+
+
+			////Debug code
+			//typedef typename Infix<TString const>::Type TInfix;
+			//TInfix infix1 = infix(str[0], x1, x2);
+			//TInfix infix2 = infix(str[1], y1, y2);
+			//std::cout << infix1 << std::endl;
+			//std::cout << infix2 << std::endl;
+			//std::cout << "Trace-Point " << middle << ',' << cut << std::endl;
+			//std::cout << "Max-Score " << maxVal << std::endl;
+			//std::cout << "Direction " << (TSize) tmpPointer.second << std::endl;
+			//std::cout << "--" << std::endl;
+
+		} while (it != midpoints.end());
+
+		//std::cout << midpoints.size() << ',';
+		// Exit if all positions have a trace point
+	} while ((midpoints.size() < len1 - 1));
+	//std::cout << std::endl;
+
+	// Transform the midpoints into simple trace positions
+	TTraceIter traceIter = begin(trace, Standard() );
+	typename TMidPointQueue::iterator it = midpoints.begin();
+	if ((!midpoints.empty()) && (it->second == Diagonal)) assignValue(traceIter, it->first.second - 1); 
+	else if ((!midpoints.empty()) && (it->second == Horizontal)) assignValue(traceIter, it->first.second); 
+	else if ((!midpoints.empty()) && (it->second == Vertical)) {
+		// Where is the best exit
+		TScoreValue best = score(const_cast<Score<TScoreValue, TSpec>&>(sc), 0, 0, str[0], str[1]);
+		TSize index = 0;
+		if (it->first.second > 1) best += gapOpen;
+		if (it->first.second > 2) best += gap * (it->first.second - 2);
+		for(TSize row = 2; row < it->first.second;++row) {
+			TScoreValue newBest = gapOpen + score(const_cast<Score<TScoreValue, TSpec>&>(sc), 0, row-1, str[0], str[1]) + gapOpen;
+			newBest += gap * (it->first.second - 3);
+			if (newBest > best) {
+				best = newBest;
+				index = row-1;
+			}
+		}
+		assignValue(traceIter, index); 
+	} else assignValue(traceIter, 0); 
+	goNext(traceIter);
+	for(;it!=midpoints.end();++it) {
+		assignValue(traceIter, (it->first.second));
+		goNext(traceIter);
+	}
+	assignValue(traceIter, len2); // End point of the trace
+	
+	return maxVal;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScore, typename TSpec>
+inline typename Value<TScore>::Type
+_globalAlignment(TAlign& align,
+				 TStringSet const& str,
+				 TScore const& sc,
+				 AlignConfig<false, false, false, false, TSpec> const,
+				 Hirschberg)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	
+	// Trace
+	String<TSize> trace;
+	TScoreValue maxScore = _alignHirschberg(trace, str, sc, Hirschberg());
+
+	// Follow the trace and create the graph
+	_alignHirschbergTrace(align, str, sc, trace);
+
+	return maxScore;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScore, typename TSpec>
+inline typename Value<TScore>::Type
+_globalAlignment(TStringSet const& str,
+				 TScore const& sc,
+				 AlignConfig<false, false, false, false, TSpec> const,
+				 Hirschberg)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TStringSet>::Type TSize;
+	String<TSize> trace;
+	return _alignHirschberg(trace, str, sc, Hirschberg());	
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_interface.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_interface.h
new file mode 100644
index 0000000..90a73bd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_interface.h
@@ -0,0 +1,454 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_INTERFACE_H
+#define SEQAN_HEADER_GRAPH_ALIGN_INTERFACE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.globalAlignment:
+..summary:Computes the best global alignment of the two sequences.
+..cat:Alignments
+..signature:globalAlignment(align, score [, align_config], tag)
+..signature:globalAlignment(result, strings, score [, align_config], tag)
+..signature:globalAlignment(result, strings, score [, align_config], diagLow, diagHigh, tag)
+..param.align:An alignment data structure containing two sequences.
+...type:Spec.Alignment Graph
+...type:Class.Align
+..param.result:A data structure that gets the result of the alignment procedure, 
+ e.g., a file stream, or std::cout for a textual alignment, or a FragmentString for storing all the matches.
+..param.strings:A string set with that contains two sequences.
+...type:Class.StringSet
+..param.score:The score values to be used for computing the alignment.
+...type:Class.Score
+..param.align_config:Alignment configuration options. (optional)
+...type:Class.AlignConfig
+...remarks:The class AlignConfig has four boolean parameters, i.e., TTop, TLeft, TRight, and TBottom.
+If TTop is true the first row of the DP Matrix is initialized with 0's. If TLeft is true the first
+column is initialized with 0's. If TRight is true, the maximum is search in the last column. If TBottom
+is true, the maximum is searched in the last row. All options can be combined in all possible ways.
+....text:This feature is not yet supported for all alignment algorithms (e.g. Hirschberg).
+..paran.diagLow: The lowest diagonal that will be computed for banded alignment.
+..param.diagHigh: The upmost diagonal that will be computed for banded alignment.
+..param.tag:A tag indicating the alignment algorithm to use.
+...type:Tag.Global Alignment Algorithms
+..returns:The maximum score of an global alignment between two sequences given in $align$ or $strings$.
+...param.align:An optimal global alignment.
+....remarks:If there was an alignment stored in $align$ before $globalAlignment$ was called, it will be replaced.
+...param.result:An optimal global alignment.
+..include:seqan/graph_align.h
+*/
+template<typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TTag>
+inline TScoreValue
+globalAlignment(TAlign& file,
+				TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TTag)
+{
+	SEQAN_CHECKPOINT
+	return globalAlignment(file,str,sc, AlignConfig<>(), TTag());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TTag>
+inline TScoreValue
+globalAlignment(TAlign& file,
+				TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TAlignConfig const,
+				TTag)
+{
+	SEQAN_CHECKPOINT
+	return _globalAlignment(file,str,sc, TAlignConfig(), TTag());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScoreValue, typename TSpec, typename TTag>
+inline TScoreValue
+globalAlignment(TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TTag)
+{
+	SEQAN_CHECKPOINT
+	return globalAlignment(str,sc,AlignConfig<>(), TTag());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TTag>
+inline TScoreValue
+globalAlignment(TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TAlignConfig const,
+				TTag)
+{
+	SEQAN_CHECKPOINT
+	return _globalAlignment(str,sc, TAlignConfig(), TTag());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TTag>
+inline TScoreValue
+globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				Score<TScoreValue, TSpec2> const& sc,
+				TTag)
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+	return globalAlignment(g,stringSet(g),sc, AlignConfig<>(), TTag());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TAlignConfig, typename TTag>
+inline TScoreValue
+globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				Score<TScoreValue, TSpec2> const& sc,
+				TAlignConfig const,
+				TTag)
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+	return _globalAlignment(g,stringSet(g),sc, TAlignConfig(), TTag());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TAlignConfig, typename TDiagonal>
+inline TScoreValue
+globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				Score<TScoreValue, TSpec2> const& sc,
+				TAlignConfig const,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+	return _globalAlignment(g,stringSet(g),sc, TAlignConfig(), diag1, diag2, BandedNeedlemanWunsch());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TAlignSpec, typename TStringSet, typename TScoreValue, typename TScoreSpec, typename TDiagonal>
+inline TScoreValue
+globalAlignment(Align<TString, TAlignSpec> & align,
+                TStringSet const & stringSet,
+				Score<TScoreValue, TScoreSpec> const & sc,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT;
+    typedef typename Size<TString>::Type TSize;
+    AlignTraceback<TSize> trace;
+    int alignmentScore = globalAlignment(trace, stringSet, sc, diag1, diag2, BandedNeedlemanWunsch());
+    _pumpTraceToAlign(align, trace);
+    return alignmentScore;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TDiagonal>
+inline TScoreValue
+globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				Score<TScoreValue, TSpec2> const& sc,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+	return globalAlignment(g,sc, AlignConfig<>(), diag1, diag2, BandedNeedlemanWunsch());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TDiagonal>
+inline TScoreValue
+globalAlignment(TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TAlignConfig const,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+	return _globalAlignment(str,sc, TAlignConfig(), diag1, diag2, BandedNeedlemanWunsch());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TDiagonal>
+inline TScoreValue
+globalAlignment(TAlign& file,
+				TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+	return globalAlignment(file,str,sc, AlignConfig<>(), diag1, diag2, BandedNeedlemanWunsch());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TDiagonal>
+inline TScoreValue
+globalAlignment(TAlign& file,
+				TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TAlignConfig const,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedNeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+	return _globalAlignment(file,str,sc, TAlignConfig(), diag1, diag2, BandedNeedlemanWunsch());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TAlignConfig, typename TDiagonal>
+inline TScoreValue
+globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				Score<TScoreValue, TSpec2> const& sc,
+				TAlignConfig const,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedGotoh)
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+	return _globalAlignment(g,stringSet(g),sc, TAlignConfig(), diag1, diag2, BandedGotoh());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TDiagonal>
+inline TScoreValue
+globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				Score<TScoreValue, TSpec2> const& sc,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedGotoh)
+{
+	SEQAN_CHECKPOINT
+	return globalAlignment(g,sc, AlignConfig<>(), diag1, diag2, BandedGotoh());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TDiagonal>
+inline TScoreValue
+globalAlignment(TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TAlignConfig const,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedGotoh)
+{
+	SEQAN_CHECKPOINT
+	return _globalAlignment(str,sc, TAlignConfig(), diag1, diag2, BandedGotoh());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TDiagonal>
+inline TScoreValue
+globalAlignment(TAlign& file,
+				TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedGotoh)
+{
+	SEQAN_CHECKPOINT
+	return globalAlignment(file,str,sc, AlignConfig<>(), diag1, diag2, BandedGotoh());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TAlignConfig, typename TDiagonal>
+inline TScoreValue
+globalAlignment(TAlign& file,
+				TStringSet const& str,
+				Score<TScoreValue, TSpec> const& sc,
+				TAlignConfig const,
+				TDiagonal diag1,
+				TDiagonal diag2,
+				BandedGotoh)
+{
+	SEQAN_CHECKPOINT
+	return _globalAlignment(file,str,sc, TAlignConfig(), diag1, diag2, BandedGotoh());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline int
+globalAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				Lcs)
+{
+	return globalAlignment(g, stringSet(g), Lcs());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.localAlignment:
+..summary:Computes the best local alignment of two sequences.
+..cat:Alignments
+..signature:
+localAlignment(strSet, score, tag)
+localAlignment(graph, score, tag)
+localAlignment(file, strSet, score, tag)
+..param.strSet:A string set with 2 sequences.
+...type:Class.StringSet
+...remarks: If an alignment graph is used that graph must contain a string set with two sequences
+..param.graph:The alignment graph having 2 sequences.
+...type:Spec.Alignment Graph
+..param.file:A file stream or std::cout to write a textual alignment
+..param.score:The score values to be used for computing the alignment.
+...type:Class.Score
+..param.tag:A tag indicating the alignment algorithm to use
+...remarks:SmithWaterman
+..returns:The maximum score of the best local alignment.
+..include:seqan/graph_align.h
+*/
+template<typename TAlign, typename TStringSet, typename TScoreValue, typename TSpec, typename TTag>
+inline TScoreValue
+localAlignment(TAlign& file,
+			   TStringSet const& str,
+			   Score<TScoreValue, TSpec> const& sc,
+			   TTag)
+{
+	return _localAlignment(file,str,sc,TTag());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScoreValue, typename TSpec, typename TTag>
+inline TScoreValue
+localAlignment(TStringSet const& str,
+			   Score<TScoreValue, TSpec> const& sc,
+			   TTag)
+{
+	SEQAN_CHECKPOINT
+	return _localAlignment(str,sc,TTag());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScoreValue, typename TSpec2, typename TTag>
+inline TScoreValue
+localAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+			   Score<TScoreValue, TSpec2> const& sc,
+			   TTag)
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+	return _localAlignment(g,stringSet(g),sc,TTag());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.multiLocalAlignment:
+..summary:Computes multiple local alignments of two sequences.
+..cat:Alignments
+..signature:
+multiLocalAlignment(strSet, matches, scores, scType, numAlign, tag)
+multiLocalAlignment(strSet, alignments, scores, scType, minScore, diagLow, diagHigh, tag)
+..param.strSet:A string set of 2 sequences.
+...type:Class.StringSet
+..param.matches:The set of all local alignment matches.
+..param.scores:The respective local alignment score that match was coming from.
+..param.scType:A scoring object.
+..param.minScore: The minimal score of a local alignment.
+..paran.diagLow: The lowest diagonal that will be computed for banded alignment.
+..param.diagHigh: The upmost diagonal that will be computed for banded alignment.
+...type:Class.Score
+..param.numAlign:The desired number of local alignments to compute.
+..param.tag:A tag indicating the alignment algorithm to use
+...remarks: $SmithWatermanClump$ or $BandedSmithWatermanClump$
+..returns:void
+..include:seqan/graph_align.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TMatches, typename TScores, typename TScoreValue, typename TSpec2, typename TSize, typename TTag>
+inline void
+multiLocalAlignment(StringSet<TString, Dependent<> > const& str,
+					TMatches& matches,
+					TScores& scores,
+					Score<TScoreValue, TSpec2> const& sc,
+					TSize numAlignments,
+					TTag)
+{
+	// Make a multiple local alignment and get all matches
+	_localAlignment(str,matches,scores,sc,numAlignments,TTag());
+}
+
+template<typename TString, typename TAlignments, typename TScores, typename TScoreValue, typename TSpec2, typename TDiagonal, typename TTag>
+inline void
+multiLocalAlignment(StringSet<TString, Dependent<> > const& str,
+                    TAlignments& alignments,
+                    TScores& scores,
+                    Score<TScoreValue, TSpec2> const& sc,
+                    TScoreValue minScore,
+                    TDiagonal diag1,
+                    TDiagonal diag2,
+                    TTag) {
+	// Make multiple local alignment and save them in alignments container
+	_localAlignment(str, alignments, scores, sc, minScore, diag1, diag2, TTag());
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_needleman_wunsch.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_needleman_wunsch.h
new file mode 100644
index 0000000..cc0ebad
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_needleman_wunsch.h
@@ -0,0 +1,288 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_NEEDLEMAN_WUNSCH_H
+#define SEQAN_HEADER_GRAPH_NEEDLEMAN_WUNSCH_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment: Needleman-Wunsch Alignment, constant gap cost
+// Gap extension score is taken as the constant gap score!!!
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TIndexPair>
+inline void
+_alignNeedlemanWunschMatrix(TAlign&,
+							  TStringSet const&,
+							  TTrace const&,
+							  TIndexPair const&)
+{
+	// empty by default
+}
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TIndexPair>
+void
+_alignNeedlemanWunschTrace(TAlign& align,
+							  TStringSet const& str,
+							  TTrace const& trace,
+							  TIndexPair const& overallMaxIndex)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename Id<TStringSet>::Type TId;
+	typedef typename Value<TTrace>::Type TTraceValue;
+	
+
+	_alignNeedlemanWunschMatrix(align, str, trace, overallMaxIndex);
+	
+	// TraceBack values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+	static const TTraceValue tvmap[] = { Diagonal, Diagonal, Horizontal, Diagonal, Vertical, Diagonal, Horizontal, Diagonal };
+	
+	// Initialization
+	TId id1 = positionToId(const_cast<TStringSet&>(str), 0);
+	TId id2 = positionToId(const_cast<TStringSet&>(str), 1);
+	TSize len1 = overallMaxIndex[0];
+	TSize len2 = overallMaxIndex[1];
+	TSize numCols = length(str[0]);
+	TSize numRows = length(str[1]);
+	if (len1 < numCols) _alignTracePrint(align, str, id1, len1, id2, len2, numCols - len1, Horizontal);
+	else if (len2 < numRows) _alignTracePrint(align, str, id1, len1, id2, len2, numRows - len2, Vertical);
+	
+	if ((len1 != 0) && (len2 !=0)) {
+	
+		// Initialize everything
+		TTraceValue tv = tvmap[(int)trace[(len1-1)*numRows + (len2-1)]];
+		TTraceValue tvOld = tv;  // We need to know when the direction of the trace changes
+
+		TSize segLen = 1;
+		if (tv == Diagonal) {
+			--len1; --len2;
+		}
+		else if (tv == Horizontal) --len1;
+		else if (tv == Vertical) --len2;
+
+		// Now follow the trace
+		if ((len1 != 0) && (len2 !=0)) {
+			do {
+				tv = tvmap[(int)trace[(len1-1)*numRows + (len2-1)]];
+				if (tv == Diagonal) {
+					if (tv != tvOld) {
+						_alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+						tvOld = tv; segLen = 1;
+					} else ++segLen;
+					--len1; --len2;
+				} else if (tv == Horizontal) {
+					//std::cout << '(' << ((*str)[0])[len1 - 1] << ',' << '-' << ')' << std::endl;
+					if (tv != tvOld) {
+						_alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+						tvOld = tv; segLen = 1;
+					} else ++segLen;
+					--len1;
+				} else if (tv == Vertical) {
+					//std::cout << '(' << '-' << ',' << ((*str)[1])[len2-1] << ')' << std::endl;
+					if (tv != tvOld) {
+						_alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+						tvOld = tv; segLen = 1;
+					} else ++segLen;
+					--len2;
+				}
+			} while ((len1 != 0) && (len2 !=0));
+		}
+		// Process left-overs
+		_alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+	}
+
+	// Handle the remaining sequence
+	if (len1 != 0) _alignTracePrint(align, str, (TId) id1, (TSize) 0, (TId) 0, (TSize) 0, (TSize) len1, Horizontal);
+	else if (len2 != 0) _alignTracePrint(align, str, (TId) 0, (TSize) 0, (TId) id2, (TSize) 0, (TSize) len2, Vertical);
+}
+
+	
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TValPair, typename TIndexPair, typename TAlignConfig>
+inline typename Value<TScore>::Type
+_alignNeedlemanWunsch(TTrace & trace,
+						TStringSet const & str,
+						TScore const & _sc,
+						TValPair & overallMaxValue,
+						TIndexPair & overallMaxIndex,
+						TAlignConfig const) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Value<TTrace>::Type TTraceValue;
+
+	// TraceBack values
+	const int Diagonal = 0;
+	const int Horizontal = 1;
+	const int Vertical = 2;
+
+	// One DP Matrix column
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef String<TScoreValue> TColumn;
+	typedef typename Size<TColumn>::Type TSize;
+	TColumn column;
+
+	// Initialization
+	TString const& str1 = str[0];
+	TString const& str2 = str[1];
+	TSize len1 = length(str1);
+	TSize len2 = length(str2);
+	overallMaxValue[0] = MinValue<TScoreValue>::VALUE;
+	overallMaxValue[1] = MinValue<TScoreValue>::VALUE;
+	overallMaxIndex[0] = len1;
+	overallMaxIndex[1] = len2;
+
+	resize(column, len2 + 1);
+//	resize(trace, len1*len2);
+	resize(trace, len1*len2, 0);
+	typedef typename Iterator<TColumn, Standard>::Type TColIterator;
+	TColIterator coit = begin(column, Standard());
+	TColIterator col_end = end(column, Standard());
+	*coit = 0;
+	for(TSize row = 1; row <= len2; ++row) _initFirstColumn(TAlignConfig(), *(++coit), (TScoreValue) (row) * scoreGapExtendVertical(_sc, -1, row - 1, str1, str2));
+	_lastRow(TAlignConfig(), overallMaxValue, overallMaxIndex, column[len2], 0);
+	//for(TSize i = 0; i <= len2; ++i) std::cout << value(column, i) << std::endl;
+	
+	// Classical DP
+	typedef typename Iterator<TTrace, Standard>::Type TTraceIter;
+	TTraceIter it = begin(trace, Standard() );
+	TScoreValue diagVal = 0;
+	TScoreValue max_diag = 0;
+	TScoreValue max_verti = 0;
+	TScoreValue max_hori = 0;
+	TScoreValue max_all;
+	TSize col2 = 0;
+	for(TSize col = 0; col < len1; ++col) 
+	{
+		coit = begin(column, Standard());
+		diagVal = *coit;
+		_initFirstRow(TAlignConfig(), *coit, (TScoreValue) (col+1) * scoreGapExtendHorizontal(_sc, col, -1, str1, str2));
+		max_verti = *coit;
+		col2 = 0;
+
+		for(;++coit != col_end; ++it)
+		{
+			// Get max for vertical, horizontal and diagonal
+			max_verti += scoreGapExtendVertical(_sc, col, col2, str1, str2);
+			max_hori = *coit + scoreGapExtendHorizontal(_sc, col, col2, str1, str2);
+			max_diag = diagVal + score(_sc, col, col2++, str1, str2); //compute the maximum in vertiVal 
+			
+			diagVal = *coit;
+			
+			// Choose the max values
+			max_all = _max(_max(max_verti, max_hori), max_diag);
+			if (max_verti == max_all) *it |= 1 << Vertical;
+			if (max_diag == max_all)  *it |= 1 << Diagonal;
+			if (max_hori == max_all)  *it |= 1 << Horizontal;
+			*coit = max_verti = max_all;
+/*			if (max_diag >= _max(max_verti, max_hori)) {
+				*it = Diagonal;
+				max_verti = *coit = max_diag;
+			} else if (max_hori >= max_verti) {
+				*it = Horizontal;
+				max_verti = *coit = max_hori;
+			} else {
+				*it = Vertical;
+				*coit = max_verti;
+			}
+*/		}
+		_lastRow(TAlignConfig(), overallMaxValue, overallMaxIndex, max_verti, col+1);
+	}
+	_lastColumn(TAlignConfig(), overallMaxValue, overallMaxIndex, column);
+
+	//for(TSize i= 0; i<len2;++i) {
+	//	for(TSize j= 0; j<len1;++j) {
+	//		std::cout << (TSize) getValue(trace, j*len2 + i) << ',';
+	//	}
+	//	std::cout << std::endl;
+	//}
+
+	return _maxOfAlignment<TScoreValue>(TAlignConfig(), overallMaxValue, overallMaxIndex, len1, len2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScore, typename TAlignConfig>
+inline typename Value<TScore>::Type
+_globalAlignment(TAlign& align,
+				 TStringSet const& str,
+				 TScore const& sc,
+				 TAlignConfig const,
+				 NeedlemanWunsch)
+				 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+
+	// Create the trace
+	String<char> trace;
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[2];
+	TScoreValue	maxScore = _alignNeedlemanWunsch(trace, str, sc, overallMaxValue, overallMaxIndex, TAlignConfig());	
+
+	// Follow the trace and create the graph
+	_alignNeedlemanWunschTrace(align, str, trace, overallMaxIndex);	
+
+	return maxScore;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScore, typename TAlignConfig>
+inline typename Value<TScore>::Type
+_globalAlignment(TStringSet const& str,
+				 TScore const& sc,
+				 TAlignConfig const,
+				 NeedlemanWunsch)
+{
+	SEQAN_CHECKPOINT
+
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	
+	String<char> trace;
+	TScoreValue overallMaxValue[2];
+	TSize overallMaxIndex[2];
+	return _alignNeedlemanWunsch(trace, str, sc, overallMaxValue, overallMaxIndex, TAlignConfig());	
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_smith_waterman.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_smith_waterman.h
new file mode 100644
index 0000000..e406f86
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_smith_waterman.h
@@ -0,0 +1,388 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_SMITH_WATERMAN_H
+#define SEQAN_HEADER_GRAPH_SMITH_WATERMAN_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment: Smith Waterman Alignment, affine gap cost
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TSize>
+inline void
+_setForbiddenCell(String<bool, TSpec>& forbidden,
+				  TSize len1,
+				  TSize len2,
+				  TSize numRows)
+{
+	forbidden[(len1 - 1)*numRows + (len2 - 1)] = true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize>
+inline void
+_setForbiddenCell(Nothing&,
+				  TSize,
+				  TSize,
+				  TSize)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TSize>
+inline bool
+_isClumping(String<bool, TSpec> const& forbidden,
+			TSize row,
+			TSize col,
+			TSize len2)
+{
+	return forbidden[(col-1) * len2 + (row-1)];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize>
+inline bool
+_isClumping(Nothing&,
+			TSize,
+			TSize,
+			TSize)
+{
+	return false;
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TStringSet, typename TTrace, typename TVal, typename TIndexPair, typename TForbidden>
+inline void
+_alignSmithWatermanTrace(TAlign& align,
+							TStringSet const& str,
+							TTrace const& trace,
+							TVal const initialDir,
+							TIndexPair const& indexPair,
+							TForbidden& forbidden)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TTrace>::Type TSize;
+	typedef typename Value<TTrace>::Type TTraceValue;
+	typedef typename Id<TStringSet>::Type TId;
+
+	// TraceBack values for Gotoh
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2; TTraceValue Stop = 3;
+
+	TId id1 = positionToId(const_cast<TStringSet&>(str), 0);
+	TId id2 = positionToId(const_cast<TStringSet&>(str), 1);	 
+	TSize len1 = indexPair[1];
+	TSize len2 = indexPair[0];
+	if ((indexPair[0] == 0) || (indexPair[1] == 0)) return;
+	TSize numCols = length(str[0]);
+	TSize numRowsOrig = length(str[1]);
+	if (len1 < numCols) _alignTracePrint(align, str, id1, len1, id2, len2, numCols - len1, Horizontal);
+	if (len2 < numRowsOrig) _alignTracePrint(align, str, id1, len1, id2, len2, numRowsOrig - len2, Vertical);
+	TSize numRows = (numRowsOrig >> 1) + (numRowsOrig & 1);
+	
+	
+
+	// Initialize everything	
+	TTraceValue nextTraceValue = (len2 & 1) ? trace[(len1 - 1)*numRows + ((len2 - 1) >> 1)] >> 4 : trace[(len1 - 1)*numRows + ((len2 - 1) >> 1)];
+	TTraceValue tv = Diagonal;
+	if (initialDir == Diagonal) tv = (nextTraceValue & 3);
+	else if (initialDir == Horizontal) {
+		if ((nextTraceValue >> 2) & 1) _alignTracePrint(align, str, id1, --len1, id2, len2, (TSize) 1, Horizontal);
+		else tv = Horizontal;
+	} else if (initialDir == Vertical) {
+		if ((nextTraceValue >> 3) & 1) _alignTracePrint(align, str, id1, len1, id2, --len2, (TSize) 1, Vertical);
+		else tv = Vertical;
+	}
+	TSize segLen = 0;
+	TTraceValue tvOld = tv;
+
+	// Now follow the trace
+	do {
+		nextTraceValue = (len2 & 1) ? trace[(len1 - 1)*numRows + ((len2 - 1) >> 1)] >> 4 : trace[(len1 - 1)*numRows + ((len2 - 1) >> 1)];
+		if ((nextTraceValue & 3) == Stop) break;
+		_setForbiddenCell(forbidden, len1, len2, numRowsOrig);	
+		if (tv == Diagonal) tv = (nextTraceValue & 3);
+		else if (tv == Horizontal) {
+			if ((nextTraceValue >> 2) & 1) tv = Diagonal; 
+			else tv =  Horizontal;
+		} else if (tv == Vertical) {
+			if ((nextTraceValue >> 3) & 1) tv =  Diagonal; 
+			else tv =  Vertical;
+		}
+		if (tv == Diagonal) {
+			if (tv != tvOld) {
+				if (tvOld == Vertical) --len2;
+				else --len1;
+				_alignTracePrint(align, str, id1, len1, id2, len2, ++segLen, tvOld);
+				tvOld = tv; segLen = 0;
+			} else {
+				++segLen;
+				--len1; --len2;
+			}
+		} else if (tv == Horizontal) {
+			if (tv != tvOld) {
+				_alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+				if ((nextTraceValue >> 2) & 1) {
+					_alignTracePrint(align, str, id1, --len1, id2, len2, (TSize) 1, Horizontal);
+					tv = Diagonal; segLen = 0;
+				} else {
+					tvOld = tv; segLen = 1;
+					--len1;
+				}
+			} else {
+				++segLen;
+				--len1;
+			}
+		} else if (tv == Vertical) {
+			if (tv != tvOld) {
+				_alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+				if ((nextTraceValue >> 3) & 1) {
+					_alignTracePrint(align, str, id1, len1, id2, --len2, (TSize) 1, Vertical);
+					tv = Diagonal; segLen = 0;
+				} else {
+					tvOld = tv; segLen = 1;
+					--len2;
+				}
+			} else {
+				++segLen;
+				--len2;
+			}
+		}
+	} while ((len1 != 0) && (len2 !=0));
+	// Process left-overs
+	if (segLen) _alignTracePrint(align, str, id1, len1, id2, len2, segLen, tvOld);
+
+	// Handle the remaining sequence
+	if (len1 != 0) _alignTracePrint(align, str, (TId) id1, (TSize) 0, (TId) 0, (TSize) 0, (TSize) len1, Horizontal);
+	if (len2 != 0) _alignTracePrint(align, str, (TId) 0, (TSize) 0, (TId) id2, (TSize) 0, (TSize) len2, Vertical);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTrace, typename TStringSet, typename TScore, typename TIndexPair, typename TForbidden>
+inline typename Value<TScore>::Type
+_alignSmithWaterman(TTrace& trace,
+					  TStringSet const& str,
+					  TScore const & sc,
+					  typename Value<TTrace>::Type& initialDir,
+					  TIndexPair& indexPair,
+					  TForbidden& forbidden)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TTrace>::Type TSize;
+	typedef typename Value<TTrace>::Type TTraceValue;
+	
+	// TraceBack values for Smith Waterman
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2; TTraceValue Stop = 3;
+
+	// The DP Matrix for diagonal walks
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef String<TScoreValue> TColumn;
+	TColumn mat;
+	// The DP Matrix for gaps from the left
+	TColumn horizontal;
+	// The DP Matrix for gaps from the top
+	TScoreValue vert = 0;
+
+	typedef typename Iterator<TColumn, Standard>::Type TMatIter;
+
+	// Initialization
+	typedef typename Value<TStringSet>::Type TString;
+	TString const& str1 = str[0];
+	TString const& str2 = str[1];		
+	TSize len1 = length(str1);
+	TSize len2 = length(str2);
+	resize(mat, (len2+1));   // One column for the diagonal matrix
+	resize(horizontal, (len2+1));   // One column for the horizontal matrix
+	resize(trace, len1 * ((len2 >> 1) + (len2 & 1)), 0);
+	TTraceValue tvMat= 0;
+
+	// Record the max score
+	TScoreValue score_max = 0;
+	indexPair[0] = 0; indexPair[1] = 0;
+	initialDir = Stop;
+	
+	// Classical DP
+	TScoreValue max_val = 0;
+	TScoreValue a = 0;
+	TScoreValue b = 0;
+	typedef typename Iterator<TTrace, Standard>::Type TTraceIter;
+	TTraceIter it = begin(trace, Standard() );
+	TMatIter matIt = begin(mat, Standard() );
+	TMatIter horiIt = begin(horizontal, Standard() );
+	*matIt = 0;
+	for(TSize row = 1; row <= len2; ++row) {
+		*(++matIt) = 0;
+		*(++horiIt) = scoreGapOpenHorizontal(sc, 0, row-1, str1, str2) - scoreGapExtendHorizontal(sc, 0, row-1, str1, str2);
+	}
+	for(TSize col = 1; col <= len1; ++col) {
+		matIt = begin(mat, Standard() );
+		horiIt = begin(horizontal, Standard() );
+		TScoreValue diagValMat = *matIt;
+		*matIt = 0;
+		vert = scoreGapOpenVertical(sc, col-1, 0, str1, str2) - scoreGapExtendVertical(sc, col-1, 0, str1, str2);
+		TSize row = 1;
+		while(row <= len2) {
+			if (_isClumping(forbidden, row, col, len2)) {
+				*it <<= 3;
+				*it |= Stop;
+				max_val = 0;
+				vert = 0;
+				*(++horiIt) = 0;
+				++matIt;
+			} else {
+				// Get the new maximum for vertical
+				a = *matIt + scoreGapOpenVertical(sc, col-1, row-1, str1, str2);
+				b = vert + scoreGapExtendVertical(sc, col-1, row-1, str1, str2);
+				if (a > b) { vert = a; *it |= 1;} 
+				else vert = b;
+	
+				// Get the new maximum for horizontal
+				*it <<= 1;
+				a = *(++matIt) + scoreGapOpenHorizontal(sc, col-1, row-1, str1, str2);
+				b = *(++horiIt) + scoreGapExtendHorizontal(sc, col-1, row-1, str1, str2);
+				if (a > b) {*horiIt = a; *it |= 1; } 
+				else *horiIt =  b;
+	
+				// Get the new maximum for mat
+				*it <<= 2;
+				max_val = diagValMat + score(const_cast<TScore&>(sc), col-1, row-1, str1, str2);
+				tvMat =  Diagonal;
+				if (vert > max_val) {
+					max_val = vert;
+					tvMat =  Vertical;
+				}
+				if (*horiIt > max_val) {
+					max_val = *horiIt;
+					tvMat =  Horizontal;
+				}
+				if (0 >= max_val) {
+					max_val = 0;
+					tvMat =  Stop;
+				}
+				*it |= tvMat;
+			}
+
+			// Assign the new diagonal values
+			diagValMat = *matIt;
+			*matIt = max_val;
+
+			// Record the new best score
+			if (max_val > score_max) {
+				indexPair[0] = row; indexPair[1] = col;
+				score_max = max_val;
+				initialDir = tvMat;
+			}
+
+			if (row & 1) *it <<= 1; else ++it;
+			++row;
+		}
+		if (!(row & 1)) {*it <<= 3; ++it; }
+	}
+
+	//// Debug code
+	//for(TSize i= 0; i<len2;++i) {
+	//	for(TSize j= 0; j<len1;++j) {
+	//		std::cout << (TSize) getValue(trace, j*len2 + i) << ',';
+	//	}
+	//	std::cout << std::endl;
+	//}
+	//std::cout << "Max score: " << best_row << ',' << best_col << ':' << score_max << " (" << (TSize) initialDir << ")" << std::endl;
+
+	return score_max;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TScore>
+inline typename Value<TScore>::Type
+_localAlignment(TAlign& align,
+				TStringSet const& str,
+				TScore const& sc,
+				SmithWaterman)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	  
+	TScoreValue maxScore;
+	TSize indexPair[2];
+	Nothing forbidden;
+
+	// Trace
+	String<unsigned char> trace;
+	unsigned char initialDir;
+
+	// Create the trace
+	maxScore = _alignSmithWaterman(trace, str, sc, initialDir, indexPair, forbidden);	
+	// Follow the trace and create the graph
+	_alignSmithWatermanTrace(align, str, trace, initialDir, indexPair, forbidden);
+	
+	return maxScore;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TScore>
+inline typename Value<TScore>::Type
+_localAlignment(TStringSet const& str,
+				TScore const& sc,
+				SmithWaterman)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TStringSet>::Type TSize;
+	TSize indexPair[2];
+	Nothing forbidden;
+	// Trace
+	String<unsigned char> trace;
+	unsigned char initialDir;
+	return _alignSmithWaterman(trace, str, sc, initialDir, indexPair, forbidden);	
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_align/graph_align_smith_waterman_clump.h b/src/SeqAn-1.3/seqan/graph_align/graph_align_smith_waterman_clump.h
new file mode 100644
index 0000000..22a481c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_align/graph_align_smith_waterman_clump.h
@@ -0,0 +1,125 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_SMITH_WATERMAN_CLUMP_H
+#define SEQAN_HEADER_GRAPH_SMITH_WATERMAN_CLUMP_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment: Smith Waterman Alignment with Clumping, affine gap cost
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlign, typename TStringSet, typename TForbidden, typename TScore>
+inline typename Value<TScore>::Type
+_localAlignment(TAlign& align,
+				TStringSet& str,
+				TForbidden& forbidden,
+				TScore const& sc,
+				SmithWatermanClump)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	  
+	TScoreValue maxScore;
+	TSize indexPair[2];
+	
+	// Trace
+	String<unsigned char> trace;
+	unsigned char initialDir;
+
+	// Create the trace
+	maxScore = _alignSmithWaterman(trace, str, sc, initialDir, indexPair, forbidden);	
+
+	//// Debug code
+	//for(TSize i= 0; i<length(str[1]);++i) {
+	//	for(TSize j= 0; j<length(str[0]);++j) {
+	//		std::cout << (TSize) getValue(forbidden, j*length(str[1]) + i) << ',';
+	//	}
+	//	std::cout << std::endl;
+	//}
+	//std::cout << std::endl;
+	
+	// Follow the trace and create the alignment
+	_alignSmithWatermanTrace(align, str, trace, initialDir, indexPair, forbidden);
+	
+	return maxScore;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+template<typename TString, typename TMatches, typename TScores, typename TScore, typename TSize1>
+inline void
+_localAlignment(StringSet<TString, Dependent<> > const& str,
+				TMatches& matches,
+				TScores& scores,
+				TScore const& sc,
+				TSize1 numAlignments,
+				SmithWatermanClump)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TMatches>::Type TSize;
+  
+	// For clumpping remember the used positions
+	TSize len0 = length(str[0]);
+	TSize len1 = length(str[1]);
+	String<bool> forbidden;
+	resize(forbidden, len0 * len1, false);
+
+	// Stop looking for local alignments, if there score is too low
+	TScoreValue local_score = 0;
+	TScoreValue last_score = 0;
+	for(TSize count = 0; count < (TSize) numAlignments; ++count) {
+		// Create the local alignment
+		TSize from = length(matches);
+		local_score = _localAlignment(matches, str, forbidden, sc, SmithWatermanClump());
+		TSize to = length(matches);
+		if (2 * local_score < last_score) {
+			resize(matches, from, Generous());
+			break;
+		} 
+		last_score = local_score;
+		resize(scores, to);
+		for(TSize k = from; k<to; ++k) scores[k] = local_score;
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa.h b/src/SeqAn-1.3/seqan/graph_msa.h
new file mode 100644
index 0000000..bf74490
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa.h
@@ -0,0 +1,59 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_MSA_H
+#define SEQAN_HEADER_GRAPH_MSA_H
+
+// Seqan
+#include <seqan/score.h>
+#include <seqan/graph_types.h>
+#include <seqan/graph_algorithms.h>
+#include <seqan/refinement.h>
+#include <seqan/graph_align.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/graph_msa/graph_msa_generated_forwards.h>
+#endif
+
+
+//MSA
+#include <seqan/graph_msa/graph_align_tcoffee_base.h>
+#include <seqan/graph_msa/graph_align_tcoffee_msa.h>
+#include <seqan/graph_msa/graph_align_tcoffee_kmer.h>
+#include <seqan/graph_msa/graph_align_tcoffee_distance.h>
+#include <seqan/graph_msa/graph_align_tcoffee_guidetree.h>
+#include <seqan/graph_msa/graph_align_tcoffee_io.h>
+#include <seqan/graph_msa/graph_align_tcoffee_library.h>
+#include <seqan/graph_msa/graph_align_tcoffee_progressive.h>
+#include <seqan/graph_msa/graph_align_tcoffee_refinement.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_base.h b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_base.h
new file mode 100644
index 0000000..ed11788
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_base.h
@@ -0,0 +1,1050 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_BASE_H
+#define SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Distance unity
+//////////////////////////////////////////////////////////////////////////////
+
+//static const int SEQAN_DISTANCE_UNITY = 1 << 20;
+static const int SEQAN_DISTANCE_UNITY = 1;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Tags
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Combination:
+..summary:A tag to specify how to combine alignment graphs.
+..include:seqan/graph_msa.h
+*/
+
+/**
+.Tag.Alignment Graph Combination.value.FractionalScore:
+	Rescores matches with the appropriate fractional score.
+..include:seqan/graph_msa.h
+*/
+struct FractionalScore_;
+typedef Tag<FractionalScore_> const FractionalScore;
+
+
+/**
+.Tag.Alignment Graph Combination.value.FrequencyCount:
+	Rescores matches with the frequency count for this edge.
+..include:seqan/graph_msa.h
+*/
+struct FrequencyCounting_;
+typedef Tag<FrequencyCounting_> const FrequencyCounting;
+
+/**
+.Tag.Alignment Graph Combination.value.ReScore:
+	Rescores the matches after segment-match refinement.
+..include:seqan/graph_msa.h
+*/
+struct ReScore_;
+typedef Tag<ReScore_> const ReScore;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Generating an alignment graph from segment matches
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TStringSet, typename TCargo, typename TSpec> 
+inline void
+buildAlignmentGraph(String<TFragment, TSpec1>& matches,
+					String<TScoreValue, TSpec2>& scores,
+					Graph<Alignment<TStringSet, TCargo, TSpec> >& outGraph,
+					FractionalScore)
+{
+	SEQAN_CHECKPOINT
+	typedef String<TFragment, TSpec1> TFragmentString;
+	typedef typename Iterator<TFragmentString, Standard>::Type TFragmentStringIter;
+	typedef String<TScoreValue, TSpec2> TScoreValues;
+	typedef typename Iterator<TScoreValues, Standard>::Type TScoreValuesIter;
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TOutGraph;
+	typedef typename Size<TFragmentString>::Type TSize;
+	typedef typename Id<TOutGraph>::Type TId;
+	typedef typename EdgeDescriptor<TOutGraph>::Type TEdgeDescriptor;
+	typedef typename VertexDescriptor<TOutGraph>::Type TVertexDescriptor;
+	
+	// Initialization
+	clearVertices(outGraph);
+	TStringSet& strSet = stringSet(outGraph);
+	
+	// Segment-match refinement
+	matchRefinement(matches,strSet,outGraph);
+
+	// Clear edge-weights
+	typedef typename Iterator<TOutGraph, EdgeIterator>::Type TEdgeIterator;
+	TEdgeIterator itE(outGraph);
+	for(;!atEnd(itE);goNext(itE)) cargo(value(itE)) = 1;
+
+	// Adapt the scores
+	TFragmentStringIter it = begin(matches, Standard() );
+	TFragmentStringIter endIt = end(matches, Standard() );
+	TScoreValuesIter scoreIt = begin(scores, Standard() );
+	for(; it != endIt; ++it, ++scoreIt) {
+		TId id1 = sequenceId(*it,0);
+		TId id2 = sequenceId(*it,1);
+		TSize pos1 = fragmentBegin(*it, id1);
+		TSize pos2 = fragmentBegin(*it, id2);
+		TSize fragLen = fragmentLength(*it, id1);
+		TSize end1 = pos1 + fragLen;
+		while(pos1 < end1) {
+			TVertexDescriptor p1 = findVertex(outGraph, id1, pos1);
+			TVertexDescriptor p2 = findVertex(outGraph, id2, pos2);
+			TSize vertexLen = fragmentLength(outGraph, p1);
+			cargo(findEdge(outGraph, p1, p2)) += (TCargo) ((vertexLen * (*scoreIt)) / fragLen);
+			pos1 += vertexLen;
+			pos2 += vertexLen;
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFragment, typename TSpec1, typename TStringSet, typename TCargo, typename TSpec> 
+inline void
+buildAlignmentGraph(String<TFragment, TSpec1>& matches,
+					Graph<Alignment<TStringSet, TCargo, TSpec> >& outGraph,
+					FrequencyCounting)
+{
+	SEQAN_CHECKPOINT
+	typedef String<TFragment, TSpec1> TFragmentString;
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TOutGraph;
+	typedef typename Size<TFragmentString>::Type TSize;
+	
+	// Initialization
+	clearVertices(outGraph);
+	TStringSet& strSet = stringSet(outGraph);
+	
+	// Segment-match refinement
+	matchRefinement(matches,strSet,outGraph);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TStringSet, typename TCargo, typename TSpec> 
+inline void
+buildAlignmentGraph(String<TFragment, TSpec1>& matches,
+					String<TScoreValue, TSpec2>&,
+					Graph<Alignment<TStringSet, TCargo, TSpec> >& outGraph,
+					FrequencyCounting)
+{
+	buildAlignmentGraph(matches, outGraph, FrequencyCounting() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TScoreType, typename TSize, typename TSpec2, typename TScoreString, typename TScoreValue> 
+inline void
+_scoreMatches(StringSet<TString, TSpec> const& seqSet,
+			  TScoreType const& scType,
+			  String<Fragment<TSize, ExactFragment<> >, TSpec2> const& matches,
+			  TScoreString& scores,
+			  TScoreValue offset)
+{
+	SEQAN_CHECKPOINT
+	typedef String<Fragment<TSize, ExactFragment<> >, TSpec2> TFragmentString;
+	typedef typename Id<typename Value<TFragmentString>::Type>::Type TId;
+	typedef typename Iterator<TFragmentString, Standard>::Type TFragmentStringIter;
+	typedef typename Iterator<TString, Standard>::Type TStringIter;
+	typedef typename Iterator<TScoreString, Standard>::Type TScoreStringIter;
+	resize(scores, length(matches));
+
+	// Get the scores
+	TFragmentStringIter itF = begin(matches, Standard() );
+	TFragmentStringIter itFEnd = end(matches, Standard() );
+	TScoreStringIter itSc = begin(scores, Standard() );
+	TId id1 = 0; TId id2 = 0;
+	TSize pos1 = 0; TSize pos2 = 0;	TSize fragLen = 0;
+	for(; itF != itFEnd; ++itF, ++itSc) {
+		id1 = sequenceId(*itF,0);
+		id2 = sequenceId(*itF,1);
+		pos1 = fragmentBegin(*itF, id1);
+		pos2 = fragmentBegin(*itF, id2);
+		fragLen = fragmentLength(*itF, id1);
+		TStringIter itS1 = begin(seqSet[idToPosition(seqSet, id1)], Standard() );
+		itS1 += pos1;
+		TStringIter itS2 = begin(seqSet[idToPosition(seqSet, id2)], Standard() );
+		itS2 += pos2;
+		*itSc = 0;
+		for(TSize i = 0; i<fragLen; ++i, ++itS1, ++itS2) 
+			*itSc += offset + score(scType, *itS1, *itS2);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TScoreType, typename TFragment, typename TSpec2, typename TScoreString> 
+inline void
+_scoreMatches(StringSet<TString, TSpec> const& seqSet,
+			  TScoreType const& scType,
+			  String<TFragment, TSpec2> const& matches,
+			  TScoreString& scores)
+{
+	SEQAN_CHECKPOINT
+	_scoreMatches(seqSet, scType, matches, scores, (typename Value<TScoreString>::Type) 10);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TStringSet, typename TCargo, typename TSpec, typename TScore> 
+inline void
+buildAlignmentGraph(String<TFragment, TSpec1>& matches,
+					String<TScoreValue, TSpec2>& scores,
+					Graph<Alignment<TStringSet, TCargo, TSpec> >& outGraph,
+					TScore const& scType,
+					ReScore)
+{
+	// ReScore
+	_scoreMatches(stringSet(outGraph), scType, matches, scores);
+	
+	// Use fractinal score
+	buildAlignmentGraph(matches, scores, outGraph, FractionalScore() );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Consistency: Triplet extension
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+template<typename TVertexDescriptor, typename TCargo>
+struct MsaEdgeCargo_ {
+ public:
+	 TVertexDescriptor v1;
+	 TVertexDescriptor v2;
+	 TCargo c;
+
+	 MsaEdgeCargo_() {}
+
+	
+	 MsaEdgeCargo_(TVertexDescriptor vert1, TVertexDescriptor vert2, TCargo carg) :
+	 v1(vert1), v2(vert2), c(carg) {}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TVertexDescriptor, typename TCargo>
+struct LessMsaEdgeCargo_ :
+	public ::std::binary_function<TVertexDescriptor, TCargo, bool>
+{
+	inline bool 
+	operator() (MsaEdgeCargo_<TVertexDescriptor, TCargo> const& a1, 
+				MsaEdgeCargo_<TVertexDescriptor, TCargo> const& a2) const 
+	{
+		return (a1.v1 == a2.v1) ? (a1.v2 < a2.v2) : (a1.v1 < a2.v1);
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.tripletLibraryExtension:
+..summary:Performs a full or group-based consistency extension.
+..cat:Graph
+..signature:
+tripletLibraryExtension(graph, [,guideTree, minMembers])
+..param.graph:An alignment graph.
+...type:Spec.Alignment Graph
+..param.guideTree:A guide tree.
+..param.minMembers:Minimum number of sequences per group.
+...remarks:If a guide tree and a minimum number of memebers is given, the triplet extension is limited to groups of sequences.
+..returns:void
+..include:seqan/graph_msa.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void 
+tripletLibraryExtension(Graph<Alignment<TStringSet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	
+	// Store all edges
+	typedef std::pair<TVertexDescriptor, TVertexDescriptor> TNewEdge;
+	typedef std::map<TNewEdge, TCargo> TEdgeMap;
+	typedef typename TEdgeMap::iterator TEdgeMapIter;
+	TEdgeMap newEMap;
+	typedef MsaEdgeCargo_<TVertexDescriptor, TCargo> TEdge;
+	typedef String<TEdge> TEdgeString;
+	TEdgeString fullEdges;
+	TEdgeIterator itE(g);
+	for(;!atEnd(itE);goNext(itE)) {
+		TVertexDescriptor sV = sourceVertex(itE);
+		TVertexDescriptor tV = targetVertex(itE);
+		TCargo c = cargo(*itE);
+		appendValue(fullEdges, TEdge(sV, tV, c), Generous());
+		appendValue(fullEdges, TEdge(tV, sV, c), Generous());
+		newEMap.insert(std::make_pair(TNewEdge(sV, tV), c));
+	}
+	clearEdges(g);
+	::std::sort(begin(fullEdges, Standard()), end(fullEdges, Standard()), LessMsaEdgeCargo_<TVertexDescriptor, TCargo>() );
+	
+	// Perform triplet extension
+	typedef typename Iterator<TEdgeString, Standard>::Type TEdgeIter;
+	TEdgeIter itEdges1 = begin(fullEdges, Standard());
+	TEdgeIter itEdgesEnd = end(fullEdges, Standard());
+	for(; itEdges1 != itEdgesEnd; ++itEdges1) {
+		for(TEdgeIter itEdges2 = itEdges1; ++itEdges2 != itEdgesEnd;) {
+			if ((*itEdges1).v1 != (*itEdges2).v1) break;
+			if (sequenceId(g, (*itEdges1).v2) != sequenceId(g, (*itEdges2).v2)) {
+				TCargo weight = ((*itEdges1).c < (*itEdges2).c) ? (*itEdges1).c : (*itEdges2).c;
+				if ((*itEdges1).v2 < (*itEdges2).v2) {
+					TEdgeMapIter pos = newEMap.find(TNewEdge((*itEdges1).v2, (*itEdges2).v2));
+					if (pos != newEMap.end()) (*pos).second += weight;
+					else newEMap.insert(std::make_pair(TNewEdge((*itEdges1).v2, (*itEdges2).v2), weight));
+				} else {
+					TEdgeMapIter pos = newEMap.find(TNewEdge((*itEdges2).v2, (*itEdges1).v2));
+					if (pos != newEMap.end()) (*pos).second += weight;
+					else newEMap.insert(std::make_pair(TNewEdge((*itEdges2).v2, (*itEdges1).v2), weight));
+				}	
+			}
+		}
+	}
+	clear(fullEdges);
+
+	// Insert edges
+	for(TEdgeMapIter itE = newEMap.begin(); itE != newEMap.end(); ++itE) 
+		addEdge(g, (*itE).first.first, (*itE).first.second, (*itE).second);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGuideTree, typename TSeqGroups, typename TGroupRoot, typename TSize>
+inline void 
+_subTreeSearch(TGuideTree& guideTree, 
+			   TSeqGroups& seqGroups,
+			   TGroupRoot& groupRoot,
+			   TSize minMembers) 
+{
+	typedef typename Value<TSeqGroups>::Type TSeqGroup;
+	typedef typename VertexDescriptor<TGuideTree>::Type TVertexDescriptor;
+	
+	// Initialization
+	TVertexDescriptor rootVertex = getRoot(guideTree);
+	TSize nVertices = numVertices(guideTree);
+	TSize nSeq = (nVertices / 2) + 1;
+
+	// Number of subsequent leaves for each node
+	typedef typename Iterator<TGuideTree, BfsIterator>::Type TBfsIterator;
+	String<TSize> numLeaves;
+	resizeVertexMap(guideTree, numLeaves);
+
+	// All vertices in reversed bfs order
+	typedef String<TVertexDescriptor> TVertexString;
+	TVertexString vertices;
+	resize(vertices, nVertices);
+	
+	// Walk through the tree in bfs order	
+	TBfsIterator bfsIt(guideTree, rootVertex);
+	TSize pos = length(vertices) - 1;
+	for(;!atEnd(bfsIt);goNext(bfsIt), --pos) {
+		if (isLeaf(guideTree, *bfsIt)) property(numLeaves, *bfsIt) = 1;
+		else property(numLeaves, *bfsIt) = 0;
+		value(vertices, pos) = *bfsIt;
+	}
+
+	// Count the number of leaves for each internal node
+	typedef typename Iterator<TVertexString, Standard>::Type TVertexIter;
+	TVertexIter itVert = begin(vertices, Standard());
+	TVertexIter itVertEnd = end(vertices, Standard());
+	for(;itVert != itVertEnd; ++itVert) {
+		if (!isLeaf(guideTree, *itVert)) {
+			typedef typename Iterator<TGuideTree, AdjacencyIterator>::Type TAdjacencyIterator;
+			TAdjacencyIterator adjIt(guideTree, *itVert);
+			for(;!atEnd(adjIt);goNext(adjIt)) property(numLeaves, *itVert) += property(numLeaves, *adjIt);
+		}	
+	}
+
+	// Delineate the groups
+	itVert = begin(vertices, Standard());
+	for(;itVert != itVertEnd; ++itVert) {
+		if (property(numLeaves, *itVert) >= minMembers) {
+			appendValue(seqGroups, TSeqGroup(), Generous());
+			appendValue(groupRoot, *itVert, Generous());
+			TSize elem = length(seqGroups) - 1;
+			collectLeaves(guideTree, *itVert, seqGroups[elem]);
+			property(numLeaves, *itVert) = 0;
+			// Do not take any parent of the group root
+			if (*itVert != rootVertex) {
+				TVertexDescriptor pVert = parentVertex(guideTree, *itVert);
+				while(pVert != rootVertex) {
+					property(numLeaves, pVert) = 0;
+					pVert = parentVertex(guideTree, pVert);
+				}
+				property(numLeaves, pVert) = 0;
+			}
+		}
+	}
+	if (!length(seqGroups)) {
+		appendValue(seqGroups, TSeqGroup());
+		appendValue(groupRoot, rootVertex);
+		collectLeaves(guideTree, rootVertex, seqGroups[0]);
+	}
+
+	// Label all internal vertices with the closest root node
+	typedef Pair<TSize, TSize> TDistGroup; // Distance, group index
+	String<TDistGroup> closestRoot;  
+	resize(closestRoot, getIdUpperBound(_getVertexIdManager(guideTree)), TDistGroup(0,0), Exact());
+	for(TSize i=0; i< (TSize) length(groupRoot); ++i) {
+		TVertexDescriptor v = groupRoot[i];
+		TSize dist = 0;
+		while(v != rootVertex) {
+			++dist;
+			v = parentVertex(guideTree, v);
+			if ((property(closestRoot,v).i1 == 0) || 
+				(property(closestRoot,v).i1 > dist)) {
+				property(closestRoot, v) = TDistGroup(dist,i);
+			}
+		}
+	}
+
+	// Find ungrouped vertices
+	typedef typename Iterator<TSeqGroup, Standard>::Type TSeqGroupIter;
+	TSeqGroup allGroupedLeaves;
+	for(TSize i=0; i< (TSize) length(seqGroups); ++i) {
+		TSeqGroupIter itSeqGroup = begin(seqGroups[i], Standard());
+		TSeqGroupIter itSeqGroupEnd = end(seqGroups[i], Standard());
+		for(;itSeqGroup != itSeqGroupEnd; ++itSeqGroup) 
+			appendValue(allGroupedLeaves, *itSeqGroup, Generous());
+	}
+	appendValue(allGroupedLeaves, nSeq);
+	::std::sort(begin(allGroupedLeaves, Standard()), end(allGroupedLeaves, Standard()));
+	TSeqGroupIter itSeqGroup = begin(allGroupedLeaves, Standard());
+	TSeqGroupIter itSeqGroupEnd = end(allGroupedLeaves, Standard());
+	TSize leftover = 0;
+	TSeqGroup ungroupedLeaves;
+	for(;itSeqGroup != itSeqGroupEnd; ++itSeqGroup, ++leftover) {
+		while (leftover<*itSeqGroup) {
+			appendValue(ungroupedLeaves, leftover, Generous());
+			++leftover;
+		}
+	}
+	
+
+	//std::cout << guideTree << std::endl;
+	//std::cout << nSeq << std::endl;
+	//std::cout << length(groupRoot) << std::endl;
+	//std::cout << length(allGroupedLeaves) << std::endl;
+	//std::cout << length(ungroupedLeaves) << std::endl;
+
+	// Group the ungrouped vertices to the closest group
+	clear(allGroupedLeaves);
+	itSeqGroup = begin(ungroupedLeaves, Standard());
+	itSeqGroupEnd = end(ungroupedLeaves, Standard());
+	for(; itSeqGroup != itSeqGroupEnd; ++itSeqGroup) {
+		TVertexDescriptor v = *itSeqGroup;
+		while(v != rootVertex) {
+			v = parentVertex(guideTree, v);
+			if (property(closestRoot,v).i1 != 0) {
+				appendValue(seqGroups[property(closestRoot,v).i2], *itSeqGroup, Generous());
+				break;
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TGuideTree, typename TSize>
+inline void 
+tripletLibraryExtension(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+						TGuideTree& guideTree,
+						TSize minMembers)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename VertexDescriptor<TGuideTree>::Type TTreeVertex;
+	TStringSet& strSet = stringSet(g);
+	TSize nSeq = length(strSet);
+
+	// Identify large subtrees
+	typedef String<TSize> TSequenceGroups;
+	String<TSequenceGroups> seqGroup;
+	typedef String<TTreeVertex> TGroupRoot;
+	TGroupRoot groupRoot;
+	_subTreeSearch(guideTree, seqGroup, groupRoot, minMembers);
+	
+	// Label the subtree sequences
+	String<TSize> seqLabels;
+	resize(seqLabels, nSeq);
+	typedef typename Iterator<TSequenceGroups, Standard>::Type TSeqSetIter;
+	for(TSize i=0; i< (TSize) length(seqGroup); ++i) {
+		TSeqSetIter itSeqGroup = begin(seqGroup[i], Standard());
+		TSeqSetIter itSeqGroupEnd = end(seqGroup[i], Standard());
+		for(;itSeqGroup != itSeqGroupEnd; ++itSeqGroup) 
+			seqLabels[*itSeqGroup] = i;
+	}
+
+	// Store all edges
+	typedef std::pair<TVertexDescriptor, TVertexDescriptor> TNewEdge;
+	typedef std::map<TNewEdge, TCargo> TEdgeMap;
+	typedef typename TEdgeMap::iterator TEdgeMapIter;
+	TEdgeMap newEMap;
+	typedef MsaEdgeCargo_<TVertexDescriptor, TCargo> TEdge;
+	typedef String<TEdge> TEdgeString;
+	TEdgeString initialEdges;
+	TEdgeIterator itE(g);
+	for(;!atEnd(itE);goNext(itE)) {
+		TVertexDescriptor sV = sourceVertex(itE);
+		TVertexDescriptor tV = targetVertex(itE);
+		TCargo c = cargo(*itE);
+		appendValue(initialEdges, TEdge(sV, tV, c), Generous());
+		newEMap.insert(std::make_pair(TNewEdge(sV, tV), c));
+	}
+	clearEdges(g);
+
+	
+	// Perform triplet extension
+	typedef typename Iterator<TEdgeString, Standard>::Type TEdgeIter;
+	TEdgeString fullEdges;
+	for(TSize i=0; i< (TSize) length(seqGroup); ++i) {
+		TEdgeIter itInitial = begin(initialEdges, Standard());
+		TEdgeIter itInitialEnd = end(initialEdges, Standard());
+		for(; itInitial != itInitialEnd; ++itInitial) {
+			TSize seq1 = idToPosition(strSet, sequenceId(g, (*itInitial).v1));
+			TSize seq2 = idToPosition(strSet, sequenceId(g, (*itInitial).v2));
+			if ((seqLabels[seq1] == i) && (seqLabels[seq2] == i)) {
+				appendValue(fullEdges, *itInitial, Generous());
+				appendValue(fullEdges, TEdge((*itInitial).v2, (*itInitial).v1, (*itInitial).c), Generous());
+			}
+		}
+		::std::sort(begin(fullEdges, Standard()), end(fullEdges, Standard()), LessMsaEdgeCargo_<TVertexDescriptor, TCargo>() );
+		typedef typename Iterator<TEdgeString, Standard>::Type TEdgeIter;
+		TEdgeIter itEdges1 = begin(fullEdges, Standard());
+		TEdgeIter itEdgesEnd = end(fullEdges, Standard());
+		for(; itEdges1 != itEdgesEnd; ++itEdges1) {
+			for(TEdgeIter itEdges2 = itEdges1; ++itEdges2 != itEdgesEnd;) {
+				if ((*itEdges1).v1 != (*itEdges2).v1) break;
+				if (sequenceId(g, (*itEdges1).v2) != sequenceId(g, (*itEdges2).v2)) {
+					TCargo weight = ((*itEdges1).c < (*itEdges2).c) ? (*itEdges1).c : (*itEdges2).c;
+					if ((*itEdges1).v2 < (*itEdges2).v2) {
+						TEdgeMapIter pos = newEMap.find(TNewEdge((*itEdges1).v2, (*itEdges2).v2));
+						if (pos != newEMap.end()) (*pos).second += weight;
+						else newEMap.insert(std::make_pair(TNewEdge((*itEdges1).v2, (*itEdges2).v2), weight));
+					} else {
+						TEdgeMapIter pos = newEMap.find(TNewEdge((*itEdges2).v2, (*itEdges1).v2));
+						if (pos != newEMap.end()) (*pos).second += weight;
+						else newEMap.insert(std::make_pair(TNewEdge((*itEdges2).v2, (*itEdges1).v2), weight));
+					}
+				}
+			}
+		}
+		clear(fullEdges);
+	}
+
+	// Insert edges
+	for(TEdgeMapIter itE = newEMap.begin(); itE != newEMap.end(); ++itE) 
+		addEdge(g, (*itE).first.first, (*itE).first.second, (*itE).second);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void 
+graphBasedTripletLibraryExtension(Graph<Alignment<TStringSet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+
+	// Two tasks:
+	// 1) Add edges for the case that a and c is aligned, b and c is aligned, but a and b are not, give these edges the appropriate weight
+	// 2) Augment all existing edges
+	String<TCargo> newCargoMap;
+	typedef String<TVertexDescriptor> TVertexString;
+	typedef String<TCargo> TCargoString;
+	TVertexString edges_vertices;
+	TCargoString edges_cargo;
+	
+	// Triplet Extension
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+
+	// Remember the old cargo
+	resize(newCargoMap, getIdUpperBound(_getEdgeIdManager(g)), Exact());
+	TEdgeIterator it(g);
+	for(;!atEnd(it);++it) 
+		property(newCargoMap, *it) = cargo(*it);
+
+	// Iterate over all vertices
+	for(TVertexIterator itVertex(g);!atEnd(itVertex);++itVertex) {
+		TOutEdgeIterator outIt1(g, *itVertex);
+		while (!atEnd(outIt1)) {
+			TOutEdgeIterator outIt2 = outIt1;
+			goNext(outIt2);
+			// Consider always 2 neighbors
+			while (!atEnd(outIt2)) {
+				TVertexDescriptor tV1 = targetVertex(outIt1);
+				TVertexDescriptor tV2 = targetVertex(outIt2);
+				if (sequenceId(g, tV1) != sequenceId(g,tV2)) {
+					TEdgeDescriptor e = findEdge(g, tV1, tV2);
+					if (e == 0) {
+						// New edge
+						TCargo val = (cargo(*outIt1) < cargo(*outIt2)) ? cargo(*outIt1) : cargo(*outIt2);
+						
+						// Remember the edge with cargo
+						appendValue(edges_vertices, tV1, Generous());
+						appendValue(edges_vertices, tV2, Generous());
+						appendValue(edges_cargo, val, Generous());
+					} else {
+						// Increase weight of existing edge
+						if (cargo(*outIt2) > cargo(*outIt1)) property(newCargoMap, e) += cargo(*outIt1);
+						else property(newCargoMap, e) += cargo(*outIt2);	
+					}
+				}
+				goNext(outIt2);
+			}
+			goNext(outIt1);
+		}
+	}
+
+
+	// Assign the new weights and clean-up the cargo map
+	TEdgeIterator itE(g);
+	for(;!atEnd(itE);++itE) cargo(*itE) = property(newCargoMap, *itE);
+	clear(newCargoMap);
+
+	// Add edges
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Iterator<TVertexString, Standard>::Type TVertexStringIter;
+	typedef typename Iterator<TCargoString, Standard>::Type TCargoStringIter;
+
+	// Finally add the new edges created by the triplet approach
+	TVertexStringIter itV = begin(edges_vertices, Standard());
+	TVertexStringIter itVNext = begin(edges_vertices, Standard());
+	++itVNext;
+	TVertexStringIter endIt = end(edges_vertices, Standard());
+	TCargoStringIter itC = begin(edges_cargo, Standard());
+	for(;itV != endIt; itV += 2, itVNext +=2, ++itC) {
+		// The same edge could have been created multiple times, so check if it exists
+		TEdgeDescriptor e = findEdge(g, *itV, *itVNext);
+		if (e == 0) addEdge(g, *itV, *itVNext, *itC);
+		else cargo(e) += *itC;
+	}
+	SEQAN_ASSERT_TRUE(itC == end(edges_cargo));
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//template<typename TStringSet, typename TCargo, typename TSpec>
+//inline void 
+//reducedTripletLibraryExtension(Graph<Alignment<TStringSet, TCargo, TSpec> >& g)
+//{
+//	SEQAN_CHECKPOINT
+//	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+//	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+//	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+//	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+//	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+//	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+//
+//
+//	// Just augment existing edges
+//	String<TCargo> newCargoMap;
+//	resize(newCargoMap, getIdUpperBound(_getEdgeIdManager(g)), Exact());
+//	TEdgeIterator it(g);
+//	for(;!atEnd(it);++it) assignProperty(newCargoMap, *it, cargo(*it));
+//
+//	// Iterate over all vertices
+//	for(TVertexIterator itVertex(g);!atEnd(itVertex);++itVertex) {
+//		TOutEdgeIterator outIt1(g, *itVertex);
+//		while (!atEnd(outIt1)) {
+//			TOutEdgeIterator outIt2 = outIt1;
+//			goNext(outIt2);
+//			// Consider always 2 neighbors
+//			while (!atEnd(outIt2)) {
+//				TVertexDescriptor tV1 = targetVertex(outIt1);
+//				TVertexDescriptor tV2 = targetVertex(outIt2);
+//				if (sequenceId(g, tV1) != sequenceId(g,tV2)) {
+//					TEdgeDescriptor e = findEdge(g, tV1, tV2);
+//					if (e != 0) {
+//						// Increase weight of existing edge
+//						if (getCargo(*outIt2) > getCargo(*outIt1)) property(newCargoMap, e) += getCargo(*outIt1);
+//						else property(newCargoMap, e) += getCargo(*outIt2);	
+//					}
+//				}
+//				goNext(outIt2);
+//			}
+//			goNext(outIt1);
+//		}
+//	}
+//
+//	// Assign the new weights and clean-up the cargo map
+//	TEdgeIterator itE(g);
+//	for(;!atEnd(itE);goNext(itE)) cargo(value(itE)) = property(newCargoMap, value(itE));
+//	clear(newCargoMap);
+//}
+
+//////////////////////////////////////////////////////////////////////////////
+// Sum of Pairs Scoring
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// This version is sensitive to gap openings
+
+/**
+.Function.sumOfPairsScore:
+..summary:Given a multiple alignment, this function calculates the sum-of-pairs score.
+..cat:Graph
+..signature:
+sumOfPairsScore(graph, score_type)
+..param.graph:An alignment graph.
+...type:Spec.Alignment Graph
+..param.score_type:A score object.
+...type:Class.Score
+..remarks:This function does NOT assume independent columns. 
+That is, gap openings are properly scored. 
+If you want the fast version assuming independ columns use sumOfPairsScoreInd.
+..returns:void
+..include:seqan/graph_msa.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScore> 
+inline typename Value<TScore>::Type
+sumOfPairsScore(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+				TScore const& score_type)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Value<typename Value<TStringSet>::Type>::Type TAlphabet;
+
+	// Convert the graph
+	String<char> mat;
+	convertAlignment(g, mat);
+	char gapChar = gapValue<char>();
+
+	TScoreValue gap = scoreGapExtend(score_type);
+	TScoreValue gapOpen = scoreGapOpen(score_type);
+	TSize nseq = length(stringSet(g));
+	TSize len = length(mat) / nseq;
+	
+	bool gapOpeni = false;
+	bool gapOpenj = false;
+	TScoreValue totalScore = 0;
+	for(TSize i = 0; i<nseq-1; ++i) {
+		for(TSize j=i+1; j<nseq; ++j) {
+			for(TSize k=0;k<len; ++k) {
+				if (value(mat, i*len+k) != gapChar) {
+					if (value(mat, j*len + k) != gapChar) {
+						gapOpeni = false;
+						gapOpenj = false;
+						totalScore += score(const_cast<TScore&>(score_type), TAlphabet(value(mat, i*len+k)), TAlphabet(value(mat, j*len + k)));
+					} else {
+						if (gapOpenj) {
+							totalScore += gap;
+						} else {
+							gapOpenj = true;
+							totalScore += gapOpen;
+						}
+					}
+				} else if (value(mat, j*len + k) != gapChar) {
+						if (gapOpeni) {
+							totalScore += gap;
+						} else {
+							gapOpeni = true;
+							totalScore += gapOpen;
+						}
+				}
+			}
+		}
+	}
+	return totalScore;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// This version is insensitive to gap openings, assumes independent columns
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScore> 
+inline typename Value<TScore>::Type
+sumOfPairsScoreInd(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+				   TScore const& score_type)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Value<typename Value<TStringSet>::Type>::Type TAlphabet;
+
+	// Convert the graph
+	String<char> mat;
+	convertAlignment(g, mat);
+	char gapChar = gapValue<char>();
+
+	TScoreValue gap = scoreGapExtend(score_type);
+	TSize nseq = length(stringSet(g));
+	TSize len = length(mat) / nseq;
+	
+	TScoreValue totalScore = 0;
+	for(TSize k=0;k<len; ++k) {
+		for(TSize i = 0; i<nseq-1; ++i) {
+			for(TSize j=i+1; j<nseq; ++j) {
+				if (value(mat, i*len+k) != gapChar) {
+					if (value(mat, j*len + k) != gapChar) {
+						totalScore += score(const_cast<TScore&>(score_type), TAlphabet(value(mat, i*len+k)), TAlphabet(value(mat, j*len + k)));
+					} else totalScore += gap;
+				} else if (value(mat, j*len + k) != gapChar) {
+						totalScore += gap;
+				}
+			}
+		}
+	}
+	return totalScore;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.alignmentEvaluation:
+..summary:Given a multiple alignment, this function calculates all kinds of alignment statistics.
+..cat:Graph
+..signature:
+alignmentEvaluation(graph, score_type, gapExCount, gapCount, pairCount, numPairs, len)
+..param.graph:An alignment graph.
+...type:Spec.Alignment Graph
+..param.score_type:A score object.
+...type:Class.Score
+..param.gapExCount:Number of gap extensions.
+..param.gapCount:Number of gaps.
+..param.pairCount:Number of aligned pairs.
+..param.numPairs:Counter for each pair.
+..param.len:Alignment length.
+..returns:Score of the alignment.
+..include:seqan/graph_msa.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScore, typename TSize> 
+inline typename Value<TScore>::Type
+alignmentEvaluation(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+					TScore const& score_type,
+					TSize& gapExCount,
+					TSize& gapCount,
+					TSize& pairCount,
+					String<TSize>& numPairs,
+					TSize& len)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Value<typename Value<TStringSet>::Type>::Type TAlphabet;
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+
+	// Initialization;
+	gapExCount = 0;
+	gapCount = 0;
+	pairCount = 0;
+	clear(numPairs);
+
+	// Convert the graph
+	String<char> mat;
+	convertAlignment(g, mat);
+	char gapChar = gapValue<char>();
+
+	TScoreValue gap = scoreGapExtend(score_type);
+	TScoreValue gapOpen = scoreGapOpen(score_type);
+	TSize nseq = length(stringSet(g));
+	len = length(mat) / nseq;
+	
+	bool gapOpeni = false;
+	bool gapOpenj = false;
+	TScoreValue totalScore = 0;
+	resize(numPairs, alphSize * alphSize, 0);
+	for(TSize i = 0; i<nseq-1; ++i) {
+		for(TSize j=i+1; j<nseq; ++j) {
+			for(TSize k=0;k<len; ++k) {
+				if (value(mat, i*len+k) != gapChar) {
+					if (value(mat, j*len + k) != gapChar) {
+						gapOpeni = false;
+						gapOpenj = false;
+						++pairCount;
+						TSize index1 = ordValue(TAlphabet(value(mat, i*len+k)));
+						TSize index2 = ordValue(TAlphabet(value(mat, j*len + k)));
+						value(numPairs, index1 * alphSize + index2) += 1;
+						totalScore += score(const_cast<TScore&>(score_type), TAlphabet(value(mat, i*len+k)), TAlphabet(value(mat, j*len + k)));
+					} else {
+						if (gapOpenj) {
+							++gapExCount;
+							totalScore += gap;
+						} else {
+							gapOpenj = true;
+							++gapCount;
+							totalScore += gapOpen;
+						}
+					}
+				} else if (value(mat, j*len + k) != gapChar) {
+						if (gapOpeni) {
+							++gapExCount;
+							totalScore += gap;
+						} else {
+							++gapCount;
+							gapOpeni = true;
+							totalScore += gapOpen;
+						}
+				}
+			}
+		}
+	}
+	return totalScore;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSource, typename TSpec2> 
+inline bool
+convertAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> > const& gAlign,
+				 Align<TSource, TSpec2>& align)
+{
+	// Pipe into Align data structure
+	String<char> mat;
+	if (convertAlignment(gAlign, mat)) {
+		typedef Align<TSource, TSpec2> TAlign;
+		typedef typename Size<TAlign>::Type TSize;
+		typedef typename Row<TAlign>::Type TRow;
+		typedef typename Iterator<TRow>::Type TRowIterator;
+		TStringSet& sourceSet = stringSet(gAlign);
+		TSize nseq = length(sourceSet);
+		clearGaps(align);
+		if (empty(rows(align))) {
+			resize(rows(align), nseq);
+			for(TSize i = 0; i<nseq; ++i) assignSource(row(align, i), sourceSet[i]);
+		}
+		String<TRowIterator> rowIter;
+		resize(rowIter, nseq);
+		for(TSize i = 0; i<nseq; ++i) value(rowIter, i) = begin(row(align, i));
+		TSize lenMat = length(mat);
+		TSize colLen = lenMat / nseq;
+		TSize gapCount = 0;
+		char gapChar = gapValue<char>();
+		for(TSize alignRow = 0; alignRow < nseq; ++alignRow) {
+			for(TSize pos = alignRow * colLen; pos < (alignRow + 1) * colLen; ++pos) {
+				if (value(mat, pos) != gapChar) {
+					if (gapCount) {
+						insertGaps(value(rowIter, alignRow), gapCount);
+						goFurther(value(rowIter, alignRow), gapCount);
+						gapCount = 0;
+					}
+					goNext(value(rowIter,alignRow));
+				} else ++gapCount;
+			}
+			if (gapCount) {
+				insertGaps(value(rowIter, alignRow), gapCount);
+				goFurther(value(rowIter, alignRow), gapCount);
+				gapCount = 0;
+			}
+		}
+	} else return false;
+	return true;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSource, typename TSpec2, typename TStringSet, typename TCargo, typename TSpec> 
+inline bool
+convertAlignment(Align<TSource, TSpec2> const& align,
+				 Graph<Alignment<TStringSet, TCargo, TSpec> >& gAlign)
+{
+	typedef Align<TSource, TSpec2> const TAlign;
+	typedef typename Value<TSource>::Type TAlphabet;
+	typedef typename Size<TAlign>::Type TSize;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TRowIterator;
+	clearVertices(gAlign);
+	if (!length(stringSet(gAlign))) {
+		TStringSet sourceSet = stringSet(const_cast<Align<TSource, TSpec2>&>(align));
+		assignStringSet(gAlign, sourceSet);
+	}
+	TSize nseq = length(rows(align));
+	String<TRowIterator> rowIter;
+	String<TRowIterator> rowIterEnd;
+	resize(rowIter, nseq);
+	resize(rowIterEnd, nseq);
+	for(TSize i = 0; i<nseq; ++i) {
+		value(rowIter, i) = begin(row(align, i), Standard());
+		value(rowIterEnd, i) = end(row(align, i), Standard());
+	}
+	String<Fragment<> > matches;
+	for(TSize alignRow1 = 0; alignRow1 < nseq; ++alignRow1) {
+		for(TSize alignRow2 = alignRow1 + 1; alignRow2 < nseq; ++alignRow2) {
+			TRowIterator pos1 = value(rowIter,alignRow1);
+			TRowIterator pos2 = value(rowIter,alignRow2);
+			TSize alignPos = 0;
+			TSize length = 0;
+			TSize offset1 = 0;
+			TSize offset2 = 0;
+			for(;pos1 != value(rowIterEnd, alignRow1); ++pos1, ++pos2, ++alignPos) {
+				if ((isGap(pos1)) || (isGap(pos2))) {
+					if (length) {
+						appendValue(matches, Fragment<>(alignRow1, alignPos - offset1 - length, alignRow2, alignPos - offset2 - length, length));
+						length = 0;
+					}
+					if (isGap(pos1)) ++offset1;
+					if (isGap(pos2)) ++offset2;
+				} else ++length;
+			}
+			if (length) appendValue(matches, Fragment<>(alignRow1, alignPos - offset1 - length, alignRow2, alignPos - offset2 - length, length));
+		}
+	}
+	matchRefinement(matches,stringSet(gAlign),gAlign);
+	return true;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_distance.h b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_distance.h
new file mode 100644
index 0000000..a2c5508
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_distance.h
@@ -0,0 +1,222 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_DISTANCE_H
+#define SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_DISTANCE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Distance matrix calculation
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Distance Calculation:
+..summary:A tag to specify how to calculate distance matrices.
+..include:seqan/graph_msa.h
+*/
+
+/**
+.Tag.Distance Calculation.value.LibraryDistance:
+	Using the library itself and heaviest common subsequence to determine a distance matrix
+..include:seqan/graph_msa.h
+*/
+struct LibraryDistance_;
+typedef Tag<LibraryDistance_> const LibraryDistance;
+
+
+/**
+.Tag.Distance Calculation.value.KmerDistance:
+	Using a simple kmer count to determine a distance matrix
+..include:seqan/graph_msa.h
+*/
+struct KmerDistance_;
+typedef Tag<KmerDistance_> const KmerDistance;
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// LibraryDistance
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TMatrix>
+inline void 
+getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				  TMatrix& distanceMatrix,
+				  LibraryDistance)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TId;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Value<TMatrix>::Type TValue;
+
+	// Initialization
+	clear(distanceMatrix);
+	TStringSet& str = stringSet(g);	
+	TSize nseq = length(str);
+	resize(distanceMatrix, nseq * nseq);
+
+	// All pairwise alignments
+	typedef String<String<TVertexDescriptor> > TSegmentString;
+	TValue maxScore = 0;
+	for(TSize i=0; i<nseq; ++i) {
+		TSegmentString seq1;
+		TSize len1 = length(str[i]);
+		_buildLeafString(g, i, seq1);
+		for(TSize j=i+1; j<nseq; ++j) {
+			// Align the 2 strings
+			TSegmentString seq2;
+			TSize len2 = length(str[j]);
+			_buildLeafString(g, j, seq2);
+			TSegmentString alignSeq;
+			TValue score = heaviestCommonSubsequence(g,seq1,seq2,alignSeq);
+			
+			// Normalize by distance
+			if (len1 > len2) score /= len1;
+			else score /= len2;
+			if (score > maxScore) maxScore = score;
+			
+			// Remember the value
+			distanceMatrix[i*nseq+j] = score;
+		}
+	}
+
+	// Normalize values
+	for(TSize i=0; i<nseq; ++i) 
+		for(TSize j=i+1; j<nseq; ++j) 
+			distanceMatrix[i*nseq+j] = SEQAN_DISTANCE_UNITY - ((distanceMatrix[i*nseq+j] * SEQAN_DISTANCE_UNITY) / maxScore );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// KmerDistance
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TMatrix, typename TSize, typename TAlphabet>
+inline void 
+getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				  TMatrix& distanceMatrix,
+				  TSize ktup,
+				  TAlphabet,
+				  KmerDistance)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TMatrix>::Type TValue;
+	typedef typename Iterator<TMatrix, Standard>::Type TMatrixIterator;
+
+	getKmerSimilarityMatrix(stringSet(g), distanceMatrix, ktup, TAlphabet());
+	
+	// Similarity to distance conversion
+	TMatrixIterator matIt = begin(distanceMatrix, Standard());
+	TMatrixIterator endMatIt = end(distanceMatrix, Standard());
+	for(;matIt != endMatIt;++matIt) 
+		*matIt = SEQAN_DISTANCE_UNITY - (*matIt);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TMatrix, typename TSize>
+inline void 
+getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				  TMatrix& distanceMatrix,
+				  TSize ktup,
+				  KmerDistance)
+{
+	SEQAN_CHECKPOINT
+	getDistanceMatrix(g, distanceMatrix, ktup, typename Value<typename Value<TStringSet>::Type>::Type(), KmerDistance() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TMatrix>
+inline void 
+getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				  TMatrix& distanceMatrix,
+				  KmerDistance)
+{
+	SEQAN_CHECKPOINT
+	getDistanceMatrix(g, distanceMatrix, 3, KmerDistance() );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.getDistanceMatrix:
+..summary:Computes a pairwise distance matrix from an alignment graph.
+..cat:Graph
+..signature:
+getDistanceMatrix(graph, mat [, tag])
+getDistanceMatrix(graph, mat [, ktup] [, alphabet], KmerDistance)
+..param.graph:An alignment graph containing the sequences and possible alignment edges.
+...type:Spec.Alignment Graph
+..param.mat:Out-parameter:Pairwise distance matrix.
+...type:Class.String
+..param.ktup:Length of k-mers.
+...remarks:For KmerDistance the length of the k-mers.
+..param.alphabet:Alphabet
+...remarks:For KmerDistance the alphabet to use for k-mer counting (e.g., compressed alphabets).
+..param.tag:Distance tag
+...type:Tag.Distance Calculation
+...remarks:Possible values are LibraryDistance or KmerDistance.
+...default:KmerDistance
+..returns:void
+..include:seqan/graph_msa.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TMatrix>
+inline void 
+getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+				  TMatrix& distanceMatrix)
+{
+	SEQAN_CHECKPOINT
+	getDistanceMatrix(g, distanceMatrix, KmerDistance() );
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_guidetree.h b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_guidetree.h
new file mode 100644
index 0000000..25fabfd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_guidetree.h
@@ -0,0 +1,882 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_GUIDETREE_H
+#define SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_GUIDETREE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Guide Tree
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Neighbor Joining
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.slowNjTree:
+..summary:Computes a guide tree from a distance matrix.
+..cat:Graph
+..signature:
+njTree(mat, graph)
+..param.mat:A string of pairwise distance values, representing a square matrix.
+...type:Class.String
+...remarks: String must use double values because the algorithm recycles this string to store intermediate possibly fractional results.
+..param.graph:Out-parameter:The guide tree.
+...type:Spec.Tree
+..returns:void
+..include:seqan/graph_msa.h
+*/
+template<typename TValue, typename TStringSpec, typename TCargo, typename TSpec>
+inline void
+njTree(String<TValue, TStringSpec>& mat, 
+	   Graph<Tree<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	typedef String<TValue, TStringSpec> TMatrix;
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	TSize nseq = (TSize) std::sqrt((double)length(mat));
+
+	//for(TSize i=0;i<nseq;++i) {
+	//	for(TSize j=0;j<nseq;++j) {
+	//		std::cout << getValue(mat, i*nseq+j) << ",";
+	//	}
+	//	std::cout << std::endl;
+	//}
+
+	// First initialization
+	clearVertices(g);
+	if (nseq == 1) {
+		g.data_root = addVertex(g);
+		return;
+	} else if (nseq == 2) {
+		TVertexDescriptor v1 = addVertex(g);
+		TVertexDescriptor v2 = addVertex(g);
+		TVertexDescriptor internalVertex = addVertex(g);
+		addEdge(g, internalVertex, v1, (TCargo) mat[1] / 2);
+		addEdge(g, internalVertex, v2, (TCargo) mat[1] / 2);
+		g.data_root = internalVertex;
+		return;
+	}
+	String<TCargo> av;    // Average branch length to a combined node
+	resize(av,nseq,0);
+
+	String<TVertexDescriptor> connector;   // Nodes that need to be connected
+	resize(connector, nseq);
+
+	for(TSize i=0;i<nseq;++i) {
+		addVertex(g);  // Add all the nodes that correspond to sequences
+		connector[i] = i;
+		mat[i*nseq+i] = 0;
+	}
+
+	// Main cycle
+	TCargo fnseqs=(TCargo) nseq;
+	for(TSize nc=0; nc<(nseq-3); ++nc) {
+		TCargo sumOfBranches = 0;
+
+		// Determine the sum of all branches and
+		// copy upper triangle matrix to lower triangle
+		for(TSize col=1; col<nseq; ++col) 
+			for(TSize row=0; row<col; ++row) 
+				sumOfBranches += mat[col*nseq+row] = mat[row*nseq+col];
+
+		// Compute the sum of branch lengths for all possible pairs
+		bool notFound = true;
+		TCargo tmin = 0;	
+		TSize mini = 0;  // Next pair of seq i and j to join
+		TSize minj = 0;
+		TCargo diToAllOthers = 0;
+		TCargo djToAllOthers = 0;
+		TCargo total = 0;
+		for(TSize col=1; col<nseq; ++col)  {
+			if (connector[col] != nilVertex) {
+				for(TSize row=0; row<col; ++row) {
+					if (connector[row] != nilVertex) {
+						diToAllOthers = 0;
+						djToAllOthers = 0;
+						
+						for(TSize i=0; i<nseq; ++i) {
+							diToAllOthers += mat[i*nseq+row];
+							djToAllOthers += mat[i*nseq+col];
+						}
+
+						total = diToAllOthers + djToAllOthers + (fnseqs - 2) * mat[row*nseq+col] + 2 * (sumOfBranches - diToAllOthers - djToAllOthers);
+						total /= (2*(fnseqs - 2));
+
+						if ((notFound) || (total < tmin)) {
+							notFound = false;
+							tmin = total;
+							mini = row;
+							minj = col;
+						}
+					}
+				}
+			}
+		}
+
+		// Print nodes that are about to be joined
+		//std::cout << mini << std::endl;
+		//std::cout << minj << std::endl;
+		//std::cout << tmin << std::endl;
+		//std::cout << std::endl;
+		
+		// Compute branch lengths
+		TCargo dMinIToOthers = 0;
+		TCargo dMinJToOthers = 0;
+		for(TSize i=0; i<nseq; ++i) {
+			dMinIToOthers += mat[i*nseq + mini];
+			dMinJToOthers += mat[i*nseq + minj];
+		}
+		TCargo dmin = mat[mini*nseq + minj];
+		dMinIToOthers = dMinIToOthers / (fnseqs - 2);
+		dMinJToOthers = dMinJToOthers / (fnseqs - 2);
+		TCargo iBranch = (dmin + dMinIToOthers - dMinJToOthers) / 2;
+		TCargo jBranch = dmin - iBranch;
+		iBranch -= av[mini];
+		jBranch -= av[minj];
+		
+		// Set negative branch length to zero
+		if( iBranch < 0) iBranch = 0;
+		if( jBranch < 0) jBranch = 0;
+	
+		// Print branch lengths
+		//std::cout << iBranch << std::endl;
+		//std::cout << jBranch << std::endl;
+		//std::cout << std::endl;
+		
+		// Build tree
+		TVertexDescriptor internalVertex = addVertex(g);
+		addEdge(g, internalVertex, connector[mini], (TCargo) iBranch);
+		addEdge(g, internalVertex, connector[minj], (TCargo) jBranch);
+
+		// Remember the average branch length for the new combined node
+		// Must be subtracted from all branches that include this node
+		if(dmin < 0) dmin = 0;
+		av[mini] = dmin / 2;
+
+
+		// Re-initialisation
+		// mini becomes the new combined node, minj is killed
+		--fnseqs;
+		connector[minj] = nilVertex;
+		connector[mini] = internalVertex;
+
+		for(TSize j=0; j<nseq; ++j) {
+			if( connector[j] != nilVertex ) {
+				// Use upper triangle
+				if((TSize) mini < j) mat[mini*nseq+j] = (TValue) ((mat[mini*nseq+j] + mat[minj*nseq+j]) / 2);
+				if((TSize) mini > j) mat[j*nseq+mini] = (TValue) ((mat[mini*nseq+j] + mat[minj*nseq+j]) / 2);
+			}
+		}
+		for(TSize j=0; j<nseq; ++j)
+			mat[j*nseq+minj] = mat[minj*nseq+j] = 0;
+	}
+
+	// Only three nodes left
+
+	// Find the remaining nodes
+	String<TSize> l;
+	resize(l,3);
+	TSize count = 0;
+	for(TSize i=0; i<nseq; ++i) {
+		if(connector[i] != nilVertex) {
+			l[count] = i;
+			++count;
+		}
+	}
+
+	// Remaining nodes
+	//std::cout << l[0] << std::endl;
+	//std::cout << l[1] << std::endl;
+	//std::cout << l[2] << std::endl;
+	//std::cout << std::endl;
+
+	String<TCargo> branch;
+	resize(branch, 3);
+	branch[0] = (mat[l[0]*nseq+l[1]] + mat[l[0]*nseq+l[2]] - mat[l[1]*nseq+l[2]]) / 2;
+	branch[1] = (mat[l[1]*nseq+l[2]] + mat[l[0]*nseq+l[1]] - mat[l[0]*nseq+l[2]]) / 2;
+	branch[2] = (mat[l[1]*nseq+l[2]] + mat[l[0]*nseq+l[2]] - mat[l[0]*nseq+l[1]]) / 2;
+    
+	branch[0] -= av[l[0]];
+	branch[1] -= av[l[1]];
+	branch[2] -= av[l[2]];
+
+	// Print branch lengths
+	//std::cout << branch[0] << std::endl;
+	//std::cout << branch[1] << std::endl;
+	//std::cout << branch[2] << std::endl;
+	//std::cout << std::endl;
+    
+	// Reset negative branch lengths to zero
+	if( branch[0] < 0) branch[0] = 0;
+	if( branch[1] < 0) branch[1] = 0;
+	if( branch[2] < 0) branch[2] = 0;
+    
+	// Build tree
+	TVertexDescriptor internalVertex = addVertex(g);
+	addEdge(g, internalVertex, getValue(connector, l[0]), (TCargo) branch[0]);
+	addEdge(g, internalVertex, getValue(connector, l[1]), (TCargo) branch[1]);
+	TVertexDescriptor the_root = addVertex(g);
+	addEdge(g, the_root, getValue(connector, l[2]), (TCargo) branch[2] / 2);
+	addEdge(g, the_root, internalVertex, (TCargo) branch[2] / 2);
+	g.data_root = the_root;
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Unweighted Pair Group Mean Average (UPGMA)
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Tag.Upgma Configurator:
+..summary:A tag to configure the guide tree construction.
+..include:seqan/graph_msa.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Upgma Configurator.value.UpgmaMin:
+	Uses the min operation in the upgma algorithm
+..include:seqan/graph_msa.h
+*/
+
+struct UpgmaMin_;
+typedef Tag<UpgmaMin_> const UpgmaMin;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Upgma Configurator.value.UpgmaMax:
+	Uses the max operation in the upgma algorithm
+..include:seqan/graph_msa.h
+*/
+
+struct UpgmaMax_;
+typedef Tag<UpgmaMax_> const UpgmaMax;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Upgma Configurator.value.UpgmaAvg:
+	Uses the average operation in the upgma algorithm
+..include:seqan/graph_msa.h
+*/
+
+struct UpgmaAvg_;
+typedef Tag<UpgmaAvg_> const UpgmaAvg;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Upgma Configurator.value.UpgmaWeightAvg:
+	Uses the weighted average operation in the upgma algorithm
+..include:seqan/graph_msa.h
+*/
+
+struct UpgmaWeightAvg_;
+typedef Tag<UpgmaWeightAvg_> const UpgmaWeightAvg;
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TMatrix, typename TActive, typename TSize>
+inline void
+_upgmaTreeMerge(TMatrix& mat, 
+				TActive& active,
+				TSize index_i,
+				TSize index_j,
+				TSize nseq,
+				UpgmaWeightAvg) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TMatrix>::Type TValue;
+	// Average
+	for(TSize i=0;i<nseq;++i) {
+		if ((i != index_i) && (i != index_j) && (active[i] != 0)) {
+			if (index_i < i) {
+				mat[index_i*nseq + i] = ((TValue) active[index_i] / (TValue) (active[index_i] + active[index_j])) * mat[index_i * nseq + i];
+				if (index_j < i) mat[index_i*nseq + i] += ((TValue) active[index_j] / (TValue) (active[index_i] + active[index_j])) * mat[index_j * nseq + i];
+				else mat[index_i*nseq + i] += ((TValue) active[index_j] / (TValue) (active[index_i] + active[index_j])) * mat[i * nseq + index_j];
+			} else {
+				mat[i*nseq + index_i] = ((TValue) active[index_i] / (TValue) (active[index_i] + active[index_j])) * mat[i * nseq + index_i];
+				if (index_j < i) value(mat, i*nseq + index_i) += ((TValue) active[index_j] / (TValue) (active[index_i] + active[index_j])) * mat[index_j * nseq + i];
+				else mat[i*nseq + index_i] += ((TValue) active[index_j] / (TValue) (active[index_i] + active[index_j])) * mat[i * nseq + index_j];
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TMatrix, typename TActive, typename TSize>
+inline void
+_upgmaTreeMerge(TMatrix& mat, 
+				TActive& active,
+				TSize index_i,
+				TSize index_j,
+				TSize nseq,
+				UpgmaAvg) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TMatrix>::Type TValue;
+
+	// Minimum
+	for(TSize i=0;i<nseq;++i) {
+		if ((i != index_i) && (i != index_j) && (active[i] != 0)) {
+			TValue val1 = (index_i < i) ? mat[index_i * nseq + i] : mat[i * nseq + index_i];
+			TValue val2 = (index_j < i) ? mat[index_j * nseq + i] : mat[i * nseq + index_j];
+			if (index_i < i) mat[index_i * nseq + i] = (val1 + val2) / 2;
+			else mat[i * nseq + index_i] = (val1 + val2) / 2;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TMatrix, typename TActive, typename TSize>
+inline void
+_upgmaTreeMerge(TMatrix& mat, 
+				TActive& active,
+				TSize index_i,
+				TSize index_j,
+				TSize nseq,
+				UpgmaMin) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TMatrix>::Type TValue;
+
+	// Minimum
+	for(TSize i=0;i<nseq;++i) {
+		if ((i != index_i) && (i != index_j) && (active[i] != 0)) {
+			TValue newDist = (index_i < i) ? mat[index_i * nseq + i] : mat[i * nseq + index_i];
+			TValue newDist2 = (index_j < i) ? mat[index_j * nseq + i] : mat[i * nseq + index_j];
+			if (index_i < i) mat[index_i * nseq + i] = _min(newDist, newDist2);
+			else mat[i * nseq + index_i] = _min(newDist, newDist2);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TMatrix, typename TActive, typename TSize>
+inline void
+_upgmaTreeMerge(TMatrix& mat, 
+				TActive& active,
+				TSize index_i,
+				TSize index_j,
+				TSize nseq,
+				UpgmaMax) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TMatrix>::Type TValue;
+
+	// Maximum
+	for(TSize i=0;i<nseq;++i) {
+		if ((i != index_i) && (i != index_j) && (active[i] != 0)) {
+			TValue newDist = (index_i < i) ? mat[index_i * nseq + i] : mat[i * nseq + index_i];
+			TValue newDist2 = (index_j < i) ? mat[index_j * nseq + i] : mat[i * nseq + index_j];
+			if (index_i < i) mat[index_i * nseq + i] = _max(newDist, newDist2);
+			else mat[i * nseq + index_i] = _max(newDist, newDist2);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TActive, typename TEdgeDescriptor>
+inline void
+_upgmaTreeMerge(Graph<Undirected<TCargo, TSpec> >& pairGraph, 
+				TActive const&,
+				TEdgeDescriptor best,
+				UpgmaMax) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+
+	TVertexDescriptor s = sourceVertex(pairGraph,best);
+	TVertexDescriptor t = targetVertex(pairGraph,best);
+	typedef String<TEdgeDescriptor> TEdgeString;
+	typedef typename Iterator<TEdgeString>::Type TEdgeIter;
+	TEdgeString removeEdges;
+	for(TOutEdgeIterator outIt(pairGraph, s);!atEnd(outIt);goNext(outIt)) {
+		if (targetVertex(outIt) == t) continue;
+		TEdgeDescriptor e = findEdge(pairGraph, targetVertex(outIt), t);
+		if (e == 0) appendValue(removeEdges, value(outIt));
+		else {
+			if (cargo(e) > cargo(value(outIt))) cargo(value(outIt)) = cargo(e);
+		}
+	}
+	TEdgeIter eIt = begin(removeEdges);
+	TEdgeIter eItEnd = end(removeEdges);
+	for(;eIt != eItEnd; goNext(eIt)) removeEdge(pairGraph, value(eIt));
+	removeVertex(pairGraph, t);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TActive, typename TEdgeDescriptor>
+inline void
+_upgmaTreeMerge(Graph<Undirected<TCargo, TSpec> >& pairGraph, 
+				TActive const&,
+				TEdgeDescriptor best,
+				UpgmaMin) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+
+	TVertexDescriptor s = sourceVertex(pairGraph,best);
+	TVertexDescriptor t = targetVertex(pairGraph,best);
+	for(TOutEdgeIterator outIt(pairGraph, s);!atEnd(outIt);goNext(outIt)) {
+		if (targetVertex(outIt) == t) continue;
+		TEdgeDescriptor e = findEdge(pairGraph, targetVertex(outIt), t);
+		if (e != 0) {
+			if (cargo(e) < cargo(value(outIt))) cargo(value(outIt)) = cargo(e);
+		}
+	}
+	for(TOutEdgeIterator outIt(pairGraph, t);!atEnd(outIt);goNext(outIt)) {
+		if (targetVertex(outIt) == s) continue;
+		TEdgeDescriptor e = findEdge(pairGraph, targetVertex(outIt), s);
+		if (e == 0) addEdge(pairGraph, s, targetVertex(outIt), cargo(value(outIt)));
+	}
+	removeVertex(pairGraph, t);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TActive, typename TEdgeDescriptor>
+inline void
+_upgmaTreeMerge(Graph<Undirected<TCargo, TSpec> >& pairGraph, 
+				TActive const& active,
+				TEdgeDescriptor best,
+				UpgmaWeightAvg) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+
+	TCargo infCargo = _getInfinity<TCargo>();
+	TVertexDescriptor s = sourceVertex(pairGraph,best);
+	TVertexDescriptor t = targetVertex(pairGraph,best);
+	
+	for(TOutEdgeIterator outIt(pairGraph, s);!atEnd(outIt);goNext(outIt)) {
+		if (targetVertex(outIt) == t) continue;
+		TEdgeDescriptor e1 = value(outIt);
+		TEdgeDescriptor e2 = findEdge(pairGraph, targetVertex(outIt), t);
+		if (e2 != 0) cargo(e1) = ((TCargo) value(active,s) / (TCargo) (value(active,s) + value(active,t))) * cargo(e1) + ((TCargo) value(active,t) / (TCargo) (value(active,s) + value(active,t))) * cargo(e2);
+		else cargo(e1) = ((TCargo) value(active,s) / (TCargo) (value(active,s) + value(active,t))) * cargo(e1) + ((TCargo) value(active,t) / (TCargo) (value(active,s) + value(active,t))) * infCargo;
+	}
+	for(TOutEdgeIterator outIt(pairGraph, t);!atEnd(outIt);goNext(outIt)) {
+		if (targetVertex(outIt) == s) continue;
+		TEdgeDescriptor e = findEdge(pairGraph, targetVertex(outIt), s);
+		TCargo c = ((TCargo) value(active,s) / (TCargo) (value(active,s) + value(active,t))) * infCargo + ((TCargo) value(active,t) / (TCargo) (value(active,s) + value(active,t))) * cargo(value(outIt));
+		if (e == 0)  addEdge(pairGraph, s, targetVertex(outIt), c);
+	}
+	removeVertex(pairGraph, t);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TActive, typename TEdgeDescriptor>
+inline void
+_upgmaTreeMerge(Graph<Undirected<TCargo, TSpec> >& pairGraph, 
+				TActive const&,
+				TEdgeDescriptor best,
+				UpgmaAvg) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+
+	TCargo infCargo = _getInfinity<TCargo>();
+	TVertexDescriptor s = sourceVertex(pairGraph,best);
+	TVertexDescriptor t = targetVertex(pairGraph,best);
+	
+	for(TOutEdgeIterator outIt(pairGraph, s);!atEnd(outIt);goNext(outIt)) {
+		if (targetVertex(outIt) == t) continue;
+		TEdgeDescriptor e1 = value(outIt);
+		TEdgeDescriptor e2 = findEdge(pairGraph, targetVertex(outIt), t);
+		cargo(e1) = (e2 != 0) ? (cargo(e1) + cargo(e2)) / 2 : (cargo(e1) + infCargo) / 2;
+	}
+	for(TOutEdgeIterator outIt(pairGraph, t);!atEnd(outIt);goNext(outIt)) {
+		if (targetVertex(outIt) == s) continue;
+		TEdgeDescriptor e = findEdge(pairGraph, targetVertex(outIt), s);
+		if (e == 0) {
+			TCargo c = (infCargo + cargo(value(outIt))) / 2;
+			addEdge(pairGraph, s, targetVertex(outIt), c);
+		}
+	}
+	removeVertex(pairGraph, t);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringValue, typename TStringSpec, typename TCargo, typename TSpec, typename TTag>
+inline void
+upgmaTree(String<TStringValue, TStringSpec>& mat, 
+		  Graph<Tree<TCargo, TSpec> >& g,
+		  TTag) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef String<TStringValue, TStringSpec> TMatrix;
+	typedef typename Value<TMatrix>::Type TValue;
+	typedef typename Iterator<TMatrix>::Type TMatrixIter;
+	
+	
+	// First initialization
+	TSize nseq = (TSize) std::sqrt((double)length(mat));
+	clearVertices(g);
+
+	// Is it possible to make a guide tree?
+	if (nseq == 1) {
+		g.data_root = addVertex(g);
+		return;
+	} else if (nseq == 2) {
+		TVertexDescriptor v1 = addVertex(g);
+		TVertexDescriptor v2 = addVertex(g);
+		TVertexDescriptor internalVertex = addVertex(g);
+		addEdge(g, internalVertex, v1, (TCargo) 1);
+		addEdge(g, internalVertex, v2, (TCargo) 1);
+		g.data_root = internalVertex;
+		return;
+	}
+
+	// Which entries in the matrix are still active and how many members belong to this group
+	String<TSize> active;
+	resize(active, nseq, 1);
+	// Vertex descriptor that represents that entry
+	String<TVertexDescriptor> nodes;
+	reserve(nodes, nseq);
+
+
+	// Find the minimal value
+	bool notFound = true;
+	TValue minVal = 0;
+	TSize index_i = 0;
+	TSize index_j = 1;
+	for(TSize row=0;row<nseq;++row) {
+		for(TSize col=row+1;col<nseq;++col) {
+			if ((notFound) || (minVal > mat[row*nseq + col])) {
+				notFound = false;
+				minVal = mat[row*nseq + col];
+				index_i = row;
+				index_j = col;
+			}
+		}
+		appendValue(nodes, addVertex(g));	// For each sequence one vertex
+	}
+
+	// Property map for sum of weights for each node
+	String<TCargo> weights;
+	resize(weights, nseq, (TCargo) 0);
+	reserve(weights, 2*nseq - 1);
+
+	// Merge groups
+	TSize m = nseq;
+	while (m>1) {
+		// Merge nodes
+		TVertexDescriptor internalNode = addVertex(g);
+
+		//// Debug code
+		//for(TSize i=0;i<nseq;++i) {
+		//	if (value(active,i)==0) continue;
+		//	for(TSize j=i+1;j<nseq;++j) {
+		//		if (value(active,j)==0) continue;
+		//		std::cout << value(mat, i*nseq+j) << ",";
+		//	}
+		//	std::cout << std::endl;
+		//}
+		//std::cout << minVal << ',' << index_i << ',' << index_j << ',' << std::endl;
+		//std::cout << nodes[index_i] << ',' << nodes[index_j] << std::endl;
+		//std::cout << std::endl;
+
+		TCargo w = (TCargo) (minVal / 2);
+		addEdge(g, internalNode, nodes[index_i], w - property(weights, nodes[index_i]));
+		addEdge(g, internalNode, nodes[index_j], w - property(weights, nodes[index_j]));
+		appendValue(weights, w);		
+
+		// Get the new distance values
+		_upgmaTreeMerge(mat, active, index_i, index_j, nseq, TTag());
+
+		// Inactivate one group, adjust the member count for the other one
+		active[index_i] += active[index_j];
+		active[index_j] = 0;
+		nodes[index_i] = internalNode;
+		
+		// Find new minimum
+		notFound = true;
+		for(TSize i=0;i<nseq;++i) {
+			if (active[i] == 0) continue;
+			for(TSize j=i+1;j<nseq;++j) {
+				if (active[j] == 0) continue;
+				if ((notFound) || (minVal > mat[i*nseq + j])) {
+					notFound = false;
+					minVal = mat[i*nseq + j];
+					index_i = i;
+					index_j = j;
+				}
+			}
+		}
+		--m;
+	}
+	g.data_root = numVertices(g) - 1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSpec1, typename TCargo, typename TSpec2, typename TTag>
+inline void
+upgmaTree(Graph<Undirected<TValue, TSpec1> >& pairGraph, 
+		  Graph<Tree<TCargo, TSpec2> >& g,
+		  TTag) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TValue, TSpec1> > TPairGraph;
+	typedef Graph<Tree<TCargo, TSpec2> > TGuideTree;
+	typedef typename VertexDescriptor<TGuideTree>::Type TVertexDescriptor;
+	typedef typename VertexDescriptor<TPairGraph>::Type TVD;
+	typedef typename EdgeDescriptor<TPairGraph>::Type TED;
+	typedef typename Iterator<TPairGraph, EdgeIterator>::Type TEdgeI;
+	typedef typename Iterator<TPairGraph, OutEdgeIterator>::Type TEdgeOutI;
+	typedef typename Iterator<TPairGraph, VertexIterator>::Type TVertexI;
+	typedef typename Size<TPairGraph>::Type TSize;
+
+	// First initialization
+	TCargo const maxVal = maxValue<TCargo>();
+	TSize nseq = numVertices(pairGraph);
+	TCargo infCargo = _getInfinity<TCargo>();
+	clearVertices(g);
+
+	// Is it possible to make a guide tree?
+	if (nseq == 1) {
+		g.data_root = addVertex(g);
+		return;
+	} else if (nseq == 2) {
+		TVertexDescriptor v1 = addVertex(g);
+		TVertexDescriptor v2 = addVertex(g);
+		TVertexDescriptor internalVertex = addVertex(g);
+		addEdge(g, internalVertex, v1, (TCargo) 1);
+		addEdge(g, internalVertex, v2, (TCargo) 1);
+		g.data_root = internalVertex;
+		return;
+	}
+
+	// Which entries in the matrix are still active and how many members belong to this group
+	String<TSize> active;
+	resize(active, nseq, 1);
+	// Vertex descriptor that represents that entry
+	typedef String<TVertexDescriptor> TNodeString;
+	typedef typename Iterator<TNodeString, Standard>::Type TNodeIter;
+	TNodeString nodes;
+	resize(nodes, nseq);
+	TNodeIter nodeIt = begin(nodes, Standard() );
+	TNodeIter nodeItEnd = end(nodes, Standard() );
+	for(;nodeIt<nodeItEnd;goNext(nodeIt)) 
+		*nodeIt = addVertex(g);	// For each sequence one vertex
+
+	// Find the minimal value for all vertices (with respect to all greater vertices)
+	typedef Pair<TValue, TVD> TWeightEdgePair;
+	typedef String<TWeightEdgePair> TMinValues;
+	TMinValues minValues;
+	resize(minValues, nseq, TWeightEdgePair(maxVal, 0));
+	TEdgeI itE(pairGraph);
+	for(;!atEnd(itE);goNext(itE)) {
+		TVD s = sourceVertex(itE);
+		TVD t = targetVertex(itE);
+		if (cargo(*itE) < (minValues[s].i1)) 
+			minValues[s] = TWeightEdgePair(cargo(*itE), t);		
+	}
+	// Find the overall minimum
+	typedef typename Iterator<TMinValues, Standard>::Type TMinIter;
+	TMinIter itMin = begin(minValues, Standard() );
+	TMinIter itMinEnd = end(minValues, Standard() );
+	TValue minVal = maxVal;
+	TVD sourceBest = 0;
+	TVD targetBest = 0;
+	for(TVD index=0;itMin != itMinEnd; goNext(itMin), ++index) {
+		if ((*itMin).i1 < minVal) {
+			minVal = (*itMin).i1;
+			sourceBest = index;
+			targetBest = (*itMin).i2;
+		}
+	}
+	TED best = 0;
+	if (sourceBest == targetBest) { // If none is found we have to insert a new edge
+		TVertexI itV(pairGraph);
+		sourceBest = value(itV); goNext(itV);
+		targetBest = value(itV);
+		best = addEdge(pairGraph, sourceBest, targetBest, infCargo);
+	} else best = findEdge(pairGraph, sourceBest, targetBest);
+	
+	// Property map for sum of weights for each node
+	String<TCargo> weights;
+	resize(weights, nseq, (TCargo) 0);
+	reserve(weights, 2*nseq - 1);
+
+	// Merge groups
+	TSize m = nseq;
+	while (m>1) {
+		// Merge nodes
+		TVertexDescriptor internalNode = addVertex(g);
+		
+		// Set the weights
+		TCargo w = (TCargo) (minVal / 2);
+		addEdge(g, internalNode, nodes[sourceBest], w - property(weights, nodes[sourceBest]));
+		addEdge(g, internalNode, nodes[targetBest], w - property(weights, nodes[targetBest]));
+		appendValue(weights, w);		
+
+		// Get the new distance values
+		_upgmaTreeMerge(pairGraph, active, best, TTag());
+		
+		// Inactivate one group, adjust the member count for the other one
+		active[sourceBest] += active[targetBest];
+		active[targetBest] = 0;
+		nodes[sourceBest] = internalNode;
+	
+		// Update the minimum values
+		minValues[sourceBest] = TWeightEdgePair(maxVal, 0);
+		for(TEdgeOutI itOutE(pairGraph, sourceBest);!atEnd(itOutE);goNext(itOutE)) {
+			TVD localTVD = targetVertex(itOutE);
+			if (sourceBest < localTVD) {
+				if (cargo(value(itOutE)) < (minValues[sourceBest].i1)) minValues[sourceBest] = TWeightEdgePair(cargo(value(itOutE)), localTVD);
+			}
+		}
+		// Find the new minimum value
+		itMin = begin(minValues, Standard() );
+		itMinEnd = end(minValues, Standard() );
+		minVal = maxVal;
+		TVD oldSourceBest = sourceBest;
+		sourceBest = 0;
+		targetBest = 0;
+		for(TVD index= 0;itMin != itMinEnd; goNext(itMin), ++index) {
+			if (active[index] == 0) continue;
+			if (((*itMin).i2 == oldSourceBest) || (active[(*itMin).i2] == 0)) {
+				// Update the values
+				(*itMin).i1 = maxVal;
+				TEdgeOutI itOutLocal(pairGraph, index);
+				for(;!atEnd(itOutLocal);goNext(itOutLocal)) {
+					TVD targ = targetVertex(itOutLocal);
+					if (targ < index) continue;
+					if (cargo(value(itOutLocal)) < (*itMin).i1) *itMin = TWeightEdgePair(cargo(value(itOutLocal)), targ);
+				}
+			}
+			if ((*itMin).i1 < minVal) {
+				minVal = (*itMin).i1;
+				sourceBest = index;
+				targetBest = (*itMin).i2;
+			}
+		}
+		// If none is found we have to insert a new edge
+		if ((sourceBest == targetBest) && (m>2)) {
+			TVertexI itV(pairGraph);
+			sourceBest = value(itV); goNext(itV);
+			targetBest = value(itV);
+			best = addEdge(pairGraph, sourceBest, targetBest, infCargo);
+		} else best = findEdge(pairGraph, sourceBest, targetBest);
+		--m;
+	}
+	g.data_root = numVertices(g) - 1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.upgmaTree:
+..summary:Computes a guide tree from a distance matrix.
+..cat:Graph
+..signature:
+upgmaTree(mat, graph [,tag])
+upgmaTree(sparse_mat, graph [,tag])
+..param.mat:A string of pairwise distance values, representing a square matrix.
+...type:Class.String
+...remarks: String must use double values because the algorithm recycles this string to store intermediate possibly fractional results.
+..param.sparse_mat:An undirected graph where each edge corresponds to the distance between sequence i and sequence j.
+...type:Spec.Undirected Graph
+..param.graph:Out-parameter:The guide tree.
+...type:Spec.Tree
+..param.tag:Tag that indicates how to calculate cluster distances.
+...remarks:Possible values are UpgmaWeightAvg, UpgmaAvg, UpgmaMax, and UpgmaMin.
+...type:Tag.Upgma Configurator
+...default:UpgmaWeightAvg
+..returns:void
+..include:seqan/graph_msa.h
+*/
+template<typename TDistance, typename TCargo, typename TSpec>
+inline void
+upgmaTree(TDistance& dist, 
+		  Graph<Tree<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	upgmaTree(dist, g, UpgmaWeightAvg());
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_io.h b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_io.h
new file mode 100644
index 0000000..df7c33b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_io.h
@@ -0,0 +1,1042 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_IO_H
+#define SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_IO_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/////////////////////////////////////////////////////////////////////////////
+// Input and Output of an alignment graph, Tree Reading im Newick Format
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Tags
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Format.value.TCoffeeLib:
+	T-Coffee library format to read and write an alignment graph.
+..include:seqan/graph_msa.h
+*/
+
+struct TCoffeeLib_;
+typedef Tag<TCoffeeLib_> const TCoffeeLib;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Format.value.BlastLib:
+	A blast library for matches for an alignment graph.
+..include:seqan/graph_msa.h
+*/
+
+struct BlastLib_;
+typedef Tag<BlastLib_> const BlastLib;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Format.value.MummerLib:
+	A mummer library for matches for an alignment graph.
+..include:seqan/graph_msa.h
+*/
+
+struct MummerLib_;
+typedef Tag<MummerLib_> const MummerLib;
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Format.value.NewickFormat:
+	NewickFormat format to write a guide tree.
+..include:seqan/graph_msa.h
+*/
+
+struct NewickFormat_;
+typedef Tag<NewickFormat_> const NewickFormat;
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+// T-Coffee Library Reading / Writing
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+template<typename TFile, typename TFragment, typename TSpec, typename TScoreValue, typename TSpec2, typename TNames>
+void 
+read(TFile & file,
+	 String<TFragment, TSpec>& matches,
+	 String<TScoreValue, TSpec2>& scores,
+	 TNames const& names,
+	 TCoffeeLib) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TFragment>::Type TSize;
+	typedef typename Value<TFile>::Type TValue;
+	typedef typename Value<TNames>::Type TName;
+	
+	
+	// Map the names to slots
+	typedef std::map<TName, TSize> TNameToPosition;
+	TNameToPosition namePosMap;
+	for(TSize i = 0;i<length(names);++i) namePosMap.insert(std::make_pair(names[i], i));
+	
+	// Remember the correct spots
+	TValue c;
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+	_parseSkipLine(file, c);
+	TSize nseq = (TSize) _parseReadNumber(file, c);
+	_parseSkipLine(file, c);
+
+	// Read sequences
+	typedef String<TSize> TMapping;
+	TMapping posMap;
+	resize(posMap, nseq);
+	for(TSize i=0; i<nseq; ++i) {
+		TName myName;
+		_parseReadIdentifier(file, myName, c);
+		value(posMap, i) = namePosMap.find(myName)->second;
+		_parseSkipLine(file, c);
+	}
+
+	bool seq1ToN = false;
+	if (_streamEOF(file)) return;
+	
+	typedef std::pair<std::pair<TSize, TSize>, TScoreValue> TResiduePair;
+	typedef std::set<TResiduePair> TResiduePairSet;
+	String<TResiduePairSet> resPair;
+	resize(resPair, nseq * nseq);	
+	TSize seq1 = 0;
+	TSize seq2 = 0;
+	bool firstPass = true;
+	while (!_streamEOF(file)) {
+		_parseSkipWhitespace(file,c);
+		if (_streamEOF(file)) break;
+		if (c == '#') {
+			c = _streamGet(file);
+			_parseSkipWhitespace(file,c);
+			seq1 = _parseReadNumber(file, c);
+			_parseSkipWhitespace(file,c);
+			seq2 = _parseReadNumber(file, c);
+			if (firstPass) {
+				firstPass = false;
+				if ((seq1 != 0) && (seq2 != 0)) seq1ToN = true;
+			}
+			if (seq1ToN) {
+				--seq1;
+				--seq2;
+			}
+			seq1 = value(posMap, seq1);
+			seq2 = value(posMap, seq2);
+		} else if (c == '!') {
+			_parseSkipLine(file, c);
+		} else {
+			TSize res1 = _parseReadNumber(file, c);
+			_parseSkipWhitespace(file,c);
+			TSize res2 = _parseReadNumber(file, c);
+			_parseSkipWhitespace(file,c);
+			TScoreValue weight = _parseReadNumber(file, c);
+			_parseSkipLine(file,c);
+
+			if (seq1 < seq2) {
+				TSize index = seq1 * nseq + seq2;
+				resPair[index].insert(std::make_pair(std::make_pair(--res1,--res2), weight));
+			} else {
+				TSize index = seq2 * nseq + seq1;
+				resPair[index].insert(std::make_pair(std::make_pair(--res2,--res1), weight));
+			}		
+		}
+	}
+	for(TSize i = 0; i<length(resPair); ++i) {
+		if (resPair[i].empty()) continue;
+		TSize seq1 = i / nseq;
+		TSize seq2 = i % nseq;
+		//std::cout << "#" << seq1 << ',' << seq2 << std::endl;
+		typename TResiduePairSet::const_iterator pos = resPair[i].begin();
+		typename TResiduePairSet::const_iterator posEnd = resPair[i].end();
+		TSize startMatch1 = pos->first.first;
+		TSize startMatch2 = pos->first.second;
+		TScoreValue carg = pos->second;
+		TSize len = 1;
+		//std::cout << pos->first.first << ',' << pos->first.second << ',' << pos->second << std::endl;
+		++pos;
+		while(pos != posEnd) {
+			if ((startMatch1 + len == pos->first.first) &&
+				(startMatch2 + len == pos->first.second) &&
+				(carg / (TScoreValue) len == pos->second)) {
+					carg += pos->second;
+					++len;
+			} else {
+				appendValue(matches, TFragment(seq1, startMatch1, seq2, startMatch2, len));
+				appendValue(scores, carg);
+				startMatch1 = pos->first.first;
+				startMatch2 = pos->first.second;
+				carg = pos->second;
+				len = 1;
+			}
+			//std::cout << pos->first.first << ',' << pos->first.second << ',' << pos->second << std::endl;
+			++pos;
+		}
+		appendValue(matches, TFragment(seq1, startMatch1, seq2, startMatch2, len));
+		appendValue(scores, carg);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TString, typename TSpec, typename TNames>
+void 
+read(TFile & file,
+	 StringSet<TString, TSpec>& oriStr,
+	 TNames& names,
+	 TCoffeeLib) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TNames>::Type TSize;
+	typedef typename Position<TFile>::Type TPosition;
+	typedef typename Value<TFile>::Type TValue;
+	
+	TValue c;
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+
+	// Ignore first line
+	_parseSkipLine(file, c);
+	
+	// Read number of sequences
+	TSize nSeq = (TSize) _parseReadNumber(file, c);
+	resize(oriStr, nSeq);
+	_parseSkipLine(file, c);
+
+	// Read sequences
+	for(TSize i=0; i<nSeq; ++i) {
+		appendValue(names, _parseReadIdentifier(file, c));
+		_parseSkipWhitespace(file, c);
+		_parseReadNumber(file, c);
+		_parseSkipWhitespace(file, c);
+		_parseReadSequenceData(file,c,oriStr[i]);
+		_parseSkipLine(file, c);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TNames>
+void write(TFile & file, 
+		   Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+		   TNames& names,
+		   TCoffeeLib) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Size<TStringSet>::Type TSize;
+	
+	typedef std::pair<std::pair<TSize, TSize>, TCargo> TResiduePair;
+	typedef std::set<TResiduePair> TResiduePairSet;
+	TSize nseq = length(stringSet(g));
+	String<TResiduePairSet> resPair;
+	resize(resPair, nseq * nseq);
+	
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TIter;
+	TIter it(g);
+	for(;!atEnd(it);++it) {
+		TVertexDescriptor sV = sourceVertex(it);
+		TVertexDescriptor tV = targetVertex(it);
+		TSize fragLen = fragmentLength(g,sV);
+		TSize fragPos1 = fragmentBegin(g,sV);
+		TSize fragPos2 = fragmentBegin(g,tV);
+		TSize seq1 = sequenceId(g,sV);
+		TSize seq2 = sequenceId(g,tV);
+		TCargo my_carg =  getCargo(*it);
+		if (my_carg <= 0) my_carg = 1;
+		else my_carg = (TCargo) ((double) my_carg / (double) fragLen);
+		for(TSize i = 0; i<fragLen; ++i) {
+			resPair[seq1 * nseq + seq2].insert(std::make_pair(std::make_pair(fragPos1 + i, fragPos2 + i), my_carg));
+		}
+	}
+
+	_streamWrite(file, "! TC_LIB_FORMAT_01\n");
+	TSize len = length(getStringSet(g));
+	_streamPutInt(file, len);
+	_streamPut(file, '\n');
+	for(TSize i=0;i<len;++i) {
+		_streamWrite(file, names[i]);
+		_streamPut(file, ' ');
+		TString str = value(getStringSet(g), i);
+		_streamPutInt(file, length(str));
+		_streamPut(file, ' ');
+		_streamWrite(file, str);
+		_streamPut(file, '\n');
+	}
+
+	for(TSize i = 0; i<length(resPair); ++i) {
+		if (resPair[i].empty()) continue;
+		TSize seq1 = i / nseq;
+		TSize seq2 = i % nseq;
+		_streamPut(file, '#');
+		_streamPutInt(file, seq1 + 1);
+		_streamPut(file, ' ');
+		_streamPutInt(file, seq2 + 1);
+		_streamPut(file, '\n');	
+		typename TResiduePairSet::const_iterator pos = resPair[i].begin();
+		typename TResiduePairSet::const_iterator posEnd = resPair[i].end();
+		while(pos != posEnd) {
+			_streamPutInt(file, pos->first.first + 1);
+			_streamPut(file, ' ');
+			_streamPutInt(file, pos->first.second + 1);
+			_streamPut(file, ' ');
+			_streamPutInt(file, pos->second);
+			_streamPut(file, '\n');	
+			++pos;
+		}
+	}
+	_streamWrite(file, "! SEQ_1_TO_N");
+	_streamPut(file, '\n');
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+// FastaAlign Reading
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TString, typename TSpec, typename TNames>
+void 
+read(TFile & file,
+	 StringSet<TString, TSpec>& oriStr,
+	 TNames& names,
+	 FastaAlign) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TNames>::Type TSize;
+	typedef TSize TWord;
+	typedef typename Value<TFile>::Type TValue;
+	
+	TValue c;
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+
+	// Read sequences
+	TString seq;
+	while(!_streamEOF(file)) {
+		_parseSkipWhitespace(file, c);
+		if (_streamEOF(file)) break;
+		if (c == '>') {
+			if (length(seq)) {
+				appendValue(oriStr, seq);
+				clear(seq);
+			}
+			c = _streamGet(file);
+			appendValue(names, _parseReadIdentifier(file, c));
+			_parseSkipLine(file, c);
+		} else if ((c == '-') || (c == '.') || (c == '\n') || (c == '\r')) {
+			c = _streamGet(file);
+		} else {
+			appendValue(seq, c);
+			c = _streamGet(file);
+		}
+	}
+	if (length(seq)) appendValue(oriStr, seq);
+}
+
+
+template<typename TValue, typename TSpec2, typename TFragment, typename TSpec, typename TScores, typename TSize>
+void 
+_collectSegmentMatches(String<TValue, TSpec2> const& mat,
+					   String<TFragment, TSpec>& matches,
+					   TScores& scores,
+					   TSize nseq) 
+{
+	SEQAN_CHECKPOINT
+	TSize len = length(mat) / nseq;
+	TValue gapChar = gapValue<TValue>();
+
+	// Create the anchor graph
+	typedef String<TFragment, TSpec> TFragmentString;
+	typedef typename Iterator<TFragmentString>::Type TFragmentStringIter;
+	typedef std::pair<TSize, TSize> TResiduePair;
+	typedef std::set<TResiduePair> TResiduePairSet;
+	String<TResiduePairSet> resPair;
+	resize(resPair, nseq * nseq);	
+	for(TSize seq1 = 0; seq1 < nseq - 1; ++seq1) {
+		for(TSize seq2 = seq1 + 1; seq2 < nseq; ++seq2) {
+			TSize index = seq1 * nseq + seq2;
+			TSize offset1 = 0;
+			TSize offset2 = 0;
+			for(TSize col = 0; col<len; ++col) {
+				if (value(mat, seq1 * len + col) != gapChar) {
+					if (value(mat, seq2 * len + col) != gapChar) {
+						resPair[index].insert(std::make_pair(offset1, offset2));
+						++offset1;
+						++offset2;
+					} else ++offset1;
+				} else if (value(mat, seq2 * len + col) != gapChar) ++offset2;
+			}
+		}
+	}
+	for(TSize i = 0; i<length(resPair); ++i) {
+		if (resPair[i].empty()) continue;
+		TSize seq1 = i / nseq;
+		TSize seq2 = i % nseq;
+		typename TResiduePairSet::const_iterator pos = resPair[i].begin();
+		typename TResiduePairSet::const_iterator posEnd = resPair[i].end();
+		TSize startMatch1 = pos->first;
+		TSize startMatch2 = pos->second;
+		TSize len = 1;
+		++pos;
+		while(pos != posEnd) {
+			if ((startMatch1 + len == pos->first) && (startMatch2 + len == pos->second)) ++len;
+			else {
+				appendValue(matches, TFragment(seq1, startMatch1, seq2, startMatch2, len));
+				appendValue(scores, len);
+				startMatch1 = pos->first;
+				startMatch2 = pos->second;
+				len = 1;
+			}
+			++pos;
+		}
+		appendValue(matches, TFragment(seq1, startMatch1, seq2, startMatch2, len));
+		appendValue(scores, len);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TFragment, typename TSpec, typename TScoreValue, typename TSpec2, typename TNames>
+void 
+read(TFile & file,
+	 String<TFragment, TSpec>& matches,
+	 String<TScoreValue, TSpec2>& scores,
+	 TNames const& origNames,
+	 FastaAlign) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TNames>::Type TSize;
+	typedef typename Value<TFile>::Type TValue;
+	typedef typename Value<TNames>::Type TName;
+	
+	TValue c;
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+
+	// Read sequences
+	String<TValue> mat;
+	TNames names;
+	TName nextSeq;
+	while(!_streamEOF(file)) {
+		_parseSkipWhitespace(file, c);
+		if (_streamEOF(file)) break;
+		if (c == '>') {
+			c = _streamGet(file);
+			clear(nextSeq);
+			_parseReadIdentifier(file, nextSeq, c);
+			appendValue(names, nextSeq);
+			_parseSkipLine(file, c);
+		} else if ((c == '\n') || (c == '\r')) {
+			c = _streamGet(file);
+		} else {
+			appendValue(mat, c);
+			c = _streamGet(file);
+		}
+	}
+	// Reorder rows according to names order
+	String<TValue> finalMat = mat;
+	TSize nseq = length(names);
+	TSize len = length(mat) / nseq;
+	for(TSize i = 0; i<nseq; ++i) {
+		if (value(names, i) == value(origNames, i)) continue;
+		else {
+			for(TSize j = 0; j<length(origNames); ++j) {
+				if (value(names, i) != value(origNames, j)) continue;
+				// Copy the whole row
+				infix(finalMat, j * len, j * len + len) = infix(mat, i * len, i*len + len);
+				break;
+			}
+		}
+	}
+	clear(mat);
+
+	// Collect the segment matches
+	_collectSegmentMatches(finalMat, matches, scores, nseq); 
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// BLAST Library Reading / Writing
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSizeSpec, typename TSpec1, typename TSpec2, typename TSize>
+inline void 
+_appendFragment(String<Fragment<TSizeSpec, ExactReversableFragment<TSpec1> >, TSpec2>& matches, 
+				  TSize seq1Id, 
+				  TSize beg1, 
+				  TSize seq2Id, 
+				  TSize beg2, 
+				  TSize len, 
+				  bool reversed)
+{
+	SEQAN_CHECKPOINT
+	typedef Fragment<TSizeSpec, ExactReversableFragment<TSpec1> > TFragment;
+	appendValue(matches, TFragment(seq1Id, beg1, seq2Id, beg2, len, reversed));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSizeSpec, typename TSpec1, typename TSpec2, typename TSize>
+inline void 
+_appendFragment(String<Fragment<TSizeSpec, ExactFragment<TSpec1> >, TSpec2>& matches, 
+				  TSize seq1Id, 
+				  TSize beg1, 
+				  TSize seq2Id, 
+				  TSize beg2, 
+				  TSize len, 
+				  bool reversed)
+{
+	SEQAN_CHECKPOINT
+	typedef Fragment<TSizeSpec, ExactFragment<TSpec1> > TFragment;
+	if (!reversed) appendValue(matches, TFragment(seq1Id, beg1, seq2Id, beg2, len));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TNames>
+inline void 
+read(TFile & file,
+	 String<TFragment, TSpec1>& matches,
+	 String<TScoreValue, TSpec2>& scores,
+	 TNames& names,
+	 BlastLib) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TNames>::Type TSize;
+	typedef typename Value<TFile>::Type TValue;
+	typedef typename Value<TNames>::Type TName;
+	
+	// Map the names to slots
+	typedef std::map<TName, TSize> TNameToPosition;
+	TNameToPosition namePosMap;
+	for(TSize i = 0;i<length(names);++i) namePosMap.insert(std::make_pair(names[i], i));
+	
+	// Read the Blast file
+	TValue c;
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+
+	TName seq1;
+	TName seq2;
+	while (!_streamEOF(file)) {
+		clear(seq1);
+		clear(seq2);
+		_parseSkipWhitespace(file, c);
+		seq1 = _parseReadIdentifier(file, c);
+		_parseSkipWhitespace(file, c);
+		seq2 = _parseReadIdentifier(file, c);
+		if (seq1 == seq2) {
+			_parseSkipLine(file, c);
+			continue;
+		}
+		TSize seq1Id = namePosMap[seq1];
+		TSize seq2Id = namePosMap[seq2];
+		_parseSkipWhitespace(file, c);
+		_parseReadDouble(file, c);
+		_parseSkipWhitespace(file, c);
+		_parseReadNumber(file, c);
+		_parseSkipWhitespace(file, c);
+		_parseReadNumber(file, c);
+		_parseSkipWhitespace(file, c);
+		_parseReadNumber(file, c);
+		_parseSkipWhitespace(file, c);
+		TSize beg1 = _parseReadNumber(file, c);
+		_parseSkipWhitespace(file, c);
+		TSize end1 = _parseReadNumber(file, c);
+		TSize len = end1 - beg1 + 1;
+		_parseSkipWhitespace(file, c);
+		TSize beg2 = _parseReadNumber(file, c);
+		_parseSkipWhitespace(file, c);
+		TSize end2 = _parseReadNumber(file, c);
+		_parseSkipWhitespace(file, c);
+		_parseReadIdentifier(file, c);
+		_parseSkipWhitespace(file, c);
+		TScoreValue rawScore = (TScoreValue) _parseReadDouble(file, c);
+
+		bool reversed = false;
+		if (beg1 > end1) { TSize tmp = beg1; beg1 = end1; end1 = tmp; reversed = !reversed; }
+		if (beg2 > end2) { TSize tmp = beg2; beg2 = end2; end2 = tmp; reversed = !reversed; }
+		//// Debug code
+		//std::cout << seq1Id << ',' << beg1 << ',' << seq2Id << ',' << beg2 << ',' << len << std::endl;
+		//std::cout << infix(strSet[seq1Id], beg1, beg1+len) << std::endl;
+		//std::cout << infix(strSet[seq2Id], beg2, beg2+len) << std::endl;
+
+		_appendFragment(matches, seq1Id, --beg1, seq2Id, --beg2, len, reversed);
+		appendValue(scores, rawScore);
+		_parseSkipLine(file, c);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TNames, typename TEdgeMap>
+void write(TFile & file, 
+		   Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+		   TNames& names,
+		   TEdgeMap& edgeMap,
+		   BlastLib) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Size<TStringSet>::Type TSize;
+	
+	TStringSet& str = stringSet(g);
+	
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TIter;
+	TIter it(g);
+	for(;!atEnd(it);++it) {
+		TVertexDescriptor sV = sourceVertex(it);
+		TVertexDescriptor tV = targetVertex(it);
+		if (sequenceId(g,sV) < sequenceId(g,tV)) {
+			TVertexDescriptor tmp = sV;
+			sV = tV;
+			tV = tmp;
+		}
+		TSize fragLen = fragmentLength(g,sV);
+		TSize fragPos1 = fragmentBegin(g,sV);
+		TSize fragPos2 = fragmentBegin(g,tV);
+		TSize seq1 = idToPosition(str, sequenceId(g,sV));
+		TSize seq2 = idToPosition(str, sequenceId(g,tV));
+		TCargo my_carg =  getCargo(*it);
+		_streamWrite(file, names[seq1]);
+		_streamPut(file, '\t');	
+		_streamWrite(file, names[seq2]);
+		_streamPut(file, '\t');	
+		_streamPutInt(file, 0);
+		_streamPut(file, '\t');	
+		_streamPutInt(file, fragLen);
+		_streamPut(file, '\t');	
+		_streamPutInt(file, 0);
+		_streamPut(file, '\t');	
+		_streamPutInt(file, 0);
+		_streamPut(file, '\t');	
+		_streamPutInt(file, fragPos1+1);
+		_streamPut(file, '\t');	
+		_streamPutInt(file, fragPos1 + fragLen);
+		_streamPut(file, '\t');	
+		if (!property(edgeMap, *it)) {
+			_streamPutInt(file, fragPos2+1);
+			_streamPut(file, '\t');	
+			_streamPutInt(file, fragPos2 + fragLen);
+			_streamPut(file, '\t');	
+		} else {
+			_streamPutInt(file, fragPos2 + fragLen);
+			_streamPut(file, '\t');		
+			_streamPutInt(file, fragPos2+1);
+			_streamPut(file, '\t');	
+		}
+		_streamPutInt(file, 0);
+		_streamPut(file, '\t');	
+		_streamPutInt(file, my_carg);
+		_streamPut(file, '\n');
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TNames>
+void write(TFile & file, 
+		   Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+		   TNames& names,
+		   BlastLib) 
+{
+	SEQAN_CHECKPOINT
+	String<bool> edgeMap;
+	resize(edgeMap, getIdUpperBound(_getEdgeIdManager(g)), false);
+	write(file, g, names, edgeMap, BlastLib());
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+// MUMMER Format Reading
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TPos, typename TSpec2, typename TSpec1, typename TScores, typename TId, typename TSize>
+inline void 
+_appendNewMatch(String<Fragment<TPos, ExactReversableFragment<TSpec2> >, TSpec1>& matches,
+				 TScores& scores,
+				 TId seq1Id,
+				 TId seq2Id,
+				 TSize beg1,
+				 TSize beg2,
+				 TSize len,
+				 bool) 
+{
+	typedef Fragment<TPos, ExactReversableFragment<TSpec2> > TFragment;
+	appendValue(matches, TFragment(seq1Id, beg1, seq2Id, beg2, len));
+	appendValue(scores, len * len);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TPos, typename TSpec2, typename TSpec1, typename TScores, typename TId, typename TSize>
+inline void 
+_appendNewMatch(String<Fragment<TPos, ExactFragment<TSpec2> >, TSpec1>& matches,
+				 TScores& scores,
+				 TId seq1Id,
+				 TId seq2Id,
+				 TSize beg1,
+				 TSize beg2,
+				 TSize len,
+				 bool reversed) 
+{
+	typedef Fragment<TPos, ExactFragment<TSpec2> > TFragment;
+	if (!reversed) {
+		appendValue(matches, TFragment(seq1Id, beg1, seq2Id, beg2, len));
+		appendValue(scores, len * len);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TStringSet, typename TNames>
+inline void 
+read(TFile & file,
+	 String<TFragment, TSpec1>& matches,
+	 String<TScoreValue, TSpec2>& scores,
+	 TStringSet const& strSet,
+	 TNames const& names,
+	 MummerLib) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<TNames>::Type TSize;
+	typedef typename Value<TFile>::Type TValue;
+	typedef typename Value<TNames>::Type TName;
+	
+	// Map the names to slots
+	typedef std::map<TName, TSize> TNameToPosition;
+	TNameToPosition namePosMap;
+	for(TSize i = 0;i<length(names);++i) namePosMap.insert(std::make_pair(value(names, i), i));
+	
+	// Read the Mummer file
+	TValue c;
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+	TName seq1;
+	TName seq2;
+	TSize seq1Id = 0;
+	TSize seq2Id = 0;
+	bool reversed = false;
+	while (!_streamEOF(file)) {
+		if (c == '>') {
+			c = _streamGet(file);
+			_parseSkipWhitespace(file, c);
+			seq1 = _parseReadIdentifier(file, c);
+			 seq1Id = namePosMap[seq1];
+			 _parseSkipWhitespace(file, c);
+			 if (c == 'R') {
+				 reversed = true;
+				 _parseSkipLine(file, c);
+			 } else reversed = false;
+		} else {
+			_parseSkipWhitespace(file, c);
+			if (_streamEOF(file)) {
+				break;
+			}
+			seq2 = _parseReadIdentifier(file, c);
+			seq2Id = namePosMap[seq2];
+			_parseSkipWhitespace(file, c);
+			TSize beg2 = _parseReadNumber(file, c);
+			_parseSkipWhitespace(file, c);
+			TSize beg1 = _parseReadNumber(file, c);
+			_parseSkipWhitespace(file, c);
+			TSize len = _parseReadNumber(file, c);
+			_parseSkipLine(file, c);
+			if (seq1Id == seq2Id) continue;
+			
+			if (!reversed) _appendNewMatch(matches, scores, seq1Id, seq2Id, --beg1, --beg2, len, reversed);
+			else _appendNewMatch(matches, scores, seq1Id, seq2Id, (length(value(strSet, seq1Id)) - (--beg1 + len)), --beg2, len, reversed);
+		}
+	}
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Newick Format
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TCargo, typename TSpec, typename TNames>
+void 
+read(TFile & file,
+	 Graph<Tree<TCargo, TSpec> >& guideTree,
+	 TNames& names,
+	 NewickFormat) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGuideTree;
+	typedef typename VertexDescriptor<TGuideTree>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGuideTree>::Type TEdgeDescriptor;
+	typedef typename Size<TGuideTree>::Type TSize;
+	typedef typename Id<TGuideTree>::Type TId;
+	typedef typename Position<TFile>::Type TPosition;
+	typedef typename Value<TFile>::Type TValue;
+	typedef typename Value<TNames>::Type TName;
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+
+
+	if (length(names) < 3) {
+		TVertexDescriptor v1 = addVertex(guideTree);
+		TVertexDescriptor v2 = addVertex(guideTree);
+		TVertexDescriptor internalVertex = addVertex(guideTree);
+		addEdge(guideTree, internalVertex, v1, (TCargo) 1 * SEQAN_DISTANCE_UNITY);
+		addEdge(guideTree, internalVertex, v2, (TCargo) 1 * SEQAN_DISTANCE_UNITY);
+		assignRoot(guideTree, internalVertex);
+		return;
+	}
+
+
+	typedef std::map<TName, TId> TNameToId;
+	TNameToId nameToId;
+	for(TId i=0; i<length(names);++i) {
+		addVertex(guideTree);	// Create the sequence vertices
+		nameToId.insert(std::make_pair(names[i], i));
+	}
+
+	TValue c;
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+
+	TVertexDescriptor lastVertex = nilVertex;
+	TVertexDescriptor lastChild = nilVertex;
+	while (!_streamEOF(file)) {
+		if (c=='(') {
+			if (lastVertex == nilVertex) {
+				lastVertex = addVertex(guideTree);
+				assignRoot(guideTree, lastVertex);
+			} else {
+				TVertexDescriptor ch = addChild(guideTree, lastVertex);
+				lastVertex = ch;
+			}
+			c = _streamGet(file);
+			_parseSkipWhitespace(file, c);
+		} else if (c==')') {
+			if (!isRoot(guideTree, lastVertex)) {
+				lastChild = lastVertex;
+				lastVertex = parentVertex(guideTree, lastVertex);
+			} else {
+				lastChild = lastVertex;
+				lastVertex = nilVertex;
+			}
+			c = _streamGet(file);
+			_parseSkipWhitespace(file, c);
+		} else if (c==',') {
+			c = _streamGet(file);
+			_parseSkipWhitespace(file, c);
+		} else if (c==':') {
+			c = _streamGet(file);
+			cargo(findEdge(guideTree, lastVertex, lastChild)) = (TCargo) (_parseReadDouble(file,c) * SEQAN_DISTANCE_UNITY);
+		} else if (c==';') {
+			c = _streamGet(file);
+			_parseSkipWhitespace(file, c);
+		} else {
+			TName tmp = _parseReadIdentifier(file, c);
+			//std::cout << tmp << std::endl;
+			if (lastVertex == nilVertex) {
+				// Tree is rooted at a leaf
+				// Create artificial root node
+				lastVertex = length(names);
+				assignRoot(guideTree, addVertex(guideTree));
+				addEdge(guideTree, getRoot(guideTree), lastVertex);
+				addEdge(guideTree, getRoot(guideTree), nameToId[tmp]);
+			} else {
+				addEdge(guideTree, lastVertex, nameToId[tmp]);
+			}
+			lastChild = nameToId[tmp];
+		}
+	}
+	
+	// Root the tree if necessary 
+	if (outDegree(guideTree, lastChild) > 2) {
+		TVertexDescriptor myRoot = addVertex(guideTree);
+		assignRoot(guideTree, myRoot);
+		typedef typename Iterator<TGuideTree, OutEdgeIterator>::Type TOutEdgeIterator;
+		TOutEdgeIterator it(guideTree, lastChild);
+		goNext(it); goNext(it);
+		TVertexDescriptor tV = targetVertex(it);
+		TCargo c = cargo(*it);
+		removeEdge(guideTree, lastChild, tV);
+		addEdge(guideTree, myRoot, tV, (TCargo) (c / 2));
+		addEdge(guideTree, myRoot, lastChild, (TCargo) (c / 2));
+	}
+
+	//std::fstream strm1; // Alignment graph as dot
+	//strm1.open("tree23.dot", std::ios_base::out | std::ios_base::trunc);
+	//write(strm1,guideTree,DotDrawing());
+	//strm1.close();
+
+	//std::cout << guideTree << std::endl;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TNames, typename TNewickString, typename TVertexDescriptor>
+void 
+_buildNewickString(Graph<Tree<TCargo, TSpec> >& guideTree,
+				   TNames& names,
+				   TNewickString& str,
+				   TVertexDescriptor v,
+				   bool collapseRoot) 
+{
+	typedef Graph<Tree<TCargo, TSpec> > TGuideTree;
+	typedef typename EdgeDescriptor<TGuideTree>::Type TEdgeDescriptor;
+	typedef typename Iterator<TGuideTree, AdjacencyIterator>::Type TAdjIter;
+	if (isLeaf(guideTree, v)) {
+		append(str, names[v], Generous());
+	} else {
+		if ((collapseRoot) && (isRoot(guideTree, v))) {
+			TAdjIter adjIterRoot(guideTree, v);
+			TVertexDescriptor v1 = *adjIterRoot;
+			goNext(adjIterRoot);
+			TVertexDescriptor v2 = *adjIterRoot;
+			if (isLeaf(guideTree, v2)) {
+				TVertexDescriptor tmp = v1;
+				v1 = v2;
+				v2 = tmp;
+			}
+			String<char> subStr;
+			appendValue(subStr, '(', Generous());
+			_buildNewickString(guideTree, names, subStr, v1, collapseRoot);
+			TEdgeDescriptor e1 = findEdge(guideTree, v, v1);
+			TEdgeDescriptor e2 = findEdge(guideTree, v, v2);
+			appendValue(subStr, ':', Generous());
+			::std::ostringstream weight;
+			weight << (cargo(e1) + cargo(e2));
+			append(subStr, weight.str().c_str(), Generous());
+			TAdjIter adjIter(guideTree, v2);
+			for(;!atEnd(adjIter); goNext(adjIter)) {
+				appendValue(subStr, ',', Generous());
+				_buildNewickString(guideTree, names, subStr, *adjIter, collapseRoot);
+				TEdgeDescriptor e = findEdge(guideTree, v2, *adjIter);
+				appendValue(subStr, ':', Generous());
+				::std::ostringstream weight;
+				weight << cargo(e);
+				append(subStr, weight.str().c_str(), Generous());
+			}
+			appendValue(subStr, ')', Generous());
+			append(str, subStr, Generous());
+		} else {
+			TAdjIter adjIter(guideTree, v);
+			String<char> subStr;
+			appendValue(subStr, '(', Generous());
+			_buildNewickString(guideTree, names, subStr, *adjIter, collapseRoot);
+			TEdgeDescriptor e = findEdge(guideTree, v, *adjIter);
+			appendValue(subStr, ':', Generous());
+			::std::ostringstream weight;
+			weight << cargo(e);
+			append(subStr, weight.str().c_str(), Generous());
+			goNext(adjIter);
+			for(;!atEnd(adjIter); goNext(adjIter)) {
+				appendValue(subStr, ',', Generous());
+				_buildNewickString(guideTree, names, subStr, *adjIter, collapseRoot);
+				TEdgeDescriptor e = findEdge(guideTree, v, *adjIter);
+				appendValue(subStr, ':', Generous());
+				::std::ostringstream weight;
+				weight << cargo(e);
+				append(subStr, weight.str().c_str(), Generous());
+			}
+			appendValue(subStr, ')', Generous());
+			append(str, subStr, Generous());
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TCargo, typename TSpec, typename TNames>
+void 
+write(TFile & file,
+	  Graph<Tree<TCargo, TSpec> >& guideTree,
+	  TNames& names,
+	  bool collapseRoot,
+	  NewickFormat) 
+{
+	typedef Graph<Tree<TCargo, TSpec> > TGuideTree;
+	typedef typename Size<TGuideTree>::Type TSize;
+	typedef typename VertexDescriptor<TGuideTree>::Type TVertexDescriptor;
+	
+	String<char> myNewickString;
+	_buildNewickString(guideTree, names, myNewickString, getRoot(guideTree), collapseRoot);
+	_streamWrite(file, myNewickString);
+	_streamPut(file, ';');	
+	_streamPut(file, '\n');	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TCargo, typename TSpec, typename TNames>
+void 
+write(TFile & file,
+	  Graph<Tree<TCargo, TSpec> >& guideTree,
+	  TNames& names,
+	  NewickFormat) 
+{
+	write(file,guideTree, names, false, NewickFormat());
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_kmer.h b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_kmer.h
new file mode 100644
index 0000000..6169a99
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_kmer.h
@@ -0,0 +1,153 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_KMER_H
+#define SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_KMER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Simple k-mer counter
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TTupelString, typename TKTup, typename TAlphabet>
+inline void
+_getTupelString(TString const& str, 
+				TTupelString& tupelString,
+				TKTup const ktup, 
+				TAlphabet) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<typename Value<TTupelString>::Type>::Type TWord;
+	
+	// Alphabet size
+	TWord alphabet_size = ValueSize<TAlphabet>::VALUE;
+
+	// Assign a unique number to each k-tupel
+	String<TWord> prod;  // Scaling according to position in k-tupel
+	resize(prod,ktup);
+	for (TWord i=0; i< (TWord) ktup;++i) {
+		prod[ktup-i-1] = 1;
+		for(TWord j=0;j<i;++j) prod[ktup-i-1] *= alphabet_size;
+	}
+
+	TWord len = length(str);
+	clear(tupelString);
+	resize(tupelString, len-(ktup - 1)); 
+	TWord tupelIndex = 0;
+	TWord endTupel = 0;
+	tupelString[tupelIndex] = 0;
+	for(;endTupel< (TWord) ktup;++endTupel) {
+		tupelString[tupelIndex] += (TWord) (ordValue((TAlphabet) str[endTupel])) * prod[endTupel];
+	}
+	++tupelIndex;
+	for(;endTupel<len;++endTupel) {
+		tupelString[tupelIndex] = tupelString[tupelIndex - 1];
+		tupelString[tupelIndex] -= (TWord) (ordValue((TAlphabet) str[endTupel - ktup])) * prod[0];
+		tupelString[tupelIndex] *= alphabet_size;
+		tupelString[tupelIndex] += (TWord) (ordValue((TAlphabet) str[endTupel]));
+		++tupelIndex;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename THitMatrix, typename TSize, typename TAlphabet>
+inline void
+getKmerSimilarityMatrix(StringSet<TString, TSpec> const& strSet, 
+						THitMatrix& mat, 
+						TSize ktup, 
+						TAlphabet) 
+{
+	SEQAN_CHECKPOINT
+	typedef TSize TWord;
+	typedef String<TWord> TTupelString;
+	typedef String<TTupelString> TTupelStringSet;
+	typedef typename Value<THitMatrix>::Type TValue;
+
+	// Number of sequences
+	TSize nseq = length(strSet);
+	TSize alphabet_size = ValueSize<TAlphabet>::VALUE;
+	TWord qIndexSize = (TWord) std::pow((double)alphabet_size, (double)ktup);
+
+	// Initialization
+	// Matrix for common k-tupels between sequence i and j
+	resize(mat, nseq*nseq);
+
+	// Transform the set of strings into a set of strings of k-tupels
+	TTupelStringSet tupSet;
+	resize(tupSet, length(strSet));
+	for(TSize k=0;k<(TSize) length(strSet);++k) _getTupelString(strSet[k], tupSet[k], ktup, TAlphabet());
+
+	// Build for each sequence the q-gram Index and count common hits
+	String<TWord> qIndex;
+	String<TWord> compareIndex;
+	for(TSize k=0;k<nseq;++k) {
+		clear(qIndex);
+		resize(qIndex, qIndexSize, (TWord) 0, Exact());
+		for(TSize i = 0;i < (TSize) length(tupSet[k]);++i) ++qIndex[ tupSet[k][i] ];
+		TWord value;
+	    for (TSize k2=k; k2<nseq; ++k2) {
+			clear(compareIndex);
+			resize(compareIndex, qIndexSize, (TWord) 0, Exact());
+			value = 0;
+			for(TSize i = 0;i < (TSize) length(tupSet[k2]);++i) {
+				//std::cout << tupSet[k2][i] << "," << compareIndex[ tupSet[k2][i] ] << "," << qIndex[ tupSet[k2][i] ]<< std::endl;
+				if (compareIndex[ tupSet[k2][i] ] < qIndex[ tupSet[k2][i] ]) ++value;
+				++compareIndex[ tupSet[k2][i] ];
+			}
+			mat[k*nseq+k2] = value;
+		}
+	}
+
+	// Scale counts
+	for(TWord row = 0; row < (TWord) nseq; ++row) {
+		for(TWord col = row+1; col < (TWord) nseq; ++col) {
+			// Fractional common kmer count
+			// = Number of common q-grams / Number of possible common q-grams
+			TValue minVal = (mat[col*nseq+col] < mat[row*nseq+row]) ? mat[col*nseq+col] : mat[row*nseq+row];
+			mat[row*nseq+col] = (mat[row*nseq+col] * SEQAN_DISTANCE_UNITY) / minVal;
+			//std::cout << mat[row*nseq+col] << ",";
+		}
+		//std::cout << std::endl;
+	}
+}
+
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_library.h b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_library.h
new file mode 100644
index 0000000..cf7f5e3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_library.h
@@ -0,0 +1,544 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_LIBRARY_H
+#define SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_LIBRARY_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment graph generation
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Tags
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Segment Match Generation:
+..summary:A tag that specifies how to generate segment matches.
+..include:seqan/graph_msa.h
+*/
+
+
+/**
+.Tag.Segment Match Generation.value.GlobalPairwiseLibrary:
+	Segment matches from pairwise global alignments.
+..include:seqan/graph_msa.h
+*/
+
+struct GlobalPairwiseLibrary_;
+typedef Tag<GlobalPairwiseLibrary_> const GlobalPairwiseLibrary;
+
+
+/**
+.Tag.Segment Match Generation.value.LocalPairwiseLibrary:
+	Segment matches from pairwise local alignments.
+..include:seqan/graph_msa.h
+*/
+
+struct LocalPairwiseLibrary_;
+typedef Tag<LocalPairwiseLibrary_> const LocalPairwiseLibrary;
+
+/**
+.Tag.Segment Match Generation.value.KmerLibrary:
+	Segment matches from pairwise kmer alignments.
+..include:seqan/graph_msa.h
+*/
+
+struct KmerLibrary_;
+typedef Tag<KmerLibrary_> const KmerLibrary;
+
+
+/**
+.Tag.Segment Match Generation.value.LcsLibrary:
+	Segment matches from pairwise longest common subsequence comparisons.
+..include:seqan/graph_msa.h
+*/
+
+struct LcsLibrary_;
+typedef Tag<LcsLibrary_> const LcsLibrary;
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Pair selection to calculate alignment
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+// Dummy function selecting all pairs
+template<typename TString, typename TSpec, typename TSize2, typename TSpec2>
+inline void 
+selectPairs(StringSet<TString, TSpec> const& str,
+			String<TSize2, TSpec2>& pList)
+{
+	SEQAN_CHECKPOINT
+	typedef StringSet<TString, TSpec> TStringSet;
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename Iterator<String<TSize2, TSpec2>, Standard>::Type TPairIter;
+
+	TSize nseq = length(str);
+	resize(pList, nseq * (nseq - 1));
+	TPairIter itPair = begin(pList, Standard());
+	for(TSize i=0; i<nseq-1; ++i) {
+		for(TSize j=i+1; j<nseq; ++j) {
+			*itPair = i; ++itPair;
+			*itPair = j; ++itPair;
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment statistics
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFragment, typename TSpec1, typename TStringSet, typename TPos, typename TSize1>
+inline void 
+getAlignmentStatistics(String<TFragment, TSpec1> const& matches,
+					   TStringSet& str,
+					   TPos const from,
+					   TPos const to,
+					   TSize1& matchLength,	// Number of identical characters
+					   TSize1& overlapLength,	// Number of character in overlapping segments (with mismatches and gaps)
+					   TSize1& alignLength)	// Length of the alignment
+{
+	SEQAN_CHECKPOINT
+	typedef String<TFragment, TSpec1> TFragmentMatches;
+	typedef typename Size<TFragmentMatches>::Type TSize;
+	typedef typename Id<TFragmentMatches>::Type TId;
+	typedef typename Iterator<TFragmentMatches, Standard>::Type TFragIter;
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Value<TString>::Type TAlphabet; 
+	matchLength = 0;
+	TSize len1 = length(str[0]);
+	TSize len2 = length(str[1]);
+
+	
+	TSize minId1 = len1 + len2;
+	TSize minId2 = len1 + len2;
+	TSize maxId1 = 0;
+	TSize maxId2 = 0;
+	TSize matchMismatch_length = 0;
+
+	TFragIter itFrag = begin(matches, Standard());
+	TFragIter itFragEnd = itFrag;
+	itFrag += from;
+	itFragEnd += to;
+	TId id1 = sequenceId(*itFrag, 0);
+	TId id2 = sequenceId(*itFrag, 1);
+	TSize fragLen = 0;
+	TSize beginI = 0;
+	TSize beginJ = 0;
+	for(;itFrag != itFragEnd; ++itFrag) {
+		fragLen = fragmentLength(*itFrag, id1);
+		beginI = fragmentBegin(*itFrag, id1);
+		beginJ = fragmentBegin(*itFrag, id2);
+		if (beginI < minId1) minId1 = beginI;
+		if (beginJ < minId2) minId2 = beginJ;
+		if (beginI + fragLen > maxId1) maxId1 = beginI + fragLen;
+		if (beginJ + fragLen > maxId2) maxId2 = beginJ + fragLen;
+		typedef typename Infix<TString>::Type TInfix;
+		typedef typename Iterator<TInfix, Standard>::Type TInfixIter;
+		TInfix inf1 = label(*itFrag, str, id1);
+		TInfix inf2 = label(*itFrag, str, id2);
+		TInfixIter sIt1 = begin(inf1, Standard());
+		TInfixIter sIt2 = begin(inf2, Standard());
+		TInfixIter sIt1End = end(inf1, Standard());
+		matchMismatch_length += fragLen;
+		for(;sIt1 != sIt1End; ++sIt1, ++sIt2) 
+			if ( (TAlphabet) *sIt1  == (TAlphabet) *sIt2) ++matchLength;
+	}
+	alignLength = matchMismatch_length + (len1 - matchMismatch_length) + (len2 - matchMismatch_length);
+	overlapLength = alignLength -  minId1 - minId2 - (len1 + len2 - maxId1 - maxId2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Segment Match Generation
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TSize2, typename TSpec2, typename TSegmentMatches, typename TScores>
+inline void 
+appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str,
+					 String<TSize2, TSpec2> const& pList,
+					 TSegmentMatches& matches,
+					 TScores& scores,
+					 LcsLibrary)
+{
+	SEQAN_CHECKPOINT
+	typedef StringSet<TString, Dependent<TSpec> > TStringSet;
+	typedef String<TSize2, TSpec2> TPairList;
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename Id<TStringSet>::Type TId;
+	typedef typename Value<TSegmentMatches>::Type TFragment;
+	typedef typename Value<TScores>::Type TScoreValue;
+	typedef typename Iterator<TPairList, Standard>::Type TPairIter;
+
+	// Pairwise longest common subsequence
+	TPairIter itPair = begin(pList, Standard());
+	TPairIter itPairEnd = end(pList, Standard());
+	for(;itPair != itPairEnd; ++itPair) {
+		TStringSet pairSet;
+		TId id1 = positionToId(str, *itPair); ++itPair;
+		TId id2 = positionToId(str, *itPair);
+		assignValueById(pairSet, const_cast<TStringSet&>(str), id1);
+		assignValueById(pairSet, const_cast<TStringSet&>(str), id2);
+
+		// Lcs between first and second string
+		TSize from = length(matches);
+		globalAlignment(matches, pairSet, Lcs());
+		TSize to = length(matches);
+
+		// Record the scores
+		resize(scores, to);
+		typedef typename Iterator<TSegmentMatches, Standard>::Type TMatchIter;
+		typedef typename Iterator<TScores, Standard>::Type TScoreIter;
+		TScoreIter itScore = begin(scores, Standard());
+		TScoreIter itScoreEnd = end(scores, Standard());
+		TMatchIter itMatch = begin(matches, Standard());
+		itScore+=from;
+		itMatch+=from;
+		for(;itScore != itScoreEnd; ++itScore, ++itMatch) *itScore = (*itMatch).len;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TSegmentMatches, typename TScores, typename TAlphabet, typename TSize>
+inline void 
+appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str,
+					 TSegmentMatches& matches,
+					 TScores& scores,
+					 TSize ktup,
+					 TAlphabet,
+					 KmerLibrary)
+{
+	SEQAN_CHECKPOINT
+	typedef StringSet<TString, Dependent<TSpec> > TStringSet;
+	typedef typename Value<TScores>::Type TScoreValue;
+	typedef typename Value<TSegmentMatches>::Type TFragment;
+	typedef typename Id<TStringSet>::Type TId;
+	typedef String<TSize> TTupelString;
+	typedef String<TTupelString> TTupelStringSet;
+	
+	// Initialization
+	TSize nseq = length(str);
+	TSize alphabet_size = ValueSize<TAlphabet>::VALUE;
+
+	// Transform the set of strings into a set of strings of k-tupels
+	TTupelStringSet tupSet;
+	resize(tupSet, nseq);
+	for(TSize k=0;k<nseq;++k) {
+		_getTupelString(str[k], tupSet[k], ktup, TAlphabet());
+	}
+
+	// Build one q-gram Index for all sequences
+	typedef std::pair<TSize, TSize> TPosSeqPair;
+	typedef std::set<TPosSeqPair> TQGramOcc;
+	String<TQGramOcc> qIndex;
+	TSize qIndexSize = 1;
+	for(TSize i=0; i<(TSize) ktup;++i) qIndexSize *= alphabet_size;
+	resize(qIndex, qIndexSize);
+	for(TSize k=0;k<nseq;++k) {
+		for(TSize i = 0;i < (TSize) length(tupSet[k]);++i) {
+			qIndex[ tupSet[k][i] ].insert(std::make_pair(i, k));
+		}
+	}
+	for(TSize q=0;q< (TSize) qIndexSize;++q) {
+		typename TQGramOcc::const_iterator pos = qIndex[q].begin();
+		typename TQGramOcc::const_iterator posEnd = qIndex[q].end();
+		while (pos != posEnd) {
+			typename TQGramOcc::const_iterator pos2 = pos;
+			++pos2;
+			while (pos2 != posEnd) {
+				if (pos->second != pos2->second) {
+					appendValue(matches, TFragment(positionToId(str, pos->second), pos->first, positionToId(str, pos2->second), pos2->first, ktup));
+					appendValue(scores, (TScoreValue) ktup);
+				}
+				++pos2;
+			}
+			++pos;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TSegmentMatches, typename TScores, typename TSize>
+inline void 
+appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str,
+					 TSegmentMatches& matches,
+					 TScores& scores,
+					 TSize ktup,
+					 KmerLibrary)
+{
+	SEQAN_CHECKPOINT
+	appendSegmentMatches(str, matches, scores, ktup,  typename Value<TString>::Type(), KmerLibrary());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TSegmentMatches, typename TScores>
+inline void 
+appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str,
+					 TSegmentMatches& matches,
+					 TScores& scores,
+					 KmerLibrary)
+{
+	SEQAN_CHECKPOINT
+	appendSegmentMatches(str, matches, scores, 3, KmerLibrary());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TSize2, typename TSpec2, typename TScore, typename TSegmentMatches, typename TScores>
+inline void 
+appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str,
+					 String<TSize2, TSpec2> const& pList,
+					 TScore const& score_type,
+					 TSegmentMatches& matches,
+					 TScores& scores,
+					 LocalPairwiseLibrary)
+{
+	SEQAN_CHECKPOINT
+	typedef StringSet<TString, Dependent<TSpec> > TStringSet;
+	typedef String<TSize2, TSpec2> TPairList;
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename Id<TStringSet>::Type TId;
+	typedef typename Iterator<TPairList, Standard>::Type TPairIter;
+
+	// Pairwise alignments
+	TPairIter itPair = begin(pList, Standard());
+	TPairIter itPairEnd = end(pList, Standard());
+	for(;itPair != itPairEnd; ++itPair) {
+		// Make a pairwise string-set
+		TStringSet pairSet;
+		TId id1 = positionToId(str, *itPair); ++itPair;
+		TId id2 = positionToId(str, *itPair);
+		assignValueById(pairSet, const_cast<TStringSet&>(str), id1);
+		assignValueById(pairSet, const_cast<TStringSet&>(str), id2);
+
+		multiLocalAlignment(pairSet, matches, scores, score_type, 4, SmithWatermanClump() );
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSpec, typename TSize>
+inline void
+_resizeWithRespectToDistance(String<TValue, TSpec>& dist, 
+							  TSize nseq)
+{
+	SEQAN_CHECKPOINT;
+	resize(dist, nseq * nseq, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TSize>
+inline void
+_resizeWithRespectToDistance(Graph<Undirected<TCargo, TSpec> >& dist, TSize nseq)
+{
+	SEQAN_CHECKPOINT
+	clear(dist);
+	reserve(_getVertexString(dist), nseq);
+	for(TSize i=0;i<nseq; ++i) addVertex(dist);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize>
+inline void
+_resizeWithRespectToDistance(Nothing&, TSize)
+{
+	SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFragment, typename TSpec1, typename TString, typename TSpec2, typename TValue,  typename TSpec, typename TSize>
+inline void 
+_setDistanceValue(String<TFragment, TSpec1>& matches,
+				   StringSet<TString, TSpec2>& pairSet,			
+				   String<TValue, TSpec>& dist,
+				   TSize i,
+				   TSize j,
+				   TSize nseq,
+				   TSize from)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Position<String<TFragment, TSpec1> >::Type TPos;
+	
+	// Determine a sequence weight
+	TValue matchLen = 0;
+	TValue overlapLen = 0;
+	TValue alignLen = 0;
+	getAlignmentStatistics(matches, pairSet, (TPos) from, (TPos) length(matches),  matchLen, overlapLen, alignLen);
+			
+	// Calculate sequence similarity
+	TValue x = SEQAN_DISTANCE_UNITY - static_cast<TValue>(static_cast<double>(matchLen) / static_cast<double>(alignLen) * static_cast<double>(SEQAN_DISTANCE_UNITY));
+	if (i < j)
+	  dist[i * nseq + j] = x;
+	else
+	  dist[j * nseq + i] = x;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFragment, typename TSpec1, typename TString, typename TSpec2, typename TCargo,  typename TSpec, typename TSize>
+inline void 
+_setDistanceValue(String<TFragment, TSpec1>& matches,
+				   StringSet<TString, TSpec2>& pairSet,
+				   Graph<Undirected<TCargo, TSpec> >& dist,
+				   TSize i,
+				   TSize j,
+				   TSize,
+				   TSize from)
+{
+	SEQAN_CHECKPOINT
+		
+	// Determine a sequence weight
+	TCargo matchLen = 0;
+	TCargo overlapLen = 0;
+	TCargo alignLen = 0;
+	getAlignmentStatistics(matches, pairSet, (TSize) from, (TSize) length(matches),  matchLen, overlapLen, alignLen);
+			
+	// Calculate sequence similarity
+	TCargo normalizedSimilarity = SEQAN_DISTANCE_UNITY - (TCargo) (((double) matchLen / (double) overlapLen) * ((double) overlapLen / (double) alignLen) * (double) SEQAN_DISTANCE_UNITY);
+
+	addEdge(dist, i, j, normalizedSimilarity);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFragment, typename TSpec, typename TString, typename TSpec2, typename TSize>
+inline void 
+_setDistanceValue(String<TFragment, TSpec>&,
+				   StringSet<TString, TSpec2>&,
+				   Nothing&,
+				   TSize,
+				   TSize,
+				   TSize,
+				   TSize)
+{
+	SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TSize2, typename TSpec2, typename TScore, typename TSegmentMatches, typename TScoreValues, typename TDistance, typename TAlignConfig>
+inline void 
+appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str,
+					 String<TSize2, TSpec2> const& pList,
+					 TScore const& score_type,
+					 TSegmentMatches& matches,
+					 TScoreValues& scores,
+					 TDistance& dist,
+					 TAlignConfig const& ac,
+					 GlobalPairwiseLibrary)
+{
+	SEQAN_CHECKPOINT
+	typedef StringSet<TString, Dependent<TSpec> > TStringSet;
+	typedef typename Id<TStringSet>::Type TId;
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename Value<TScoreValues>::Type TScoreValue;
+	typedef typename Iterator<String<TSize2, TSpec2>, Standard>::Type TPairIter;
+
+	// Initialization
+	TSize nseq = length(str);
+	_resizeWithRespectToDistance(dist, nseq);
+	
+	// Pairwise alignments
+	TPairIter itPair = begin(pList, Standard());
+	TPairIter itPairEnd = end(pList, Standard());
+	for(;itPair != itPairEnd; ++itPair) {
+		// Make a pairwise string-set
+		TStringSet pairSet;
+		TId id1 = positionToId(str, *itPair); ++itPair;
+		TId id2 = positionToId(str, *itPair);
+		assignValueById(pairSet, const_cast<TStringSet&>(str), id1);
+		assignValueById(pairSet, const_cast<TStringSet&>(str), id2);
+				
+		// Alignment
+		TSize from = length(matches);
+		TScoreValue myScore = globalAlignment(matches, pairSet, score_type, ac, Gotoh() );
+		TSize to = length(matches);
+
+		// Record the scores
+		resize(scores, to);
+		typedef typename Iterator<TScoreValues, Standard>::Type TScoreIter;
+		TScoreIter itScore = begin(scores, Standard());
+		TScoreIter itScoreEnd = end(scores, Standard());
+		itScore+=from;
+		for(;itScore != itScoreEnd; ++itScore) *itScore = myScore;
+			
+		// Get the alignment statistics
+		_setDistanceValue(matches, pairSet, dist, (TSize) *(itPair-1), (TSize) *itPair, (TSize) nseq, (TSize)from);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TSpec, typename TSize2, typename TSpec2, typename TScore, typename TSegmentMatches, typename TScoreValues, typename TDistance>
+inline void 
+appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str,
+					 String<TSize2, TSpec2> const& pList,
+					 TScore const& score_type,
+					 TSegmentMatches& matches,
+					 TScoreValues& scores,
+					 TDistance& dist,					 
+					 GlobalPairwiseLibrary)
+{
+	SEQAN_CHECKPOINT
+	appendSegmentMatches(str, pList, score_type, matches, scores, dist, AlignConfig<>(), GlobalPairwiseLibrary() );
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_msa.h b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_msa.h
new file mode 100644
index 0000000..77884fd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_msa.h
@@ -0,0 +1,483 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_MSA_H
+#define SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_MSA_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template<typename TAlphabet, typename TScore>
+struct MsaOptions {
+public:
+	// Rescore segment matches after refinement
+	bool rescore;
+
+	// Output format
+	// 0: Fasta
+	// 1: Msf
+	unsigned int outputFormat;
+
+	// Scoring object
+	TScore sc;
+
+	// All methods to compute a guide tree
+	// 0: Neighbor-joining
+	// 1: UPGMA single linkage
+	// 2: UPGMA complete linkage
+	// 3: UPGMA average linkage
+	// 4: UPGMA weighted average linkage
+	unsigned int build;
+
+	// All methods to compute segment matches
+	// 0: global alignment
+	// 1: local alignments
+	// 2: overlap alignments
+	// 3: longest common subsequence
+	String<unsigned int> method;
+
+	// Various input and output file names
+	String<std::string> alnfiles;		// External alignment files
+	String<std::string> libfiles;		// T-Coffee library files
+	String<std::string> blastfiles;		// Blast match files
+	String<std::string> mummerfiles;	// MUMmer files
+	std::string outfile;				// Output file name
+	std::string seqfile;				// Sequence file name
+	std::string infile;					// Alignment file for alignment evaluation
+	std::string treefile;				// Guide tree file
+	
+	// Initialization
+	MsaOptions() : rescore(true), outputFormat(0), build(0) {}
+};
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TScore>
+inline void
+evaluateAlignment(MsaOptions<TAlphabet, TScore> const& msaOpt) {
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef String<TAlphabet> TSequence;
+	typedef typename Size<TSequence>::Type TSize;
+	StringSet<TSequence, Owner<> > origStrSet;
+	StringSet<String<char> > names;
+
+	// Read the sequences
+	std::fstream strm;
+	strm.open(msaOpt.infile.c_str(), ::std::ios_base::in | ::std::ios_base::binary);
+	read(strm,origStrSet,names,FastaAlign());	
+	strm.close();
+
+	// Make a dependent StringSet
+	typedef StringSet<TSequence, Dependent<> > TDepSequenceSet;
+	TDepSequenceSet strSet(origStrSet);
+	
+	// Read the alignment
+	typedef String<Fragment<> > TFragmentString;
+	String<TScoreValue> scores;
+	TFragmentString matches;
+	std::fstream strm_lib;
+	strm_lib.open(msaOpt.infile.c_str(), ::std::ios_base::in | ::std::ios_base::binary);
+	read(strm_lib,matches, scores, names, FastaAlign());	
+	strm_lib.close();
+
+	// Build the alignment graph
+	typedef Graph<Alignment<TDepSequenceSet, TSize> > TGraph;
+	TGraph g(strSet);
+	buildAlignmentGraph(matches, g, FrequencyCounting() );
+
+	// Print the scoring information
+	TScoreValue gop = msaOpt.sc.data_gap_open;
+	TScoreValue gex = msaOpt.sc.data_gap_extend;
+	std::cout << "Scoring parameters:" << std::endl;
+	std::cout << "*Gap opening: " << gop << std::endl;
+	std::cout << "*Gap extension: " << gex << std::endl;
+	std::cout << "*Scoring matrix: " << std::endl;
+	TSize alphSize = ValueSize<TAlphabet>::VALUE;
+	std::cout << "   ";
+	for(TSize col = 0; col<alphSize; ++col) std::cout << TAlphabet(col) << ',';
+	std::cout << std::endl;
+	for(TSize row = 0; row<alphSize; ++row) {
+		for(TSize col = 0; col<alphSize; ++col) {
+			if (col == 0) std::cout << TAlphabet(row) << ": ";
+			std::cout << score(msaOpt.sc, TAlphabet(row), TAlphabet(col));
+			if (col < alphSize - 1) std::cout << ',';
+		}
+		std::cout << std::endl;
+	}
+	std::cout << std::endl;
+
+	// Print the alignment information
+	TSize numGapEx = 0;
+	TSize numGap = 0;
+	TSize numPairs = 0;
+	TSize alignLen = 0;
+	String<TSize> pairCount;
+	String<char> mat;
+	if (convertAlignment(g, mat)) {
+		TScoreValue alignScore = alignmentEvaluation(g, msaOpt.sc, numGapEx, numGap, numPairs, pairCount, alignLen);
+		std::cout << "Alignment Score: " << alignScore << std::endl;
+		std::cout << "Alignment Length: " << alignLen << std::endl;
+		std::cout << "#Match-Mismatch pairs: " << numPairs << std::endl;
+		std::cout << "Score contribution by match-mismatch pairs: " << (alignScore - (((TScoreValue) numGap * gop) + ((TScoreValue) numGapEx * gex))) << std::endl;
+		std::cout << "#Gap extensions: " << numGapEx << std::endl;
+		std::cout << "Score contribution by gap extensions: " << ((TScoreValue) numGapEx * gex) << std::endl;
+		std::cout << "#Gap openings: " << numGap << std::endl;
+		std::cout << "Score contribution by gap openings: " << ((TScoreValue) numGap * gop) << std::endl;
+		std::cout << std::endl;
+		std::cout << "#Pairs: " << std::endl;
+		std::cout << "   ";
+		for(TSize col = 0; col<alphSize; ++col) std::cout << TAlphabet(col) << ',';
+		std::cout << std::endl;
+		for(TSize row = 0; row<alphSize; ++row) {
+			for(TSize col = 0; col<alphSize; ++col) {
+				if (col == 0) std::cout << TAlphabet(row) << ": ";
+				std::cout << value(pairCount, row * alphSize + col);
+				if (col < alphSize - 1) std::cout << ',';
+			}
+			std::cout << std::endl;
+		}
+	} else {
+		std::cout << "No valid alignment!" << std::endl;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStrSpec, typename TSpec, typename TList, typename TScore, typename TSegmentMatches, typename TScores>
+inline void 
+_appendSegmentMatches(StringSet<String<AminoAcid, TStrSpec>, Dependent<TSpec> > const& str,
+					   TList const& pList,
+					   TScore const&,
+					   TSegmentMatches& matches,
+					   TScores& scores)
+{
+	Blosum62 local_score(-1,-8);
+	appendSegmentMatches(str, pList, local_score, matches, scores, LocalPairwiseLibrary() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TStrSpec, typename TSpec, typename TList, typename TScore, typename TSegmentMatches, typename TScores>
+inline void 
+_appendSegmentMatches(StringSet<String<TValue, TStrSpec>, Dependent<TSpec> > const& str,
+					   TList const& pList,
+					   TScore const& score_type,
+					   TSegmentMatches& matches,
+					   TScores& scores)
+{
+	appendSegmentMatches(str, pList, score_type, matches, scores, LocalPairwiseLibrary() );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.globalMsaAlignment:
+..summary:Computes a global multiple alignment.
+..cat:Alignments
+..signature:globalMsaAlignment(align, score)
+..param.align:An alignment data structure containing two or more sequences.
+...type:Spec.Alignment Graph
+..param.score:The score values to be used for computing the alignment.
+...type:Class.Score
+..returns:void
+...remarks:The resulting alignment is stored in $align$.
+..include:seqan/graph_msa.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TStringSet1, typename TNames, typename TAlphabet, typename TScore>
+inline void
+globalMsaAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& gAlign, 
+				   TStringSet1& sequenceSet,
+				   TNames& sequenceNames,
+				   MsaOptions<TAlphabet, TScore> const& msaOpt)
+{
+	typedef typename Value<TScore>::Type TScoreValue;
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef Graph<Alignment<TStringSet, TSize> > TGraph;
+	typedef typename Id<TGraph>::Type TId;
+	typedef double TDistanceValue;
+	
+	
+	// Initialize alignment object
+	clear(gAlign);
+	assignStringSet(gAlign, sequenceSet);
+
+	// Some alignment constants
+	TStringSet& seqSet = stringSet(gAlign);
+	TSize nSeq = length(seqSet);
+	TSize threshold = 30;
+
+	// Select all possible pairs for global and local alignments
+	String<TSize> pList;
+	selectPairs(seqSet, pList);
+
+	// Set-up a distance matrix
+	typedef String<TDistanceValue> TDistanceMatrix;
+	TDistanceMatrix distanceMatrix;
+
+	// Containers for segment matches and corresponding scores 
+	typedef String<Fragment<> > TFragmentString;
+	TFragmentString matches;
+	typedef String<TScoreValue> TScoreValues;
+	TScoreValues scores;
+
+	// Include segment matches from subalignments
+	if (!empty(msaOpt.alnfiles)) {
+		typedef typename Iterator<String<std::string>, Standard>::Type TIter;
+		TIter begIt = begin(msaOpt.alnfiles, Standard() );
+		TIter begItEnd = end(msaOpt.alnfiles, Standard() );
+		for(;begIt != begItEnd; goNext(begIt)) {
+			std::ifstream strm_lib;
+			strm_lib.open((*begIt).c_str(), ::std::ios_base::in | ::std::ios_base::binary);
+			read(strm_lib, matches, scores, sequenceNames, FastaAlign());
+			strm_lib.close();
+		}
+	}
+
+	// Include computed segment matches
+	if (!empty(msaOpt.method)) {
+		typedef typename Iterator<String<unsigned int>, Standard>::Type TIter;
+		TIter begIt = begin(msaOpt.method, Standard() );
+		TIter begItEnd = end(msaOpt.method, Standard() );
+		for(;begIt != begItEnd; goNext(begIt)) {
+			if (*begIt == 0) appendSegmentMatches(seqSet, pList, msaOpt.sc, matches, scores, distanceMatrix, GlobalPairwiseLibrary() );
+			else if (*begIt == 1) _appendSegmentMatches(seqSet, pList, msaOpt.sc, matches, scores);
+			else if (*begIt == 2) {
+				Nothing noth;
+				appendSegmentMatches(seqSet, pList, msaOpt.sc, matches, scores, noth, AlignConfig<true,true,true, true>(), GlobalPairwiseLibrary() );
+			}
+			else if (*begIt == 3) appendSegmentMatches(seqSet, pList, matches, scores, LcsLibrary() );
+		}	
+	}
+
+	// Include a T-Coffee library
+	if (!empty(msaOpt.libfiles)) {
+		typedef typename Iterator<String<std::string>, Standard>::Type TIter;
+		TIter begIt = begin(msaOpt.libfiles, Standard() );
+		TIter begItEnd = end(msaOpt.libfiles, Standard() );
+		for(;begIt != begItEnd; goNext(begIt)) {
+			std::ifstream strm_lib;
+			strm_lib.open((*begIt).c_str(), std::ios_base::in | std::ios_base::binary);
+			read(strm_lib, matches, scores, sequenceNames, TCoffeeLib());
+			strm_lib.close();
+		}
+	}
+
+	// Include MUMmer segment matches
+	if (!empty(msaOpt.mummerfiles)) {
+		typedef typename Iterator<String<std::string>, Standard>::Type TIter;
+		TIter begIt = begin(msaOpt.mummerfiles, Standard() );
+		TIter begItEnd = end(msaOpt.mummerfiles, Standard() );
+		for(;begIt != begItEnd; goNext(begIt)) {
+			std::ifstream strm_lib;
+			strm_lib.open((*begIt).c_str(), std::ios_base::in | std::ios_base::binary);
+			read(strm_lib, matches, scores, seqSet, sequenceNames, MummerLib());		
+			strm_lib.close();
+		}
+	}
+
+	// Include BLAST segment matches
+	if (!empty(msaOpt.blastfiles)) {
+		typedef typename Iterator<String<std::string>, Standard>::Type TIter;
+		TIter begIt = begin(msaOpt.blastfiles, Standard() );
+		TIter begItEnd = end(msaOpt.blastfiles, Standard() );
+		for(;begIt != begItEnd; goNext(begIt)) {
+			std::ifstream strm_lib;
+			strm_lib.open((*begIt).c_str(), std::ios_base::in | std::ios_base::binary);
+			read(strm_lib, matches, scores, sequenceNames, BlastLib());
+			strm_lib.close();
+		}
+	}
+
+	// Use these segment matches for the initial alignment graph
+	TGraph g(seqSet);
+	if (!msaOpt.rescore) buildAlignmentGraph(matches, scores, g, FractionalScore() );
+	else buildAlignmentGraph(matches, scores, g, msaOpt.sc, ReScore() );
+	clear(matches);
+	clear(scores);
+
+	// Guide tree
+	Graph<Tree<TDistanceValue> > guideTree;
+	if (!empty(msaOpt.treefile)) {
+		std::fstream strm_tree;
+		strm_tree.open(msaOpt.treefile.c_str(), ::std::ios_base::in | ::std::ios_base::binary);
+		read(strm_tree, guideTree, sequenceNames, NewickFormat());	// Read newick tree
+		strm_tree.close();
+	} else {
+		// Check if we have a valid distance matrix
+		if (empty(distanceMatrix))
+		  getDistanceMatrix(g, distanceMatrix, KmerDistance());
+		// Get distance matrix values for a precision of 10 decimal digits.
+		for (unsigned i = 0; i < length(distanceMatrix); ++i)
+		  distanceMatrix[i] = static_cast<__int64>(distanceMatrix[i] * 1e10) / 1e10;
+		if (msaOpt.build == 0) njTree(distanceMatrix, guideTree);
+		else if (msaOpt.build == 1) upgmaTree(distanceMatrix, guideTree, UpgmaMin());
+		else if (msaOpt.build == 2) upgmaTree(distanceMatrix, guideTree, UpgmaMax());
+		else if (msaOpt.build == 3) upgmaTree(distanceMatrix, guideTree, UpgmaAvg());
+		else if (msaOpt.build == 4) upgmaTree(distanceMatrix, guideTree, UpgmaWeightAvg());
+	}
+	clear(distanceMatrix);
+		
+	// Triplet extension
+	if (nSeq < threshold) tripletLibraryExtension(g);
+	else tripletLibraryExtension(g, guideTree, threshold / 2);
+
+	// Progressive Alignment
+	progressiveAlignment(g, guideTree, gAlign);
+
+	clear(guideTree);
+	clear(g);
+
+	//TStringSet& str = stringSet(gAlign);
+	//for(TSize i = 0; i<length(str);++i) {
+	//	for(TSize j=0;j<length(str[i]);++j) {
+	//		std::cout << ordValue(str[i][j]) << ',';
+	//	}
+	//	std::cout << std::endl;
+	//}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScore>
+inline void
+globalMsaAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& gAlign,
+				   TScore const& scoreObject)
+{
+	typedef typename Value<TStringSet>::Type TString;
+	typedef typename Value<TString>::Type TAlphabet;
+	TStringSet sequenceSet = stringSet(gAlign);
+	String<String<char> > sequenceNames;
+	resize(sequenceNames, length(sequenceSet), String<char>("tmpName"));
+	MsaOptions<AminoAcid, TScore> msaOpt;
+	msaOpt.sc = scoreObject;
+	appendValue(msaOpt.method, 0);  // Global pairwise
+	appendValue(msaOpt.method, 1);	// Local pairwise
+	globalMsaAlignment(gAlign, sequenceSet, sequenceNames, msaOpt);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TSource, typename TSpec, typename TScore>
+inline void
+globalMsaAlignment(Align<TSource, TSpec>& align,
+				   TScore const& scoreObject)
+{
+	typedef StringSet<TSource, Dependent<> > TStringSet;
+	TStringSet sequenceSet = stringSet(align);
+	Graph<Alignment<TStringSet, void, WithoutEdgeId> > gAlign(sequenceSet);
+	globalMsaAlignment(gAlign, scoreObject);
+	convertAlignment(gAlign, align);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Just two testing functions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TMatches>
+void
+_debugMatches(TStringSet& str, 
+			  TMatches& matches)
+{
+	typedef typename Id<TStringSet>::Type TId;
+	typedef typename Size<TStringSet>::Type TSize;
+
+	// Print all the matches
+	std::cout << "The sequences:" << std::endl;
+	for(TSize i = 0;i<length(str);++i) {
+		std::cout << positionToId(str,i) << ':' << str[i] << std::endl;
+	}
+	std::cout << "The matches:" << std::endl;
+	for(TSize i = 0;i<length(matches);++i) {
+		TId tmp_id1 = sequenceId(matches[i],0);
+		std::cout << tmp_id1 << ',' << fragmentBegin(matches[i],tmp_id1) << ',';
+		for(TSize j = fragmentBegin(matches[i],tmp_id1); j < fragmentBegin(matches[i],tmp_id1) + fragmentLength(matches[i],tmp_id1); ++j) {
+			std::cout << str[idToPosition(str, tmp_id1)][j];
+		}
+		TId tmp_id2 = sequenceId(matches[i],1);
+		std::cout << ',' <<	tmp_id2 << ',' << fragmentBegin(matches[i],tmp_id2) << ',';
+		for(TSize j = fragmentBegin(matches[i],tmp_id2); j < fragmentBegin(matches[i],tmp_id2) + fragmentLength(matches[i],tmp_id2); ++j) {
+			std::cout << str[idToPosition(str, tmp_id2)][j];
+		}
+		std::cout << std::endl;
+
+		SEQAN_ASSERT_TRUE(sequenceId(matches[i],0) != sequenceId(matches[i],1));
+		SEQAN_ASSERT_TRUE(fragmentBegin(matches[i],tmp_id1) < length(str[idToPosition(str, tmp_id1)]));
+		SEQAN_ASSERT_TRUE(fragmentBegin(matches[i],tmp_id1) + fragmentLength(matches[i],tmp_id1) <= length(str[idToPosition(str, tmp_id1)]));
+		SEQAN_ASSERT_TRUE(fragmentBegin(matches[i],tmp_id2) < length(str[idToPosition(str, tmp_id2)]));
+		SEQAN_ASSERT_TRUE(fragmentBegin(matches[i],tmp_id2) + fragmentLength(matches[i],tmp_id2) <= length(str[idToPosition(str, tmp_id2)]));
+		SEQAN_ASSERT_TRUE(fragmentLength(matches[i],tmp_id2) == fragmentLength(matches[i],tmp_id1));
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph>
+void
+_debugRefinedMatches(TGraph& g)
+{
+	typedef typename Id<TGraph>::Type TId;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	
+	std::cout << "Refined matches" << std::endl;
+	TEdgeIterator it_tmp(g);
+	for(;!atEnd(it_tmp);++it_tmp) {
+		TId id1 = sequenceId(g,sourceVertex(it_tmp));
+		TId id2 = sequenceId(g,targetVertex(it_tmp));
+		std::cout << id1 << ',' << fragmentBegin(g,sourceVertex(it_tmp)) << ',';
+		std::cout << label(g,sourceVertex(it_tmp));
+		std::cout << ',' <<	id2 << ',' << fragmentBegin(g,targetVertex(it_tmp)) << ',';
+		std::cout << label(g,targetVertex(it_tmp));
+		std::cout << " (" << cargo(*it_tmp) << ")";
+		std::cout << std::endl;	
+
+		SEQAN_ASSERT_TRUE(sequenceId(g,sourceVertex(it_tmp)) != sequenceId(g,targetVertex(it_tmp)));
+		SEQAN_ASSERT_TRUE(fragmentBegin(g,sourceVertex(it_tmp)) < length((stringSet(g))[idToPosition((stringSet(g)), id1)]));
+		SEQAN_ASSERT_TRUE(fragmentBegin(g,sourceVertex(it_tmp)) + fragmentLength(g,sourceVertex(it_tmp)) <= length((stringSet(g))[idToPosition((stringSet(g)), id1)]));
+		SEQAN_ASSERT_TRUE(fragmentBegin(g,targetVertex(it_tmp)) < length((stringSet(g))[idToPosition((stringSet(g)), id2)]));
+		SEQAN_ASSERT_TRUE(fragmentBegin(g,targetVertex(it_tmp)) + fragmentLength(g,targetVertex(it_tmp)) <= length((stringSet(g))[idToPosition((stringSet(g)), id2)]));
+		SEQAN_ASSERT_TRUE(fragmentLength(g,sourceVertex(it_tmp)) == fragmentLength(g,targetVertex(it_tmp)));
+
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_progressive.h b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_progressive.h
new file mode 100644
index 0000000..db6cb13
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_progressive.h
@@ -0,0 +1,489 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_PROGRESSIVE_H
+#define SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_PROGRESSIVE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Progressive Alignment
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TPosition, typename TSequence>
+inline void 
+_buildLeafString(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+				 TPosition const pos,
+				 TSequence& alignSeq)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TId;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Value<TSequence>::Type TVertexString;
+
+	//TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	TStringSet& str = stringSet(g);
+	TId seqId = positionToId(str, pos);
+	TSize lenRoot = length(str[pos]);
+	TSize i = 0;
+	while(i<lenRoot) {
+		TVertexDescriptor nextVertex = findVertex(const_cast<TGraph&>(g), seqId, i);
+		//SEQAN_ASSERT_TRUE(nextVertex != nilVertex);
+		//if (nextVertex == nilVertex) {
+		//	std::cout << "Warning: Nil Vertex" << std::endl;
+		//	TSize j = i + 1;
+		//	while ((j < lenRoot) && (findVertex(const_cast<TGraph&>(g), seqId, j) == nilVertex)) ++j;
+		//	nextVertex = addVertex(const_cast<TGraph&>(g), seqId, i, j-i);
+		//}
+		appendValue(alignSeq, TVertexString(nextVertex), Generous());
+		i += fragmentLength(g, nextVertex);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSegmentString, typename TOutGraph>
+inline void 
+_createAlignmentGraph(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+					  TSegmentString& alignSeq,
+					  TOutGraph& gOut)			 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef String<TVertexDescriptor> TVertexString;
+
+	// Create the alignment graph
+	TSize alignSeqLen = length(alignSeq);
+	for(TSize i = 0; i<alignSeqLen;++i) {
+		TVertexString& alignSeq_i = alignSeq[i];
+		TSize len_i = length(alignSeq_i);
+		for(TSize j=0; j<len_i; ++j) {
+			TVertexDescriptor v = alignSeq_i[j];
+			SEQAN_ASSERT_TRUE(fragmentBegin(g,v) < length(getValueById(stringSet(g), sequenceId(g,v))));
+			SEQAN_ASSERT_TRUE(fragmentLength(g,v) > 0);
+			SEQAN_ASSERT_TRUE(fragmentBegin(g,v) + fragmentLength(g,v) <= length(getValueById(stringSet(g), sequenceId(g,v))));
+			TVertexDescriptor l = addVertex(gOut, sequenceId(g, v), fragmentBegin(g,v), fragmentLength(g,v));
+			//std::cout << l << label(gOut, l) << ',';
+			TSize count = 1;
+			for(TSize k = j; k>0; --k) {
+				SEQAN_ASSERT_TRUE(fragmentLength(gOut,l) == fragmentLength(gOut,l - count));
+				addEdge(gOut, (TVertexDescriptor) (l - count), (TVertexDescriptor) l);
+				++count;
+			}
+		}
+		//std::cout << std::endl;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.progressiveAlignment:
+..summary:Performs a progressive alignment.
+..cat:Graph
+..signature:
+progressiveAlignment(inputGraph, guideTree, outputGraph)
+..param.inputGraph:The alignment graph with multiple sequence information.
+...type:Spec.Alignment Graph
+..param.guideTree:A guide tree.
+...type:Spec.Tree
+..param.outputGraph:An alignment graph for the final MSA.
+...type:Spec.Alignment Graph
+..returns:void
+..include:seqan/graph_msa.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TGuideTree, typename TOutGraph>
+inline void 
+progressiveAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+					 TGuideTree& tree,
+					 TOutGraph& gOut)			 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGuideTree>::Type TVertexDescriptor;
+	typedef typename Iterator<TGuideTree, BfsIterator>::Type TBfsIterator;
+	typedef typename Iterator<TGuideTree, AdjacencyIterator>::Type TAdjacencyIterator;
+	typedef String<TVertexDescriptor> TVertexString;
+	typedef String<TVertexString> TSegmentString;
+	
+	// Initialization
+	TVertexDescriptor rootVertex = getRoot(tree);
+	TSize nVertices = numVertices(tree);
+
+	// Vertices in reversed bfs order
+	TVertexString vertices;
+	resize(vertices, nVertices);
+
+	// All Strings of Strings of vertices for each node of the guide tree
+	String<TSegmentString> segString;
+	resize(segString, nVertices);
+	
+	// Walk through the tree in bfs order	
+	typedef typename Iterator<TVertexString, Standard>::Type TVertexIter;
+	TVertexIter itVert = begin(vertices, Standard());
+	TVertexIter itVertEnd = end(vertices, Standard());
+	--itVertEnd;
+	TBfsIterator bfsIt(tree, rootVertex);
+	for(;!atEnd(bfsIt);goNext(bfsIt), --itVertEnd) 
+		*itVertEnd = *bfsIt;
+
+	// Progressive alignment
+	itVert = begin(vertices, Standard());
+	itVertEnd = end(vertices, Standard());
+	for(;itVert != itVertEnd; ++itVert) {
+		if(isLeaf(tree, *itVert)) _buildLeafString(g, *itVert, segString[*itVert]);
+		else {
+			// Align the two children (Binary tree)
+			TAdjacencyIterator adjIt(tree, *itVert);
+			TVertexDescriptor child1 = *adjIt; goNext(adjIt);
+			heaviestCommonSubsequence(g, segString[child1], segString[*adjIt], segString[*itVert]);
+			clear(segString[child1]);
+			clear(segString[*adjIt]);
+		}
+	}
+
+	// Create the alignment graph
+	_createAlignmentGraph(g, segString[rootVertex], gOut);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Progressive Matching, just for testing purposes
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSegmentString, typename TEdgeMap, typename TOutGraph>
+inline void 
+_createMatchingGraph(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+					 TSegmentString& alignSeq,
+					 TEdgeMap& edgeMap,
+					 TOutGraph& gOut,
+					 TEdgeMap& edgeMapOut)			 
+{
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef String<TVertexDescriptor> TVertexString;
+
+	// Initialization
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+
+	// Create the matching graph
+	clear(edgeMapOut);
+	TSize alignSeqLen = length(alignSeq);
+	for(TSize i = 0; i<alignSeqLen;++i) {
+		TVertexString& alignSeq_i = alignSeq[i];
+		TSize len_i = length(alignSeq_i);
+		for(TSize j=0; j<len_i - 1; ++j) {
+			for(TSize k=j+1; k<len_i; ++k) {
+				TVertexDescriptor v1 = getValue(alignSeq_i, j);
+				TVertexDescriptor v2 = getValue(alignSeq_i, k);
+				if ((v1 == nilVertex) || (v2 == nilVertex)) continue;
+				
+				TVertexDescriptor v1New = findVertex(gOut, sequenceId(g, v1), fragmentBegin(g,v1));
+				if (v1New == nilVertex) v1New = addVertex(gOut, sequenceId(g, v1), fragmentBegin(g,v1), fragmentLength(g,v1));
+				TVertexDescriptor v2New = findVertex(gOut, sequenceId(g, v2), fragmentBegin(g,v2));
+				if (v2New == nilVertex) v2New = addVertex(gOut, sequenceId(g, v2), fragmentBegin(g,v2), fragmentLength(g,v2));
+			
+				TEdgeDescriptor e = findEdge(g, v1, v2);
+				addEdge(gOut, v1New, v2New, cargo(e));
+				appendValue(edgeMapOut, property(edgeMap, e));
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TString, typename TOutString>
+inline TCargo
+heaviestMatching(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+				 TString const& str1, 
+				 TString const& str2,
+				 TOutString& align) 
+{
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef __int64 TLargeSize;
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Value<TString>::Type TVertexSet;
+
+	TSize m = length(str1);  // How many sets of vertex descriptors in seq1
+	TSize n = length(str2);  // How many sets of vertex descriptors in seq1
+
+	// Size of the sequences
+	// Note for profile alignments every member of the sequence is a String!!! of vertex descriptors
+	TCargo divider = (TCargo) length(str1[0]) * (TCargo) length(str2[0]);
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	
+	// Fill the vertex to position map for str1
+	// Remember for each vertex descriptor the position in the sequence
+	typedef std::map<TVertexDescriptor, TSize> TVertexToPosMap;
+	typedef typename TVertexToPosMap::const_iterator TVertexToPosMapIter;
+	TVertexToPosMap map;
+	typedef typename Iterator<TString const>::Type TStringIterConst;
+	typedef typename Iterator<TVertexSet const>::Type TVertexSetIterConst;
+	TStringIterConst itStrEnd1 = end(str1);
+	TSize pos = 0;
+	for(TStringIterConst itStr1 = begin(str1);itStr1 != itStrEnd1;++itStr1, ++pos) {
+		TVertexSetIterConst itVEnd = end(getValue(itStr1));	
+		for(TVertexSetIterConst itV = begin(getValue(itStr1));itV != itVEnd;++itV) {
+			if (*itV != nilVertex) map.insert(std::make_pair(*itV, pos));
+		}
+	}
+
+	// Given a full graph, what positions are occupied?
+	typedef std::set<TLargeSize> TOccupiedPositions;
+	TOccupiedPositions occupiedPositions;
+	TStringIterConst itStrEnd2 = end(str2);
+	TSize posItStr2 = 0;
+	for(TStringIterConst itStr2 = begin(str2);itStr2 != itStrEnd2;++itStr2, ++posItStr2) {
+		TVertexSetIterConst itVEnd = end(getValue(itStr2));
+		for(TVertexSetIterConst itV = begin(getValue(itStr2));itV != itVEnd;++itV) {
+			if (*itV != nilVertex) {
+				TOutEdgeIterator itOut(g, *itV);
+				for(;!atEnd(itOut); ++itOut) {
+					// Target vertex must be in the map
+					TVertexToPosMapIter pPos = map.find(targetVertex(itOut));
+					if (pPos != map.end()) occupiedPositions.insert( (TLargeSize) (pPos->second) * (TLargeSize) n + (TLargeSize) (n - posItStr2 - 1) );
+				}
+			}
+		}
+	}
+	// Map the occupied positions to slots
+	typedef std::map<TLargeSize, TSize> TPositionToSlotMap;
+	TPositionToSlotMap posToSlotMap;
+	TSize counter = 0;
+	for(typename TOccupiedPositions::const_iterator setIt = occupiedPositions.begin();setIt != occupiedPositions.end(); ++setIt, ++counter) {
+		posToSlotMap.insert(std::make_pair(*setIt, counter));
+	}
+	occupiedPositions.clear();
+
+	// Walk through str2 and fill in the weights of the actual edges
+	typedef String<TCargo> TWeights;
+	typedef typename Iterator<TWeights>::Type TWeightsIter;
+	TWeights weights;
+	resize(weights, posToSlotMap.size(),0);
+	posItStr2 = 0;
+	for(TStringIterConst itStr2 = begin(str2);itStr2 != itStrEnd2;++itStr2, ++posItStr2) {
+		TVertexSetIterConst itVEnd = end(getValue(itStr2));
+		for(TVertexSetIterConst itV = begin(getValue(itStr2));itV != itVEnd;++itV) {
+			if (*itV != nilVertex) {
+				TOutEdgeIterator itOut(g, *itV);
+				for(;!atEnd(itOut); ++itOut) {
+					// Target vertex must be in the map
+					TVertexToPosMapIter pPos = map.find(targetVertex(itOut));
+					if (pPos != map.end()) weights[posToSlotMap[ (TLargeSize) (pPos->second) * (TLargeSize) n + (TLargeSize) (n - posItStr2 - 1) ]] += (TCargo) cargo(*itOut);
+				}
+			}
+		}
+	}
+	map.clear();
+	// Average weights
+	TWeightsIter itWeights = begin(weights);
+	TWeightsIter itWeightsEnd = begin(weights);
+	for(;itWeights != itWeightsEnd; ++itWeights) *itWeights /= divider;
+
+	// Create the match graph
+	Graph<Undirected<void> > matchGraph;
+	typedef typename VertexDescriptor<Graph<Undirected<void> > >::Type TVD;
+	String<bool> vertexMap;
+	resize(vertexMap, m + n, false);
+	for(TSize i = 0; i < m; ++i) addVertex(matchGraph);
+	for(TSize i = 0; i < n; ++i) value(vertexMap, addVertex(matchGraph)) = true;
+	for(typename TPositionToSlotMap::const_iterator mapIt = posToSlotMap.begin();mapIt != posToSlotMap.end(); ++mapIt) {
+		TLargeSize pos = mapIt->first;
+		TSize i = (TSize) (pos / (TLargeSize) n);   // Get the index in str1
+		TSize j = n - 1 - (TSize) (pos % (TLargeSize) n); // Get the index in str2
+		addEdge(matchGraph, i, m+j);
+	}
+
+	// Compute the best matching
+	typedef String<Pair<TVD, TVD> > TEdges;
+	TEdges edges;
+
+	//std::fstream strm;
+	//strm.open("Z:\\my_graph.dot", std::ios_base::out | std::ios_base::trunc);
+	//write(strm,matchGraph,DotDrawing());
+	//strm.close();
+	
+	TCargo val = weightedBipartiteMatching(matchGraph, vertexMap, weights, edges);
+	
+	// Retrieve the aligned segments
+	TSize seqsInStr1 = length(str1[0]);	 
+	TSize seqsInStr2 = length(str2[0]);	
+	typedef typename Value<TString>::Type TVertexSet;
+	typedef typename Iterator<TString const, Rooted>::Type TStringIter;
+	typedef typename Iterator<TString, Rooted>::Type TSIter;
+	typedef typename Iterator<TVertexSet const, Rooted>::Type TVertexSetIter;
+	typedef typename Iterator<TVertexSet, Rooted>::Type TIter;	
+	clear(align);
+	// Retrieve all matches
+	String<bool> matchedVertices;
+	resize(matchedVertices, n + m, false);
+	typedef typename Iterator<TEdges>::Type TEdgesIter;
+	TEdgesIter itEdges = begin(edges);
+	TEdgesIter itEdgesEnd = end(edges);
+	for(;itEdges != itEdgesEnd; ++itEdges) {
+		TSize i = (value(itEdges)).i1;
+		TSize j = (value(itEdges)).i2 - m; 
+		value(matchedVertices, i) = true;
+		value(matchedVertices, m+j) = true;
+		TVertexSet tmp;
+		resize(tmp, (seqsInStr1 + seqsInStr2), nilVertex);
+		TVertexSetIter itVEnd = end(value(str1,i));
+		TSize count = 0;
+		for(TVertexSetIter itV = begin(value(str1,i));itV != itVEnd;++itV) {
+			tmp[count] = *itV;
+			++count;
+		}
+		TVertexSetIter itVEnd2 = end(value(str2,j));
+		for(TVertexSetIter itV2 = begin(value(str2,j));itV2 != itVEnd2;++itV2) {
+			tmp[count] = *itV2;
+			++count;
+		}
+		appendValue(align, tmp);
+	}
+	typedef typename Iterator<Graph<Undirected<void> >, VertexIterator>::Type TVertexIterator;
+	TVertexIterator itVertex(matchGraph);
+	for(;!atEnd(itVertex);++itVertex) {
+		if (getProperty(matchedVertices, *itVertex) == true) continue;
+		if (*itVertex < m) {
+			TSize i = *itVertex;
+			TVertexSet tmp;
+			resize(tmp, (seqsInStr1 + seqsInStr2), nilVertex);
+			TVertexSetIter itVEnd = end(value(str1, i));
+			TSize count = 0;
+			for(TVertexSetIter itV = begin(value(str1, i));itV != itVEnd;++itV) {
+				tmp[count] = *itV;
+				++count;
+			}
+			appendValue(align, tmp);
+		} else {
+			TSize j = *itVertex - m;
+			TVertexSet tmp;
+			resize(tmp, (seqsInStr1 + seqsInStr2), nilVertex);
+			TVertexSetIter itVEnd = end(value(str2, j));
+			TSize count = 0;
+			for(TVertexSetIter itV = begin(value(str2, j));itV != itVEnd;++itV) {
+				tmp[count] = *itV;
+				++count;
+			}
+			appendValue(align, tmp);
+		}
+	}
+
+	return val;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TGuideTree, typename TVertexDescriptor, typename TSequence>
+inline void 
+_recursiveProgressiveMatching(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+							  TGuideTree& tree,
+							  TVertexDescriptor const root,
+							  TSequence& alignSeq)
+{
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TId;
+	typedef typename Iterator<TGuideTree, AdjacencyIterator>::Type TAdjacencyIterator;
+	typedef typename Iterator<TGuideTree, DfsPreorder>::Type TDfsPreorderIterator;
+
+	if(isLeaf(tree, root)) {
+		_buildLeafString(g, root, alignSeq);
+	} else {
+		// Align the two children (Binary tree)
+		typedef String<String<TVertexDescriptor> > TSegmentString;
+		TSegmentString seq1;
+		TSegmentString seq2;
+		TAdjacencyIterator adjIt(tree, root);
+		_recursiveProgressiveMatching(g,tree, *adjIt, seq1);
+		goNext(adjIt);
+		_recursiveProgressiveMatching(g,tree, *adjIt, seq2);
+
+		heaviestMatching(g, seq1, seq2, alignSeq);
+
+		//// Debug Code
+		//for(TSize i = 0; i<length(alignSeq);++i) {
+		//	std::cout << '(';
+		//	for(TSize j=0; j<length(alignSeq[i]);++j) {
+		//		std::cout << getValue(alignSeq[i], j) << ',';
+		//	}
+		//	std::cout << ')' << ',';
+		//}
+		//std::cout << std::endl;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TGuideTree, typename TEdgeMap, typename TOutGraph>
+inline void 
+progressiveMatching(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+					TGuideTree& tree,
+					TEdgeMap& edgeMap,
+					TOutGraph& gOut,
+					TEdgeMap& edgeMapOut)			 
+{
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef String<TVertexDescriptor> TVertexString;
+	typedef String<TVertexString> TSegmentString;
+
+	// Perform progressive alignment
+	TSegmentString alignSeq;
+	_recursiveProgressiveMatching(g,tree,getRoot(tree),alignSeq);
+
+	// Create the alignment graph
+	_createMatchingGraph(g, alignSeq, edgeMap, gOut, edgeMapOut);
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_refinement.h b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_refinement.h
new file mode 100644
index 0000000..c9e491b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_align_tcoffee_refinement.h
@@ -0,0 +1,515 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_REFINEMENT_H
+#define SEQAN_HEADER_GRAPH_ALIGN_TCOFFEE_REFINEMENT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template<typename TScore, typename TSc>
+inline void
+_matchScore(TScore&, 
+			 TSc) 
+{
+	// No operation
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template<typename TScore, typename TSc>
+inline void
+_mismatchScore(TScore&, 
+				TSc) 
+{
+	// No operation
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSc>
+inline void
+_matchScore(Score<TValue, Simple>& sc, 
+			 TSc msc) 
+{
+	sc.data_match = msc;
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSc>
+inline void
+_mismatchScore(Score<TValue, Simple>& sc, 
+				TSc mmsc) 
+{
+	sc.data_mismatch = mmsc;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename T>
+struct ProfileProfileScore;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TScoreMember>
+class Score<TValue, ProfileProfileScore<TScoreMember> >
+{
+public:
+	TScoreMember sc;
+
+	Score() {}
+
+	template<typename TSpec>
+	Score(Score<TValue, TSpec>& old_sc) 
+	{
+		sc.data_gap_extend = scoreGapExtend(old_sc);
+		sc.data_gap_open = scoreGapOpen(old_sc);
+	}
+
+	Score(Score<TValue, Simple>& old_sc) 
+	{
+		sc.data_gap_extend = scoreGapExtend(old_sc);
+		sc.data_gap_open = scoreGapOpen(old_sc);
+		_matchScore(sc, scoreMatch(old_sc));
+		_mismatchScore(sc, scoreMismatch(old_sc));
+	}
+
+	Score(TValue gap_extend, TValue gap_open) 
+	{
+		sc.data_gap_extend = gap_extend;
+		sc.data_gap_open = gap_open;
+	}
+
+	Score(TValue match, TValue mismatch, TValue gap_extend, TValue gap_open)
+	{
+		sc.data_gap_extend = gap_extend;
+		sc.data_gap_open = gap_open;
+		_matchScore(sc, match);
+		_mismatchScore(sc, mismatch);
+	}
+};
+
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendHorizontal(
+	Score<TValue, ProfileProfileScore<TScoreMember> > const & me,
+	TPos1 pos1,
+	TPos2,
+	TSeq1 const& seq1,
+	TSeq2 const&)
+{
+	typedef typename Size<TSeq1>::Type TSize;
+	typedef typename Value<TSeq1>::Type TAlphabet1; 
+	typedef typename Value<TSeq2>::Type TAlphabet2; 
+	typedef typename SourceValue<TAlphabet1>::Type TSourceValue;
+	
+	// Last character is a gap
+	// std::cout << seq1[pos1] << std::endl;
+	
+	TSize alph_size = ValueSize<TSourceValue>::VALUE;
+	TValue n1 = 0;
+	for(TSize i = 0; i < alph_size; ++i) n1 += seq1[pos1].count[i];
+	TValue totalSc = n1 * scoreGapExtend(me.sc);
+	n1 += seq1[pos1].count[alph_size];
+	//std::cout <<  totalSc / n1 << ',';
+	return totalSc / n1;
+}
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenHorizontal(
+	Score<TValue, ProfileProfileScore<TScoreMember> > const & me,
+	TPos1 pos1,
+	TPos2,
+	TSeq1 const & seq1,
+	TSeq2 const &)
+{
+	typedef typename Size<TSeq1>::Type TSize;
+	typedef typename Value<TSeq1>::Type TAlphabet1; 
+	typedef typename Value<TSeq2>::Type TAlphabet2; 
+	typedef typename SourceValue<TAlphabet1>::Type TSourceValue;
+
+	TSize alph_size = ValueSize<TSourceValue>::VALUE;
+	TValue n1 = 0;
+	for(TSize i = 0; i < alph_size+1; ++i) n1 += seq1[pos1].count[i];
+	TSize newGapOpen = n1;
+	if ((pos1) && (seq1[pos1 - 1].count[alph_size] < seq1[pos1].count[alph_size])) { 
+		newGapOpen -= (seq1[pos1].count[alph_size] - seq1[pos1 - 1].count[alph_size]);
+	} else if (!pos1) {
+		newGapOpen -= seq1[pos1].count[alph_size];
+	}
+	TValue totalSc = newGapOpen * scoreGapOpen(me.sc);
+	return totalSc / n1;
+}
+
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendVertical(
+	Score<TValue, ProfileProfileScore<TScoreMember> > const & me,
+	TPos1,
+	TPos2 pos2,
+	TSeq1 const &,
+	TSeq2 const & seq2)
+{
+	typedef typename Size<TSeq1>::Type TSize;
+	typedef typename Value<TSeq1>::Type TAlphabet1; 
+	typedef typename Value<TSeq2>::Type TAlphabet2; 
+	typedef typename SourceValue<TAlphabet1>::Type TSourceValue;
+	
+	// Last character is a gap
+	// std::cout << seq2[pos2] << std::endl;
+	
+	TSize alph_size = ValueSize<TSourceValue>::VALUE;
+	TValue n2 = 0;
+	for(TSize j = 0; j < alph_size; ++j) n2 += seq2[pos2].count[j];
+	TValue totalSc = n2 * scoreGapExtend(me.sc);
+	n2 += seq2[pos2].count[alph_size];
+	//std::cout <<  totalSc / n2 << ',';
+	return totalSc / n2;
+}
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenVertical(
+	Score<TValue, ProfileProfileScore<TScoreMember> > const & me,
+	TPos1,
+	TPos2 pos2,
+	TSeq1 const &,
+	TSeq2 const & seq2)
+{
+	typedef typename Size<TSeq1>::Type TSize;
+	typedef typename Value<TSeq1>::Type TAlphabet1; 
+	typedef typename Value<TSeq2>::Type TAlphabet2; 
+	typedef typename SourceValue<TAlphabet1>::Type TSourceValue;
+
+	TSize alph_size = ValueSize<TSourceValue>::VALUE;
+	TValue n2 = 0;
+	for(TSize j = 0; j < alph_size+1; ++j) n2 += seq2[pos2].count[j];
+	TSize newGapOpen = n2;
+	if ((pos2) && (seq2[pos2 - 1].count[alph_size] < seq2[pos2].count[alph_size])) {
+		newGapOpen -= (seq2[pos2].count[alph_size] - seq2[pos2 - 1].count[alph_size]);
+	} else if (!pos2) {
+		newGapOpen -= seq2[pos2].count[alph_size];
+	}
+	TValue totalSc = newGapOpen * scoreGapOpen(me.sc);
+	return totalSc / n2;
+}
+
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+score(Score<TValue, ProfileProfileScore<TScoreMember> > const & me,
+	  TPos1 pos1,
+	  TPos2 pos2,
+	  TSeq1 const &seq1,
+	  TSeq2 const &seq2)
+{
+	typedef typename Size<TSeq1>::Type TSize;
+	typedef typename Value<TSeq1>::Type TAlphabet1; 
+	typedef typename Value<TSeq2>::Type TAlphabet2; 
+	typedef typename SourceValue<TAlphabet1>::Type TSourceValue;
+	
+	// Last character is a gap
+	//std::cout << seq1[pos1] << std::endl;
+	//std::cout << seq2[pos2] << std::endl;
+
+	TValue totalSc = 0;
+	TSize alph_size = ValueSize<TSourceValue>::VALUE;
+	TValue n1 = 0;
+	TValue n2 = 0;
+	for(TSize j = 0; j < alph_size; ++j) n2 += seq2[pos2].count[j];
+	for(TSize i = 0; i < alph_size; ++i) {
+		if (seq1[pos1].count[i]) {
+			n1 += seq1[pos1].count[i];
+			for(TSize j = 0; j < alph_size; ++j) {
+				if (seq2[pos2].count[j]) {
+					//std::cout << TSourceValue(i) << ',' << TSourceValue(j) << ',' << score(me.sc, TSourceValue(i), TSourceValue(j)) << std::endl;
+					totalSc += seq1[pos1].count[i] * seq2[pos2].count[j] * score(me.sc, TSourceValue(i), TSourceValue(j));
+				}
+			}
+		}
+	}
+	totalSc += n2 * seq1[pos1].count[alph_size] * scoreGapExtend(me.sc);
+	totalSc += n1 * seq2[pos2].count[alph_size] * scoreGapExtend(me.sc);
+	n1 += seq1[pos1].count[alph_size];
+	n2 += seq2[pos2].count[alph_size];
+	//std::cout <<  totalSc / (n1 * n2) << ',';
+	return totalSc / (n1 * n2);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSpec, typename TSize, typename TAlphabet, typename TScore> 
+inline void
+_msaRefinement(String<TValue, TSpec>& mat,
+			   TSize nseq,
+			   TSize splitPos,
+			   TScore& sc,
+			   TAlphabet)
+{
+	// Is it a valid split?
+	if ((splitPos == 0) || (splitPos > nseq - 1)) return;
+
+	// Initialization
+	typedef String<TValue, TSpec> TAlignMat;
+	typedef typename Iterator<TAlignMat, Standard>::Type TMatIter;
+	TSize alignLen = length(mat) / nseq;
+
+	//// Debug code
+	//for(TSize row = 0; row < nseq; ++row) {
+	//	for(TSize col = 0; col < alignLen; ++col) {
+	//		std::cout << mat[row * alignLen + col];
+	//	}
+	//	std::cout << std::endl;
+	//}
+
+	char gapChar = gapValue<char>();
+	TSize nseq1 = splitPos;
+	TSize nseq2 = nseq - nseq1;
+	TSize gapPos = ValueSize<TAlphabet>::VALUE;
+	typedef ProfileType<TAlphabet> TProfile;
+	typedef String<TProfile> TProfileString;
+	typedef typename Iterator<TProfileString, Standard>::Type TProfIter;
+	TProfileString prof1;
+	TProfileString prof2;
+	resize(prof1, alignLen, TProfile());
+	resize(prof2, alignLen, TProfile());
+	TMatIter itMat = begin(mat, Standard());
+	TMatIter itMatEnd = begin(mat, Standard());
+	itMatEnd += nseq1 * alignLen;
+	TProfIter itProf = begin(prof1, Standard());
+	for(TSize i = 0;itMat != itMatEnd;++itMat, ++itProf, ++i) {
+		if (i % alignLen == 0) itProf = begin(prof1, Standard());
+		if (*itMat == gapChar) ++(itProf->count[gapPos]);
+		else ++(itProf->count[ordValue((TAlphabet) *itMat)]);
+	}
+	itProf = begin(prof2, Standard());
+	itMatEnd = end(mat, Standard());
+	for(TSize i = 0;itMat != itMatEnd;++itMat, ++itProf, ++i) {
+		if (i % alignLen == 0) itProf = begin(prof2, Standard());
+		if (*itMat == gapChar) ++(itProf->count[gapPos]);
+		else ++(itProf->count[ordValue((TAlphabet) *itMat)]);
+	}
+
+
+	TProfileString alignProf1;
+	reserve(alignProf1, alignLen);
+	itProf = begin(prof1, Standard());
+	TProfIter itProfEnd = end(prof1, Standard());
+	typedef String<TSize> TDelGap;
+	typedef typename Iterator<TDelGap, Standard>::Type TDelGapIter;
+	TDelGap delGapCol;
+	for(TSize i = 0;itProf != itProfEnd;++itProf, ++i) {
+		if (itProf->count[gapPos] != nseq1) appendValue(alignProf1, *itProf);
+		else appendValue(delGapCol, i, Generous());
+	}
+	TDelGapIter itDelGap = begin(delGapCol, Standard());
+	TDelGapIter itDelGapEnd = end(delGapCol, Standard());
+	TAlignMat mat1;
+	TSize alignLen1 = alignLen - length(delGapCol);
+	resize(mat1, nseq1 * alignLen1);
+	itMat = begin(mat, Standard());
+	itMatEnd = begin(mat, Standard());
+	itMatEnd += nseq1 * alignLen;
+	TMatIter itMat1 = begin(mat1, Standard());
+	for(TSize col = 0;itMat != itMatEnd;++itMat, ++col) {
+		if (col % alignLen == 0) itDelGap = begin(delGapCol, Standard());
+		if ((itDelGap != itDelGapEnd) && (col % alignLen == *itDelGap)) {
+			++itDelGap;
+			continue;
+		}
+		*itMat1 = *itMat;
+		++itMat1;
+	}
+
+	//// Debug code
+	//for(TSize row = 0; row < nseq1; ++row) {
+	//	for(TSize col = 0; col < alignLen1; ++col) {
+	//		std::cout << mat1[row * alignLen1 + col];
+	//	}
+	//	std::cout << std::endl;
+	//}
+
+
+	TProfileString alignProf2;
+	reserve(alignProf2, alignLen);
+	itProf = begin(prof2, Standard());
+	itProfEnd = end(prof2, Standard());
+	clear(delGapCol);
+	for(TSize i = 0;itProf != itProfEnd;++itProf, ++i) {
+		if (itProf->count[gapPos] != nseq2) appendValue(alignProf2, *itProf);
+		else appendValue(delGapCol, i, Generous());
+	}
+	itDelGap = begin(delGapCol, Standard());
+	itDelGapEnd = end(delGapCol, Standard());
+	TAlignMat mat2;
+	TSize alignLen2 = alignLen - length(delGapCol);
+	resize(mat2, nseq2 * alignLen2);
+	itMatEnd = end(mat, Standard());
+	TMatIter itMat2 = begin(mat2, Standard());
+	for(TSize col = 0;itMat != itMatEnd;++itMat, ++col) {
+		if (col % alignLen == 0) itDelGap = begin(delGapCol, Standard());
+		if ((itDelGap != itDelGapEnd) && (col % alignLen == *itDelGap)) {
+			++itDelGap;
+			continue;
+		}
+		*itMat2 = *itMat;
+		++itMat2;
+	}
+
+	//// Debug code
+	//for(TSize row = 0; row < nseq2; ++row) {
+	//	for(TSize col = 0; col < alignLen2; ++col) {
+	//		std::cout << mat2[row * alignLen2 + col];
+	//	}
+	//	std::cout << std::endl;
+	//}
+
+
+	// ReAlign the consensus with the sequence
+	typedef StringSet<TProfileString, Dependent<> > TStringSet;
+	TStringSet pairSet;
+	appendValue(pairSet, alignProf1);
+	appendValue(pairSet, alignProf2);
+
+	typedef String<Fragment<> > TFragmentString;
+	TFragmentString matches;
+	globalAlignment(matches, pairSet, sc, Gotoh());
+	
+	typedef typename Iterator<TFragmentString, Standard>::Type TFragIter;
+	TFragIter fragIt = end(matches, Standard() );
+	TFragIter fragItEnd = begin(matches, Standard() );
+	typedef String<TSize> TInsertPattern;
+	typedef typename Iterator<TInsertPattern, Standard>::Type TInsertIter;
+	TInsertPattern insertPattern1;
+	TInsertPattern insertPattern2;
+	TSize begin1Pos = 0;
+	TSize begin2Pos = 0;
+	if (fragIt != fragItEnd) {
+		do {
+			--fragIt;
+			appendValue(insertPattern1, fragIt->begin2 - begin2Pos, Generous());
+			appendValue(insertPattern1, fragIt->begin1 - begin1Pos, Generous());
+			appendValue(insertPattern1, fragIt->len, Generous());
+			appendValue(insertPattern2, fragIt->begin2 - begin2Pos, Generous());
+			appendValue(insertPattern2, fragIt->begin1 - begin1Pos, Generous());
+			appendValue(insertPattern2, fragIt->len, Generous());
+			begin1Pos = fragIt->begin1 + fragIt->len;
+			begin2Pos = fragIt->begin2 + fragIt->len;
+		} while (fragIt != fragItEnd);
+	}
+	appendValue(insertPattern1, alignLen2 - begin2Pos, Generous());
+	appendValue(insertPattern1, alignLen1 - begin1Pos, Generous());
+	appendValue(insertPattern2, alignLen2 - begin2Pos, Generous());
+	appendValue(insertPattern2, alignLen1 - begin1Pos, Generous());
+	clear(matches);
+	
+	TInsertIter itInsert = begin(insertPattern1, Standard());
+	TInsertIter itInsertEnd = end(insertPattern1, Standard());
+	TSize totalAlignLen = 0;
+	for(;itInsert != itInsertEnd; ++itInsert) totalAlignLen += *itInsert;
+	itMat1 = begin(mat1, Standard());
+	TMatIter itMat1End = end(mat1, Standard());
+	clear(mat);
+	while(itMat1 != itMat1End) {
+		itInsert = begin(insertPattern1, Standard());
+		for(TSize i = 0; i < *itInsert; ++i) appendValue(mat, gapChar, Generous());
+		++itInsert;
+		for(TSize i = 0; i < *itInsert; ++i, ++itMat1) appendValue(mat, *itMat1, Generous());
+		++itInsert;
+		while(itInsert!=itInsertEnd) {
+			for(TSize i = 0; i < *itInsert; ++i, ++itMat1) appendValue(mat, *itMat1, Generous());
+			++itInsert;
+			for(TSize i = 0; i < *itInsert; ++i) appendValue(mat, gapChar, Generous());
+			++itInsert;
+			for(TSize i = 0; i < *itInsert; ++i, ++itMat1) appendValue(mat, *itMat1, Generous());
+			++itInsert;
+		}
+	}
+	
+	itInsertEnd = end(insertPattern2, Standard());
+	itMat2 = begin(mat2, Standard());
+	TMatIter itMat2End = end(mat2, Standard());
+	while(itMat2 != itMat2End) {
+		itInsert = begin(insertPattern2, Standard());
+		for(TSize i = 0; i < *itInsert; ++i, ++itMat2) appendValue(mat, *itMat2, Generous());
+		++itInsert;
+		for(TSize i = 0; i < *itInsert; ++i) appendValue(mat, gapChar, Generous());
+		++itInsert;
+		while(itInsert!=itInsertEnd) {
+			for(TSize i = 0; i < *itInsert; ++i, ++itMat2) appendValue(mat, *itMat2, Generous());
+			++itInsert;
+			for(TSize i = 0; i < *itInsert; ++i, ++itMat2) appendValue(mat, *itMat2, Generous());
+			++itInsert;
+			for(TSize i = 0; i < *itInsert; ++i) appendValue(mat, gapChar, Generous());
+			++itInsert;
+		}
+	}
+	
+	//// Debug code
+	//for(TSize row = 0; row < nseq; ++row) {
+	//	for(TSize col = 0; col < totalAlignLen; ++col) {
+	//		std::cout << mat[row * totalAlignLen + col];
+	//	}
+	//	std::cout << std::endl;
+	//}
+}
+
+
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TScore> 
+inline void
+msaRefinement(Graph<Alignment<TStringSet, TCargo, TSpec> >& gAlign,
+			  TScore& sc)
+{
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TStringSet>::Type TSequence;
+	typedef typename Value<TSequence>::Type TAlphabet;
+	TSize nseq = length(stringSet(gAlign));
+	String<char> mat;
+	convertAlignment(gAlign, mat);
+	for(TSize i = 1; i<nseq; ++i) _msaRefinement(mat, nseq, i, sc, TAlphabet());
+	convertAlignment(mat, gAlign);
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_msa/graph_msa_generated_forwards.h b/src/SeqAn-1.3/seqan/graph_msa/graph_msa_generated_forwards.h
new file mode 100644
index 0000000..61ed4f4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_msa/graph_msa_generated_forwards.h
@@ -0,0 +1,541 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_GRAPH_MSA_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_GRAPH_MSA_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// BlastLib_
+
+struct BlastLib_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(68)
+
+//____________________________________________________________________________
+// FractionalScore_
+
+struct FractionalScore_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(64)
+
+//____________________________________________________________________________
+// FrequencyCounting_
+
+struct FrequencyCounting_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(73)
+
+//____________________________________________________________________________
+// GlobalPairwiseLibrary_
+
+struct GlobalPairwiseLibrary_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(64)
+
+//____________________________________________________________________________
+// KmerDistance_
+
+struct KmerDistance_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_distance.h"(63)
+
+//____________________________________________________________________________
+// KmerLibrary_
+
+struct KmerLibrary_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(83)
+
+//____________________________________________________________________________
+// LcsLibrary_
+
+struct LcsLibrary_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(93)
+
+//____________________________________________________________________________
+// LessMsaEdgeCargo_
+
+template <typename TVertexDescriptor, typename TCargo> struct LessMsaEdgeCargo_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(279)
+
+//____________________________________________________________________________
+// LibraryDistance_
+
+struct LibraryDistance_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_distance.h"(54)
+
+//____________________________________________________________________________
+// LocalPairwiseLibrary_
+
+struct LocalPairwiseLibrary_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(74)
+
+//____________________________________________________________________________
+// MsaEdgeCargo_
+
+template <typename TVertexDescriptor, typename TCargo> struct MsaEdgeCargo_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(261)
+
+//____________________________________________________________________________
+// MsaOptions
+
+template <typename TAlphabet, typename TScore> struct MsaOptions;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_msa.h"(40)
+
+//____________________________________________________________________________
+// MummerLib_
+
+struct MummerLib_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(79)
+
+//____________________________________________________________________________
+// NewickFormat_
+
+struct NewickFormat_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(91)
+
+//____________________________________________________________________________
+// ProfileProfileScore
+
+template <typename T> struct ProfileProfileScore;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(84)
+
+//____________________________________________________________________________
+// ReScore_
+
+struct ReScore_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(81)
+
+//____________________________________________________________________________
+// TCoffeeLib_
+
+struct TCoffeeLib_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(57)
+
+//____________________________________________________________________________
+// UpgmaAvg_
+
+struct UpgmaAvg_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(314)
+
+//____________________________________________________________________________
+// UpgmaMax_
+
+struct UpgmaMax_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(303)
+
+//____________________________________________________________________________
+// UpgmaMin_
+
+struct UpgmaMin_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(292)
+
+//____________________________________________________________________________
+// UpgmaWeightAvg_
+
+struct UpgmaWeightAvg_;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(325)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// BlastLib
+
+typedef Tag<BlastLib_> const BlastLib;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(69)
+
+//____________________________________________________________________________
+// FractionalScore
+
+typedef Tag<FractionalScore_> const FractionalScore;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(65)
+
+//____________________________________________________________________________
+// FrequencyCounting
+
+typedef Tag<FrequencyCounting_> const FrequencyCounting;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(74)
+
+//____________________________________________________________________________
+// GlobalPairwiseLibrary
+
+typedef Tag<GlobalPairwiseLibrary_> const GlobalPairwiseLibrary;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(65)
+
+//____________________________________________________________________________
+// KmerDistance
+
+typedef Tag<KmerDistance_> const KmerDistance;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_distance.h"(64)
+
+//____________________________________________________________________________
+// KmerLibrary
+
+typedef Tag<KmerLibrary_> const KmerLibrary;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(84)
+
+//____________________________________________________________________________
+// LcsLibrary
+
+typedef Tag<LcsLibrary_> const LcsLibrary;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(94)
+
+//____________________________________________________________________________
+// LibraryDistance
+
+typedef Tag<LibraryDistance_> const LibraryDistance;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_distance.h"(55)
+
+//____________________________________________________________________________
+// LocalPairwiseLibrary
+
+typedef Tag<LocalPairwiseLibrary_> const LocalPairwiseLibrary;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(75)
+
+//____________________________________________________________________________
+// MummerLib
+
+typedef Tag<MummerLib_> const MummerLib;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(80)
+
+//____________________________________________________________________________
+// NewickFormat
+
+typedef Tag<NewickFormat_> const NewickFormat;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(92)
+
+//____________________________________________________________________________
+// ReScore
+
+typedef Tag<ReScore_> const ReScore;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(82)
+
+//____________________________________________________________________________
+// TCoffeeLib
+
+typedef Tag<TCoffeeLib_> const TCoffeeLib;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(58)
+
+//____________________________________________________________________________
+// UpgmaAvg
+
+typedef Tag<UpgmaAvg_> const UpgmaAvg;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(315)
+
+//____________________________________________________________________________
+// UpgmaMax
+
+typedef Tag<UpgmaMax_> const UpgmaMax;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(304)
+
+//____________________________________________________________________________
+// UpgmaMin
+
+typedef Tag<UpgmaMin_> const UpgmaMin;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(293)
+
+//____________________________________________________________________________
+// UpgmaWeightAvg
+
+typedef Tag<UpgmaWeightAvg_> const UpgmaWeightAvg;       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(326)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _appendFragment
+
+template <typename TSizeSpec, typename TSpec1, typename TSpec2, typename TSize> inline void _appendFragment(String<Fragment<TSizeSpec, ExactReversableFragment<TSpec1> >, TSpec2>& matches, TSize seq1Id, TSize beg1, TSize seq2Id, TSize beg2, TSize len, bool reversed);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(525)
+template <typename TSizeSpec, typename TSpec1, typename TSpec2, typename TSize> inline void _appendFragment(String<Fragment<TSizeSpec, ExactFragment<TSpec1> >, TSpec2>& matches, TSize seq1Id, TSize beg1, TSize seq2Id, TSize beg2, TSize len, bool reversed);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(542)
+
+//____________________________________________________________________________
+// _appendNewMatch
+
+template <typename TPos, typename TSpec2, typename TSpec1, typename TScores, typename TId, typename TSize> inline void _appendNewMatch(String<Fragment<TPos, ExactReversableFragment<TSpec2> >, TSpec1>& matches, TScores& scores, TId seq1Id, TId seq2Id, TSize beg1, TSize beg2, TSize len, bool);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(725)
+template <typename TPos, typename TSpec2, typename TSpec1, typename TScores, typename TId, typename TSize> inline void _appendNewMatch(String<Fragment<TPos, ExactFragment<TSpec2> >, TSpec1>& matches, TScores& scores, TId seq1Id, TId seq2Id, TSize beg1, TSize beg2, TSize len, bool reversed);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(743)
+
+//____________________________________________________________________________
+// _appendSegmentMatches
+
+template <typename TStrSpec, typename TSpec, typename TList, typename TScore, typename TSegmentMatches, typename TScores> inline void _appendSegmentMatches(StringSet<String<AminoAcid, TStrSpec>, Dependent<TSpec> > const& str, TList const& pList, TScore const&, TSegmentMatches& matches, TScores& scores);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_msa.h"(183)
+template <typename TValue, typename TStrSpec, typename TSpec, typename TList, typename TScore, typename TSegmentMatches, typename TScores> inline void _appendSegmentMatches(StringSet<String<TValue, TStrSpec>, Dependent<TSpec> > const& str, TList const& pList, TScore const& score_type, TSegmentMatches& matches, TScores& scores);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_msa.h"(197)
+
+//____________________________________________________________________________
+// _buildLeafString
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TPosition, typename TSequence> inline void _buildLeafString(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TPosition const pos, TSequence& alignSeq);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_progressive.h"(50)
+
+//____________________________________________________________________________
+// _buildNewickString
+
+template <typename TCargo, typename TSpec, typename TNames, typename TNewickString, typename TVertexDescriptor> void _buildNewickString(Graph<Tree<TCargo, TSpec> >& guideTree, TNames& names, TNewickString& str, TVertexDescriptor v, bool collapseRoot);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(942)
+
+//____________________________________________________________________________
+// _collectSegmentMatches
+
+template <typename TValue, typename TSpec2, typename TFragment, typename TSpec, typename TScores, typename TSize> void _collectSegmentMatches(String<TValue, TSpec2> const& mat, String<TFragment, TSpec>& matches, TScores& scores, TSize nseq);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(395)
+
+//____________________________________________________________________________
+// _createAlignmentGraph
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSegmentString, typename TOutGraph> inline void _createAlignmentGraph(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TSegmentString& alignSeq, TOutGraph& gOut);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_progressive.h"(84)
+
+//____________________________________________________________________________
+// _createMatchingGraph
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSegmentString, typename TEdgeMap, typename TOutGraph> inline void _createMatchingGraph(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TSegmentString& alignSeq, TEdgeMap& edgeMap, TOutGraph& gOut, TEdgeMap& edgeMapOut);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_progressive.h"(202)
+
+//____________________________________________________________________________
+// _debugMatches
+
+template <typename TStringSet, typename TMatches> void _debugMatches(TStringSet& str, TMatches& matches);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_msa.h"(416)
+
+//____________________________________________________________________________
+// _debugRefinedMatches
+
+template <typename TGraph> void _debugRefinedMatches(TGraph& g);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_msa.h"(453)
+
+//____________________________________________________________________________
+// _getTupelString
+
+template <typename TString, typename TTupelString, typename TKTup, typename TAlphabet> inline void _getTupelString(TString const& str, TTupelString& tupelString, TKTup const ktup, TAlphabet);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_kmer.h"(51)
+
+//____________________________________________________________________________
+// _matchScore
+
+template <typename TScore, typename TSc> inline void _matchScore(TScore&, TSc);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(45)
+template <typename TValue, typename TSc> inline void _matchScore(Score<TValue, Simple>& sc, TSc msc);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(65)
+
+//____________________________________________________________________________
+// _mismatchScore
+
+template <typename TScore, typename TSc> inline void _mismatchScore(TScore&, TSc);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(55)
+template <typename TValue, typename TSc> inline void _mismatchScore(Score<TValue, Simple>& sc, TSc mmsc);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(75)
+
+//____________________________________________________________________________
+// _msaRefinement
+
+template <typename TValue, typename TSpec, typename TSize, typename TAlphabet, typename TScore> inline void _msaRefinement(String<TValue, TSpec>& mat, TSize nseq, TSize splitPos, TScore& sc, TAlphabet);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(286)
+
+//____________________________________________________________________________
+// _recursiveProgressiveMatching
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TGuideTree, typename TVertexDescriptor, typename TSequence> inline void _recursiveProgressiveMatching(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TGuideTree& tree, TVertexDescriptor const root, TSequence& alignSeq);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_progressive.h"(429)
+
+//____________________________________________________________________________
+// _resizeWithRespectToDistance
+
+template <typename TValue, typename TSpec, typename TSize> inline void _resizeWithRespectToDistance(String<TValue, TSpec>& dist, TSize nseq);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(375)
+template <typename TCargo, typename TSpec, typename TSize> inline void _resizeWithRespectToDistance(Graph<Undirected<TCargo, TSpec> >& dist, TSize nseq);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(385)
+template <typename TSize> inline void _resizeWithRespectToDistance(Nothing&, TSize);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(397)
+
+//____________________________________________________________________________
+// _scoreMatches
+
+template <typename TString, typename TSpec, typename TScoreType, typename TSize, typename TSpec2, typename TScoreString, typename TScoreValue> inline void _scoreMatches(StringSet<TString, TSpec> const& seqSet, TScoreType const& scType, String<Fragment<TSize, ExactFragment<> >, TSpec2> const& matches, TScoreString& scores, TScoreValue offset);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(187)
+template <typename TString, typename TSpec, typename TScoreType, typename TFragment, typename TSpec2, typename TScoreString> inline void _scoreMatches(StringSet<TString, TSpec> const& seqSet, TScoreType const& scType, String<TFragment, TSpec2> const& matches, TScoreString& scores);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(226)
+
+//____________________________________________________________________________
+// _setDistanceValue
+
+template <typename TFragment, typename TSpec1, typename TString, typename TSpec2, typename TValue, typename TSpec, typename TSize> inline void _setDistanceValue(String<TFragment, TSpec1>& matches, StringSet<TString, TSpec2>& pairSet, String<TValue, TSpec>& dist, TSize i, TSize j, TSize nseq, TSize from);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(412)
+template <typename TFragment, typename TSpec1, typename TString, typename TSpec2, typename TCargo, typename TSpec, typename TSize> inline void _setDistanceValue(String<TFragment, TSpec1>& matches, StringSet<TString, TSpec2>& pairSet, Graph<Undirected<TCargo, TSpec> >& dist, TSize i, TSize j, TSize, TSize from);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(441)
+template <typename TFragment, typename TSpec, typename TString, typename TSpec2, typename TSize> inline void _setDistanceValue(String<TFragment, TSpec>&, StringSet<TString, TSpec2>&, Nothing&, TSize, TSize, TSize, TSize);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(468)
+
+//____________________________________________________________________________
+// _subTreeSearch
+
+template <typename TGuideTree, typename TSeqGroups, typename TGroupRoot, typename TSize> inline void _subTreeSearch(TGuideTree& guideTree, TSeqGroups& seqGroups, TGroupRoot& groupRoot, TSize minMembers);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(370)
+
+//____________________________________________________________________________
+// _upgmaTreeMerge
+
+template <typename TMatrix, typename TActive, typename TSize> inline void _upgmaTreeMerge(TMatrix& mat, TActive& active, TSize index_i, TSize index_j, TSize nseq, UpgmaWeightAvg);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(340)
+template <typename TMatrix, typename TActive, typename TSize> inline void _upgmaTreeMerge(TMatrix& mat, TActive& active, TSize index_i, TSize index_j, TSize nseq, UpgmaAvg);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(370)
+template <typename TMatrix, typename TActive, typename TSize> inline void _upgmaTreeMerge(TMatrix& mat, TActive& active, TSize index_i, TSize index_j, TSize nseq, UpgmaMin);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(396)
+template <typename TMatrix, typename TActive, typename TSize> inline void _upgmaTreeMerge(TMatrix& mat, TActive& active, TSize index_i, TSize index_j, TSize nseq, UpgmaMax);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(421)
+template <typename TCargo, typename TSpec, typename TActive, typename TEdgeDescriptor> inline void _upgmaTreeMerge(Graph<Undirected<TCargo, TSpec> >& pairGraph, TActive const&, TEdgeDescriptor best, UpgmaMax);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(444)
+template <typename TCargo, typename TSpec, typename TActive, typename TEdgeDescriptor> inline void _upgmaTreeMerge(Graph<Undirected<TCargo, TSpec> >& pairGraph, TActive const&, TEdgeDescriptor best, UpgmaMin);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(478)
+template <typename TCargo, typename TSpec, typename TActive, typename TEdgeDescriptor> inline void _upgmaTreeMerge(Graph<Undirected<TCargo, TSpec> >& pairGraph, TActive const& active, TEdgeDescriptor best, UpgmaWeightAvg);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(511)
+template <typename TCargo, typename TSpec, typename TActive, typename TEdgeDescriptor> inline void _upgmaTreeMerge(Graph<Undirected<TCargo, TSpec> >& pairGraph, TActive const&, TEdgeDescriptor best, UpgmaAvg);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(547)
+
+//____________________________________________________________________________
+// alignmentEvaluation
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScore, typename TSize> inline typename Value<TScore>::Type alignmentEvaluation(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TScore const& score_type, TSize& gapExCount, TSize& gapCount, TSize& pairCount, String<TSize>& numPairs, TSize& len);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(881)
+
+//____________________________________________________________________________
+// appendSegmentMatches
+
+template <typename TString, typename TSpec, typename TSize2, typename TSpec2, typename TSegmentMatches, typename TScores> inline void appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str, String<TSize2, TSpec2> const& pList, TSegmentMatches& matches, TScores& scores, LcsLibrary);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(209)
+template <typename TString, typename TSpec, typename TSegmentMatches, typename TScores, typename TAlphabet, typename TSize> inline void appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str, TSegmentMatches& matches, TScores& scores, TSize ktup, TAlphabet, KmerLibrary);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(258)
+template <typename TString, typename TSpec, typename TSegmentMatches, typename TScores, typename TSize> inline void appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str, TSegmentMatches& matches, TScores& scores, TSize ktup, KmerLibrary);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(317)
+template <typename TString, typename TSpec, typename TSegmentMatches, typename TScores> inline void appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str, TSegmentMatches& matches, TScores& scores, KmerLibrary);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(330)
+template <typename TString, typename TSpec, typename TSize2, typename TSpec2, typename TScore, typename TSegmentMatches, typename TScores> inline void appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str, String<TSize2, TSpec2> const& pList, TScore const& score_type, TSegmentMatches& matches, TScores& scores, LocalPairwiseLibrary);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(346)
+template <typename TString, typename TSpec, typename TSize2, typename TSpec2, typename TScore, typename TSegmentMatches, typename TScoreValues, typename TDistance, typename TAlignConfig> inline void appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str, String<TSize2, TSpec2> const& pList, TScore const& score_type, TSegmentMatches& matches, TScoreValues& scores, TDistance& dist, TAlignConfig const& ac, GlobalPairwiseLibrary);       	// "projects/library/seqan/graph_msa/gr [...]
+template <typename TString, typename TSpec, typename TSize2, typename TSpec2, typename TScore, typename TSegmentMatches, typename TScoreValues, typename TDistance> inline void appendSegmentMatches(StringSet<TString, Dependent<TSpec> > const& str, String<TSize2, TSpec2> const& pList, TScore const& score_type, TSegmentMatches& matches, TScoreValues& scores, TDistance& dist, GlobalPairwiseLibrary);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(537)
+
+//____________________________________________________________________________
+// buildAlignmentGraph
+
+template <typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TStringSet, typename TCargo, typename TSpec> inline void buildAlignmentGraph(String<TFragment, TSpec1>& matches, String<TScoreValue, TSpec2>& scores, Graph<Alignment<TStringSet, TCargo, TSpec> >& outGraph, FractionalScore);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(98)
+template <typename TFragment, typename TSpec1, typename TStringSet, typename TCargo, typename TSpec> inline void buildAlignmentGraph(String<TFragment, TSpec1>& matches, Graph<Alignment<TStringSet, TCargo, TSpec> >& outGraph, FrequencyCounting);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(152)
+template <typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TStringSet, typename TCargo, typename TSpec> inline void buildAlignmentGraph(String<TFragment, TSpec1>& matches, String<TScoreValue, TSpec2>&, Graph<Alignment<TStringSet, TCargo, TSpec> >& outGraph, FrequencyCounting);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(174)
+template <typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TStringSet, typename TCargo, typename TSpec, typename TScore> inline void buildAlignmentGraph(String<TFragment, TSpec1>& matches, String<TScoreValue, TSpec2>& scores, Graph<Alignment<TStringSet, TCargo, TSpec> >& outGraph, TScore const& scType, ReScore);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(241)
+
+//____________________________________________________________________________
+// convertAlignment
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSource, typename TSpec2> inline bool convertAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> > const& gAlign, Align<TSource, TSpec2>& align);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(952)
+template <typename TSource, typename TSpec2, typename TStringSet, typename TCargo, typename TSpec> inline bool convertAlignment(Align<TSource, TSpec2> const& align, Graph<Alignment<TStringSet, TCargo, TSpec> >& gAlign);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(1002)
+
+//____________________________________________________________________________
+// evaluateAlignment
+
+template <typename TAlphabet, typename TScore> inline void evaluateAlignment(MsaOptions<TAlphabet, TScore> const& msaOpt);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_msa.h"(86)
+
+//____________________________________________________________________________
+// getAlignmentStatistics
+
+template <typename TFragment, typename TSpec1, typename TStringSet, typename TPos, typename TSize1> inline void getAlignmentStatistics(String<TFragment, TSpec1> const& matches, TStringSet& str, TPos const from, TPos const to, TSize1& matchLength, TSize1& overlapLength, TSize1& alignLength);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(144)
+
+//____________________________________________________________________________
+// getDistanceMatrix
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TMatrix> inline void getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TMatrix& distanceMatrix, LibraryDistance);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_distance.h"(82)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TMatrix, typename TSize, typename TAlphabet> inline void getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TMatrix& distanceMatrix, TSize ktup, TAlphabet, KmerDistance);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_distance.h"(144)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TMatrix, typename TSize> inline void getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TMatrix& distanceMatrix, TSize ktup, KmerDistance);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_distance.h"(166)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TMatrix> inline void getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TMatrix& distanceMatrix, KmerDistance);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_distance.h"(178)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TMatrix> inline void getDistanceMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TMatrix& distanceMatrix);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_distance.h"(213)
+
+//____________________________________________________________________________
+// getKmerSimilarityMatrix
+
+template <typename TString, typename TSpec, typename THitMatrix, typename TSize, typename TAlphabet> inline void getKmerSimilarityMatrix(StringSet<TString, TSpec> const& strSet, THitMatrix& mat, TSize ktup, TAlphabet);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_kmer.h"(93)
+
+//____________________________________________________________________________
+// globalMsaAlignment
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TStringSet1, typename TNames, typename TAlphabet, typename TScore> inline void globalMsaAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& gAlign, TStringSet1& sequenceSet, TNames& sequenceNames, MsaOptions<TAlphabet, TScore> const& msaOpt);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_msa.h"(222)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScore> inline void globalMsaAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& gAlign, TScore const& scoreObject);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_msa.h"(377)
+template <typename TSource, typename TSpec, typename TScore> inline void globalMsaAlignment(Align<TSource, TSpec>& align, TScore const& scoreObject);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_msa.h"(397)
+
+//____________________________________________________________________________
+// graphBasedTripletLibraryExtension
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline void graphBasedTripletLibraryExtension(Graph<Alignment<TStringSet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(599)
+
+//____________________________________________________________________________
+// heaviestMatching
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TString, typename TOutString> inline TCargo heaviestMatching(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TString const& str1, TString const& str2, TOutString& align);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_progressive.h"(245)
+
+//____________________________________________________________________________
+// msaRefinement
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScore> inline void msaRefinement(Graph<Alignment<TStringSet, TCargo, TSpec> >& gAlign, TScore& sc);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(501)
+
+//____________________________________________________________________________
+// njTree
+
+template <typename TValue, typename TStringSpec, typename TCargo, typename TSpec> inline void njTree(String<TValue, TStringSpec>& mat, Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(72)
+
+//____________________________________________________________________________
+// progressiveAlignment
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TGuideTree, typename TOutGraph> inline void progressiveAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TGuideTree& tree, TOutGraph& gOut);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_progressive.h"(136)
+
+//____________________________________________________________________________
+// progressiveMatching
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TGuideTree, typename TEdgeMap, typename TOutGraph> inline void progressiveMatching(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TGuideTree& tree, TEdgeMap& edgeMap, TOutGraph& gOut, TEdgeMap& edgeMapOut);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_progressive.h"(471)
+
+//____________________________________________________________________________
+// read
+
+template <typename TFile, typename TFragment, typename TSpec, typename TScoreValue, typename TSpec2, typename TNames> void read(TFile & file, String<TFragment, TSpec>& matches, String<TScoreValue, TSpec2>& scores, TNames const& names, TCoffeeLib);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(113)
+template <typename TFile, typename TString, typename TSpec, typename TNames> void read(TFile & file, StringSet<TString, TSpec>& oriStr, TNames& names, TCoffeeLib);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(235)
+template <typename TFile, typename TString, typename TSpec, typename TNames> void read(TFile & file, StringSet<TString, TSpec>& oriStr, TNames& names, FastaAlign);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(355)
+template <typename TFile, typename TFragment, typename TSpec, typename TScoreValue, typename TSpec2, typename TNames> void read(TFile & file, String<TFragment, TSpec>& matches, String<TScoreValue, TSpec2>& scores, TNames const& origNames, FastaAlign);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(459)
+template <typename TFile, typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TNames> inline void read(TFile & file, String<TFragment, TSpec1>& matches, String<TScoreValue, TSpec2>& scores, TNames& names, BlastLib);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(557)
+template <typename TFile, typename TFragment, typename TSpec1, typename TScoreValue, typename TSpec2, typename TStringSet, typename TNames> inline void read(TFile & file, String<TFragment, TSpec1>& matches, String<TScoreValue, TSpec2>& scores, TStringSet const& strSet, TNames const& names, MummerLib);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(761)
+template <typename TFile, typename TCargo, typename TSpec, typename TNames> void read(TFile & file, Graph<Tree<TCargo, TSpec> >& guideTree, TNames& names, NewickFormat);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(826)
+
+//____________________________________________________________________________
+// score
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue score(Score<TValue, ProfileProfileScore<TScoreMember> > const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &seq1, TSeq2 const &seq2);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(242)
+
+//____________________________________________________________________________
+// scoreGapExtendHorizontal
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendHorizontal( Score<TValue, ProfileProfileScore<TScoreMember> > const & me, TPos1 pos1, TPos2, TSeq1 const& seq1, TSeq2 const&);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(135)
+
+//____________________________________________________________________________
+// scoreGapExtendVertical
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendVertical( Score<TValue, ProfileProfileScore<TScoreMember> > const & me, TPos1, TPos2 pos2, TSeq1 const &, TSeq2 const & seq2);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(189)
+
+//____________________________________________________________________________
+// scoreGapOpenHorizontal
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenHorizontal( Score<TValue, ProfileProfileScore<TScoreMember> > const & me, TPos1 pos1, TPos2, TSeq1 const & seq1, TSeq2 const &);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(161)
+
+//____________________________________________________________________________
+// scoreGapOpenVertical
+
+template <typename TValue, typename TScoreMember, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenVertical( Score<TValue, ProfileProfileScore<TScoreMember> > const & me, TPos1, TPos2 pos2, TSeq1 const &, TSeq2 const & seq2);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_refinement.h"(215)
+
+//____________________________________________________________________________
+// selectPairs
+
+template <typename TString, typename TSpec, typename TSize2, typename TSpec2> inline void selectPairs(StringSet<TString, TSpec> const& str, String<TSize2, TSpec2>& pList);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_library.h"(111)
+
+//____________________________________________________________________________
+// sumOfPairsScore
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScore> inline typename Value<TScore>::Type sumOfPairsScore(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TScore const& score_type);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(762)
+
+//____________________________________________________________________________
+// sumOfPairsScoreInd
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TScore> inline typename Value<TScore>::Type sumOfPairsScoreInd(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TScore const& score_type);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(818)
+
+//____________________________________________________________________________
+// tripletLibraryExtension
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline void tripletLibraryExtension(Graph<Alignment<TStringSet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(307)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TGuideTree, typename TSize> inline void tripletLibraryExtension(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TGuideTree& guideTree, TSize minMembers);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_base.h"(505)
+
+//____________________________________________________________________________
+// upgmaTree
+
+template <typename TStringValue, typename TStringSpec, typename TCargo, typename TSpec, typename TTag> inline void upgmaTree(String<TStringValue, TStringSpec>& mat, Graph<Tree<TCargo, TSpec> >& g, TTag);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(582)
+template <typename TValue, typename TSpec1, typename TCargo, typename TSpec2, typename TTag> inline void upgmaTree(Graph<Undirected<TValue, TSpec1> >& pairGraph, Graph<Tree<TCargo, TSpec2> >& g, TTag);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(698)
+template <typename TDistance, typename TCargo, typename TSpec> inline void upgmaTree(TDistance& dist, Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_guidetree.h"(874)
+
+//____________________________________________________________________________
+// write
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TNames> void write(TFile & file, Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TNames& names, TCoffeeLib);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(271)
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TNames, typename TEdgeMap> void write(TFile & file, Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TNames& names, TEdgeMap& edgeMap, BlastLib);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(632)
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TNames> void write(TFile & file, Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TNames& names, BlastLib);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(699)
+template <typename TFile, typename TCargo, typename TSpec, typename TNames> void write(TFile & file, Graph<Tree<TCargo, TSpec> >& guideTree, TNames& names, bool collapseRoot, NewickFormat);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(1016)
+template <typename TFile, typename TCargo, typename TSpec, typename TNames> void write(TFile & file, Graph<Tree<TCargo, TSpec> >& guideTree, TNames& names, NewickFormat);       	// "projects/library/seqan/graph_msa/graph_align_tcoffee_io.h"(1036)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/graph_types.h b/src/SeqAn-1.3/seqan/graph_types.h
new file mode 100644
index 0000000..1541155
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types.h
@@ -0,0 +1,89 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_TYPES_H
+#define SEQAN_HEADER_GRAPH_TYPES_H
+
+// External / STL
+#include <deque>
+
+
+// Seqan
+#include <seqan/basic.h>
+#include <seqan/sequence.h>
+#include <seqan/file.h>
+
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/graph_types/graph_types_generated_forwards.h>
+#endif
+
+
+// Basic graph stuff
+#include <seqan/graph_types/graph_base.h>
+#include <seqan/graph_types/graph_idmanager.h>	// Id manager
+#include <seqan/graph_types/graph_edgestump.h>	// EdgeStumps
+#include <seqan/graph_types/graph_interface.h>	// Graph metafunctions
+
+// Graph types
+#include <seqan/graph_types/graph_impl_directed.h>		// Directed Graph
+#include <seqan/graph_types/graph_impl_undirected.h>	// Undirected graph
+#include <seqan/graph_types/graph_impl_automaton.h>		// Automaton
+#include <seqan/graph_types/graph_impl_wordgraph.h>		// Specialized automaton: Word graph
+#include <seqan/graph_types/graph_impl_tree.h>			// Tree
+#include <seqan/graph_types/graph_impl_fragment.h>		// Fragment
+#include <seqan/graph_types/graph_impl_hmm.h>			// HMM
+
+// Graph iterators
+#include <seqan/graph_types/graph_iterator.h>
+#include <seqan/graph_types/graph_iterator_vertex.h>
+#include <seqan/graph_types/graph_iterator_outedge.h>
+#include <seqan/graph_types/graph_iterator_adjacency.h>
+#include <seqan/graph_types/graph_iterator_edge.h>
+
+// Graph property maps
+#include <seqan/graph_types/graph_property.h>
+
+// Specializations
+#include <seqan/graph_types/graph_impl_oracle.h>	// Oracle
+#include <seqan/graph_types/graph_impl_trie.h>		// Trie
+
+// Specialized iterators
+#include <seqan/graph_types/graph_iterator_bfs.h>
+#include <seqan/graph_types/graph_iterator_dfs.h>
+
+// Graph drawing and some file parsing
+#include <seqan/graph_types/graph_drawing.h>
+#include <seqan/misc/misc_parsing.h>
+#include <seqan/graph_types/graph_utility_parsing.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_base.h b/src/SeqAn-1.3/seqan/graph_types/graph_base.h
new file mode 100644
index 0000000..1cfbcdd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_base.h
@@ -0,0 +1,285 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_BASE_H
+#define SEQAN_HEADER_GRAPH_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// General Graph Metafunction
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.EdgeDescriptor:
+..summary:Type of an object that represents an edge descriptor.
+..signature:EdgeDescriptor<T>::Type
+..param.T:Type T must be a graph. All graphs use a pointer to an edge stump as an edge descriptor.
+..returns.param.Type:EdgeDescriptor type.
+..remarks.text:The edge descriptor is a unique handle to a given edge in a graph.
+It is used in various graph functions, e.g., to remove edges, to assign a cargo to an edge or to get the endpoints of an edge.
+It is also used to attach properties to edges.
+..example.code:EdgeDescriptor<Graph<> >::Type eD; //eD is an edge descriptor
+..include:seqan/graph_types.h
+*/
+template<typename T>
+struct EdgeDescriptor;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Cargo
+..example.code:Cargo<Graph<Directed<int> > >::Type c; //c has type int
+..include:seqan/graph_types.h
+*/
+template<typename T>
+struct Cargo;
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.EdgeType:
+..summary:Edge type of a graph object.
+..signature:EdgeType<T>::Type
+..param.T:Type T must be a graph.
+..returns.param.Type:Edge type.
+..remarks.text:The specific edge stump type that is used in a graph.
+..example.code:EdgeType<TGraph>::Type e; //e is an edge in TGraph
+..include:seqan/graph_types.h
+*/
+template<typename T>
+struct EdgeType;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Alphabet:
+..summary:Access to the Alphabet type.
+..signature:Alphabet<T>::Type
+..param.T:Type T must be a type that uses some kind of alphabet internally.
+..returns.param.Type:Alphabet type.
+..remarks.text:Type T can be for example an automaton where the alphabet type describes the domain of the transition labels.
+..example.code:Alphabet<Graph<Automaton<Dna> > >::Type alph; //alph is of type Dna
+..include:seqan/graph_types.h
+*/
+template<typename T>
+struct Alphabet;
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.EdgeIdHandler:
+..summary:Type of an object that represents an Id Manager.
+..signature:EdgeIdHandler<T>::Type
+..param.T:A graph.
+...type:Class.Graph
+..returns.param.Type:IdManager type.
+..remarks.text:The exact IdManager type depends on the edge stump.
+If the edge stump is id-free the IdManager simply counts edge ids, 
+otherwise it manages a list of free and used ids.
+..include:seqan/graph_types.h
+*/
+template<typename T>
+struct EdgeIdHandler;
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.VertexIdHandler:
+..summary:Type of an object that represents an Id Manager.
+..signature:VertexIdHandler<T>::Type
+..param.T:A graph.
+..returns.param.Type:IdManager type.
+..include:seqan/graph_types.h
+*/
+template<typename T>
+struct VertexIdHandler;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// General Graph Tags
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct WithoutEdgeId_;
+typedef Tag<WithoutEdgeId_> const WithoutEdgeId;
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct TreeTag_;
+typedef Tag<TreeTag_> const TreeTag;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph Iterator Tags
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Graph Iterator:
+..summary:A specification of the iterator to traverse a graph.
+..include:seqan/graph_types.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Graph Iterator.value.VertexIterator:
+	Traverses all vertices of a graph.
+..include:seqan/graph_types.h
+*/
+struct VertexIterator_;
+typedef Tag<VertexIterator_> const VertexIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Graph Iterator.value.EdgeIterator:
+	Traverses all edges of a graph.
+..include:seqan/graph_types.h
+*/
+struct EdgeIterator_;
+typedef Tag<EdgeIterator_> const EdgeIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Graph Iterator.value.OutEdgeIterator:
+	Traverses all edges of a graph given a vertex.
+..include:seqan/graph_types.h
+*/
+struct OutEdgeIterator_;
+typedef Tag<OutEdgeIterator_> const OutEdgeIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Graph Iterator.value.AdjacencyIterator:
+	Traverses all neighbors of a graph given a vertex.
+..include:seqan/graph_types.h
+*/
+struct AdjacencyIterator_;
+typedef Tag<AdjacencyIterator_> const AdjacencyIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Graph Iterator.value.BfsIterator:
+	Traverses all vertices of a graph in Bfs order.
+..include:seqan/graph_types.h
+*/
+struct BfsIterator_;
+typedef Tag<BfsIterator_> const BfsIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Tag.Graph Iterator.value.DfsPreorder:
+	Traverses all vertices of a graph in Dfs order.
+..include:seqan/graph_types.h
+*/
+struct DfsPreorder_;
+typedef Tag<DfsPreorder_> const DfsPreorder;
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Default edge stump
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo = void, bool TList = true, bool TSource = false, bool TId = true, typename TSpec = Default>
+class EdgeStump;
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.VertexDescriptor.param.T.type:Class.EdgeStump
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+struct VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> > 
+{
+	typedef typename Id<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+struct VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> const> 
+{
+	typedef typename Id<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type Type;
+};
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Default Id Manager
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TIdType = unsigned int, typename TSpec = Default>
+class IdManager;
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.EdgeIdHandler.param.T.type:Class.EdgeStump
+
+template<typename TCargo, bool TList, bool TSource, typename TSpec>
+struct EdgeIdHandler<EdgeStump<TCargo, TList, TSource, false, TSpec> > {
+	typedef IdManager<void> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, typename TSpec>
+struct EdgeIdHandler<EdgeStump<TCargo, TList, TSource, true, TSpec> > {
+	typedef IdManager<typename Id<EdgeStump<TCargo, TList, TSource, true, TSpec> >::Type> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T>
+struct VertexIdHandler {
+	typedef IdManager<> Type;
+};
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_drawing.h b/src/SeqAn-1.3/seqan/graph_types/graph_drawing.h
new file mode 100644
index 0000000..1527c81
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_drawing.h
@@ -0,0 +1,937 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_DRAWING_H
+#define SEQAN_HEADER_GRAPH_DRAWING_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Drawing
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// WRITING
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TAttributes>
+inline void 
+_markRootVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+				TVertexDescriptor const& v,
+				TAttributes& str)
+{
+	SEQAN_CHECKPOINT
+	if (isRoot(g,v)) {
+		append(str, ", shape = doublecircle");
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TAttributes>
+inline void 
+_markRootVertex(Graph<Directed<TCargo, TSpec> > const&,
+				TVertexDescriptor const&,
+				TAttributes&)
+{
+	SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TAttributes>
+inline void 
+_markRootVertex(Graph<Undirected<TCargo, TSpec> > const&,
+				TVertexDescriptor const&,
+				TAttributes&)
+{
+	SEQAN_CHECKPOINT
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TAttributes>
+inline void 
+_markRootVertex(Graph<Tree<TCargo, TSpec> > const& g,
+				TVertexDescriptor const& v,
+				TAttributes& str)
+{
+	SEQAN_CHECKPOINT
+	if (isRoot(g,v)) {
+		append(str, ", shape = doublecircle");
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TPosition, typename TNodeMap>
+inline void
+_createTrieNodeAttributes(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+						  String<String<TPosition> > pos,
+						  TNodeMap& nodeMap)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	resizeVertexMap(g, nodeMap);
+	typedef typename Iterator<TGraph, VertexIterator>::Type TConstIter;
+	TConstIter it(g);
+	for(;!atEnd(it);++it) {
+		String<char> tmp;
+		std::stringstream s;
+		s << *it;
+		String<TPosition> endPositions = getProperty(pos,*it);
+		if (!empty(endPositions)) {
+			s <<  " {";
+			append(tmp, "shape = box, ");
+			typename Iterator<String<TPosition>, Rooted>::Type itP = begin(endPositions);
+			typename Iterator<String<TPosition>, Rooted>::Type beginP = itP;
+			for(;!atEnd(itP);goNext(itP)) {
+				if (beginP != itP) s << ", ";
+				s << *itP;
+			}
+			s << "}";
+		}
+		
+		append(tmp, "label = \"");
+		append(tmp, s.str().c_str());
+		append(tmp, "\"");
+		_markRootVertex(g, *it, tmp);
+		assignProperty(nodeMap, *it, tmp);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TNodeAttributes>
+inline void
+_createNodeAttributes(Graph<TSpec> const& g,
+					  TNodeAttributes& nodeMap)
+{
+	SEQAN_CHECKPOINT
+    typedef Graph<TSpec> TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	resizeVertexMap(g, nodeMap);
+
+	typedef typename Iterator<TGraph, VertexIterator>::Type TConstIter;
+	TConstIter it(g);
+	for(;!atEnd(it);++it) {
+		std::ostringstream outs; 
+		outs << "label = \"";
+		outs << *it;
+		outs << "\"";
+		String<char> tmp;
+		append(tmp, outs.str().c_str());
+		_markRootVertex(g, *it, tmp);
+		assignProperty(nodeMap, *it, tmp);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TNodeAttributes, typename TNameMap>
+inline void
+_createNodeAttributes(Graph<TSpec> const& g,
+					  TNodeAttributes& nodeMap,
+					  TNameMap const& nameMap)
+{
+    typedef Graph<TSpec> TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	resizeVertexMap(g, nodeMap);
+
+	typedef typename Iterator<TGraph, VertexIterator>::Type TConstIter;
+	TConstIter it(g);
+	for(;!atEnd(it);++it) {
+		std::ostringstream outs; 
+		outs << "label = \"";
+		outs << getProperty(nameMap,*it);
+		outs << "\"";
+		String<char> tmp;
+		append(tmp, outs.str().c_str());
+		_markRootVertex(g, *it, tmp);
+		assignProperty(nodeMap, *it, tmp);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+template<typename TSpec, typename TEdgeAttributes>
+inline void
+_createEmptyEdgeAttributes(Graph<TSpec> const& g,
+						   TEdgeAttributes& edgeMap)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	resizeEdgeMap(g, edgeMap);
+
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TConstEdIter;
+	TConstEdIter itEd(g);
+	for(;!atEnd(itEd);++itEd) {
+		assignProperty(edgeMap, *itEd, String<char>(""));
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TCargo, typename TSpec, typename TEdgeAttributes>
+inline void
+_createEdgeAttributes(Graph<Directed<TCargo, TSpec> > const& g,
+					  TEdgeAttributes& edgeMap)
+{
+	SEQAN_CHECKPOINT
+	_createEmptyEdgeAttributes(g,edgeMap);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TCargo, typename TSpec, typename TEdgeAttributes>
+inline void
+_createEdgeAttributes(Graph<Undirected<TCargo, TSpec> > const& g,
+					  TEdgeAttributes& edgeMap)
+{
+	SEQAN_CHECKPOINT
+	_createEmptyEdgeAttributes(g,edgeMap);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec, typename TEdgeAttributes>
+inline void
+_createEdgeAttributes(Graph<Tree<void, TSpec> > const& g,
+					  TEdgeAttributes& edgeMap)
+{
+	SEQAN_CHECKPOINT
+	_createEmptyEdgeAttributes(g,edgeMap);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TCargo, typename TSpec, typename TEdgeAttributes>
+inline void 
+_createEdgeAttributes(Graph<Tree<TCargo, TSpec> > const& g,
+					  TEdgeAttributes& edgeMap)
+{
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	resizeEdgeMap(g, edgeMap);
+
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TConstEdIter;
+	TConstEdIter itEd(g);
+	for(;!atEnd(itEd);++itEd) {
+		std::ostringstream outs; 
+		outs << "label = \"";
+		outs << (TCargo) getCargo(*itEd);
+		outs << "\"";
+		append(property(edgeMap, *itEd), outs.str().c_str());		
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeAttributes>
+inline void
+_createEdgeAttributes(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+					  TEdgeAttributes& edgeMap)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	resizeEdgeMap(g, edgeMap);
+
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TConstEdIter;
+	TConstEdIter itEd(g);
+	for(;!atEnd(itEd);++itEd) {
+		String<char> tmp("label = \"");
+		append(tmp, label(itEd));
+		append(tmp, "\"");
+		assignProperty(edgeMap, *itEd, tmp);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeAttributes>
+inline void
+_createEdgeAttributes(Graph<Automaton<TAlphabet, TCargo, WordGraph<TSpec> > > const& g,
+					  TEdgeAttributes& edgeMap)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, WordGraph<TSpec> > > TGraph;
+	resizeEdgeMap(g, edgeMap);
+
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TConstEdIter;
+	TConstEdIter itEd(g);
+	for(;!atEnd(itEd);++itEd) {
+		String<TAlphabet> labelTmp = getCargo(*itEd);
+		String<char> str;
+		resize(str,length(labelTmp)+1);
+		value(str,0) = label(itEd);
+		typename Iterator<String<TAlphabet>, Rooted>::Type it = begin(labelTmp);
+		for(;!atEnd(it);++it) {
+			char c = convert<char>(getValue(it));
+			value(str,position(it) + 1) = c;
+		}
+		String<char> tmp("label = \"");
+		append(tmp, str);
+		append(tmp, "\"");
+		assignProperty(edgeMap, *itEd, tmp);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec>
+inline void
+_writeGraphFooter(TFile &,
+				  Graph<Directed<TCargo, TSpec> > const&,
+				  DotDrawing)
+{
+	SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec>
+inline void
+_writeGraphFooter(TFile &,
+				  Graph<Undirected<TCargo, TSpec> > const&,
+				  DotDrawing)
+{
+	SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec>
+inline void
+_writeGraphFooter(TFile &,
+				  Graph<Tree<TCargo, TSpec> > const&,
+				  DotDrawing)
+{
+	SEQAN_CHECKPOINT
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+_writeGraphFooter(TFile &,
+				  Graph<Automaton<TAlphabet, TCargo, TSpec> > const&,
+				  DotDrawing)
+{
+	SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+_writeGraphType(TFile & file,
+				Graph<Automaton<TAlphabet, TCargo, TSpec> > const&,
+				DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, "digraph");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec>
+inline void
+_writeGraphType(TFile & file,
+				Graph<Directed<TCargo, TSpec> > const&,
+				DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, "digraph");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec>
+inline void
+_writeGraphType(TFile & file,
+				Graph<Undirected<TCargo, TSpec> > const&,
+				DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, "graph");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec>
+inline void
+_writeGraphType(TFile & file,
+				Graph<Tree<TCargo, TSpec> > const&,
+				DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, "digraph");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+_writeEdgeType(TFile & file,
+			   Graph<Automaton<TAlphabet, TCargo, TSpec> > const&,
+			   DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, " -> ");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec>
+inline void
+_writeEdgeType(TFile & file,
+			   Graph<Directed<TCargo, TSpec> > const&,
+			   DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, " -> ");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec>
+inline void
+_writeEdgeType(TFile & file,
+			   Graph<Undirected<TCargo, TSpec> > const&,
+			   DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, " -- ");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec>
+inline void
+_writeEdgeType(TFile & file,
+			   Graph<Tree<TCargo, TSpec> > const&,
+			   DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, " -> ");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.write:
+..signature:write(file, graph, nodeMap, edgeMap, tag)
+..param.graph:The graph to write out.
+...type:Class.Graph
+..param.nodeMap:A mapping from vertex descriptor to vertex label.
+..param.edgeMap:A mapping from edge descriptor to edge label.
+..param.tag:A tag to select the output format.
+...type:Tag.DotDrawing
+..include:seqan/graph_types.h
+ */
+template <typename TFile, typename TSpec, typename TNodeAttributes, typename TEdgeAttributes>
+void 
+write(TFile & file, 
+	  Graph<TSpec> const& g,
+	  TNodeAttributes const& nodeMap,
+	  TEdgeAttributes const& edgeMap,
+	  DotDrawing) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+
+	_writeGraphType(file,g,DotDrawing());
+	_streamWrite(file, " G {\n");
+	_streamPut(file, '\n');
+	_streamWrite(file, "/* Graph Attributes */\n");
+	_streamWrite(file, "graph [rankdir = LR];\n");
+	_streamPut(file, '\n');
+	_streamWrite(file, "/* Node Attributes */\n");
+	_streamWrite(file, "node [shape = circle, fillcolor = white, style = filled, fontname = \"Times-Italic\"];\n");
+	_streamPut(file, '\n');
+	_streamWrite(file, "/* Edge Attributes */\n");
+	_streamWrite(file, "edge [fontname = \"Times-Italic\", arrowsize = 0.75, fontsize = 16];\n");
+	_streamPut(file, '\n');
+
+	_streamWrite(file, "/* Nodes */\n");
+	typedef typename Iterator<TGraph, VertexIterator>::Type TConstIter;
+	TConstIter it(g);
+	for(;!atEnd(it);++it) {
+		_streamPutInt(file, *it);
+		_streamWrite(file, " [");
+		_streamWrite(file, getProperty(nodeMap, *it));
+		_streamWrite(file, "];\n");
+	}
+	_streamPut(file, '\n');
+
+	_streamWrite(file, "/* Edges */\n");
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TConstEdIter;
+	TConstEdIter itEd(g);
+	for(;!atEnd(itEd);++itEd) {
+		TVertexDescriptor sc = sourceVertex(itEd);
+		TVertexDescriptor tr = targetVertex(itEd);
+		_streamPutInt(file, sc);
+		_writeEdgeType(file, g, DotDrawing());
+		_streamPutInt(file, tr);
+		_streamWrite(file, " [");
+		_streamWrite(file, getProperty(edgeMap, *itEd));
+		_streamWrite(file, "];\n");
+	}
+	_streamPut(file, '\n');
+
+	_writeGraphFooter(file,g,DotDrawing());
+
+	_streamWrite(file, "}\n");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.write:
+..signature:write(file, graph, nodeMap, tag)
+..include:seqan/graph_types.h
+ */
+template <typename TFile, typename TSpec, typename TNodeAttributes>
+inline void
+write(TFile & file,
+	  Graph<TSpec> const& g, 
+	  TNodeAttributes const& nodeMap,
+	  DotDrawing) 
+{
+	SEQAN_CHECKPOINT
+	String<String<char> > edgeMap;
+	_createEdgeAttributes(g,edgeMap);
+	write(file,g,nodeMap,edgeMap,DotDrawing());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.write:
+..signature:write(file, graph, tag)
+..include:seqan/graph_types.h
+ */
+template <typename TFile, typename TSpec>
+inline void
+write(TFile & file,
+	  Graph<TSpec> const& g, 
+	  DotDrawing) 
+{
+	SEQAN_CHECKPOINT
+	String<String<char> > nodeMap;
+	_createNodeAttributes(g,nodeMap);
+	String<String<char> > edgeMap;
+	_createEdgeAttributes(g,edgeMap);
+	write(file,g,nodeMap,edgeMap,DotDrawing());
+}
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// READING
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TNodeIdMap>
+inline void
+_addNode(Graph<TSpec>& g,
+		 TStatement& node_id,
+		 TStatement& attr_list,
+		 TNodeAttributes& nodeMap,
+		 TEdgeAttributes&,			  
+		 TNodeIdMap& nodeIdMap)
+{
+	typedef Graph<TSpec> TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+
+	if (nodeIdMap.find(node_id) == nodeIdMap.end()) {
+		TVertexDescriptor id = addVertex(g);
+		nodeIdMap.insert(std::make_pair(node_id, id));
+		resizeVertexMap(g, nodeMap);
+		assignProperty(nodeMap, id, attr_list);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor, typename TNodeAttributes, typename TEdgeAttributes, typename TStatement>
+inline void
+_addEdge(Graph<Directed<TCargo, TSpec> >& g,
+		 TVertexDescriptor sourceV,
+		 TVertexDescriptor targetV,
+		 TNodeAttributes&,
+		 TEdgeAttributes& edgeMap,
+		 TStatement& attr_list)
+{
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor e = addEdge(g, sourceV, targetV);
+	resizeEdgeMap(g, edgeMap);
+	assignProperty(edgeMap, e, attr_list);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor, typename TNodeAttributes, typename TEdgeAttributes, typename TStatement>
+inline void
+_addEdge(Graph<Undirected<TCargo, TSpec> >& g,
+		 TVertexDescriptor sourceV,
+		 TVertexDescriptor targetV,
+		 TNodeAttributes&,
+		 TEdgeAttributes& edgeMap,
+		 TStatement& attr_list)
+{
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor e = addEdge(g, sourceV, targetV);
+	resizeEdgeMap(g, edgeMap);
+	assignProperty(edgeMap, e, attr_list);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor, typename TNodeAttributes, typename TEdgeAttributes, typename TStatement>
+inline void
+_addEdge(Graph<Tree<TCargo, TSpec> >& g,
+		 TVertexDescriptor sourceV,
+		 TVertexDescriptor targetV,
+		 TNodeAttributes&,
+		 TEdgeAttributes& edgeMap,
+		 TStatement& attr_list)
+{
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor e = addEdge(g, sourceV, targetV);
+	resizeEdgeMap(g, edgeMap);
+	assignProperty(edgeMap, e, attr_list);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TString>
+inline typename Alphabet<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type
+_getInternalLabel(Graph<Automaton<TAlphabet, TCargo, TSpec> >&,
+				  TString& str)
+{
+	return str[0];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TString>
+inline String<TAlphabet>
+_getInternalLabel(Graph<Automaton<TAlphabet, TCargo, WordGraph<TSpec> > >&,
+				  TString& str)
+{
+	return str;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TNodeAttributes, typename TEdgeAttributes, typename TStatement>
+inline void
+_addEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+		 TVertexDescriptor sourceV,
+		 TVertexDescriptor targetV,
+		 TNodeAttributes&,
+		 TEdgeAttributes& edgeMap,
+		 TStatement& attr_list)
+{
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+
+	// We need the label
+	typedef typename Value<TStatement>::Type TValue;
+	typedef typename Iterator<TStatement>::Type TIter;
+	typedef typename Position<TIter>::Type TPos;
+	
+	String<TValue> label;
+	TIter it = begin(attr_list);
+	bool found = false;
+	for(;!atEnd(it);goNext(it)) {
+		TPos pos = position(it);
+		if (*it == ',') {
+			found = false;
+		} else if (found) {
+			append(label, *it);
+		} else if ((pos + 5 < length(attr_list)) &&
+			(infix(attr_list, it, it + 5) == "label")) 
+		{
+				found = true;
+				it += 5;
+		}
+	}
+	TEdgeDescriptor e = addEdge(g, sourceV, targetV, _getInternalLabel(g, label));
+	resizeEdgeMap(g, edgeMap);
+	assignProperty(edgeMap, e, attr_list);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TNodeIdMap>
+inline void
+_addEdge(Graph<TSpec>& g,
+		 TStatement& left_node_id,
+		 TStatement& right_node_id,
+		 TStatement& attr_list,
+		 TNodeAttributes& nodeMap,
+		 TEdgeAttributes& edgeMap,
+		 TNodeIdMap& nodeIdMap)
+{
+	typedef Graph<TSpec> TGraph;
+	typedef typename Value<TStatement>::Type TValue;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef std::map<String<TValue>, TVertexDescriptor> TMap;
+
+	TVertexDescriptor sourceV;
+	TVertexDescriptor targetV;
+
+	typename TMap::iterator pos;
+	pos = nodeIdMap.find(left_node_id);
+	if (pos == nodeIdMap.end()) return;
+	else sourceV = pos->second;
+
+	pos = nodeIdMap.find(right_node_id);
+	if (pos == nodeIdMap.end()) return;
+	else targetV = pos->second;
+
+	_addEdge(g, sourceV, targetV, nodeMap, edgeMap, attr_list);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TNodeIdMap>
+inline void
+_processNodeStatement(Graph<TSpec>& g,
+					  TStatement& stmt,
+					  TNodeAttributes& nodeMap,
+					  TEdgeAttributes& edgeMap,
+					  TNodeIdMap& nodeIdMap) 
+{
+	typedef typename Value<TStatement>::Type TValue;
+	typedef typename Iterator<TStatement>::Type TIter;
+	
+	String<TValue> node_id;
+	String<TValue> attr_list;  // Multiple attribute lists are ignored
+	bool inAttr = false;
+	TIter it = begin(stmt);
+	for(;!atEnd(it);goNext(it)) {
+		if (*it == '[') {
+			inAttr = true;
+			continue;
+		} else if (*it == ']') {
+			// Finished
+			break;
+		} else if ((*it == ' ') ||
+			(*it == '"')) {
+			continue;
+		}
+		if (inAttr) {
+			append(attr_list, *it);
+		} else {
+			append(node_id, *it);
+		}
+	}
+	_addNode(g, node_id, attr_list, nodeMap, edgeMap, nodeIdMap);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TPosition, typename TNodeIdMap>
+inline void
+_processEdgeStatement(Graph<TSpec>& g,
+					  TStatement& stmt,
+					  TNodeAttributes& nodeMap,
+					  TEdgeAttributes& edgeMap,
+					  TPosition pos,
+					  TNodeIdMap& nodeIdMap) 
+{
+	typedef typename Value<TStatement>::Type TValue;
+	typedef typename Iterator<TStatement>::Type TIter;
+	
+	String<TValue> left_node_id;
+	String<TValue> right_node_id;
+	String<TValue> attr_list;  // Multiple attribute lists are ignored
+	bool inAttr = false;
+	TIter it = begin(stmt);
+	unsigned int localPos = 0;
+	for(;!atEnd(it);goNext(it), ++localPos) {
+		if (*it == '[') {
+			inAttr = true;
+			continue;
+		} else if (*it == ']') {
+			// Finished
+			break;
+		} else if ((*it == ' ') ||
+			(*it == '"')) {
+			continue;
+		}
+		if (inAttr) {
+			append(attr_list, *it);
+		} else if (localPos < pos) {
+			append(left_node_id, *it);
+		} else if (localPos > pos+1) {
+			append(right_node_id, *it);
+		}
+	}
+	//std::cout << left_node_id << "," << right_node_id << "," << std::endl;
+	_addEdge(g, left_node_id, right_node_id, attr_list, nodeMap, edgeMap, nodeIdMap);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TNodeIdMap>
+inline void
+_processStatement(Graph<TSpec>& g,
+				  TStatement& stmt,
+				  TNodeAttributes& nodeMap,
+				  TEdgeAttributes& edgeMap,
+				  TNodeIdMap& nodeIdMap) 
+{
+	// Clear everything up to the last line
+	typedef typename Value<TStatement>::Type TValue;
+	typedef typename Iterator<TStatement>::Type TIter;
+
+	// Exclude header and empty lines
+	TIter it = begin(stmt);
+	String<TValue> id;
+	for(;!atEnd(it);goNext(it)) {
+	  if ((*it != '\t') && (*it != ' ') && (*it != '\n') && (*it != '\r')) {
+	    append(id, *it);
+	  } else {
+	    // Exclude any graph, subgraph, node and edge processing attributes
+	    if ((id == "graph") || (id == "node") || (id == "edge") || (id == "subgraph") || (length(id)<1)) {
+	      clear(stmt);
+	      return;
+	    } else break; 
+	  }
+	}
+
+	// Process Edges
+	it = begin(stmt);
+	clear(id);
+	id = "00";
+	unsigned int pos = 0;
+	for(;!atEnd(it);goNext(it), ++pos) {
+	  id[pos % 2] = *it;
+	  if ((id == "--") || (id == "->")) {
+	    //std::cout << stmt << std::endl;
+	    _processEdgeStatement(g, stmt, nodeMap, edgeMap, pos - 1, nodeIdMap);
+	    clear(stmt);
+	    return;
+	  }
+	}
+
+	// Process nodes
+	//std::cout << stmt << std::endl;
+	_processNodeStatement(g, stmt, nodeMap, edgeMap, nodeIdMap);
+	clear(stmt);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TSpec, typename TNodeAttributes, typename TEdgeAttributes>
+void read(TFile & file,
+		  Graph<TSpec>& g,
+		  TNodeAttributes& nodeMap,
+		  TEdgeAttributes& edgeMap,
+		  DotDrawing) 
+{
+	typedef Graph<TSpec> TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Position<TFile>::Type TPosition;
+	typedef typename Value<TFile>::Type TValue;
+	typedef std::map<String<TValue>, TVertexDescriptor> TMap;
+	TMap nodeIdMap;
+
+	TValue c;
+	String<TValue> stmt;
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		
+		if (c == ';') _processStatement(g,stmt, nodeMap, edgeMap, nodeIdMap);
+		else if ((c == '\n') ||
+				(c == '\r')) {
+					clear(stmt);
+		}
+		else append(stmt,c);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TSpec>
+void read(TFile & file,
+		  Graph<TSpec>& g,
+		  DotDrawing) 
+{
+	String<String<char> > nodeMap;
+	String<String<char> > edgeMap;
+	read(file,g,nodeMap,edgeMap,DotDrawing());
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_edgestump.h b/src/SeqAn-1.3/seqan/graph_types/graph_edgestump.h
new file mode 100644
index 0000000..3fc9ee2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_edgestump.h
@@ -0,0 +1,1046 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_EDGESTUMP_H
+#define SEQAN_HEADER_GRAPH_EDGESTUMP_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+//	Graph - EdgeStump
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.EdgeStump:
+..cat:Graph
+..summary:The EdgeStump class encapsulates a single edge. 
+It represents either a list node in the adjacency list of a graph or an array field if edges are stored in an array.
+..signature:EdgeStump<TCargo, bool TList, bool TSource, bool TId, TSpec>
+..param.TCargo:The cargo type of an edge.
+...metafunction:Metafunction.Cargo
+...remarks:The cargo can be used to store arbitrary information with an edge.
+...default:$void$
+..param.TList:Boolean value that indicates whether it is a list node or not.
+...remarks:If it is a list node it has one or two next pointers.
+...default:$true$
+..param.TSource:Boolean value that indicates whether the source is stored in the EdgeStump or not.
+...remarks:If this value is true and it is a list node an additional source next pointer is present.
+...default:$false$
+..param.TId:Boolean value that indicates whether an id is stored in the EdgeStump or not.
+Note: Without edge ids external property maps do not work for edges!
+...default:$true$
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:$Default$, see @Tag.Default at .
+..remarks:The default EdgeStump in all graph types does not consider a cargo. 
+However, in default usage every graph does store an edge id. 
+Edge ids are used to append additional properties to edges with the help of external property maps.
+..include:seqan/graph_types.h
+*/
+template<typename TCargo, typename TSpec>
+class EdgeStump<TCargo, true, false, false, TSpec> 
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		TVertexDescriptor_ data_target;
+		TCargo data_cargo;
+		EdgeStump* data_nextT;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+class EdgeStump<TCargo, true, false, true, TSpec> 
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		typedef typename Id<EdgeStump>::Type TId_;
+		TVertexDescriptor_ data_target;
+		TId_ data_id;
+		TCargo data_cargo;
+		EdgeStump* data_nextT;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+class EdgeStump<TCargo, true, true, false, TSpec> 
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		TVertexDescriptor_ data_target;
+		TVertexDescriptor_ data_source;
+		TCargo data_cargo;
+		EdgeStump* data_nextT;
+		EdgeStump* data_nextS;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TCargo, typename TSpec>
+class EdgeStump<TCargo, true, true, true, TSpec> 
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		typedef typename Id<EdgeStump>::Type TId_;
+		TVertexDescriptor_ data_target;
+		TVertexDescriptor_ data_source;
+		TId_ data_id;
+		TCargo data_cargo;
+		EdgeStump* data_nextT;
+		EdgeStump* data_nextS;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+class EdgeStump<TCargo, false, false, false, TSpec>
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		TVertexDescriptor_ data_target;
+		TCargo data_cargo;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+class EdgeStump<TCargo, false, false, true, TSpec>
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		typedef typename Id<EdgeStump>::Type TId_;
+		TVertexDescriptor_ data_target;
+		TId_ data_id;
+		TCargo data_cargo;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+class EdgeStump<TCargo, false, true, false, TSpec>
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		TVertexDescriptor_ data_target;
+		TVertexDescriptor_ data_source;
+		TCargo data_cargo;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+class EdgeStump<TCargo, false, true, true, TSpec>
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		typedef typename Id<EdgeStump>::Type TId_;
+		TVertexDescriptor_ data_target;
+		TVertexDescriptor_ data_source;
+		TId_ data_id;
+		TCargo data_cargo;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//	Graph - Cargoless EdgeStump
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+class EdgeStump<void, true, false, false, TSpec> 
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		TVertexDescriptor_ data_target;
+		EdgeStump* data_nextT;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+class EdgeStump<void, true, false, true, TSpec> 
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		typedef typename Id<EdgeStump>::Type TId_;
+		TVertexDescriptor_ data_target;
+		TId_ data_id;
+		EdgeStump* data_nextT;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+class EdgeStump<void, true, true, false, TSpec> 
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		TVertexDescriptor_ data_target;
+		TVertexDescriptor_ data_source;
+		EdgeStump* data_nextT;
+		EdgeStump* data_nextS;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TSpec>
+class EdgeStump<void, true, true, true, TSpec> 
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		typedef typename Id<EdgeStump>::Type TId_;
+		TVertexDescriptor_ data_target;
+		TVertexDescriptor_ data_source;
+		TId_ data_id;
+		EdgeStump* data_nextT;
+		EdgeStump* data_nextS;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+class EdgeStump<void, false, false, false, TSpec>
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		TVertexDescriptor_ data_target;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+class EdgeStump<void, false, false, true, TSpec>
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		typedef typename Id<EdgeStump>::Type TId_;
+		TVertexDescriptor_ data_target;
+		TId_ data_id;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+class EdgeStump<void, false, true, false, TSpec>
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		TVertexDescriptor_ data_target;
+		TVertexDescriptor_ data_source;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+class EdgeStump<void, false, true, true, TSpec>
+{
+	public:
+		typedef typename VertexDescriptor<EdgeStump>::Type TVertexDescriptor_;
+		typedef typename Id<EdgeStump>::Type TId_;
+		TVertexDescriptor_ data_target;
+		TVertexDescriptor_ data_source;
+		TId_ data_id;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// EdgeStump - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Cargo.param.T.type:Class.EdgeStump
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+struct Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> > {
+	typedef TCargo Type;
+};
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+struct Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> const> {
+	typedef TCargo const Type;
+};
+
+
+template<bool TList, bool TSource, bool TId, typename TSpec>
+struct Cargo<EdgeStump<void, TList, TSource, TId, TSpec> > {
+	typedef void* Type;
+};
+
+template<bool TList, bool TSource, bool TId, typename TSpec>
+struct Cargo<EdgeStump<void, TList, TSource, TId, TSpec> const> {
+	typedef void* Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.EdgeStump
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+struct Spec<EdgeStump<TCargo, TList, TSource, TId, TSpec> > 
+{
+	typedef TSpec Type;
+};
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+struct Spec<EdgeStump<TCargo, TList, TSource, TId, TSpec> const> 
+{
+	typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getCargo:
+..cat:Graph
+..summary:Get method for the edge cargo.
+..signature:getCargo(es)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..returns:Returns the cargo.
+..remarks:If cargo is not present the return value is (void*) 0.
+..see:Function.cargo
+..see:Function.assignCargo
+..include:seqan/graph_types.h
+*/
+
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+inline typename Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> const>::Type&
+getCargo(EdgeStump<TCargo, TList, TSource, TId, TSpec> const* es)
+{
+	SEQAN_CHECKPOINT
+	return es->data_cargo;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+inline typename Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type&
+getCargo(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_cargo;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TList, bool TSource, bool TId, typename TSpec>
+inline typename Cargo<EdgeStump<void, TList, TSource, TId, TSpec> const>::Type
+getCargo(EdgeStump<void, TList, TSource, TId, TSpec> const*) 
+{
+	SEQAN_CHECKPOINT
+	// No real cargo
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TList, bool TSource, bool TId, typename TSpec>
+inline typename Cargo<EdgeStump<void, TList, TSource, TId, TSpec> >::Type
+getCargo(EdgeStump<void, TList, TSource, TId, TSpec>*) 
+{
+	SEQAN_CHECKPOINT
+	// No real cargo
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.cargo:
+..cat:Graph
+..summary:Access to the cargo.
+..signature:cargo(es)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..returns:Returns a reference to the cargo.
+..remarks:If cargo is not present the return value is (void*) 0.
+..see:Function.getCargo
+..see:Function.assignCargo
+..include:seqan/graph_types.h
+*/
+
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+inline typename Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> const>::Type&
+cargo(EdgeStump<TCargo, TList, TSource, TId, TSpec> const* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_cargo;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+inline typename Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type& 
+cargo(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_cargo;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TList, bool TSource, bool TId, typename TSpec>
+inline typename Cargo<EdgeStump<void, TList, TSource, TId, TSpec> >::Type
+cargo(EdgeStump<void, TList, TSource, TId, TSpec>*) 
+{
+	SEQAN_CHECKPOINT
+	// No real cargo
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TList, bool TSource, bool TId, typename TSpec>
+inline typename Cargo<EdgeStump<void, TList, TSource, TId, TSpec> const>::Type
+cargo(EdgeStump<void, TList, TSource, TId, TSpec> const*) 
+{
+	SEQAN_CHECKPOINT
+	// No real cargo
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignCargo:
+..cat:Graph
+..summary:Assigns a new cargo to the edge.
+..signature:assignCargo(es, cargo)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..param.cargo:New cargo object.
+...remarks:Type of the new cargo object must match Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type.
+..returns:void
+..remarks:In cargoless EdgeStumps this operation is a NOP.
+..see:Function.cargo
+..see:Function.getCargo
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec, typename TCargo2>
+inline void 
+assignCargo(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es,
+			TCargo2 const& t) 
+{
+	SEQAN_CHECKPOINT
+	es->data_cargo =  (TCargo) t;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<bool TList, bool TSource, bool TId, typename TSpec, typename TCargo2>
+inline void 
+assignCargo(EdgeStump<void, TList, TSource, TId, TSpec>*, 
+			TCargo2 const&) 
+{
+	SEQAN_CHECKPOINT
+	// No real cargo
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignTarget:
+..cat:Graph
+..summary:Assigns a target vertex to an edge.
+..signature:assignTarget(es, t)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..param.t:Target vertex.
+..returns:void
+..see:Function.target
+..see:Function.getTarget
+..include:seqan/graph_types.h
+*/
+
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec, typename TVertexDescriptor>
+inline void 
+assignTarget(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es, 
+			 TVertexDescriptor const t) 
+{
+	SEQAN_CHECKPOINT
+	es->data_target = t;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.target:
+..cat:Graph
+..summary:Accesses the target of an EdgeStump.
+..signature:target(es)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..returns:Reference to the target vertex.
+..see:Function.assignTarget
+..see:Function.getTarget
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type&
+target(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type
+target(EdgeStump<TCargo, TList, TSource, TId, TSpec> const* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getTarget:
+..cat:Graph
+..summary:Get method for the target.
+..signature:getTarget(es)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..returns:Target vertex.
+..see:Function.assignTarget
+..see:Function.target
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> const>::Type
+getTarget(EdgeStump<TCargo, TList, TSource, TId, TSpec> const* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type
+getTarget(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_target;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.Graph#assignSource:
+..cat:Graph
+..summary:Assigns a source vertex to an edge.
+..remarks:A source vertex is not required in an edge stump.
+However, EdgeStumps can be configured to contain a source vertex, e.g., in undirected graphs.
+..signature:assignSource(es, s)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..param.s:Source vertex.
+..returns:void
+..see:Function.source
+..see:Function.getSource
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TList, bool TId, typename TSpec, typename TVertexDescriptor>
+inline void 
+assignSource(EdgeStump<TCargo, TList, true, TId, TSpec>* es, 
+			 TVertexDescriptor const s) 
+{
+	SEQAN_CHECKPOINT
+	es->data_source = s;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TId, typename TSpec, typename TVertexDescriptor>
+inline void 
+assignSource(EdgeStump<TCargo, TList, false, TId, TSpec>*, 
+			 TVertexDescriptor const) 
+{
+	SEQAN_CHECKPOINT
+	// NOP
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, true, TId, TSpec> >::Type&
+source(EdgeStump<TCargo, TList, true, TId, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, true, TId, TSpec> >::Type
+source(EdgeStump<TCargo, TList, true, TId, TSpec> const* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TCargo, bool TList, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, false, TId, TSpec> >::Type
+source(EdgeStump<TCargo, TList, false, TId, TSpec>*) 
+{
+	SEQAN_CHECKPOINT
+	// No source available
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TCargo, bool TList, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, false, TId, TSpec> >::Type
+source(EdgeStump<TCargo, TList, false, TId, TSpec> const*) 
+{
+	SEQAN_CHECKPOINT
+	// No source available
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getSource:
+..cat:Graph
+..summary:Get method for the source.
+..remarks:A source vertex is not required in an edge stump.
+However, EdgeStumps can be configured to contain a source vertex, e.g., in undirected graphs.
+..signature:getSource(es)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..returns:Source vertex.
+..see:Function.Graph#assignSource
+..see:Function.source
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TList, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, true, TId, TSpec> const>::Type
+getSource(EdgeStump<TCargo, TList, true, TId, TSpec> const* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, true, TId, TSpec> >::Type
+getSource(EdgeStump<TCargo, TList, true, TId, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, false, TId, TSpec> const>::Type
+getSource(EdgeStump<TCargo, TList, false, TId, TSpec> const*) 
+{
+	SEQAN_CHECKPOINT
+	// Nop
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TId, typename TSpec>
+inline typename VertexDescriptor<EdgeStump<TCargo, TList, false, TId, TSpec> >::Type
+getSource(EdgeStump<TCargo, TList, false, TId, TSpec>*) 
+{
+	SEQAN_CHECKPOINT
+	// Nop
+	return 0;
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignNextT:
+..cat:Graph
+..summary:Assigns another EdgeStump to the next target pointer.
+..signature:assignNextT(es, es2)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..param.es2:Pointer to the following EdgeStump.
+...type:Class.EdgeStump
+..returns:void
+..see:Function.nextT
+..see:Function.getNextT
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TSource, bool TId, typename TSpec>
+inline void 
+assignNextT(EdgeStump<TCargo, true, TSource, TId, TSpec>* es, 
+			EdgeStump<TCargo, true, TSource, TId, TSpec>* es2) 
+{
+	SEQAN_CHECKPOINT
+	es->data_nextT = es2;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.nextT:
+..cat:Graph
+..summary:Accesses the next target pointer.
+..signature:nextT(es)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..returns:Reference to the next target pointer.
+..see:Function.assignNextT
+..see:Function.getNextT
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TSource, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, TSource, TId, TSpec>* &
+nextT(EdgeStump<TCargo, true, TSource, TId, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_nextT;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TSource, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, TSource, TId, TSpec>* &
+nextT(EdgeStump<TCargo, true, TSource, TId, TSpec> const* es) 
+{
+	return es->data_nextT;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.getNextT:
+..cat:Graph
+..summary:Get method for the next target pointer.
+..signature:getNextT(es)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..returns:Pointer to the next edge stump in target list.
+..see:Function.assignNextT
+..see:Function.nextT
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TSource, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, TSource, TId, TSpec>*
+getNextT(EdgeStump<TCargo, true, TSource, TId, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_nextT;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TSource, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, TSource, TId, TSpec>*
+getNextT(EdgeStump<TCargo, true, TSource, TId, TSpec> const* es) 
+{
+	return es->data_nextT;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignNextS:
+..cat:Graph
+..summary:Assigns another EdgeStump to the next source pointer.
+..signature:assignNextS(es, es2)
+..remarks:EdgeStumps can be configured to have no source. Then there is no next source pointer.
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..param.es2:Pointer to the following EdgeStump.
+...type:Class.EdgeStump
+..returns:void
+..see:Function.nextS
+..see:Function.getNextS
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TId, typename TSpec>
+inline void 
+assignNextS(EdgeStump<TCargo, true, true, TId, TSpec>* es, 
+			EdgeStump<TCargo, true, true, TId, TSpec>* es2) 
+{
+	SEQAN_CHECKPOINT
+	es->data_nextS = es2;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TId, typename TSpec>
+inline void 
+assignNextS(EdgeStump<TCargo, true, false, TId, TSpec>*, 
+			EdgeStump<TCargo, true, false, TId, TSpec>*) 
+{
+	SEQAN_CHECKPOINT
+	// Nop
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.nextS:
+..cat:Graph
+..summary:Accesses the next source pointer.
+..signature:nextS(es)
+..remarks:EdgeStumps can be configured to have no source. Then there is no next source pointer.
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..returns:Reference to the next source pointer.
+..see:Function.assignNextS
+..see:Function.getNextS
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, true, TId, TSpec>* &
+nextS(EdgeStump<TCargo, true, true, TId, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_nextS;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, true, TId, TSpec>* &
+nextS(EdgeStump<TCargo, true, true, TId, TSpec> const* es) 
+{
+	return es->data_nextS;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, false, TId, TSpec>*
+nextS(EdgeStump<TCargo, true, false, TId, TSpec>*) 
+{
+	SEQAN_CHECKPOINT
+	// Nop
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, false, TId, TSpec>*
+nextS(EdgeStump<TCargo, true, false, TId, TSpec> const*) 
+{
+	// Nop
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getNextS:
+..cat:Graph
+..summary:Get method for the next source pointer.
+..remarks:EdgeStumps can be configured to have no source. Then there is no next source pointer.
+..signature:getNextS(es)
+..param.es:Pointer to the EdgeStump.
+...type:Class.EdgeStump
+..returns:Pointer to the next edge stump in source list.
+..see:Function.assignNextS
+..see:Function.nextS
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, true, TId, TSpec>*
+getNextS(EdgeStump<TCargo, true, true, TId, TSpec> const* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_nextS;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TId, typename TSpec>
+inline EdgeStump<TCargo, true, false, TId, TSpec>*
+getNextS(EdgeStump<TCargo, true, false, TId, TSpec> const*) 
+{
+	SEQAN_CHECKPOINT
+	// No source pointer
+	return 0;
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, typename TSpec, typename TId2>
+void 
+_assignId(EdgeStump<TCargo, TList, TSource, true, TSpec>* es, 
+		  TId2 const id) 
+{
+	SEQAN_CHECKPOINT
+	es->data_id = id;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, typename TSpec, typename TId2>
+void 
+_assignId(EdgeStump<TCargo, TList, TSource, false, TSpec>*, 
+		  TId2 const) 
+{
+	// No id -> does nothing
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, typename TId2>
+void 
+_assignId(EdgeStump<TCargo, TList, TSource, false, TreeTag>*, 
+		  TId2 const) 
+{
+	// For a tree do nothing, child id = tree id
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, typename TSpec>
+inline typename Id<EdgeStump<TCargo, TList, TSource, true, TSpec> const>::Type
+_getId(EdgeStump<TCargo, TList, TSource, true, TSpec> const* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_id;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, typename TSpec>
+inline typename Id<EdgeStump<TCargo, TList, TSource, true, TSpec> >::Type
+_getId(EdgeStump<TCargo, TList, TSource, true, TSpec>* es) 
+{
+	SEQAN_CHECKPOINT
+	return es->data_id;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource>
+inline typename Id<EdgeStump<TCargo, TList, TSource, false, TreeTag> const>::Type
+_getId(EdgeStump<TCargo, TList, TSource, false, TreeTag> const* es) 
+{
+	SEQAN_CHECKPOINT
+	// Child id = edge id in a tree
+	return es->data_target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource>
+inline typename Id<EdgeStump<TCargo, TList, TSource, false, TreeTag> >::Type
+_getId(EdgeStump<TCargo, TList, TSource, false, TreeTag>* es) 
+{
+	SEQAN_CHECKPOINT
+	// Child id = edge id in a tree
+	return es->data_target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, typename TSpec>
+inline typename Id<EdgeStump<TCargo, TList, TSource, false, TSpec> >::Type 
+_getId(EdgeStump<TCargo, TList, TSource, false, TSpec> const*) 
+{
+	SEQAN_CHECKPOINT
+	// No real id
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, bool TList, bool TSource, typename TSpec>
+inline typename Id<EdgeStump<TCargo, TList, TSource, false, TSpec> >::Type 
+_getId(EdgeStump<TCargo, TList, TSource, false, TSpec>*) 
+{
+	SEQAN_CHECKPOINT
+	// No real id
+	return 0;
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_idmanager.h b/src/SeqAn-1.3/seqan/graph_types/graph_idmanager.h
new file mode 100644
index 0000000..14d7436
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_idmanager.h
@@ -0,0 +1,480 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IDMANAGER_H
+#define SEQAN_HEADER_GRAPH_IDMANAGER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// IdManager
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.IdManager:
+..cat:Graph
+..summary:Id manager that provides unique ids for vertices and edges.
+..signature:IdManager<TIdType,TSpec>
+..param.TIdType:The id type of the managed ids.
+...metafunction:Metafunction.Value
+...remarks:Use the Value Metafunction to get the id type managed by a given id manager.
+...default:$unsigned int$
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+template<typename TIdType, typename TSpec>
+class IdManager 
+{
+	public:
+		String<TIdType> data_freeIds;  
+		String<bool> data_in_use;   //1 = in use, 0 = not in use
+
+//____________________________________________________________________________	
+	public:
+		IdManager()
+		{
+			SEQAN_CHECKPOINT
+			clear(data_in_use);
+			clear(data_freeIds);
+		}
+
+		~IdManager() 
+		{
+			SEQAN_CHECKPOINT
+		}
+
+		IdManager(IdManager const & _other)
+		{
+			SEQAN_CHECKPOINT
+			data_freeIds = _other.data_freeIds;
+			data_in_use = _other.data_in_use;
+		}
+
+		IdManager const& 
+		operator = (IdManager const& _other) 
+		{
+			SEQAN_CHECKPOINT
+			if (this == &_other) return *this;
+			data_freeIds = _other.data_freeIds;
+			data_in_use = _other.data_in_use;
+			return *this;
+		}
+
+//____________________________________________________________________________
+};
+	
+
+//////////////////////////////////////////////////////////////////////////////
+// IdManager - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.IdManager
+
+template<typename TIdType, typename TSpec> 
+struct Value<IdManager<TIdType, TSpec> > 
+{
+	typedef TIdType Type;
+};
+
+template<typename TIdType, typename TSpec> 
+struct Value<IdManager<TIdType, TSpec> const> 
+{
+	typedef TIdType Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.IdManager
+
+template<typename TIdType, typename TSpec> 
+struct Spec<IdManager<TIdType, TSpec> > 
+{
+	typedef TSpec Type;
+};
+
+template<typename TIdType, typename TSpec> 
+struct Spec<IdManager<TIdType, TSpec> const> 
+{
+	typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.obtainId:
+..cat:Graph
+..summary:Obtains a new id from the id manager.
+..signature:obtainId(idm)
+..param.idm:The IdManager.
+...type:Class.IdManager
+..returns:Returns a new unique id.
+..remarks:If it is a dummy id manager, i.e., IdManager<void>, the return type is (void*) 0.
+..see:Function.releaseId
+..include:seqan/graph_types.h
+*/
+
+template<typename TIdType, typename TSpec>
+inline typename Value<IdManager<TIdType, TSpec> >::Type 
+obtainId(IdManager<TIdType, TSpec>& idm) 
+{
+	SEQAN_CHECKPOINT
+
+	TIdType id;
+	if (!empty(idm.data_freeIds)) {
+		id = getValue(idm.data_freeIds, length(idm.data_freeIds) - 1);
+		resize(idm.data_freeIds, length(idm.data_freeIds) - 1, Generous());
+		assignValue(idm.data_in_use, id, true);
+	} else {
+		if (empty(idm.data_in_use)) id = 0;
+		else id = (TIdType) length(idm.data_in_use);
+		resize(idm.data_in_use, id + 1, Generous());
+		assignValue(idm.data_in_use, id, true);
+	}
+	return id;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.releaseId:
+..cat:Graph
+..summary:Releases a given id so it can be redistributed later on.
+..signature:releaseId(idm, id)
+..param.idm:The IdManager.
+...type:Class.IdManager
+..param.id:The id that is to be released.
+..returns:void
+..see:Function.obtainId
+..include:seqan/graph_types.h
+*/
+
+template<typename TIdType, typename TSpec, typename TId>
+inline void 
+releaseId(IdManager<TIdType, TSpec>& idm, 
+		  TId const id) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(idm,id) == true)
+	if (id == (TId) length(idm.data_in_use) - 1) {
+		resize(idm.data_in_use, length(idm.data_in_use) - 1, Generous());
+	} else {
+		assignValue(idm.data_in_use, id, false);
+		appendValue(idm.data_freeIds, id, Generous());
+	}
+	if (idCount(idm)==0) {
+		releaseAll(idm);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.releaseAll:
+..cat:Graph
+..summary:Releases all ids handled by this id manager at once.
+..signature:releaseAll(idm)
+..param.idm:The IdManager.
+...type:Class.IdManager
+..returns:void
+..see:Function.releaseId
+..include:seqan/graph_types.h
+*/
+
+
+template<typename TIdType, typename TSpec>
+inline void 
+releaseAll(IdManager<TIdType, TSpec>& idm) 
+{
+	SEQAN_CHECKPOINT
+	clear(idm.data_freeIds);
+	clear(idm.data_in_use);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getIdUpperBound:
+..cat:Graph
+..summary:Returns the largest distributed id plus 1. That is, the return value is guaranteed to be an upper bound on all distributed ids.
+..signature:getIdUpperBound(idm)
+..param.idm:The IdManager.
+...type:Class.IdManager
+..returns:An upper bound on all distributed ids.
+..see:Function.getIdLowerBound
+..include:seqan/graph_types.h
+*/
+
+template<typename TIdType, typename TSpec>
+inline typename Value<IdManager<TIdType, TSpec> >::Type 
+getIdUpperBound(IdManager<TIdType, TSpec> const& idm)
+{
+	SEQAN_CHECKPOINT
+	return (empty(idm.data_in_use)) ? 0 : (typename Value<IdManager<TIdType, TSpec> >::Type) length(idm.data_in_use);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getIdLowerBound:
+..cat:Graph
+..summary:Returns the smallest distributed id. That is, the return value is guaranteed to be the smallest id obtained so far.
+..signature:getIdLowerBound(idm)
+..param.idm:The IdManager.
+...type:Class.IdManager
+..returns:The smallest obtained id.
+..see:Function.getIdUpperBound
+..include:seqan/graph_types.h
+*/
+
+template<typename TIdType, typename TSpec>
+inline typename Value<IdManager<TIdType, TSpec> >::Type 
+getIdLowerBound(IdManager<TIdType, TSpec> const& idm)
+{
+	SEQAN_CHECKPOINT
+	for(TIdType it = 0; it < length(idm.data_in_use); ++it) {
+		if (getValue(idm.data_in_use, it)) return it;
+	}
+	return 0;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.idCount:
+..cat:Graph
+..summary:Determines the number of ids that were obtained.
+..signature:idCount(idm)
+..param.idm:The IdManager.
+...type:Class.IdManager
+..returns:Number of ids in use.
+..include:seqan/graph_types.h
+*/
+
+template<typename TIdType, typename TSpec>
+inline typename Value<IdManager<TIdType, TSpec> >::Type 
+idCount(IdManager<TIdType, TSpec> const& idm)
+{
+	SEQAN_CHECKPOINT
+	return (length(idm.data_in_use) - length(idm.data_freeIds));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.idInUse:
+..cat:Graph
+..summary:Checks whether the given id is in use or not.
+..signature:idInUse(idm, id)
+..param.idm:The IdManager.
+...type:Class.IdManager
+..param.id:The given id.
+..returns:True if the id was distributed, false otherwise.
+..include:seqan/graph_types.h
+*/
+
+template<typename TIdType, typename TSpec, typename TId>
+inline bool 
+idInUse(IdManager<TIdType, TSpec> const& idm, 
+		TId const id)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(id < (TId) length(idm.data_in_use))
+	return idm.data_in_use[id];
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Dummy IdManager
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Counting IdManager:
+..cat:Graph
+..general:Class.IdManager
+..summary:Id Manager that just counts the number of ids in use.
+..signature:IdManager<void, TSpec>
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+template<typename TSpec>
+class IdManager<void, TSpec> 
+{
+	public:
+		typedef typename Id<IdManager>::Type TIdType;
+		TIdType data_idCount;
+
+//____________________________________________________________________________	
+	public:
+		IdManager() : data_idCount(0) 
+		{
+			SEQAN_CHECKPOINT
+		}
+
+		~IdManager() 
+		{
+			SEQAN_CHECKPOINT
+		}
+
+		IdManager(IdManager const & _other) : data_idCount(_other.data_idCount) 
+		{
+			SEQAN_CHECKPOINT
+		}
+
+		IdManager const& 
+		operator = (IdManager const& _other) 
+		{
+			SEQAN_CHECKPOINT
+			if (this == &_other) return *this;
+			data_idCount = _other.data_idCount;
+			return *this;
+		}
+
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Dummy IdManager - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.IdManager
+template<typename TSpec> 
+struct Value<IdManager<void, TSpec> > {
+	typedef typename Size<IdManager<void, TSpec> >::Type Type;
+};
+
+template<typename TSpec> 
+struct Value<IdManager<void, TSpec> const> {
+	typedef typename Size<IdManager<void, TSpec> const>::Type Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+inline typename Value<IdManager<void, TSpec> >::Type 
+obtainId(IdManager<void, TSpec>& idm) 
+{
+	SEQAN_CHECKPOINT
+	++idm.data_idCount;
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec, typename TId>
+inline void 
+releaseId(IdManager<void, TSpec>& idm, 
+		  TId const) 
+{
+	SEQAN_CHECKPOINT
+	if (idm.data_idCount > 0) --idm.data_idCount;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+inline void 
+releaseAll(IdManager<void, TSpec>& idm) 
+{
+	SEQAN_CHECKPOINT
+	idm.data_idCount = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+inline typename Value<IdManager<void, TSpec> >::Type 
+getIdUpperBound(IdManager<void, TSpec> const& idm)
+{
+	SEQAN_CHECKPOINT
+	// Must be data_idCount in order to resize property maps!!!
+	// Don't change to 0
+	return idm.data_idCount;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+inline typename Value<IdManager<void, TSpec> >::Type 
+getIdLowerBound(IdManager<void, TSpec> const&)
+{
+	SEQAN_CHECKPOINT
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TSpec>
+inline typename Value<IdManager<void, TSpec> >::Type 
+idCount(IdManager<void, TSpec> const& idm)
+{
+	SEQAN_CHECKPOINT
+	return idm.data_idCount;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TSpec, typename TId>
+inline bool 
+idInUse(IdManager<void, TSpec> const&, 
+		TId const) 
+{
+	SEQAN_CHECKPOINT
+	return false;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_impl_automaton.h b/src/SeqAn-1.3/seqan/graph_types/graph_impl_automaton.h
new file mode 100644
index 0000000..b57ecd1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_impl_automaton.h
@@ -0,0 +1,1008 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_AUTOMATON_H
+#define SEQAN_HEADER_GRAPH_IMPL_AUTOMATON_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Automaton
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TEdge, typename TAlphabet>
+class AutomatonEdgeArray {
+public:
+	TEdge data_edge[ValueSize<TAlphabet>::VALUE];
+
+	AutomatonEdgeArray() 
+	{
+		typedef typename VertexDescriptor<TEdge>::Type TVertexDescriptor;
+		typedef typename Size<TAlphabet>::Type TSize;
+		TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+		for(TSize i=0;i < (TSize) ValueSize<TAlphabet>::VALUE;++i) 
+			assignTarget(&data_edge[i], nilVal);
+	}
+};
+
+/**
+.Spec.Automaton:
+..cat:Graph
+..general:Class.Graph
+..summary:An Automaton has directed edges, labeled with input symbols, and a distinct start state, called root. The
+input symbols require the use of a third parameter: The alphabet of the input symbols.
+..description:
+...image:automatonGraph|An automaton, where $0$ is the start state.
+..signature:Graph<Automaton<TAlphabet, TCargo, TSpec> > 
+..param.TAlphabet:The alphabet type that is used for the transition labels.
+...metafunction:Metafunction.Alphabet
+...remarks:Use @Metafunction.Alphabet@ to get the type of the labels in an automaton.
+...default:$char$
+..param.TCargo:The cargo type that can be attached to the edges.
+...metafunction:Metafunction.Cargo
+...remarks:Use @Metafunction.Cargo@ to get the cargo type of an undirected graph.
+...default:$void$
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+...remarks:Use WithoutEdgeId here to omit edge ids.
+Note: If edges do not store ids external property maps do not work.
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec>
+class Graph<Automaton<TAlphabet, TCargo, TSpec> > 
+{
+	public:
+		typedef typename VertexIdHandler<Graph>::Type TVertexIdManager_;
+		typedef typename EdgeIdHandler<Graph>::Type TEdgeIdManager_;
+		typedef typename VertexDescriptor<Graph>::Type TVertexDescriptor_;
+		typedef typename EdgeType<Graph>::Type TEdge_;
+
+		String<AutomatonEdgeArray<TEdge_, TAlphabet> > data_vertex;		// List of tables
+		TVertexIdManager_ data_id_managerV;
+		TEdgeIdManager_ data_id_managerE;
+		TVertexDescriptor_ data_root;
+	
+
+//____________________________________________________________________________
+
+
+		Graph() : data_root(0) {
+			SEQAN_CHECKPOINT
+		}
+
+
+		~Graph() {
+			SEQAN_CHECKPOINT
+			clear(*this);
+		}
+
+		Graph(Graph const & _other)
+		{
+			SEQAN_CHECKPOINT
+			_copyGraph(_other, *this);
+		}
+	
+		Graph const& operator = (Graph const & _other) {
+			SEQAN_CHECKPOINT
+			if (this == &_other) return *this;
+			_copyGraph(_other, *this);
+			return *this;
+		}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline String<AutomatonEdgeArray<typename EdgeType<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type, TAlphabet> >&
+_getVertexString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	return const_cast<String<AutomatonEdgeArray<TEdge, TAlphabet> >&>(g.data_vertex);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename VertexIdHandler<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type&
+_getVertexIdManager(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexIdHandler<TGraph>::Type TVertexIdManager;
+	return const_cast<TVertexIdManager&>(g.data_id_managerV);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename EdgeIdHandler<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type&
+_getEdgeIdManager(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeIdHandler<TGraph>::Type TEdgeIdManager;
+	return const_cast<TEdgeIdManager&>(g.data_id_managerE);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& source,
+		   Graph<Automaton<TAlphabet, TCargo, TSpec> >& dest,
+		   bool transpose)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	typedef typename Cargo<TEdge>::Type TCargoType;
+	typedef typename Size<TAlphabet>::Type TSize;
+	typedef typename Iterator<String<AutomatonEdgeArray<TEdge, TAlphabet> > const, Standard>::Type TIterConst;
+	
+	clear(dest);
+	resize(dest.data_vertex, length(_getVertexString(source)));
+	dest.data_root = source.data_root;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	TIterConst it = begin(source.data_vertex, Standard());
+	TIterConst itEnd = end(source.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		TSize table_length = ValueSize<TAlphabet>::VALUE;
+		TVertexDescriptor sourceVertex = pos;
+		for(TSize i=0;i<table_length;++i) {
+			TEdgeDescriptor const edSource = (TEdgeDescriptor) &source.data_vertex[sourceVertex].data_edge[i];
+			TVertexDescriptor targetVertex = getTarget(edSource);
+			if (targetVertex == nilVal) continue;
+			TEdgeDescriptor edTarget;
+			if (!transpose) {
+				edTarget = &dest.data_vertex[sourceVertex].data_edge[i];
+				assignTarget(edTarget, targetVertex);
+			} else {
+				edTarget = &dest.data_vertex[targetVertex].data_edge[i];
+				assignTarget(edTarget, sourceVertex);
+			}
+			_assignId(edTarget, _getId(edSource));
+			assignCargo(edTarget, getCargo(edSource));
+		}
+	}
+	dest.data_id_managerV = source.data_id_managerV;
+	dest.data_id_managerE = source.data_id_managerE;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& source,
+		   Graph<Automaton<TAlphabet, TCargo, TSpec> >& dest)
+{
+	_copyGraph(source,dest,false);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void 
+transpose(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& source,
+		  Graph<Automaton<TAlphabet, TCargo, TSpec> >& dest)
+{
+	SEQAN_CHECKPOINT
+	_copyGraph(source, dest, true);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void 
+transpose(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	Graph<Automaton<TAlphabet, TCargo, TSpec> > dest;
+	_copyGraph(g, dest, true);
+	g = dest;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+numEdges(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g)
+{
+	SEQAN_CHECKPOINT
+	return idCount(g.data_id_managerE);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+numVertices(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return idCount(g.data_id_managerV);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline bool 
+empty(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return (!(idCount(g.data_id_managerV)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+clearEdges(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	clear(g.data_vertex);
+	releaseAll(g.data_id_managerE);
+	resize(g.data_vertex, getIdUpperBound(g.data_id_managerV));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+clearVertices(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	clearEdges(g);
+	releaseAll(g.data_id_managerV);
+	clear(g.data_vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void 
+clear(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+outDegree(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+		  TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	TSize count=0;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	for(TSize i=0;i< (TSize) ValueSize<TAlphabet>::VALUE; ++i) 
+		if ( (TVertexDescriptor) getTarget(&g.data_vertex[vertex].data_edge[i])!=nilVal) ++count;
+	return count;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+inDegree(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+		 TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	typedef typename Size<TGraph>::Type TSize;
+	TSize count=0;
+	typedef typename Iterator<String<AutomatonEdgeArray<TEdge, TAlphabet> > const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd; ++it, ++pos) {
+		if (idInUse(g.data_id_managerV, pos)) {
+			for(TSize i=0;i< (TSize) ValueSize<TAlphabet>::VALUE;++i) 
+				if ( (TVertexDescriptor) getTarget(&(*it).data_edge[i]) == vertex) ++count;			
+		}
+	}
+	return count;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+degree(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, 
+	   TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	return (inDegree(g,vertex)+outDegree(g,vertex));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+addVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph >::Type TEdge;
+
+	TVertexDescriptor vd = obtainId(g.data_id_managerV);
+	if (vd == length(g.data_vertex)) appendValue(g.data_vertex, AutomatonEdgeArray<TEdge, TAlphabet>()); 
+	else g.data_vertex[vd] =  AutomatonEdgeArray<TEdge, TAlphabet>();
+	return vd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, 
+			 TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+
+	removeOutEdges(g,v); // Remove all outgoing edges
+	removeInEdges(g,v); // Remove all incoming edges
+	releaseId(g.data_id_managerV, v); // Release id
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel>
+inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+addEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target,
+		TLabel const label) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, source) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, target) == true)
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	
+	TEdgeDescriptor e = findEdge(g, source, (TAlphabet) label);
+	_assignId(e, obtainId(g.data_id_managerE));
+	assignTarget(e, target);
+	return e;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel, typename TEdgeCargo>
+inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+addEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, 
+				  TVertexDescriptor const source, 
+				  TVertexDescriptor const target,
+				  TLabel const label,
+				  TEdgeCargo const cargo)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TId;
+	TEdgeDescriptor e = addEdge(g,source,target, (TAlphabet) label);
+	assignCargo(e,cargo);
+	TId id = obtainId(g.data_id_managerE);
+	_assignId(e, id);
+	return e;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel>
+inline void
+removeEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+	       TVertexDescriptor const source,
+	       TVertexDescriptor const target,
+		   TLabel const label)
+{
+	SEQAN_CHECKPOINT;
+    (void) source;  // If compiled without assertions.
+    (void) target;  // If compiled without assertions.
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, source) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, target) == true)
+	removeEdge(g, &g.data_vertex[source].data_edge[ordValue((TAlphabet) label)]);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline void
+removeEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+		   TEdgeDescriptor const edge)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, _getId(edge)) == true)
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+
+	releaseId(g.data_id_managerE, _getId(edge));
+	assignTarget(edge, getNil<TVertexDescriptor>());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void
+removeOutEdges(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+			   TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TId;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	for(TSize i=0;i< (TSize) ValueSize<TAlphabet>::VALUE;++i) {
+		TEdgeDescriptor ed = &g.data_vertex[vertex].data_edge[i];
+		if ( (TVertexDescriptor) getTarget(ed) == nilVal) continue;
+		assignTarget(ed, nilVal);
+		releaseId(g.data_id_managerE, _getId(ed));
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void
+removeInEdges(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+			  TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TId;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	typedef typename Iterator<String<AutomatonEdgeArray<TEdge, TAlphabet> >, Standard>::Type TIter;
+	TIter it = begin(g.data_vertex, Standard());
+	TIter itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		if (idInUse(g.data_id_managerV, pos)) {
+			for(TSize i=0;i< (TSize) ValueSize<TAlphabet>::VALUE;++i) {
+				TEdgeDescriptor ed = &(value(it)).data_edge[i];
+				if (( (TVertexDescriptor) getTarget(ed) == nilVal) ||  ( (TVertexDescriptor) getTarget(ed) != vertex)) continue;
+				assignTarget(ed, nilVal);
+				releaseId(g.data_id_managerE, _getId(ed));	
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+targetVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> > const&,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return (getTarget(edge));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+sourceVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+		
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Size<TGraph>::Type TSize;
+
+	TSize table_length = ValueSize<TAlphabet>::VALUE;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	typedef typename Iterator<String<AutomatonEdgeArray<TEdge, TAlphabet> >, Standard>::Type TIter;
+	TIter it = begin(g.data_vertex, Standard());
+	TIter itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd; ++it, ++pos) {
+		if (idInUse(g.data_id_managerV, pos)) {
+			for(TSize i=0;i<table_length;++i) {
+				TEdgeDescriptor ed = &(*it).data_edge[i];
+				if (getTarget(ed) == nilVal) continue;
+				if (ed==edge) return pos;
+			}
+		}
+	}
+	// We should never reach this point
+	SEQAN_ASSERT(false)
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TMatrix>
+inline void
+getAdjacencyMatrix(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+				   TMatrix& mat) 
+{
+	SEQAN_CHECKPOINT
+
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Size<TMatrix>::Type TMatrixSize;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	TMatrixSize len = getIdUpperBound(g.data_id_managerV);
+	resize(mat, len*len, 0);
+	typedef typename Iterator<String<AutomatonEdgeArray<TEdge, TAlphabet> > const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		if (!idInUse(g.data_id_managerV, pos)) continue;
+		for(TSize i=0;i< (TSize) ValueSize<TAlphabet>::VALUE;++i) {
+			if (((*it).data_edge[i].data_target!=nilVal))
+			{
+				TVertexDescriptor const source = pos;
+				TVertexDescriptor const target = (*it).data_edge[i].data_target;
+				++mat[source*len+target];
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel>
+inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+findEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+		 TVertexDescriptor const v,
+		 TLabel const c)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	return &g.data_vertex[v].data_edge[ordValue((TAlphabet) c)];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel>
+inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+findEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+		 TVertexDescriptor const v,
+		 TLabel const c)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	TGraph* graph = const_cast<TGraph*>(&g);
+	return findEdge(*graph, v, c);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TAlphabet, typename TCargo, typename TSpec, typename TIDString>
+inline void
+write(TFile & target,
+	  Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+	  TIDString const &,
+	  Raw)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	typedef typename Size<TAlphabet>::Type TSize;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+
+	_streamWrite(target,"Automaton - State: (Input / NextState)\n");
+	typedef typename Iterator<String<AutomatonEdgeArray<TEdge, TAlphabet> > const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		if (!idInUse(g.data_id_managerV, pos)) continue;
+		TVertexDescriptor sourceVertex = pos;
+		_streamPutInt(target, sourceVertex);
+		_streamWrite(target,": ");
+		for(TSize i=0;i< (TSize) ValueSize<TAlphabet>::VALUE;++i) {
+			_streamPut(target, ' ');
+			_streamPut(target, '(');
+			_streamPut(target, TAlphabet(i));
+			_streamPut(target, ' ');
+			_streamPut(target, '/');
+			_streamPut(target, ' ');
+			if (g.data_vertex[sourceVertex].data_edge[i].data_target ==  nilVal) _streamWrite(target,"nil");
+			else _streamPutInt(target, g.data_vertex[sourceVertex].data_edge[i].data_target);
+			_streamPut(target, ')');
+			_streamPut(target, ' ');
+		}
+		_streamPut(target, '\n');
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.createRoot:
+..cat:Graph
+..summary:Creates the root in a tree or an automaton.
+..signature:createRoot(g)
+..param.g:A tree or an automaton.
+...type:Spec.Automaton
+...type:Spec.Tree
+..returns:void
+..include:seqan/graph_types.h
+*/
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+createRoot(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	g.data_root = addVertex(g);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignRoot:
+..cat:Graph
+..summary:Assigns a new root vertex to the graph.
+..signature:assignRoot(g, vertex)
+..param.g:A tree or automaton.
+...type:Spec.Automaton
+...type:Spec.Tree
+..param.vertex:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:void
+..see:Function.getRoot
+..see:Function.root
+..see:Function.Graph#isRoot
+..include:seqan/graph_types.h
+*/
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void
+assignRoot(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+		   TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	g.data_root = vertex;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.root:
+..cat:Graph
+..summary:Gets a reference to the root of the tree.
+..signature:root(g)
+..param.g:A tree or an automaton.
+...type:Spec.Automaton
+...type:Spec.Tree
+..returns:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..see:Function.getRoot
+..see:Function.assignRoot
+..see:Function.Graph#isRoot
+..include:seqan/graph_types.h
+*/
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type&
+root(Graph<Automaton<TAlphabet, TCargo, TSpec> > & g)
+{
+	SEQAN_CHECKPOINT
+	return g.data_root;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getRoot:
+..cat:Graph
+..summary:Get method for the root of a tree or an automaton.
+..signature:getRoot(g)
+..param.g:An automaton or a tree.
+...type:Spec.Automaton
+...type:Spec.Tree
+..returns:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..see:Function.assignRoot
+..see:Function.root
+..see:Function.Graph#isRoot
+..include:seqan/graph_types.h
+*/
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+getRoot(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g)
+{
+	SEQAN_CHECKPOINT
+	return g.data_root;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.Graph#isRoot:
+..cat:Graph
+..summary:Tests whether a given vertex is the root or not.
+..signature:isRoot(g, v)
+..param.g:An automaton or a tree.
+...type:Spec.Automaton
+...type:Spec.Tree
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:True if vertex is the root.
+..see:Function.getRoot
+..see:Function.assignRoot
+..see:Function.root
+..include:seqan/graph_types.h
+*/
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline bool
+isRoot(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+	   TVertexDescriptor v)
+{
+	SEQAN_CHECKPOINT
+	return ( (TVertexDescriptor) g.data_root == v);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getSuccessor:
+..cat:Graph
+..summary:Gets the successor for a given vertex and an edge label.
+For an automaton a single character is required whereas for a word graph getSuccessor takes a string.
+..signature:getSuccessor(g, v, c)
+..signature:getSuccessor(g, v, str)
+..param.g:An automaton or a word graph.
+...type:Spec.Automaton
+...type:Spec.Word Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.c:A label.
+...type:Metafunction.Alphabet
+..param.str:A string.
+...type:Class.String
+..returns:A vertex descriptor or nil if successor is not defined.
+...type:Metafunction.VertexDescriptor
+..see:Function.parseString
+..see:Function.getNil
+..include:seqan/graph_types.h
+*/
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TChar>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+getSuccessor(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+			 TVertexDescriptor vertex,
+			 TChar const c) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+	return getTarget(findEdge(g, vertex, c));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.parseString:
+..cat:Graph
+..summary:Parses a string one character at a time and moves accordingly in the automaton.
+..signature:parseString(g, v, beginIt, endIt)
+..signature:parseString(g, v, str)
+..param.g:An automaton or a word graph.
+...type:Spec.Automaton
+...type:Spec.Word Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.beginIt:An iterator to the beginning of the string. (Input and Output)
+...type:Metafunction.Iterator.
+..param.endIt:An iterator to the end of the string.
+...type:Metafunction.Iterator.
+..param.str:A string.
+...type:Class.String
+..returns:The vertex descriptor of the state that was reached after parsing.
+...type:Metafunction.VertexDescriptor
+..returns.param.beginIt:Iterator to the first character that could not be parsed, 
+	or $endIt$ if the complete string was parsed.
+..remarks:The parsing stops before @Function.getSuccessor@ reaches the $nil$ state, 
+	or if the the complete sequences is read.
+..see:Function.getSuccessor
+..include:seqan/graph_types.h
+*/
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TIterator>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+parseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+			TVertexDescriptor const vertex,
+			TIterator & beginIt,
+			TIterator const & endIt)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	TVertexDescriptor succ = vertex;
+	while (beginIt!=endIt) {
+		TVertexDescriptor tmp = getSuccessor(g,succ,*beginIt);
+		if (tmp == nilVal) break;
+		succ = tmp;
+		++beginIt;
+	}
+	return succ;
+}
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TIterator>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+parseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+			TVertexDescriptor const vertex,
+			TIterator const & beginIt,
+			TIterator const & endIt)
+{
+	SEQAN_CHECKPOINT
+	TIterator beginIt2 = beginIt;
+	return parseString(g, vertex, beginIt2, endIt);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo,  typename TSpec, typename TVertexDescriptor, typename TCharacters>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+parseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+			TVertexDescriptor const vertex,
+			TCharacters const& chars)
+{
+	SEQAN_CHECKPOINT
+	return parseString(g,vertex,begin(chars),end(chars));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCharacters>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type 
+parseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g,
+			TVertexDescriptor const vertex,
+			TCharacters const* chars)
+{
+	SEQAN_CHECKPOINT
+	return parseString(g,vertex,chars,chars+length(chars));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.canParseString:
+..cat:Graph
+..summary:Test whether an automaton can parse a string completely.
+..signature:canParseString(g [, v], str)
+..param.g:An automaton or a word graph.
+...type:Spec.Automaton
+...type:Spec.Word Graph
+..param.v:A vertex descriptor. (optional)
+...type:Metafunction.VertexDescriptor
+...default:The @Function.root@ of $g$.
+..param.str:A string.
+...type:Class.String
+..returns:$true$ if $g$ parses $str$ starting at $v$ completely, $false$ otherwise.
+..see:Function.getSuccessor
+..see:Function.parseString
+..include:seqan/graph_types.h
+*/
+
+template<typename TAlphabet, typename TCargo,  typename TSpec, typename TVertexDescriptor, typename TCharacters>
+inline bool 
+canParseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const & g,
+			   TVertexDescriptor const vertex,
+			   TCharacters const & chars)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TCharacters const, Standard>::Type TIterator;
+	TIterator it = begin(chars, Standard());
+	TIterator it_end = end(chars, Standard());
+	parseString(g, vertex, it, it_end);
+	return (it == it_end);
+}
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCharacters>
+inline bool
+canParseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const & g,
+			   TVertexDescriptor const vertex,
+			   TCharacters const * chars)
+{
+	SEQAN_CHECKPOINT
+	typedef TCharacters const * TIterator;
+	TIterator it = begin(chars, Standard());
+	TIterator it_end = end(chars, Standard());
+	parseString(g, vertex, it, it_end);
+	return (it == it_end);
+}
+
+template<typename TAlphabet, typename TCargo,  typename TSpec, typename TCharacters>
+inline bool 
+canParseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > & g,
+			   TCharacters const & chars)
+{
+	SEQAN_CHECKPOINT
+	return canParseString(g, root(g), chars);
+}
+
+template<typename TAlphabet, typename TCargo,  typename TSpec, typename TCharacters>
+inline bool 
+canParseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > & g,
+			   TCharacters const * chars)
+{
+	SEQAN_CHECKPOINT
+	return canParseString(g, root(g), chars);
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_impl_directed.h b/src/SeqAn-1.3/seqan/graph_types/graph_impl_directed.h
new file mode 100644
index 0000000..109bd2f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_impl_directed.h
@@ -0,0 +1,1010 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_DIRECTED_H
+#define SEQAN_HEADER_GRAPH_IMPL_DIRECTED_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Directed
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Directed Graph:
+..cat:Graph
+..general:Class.Graph
+..summary:A directed graph that stores the edges in an adjacency list.
+..description:
+...image:directedGraph|A directed graph.
+..signature:Graph<Directed<TCargo, TSpec> >
+..param.TCargo:The cargo type that can be attached to the edges.
+...metafunction:Metafunction.Cargo
+...remarks:Use @Metafunction.Cargo@ to get the cargo type of a directed graph.
+...default:$void$
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+...remarks:Use WithoutEdgeId here to omit edge ids.
+Note: If edges do not store ids external property maps do not work.
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+template<typename TCargo, typename TSpec>
+class Graph<Directed<TCargo, TSpec> > 
+{
+	public:
+		typedef typename VertexIdHandler<Graph>::Type TVertexIdManager_;
+		typedef typename EdgeIdHandler<Graph>::Type TEdgeIdManager_;
+		typedef typename EdgeType<Graph>::Type TEdgeStump_;	
+		typedef Allocator<SinglePool<sizeof(TEdgeStump_)> > TAllocator_;
+		
+		String<TEdgeStump_*> data_vertex;			// Pointers to EdgeStump lists
+		TVertexIdManager_ data_id_managerV;
+		TEdgeIdManager_ data_id_managerE;		
+		TAllocator_ data_allocator;
+
+//____________________________________________________________________________
+
+
+		Graph() {
+			SEQAN_CHECKPOINT
+		}
+
+		~Graph() {
+			SEQAN_CHECKPOINT
+			clear(*this);
+		}
+
+		Graph(Graph const & _other) :
+			data_allocator(_other.data_allocator)
+		{
+			SEQAN_CHECKPOINT
+			_copyGraph(_other, *this);		
+		}
+	
+		Graph const& operator = (Graph const & _other) {
+			SEQAN_CHECKPOINT
+			if (this == &_other) return *this;
+			clear(*this);
+			data_allocator = _other.data_allocator;
+			_copyGraph(_other, *this);
+			return *this;
+		}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline String<typename EdgeType<Graph<Directed<TCargo, TSpec> > >::Type*>&
+_getVertexString(Graph<Directed<TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	return const_cast<String<TEdgeStump*>&>(g.data_vertex);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename VertexIdHandler<Graph<Directed<TCargo, TSpec> > >::Type&
+_getVertexIdManager(Graph<Directed<TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename VertexIdHandler<TGraph>::Type TVertexIdManager;
+	return const_cast<TVertexIdManager&>(g.data_id_managerV);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename EdgeIdHandler<Graph<Directed<TCargo, TSpec> > >::Type&
+_getEdgeIdManager(Graph<Directed<TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeIdHandler<TGraph>::Type TEdgeIdManager;
+	return const_cast<TEdgeIdManager&>(g.data_id_managerE);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Directed<TCargo, TSpec> > const& source,
+		   Graph<Directed<TCargo, TSpec> >& dest,
+		   bool transpose) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIter;
+	clear(dest);
+	resize(dest.data_vertex, length(_getVertexString(source)));
+	TIter itInit = begin(dest.data_vertex, Standard());
+	TIter itInitEnd = end(dest.data_vertex, Standard());
+	for(;itInit != itInitEnd; ++itInit) *itInit = (TEdgeStump*) 0;
+	TIterConst it = begin(source.data_vertex, Standard());
+	TIterConst itEnd = end(source.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it != itEnd; ++it, ++pos) {
+		TEdgeStump* current = *it;
+		TVertexDescriptor sourceVertex = pos;
+		while(current != (TEdgeStump*) 0) {
+			TVertexDescriptor targetVertex = current->data_target;
+			// Create missing vertices
+			if (sourceVertex>targetVertex) _createVertices(dest,sourceVertex);
+			else _createVertices(dest,targetVertex);
+			// Add edge
+			TEdgeDescriptor e;
+			if (!transpose) e = addEdge(dest, sourceVertex, targetVertex);
+			else e = addEdge(dest, targetVertex, sourceVertex);
+			_assignId(e, _getId(current));
+			assignCargo(e, getCargo(current));
+			current = getNextT(current);
+		}
+	}
+	dest.data_id_managerV = source.data_id_managerV;
+	dest.data_id_managerE = source.data_id_managerE;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Directed<TCargo, TSpec> > const& source,
+		   Graph<Directed<TCargo, TSpec> >& dest) 
+{
+	_copyGraph(source, dest, false);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.transpose:
+..cat:Graph
+..summary:Transposes a graph, either in-place or from source to dest.
+..signature:transpose(source [, dest])
+..param.source:Source graph.
+...type:Class.Graph
+..param.dest:Destination graph.
+...type:Class.Graph
+..returns:void
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec>
+inline void 
+transpose(Graph<Directed<TCargo, TSpec> > const& source,
+		  Graph<Directed<TCargo, TSpec> >& dest)
+{
+	SEQAN_CHECKPOINT
+	_copyGraph(source, dest, true);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void 
+transpose(Graph<Directed<TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	Graph<Directed<TCargo, TSpec> > dest;
+	_copyGraph(g, dest, true);
+	g = dest;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.numEdges:
+..cat:Graph
+..summary:Number of edges in a graph.
+..signature:numEdges(g)
+..param.g:A graph.
+...type:Class.Graph
+..returns:Number of edges.
+..see:Function.numVertices
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec>
+inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type 
+numEdges(Graph<Directed<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return idCount(g.data_id_managerE);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.numVertices:
+..cat:Graph
+..summary:Number of vertices in a graph.
+..signature:numVertices(g)
+..param.g:A graph.
+...type:Class.Graph
+..returns:Number of vertices.
+..see:Function.numEdges
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec>
+inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type 
+numVertices(Graph<Directed<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return idCount(g.data_id_managerV);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.empty:
+..cat:Graph
+..param.object.type:Class.Graph
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec>
+inline bool 
+empty(Graph<Directed<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return (!(idCount(g.data_id_managerV)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.clearEdges:
+..cat:Graph
+..summary:Removes all edges in a graph.
+..signature:clearEdges(g)
+..param.g:A graph.
+...type:Class.Graph
+..returns:void
+..see:Function.clearVertices
+..see:Function.clear
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec>
+inline void
+clearEdges(Graph<Directed<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIter;
+	TIter it = begin(g.data_vertex, Standard());
+	TIter itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it != itEnd; ++it, ++pos) 
+		if (*it != (TEdgeStump*) 0) removeOutEdges(g, pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.clearVertices:
+..cat:Graph
+..summary:Removes all vertices in a graph.
+..signature:clearVertices(g)
+..param.g:A graph.
+...type:Class.Graph
+..returns:void
+..see:Function.clearEdges
+..see:Function.clear
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec>
+inline void
+clearVertices(Graph<Directed<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearEdges(g);
+	releaseAll(g.data_id_managerV);
+	clear(g.data_vertex);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.clear:
+..cat:Graph
+..param.object.type:Class.Graph
+..remarks:If $object$ is a @Class.Graph.graph@, then all vertices and all edges are removed.
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec>
+inline void 
+clear(Graph<Directed<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.outDegree:
+..cat:Graph
+..summary:Number of outgoing edges for a given vertex.
+..signature:outDegree(g, vertex)
+..param.g:A graph.
+...type:Class.Graph
+..param.g:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:Number of out-edges.
+..see:Function.inDegree
+..see:Function.degree
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type 
+outDegree(Graph<Directed<TCargo, TSpec> > const& g, 
+		  TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TGraph>::Type TSize;
+	TSize count=0;
+	TEdgeStump* current = getValue(g.data_vertex, vertex);
+	while(current!=0) {
+		current = getNextT(current);
+		++count;
+	}
+	return count;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.inDegree:
+..cat:Graph
+..summary:Number of incoming edges for a given vertex.
+..signature:inDegree(g, vertex)
+..param.g:A graph.
+...type:Class.Graph
+..param.g:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:Number of in-edges.
+..see:Function.outDegree
+..see:Function.degree
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type 
+inDegree(Graph<Directed<TCargo, TSpec> > const& g, 
+		 TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+
+	TSize count=0;
+	for(;it!=itEnd;++it) {
+		TEdgeStump* current = *it;
+		while(current!=0) {
+			if ( (TVertexDescriptor) getTarget(current) == vertex) ++count;
+			current = getNextT(current);
+		}
+	}
+	return count;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.degree:
+..cat:Graph
+..summary:Number of incident edges for a given vertex.
+..signature:degree(g, vertex)
+..param.g:A graph.
+...type:Class.Graph
+..param.g:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:Number of incident edges.
+..see:Function.outDegree
+..see:Function.inDegree
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type 
+degree(Graph<Directed<TCargo, TSpec> > const& g, 
+	   TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	return (inDegree(g,vertex)+outDegree(g,vertex));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.addVertex:
+..cat:Graph
+..summary:Adds a new vertex to the graph.
+..signature:addVertex(g)
+..param.g:A graph.
+...type:Class.Graph
+..returns:A new vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..see:Function.removeVertex
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec> 
+inline typename VertexDescriptor<Graph<Directed<TCargo, TSpec> > >::Type 
+addVertex(Graph<Directed<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT	
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	TVertexDescriptor vd = obtainId(g.data_id_managerV);
+	if (vd == length(g.data_vertex)) appendValue(g.data_vertex, (TEdgeStump*) 0); 
+	else g.data_vertex[vd] = (TEdgeStump*) 0;
+	return vd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.removeVertex:
+..cat:Graph
+..summary:Removes a vertex.
+..signature:removeVertex(g, v)
+..param.g:A graph.
+...type:Class.Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:void
+..see:Function.addVertex
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeVertex(Graph<Directed<TCargo, TSpec> >& g, 
+			 TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+
+	removeOutEdges(g,v); // Remove all outgoing edges
+	removeInEdges(g,v); // Remove all incoming edges
+	releaseId(g.data_id_managerV, v); // Release id
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.addEdge:
+..cat:Graph
+..summary:Adds a new edge to the graph, either with or without cargo.
+..remarks:For automatons a label is required.
+..signature:addEdge(g, source, target [,cargo | ,label])
+..signature:addEdge(g, source, target [,label ,cargo])
+..param.g:A graph.
+...type:Class.Graph
+..param.source:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.target:A second vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.label:A label for the edge.
+...type:Metafunction.Alphabet
+...remarks:Can only be used with @Spec.Automaton at .
+..param.cargo:A cargo object.
+...type:Metafunction.Cargo
+..returns:A new edge descriptor.
+...type:Metafunction.EdgeDescriptor
+..see:Function.removeEdge
+..see:Function.addEdges
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename EdgeDescriptor<Graph<Directed<TCargo, TSpec> > >::Type 
+addEdge(Graph<Directed<TCargo, TSpec> >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, source) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, target) == true)
+
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Id<TGraph>::Type TId;
+
+	TEdgeStump* edge_ptr;
+	allocate(g.data_allocator, edge_ptr, 1);
+	valueConstruct(edge_ptr);
+	assignTarget(edge_ptr, target);
+	assignNextT(edge_ptr, (TEdgeStump*) 0);
+	TId id = obtainId(g.data_id_managerE);
+	_assignId(edge_ptr, id);
+	if (g.data_vertex[source]!=0) assignNextT(edge_ptr, getValue(g.data_vertex, source));
+	value(g.data_vertex, source)=edge_ptr;
+	return edge_ptr;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename EdgeDescriptor<Graph<Directed<TCargo, TSpec> > >::Type 
+addEdge(Graph<Directed<TCargo, TSpec> >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target,
+		TCargo const cargo) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor e = addEdge(g,source,target);
+	assignCargo(e,cargo);
+	return e;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.removeEdge:
+..cat:Graph
+..summary:Removes an edge from the graph. For automatons a label is required.
+..signature:removeEdge(g, source, target [, label])
+..signature:removeEdge(g, e)
+..param.g:A graph.
+...type:Class.Graph
+..param.source:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.target:A second vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.label:A label for the edge.
+...type:Metafunction.Alphabet
+...remarks:Required to remove an edge in an @Spec.Automaton at .
+..param.e:An edge descriptor.
+...type:Metafunction.EdgeDescriptor
+..returns:void
+..see:Function.addEdge
+..see:Function.addEdges
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeEdge(Graph<Directed<TCargo, TSpec> >& g, 
+		   TVertexDescriptor const source, 
+		   TVertexDescriptor const target) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, source) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, target) == true)
+	
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+
+	// Find edge and predecessor
+	TEdgeStump* pred = 0;
+	TEdgeStump* current = g.data_vertex[source];
+	while(current != (TEdgeStump*) 0) {
+		if ( (TVertexDescriptor) getTarget(current) == target) break;
+		pred = current;
+		current = getNextT(current);
+	}
+	
+	// Not found?
+	if (current == (TEdgeStump*) 0) return;
+	
+	// Relink the next pointer of predecessor
+	if (pred != (TEdgeStump*) 0) assignNextT(pred, getNextT(current));
+	else g.data_vertex[source] = getNextT(current);
+	
+	// Deallocate
+	releaseId(g.data_id_managerE, _getId(current));
+	valueDestruct(current);
+	deallocate(g.data_allocator, current, 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline void 
+removeEdge(Graph<Directed<TCargo, TSpec> >& g,
+		   TEdgeDescriptor const edge)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, sourceVertex(g,edge)) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, targetVertex(g,edge)) == true)
+	
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+
+	// Find edge and predecessor
+	TEdgeStump* pred = 0;
+	TEdgeStump* current = g.data_vertex[sourceVertex(g,edge)];
+	while(current != (TEdgeStump*) 0) {
+		if (current == edge) break;
+		pred = current;
+		current = getNextT(current);
+	}
+	
+	// Not found?
+	if (current == (TEdgeStump*) 0) return;
+	
+	// Relink the next pointer of predecessor
+	if (pred != (TEdgeStump*) 0) assignNextT(pred, getNextT(current));
+	else g.data_vertex[sourceVertex(g,edge)] = getNextT(current);
+	
+	// Deallocate
+	releaseId(g.data_id_managerE, _getId(current));
+	valueDestruct(current);
+	deallocate(g.data_allocator, current, 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.removeOutEdges:
+..cat:Graph
+..summary:Removes the outgoing edges of a given vertex.
+..signature:removeOutEdges(g, v)
+..param.g:A graph.
+...type:Class.Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:void
+..see:Function.removeInEdges
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeOutEdges(Graph<Directed<TCargo, TSpec> >& g, 
+			   TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	while(g.data_vertex[v] != (TEdgeStump*) 0) {
+		TVertexDescriptor target = targetVertex(g, g.data_vertex[v]);
+		removeEdge(g,v,target);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.removeInEdges:
+..cat:Graph
+..summary:Removes the incoming edges of a given vertex.
+..signature:removeInEdges(g, v)
+..param.g:A graph.
+...type:Class.Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:void
+..see:Function.removeOutEdges
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeInEdges(Graph<Directed<TCargo, TSpec> >& g, 
+			   TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIter;
+	TIter it = begin(g.data_vertex, Standard());
+	TIter itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		TEdgeStump* current = *it;
+		TVertexDescriptor const sourceVertex = pos;
+		while(current!=0) {
+			if ( (TVertexDescriptor) current->data_target==v) {
+				removeEdge(g, sourceVertex, v);
+				current = g.data_vertex[sourceVertex];
+			} else {
+				current = getNextT(current);
+			}
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.targetVertex:
+..cat:Graph
+..summary:Returns the target vertex of an edge.
+..remarks:In a tree the target vertex is always the child. 
+In an undirected graph the larger vertex descriptor of the two endpoints is the target.
+For an out-edge iterator the target is always the vertex the out-edge iterator has not been initialized with.
+..signature:targetVertex(g, e)
+..signature:targetVertex(it)
+..param.g:A graph.
+...type:Class.Graph
+..param.e:An edge descriptor.
+...type:Metafunction.EdgeDescriptor
+..param.it:An edge iterator.
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+..returns:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..see:Function.sourceVertex
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Directed<TCargo, TSpec> > >::Type 
+targetVertex(Graph<Directed<TCargo, TSpec> > const&,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return getTarget(edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.sourceVertex:
+..cat:Graph
+..summary:Returns the source vertex of an edge.
+..remarks:In a tree the source vertex is always the parent. 
+In an undirected graph the smaller vertex descriptor is the source.
+Note: If source vertices are not stored in the EdgeStump this operation is expensive.
+Consider using sourceVertex directly on an edge iterator where this operation is fast!
+..signature:sourceVertex(g, e)
+..signature:sourceVertex(it)
+..param.g:A graph.
+...type:Class.Graph
+..param.e:An edge descriptor.
+...type:Metafunction.EdgeDescriptor
+..param.it:An edge iterator.
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+..returns:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..see:Function.targetVertex
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Directed<TCargo, TSpec> > >::Type 
+sourceVertex(Graph<Directed<TCargo, TSpec> > const& g,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		TEdgeDescriptor current = *it;
+		while(current!=(TEdgeDescriptor) 0) {
+			if (current == edge) return pos;
+			current=getNextT(current);
+		}
+	}
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getAdjacencyMatrix:
+..cat:Graph
+..summary:Returns an adjacency matrix representation of the graph.
+..signature:getAdjacencyMatrix(g, mat)
+..param.g:In-parameter: A graph.
+...type:Class.Graph
+..param.mat:Out-parameter: A matrix.
+...type:Class.Matrix
+..returns:void
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TMatrix>
+inline void
+getAdjacencyMatrix(Graph<Directed<TCargo, TSpec> > const& g, 
+				   TMatrix& mat) 
+{
+	SEQAN_CHECKPOINT
+
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+    typedef typename Size<TGraph>::Type TGraphSize;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	typedef typename Value<TMatrix>::Type TMatValue;
+	TSize len = getIdUpperBound(g.data_id_managerV);
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+    clear(mat);
+	resize(mat, len * len, (TMatValue) 0);
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd; ++it, ++pos) {
+		TEdgeStump* current = *it;
+		TVertexDescriptor const source = pos;
+		while(current != (TEdgeStump*) 0) {
+			TVertexDescriptor target = targetVertex(g,current);
+			mat[source * len + target] = static_cast<TMatValue>(static_cast<TGraphSize>(mat[source * len + target]) + 1);
+			current = getNextT(current);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.findEdge:
+..cat:Graph
+..summary:Finds an edge. 
+..remarks:In an automaton an edge is uniquely defined by a vertex and a label.
+In all other graphs two adjacent vertices uniquely define an edge.
+If there are multiple edges between two vertices the behaviour is undefined.
+..signature:findEdge(g, v, c)
+..signature:findEdge(g, v, w)
+..param.g:A graph.
+...type:Class.Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.c:An edge label.
+...type:Metafunction.Alphabet
+..param.w:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:An edge descriptor or 0 if edge is not present. 
+Note: In automatons there is always a valid edge descriptor but the target may be nil.
+...type:Metafunction.EdgeDescriptor
+..include:seqan/graph_types.h
+*/
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename EdgeDescriptor<Graph<Directed<TCargo, TSpec> > >::Type 
+findEdge(Graph<Directed<TCargo, TSpec> > const& g,
+		 TVertexDescriptor const v,
+		 TVertexDescriptor const w)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, w) == true)
+	
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	
+	TEdgeStump* current = g.data_vertex[v];
+	while(current != (TEdgeStump*) 0) {
+		if ( (TVertexDescriptor) getTarget(current) == w) return current;
+		current = getNextT(current);
+	}
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec, typename TIDString>
+inline void
+write(TFile & target,
+	  Graph<Directed<TCargo, TSpec> > const& g,
+	  TIDString const &,
+	  Raw)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Directed<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	_streamWrite(target,"Adjacency list:\n");
+	for(;it!=itEnd;++it, ++pos) {
+		if (!idInUse(_getVertexIdManager(g), pos)) continue;
+		TEdgeStump* current = getValue(it);
+		_streamPutInt(target, pos);
+		_streamWrite(target," -> ");
+		while(current!=0) {
+			_streamPutInt(target, getTarget(current));
+			_streamPut(target, ',');
+			current=getNextT(current);
+		}
+		_streamPut(target, '\n');
+	}
+	it = begin(g.data_vertex, Standard());
+	pos = 0;
+	_streamWrite(target,"Edge list:\n");
+	for(;it!=itEnd;++it, ++pos) {
+		TEdgeStump* current = getValue(it);
+		while(current!=0) {
+			_streamWrite(target,"Source: ");
+			_streamPutInt(target, pos);		
+			_streamPut(target, ',');
+			_streamWrite(target,"Target: ");
+			_streamPutInt(target, getTarget(current));
+			_streamPut(target, ' ');
+			_streamWrite(target,"(Id: ");
+			_streamPutInt(target, _getId(current));
+			_streamPut(target, ')');
+			_streamPut(target, '\n');
+			current=getNextT(current);
+		}
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_impl_fragment.h b/src/SeqAn-1.3/seqan/graph_types/graph_impl_fragment.h
new file mode 100644
index 0000000..f710c60
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_impl_fragment.h
@@ -0,0 +1,452 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_FRAGMENT_H
+#define SEQAN_HEADER_GRAPH_IMPL_FRAGMENT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Fragment Specs
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.ExactFragment:
+..cat:Alignments
+..general:Class.Fragment
+..summary:A type for ungapped, pairwise segment matches.
+..signature:Fragment<TSize, ExactFragment<TSpec> > 
+..param.TSize: The Size type of the underlying sequences.
+...metafunction:Metafunction.Size
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+..include:seqan/refinement.h
+..see:Spec.ExactReversableFragment
+*/
+template<typename TSpec = Default>
+struct ExactFragment;	
+
+
+
+/**
+.Spec.ExactReversableFragment:
+..cat:Alignments
+..general:Class.Fragment
+..summary:A type for ungapped, pairwise segment matches that may be in reverse orientation.
+..signature:Fragment<TSize, ExactReversableFragment<TSpec> > 
+..param.TSize: The Size type of the underlying sequences.
+...metafunction:Metafunction.Size
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+..remarks:Compared to the @Spec.ExactFragment@ specialzing type of @Class.Fragment@, a @Spec.ExactReversableFragment@ stores an additional bool value to indicate whether a match is in reverse orientation or not.
+..include:seqan/refinement.h
+..see:Spec.ExactFragment
+*/
+template<typename TSpec = Default>
+struct ExactReversableFragment;	
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Default Fragment is the exact one
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Class.Fragment:
+..cat:Alignments
+..summary:A type for ungapped, pairwise segment matches.
+..signature:Fragment<TSize, TSpec>
+..param.TSize:The size type of the underlying sequences.
+...metafunction:Metafunction.Size
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...XXdefault:@Spec.ExactFragment@
+..include:seqan/refinement.h
+*/
+
+
+template<typename TSize = typename Size<String<char> >::Type, typename TSpec = ExactFragment<> >
+class Fragment;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Size Metafunction
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize, typename TSpec>
+struct Size<Fragment<TSize, TSpec> > {
+	typedef TSize Type;
+};
+
+
+template<typename TSize, typename TSpec>
+struct Size<Fragment<TSize, TSpec> const> {
+	typedef TSize Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Exact Fragment
+//////////////////////////////////////////////////////////////////////////////
+	
+
+template<typename TSize, typename TSpec>
+class Fragment<TSize, ExactFragment<TSpec> > {
+ public:
+	 typedef typename Id<Fragment>::Type TId;
+	 TId seqId1;
+	 TSize begin1;
+	 TId seqId2;
+	 TSize begin2;
+	 TSize len;
+  
+	 Fragment()	 {}
+
+
+/**
+.Memfunc.Fragment#Fragment:
+..class:Class.Fragment
+..summary:Constructor.
+..signature:Fragment<TSize,TSpec>(seqId1, beg1, seqId2, beg2, len)
+..param.seqId1:The id of the first sequence.
+...type:Metafunction.Id
+..param.beg1:The TSize begin position on the first sequence.
+..param.seqId2:The id of the second sequence.
+...type:Metafunction.Id
+..param.beg2:The TSize begin position on the second sequence.
+..param.len:The TSize length of the segment match.
+*/
+	 Fragment(TId sqId1, TSize beg1, TId sqId2, TSize beg2, TSize l) :
+	 seqId1(sqId1), begin1(beg1), seqId2(sqId2), begin2(beg2), len(l) 
+	 {
+		 SEQAN_CHECKPOINT
+	 }
+
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Exact Fragment that is a forward or reverse match
+//////////////////////////////////////////////////////////////////////////////
+	
+
+template<typename TSize, typename TSpec>
+class Fragment<TSize, ExactReversableFragment<TSpec> > {
+ public:
+	 typedef typename Id<Fragment>::Type TId_;
+	 TId_ seqId1;
+	 TSize begin1;
+	 TId_ seqId2;
+	 TSize begin2;
+	 TSize len;
+	 bool reversed;
+  
+	 Fragment()	 {}
+
+	 Fragment(TId_ sqId1, TSize beg1, TId_ sqId2, TSize beg2, TSize l) :
+	 seqId1(sqId1), begin1(beg1), seqId2(sqId2), begin2(beg2), len(l), reversed(false) 
+	 {
+		 SEQAN_CHECKPOINT
+	 }
+/**
+.Memfunc.Fragment#Fragment:
+..class:Spec.ExactReversableFragment
+..signature:Fragment<TSize,ExactReversableFragment<TSpec> >(seqId1, beg1, seqId2, beg2, len, reversed)
+..param.reversed:True if the segments match in reverse orientation, false otherwise.
+*/
+	
+ 	 Fragment(TId_ sqId1, TSize beg1, TId_ sqId2, TSize beg2, TSize l, bool rev) :
+	 seqId1(sqId1), begin1(beg1), seqId2(sqId2), begin2(beg2), len(l), reversed(rev) 
+	 {
+		 SEQAN_CHECKPOINT
+	 }
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.label:
+..class:Class.Fragment
+..signature:label(f,str,seqId)
+..param.f:A fragment.
+...type:Class.Fragment
+..param.str:The string set underlying the fragment.
+..param.seqId:The id of the sequence for which the label should be retrieved.
+...remarks:
+*/
+template<typename TSize, typename TSpec, typename TStringSet, typename TVal>
+inline typename Infix<typename Value<TStringSet>::Type>::Type
+label(Fragment<TSize, TSpec> const& f,
+      TStringSet& str,
+      TVal const seqId)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Id<Fragment<TSize, TSpec> >::Type TId;
+	return ((TId) seqId == (f.seqId1)) ? infix(getValueById(str, (TId) seqId), f.begin1, f.begin1 + f.len) : infix(getValueById(str, (TId) seqId), f.begin2, f.begin2 + f.len);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.sequenceId:
+..Class.Fragment
+..signature:sequenceId(f,seqNum)
+..param.f:A fragment.
+...type:Class.Fragment
+..param.seqNum:The sequence number for which the id should be retrieved.
+...remarks:Note that @Class.Fragment@ stores information about exactly two sequences which can be accessed with seqNum 0 or 1, but whose ids may differ from their seqNum.
+*/
+template<typename TSize, typename TSpec, typename TVal>
+inline typename Id<Fragment<TSize, TSpec> >::Type
+sequenceId(Fragment<TSize, TSpec> const& f,
+		   TVal const seqId)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Id<Fragment<TSize, TSpec> >::Type TId;
+	return ((TId) seqId == 0) ? f.seqId1 : f.seqId2;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.fragmentBegin:
+..signature:fragmentBegin(f,seqNum)
+..param.f:A fragment.
+...type:Class.Fragment
+..param.seqNum:The sequence number for which the begin position should be retrieved.
+*/
+template<typename TSize, typename TSpec, typename TVal>
+inline TSize&
+fragmentBegin(Fragment<TSize, TSpec> const& f,
+			  TVal const seqId)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Id<Fragment<TSize, TSpec> >::Type TId;
+	return ((TId) seqId == f.seqId1) ? const_cast<TSize&>(f.begin1) : const_cast<TSize&>(f.begin2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize, typename TSpec, typename TVal>
+inline TSize&
+fragmentLength(Fragment<TSize, TSpec> const& f,
+			   TVal const)
+{
+	SEQAN_CHECKPOINT
+	return const_cast<TSize&>(f.len);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.fragmentLength:
+..class:Class.Fragment
+..signature:fragmentBegin(f)
+..param.f:A fragment.
+...type:Class.Fragment
+*/
+template<typename TSize, typename TSpec>
+inline TSize&
+fragmentLength(Fragment<TSize, TSpec> const& f)
+{
+	SEQAN_CHECKPOINT
+	return const_cast<TSize&>(f.len);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getProjectedPosition:
+..class:Class.Fragment
+..signature:getProjectedPosition(f,seqId,pos,seqId2,pos2)
+..summary:Projects a position of one sequence taking part in a pairwise match onto the other sequence.
+..signature:getProjectedPosition(f,seqId1,pos1,seqId2,pos2)
+..param.f:A fragment.
+...type:Class.Fragment
+..param.seqId:The id of the sequence to project from.
+...type:Metafunction.Id
+..param.pos:The position to project.
+...type:Metafunction.Size
+..param.seqId2:The resulting id of the sequence that pos was projected onto.
+...type:Metafunction.Id
+..param.pos2:The resulting projected position.
+...type:Metafunction.Size
+*/
+template<typename TSize, typename TSpec, typename TId1, typename TPosition1, typename TId2, typename TPosition2>
+inline void
+getProjectedPosition(Fragment<TSize, ExactFragment<TSpec> > const& f,
+					 TId1 const seqId,
+					 TPosition1 const pos,
+					 TId2& seqId2,
+					 TPosition2& pos2)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Id<Fragment<TSize, TSpec> >::Type TId;
+	
+	if ((TId) seqId == f.seqId1) {
+		SEQAN_ASSERT_TRUE((TPosition1)f.begin1<=pos);
+		SEQAN_ASSERT_TRUE(pos - f.begin1 < f.len)	;
+		pos2 = f.begin2 + (pos - f.begin1);
+		seqId2 = f.seqId2;
+		return;
+	} else {
+		SEQAN_ASSERT_TRUE((TPosition1)f.begin2<=pos);
+		SEQAN_ASSERT_TRUE(pos - f.begin2 < f.len);
+		pos2 = f.begin1 + (pos - f.begin2);
+		seqId2 = f.seqId1;
+		return;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize, typename TSpec, typename TValue, typename TId1, typename TPosition1, typename TId2, typename TPosition2>
+inline void
+getProjectedPosition(Fragment<TSize, ExactFragment<TSpec> > const& f,
+					TValue seg_num,
+					 TId1 const seqId,
+					 TPosition1 const pos,
+					 TId2& seqId2,
+					 TPosition2& pos2)
+{
+	SEQAN_CHECKPOINT;
+	  (void) seqId;  // When compiled without assertions.
+	typedef typename Id<Fragment<TSize, TSpec> >::Type TId;
+	SEQAN_ASSERT_TRUE((seg_num == 0 && seqId == f.seqId1) || (seg_num == 1 && seqId == f.seqId2));
+	
+	if (seg_num == 0) {
+		SEQAN_ASSERT_TRUE((TPosition1)f.begin1<=pos);
+		SEQAN_ASSERT_TRUE(pos - f.begin1 < f.len)	;
+		pos2 = f.begin2 + (pos - f.begin1);
+		seqId2 = f.seqId2;
+		return;
+	} else {
+		SEQAN_ASSERT_TRUE((TPosition1)f.begin2<=pos);
+		SEQAN_ASSERT_TRUE(pos - f.begin2 < f.len);
+		pos2 = f.begin1 + (pos - f.begin2);
+		seqId2 = f.seqId1;
+		return;
+	}
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSize, typename TSpec, typename TId1, typename TPosition1, typename TId2, typename TPosition2>
+inline void
+getProjectedPosition(Fragment<TSize, ExactReversableFragment<TSpec> > const& f,
+					 TId1 const seqId,
+					 TPosition1 const pos,
+					 TId2& seqId2,
+					 TPosition2& pos2)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Id<Fragment<TSize, TSpec> >::Type TId;
+	
+	if ((TId) seqId == f.seqId1) {
+		SEQAN_ASSERT_TRUE((TPosition1)f.begin1<=pos);
+		SEQAN_ASSERT_TRUE(pos - f.begin1 < f.len)	;
+		if (f.reversed) pos2 = (f.begin2 + f.len - 1) - (pos - f.begin1);
+		else pos2 = f.begin2 + (pos - f.begin1);
+		seqId2 = f.seqId2;
+		return;
+	} else {
+		SEQAN_ASSERT_TRUE((TPosition1)f.begin2<=pos);
+		SEQAN_ASSERT_TRUE(pos - f.begin2 < f.len);
+		if (f.reversed) pos2 = (f.begin1 + f.len - 1) - (pos - f.begin2);
+		else pos2 = f.begin1 + (pos - f.begin2);
+		seqId2 = f.seqId1;
+		return;
+	}
+}
+
+
+/////////////////////////////////////////////////////////////
+
+template<typename TSize, typename TSpec, typename TValue, typename TId1, typename TPosition1, typename TId2, typename TPosition2>
+inline void
+getProjectedPosition(Fragment<TSize, ExactReversableFragment<TSpec> > const& f,
+					 TValue seg_num,
+					 TId1 const seqId,
+					 TPosition1 const pos,
+					 TId2& seqId2,
+					 TPosition2& pos2)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Id<Fragment<TSize, TSpec> >::Type TId;
+	(void) seqId;  // When compiled without assertions.
+	SEQAN_ASSERT_TRUE((seg_num == 0 && seqId==f.seqId1) || (seg_num == 1 && seqId==f.seqId2));
+	
+	if (seg_num == 0) {
+		SEQAN_ASSERT_TRUE((TPosition1)f.begin1<=pos);
+		SEQAN_ASSERT_TRUE(pos - f.begin1 < f.len)	;
+		if (f.reversed) pos2 = (f.begin2 + f.len - 1) - (pos - f.begin1);
+		else pos2 = f.begin2 + (pos - f.begin1);
+		seqId2 = f.seqId2;
+		return;
+	} else {
+		SEQAN_ASSERT_TRUE((TPosition1)f.begin2<=pos);
+		SEQAN_ASSERT_TRUE(pos - f.begin2 < f.len);
+		if (f.reversed) pos2 = (f.begin1 + f.len - 1) - (pos - f.begin2);
+		else pos2 = f.begin1 + (pos - f.begin2);
+		seqId2 = f.seqId1;
+		return;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isReversed:
+..class:Class.Fragment
+..signature:isReversed<Fragment<TSize,ExactReversableFragment<TSpec> >(f)
+..summary:Returns true if the segment match is in reverse orientation.
+..signature:isReversed(f)
+..param.f:A fragment.
+...type:Class.Fragment
+*/
+template<typename TSize, typename TSpec>
+inline bool
+isReversed(Fragment<TSize, ExactReversableFragment<TSpec> > const& f)
+{
+	SEQAN_CHECKPOINT
+	return f.reversed;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_impl_hmm.h b/src/SeqAn-1.3/seqan/graph_types/graph_impl_hmm.h
new file mode 100644
index 0000000..a77374c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_impl_hmm.h
@@ -0,0 +1,1051 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_HMM_H
+#define SEQAN_HEADER_GRAPH_IMPL_HMM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - HMM
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Spec.Hmm:
+..cat:Graph
+..general:Class.Graph
+..summary:An Hmm is a directed graph with edges labeled with transition probabilities and emission profiles for each vertex.
+Vertices correspond to states in an HMM.
+..description:
+..signature:Graph<Hmm<TAlphabet, TCargo, TSpec> > 
+..param.TAlphabet:The alphabet type that is used for the emission profile in each vertex.
+...metafunction:Metafunction.Alphabet
+...remarks:Use @Metafunction.Alphabet@ to get the alphabet type.
+...default:$Dna$
+..param.TCargo:The cargo type that can be attached to the edges (the tranisition probabilities).
+...metafunction:Metafunction.Cargo
+...remarks:Use @Metafunction.Cargo@ to get the cargo type.
+...default:$double$
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+...remarks:Use WithoutEdgeId here to omit edge ids.
+Note: If edges do not store ids external property maps do not work.
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec>
+class Graph<Hmm<TAlphabet, TCargo, TSpec> > 
+{
+	public:
+		typedef typename VertexDescriptor<Graph>::Type TVertexDescriptor_;
+		
+		//HMM Model
+		Graph<Directed<TCargo, TSpec> > data_model;
+
+		//Emission probabilities
+		String<TCargo> data_emission;
+
+		//Silent state map
+		String<bool> data_silent;
+
+		//Begin and end state
+		TVertexDescriptor_ data_begin;
+		TVertexDescriptor_ data_end;
+
+	
+//____________________________________________________________________________
+
+		Graph() {
+		}
+
+
+		~Graph() {
+			SEQAN_CHECKPOINT
+			clear(*this);
+		}
+
+		Graph(Graph const & _other) 
+		{
+			SEQAN_CHECKPOINT
+			_copyGraph(_other, *this);	
+		}
+	
+		Graph const& operator = (Graph const & _other) {
+			SEQAN_CHECKPOINT
+			if (this == &_other) return *this;
+			clear(*this);
+			_copyGraph(_other, *this);
+			return *this;
+		}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline String<typename EdgeType<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type*>&
+_getVertexString(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	return const_cast<String<TEdgeStump*>&>(g.data_model.data_vertex);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename VertexIdHandler<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type&
+_getVertexIdManager(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexIdHandler<TGraph>::Type TVertexIdManager;
+	return const_cast<TVertexIdManager&>(g.data_model.data_id_managerV);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename EdgeIdHandler<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type&
+_getEdgeIdManager(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeIdHandler<TGraph>::Type TEdgeIdManager;
+	return const_cast<TEdgeIdManager&>(g.data_model.data_id_managerE);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& source,
+		   Graph<Hmm<TAlphabet, TCargo, TSpec> >& dest,
+		   bool transp) 
+{
+	SEQAN_CHECKPOINT
+	clear(dest);
+	if (transp) {
+		transpose(source.data_model, dest.data_model);
+		dest.data_emission = source.data_emission;
+		dest.data_silent = source.data_silent;
+		dest.data_begin = source.data_end;
+		dest.data_end = source.data_begin;
+	} else {
+		dest.data_model = source.data_model;
+		dest.data_emission = source.data_emission;
+		dest.data_silent = source.data_silent;
+		dest.data_begin = source.data_begin;
+		dest.data_end = source.data_end;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& source,
+		   Graph<Hmm<TAlphabet, TCargo, TSpec> >& dest) 
+{
+	_copyGraph(source, dest, false);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void 
+transpose(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& source,
+		  Graph<Hmm<TAlphabet, TCargo, TSpec> >& dest)
+{
+	SEQAN_CHECKPOINT
+	_copyGraph(source, dest, true);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void 
+transpose(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	Graph<Hmm<TAlphabet, TCargo, TSpec> > dest;
+	_copyGraph(g, dest, true);
+	g = dest;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+numEdges(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return numEdges(g.data_model);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+numVertices(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return numVertices(g.data_model);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline bool 
+empty(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return empty(g.data_model);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+clearEdges(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearEdges(g.data_model);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void
+clearVertices(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+
+	g.data_begin = 0;
+	g.data_end = 0;
+	clear(g.data_emission);
+	clear(g.data_silent);
+	clearVertices(g.data_model);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline void 
+clear(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+outDegree(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, 
+		  TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	return outDegree(g.data_model, vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+inDegree(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, 
+		 TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	return inDegree(g.data_model, vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+degree(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g,
+	   TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	return degree(g.data_model, vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec> 
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+addVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, 
+		  bool silent)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TAlphabet>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<String<TCargo>, Standard>::Type TEmisIter;
+	TSize alph_size = ValueSize<TAlphabet>::VALUE;
+
+	TVertexDescriptor vd = addVertex(g.data_model);
+	if (length(g.data_emission) / alph_size <= vd) resize(g.data_emission, (vd + 1) * alph_size, Generous());
+	if (length(g.data_silent) <= vd) resize(g.data_silent, (vd + 1), Generous());
+	g.data_silent[vd] = silent;
+	TEmisIter it = begin(g.data_emission, Standard());
+	it += vd * alph_size;
+	for(TSize counter = 0; counter < alph_size; ++counter, ++it) *it = (TCargo) 0.0;
+	return vd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec> 
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+addVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	return addVertex(g, false);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEmission> 
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+addVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+		  String<TEmission> const& emis)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TAlphabet>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<String<TCargo>, Standard>::Type TEmisIter;
+	typedef typename Iterator<String<TEmission>, Standard>::Type TInputIter;
+	TSize alph_size = ValueSize<TAlphabet>::VALUE;
+
+	SEQAN_ASSERT_TRUE(alph_size == length(emis));
+
+	TVertexDescriptor vd = addVertex(g);
+	TEmisIter it = begin(g.data_emission, Standard());
+	it += vd * alph_size;
+	TInputIter itIn = begin(emis, Standard());
+	for(TSize counter = 0; counter < alph_size; ++counter, ++itIn, ++it) *it = *itIn;
+	return vd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEmission> 
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+addVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+		  TEmission const& emis,
+		  bool silent)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TVertexDescriptor vd = addVertex(g, emis);
+	g.data_silent[vd] = silent;
+	return vd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, 
+			 TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	// Remove the vertex
+	removeVertex(g.data_model,v);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename EdgeDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+addEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target) 
+{
+	SEQAN_CHECKPOINT
+	return addEdge(g, source, target, (TCargo) 0.0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCargo2> 
+inline typename EdgeDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+addEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target,
+		TCargo2 const cargo) 
+{
+	SEQAN_CHECKPOINT
+	return addEdge(g.data_model, source, target, (TCargo) cargo);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, 
+		   TVertexDescriptor const source, 
+		   TVertexDescriptor const target) 
+{
+	SEQAN_CHECKPOINT
+	removeEdge(g.data_model, source, target);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline void 
+removeEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+		   TEdgeDescriptor const edge)
+{
+	SEQAN_CHECKPOINT
+	removeEdge(g.data_model, sourceVertex(g.data_model,edge), targetVertex(g.data_model,edge));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeOutEdges(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, 
+			   TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	removeOutEdges(g.data_model, v);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeInEdges(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+			  TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	removeInEdges(g.data_model,v);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor> 
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+targetVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return targetVertex(g.data_model, edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+sourceVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return sourceVertex(g.data_model, edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TMatrix>
+inline void
+getAdjacencyMatrix(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, 
+				   TMatrix& mat) 
+{
+	getAdjacencyMatrix(g.data_model, mat);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename EdgeDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type 
+findEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g,
+		 TVertexDescriptor const v,
+		 TVertexDescriptor const w)
+{
+	SEQAN_CHECKPOINT
+	return findEdge(g.data_model, v, w);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec, typename TIDString>
+inline void
+write(TFile & target,
+	  Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g,
+	  TIDString const &,
+	  Raw)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TAlphabet>::Type TSize;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIterConst;
+	TSize alph_size = ValueSize<TAlphabet>::VALUE;
+
+
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<String<TCargo> const, Standard>::Type TEmisIter;
+	
+	
+	// Alphabet
+	_streamWrite(target,"Alphabet:\n");
+	_streamPut(target,'{');
+	for(TSize counter = 0; counter<alph_size-1;++counter) {
+		_streamPut(target,TAlphabet(counter));
+		_streamPut(target,',');
+	}
+	_streamPut(target,TAlphabet(alph_size-1));
+	_streamPut(target,'}');
+	_streamPut(target,'\n');
+
+	// States
+	_streamWrite(target,"States:\n");
+	_streamPut(target,'{');
+	TIterConst it = begin(_getVertexString(g), Standard());
+	TIterConst itEnd = end(_getVertexString(g), Standard());
+	bool first = true;
+	for(TSize pos = 0;it!=itEnd;goNext(it), ++pos) {
+		if (!idInUse(_getVertexIdManager(g), pos)) continue;
+		if (!first) _streamPut(target,',');
+		else first = false;
+		_streamPutInt(target, pos);	
+		if (isSilent(g, pos)) _streamWrite(target," (Silent)");
+	}
+	_streamPut(target,'}');
+	_streamPut(target,'\n');
+
+	// Begin and end state
+	_streamWrite(target,"Begin state: ");
+	_streamPutInt(target, getBeginState(g));
+	_streamPut(target,'\n');
+	_streamWrite(target,"End state: ");
+	_streamPutInt(target, getEndState(g));
+	_streamPut(target,'\n');
+
+	// Transition probabilities
+	_streamWrite(target,"Transition probabilities:\n");
+	itEnd = end(_getVertexString(g));
+	it = begin(_getVertexString(g));
+	for(TSize pos = 0;it!=itEnd;goNext(it), ++pos) {
+		if (!idInUse(_getVertexIdManager(g), pos)) continue;
+		TEdgeStump* current = getValue(it);
+		_streamPutInt(target, pos);
+		_streamWrite(target," -> ");
+		first = true;
+		while(current!=0) {
+			if (!first) _streamPut(target, ',');
+			else first = false;
+			_streamPutInt(target, getTarget(current));
+			_streamWrite(target," (");
+			_streamPutFloat(target, cargo(current));
+			_streamWrite(target,") ");
+			current=getNextT(current);
+		}
+		_streamPut(target, '\n');
+	}
+
+	// Emission probabilities
+	_streamWrite(target,"Emission probabilities:\n");
+	TEmisIter itEmis = begin(g.data_emission, Standard());
+	itEnd = end(_getVertexString(g), Standard());
+	it = begin(_getVertexString(g), Standard());	
+	first = true;
+	for(TSize pos = 0;it!=itEnd;++it, ++pos) {
+		if (!idInUse(_getVertexIdManager(g), pos)) continue;
+		if (isSilent(g, pos)) continue;
+		if (!first) _streamPut(target,'\n');
+		else first = false;
+		_streamPutInt(target, pos);
+		_streamWrite(target,": ");
+		bool my_first = true;
+		itEmis = begin(g.data_emission, Standard());
+		itEmis += pos * alph_size;
+		for(TSize counter = 0; counter < alph_size; ++itEmis, ++counter) {
+			if (!my_first) _streamPut(target, ',');
+			else my_first = false;
+			_streamPut(target, TAlphabet(counter));
+			_streamWrite(target," (");
+			_streamPutFloat(target, *itEmis);
+			_streamWrite(target,") ");
+			
+		}
+	}
+
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignBeginState:
+..cat:Graph
+..summary:Assigns a begin state.
+..signature:assignBeginState(g, vertex)
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.vertex:The new begin state.
+...type:Metafunction.VertexDescriptor
+..returns:void.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void
+assignBeginState(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+				 TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(_getVertexIdManager(g), vertex) == true)
+
+	g.data_begin = vertex;
+	g.data_silent[vertex] = true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignEndState:
+..cat:Graph
+..summary:Assigns an end state.
+..signature:assignEndState(g, vertex)
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.vertex:The new end state.
+...type:Metafunction.VertexDescriptor
+..returns:void.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void
+assignEndState(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+			   TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(_getVertexIdManager(g), vertex) == true)
+
+	g.data_end = vertex;
+	g.data_silent[vertex] = true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.beginState:
+..cat:Graph
+..summary:Returns a reference to the begin state.
+..signature:beginState(g)
+..param.g:A HMM.
+...type:Spec.Hmm
+..returns:Reference to begin state.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type&
+beginState(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	return (g.data_begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.endState:
+..cat:Graph
+..summary:Returns a reference to the end state.
+..signature:endState(g)
+..param.g:A HMM.
+...type:Spec.Hmm
+..returns:Reference to end state.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type&
+endState(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	return (g.data_end);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getBeginState:
+..cat:Graph
+..summary:Returns the begin state.
+..signature:getBeginState(g)
+..param.g:A HMM.
+...type:Spec.Hmm
+..returns:Returns the begin state.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type
+getBeginState(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g)
+{
+	SEQAN_CHECKPOINT
+	return (g.data_begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getEndState:
+..cat:Graph
+..summary:Returns the end state.
+..signature:getEndState(g)
+..param.g:A HMM.
+...type:Spec.Hmm
+..returns:Returns the end state.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type
+getEndState(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g)
+{
+	SEQAN_CHECKPOINT
+	return (g.data_end);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getTransitionProbability:
+..cat:Graph
+..summary:Returns the transition probability.
+..signature:getTransitionProbability(g, [s1, s2 | e])
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.s1:State 1.
+...type:Metafunction.VertexDescriptor
+..param.s2:State 2.
+...type:Metafunction.VertexDescriptor
+..param.e:Edge between two states.
+...type:Metafunction.EdgeDescriptor
+..returns:Returns the transition probability.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline TCargo
+getTransitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g,
+						 TVertexDescriptor const state1,
+						 TVertexDescriptor const state2)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > const TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor e = findEdge(g, state1, state2);
+	if (e == 0) return 0.0;
+	else return cargo(e);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline TCargo
+getTransitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> > const&,
+						 TEdgeDescriptor const e)
+{
+	SEQAN_CHECKPOINT
+	return getCargo(e);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.transitionProbability:
+..cat:Graph
+..summary:Returns a reference to the transition probability.
+..signature:transitionProbability(g, [s1, s2 | e])
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.s1:State 1.
+...type:Metafunction.VertexDescriptor
+..param.s2:State 2.
+...type:Metafunction.VertexDescriptor
+..param.e:Edge connecting two states.
+...type:Metafunction.EdgeDescriptor
+..returns:Returns a reference to the transition probability.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline TCargo&
+transitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+					  TVertexDescriptor const state1,
+					  TVertexDescriptor const state2)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor e = findEdge(g, state1, state2);
+	return cargo(e);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline TCargo&
+transitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >&,
+					  TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return cargo(e);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignTransitionProbability:
+..cat:Graph
+..summary:Assigns a new transition probability.
+..signature:assignTransitionProbability(g, s1, s2, prob)
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.s1:State 1.
+...type:Metafunction.VertexDescriptor
+..param.s2:State 2.
+...type:Metafunction.VertexDescriptor
+..param.prob:New probability.
+..returns:void.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TTransProb>
+inline void
+assignTransitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+							TVertexDescriptor const state1,
+							TVertexDescriptor const state2,
+							TTransProb const t)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor e = findEdge(g, state1, state2);
+	cargo(e) = t;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor, typename TTransProb>
+inline void
+assignTransitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >&,
+							TEdgeDescriptor e,
+							TTransProb const t)
+{
+	SEQAN_CHECKPOINT
+	cargo(e) = t;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getEmissionProbability:
+..cat:Graph
+..summary:Returns the emission probability.
+..signature:getEmissionProbability(g, state, symbol)
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.state:A given state.
+...type:Metafunction.VertexDescriptor
+..param.symbol:A given symbol.
+...type:Metafunction.Alphabet
+..returns:Returns the emission probability.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline TCargo
+getEmissionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g,
+					   TVertexDescriptor const state,
+					   TAlphabet const symbol)
+{
+	SEQAN_CHECKPOINT
+
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TAlphabet>::Type TSize;
+	return g.data_emission[state * (TSize) ValueSize<TAlphabet>::VALUE + ordValue(symbol)];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.emissionProbability:
+..cat:Graph
+..summary:Returns a reference to the emission probability.
+..signature:emissionProbability(g, state, symbol)
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.state:A given state.
+...type:Metafunction.VertexDescriptor
+..param.symbol:A given symbol.
+...type:Metafunction.Alphabet
+..returns:Returns a reference to the emission probability.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline TCargo&
+emissionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+					TVertexDescriptor const state,
+					TAlphabet const symbol)
+{
+	SEQAN_CHECKPOINT
+
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TAlphabet>::Type TSize;
+	return g.data_emission[state * (TSize) ValueSize<TAlphabet>::VALUE + ordValue(symbol)];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignEmissionProbability:
+..cat:Graph
+..summary:Assigns a new emission probability.
+..signature:assignEmissionProbability(g, state, symbol, prob)
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.state:A given state.
+...type:Metafunction.VertexDescriptor
+..param.symbol:A given symbol.
+...type:Metafunction.Alphabet
+..param.prob:The new emission probability.
+..returns:void.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TEmisProb>
+inline void
+assignEmissionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+						  TVertexDescriptor const state,
+						  TAlphabet const symbol,
+						  TEmisProb const eProb)
+{
+	SEQAN_CHECKPOINT
+
+	typedef Graph<Hmm<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TAlphabet>::Type TSize;
+	g.data_emission[state * (TSize) ValueSize<TAlphabet>::VALUE + ordValue(symbol)] = (TCargo) eProb;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignSilentStatus:
+..cat:Graph
+..summary:Assigns a silent status to a state.
+..signature:assignBeginState(g, vertex, silent)
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.vertex:A state.
+...type:Metafunction.VertexDescriptor
+..param.silent:A boolean value which is true for silent states.
+..returns:void.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void
+assignSilentStatus(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+				   TVertexDescriptor const vertex,
+				   bool const silent)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(_getVertexIdManager(g), vertex) == true)
+	g.data_silent[vertex] = silent;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.silentStatus:
+..cat:Graph
+..summary:Reference to the silent status of a state.
+..signature:silentStatus(g, vertex)
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.vertex:A state.
+...type:Metafunction.VertexDescriptor
+..returns:Reference to silent status of the given state.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline bool&
+silentStatus(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g,
+			 TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	return g.data_silent[vertex];
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isSilent:
+..cat:Graph
+..summary:Indicates whether a state is silent or not.
+..signature:isSilent(g, vertex)
+..param.g:A HMM.
+...type:Spec.Hmm
+..param.vertex:A state.
+...type:Metafunction.VertexDescriptor
+..returns:The silent status of that state.
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline bool
+isSilent(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g,
+		 TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	return g.data_silent[vertex];
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_impl_oracle.h b/src/SeqAn-1.3/seqan/graph_types/graph_impl_oracle.h
new file mode 100644
index 0000000..73644ac
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_impl_oracle.h
@@ -0,0 +1,265 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_ORACLE_H
+#define SEQAN_HEADER_GRAPH_IMPL_ORACLE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Oracle
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Oracle:
+..cat:Graph
+..general:Class.Graph
+..summary:A factor oracle.
+..remarks:A factor oracle is a special automaton and thus, it is not implemented in its own class.
+It solely provides create functions where based upon a string an oracle is created.
+..signature:Graph<Automaton<TAlphabet, TCargo, TSpec> > 
+..param.TAlphabet:The alphabet type that is used for the transition labels.
+...metafunction:Metafunction.Alphabet
+...remarks:Use @Metafunction.Alphabet@ to get the type of the labels in an automaton.
+...default:$char$
+..param.TCargo:The cargo type that can be attached to the edges.
+...metafunction:Metafunction.Cargo
+...remarks:Use @Metafunction.Cargo@ to get the cargo type of an undirected graph.
+...default:$void$
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+...remarks:Use WithoutEdgeId here to omit edge ids.
+Note: If edges do not store ids external property maps do not work.
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TPropertyMap, typename TChar>
+inline void
+_addLetterToOracle(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+				   TPropertyMap& supplyState,
+				   TChar const c)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Size<TGraph>::Type TSize;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	TVertexDescriptor newState = addVertex(g);
+	TVertexDescriptor pred = newState - 1;
+	addEdge(g, pred, newState, c);
+	TVertexDescriptor k = getProperty(supplyState, pred);
+	while ((k!=nilVal) &&
+			(getTarget(&g.data_vertex[k].data_edge[ordValue(TAlphabet(c))])==nilVal))
+	{
+		addEdge(g,k,newState,c);
+		k = getProperty(supplyState, k);
+	}
+	TVertexDescriptor s;
+	if (k==nilVal) s=0;
+	else s = getTarget(&g.data_vertex[k].data_edge[ordValue(TAlphabet(c))]);
+	assignProperty(supplyState, newState, s);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.createOracle:
+..cat:Graph
+..summary:Creates a factor oracle.
+..signature:createOracle(g, text)
+..param.g:Out-parameter: An oracle.
+...type:Spec.Oracle
+..param.text:In-parameter: A string.
+...type:Class.String
+..returns:void
+..see:Function.createOracleOnReverse
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TText>
+inline void
+createOracle(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+			 TText const text)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Size<TText>::Type TSize;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	TSize len = length(text);
+	String<TVertexDescriptor> supplyState;
+	resize(supplyState, len+1);
+	TVertexDescriptor v1 = addVertex(g);
+	assignRoot(g,v1);
+	assignProperty(supplyState, v1, nilVal);
+	for(TSize i = 0; i<len; ++i) _addLetterToOracle(g, supplyState, getValue(text,i));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.createOracleOnReverse:
+..cat:Graph
+..summary:Creates a factor oracle for the reversed string.
+..signature:createOracleOnReverse(g, text)
+..param.g:Out-parameter: An oracle.
+...type:Spec.Oracle
+..param.text:In-parameter: A string.
+...type:Class.String
+..returns:void
+..see:Function.createOracle
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TText>
+inline void
+createOracleOnReverse(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+					  TText const text)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Size<TText>::Type TSize;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	TSize len = length(text);
+	String<TVertexDescriptor> supplyState;
+	resize(supplyState, len+1);
+	TVertexDescriptor v1 = addVertex(g);
+	assignRoot(g,v1);
+	assignProperty(supplyState, v1, nilVal);
+	for(TSize i = len-1; i>0; --i) _addLetterToOracle(g, supplyState, getValue(text,i));
+	_addLetterToOracle(g, supplyState, getValue(text,0));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TKeywords>
+inline void
+createSetOracle(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+				TTerminalStateMap& terminalStateMap,
+				TKeywords const& keywords)
+{
+SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Position<TKeywords>::Type TPos;
+	typedef typename Value<TKeywords>::Type TKeyword;
+	typedef typename Iterator<TKeyword, Standard>::Type TIterator;
+	typedef typename Value<TKeywords>::Type TValue;
+
+	createTrie(g, terminalStateMap, keywords);
+
+	String<TVertexDescriptor> supplyState;
+	resizeVertexMap(g, supplyState);
+	String<bool> visited;
+	resizeVertexMap(g, visited);
+	arrayFill(begin(visited), end(visited), false);
+
+	TVertexDescriptor nil = getNil<TVertexDescriptor>();
+	assignProperty(supplyState, root(g), nil);
+
+	TVertexDescriptor _root = getRoot(g);
+
+	TPos len = length(keywords);
+	String<TVertexDescriptor> _here_v;
+	resize(_here_v, len, _root);
+	String<TIterator> _here_it;
+	resize(_here_it, len);
+	for (TPos i = 0; i < len; ++i)
+	{
+		_here_it[i] = begin(keywords[i], Standard());
+	}
+	TPos _active_count = len;
+	while (_active_count)
+	{
+		for (TPos i = 0; i < len; ++i)
+		{
+			TIterator & it = _here_it[i];
+			TIterator it_end = end(keywords[i], Standard());
+			TVertexDescriptor & _parent = _here_v[i];
+			
+			if (it != it_end)
+			{
+				TVertexDescriptor _current = getSuccessor(g, _parent, *it);
+
+				if (!getProperty(visited, _current))
+				{
+					assignProperty(visited, _current, true);
+
+					TVertexDescriptor _down = getProperty(supplyState, _parent);
+					TVertexDescriptor _supply = _root;
+					while (_down != nil)
+					{
+						TVertexDescriptor _next = getSuccessor(g, _down, *it);
+						if (_next != nil)
+						{
+							_supply = _next;
+							break;
+						}
+
+						addEdge(g, _down, _current, *it);
+						_down = getProperty(supplyState, _down);
+					}
+					assignProperty(supplyState, _current, _supply);
+				}
+				_parent = _current;
+				++it;
+				if (it == it_end)
+				{
+					--_active_count;
+				}
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_impl_tree.h b/src/SeqAn-1.3/seqan/graph_types/graph_impl_tree.h
new file mode 100644
index 0000000..752fcc6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_impl_tree.h
@@ -0,0 +1,1101 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_TREE_H
+#define SEQAN_HEADER_GRAPH_IMPL_TREE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Tree
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Tree:
+..cat:Graph
+..general:Class.Graph
+..summary:A Tree has a distinct root and directed edges. The source vertex of each edge is the parent vertex, 
+the target vertex of each edge is the child. Trees provide fast access to child vertices and the parent.
+..description:
+...image:treeGraph|A tree, where $0$ is the root vertex.
+..signature:Graph<Tree<TCargo, TSpec> >
+..param.TCargo:The cargo type that can be attached to the edges.
+...metafunction:Metafunction.Cargo
+...remarks:Use @Metafunction.Cargo@ to get the cargo type of the tree.
+...default:$void$
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+template<typename TCargo, typename TSpec>
+class Graph<Tree<TCargo, TSpec> > 
+{
+	public:
+		typedef typename VertexIdHandler<Graph>::Type TVertexIdManager_;
+		typedef typename VertexDescriptor<Graph>::Type TVertexDescriptor_;
+		typedef typename EdgeType<Graph>::Type TEdgeStump_;	
+		typedef Allocator<SinglePool<sizeof(TEdgeStump_)> > TAllocator_;
+		
+		TVertexDescriptor_ data_root;
+		String<TEdgeStump_*> data_vertex;			// Pointers to EdgeStumpT lists
+		String<TVertexDescriptor_> data_parent;		// Map to the parents of each node
+		TVertexIdManager_ data_id_managerV;
+		TAllocator_ data_allocator;
+		
+
+//____________________________________________________________________________
+
+
+		Graph() : data_root(getNil<TVertexDescriptor_>()) {
+			SEQAN_CHECKPOINT
+		}
+
+
+		~Graph() {
+			SEQAN_CHECKPOINT
+			clear(*this);
+		}
+
+		Graph(Graph const & _other) :
+			data_root(getNil<TVertexDescriptor_>()),
+			data_allocator(_other.data_allocator)
+		{
+			SEQAN_CHECKPOINT
+			_copyGraph(_other, *this);		
+		}
+	
+		Graph const& operator = (Graph const & _other) {
+			SEQAN_CHECKPOINT
+			if (this == &_other) return *this;
+			clear(*this);
+			data_allocator = _other.data_allocator;
+			_copyGraph(_other, *this);
+			return *this;
+		}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline String<typename EdgeType<Graph<Tree<TCargo, TSpec> > >::Type*>&
+_getVertexString(Graph<Tree<TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	return const_cast<String<TEdgeStump*>&>(g.data_vertex);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline IdManager<typename Id<Graph<Tree<TCargo, TSpec> > >::Type, Default> const &
+_getVertexIdManager(Graph<Tree<TCargo, TSpec> > const& g) {
+	return g.data_id_managerV;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline IdManager<typename Id<Graph<Tree<TCargo, TSpec> > >::Type, Default> &
+_getVertexIdManager(Graph<Tree<TCargo, TSpec> >& g) {
+	return g.data_id_managerV;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline IdManager<typename Id<Graph<Tree<TCargo, TSpec> > >::Type, Default> const &
+_getEdgeIdManager(Graph<Tree<TCargo, TSpec> > const& g) {
+	return g.data_id_managerV;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline IdManager<typename Id<Graph<Tree<TCargo, TSpec> > >::Type, Default> &
+_getEdgeIdManager(Graph<Tree<TCargo, TSpec> >& g) {
+	return g.data_id_managerV;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec> 
+inline void
+_rebuildParentMap(Graph<Tree<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd; ++it, ++pos) {
+		TVertexDescriptor parent = pos;
+		TEdgeStump* current = *it;
+		while(current!=0) {
+			g.data_parent[getTarget(current)] = parent;
+			current = getNextT(current);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Tree<TCargo, TSpec> > const& source,
+		   Graph<Tree<TCargo, TSpec> >& dest,
+		   bool transpose) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIter;
+	clear(dest);
+	resize(dest.data_vertex, length(source.data_vertex));
+	resize(dest.data_parent, length(source.data_parent));
+	TIter itInit = begin(dest.data_vertex, Standard());
+	TIter itInitEnd = end(dest.data_vertex, Standard());
+	for(;itInit != itInitEnd; ++itInit) *itInit = (TEdgeStump*) 0;
+	TIterConst it = begin(source.data_vertex, Standard());
+	TIterConst itEnd = end(source.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		TEdgeStump* current = *it;
+		TVertexDescriptor parentVertex = pos;
+		while(current != (TEdgeStump*) 0) {
+			TVertexDescriptor childVertex = getTarget(current);
+			// Create missing vertices
+			if (parentVertex > childVertex) _createVertices(dest,parentVertex);
+			else _createVertices(dest,childVertex);
+			// Add edge
+			TEdgeDescriptor e;
+			if (!transpose) e = addEdge(dest, parentVertex, childVertex);
+			else e = addEdge(dest, childVertex, parentVertex);
+			assignCargo(e, getCargo(current));
+			current = getNextT(current);
+		}
+	}
+	dest.data_id_managerV = source.data_id_managerV;
+	dest.data_root = source.data_root;
+}
+
+template<typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Tree<TCargo, TSpec> > const& source,
+		   Graph<Tree<TCargo, TSpec> >& dest) 
+{
+	_copyGraph(source, dest, false); 
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+transpose(Graph<Tree<TCargo, TSpec> > const& source,
+		  Graph<Tree<TCargo, TSpec> >& dest)
+{
+	SEQAN_CHECKPOINT
+	_copyGraph(source, dest, true);
+	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+transpose(Graph<Tree<TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	Graph<Tree<TCargo, TSpec> > dest;
+	_copyGraph(g, dest, true);
+	g = dest;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type 
+numEdges(Graph<Tree<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TSize count=0;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	for(;it!=itEnd;++it) {
+		TEdgeStump* current = *it;
+		while(current!=0) {
+			++count;
+			current = getNextT(current);
+		}
+	}
+	return count;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type 
+numVertices(Graph<Tree<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return idCount(g.data_id_managerV);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline bool 
+empty(Graph<Tree<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return (!idCount(g.data_id_managerV));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+clearEdges(Graph<Tree<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIter;
+	TIter it = begin(g.data_vertex, Standard());
+	TIter itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		TEdgeStump* current = *it;
+		if(current != (TEdgeStump*) 0) {
+			g.data_parent[pos] = nilVertex;
+			removeOutEdges(g, pos);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+clearVertices(Graph<Tree<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearEdges(g);
+	releaseAll(g.data_id_managerV);
+	clear(g.data_vertex);
+	clear(g.data_parent);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void 
+clear(Graph<Tree<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type 
+outDegree(Graph<Tree<TCargo, TSpec> > const& g, 
+		  TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TGraph>::Type TSize;
+	TSize count=0;
+	TEdgeStump* current = g.data_vertex[vertex];
+	while(current!=0) {
+		current = getNextT(current);
+		++count;
+	}
+	return count;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type 
+inDegree(Graph<Tree<TCargo, TSpec> > const& g, 
+		 TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+	
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TSize count=0;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	for(;it!=itEnd;++it) {
+		TEdgeStump* current = *it;
+		while(current!=0) {
+			if ( (TVertexDescriptor) getTarget(current)==vertex) ++count;
+			current = getNextT(current);
+		}
+	}
+	return count;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type 
+degree(Graph<Tree<TCargo, TSpec> > const& g,
+	   TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	return (inDegree(g,vertex)+outDegree(g,vertex));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec> 
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+addVertex(Graph<Tree<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT	
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	TVertexDescriptor vd;
+	if (empty(g)) g.data_root = vd = obtainId(g.data_id_managerV);
+	else vd = obtainId(g.data_id_managerV);
+	if (vd == length(g.data_vertex)) {
+		appendValue(g.data_vertex, (TEdgeStump*) 0);
+		resize(g.data_parent, vd + 1, nilVertex, Generous());
+	} else {
+		g.data_vertex[vd] = (TEdgeStump*) 0;
+		g.data_parent[vd] = nilVertex;
+	}
+	return vd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeVertex(Graph<Tree<TCargo, TSpec> >& g, 
+			 TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	TEdgeStump* current = getValue(g.data_vertex, v);
+	while(current!=0) {
+		g.data_parent[childVertex(g, current)] = nilVertex;
+		current = getNextT(current);
+	}
+	g.data_parent[v] = nilVertex;
+	removeOutEdges(g,v); // Remove all outgoing edges
+	removeInEdges(g,v); // Remove all incoming edges
+	releaseId(g.data_id_managerV, v); // Release id
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename EdgeDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+addEdge(Graph<Tree<TCargo, TSpec> >& g, 
+		TVertexDescriptor const parent, 
+		TVertexDescriptor const child) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, parent) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, child) == true)
+	SEQAN_ASSERT(findEdge(g, parent, child) == 0) // No multi-graphs as trees!!!
+
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Id<TGraph>::Type TId;
+
+	TEdgeStump* edge_ptr;
+	allocate(g.data_allocator, edge_ptr, 1);
+	valueConstruct(edge_ptr);
+	assignTarget(edge_ptr, child);
+	g.data_parent[child] = parent;
+	assignNextT(edge_ptr, (TEdgeStump*) 0);
+	if (g.data_vertex[parent]!=0) assignNextT(edge_ptr, g.data_vertex[parent]);
+	g.data_vertex[parent]=edge_ptr;
+	return edge_ptr;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename EdgeDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+addEdge(Graph<Tree<TCargo, TSpec> >& g, 
+		TVertexDescriptor const parent, 
+		TVertexDescriptor const child,
+		TCargo const cargo) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor e = addEdge(g,parent,child);
+	assignCargo(e,cargo);
+	return e;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeEdge(Graph<Tree<TCargo, TSpec> >& g,
+		   TVertexDescriptor const parent,
+		   TVertexDescriptor const child) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, parent) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, child) == true)
+	
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+
+	// Find edge and predecessor
+	TEdgeStump* pred = 0;
+	TEdgeStump* current = g.data_vertex[parent];
+	while(current != (TEdgeStump*) 0) {
+		if ( (TVertexDescriptor) getTarget(current) == child) break;
+		pred = current;
+		current = getNextT(current);
+	}
+	
+	// Not found?
+	if (current == (TEdgeStump*) 0) return;
+	g.data_parent[child] = getNil<TVertexDescriptor>();
+	
+	// Relink the next pointer of predecessor
+	if (pred != (TEdgeStump*) 0) assignNextT(pred, getNextT(current));
+	else g.data_vertex[parent] = getNextT(current);
+	
+	// Deallocate
+	valueDestruct(current);
+	deallocate(g.data_allocator, current, 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline void 
+removeEdge(Graph<Tree<TCargo, TSpec> >& g,
+		   TEdgeDescriptor const edge)
+{
+	SEQAN_CHECKPOINT
+	removeEdge(g, parentVertex(g,edge), childVertex(g,edge));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeOutEdges(Graph<Tree<TCargo, TSpec> >& g, 
+			   TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	while(g.data_vertex[v] != (TEdgeStump*) 0) {
+		TVertexDescriptor target = targetVertex(g,g.data_vertex[v]);
+		removeEdge(g,v,target);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeInEdges(Graph<Tree<TCargo, TSpec> >& g,
+			  TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIter;
+	TIter it = begin(g.data_vertex, Standard());
+	TIter itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		if (!idInUse(g.data_id_managerV, pos)) continue;
+		TEdgeStump* current = *it;
+		TVertexDescriptor const sourceVertex = pos;
+		while(current!=0) {
+			if ( (TVertexDescriptor) current->data_target==v) {
+				removeEdge(g, sourceVertex, v);
+				current = g.data_vertex[sourceVertex];
+			} else {
+				current = getNextT(current);
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+targetVertex(Graph<Tree<TCargo, TSpec> > const&,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return getTarget(edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+sourceVertex(Graph<Tree<TCargo, TSpec> > const& g,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		TEdgeDescriptor current = *it;
+		while(current!=(TEdgeDescriptor) 0) {
+			if (current == edge) return pos;
+			current=getNextT(current);
+		}
+	}
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TMatrix>
+inline void
+getAdjacencyMatrix(Graph<Tree<TCargo, TSpec> > const& g, 
+				   TMatrix& mat) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TMatrix>::Type TSize;
+	TSize len = getIdUpperBound(g.data_id_managerV);
+	resize(mat, len*len, 0);
+	
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it,++pos) {
+		TVertexDescriptor parentV = pos;
+		TEdgeStump* current = *it;
+		while(current!=0) {
+			TVertexDescriptor childV = getTarget(current);
+			++mat[parentV*len+childV];
+			current=getNextT(current);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename EdgeDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+findEdge(Graph<Tree<TCargo, TSpec> >& g,
+		 TVertexDescriptor const v,
+		 TVertexDescriptor const w)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, w) == true)
+	
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+
+	if ((TVertexDescriptor)g.data_parent[w] == v) {
+		TEdgeStump* current = g.data_vertex[v];
+		while((TEdgeStump*) current != 0) {
+			if ((TVertexDescriptor) getTarget(current) == w) return current;
+			current = getNextT(current);
+		}
+	} else if ((TVertexDescriptor) g.data_parent[v] == w) {
+		TEdgeStump* current = g.data_vertex[w];
+		while((TEdgeStump*) current != 0) {
+			if ((TVertexDescriptor) getTarget(current) == v) return current;
+			current = getNextT(current);
+		}
+	}
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec, typename TIDString>
+inline void
+write(TFile & target,
+	  Graph<Tree<TCargo, TSpec> > const& g,
+	  TIDString const &,
+	  Raw)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	_streamWrite(target,"Adjacency list:\n");
+	for(;it!=itEnd;++it, ++pos) {
+		if (!idInUse(_getVertexIdManager(g),pos)) continue;
+		TEdgeStump* current = *it;
+		_streamPutInt(target, pos);
+		_streamWrite(target," -> ");
+		while(current!=0) {
+			_streamPutInt(target, getTarget(current));
+			_streamPut(target, ',');
+			current=getNextT(current);
+		}
+		_streamPut(target, '\n');
+	}
+	it = begin(g.data_vertex, Standard());
+	pos = 0;
+	_streamWrite(target,"Edge list:\n");
+	for(;it!=itEnd;++it, ++pos) {
+		TEdgeStump* current = getValue(it);
+		while(current!=0) {
+			_streamWrite(target,"Source: ");
+			_streamPutInt(target, pos);		
+			_streamPut(target, ',');
+			_streamWrite(target,"Target: ");
+			_streamPutInt(target, getTarget(current));
+			_streamPut(target, ' ');
+			_streamWrite(target,"(Id: ");
+			_streamPutInt(target, _getId(current));
+			_streamPut(target, ')');
+			_streamPut(target, '\n');
+			current=getNextT(current);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void
+assignRoot(Graph<Tree<TCargo, TSpec> >& g,
+		   TVertexDescriptor const vertex)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	
+	g.data_root = vertex;
+	g.data_parent[vertex] = getNil<TVertexDescriptor>();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+createRoot(Graph<Tree<TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	g.data_root = addVertex(g);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type&
+root(Graph<Tree<TCargo, TSpec> >& g)
+{
+	SEQAN_CHECKPOINT
+	return g.data_root;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+getRoot(Graph<Tree<TCargo, TSpec> > const& g)
+{
+	SEQAN_CHECKPOINT
+	return g.data_root;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline bool
+isRoot(Graph<Tree<TCargo, TSpec> > const& g,
+	   TVertexDescriptor v)
+{
+	SEQAN_CHECKPOINT
+	return ( (TVertexDescriptor) g.data_root == v);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.Graph#isLeaf:
+..cat:Graph
+..summary:Tests whether a given vertex is a leaf or not.
+..signature:isLeaf(g, v)
+..param.g:A tree.
+...type:Spec.Tree
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:True if vertex is a leaf.
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline bool
+isLeaf(Graph<Tree<TCargo, TSpec> > const& g,
+	   TVertexDescriptor v)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+	
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	return (g.data_vertex[v] ==  (TEdgeStump*) 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.numTreeEdges:
+..cat:Graph
+..summary:Number of tree edges.
+..signature:numTreeEdges(g)
+..param.g:A tree.
+...type:Spec.Tree
+..returns:Number of tree edges. Faster than numEdges for trees.
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec>
+inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type 
+numTreeEdges(Graph<Tree<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	if (empty(g)) return 0;
+	else return numVertices(g) - 1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.numChildren:
+..cat:Graph
+..summary:Number of children of a given tree vertex.
+..signature:numChildren(g, v)
+..param.g:A tree.
+...type:Spec.Tree
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:Number of children
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type 
+numChildren(Graph<Tree<TCargo, TSpec> > const& g,
+			TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	
+	return outDegree(g, vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.addChild:
+..cat:Graph
+..summary:Adds a new child vertex to a parent vertex.
+Optionally a cargo can be attached to the parent-child edge.
+..signature:addChild(g, parent [, cargo])
+..param.g:A tree.
+...type:Spec.Tree
+..param.parent:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.cargo:A cargo object.
+...type:Metafunction.Cargo
+..returns:A new vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..see:Function.removeChild
+..see:Function.removeAllChildren
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+addChild(Graph<Tree<TCargo, TSpec> >& g,
+		 TVertexDescriptor parent) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, parent) == true)
+	TVertexDescriptor child = addVertex(g);
+	addEdge(g,parent,child);
+	return child;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+addChild(Graph<Tree<TCargo, TSpec> >& g,
+		 TVertexDescriptor const parent,
+		 TCargo const cargo) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, parent) == true)
+	TVertexDescriptor child = addVertex(g);
+	addEdge(g,parent,child,cargo);
+	return child;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.removeChild:
+..cat:Graph
+..summary:Removes a child from the tree given a parent.
+..signature:removeChild(g, parent, child)
+..param.g:A tree.
+...type:Spec.Tree
+..param.parent:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.child:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:void
+..see:Function.addChild
+..see:Function.removeAllChildren
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeChild(Graph<Tree<TCargo, TSpec> >& g,
+			TVertexDescriptor const parent,
+			TVertexDescriptor const child)
+{
+	SEQAN_CHECKPOINT
+	if (!isLeaf(g,child)) removeAllChildren(g,child);
+	removeEdge(g,parent, child);  // Parent map is cleared in removeEdge
+	releaseId(g.data_id_managerV, child); // Release id
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.removeAllChildren:
+..cat:Graph
+..summary:Removes all children from the tree given a parent.
+..signature:removeChild(g, parent)
+..param.g:A tree.
+...type:Spec.Tree
+..param.parent:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:void
+..see:Function.addChild
+..see:Function.removeChild
+..include:seqan/graph_types.h
+*/
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeAllChildren(Graph<Tree<TCargo, TSpec> >& g, 
+				  TVertexDescriptor const parent) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, parent) == true)
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+
+	while(g.data_vertex[parent] != (TEdgeStump*) 0) {
+		TVertexDescriptor child = childVertex(g,g.data_vertex[parent]);
+		if (!isLeaf(g,child)) removeAllChildren(g,child);
+		removeEdge(g,parent, child);  // Parent map is cleared in removeEdge
+		releaseId(g.data_id_managerV, child); // Release id
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.childVertex:
+..cat:Graph
+..summary:Returns the child vertex of an edge.
+..signature:childVertex(g, e)
+..param.g:A tree.
+...type:Spec.Tree
+..param.e:An edge descriptor.
+...type:Metafunction.EdgeDescriptor
+..returns:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..see:Function.parentVertex
+..include:seqan/graph_types.h
+*/
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+childVertex(Graph<Tree<TCargo, TSpec> > const&,
+			TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return getTarget(edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.parentVertex:
+..cat:Graph
+..summary:Returns the parent vertex of an edge.
+..signature:parentVertex(g, e)
+..param.g:A tree.
+...type:Spec.Tree
+..param.e:An edge descriptor.
+...type:Metafunction.EdgeDescriptor
+..returns:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..see:Function.parentVertex
+..include:seqan/graph_types.h
+*/
+template<typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+parentVertex(Graph<Tree<TCargo, TSpec> > const& g,
+			 typename EdgeDescriptor<Graph<Tree<TCargo, TSpec> > >::Type const edge) 
+{
+	SEQAN_CHECKPOINT
+	return g.data_parent[getTarget(edge)];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type 
+parentVertex(Graph<Tree<TCargo, TSpec> > const& g,
+			 typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type const v) 
+{
+	SEQAN_CHECKPOINT
+	return g.data_parent[v];
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.collectLeaves:
+..cat:Graph
+..summary:Returns all leaves underneath a given vertex.
+..signature:collectLeaves(g, subtree_root, group)
+..param.g:A tree.
+...type:Spec.Tree
+..param.subtree_root:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..param.group:A group of vertex descriptors
+...type:Class.String
+..include:seqan/graph_types.h
+*/
+template<typename TCargo, typename TSpec, typename TVertexDescriptor, typename TGroup>
+inline void
+collectLeaves(Graph<Tree<TCargo, TSpec> > const& g,
+			  TVertexDescriptor const root,
+			  TGroup& group)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Tree<TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TId;
+	typedef typename Iterator<TGraph, AdjacencyIterator>::Type TAdjacencyIterator;
+
+	if (isLeaf(g, root)) appendValue(group, root, Generous());
+	else {
+		TAdjacencyIterator adjIt(g, root);
+		for(;!atEnd(adjIt);goNext(adjIt)) {
+			collectLeaves(g, *adjIt, group);
+		}
+	}
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_impl_trie.h b/src/SeqAn-1.3/seqan/graph_types/graph_impl_trie.h
new file mode 100644
index 0000000..750e887
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_impl_trie.h
@@ -0,0 +1,275 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_TRIE_H
+#define SEQAN_HEADER_GRAPH_IMPL_TRIE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Trie
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Trie:
+..cat:Graph
+..general:Class.Graph
+..summary:A keyword trie.
+..description:
+...image:trieGraph|A trie for the words announce, annual, and annually.
+..remarks:A keyword trie is a special automaton and thus, it is not implemented in its own class.
+It solely provides create functions where based upon a set of strings a keyword trie is created.
+..signature:Graph<Automaton<TAlphabet, TCargo, TSpec> > 
+..param.TAlphabet:The alphabet type that is used for the transition labels.
+...metafunction:Metafunction.Alphabet
+...remarks:Use @Metafunction.Alphabet@ to get the type of the labels in an automaton.
+...default:$char$
+..param.TCargo:The cargo type that can be attached to the edges.
+...metafunction:Metafunction.Cargo
+...remarks:Use @Metafunction.Cargo@ to get the cargo type of an undirected graph.
+...default:$void$
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+...remarks:Use WithoutEdgeId here to omit edge ids.
+Note: If edges do not store ids external property maps do not work.
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TKeyword, typename TPos>
+inline void
+_addStringToTrie(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+				 TTerminalStateMap& terminalStateMap,
+				 TKeyword const& str,
+				 TPos const& keywordIndex)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Size<TKeyword>::Type TSize;
+
+	TVertexDescriptor current = getRoot(g);
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	typename Iterator<TKeyword const, Rooted>::Type sIt = begin(str);
+	for(;!atEnd(sIt);goNext(sIt)) {
+		if (getSuccessor(g, current, *sIt) == nilVal) break;
+		current = getSuccessor(g, current, *sIt);
+	}
+	for(;!atEnd(sIt);goNext(sIt)) {
+		TVertexDescriptor newState = addVertex(g);
+		resize(terminalStateMap, numVertices(g), Generous());
+		assignProperty(terminalStateMap,newState,String<TPos>());
+		addEdge(g,current,newState,*sIt);
+		current = newState;
+	}
+	String<TPos> tmp = getProperty(terminalStateMap,current);
+	appendValue(tmp, keywordIndex);
+	assignProperty(terminalStateMap,current,tmp);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.createTrie:
+..cat:Graph
+..summary:Creates a trie.
+..signature:createTrie(g, terminalStateMap, keywords)
+..param.g:Out-parameter: An automaton.
+...type:Spec.Trie
+..param.terminalStateMap:Out-parameter: An external property map.
+...type:Class.External Property Map
+...remarks:The external property map must be a String<String<unsigned int> > because
+in every vertex of the trie a number of keywords can end. This is the case in the Aho-Corasick
+algorithm if one pattern is a suffix of another pattern! Hence, we must associate with every vertex a set of indices that correspond to keywords.
+..param.keywords:In-parameter: A set of strings.
+...type:Class.String
+..returns:void
+..see:Function.createTrieOnReverse
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TKeywords>
+inline void
+createTrie(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+		   TTerminalStateMap& terminalStateMap,
+		   TKeywords const& keywords)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Position<TKeywords>::Type TPos;
+	TVertexDescriptor root = addVertex(g);
+	assignRoot(g,root);
+	resize(terminalStateMap, numVertices(g), Generous());
+	assignProperty(terminalStateMap,root,String<TPos>());
+	typename Iterator<TKeywords const, Rooted>::Type it = begin(keywords);
+	for(;!atEnd(it);goNext(it)) _addStringToTrie(g,terminalStateMap,*it,position(it));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.createTrieOnReverse:
+..cat:Graph
+..summary:Creates a trie for all reversed keywords.
+..signature:createTrieOnReverse(g, terminalStateMap, keywords)
+..returns.param.g:Out-parameter: An automaton.
+...type:Spec.Trie
+..returns.param.terminalStateMap:Out-parameter: An external property map.
+...type:Class.External Property Map
+...remarks:The external property map must be a String<String<unsigned int> > because
+in every vertex of the trie a number of keywords can end. This is the case in the Aho-Corasick
+algorithm if one pattern is a suffix of another pattern! Hence, we must associate with every vertex a set of indices that correspond to keywords.
+..param.keywords:In-parameter: A set of strings.
+...type:Class.String
+..returns:void
+..see:Function.createTrie
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TKeywords>
+inline void
+createTrieOnReverse(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+					TTerminalStateMap& terminalStateMap,
+					TKeywords const& keywords)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Position<TKeywords>::Type TPos;
+	TVertexDescriptor root = addVertex(g);
+	assignRoot(g,root);
+	resize(terminalStateMap, numVertices(g), Generous());
+	assignProperty(terminalStateMap,root,String<TPos>());
+	typename Iterator<TKeywords const, Rooted>::Type it = begin(keywords);
+	for(;!atEnd(it);goNext(it)) {
+		typedef typename Value<TKeywords>::Type TKeyword;
+		TKeyword tmp;
+		typename Iterator<TKeyword const, Rooted>::Type sIt = end(*it);
+		while(!atBegin(sIt)) {
+			goPrevious(sIt);
+			appendValue(tmp,getValue(sIt));
+		}
+		_addStringToTrie(g,terminalStateMap,tmp,position(it));
+	}
+}
+
+
+
+/**
+.Function.createSuffixTrie:
+..cat:Graph
+..summary:Creates a trie of all suffixes of a text.
+..signature:createSuffixTrie(g, terminalStateMap, text)
+..param.g:Out-parameter: An automaton.
+...type:Spec.Trie
+..param.terminalStateMap:Out-parameter: An external property map.
+...type:Class.External Property Map
+...remarks:The external property map must be a String<String<unsigned int> >.
+..param.text:In-parameter: A text.
+...type:Class.String
+..returns:void
+..see:Function.createTrie
+..see:Function.createTrieOnReverse
+..include:seqan/graph_types.h
+*/
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TText>
+inline void
+createSuffixTrie(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+				 TTerminalStateMap& terminalStateMap,
+				 TText const& text)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Position<TText const>::Type TPosition;
+	TVertexDescriptor root = addVertex(g);
+	assignRoot(g,root);
+	resize(terminalStateMap, numVertices(g), Generous());
+	assignProperty(terminalStateMap,root,String<TPosition>());
+
+	for (TPosition i = 0; i < length(text); ++i)
+	{
+		_addStringToTrie(g,terminalStateMap,suffix(text, i),i);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TTexts>
+inline void
+createSetSuffixTrie(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g,
+					TTerminalStateMap& terminalStateMap,
+					TTexts const& texts)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Position<TTexts const>::Type TTextsPosition;
+	typedef typename Value<TTexts const>::Type TText;
+	typedef typename Position<TText const>::Type TPosition;
+
+	TVertexDescriptor root = addVertex(g);
+	assignRoot(g,root);
+	resize(terminalStateMap, numVertices(g), Generous());
+	assignProperty(terminalStateMap,root,String<TPosition>());
+
+	for (TTextsPosition j = 0; j < length(texts); ++j)
+	{
+		TText const & text = texts[j];
+		for (TPosition i = 0; i < length(text); ++i)
+		{
+			_addStringToTrie(g,terminalStateMap,suffix(text, i),j);
+		}
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_impl_undirected.h b/src/SeqAn-1.3/seqan/graph_types/graph_impl_undirected.h
new file mode 100644
index 0000000..ee56fa6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_impl_undirected.h
@@ -0,0 +1,819 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_UNDIRECTED_H
+#define SEQAN_HEADER_GRAPH_IMPL_UNDIRECTED_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Undirected
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Undirected Graph:
+..cat:Graph
+..general:Class.Graph
+..summary:An undirected graph that stores the edges in an adjacency list.
+..description:
+...image:undirectedGraph|An undirected graph with multiple components.
+..signature:Graph<Undirected<TCargo, TSpec> >
+..param.TCargo:The cargo type that can be attached to the edges.
+...metafunction:Metafunction.Cargo
+...remarks:Use @Metafunction.Cargo@ to get the cargo type of an undirected graph.
+...default:$void$
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+...remarks:Use WithoutEdgeId here to omit edge ids.
+Note: If edges do not store ids external property maps do not work.
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+template<typename TCargo,typename TSpec>
+class Graph<Undirected<TCargo, TSpec> > 
+{
+	public:
+		typedef typename VertexIdHandler<Graph>::Type TVertexIdManager_;
+		typedef typename EdgeIdHandler<Graph>::Type TEdgeIdManager_;
+		typedef typename EdgeType<Graph>::Type TEdgeStump_;	
+		typedef Allocator<SinglePool<sizeof(TEdgeStump_)> > TAllocator_;
+		
+		String<TEdgeStump_*> data_vertex;			// Pointers to EdgeStump lists
+		TVertexIdManager_ data_id_managerV;
+		TEdgeIdManager_ data_id_managerE;		
+		TAllocator_ data_allocator;
+
+//____________________________________________________________________________
+
+
+		Graph() {
+			SEQAN_CHECKPOINT
+		}
+
+
+		~Graph() {
+			SEQAN_CHECKPOINT
+			clear(*this);
+		}
+
+		Graph(Graph const & _other) :
+			data_allocator(_other.data_allocator)
+		{
+			SEQAN_CHECKPOINT
+			_copyGraph(_other, *this);		
+		}
+	
+		Graph const& operator = (Graph const & _other) {
+			SEQAN_CHECKPOINT
+			if (this == &_other) return *this;
+			clear(*this);
+			data_allocator = _other.data_allocator;
+			_copyGraph(_other, *this);
+			return *this;
+		}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline String<typename EdgeType<Graph<Undirected<TCargo, TSpec> > >::Type*>&
+_getVertexString(Graph<Undirected<TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	return const_cast<String<TEdgeStump*>&>(g.data_vertex);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename VertexIdHandler<Graph<Undirected<TCargo, TSpec> > >::Type&
+_getVertexIdManager(Graph<Undirected<TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexIdHandler<TGraph>::Type TVertexIdManager;
+	return const_cast<TVertexIdManager&>(g.data_id_managerV);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename EdgeIdHandler<Graph<Undirected<TCargo, TSpec> > >::Type&
+_getEdgeIdManager(Graph<Undirected<TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeIdHandler<TGraph>::Type TEdgeIdManager;
+	return const_cast<TEdgeIdManager&>(g.data_id_managerE);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Undirected<TCargo, TSpec> > const& source,
+		   Graph<Undirected<TCargo, TSpec> >& dest,
+		   bool) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIter;
+	clear(dest);
+	resize(dest.data_vertex, length(_getVertexString(source)));
+	TIter itInit = begin(dest.data_vertex, Standard());
+	TIter itInitEnd = end(dest.data_vertex, Standard());
+	for(;itInit!=itInitEnd; ++itInit) *itInit = (TEdgeStump*) 0;
+	TIterConst it = begin(source.data_vertex, Standard());
+	TIterConst itEnd = end(source.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		TEdgeStump* current = *it;
+		TVertexDescriptor sourceVertex = pos;
+		while(current != (TEdgeStump*) 0) {
+			TVertexDescriptor targetVertex = getTarget(current);
+
+			if (targetVertex != sourceVertex) {
+				// Create missing vertices, targetVertex is always bigger than sourceVertex
+				_createVertices(dest,targetVertex);
+			
+				// Add edge
+				TEdgeDescriptor e = addEdge(dest, sourceVertex, targetVertex);
+				_assignId(e, _getId(current));
+				assignCargo(e, getCargo(current));
+				current = getNextS(current);  // Follow the link belonging to the source id
+			} else {
+				// Do nothing here because we don't want to create edges twice!!!
+				current = getNextT(current);
+			}
+		}
+	}
+	dest.data_id_managerV = source.data_id_managerV;
+	dest.data_id_managerE = source.data_id_managerE;
+}
+
+
+template<typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Undirected<TCargo, TSpec> > const& source,
+		   Graph<Undirected<TCargo, TSpec> >& dest) 
+{
+	_copyGraph(source, dest, false); // Never transpose because undirected and transposed undirected graph are equal
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+transpose(Graph<Undirected<TCargo, TSpec> > const& source,
+		  Graph<Undirected<TCargo, TSpec> >& dest)
+{
+	SEQAN_CHECKPOINT
+	// Undirected graph, no transpose just copy
+	_copyGraph(source, dest, false);
+	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+transpose(Graph<Undirected<TCargo, TSpec> > const&)
+{
+	// Nothing to do
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type 
+numEdges(Graph<Undirected<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return idCount(g.data_id_managerE);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type 
+numVertices(Graph<Undirected<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return idCount(g.data_id_managerV);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline bool 
+empty(Graph<Undirected<TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return (!(idCount(g.data_id_managerV)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+clearEdges(Graph<Undirected<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*>, Standard>::Type TIter;
+
+	// Collect all edges
+	String<TEdgeDescriptor> edges;
+	TIter it = begin(g.data_vertex, Standard());
+	TIter itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd; ++it, ++pos) {
+		TEdgeStump* current = *it;
+		TVertexDescriptor sourceVertex = pos;
+		while(current != (TEdgeStump*) 0) {
+			if (getTarget(current) != sourceVertex) {
+				appendValue(edges, current, Generous());
+				current = getNextS(current);
+			}
+			// Do nothing here because we don't want to create edges twice!!!
+			else current = getNextT(current);
+		}
+		*it = (TEdgeStump*) 0;
+	}
+	SEQAN_ASSERT_TRUE(numEdges(g) == length(edges));
+
+	// Release all edges
+	typedef typename Iterator<String<TEdgeDescriptor>, Standard>::Type TStringIter;
+	TStringIter edgeIt = begin(edges, Standard());
+	TStringIter edgeEndIt = end(edges, Standard());
+	for(; edgeIt != edgeEndIt; ++edgeIt) {
+		valueDestruct(*edgeIt);
+		deallocate(g.data_allocator, *edgeIt, 1);	
+	}
+	releaseAll(g.data_id_managerE);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void
+clearVertices(Graph<Undirected<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearEdges(g);
+	releaseAll(g.data_id_managerV);
+	clear(g.data_vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+inline void 
+clear(Graph<Undirected<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearVertices(g);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type 
+outDegree(Graph<Undirected<TCargo, TSpec> > const& g, 
+		  TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TGraph>::Type TSize;
+	TSize count=0;
+	TEdgeStump* current = g.data_vertex[vertex];
+	while(current!=0) {
+		if ( (TVertexDescriptor) getTarget(current)==vertex) current = getNextT(current);
+		else current = getNextS(current);
+		++count;
+	}
+	return count;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type 
+inDegree(Graph<Undirected<TCargo, TSpec> > const& g, 
+		 TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	// In-degree and out-degree are equal for undirected graphs
+	return outDegree(g,vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type 
+degree(Graph<Undirected<TCargo, TSpec> > const& g,
+	   TVertexDescriptor const vertex) 
+{
+	return outDegree(g,vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec> 
+inline typename VertexDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type 
+addVertex(Graph<Undirected<TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	TVertexDescriptor vd = obtainId(g.data_id_managerV);
+	if (vd == length(g.data_vertex)) appendValue(g.data_vertex, (TEdgeStump*) 0, Generous()); 
+	else g.data_vertex[vd] = (TEdgeStump*) 0;
+	return vd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeVertex(Graph<Undirected<TCargo, TSpec> >& g, 
+			 TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+
+	removeOutEdges(g,v); // Remove all outgoing edges
+	releaseId(g.data_id_managerV, v); // Release id
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename EdgeDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type 
+addEdge(Graph<Undirected<TCargo, TSpec> >& g, 
+		TVertexDescriptor source, 
+		TVertexDescriptor target) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(source != target)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, source) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, target) == true)
+
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Id<TGraph>::Type TId;
+
+	// Source must be the smaller vertex id
+	if (source > target) {TVertexDescriptor tmp = target; target = source; source = tmp; }
+
+	TEdgeStump* edge_ptr;
+	allocate(g.data_allocator, edge_ptr, 1);
+	valueConstruct(edge_ptr);
+	assignSource(edge_ptr, source);
+	assignTarget(edge_ptr, target);
+	assignNextS(edge_ptr, (TEdgeStump*) 0);
+	assignNextT(edge_ptr, (TEdgeStump*) 0);
+	TId id = obtainId(g.data_id_managerE);
+	_assignId(edge_ptr, id);
+	if (g.data_vertex[source]!=0) assignNextS(edge_ptr, g.data_vertex[source]);
+	if (g.data_vertex[target]!=0) assignNextT(edge_ptr, g.data_vertex[target]);
+	g.data_vertex[source]=edge_ptr;
+	g.data_vertex[target]=edge_ptr;
+	return edge_ptr;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCargo2> 
+inline typename EdgeDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type 
+addEdge(Graph<Undirected<TCargo, TSpec> >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target,
+		TCargo2 const cargo) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(source != target)
+	
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor e = addEdge(g,source,target);
+	assignCargo(e,cargo);
+	return e;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeEdge(Graph<Undirected<TCargo, TSpec> >& g, 
+		   TVertexDescriptor const source, 
+		   TVertexDescriptor const target) 
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, source) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, target) == true)
+	
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+
+	// Find edge and source predecessor
+	TEdgeStump* predSource = 0;
+	TEdgeStump* current = g.data_vertex[source];
+	while(current != (TEdgeStump*) 0) {
+		TVertexDescriptor adjV = (TVertexDescriptor) getTarget(current);
+		if (adjV != source) {
+			if ( adjV == target) break;
+			predSource = current;
+			current = getNextS(current);
+		} else {
+			adjV = (TVertexDescriptor) getSource(current);
+			if ( adjV == target) break;
+			predSource = current;
+			current = getNextT(current);
+		}
+	}
+	
+	// Not found?
+	if (current == (TEdgeStump*) 0) return;
+
+	// Find edge and target predecessor
+	TEdgeStump* predTarget = 0;
+	current = g.data_vertex[target];
+	while(current != (TEdgeStump*) 0) {
+		TVertexDescriptor adjV = (TVertexDescriptor) getTarget(current);
+		if (adjV != target) {
+			if ( adjV == source) break;
+			predTarget = current;
+			current = getNextS(current);
+		} else {
+			adjV = (TVertexDescriptor) getSource(current);
+			if ( adjV == source) break;
+			predTarget = current;
+			current = getNextT(current);
+		}
+	}
+
+	
+	// Relink the next pointer of source predecessor
+	if (predSource != (TEdgeStump*) 0) {
+		if (source != (TVertexDescriptor) getTarget(current)) {
+			if (source != (TVertexDescriptor) getTarget(predSource)) assignNextS(predSource, getNextS(current));
+			else assignNextT(predSource, getNextS(current));
+		} else {
+			if (source != (TVertexDescriptor) getTarget(predSource)) assignNextS(predSource, getNextT(current));
+			else assignNextT(predSource, getNextT(current));
+		}
+	}
+	else {
+		if (source != (TVertexDescriptor) getTarget(current)) value(g.data_vertex, source) = getNextS(current);
+		else value(g.data_vertex, source) = getNextT(current);
+	}
+
+	// Relink the next pointer of target predecessor
+	if (predTarget != (TEdgeStump*) 0) {
+		if (target != (TVertexDescriptor) getTarget(current)) {
+			if (target != (TVertexDescriptor) getTarget(predTarget)) assignNextS(predTarget, getNextS(current));
+			else assignNextT(predTarget, getNextS(current));
+		} else {
+			if (target != (TVertexDescriptor) getTarget(predTarget)) assignNextS(predTarget, getNextT(current));
+			else assignNextT(predTarget, getNextT(current));
+		}
+	}
+	else {
+		if (target != (TVertexDescriptor) getTarget(current)) value(g.data_vertex, target) = getNextS(current);
+		else value(g.data_vertex, target) = getNextT(current);
+	}
+
+	// Deallocate
+	releaseId(g.data_id_managerE, _getId(current));
+	valueDestruct(current);
+	deallocate(g.data_allocator, current, 1);	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline void 
+removeEdge(Graph<Undirected<TCargo, TSpec> >& g,
+		   TEdgeDescriptor const edge)
+{
+	
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, sourceVertex(g,edge)) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, targetVertex(g,edge)) == true)
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TVertexDescriptor source = sourceVertex(g,edge);
+	TVertexDescriptor target = targetVertex(g,edge);
+
+	// Find edge and source predecessor
+	TEdgeStump* predSource = 0;
+	TEdgeStump* current = g.data_vertex[source];
+	while(current != (TEdgeStump*) 0) {
+		TVertexDescriptor adjV = (TVertexDescriptor) getTarget(current);
+		if (adjV != source) {
+			if ((adjV == target) && (current == edge)) break;
+			predSource = current;
+			current = getNextS(current);
+		} else {
+			adjV = (TVertexDescriptor) getSource(current);
+			if ((adjV == target) && (current == edge)) break;
+			predSource = current;
+			current = getNextT(current);
+		}
+	}
+	
+	// Not found?
+	if (current == (TEdgeStump*) 0) return;
+
+	// Find edge and target predecessor
+	TEdgeStump* predTarget = 0;
+	current = g.data_vertex[target];
+	while(current != (TEdgeStump*) 0) {
+		TVertexDescriptor adjV = (TVertexDescriptor) getTarget(current);
+		if (adjV != target) {
+			if ((adjV == source) && (current == edge)) break;
+			predTarget = current;
+			current = getNextS(current);
+		} else {
+			adjV = (TVertexDescriptor) getSource(current);
+			if ((adjV == source) && (current == edge)) break;
+			predTarget = current;
+			current = getNextT(current);
+		}
+	}
+
+	
+	// Relink the next pointer of source predecessor
+	if (predSource != (TEdgeStump*) 0) {
+		if (source != (TVertexDescriptor) getTarget(current)) {
+			if (source != (TVertexDescriptor) getTarget(predSource)) assignNextS(predSource, getNextS(current));
+			else assignNextT(predSource, getNextS(current));
+		} else {
+			if (source != (TVertexDescriptor) getTarget(predSource)) assignNextS(predSource, getNextT(current));
+			else assignNextT(predSource, getNextT(current));
+		}
+	}
+	else {
+		if (source != (TVertexDescriptor) getTarget(current)) value(g.data_vertex, source) = getNextS(current);
+		else value(g.data_vertex, source) = getNextT(current);
+	}
+
+	// Relink the next pointer of target predecessor
+	if (predTarget != (TEdgeStump*) 0) {
+		if (target != (TVertexDescriptor) getTarget(current)) {
+			if (target != (TVertexDescriptor) getTarget(predTarget)) assignNextS(predTarget, getNextS(current));
+			else assignNextT(predTarget, getNextS(current));
+		} else {
+			if (target != (TVertexDescriptor) getTarget(predTarget)) assignNextS(predTarget, getNextT(current));
+			else assignNextT(predTarget, getNextT(current));
+		}
+	}
+	else {
+		if (target != (TVertexDescriptor) getTarget(current)) value(g.data_vertex, target) = getNextS(current);
+		else value(g.data_vertex, target) = getNextT(current);
+	}
+
+	// Deallocate
+	releaseId(g.data_id_managerE, _getId(current));
+	valueDestruct(current);
+	deallocate(g.data_allocator, current, 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeOutEdges(Graph<Undirected<TCargo, TSpec> >& g, 
+			   TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	TEdgeDescriptor eD = g.data_vertex[v];
+	while(eD != (TEdgeStump*) 0) {
+		removeEdge(g,eD);
+		eD = g.data_vertex[v];
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeInEdges(Graph<Undirected<TCargo, TSpec> >& g, 
+			   TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	removeOutEdges(g,v);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type 
+targetVertex(Graph<Undirected<TCargo, TSpec> > const&,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return getTarget(edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type 
+sourceVertex(Graph<Undirected<TCargo, TSpec> > const&,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return getSource(edge);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TMatrix>
+inline void
+getAdjacencyMatrix(Graph<Undirected<TCargo, TSpec> > const& g, 
+				   TMatrix& mat) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TMatrix>::Type TSize;
+	TSize len = getIdUpperBound(g.data_id_managerV);
+	resize(mat, len*len, 0);
+
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	TVertexDescriptor pos = 0;
+	for(;it!=itEnd;++it, ++pos) {
+		TVertexDescriptor sourceV = pos;
+		TEdgeStump* current = *it;
+		while(current!=0) {
+			TVertexDescriptor adjV = getTarget(current);
+			if (adjV != sourceV) {
+				++mat[sourceV*len+adjV];
+				current=getNextS(current);
+			} else {
+				adjV = getSource(current);
+				++mat[sourceV*len+adjV];
+				current=getNextT(current);
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename EdgeDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type 
+findEdge(Graph<Undirected<TCargo, TSpec> > const& g,
+		 TVertexDescriptor const v,
+		 TVertexDescriptor const w)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, v) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, w) == true)
+	
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	
+	TEdgeStump* current = g.data_vertex[v];
+	while(current != (TEdgeStump*) 0) {
+		TVertexDescriptor adjV = getTarget(current);
+		if (adjV != v) {
+			if ( adjV == w) return current;
+			current=getNextS(current);
+		} else {
+			adjV = getSource(current);
+			if ( adjV == w) return current;
+			current=getNextT(current);
+		}
+	}
+	return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TCargo, typename TSpec, typename TIDString>
+inline void
+write(TFile & target,
+	  Graph<Undirected<TCargo, TSpec> > const& g,
+	  TIDString const &,
+	  Raw)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+	TIterConst it = begin(g.data_vertex, Standard());
+	TIterConst itEnd = end(g.data_vertex, Standard());
+	_streamWrite(target,"Adjacency list:\n");
+	TVertexDescriptor pos = 0;
+	for(;it != itEnd; ++it, ++pos) {
+		TVertexDescriptor sourceV = pos;
+		_streamPutInt(target, sourceV);
+		_streamWrite(target," -> ");
+		TEdgeStump* current = *it;
+		while(current!=0) {
+			TVertexDescriptor adjV = getTarget(current);
+			if (adjV != sourceV) {
+				_streamPutInt(target, adjV);
+				_streamPut(target, ',');
+				current=getNextS(current);
+			} else {
+				adjV = getSource(current);
+				_streamPutInt(target, adjV);
+				_streamPut(target, ',');
+				current=getNextT(current);
+			}
+		}
+		_streamPut(target, '\n');
+	}
+	it = begin(g.data_vertex, Standard());
+	pos = 0;
+	_streamWrite(target,"Edge list:\n");
+	for(; it != itEnd; ++it, ++pos) {
+		TVertexDescriptor sourceV = pos;
+		TEdgeStump* current = *it;
+		while(current!=0) {
+			TVertexDescriptor targetV = getTarget(current);
+			if (sourceV != targetV) {
+				_streamWrite(target,"Source: ");
+				_streamPutInt(target, sourceV);		
+				_streamPut(target, ',');
+				_streamWrite(target,"Target: ");
+				_streamPutInt(target, targetV);
+				_streamPut(target, ' ');
+				_streamWrite(target,"(Id: ");
+				_streamPutInt(target, _getId(current));
+				_streamPut(target, ')');
+				_streamPut(target, '\n');
+				current=getNextS(current);
+			} else {
+				current=getNextT(current);
+			}
+		}
+	}
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_impl_wordgraph.h b/src/SeqAn-1.3/seqan/graph_types/graph_impl_wordgraph.h
new file mode 100644
index 0000000..e13a9a3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_impl_wordgraph.h
@@ -0,0 +1,287 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_WORDGRAPH_H
+#define SEQAN_HEADER_GRAPH_IMPL_WORDGRAPH_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template <typename TSpec = Default>
+struct WordGraph;
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - WordGraph
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Word Graph:
+..cat:Graph
+..general:Spec.Automaton
+..summary:A special automaton that stores words instead of single characters along its edges.
+..signature:Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > >
+..param.TAlphabet:The alphabet type that is used for the words.
+...metafunction:Metafunction.Alphabet
+...remarks:Use @Metafunction.Alphabet@ to get the value type of the words.
+...default:$char$
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:$Default$, see @Tag.Default at .
+..include:seqan/graph_types.h
+*/
+template<typename TAlphabet, typename TSpec>
+class Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > 
+{
+	public:
+		typedef typename VertexIdHandler<Graph>::Type TVertexIdManager_;
+		typedef typename EdgeIdHandler<Graph>::Type TEdgeIdManager_;
+		typedef typename VertexDescriptor<Graph>::Type TVertexDescriptor_;
+		typedef typename EdgeType<Graph>::Type TEdge_;	
+
+		String<AutomatonEdgeArray<TEdge_, TAlphabet> > data_vertex;		// List of tables
+		TVertexIdManager_ data_id_managerV;
+		TEdgeIdManager_ data_id_managerE;
+		TVertexDescriptor_ data_root;
+
+
+//____________________________________________________________________________
+
+
+		Graph() : data_root(0) {
+			SEQAN_CHECKPOINT
+		}
+
+
+		~Graph() {
+			SEQAN_CHECKPOINT
+			clear(*this);
+		}
+
+		Graph(Graph const & _other) 
+		{
+			SEQAN_CHECKPOINT
+			_copyGraph(_other, *this);
+		}
+	
+		Graph const& operator = (Graph const & _other) {
+			SEQAN_CHECKPOINT
+			if (this == &_other) return *this;
+			_copyGraph(_other, *this);
+			return *this;
+		}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TSpec, typename TVertexDescriptor>
+inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type 
+addEdge(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target,
+		String<TAlphabet> const & label) 
+{
+	SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_TRUE(idInUse(g.data_id_managerV, source));
+	SEQAN_ASSERT_TRUE(idInUse(g.data_id_managerV, target));
+	
+	typedef Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename Id<TGraph>::Type TId;
+	
+	TAlphabet firstChar = getValue(label, 0);
+	TEdgeDescriptor e = findEdge(g, source, firstChar);
+	TId id = obtainId(g.data_id_managerE);
+	_assignId(e, id);
+	assignTarget(e, target);
+	String<TAlphabet> suf(suffix(label,1));
+	assignCargo(e, suf);
+	return e;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TChars>
+inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type 
+addEdge(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target,
+		TChars const* chars) 
+{
+	SEQAN_CHECKPOINT
+	return addEdge(g,source,target,String<TAlphabet>(chars));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TLabel, typename TEdgeCargo>
+inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type 
+addEdge(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > >& /*g*/, 
+		TVertexDescriptor const /*source*/, 
+		TVertexDescriptor const /*target*/,
+		TLabel const /*label*/,
+		TEdgeCargo const /*cargo*/)
+{
+	// No additional cargo allowed. Cargo is used for the words in the graph.
+	// Use external property map.
+	SEQAN_ASSERT(false)
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TSpec, typename TVertexDescriptor>
+inline void
+removeEdge(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target,
+		String<TAlphabet> const& label) 
+{
+	SEQAN_CHECKPOINT;
+	(void)target;  // In case it is compiled without assertions.
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, source) == true)
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, target) == true)
+
+	TAlphabet firstChar = getValue(label, 0);
+	removeEdge(g, findEdge(g,source, firstChar));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TAlphabet, typename TCargo, typename TSpec, typename TIDString>
+inline void
+write(TFile & target,
+	  Graph<Automaton<TAlphabet, TCargo, WordGraph<TSpec> > > const& g,
+	  TIDString const &,
+	  Raw)
+{
+	typedef Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	typedef typename Size<TAlphabet>::Type TSize;
+	TSize table_length = ValueSize<TAlphabet>::VALUE;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+
+	_streamWrite(target,"WordGraph - Directed:\n");
+	typedef typename Iterator<String<AutomatonEdgeArray<TEdge, TAlphabet> > const, Rooted>::Type TIterConst;
+	for(TIterConst it = begin(g.data_vertex);!atEnd(it);goNext(it)) {
+		if (!idInUse(g.data_id_managerV, position(it))) continue;
+		TVertexDescriptor sourceVertex = position(it);
+		for(TSize i=0;i<table_length;++i) {
+			TEdge const* ed = &g.data_vertex[sourceVertex].data_edge[i];
+			if (getTarget(ed) ==  nilVal) continue;
+			_streamPutInt(target, sourceVertex);
+			_streamWrite(target,"->");
+			_streamPutInt(target, getTarget(ed));
+			_streamPut(target, ' ');
+			_streamPut(target, ' ');
+			_streamWrite(target, "Label: ");
+			_streamPut(target, TAlphabet(i));
+			_streamWrite(target, getCargo(ed));
+			_streamPut(target, '\n');
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TCharacters>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type 
+getSuccessor(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > const& g,
+			 TVertexDescriptor vertex,
+			 TCharacters const& chars)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+	typedef Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Size<TAlphabet>::Type TSize;
+	TEdgeStump* ed = findEdge(g, vertex, getValue(chars, 0));
+	if (getCargo(ed) == suffix(chars, 1)) {
+		return getTarget(ed);
+	} else {
+		return getNil<TVertexDescriptor>();
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TCharacters>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type 
+getSuccessor(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > const& g,
+			 TVertexDescriptor vertex,
+			 TCharacters const* chars)
+{
+	SEQAN_CHECKPOINT
+	return getSuccessor(g,vertex,String<TAlphabet>(chars));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TIterator>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type 
+parseString(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > const& g,
+			TVertexDescriptor const vertex,
+			TIterator beginIt,
+			TIterator endIt)
+{
+	SEQAN_CHECKPOINT
+	SEQAN_ASSERT(idInUse(g.data_id_managerV, vertex) == true)
+	typedef Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	TVertexDescriptor succ = vertex;
+	while (beginIt!=endIt) {
+		String<TAlphabet> label(*beginIt);
+		TSize range = 1;
+		TVertexDescriptor tmp = getSuccessor(g,succ,label);
+		while ((tmp == nilVal) &&
+				(beginIt+range != endIt))
+		{
+			appendValue(label, *(beginIt + range));
+			tmp = getSuccessor(g,succ,label);
+			++range;
+		}
+		if (tmp == nilVal) break;
+		succ = tmp;
+		beginIt = beginIt+range;
+	}
+	return succ;
+}
+
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_interface.h b/src/SeqAn-1.3/seqan/graph_types/graph_interface.h
new file mode 100644
index 0000000..ecddf6a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_interface.h
@@ -0,0 +1,465 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_INTERFACE_H
+#define SEQAN_HEADER_GRAPH_INTERFACE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+// Default directed graph
+template<typename TCargo = void, typename TSpec = Default>
+struct Directed;
+
+// Default undirected graph
+template<typename TCargo = void, typename TSpec = Default>
+struct Undirected;
+
+// Default Tree
+template<typename TCargo = void, typename TSpec = Default>
+struct Tree;
+
+// Default Automaton
+template<typename TAlphabet = char, typename TCargo = void, typename TSpec = Default>
+struct Automaton;
+
+// Default Hmm
+template<typename TAlphabet = Dna, typename TCargo = double, typename TSpec = Default>
+struct Hmm;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.Graph:
+..cat:Graph
+..summary:Generic graph.
+..signature:Graph<TSpec>
+..param.TSpec:The specializing type determines the kind of graph, e.g., directed, undirected, tree, or automaton.
+...remarks:The default Graph<> corresponds to a directed graph.
+...default:Directed<>
+..include:seqan/graph_types.h
+*/
+template<typename TSpec = Directed<> >
+class Graph;
+
+//////////////////////////////////////////////////////////////////////////////
+// General Graph Metafunction
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.Graph
+
+template<typename TSpec>
+struct Spec<Graph<TSpec> > 
+{
+	typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+struct Spec<Graph<TSpec> const>
+{
+	typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.EdgeDescriptor.param.T.type:Class.Graph
+
+template<typename TSpec>
+struct EdgeDescriptor<Graph<TSpec> > 
+{
+	typedef typename EdgeType<Graph<TSpec> >::Type* Type;
+};
+
+template<typename TSpec>
+struct EdgeDescriptor<Graph<TSpec> const>
+{
+	typedef typename EdgeType<Graph<TSpec> const>::Type* Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.VertexDescriptor.param.T.type:Class.Graph
+
+template<typename TSpec>
+struct VertexDescriptor<Graph<TSpec> > 
+{
+	typedef typename Id<Graph<TSpec> >::Type Type;
+};
+
+template<typename TSpec>
+struct VertexDescriptor<Graph<TSpec> const>
+{
+	typedef typename Id<Graph<TSpec> >::Type Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.EdgeType.param.T.type:Class.Graph
+
+template<typename TCargo, typename TSpec>
+struct EdgeType<Graph<Directed<TCargo, TSpec> > > {
+	typedef EdgeStump<TCargo, true, false, true, TSpec> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+struct EdgeType<Graph<Directed<TCargo, TSpec> > const> {
+	typedef EdgeStump<TCargo, true, false, true, TSpec> const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo>
+struct EdgeType<Graph<Directed<TCargo, WithoutEdgeId> > > {
+	typedef EdgeStump<TCargo, true, false, false, WithoutEdgeId> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo>
+struct EdgeType<Graph<Directed<TCargo, WithoutEdgeId> > const> {
+	typedef EdgeStump<TCargo, true, false, false, WithoutEdgeId> const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+struct EdgeType<Graph<Tree<TCargo, TSpec> > > {
+	typedef EdgeStump<TCargo, true, false, false, TreeTag> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+struct EdgeType<Graph<Tree<TCargo, TSpec> > const> {
+	typedef EdgeStump<TCargo, true, false, false, TreeTag> const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+struct EdgeType<Graph<Undirected<TCargo, TSpec> > > {
+	typedef EdgeStump<TCargo, true, true, true, TSpec> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TSpec>
+struct EdgeType<Graph<Undirected<TCargo, TSpec> > const> {
+	typedef EdgeStump<TCargo, true, true, true, TSpec> const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo>
+struct EdgeType<Graph<Undirected<TCargo, WithoutEdgeId> > > {
+	typedef EdgeStump<TCargo, true, true, false, WithoutEdgeId> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo>
+struct EdgeType<Graph<Undirected<TCargo, WithoutEdgeId> > const> {
+	typedef EdgeStump<TCargo, true, true, false, WithoutEdgeId> const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+struct EdgeType<Graph<Automaton<TAlphabet, TCargo, TSpec> > > {
+	typedef EdgeStump<TCargo, false, false, true, TSpec> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+struct EdgeType<Graph<Automaton<TAlphabet, TCargo, TSpec> > const> {
+	typedef EdgeStump<TCargo, false, false, true, TSpec> const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo>
+struct EdgeType<Graph<Automaton<TAlphabet, TCargo, WithoutEdgeId> > > {
+	typedef EdgeStump<TCargo, false, false, false, WithoutEdgeId> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo>
+struct EdgeType<Graph<Automaton<TAlphabet, TCargo, WithoutEdgeId> > const> {
+	typedef EdgeStump<TCargo, false, false, false, WithoutEdgeId> const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+struct EdgeType<Graph<Hmm<TAlphabet, TCargo, TSpec> > const> {
+	typedef typename EdgeType<Graph<Directed<TCargo, TSpec> > const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+struct EdgeType<Graph<Hmm<TAlphabet, TCargo, TSpec> > > {
+	typedef typename EdgeType<Graph<Directed<TCargo, TSpec> > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Cargo.param.T.type:Class.Graph
+
+template<typename TSpec>
+struct Cargo<Graph<TSpec> > {
+	typedef typename Cargo<typename EdgeType<Graph<TSpec> >::Type>::Type Type;
+};
+
+
+template<typename TSpec>
+struct Cargo<Graph<TSpec> const> {
+	typedef typename Cargo<typename EdgeType<Graph<TSpec> const>::Type>::Type Type;
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.EdgeIdHandler.param.T.type:Class.Graph
+
+template<typename TSpec>
+struct EdgeIdHandler<Graph<TSpec> const> {
+	typedef typename EdgeIdHandler<typename EdgeType<Graph<TSpec> const>::Type>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec>
+struct EdgeIdHandler<Graph<TSpec> > {
+	typedef typename EdgeIdHandler<typename EdgeType<Graph<TSpec> >::Type>::Type Type;
+};
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Alphabet.param.T.type:Class.Graph
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+struct Alphabet<Graph<Automaton<TAlphabet, TCargo, TSpec> > > {
+	typedef TAlphabet Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+struct Alphabet<Graph<Automaton<TAlphabet, TCargo, TSpec> > const> {
+	typedef TAlphabet Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+struct Alphabet<Graph<Hmm<TAlphabet, TCargo, TSpec> > > {
+	typedef TAlphabet Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TSpec>
+struct Alphabet<Graph<Hmm<TAlphabet, TCargo, TSpec> > const> {
+	typedef TAlphabet Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Generic Graph Functions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getNil:
+..cat:Graph
+..summary:Utility function returning a value that represents nil.
+Useful for various graph algorithms, e.g., missing predecessors, vertices that have not been visited, etc.
+..signature:getNil<T>()
+..returns:Pseudo nil value for type T.
+..include:seqan/graph_types.h
+*/
+template <typename T>
+inline T
+getNil(T *)
+{
+	return ~0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline T
+getNil()
+{
+SEQAN_CHECKPOINT
+	T * _tag = 0;
+	return getNil(_tag);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Purely internal!!! Never compare to _getInfinity()!!!.
+// Just returns a very large value.
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline T
+_getInfinity()
+{
+	T * _tag = 0;
+	return supremumValueImpl(_tag);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <>
+inline double
+_getInfinity()
+{
+	return 1000000000;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TWeightMap>
+inline typename Value<TWeightMap>::Type
+_getInfinityDistance(TWeightMap const&)
+{
+	// We need to divide by 2 because of addition in some graph algorithms: infinity + something
+	return (_getInfinity<typename Value<TWeightMap>::Type>()/2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline T
+_getInfinityDistance()
+{
+	return (_getInfinity<T>() / 2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// Simple _getId function to get the id for a vertex descriptor which is the id!
+template<typename TId>
+inline TId
+_getId(TId const id)
+{
+	SEQAN_CHECKPOINT
+	return id;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TVertexDescriptor>
+inline void
+_createVertices(Graph<TSpec>& g,
+				TVertexDescriptor const maxId) 
+{
+		// Create missing vertices
+		while (maxId >= getIdUpperBound(g.data_id_managerV)) addVertex(g);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.addEdges:
+..cat:Graph
+..summary:Shortcut to add multiple edges at once.
+Creates vertices implicitly.
+..signature:addEdge(g, edges, size)
+..param.g:A graph.
+...type:Class.Graph
+..param.edges:An array of vertex descriptors. It is assumed that the
+edges are stored in the following way: Source1, Target1, Source2, Target2, Source3, ...
+For a tree the root must be the first vertex in this array and the enumeration is Parent, Child, Parent, Child, ...
+...type:Metafunction.VertexDescriptor
+..param.size:Size of the array. Must be a multiple of 2.
+...type:Metafunction.Size
+..returns:void
+..see:Function.addEdge
+..include:seqan/graph_types.h
+*/
+template<typename TSpec, typename TEdgeArray, typename TSize>
+inline void
+addEdges(Graph<TSpec>& dest,
+		 TEdgeArray const & edges,
+		 TSize const size) 
+{
+	typedef typename VertexDescriptor<Graph<TSpec> >::Type TVertexDescriptor;
+	for(TSize i=0;i<size;++i) {
+		TVertexDescriptor source = edges[2*i];
+		TVertexDescriptor target = edges[2*i+1];
+		// Create missing vertices
+		if (source>target) _createVertices(dest,source);
+		else _createVertices(dest,target);
+		// Add edge
+		SEQAN_ASSERT(idInUse(dest.data_id_managerV, source) == true)
+		SEQAN_ASSERT(idInUse(dest.data_id_managerV, target) == true)
+		addEdge(dest, source, target);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename TSpec>
+inline TStream &
+operator << (TStream & target, 
+			 Graph<TSpec> const& source)
+{
+	write(target, source);
+	return target;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_iterator.h b/src/SeqAn-1.3/seqan/graph_types/graph_iterator.h
new file mode 100644
index 0000000..1f37723
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_iterator.h
@@ -0,0 +1,97 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ITERATOR_H
+#define SEQAN_HEADER_GRAPH_ITERATOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph Iterators
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec>
+struct GraphIterator;
+
+	// Vertex iterator
+	template <typename TSpec = Default>
+	struct InternalVertexIterator;
+
+	// Edge iterator
+	template <typename TSpec = Default>
+	struct InternalEdgeIterator;
+
+	// OutEdge iterator
+	template <typename TSpec = Default>
+	struct InternalOutEdgeIterator;
+
+	// Adjacency iterator
+	template <typename TSpec = Default>
+	struct InternalAdjacencyIterator;
+
+	// Bfs iterator
+	template <typename TSpec = Default>
+	struct InternalBfsIterator;
+
+	// Dfs iterator
+	template <typename TSpec = Default>
+	struct InternalDfsIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph Iterators - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Host.param.T.type:Class.Graph
+
+template<typename TGraph, typename TIteratorSpec>
+struct Host<Iter<TGraph, GraphIterator<TIteratorSpec> > >
+{	
+	typedef TGraph Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Host<Iter<TGraph const, GraphIterator<TIteratorSpec> > >
+{	
+	typedef TGraph const Type;
+};
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_iterator_adjacency.h b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_adjacency.h
new file mode 100644
index 0000000..71e7c8b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_adjacency.h
@@ -0,0 +1,346 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ITERATOR_ADJACENCY_H
+#define SEQAN_HEADER_GRAPH_ITERATOR_ADJACENCY_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Graph AdjacencyIterator
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Adjacency Iterator:
+..cat:Graph
+..summary:Adjacency iterator for @Class.Graph at .
+..signature:Iterator<TGraph, AdjacencyIterator>
+..param.TGraph:A graph.
+...type:Class.Graph
+..general:Class.Iter
+..see:Spec.Vertex Iterator
+..see:Spec.Out-Edge Iterator
+..see:Spec.Edge Iterator
+..see:Spec.Bfs Iterator
+..include:seqan/graph_types.h
+*/
+template<typename TGraph, typename TSpec>
+class Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > 
+{
+public:
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor_;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator_;
+	TOutEdgeIterator_ data_edge_it;
+
+	Iter()	
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph const& _graph, TVertexDescriptor_ const v) : 
+		data_edge_it(_graph, v)
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	~Iter() {
+		SEQAN_CHECKPOINT
+	}
+
+	Iter(Iter const& _iter) : data_edge_it(_iter.data_edge_it)
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_edge_it = _other.data_edge_it;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalAdjacencyIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph>
+struct Iterator<TGraph, AdjacencyIterator>
+{	
+	typedef Iter<TGraph, GraphIterator<InternalAdjacencyIterator<AdjacencyIterator> > > Type;
+};
+
+template<typename TGraph>
+struct Iterator<TGraph const, AdjacencyIterator>
+{	
+	typedef Iter<TGraph const, GraphIterator<InternalAdjacencyIterator<AdjacencyIterator> > > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph const, GraphIterator<InternalAdjacencyIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TIteratorSpec> > > >
+{
+	typedef typename Reference<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph const, GraphIterator<InternalAdjacencyIterator<TIteratorSpec> > > >
+{
+	typedef typename Reference<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TIteratorSpec> > > >
+{
+	typedef typename GetValue<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph const, GraphIterator<InternalAdjacencyIterator<TIteratorSpec> > > >
+{
+	typedef typename GetValue<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Spec<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TIteratorSpec> > > >
+{
+	typedef TIteratorSpec Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Spec<Iter<TGraph const, GraphIterator<InternalAdjacencyIterator<TIteratorSpec> > > >
+{
+	typedef TIteratorSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalAdjacencyIterator - Functions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > >::Type
+getValue(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return targetVertex(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > >::Type
+value(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return getValue(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > >::Type
+operator * (Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return value(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename Host<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > >::Type const&
+hostGraph(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return hostGraph(it.data_edge_it);
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+atBegin(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return atBegin(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+goBegin(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	goBegin(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+atEnd(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (atEnd(it.data_edge_it));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+goEnd(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	goEnd(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+goNext(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	goNext(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >&
+operator ++(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	goNext(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >
+operator ++(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > ret = it;
+	goNext(it);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+goPrevious(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	goPrevious(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >&
+operator --(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	goPrevious(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >
+operator --(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > ret = it;
+	goPrevious(it);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator ==(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_edge_it==it2.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator !=(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it2)
+{
+SEQAN_CHECKPOINT
+	return (it1.data_edge_it!=it2.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_iterator_bfs.h b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_bfs.h
new file mode 100644
index 0000000..eef5f9f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_bfs.h
@@ -0,0 +1,302 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ITERATOR_BFS_H
+#define SEQAN_HEADER_GRAPH_ITERATOR_BFS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph BfsIterator
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Bfs Iterator:
+..cat:Graph
+..summary:Breath-first search iterator for @Class.Graph at .
+..signature:Iterator<TGraph, BfsIterator>
+..param.TGraph:A graph.
+...type:Class.Graph
+..general:Class.Iter
+..see:Spec.Vertex Iterator
+..see:Spec.Out-Edge Iterator
+..see:Spec.Edge Iterator
+..see:Spec.Adjacency Iterator
+..see:Spec.Dfs Preorder Iterator
+..include:seqan/graph_types.h
+*/
+template<typename TGraph, typename TSpec>
+class Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > 
+{
+public:
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor_;
+	TGraph const* data_host;
+	TVertexDescriptor_ data_source;
+	String<bool> data_tokenMap;
+	std::deque<TVertexDescriptor_> data_queue;
+
+	void _init() {
+		resizeVertexMap(*data_host,data_tokenMap);
+		typedef typename Iterator<String<bool>, Rooted>::Type TIter;
+		TIter it = begin(data_tokenMap);
+		for(;!atEnd(it);goNext(it)) {
+			assignValue(it,false);
+		}
+		assignProperty(data_tokenMap, data_source, true);
+		data_queue.clear();
+		data_queue.push_back(data_source);
+	}
+
+	Iter()
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph const& _graph, TVertexDescriptor_ v) : 
+		data_host(&_graph),
+		data_source(v)
+	{
+		SEQAN_CHECKPOINT
+		_init();
+	}
+	
+	
+	~Iter() {
+		SEQAN_CHECKPOINT
+	}
+
+	Iter(Iter const& _iter) :
+		data_host(_iter.data_host),
+		data_source(_iter.data_source),
+		data_tokenMap(_iter.data_tokenMap),
+		data_queue(_iter.data_queue)
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_host=_other.data_host;
+		data_source=_other.data_source;
+		data_tokenMap=_other.data_tokenMap;
+		data_queue=_other.data_queue;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalBfsIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+template<typename TGraph>
+struct Iterator<TGraph, BfsIterator>
+{	
+	typedef Iter<TGraph, GraphIterator<InternalBfsIterator<BfsIterator> > > Type;
+};
+
+template<typename TGraph>
+struct Iterator<TGraph const, BfsIterator>
+{	
+	typedef Iter<TGraph const, GraphIterator<InternalBfsIterator<BfsIterator> > > Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph, GraphIterator<InternalBfsIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph const, GraphIterator<InternalBfsIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph, GraphIterator<InternalBfsIterator<TIteratorSpec> > > >
+{
+	typedef typename Reference<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph const, GraphIterator<InternalBfsIterator<TIteratorSpec> > > >
+{
+	typedef typename Reference<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph, GraphIterator<InternalBfsIterator<TIteratorSpec> > > >
+{
+	typedef typename GetValue<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph const, GraphIterator<InternalBfsIterator<TIteratorSpec> > > >
+{
+	typedef typename GetValue<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalBfsIterator - Functions
+//////////////////////////////////////////////////////////////////////////////
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > >::Type
+getValue(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_queue.front();
+}
+
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > >::Type
+value(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return getValue(it);
+}
+
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > >::Type
+operator * (Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return value(it);
+}
+
+template<typename TGraph, typename TSpec>
+inline typename Host<Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > >::Type const&
+hostGraph(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return *it.data_host;
+}
+
+template<typename TGraph, typename TSpec>
+inline bool
+atBegin(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (it.data_queue.empty()) return false;
+	else return (it.data_queue.front() == it.data_source);
+}
+
+template<typename TGraph, typename TSpec>
+inline void
+goBegin(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it._init();
+}
+
+template<typename TGraph, typename TSpec>
+inline bool
+atEnd(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_queue.empty());
+}
+
+template<typename TGraph, typename TSpec>
+inline void
+goEnd(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_queue.clear();
+}
+
+template<typename TGraph, typename TSpec>
+inline void
+goNext(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (it.data_queue.empty()) return;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TVertexDescriptor u = it.data_queue.front();
+	it.data_queue.pop_front();
+	typedef typename Iterator<TGraph, AdjacencyIterator>::Type TAdjacencyIterator;
+	TAdjacencyIterator itad(*it.data_host,u);
+	for(;!atEnd(itad);goNext(itad)) {
+		TVertexDescriptor v = getValue(itad);
+		if (getProperty(it.data_tokenMap, v) == false) {
+			assignProperty(it.data_tokenMap, v, true);
+			it.data_queue.push_back(v);
+		}
+	}
+}
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >&
+operator ++(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	goNext(it);
+	return it;
+}
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >
+operator ++(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > ret = it;
+	goNext(it);
+	return ret;
+}
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator ==(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_source==it2.data_source) &&
+			(it1.data_tokenMap==it2.data_tokenMap) &&
+			(it1.data_queue==it2.data_queue));
+}
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator !=(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_source!=it2.data_source) ||
+			(it1.data_tokenMap!=it2.data_tokenMap) ||
+			(it1.data_queue!=it2.data_queue));
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_iterator_dfs.h b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_dfs.h
new file mode 100644
index 0000000..283b7d6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_dfs.h
@@ -0,0 +1,305 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ITERATOR_DFS_H
+#define SEQAN_HEADER_GRAPH_ITERATOR_DFS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph DfsIterator
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Dfs Preorder Iterator:
+..cat:Graph
+..summary:Depth-first search iterator for @Class.Graph at .
+..remarks:Preorder means that a vertex is enumerated before its adjacent vertices have been explored.
+..signature:Iterator<TGraph, DfsPreorder>
+..param.TGraph:A graph.
+...type:Class.Graph
+..general:Class.Iter
+..see:Spec.Vertex Iterator
+..see:Spec.Out-Edge Iterator
+..see:Spec.Edge Iterator
+..see:Spec.Adjacency Iterator
+..see:Spec.Bfs Iterator
+..include:seqan/graph_types.h
+*/
+template<typename TGraph, typename TSpec>
+class Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > 
+{
+public:
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor_;
+	TGraph const* data_host;
+	TVertexDescriptor_ data_source;
+	String<bool> data_tokenMap;			// Which vertices have been visited
+	String<TVertexDescriptor_> data_stack;
+	
+	void _init() {
+		resizeVertexMap(*data_host,data_tokenMap);
+		typedef typename Iterator<String<bool>, Rooted>::Type TIter;
+		TIter it = begin(data_tokenMap);
+		for(;!atEnd(it);goNext(it)) {
+			assignValue(it,false);
+		}
+		assignProperty(data_tokenMap, data_source, true);
+		clear(data_stack);
+		appendValue(data_stack, data_source, Generous());
+	}
+
+	Iter()
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph& _graph, TVertexDescriptor_ v) : 
+		data_host(&_graph),
+		data_source(v)
+	{
+		SEQAN_CHECKPOINT
+		_init();
+	}
+	
+	
+	Iter(Iter const& _iter) :
+		data_host(_iter.data_host),
+		data_source(_iter.data_source),
+		data_tokenMap(_iter.data_tokenMap),
+		data_stack(_iter.data_stack)
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	~Iter() {
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_host=_other.data_host;
+		data_source=_other.data_source;
+		data_tokenMap=_other.data_tokenMap;
+		data_stack=_other.data_stack;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalDfsIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+template<typename TGraph>
+struct Iterator<TGraph, DfsPreorder>
+{	
+	typedef Iter<TGraph, GraphIterator<InternalDfsIterator<DfsPreorder> > > Type;
+};
+
+template<typename TGraph>
+struct Iterator<TGraph const, DfsPreorder>
+{	
+	typedef Iter<TGraph const, GraphIterator<InternalDfsIterator<DfsPreorder> > > Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph, GraphIterator<InternalDfsIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph const, GraphIterator<InternalDfsIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph, GraphIterator<InternalDfsIterator<TIteratorSpec> > > >
+{
+	typedef typename Reference<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph const, GraphIterator<InternalDfsIterator<TIteratorSpec> > > >
+{
+	typedef typename Reference<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph, GraphIterator<InternalDfsIterator<TIteratorSpec> > > >
+{
+	typedef typename GetValue<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph const, GraphIterator<InternalDfsIterator<TIteratorSpec> > > >
+{
+	typedef typename GetValue<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalBfsIterator - Functions
+//////////////////////////////////////////////////////////////////////////////
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > >::Type
+getValue(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return getValue(it.data_stack, length(it.data_stack) - 1);
+}
+
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > >::Type
+value(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	// We don't want vertex ids to be changed
+	return getValue(it);
+}
+
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > >::Type
+operator * (Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return value(it);
+}
+
+template<typename TGraph, typename TSpec>
+inline typename Host<Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > >::Type const&
+hostGraph(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return *it.data_host;
+}
+
+template<typename TGraph, typename TSpec>
+inline bool
+atBegin(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (empty(it.data_stack)) return false;
+	else return (getValue(it.data_stack, length(it.data_stack) - 1) == it.data_source);
+}
+
+template<typename TGraph, typename TSpec>
+inline void
+goBegin(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it._init();
+}
+
+template<typename TGraph, typename TSpec>
+inline bool
+atEnd(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (empty(it.data_stack));
+}
+
+template<typename TGraph, typename TSpec>
+inline void
+goEnd(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	clear(it.data_stack);
+}
+
+template<typename TGraph, typename TSpec>
+inline void
+goNext(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (empty(it.data_stack)) return;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TVertexDescriptor u = getValue(it.data_stack, length(it.data_stack) - 1);
+	resize(it.data_stack, length(it.data_stack) - 1);
+	typedef typename Iterator<TGraph, AdjacencyIterator>::Type TAdjacencyIterator;
+	TAdjacencyIterator itad(*it.data_host,u);
+	for(;!atEnd(itad);goNext(itad)) {
+		TVertexDescriptor v = getValue(itad);
+		if (getProperty(it.data_tokenMap, v) == false) {
+			assignProperty(it.data_tokenMap, v, true);
+			appendValue(it.data_stack, v, Generous());
+		}
+	}
+}
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >&
+operator ++(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	goNext(it);
+	return it;
+}
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >
+operator ++(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > ret = it;
+	goNext(it);
+	return ret;
+}
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator ==(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_source==it2.data_source) &&
+			(it1.data_tokenMap==it2.data_tokenMap) &&
+			(it1.data_stack==it2.data_stack));
+}
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator !=(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_source!=it2.data_source) ||
+			(it1.data_tokenMap!=it2.data_tokenMap) ||
+			(it1.data_stack!=it2.data_stack));
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_iterator_edge.h b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_edge.h
new file mode 100644
index 0000000..8374eda
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_edge.h
@@ -0,0 +1,481 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ITERATOR_EDGE_H
+#define SEQAN_HEADER_GRAPH_ITERATOR_EDGE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Graph EdgeIterator
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Edge Iterator:
+..cat:Graph
+..summary:Edge iterator for @Class.Graph at .
+..signature:Iterator<TGraph, EdgeIterator>
+..param.TGraph:A graph.
+...type:Class.Graph
+..general:Class.Iter
+..see:Spec.Vertex Iterator
+..see:Spec.Out-Edge Iterator
+..see:Spec.Adjacency Iterator
+..see:Spec.Bfs Iterator
+..see:Spec.Dfs Preorder Iterator
+..include:seqan/graph_types.h
+*/
+
+template<typename TGraph, typename TSpec>
+class Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > 
+{
+public:
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor_;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator_;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator_;
+	TVertexIterator_ data_vertex_it;
+	TOutEdgeIterator_ data_edge_it;
+	TVertexDescriptor_ data_first_slot;
+
+
+	Iter()	
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph const& _graph) : 
+		data_vertex_it(_graph),
+		data_edge_it(_graph, getIdLowerBound(_getVertexIdManager(_graph)))  
+	{
+		SEQAN_CHECKPOINT
+		while((atEnd(data_edge_it)) && (!atEnd(data_vertex_it))) 
+		{
+				goNext(data_vertex_it);
+				typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator_;
+				if(!atEnd(data_vertex_it))
+					data_edge_it = TOutEdgeIterator_(hostGraph(*this), value(data_vertex_it));			
+		}
+		data_first_slot = value(data_vertex_it);
+	}
+
+	~Iter() {
+		SEQAN_CHECKPOINT
+	}
+
+	Iter(Iter const& _iter) : 
+		data_vertex_it(_iter.data_vertex_it),
+		data_edge_it(_iter.data_edge_it),
+		data_first_slot(_iter.data_first_slot)
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_vertex_it = _other.data_vertex_it;
+		data_edge_it = _other.data_edge_it;
+		data_first_slot = _other.data_first_slot;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalEdgeIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph>
+struct Iterator<TGraph, EdgeIterator>
+{	
+	typedef Iter<TGraph, GraphIterator<InternalEdgeIterator<EdgeIterator> > > Type;
+};
+
+template<typename TGraph>
+struct Iterator<TGraph const, EdgeIterator>
+{	
+	typedef Iter<TGraph const, GraphIterator<InternalEdgeIterator<EdgeIterator> > > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph, GraphIterator<InternalEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph const, GraphIterator<InternalEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph const, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph, GraphIterator<InternalEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename Reference<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph const, GraphIterator<InternalEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename Reference<Iter<TGraph const, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph, GraphIterator<InternalEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename GetValue<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph const, GraphIterator<InternalEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename GetValue<Iter<TGraph const, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Spec<Iter<TGraph, GraphIterator<InternalEdgeIterator<TIteratorSpec> > > >
+{
+	typedef TIteratorSpec Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Spec<Iter<TGraph const, GraphIterator<InternalEdgeIterator<TIteratorSpec> > > >
+{
+	typedef TIteratorSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalEdgeIterator - Functions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > >::Type
+getValue(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	return getValue(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename Reference<Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > >::Type
+value(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	return value(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename Reference<Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > >::Type
+operator * (Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return value(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename Host<Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > >::Type const&
+hostGraph(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return hostGraph(it.data_vertex_it);
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+atBegin(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return ((it.data_first_slot == getValue(it.data_vertex_it)) &&
+			atBegin(it.data_edge_it));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+goBegin(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	goBegin(it.data_vertex_it);
+	while (it.data_first_slot != getValue(it.data_vertex_it)) ++it.data_vertex_it;
+	it.data_edge_it = TOutEdgeIterator(hostGraph(it), getValue(it.data_vertex_it));	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+atEnd(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return atEnd(it.data_vertex_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+goEnd(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	goEnd(it.data_edge_it);
+	goEnd(it.data_vertex_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+_goNextInternal(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(it)) {
+		goNext(it.data_edge_it);
+		if(!atEnd(it.data_edge_it)) return;
+		else {
+			while ((atEnd(it.data_edge_it)) && (!atEnd(it.data_vertex_it))) {
+				goNext(it.data_vertex_it);
+				if ((atEnd(it.data_vertex_it)) ||
+					(!idInUse(_getVertexIdManager(hostGraph(it)), getValue(it.data_vertex_it)))) continue;
+				typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+				it.data_edge_it = TOutEdgeIterator(hostGraph(it), getValue(it.data_vertex_it));			
+			}
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+goNext(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	_goNextInternal(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goNext(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	typedef Graph<Undirected<TCargo, TGraphSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	_goNextInternal(it);
+	TVertexDescriptor sourceV = sourceVertex(it.data_edge_it);
+	while((!atEnd(it)) && (targetVertex(hostGraph(it), getValue(it.data_edge_it)) == sourceV)) {
+		_goNextInternal(it);
+		sourceV = sourceVertex(it.data_edge_it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >&
+operator ++(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	goNext(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >
+operator ++(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > ret = it;
+	goNext(it);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+_goPreviousInternal(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atBegin(it)) {
+		if ((atEnd(it)) ||
+			(atBegin(it.data_edge_it))) 
+		{
+			--it.data_vertex_it;
+			typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+			it.data_edge_it = TOutEdgeIterator(hostGraph(it), getValue(it.data_vertex_it));
+			while((!atBegin(it.data_vertex_it)) && 
+					(atEnd(it.data_edge_it))) {
+				--it.data_vertex_it;
+				typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+				it.data_edge_it = TOutEdgeIterator(hostGraph(it), getValue(it.data_vertex_it));			
+			}
+			goEnd(it.data_edge_it);
+		}
+		--it.data_edge_it;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline void
+goPrevious(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	_goPreviousInternal(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goPrevious(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	typedef Graph<Undirected<TCargo, TGraphSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	_goPreviousInternal(it);
+	TVertexDescriptor sourceV = sourceVertex(it.data_edge_it);
+	while((!atBegin(it)) && (targetVertex(hostGraph(it), getValue(it.data_edge_it)) == sourceV)) {
+		_goPreviousInternal(it);
+		sourceV = sourceVertex(it.data_edge_it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >&
+operator --(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	goPrevious(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >
+operator --(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > ret = it;
+	goPrevious(it);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator ==(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it2)
+{
+SEQAN_CHECKPOINT
+	return ((it1.data_vertex_it==it2.data_vertex_it) && 
+			(it1.data_edge_it==it2.data_edge_it));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator !=(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it2)
+{
+SEQAN_CHECKPOINT
+	return ((it1.data_vertex_it!=it2.data_vertex_it) || 
+			(it1.data_edge_it!=it2.data_edge_it));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename VertexDescriptor<TGraph>::Type 
+sourceVertex(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return sourceVertex(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename VertexDescriptor<TGraph>::Type 
+targetVertex(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return targetVertex(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename Alphabet<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > >::Type
+label(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	return label(it.data_edge_it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_iterator_outedge.h b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_outedge.h
new file mode 100644
index 0000000..37e62a7
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_outedge.h
@@ -0,0 +1,1225 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ITERATOR_OUTEDGE_H
+#define SEQAN_HEADER_GRAPH_ITERATOR_OUTEDGE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Graph OutEdgeIterator
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Out-Edge Iterator:
+..cat:Graph
+..summary:Out-edge iterator for @Class.Graph at .
+..signature:Iterator<TGraph, OutEdgeIterator>
+..param.TGraph:A graph.
+...type:Class.Graph
+..general:Class.Iter
+..see:Spec.Vertex Iterator
+..see:Spec.Edge Iterator
+..see:Spec.Adjacency Iterator
+..see:Spec.Bfs Iterator
+..see:Spec.Dfs Preorder Iterator
+..include:seqan/graph_types.h
+*/
+
+
+//////////////////////////////////////////////////////////////////////////////
+// InternalOutEdgeIterator for Directed Graph
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+class Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > 
+{
+public:
+	typedef Graph<Directed<TCargo, TGraphSpec> > TGraph_;
+	typedef typename EdgeDescriptor<TGraph_>::Type TEdgeDescriptor_;
+	typedef typename VertexDescriptor<TGraph_>::Type TVertexDescriptor_;
+	TGraph_ const* data_host;
+	TVertexDescriptor_ data_source;
+	TEdgeDescriptor_ data_edge;
+
+	Iter()	
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph_ const& _graph, TVertexDescriptor_ const v) : 
+		data_host(&_graph),
+		data_source(v),
+		data_edge(getValue(_graph.data_vertex,v))
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(Iter const& _iter) : 
+		data_host(_iter.data_host),
+		data_source(_iter.data_source),
+		data_edge(_iter.data_edge)
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	~Iter() {
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_host = _other.data_host;
+		data_source = _other.data_source;
+		data_edge = _other.data_edge;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Directed<TCargo, TGraphSpec> >, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+template<typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Directed<TCargo, TGraphSpec> > const, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Directed<TCargo, TGraphSpec> > const, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// InternalOutEdgeIterator for Tree
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+class Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > 
+{
+public:
+	typedef Graph<Tree<TCargo, TGraphSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TGraph const* data_host;
+	TVertexDescriptor data_source;
+	TEdgeDescriptor data_edge;
+
+	Iter()	
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph const& _graph, TVertexDescriptor const v) : 
+		data_host(&_graph),
+		data_source(v),
+		data_edge(getValue(_graph.data_vertex,v))
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(Iter const& _iter) : 
+		data_host(_iter.data_host),
+		data_source(_iter.data_source),
+		data_edge(_iter.data_edge)
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	~Iter() {
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_host = _other.data_host;
+		data_source = _other.data_source;
+		data_edge = _other.data_edge;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Tree<TCargo, TGraphSpec> >, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+template<typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Tree<TCargo, TGraphSpec> > const, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Tree<TCargo, TGraphSpec> > const, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// InternalOutEdgeIterator for Undirected graph
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+class Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > 
+{
+public:
+	typedef Graph<Undirected<TCargo, TGraphSpec> > TGraph;
+	typedef typename EdgeDescriptor<TGraph>::Type TEdgeDescriptor;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TGraph const* data_host;
+	TVertexDescriptor data_source;
+	TEdgeDescriptor data_edge;
+
+	Iter()	
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph const& _graph, TVertexDescriptor const v) : 
+		data_host(&_graph),
+		data_source(v),
+		data_edge(getValue(_graph.data_vertex,v))
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(Iter const& _iter) : 
+		data_host(_iter.data_host),
+		data_source(_iter.data_source),
+		data_edge(_iter.data_edge)
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	~Iter() {
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_host = _other.data_host;
+		data_source = _other.data_source;
+		data_edge = _other.data_edge;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Undirected<TCargo, TGraphSpec> >, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+template<typename TCargo,typename TGraphSpec>
+struct Iterator<Graph<Undirected<TCargo, TGraphSpec> > const, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Undirected<TCargo, TGraphSpec> > const, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator for Automaton
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TIteratorSpec>
+class Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > 
+{
+public:
+	typedef Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > TGraph_;
+	typedef typename EdgeDescriptor<TGraph_>::Type TEdgeDescriptor_;
+	typedef typename VertexDescriptor<TGraph_>::Type TVertexDescriptor_;
+	typedef typename Size<TAlphabet>::Type TSize_;
+	TGraph_ const* data_host;
+	TVertexDescriptor_ data_source;
+	TSize_ data_pos;
+	TSize_ data_begin;
+	TSize_ data_end;
+
+	Iter()	
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	Iter(TGraph_ const& _graph, TVertexDescriptor_ const v) : 
+		data_host(&_graph),
+		data_source(v)
+	{
+		SEQAN_CHECKPOINT
+		TVertexDescriptor_ nilVal = getNil<TVertexDescriptor_>();
+		TSize_ table_length = ValueSize<TAlphabet>::VALUE;
+		TSize_ pos = 0;
+		while (	(pos < table_length) &&
+				(_graph.data_vertex[v].data_edge[pos].data_target == nilVal))
+		{
+				++pos;
+		}
+		data_pos = pos;
+		data_begin = pos;
+		data_end = table_length;
+	}
+
+	Iter(Iter const& _iter) : 
+		data_host(_iter.data_host),
+		data_source(_iter.data_source),
+		data_pos(_iter.data_pos),
+		data_begin(_iter.data_begin),
+		data_end(_iter.data_end)
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	~Iter() 
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) 
+	{
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_host = _other.data_host;
+		data_source = _other.data_source;
+		data_pos = _other.data_pos;
+		data_begin = _other.data_begin;
+		data_end = _other.data_end;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > const, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > const, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// InternalOutEdgeIterator for Directed Graph
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+class Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > 
+{
+public:
+	typedef Graph<Hmm<TAlphabet, TCargo, TGraphSpec> > TGraph_;
+	typedef typename EdgeDescriptor<TGraph_>::Type TEdgeDescriptor_;
+	typedef typename VertexDescriptor<TGraph_>::Type TVertexDescriptor_;
+	TGraph_ const* data_host;
+	TVertexDescriptor_ data_source;
+	TEdgeDescriptor_ data_edge;
+
+	Iter()	
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph_ const& _graph, TVertexDescriptor_ const v) : 
+		data_host(&_graph),
+		data_source(v),
+		data_edge(getValue(_graph.data_model.data_vertex,v))
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(Iter const& _iter) : 
+		data_host(_iter.data_host),
+		data_source(_iter.data_source),
+		data_edge(_iter.data_edge)
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	~Iter() {
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_host = _other.data_host;
+		data_source = _other.data_source;
+		data_edge = _other.data_edge;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> > const, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> > const, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator - General Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename EdgeDescriptor<TGraph>::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph const, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename EdgeDescriptor<TGraph const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph const, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph const, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph const, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph const, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Spec<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >
+{
+	typedef TIteratorSpec Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Spec<Iter<TGraph const, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > >
+{
+	typedef TIteratorSpec Type;
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator - Functions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename GetValue<Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+getValue(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename GetValue<Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+getValue(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename GetValue<Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+getValue(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename GetValue<Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+getValue(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename GetValue<Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+getValue(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > TGraph;
+	TGraph * g = const_cast<TGraph*>(it.data_host);
+	return (&g->data_vertex[it.data_source].data_edge[it.data_pos]);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename Reference<Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+value(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename Reference<Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+value(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename Reference<Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+value(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename Reference<Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+value(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename Reference<Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+value(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > TGraph;
+	TGraph * g = const_cast<TGraph*>(it.data_host);
+	return (&g->data_vertex[it.data_source].data_edge[it.data_pos]);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename Reference<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+operator * (Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return value(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename Host<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type const&
+hostGraph(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return *it.data_host;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atBegin(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == getValue(it.data_host->data_vertex, it.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atBegin(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == getValue(it.data_host->data_model.data_vertex, it.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atBegin(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == getValue(it.data_host->data_vertex, it.data_source));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atBegin(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == getValue(it.data_host->data_vertex, it.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atBegin(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_begin == it.data_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goBegin(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = getValue(it.data_host->data_vertex,it.data_source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goBegin(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = getValue(it.data_host->data_model.data_vertex,it.data_source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goBegin(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = getValue(it.data_host->data_vertex,it.data_source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goBegin(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = getValue(it.data_host->data_vertex,it.data_source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goBegin(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_pos = it.data_begin;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atEnd(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atEnd(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atEnd(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atEnd(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == 0);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atEnd(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_end == it.data_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goEnd(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goEnd(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goEnd(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = 0;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goEnd(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goEnd(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_pos = it.data_end;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goNext(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(it)) it.data_edge = getNextT(it.data_edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goNext(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(it)) it.data_edge = getNextT(it.data_edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goNext(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(it)) it.data_edge = getNextT(it.data_edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goNext(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(it)) {
+		if (it.data_source == getSource(it.data_edge)) it.data_edge = getNextS(it.data_edge);
+		else it.data_edge = getNextT(it.data_edge);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goNext(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	if (it.data_pos < it.data_end) ++it.data_pos;
+	while (	(it.data_pos < it.data_end) &&
+			(it.data_host->data_vertex[it.data_source].data_edge[it.data_pos].data_target == nilVal))
+	{
+				++it.data_pos;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >&
+operator ++(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	goNext(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >
+operator ++(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > > ret = it;
+	goNext(it);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goPrevious(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef typename EdgeType<Graph<Directed<TCargo, TGraphSpec> > >::Type TEdge;
+	TEdge* current = getValue(it.data_host->data_vertex, it.data_source);
+	if (current == it.data_edge) return;
+	while ((current != 0) && (getNextT(current) != it.data_edge)) current = getNextT(current);
+	it.data_edge = current;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goPrevious(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef typename EdgeType<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> > >::Type TEdge;
+	TEdge* current = getValue(it.data_host->data_model.data_vertex, it.data_source);
+	if (current == it.data_edge) return;
+	while ((current != 0) && (getNextT(current) != it.data_edge)) current = getNextT(current);
+	it.data_edge = current;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goPrevious(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef typename EdgeType<Graph<Tree<TCargo, TGraphSpec> > >::Type TEdge;
+	TEdge* current = getValue(it.data_host->data_vertex, it.data_source);
+	if (current == it.data_edge) return;
+	while ((current != 0) && (getNextT(current) != it.data_edge)) current = getNextT(current);
+	it.data_edge = current;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goPrevious(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TGraphSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	TEdge* current = getValue(it.data_host->data_vertex, it.data_source);
+	if (current == it.data_edge) return;
+	while (current != 0) {
+		if (it.data_source == getSource(current)) {
+			if (it.data_edge == getNextS(current)) break;
+			else current = getNextS(current);
+		} else {
+			if (it.data_edge == getNextT(current)) break;
+			else current = getNextT(current);
+		}
+	}
+	it.data_edge = current;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goPrevious(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TVertexDescriptor nilVal = getNil<TVertexDescriptor>();
+	if (it.data_pos != it.data_begin) --it.data_pos;
+	while (	(it.data_pos != it.data_begin) &&
+			(it.data_host->data_vertex[it.data_source].data_edge[it.data_pos].data_target == nilVal))
+	{
+				--it.data_pos;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >&
+operator --(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	goPrevious(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >
+operator --(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > > ret = it;
+	goPrevious(it);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator ==(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge==it2.data_edge) && 
+			(it1.data_source==it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator ==(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge==it2.data_edge) && 
+			(it1.data_source==it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator ==(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge==it2.data_edge) && 
+			(it1.data_source==it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator ==(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge==it2.data_edge) && 
+			(it1.data_source==it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator ==(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_pos==it2.data_pos) && 
+			(it1.data_source==it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator !=(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge!=it2.data_edge) || 
+			(it1.data_source!=it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator !=(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge!=it2.data_edge) || 
+			(it1.data_source!=it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator !=(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge!=it2.data_edge) || 
+			(it1.data_source!=it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator !=(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge!=it2.data_edge) || 
+			(it1.data_source!=it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator !=(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_pos!=it2.data_pos) || 
+			(it1.data_source!=it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename VertexDescriptor<TGraph>::Type 
+sourceVertex(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.Automaton#label:
+..cat:Graph
+..summary:Returns the label of the out-edge this iterator points to (for automatons).
+..signature:label(it)
+..param.it:An out-edge iterator.
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+..returns:A label.
+...type:Metafunction.Alphabet.
+..remarks:The label function only works for out-edge iterators on automatons.
+..include:seqan/graph_types.h
+*/
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename Alphabet<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > >::Type
+label(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	return TAlphabet(it.data_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename VertexDescriptor<Graph<Directed<TCargo, TGraphSpec> > >::Type 
+targetVertex(Iter<Graph<Directed<TCargo, TGraphSpec> > , GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return targetVertex(*it.data_host, it.data_edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> > >::Type 
+targetVertex(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> > , GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return targetVertex(*it.data_host, it.data_edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename VertexDescriptor<Graph<Tree<TCargo, TGraphSpec> > >::Type 
+targetVertex(Iter<Graph<Tree<TCargo, TGraphSpec> > , GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return targetVertex(*it.data_host, it.data_edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename VertexDescriptor<Graph<Undirected<TCargo, TGraphSpec> > >::Type 
+targetVertex(Iter<Graph<Undirected<TCargo, TGraphSpec> > , GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TGraphSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TVertexDescriptor target = targetVertex(*it.data_host, it.data_edge);
+	if (target != it.data_source) return target;
+	else return sourceVertex(*it.data_host, it.data_edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > >::Type
+targetVertex(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_host->data_vertex[it.data_source].data_edge[it.data_pos].data_target;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_iterator_vertex.h b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_vertex.h
new file mode 100644
index 0000000..1d7561e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_iterator_vertex.h
@@ -0,0 +1,473 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_ITERATOR_VERTEX_H
+#define SEQAN_HEADER_GRAPH_ITERATOR_VERTEX_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph VertexIterator
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Vertex Iterator:
+..cat:Graph
+..summary:Vertex iterator for @Class.Graph at .
+..signature:Iterator<TGraph, VertexIterator>
+..param.TGraph:A graph.
+...type:Class.Graph
+..general:Class.Iter
+..see:Spec.Edge Iterator
+..see:Spec.Out-Edge Iterator
+..see:Spec.Adjacency Iterator
+..see:Spec.Bfs Iterator
+..see:Spec.Dfs Preorder Iterator
+..include:seqan/graph_types.h
+*/
+template<typename TGraph, typename TSpec>
+class Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > 
+{
+public:
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor_;
+	TGraph const* data_host;
+	TVertexDescriptor_ data_pos;
+
+	Iter()	
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph const& _graph) : 
+		data_host(&_graph), 
+		data_pos(getIdLowerBound(_getVertexIdManager(*data_host))) 
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	Iter(Iter const& _iter) : 
+		data_host(_iter.data_host), 
+		data_pos(_iter.data_pos) 
+	{
+		SEQAN_CHECKPOINT
+	}
+
+	~Iter() {
+		SEQAN_CHECKPOINT
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_host = _other.data_host;
+		data_pos = _other.data_pos;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalVertexIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Iterator.param.T.type:Class.Graph
+
+template<typename TGraph>
+struct Iterator<TGraph, VertexIterator>
+{	
+	typedef Iter<TGraph, GraphIterator<InternalVertexIterator<VertexIterator> > > Type;
+};
+
+template<typename TGraph>
+struct Iterator<TGraph const, VertexIterator>
+{	
+	typedef Iter<TGraph const, GraphIterator<InternalVertexIterator<VertexIterator> > > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >
+{
+	typedef typename VertexDescriptor<TGraph>::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Value<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >
+{
+	typedef typename VertexDescriptor<TGraph const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type& Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Reference<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type& Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct GetValue<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >
+{
+	typedef typename Value<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TIteratorSpec>
+struct Spec<Iter<TGraph, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >
+{
+	typedef TIteratorSpec Type;
+};
+
+template<typename TGraph, typename TIteratorSpec>
+struct Spec<Iter<TGraph const, GraphIterator<InternalVertexIterator<TIteratorSpec> > > >
+{
+	typedef TIteratorSpec Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalVertexIterator - FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getValue:
+..cat:Graph
+..param.object
+...type:Spec.Vertex Iterator
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+...type:Spec.Adjacency Iterator
+...type:Spec.Bfs Iterator
+...type:Spec.Dfs Preorder Iterator
+..include:seqan/graph_types.h
+*/
+
+template<typename TGraph, typename TSpec>
+inline typename GetValue<Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > >::Type
+getValue(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	return it.data_pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.value:
+..cat:Graph
+..param.object
+...type:Spec.Vertex Iterator
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+...type:Spec.Adjacency Iterator
+...type:Spec.Bfs Iterator
+...type:Spec.Dfs Preorder Iterator
+..include:seqan/graph_types.h
+*/
+
+template<typename TGraph, typename TSpec>
+inline typename Reference<Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > >::Type
+value(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	return it.data_pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline typename Reference<Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > >::Type
+operator * (Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return value(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.hostGraph:
+..cat:Graph
+..summary:The graph this iterator is working on.
+..signature:hostGraph(it)
+..param.it:A vertex or edge iterator.
+...type:Spec.Vertex Iterator
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+...type:Spec.Adjacency Iterator
+...type:Spec.Bfs Iterator
+...type:Spec.Dfs Preorder Iterator
+..returns:A pointer to the host graph.
+..include:seqan/graph_types.h
+*/
+
+template<typename TGraph, typename TSpec>
+inline typename Host<Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > >::Type const&
+hostGraph(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return *it.data_host;
+} 
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.atBegin:
+..cat:Graph
+..param.iterator
+...type:Spec.Vertex Iterator
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+...type:Spec.Adjacency Iterator
+...type:Spec.Bfs Iterator
+...type:Spec.Dfs Preorder Iterator
+..see:Function.goBegin
+..include:seqan/graph_types.h
+*/
+
+template<typename TGraph, typename TSpec>
+inline bool
+atBegin(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	return (getValue(it) == getIdLowerBound(_getVertexIdManager(*it.data_host)));	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.goBegin:
+..cat:Graph
+..param.iterator
+...type:Spec.Vertex Iterator
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+...type:Spec.Adjacency Iterator
+...type:Spec.Bfs Iterator
+...type:Spec.Dfs Preorder Iterator
+..include:seqan/graph_types.h
+*/
+
+template<typename TGraph, typename TSpec>
+inline void
+goBegin(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_pos = getIdLowerBound(_getVertexIdManager(*it.data_host));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.atEnd:
+..cat:Graph
+..param.iterator
+...type:Spec.Vertex Iterator
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+...type:Spec.Adjacency Iterator
+...type:Spec.Bfs Iterator
+...type:Spec.Dfs Preorder Iterator
+..see:Function.goEnd
+..include:seqan/graph_types.h
+*/
+
+template<typename TGraph, typename TSpec>
+inline bool
+atEnd(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	return (getValue(it) >= getIdUpperBound(_getVertexIdManager(*it.data_host)));	
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.goEnd:
+..cat:Graph
+..param.iterator
+...type:Spec.Vertex Iterator
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+...type:Spec.Adjacency Iterator
+...type:Spec.Bfs Iterator
+...type:Spec.Dfs Preorder Iterator
+..include:seqan/graph_types.h
+*/
+template<typename TGraph, typename TSpec>
+inline void
+goEnd(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_pos = getIdUpperBound(_getVertexIdManager(*it.data_host));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.goNext:
+..cat:Graph
+..param.iterator
+...type:Spec.Vertex Iterator
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+...type:Spec.Adjacency Iterator
+...type:Spec.Bfs Iterator
+...type:Spec.Dfs Preorder Iterator
+..include:seqan/graph_types.h
+*/
+
+template<typename TGraph, typename TSpec>
+inline void
+goNext(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(it)) ++it.data_pos;
+	while ((!atEnd(it)) && (!idInUse(_getVertexIdManager(*it.data_host), it.data_pos))) ++it.data_pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >&
+operator ++(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	goNext(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >
+operator ++(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > ret = it;
+	goNext(it);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.goPrevious:
+..cat:Graph
+..param.iterator
+...type:Spec.Vertex Iterator
+...type:Spec.Out-Edge Iterator
+...type:Spec.Edge Iterator
+...type:Spec.Adjacency Iterator
+..include:seqan/graph_types.h
+*/
+
+template<typename TGraph, typename TSpec>
+inline void
+goPrevious(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atBegin(it)) --it.data_pos;
+	while ((!atBegin(it)) && (!idInUse(_getVertexIdManager(*it.data_host), it.data_pos))) --it.data_pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >&
+operator --(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it)
+{
+SEQAN_CHECKPOINT
+	goPrevious(it);
+	return it;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >
+operator --(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it, int)
+{
+	SEQAN_CHECKPOINT
+	Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > ret = it;
+	goPrevious(it);
+	return ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator ==(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return (it1.data_pos==it2.data_pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TGraph, typename TSpec>
+inline bool
+operator !=(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it1,
+			Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return (it1.data_pos!=it2.data_pos);
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_property.h b/src/SeqAn-1.3/seqan/graph_types/graph_property.h
new file mode 100644
index 0000000..20e8fe3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_property.h
@@ -0,0 +1,759 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_PROPERTY_H
+#define SEQAN_HEADER_GRAPH_PROPERTY_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//	Graph - External property map
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.External Property Map:
+..cat:Graph
+..summary:An external property map.
+..remarks:The external property map is assumed to be an instance of @Class.String at .
+It is indexed via VertexDescriptors or EdgeDescriptors.
+..signature:String<TValue, TSpec>
+..param.TValue:The value type. That is the type of information stored in the property map.
+...metafunction:Metafunction.Value
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:$Alloc<>$, see @Spec.Alloc String at .
+..include:seqan/graph_types.h
+*/
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.resizeVertexMap:
+..cat:Graph
+..summary:Initializes a vertex map. 
+..signature:resizeVertexMap(g, pm [, prop])
+..param.g:A Graph.
+...type:Class.Graph
+..param.pm:An External Property Map.
+...type:Class.External Property Map
+..param.prop:An optional array with properties that are to be assigned to the items in the property map.
+...remarks:For every vertex descriptor there must be an entry in the array.
+..returns:void
+..see:Function.resizeEdgeMap
+..include:seqan/graph_types.h
+*/
+
+template<typename TSpec, typename TPropertyMap>
+inline void
+resizeVertexMap(Graph<TSpec> const& g,
+			  TPropertyMap& pm)
+{
+	SEQAN_CHECKPOINT
+	resize(pm, getIdUpperBound(_getVertexIdManager(g)), Generous());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.resizeEdgeMap:
+..cat:Graph
+..summary:Initializes an edge map
+..signature:resizeEdgeMap(g, pm [, prop])
+..param.g:A Graph.
+...type:Class.Graph
+..param.pm:An External or Internal Property Map.
+...type:Class.External Property Map
+...type:Class.InternalMap
+...type:Class.InternalPointerMap
+...type:Class.InternalRawMap
+..param.prop:An optional array with properties that are to be assigned to the items in the property map.
+...remarks:For every edge id there must be an entry in the array.
+..returns:void
+..see:Function.resizeVertexMap
+..include:seqan/graph_types.h
+*/
+
+template<typename TSpec, typename TPropertyMap>
+inline void
+resizeEdgeMap(Graph<TSpec> const& g,
+			  TPropertyMap& pm)
+{
+	SEQAN_CHECKPOINT
+	resize(pm, getIdUpperBound(_getEdgeIdManager(g)), Generous());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignProperty:
+..cat:Graph
+..summary:Assigns a property to an item in the property map.
+..signature:assignProperty(pm, d, val)
+..param.pm:An External or Internal Property Map.
+...type:Class.External Property Map
+...type:Class.InternalMap
+...type:Class.InternalPointerMap
+...type:Class.InternalRawMap
+..param.d:A vertex or edge descriptor.
+...remarks:Identifies the item in the property map.
+...type:Metafunction.VertexDescriptor
+...type:Metafunction.EdgeDescriptor
+..param.val:The new value.
+...remarks:Type of the new value must match the value type of the property map.
+See @Metafunction.Value at .
+..returns:void
+..see:Function.getProperty
+..see:Function.property
+..include:seqan/graph_types.h
+*/
+
+template<typename TPropertyMap, typename TDescriptor, typename TValue>
+inline void
+assignProperty(TPropertyMap& pm,
+			   TDescriptor const d,
+			   TValue const val)
+{
+	SEQAN_CHECKPOINT
+	assignValue(pm, _getId(d), val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.property:
+..cat:Graph
+..summary:Accesses the property of an item in the property map.
+..signature:property(pm, d)
+..param.pm:An External or Internal Property Map.
+...type:Class.External Property Map
+...type:Class.InternalMap
+...type:Class.InternalPointerMap
+...type:Class.InternalRawMap
+..param.d:A vertex or edge descriptor.
+...remarks:Identifies the item in the property map.
+...type:Metafunction.VertexDescriptor
+...type:Metafunction.EdgeDescriptor
+..returns:Reference to the item in the property map.
+..see:Function.getProperty
+..see:Function.assignProperty
+..include:seqan/graph_types.h
+*/
+
+template<typename TPropertyMap, typename TDescriptor>
+inline typename Reference<TPropertyMap>::Type
+property(TPropertyMap& pm,
+		TDescriptor const d)
+{
+	SEQAN_CHECKPOINT
+	return value(pm, _getId(d));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TPropertyMap, typename TDescriptor>
+inline typename Reference<TPropertyMap const>::Type
+property(TPropertyMap const& pm,
+		TDescriptor const d)
+{
+	SEQAN_CHECKPOINT
+	return value(pm, _getId(d));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getProperty:
+..cat:Graph
+..summary:Get method for an item's property.
+..signature:getProperty(pm, d)
+..param.pm:An External or Internal Property Map.
+...type:Class.External Property Map
+...type:Class.InternalMap
+...type:Class.InternalPointerMap
+...type:Class.InternalRawMap
+..param.d:A vertex or edge descriptor.
+...remarks:Identifies the item in the property map.
+...type:Metafunction.VertexDescriptor
+...type:Metafunction.EdgeDescriptor
+..returns:Value of the item in the property map.
+..see:Function.property
+..see:Function.assignProperty
+..include:seqan/graph_types.h
+*/
+
+template<typename TPropertyMap, typename TDescriptor>
+inline typename GetValue<TPropertyMap const>::Type
+getProperty(TPropertyMap const& pm,
+			TDescriptor const d)
+{
+	SEQAN_CHECKPOINT
+	return getValue(pm, _getId(d));
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Internal Property Manager using member ids (only for edges!!!)
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.InternalMap:
+..cat:Graph
+..summary:An internal property map using member ids.
+..remarks:Internal property maps are used to access internal edge cargos.
+..signature:InternalMap<TContainer, MemberId>
+..param.TContainer:The cargo type.
+...metafunction:Metafunction.Cargo
+..param.MemberId:An unsigned int.
+...remarks:Specifies the position of the member in the cargo.
+Note: If zero it is assumed that the cargo is a simple type (e.g., int).
+...default:$0$.
+..include:seqan/graph_types.h
+*/
+template<typename TContainer, unsigned int const MemberId = 0>
+struct InternalMap 
+{
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//	Internal Property Manager using member Ids - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.InternalMap
+
+template<typename T1, typename T2>
+struct Value<InternalMap<Pair<T1, T2>, 1> const> {
+	typedef T1 const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2>
+struct Value<InternalMap<Pair<T1, T2>, 1> > {
+	typedef T1 Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2>
+struct Value<InternalMap<Pair<T1, T2>, 2> const> {
+	typedef T2 const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2>
+struct Value<InternalMap<Pair<T1, T2>, 2> > {
+	typedef T2 Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T>
+struct Value<InternalMap<T, 0> const> {
+	typedef T const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T>
+struct Value<InternalMap<T, 0> > {
+	typedef T Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Internal Property Manager using member Ids - FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TContainer, unsigned int const MemberId>
+inline void
+resizeEdgeMap(Graph<TSpec> const&,
+			  InternalMap<TContainer, MemberId>&)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TContainer, unsigned int const MemberId>
+inline void
+resizeEdgeMap(Graph<TSpec>&,
+			  InternalMap<TContainer, MemberId>&)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor, typename TValue>
+inline void
+assignProperty(InternalMap<Pair<T1, T2>, 1>&,
+			   TEdgeDescriptor const e,
+			   TValue const val)
+{
+	SEQAN_CHECKPOINT
+	(cargo(e)).i1 = val;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor, typename TValue>
+inline void
+assignProperty(InternalMap<Pair<T1, T2>, 2>&,
+			   TEdgeDescriptor const e,
+			   TValue const val)
+{
+	SEQAN_CHECKPOINT
+	(cargo(e)).i2 = val;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T, typename TEdgeDescriptor, typename TValue>
+inline void
+assignProperty(InternalMap<T, 0>&,
+			   TEdgeDescriptor const e,
+			   TValue const val)
+{
+	SEQAN_CHECKPOINT
+	assignCargo(e, val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor>
+inline typename Value<InternalMap<Pair<T1, T2>, 2> >::Type&
+property(InternalMap<Pair<T1, T2>, 2>&,
+		 TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return (cargo(e)).i2;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor>
+inline typename Value<InternalMap<Pair<T1, T2>, 2> const>::Type&
+property(InternalMap<Pair<T1, T2>, 2> const&,
+		 TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return (cargo(e)).i2;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor>
+inline typename Value<InternalMap<Pair<T1, T2>, 1> >::Type&
+property(InternalMap<Pair<T1, T2>, 1>&,
+		 TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return (cargo(e)).i1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor>
+inline typename Value<InternalMap<Pair<T1, T2>, 1> const>::Type&
+property(InternalMap<Pair<T1, T2>, 1> const&,
+		 TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return (cargo(e)).i1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T, typename TEdgeDescriptor>
+inline typename Value<InternalMap<T, 0> >::Type&
+property(InternalMap<T, 0>&,
+		 TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return cargo(e);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T, typename TEdgeDescriptor>
+inline typename Value<InternalMap<T, 0> const>::Type&
+property(InternalMap<T, 0> const&,
+		 TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return cargo(e);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor>
+inline typename Value<InternalMap<Pair<T1, T2>, 1> >::Type
+getProperty(InternalMap<Pair<T1, T2>, 1> const&,
+			TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return (getCargo(e)).i1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor>
+inline typename Value<InternalMap<Pair<T1, T2>, 1> >::Type
+getProperty(InternalMap<Pair<T1, T2>, 1>&,
+			TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return (getCargo(e)).i1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor>
+inline typename Value<InternalMap<Pair<T1, T2>, 2> >::Type
+getProperty(InternalMap<Pair<T1, T2>, 2> const&,
+			TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return (getCargo(e)).i2;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T1, typename T2, typename TEdgeDescriptor>
+inline typename Value<InternalMap<Pair<T1, T2>, 2> >::Type
+getProperty(InternalMap<Pair<T1, T2>, 2>&,
+			TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return (getCargo(e)).i2;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T, typename TEdgeDescriptor>
+inline typename Value<InternalMap<T, 0> >::Type
+getProperty(InternalMap<T, 0> const&,
+			TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return getCargo(e);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename T, typename TEdgeDescriptor>
+inline typename Value<InternalMap<T, 0> >::Type
+getProperty(InternalMap<T, 0>&,
+			TEdgeDescriptor e)
+{
+	SEQAN_CHECKPOINT
+	return getCargo(e);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Internal Property Manager using pointer to members (only for edges!!!)
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.InternalPointerMap:
+..cat:Graph
+..summary:An internal property map using pointer to members.
+..remarks:Internal property maps are used to access internal edge cargos.
+..signature:InternalPointerMap<TPropmap, Instance>
+..param.TPropmap:A pointer to member type.
+..param.Instance:A pointer to a member of type TPropmap.
+..include:seqan/graph_types.h
+*/
+template <typename TPropmap, TPropmap const Instance> 
+struct InternalPointerMap 
+{
+}; 
+
+//////////////////////////////////////////////////////////////////////////////
+//	Internal Property Manager using member Ids - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.InternalPointerMap
+
+template<typename TClass, typename TValue, TValue TClass:: * TPMember>
+struct Value<InternalPointerMap<TValue TClass::*, TPMember> const> {
+	typedef TValue const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TClass, typename TValue, TValue TClass:: * TPMember>
+struct Value<InternalPointerMap<TValue TClass::*, TPMember> > {
+	typedef TValue Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Internal Property Manager using pointer to members - FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPropmap, TPropmap const Instance>
+inline void
+resizeEdgeMap(Graph<TSpec>&,
+			  InternalPointerMap<TPropmap, Instance>&)
+{
+	SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPropmap, TPropmap const Instance>
+inline void
+resizeEdgeMap(Graph<TSpec> const&,
+			  InternalPointerMap<TPropmap, Instance>&)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor>
+inline void
+assignProperty(InternalPointerMap<TValue TClass::*, TPMember>&,
+			TEdgeDescriptor const e,
+			TValue const val)
+{
+	SEQAN_CHECKPOINT
+	(cargo(e)).*TPMember = val;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor>
+inline typename Value<InternalPointerMap<TValue TClass::*, TPMember> >::Type&
+property(InternalPointerMap<TValue TClass::*, TPMember>&,
+		 TEdgeDescriptor const e)
+{
+	SEQAN_CHECKPOINT
+	return (cargo(e)).*TPMember;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor>
+inline typename Value<InternalPointerMap<TValue TClass::*, TPMember> const>::Type&
+property(InternalPointerMap<TValue TClass::*, TPMember> const&,
+		 TEdgeDescriptor const e)
+{
+	SEQAN_CHECKPOINT
+	return (cargo(e)).*TPMember;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor>
+inline typename Value<InternalPointerMap<TValue TClass::*, TPMember> >::Type
+getProperty(InternalPointerMap<TValue TClass::*, TPMember> const&,
+			TEdgeDescriptor const e)
+{
+	SEQAN_CHECKPOINT
+	return (getCargo(e)).*TPMember;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor>
+inline typename Value<InternalPointerMap<TValue TClass::*, TPMember> >::Type
+getProperty(InternalPointerMap<TValue TClass::*, TPMember>&,
+			TEdgeDescriptor const e)
+{
+	SEQAN_CHECKPOINT
+	return (getCargo(e)).*TPMember;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Internal Property Manager using raw pointer to member (only for edges!!!)
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.InternalRawMap:
+..cat:Graph
+..summary:An internal property map using raw pointer to members.
+..remarks:Internal property maps are used to access internal edge cargos.
+..include:seqan/graph_types.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// Internal Property Manager using raw pointer to member - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.InternalRawMap
+
+template <typename TClass, typename TValue> 
+struct Value<TValue TClass:: *> {
+	typedef TValue Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TClass, typename TValue> 
+struct Value<TValue TClass:: * const> {
+	typedef TValue const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Raw pointer to member - FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec, typename TClass, typename TValue> 
+inline void
+resizeEdgeMap(Graph<TSpec> const&,
+			  TValue TClass:: *)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec, typename TClass, typename TValue> 
+inline void
+resizeEdgeMap(Graph<TSpec>&,
+			  TValue TClass:: *)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TClass, typename TValue, typename TEdgeDescriptor> 
+inline void 
+assignProperty(TValue TClass:: * ptr_to_member, 
+			TEdgeDescriptor const e, 
+			TValue const val) 
+{
+	SEQAN_CHECKPOINT
+	(cargo(e)).*ptr_to_member=val; 
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TClass, typename TValue, typename TEdgeDescriptor> 
+inline TValue& 
+property(TValue TClass:: * const ptr_to_member, 
+		 TEdgeDescriptor const e) 
+{
+	SEQAN_CHECKPOINT
+	return (cargo(e)).*ptr_to_member; 
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TClass, typename TValue, typename TEdgeDescriptor> 
+inline TValue
+getProperty(TValue TClass:: * const ptr_to_member, 
+			TEdgeDescriptor const e) 
+{
+	SEQAN_CHECKPOINT
+	return (getCargo(e)).*ptr_to_member; 
+} 
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Init functions for all Maps - FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPropertyMap, typename TProperties>
+inline void
+resizeVertexMap(Graph<TSpec> const& g,
+			  TPropertyMap& pm,
+			  TProperties const& prop)
+{
+	SEQAN_CHECKPOINT
+	resizeVertexMap(g,pm);
+	typedef Graph<TSpec> TGraph;
+	typedef typename Iterator<TGraph, VertexIterator>::Type TVertexIterator;
+	TVertexIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		assignProperty(pm,getValue(it), getValue(prop, _getId(value(it))));
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TPropertyMap, typename TProperties>
+inline void
+resizeEdgeMap(Graph<TSpec> const& g,
+			  TPropertyMap& pm,
+			  TProperties const& prop)
+{
+	SEQAN_CHECKPOINT
+	resizeEdgeMap(g,pm);
+	typedef Graph<TSpec> TGraph;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	TEdgeIterator it(g);
+	for(;!atEnd(it);goNext(it)) {
+		assignProperty(pm,*it,prop[_getId(*it)]);
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_types_generated_forwards.h b/src/SeqAn-1.3/seqan/graph_types/graph_types_generated_forwards.h
new file mode 100644
index 0000000..69427d0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_types_generated_forwards.h
@@ -0,0 +1,1374 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_GRAPH_TYPES_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_GRAPH_TYPES_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AdjacencyIterator_
+
+struct AdjacencyIterator_;       	// "projects/library/seqan/graph_types/graph_base.h"(196)
+
+//____________________________________________________________________________
+// Alphabet
+
+template <typename T> struct Alphabet;       	// "projects/library/seqan/graph_types/graph_base.h"(99)
+
+//____________________________________________________________________________
+// Automaton
+
+template <typename TAlphabet , typename TCargo , typename TSpec > struct Automaton;       	// "projects/library/seqan/graph_types/graph_interface.h"(53)
+
+//____________________________________________________________________________
+// AutomatonEdgeArray
+
+template <typename TEdge, typename TAlphabet> class AutomatonEdgeArray;       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(46)
+
+//____________________________________________________________________________
+// BfsIterator_
+
+struct BfsIterator_;       	// "projects/library/seqan/graph_types/graph_base.h"(205)
+
+//____________________________________________________________________________
+// Cargo
+
+template <typename T> struct Cargo;       	// "projects/library/seqan/graph_types/graph_base.h"(68)
+
+//____________________________________________________________________________
+// DfsPreorder_
+
+struct DfsPreorder_;       	// "projects/library/seqan/graph_types/graph_base.h"(214)
+
+//____________________________________________________________________________
+// Directed
+
+template <typename TCargo , typename TSpec > struct Directed;       	// "projects/library/seqan/graph_types/graph_interface.h"(41)
+
+//____________________________________________________________________________
+// EdgeDescriptor
+
+template <typename T> struct EdgeDescriptor;       	// "projects/library/seqan/graph_types/graph_base.h"(58)
+
+//____________________________________________________________________________
+// EdgeIdHandler
+
+template <typename T> struct EdgeIdHandler;       	// "projects/library/seqan/graph_types/graph_base.h"(117)
+
+//____________________________________________________________________________
+// EdgeIterator_
+
+struct EdgeIterator_;       	// "projects/library/seqan/graph_types/graph_base.h"(178)
+
+//____________________________________________________________________________
+// EdgeStump
+
+template <typename TCargo , bool TList , bool TSource , bool TId , typename TSpec > class EdgeStump;       	// "projects/library/seqan/graph_types/graph_base.h"(228)
+
+//____________________________________________________________________________
+// EdgeType
+
+template <typename T> struct EdgeType;       	// "projects/library/seqan/graph_types/graph_base.h"(84)
+
+//____________________________________________________________________________
+// ExactFragment
+
+template <typename TSpec > struct ExactFragment;       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(58)
+
+//____________________________________________________________________________
+// ExactReversableFragment
+
+template <typename TSpec > struct ExactReversableFragment;       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(77)
+
+//____________________________________________________________________________
+// Fragment
+
+template <typename TSize , typename TSpec > class Fragment;       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(100)
+
+//____________________________________________________________________________
+// Graph
+
+template <typename TSpec > class Graph;       	// "projects/library/seqan/graph_types/graph_interface.h"(75)
+
+//____________________________________________________________________________
+// GraphIterator
+
+template <typename TSpec> struct GraphIterator;       	// "projects/library/seqan/graph_types/graph_iterator.h"(46)
+
+//____________________________________________________________________________
+// Hmm
+
+template <typename TAlphabet , typename TCargo , typename TSpec > struct Hmm;       	// "projects/library/seqan/graph_types/graph_interface.h"(57)
+
+//____________________________________________________________________________
+// IdManager
+
+template <typename TIdType, typename TSpec> class IdManager;       	// "projects/library/seqan/graph_types/graph_idmanager.h"(58)
+template <typename TIdType , typename TSpec > class IdManager;       	// "projects/library/seqan/graph_types/graph_base.h"(258)
+
+//____________________________________________________________________________
+// InternalAdjacencyIterator
+
+template <typename TSpec > struct InternalAdjacencyIterator;       	// "projects/library/seqan/graph_types/graph_iterator.h"(62)
+
+//____________________________________________________________________________
+// InternalBfsIterator
+
+template <typename TSpec > struct InternalBfsIterator;       	// "projects/library/seqan/graph_types/graph_iterator.h"(66)
+
+//____________________________________________________________________________
+// InternalDfsIterator
+
+template <typename TSpec > struct InternalDfsIterator;       	// "projects/library/seqan/graph_types/graph_iterator.h"(70)
+
+//____________________________________________________________________________
+// InternalEdgeIterator
+
+template <typename TSpec > struct InternalEdgeIterator;       	// "projects/library/seqan/graph_types/graph_iterator.h"(54)
+
+//____________________________________________________________________________
+// InternalMap
+
+template <typename TContainer, unsigned int const MemberId > struct InternalMap;       	// "projects/library/seqan/graph_types/graph_property.h"(254)
+
+//____________________________________________________________________________
+// InternalOutEdgeIterator
+
+template <typename TSpec > struct InternalOutEdgeIterator;       	// "projects/library/seqan/graph_types/graph_iterator.h"(58)
+
+//____________________________________________________________________________
+// InternalPointerMap
+
+template <typename TPropmap, TPropmap const Instance> struct InternalPointerMap;       	// "projects/library/seqan/graph_types/graph_property.h"(515)
+
+//____________________________________________________________________________
+// InternalVertexIterator
+
+template <typename TSpec > struct InternalVertexIterator;       	// "projects/library/seqan/graph_types/graph_iterator.h"(50)
+
+//____________________________________________________________________________
+// OutEdgeIterator_
+
+struct OutEdgeIterator_;       	// "projects/library/seqan/graph_types/graph_base.h"(187)
+
+//____________________________________________________________________________
+// Tree
+
+template <typename TCargo , typename TSpec > struct Tree;       	// "projects/library/seqan/graph_types/graph_interface.h"(49)
+
+//____________________________________________________________________________
+// TreeTag_
+
+struct TreeTag_;       	// "projects/library/seqan/graph_types/graph_base.h"(145)
+
+//____________________________________________________________________________
+// Undirected
+
+template <typename TCargo , typename TSpec > struct Undirected;       	// "projects/library/seqan/graph_types/graph_interface.h"(45)
+
+//____________________________________________________________________________
+// VertexIdHandler
+
+template <typename T> struct VertexIdHandler;       	// "projects/library/seqan/graph_types/graph_base.h"(131)
+template <typename T> struct VertexIdHandler;       	// "projects/library/seqan/graph_types/graph_base.h"(279)
+
+//____________________________________________________________________________
+// VertexIterator_
+
+struct VertexIterator_;       	// "projects/library/seqan/graph_types/graph_base.h"(169)
+
+//____________________________________________________________________________
+// WithoutEdgeId_
+
+struct WithoutEdgeId_;       	// "projects/library/seqan/graph_types/graph_base.h"(140)
+
+//____________________________________________________________________________
+// WordGraph
+
+template <typename TSpec > struct WordGraph;       	// "projects/library/seqan/graph_types/graph_impl_wordgraph.h"(40)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AdjacencyIterator
+
+typedef Tag<AdjacencyIterator_> const AdjacencyIterator;       	// "projects/library/seqan/graph_types/graph_base.h"(197)
+
+//____________________________________________________________________________
+// BfsIterator
+
+typedef Tag<BfsIterator_> const BfsIterator;       	// "projects/library/seqan/graph_types/graph_base.h"(206)
+
+//____________________________________________________________________________
+// DfsPreorder
+
+typedef Tag<DfsPreorder_> const DfsPreorder;       	// "projects/library/seqan/graph_types/graph_base.h"(215)
+
+//____________________________________________________________________________
+// EdgeIterator
+
+typedef Tag<EdgeIterator_> const EdgeIterator;       	// "projects/library/seqan/graph_types/graph_base.h"(179)
+
+//____________________________________________________________________________
+// OutEdgeIterator
+
+typedef Tag<OutEdgeIterator_> const OutEdgeIterator;       	// "projects/library/seqan/graph_types/graph_base.h"(188)
+
+//____________________________________________________________________________
+// TreeTag
+
+typedef Tag<TreeTag_> const TreeTag;       	// "projects/library/seqan/graph_types/graph_base.h"(146)
+
+//____________________________________________________________________________
+// VertexIterator
+
+typedef Tag<VertexIterator_> const VertexIterator;       	// "projects/library/seqan/graph_types/graph_base.h"(170)
+
+//____________________________________________________________________________
+// WithoutEdgeId
+
+typedef Tag<WithoutEdgeId_> const WithoutEdgeId;       	// "projects/library/seqan/graph_types/graph_base.h"(141)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _addEdge
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TNodeAttributes, typename TEdgeAttributes, typename TStatement> inline void _addEdge(Graph<Directed<TCargo, TSpec> >& g, TVertexDescriptor sourceV, TVertexDescriptor targetV, TNodeAttributes&, TEdgeAttributes& edgeMap, TStatement& attr_list);       	// "projects/library/seqan/graph_types/graph_drawing.h"(623)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TNodeAttributes, typename TEdgeAttributes, typename TStatement> inline void _addEdge(Graph<Undirected<TCargo, TSpec> >& g, TVertexDescriptor sourceV, TVertexDescriptor targetV, TNodeAttributes&, TEdgeAttributes& edgeMap, TStatement& attr_list);       	// "projects/library/seqan/graph_types/graph_drawing.h"(641)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TNodeAttributes, typename TEdgeAttributes, typename TStatement> inline void _addEdge(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor sourceV, TVertexDescriptor targetV, TNodeAttributes&, TEdgeAttributes& edgeMap, TStatement& attr_list);       	// "projects/library/seqan/graph_types/graph_drawing.h"(659)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TNodeAttributes, typename TEdgeAttributes, typename TStatement> inline void _addEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor sourceV, TVertexDescriptor targetV, TNodeAttributes&, TEdgeAttributes& edgeMap, TStatement& attr_list);       	// "projects/library/seqan/graph_types/graph_drawing.h"(697)
+template <typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TNodeIdMap> inline void _addEdge(Graph<TSpec>& g, TStatement& left_node_id, TStatement& right_node_id, TStatement& attr_list, TNodeAttributes& nodeMap, TEdgeAttributes& edgeMap, TNodeIdMap& nodeIdMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(739)
+
+//____________________________________________________________________________
+// _addLetterToOracle
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TPropertyMap, typename TChar> inline void _addLetterToOracle(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TPropertyMap& supplyState, TChar const c);       	// "projects/library/seqan/graph_types/graph_impl_oracle.h"(80)
+
+//____________________________________________________________________________
+// _addNode
+
+template <typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TNodeIdMap> inline void _addNode(Graph<TSpec>& g, TStatement& node_id, TStatement& attr_list, TNodeAttributes& nodeMap, TEdgeAttributes&, TNodeIdMap& nodeIdMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(601)
+
+//____________________________________________________________________________
+// _addStringToTrie
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TKeyword, typename TPos> inline void _addStringToTrie(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TTerminalStateMap& terminalStateMap, TKeyword const& str, TPos const& keywordIndex);       	// "projects/library/seqan/graph_types/graph_impl_trie.h"(84)
+
+//____________________________________________________________________________
+// _assignId
+
+template <typename TCargo, bool TList, bool TSource, typename TSpec, typename TId2> void _assignId(EdgeStump<TCargo, TList, TSource, true, TSpec>* es, TId2 const id);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(953)
+template <typename TCargo, bool TList, bool TSource, typename TSpec, typename TId2> void _assignId(EdgeStump<TCargo, TList, TSource, false, TSpec>*, TId2 const);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(964)
+template <typename TCargo, bool TList, bool TSource, typename TId2> void _assignId(EdgeStump<TCargo, TList, TSource, false, TreeTag>*, TId2 const);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(974)
+
+//____________________________________________________________________________
+// _copyGraph
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void _copyGraph(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& source, Graph<Automaton<TAlphabet, TCargo, TSpec> >& dest, bool transpose);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(171)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void _copyGraph(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& source, Graph<Automaton<TAlphabet, TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(217)
+template <typename TCargo, typename TSpec> inline void _copyGraph(Graph<Undirected<TCargo, TSpec> > const& source, Graph<Undirected<TCargo, TSpec> >& dest, bool);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(151)
+template <typename TCargo, typename TSpec> inline void _copyGraph(Graph<Undirected<TCargo, TSpec> > const& source, Graph<Undirected<TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(197)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void _copyGraph(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& source, Graph<Hmm<TAlphabet, TCargo, TSpec> >& dest, bool transp);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(159)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void _copyGraph(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& source, Graph<Hmm<TAlphabet, TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(183)
+template <typename TCargo, typename TSpec> inline void _copyGraph(Graph<Tree<TCargo, TSpec> > const& source, Graph<Tree<TCargo, TSpec> >& dest, bool transpose);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(190)
+template <typename TCargo, typename TSpec> inline void _copyGraph(Graph<Tree<TCargo, TSpec> > const& source, Graph<Tree<TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(231)
+template <typename TCargo, typename TSpec> inline void _copyGraph(Graph<Directed<TCargo, TSpec> > const& source, Graph<Directed<TCargo, TSpec> >& dest, bool transpose);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(152)
+template <typename TCargo, typename TSpec> inline void _copyGraph(Graph<Directed<TCargo, TSpec> > const& source, Graph<Directed<TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(195)
+
+//____________________________________________________________________________
+// _createEdgeAttributes
+
+template <typename TCargo, typename TSpec, typename TEdgeAttributes> inline void _createEdgeAttributes(Graph<Directed<TCargo, TSpec> > const& g, TEdgeAttributes& edgeMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(224)
+template <typename TCargo, typename TSpec, typename TEdgeAttributes> inline void _createEdgeAttributes(Graph<Undirected<TCargo, TSpec> > const& g, TEdgeAttributes& edgeMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(235)
+template <typename TSpec, typename TEdgeAttributes> inline void _createEdgeAttributes(Graph<Tree<void, TSpec> > const& g, TEdgeAttributes& edgeMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(246)
+template <typename TCargo, typename TSpec, typename TEdgeAttributes> inline void _createEdgeAttributes(Graph<Tree<TCargo, TSpec> > const& g, TEdgeAttributes& edgeMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(257)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeAttributes> inline void _createEdgeAttributes(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TEdgeAttributes& edgeMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(279)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeAttributes> inline void _createEdgeAttributes(Graph<Automaton<TAlphabet, TCargo, WordGraph<TSpec> > > const& g, TEdgeAttributes& edgeMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(301)
+
+//____________________________________________________________________________
+// _createEmptyEdgeAttributes
+
+template <typename TSpec, typename TEdgeAttributes> inline void _createEmptyEdgeAttributes(Graph<TSpec> const& g, TEdgeAttributes& edgeMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(205)
+
+//____________________________________________________________________________
+// _createNodeAttributes
+
+template <typename TSpec, typename TNodeAttributes> inline void _createNodeAttributes(Graph<TSpec> const& g, TNodeAttributes& nodeMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(154)
+template <typename TSpec, typename TNodeAttributes, typename TNameMap> inline void _createNodeAttributes(Graph<TSpec> const& g, TNodeAttributes& nodeMap, TNameMap const& nameMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(181)
+
+//____________________________________________________________________________
+// _createTrieNodeAttributes
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TPosition, typename TNodeMap> inline void _createTrieNodeAttributes(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, String<String<TPosition> > pos, TNodeMap& nodeMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(117)
+
+//____________________________________________________________________________
+// _createVertices
+
+template <typename TSpec, typename TVertexDescriptor> inline void _createVertices(Graph<TSpec>& g, TVertexDescriptor const maxId);       	// "projects/library/seqan/graph_types/graph_interface.h"(406)
+
+//____________________________________________________________________________
+// _getEdgeIdManager
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename EdgeIdHandler<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type& _getEdgeIdManager(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(156)
+template <typename TCargo, typename TSpec> inline typename EdgeIdHandler<Graph<Undirected<TCargo, TSpec> > >::Type& _getEdgeIdManager(Graph<Undirected<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(137)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename EdgeIdHandler<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type& _getEdgeIdManager(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(145)
+template <typename TCargo, typename TSpec> inline IdManager<typename Id<Graph<Tree<TCargo, TSpec> > >::Type, Default> const & _getEdgeIdManager(Graph<Tree<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(146)
+template <typename TCargo, typename TSpec> inline IdManager<typename Id<Graph<Tree<TCargo, TSpec> > >::Type, Default> & _getEdgeIdManager(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(154)
+template <typename TCargo, typename TSpec> inline typename EdgeIdHandler<Graph<Directed<TCargo, TSpec> > >::Type& _getEdgeIdManager(Graph<Directed<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(137)
+
+//____________________________________________________________________________
+// _getId
+
+template <typename TCargo, bool TList, bool TSource, typename TSpec> inline typename Id<EdgeStump<TCargo, TList, TSource, true, TSpec> const>::Type _getId(EdgeStump<TCargo, TList, TSource, true, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(983)
+template <typename TCargo, bool TList, bool TSource, typename TSpec> inline typename Id<EdgeStump<TCargo, TList, TSource, true, TSpec> >::Type _getId(EdgeStump<TCargo, TList, TSource, true, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(993)
+template <typename TCargo, bool TList, bool TSource> inline typename Id<EdgeStump<TCargo, TList, TSource, false, TreeTag> const>::Type _getId(EdgeStump<TCargo, TList, TSource, false, TreeTag> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(1003)
+template <typename TCargo, bool TList, bool TSource> inline typename Id<EdgeStump<TCargo, TList, TSource, false, TreeTag> >::Type _getId(EdgeStump<TCargo, TList, TSource, false, TreeTag>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(1014)
+template <typename TCargo, bool TList, bool TSource, typename TSpec> inline typename Id<EdgeStump<TCargo, TList, TSource, false, TSpec> >::Type _getId(EdgeStump<TCargo, TList, TSource, false, TSpec> const*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(1025)
+template <typename TCargo, bool TList, bool TSource, typename TSpec> inline typename Id<EdgeStump<TCargo, TList, TSource, false, TSpec> >::Type _getId(EdgeStump<TCargo, TList, TSource, false, TSpec>*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(1036)
+template <typename TId> inline TId _getId(TId const id);       	// "projects/library/seqan/graph_types/graph_interface.h"(395)
+
+//____________________________________________________________________________
+// _getInfinity
+
+template <typename T> inline T _getInfinity();       	// "projects/library/seqan/graph_types/graph_interface.h"(356)
+template <> inline double _getInfinity();       	// "projects/library/seqan/graph_types/graph_interface.h"(366)
+
+//____________________________________________________________________________
+// _getInfinityDistance
+
+template <typename TWeightMap> inline typename Value<TWeightMap>::Type _getInfinityDistance(TWeightMap const&);       	// "projects/library/seqan/graph_types/graph_interface.h"(375)
+template <typename T> inline T _getInfinityDistance();       	// "projects/library/seqan/graph_types/graph_interface.h"(385)
+
+//____________________________________________________________________________
+// _getInternalLabel
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TString> inline typename Alphabet<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type _getInternalLabel(Graph<Automaton<TAlphabet, TCargo, TSpec> >&, TString& str);       	// "projects/library/seqan/graph_types/graph_drawing.h"(673)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TString> inline String<TAlphabet> _getInternalLabel(Graph<Automaton<TAlphabet, TCargo, WordGraph<TSpec> > >&, TString& str);       	// "projects/library/seqan/graph_types/graph_drawing.h"(683)
+
+//____________________________________________________________________________
+// _getVertexIdManager
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexIdHandler<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type& _getVertexIdManager(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(145)
+template <typename TCargo, typename TSpec> inline typename VertexIdHandler<Graph<Undirected<TCargo, TSpec> > >::Type& _getVertexIdManager(Graph<Undirected<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(126)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexIdHandler<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type& _getVertexIdManager(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(134)
+template <typename TCargo, typename TSpec> inline IdManager<typename Id<Graph<Tree<TCargo, TSpec> > >::Type, Default> const & _getVertexIdManager(Graph<Tree<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(130)
+template <typename TCargo, typename TSpec> inline IdManager<typename Id<Graph<Tree<TCargo, TSpec> > >::Type, Default> & _getVertexIdManager(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(138)
+template <typename TCargo, typename TSpec> inline typename VertexIdHandler<Graph<Directed<TCargo, TSpec> > >::Type& _getVertexIdManager(Graph<Directed<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(126)
+
+//____________________________________________________________________________
+// _getVertexString
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline String<AutomatonEdgeArray<typename EdgeType<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type, TAlphabet> >& _getVertexString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(134)
+template <typename TCargo, typename TSpec> inline String<typename EdgeType<Graph<Undirected<TCargo, TSpec> > >::Type*>& _getVertexString(Graph<Undirected<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(115)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline String<typename EdgeType<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type*>& _getVertexString(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(123)
+template <typename TCargo, typename TSpec> inline String<typename EdgeType<Graph<Tree<TCargo, TSpec> > >::Type*>& _getVertexString(Graph<Tree<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(119)
+template <typename TCargo, typename TSpec> inline String<typename EdgeType<Graph<Directed<TCargo, TSpec> > >::Type*>& _getVertexString(Graph<Directed<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(115)
+
+//____________________________________________________________________________
+// _goNextInternal
+
+template <typename TGraph, typename TSpec> inline void _goNextInternal(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(283)
+
+//____________________________________________________________________________
+// _goPreviousInternal
+
+template <typename TGraph, typename TSpec> inline void _goPreviousInternal(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(354)
+
+//____________________________________________________________________________
+// _loadSequences
+
+template <typename TPath, typename TStringSet, typename TNames> inline unsigned int _loadSequences(TPath const& in_path, TStringSet& origStrSet, TNames& names);       	// "projects/library/seqan/graph_types/graph_utility_parsing.h"(55)
+
+//____________________________________________________________________________
+// _markRootVertex
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TAttributes> inline void _markRootVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const& v, TAttributes& str);       	// "projects/library/seqan/graph_types/graph_drawing.h"(66)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TAttributes> inline void _markRootVertex(Graph<Directed<TCargo, TSpec> > const&, TVertexDescriptor const&, TAttributes&);       	// "projects/library/seqan/graph_types/graph_drawing.h"(80)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TAttributes> inline void _markRootVertex(Graph<Undirected<TCargo, TSpec> > const&, TVertexDescriptor const&, TAttributes&);       	// "projects/library/seqan/graph_types/graph_drawing.h"(91)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TAttributes> inline void _markRootVertex(Graph<Tree<TCargo, TSpec> > const& g, TVertexDescriptor const& v, TAttributes& str);       	// "projects/library/seqan/graph_types/graph_drawing.h"(103)
+
+//____________________________________________________________________________
+// _processEdgeStatement
+
+template <typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TPosition, typename TNodeIdMap> inline void _processEdgeStatement(Graph<TSpec>& g, TStatement& stmt, TNodeAttributes& nodeMap, TEdgeAttributes& edgeMap, TPosition pos, TNodeIdMap& nodeIdMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(808)
+
+//____________________________________________________________________________
+// _processNodeStatement
+
+template <typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TNodeIdMap> inline void _processNodeStatement(Graph<TSpec>& g, TStatement& stmt, TNodeAttributes& nodeMap, TEdgeAttributes& edgeMap, TNodeIdMap& nodeIdMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(769)
+
+//____________________________________________________________________________
+// _processStatement
+
+template <typename TSpec, typename TStatement, typename TNodeAttributes, typename TEdgeAttributes, typename TNodeIdMap> inline void _processStatement(Graph<TSpec>& g, TStatement& stmt, TNodeAttributes& nodeMap, TEdgeAttributes& edgeMap, TNodeIdMap& nodeIdMap);       	// "projects/library/seqan/graph_types/graph_drawing.h"(850)
+
+//____________________________________________________________________________
+// _rebuildParentMap
+
+template <typename TCargo, typename TSpec> inline void _rebuildParentMap(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(163)
+
+//____________________________________________________________________________
+// _writeEdgeType
+
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec> inline void _writeEdgeType(TFile & file, Graph<Automaton<TAlphabet, TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(425)
+template <typename TFile, typename TCargo, typename TSpec> inline void _writeEdgeType(TFile & file, Graph<Directed<TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(437)
+template <typename TFile, typename TCargo, typename TSpec> inline void _writeEdgeType(TFile & file, Graph<Undirected<TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(449)
+template <typename TFile, typename TCargo, typename TSpec> inline void _writeEdgeType(TFile & file, Graph<Tree<TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(461)
+
+//____________________________________________________________________________
+// _writeGraphFooter
+
+template <typename TFile, typename TCargo, typename TSpec> inline void _writeGraphFooter(TFile &, Graph<Directed<TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(332)
+template <typename TFile, typename TCargo, typename TSpec> inline void _writeGraphFooter(TFile &, Graph<Undirected<TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(343)
+template <typename TFile, typename TCargo, typename TSpec> inline void _writeGraphFooter(TFile &, Graph<Tree<TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(354)
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec> inline void _writeGraphFooter(TFile &, Graph<Automaton<TAlphabet, TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(366)
+
+//____________________________________________________________________________
+// _writeGraphType
+
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec> inline void _writeGraphType(TFile & file, Graph<Automaton<TAlphabet, TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(377)
+template <typename TFile, typename TCargo, typename TSpec> inline void _writeGraphType(TFile & file, Graph<Directed<TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(389)
+template <typename TFile, typename TCargo, typename TSpec> inline void _writeGraphType(TFile & file, Graph<Undirected<TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(401)
+template <typename TFile, typename TCargo, typename TSpec> inline void _writeGraphType(TFile & file, Graph<Tree<TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(413)
+
+//____________________________________________________________________________
+// addChild
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type addChild(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor parent);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(911)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type addChild(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const parent, TCargo const cargo);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(926)
+
+//____________________________________________________________________________
+// addEdge
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel> inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type addEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target, TLabel const label);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(411)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel, typename TEdgeCargo> inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type addEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target, TLabel const label, TEdgeCargo const cargo);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(433)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type addEdge(Graph<Undirected<TCargo, TSpec> >& g, TVertexDescriptor source, TVertexDescriptor target);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(405)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCargo2> inline typename EdgeDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type addEdge(Graph<Undirected<TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target, TCargo2 const cargo);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(442)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type addEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(409)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCargo2> inline typename EdgeDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type addEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target, TCargo2 const cargo);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(422)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Tree<TCargo, TSpec> > >::Type addEdge(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const parent, TVertexDescriptor const child);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(471)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Tree<TCargo, TSpec> > >::Type addEdge(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const parent, TVertexDescriptor const child, TCargo const cargo);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(500)
+template <typename TAlphabet, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type addEdge(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > >& g, TVertexDescriptor const source, TVertexDescriptor const target, String<TAlphabet> const & label);       	// "projects/library/seqan/graph_types/graph_impl_wordgraph.h"(114)
+template <typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TChars> inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type addEdge(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > >& g, TVertexDescriptor const source, TVertexDescriptor const target, TChars const* chars);       	// "projects/library/seqan/graph_types/graph_impl_wordgraph.h"(141)
+template <typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TLabel, typename TEdgeCargo> inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type addEdge(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > >& , TVertexDescriptor const , TVertexDescriptor const , TLabel const , TEdgeCargo const );       	// "projects/library/seqan/graph_types/graph_impl_wordgraph.h"(155)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Directed<TCargo, TSpec> > >::Type addEdge(Graph<Directed<TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(573)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Directed<TCargo, TSpec> > >::Type addEdge(Graph<Directed<TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target, TCargo const cargo);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(602)
+
+//____________________________________________________________________________
+// addEdges
+
+template <typename TSpec, typename TEdgeArray, typename TSize> inline void addEdges(Graph<TSpec>& dest, TEdgeArray const & edges, TSize const size);       	// "projects/library/seqan/graph_types/graph_interface.h"(436)
+
+//____________________________________________________________________________
+// addVertex
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type addVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(375)
+template <typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type addVertex(Graph<Undirected<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(373)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type addVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, bool silent);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(321)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type addVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(344)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEmission> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type addVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, String<TEmission> const& emis);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(355)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEmission> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type addVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TEmission const& emis, bool silent);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(381)
+template <typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type addVertex(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(421)
+template <typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Directed<TCargo, TSpec> > >::Type addVertex(Graph<Directed<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(501)
+
+//____________________________________________________________________________
+// assignBeginState
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void assignBeginState(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(642)
+
+//____________________________________________________________________________
+// assignCargo
+
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec, typename TCargo2> inline void assignCargo(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es, TCargo2 const& t);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(467)
+template <bool TList, bool TSource, bool TId, typename TSpec, typename TCargo2> inline void assignCargo(EdgeStump<void, TList, TSource, TId, TSpec>*, TCargo2 const&);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(478)
+
+//____________________________________________________________________________
+// assignEmissionProbability
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TEmisProb> inline void assignEmissionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const state, TAlphabet const symbol, TEmisProb const eProb);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(965)
+
+//____________________________________________________________________________
+// assignEndState
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void assignEndState(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(668)
+
+//____________________________________________________________________________
+// assignNextS
+
+template <typename TCargo, bool TId, typename TSpec> inline void assignNextS(EdgeStump<TCargo, true, true, TId, TSpec>* es, EdgeStump<TCargo, true, true, TId, TSpec>* es2);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(832)
+template <typename TCargo, bool TId, typename TSpec> inline void assignNextS(EdgeStump<TCargo, true, false, TId, TSpec>*, EdgeStump<TCargo, true, false, TId, TSpec>*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(844)
+
+//____________________________________________________________________________
+// assignNextT
+
+template <typename TCargo, bool TSource, bool TId, typename TSpec> inline void assignNextT(EdgeStump<TCargo, true, TSource, TId, TSpec>* es, EdgeStump<TCargo, true, TSource, TId, TSpec>* es2);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(739)
+
+//____________________________________________________________________________
+// assignProperty
+
+template <typename TPropertyMap, typename TDescriptor, typename TValue> inline void assignProperty(TPropertyMap& pm, TDescriptor const d, TValue const val);       	// "projects/library/seqan/graph_types/graph_property.h"(151)
+template <typename T1, typename T2, typename TEdgeDescriptor, typename TValue> inline void assignProperty(InternalMap<Pair<T1, T2>, 1>&, TEdgeDescriptor const e, TValue const val);       	// "projects/library/seqan/graph_types/graph_property.h"(337)
+template <typename T1, typename T2, typename TEdgeDescriptor, typename TValue> inline void assignProperty(InternalMap<Pair<T1, T2>, 2>&, TEdgeDescriptor const e, TValue const val);       	// "projects/library/seqan/graph_types/graph_property.h"(349)
+template <typename T, typename TEdgeDescriptor, typename TValue> inline void assignProperty(InternalMap<T, 0>&, TEdgeDescriptor const e, TValue const val);       	// "projects/library/seqan/graph_types/graph_property.h"(361)
+template <typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor> inline void assignProperty(InternalPointerMap<TValue TClass::*, TPMember>&, TEdgeDescriptor const e, TValue const val);       	// "projects/library/seqan/graph_types/graph_property.h"(570)
+template <typename TClass, typename TValue, typename TEdgeDescriptor> inline void assignProperty(TValue TClass:: * ptr_to_member, TEdgeDescriptor const e, TValue const val);       	// "projects/library/seqan/graph_types/graph_property.h"(686)
+
+//____________________________________________________________________________
+// assignRoot
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void assignRoot(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(732)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void assignRoot(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(760)
+
+//____________________________________________________________________________
+// assignSilentStatus
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void assignSilentStatus(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const vertex, bool const silent);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(995)
+
+//____________________________________________________________________________
+// assignSource
+
+template <typename TCargo, bool TList, bool TId, typename TSpec, typename TVertexDescriptor> inline void assignSource(EdgeStump<TCargo, TList, true, TId, TSpec>* es, TVertexDescriptor const s);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(598)
+template <typename TCargo, bool TList, bool TId, typename TSpec, typename TVertexDescriptor> inline void assignSource(EdgeStump<TCargo, TList, false, TId, TSpec>*, TVertexDescriptor const);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(609)
+
+//____________________________________________________________________________
+// assignTarget
+
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec, typename TVertexDescriptor> inline void assignTarget(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es, TVertexDescriptor const t);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(504)
+
+//____________________________________________________________________________
+// assignTransitionProbability
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TTransProb> inline void assignTransitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const state1, TVertexDescriptor const state2, TTransProb const t);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(864)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor, typename TTransProb> inline void assignTransitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >&, TEdgeDescriptor e, TTransProb const t);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(879)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename TGraph, typename TSpec> inline bool atBegin(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(283)
+template <typename TGraph, typename TSpec> inline bool atBegin(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(219)
+template <typename TGraph, typename TSpec> inline bool atBegin(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(209)
+template <typename TGraph, typename TSpec> inline bool atBegin(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(212)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool atBegin(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(629)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool atBegin(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(639)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool atBegin(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(649)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool atBegin(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(660)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool atBegin(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(670)
+template <typename TGraph, typename TSpec> inline bool atBegin(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(238)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TGraph, typename TSpec> inline bool atEnd(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(330)
+template <typename TGraph, typename TSpec> inline bool atEnd(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(239)
+template <typename TGraph, typename TSpec> inline bool atEnd(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(226)
+template <typename TGraph, typename TSpec> inline bool atEnd(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(229)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool atEnd(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(730)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool atEnd(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(740)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool atEnd(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(750)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool atEnd(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(760)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool atEnd(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(770)
+template <typename TGraph, typename TSpec> inline bool atEnd(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(262)
+
+//____________________________________________________________________________
+// beginState
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type& beginState(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(691)
+
+//____________________________________________________________________________
+// canParseString
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCharacters> inline bool canParseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const & g, TVertexDescriptor const vertex, TCharacters const & chars);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(965)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCharacters> inline bool canParseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const & g, TVertexDescriptor const vertex, TCharacters const * chars);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(978)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TCharacters> inline bool canParseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > & g, TCharacters const & chars);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(991)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TCharacters> inline bool canParseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > & g, TCharacters const * chars);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(1000)
+
+//____________________________________________________________________________
+// cargo
+
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec> inline typename Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> const>::Type& cargo(EdgeStump<TCargo, TList, TSource, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(407)
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec> inline typename Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type& cargo(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(417)
+template <bool TList, bool TSource, bool TId, typename TSpec> inline typename Cargo<EdgeStump<void, TList, TSource, TId, TSpec> >::Type cargo(EdgeStump<void, TList, TSource, TId, TSpec>*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(428)
+template <bool TList, bool TSource, bool TId, typename TSpec> inline typename Cargo<EdgeStump<void, TList, TSource, TId, TSpec> const>::Type cargo(EdgeStump<void, TList, TSource, TId, TSpec> const*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(439)
+
+//____________________________________________________________________________
+// childVertex
+
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type childVertex(Graph<Tree<TCargo, TSpec> > const&, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(1020)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void clear(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(308)
+template <typename TCargo, typename TSpec> inline void clear(Graph<Undirected<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(318)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void clear(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(277)
+template <typename TCargo, typename TSpec> inline void clear(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(351)
+template <typename TCargo, typename TSpec> inline void clear(Graph<Directed<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(372)
+
+//____________________________________________________________________________
+// clearEdges
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void clearEdges(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(284)
+template <typename TCargo, typename TSpec> inline void clearEdges(Graph<Undirected<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(262)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void clearEdges(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(249)
+template <typename TCargo, typename TSpec> inline void clearEdges(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(313)
+template <typename TCargo, typename TSpec> inline void clearEdges(Graph<Directed<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(319)
+
+//____________________________________________________________________________
+// clearVertices
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void clearVertices(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(296)
+template <typename TCargo, typename TSpec> inline void clearVertices(Graph<Undirected<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(306)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void clearVertices(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(259)
+template <typename TCargo, typename TSpec> inline void clearVertices(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(338)
+template <typename TCargo, typename TSpec> inline void clearVertices(Graph<Directed<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(350)
+
+//____________________________________________________________________________
+// collectLeaves
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor, typename TGroup> inline void collectLeaves(Graph<Tree<TCargo, TSpec> > const& g, TVertexDescriptor const root, TGroup& group);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(1082)
+
+//____________________________________________________________________________
+// createOracle
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TText> inline void createOracle(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TText const text);       	// "projects/library/seqan/graph_types/graph_impl_oracle.h"(127)
+
+//____________________________________________________________________________
+// createOracleOnReverse
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TText> inline void createOracleOnReverse(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TText const text);       	// "projects/library/seqan/graph_types/graph_impl_oracle.h"(161)
+
+//____________________________________________________________________________
+// createRoot
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void createRoot(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(704)
+template <typename TCargo, typename TSpec> inline void createRoot(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(775)
+
+//____________________________________________________________________________
+// createSetOracle
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TKeywords> inline void createSetOracle(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TTerminalStateMap& terminalStateMap, TKeywords const& keywords);       	// "projects/library/seqan/graph_types/graph_impl_oracle.h"(185)
+
+//____________________________________________________________________________
+// createSetSuffixTrie
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TTexts> inline void createSetSuffixTrie(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TTerminalStateMap& terminalStateMap, TTexts const& texts);       	// "projects/library/seqan/graph_types/graph_impl_trie.h"(250)
+
+//____________________________________________________________________________
+// createSuffixTrie
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TText> inline void createSuffixTrie(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TTerminalStateMap& terminalStateMap, TText const& text);       	// "projects/library/seqan/graph_types/graph_impl_trie.h"(226)
+
+//____________________________________________________________________________
+// createTrie
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TKeywords> inline void createTrie(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TTerminalStateMap& terminalStateMap, TKeywords const& keywords);       	// "projects/library/seqan/graph_types/graph_impl_trie.h"(140)
+
+//____________________________________________________________________________
+// createTrieOnReverse
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TTerminalStateMap, typename TKeywords> inline void createTrieOnReverse(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TTerminalStateMap& terminalStateMap, TKeywords const& keywords);       	// "projects/library/seqan/graph_types/graph_impl_trie.h"(179)
+
+//____________________________________________________________________________
+// degree
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type degree(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(365)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type degree(Graph<Undirected<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(364)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type degree(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(310)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type degree(Graph<Tree<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(411)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type degree(Graph<Directed<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(478)
+
+//____________________________________________________________________________
+// emissionProbability
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline TCargo& emissionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const state, TAlphabet const symbol);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(934)
+
+//____________________________________________________________________________
+// empty
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline bool empty(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(274)
+template <typename TCargo, typename TSpec> inline bool empty(Graph<Undirected<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(252)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline bool empty(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(239)
+template <typename TCargo, typename TSpec> inline bool empty(Graph<Tree<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(303)
+template <typename TCargo, typename TSpec> inline bool empty(Graph<Directed<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(296)
+
+//____________________________________________________________________________
+// endState
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type& endState(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(711)
+
+//____________________________________________________________________________
+// findEdge
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel> inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type findEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const v, TLabel const c);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(622)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel> inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type findEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const v, TLabel const c);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(636)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type findEdge(Graph<Undirected<TCargo, TSpec> > const& g, TVertexDescriptor const v, TVertexDescriptor const w);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(728)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type findEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const v, TVertexDescriptor const w);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(511)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Tree<TCargo, TSpec> > >::Type findEdge(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const v, TVertexDescriptor const w);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(679)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Directed<TCargo, TSpec> > >::Type findEdge(Graph<Directed<TCargo, TSpec> > const& g, TVertexDescriptor const v, TVertexDescriptor const w);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(941)
+
+//____________________________________________________________________________
+// fragmentBegin
+
+template <typename TSize, typename TSpec, typename TVal> inline TSize& fragmentBegin(Fragment<TSize, TSpec> const& f, TVal const seqId);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(254)
+
+//____________________________________________________________________________
+// fragmentLength
+
+template <typename TSize, typename TSpec, typename TVal> inline TSize& fragmentLength(Fragment<TSize, TSpec> const& f, TVal const);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(266)
+template <typename TSize, typename TSpec> inline TSize& fragmentLength(Fragment<TSize, TSpec> const& f);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(283)
+
+//____________________________________________________________________________
+// getAdjacencyMatrix
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TMatrix> inline void getAdjacencyMatrix(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TMatrix& mat);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(587)
+template <typename TCargo, typename TSpec, typename TMatrix> inline void getAdjacencyMatrix(Graph<Undirected<TCargo, TSpec> > const& g, TMatrix& mat);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(691)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TMatrix> inline void getAdjacencyMatrix(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TMatrix& mat);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(500)
+template <typename TCargo, typename TSpec, typename TMatrix> inline void getAdjacencyMatrix(Graph<Tree<TCargo, TSpec> > const& g, TMatrix& mat);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(648)
+template <typename TCargo, typename TSpec, typename TMatrix> inline void getAdjacencyMatrix(Graph<Directed<TCargo, TSpec> > const& g, TMatrix& mat);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(884)
+
+//____________________________________________________________________________
+// getBeginState
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type getBeginState(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(731)
+
+//____________________________________________________________________________
+// getCargo
+
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec> inline typename Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> const>::Type& getCargo(EdgeStump<TCargo, TList, TSource, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(350)
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec> inline typename Cargo<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type& getCargo(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(360)
+template <bool TList, bool TSource, bool TId, typename TSpec> inline typename Cargo<EdgeStump<void, TList, TSource, TId, TSpec> const>::Type getCargo(EdgeStump<void, TList, TSource, TId, TSpec> const*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(370)
+template <bool TList, bool TSource, bool TId, typename TSpec> inline typename Cargo<EdgeStump<void, TList, TSource, TId, TSpec> >::Type getCargo(EdgeStump<void, TList, TSource, TId, TSpec>*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(381)
+
+//____________________________________________________________________________
+// getEmissionProbability
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline TCargo getEmissionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const state, TAlphabet const symbol);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(905)
+
+//____________________________________________________________________________
+// getEndState
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type getEndState(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(751)
+
+//____________________________________________________________________________
+// getIdLowerBound
+
+template <typename TIdType, typename TSpec> inline typename Value<IdManager<TIdType, TSpec> >::Type getIdLowerBound(IdManager<TIdType, TSpec> const& idm);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(270)
+template <typename TSpec> inline typename Value<IdManager<void, TSpec> >::Type getIdLowerBound(IdManager<void, TSpec> const&);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(450)
+
+//____________________________________________________________________________
+// getIdUpperBound
+
+template <typename TIdType, typename TSpec> inline typename Value<IdManager<TIdType, TSpec> >::Type getIdUpperBound(IdManager<TIdType, TSpec> const& idm);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(248)
+template <typename TSpec> inline typename Value<IdManager<void, TSpec> >::Type getIdUpperBound(IdManager<void, TSpec> const& idm);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(438)
+
+//____________________________________________________________________________
+// getNextS
+
+template <typename TCargo, bool TId, typename TSpec> inline EdgeStump<TCargo, true, true, TId, TSpec>* getNextS(EdgeStump<TCargo, true, true, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(922)
+template <typename TCargo, bool TId, typename TSpec> inline EdgeStump<TCargo, true, false, TId, TSpec>* getNextS(EdgeStump<TCargo, true, false, TId, TSpec> const*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(932)
+
+//____________________________________________________________________________
+// getNextT
+
+template <typename TCargo, bool TSource, bool TId, typename TSpec> inline EdgeStump<TCargo, true, TSource, TId, TSpec>* getNextT(EdgeStump<TCargo, true, TSource, TId, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(795)
+template <typename TCargo, bool TSource, bool TId, typename TSpec> inline EdgeStump<TCargo, true, TSource, TId, TSpec>* getNextT(EdgeStump<TCargo, true, TSource, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(806)
+
+//____________________________________________________________________________
+// getNil
+
+template <typename T> inline T getNil(T *);       	// "projects/library/seqan/graph_types/graph_interface.h"(332)
+template <typename T> inline T getNil();       	// "projects/library/seqan/graph_types/graph_interface.h"(341)
+
+//____________________________________________________________________________
+// getProjectedPosition
+
+template <typename TSize, typename TSpec, typename TId1, typename TPosition1, typename TId2, typename TPosition2> inline void getProjectedPosition(Fragment<TSize, ExactFragment<TSpec> > const& f, TId1 const seqId, TPosition1 const pos, TId2& seqId2, TPosition2& pos2);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(314)
+template <typename TSize, typename TSpec, typename TValue, typename TId1, typename TPosition1, typename TId2, typename TPosition2> inline void getProjectedPosition(Fragment<TSize, ExactFragment<TSpec> > const& f, TValue seg_num, TId1 const seqId, TPosition1 const pos, TId2& seqId2, TPosition2& pos2);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(344)
+template <typename TSize, typename TSpec, typename TId1, typename TPosition1, typename TId2, typename TPosition2> inline void getProjectedPosition(Fragment<TSize, ExactReversableFragment<TSpec> > const& f, TId1 const seqId, TPosition1 const pos, TId2& seqId2, TPosition2& pos2);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(376)
+template <typename TSize, typename TSpec, typename TValue, typename TId1, typename TPosition1, typename TId2, typename TPosition2> inline void getProjectedPosition(Fragment<TSize, ExactReversableFragment<TSpec> > const& f, TValue seg_num, TId1 const seqId, TPosition1 const pos, TId2& seqId2, TPosition2& pos2);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(408)
+
+//____________________________________________________________________________
+// getProperty
+
+template <typename TPropertyMap, typename TDescriptor> inline typename GetValue<TPropertyMap const>::Type getProperty(TPropertyMap const& pm, TDescriptor const d);       	// "projects/library/seqan/graph_types/graph_property.h"(224)
+template <typename T1, typename T2, typename TEdgeDescriptor> inline typename Value<InternalMap<Pair<T1, T2>, 1> >::Type getProperty(InternalMap<Pair<T1, T2>, 1> const&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(438)
+template <typename T1, typename T2, typename TEdgeDescriptor> inline typename Value<InternalMap<Pair<T1, T2>, 1> >::Type getProperty(InternalMap<Pair<T1, T2>, 1>&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(449)
+template <typename T1, typename T2, typename TEdgeDescriptor> inline typename Value<InternalMap<Pair<T1, T2>, 2> >::Type getProperty(InternalMap<Pair<T1, T2>, 2> const&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(460)
+template <typename T1, typename T2, typename TEdgeDescriptor> inline typename Value<InternalMap<Pair<T1, T2>, 2> >::Type getProperty(InternalMap<Pair<T1, T2>, 2>&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(471)
+template <typename T, typename TEdgeDescriptor> inline typename Value<InternalMap<T, 0> >::Type getProperty(InternalMap<T, 0> const&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(482)
+template <typename T, typename TEdgeDescriptor> inline typename Value<InternalMap<T, 0> >::Type getProperty(InternalMap<T, 0>&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(493)
+template <typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor> inline typename Value<InternalPointerMap<TValue TClass::*, TPMember> >::Type getProperty(InternalPointerMap<TValue TClass::*, TPMember> const&, TEdgeDescriptor const e);       	// "projects/library/seqan/graph_types/graph_property.h"(603)
+template <typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor> inline typename Value<InternalPointerMap<TValue TClass::*, TPMember> >::Type getProperty(InternalPointerMap<TValue TClass::*, TPMember>&, TEdgeDescriptor const e);       	// "projects/library/seqan/graph_types/graph_property.h"(615)
+template <typename TClass, typename TValue, typename TEdgeDescriptor> inline TValue getProperty(TValue TClass:: * const ptr_to_member, TEdgeDescriptor const e);       	// "projects/library/seqan/graph_types/graph_property.h"(709)
+
+//____________________________________________________________________________
+// getRoot
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type getRoot(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(784)
+template <typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type getRoot(Graph<Tree<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(795)
+
+//____________________________________________________________________________
+// getSource
+
+template <typename TCargo, bool TList, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, true, TId, TSpec> const>::Type getSource(EdgeStump<TCargo, TList, true, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(678)
+template <typename TCargo, bool TList, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, true, TId, TSpec> >::Type getSource(EdgeStump<TCargo, TList, true, TId, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(688)
+template <typename TCargo, bool TList, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, false, TId, TSpec> const>::Type getSource(EdgeStump<TCargo, TList, false, TId, TSpec> const*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(698)
+template <typename TCargo, bool TList, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, false, TId, TSpec> >::Type getSource(EdgeStump<TCargo, TList, false, TId, TSpec>*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(709)
+
+//____________________________________________________________________________
+// getSuccessor
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TChar> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type getSuccessor(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor vertex, TChar const c);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(848)
+template <typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TCharacters> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type getSuccessor(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > const& g, TVertexDescriptor vertex, TCharacters const& chars);       	// "projects/library/seqan/graph_types/graph_impl_wordgraph.h"(224)
+template <typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TCharacters> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type getSuccessor(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > const& g, TVertexDescriptor vertex, TCharacters const* chars);       	// "projects/library/seqan/graph_types/graph_impl_wordgraph.h"(245)
+
+//____________________________________________________________________________
+// getTarget
+
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> const>::Type getTarget(EdgeStump<TCargo, TList, TSource, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(560)
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type getTarget(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(570)
+
+//____________________________________________________________________________
+// getTransitionProbability
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline TCargo getTransitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const state1, TVertexDescriptor const state2);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(779)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline TCargo getTransitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> > const&, TEdgeDescriptor const e);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(794)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > >::Type getValue(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(200)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > >::Type getValue(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(179)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > >::Type getValue(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(177)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > >::Type getValue(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(179)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline typename GetValue<Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type getValue(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(503)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename GetValue<Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type getValue(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(513)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline typename GetValue<Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type getValue(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(523)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline typename GetValue<Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type getValue(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(533)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename GetValue<Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type getValue(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(543)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > >::Type getValue(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(198)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename TGraph, typename TSpec> inline void goBegin(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(306)
+template <typename TGraph, typename TSpec> inline void goBegin(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(229)
+template <typename TGraph, typename TSpec> inline void goBegin(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(218)
+template <typename TGraph, typename TSpec> inline void goBegin(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(221)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goBegin(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(680)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goBegin(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(690)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goBegin(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(700)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goBegin(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(710)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goBegin(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(720)
+template <typename TGraph, typename TSpec> inline void goBegin(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(249)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename TGraph, typename TSpec> inline void goEnd(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(352)
+template <typename TGraph, typename TSpec> inline void goEnd(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(249)
+template <typename TGraph, typename TSpec> inline void goEnd(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(234)
+template <typename TGraph, typename TSpec> inline void goEnd(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(237)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goEnd(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(780)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goEnd(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(790)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goEnd(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(800)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goEnd(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(811)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goEnd(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(821)
+template <typename TGraph, typename TSpec> inline void goEnd(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(272)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TGraph, typename TSpec> inline void goNext(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(375)
+template <typename TGraph, typename TSpec> inline void goNext(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(259)
+template <typename TGraph, typename TSpec> inline void goNext(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(242)
+template <typename TGraph, typename TSpec> inline void goNext(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(245)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goNext(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(831)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goNext(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(841)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goNext(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(851)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goNext(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(861)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goNext(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(874)
+template <typename TGraph, typename TSpec> inline void goNext(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(305)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goNext(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(315)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename TGraph, typename TSpec> inline void goPrevious(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(420)
+template <typename TGraph, typename TSpec> inline void goPrevious(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(292)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goPrevious(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(915)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goPrevious(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(929)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goPrevious(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(943)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goPrevious(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(957)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goPrevious(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(980)
+template <typename TGraph, typename TSpec> inline void goPrevious(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(380)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline void goPrevious(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(390)
+
+//____________________________________________________________________________
+// hostGraph
+
+template <typename TGraph, typename TSpec> inline typename Host<Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > >::Type const& hostGraph(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(259)
+template <typename TGraph, typename TSpec> inline typename Host<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > >::Type const& hostGraph(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(209)
+template <typename TGraph, typename TSpec> inline typename Host<Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > >::Type const& hostGraph(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(201)
+template <typename TGraph, typename TSpec> inline typename Host<Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > >::Type const& hostGraph(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(204)
+template <typename TGraph, typename TSpec> inline typename Host<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type const& hostGraph(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(619)
+template <typename TGraph, typename TSpec> inline typename Host<Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > >::Type const& hostGraph(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(228)
+
+//____________________________________________________________________________
+// idCount
+
+template <typename TIdType, typename TSpec> inline typename Value<IdManager<TIdType, TSpec> >::Type idCount(IdManager<TIdType, TSpec> const& idm);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(295)
+template <typename TSpec> inline typename Value<IdManager<void, TSpec> >::Type idCount(IdManager<void, TSpec> const& idm);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(461)
+
+//____________________________________________________________________________
+// idInUse
+
+template <typename TIdType, typename TSpec, typename TId> inline bool idInUse(IdManager<TIdType, TSpec> const& idm, TId const id);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(319)
+template <typename TSpec, typename TId> inline bool idInUse(IdManager<void, TSpec> const&, TId const);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(473)
+
+//____________________________________________________________________________
+// inDegree
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type inDegree(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(338)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type inDegree(Graph<Undirected<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(352)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type inDegree(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(299)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type inDegree(Graph<Tree<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(384)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type inDegree(Graph<Directed<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(435)
+
+//____________________________________________________________________________
+// isLeaf
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline bool isLeaf(Graph<Tree<TCargo, TSpec> > const& g, TVertexDescriptor v);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(830)
+
+//____________________________________________________________________________
+// isReversed
+
+template <typename TSize, typename TSpec> inline bool isReversed(Fragment<TSize, ExactReversableFragment<TSpec> > const& f);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(445)
+
+//____________________________________________________________________________
+// isRoot
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline bool isRoot(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor v);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(812)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline bool isRoot(Graph<Tree<TCargo, TSpec> > const& g, TVertexDescriptor v);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(806)
+
+//____________________________________________________________________________
+// isSilent
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline bool isSilent(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(1043)
+
+//____________________________________________________________________________
+// label
+
+template <typename TSize, typename TSpec, typename TStringSet, typename TVal> inline typename Infix<typename Value<TStringSet>::Type>::Type label(Fragment<TSize, TSpec> const& f, TStringSet& str, TVal const seqId);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(214)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename Alphabet<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > >::Type label(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1165)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename Alphabet<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > >::Type label(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(473)
+
+//____________________________________________________________________________
+// nextS
+
+template <typename TCargo, bool TId, typename TSpec> inline EdgeStump<TCargo, true, true, TId, TSpec>* & nextS(EdgeStump<TCargo, true, true, TId, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(868)
+template <typename TCargo, bool TId, typename TSpec> inline EdgeStump<TCargo, true, true, TId, TSpec>* & nextS(EdgeStump<TCargo, true, true, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(878)
+template <typename TCargo, bool TId, typename TSpec> inline EdgeStump<TCargo, true, false, TId, TSpec>* nextS(EdgeStump<TCargo, true, false, TId, TSpec>*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(887)
+template <typename TCargo, bool TId, typename TSpec> inline EdgeStump<TCargo, true, false, TId, TSpec>* nextS(EdgeStump<TCargo, true, false, TId, TSpec> const*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(898)
+
+//____________________________________________________________________________
+// nextT
+
+template <typename TCargo, bool TSource, bool TId, typename TSpec> inline EdgeStump<TCargo, true, TSource, TId, TSpec>* & nextT(EdgeStump<TCargo, true, TSource, TId, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(762)
+template <typename TCargo, bool TSource, bool TId, typename TSpec> inline EdgeStump<TCargo, true, TSource, TId, TSpec>* & nextT(EdgeStump<TCargo, true, TSource, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(772)
+
+//____________________________________________________________________________
+// numChildren
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type numChildren(Graph<Tree<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(880)
+
+//____________________________________________________________________________
+// numEdges
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type numEdges(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(254)
+template <typename TCargo, typename TSpec> inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type numEdges(Graph<Undirected<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(232)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type numEdges(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(219)
+template <typename TCargo, typename TSpec> inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type numEdges(Graph<Tree<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(269)
+template <typename TCargo, typename TSpec> inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type numEdges(Graph<Directed<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(257)
+
+//____________________________________________________________________________
+// numTreeEdges
+
+template <typename TCargo, typename TSpec> inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type numTreeEdges(Graph<Tree<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(855)
+
+//____________________________________________________________________________
+// numVertices
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type numVertices(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(264)
+template <typename TCargo, typename TSpec> inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type numVertices(Graph<Undirected<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(242)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type numVertices(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(229)
+template <typename TCargo, typename TSpec> inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type numVertices(Graph<Tree<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(293)
+template <typename TCargo, typename TSpec> inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type numVertices(Graph<Directed<TCargo, TSpec> > const& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(279)
+
+//____________________________________________________________________________
+// obtainId
+
+template <typename TIdType, typename TSpec> inline typename Value<IdManager<TIdType, TSpec> >::Type obtainId(IdManager<TIdType, TSpec>& idm);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(156)
+template <typename TSpec> inline typename Value<IdManager<void, TSpec> >::Type obtainId(IdManager<void, TSpec>& idm);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(406)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TGraph, typename TSpec> inline bool operator!=(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(466)
+template <typename TGraph, typename TSpec> inline bool operator!=(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(337)
+template <typename TGraph, typename TSpec> inline bool operator!=(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(293)
+template <typename TGraph, typename TSpec> inline bool operator!=(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(296)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator!=(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1082)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator!=(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1094)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator!=(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1106)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator!=(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1118)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator!=(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1130)
+template <typename TGraph, typename TSpec> inline bool operator!=(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(442)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TGraph, typename TSpec> inline typename Reference<Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > >::Type operator* (Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(233)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > >::Type operator* (Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(199)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > >::Type operator* (Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(193)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > >::Type operator* (Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(196)
+template <typename TGraph, typename TSpec> inline typename Reference<Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type operator* (Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(609)
+template <typename TGraph, typename TSpec> inline typename Reference<Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > >::Type operator* (Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(218)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& operator++(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(386)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > operator++(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(397)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& operator++(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(269)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > operator++(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(280)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& operator++(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(262)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > operator++(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(271)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& operator++(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(265)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > operator++(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(274)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& operator++(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(892)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > > operator++(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(903)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& operator++(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(331)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > operator++(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(342)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& operator--(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(431)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > operator--(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(442)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& operator--(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(302)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > operator--(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(313)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& operator--(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(998)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > > operator--(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1009)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& operator--(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(406)
+template <typename TGraph, typename TSpec> inline Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > operator--(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it, int);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(417)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TStream, typename TSpec> inline TStream & operator<< (TStream & target, Graph<TSpec> const& source);       	// "projects/library/seqan/graph_types/graph_interface.h"(458)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TGraph, typename TSpec> inline bool operator==(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(455)
+template <typename TGraph, typename TSpec> inline bool operator==(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(326)
+template <typename TGraph, typename TSpec> inline bool operator==(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(282)
+template <typename TGraph, typename TSpec> inline bool operator==(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(285)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator==(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1022)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator==(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1034)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator==(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1046)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator==(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1058)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator==(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1070)
+template <typename TGraph, typename TSpec> inline bool operator==(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it1, Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(430)
+
+//____________________________________________________________________________
+// outDegree
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type outDegree(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(319)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Undirected<TCargo, TSpec> > >::Type outDegree(Graph<Undirected<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(329)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type outDegree(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(288)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Tree<TCargo, TSpec> > >::Type outDegree(Graph<Tree<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(362)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Directed<TCargo, TSpec> > >::Type outDegree(Graph<Directed<TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(398)
+
+//____________________________________________________________________________
+// parentVertex
+
+template <typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type parentVertex(Graph<Tree<TCargo, TSpec> > const& g, typename EdgeDescriptor<Graph<Tree<TCargo, TSpec> > >::Type const edge);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(1045)
+template <typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type parentVertex(Graph<Tree<TCargo, TSpec> > const& g, typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type const v);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(1056)
+
+//____________________________________________________________________________
+// parseString
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TIterator> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type parseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex, TIterator & beginIt, TIterator const & endIt);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(889)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TIterator> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type parseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex, TIterator const & beginIt, TIterator const & endIt);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(909)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCharacters> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type parseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex, TCharacters const& chars);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(922)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCharacters> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type parseString(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex, TCharacters const* chars);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(934)
+template <typename TAlphabet, typename TSpec, typename TVertexDescriptor, typename TIterator> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > >::Type parseString(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > > const& g, TVertexDescriptor const vertex, TIterator beginIt, TIterator endIt);       	// "projects/library/seqan/graph_types/graph_impl_wordgraph.h"(258)
+
+//____________________________________________________________________________
+// property
+
+template <typename TPropertyMap, typename TDescriptor> inline typename Reference<TPropertyMap>::Type property(TPropertyMap& pm, TDescriptor const d);       	// "projects/library/seqan/graph_types/graph_property.h"(182)
+template <typename TPropertyMap, typename TDescriptor> inline typename Reference<TPropertyMap const>::Type property(TPropertyMap const& pm, TDescriptor const d);       	// "projects/library/seqan/graph_types/graph_property.h"(193)
+template <typename T1, typename T2, typename TEdgeDescriptor> inline typename Value<InternalMap<Pair<T1, T2>, 2> >::Type& property(InternalMap<Pair<T1, T2>, 2>&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(372)
+template <typename T1, typename T2, typename TEdgeDescriptor> inline typename Value<InternalMap<Pair<T1, T2>, 2> const>::Type& property(InternalMap<Pair<T1, T2>, 2> const&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(383)
+template <typename T1, typename T2, typename TEdgeDescriptor> inline typename Value<InternalMap<Pair<T1, T2>, 1> >::Type& property(InternalMap<Pair<T1, T2>, 1>&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(394)
+template <typename T1, typename T2, typename TEdgeDescriptor> inline typename Value<InternalMap<Pair<T1, T2>, 1> const>::Type& property(InternalMap<Pair<T1, T2>, 1> const&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(405)
+template <typename T, typename TEdgeDescriptor> inline typename Value<InternalMap<T, 0> >::Type& property(InternalMap<T, 0>&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(416)
+template <typename T, typename TEdgeDescriptor> inline typename Value<InternalMap<T, 0> const>::Type& property(InternalMap<T, 0> const&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_property.h"(427)
+template <typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor> inline typename Value<InternalPointerMap<TValue TClass::*, TPMember> >::Type& property(InternalPointerMap<TValue TClass::*, TPMember>&, TEdgeDescriptor const e);       	// "projects/library/seqan/graph_types/graph_property.h"(581)
+template <typename TClass, typename TValue, TValue TClass:: * TPMember, typename TEdgeDescriptor> inline typename Value<InternalPointerMap<TValue TClass::*, TPMember> const>::Type& property(InternalPointerMap<TValue TClass::*, TPMember> const&, TEdgeDescriptor const e);       	// "projects/library/seqan/graph_types/graph_property.h"(592)
+template <typename TClass, typename TValue, typename TEdgeDescriptor> inline TValue& property(TValue TClass:: * const ptr_to_member, TEdgeDescriptor const e);       	// "projects/library/seqan/graph_types/graph_property.h"(698)
+
+//____________________________________________________________________________
+// read
+
+template <typename TFile, typename TSpec, typename TNodeAttributes, typename TEdgeAttributes> void read(TFile & file, Graph<TSpec>& g, TNodeAttributes& nodeMap, TEdgeAttributes& edgeMap, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(900)
+template <typename TFile, typename TSpec> void read(TFile & file, Graph<TSpec>& g, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(928)
+
+//____________________________________________________________________________
+// releaseAll
+
+template <typename TIdType, typename TSpec> inline void releaseAll(IdManager<TIdType, TSpec>& idm);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(225)
+template <typename TSpec> inline void releaseAll(IdManager<void, TSpec>& idm);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(428)
+
+//____________________________________________________________________________
+// releaseId
+
+template <typename TIdType, typename TSpec, typename TId> inline void releaseId(IdManager<TIdType, TSpec>& idm, TId const id);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(192)
+template <typename TSpec, typename TId> inline void releaseId(IdManager<void, TSpec>& idm, TId const);       	// "projects/library/seqan/graph_types/graph_idmanager.h"(418)
+
+//____________________________________________________________________________
+// removeAllChildren
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeAllChildren(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const parent);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(986)
+
+//____________________________________________________________________________
+// removeChild
+
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeChild(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const parent, TVertexDescriptor const child);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(958)
+
+//____________________________________________________________________________
+// removeEdge
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel> inline void removeEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target, TLabel const label);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(454)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline void removeEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(469)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeEdge(Graph<Undirected<TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(460)
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline void removeEdge(Graph<Undirected<TCargo, TSpec> >& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(548)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(434)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline void removeEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(445)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeEdge(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const parent, TVertexDescriptor const child);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(516)
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline void removeEdge(Graph<Tree<TCargo, TSpec> >& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(552)
+template <typename TAlphabet, typename TSpec, typename TVertexDescriptor> inline void removeEdge(Graph<Automaton<TAlphabet, String<TAlphabet>, WordGraph<TSpec> > >& g, TVertexDescriptor const source, TVertexDescriptor const target, String<TAlphabet> const& label);       	// "projects/library/seqan/graph_types/graph_impl_wordgraph.h"(169)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeEdge(Graph<Directed<TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(641)
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline void removeEdge(Graph<Directed<TCargo, TSpec> >& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(677)
+
+//____________________________________________________________________________
+// removeInEdges
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeInEdges(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(508)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeInEdges(Graph<Undirected<TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(657)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeInEdges(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(467)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeInEdges(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(581)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeInEdges(Graph<Directed<TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(759)
+
+//____________________________________________________________________________
+// removeOutEdges
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeOutEdges(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(485)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeOutEdges(Graph<Undirected<TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(639)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeOutEdges(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(456)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeOutEdges(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(563)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeOutEdges(Graph<Directed<TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(727)
+
+//____________________________________________________________________________
+// removeVertex
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(394)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeVertex(Graph<Undirected<TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(390)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(396)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeVertex(Graph<Tree<TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(446)
+template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeVertex(Graph<Directed<TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(532)
+
+//____________________________________________________________________________
+// resizeEdgeMap
+
+template <typename TSpec, typename TPropertyMap> inline void resizeEdgeMap(Graph<TSpec> const& g, TPropertyMap& pm);       	// "projects/library/seqan/graph_types/graph_property.h"(116)
+template <typename TSpec, typename TContainer, unsigned int const MemberId> inline void resizeEdgeMap(Graph<TSpec> const&, InternalMap<TContainer, MemberId>&);       	// "projects/library/seqan/graph_types/graph_property.h"(318)
+template <typename TSpec, typename TContainer, unsigned int const MemberId> inline void resizeEdgeMap(Graph<TSpec>&, InternalMap<TContainer, MemberId>&);       	// "projects/library/seqan/graph_types/graph_property.h"(327)
+template <typename TSpec, typename TPropmap, TPropmap const Instance> inline void resizeEdgeMap(Graph<TSpec>&, InternalPointerMap<TPropmap, Instance>&);       	// "projects/library/seqan/graph_types/graph_property.h"(550)
+template <typename TSpec, typename TPropmap, TPropmap const Instance> inline void resizeEdgeMap(Graph<TSpec> const&, InternalPointerMap<TPropmap, Instance>&);       	// "projects/library/seqan/graph_types/graph_property.h"(560)
+template <typename TSpec, typename TClass, typename TValue> inline void resizeEdgeMap(Graph<TSpec> const&, TValue TClass:: *);       	// "projects/library/seqan/graph_types/graph_property.h"(666)
+template <typename TSpec, typename TClass, typename TValue> inline void resizeEdgeMap(Graph<TSpec>&, TValue TClass:: *);       	// "projects/library/seqan/graph_types/graph_property.h"(675)
+template <typename TSpec, typename TPropertyMap, typename TProperties> inline void resizeEdgeMap(Graph<TSpec> const& g, TPropertyMap& pm, TProperties const& prop);       	// "projects/library/seqan/graph_types/graph_property.h"(746)
+
+//____________________________________________________________________________
+// resizeVertexMap
+
+template <typename TSpec, typename TPropertyMap> inline void resizeVertexMap(Graph<TSpec> const& g, TPropertyMap& pm);       	// "projects/library/seqan/graph_types/graph_property.h"(86)
+template <typename TSpec, typename TPropertyMap, typename TProperties> inline void resizeVertexMap(Graph<TSpec> const& g, TPropertyMap& pm, TProperties const& prop);       	// "projects/library/seqan/graph_types/graph_property.h"(728)
+
+//____________________________________________________________________________
+// root
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type& root(Graph<Automaton<TAlphabet, TCargo, TSpec> > & g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(758)
+template <typename TCargo, typename TSpec> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type& root(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(785)
+
+//____________________________________________________________________________
+// sequenceId
+
+template <typename TSize, typename TSpec, typename TVal> inline typename Id<Fragment<TSize, TSpec> >::Type sequenceId(Fragment<TSize, TSpec> const& f, TVal const seqId);       	// "projects/library/seqan/graph_types/graph_impl_fragment.h"(235)
+
+//____________________________________________________________________________
+// silentStatus
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline bool& silentStatus(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(1019)
+
+//____________________________________________________________________________
+// source
+
+template <typename TCargo, bool TList, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, true, TId, TSpec> >::Type& source(EdgeStump<TCargo, TList, true, TId, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(619)
+template <typename TCargo, bool TList, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, true, TId, TSpec> >::Type source(EdgeStump<TCargo, TList, true, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(629)
+template <typename TCargo, bool TList, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, false, TId, TSpec> >::Type source(EdgeStump<TCargo, TList, false, TId, TSpec>*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(640)
+template <typename TCargo, bool TList, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, false, TId, TSpec> >::Type source(EdgeStump<TCargo, TList, false, TId, TSpec> const*);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(652)
+
+//____________________________________________________________________________
+// sourceVertex
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type sourceVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(552)
+template <typename TGraph, typename TSpec> inline typename VertexDescriptor<TGraph>::Type sourceVertex(Iter<TGraph, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1141)
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type sourceVertex(Graph<Undirected<TCargo, TSpec> > const&, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(679)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type sourceVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(489)
+template <typename TGraph, typename TSpec> inline typename VertexDescriptor<TGraph>::Type sourceVertex(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(453)
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type sourceVertex(Graph<Tree<TCargo, TSpec> > const& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(623)
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Directed<TCargo, TSpec> > >::Type sourceVertex(Graph<Directed<TCargo, TSpec> > const& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(846)
+
+//____________________________________________________________________________
+// target
+
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type& target(EdgeStump<TCargo, TList, TSource, TId, TSpec>* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(527)
+template <typename TCargo, bool TList, bool TSource, bool TId, typename TSpec> inline typename VertexDescriptor<EdgeStump<TCargo, TList, TSource, TId, TSpec> >::Type target(EdgeStump<TCargo, TList, TSource, TId, TSpec> const* es);       	// "projects/library/seqan/graph_types/graph_edgestump.h"(537)
+
+//____________________________________________________________________________
+// targetVertex
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type targetVertex(Graph<Automaton<TAlphabet, TCargo, TSpec> > const&, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(540)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline typename VertexDescriptor<Graph<Directed<TCargo, TGraphSpec> > >::Type targetVertex(Iter<Graph<Directed<TCargo, TGraphSpec> > , GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1174)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> > >::Type targetVertex(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> > , GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1184)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline typename VertexDescriptor<Graph<Tree<TCargo, TGraphSpec> > >::Type targetVertex(Iter<Graph<Tree<TCargo, TGraphSpec> > , GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1194)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline typename VertexDescriptor<Graph<Undirected<TCargo, TGraphSpec> > >::Type targetVertex(Iter<Graph<Undirected<TCargo, TGraphSpec> > , GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1204)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename VertexDescriptor<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> > >::Type targetVertex(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(1218)
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type targetVertex(Graph<Undirected<TCargo, TSpec> > const&, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(668)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type targetVertex(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(478)
+template <typename TGraph, typename TSpec> inline typename VertexDescriptor<TGraph>::Type targetVertex(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(463)
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Tree<TCargo, TSpec> > >::Type targetVertex(Graph<Tree<TCargo, TSpec> > const&, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(612)
+template <typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Directed<TCargo, TSpec> > >::Type targetVertex(Graph<Directed<TCargo, TSpec> > const&, TEdgeDescriptor const edge);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(812)
+
+//____________________________________________________________________________
+// transitionProbability
+
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline TCargo& transitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g, TVertexDescriptor const state1, TVertexDescriptor const state2);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(822)
+template <typename TAlphabet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline TCargo& transitionProbability(Graph<Hmm<TAlphabet, TCargo, TSpec> >&, TEdgeDescriptor e);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(836)
+
+//____________________________________________________________________________
+// transpose
+
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void transpose(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& source, Graph<Automaton<TAlphabet, TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(232)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void transpose(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(242)
+template <typename TCargo, typename TSpec> inline void transpose(Graph<Undirected<TCargo, TSpec> > const& source, Graph<Undirected<TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(211)
+template <typename TCargo, typename TSpec> inline void transpose(Graph<Undirected<TCargo, TSpec> > const&);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(223)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void transpose(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& source, Graph<Hmm<TAlphabet, TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(197)
+template <typename TAlphabet, typename TCargo, typename TSpec> inline void transpose(Graph<Hmm<TAlphabet, TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(207)
+template <typename TCargo, typename TSpec> inline void transpose(Graph<Tree<TCargo, TSpec> > const& source, Graph<Tree<TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(246)
+template <typename TCargo, typename TSpec> inline void transpose(Graph<Tree<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(257)
+template <typename TCargo, typename TSpec> inline void transpose(Graph<Directed<TCargo, TSpec> > const& source, Graph<Directed<TCargo, TSpec> >& dest);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(223)
+template <typename TCargo, typename TSpec> inline void transpose(Graph<Directed<TCargo, TSpec> >& g);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(233)
+
+//____________________________________________________________________________
+// value
+
+template <typename TGraph, typename TSpec> inline typename Reference<Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > > >::Type value(Iter<TGraph, GraphIterator<InternalVertexIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_vertex.h"(223)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > > >::Type value(Iter<TGraph, GraphIterator<InternalAdjacencyIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_adjacency.h"(189)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > > >::Type value(Iter<TGraph, GraphIterator<InternalBfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_bfs.h"(185)
+template <typename TGraph, typename TSpec> inline typename GetValue<Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > > >::Type value(Iter<TGraph, GraphIterator<InternalDfsIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_dfs.h"(187)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline typename Reference<Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type value(Iter<Graph<Directed<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(555)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename Reference<Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type value(Iter<Graph<Hmm<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(566)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline typename Reference<Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type value(Iter<Graph<Tree<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(576)
+template <typename TCargo, typename TGraphSpec, typename TSpec> inline typename Reference<Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type value(Iter<Graph<Undirected<TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(587)
+template <typename TAlphabet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename Reference<Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type value(Iter<Graph<Automaton<TAlphabet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_outedge.h"(597)
+template <typename TGraph, typename TSpec> inline typename Reference<Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > > >::Type value(Iter<TGraph, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/graph_types/graph_iterator_edge.h"(208)
+
+//____________________________________________________________________________
+// write
+
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec, typename TIDString> inline void write(TFile & target, Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, TIDString const &, Raw);       	// "projects/library/seqan/graph_types/graph_impl_automaton.h"(652)
+template <typename TFile, typename TCargo, typename TSpec, typename TIDString> inline void write(TFile & target, Graph<Undirected<TCargo, TSpec> > const& g, TIDString const &, Raw);       	// "projects/library/seqan/graph_types/graph_impl_undirected.h"(759)
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec, typename TIDString> inline void write(TFile & target, Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, TIDString const &, Raw);       	// "projects/library/seqan/graph_types/graph_impl_hmm.h"(524)
+template <typename TFile, typename TCargo, typename TSpec, typename TIDString> inline void write(TFile & target, Graph<Tree<TCargo, TSpec> > const& g, TIDString const &, Raw);       	// "projects/library/seqan/graph_types/graph_impl_tree.h"(711)
+template <typename TFile, typename TAlphabet, typename TCargo, typename TSpec, typename TIDString> inline void write(TFile & target, Graph<Automaton<TAlphabet, TCargo, WordGraph<TSpec> > > const& g, TIDString const &, Raw);       	// "projects/library/seqan/graph_types/graph_impl_wordgraph.h"(187)
+template <typename TFile, typename TCargo, typename TSpec, typename TIDString> inline void write(TFile & target, Graph<Directed<TCargo, TSpec> > const& g, TIDString const &, Raw);       	// "projects/library/seqan/graph_types/graph_impl_directed.h"(965)
+template <typename TFile, typename TSpec, typename TNodeAttributes, typename TEdgeAttributes> void write(TFile & file, Graph<TSpec> const& g, TNodeAttributes const& nodeMap, TEdgeAttributes const& edgeMap, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(491)
+template <typename TFile, typename TSpec, typename TNodeAttributes> inline void write(TFile & file, Graph<TSpec> const& g, TNodeAttributes const& nodeMap, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(554)
+template <typename TFile, typename TSpec> inline void write(TFile & file, Graph<TSpec> const& g, DotDrawing);       	// "projects/library/seqan/graph_types/graph_drawing.h"(574)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/graph_types/graph_utility_parsing.h b/src/SeqAn-1.3/seqan/graph_types/graph_utility_parsing.h
new file mode 100644
index 0000000..e5aefe8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/graph_types/graph_utility_parsing.h
@@ -0,0 +1,90 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_UTILITY_PARSING_H
+#define SEQAN_HEADER_GRAPH_UTILITY_PARSING_H
+
+
+#include <fstream>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// File reading
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TPath, typename TStringSet, typename TNames>
+inline unsigned int
+_loadSequences(TPath const& in_path,
+			   TStringSet& origStrSet,
+			   TNames& names)
+{
+	typedef typename Size<TStringSet>::Type TSize;
+	
+	// Count sequences and read names
+	TSize seqCount = 0;
+	std::ifstream file;
+	std::stringstream input;
+	input << in_path;
+	file.open(input.str().c_str(), std::ios_base::in | std::ios_base::binary);
+	if (!file.is_open()) return 0;
+	while (!_streamEOF(file)) {
+		String<char> id;
+		readID(file, id, Fasta());
+		appendValue(names, id);
+		goNext(file, Fasta());
+		++seqCount;
+	}
+
+	// Load sequences
+	file.clear();
+	file.seekg(0, std::ios_base::beg);
+	resize(origStrSet, seqCount);
+	TSize count = 0;
+	for(TSize i = 0; (i < seqCount) && !_streamEOF(file); ++i) 	{
+		read(file, origStrSet[i], Fasta());
+		count += length(origStrSet[i]);
+	}
+    file.close();
+
+	return count;
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/index.h b/src/SeqAn-1.3/seqan/index.h
new file mode 100644
index 0000000..3570859
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index.h
@@ -0,0 +1,162 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_H
+#define SEQAN_HEADER_INDEX_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <seqan/sequence.h>
+#include <seqan/pipe.h>
+#include <seqan/modifier.h>
+
+#include <seqan/find.h>
+#include <seqan/misc/misc_set.h>
+
+#include <climits>
+#include <functional>
+#include <vector>
+#include <stack>
+#include <queue>
+#include <algorithm>
+#include <iterator>
+#include <utility>
+#include <cmath>
+#include <string.h> // memset
+
+
+//////////////////////////////////////////////////////////////////////////////
+// INDEX CONSTRUCTION
+//////////////////////////////////////////////////////////////////////////////
+
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/index/index_manual_forwards.h>
+#include <seqan/index/index_generated_forwards.h>
+#endif
+
+#include <seqan/index/index_base.h>
+
+//____________________________________________________________________________
+// suffix array creators
+
+#include <seqan/index/radix.h>
+#include <seqan/index/index_sa_btree.h>
+#include <seqan/index/index_sa_lss.h>
+#include <seqan/index/index_sa_mm.h>
+#include <seqan/index/index_sa_qsort.h>
+#include <seqan/index/index_sa_bwtwalk.h>
+
+#include <seqan/index/pump_extender3.h>
+#include <seqan/index/pipe_merger3.h>
+#include <seqan/index/index_skew3.h>
+
+#include <seqan/index/pump_extender7.h>
+#include <seqan/index/pipe_merger7.h>
+#include <seqan/index/index_skew7.h>
+
+#include <seqan/index/pump_separator7.h>
+#include <seqan/index/index_skew7_multi.h>
+
+//____________________________________________________________________________
+// enhanced table creators
+
+#include <seqan/index/pump_lcp_core.h>
+#include <seqan/index/index_lcp.h>
+#include <seqan/index/index_lcp_tree.h>
+
+#include <seqan/index/index_childtab.h>
+#include <seqan/index/index_bwt.h>
+
+//____________________________________________________________________________
+// q-gram index creator
+
+#include <seqan/index/shape_base.h>
+#include <seqan/index/shape_gapped.h>
+#include <seqan/index/shape_onegapped.h>
+#include <seqan/index/shape_predefined.h>
+#include <seqan/index/shape_threshold.h>
+#include <seqan/index/index_qgram.h>
+#include <seqan/index/index_qgram_openaddressing.h>
+//#include <seqan/index/index_qgram_nested.h>
+
+
+//////////////////////////////////////////////////////////////////////////////
+// INDEX USAGE
+//////////////////////////////////////////////////////////////////////////////
+
+#include <seqan/index/index_shims.h>
+
+//____________________________________________________________________________
+// (virtual) suffix trees
+
+#include <seqan/index/index_esa_base.h>
+#include <seqan/index/index_esa_stree.h>
+#include <seqan/index/index_wotd.h>
+#include <seqan/index/index_dfi.h>
+
+//____________________________________________________________________________
+// suffix tree algorithms
+
+#include <seqan/index/index_esa_algs.h>
+#include <seqan/index/index_esa_algs_multi.h>
+#include <seqan/index/index_esa_drawing.h>
+#include <seqan/index/repeat_base.h>
+
+//____________________________________________________________________________
+// Pizza & Chili interface (compressed indices)
+
+#include <seqan/index/index_pizzachili.h>
+#include <seqan/index/index_pizzachili_find.h>
+
+//____________________________________________________________________________
+// Shawarma interface (suffix array creators)
+
+#include <seqan/index/index_shawarma.h>
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FINDER INTERFACE
+//////////////////////////////////////////////////////////////////////////////
+
+//____________________________________________________________________________
+// index based finders
+
+#include <seqan/index/find_index_esa.h>
+#include <seqan/index/find_index_approx.h>
+#include <seqan/index/find_index_qgram.h>
+#include <seqan/index/find_index.h>
+#include <seqan/index/find_quasar.h>
+#include <seqan/index/find_swift.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/index/find_index.h b/src/SeqAn-1.3/seqan/index/find_index.h
new file mode 100644
index 0000000..94f4e9d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/find_index.h
@@ -0,0 +1,312 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_FIND_H
+#define SEQAN_HEADER_INDEX_FIND_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	struct Position< Finder< Index<TText, TSpec>, TSpecFinder > >:
+		SAValue< Index<TText, TSpec> > {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// generic Finder class for all indices containing a suffix array or 
+// similar table, where a query result is an interval in this table
+//
+// your index must specialize the function _findFirstIndex and set
+// finder.range to the interval containing the query hits. See:
+//
+//	template < typename TText, typename TSpec, typename TSpecFinder, typename TPattern >
+//	inline void _findFirstIndex(
+//		Finder< Index<TText, TSpec>, TSpecFinder > &finder,
+//		TPattern const &pattern,
+//		EsaFindMlr const)
+//	{
+//		Index<TText, TSpec> &index = haystack(finder);
+//		indexRequire(index, EsaSA());
+//		finder.range = equalRangeSAIterator(indexText(index), indexSA(index), pattern);
+//	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	class Finder< Index<TText, TSpec>, TSpecFinder >
+	{
+    protected:
+		typedef Index<TText, TSpec>								TIndex;
+		typedef typename Fibre<TIndex, FibreSA>::Type			TSA;
+		typedef typename Iterator<TSA const, Standard>::Type	TIterator;
+		typedef typename Size<TIndex>::Type						TSize;
+
+	public:
+		Holder<TIndex>	index;
+		Pair<TIterator>	range;
+		TIterator		data_iterator;
+		TSize			data_length;
+
+		Finder() 
+		{
+			clear(*this);
+		}
+		Finder(TIndex &_index): index(_index) 
+		{
+			clear(*this);
+		}
+		Finder(TIndex const &_index): index(_index)
+		{
+			clear(*this);
+		}
+	};
+
+//____________________________________________________________________________
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Parameter_< Index<TText, TSpec> >::Type 
+	host(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		return value(me.index);
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Parameter_< Index<TText, TSpec> >::Type 
+	host(Finder< Index<TText, TSpec>, TSpecFinder > const & me)
+	{
+SEQAN_CHECKPOINT
+		return value(me.index);
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Parameter_< Index<TText, TSpec> >::Type 
+	container(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		return value(me.index);
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Parameter_< Index<TText, TSpec> >::Type 
+	container(Finder< Index<TText, TSpec>, TSpecFinder > const & me)
+	{
+SEQAN_CHECKPOINT
+		return value(me.index);
+	}
+
+//____________________________________________________________________________
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline void
+	setHost(
+		Finder< Index<TText, TSpec>, TSpecFinder > & me, 
+		typename Parameter_<Index<TText, TSpec> >::Type /*container_*/)
+	{
+SEQAN_CHECKPOINT
+		me.index = container;
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline void
+	setContainer(
+		Finder< Index<TText, TSpec>, TSpecFinder > & me, 
+		typename Parameter_<Index<TText, TSpec> >::Type /*container_*/)
+	{
+SEQAN_CHECKPOINT
+		me.index = container;
+	}
+
+//____________________________________________________________________________
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Iterator< typename Fibre<Index<TText, TSpec>, FibreSA>::Type const, Standard>::Type &
+	hostIterator(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		return me.data_iterator;
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Iterator< typename Fibre<Index<TText, TSpec>, FibreSA>::Type const, Standard>::Type const &
+	hostIterator(Finder< Index<TText, TSpec>, TSpecFinder > const & me)
+	{
+SEQAN_CHECKPOINT
+		return me.data_iterator;
+	}
+
+
+//____________________________________________________________________________
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline bool
+	empty(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		return me.range.i1 == me.range.i2;
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline void
+	clear(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		typedef Index<TText, TSpec>								TIndex;
+		typedef typename Fibre<TIndex, FibreSA>::Type			TSA;
+		typedef typename Iterator<TSA const, Standard>::Type	TIterator;
+		me.range.i1 = me.range.i2 = TIterator();
+		me.data_length = 0;
+	}
+
+//____________________________________________________________________________
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline bool
+	atBegin(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		return (empty(me) || hostIterator(me) == me.range.i1);
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline bool
+	atEnd(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		return (empty(me) || hostIterator(me) == me.range.i2);
+	}
+
+//____________________________________________________________________________
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline void
+	goBegin(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		hostIterator(me) = me.range.i1;
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline void
+	goEnd(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		hostIterator(me) = me.range.i2;
+	}
+
+//____________________________________________________________________________
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type
+	beginPosition(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		SEQAN_ASSERT(!empty(me))
+		return *me.data_iterator;
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type
+	beginPosition(Finder< Index<TText, TSpec>, TSpecFinder > const & me)
+	{
+SEQAN_CHECKPOINT
+		SEQAN_ASSERT(!empty(me))
+		return *me.data_iterator;
+	}
+
+//____________________________________________________________________________
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type
+	endPosition(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		return posAdd(beginPosition(me), me.data_length);
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type
+	endPosition(Finder< Index<TText, TSpec>, TSpecFinder > const & me)
+	{
+SEQAN_CHECKPOINT
+		return posAdd(beginPosition(me), me.data_length);
+	}
+
+//____________________________________________________________________________
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type
+	position(Finder< Index<TText, TSpec>, TSpecFinder > & me)
+	{
+SEQAN_CHECKPOINT
+		return beginPosition(me);
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type
+	position(Finder< Index<TText, TSpec>, TSpecFinder > const & me)
+	{
+SEQAN_CHECKPOINT
+		return beginPosition(me);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// find
+
+	template < typename TText, typename TSpec, typename TSpecFinder, typename TPattern >
+	inline bool find(
+		Finder<Index<TText, TSpec>, TSpecFinder> &finder,
+		TPattern const &pattern)
+	{
+		if (empty(finder)) 
+		{
+			_findFirstIndex(finder, needle(pattern), TSpecFinder());
+			_setFinderLength(finder, length(needle(pattern)));
+			hostIterator(finder) = finder.range.i1;
+		} else
+			++hostIterator(finder);
+		return !atEnd(finder);
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder >
+	inline bool find(Finder<Index<TText, TSpec>, TSpecFinder> &finder)
+	{
+		if (empty(finder)) return false;
+		++hostIterator(finder);
+		return !atEnd(finder);
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/find_index_approx.h b/src/SeqAn-1.3/seqan/index/find_index_approx.h
new file mode 100644
index 0000000..97d0507
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/find_index_approx.h
@@ -0,0 +1,229 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_INDEX_APPROX_H
+#define SEQAN_HEADER_FIND_INDEX_APPROX_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template <typename TSAValue1, typename TSAValue2>
+struct AddResultsFunctor
+{
+	String<Pair<TSAValue1, String<TSAValue2> > > results;
+    
+    template <typename TIter1, typename TIter2>
+    void operator() (TIter1 &iter1, TIter2 &iter2)
+    {
+		unsigned ofs = length(results);
+		resize(results, ofs + countOccurrences(iter1));
+		for (unsigned i = 0; i < countOccurrences(iter1); ++i)
+		{
+			results[ofs + i].i1 = getOccurrences(iter1)[i];
+			results[ofs + i].i2 = getOccurrences(iter2);
+		}
+    }
+};
+
+template <
+	bool enumerateA,
+	bool enumerateB,
+	typename TOnFoundFunctor, 
+	typename TTreeIteratorA, 
+	typename TIterPosA, 
+	typename TTreeIteratorB, 
+	typename TIterPosB, 
+	typename TErrors >
+inline void 
+_approximateTreeSearch(
+	TOnFoundFunctor	&onFoundFunctor, 
+	TTreeIteratorA	iterA, 
+	TIterPosA		iterPosA, 
+	TTreeIteratorB	iterB_, 
+	TIterPosB		iterPosB, 
+	TErrors			errorsLeft)
+{
+	if (enumerateA && !goDown(iterA)) 
+	{
+        onFoundFunctor(iterA, iterB_);
+		return;
+	}
+	if (enumerateB && !goDown(iterB_)) return;
+	
+	do 
+	{
+		TTreeIteratorB iterB = iterB_;
+		do 
+		{
+			TErrors e = errorsLeft;
+			TIterPosA ipA = iterPosA;
+			TIterPosB ipB = iterPosB;
+			
+			if (ipB == repLength(iterB)) continue;
+			
+			while (true)
+			{
+				if (ipA == repLength(iterA))
+				{
+					if (ipB == repLength(iterB))
+						_approximateTreeSearch<true,true>(onFoundFunctor, iterA, ipA, iterB, ipB, e);
+					else
+						_approximateTreeSearch<true,false>(onFoundFunctor, iterA, ipA, iterB, ipB, e);
+					break;
+				} 
+				else if (ipB == repLength(iterB))
+				{
+					_approximateTreeSearch<false,true>(onFoundFunctor, iterA, ipA, iterB, ipB, e);
+					break;
+				}
+
+				if (representative(iterA)[ipA] != representative(iterB)[ipB])
+					if (e-- == 0) break;
+				
+				++ipA;
+				++ipB;
+			}
+		} while (enumerateB && goRight(iterB));
+	} while (enumerateA && goRight(iterA));
+}
+
+
+template <typename TSAValue>
+struct AddSingleResultsFunctor
+{
+	String<TSAValue> results;
+    
+    template <typename TPattern, typename TIter>
+    void operator() (TPattern & /*pattern*/, TIter &iter)
+    {
+        append(results, getOccurrences(iter));
+    }
+};
+
+
+template <
+	typename TOnFoundFunctor, 
+	typename TString, 
+	typename TStringPos, 
+	typename TTreeIterator, 
+	typename TIterPos, 
+	typename TErrors >
+inline void 
+_approximateStringSearch(
+	TOnFoundFunctor	&onFoundFunctor, 
+	TString const &string, 
+	TStringPos stringPos, 
+	TTreeIterator iter, 
+	TIterPos iterPos, 
+	TErrors errorsLeft)
+{
+	if (errorsLeft == 0)
+	{
+		if (goDown(iter, suffix(string, stringPos)))
+			onFoundFunctor(string, iter);
+		return;
+	}
+	
+	if (!goDown(iter)) return;
+	do 
+	{
+		TErrors e = errorsLeft;
+		TStringPos sp = stringPos;
+		TIterPos ip = iterPos;
+		
+		if (ip == repLength(iter)) continue;
+		
+		while (true)
+		{
+			if (representative(iter)[ip] != string[sp])
+				if (e-- == 0) break;
+			
+			if (++sp == length(string))
+			{
+                onFoundFunctor(string, iter);
+				break;
+			}
+			
+			if (++ip == repLength(iter))
+			{
+				_approximateStringSearch(onFoundFunctor, string, sp, iter, ip, e);
+				break;
+			}
+		}
+	} while (goRight(iter));
+}
+
+template <
+    typename TOnFoundFunctor, 
+    typename TString, 
+    typename TTreeIterator, 
+    typename TErrors>
+inline void 
+approximateStringSearch(
+    TOnFoundFunctor &onFoundFunctor, 
+    TString const &string, 
+    TTreeIterator &iter, 
+    TErrors errorsLeft)
+{
+	if (length(string) <= errorsLeft)
+	{
+        onFoundFunctor(string, iter);
+		return;
+	}	
+	_approximateStringSearch(onFoundFunctor, string, 0u, iter, repLength(iter), errorsLeft);
+}
+
+template <
+    typename TOnFoundFunctor, 
+    typename TTreeIteratorA, 
+    typename TTreeIteratorB, 
+    typename TErrors>
+inline void 
+approximateTreeSearch(
+    TOnFoundFunctor &onFoundFunctor, 
+    TTreeIteratorA const &iterA, 
+    TTreeIteratorB const &iterB, 
+    TErrors errorsLeft)
+{
+	_approximateTreeSearch<true,true>(
+        onFoundFunctor, 
+        iterA, 
+        repLength(iterA), 
+        iterB, 
+        repLength(iterB), 
+        errorsLeft);
+}
+
+}
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/find_index_esa.h b/src/SeqAn-1.3/seqan/index/find_index_esa.h
new file mode 100644
index 0000000..6761051
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/find_index_esa.h
@@ -0,0 +1,1944 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_ESA_FIND_H
+#define SEQAN_HEADER_INDEX_ESA_FIND_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// ESA finders
+
+	template < typename TText, typename TSpec >
+	struct DefaultFinder< Index<TText, IndexEsa<TSpec> > > {
+        typedef EsaFindMlr Type;	// standard suffix array finder is mlr-heuristic
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// different layouts of a suffix array or lcp table
+
+	struct SortedList {};			// classical sorted list (suffix array, sorted list, ...)
+	struct LeftCompleteTree {};		// flattened search tree root, left child, right child, left child's left child, left child's right child, ...
+
+	template < unsigned BlockSize = 4096 >
+	struct BTree {};				// b-tree compacts nodes and its children to blocks of BlockSize
+
+	template < typename TString, typename TSpec >
+	class SearchTreeIterator {};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// class to access a flat search tree like a real tree
+	//
+
+	template <typename TString>
+	class SearchTreeIterator< TString, SortedList >
+	{
+	public:
+
+		typedef typename Value<TString>::Type				TValue;
+		typedef typename Size<TString>::Type				TSize;
+		typedef typename Iterator<TString, Standard>::Type	TIterator;
+
+		inline SearchTreeIterator(TString &string):
+			first(begin(string, Standard())),
+			count(length(string))
+		{
+			count2 = count / 2;
+			_mid = first;
+			goFurther(_mid, count2);
+		}
+			
+        inline const TValue& operator*() const {
+			return *_mid;
+		}
+
+        inline const TValue* operator->() const {
+			return &*_mid;
+		}
+
+		inline TSize mid() {
+			return count2;
+		}
+
+		// descend left
+		inline SearchTreeIterator & left()
+		{
+			count = count2;
+			count2 /= 2;
+			_mid = first;
+			goFurther(_mid, count2);
+			return *this;
+		}
+
+		// descend right
+        inline SearchTreeIterator & right()
+		{
+			first = ++_mid, count -= count2 + 1;
+			count2 = count / 2;
+			goFurther(_mid, count2);
+			return *this;
+		}
+
+        inline SearchTreeIterator leftChild() const {
+            return SearchTreeIterator(*this).left();
+        }
+
+        inline SearchTreeIterator rightChild() const {
+            return SearchTreeIterator(*this).right();
+        }
+
+        inline bool atEnd() {
+            return !count;
+        }
+
+		inline operator TIterator & () {
+			return _mid;
+		}
+
+	private:
+		TIterator	first, _mid;
+		TSize		count, count2;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// class to access a flat search tree like a real tree
+	//
+
+	template <typename TString>
+	class SearchTreeIterator< TString, LeftCompleteTree > 
+	{
+	public:
+		typedef typename Value<TString>::Type				TValue;
+		typedef typename Size<TString>::Type				TSize;
+		typedef typename Iterator<TString, Standard>::Type	TIterator;
+
+		TIterator	it;
+		TSize		size;
+
+		inline SearchTreeIterator(TString &string, TSize _size):
+			it(begin(string, Standard())),
+			size(_size)
+		{
+			_left = 0;
+			_lSize = 1;
+            _iSize = size;
+			for(_xSize = 1; _xSize < size; _xSize <<= 1) ;
+            if (!size) _xSize = 0;
+		}
+
+		inline SearchTreeIterator():
+			it(),
+            size(0),
+            _xSize(0) {}
+
+        inline const TValue& operator*() const {
+			return *it;
+		}
+
+        inline const TValue* operator->() const {
+			return &*it;
+		}
+
+		inline TSize mid() {
+			return _xSize >> 1;
+		}
+
+		inline TSize leftSize() {
+			return mid();
+		}
+
+		inline TSize rightSize() {
+			return _iSize - mid();
+		}
+
+		// descend left
+        inline SearchTreeIterator & left()
+		{
+            if (_xSize <= 1) {
+                _xSize = 0;
+                return *this;
+            }
+            _descendLeft();
+			_iSize = _xSize;	    // = mid();
+            return *this;
+        }
+
+		// descend right
+        inline SearchTreeIterator & right()
+		{
+            if (_xSize <= 1) {
+                _xSize = 0;
+                return *this;
+            }
+			_iSize -= mid();
+            SEQAN_ASSERT(_iSize != 0);    // _xSize/2 is less than _iSize by invariant
+
+            // step down right
+            _descendRight();
+
+            // step down left until we have two sons or are a leaf
+            while (_iSize <= (_xSize >> 1))
+                _descendLeft();
+
+            return *this;
+        }
+
+        inline SearchTreeIterator leftChild() const {
+            return SearchTreeIterator(*this).left();
+        }
+
+        inline SearchTreeIterator rightChild() const {
+            return SearchTreeIterator(*this).right();
+        }
+
+        inline SearchTreeIterator& operator--() {
+            --it;
+            return *this;
+        }
+
+        inline SearchTreeIterator operator--(int) {
+            SearchTreeIterator before = *this;
+            --it;
+            return before;
+        }
+
+        inline SearchTreeIterator & operator++() {
+            ++it;
+            return *this;
+        }
+
+        inline SearchTreeIterator operator++(int) {
+            SearchTreeIterator before = *this;
+            ++it;
+            return before;
+        }
+
+        inline bool operator==(SearchTreeIterator const &I) {
+            return (_xSize == I._xSize) && (_xSize == 0 || it == I.it);
+        }
+
+        //operator FlatFwdIt() {
+        //    return it;
+        //}
+
+        inline bool atEnd() {
+            return !_xSize;
+        }
+
+		inline operator TIterator & () {
+			return it;
+		}
+
+	private:
+		TSize _left;		// left iterator offset of current interval
+		TSize _lSize;		// iterator elements of current level
+		TSize _xSize;		// max interval size of current level
+		TSize _iSize;		// current interval size
+
+        inline void _descendLeft() 
+		{
+			goFurther(it, _left + _lSize);
+			_left <<= 1;
+			_xSize >>= 1;
+			_lSize = (size + _xSize - 1) / _xSize;
+        }
+
+        inline void _descendRight() 
+		{
+			goFurther(it, _left + 1 + _lSize);
+			_left = (_left << 1) + 1;
+			_xSize >>= 1;
+			_lSize = (size + _xSize - 1) / _xSize;
+        }
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// class to access a flat search b-tree like a real tree
+	//
+
+	template <typename TString, unsigned BlockSize>
+	class SearchTreeIterator< TString, BTree<BlockSize> > 
+	{
+	public:
+		typedef typename Value<TString>::Type				TValue;
+		typedef typename Size<TString>::Type				TSize;
+		typedef typename Iterator<TString, Standard>::Type	TIterator;
+
+		enum { BlockHeight = Log2Floor<BlockSize>::VALUE };
+		enum { BlockElements = (1 << BlockHeight) - 1 };
+		enum { BlockInnerElements = (1 << (BlockHeight - 1)) - 1 };
+		enum { BlockLeafs = 1 << (BlockHeight - 1) };
+
+		TIterator	it;
+		TSize		size;
+
+		inline SearchTreeIterator(TString &string):
+			it(begin(string, Standard())),
+			size(length(string))
+		{
+			//_left = 0;
+			//_lSize = 0;
+   //         _iSize = size;
+
+			_heightHigh = 1;
+			_stepSizeLow = 1;
+			for(TSize _xSizeLow = 2; _xSizeLow <= size; _xSizeLow <<= 1) {
+				if (_stepSizeLow == BlockLeafs) {
+					_stepSizeLow = 1;
+					++_heightHigh;
+				} else
+					_stepSizeLow <<= 1;
+			}
+			
+			_stepSizeLow >>= 1;
+			for(_xSizeHigh = 1; _xSizeHigh * BlockSize <= size; _xSizeHigh *= BlockSize) ;
+
+			_leftLow = (_stepSizeLow << 1) - 1;		// point to the middle
+			_leftHigh = 0;
+			_lSizeHigh = 1;
+
+			it += _leftLow;
+
+			_updateElements();
+
+			//if (!size) _xSizeLow = 0;
+   //         if (!size) _xSizeHigh = 0;
+		}
+
+		inline SearchTreeIterator():
+			it() {}
+
+        inline const TValue& operator*() const {
+			return *it;
+		}
+
+		inline const TValue* operator->() const {
+			return &*it;
+		}
+
+		// descend left
+        inline SearchTreeIterator & left() 
+		{
+            if (_heightHigh == 1 && !_stepSizeLow) {
+                _heightHigh = 0;
+                return *this;
+            }
+            _descendLeft();
+            return *this;
+        }
+
+		// descend right
+        inline SearchTreeIterator & right() 
+		{
+            if (_heightHigh == 1 && !_stepSizeLow) {
+				++it;
+                _heightHigh = 0;
+                return *this;
+            }
+
+            // step down right
+            _descendRight();
+
+            // step down left until we have two sons or are a leaf
+            while (_elements <= _leftLow)
+                _descendLeft();
+
+            return *this;
+        }
+
+        inline SearchTreeIterator leftChild() const {
+            return SearchTreeIterator(*this).left();
+        }
+
+        inline SearchTreeIterator rightChild() const {
+            return SearchTreeIterator(*this).right();
+        }
+
+        inline SearchTreeIterator& operator--() {
+            --it;
+            return *this;
+        }
+
+        inline SearchTreeIterator operator--(int) {
+            SearchTreeIterator before = *this;
+            --it;
+            return before;
+        }
+
+        inline SearchTreeIterator& operator++() {
+            ++it;
+            return *this;
+        }
+
+        inline SearchTreeIterator operator++(int) {
+            SearchTreeIterator before = *this;
+            ++it;
+            return before;
+        }
+
+        inline bool operator==(SearchTreeIterator const &I) {
+			return (it == I.it) || (atEnd() && I.atEnd());
+        }
+
+        //operator FlatFwdIt() {
+        //    return it;
+        //}
+
+        inline bool atEnd() const {
+            return !_heightHigh;
+        }
+
+		inline operator TIterator & () {
+			return it;
+		}
+
+	private:
+		TSize _heightHigh;	// height measured in BBlocks
+		unsigned _elements;		// elements in current BBlock
+
+		unsigned _leftLow;		// left iterator offset of current interval
+		unsigned _stepSizeLow;	// left/right step size of current level
+
+		TSize _leftHigh;		// left BBlock offset of current interval
+		TSize _lSizeHigh;	// BBlocks of current level
+		TSize _xSizeHigh;	// max BBlocks of current level
+
+		inline void _descendLeft() 
+		{
+			if (_stepSizeLow) {
+				it -= _stepSizeLow;
+				_leftLow -= _stepSizeLow;
+				_stepSizeLow >>= 1;
+			} else
+				if (--_heightHigh) {
+					_descendBBlock(_leftLow);
+
+					_leftLow = BlockInnerElements;		// point to the middle
+					_stepSizeLow = BlockLeafs / 2;		// with step size of half an interval length
+				}
+        }
+
+		inline void _descendRight() 
+		{
+			if (_stepSizeLow) {
+				it += _stepSizeLow;
+				_leftLow += _stepSizeLow;
+				_stepSizeLow >>= 1;
+			} else
+				if (--_heightHigh) {
+					_descendBBlock(_leftLow + 1);
+
+					_leftLow = BlockInnerElements;		// point to the middle
+					_stepSizeLow = BlockLeafs / 2;		// with step size of half an interval length
+				}
+        }
+
+		inline void _updateElements() 
+		{
+			TSize firstElement = (1 + _leftHigh * BlockSize) * _xSizeHigh - 1;
+			TSize lastElement = (1 + (_leftHigh + 1) * BlockSize) * _xSizeHigh - 2;
+
+			if (lastElement >= size)
+				_elements = (size - firstElement) / _xSizeHigh;
+			else
+				_elements = BlockElements;
+		}
+
+        inline void _descendBBlock(TSize _childIndex) 
+		{
+			// goFurther to the begin of the current BBlock and further to the destination BBlock
+			goFurther(it, BlockSize * (_leftHigh * (BlockSize - 1) + _childIndex + _lSizeHigh) + BlockInnerElements - _leftLow);
+
+			_leftHigh = _leftHigh * BlockSize + _childIndex;
+			_xSizeHigh /= BlockSize;
+			_lSizeHigh = (size / _xSizeHigh + BlockSize - 1) / BlockSize;
+
+			_updateElements();
+        }
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// substring search with SA table and w/o LCP-table or enhancement
+	//
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TSpec,
+		typename TQuery
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	_lowerBoundSANaive(
+		TText &text,
+		SearchTreeIterator< TSA, TSpec > treeIter,
+		TQuery &query)
+	{	// find first element not before query, using operator<
+		typedef typename Difference<TText>::Type			TDiff;
+		typedef typename Suffix<TText>::Type				TSuffix;
+		typedef typename Iterator<TSuffix, Standard>::Type	TTextIter;
+		typedef typename Iterator<TQuery, Standard>::Type	TQueryIter;
+
+		TQueryIter qBegin = begin(query, Standard());
+		TQueryIter qEnd = end(query, Standard());
+
+		for (; !treeIter.atEnd(); )
+		{	// divide and conquer, find half that contains answer
+
+			TSuffix		suf = suffix(text, *treeIter);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+			TQueryIter	q = qBegin;
+			while (t != tEnd && q != qEnd && *t == *q) {
+				++t;
+				++q;
+			}
+			
+            // is text < query ?
+			if (q != qEnd && (t == tEnd || *t < *q)) {
+				treeIter.right();
+			} else {
+				treeIter.left();
+			}
+		}
+		return treeIter;
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TSpec,
+		typename TQuery
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	_lowerBoundSA(
+		TText &text,
+		SearchTreeIterator< TSA, TSpec > treeIter,
+		TQuery &query)
+	{	// find first element not before query, using operator<
+		typedef typename Difference<TText>::Type			TDiff;
+		typedef typename Suffix<TText>::Type				TSuffix;
+		typedef typename Iterator<TSuffix, Standard>::Type	TTextIter;
+		typedef typename Iterator<TQuery, Standard>::Type	TQueryIter;
+
+		TDiff lcpLower = 0;
+		TDiff lcpUpper = 0;
+
+		TQueryIter qBegin = begin(query, Standard());
+		TQueryIter qEnd = end(query, Standard());
+
+		for (; !treeIter.atEnd(); )
+		{	// divide and conquer, find half that contains answer
+
+			TSuffix		suf = suffix(text, *treeIter);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+			TQueryIter	q = qBegin;
+            TDiff		lcp = _min(lcpLower, lcpUpper);
+
+			goFurther(t, lcp);
+			goFurther(q, lcp);
+			while (t != tEnd && q != qEnd && *t == *q) {
+				++t;
+				++q;
+				++lcp;
+			}
+			
+            // is text < query ?
+			if (q != qEnd && (t == tEnd || *t < *q)) {
+				treeIter.right();
+				lcpLower = lcp;
+			} else {
+				treeIter.left();
+				lcpUpper = lcp;
+			}
+		}
+		return treeIter;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TSpec,
+		typename TQuery
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	_upperBoundSANaive(
+		TText &text,
+		SearchTreeIterator< TSA, TSpec > treeIter,
+		TQuery &query)
+	{	// find first element that query is before, using operator<
+		typedef typename Difference<TText>::Type			TDiff;
+		typedef typename Suffix<TText>::Type				TSuffix;
+		typedef typename Iterator<TSuffix, Standard>::Type	TTextIter;
+		typedef typename Iterator<TQuery, Standard>::Type	TQueryIter;
+
+		TQueryIter qBegin = begin(query, Standard());
+		TQueryIter qEnd = end(query, Standard());
+
+		for (; !treeIter.atEnd(); )
+		{	// divide and conquer, find half that contains answer
+
+			TSuffix		suf = suffix(text, *treeIter);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+			TQueryIter	q = qBegin;
+
+			while (t != tEnd && q != qEnd && *t == *q) {
+				++t;
+				++q;
+			}
+			
+            // is text <= query ?
+			if (q == qEnd || t == tEnd || !(*q < *t)) {
+				treeIter.right();
+			} else {
+				treeIter.left();
+			}
+		}
+		return treeIter;
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TSpec,
+		typename TQuery
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	_upperBoundSA(
+		TText &text,
+		SearchTreeIterator< TSA, TSpec > treeIter,
+		TQuery &query)
+	{	// find first element that query is before, using operator<
+		typedef typename Difference<TText>::Type			TDiff;
+		typedef typename Suffix<TText>::Type				TSuffix;
+		typedef typename Iterator<TSuffix, Standard>::Type	TTextIter;
+		typedef typename Iterator<TQuery, Standard>::Type	TQueryIter;
+
+		TDiff lcpLower = 0;
+		TDiff lcpUpper = 0;
+
+		TQueryIter qBegin = begin(query, Standard());
+		TQueryIter qEnd = end(query, Standard());
+
+		for (; !treeIter.atEnd(); )
+		{	// divide and conquer, find half that contains answer
+
+			TSuffix		suf = suffix(text, *treeIter);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+			TQueryIter	q = qBegin;
+            TDiff		lcp = _min(lcpLower, lcpUpper);
+
+			goFurther(t, lcp);
+			goFurther(q, lcp);
+			while (t != tEnd && q != qEnd && *t == *q) {
+				++t;
+				++q;
+				++lcp;
+			}
+			
+            // is text <= query ?
+			if (q == qEnd || t == tEnd || !(*q < *t)) {
+				treeIter.right();
+				lcpLower = lcp;
+			} else {
+				treeIter.left();
+				lcpUpper = lcp;
+			}
+		}
+		return treeIter;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+    // binary search without mlr-heuristic
+	template <
+		typename TText,
+		typename TSA,
+		typename TSpec,
+		typename TQuery
+	>
+	inline Pair< typename Iterator<TSA, Standard>::Type >
+	_equalRangeSANaive(
+		TText &text,
+		SearchTreeIterator< TSA, TSpec > treeIter,
+		TQuery &query)
+	{	// find range equivalent to query, using operator<
+		typedef typename Difference<TText>::Type			TDiff;
+		typedef typename Suffix<TText>::Type				TSuffix;
+		typedef typename Iterator<TSuffix, Standard>::Type	TTextIter;
+		typedef typename Iterator<TQuery, Standard>::Type	TQueryIter;
+		typedef typename Iterator<TSA, Standard>::Type		TSAIter;
+
+		TQueryIter qBegin = begin(query, Standard());
+		TQueryIter qEnd = end(query, Standard());
+
+		for (; !treeIter.atEnd(); )
+		{	// divide and conquer, check midpoint
+
+			TSuffix		suf = suffix(text, *treeIter);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+			TQueryIter	q = qBegin;
+			while (t != tEnd && q != qEnd && *t == *q) {
+				++t;
+				++q;
+			}
+			
+            // is text < query ?
+			if (q != qEnd && (t == tEnd || *t < *q))
+			{	// range begins above mid, loop
+				treeIter.right();
+			}
+            // is text > query ?
+			else if (q != qEnd && (t != tEnd && *q < *t))
+			{	// range in first half, loop
+				treeIter.left();
+			} else
+            // is text == query ?
+			{	// range straddles mid, find each end and return
+				return Pair<TSAIter> (
+					_lowerBoundSANaive(text, treeIter.leftChild(), query),
+					_upperBoundSANaive(text, treeIter.rightChild(), query)
+				);
+			}
+		}
+		return Pair<TSAIter> (treeIter, treeIter);	// empty range
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+    // binary search with mlr-heuristic
+	template <
+		typename TText,
+		typename TSA,
+		typename TSpec,
+		typename TQuery
+	>
+	inline Pair< typename Iterator<TSA, Standard>::Type >
+	_equalRangeSA(
+		TText &text,
+		SearchTreeIterator< TSA, TSpec > treeIter,
+		TQuery &query)
+	{	// find range equivalent to query, using operator<
+		typedef typename Difference<TText>::Type			TDiff;
+		typedef typename Suffix<TText>::Type				TSuffix;
+		typedef typename Iterator<TSuffix, Standard>::Type	TTextIter;
+		typedef typename Iterator<TQuery, Standard>::Type	TQueryIter;
+		typedef typename Iterator<TSA, Standard>::Type		TSAIter;
+
+		TDiff lcpLower = 0;
+		TDiff lcpUpper = 0;
+
+		TQueryIter qBegin = begin(query, Standard());
+		TQueryIter qEnd = end(query, Standard());
+
+		for (; !treeIter.atEnd(); )
+		{	// divide and conquer, check midpoint
+
+			TSuffix		suf = suffix(text, *treeIter);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+			TQueryIter	q = qBegin;
+            TDiff		lcp = _min(lcpLower, lcpUpper);
+
+			goFurther(t, lcp);
+			goFurther(q, lcp);
+			while (t != tEnd && q != qEnd && *t == *q) {
+				++t;
+				++q;
+				++lcp;
+			}
+			
+            // is text < query ?
+			if (q != qEnd && (t == tEnd || *t < *q))
+			{	// range begins above mid, loop
+				treeIter.right();
+				lcpLower = lcp;
+			}
+            // is text > query ?
+			else if (q != qEnd && (t != tEnd && *q < *t))
+			{	// range in first half, loop
+				treeIter.left();
+				lcpUpper = lcp;
+			} else
+            // is text == query ?
+			{	// range straddles mid, find each end and return
+				return Pair<TSAIter> (
+					_lowerBoundSA(text, treeIter.leftChild(), query),
+					_upperBoundSA(text, treeIter.rightChild(), query)
+				);
+			}
+		}
+		return Pair<TSAIter> (treeIter, treeIter);	// empty range
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Finder wrappers (return iterators instead of positions)
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline typename Iterator<TSA const, Standard>::Type
+	lowerBoundSANaiveIterator(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query)
+	{	// find range equivalent to query, using operator<
+		return _lowerBoundSANaive(text, SearchTreeIterator<TSA const, SortedList>(sa), query);
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline typename Iterator<TSA const, Standard>::Type
+	lowerBoundSAIterator(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query)
+	{	// find range equivalent to query, using operator<
+		return _lowerBoundSA(text, SearchTreeIterator<TSA const, SortedList>(sa), query);
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline typename Iterator<TSA const, Standard>::Type
+	upperBoundSAIterator(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query)
+	{	// find range equivalent to query, using operator<
+		return _upperBoundSA(text, SearchTreeIterator<TSA const, SortedList>(sa), query);
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline Pair< typename Iterator<TSA const, Standard>::Type >
+	equalRangeSAIterator(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query)
+	{	// find range equivalent to query, using operator<
+		return _equalRangeSA(text, SearchTreeIterator<TSA const, SortedList>(sa), query);
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline Pair< typename Iterator<TSA const, Standard>::Type >
+	equalRangeSANaiveIterator(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query)
+	{	// find range equivalent to query, using operator<
+		return _equalRangeSANaive(text, SearchTreeIterator<TSA const, SortedList>(sa), query);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// workarounds for the Visual Studio array problem
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline typename Iterator<TSA const, Standard>::Type
+	lowerBoundSAIterator(
+		TText const &text,
+		TSA const &sa,
+		TQuery *query)
+	{	// find range equivalent to query, using operator<
+		return _lowerBoundSA(text, SearchTreeIterator<TSA const, SortedList>(sa), query);
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline typename Iterator<TSA const, Standard>::Type
+	upperBoundSAIterator(
+		TText const &text,
+		TSA const &sa,
+		TQuery *query)
+	{	// find range equivalent to query, using operator<
+		return _upperBoundSA(text, SearchTreeIterator<TSA const, SortedList>(sa), query);
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline Pair< typename Iterator<TSA const, Standard>::Type >
+	equalRangeSAIterator(
+		TText const &text,
+		TSA const &sa,
+		TQuery *query)
+	{	// find range equivalent to query, using operator<
+		return _equalRangeSA(text, SearchTreeIterator<TSA const, SortedList>(sa), query);
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// wrappers with nice interfaces
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery,
+		typename TFlatTreeSpec
+	>
+	inline typename Position<TSA>::Type 
+	lowerBoundSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query,
+		TFlatTreeSpec const)
+	{	// find first element not before query, using operator<
+		return _lowerBoundSA(text, SearchTreeIterator<TSA const, TFlatTreeSpec>(sa), query) - begin(sa, Standard());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline typename Position<TSA>::Type 
+	lowerBoundSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query)
+	{	// find first element not before query, using operator<
+		return lowerBoundSA(text, sa, query, SortedList());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery,
+		typename TFlatTreeSpec
+	>
+	inline typename Position<TSA>::Type 
+	upperBoundSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query,
+		TFlatTreeSpec const)
+	{	// find first element that query is before, using operator<
+		return _upperBoundSA(text, SearchTreeIterator<TSA const, TFlatTreeSpec>(sa), query) - begin(sa, Standard());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline typename Position<TSA>::Type 
+	upperBoundSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query)
+	{	// find first element that query is before, using operator<
+		return upperBoundSA(text, sa, query, SortedList());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery,
+		typename TFlatTreeSpec
+	>
+	inline Pair< typename Position<TSA>::Type >
+	equalRangeSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query,
+		TFlatTreeSpec const)
+	{	// find range equivalent to query, using operator<
+		Pair< typename Iterator<TSA, Standard>::Type > itPair = 
+			_equalRangeSA(text, SearchTreeIterator<TSA const, TFlatTreeSpec>(sa), query);
+		return Pair< typename Position<TSA>::Type >
+			(itPair.i1 - begin(sa, Standard()), itPair.i2 - begin(sa, Standard()));
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline Pair< typename Position<TSA>::Type >
+	equalRangeSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery const &query)
+	{	// find first element that query is before, using operator<
+		return equalRangeSA(text, sa, query, SortedList());
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// workarounds for the Visual Studio array problem
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery,
+		typename TFlatTreeSpec
+	>
+	inline typename Position<TSA>::Type 
+	lowerBoundSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery *query,
+		TFlatTreeSpec const)
+	{	// find first element not before query, using operator<
+		return _lowerBoundSA(text, SearchTreeIterator<TSA const, TFlatTreeSpec>(sa), query) - begin(sa, Standard());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline typename Position<TSA>::Type 
+	lowerBoundSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery *query)
+	{	// find first element not before query, using operator<
+		return lowerBoundSA(text, sa, query, SortedList());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery,
+		typename TFlatTreeSpec
+	>
+	inline typename Position<TSA>::Type 
+	upperBoundSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery *query,
+		TFlatTreeSpec const)
+	{	// find first element that query is before, using operator<
+		return _upperBoundSA(text, SearchTreeIterator<TSA const, TFlatTreeSpec>(sa), query) - begin(sa, Standard());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline typename Position<TSA>::Type 
+	upperBoundSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery *query)
+	{	// find first element that query is before, using operator<
+		return upperBoundSA(text, sa, query, SortedList());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery,
+		typename TFlatTreeSpec
+	>
+	inline Pair< typename Position<TSA>::Type >
+	equalRangeSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery *query,
+		TFlatTreeSpec const)
+	{	// find range equivalent to query, using operator<
+		Pair< typename Iterator<TSA, Standard>::Type > itPair = 
+			_equalRangeSA(text, SearchTreeIterator<TSA const, TFlatTreeSpec>(sa), query);
+		return Pair< typename Position<TSA>::Type >
+			(itPair.i1 - begin(sa, Standard()), itPair.i2 - begin(sa, Standard()));
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TQuery
+	>
+	inline Pair< typename Position<TSA>::Type >
+	equalRangeSA(
+		TText const &text,
+		TSA const &sa,
+		TQuery *query)
+	{	// find first element that query is before, using operator<
+		return equalRangeSA(text, sa, query, SortedList());
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// substring search with enhanced LCP-table
+	//
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCP,
+		typename TSpec,
+		typename TQuery,
+		typename TDiff_
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	_lowerBoundLcpe(
+		TText &text,
+		TSA &sa,
+		SearchTreeIterator< TLCP, TSpec > treeIter,
+		TQuery &query,
+		TDiff_ lcpLower,
+		TDiff_ lcpUpper)
+	{	// find first element not before query, using operator<
+		typedef typename Difference<TText>::Type			TDiff;
+		typedef typename Suffix<TText>::Type				TSuffix;
+		typedef typename Iterator<TSuffix, Standard>::Type	TTextIter;
+		typedef typename Iterator<TSA, Standard>::Type		TSAIter;
+		typedef SearchTreeIterator< TLCP, TSpec >			TLCPTreeIt;
+		typedef typename Iterator<TQuery, Standard>::Type	TQueryIter;
+
+		TDiff delta = length(sa) - 1;
+		TDiff lcp;
+		#ifdef SEQAN_PROFILE_LCPEFIND
+			TDiff skippedCompares = 0;	// difference of char compares related to xxx_bound_sa
+		#endif
+
+		TQueryIter qBegin = begin(query, Standard());
+		TQueryIter qEnd = end(query, Standard());
+		TSAIter first = begin(sa, Standard());
+
+		// binary search with intervals >= 3 elements
+		for (; 1 < delta; )
+		{	// divide and conquer, find half that contains answer
+			TDiff delta2 = treeIter.leftSize();
+			TSAIter mid = first;
+			goFurther(mid, delta2);
+
+			if (lcpLower > lcpUpper) 
+			{
+                TLCPTreeIt leftChild = treeIter;
+                leftChild.left();
+				TDiff lcpMidLower = *leftChild;
+
+				if (lcpMidLower > lcpLower) 
+				{
+					// second half
+					#ifdef SEQAN_PROFILE_LCPEFIND
+						skippedCompares += lcpLower - lcpUpper;
+					#endif
+					first = mid;
+					treeIter.right();
+					if ((delta -= delta2) == 1) {
+						++first;
+						delta = 0;
+					}
+					continue;
+				} 
+				else if (lcpMidLower < lcpLower) 
+				{
+					// first half
+					#ifdef SEQAN_PROFILE_LCPEFIND
+						skippedCompares += lcpMidLower - lcpUpper;
+					#endif
+					lcpUpper = lcpMidLower;
+					treeIter = leftChild;
+					if ((delta = delta2) == 1)
+						delta = 0;
+					continue;
+				}
+				lcp = lcpLower;
+			} 
+			else if (lcpLower < lcpUpper) 
+			{
+                TLCPTreeIt rightChild = treeIter;
+                rightChild.right();
+				TDiff lcpMidUpper = *rightChild;
+
+				if (lcpMidUpper > lcpUpper) 
+				{
+					// first half
+					#ifdef SEQAN_PROFILE_LCPEFIND
+						skippedCompares += lcpUpper - lcpLower;
+					#endif
+					treeIter.left();
+					if ((delta = delta2) == 1)
+						delta = 0;
+					continue;
+				} 
+				else if (lcpMidUpper < lcpUpper) 
+				{
+					// second half
+					#ifdef SEQAN_PROFILE_LCPEFIND
+						skippedCompares += lcpMidUpper - lcpLower;
+					#endif
+					lcpLower = lcpMidUpper;
+					first = mid;
+                    treeIter = rightChild;
+					if ((delta -= delta2) == 1) {
+						++first;
+						delta = 0;
+					}
+					continue;
+				}
+				lcp = lcpUpper;
+			} else
+				lcp = lcpUpper;
+
+
+			TSuffix		suf = suffix(text, *mid);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+			TQueryIter	q = qBegin;
+
+			// lcp search changes MIN to MAX here
+//			TDiff lcp = _max(lcpLower, lcpUpper);
+			#ifdef SEQAN_PROFILE_LCPEFIND
+				skippedCompares += lcp - _min(lcpLower, lcpUpper);
+			#endif
+			goFurther(t, lcp);
+			goFurther(q, lcp);
+			for(TDiff i = _min(difference(t, tEnd), difference(q, qEnd)); 
+				i && *t == *q;
+				--i, ++t, ++q, ++lcp) ;
+
+            // is text < query ?
+			if (q != qEnd && (t == tEnd || *t < *q)) 
+			{
+				// second half
+				lcpLower = lcp;
+				first = mid;
+				treeIter.right();
+				if ((delta -= delta2) == 1) {
+					++first;
+					delta = 0;
+				}
+			} else {
+				// first half
+				lcpUpper = lcp;
+				treeIter.left();
+				if ((delta = delta2) == 1)
+					delta = 0;
+			}
+		}
+
+		#ifdef SEQAN_PROFILE_LCPEFIND
+			SEQAN_PROADD(SEQAN_PROEXTRA3, skippedCompares);
+		#endif
+
+        // binary search for intervals of 2 or less elements
+        lcp = _min(lcpLower, lcpUpper);
+		TQueryIter q = qBegin;
+		goFurther(q, lcp);
+
+		while (true) {
+			TSuffix		suf = suffix(text, *first);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+
+			goFurther(t, lcp);
+			for(TDiff i = _min(difference(t, tEnd), difference(q, qEnd)); 
+            	i && *t == *q;
+            	 --i, ++t, ++q) ;
+
+            // is text < query ?
+			if (q != qEnd && (t == tEnd || *t < *q)) {
+				// second half
+				++first;
+				if (!delta) return first;
+                --delta;
+			} else {
+				// first half -> end
+				return first;
+			}
+        }
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCP,
+		typename TSpec,
+		typename TQuery
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	_lowerBoundLcpe(
+		TText &text,
+		TSA &sa,
+		SearchTreeIterator< TLCP, TSpec > &treeIter,
+		TQuery &query)
+	{
+		return _lowerBoundLcpe(text, sa, treeIter, query, 0, 0);
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCP,
+		typename TSpec,
+		typename TQuery,
+		typename TDiff_
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	_upperBoundLcpe(
+		TText &text,
+		TSA &sa,
+		SearchTreeIterator< TLCP, TSpec > treeIter,
+		TQuery &query,
+		TDiff_ lcpLower,
+		TDiff_ lcpUpper)
+	{	// find first element not before query, using operator<
+		typedef typename Difference<TText>::Type			TDiff;
+		typedef typename Suffix<TText>::Type				TSuffix;
+		typedef typename Iterator<TSuffix, Standard>::Type	TTextIter;
+		typedef typename Iterator<TSA, Standard>::Type		TSAIter;
+		typedef SearchTreeIterator< TLCP, TSpec >			TLCPTreeIt;
+		typedef typename Iterator<TQuery, Standard>::Type	TQueryIter;
+
+		TDiff delta = length(sa) - 1;
+
+		TQueryIter qBegin = begin(query, Standard());
+		TQueryIter qEnd = end(query, Standard());
+		TSAIter first = begin(sa, Standard());
+
+        // binary search with intervals >= 3 elements
+		for (; 1 < delta; )
+		{	// divide and conquer, find half that contains answer
+			TDiff delta2 = treeIter.leftSize();
+			TSAIter mid = first;
+			goFurther(mid, delta2);
+
+			if (lcpLower > lcpUpper) 
+			{
+                TLCPTreeIt leftChild = treeIter;
+                leftChild.left();
+				TDiff lcpMidLower = *leftChild;
+
+				if (lcpMidLower > lcpLower) 
+				{
+					// second half
+					first = mid;
+					treeIter.right();
+					if ((delta -= delta2) == 1) {
+						++first;
+						delta = 0;
+					}
+					continue;
+				} 
+				else if (lcpMidLower < lcpLower) 
+				{
+					// first half
+					lcpUpper = lcpMidLower;
+					treeIter = leftChild;
+					if ((delta = delta2) == 1)
+						delta = 0;
+					continue;
+				}
+			} 
+			else if (lcpLower < lcpUpper) 
+			{
+                TLCPTreeIt rightChild = treeIter;
+                rightChild.right();
+				TDiff lcpMidUpper = *rightChild;
+
+				if (lcpMidUpper > lcpUpper) 
+				{
+					// first half
+					treeIter.left();
+					if ((delta = delta2) == 1)
+						delta = 0;
+					continue;
+				}
+				else if (lcpMidUpper < lcpUpper) 
+				{
+					// second half
+					lcpLower = lcpMidUpper;
+					first = mid;
+                    treeIter = rightChild;
+					if ((delta -= delta2) == 1) {
+						++first;
+						delta = 0;
+					}
+					continue;
+				}
+			}
+
+			TSuffix		suf = suffix(text, *mid);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+			TQueryIter	q = qBegin;
+
+			// lcp search changes MIN to MAX here
+			TDiff lcp = _max(lcpLower, lcpUpper);
+			goFurther(t, lcp);
+			goFurther(q, lcp);
+			TDiff max = _min(difference(t, tEnd), difference(q, qEnd));
+            TDiff i = max;
+			for(; i && *t == *q; --i, ++t, ++q) ;
+			lcp += max - i;
+
+            // is text <= query ?
+			if (q == qEnd || t == tEnd || !(*q < *t)) 
+			{
+				// second half
+				lcpLower = lcp;
+				first = mid;
+				treeIter.right();
+				if ((delta -= delta2) == 1) {
+					++first;
+					delta = 0;
+				}
+			} else {
+				// first half
+				lcpUpper = lcp;
+				treeIter.left();
+				if ((delta = delta2) == 1)
+					delta = 0;
+			}
+		}
+
+        // binary search for intervals of 2 or less elements
+        TDiff lcp = _min(lcpLower, lcpUpper);
+		TQueryIter q = qBegin;
+		goFurther(q, lcp);
+
+		while (true) {
+			TSuffix		suf = suffix(text, *first);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+
+			goFurther(t, lcp);
+			TDiff i = _min(difference(t, tEnd), difference(q, qEnd));
+            for(; i && *t == *q; --i, ++t, ++q) ;
+
+            // is text <= query ?
+			if (q == qEnd || t == tEnd || !(*q < *t)) {
+				// second half
+				++first;
+				if (!delta) return first;
+                --delta;
+			} else {
+				// first half -> end
+				return first;
+			}
+        }
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCP,
+		typename TSpec,
+		typename TQuery
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	_upperBoundLcpe(
+		TText &text,
+		TSA &sa,
+		SearchTreeIterator< TLCP, TSpec > &treeIter,
+		TQuery &query)
+	{
+		return _upperBoundLcpe(text, sa, treeIter, query, 0, 0);
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCP,
+		typename TSpec,
+		typename TQuery
+	>
+	inline Pair< typename Iterator<TSA, Standard>::Type >
+	_equalRangeLcpe(
+		TText &text,
+		TSA &sa,
+		SearchTreeIterator< TLCP, TSpec > treeIter,
+		TQuery &query)
+	{	// find first element not before query, using operator<
+		typedef typename Difference<TText>::Type			TDiff;
+		typedef typename Suffix<TText>::Type				TSuffix;
+		typedef typename Iterator<TSuffix, Standard>::Type	TTextIter;
+		typedef typename Iterator<TSA, Standard>::Type		TSAIter;
+		typedef SearchTreeIterator< TLCP, TSpec >			TLCPTreeIt;
+		typedef typename Iterator<TQuery, Standard>::Type	TQueryIter;
+
+		TDiff lcpLower = 0;
+		TDiff lcpUpper = 0;
+        TDiff delta = length(sa) - 1;
+
+		TQueryIter qBegin = begin(query, Standard());
+		TQueryIter qEnd = end(query, Standard());
+		TSAIter first = begin(sa, Standard());
+		TSAIter last = end(sa, Standard());
+
+        // binary search with intervals >= 3 elements
+		for (; 1 < delta; )
+		{	// divide and conquer, find half that contains answer
+			TDiff delta2 = treeIter.leftSize();
+			TSAIter mid = first;
+			goFurther(mid, delta2);
+
+			if (lcpLower > lcpUpper) 
+			{
+                TLCPTreeIt leftChild = treeIter;
+                leftChild.left();
+				TDiff lcpMidLower = *leftChild;
+
+				if (lcpMidLower > lcpLower) 
+				{
+					// second half
+					first = mid;
+					treeIter.right();
+					if ((delta -= delta2) == 1) {
+						++first;
+						delta = 0;
+					}
+					continue;
+				}
+				else if (lcpMidLower < lcpLower) 
+				{
+					// first half
+					lcpUpper = lcpMidLower;
+					treeIter = leftChild;
+					if ((delta = delta2) == 1)
+						delta = 0;
+					continue;
+				}
+			} 
+			else if (lcpLower < lcpUpper) 
+			{
+                TLCPTreeIt rightChild = treeIter;
+                rightChild.right();
+				TDiff lcpMidUpper = *rightChild;
+
+				if (lcpMidUpper > lcpUpper) 
+				{
+					// first half
+					treeIter.left();
+					if ((delta = delta2) == 1)
+						delta = 0;
+					continue;
+				} 
+				else if (lcpMidUpper < lcpUpper) 
+				{
+					// second half
+					lcpLower = lcpMidUpper;
+					first = mid;
+                    treeIter = rightChild;
+					if ((delta -= delta2) == 1) {
+						++first;
+						delta = 0;
+					}
+					continue;
+				}
+			}
+
+			TSuffix		suf = suffix(text, *mid);
+			TTextIter	t = begin(suf, Standard());
+			TTextIter	tEnd = end(suf, Standard());
+			TQueryIter	q = qBegin;
+
+			// lcp search changes MIN to MAX here
+			TDiff lcp = _max(lcpLower, lcpUpper);
+			goFurther(t, lcp);
+			goFurther(q, lcp);
+			TDiff max = _min(difference(t, tEnd), difference(q, qEnd));
+            TDiff i = max;
+			for(; i && *t == *q; --i, ++t, ++q) ;
+			lcp += max - i;
+
+            // is text < query ?
+			if (q != qEnd && (t == tEnd || !(*q < *t))) {
+				// second half
+				lcpLower = lcp;
+				first = mid;
+				treeIter.right();
+				if ((delta -= delta2) == 1) {
+					++first;
+					delta = 0;
+				}
+			} else
+            // is text > query ?
+			if (q != qEnd && t != tEnd && (*q < *t)) {
+				// first half
+				lcpUpper = lcp;
+				treeIter.left();
+				if ((delta = delta2) == 1)
+					delta = 0;
+			} 
+			else
+			{	// range straddles mid, find each end and return
+				typename Infix<TSA>::Type leftRange(sa, first, mid);
+				TSAIter First2 = _lowerBoundLcpe(
+					text, leftRange, treeIter.leftChild(), query, lcpLower, lcp);
+
+				treeIter.right();
+				if ((delta -= delta2) == 1) {
+					delta = 0;
+					++first;
+				}
+
+				typename Infix<TSA>::Type rightRange(sa, mid, last);
+				TSAIter Last2 = _upperBoundLcpe(
+					text, rightRange, treeIter, query, lcp, lcpUpper);
+
+				return Pair<TSAIter> (First2, Last2);
+			}
+		}
+
+		// range straddles mid, find each end and return
+		typename Infix<TSA>::Type midRange(sa, first, last);
+		return Pair<TSAIter> (
+			_lowerBoundLcpe(text, midRange, treeIter, query, lcpLower, lcpUpper),
+			_upperBoundLcpe(text, midRange, treeIter, query, lcpLower, lcpUpper)
+		);
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCP,
+		typename TQuery
+	>
+	inline Pair< typename Iterator<TSA, Standard>::Type >
+	_equalRangeLcpe(
+		TText &text,
+		TSA &sa,
+		TLCP &lcp,
+		TQuery &query)
+	{
+		return _equalRangeLcpe(text, sa, SearchTreeIterator<TLCP, LeftCompleteTree>(lcp, (length(text)>1)?length(text)-1:0), query);
+	}
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// little helpers (not used)
+/*
+	template < typename LCPFwdIt, typename TSize >
+	TSize lcp(LCPFwdIt first, TSize count) {
+		if (count > 1) {
+			TSize lcp = *first;
+			++first;
+			count-=2;
+			while (count) {
+				if (lcp < *first) lcp = *first;
+				++first;
+				--count;
+			}
+			return lcp;
+		} else
+			return 0;
+	}
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// wrappers with nice interfaces
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline typename Position<TLCPE>::Type 
+	lowerBoundLcpe(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery const &query)
+	{	// find first element not before query, using operator<
+		return _lowerBoundLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query, 0, 0) - begin(sa, Standard());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline typename Position<TLCPE>::Type 
+	upperBoundLcpe(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery const &query)
+	{	// find first element that query is before, using operator<
+		return upperBoundLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query, 0, 0) - begin(sa, Standard());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline Pair< typename Position<TSA>::Type >
+	equalRangeLcpe(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery const &query)
+	{	// find range equivalent to query, using operator<
+		Pair< typename Iterator<TSA, Standard>::Type > itPair = 
+			_equalRangeLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query);
+		return Pair< typename Position<TSA>::Type >
+			(itPair.i1 - begin(sa, Standard()), itPair.i2 - begin(sa, Standard()));
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	lowerBoundLcpeIterator(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery const &query)
+	{	// find first element not before query, using operator<
+		return _lowerBoundLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query, 0, 0);
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline typename Iterator<TSA, Standard>::Type
+	upperBoundLcpeIterator(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery const &query)
+	{	// find first element that query is before, using operator<
+		return upperBoundLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query, 0, 0) - begin(sa, Standard());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline Pair< typename Iterator<TSA, Standard>::Type >
+	equalRangeLcpeIterator(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery const &query)
+	{	// find range equivalent to query, using operator<
+		return _equalRangeLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// workarounds for the Visual Studio array problem
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline typename Position<TLCPE>::Type 
+	lowerBoundLcpe(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery *query)
+	{	// find first element not before query, using operator<
+		return _lowerBoundLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query, 0, 0) - begin(sa, Standard());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline typename Position<TLCPE>::Type 
+	upperBoundLcpe(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery *query)
+	{	// find first element that query is before, using operator<
+		return upperBoundLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query, 0, 0) - begin(sa, Standard());
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline Pair< typename Position<TSA>::Type >
+	equalRangeLcpe(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery *query)
+	{	// find range equivalent to query, using operator<
+		Pair< typename Iterator<TSA, Standard>::Type > itPair = 
+			_equalRangeLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query);
+		return Pair< typename Position<TSA>::Type >
+			(itPair.i1 - begin(sa, Standard()), itPair.i2 - begin(sa, Standard()));
+	}
+
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TQuery
+	>
+	inline Pair< typename Iterator<TSA, Standard>::Type >
+	equalRangeLcpeIterator(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TQuery *query)
+	{	// find range equivalent to query, using operator<
+		return _equalRangeLcpe(text, sa, SearchTreeIterator<TLCPE const, LeftCompleteTree>(lcpe, (length(text)>1)?length(text)-1:0), query);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// wrappers with nice interfaces
+/*
+	template <
+		typename TText,
+		typename TSA,
+		typename TLCPE,
+		typename TSubText >
+	inline Pair<typename Iterator<TSA const>::Type> equalRangeLcpe(
+		TText const &text,
+		TSA const &sa,
+		TLCPE const &lcpe,
+		TSubText const &subtext)
+	{
+		return _equalRangeLcpe(
+			begin(text), end(text),
+			begin(sa), end(sa),
+            SearchTreeIterator<typename Iterator<TLCPE const>::Type, LeftCompleteTree>(begin(lcpe, (length(text)>1)?length(text)-1:0), (length(text)>1)?length(text)-1:0),
+			begin(subtext), end(subtext));
+	}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// _findFirstIndex implementation
+
+	template < typename TText, typename TSpec, typename TSpecFinder, typename TPattern >
+	inline void 
+	_findFirstIndex(
+		Finder< Index<TText, TSpec>, TSpecFinder > &finder,
+		TPattern const &pattern,
+		EsaFindMlr const)
+	{
+		Index<TText, TSpec> &index = haystack(finder);
+		indexRequire(index, EsaSA());
+		finder.range = equalRangeSAIterator(indexText(index), indexSA(index), pattern);
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder, typename TPattern >
+	inline void 
+	_findFirstIndex(
+		Finder< Index<TText, TSpec>, TSpecFinder > &finder,
+		TPattern const &pattern,
+		EsaFindLcpe const)
+	{
+		Index<TText, TSpec> &index = haystack(finder);
+		indexRequire(index, EsaSA());
+		indexRequire(index, EsaLcpe());
+		finder.range = equalRangeLcpeIterator(indexText(index), indexSA(index), indexLcpe(index), pattern);
+	}
+
+	template < typename TText, typename TSpec, typename TSpecFinder, typename TPattern >
+	inline void
+	_findFirstIndex(
+		Finder< Index<TText, TSpec>, TSpecFinder > &finder,
+		TPattern const &pattern,
+		FinderSTree const)
+	{
+        typedef Index<TText, TSpec>                             TIndex;
+		typedef typename Fibre<TIndex, FibreSA>::Type			TSA;
+		typedef typename Iterator<TSA const, Standard>::Type	TIterator;
+        
+		TIndex &index = haystack(finder);
+        typename Iterator<TIndex, TopDown<EmptyEdges> >::Type it(index);
+        TIterator saIt = begin(indexSA(index), Standard());
+        if (goDown(it, pattern))
+        {
+            Pair<typename Size<TIndex>::Type> rng = range(it);
+			finder.range.i1 = saIt + rng.i1;
+			finder.range.i2 = saIt + rng.i2;
+        } else
+        {
+            finder.range.i1 = saIt;
+            finder.range.i2 = saIt;
+        }
+	}
+
+
+}
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/find_index_qgram.h b/src/SeqAn-1.3/seqan/index/find_index_qgram.h
new file mode 100644
index 0000000..5deba25
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/find_index_qgram.h
@@ -0,0 +1,97 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_QGRAM_FIND_H
+#define SEQAN_HEADER_INDEX_QGRAM_FIND_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// QGram finders
+
+	struct FinderQGramLookup_; //Finder that simply looks up the q-gram in the hash table
+
+/**
+.Tag.Index Find Algorithm
+..tag.QGramFindLookup:q-gram search.
+Finds q-grams in a @Spec.IndexQGram@ index using the hash table.
+..include:seqan/index.h
+*/
+
+	typedef Tag<FinderQGramLookup_> const QGramFindLookup;
+
+//____________________________________________________________________________
+
+
+	template < typename TText, typename TShapeSpec, typename TSpec >
+	struct DefaultFinder<Index<TText, IndexQGram<TShapeSpec, TSpec> > > {
+        typedef QGramFindLookup Type;
+    };
+
+
+//////////////////////////////////////////////////////////////////////////////
+// _findFirstIndex implementation
+
+	template < typename TText, typename TSpec, typename TSpecFinder, typename TPattern >
+	inline void _findFirstIndex(
+		Finder< Index<TText, TSpec>, TSpecFinder > &finder,
+		TPattern const &pattern,
+		QGramFindLookup const)
+	{
+		typedef Index<TText, TSpec>									TIndex;
+		typedef typename Fibre<TIndex, QGramSA>::Type				TSA;
+		typedef typename Fibre<TIndex, QGramShape>::Type			TShape;
+		typedef typename Fibre<TIndex, QGramDir>::Type				TDir;
+		typedef typename Iterator<TSA const, Standard>::Type		TSAIterator;
+		typedef typename Iterator<TPattern const, Standard>::Type	TPatternIterator;
+
+		TIndex &index = haystack(finder);
+		indexRequire(index, QGramSADir());
+
+		TSAIterator saIt = begin(indexSA(index), Standard());
+		TPatternIterator pIt = begin(pattern, Standard());
+		TDir const &dir = indexDir(index);
+		TShape &shape = indexShape(index);
+
+		finder.range.i1 = saIt + dir[getBucket(index.bucketMap, hash(shape, pIt, length(pattern)))];
+		finder.range.i2 = saIt + dir[getBucket(index.bucketMap, hashUpper(shape, pIt, length(pattern)))];
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_
diff --git a/src/SeqAn-1.3/seqan/index/find_quasar.h b/src/SeqAn-1.3/seqan/index/find_quasar.h
new file mode 100644
index 0000000..7616040
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/find_quasar.h
@@ -0,0 +1,167 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Tobias Rausch <rausch at embl.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_QUASAR_H
+#define SEQAN_HEADER_FIND_QUASAR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Quasar
+//////////////////////////////////////////////////////////////////////////////
+
+//DISABLED .Class.Pattern.param.TSpec.type:Spec.Quasar
+
+struct Quasar_;
+typedef Tag<Quasar_> Quasar;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+class Pattern<TNeedle, Quasar> {
+//____________________________________________________________________________
+private:
+	Pattern(Pattern const& other);
+	Pattern const& operator=(Pattern const & other);
+
+//____________________________________________________________________________
+public:
+	Holder<TNeedle> data_host;
+
+
+//____________________________________________________________________________
+
+	Pattern() {	
+	}
+
+	template <typename TNeedle2>
+	Pattern(TNeedle2 const & ndl)
+	{
+SEQAN_CHECKPOINT
+		setHost(*this, ndl);
+	}
+
+	~Pattern() {
+		SEQAN_CHECKPOINT
+	}
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Host Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, Quasar> >
+{
+	typedef TNeedle Type;
+};
+
+template <typename TNeedle>
+struct Host< Pattern<TNeedle, Quasar> const>
+{
+	typedef TNeedle const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Functions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TNeedle, typename TNeedle2>
+inline void 
+setHost (Pattern<TNeedle, Quasar> & me, TNeedle2 const& needle) 
+{
+	SEQAN_CHECKPOINT
+	setValue(me.data_host, needle);
+}
+
+template <typename TNeedle, typename TNeedle2>
+inline void 
+setHost (Pattern<TNeedle, Quasar> & me, TNeedle2 & needle)
+{
+	setHost(me, reinterpret_cast<TNeedle2 const &>(needle));
+}
+
+//____________________________________________________________________________
+
+
+template <typename TNeedle>
+inline void _patternInit (Pattern<TNeedle, Quasar> & /*me*/) 
+{
+SEQAN_CHECKPOINT
+}
+
+
+//____________________________________________________________________________
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, Quasar>const>::Type & 
+host(Pattern<TNeedle, Quasar> & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+template <typename TNeedle>
+inline typename Host<Pattern<TNeedle, Quasar>const>::Type & 
+host(Pattern<TNeedle, Quasar> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_host);
+}
+
+//____________________________________________________________________________
+
+
+template <typename TFinder, typename TNeedle>
+inline bool 
+find(TFinder & finder, Pattern<TNeedle, Quasar> & me) 
+{
+	SEQAN_CHECKPOINT
+	
+	if (empty(finder)) {
+		_patternInit(me);
+		_finderSetNonEmpty(finder);
+	} else {
+		finder+=4;
+	}
+
+	return true;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_SHIFTAND_H
diff --git a/src/SeqAn-1.3/seqan/index/find_swift.h b/src/SeqAn-1.3/seqan/index/find_swift.h
new file mode 100644
index 0000000..e3b12bd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/find_swift.h
@@ -0,0 +1,1956 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FIND_SWIFT_H
+#define SEQAN_HEADER_FIND_SWIFT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// SWIFT to search a text for
+// - semi-global alignments of one/multiple short sequences
+// - local epsilon matches of one/multiple short sequences
+//////////////////////////////////////////////////////////////////////////////
+
+// TODO(bkehr): Is this documentatin right? Should the Specializations be Tags?
+// weese: of minimal length?
+/**
+.Spec.Swift:
+..summary:Provides a fast filter alogrithm that guarantees to find all regions overlapping with potential \epsilon-matches.
+An \epsilon-match is a matching region of minimal length and an error rate of at most \epsilon.
+..general:Class.Pattern
+..general:Class.Finder
+..cat:Searching
+..signature:Finder<TIndex, Swift<TSpec> >
+..signature:Pattern<TIndex, Swift<TSpec> >
+..param.TIndex: A q-gram index of needle(s).
+...type:Spec.IndexQGram
+..param.TSpec: Specifies the type of Swift filter.
+..include:seqan/index.h
+*/
+///.Class.Pattern.param.TSpec.type:Spec.Swift
+
+/**
+.Spec.SwiftLocal:
+..summary:The specialization for the general swift filter that finds epsilon matches between haystack and needle.
+..general:Spec.Swift
+..cat:Searching
+..signature:Finder<TIndex, Swift<SwiftLocal> >
+..signature:Pattern<TIndex, Swift<SwiftLocal> >
+..param.TIndex: A q-gram index of needle(s).
+...type:Spec.IndexQGram
+..include:seqan/index.h
+*/
+///.Spec.Swift.param.TSpec.type:Spec.SwiftLocal
+/**
+.Spec.SwiftSemiGlobal:
+..summary:The specialization for the semi-global swift filter that finds regions of the haystack where a needle matches with an error rate less than \epsilon.
+..general:Spec.Swift
+..cat:Searching
+..signature:Finder<TIndex, Swift<SwiftSemiGlobal> >
+..signature:Pattern<TIndex, Swift<SwiftSemiGlobal> >
+..param.TIndex: A q-gram index of needle(s).
+...type:Spec.IndexQGram
+..include:seqan/index.h
+*/
+///.Spec.Swift.param.TSpec.type:Spec.SwiftSemiGlobal
+
+template < typename TObject, typename TSpec > class Index;
+template < typename TObject > struct SAValue;
+
+struct SwiftLocal_;
+typedef Tag<SwiftLocal_> SwiftLocal;
+
+template <typename TSpec = void>
+struct SwiftSemiGlobal_;
+typedef Tag<SwiftSemiGlobal_<void> > SwiftSemiGlobal;
+
+struct Hamming_;
+typedef Tag<SwiftSemiGlobal_<Hamming_> > SwiftSemiGlobalHamming;
+
+
+template <typename TSpec = SwiftSemiGlobal>
+struct Swift;
+
+template <>
+struct Swift<SwiftSemiGlobal> {
+	enum { SEMIGLOBAL = 1 };		// 0..match eps-match of min.length n0; 1..match the whole read
+	enum { DIAGONAL = 1 };			// 0..use rectangular buckets (QUASAR); 1..use diagonal buckets (SWIFT)
+	enum { QGRAM_ERRORS = 0 };		// q-gram must match exactly
+	enum { HAMMING_ONLY = 0 };		// 0..no indels; 1..allow indels
+	enum { PARAMS_BY_LENGTH = 1 };	// params are determined only by seq.length
+};
+
+template <>
+struct Swift<SwiftSemiGlobalHamming> {
+	enum { SEMIGLOBAL = 1 };		// 0..match eps-match of min.length n0; 1..match the whole read
+	enum { DIAGONAL = 1 };			// 0..use rectangular buckets (QUASAR); 1..use diagonal buckets (SWIFT)
+	enum { QGRAM_ERRORS = 0 };		// q-gram must match exactly
+	enum { HAMMING_ONLY = 1 };		// 0..no indels; 1..allow indels
+	enum { PARAMS_BY_LENGTH = 1 };	// params are determined only by seq.length
+};
+
+template <>
+struct Swift<SwiftLocal> {
+	enum { SEMIGLOBAL = 0 };		// 0..match eps-match of min.length n0; 1..match the whole read
+	enum { DIAGONAL = 1 };			// 0..use rectangular buckets (QUASAR); 1..use diagonal buckets (SWIFT)
+	enum { QGRAM_ERRORS = 0 };		// allow 0 errors per q-gram
+	enum { HAMMING_ONLY = 0 };		// 0..no indels; 1..allow indels
+	enum { PARAMS_BY_LENGTH = 0 };	// params are determined by seq.no.
+};
+
+struct SwiftParameters {
+	int minThreshold;
+	int minLog2Delta;
+	int tabooLength;
+	bool printDots;
+
+	SwiftParameters():
+		minThreshold(1),		// set minimal threshold to 1
+		minLog2Delta(4),		// set minimal delta to 16
+		tabooLength(1),			// minimal genomic distance between q-gram hits
+		printDots(false) {}		// print a . for every 100kbps mapped genome
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TSpec, typename TSize_, typename TShortSize_ = unsigned short>
+	struct SwiftBucket_ 
+	{
+		typedef TSize_			TSize;
+		typedef TShortSize_		TShortSize;
+
+		TSize					firstIncrement;
+		TSize					lastIncrement;
+		TShortSize				counter;		// q-gram hits
+		TShortSize				threshold;		// at least threshold q-gram hits induce an approx match
+		bool					notListed;         // true if bucket is not listed in the patterns' verify list
+#ifdef SEQAN_DEBUG_SWIFT
+		TSize					_lastIncDiag;
+#endif
+	};
+
+	template <typename TSpec_, typename TSize_, typename TShortSize_>
+	struct SwiftBucket_<SwiftSemiGlobal_<TSpec_>, TSize_, TShortSize_>
+	{
+		typedef TSize_			TSize;
+		typedef TShortSize_		TShortSize;
+
+		TSize					lastIncrement;
+		TShortSize				counter;		// q-gram hits
+		TShortSize				threshold;		// at least threshold q-gram hits induce an approx match
+#ifdef SEQAN_DEBUG_SWIFT
+		int						_lastIncDiag;
+#endif
+	};
+
+	template <typename TSpec, typename TSize_, typename TShortSize_ = unsigned short>
+	struct SwiftBucketParams_ 
+	{
+		typedef TSize_			TSize;
+		typedef TShortSize_		TShortSize;
+
+		TSize			firstBucket;	// first SwiftBucket_ entry in pattern.buckets
+		TSize			reuseMask;		// 2^ceil(log2(x)) reuse every x-th bucket)
+		TShortSize		threshold;		// at least threshold q-gram hits induce an approx match
+		TShortSize		distanceCut;	// if lastIncrement is this far or farer away, threshold can't be reached
+		TShortSize		delta;			// buckets begin at multiples of delta
+		TShortSize		overlap;		// number of diagonals/columns a bucket shares with its neighbor
+		TShortSize		tabooLength;	// minimal genomic distance between q-gram hits
+		unsigned char	logDelta;		// log2(delta)
+	};
+
+	template <typename TSpec_, typename TSize_, typename TShortSize_>
+	struct SwiftBucketParams_< Swift<Tag<SwiftSemiGlobal_<TSpec_> > >, TSize_, TShortSize_>
+	{
+		typedef TSize_			TSize;
+		typedef TShortSize_		TShortSize;
+
+		TSize			firstBucket;	// first SwiftBucket_ entry in pattern.buckets
+		TSize			reuseMask;		// 2^ceil(log2(x)) reuse every x-th bucket)
+		TShortSize		threshold;		// at least threshold q-gram hits induce an approx match
+		TShortSize		delta;			// buckets begin at multiples of delta
+		TShortSize		overlap;		// number of diagonals/columns a bucket shares with its neighbor
+		TShortSize		tabooLength;	// minimal genomic distance between q-gram hits
+		unsigned char	logDelta;		// log2(delta)
+	};
+
+//____________________________________________________________________________
+
+
+	template <typename TSpec, typename THstkPos>
+	struct SwiftHit_ 
+	{
+		THstkPos	hstkPos;			// parallelogram begin in haystack 
+		unsigned	ndlSeqNo;			// needle sequence number
+		THstkPos	ndlPos;				// begin position of hit in needle
+		unsigned	bucketWidth;		// (non-diagonal) bucket width (hitLengthNeedle + delta + overlap (for diagonals))
+		unsigned	hitLengthNeedle;	// length of the hit in needle
+	};
+
+	template <typename TSpec, typename THstkPos>
+	struct SwiftHit_<Tag<SwiftSemiGlobal_<TSpec> >, THstkPos>
+	{
+		THstkPos	hstkPos;			// parallelogram begin in haystack 
+		unsigned	ndlSeqNo;			// needle sequence number
+		unsigned	bucketWidth;		// (non-diagonal) bucket width (bktHeight + delta + overlap (for diagonals))
+	};
+
+//____________________________________________________________________________
+
+
+	template <typename THaystack, typename TSpec>
+	class Finder<THaystack, Swift<TSpec> >
+	{
+	public:
+		typedef typename Iterator<THaystack, Rooted>::Type			TIterator;
+		typedef typename Position<THaystack>::Type					THstkPos;
+		typedef SwiftHit_<TSpec, __int64>							TSwiftHit;
+		typedef String<TSwiftHit>									THitString;
+		typedef typename Iterator<THitString, Standard>::Type		THitIterator;
+		typedef typename SAValue<THaystack>::Type					TSAValue;
+		typedef Repeat<TSAValue, unsigned>							TRepeat;
+		typedef String<TRepeat>										TRepeatString;
+		typedef typename Iterator<TRepeatString, Standard>::Type	TRepeatIterator;
+
+		TIterator		data_iterator;
+		TIterator		haystackEnd;
+		bool			_needReinit;	// if true, the Pattern needs to be reinitialized
+		THitString		hits;
+		THitIterator	curHit, endHit;
+		THstkPos		startPos, curPos, endPos;
+		THstkPos		dotPos, dotPos2;
+		TRepeatString	data_repeats;
+		TRepeatIterator	curRepeat, endRepeat;
+
+		Finder():
+			_needReinit(true) { }
+
+		Finder(THaystack &haystack):
+			data_iterator(begin(haystack, Rooted())),
+			_needReinit(true) { }
+
+		template <typename TRepeatSize, typename TPeriodSize>
+		Finder(THaystack &haystack, TRepeatSize minRepeatLen, TPeriodSize maxPeriod):
+			data_iterator(begin(haystack, Rooted())),
+			_needReinit(true) 
+		{
+			findRepeats(data_repeats, haystack, minRepeatLen, maxPeriod);
+		}
+
+		Finder(TIterator &iter):
+			data_iterator(iter),
+			_needReinit(true) { }
+
+		Finder(TIterator const &iter):
+			data_iterator(iter),
+			_needReinit(true) { }
+
+		Finder(Finder const &orig):
+			data_iterator(orig.data_iterator),
+			haystackEnd(orig.haystackEnd),
+			_needReinit(orig._needReinit),
+			hits(orig.hits),
+            startPos(orig.startPos),
+            curPos(orig.curPos),
+            endPos(orig.endPos),
+            dotPos(orig.dotPos),
+            dotPos2(orig.dotPos2),
+			data_repeats(orig.data_repeats)
+		{
+			curHit = begin(hits, Standard()) + (orig.curHit - begin(orig.hits, Standard()));
+			endHit = end(hits, Standard());
+			curRepeat = begin(data_repeats, Standard()) + (orig.curRepeat - begin(orig.data_repeats, Standard()));
+			endRepeat = end(data_repeats, Standard());
+		}
+
+		inline typename Reference<TIterator>::Type 
+		operator* () { return value(hostIterator(*this)); }
+
+		inline typename Reference<TIterator const>::Type 
+		operator* () const { return value(hostIterator(*this)); }
+
+		operator TIterator () const	{ return data_iterator;	}
+        
+        Finder & operator = (Finder const &orig) 
+        {
+            data_iterator = orig.data_iterator;
+            haystackEnd = orig.haystackEnd;
+            _needReinit = orig._needReinit;
+            hits = orig.hits;
+            startPos = orig.startPos;
+            curPos = orig.curPos;
+            endPos = orig.endPos;
+            dotPos = orig.dotPos;
+            dotPos2 = orig.dotPos2;
+            data_repeats = orig.data_repeats;
+            curHit = begin(hits, Standard()) + (orig.curHit - begin(orig.hits, Standard()));
+            endHit = end(hits, Standard());
+            curRepeat = begin(data_repeats, Standard()) + (orig.curRepeat - begin(orig.data_repeats, Standard()));
+            endRepeat = end(data_repeats, Standard());
+            return *this;
+        }
+    };
+
+
+//____________________________________________________________________________
+
+	// forward
+    template < typename TInput, typename TSpec >
+    struct Pipe;
+
+	template < typename TTuples, typename TPipeSpec, typename TSpec >
+	class Finder< Pipe<TTuples, TPipeSpec>, Swift<TSpec> >
+	{
+	public:
+		typedef Pipe<TTuples, TPipeSpec>						TInput;
+		typedef typename Size<TInput>::Type						THstkPos;
+		typedef SwiftHit_<TSpec, __int64>						TSwiftHit;
+		typedef String<TSwiftHit>								THitString;
+		typedef typename Iterator<THitString, Standard>::Type	THitIterator;
+
+		TInput			∈
+		bool			_needReinit;	// if true, the Pattern needs to be reinitialized
+		THitString		hits;
+		THitIterator	curHit, endHit;
+		THstkPos		curPos, dotPos, dotPos2;
+
+		Finder(TInput &_in):
+			in(_in),
+			_needReinit(true) {}
+
+		Finder(Finder const &orig):
+			in(orig.in),
+			hits(orig.hits),
+			_needReinit(orig._needReinit) 
+		{
+			curHit = begin(hits, Standard()) + (orig.curHit - begin(orig.hits, Standard()));
+			endHit = end(hits, Standard());
+		}
+	};
+
+
+//____________________________________________________________________________
+
+	
+	template <typename THaystack, typename TSpec>
+	inline bool
+	atEnd(Finder<THaystack, Swift<TSpec> > & me)
+	{
+		return hostIterator(hostIterator(me)) == hostIterator(me.haystackEnd);
+	}
+
+	template <typename THaystack, typename TSpec>
+	inline void
+	goEnd(Finder<THaystack, Swift<TSpec> > & me)
+	{
+		hostIterator(me) = me.haystackEnd;
+	}
+
+
+//____________________________________________________________________________
+
+
+	template <typename TIndex, typename TSpec>
+	class Pattern<TIndex, Swift<TSpec> >
+	{
+	public:
+		typedef typename Size<TIndex>::Type								TSize;
+		typedef unsigned												TShortSize;
+		typedef typename Fibre<TIndex, Tag<FibreSA_> const >::Type		TSA;
+		typedef typename Fibre<TIndex, Tag<Fibre_Shape_> const >::Type	TShape;
+		typedef typename Iterator<TSA const, Standard>::Type			TIterator;
+		
+		typedef SwiftBucket_<TSpec, TSize, TShortSize>					TBucket;
+		typedef String<TBucket>											TBucketString;
+		typedef SwiftBucketParams_<TSpec, TSize, TShortSize>			TBucketParams;
+		typedef String<TBucketParams>									TBucketParamsString;
+		typedef String<Pair<unsigned> >									TVerifyList;
+		
+		TShape					shape;
+		TBucketString			buckets;
+		TBucketParamsString		bucketParams;
+		TVerifyList				verifyList;								// numbers of buckets that need to be verified
+		SwiftParameters			params;
+		unsigned				curSeqNo;
+        __int64                 curBeginPos, curEndPos;
+		TSize					finderPosOffset;						// these must be of
+		TSize					finderPosNextOffset;					// type TSize of TBucket
+		__int64					finderLength;
+		
+		double					_currentErrorRate;
+		int						_currentMinLengthForAll;
+
+		Holder<TIndex>	data_host;
+
+		Pattern() 
+		{
+			clear(*this);
+		}
+		Pattern(TIndex &_index): data_host(_index) 
+		{
+			clear(*this);
+		}
+		Pattern(TIndex const &_index): data_host(_index)
+		{
+			clear(*this);
+		}
+	};
+	
+//____________________________________________________________________________
+
+
+template <typename TSpec_, typename TSize, typename TShortSize>
+inline void _printSwiftParams(SwiftBucketParams_<TSpec_, TSize, TShortSize > &bucketParams)
+{
+	::std::cout << "  firstBucket: " << bucketParams.firstBucket << ::std::endl;
+	::std::cout << "  reuseMask:   " << bucketParams.reuseMask << ::std::endl;
+	::std::cout << "  distanceCut: " << bucketParams.distanceCut << ::std::endl;
+	::std::cout << "  delta:       " << bucketParams.delta << ::std::endl;
+	::std::cout << "  threshold:   " << bucketParams.threshold << ::std::endl;
+	::std::cout << "  overlap:     " << bucketParams.overlap << ::std::endl;
+	::std::cout << "  logDelta:    " << (int)bucketParams.logDelta << ::std::endl << ::std::endl;
+}
+
+template <typename TSpec_, typename TSize, typename TShortSize>
+inline void _printSwiftParams(SwiftBucketParams_<Tag<SwiftSemiGlobal_<TSpec_> >, TSize, TShortSize > &bucketParams)
+{
+	::std::cout << "  firstBucket: " << bucketParams.firstBucket << ::std::endl;
+	::std::cout << "  reuseMask:   " << bucketParams.reuseMask << ::std::endl;
+	::std::cout << "  delta:       " << bucketParams.delta << ::std::endl;
+	::std::cout << "  threshold:   " << bucketParams.threshold << ::std::endl;
+	::std::cout << "  overlap:     " << bucketParams.overlap << ::std::endl;
+	::std::cout << "  logDelta:    " << (int)bucketParams.logDelta << ::std::endl << ::std::endl;
+}
+
+template <typename TIndex, typename TSpec>
+inline void _printSwiftBuckets(Pattern< TIndex, Swift<TSpec> > &p)
+{
+	typedef typename Pattern<TIndex, Swift<TSpec> >::TBucketParams TParams;
+
+	unsigned j = 0;
+	TParams *bucketParams = &_swiftBucketParams(p, 0);
+
+	for(unsigned i=0; i<length(p.buckets) && i<10; ++i) 
+	{
+		if ((i & bucketParams->reuseMask) == 0)
+		{
+			::std::cout << ::std::endl << "ReadBucket #" << j << "    " << '"';
+			::std::cout << indexText(host(p))[j] << '"' << ::std::endl;
+			::std::cout << "  length:      " << sequenceLength(j, host(p)) << ::std::endl;
+			bucketParams = &_swiftBucketParams(p, j++);
+			_printSwiftParams(*bucketParams);
+		}
+
+		::std::cout << "    lastInc: " << (int)p.buckets[i].lastIncrement;
+		::std::cout << "  \tCounter: " << p.buckets[i].counter << ::std::endl;
+	}
+}
+
+template <typename TIndex, typename TSpec, typename TSize>
+inline typename Pattern<TIndex, Swift<TSpec> >::TBucketParams &
+_swiftBucketParams(Pattern<TIndex, Swift<TSpec> > & pattern, TSize seqNo) 
+{
+	if (Swift<TSpec>::PARAMS_BY_LENGTH)
+		return pattern.bucketParams[sequenceLength(seqNo, host(pattern))];
+	else
+		return pattern.bucketParams[seqNo];
+}
+
+template <typename TIndex, typename TSpec, typename TParams, typename TSize>
+inline unsigned
+_swiftBucketNo(Pattern<TIndex, Swift<TSpec> > const &, TParams &bucketParams, TSize seqNo) 
+{
+	if (Swift<TSpec>::PARAMS_BY_LENGTH)
+		return (bucketParams.reuseMask + 1) * seqNo;	// assumes the same reuseMask for all reads
+	else
+		return bucketParams.firstBucket;
+}
+
+template <typename TIndex, typename TSpec, typename TSeqNo>
+inline int
+_qgramLemma(Pattern<TIndex, Swift<TSpec> > const & pattern, TSeqNo seqNo, int errors)
+{
+	// q-gram lemma: How many conserved q-grams we see at least?
+	// each error destroys at most <weight> many (gapped) q-grams
+	return qgramThreshold(indexShape(host(pattern)), sequenceLength(seqNo, host(pattern)), errors, EditDistance(), ThreshQGramLemma());
+}
+
+template <typename TIndex, typename TSpec, typename TSeqNo, typename TThreshold>
+inline void
+setMinThreshold(Pattern<TIndex, Swift<TSpec> > & pattern, TSeqNo seqNo, TThreshold thresh) 
+{
+	typedef Pattern<TIndex, Swift<TSpec> >						TPattern;
+	typedef typename TPattern::TBucketParams					TBucketParams;
+	typedef typename TPattern::TBucketString					TBucketString;
+	typedef typename Iterator<TBucketString, Standard>::Type	TBucketIterator;
+
+	TBucketParams &bucketParams = _swiftBucketParams(pattern, seqNo);
+	TBucketIterator it = begin(pattern.buckets, Standard()) + _swiftBucketNo(pattern, bucketParams, seqNo);
+	TBucketIterator itEnd = it + (bucketParams.reuseMask + 1);
+
+	for (; it != itEnd; ++it)
+		if ((*it).threshold < thresh)
+			(*it).threshold = thresh;
+}
+
+template <typename TSpec, typename TSize, typename TShortSize, typename TPos>
+inline void
+_resetBucket(SwiftBucket_<TSpec, TSize, TShortSize> & bkt, TPos lastIncrement)
+{
+	bkt.lastIncrement = lastIncrement;
+	bkt.counter = 0;
+	bkt.notListed = true;
+}
+
+template <typename TSpec, typename TSize, typename TShortSize, typename TPos, typename TThresh>
+inline void
+_resetBucket(SwiftBucket_<TSpec, TSize, TShortSize> & bkt, TPos lastIncrement, TThresh threshold)
+{
+	bkt.lastIncrement = lastIncrement;
+	bkt.counter = 0;
+	bkt.threshold = threshold;
+	bkt.notListed = true;
+}
+
+template <typename TSpec_, typename TSize, typename TShortSize, typename TPos>
+inline void
+_resetBucket(SwiftBucket_<SwiftSemiGlobal_<TSpec_>, TSize, TShortSize> & bkt, TPos lastIncrement)
+{
+	bkt.lastIncrement = lastIncrement;
+	bkt.counter = 0;
+}
+
+template <typename TSpec_, typename TSize, typename TShortSize, typename TPos, typename TThresh>
+inline void
+_resetBucket(SwiftBucket_<SwiftSemiGlobal_<TSpec_>, TSize, TShortSize> & bkt, TPos lastIncrement, TThresh threshold)
+{
+	bkt.lastIncrement = lastIncrement;
+	bkt.counter = 0;
+	bkt.threshold = threshold;
+}
+
+template <typename TIndex, typename TFloat, typename TSize_, typename TSpec>
+inline void _patternInit(Pattern<TIndex, Swift<TSpec> > &pattern, TFloat errorRate, TSize_ minLengthForAll) 
+{
+	typedef Pattern<TIndex, Swift<TSpec> >						TPattern;
+	typedef typename Size<TIndex>::Type							TSize;
+	typedef typename Fibre<TIndex, QGramSA>::Type				TSA;
+	typedef typename Iterator<TSA, Standard>::Type				TSAIter;
+	typedef typename TPattern::TBucket							TBucket;
+	typedef typename TBucket::TSize								TBucketSize;
+	typedef typename TPattern::TBucketParams					TBucketParams;
+	typedef typename TPattern::TBucketString					TBucketString;
+	typedef typename Iterator<TBucketString, Standard>::Type	TBucketIterator;
+
+	double _newErrorRate = errorRate;
+	TSize seqCount = countSequences(host(pattern));
+
+	clear(pattern.verifyList);
+	
+	if (pattern._currentErrorRate != _newErrorRate || pattern._currentMinLengthForAll != minLengthForAll)
+	{
+		// settings have been changed -> initialize bucket parameters
+	
+		pattern._currentErrorRate = _newErrorRate;
+		pattern._currentMinLengthForAll = minLengthForAll;
+		pattern.finderPosOffset = 0;
+		pattern.finderPosNextOffset = pattern.finderLength;
+
+		indexRequire(host(pattern), QGramSADir());
+		pattern.shape = indexShape(host(pattern));
+
+		TSize span = length(pattern.shape);
+		TSize count = 0;
+		TSize bucketsPerCol2Max = 0;
+		TSize maxLength = 0;
+		
+		if (Swift<TSpec>::PARAMS_BY_LENGTH) {
+			for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo) {
+				TSize length = sequenceLength(seqNo, host(pattern));
+				if (maxLength < length)
+					maxLength = length;
+			}
+			resize(pattern.bucketParams, maxLength + 1);
+		} else
+			resize(pattern.bucketParams, seqCount);
+		
+    	if (Swift<TSpec>::SEMIGLOBAL == 0) 
+	    {
+		    // global matches
+    		TSize minLength = minLengthForAll;
+	    	for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo) 
+		    {
+    			// swift q-gram lemma
+	    		TBucketParams &bucketParams = _swiftBucketParams(pattern, seqNo);
+		    	// n..next length that could decrease threshold
+			    TSize n = (TSize) ceil((floor(errorRate * minLength) + 1) / errorRate);
+    			// minimal threshold is minimum errors of minLength and n
+	    		int threshold = (TSize) _min(
+		    		(n + 1) - span * (floor(errorRate * n) + 1),
+			    	(minLength + 1) - span * (floor(errorRate * minLength) + 1));
+
+				if (threshold > pattern.params.minThreshold)
+					bucketParams.threshold = threshold;
+				else
+					bucketParams.threshold = pattern.params.minThreshold;
+
+			    TSize errors = (TSize) floor((2 * bucketParams.threshold + span - 3) / (1 / errorRate - span));
+			
+			
+    			// a bucket has distanceCut different positions of q-grams
+	    		// if a q-gram is this far or further away it can't belong to the
+		    	// same bucket
+			    bucketParams.distanceCut = (bucketParams.threshold - 1) + span * errors;
+
+    			TSize bucketsPerCol2;
+	    		if(Swift<TSpec>::DIAGONAL == 1) 
+		    	{
+			    	// Use overlapping parallelograms
+				    bucketParams.overlap = errors;
+    
+	    			// delta must be a power of 2 and greater than errors
+		    		bucketParams.logDelta = (TSize) ceil(log((double)errors + 1) / log(2.0));
+			    	if (bucketParams.logDelta < pattern.params.minLog2Delta) 
+				    	bucketParams.logDelta = pattern.params.minLog2Delta;
+    				bucketParams.delta = 1 << bucketParams.logDelta;
+	    			bucketParams.tabooLength = pattern.params.tabooLength;
+
+		    		// maximal number of buckets in one column
+			    	TSize bucketsPerCol = (sequenceLength(seqNo, host(pattern)) - span + 2 * bucketParams.delta + errors - 1) / bucketParams.delta;
+				    bucketsPerCol2 = 1 << (TSize) ceil(log((double)bucketsPerCol) / log(2.0)); // next greater or equal power of 2
+    			}
+	    		else
+		    	{
+			    	// TODO: classical swift for rectangular buckets
+				    // Use overlapping rectangles
+    				//bucketParams.overlap = ;
+
+	    			// delta must be a power of 2 greater than seq.length + errors (define a minimal delta of 32)
+		    		//bucketParams.logDelta = ;
+			    	//if (bucketParams.logDelta < pattern.params.minLog2Delta) 
+				    //	bucketParams.logDelta = pattern.params.minLog2Delta;
+    				//bucketParams.delta = 1 << bucketParams.logDelta;
+	    			bucketsPerCol2 = 1;
+		    	}
+			
+    			bucketParams.firstBucket = count; // firstBucket is only used if Swift<TSpec>::PARAMS_BY_LENGTH == 0
+	    		bucketParams.reuseMask = bucketsPerCol2 - 1;
+		    	bucketParams.tabooLength = pattern.params.tabooLength;
+			
+    			if (Swift<TSpec>::PARAMS_BY_LENGTH) {
+	    			++count;
+		    		if (bucketsPerCol2Max < bucketsPerCol2)
+			    		bucketsPerCol2Max = bucketsPerCol2;
+    			} else
+	    			count += bucketsPerCol2;
+		
+		    	/*if (seqNo<3)
+			    	_printSwiftParams(bucketParams);*/
+		    }
+		} else
+			for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo) 
+			{
+				// get pattern length and max. allowed errors
+				TBucketParams &bucketParams = _swiftBucketParams(pattern, seqNo);
+				TSize length = sequenceLength(seqNo, host(pattern));
+				TSize errors = (TSize) floor(errorRate * length);
+				TSize errorsWC = errors / (1 + Swift<TSpec>::QGRAM_ERRORS);
+
+				// q-gram lemma: How many conserved q-grams we see at least?
+				// (define a minimal threshold of 1)
+				int threshold = length - span + 1 - errorsWC * weight(pattern.shape);
+				if (threshold > pattern.params.minThreshold)
+					bucketParams.threshold = threshold;
+				else
+					bucketParams.threshold = pattern.params.minThreshold;
+				
+				if (Swift<TSpec>::HAMMING_ONLY != 0)
+					errors = 0;			
+
+				// a bucket has distanceCut different positions of q-grams
+				// if a q-gram is this far or farer away it can't belong to the
+				// same bucket
+	//			bucketParams.distanceCut = length - (span - 1) + errors;
+
+				TSize bucketsPerCol2;
+				if (Swift<TSpec>::DIAGONAL == 1)
+				{
+					// Use overlapping parallelograms				
+					bucketParams.overlap = errors;
+					
+					// delta must be a power of 2 greater then errors (define a minimal delta of 8)
+					bucketParams.logDelta = (TSize) ceil(log((double)(errors + 1)) / log(2.0));
+					if (bucketParams.logDelta < pattern.params.minLog2Delta) 
+						bucketParams.logDelta = pattern.params.minLog2Delta;
+					bucketParams.delta = 1 << bucketParams.logDelta;
+
+					// the formula for bucketsPerCol is (worst-case):
+					// (height-(q-1) - 1 - (delta+1-e))/delta + 3
+					//    ^-- full paral. in the middle --^     ^-- 2 at the bottom, 1 at the top
+					TSize bucketsPerCol = (length - span + 2 * bucketParams.delta + errors - 1) / bucketParams.delta;
+					bucketsPerCol2 = 1 << (TSize) ceil(log((double)bucketsPerCol) / log(2.0));
+				}
+				else
+				{
+					// Use overlapping rectangles
+					bucketParams.overlap = length - span + errors;
+
+					// delta must be a power of 2 greater then seq.length + errors (define a minimal delta of 32)
+					bucketParams.logDelta = (TSize) ceil(log((double)(length - span + 1 + errors)) / log(2.0));
+					if (bucketParams.logDelta < pattern.params.minLog2Delta) 
+						bucketParams.logDelta = pattern.params.minLog2Delta;
+					bucketParams.delta = 1 << bucketParams.logDelta;
+
+					bucketsPerCol2 = 2;
+				}
+
+	//			SEQAN_ASSERT(distanceCut <= bucketsPerCol * (TSize) delta);
+
+				bucketParams.firstBucket = count;
+				bucketParams.reuseMask = bucketsPerCol2 - 1;
+				bucketParams.tabooLength = pattern.params.tabooLength;
+				
+				if (Swift<TSpec>::PARAMS_BY_LENGTH) {
+					++count;
+					if (bucketsPerCol2Max < bucketsPerCol2)
+						bucketsPerCol2Max = bucketsPerCol2;
+				} else
+					count += bucketsPerCol2;
+				
+	/*			if (seqNo<3)
+					_printSwiftParams(bucketParams);
+	*/		}
+
+		if (Swift<TSpec>::PARAMS_BY_LENGTH) {
+			count *= bucketsPerCol2Max;
+			for(unsigned i = 0; i < length(pattern.bucketParams); ++i)
+				pattern.bucketParams[i].reuseMask = bucketsPerCol2Max - 1;
+		}
+		resize(pattern.buckets, count);
+
+		TBucketIterator	bktEnd, bkt = begin(pattern.buckets, Standard());
+		for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+		{
+			TBucketParams &bucketParams = _swiftBucketParams(pattern, seqNo);
+			TBucketSize lastIncrement = (TBucketSize)0 - (TBucketSize)bucketParams.tabooLength;
+			for(bktEnd = bkt + bucketParams.reuseMask + 1; bkt != bktEnd; ++bkt) 
+			{
+				_resetBucket(*bkt, lastIncrement, bucketParams.threshold);
+			}
+		}
+	}
+	else
+	{
+		// settings are unchanged -> reset buckets
+
+		// finderPosOffset is used to circumvent expensive resetting of all buckets
+		pattern.finderPosOffset = pattern.finderPosNextOffset;
+		pattern.finderPosNextOffset += pattern.finderLength;
+		
+		// reset buckets only if an overflow of the finder position would occur
+		// we would not detect an overflow if finderLength is larger than the largest TBucketSize value
+		if (pattern.finderPosNextOffset <= pattern.finderPosOffset || (__int64)(TBucketSize)pattern.finderLength < (__int64)pattern.finderLength)
+		{
+			pattern.finderPosOffset = 0;
+			pattern.finderPosNextOffset = pattern.finderLength;
+			
+			TBucketIterator	bktEnd, bkt = begin(pattern.buckets, Standard());
+			for (TSize ndlSeqNo = 0; ndlSeqNo < seqCount; ++ndlSeqNo) 
+			{
+				TBucketParams &bucketParams = _swiftBucketParams(pattern, ndlSeqNo);
+				TBucketSize lastIncrement = (TBucketSize)0 - (TBucketSize)bucketParams.tabooLength;
+				for (bktEnd = bkt + (bucketParams.reuseMask + 1); bkt != bktEnd; ++bkt)
+				{
+					_resetBucket(*bkt, lastIncrement);
+				}
+			}
+		}
+	}
+
+/*
+	std::cerr << "Swift bucket params: " << length(pattern.bucketParams) << std::endl;
+	std::cerr << "Swift buckets:       " << length(pattern.buckets) << std::endl;
+	std::cerr << "Buckets per read:    " << bucketsPerCol2Max << std::endl;
+*/
+}
+
+
+/////////////////////////////////////////////////////////////
+// Creates a new hit and appends it to the finders hit list
+template <
+	typename THaystack,
+	typename TIndex,
+	typename TSpec,
+	typename TBucket,
+	typename TBucketParams,
+	typename TSize
+>
+inline void _createHit(
+	Finder<THaystack, Swift<TSpec> > & finder,
+	Pattern<TIndex, Swift<TSpec> > & pattern,
+	TBucket & bkt,
+	TBucketParams & bucketParams,
+	__int64 diag,
+	TSize ndlSeqNo)
+{
+	typedef typename Finder<THaystack, Swift<TSpec> >::TSwiftHit	THit;
+	__int64 lastInc = (__int64)bkt.lastIncrement - pattern.finderPosOffset;
+	__int64 firstInc = (__int64)bkt.firstIncrement - pattern.finderPosOffset;
+
+    if(diag > lastInc) 
+	{
+		// bucket is reused since last increment 
+		TSize reusePos = (bucketParams.reuseMask + 1) << bucketParams.logDelta;
+		diag -= (__int64)ceil((diag-lastInc)/(double)reusePos) * reusePos;
+	}
+
+    // determine width, height, and begin position in needle
+	TSize width = lastInc - firstInc + length(pattern.shape);
+	TSize height = width + bucketParams.delta + bucketParams.overlap;
+	__int64 ndlBegin = lastInc + length(pattern.shape) - diag - height;
+
+    // create the hit
+	THit hit = {                //                              *
+		firstInc,               // bucket begin in haystack     * *
+		ndlSeqNo,               // needle seq. number           *   *
+		ndlBegin,               // bucket begin in needle       *     *
+		width,                  // bucket width (non-diagonal)    *   *
+		height                  // bucket height                    * * 
+	};                          //                                    *
+
+    // append the hit to the finders hit list
+    appendValue(finder.hits, hit);
+}
+
+//////////////////////////////////////////////////////////////////////
+// Updates the counters of the buckets in which the q-gram with hash value hash occurs.
+// Assures that those updated bucket counters are set to one
+//    - that exceeded the reuse mask since last increment
+//    - for which the last increment lies more than distanceCut away.
+// If a bucket counter reaches threshold a hit is appended to the hit-list of the finder.
+// Returns true if the hit-list of the finder is not empty after this call.
+template <
+	typename TFinder,
+	typename TIndex,
+	typename TSpec,
+	typename THashValue
+>
+inline bool _swiftMultiProcessQGram(
+	TFinder & finder,
+	Pattern<TIndex, Swift<TSpec> > & pattern,
+	THashValue hash)
+{
+	typedef Pattern<TIndex, Swift<TSpec> >						TPattern;
+
+	typedef typename Size<TIndex>::Type							TSize;
+	typedef typename Fibre<TIndex, QGramSA>::Type				TSA;
+	typedef typename Iterator<TSA, Standard>::Type				TSAIter;
+	typedef typename TPattern::TBucketString					TBucketString;
+	typedef typename Iterator<TBucketString, Standard>::Type	TBucketIter;
+	typedef typename Value<TBucketString>::Type					TBucket;
+	typedef typename TBucket::TShortSize						TShortSize;
+	typedef typename TPattern::TBucketParams					TBucketParams;
+	typedef typename TFinder::TSwiftHit							THit;
+	
+	TIndex const &index = host(pattern);
+	
+	// create an iterator over the positions of the q-gram occurences in pattern
+	TSAIter saBegin = begin(indexSA(index), Standard());
+	TSAIter occ = saBegin + indexDir(index)[getBucket(index.bucketMap, hash)];
+    TSAIter occEnd = saBegin + indexDir(index)[getBucket(index.bucketMap, hash) + 1];
+    TBucketIter bktBegin = begin(pattern.buckets, Standard());
+	Pair<unsigned> ndlPos;
+	
+/*	std::cerr<<"\t["<<(occEnd-occ)<<"]"<< std::flush;
+	
+	if ((occEnd-occ)>100)
+	{
+		std::cerr<<" ";
+		for(int i=0;i<length(indexShape(host(pattern)));++i)
+			std::cerr<<*(hostIterator(hostIterator(finder))+i);
+	}
+*/	
+	// iterate over all q-gram occurences and do the processing
+	__int64 curPos = finder.curPos + pattern.finderPosOffset;
+	for(; occ != occEnd; ++occ)
+	{
+		posLocalize(ndlPos, *occ, stringSetLimits(index)); // get pair of SeqNo and Pos in needle
+		TBucketParams &bucketParams = _swiftBucketParams(pattern, getSeqNo(ndlPos));
+
+		// begin position of the diagonal of q-gram occurence in haystack (possibly negative)
+		__int64 diag = finder.curPos;
+		if (Swift<TSpec>::DIAGONAL == 1) diag -= getSeqOffset(ndlPos);
+
+		unsigned bktNo = (diag >> bucketParams.logDelta) & bucketParams.reuseMask; // bucket no of diagonal
+		unsigned bktOfs = diag & (bucketParams.delta - 1); // offset of diagonal to bucket begin
+		__int64  bktBeginHstk = diag & ~(__int64)(bucketParams.delta - 1); // haystack position of bucket begin diagonal
+		
+		// global (over all pattern sequences) number of current bucket
+		TBucketIter bkt = bktBegin + (_swiftBucketNo(pattern, bucketParams, getSeqNo(ndlPos)) + bktNo);
+		
+		TShortSize hitCount;
+
+		do {
+			if ((__int64)(*bkt).lastIncrement < bktBeginHstk + (__int64)pattern.finderPosOffset
+				|| (__int64)((*bkt).lastIncrement + bucketParams.distanceCut) < curPos)
+			{
+				// last increment was before the beginning of the current bucket => bucket is reused
+				// Or last increment was in the same bucket but lies more than distanceCut away
+                
+                if ((*bkt).counter >= (*bkt).threshold)
+                {
+	                // create a new hit and append it to the finders hit list
+				    _createHit(finder, pattern, *bkt, bucketParams, bktBeginHstk, getSeqNo(ndlPos));
+                }
+
+				// reuse bucket
+				hitCount = 1;
+				(*bkt).firstIncrement = curPos;
+			}
+			else if((__int64)((*bkt).lastIncrement + bucketParams.tabooLength) > curPos)
+			{
+				// bkt counter was already incremented for another q-gram at
+				//   a haystack position that is closer than tabooLength
+				// we jump directly to
+				//   where we check whether the q-gram falls into another overlapping bucket or not
+				goto checkOverlap;
+			}
+			else
+			{
+				if((*bkt).counter == 0) (*bkt).firstIncrement = curPos;
+				hitCount = (*bkt).counter + 1;
+			}
+
+			(*bkt).lastIncrement = curPos;
+			(*bkt).counter = hitCount;
+#ifdef SEQAN_DEBUG_SWIFT
+			(*bkt)._lastIncDiag = diag;
+#endif
+
+			if (hitCount == (*bkt).threshold && (*bkt).notListed) {
+				// append bkt no to patterns verify list
+				appendValue(pattern.verifyList, Pair<unsigned>(getSeqNo(ndlPos), bktNo));
+				(*bkt).notListed = false;
+			}
+
+checkOverlap:
+			// check if q-gram falls into another overlapping bucket
+			if(bktOfs >= bucketParams.overlap) break;
+
+			// set to previous overlapping bucket for next iteration
+			bktBeginHstk -= bucketParams.delta;
+			bktOfs += bucketParams.delta;
+			if(bktNo) {
+				--bktNo;
+				--bkt;
+			} else {
+				bktNo = bucketParams.reuseMask;
+				bkt += bktNo;
+			}
+		}
+		while(true);
+	}
+
+	finder.curHit = begin(finder.hits, Standard());
+	finder.endHit = end(finder.hits, Standard());
+
+	return !empty(finder.hits);
+}
+
+///////////////////////////////////////////////////////////////////
+// Updates the counters of the buckets in which the q-gram with hash value hash occurs.
+// Assures that those updated bucket counters that exceeded the reuse mask since last increment are set to one.
+// If a bucket counter reaches threshold a hit is appended to the hit-list of the finder.
+// Returns true if the hit-list of the finder is not empty after this call.
+template <
+	typename TFinder,
+	typename TIndex, 
+	typename TSpec_,
+	typename THValue
+>
+inline bool _swiftMultiProcessQGram(
+	TFinder &finder, 
+	Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec_> > > > &pattern,
+	THValue hash)
+{
+	typedef Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec_> > > >	TPattern;
+
+	typedef typename Size<TIndex>::Type							TSize;
+	typedef typename Fibre<TIndex, QGramSA>::Type				TSA;
+	typedef typename Iterator<TSA, Standard>::Type				TSAIter;
+	typedef typename TPattern::TBucketString					TBucketString;
+	typedef typename Iterator<TBucketString, Standard>::Type	TBucketIter;
+	typedef typename Value<TBucketString>::Type					TBucket;
+	typedef typename TBucket::TShortSize						TShortSize;
+	typedef typename TPattern::TBucketParams					TBucketParams;
+	typedef typename TFinder::TSwiftHit							THit;
+	
+	TIndex const &index = host(pattern);	
+	
+	// create an iterator over the positions of the q-gram occurences in pattern
+	TSAIter saBegin = begin(indexSA(index), Standard());
+	TSAIter occ = saBegin + indexDir(index)[getBucket(index.bucketMap, hash)];
+    TSAIter occEnd = saBegin + indexDir(index)[getBucket(index.bucketMap, hash) + 1];
+    TBucketIter bktBegin = begin(pattern.buckets, Standard());
+	Pair<unsigned> ndlPos;
+	
+/*	std::cerr<<"\t["<<(occEnd-occ)<<"]"<< std::flush;
+	
+	if ((occEnd-occ)>100)
+	{
+		std::cerr<<" ";
+		for(int i=0;i<length(indexShape(host(pattern)));++i)
+			std::cerr<<*(hostIterator(hostIterator(finder))+i);
+	}
+*/	
+	// iterate over all q-gram occurences and do the processing
+	__int64 curPos = finder.curPos + pattern.finderPosOffset;
+	for(; occ != occEnd; ++occ) 
+	{
+		posLocalize(ndlPos, *occ, stringSetLimits(index));
+		TBucketParams &bucketParams = _swiftBucketParams(pattern, getSeqNo(ndlPos));
+
+		__int64 diag = finder.curPos;
+		if (Swift<Tag<SwiftSemiGlobal_<TSpec_> > >::DIAGONAL == 1) diag -= getSeqOffset(ndlPos);
+		
+		unsigned bktNo = (diag >> bucketParams.logDelta) & bucketParams.reuseMask;
+		unsigned bktOfs = diag & (bucketParams.delta - 1);
+		__int64  bktBeginHstk = diag & ~(__int64)(bucketParams.delta - 1);
+
+		TBucketIter bkt = bktBegin + (_swiftBucketNo(pattern, bucketParams, getSeqNo(ndlPos)) + bktNo);		
+		TShortSize hitCount;
+
+		do 
+		{
+			if ((__int64)(*bkt).lastIncrement < bktBeginHstk + (__int64)pattern.finderPosOffset)
+			{
+				// last increment was before the beginning of the current bucket
+				// (we must ensure that bucketIdx doesn't collide)
+				hitCount = 1;
+			}
+			else
+			{
+				if ((__int64)((*bkt).lastIncrement + bucketParams.tabooLength) > curPos)
+					goto checkOverlap;	// increment only once per sequence			
+				hitCount = (*bkt).counter + 1;
+			}
+
+			(*bkt).lastIncrement = curPos;
+			(*bkt).counter = hitCount;
+#ifdef SEQAN_DEBUG_SWIFT
+			(*bkt)._lastIncDiag = diag;
+#endif
+
+			if (hitCount == (*bkt).threshold)
+			{
+
+				TSize height = 0;
+				if (Swift<Tag<SwiftSemiGlobal_<TSpec_> > >::DIAGONAL == 1)
+					height = sequenceLength(getSeqNo(ndlPos), host(pattern)) - 1;
+
+#ifdef SEQAN_DEBUG_SWIFT
+				// upper bucket no. of lastIncr. q-gram
+				__int64 upperBktNo = ((*bkt).lastIncrement - pattern.finderPosOffset) >> bucketParams.logDelta;
+
+				// we must decrement bucket no. until (no. mod reuse == bktNo)
+				__int64 _bktBeginHstk = 
+					 (upperBktNo - ((upperBktNo - bktNo) & bucketParams.reuseMask)) << bucketParams.logDelta;
+
+				if ((*bkt)._lastIncDiag - _bktBeginHstk >= bucketParams.delta + bucketParams.overlap || (*bkt)._lastIncDiag < _bktBeginHstk) {
+					::std::cerr << "qgram stored in wrong bucket (diag:" << (*bkt)._lastIncDiag << ", begin:" << _bktBeginHstk;
+					::std::cerr << ", delta:" << bucketParams.delta << ", overlap:" << bucketParams.overlap << ")" << ::std::endl;
+				}
+#endif
+//				if (bktBeginHstk >= 0) 
+//				{
+					THit hit = {
+						bktBeginHstk,										// bucket begin in haystack
+						getSeqNo(ndlPos),									// needle seq. number
+						height + bucketParams.delta + bucketParams.overlap	// bucket width (non-diagonal)
+					};
+					appendValue(finder.hits, hit);
+//				} else {
+//					// match begins left of haystack begin
+//					THit hit = {
+//						0,													// bucket begin in haystack
+//						getSeqNo(ndlPos),									// needle seq. number
+//						height + bucketParams.delta + bucketParams.overlap	// bucket width (non-diagonal)
+//						+ (diag & ~(__int64)(bucketParams.delta - 1))
+//					};
+//					appendValue(finder.hits, hit);
+//				}
+			}
+
+		checkOverlap:
+			if (bktOfs >= bucketParams.overlap) break;
+
+			// repeat with the previous overlapping bucket
+			bktBeginHstk -= bucketParams.delta;
+			bktOfs += bucketParams.delta;
+			if (bktNo) {
+				--bktNo;
+				--bkt;
+			} else {
+				bktNo = bucketParams.reuseMask;
+				bkt += bktNo;
+			}
+		} while (true);
+	}
+
+	finder.curHit = begin(finder.hits, Standard());
+	finder.endHit = end(finder.hits, Standard());
+
+	return !empty(finder.hits);
+}
+
+////////////////////////////////////////////////////////////////////////////////////
+// resets counter and lastIncrement of all buckets listed in patterns verify list
+template <
+	typename TFinder,
+	typename TIndex, 
+	typename TSpec
+>
+inline bool _swiftMultiFlushBuckets(
+	TFinder & finder,
+	Pattern<TIndex, Swift<TSpec> > & pattern
+	)
+{
+	typedef Pattern<TIndex, Swift<TSpec> >						TPattern;
+
+	typedef typename TPattern::TBucket							TBucket;
+	typedef typename TBucket::TSize								TBucketSize;
+	typedef typename TPattern::TBucketString					TBucketString;
+	typedef typename Iterator<TBucketString, Standard>::Type	TBucketIterator;
+	typedef typename TPattern::TBucketParams					TBucketParams;
+
+	typedef typename TPattern::TVerifyList						TVerifyList;
+	typedef typename Iterator<TVerifyList, Standard>::Type		TListIterator;
+
+	typedef typename Size<TIndex>::Type							TSize;
+
+	__int64 hstkLength = length(haystack(finder));
+
+	TListIterator verifyBkt = begin(pattern.verifyList, Standard());
+	TListIterator verifyListEnd = end(pattern.verifyList, Standard());
+	for (; verifyBkt < verifyListEnd; ++verifyBkt)
+	{
+		unsigned bktNo = (*verifyBkt).i2;
+		unsigned ndlSeqNo = (*verifyBkt).i1;
+		TBucketParams &bucketParams = _swiftBucketParams(pattern, ndlSeqNo);
+
+		TBucketIterator bkt = begin(pattern.buckets, Standard()) + _swiftBucketNo(pattern, bucketParams, ndlSeqNo) + bktNo;
+		if ((*bkt).counter >= (*bkt).threshold)
+		{
+			// hstkPos / delta: gives the number of the bucket that is at the top of this column (modulo reuseMask missing)
+			TSize topBucket = (TSize)(hstkLength >> bucketParams.logDelta);
+			// number of buckets in last column above the bucket with the number bktNo
+			TSize bucketNoInCol = (topBucket + bucketParams.reuseMask + 1 - bktNo) & bucketParams.reuseMask;
+			// begin position of lower diagonal of this bucket in haystack (possibly negative)
+			__int64 diag = (hstkLength & ~(__int64)(bucketParams.delta - 1)) - (bucketNoInCol << bucketParams.logDelta);
+
+			// create a new hit and append it to the finders hit list
+	    	_createHit(finder, pattern, *bkt, bucketParams, diag, ndlSeqNo);
+
+			_resetBucket(*bkt, (TBucketSize)0 - (TBucketSize)bucketParams.tabooLength);
+		}
+	}
+
+	clear(pattern.verifyList);
+
+	finder.curHit = begin(finder.hits, Standard());
+	finder.endHit = end(finder.hits, Standard());
+
+	return !empty(finder.hits);
+}
+
+//////////////////////////////////////////////////////
+// no resetting is needed for the semiglobal version
+template <
+	typename TFinder,
+	typename TIndex, 
+	typename TSpec_
+>
+inline bool _swiftMultiFlushBuckets(
+	TFinder &, 
+	Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec_> > > > &)
+{
+    // there is nothing to be done here as we dump matches immediately after reaching the threshold
+    return false;
+}
+
+template <typename TIndex, typename TSpec>
+inline bool 
+empty(Pattern<TIndex, Swift<TSpec> > & me) 
+{
+	return empty(me.bucketParams);
+}
+
+template <typename TIndex, typename TSpec>
+inline void 
+clear(Pattern<TIndex, Swift<TSpec> > & me) 
+{
+	me.finderPosOffset = 0;
+	me.finderPosNextOffset = 0;
+	me.finderLength = 0;
+	me._currentErrorRate = -1;
+	me._currentMinLengthForAll = -1;
+	clear(me.bucketParams);
+	clear(me.buckets);
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline typename Position<Finder<THaystack, Swift<TSpec> > >::Type
+position(Finder<THaystack, Swift<TSpec> > const & finder)
+{
+	typename Finder<THaystack, Swift<TSpec> >::TSwiftHit &hit = *finder.curHit;
+	return hit.hstkPos + hit.bucketWidth;
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Position<Finder<THaystack, Swift<TSpec> > >::Type
+position(Finder<THaystack, Swift<TSpec> > & finder)
+{
+	return position(const_cast<Finder<THaystack, Swift<TSpec> > const &>(finder));
+}
+
+//____________________________________________________________________________
+
+template <typename TIndex, typename TSpec>
+inline typename SAValue<TIndex>::Type
+position(Pattern<TIndex, Swift<TSpec> > const & pattern)
+{
+	__int64 hitEnd = pattern.curEndPos;
+	__int64 textLength = sequenceLength(pattern.curSeqNo, needle(pattern));
+	if(hitEnd > textLength) hitEnd = textLength;
+
+	typename SAValue<TIndex >::Type pos;
+	posLocalToX(pos, Pair<unsigned, __int64>(pattern.curSeqNo, hitEnd), stringSetLimits(host(pattern)));
+	return pos;
+}
+
+template <typename TIndex, typename TSpec>
+inline typename SAValue<TIndex>::Type
+position(Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > const & pattern)
+{
+	typedef typename Size<TIndex>::Type TSize;
+    typename SAValue<TIndex >::Type pos;
+	posLocalToX(pos, Pair<unsigned, TSize>(pattern.curSeqNo, length(needle(pattern))), stringSetLimits(host(pattern)));
+	return pos;
+}
+
+template <typename TIndex, typename TSpec>
+inline typename SAValue<TIndex>::Type
+position(Pattern<TIndex, Swift<TSpec> > & pattern)
+{
+	return position(const_cast<Pattern<TIndex, Swift<TSpec> > const &>(pattern));
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline __int64
+beginPosition(Finder<THaystack, Swift<TSpec> > const & finder)
+{
+	return (*finder.curHit).hstkPos;
+}
+
+template <typename THaystack, typename TSpec>
+inline __int64
+beginPosition(Finder<THaystack, Swift<TSpec> > & finder)
+{
+	return beginPosition(const_cast<Finder<THaystack, Swift<TSpec> > const &>(finder));
+}
+
+//____________________________________________________________________________
+
+template <typename TIndex, typename TSpec>
+inline typename SAValue<TIndex>::Type
+beginPosition(Pattern<TIndex, Swift<TSpec> > const & pattern)
+{
+	__int64 hitBegin = pattern.curBeginPos;
+	if (hitBegin < 0) hitBegin = 0;
+	
+	typename SAValue<TIndex >::Type pos;
+	posLocalToX(pos, Pair<unsigned, __int64>(pattern.curSeqNo, hitBegin), stringSetLimits(host(pattern)));
+	return pos;
+}
+
+template <typename TIndex, typename TSpec>
+inline typename SAValue<TIndex >::Type
+beginPosition(Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > const & pattern)
+{
+    typename SAValue<TIndex >::Type pos;
+	posLocalToX(pos, Pair<unsigned>(pattern.curSeqNo, 0), stringSetLimits(host(pattern)));
+	return pos;
+}
+
+template <typename TIndex, typename TSpec>
+inline typename SAValue<TIndex>::Type
+beginPosition(Pattern<TIndex, Swift<TSpec> > & pattern)
+{
+	return beginPosition(const_cast<Pattern<TIndex, Swift<TSpec> > const &>(pattern));
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline typename Position<Finder<THaystack, Swift<TSpec> > >::Type
+endPosition(Finder<THaystack, Swift<TSpec> > const & finder)
+{
+	typename Finder<THaystack, Swift<TSpec> >::TSwiftHit &hit = *finder.curHit;
+	return hit.hstkPos + hit.bucketWidth;
+}
+
+template <typename THaystack, typename TSpec>
+inline typename Position<Finder<THaystack, Swift<TSpec> > >::Type
+endPosition(Finder<THaystack, Swift<TSpec> > & finder)
+{
+	return endPosition(const_cast<Finder<THaystack, Swift<TSpec> > const &>(finder));
+}
+
+//____________________________________________________________________________
+
+template <typename TIndex, typename TSpec>
+inline typename SAValue<TIndex>::Type
+endPosition(Pattern<TIndex, Swift<TSpec> > const & pattern)
+{
+	__int64 hitEnd = pattern.curEndPos;
+	__int64 textLength = sequenceLength(pattern.curSeqNo, needle(pattern));
+	if(hitEnd > textLength) hitEnd = textLength;
+
+	typename SAValue<TIndex >::Type pos;
+	posLocalToX(pos, Pair<unsigned, __int64>(pattern.curSeqNo, hitEnd), stringSetLimits(host(pattern)));
+	return pos;
+}
+
+template <typename TIndex, typename TSpec>
+inline typename SAValue<TIndex >::Type
+endPosition(Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > const & pattern)
+{
+	typedef typename Size<TIndex>::Type TSize;
+	typename SAValue<TIndex >::Type pos;
+	posLocalToX(pos, Pair<unsigned, TSize>(pattern.curSeqNo, length(needle(pattern))), stringSetLimits(host(pattern)));
+	return pos;
+}
+
+template <typename TIndex, typename TSpec>
+inline typename SAValue<TIndex>::Type
+endPosition(Pattern<TIndex, Swift<TSpec> > & pattern)
+{
+	return endPosition(const_cast<Pattern<TIndex, Swift<TSpec> > const &>(pattern));
+}
+
+//____________________________________________________________________________
+/**
+.Function.positionRangeNoClip
+..cat:Searching
+..summary:Returns a pair of the begin and end position in or beyond the haystack or needle for the last hit found.
+..signature:positionRangeNoClip(finder)
+..signature:positionRangeNoClip(pattern)
+..param.finder:A @Class.Finder@ object.
+..param.pattern:A @Class.Pattern@ object.
+..returns:A pair of the begin and end position in the haystack or needle for the last hit found. These positions could
+be negative or beyond the end of $finder$ or $pattern$ when using filter algorithms.
+...remarks:The return type is $Pair<typename SAValue<THost>::Type>$ if $THost$ is the type of haystack or needle.
+..see:Function.positionRange
+..include:seqan/index.h
+*/
+///.Function.positionRangeNoClip.param.finder.type:Spec.Swift
+///.Function.positionRangeNoClip.param.pattern.type:Spec.Swift
+
+template <typename THaystack, typename TSpec>
+inline Pair<typename Position<Finder<THaystack, Swift<TSpec> > >::Type>
+positionRangeNoClip(Finder<THaystack, Swift<TSpec> > const & finder)
+{
+	typedef typename Position<Finder<THaystack, Swift<TSpec> > >::Type TPosition;
+	typedef Pair<TPosition> TPair;
+	typename Finder<THaystack, Swift<TSpec> >::TSwiftHit &hit = *finder.curHit;
+	return TPair((TPosition)hit.hstkPos, (TPosition)(hit.hstkPos + hit.bucketWidth));
+}
+
+template <typename THaystack, typename TSpec>
+inline Pair<typename Position<Finder<THaystack, Swift<TSpec> > >::Type>
+positionRangeNoClip(Finder<THaystack, Swift<TSpec> > & finder)
+{
+	return positionRangeNoClip(const_cast<Finder<THaystack, Swift<TSpec> > const &>(finder));
+}
+
+//____________________________________________________________________________
+/**
+.Function.positionRange
+..cat:Searching
+..summary:Returns a pair of the begin and end position in the haystack or needle for the last hit found.
+..signature:positionRange(finder)
+..signature:positionRange(pattern)
+..param.finder:A @Class.Finder@ object.
+..param.pattern:A @Class.Pattern@ object.
+..returns:A pair of the begin and end position in the haystack or needle for the last hit found.
+...remarks:The return type is $Pair<typename SAValue<THost>::Type>$ if $THost$ is the type of haystack or needle.
+..see:Function.beginPosition
+..see:Function.endPosition
+..include:seqan/index.h
+*/
+///.Function.positionRange.param.finder.type:Spec.Swift
+///.Function.positionRange.param.pattern.type:Spec.Swift
+
+template <typename THaystack, typename TSpec>
+inline Pair<typename Position<Finder<THaystack, Swift<TSpec> > >::Type>
+positionRange(Finder<THaystack, Swift<TSpec> > const & finder)
+{
+	typedef typename Position<Finder<THaystack, Swift<TSpec> > >::Type TPosition;
+	typedef Pair<TPosition> TPair;
+	typename Finder<THaystack, Swift<TSpec> >::TSwiftHit &hit = *finder.curHit;
+
+	__int64 hitBegin = hit.hstkPos;
+	__int64 hitEnd = hit.hstkPos + hit.bucketWidth;
+	__int64 textEnd = length(haystack(finder));
+
+	if (hitBegin < 0) hitBegin = 0;
+	if (hitEnd > textEnd) hitEnd = textEnd;
+	return TPair((TPosition)hitBegin, (TPosition)hitEnd);
+}
+
+template <typename THaystack, typename TSpec>
+inline Pair<typename Position<Finder<THaystack, Swift<TSpec> > >::Type>
+positionRange(Finder<THaystack, Swift<TSpec> > & finder)
+{
+	return positionRange(const_cast<Finder<THaystack, Swift<TSpec> > const &>(finder));
+}
+
+//____________________________________________________________________________
+
+template <typename TIndex, typename TSpec>
+inline Pair<typename SAValue<TIndex>::Type>
+positionRange(Pattern<TIndex, Swift<TSpec> > & pattern)
+{
+	return Pair<typename SAValue<TIndex>::Type> (beginPosition(pattern), endPosition(pattern));
+}
+
+//____________________________________________________________________________
+
+template <typename TSwiftHit, typename TText>
+inline typename Infix<TText>::Type
+swiftInfixNoClip(TSwiftHit const &hit, TText &text)
+{
+	return infix(text, hit.hstkPos, hit.hstkPos + hit.bucketWidth);
+}
+
+template <typename TSwiftHit, typename TText>
+inline typename Infix<TText>::Type
+swiftInfix(TSwiftHit const &hit, TText &text)
+{
+	__int64 hitBegin = hit.hstkPos;
+	__int64 hitEnd = hit.hstkPos + hit.bucketWidth;
+	__int64 textEnd = length(text);
+
+	if (hitBegin < 0) hitBegin = 0;
+	if (hitEnd > textEnd) hitEnd = textEnd;
+	SEQAN_ASSERT_LEQ(hitBegin, hitEnd);
+	return infix(text, hitBegin, hitEnd);
+}
+
+//____________________________________________________________________________
+
+///.Function.infix.remarks:For finders or patterns of filtering algorithms (e.g. @Spec.Swift@) the returned infix is a potential match.
+///.Function.infix.param.finder.type:Spec.Swift
+
+template <typename THaystack, typename TSpec>
+inline typename Infix<THaystack>::Type
+infix(Finder<THaystack, Swift<TSpec> > &finder)
+{
+	return swiftInfix(*finder.curHit, haystack(finder));
+}
+
+template <typename THaystack, typename TSpec, typename TText>
+inline typename Infix<TText>::Type
+infix(Finder<THaystack, Swift<TSpec> > &finder, TText &text)
+{
+	return swiftInfix(*finder.curHit, text);
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline typename Infix<THaystack>::Type
+infixNoClip(Finder<THaystack, Swift<TSpec> > &finder)
+{
+	return swiftInfixNoClip(*finder.curHit, haystack(finder));
+}
+
+template <typename THaystack, typename TSpec, typename TText>
+inline typename Infix<TText>::Type
+infixNoClip(Finder<THaystack, Swift<TSpec> > &finder, TText &text)
+{
+	return swiftInfixNoClip(*finder.curHit, text);
+}
+
+//____________________________________________________________________________
+
+template <typename TIndex, typename TSpec, typename TText>
+inline typename Infix<TText>::Type
+infix(Pattern<TIndex, Swift<TSpec> > const & pattern, TText &text)
+{
+    __int64 hitBegin = pattern.curBeginPos;
+	__int64 hitEnd = pattern.curEndPos;
+	__int64 textLength = sequenceLength(pattern.curSeqNo, needle(pattern));
+
+	if (hitEnd > textLength) hitEnd = textLength;
+    if (hitBegin < 0) hitBegin = 0;
+
+	return infix(text, hitBegin, hitEnd);
+}
+
+template <typename TIndex, typename TSpec>
+inline typename Infix< typename GetSequenceByNo< TIndex const >::Type >::Type
+infix(Pattern<TIndex, Swift<TSpec> > const & pattern)
+{
+	return infix(pattern, getSequenceByNo(pattern.curSeqNo, needle(pattern)));
+}
+
+template <typename TIndex, typename TSpec>
+inline typename Infix< typename GetSequenceByNo< TIndex const >::Type >::Type
+infix(Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > const & pattern)
+{
+	return infix(getSequenceByNo(pattern.curSeqNo, needle(pattern)), 0, sequenceLength(pattern.curSeqNo, needle(pattern)));
+}
+
+template <typename TIndex, typename TSpec>
+inline typename Infix< typename GetSequenceByNo< TIndex const >::Type >::Type
+infix(Pattern<TIndex, Swift<TSpec> > & pattern)
+{
+	return infix(const_cast<Pattern<TIndex, Swift<TSpec> > const &>(pattern));
+}
+
+//____________________________________________________________________________
+
+template <typename THaystack, typename TSpec>
+inline void 
+_printDots(Finder<THaystack, Swift<TSpec> > &finder)
+{
+	while (finder.curPos >= finder.dotPos) 
+	{
+		finder.dotPos += 100000;
+		if (finder.dotPos >= finder.dotPos2)
+		{
+			::std::cerr << (finder.dotPos2 / 1000000) << "M" << ::std::flush;
+			finder.dotPos2 += 1000000;
+		} else
+			::std::cerr << "." << ::std::flush;
+	}
+}
+
+template <typename TFinder, typename TIndex, typename TSpec>
+inline bool 
+_nextNonRepeatRange(
+	TFinder &finder,
+	Pattern<TIndex, Swift<TSpec> > &pattern)
+{
+	typedef typename TFinder::TRepeat		TRepeat;
+	typedef typename Value<TRepeat>::Type	TPos;
+
+	if (finder.curRepeat == finder.endRepeat) return false;
+
+	do 
+	{
+		finder.startPos = (*finder.curRepeat).endPosition;
+		if (++finder.curRepeat == finder.endRepeat) 
+		{
+			finder.endPos = length(host(finder));
+			if (finder.startPos + length(pattern.shape) > finder.endPos)
+				return false;
+			else
+				break;
+		} else
+			finder.endPos = (*finder.curRepeat).beginPosition;
+		// repeat until the shape fits in non-repeat range
+	} while (finder.startPos + length(pattern.shape) > finder.endPos);
+
+	finder.curPos = finder.startPos;
+	hostIterator(finder) = begin(host(finder)) + finder.startPos;
+	finder.haystackEnd = begin(host(finder)) + (finder.endPos - length(pattern.shape) + 1);
+
+//	if (pattern.params.printDots)
+//		::std::cerr << ::std::endl << "  scan range (" << finder.startPos << ", " << finder.endPos << ") " << std::flush;
+
+	return true;
+}
+
+template <typename TFinder, typename TIndex, typename TSpec>
+inline bool 
+_firstNonRepeatRange(
+	TFinder &finder,
+	Pattern<TIndex, Swift<TSpec> > &pattern)
+{
+	typedef typename TFinder::TRepeat		TRepeat;
+	typedef typename Value<TRepeat>::Type	TPos;
+
+	finder.curRepeat = begin(finder.data_repeats, Standard());
+	finder.endRepeat = end(finder.data_repeats, Standard());
+
+	if (finder.curRepeat == finder.endRepeat)
+		finder.endPos = length(host(finder));
+	else
+		finder.endPos = (*finder.curRepeat).beginPosition;
+
+	if (length(pattern.shape) > finder.endPos)
+		return _nextNonRepeatRange(finder, pattern);
+
+	finder.curPos = finder.startPos = 0;
+	hostIterator(finder) = begin(host(finder));
+	finder.haystackEnd = begin(host(finder)) + (finder.endPos - length(pattern.shape) + 1);
+
+//	if (pattern.params.printDots)
+//		::std::cerr << ::std::endl << "  scan range (" << finder.startPos << ", " << finder.endPos << ") " << std::flush;
+
+	return true;
+}
+
+template <typename TFinder, typename TIndex, typename TSpec>
+inline void
+_copySwiftHit(
+	TFinder &finder,
+	Pattern<TIndex, Swift<TSpec> > &pattern)
+{
+	pattern.curSeqNo = (*finder.curHit).ndlSeqNo;
+	pattern.curBeginPos = (*finder.curHit).ndlPos;
+	pattern.curEndPos = (*finder.curHit).ndlPos + (*finder.curHit).hitLengthNeedle;
+}
+
+template <typename TFinder, typename TIndex, typename TSpec>
+inline void 
+_copySwiftHit(
+	TFinder &finder,
+	Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > &pattern)
+{
+	pattern.curSeqNo = (*finder.curHit).ndlSeqNo;
+	pattern.curBeginPos = 0;
+	pattern.curEndPos = length(indexText(needle(pattern))[pattern.curSeqNo]);
+}
+
+template <typename TFinder, typename TIndex, typename TSpec>
+inline bool 
+find(
+	TFinder &finder,
+	Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > &pattern, 
+	double errorRate)
+{
+	return find(finder, pattern, errorRate, 0);
+}
+
+template <typename THaystack, typename TIndex, typename TSpec, typename TSize>
+inline bool 
+find(
+	Finder<THaystack, Swift<TSpec> > &finder,
+	Pattern<TIndex, Swift<TSpec> > &pattern, 
+	double errorRate,
+	TSize minLength)
+{
+	typedef typename Fibre<TIndex, QGramShape>::Type	TShape;
+	typedef	typename Value<TShape>::Type				THashValue;
+
+	if (empty(finder)) 
+	{
+		pattern.finderLength = pattern.params.tabooLength + length(container(finder));
+		_patternInit(pattern, errorRate, minLength);
+		_finderSetNonEmpty(finder);
+		finder.dotPos = 100000;
+		finder.dotPos2 = 10 * finder.dotPos;
+
+		if (!_firstNonRepeatRange(finder, pattern)) return false;
+		if (_swiftMultiProcessQGram(finder, pattern, hash(pattern.shape, hostIterator(hostIterator(finder)))))
+		{
+			_copySwiftHit(finder, pattern);
+			return true;
+		}
+	} 
+	else
+	{
+		if (++finder.curHit < finder.endHit) 
+		{
+			_copySwiftHit(finder, pattern);
+			return true;
+		}
+	}
+
+	// all previous matches reported -> search new ones
+	clear(finder.hits);
+
+	// are we at the end of the text?
+	if (atEnd(finder) && finder.curRepeat == finder.endRepeat) 
+	{
+		finder.curHit = finder.endHit;
+		return false;
+	}
+
+	do 
+	{
+		if (pattern.params.printDots) _printDots(finder);
+		if (atEnd(++finder)) 
+		{
+			if (!_nextNonRepeatRange(finder, pattern)) 
+			{
+				if(_swiftMultiFlushBuckets(finder, pattern))
+				{
+					_copySwiftHit(finder, pattern);
+					return true;
+				}
+				else
+					return false;
+			}
+			hash(pattern.shape, hostIterator(hostIterator(finder)));
+		}
+		else
+		{
+			++finder.curPos;
+			hashNext(pattern.shape, hostIterator(hostIterator(finder)));
+		}
+		
+		if (_swiftMultiProcessQGram(finder, pattern, value(pattern.shape)))
+		{
+			_copySwiftHit(finder, pattern);
+			return true;
+		}
+
+	} while (true);
+}
+
+template <typename THashes, typename TPipeSpec, typename TIndex, typename TSpec>
+inline bool 
+find(
+	Finder<Pipe<THashes, TPipeSpec>, Swift<TSpec> > &finder,
+	Pattern<TIndex, Swift<TSpec> > &pattern, 
+	double errorRate)
+{
+	if (empty(finder)) 
+	{
+		pattern.finderLength = 0;
+		_patternInit(pattern, errorRate, 0);
+		_finderSetNonEmpty(finder);
+		finder.dotPos = 100000;
+		finder.dotPos2 = 10 * finder.dotPos;
+
+		beginRead(finder.in);
+		if (eof(finder.in)) 
+		{
+			endRead(finder.in);
+			return false;
+		}
+		finder.curPos = (*finder.in).i1;
+		if (_swiftMultiProcessQGram(finder, pattern, hash(pattern.shape, (*finder.in).i2)))
+		{
+			_copySwiftHit(finder, pattern);
+			return true;
+		}
+	} else
+		if (++finder.curHit != finder.endHit) 
+		{
+			_copySwiftHit(finder, pattern);
+			return true;
+		}
+
+	clear(finder.hits);
+	if (eof(finder.in)) return false;
+
+	do 
+	{
+		++finder.in;
+		if (eof(finder.in)) 
+		{
+			endRead(finder.in);
+#ifdef SEQAN_DEBUG_SWIFT
+			_printSwiftBuckets(pattern);
+#endif
+			if(_swiftMultiFlushBuckets(finder, pattern))
+			{
+				_copySwiftHit(finder, pattern);
+				return true;
+			}
+			else 
+				return false;
+		}
+		finder.curPos = (*finder.in).i1;
+		if (pattern.params.printDots) _printDots(finder);
+
+	} while (!_swiftMultiProcessQGram(finder, pattern, hash(pattern.shape, (*finder.in).i2)));
+
+	_copySwiftHit(finder, pattern);
+	return true;
+}
+
+/**
+.Function.windowFindBegin:
+..cat:Searching
+..summary:Initializes the pattern. Sets the finder on the begin position.
+ Gets the first non-repeat range and sets it in the finder.
+ Used together with @Function.windowFindBegin@ and @Function.windowFindEnd at .
+..signature:windowFindBegin(finder, pattern, errorRate)
+..param.finder:A SWIFT finder.
+..param.pattern: A SWIFT pattern.
+..param.errorRate:Error rate that is allowed between reads and reference.
+ Should be the same in as in @Function.windowFindNext at .
+...type:nolink:double
+..include:seqan/index.h
+*/
+template <typename THaystack, typename TIndex, typename TSpec>
+inline bool 
+windowFindBegin(
+	Finder<THaystack, Swift<TSpec> > &finder,
+	Pattern<TIndex, Swift<TSpec> > &pattern, 
+	double errorRate)
+{
+	SEQAN_CHECKPOINT
+	
+	pattern.finderLength = pattern.params.tabooLength + length(container(finder));
+	_patternInit(pattern, errorRate, 0);
+	_finderSetNonEmpty(finder);
+	finder.dotPos = 100000;
+	finder.dotPos2 = 10 * finder.dotPos;
+
+	if (!_firstNonRepeatRange(finder, pattern)) return false;
+    
+    return true;
+}
+
+
+/**
+.Function.windowFindNext:
+..cat:Searching
+..summary:Searches over the next window with the finder. The found hits can be retrieved with @Function.getSwiftHits@
+ Used together with @Function.windowFindBegin@ and @Function.windowFindEnd at .
+..signature:windowFindNext(finder, pattern, finderWindowLength)
+..param.finder:A SWIFT finder.
+..param.pattern: A SWIFT pattern.
+..param.finderWindowLength:Number of bases that are scanned beginning from the position the finder is at.
+ Including bases that are marked as repeats and that are skipped.
+...type:nolink:unsigned int
+..returns:true, if there are bases that can be scanned. false, otherwise
+..see:Function.windowFindBegin
+..see:Function.windowFindEnd
+..see:Function.getSwiftHits
+..include:seqan/index.h
+*/
+template <typename THaystack, typename TIndex, typename TSpec, typename TSize>
+inline bool 
+windowFindNext(
+	Finder<THaystack, Swift<TSpec> > &finder,
+	Pattern<TIndex, Swift<TSpec> > &pattern, 
+	TSize finderWindowLength
+	)
+{
+	SEQAN_CHECKPOINT
+	
+	typedef typename Fibre<TIndex, QGramShape>::Type	TShape;
+	typedef	typename Value<TShape>::Type				THashValue;
+	
+	typedef Finder<THaystack, Swift<TSpec> >			TFinder;
+	typedef typename TFinder::THstkPos					THstkPos;
+    
+	// all previous matches reported -> search new ones
+	clear(finder.hits);
+    
+	THstkPos windowEnd = finder.curPos + finderWindowLength;
+
+	// iterate over all non-repeat regions within the window
+	for (; finder.curPos < windowEnd; )
+	{
+        THstkPos nonRepeatEnd = finder.endPos - length(pattern.shape) + 1;
+		THstkPos localEnd = _min(windowEnd, nonRepeatEnd);
+        
+		// filter a non-repeat region within the window
+        if (finder.curPos < localEnd)
+        {
+            TShape &shape = pattern.shape;
+            _swiftMultiProcessQGram(finder, pattern, hash(shape, hostIterator(hostIterator(finder))));
+            
+            for (++finder.curPos, ++finder; finder.curPos < localEnd; ++finder.curPos, ++finder){
+                _swiftMultiProcessQGram(finder, pattern, hashNext(shape, hostIterator(hostIterator(finder))));			
+            }
+        }
+            
+		if (pattern.params.printDots) _printDots(finder);
+
+		if (finder.curPos >= nonRepeatEnd)
+			if (!_nextNonRepeatRange(finder, pattern))
+                return false;
+	}
+	return true;
+}
+
+/**
+.Function.windowFindEnd:
+..cat:Searching
+..summary:Flushes the pattern. Used together with @Function.windowFindBegin@ and @Function.windowFindNext at .
+..signature:windowFindNext(finder, pattern)
+..param.finder:A SWIFT finder.
+..param.pattern: A SWIFT pattern.
+..see:Function.windowFindBegin
+..include:seqan/index.h
+*/
+template <typename THaystack, typename TIndex, typename TSpec>
+inline void 
+windowFindEnd(
+	Finder<THaystack, Swift<TSpec> > & finder,
+	Pattern<TIndex, Swift<TSpec> > &pattern)
+{
+	SEQAN_CHECKPOINT
+	
+	_swiftMultiFlushBuckets(finder, pattern);
+}
+
+
+/**
+.Function.getSwiftHits:
+..cat:Searching
+..summary:Gets the string of hits from the finder
+..signature:getSwiftHits(finder)
+..param.finder:A SWIFT finder.
+..returns:@Class.String@ of Hits (use Finder<...>::THitString as Type).
+..include:seqan/index.h
+*/
+template <typename THaystack, typename TSpec>
+inline typename Finder<THaystack, Swift<TSpec> >::THitString &
+getSwiftHits(Finder<THaystack, Swift<TSpec> > &finder)
+{
+	SEQAN_CHECKPOINT
+	
+	return finder.hits;
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_FIND_SHIFTAND_H
diff --git a/src/SeqAn-1.3/seqan/index/index_base.h b/src/SeqAn-1.3/seqan/index/index_base.h
new file mode 100644
index 0000000..d05e950
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_base.h
@@ -0,0 +1,1181 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_BASE_H
+#define SEQAN_HEADER_INDEX_BASE_H
+
+//#define SEQAN_TEST_INDEX
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// needful forward declarations
+
+	// suffix array construction specs
+	struct Skew3;
+	struct Skew7;
+	struct LarssonSadakane;
+	struct ManberMyers;
+	struct SAQSort;
+	struct QGramAlg;
+
+	// lcp table construction algorithms
+	struct Kasai;
+	struct KasaiOriginal;	// original, but more space-consuming algorithm
+
+	// enhanced suffix array construction algorithms
+	struct Childtab;
+	struct Bwt;
+
+/**
+.Tag.Index Find Algorithm
+..summary:Tag to specify the index search algorithm.
+..remarks:These tag can be used to specify the @Function.find@ algorithm 
+for @Class.Index@ based substring searches.
+..cat:Index
+
+..tag.EsaFindMlr:Binary search with mlr-heuristic.
+...remarks:Exact string matching using a suffix array binary search with the mlr-heuristic.
+
+..tag.EsaFindLcpe:Binary search using lcp values.
+...remarks:Exact string matching using a suffix array binary search and a lcp-interval tree.
+
+..tag.FinderSTree:Suffix tree search.
+...remarks:Exact string matching using a suffix tree.
+
+..see:Class.Finder
+..see:Spec.IndexEsa
+..see:Spec.IndexQGram
+..include:seqan/index.h
+*/
+
+	// finder tags
+    struct FinderMlr_;     // simple Suffix Array finder with mlr-heuristic
+    struct FinderLcpe_;    // Suffix Array finder using an enhanced LCP-Table
+    struct FinderSTree_;    // Suffix Array finder using an enhanced LCP-Table
+
+    typedef Tag<FinderMlr_> const EsaFindMlr;
+    typedef Tag<FinderLcpe_> const EsaFindLcpe;
+    typedef Tag<FinderSTree_> const FinderSTree;
+
+	template <typename TSpec = void>
+	struct IndexEsa {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Metafunction.DefaultIndexSpec:
+..cat:Index
+..summary:Default @Class.Index@ specialization type.
+..signature:DefaultIndexSpec<TText>::Type
+..param.TText:The given text type.
+..returns:Can be @Spec.IndexEsa@ or $IndexQGram$, etc.
+..remarks:Currently @Spec.IndexEsa@ is default if $TText$ is a @Class.String at .
+..include:seqan/index.h
+*/
+    template < typename TObject >
+    struct DefaultIndexSpec {
+        typedef IndexEsa<> Type;
+    };
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Metafunction.DefaultIndexStringSpec:
+..cat:Index
+..summary:Default @Class.String@ specialization type of the @Metafunction.Fibre@ of an @Class.Index at . 
+..signature:DefaultIndexStringSpec<TIndex>::Type
+..param.TIndex:An @Class.Index@ Type.
+..returns:If the underlying text is a @Class.String@ or a set of Strings (see @Class.StringSet@) the String's spec. type is returned.
+..remarks:Most of the @Class.Index@ fibres are strings. The @Class.String@ specialization type is chosen by this meta-function.
+..include:seqan/index.h
+*/
+    template < typename TIndex >
+    struct DefaultIndexStringSpec {
+        typedef Alloc<> Type;
+    };
+
+    template < typename TValue, typename TSpec >
+    struct DefaultIndexStringSpec< String<TValue, External<TSpec> > > {
+        typedef External<TSpec> Type;
+    };
+
+	template < typename TString, typename TSpec >
+	struct DefaultIndexStringSpec< StringSet<TString, TSpec> >:
+		DefaultIndexStringSpec<TString> {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Class.Index:
+..summary:Contains preprocessing data of a fixed text. Allows fast dictionary look-up and advanced computations.
+..cat:Index
+..signature:Index<TText[, TSpec]>
+..param.TText:The text type.
+...type:Class.String
+...type:Class.StringSet
+...metafunction:Metafunction.Host
+..param.TSpec:The index type.
+...default:The result of @Metafunction.DefaultIndexSpec@
+...metafunction:Metafunction.Spec
+..remarks:An index contains various arrays or objects, also called fibres (see @Metafunction.Fibre@).
+..remarks:These fibres are created on demand depending on the requirements of an algorithm.
+..include:seqan/index.h
+*/
+
+///.Function.setHaystack.param.haystack.type:Class.Index
+
+	// index as a haystack
+	template < 
+        typename TObject, 
+        typename TSpec = typename DefaultIndexSpec<TObject>::Type > 
+	class Index;
+
+	template <typename TObject, typename TSpec>
+	struct Host< Index<TObject, TSpec> > {
+		typedef TObject Type;
+	};
+
+	template <typename TObject, typename TSpec>
+	struct Spec< Index<TObject, TSpec> > {
+		typedef TSpec Type;
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Metafunction.Fibre:
+..summary:Type of a specific index member (fibre).
+..signature:Fibre<TIndex, TSpec>::Type
+..cat:Index
+..param.TIndex:The index type.
+...type:Class.Index
+..param.TSpec:Tag to specify the fibre.
+..returns:Fibre type.
+..remarks:An @Class.Index@ can be seen as a bundle consisting of various fibres. In most cases this type is $String<Size<TIndex>::Type>$.
+The fibre interface was designed to unify the access to the members of different index data structures.
+To get a reference or the type of a specific fibre use @Function.getFibre@ or @Metafunction.Fibre at .		
+..remarks:A @Metafunction.Fibre@ need not to be a real container. It can also be view (see @Tag.ESA Index Fibres.EsaRawText@).
+..include:seqan/index.h
+*/
+	// meta function to get the type of a bundle fibre
+	template < typename TIndex, typename TSpec >
+	struct Fibre {
+		typedef String< typename Size<TIndex>::Type > Type;
+	};
+
+	template < typename TIndex, typename TSpec >
+	struct Fibre<TIndex const, TSpec> {
+		typedef typename Fibre<TIndex, TSpec>::Type const Type;
+	};
+
+	struct FibreRecord {
+		unsigned	id;
+		void*		ptr;
+		bool		owner;
+	};
+
+	// less function to search in sorted list for fibre id
+	struct FibreLess: public ::std::binary_function<FibreRecord, unsigned, bool>
+	{	// functor for operator>
+		inline bool operator()(FibreRecord const & _Left, unsigned const Right_) const
+		{	// apply operator> to operands
+			return (_Left.id < Right_);
+		}
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Metafunction.DefaultIndexCreator:
+..cat:Index
+..summary:Default algorithm to create a demanded and not yet existing @Metafunction.Fibre at .
+..signature:DefaultIndexCreator<TIndex, TFibre>::Type
+..param.TIndex:An @Class.Index@ Type.
+..param.TFibre:A tag specifying the fibre (e.g. @Tag.ESA Index Fibres.EsaSA@).
+..returns:A tag specifying the default algorithm to create the fibre with.
+..include:seqan/index.h
+*/
+    // standard algorithm for indices creation
+    template < typename TIndex, typename TFibre >
+	struct DefaultIndexCreator {
+		typedef Default Type;
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template < 
+		typename TSA,
+		typename TText,
+        typename TAlgSpec >
+    struct SACreatorRandomAccess_
+    {
+        typedef typename AllowsFastRandomAccess<TSA>::Type   TRandomSA;
+        typedef typename AllowsFastRandomAccess<TText>::Type TRandomText;
+        typedef typename And<TRandomText,TRandomSA>::Type Type;
+    };
+
+	template < 
+        typename TLCP,
+		typename TText,
+		typename TSA,
+        typename TAlgSpec >
+    struct LcpCreatorRandomAccess_
+    {
+        typedef typename AllowsFastRandomAccess<TText>::Type TRandomText;
+        typedef typename AllowsFastRandomAccess<TLCP>::Type  TRandomLCP;
+        typedef typename AllowsFastRandomAccess<TSA>::Type   TRandomSA;
+        typedef typename And<TRandomLCP, typename And<TRandomText,TRandomSA>::Type>::Type Type;
+    };
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+	.Class.Bundle:
+	..summary:General purpose container of various members.
+	..signature:Bundle<TValue, TSize>
+	..param.TValue:The value type, that is the type of the items/characters stored in the string.
+	...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+	..param.TSpec:The specializing type.
+	...default:$Alloc<>$, see @Spec.Alloc String at .
+*/
+/*
+	template < typename TSpec = void >
+	struct Bundle {
+		typedef ::std::vector<FibreRecord>	TFibreRecords;
+		TFibreRecords						fibres;
+	};
+
+	template < typename TBundleSpec, typename TFibreSpec >
+	inline FibreRecord& getRecord(Bundle<TBundleSpec> &bundle, TFibreSpec const) {
+		unsigned id = (unsigned)ClassIdentifier_<TFibreSpec>::getID();
+
+		typename Bundle<TBundleSpec>::TFibreRecords::iterator first = lower_bound(bundle.fibres.begin(), bundle.fibres.end(), id, FibreLess());
+		if (!first->id != id) {
+			FibreRecord rec;
+			rec.id = id;
+			rec.ptr = NULL;
+			rec.owner = true;
+			bundle.fibres.insert(first, rec);
+		} else
+			return *first;
+	}
+
+	template < typename TBundleSpec, typename TFibreSpec >
+	inline typename Fibre<Bundle<TBundleSpec>, TFibreSpec>::Type & getFibre(Bundle<TBundleSpec> &bundle, TFibreSpec const) {
+		typedef typename Fibre<Bundle<TBundleSpec>, TFibreSpec>::Type Type;
+		unsigned id = (unsigned)ClassIdentifier_<TFibreSpec>::getID();
+
+		FibreRecord &rec = getRecord(bundle, TFibreSpec());
+		if (!rec.ptr)
+			rec.ptr = new Type();
+		return *reinterpret_cast<Type*>(rec.ptr);
+	}
+
+	template < typename TBundleSpec, typename TFibreSpec >
+	inline typename Fibre<Bundle<TBundleSpec>, TFibreSpec>::Type const & getFibre(Bundle<TBundleSpec> const &bundle, TFibreSpec const) {
+		typedef typename Fibre<Bundle<TBundleSpec>, TFibreSpec>::Type Type;
+		unsigned id = (unsigned)ClassIdentifier_<TFibreSpec>::getID();
+
+		FibreRecord &rec = getRecord(bundle, TFibreSpec());
+		return *reinterpret_cast<Type*>(rec.ptr);
+	}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// various fibre specs for enhanced suffix arrays
+
+	struct FibreText_;		// Original text. Can be a String or a StringSet
+	struct FibreRawText_;	// Concatenation of the strings above
+	struct FibreSA_;		// suffix array (of raw text with virtual $-delimiters) with Pair entries
+	struct FibreRawSA_;	// suffix array with integer entries
+	struct FibreSae_;		// suffix array reordered in a b-tree
+	struct FibreLcp_;		// lcp table of raw text
+	struct FibreLcpe_;		// lcp interval tree
+	struct FibreChildtab_;	// childtab (Kurtz et al.) of raw text
+	struct FibreBwt_;		// burrows wheeler table of raw text
+
+	typedef Tag<FibreText_> const		FibreText;
+	typedef Tag<FibreRawText_> const	FibreRawText;
+	typedef Tag<FibreSA_> const		FibreSA;
+	typedef Tag<FibreRawSA_> const		FibreRawSA;
+	typedef Tag<FibreSae_> const		FibreSae;
+	typedef Tag<FibreLcp_> const		FibreLcp;
+	typedef Tag<FibreLcpe_> const		FibreLcpe;
+	typedef Tag<FibreChildtab_> const	FibreChildtab;
+	typedef Tag<FibreBwt_> const		FibreBwt;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.SAValue:
+..cat:Index
+..summary:The default alphabet type of a suffix array, i.e. the type to store a position of a string or string set.
+..signature:SAValue<TObject>::Type
+..param.TObject:A string, string set, or index type.
+...type:Class.String
+...type:Class.StringSet
+...type:Class.Index
+..returns:A type to store a position. 
+...text:If $TObject$ is a @Class.String@, it is a single integer value. By default this is the @Metafunction.Size@ type of $TObject$.
+...text:If $TObject$ is a @Class.StringSet@, it could be a single integer too (called global position, see @Spec.ConcatDirect@) or a @Class.Pair@ (called local position, see @Spec.Owner@).
+Currently SeqAn defaults to a local position for @Class.StringSet@ classes (index_base.h):
+...code:template < typename TString, typename TSpec >
+struct SAValue< StringSet<TString, TSpec> > {
+	typedef Pair<
+		typename Size< StringSet<TString, TSpec> >::Type,
+		typename SAValue<TString>::Type,
+		Compressed
+	> Type;
+};
+..remarks.note:SAValue is the return type of various function, e.g. @Function.position@ for the @Class.Index@ @Class.Finder@ class, @Function.getOccurrence@, @Function.getOccurrences@ etc.
+You should always use the type of this meta-function to store the return values.
+If you want to write algorithms for both variants (local and global positions) you 
+should use the functions @Function.posLocalize@, @Function.posGlobalize@, @Function.getSeqNo@ and @Function.getSeqOffset at .
+..remarks.note:If $TObject$ is an @Class.Index@, @Metafunction.Position@ returns the same value as $SAValue$. You can change the position type of an index by overloading $SAValue$, not @Metafunction.Position at .
+..include:seqan/index.h
+*/
+	template <typename TObject>
+	struct SAValue:
+		Size<TObject> {};
+	
+	template <typename TObject>
+	struct SAValue<TObject const>:
+		SAValue<TObject> {};
+	
+	// to speed up sequence number computation
+	// we use a pair of seqNo and localPosition
+	template < typename TString, typename TSpec >
+	struct SAValue< StringSet<TString, TSpec> > {
+		typedef Pair<
+			typename Size< StringSet<TString, TSpec> >::Type,
+			typename SAValue<TString>::Type,
+			Compressed
+		> Type;
+	};
+
+/*
+	template < typename TString, typename TSpec >
+	struct SAValue< StringSet<TString, TSpec> > {
+		typedef Pair<
+			typename Size< StringSet<TString, TSpec> >::Type,
+			typename SAValue<TString>::Type,
+			BitCompressed<2,30>						// max. 4 sequences 
+		> Type;										// max. 2^30 characters each
+	};
+*/
+	template < typename TText, typename TSpec >
+	struct SAValue< Index<TText, TSpec> >:
+		SAValue<TText> {};
+
+	template < typename TObject, typename TSpec >
+	struct DefaultIndexStringSpec< Index<TObject, TSpec> >:
+		DefaultIndexStringSpec<TObject> {};
+
+//////////////////////////////////////////////////////////////////////////////
+// value and size type of an index
+
+	template < typename TText, typename TSpec >
+    struct Value< Index<TText, TSpec> > {
+		typedef typename Value<
+			typename Fibre< Index<TText, TSpec>, FibreRawText>::Type 
+		>::Type Type;
+    };
+
+	template < typename TText, typename TSpec >
+    struct Size< Index<TText, TSpec> > {
+		typedef typename Size<
+			typename Fibre< Index<TText, TSpec>, FibreRawText>::Type 
+		>::Type Type;
+    };
+
+	template < typename TText, typename TSpec >
+	struct Position< Index<TText, TSpec> >:
+		SAValue< Index<TText, TSpec> > {};
+
+//////////////////////////////////////////////////////////////////////////////
+// infix of an index
+
+	template < typename TText, typename TSpec >
+    struct Infix< Index<TText, TSpec> >:
+		public Infix<TText> {};
+
+	template < typename TText, typename TSpec >
+    struct Infix< Index<TText, TSpec> const >:
+		public Infix<TText> {};
+
+//////////////////////////////////////////////////////////////////////////////
+// default table type
+
+	template < typename TObject, typename TSpec, typename TFibre >
+	struct Fibre< Index<TObject, TSpec>, Tag<TFibre> const > {
+		typedef String< 
+			typename Size< Index<TObject, TSpec> >::Type,
+			typename DefaultIndexStringSpec< Index<TObject, TSpec> >::Type 
+		> Type;
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+// original text
+
+	template < typename TText, typename TSpec >
+	struct Fibre< Index<TText, TSpec>, FibreText> {
+		typedef TText Type;
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+// concatenated text
+
+	template < typename TText, typename TSpec >
+	struct Fibre< Index<TText, TSpec>, FibreRawText> {
+		typedef typename Concatenator<TText>::Type Type;
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+// suffix array type
+
+	template < typename TText, typename TSpec >
+	struct Fibre< Index<TText, TSpec>, FibreSA> {
+		typedef String<
+			typename SAValue< Index<TText, TSpec> >::Type,
+			typename DefaultIndexStringSpec< Index<TText, TSpec> >::Type 
+		> Type;
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+// globalize functor
+
+	template <typename InType, typename TLimitsString, typename Result = typename Value<TLimitsString>::Type>
+	struct FunctorGlobalize : public ::std::unary_function<InType,Result>
+	{
+		TLimitsString const *limits;
+		FunctorGlobalize() {}
+		FunctorGlobalize(TLimitsString const &_limits) : limits(&_limits) {}
+
+		inline Result operator()(InType const &x) const
+		{
+			return posGlobalize(x, *limits);
+		}
+    };
+
+	template <typename InType, typename Result>
+	struct FunctorGlobalize<InType, Nothing, Result> : public ::std::unary_function<InType,InType>
+	{
+		FunctorGlobalize() {}
+		FunctorGlobalize(Nothing const &) {}
+
+        inline InType operator()(InType const &x) const
+        {
+			return x;
+		}
+    };
+
+//////////////////////////////////////////////////////////////////////////////
+// raw suffix array contains integer offsets relative to raw text
+/*
+	template < typename TString, typename TSpec >
+	struct Fibre< Index<TString, TSpec>, FibreRawSA>:
+		public Fibre< Index<TString, TSpec> const, FibreSA> {};
+
+	template < typename TString, typename TSSetSpec, typename TSpec >
+	struct Fibre< Index<StringSet<TString, TSSetSpec>, TSpec>, FibreRawSA> 
+	{
+		typedef Index< StringSet<TString, TSSetSpec>, TSpec> TIndex;
+		typedef ModifiedString<
+			typename Fibre<TIndex, FibreSA>::Type,
+			ModView< FunctorGlobalize< 
+				typename Value< typename Fibre<TIndex, FibreSA>::Type >::Type,
+				typename StringSetLimits<TString>::Type >
+			>
+		> Type;
+	};
+*/
+	template < typename TText, typename TSpec >
+	struct Fibre< Index<TText, TSpec>, FibreRawSA> 
+	{
+		typedef Index<TText, TSpec> TIndex;
+		typedef ModifiedString<
+			typename Fibre<TIndex, FibreSA>::Type,
+			ModView< FunctorGlobalize< 
+				typename Value< typename Fibre<TIndex, FibreSA>::Type >::Type,
+				typename StringSetLimits<TText>::Type >
+			>
+		> Type;
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+// default burrows-wheeler table
+
+	template < typename TText, typename TSpec >
+	struct Fibre< Index<TText, TSpec>, FibreBwt> {
+		typedef String <
+			typename Value< Index<TText, TSpec> >::Type,
+			typename DefaultIndexStringSpec< Index<TText, TSpec> >::Type
+		> Type;
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// default fibre creators
+
+	template < typename TText, typename TSpec >
+	struct DefaultIndexCreator<Index<TText, TSpec>, FibreSA> {
+        typedef Skew7 Type;							// standard suffix array creator is skew7
+    };
+
+	template < typename TText, typename TSpec >
+	struct DefaultIndexCreator<Index<TText, TSpec>, FibreLcp> {
+        typedef Kasai Type;
+    };
+
+	template < typename TText, typename TSpec >
+	struct DefaultIndexCreator<Index<TText, TSpec>, FibreBwt> {
+        typedef Bwt Type;
+    };
+
+	template < typename TText, typename TSpec >
+	struct DefaultIndexCreator<Index<TText, TSpec>, FibreChildtab> {
+        typedef Childtab Type;
+    };
+
+
+//////////////////////////////////////////////////////////////////////////////
+// fibre interface to access the enhanced suffix array tables
+
+/**
+.Function.getFibre:
+..summary:Returns a specific @Metafunction.Fibre@ of an @Class.Index@ object.
+..cat:Index
+..signature:getFibre(index, fibre_tag)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Class.Index
+..param.fibre_tag:A tag that identifies the @Metafunction.Fibre@ (e.g. @Tag.ESA Index Fibres.EsaSA@).
+..returns:A reference to the @Metafunction.Fibre@ object.
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline Holder<TText> & _dataHost(Index<TText, TSpec> &index) {
+		return index.text;
+	}
+	template <typename TText, typename TSpec>
+	inline Holder<TText> const & _dataHost(Index<TText, TSpec> const &index) {
+		return index.text;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreText>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreText) {
+		return value(index.text);
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreText>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreText) {
+		return value(index.text);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreRawText>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreRawText) {
+		return concat(value(index.text));
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreRawText>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreRawText) {
+		return concat(value(index.text));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreSA>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreSA) {
+		return index.sa;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreSA>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreSA) {
+		return index.sa;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreRawSA>::Type const & 
+	getFibre(Index<TText, TSpec> &index, FibreRawSA) {
+		return indexSA(index);
+	}
+
+	template <typename TString, typename TSSetSpec, typename TSpec>
+	inline typename Fibre<Index<StringSet<TString, TSSetSpec>, TSpec>, FibreRawSA>::Type
+	getFibre(Index<StringSet<TString, TSSetSpec>, TSpec> &index, FibreRawSA) 
+	{
+		typedef Index< StringSet<TString, TSSetSpec>, TSpec> TIndex;
+		
+		typedef FunctorGlobalize<
+			typename Value< typename Fibre<TIndex, FibreSA>::Type >::Type,
+			typename StringSetLimits<StringSet<TString, TSSetSpec> >::Type
+		> TFunctor;
+		
+		typedef ModifiedString<
+			typename Fibre<Index<StringSet<TString, TSSetSpec>, TSpec>, FibreSA>::Type,
+			ModView< TFunctor >
+		> ModString;
+
+		return ModString(indexSA(index), TFunctor(stringSetLimits(indexText(index))));
+	}
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreRawSA>::Type
+	getFibre(Index<TText, TSpec> &index, FibreRawSA) 
+	{
+		typedef Index<TText, TSpec> TIndex;
+		
+		typedef FunctorGlobalize<
+			typename Value< typename Fibre<TIndex, FibreSA>::Type >::Type,
+			typename StringSetLimits<TText>::Type
+		> TFunctor;
+		
+		typedef ModifiedString<
+			typename Fibre<Index<TText, TSpec>, FibreSA>::Type,
+			ModView< TFunctor >
+		> ModString;
+
+		return ModString(indexSA(index), TFunctor(stringSetLimits(indexText(index))));
+	}
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreLcp>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreLcp) {
+		return index.lcp;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreLcp>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreLcp) {
+		return index.lcp;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreLcpe>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreLcpe) {
+		return index.lcpe;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreLcpe>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreLcpe) {
+		return index.lcpe;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreChildtab>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreChildtab) {
+		return index.childtab;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreChildtab>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreChildtab) {
+		return index.childtab;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreBwt>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreBwt) {
+		return index.bwt;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreBwt>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreBwt) {
+		return index.bwt;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.length.param.object.type:Class.Index
+
+	template <typename TText, typename TSpec>
+	inline typename Size<Index<TText, TSpec> >::Type 
+	length(Index<TText, TSpec> const &index) {
+		return length(indexRawText(index));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename Size<TText>::Type 
+	countSequences(Index<TText, TSpec> const &index) {
+		return countSequences(indexText(index));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	struct GetSequenceByNo< Index<TText, TSpec> >
+	{
+		typedef typename GetSequenceByNo<TText>::Type Type;
+	};
+
+	template <typename TText, typename TSpec>
+	struct GetSequenceByNo< Index<TText, TSpec> const>
+	{
+		typedef typename GetSequenceByNo<TText const>::Type Type;
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TSeqNo, typename TText, typename TSpec>
+	inline typename GetSequenceByNo< Index<TText, TSpec> >::Type
+	getSequenceByNo(TSeqNo seqNo, Index<TText, TSpec> &index)
+	{
+		return getSequenceByNo(seqNo, indexText(index));
+	}
+
+	template <typename TSeqNo, typename TText, typename TSpec>
+	inline typename GetSequenceByNo< Index<TText, TSpec> const>::Type
+	getSequenceByNo(TSeqNo seqNo, Index<TText, TSpec> const &index)
+	{
+		return getSequenceByNo(seqNo, indexText(index));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TSeqNo, typename TText, typename TSpec>
+	inline typename Size<Index<TText, TSpec> >::Type 
+	sequenceLength(TSeqNo seqNo, Index<TText, TSpec> const &index) {
+		return sequenceLength(seqNo, indexText(index));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TPos, typename TText, typename TSpec>
+	inline typename Size<Index<TText, TSpec> >::Type 
+	suffixLength(TPos pos, Index<TText, TSpec> const &index) {
+		return sequenceLength(getSeqNo(pos, stringSetLimits(index)), index) - getSeqOffset(pos, stringSetLimits(index));
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.textAt:
+..summary:Shortcut for $value(indexText(..), ..)$.
+..cat:Index
+..signature:textAt(position, index)
+..param.position:A position in the array on which the value should be accessed.
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference or proxy to the value.
+..include:seqan/index.h
+*/
+
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex, FibreRawText>::Type>::Type 
+	textAt(TPos i, TIndex &index) {
+		return value(getFibre(index, FibreRawText()), i);
+	}
+	template <typename TPos, typename TString, typename TSSetSpec, typename TSpec>
+	inline typename Reference<typename Fibre< Index< StringSet<TString, TSSetSpec>, TSpec>, FibreRawText>::Type>::Type 
+	textAt(TPos i, Index< StringSet<TString, TSSetSpec>, TSpec> &index) {
+		return value(getFibre(index, FibreRawText()), posGlobalize(i, stringSetLimits(index)));
+	}
+	template <typename TPos, typename TString, typename TSpec>
+	inline typename Reference<typename Fibre< Index< StringSet<TString, Owner<Default> >, TSpec>, FibreRawText>::Type>::Type 
+	textAt(TPos i, Index< StringSet<TString, Owner<Default> >, TSpec> &index) {
+		Pair <
+			typename Size< StringSet<TString, Owner<Default> > >::Type,
+			typename Size< TString >::Type > locPos;
+		posLocalize(locPos, i, stringSetLimits(index));
+		return value(value(getFibre(index, FibreText()), getValueI1(locPos)), getValueI2(locPos));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// infix
+
+	template <typename TText, typename TSpec, typename TPosBegin, typename TPosEnd>
+	inline typename Infix<TText>::Type
+	infix(Index<TText, TSpec> &index, TPosBegin pos_begin, TPosEnd pos_end)
+	{
+		return infix(indexText(index), pos_begin, pos_end);
+	}
+
+	template <typename TText, typename TSpec, typename TPosBegin, typename TPosEnd>
+	inline typename Infix<TText>::Type
+	infix(Index<TText, TSpec> const &index, TPosBegin pos_begin, TPosEnd pos_end)
+	{
+		return infix(indexText(index), pos_begin, pos_end);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.rawtextAt:
+..summary:Shortcut for $value(indexRawText(..), ..)$.
+..cat:Index
+..signature:rawtextAt(position, index)
+..param.position:A position in the array on which the value should be accessed.
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference or proxy to the value.
+..include:seqan/index.h
+*/
+
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex, FibreRawText>::Type>::Type rawtextAt(TPos i, TIndex &index) {
+		return value(getFibre(index, FibreRawText()), i);
+	}
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex const, FibreRawText>::Type>::Type rawtextAt(TPos i, TIndex const &index) {
+		return value(getFibre(index, FibreRawText()), i);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.saAt:
+..summary:Shortcut for $value(indexSA(..), ..)$.
+..cat:Index
+..signature:saAt(position, index)
+..param.position:A position in the array on which the value should be accessed.
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference or proxy to the value.
+..include:seqan/index.h
+*/
+
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex, FibreSA>::Type>::Type saAt(TPos i, TIndex &index) {
+		return value(getFibre(index, FibreSA()), i);
+	}
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex const, FibreSA>::Type>::Type saAt(TPos i, TIndex const &index) {
+		return value(getFibre(index, FibreSA()), i);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.rawsaAt:
+..summary:Shortcut for $value(indexRawSA(..), ..)$.
+..cat:Index
+..signature:saAt(position, index)
+..param.position:A position in the array on which the value should be accessed.
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference or proxy to the value.
+..include:seqan/index.h
+*/
+
+	template <typename TPos, typename TIndex>
+	inline typename Value<typename Fibre<TIndex const, FibreRawSA>::Type>::Type rawsaAt(TPos i, TIndex const &index) {
+		return posGlobalize(saAt(i, index), stringSetLimits(indexText(index)));
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.lcpAt:
+..summary:Shortcut for $value(indexLcp(..), ..)$.
+..cat:Index
+..signature:lcpAt(position, index)
+..param.position:A position in the array on which the value should be accessed.
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference or proxy to the value.
+..include:seqan/index.h
+*/
+
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex, FibreLcp>::Type>::Type lcpAt(TPos i, TIndex &index) {
+		return value(getFibre(index, FibreLcp()), i);
+	}
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex const, FibreLcp>::Type>::Type lcpAt(TPos i, TIndex const &index) {
+		return value(getFibre(index, FibreLcp()), i);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.lcpeAt:
+..summary:Shortcut for $value(indexLcpe(..), ..)$.
+..cat:Index
+..signature:lcpeAt(position, index)
+..param.position:A position in the array on which the value should be accessed.
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference or proxy to the value.
+..include:seqan/index.h
+*/
+
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex, FibreLcpe>::Type>::Type lcpeAt(TPos i, TIndex &index) {
+		return value(getFibre(index, FibreLcpe()), i);
+	}
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex const, FibreLcpe>::Type>::Type lcpeAt(TPos i, TIndex const &index) {
+		return value(getFibre(index, FibreLcpe()), i);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.childAt:
+..summary:Shortcut for $value(indexChildtab(..), ..)$.
+..cat:Index
+..signature:childAt(position, index)
+..param.position:A position in the array on which the value should be accessed.
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference or proxy to the value.
+..include:seqan/index.h
+*/
+
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex, FibreChildtab>::Type>::Type childAt(TPos i, TIndex &index) {
+		return value(getFibre(index, FibreChildtab()), i);
+	}
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex const, FibreChildtab>::Type>::Type childAt(TPos i, TIndex const &index) {
+		return value(getFibre(index, FibreChildtab()), i);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.bwtAt:
+..summary:Shortcut for $value(indexBwt(..), ..)$.
+..cat:Index
+..signature:bwtAt(position, index)
+..param.position:A position in the array on which the value should be accessed.
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference or proxy to the value.
+..include:seqan/index.h
+*/
+
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex, FibreBwt>::Type>::Type bwtAt(TPos i, TIndex &index) {
+		return value(getFibre(index, FibreBwt()), i);
+	}
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex const, FibreBwt>::Type>::Type bwtAt(TPos i, TIndex const &index) {
+		return value(getFibre(index, FibreBwt()), i);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// interface for infinity/invalid values
+
+	template <typename TValue>
+	inline void _setSizeInval(TValue &v) {
+		v = MaxValue<TValue>::VALUE;
+	}
+
+	template <typename TValue>
+	inline bool _isSizeInval(TValue const &v) {
+		return v == MaxValue<TValue>::VALUE;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexText:
+..summary:Shortcut for $getFibre(.., EsaText)$.
+..cat:Index
+..signature:indexText(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference to the @Tag.ESA Index Fibres.EsaText@ fibre (original text).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreText>::Type & indexText(Index<TText, TSpec> &index) { return getFibre(index, FibreText()); }
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreText>::Type & indexText(Index<TText, TSpec> const &index) { return getFibre(index, FibreText()); }
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename StringSetLimits<TText const>::Type
+	stringSetLimits(Index<TText, TSpec> &) { 
+		return Nothing(); 
+	}
+
+	template <typename TText, typename TSpec>
+	inline typename StringSetLimits<TText const>::Type
+	stringSetLimits(Index<TText, TSpec> const &) { 
+		return Nothing(); 
+	}
+
+	template <typename TString, typename TSSetSpec, typename TSpec>
+	inline typename StringSetLimits< StringSet<TString, TSSetSpec> const >::Type & 
+	stringSetLimits(Index<StringSet<TString, TSSetSpec>, TSpec> &index) {
+		return stringSetLimits(indexText(index)); 
+	}
+
+	template <typename TString, typename TSSetSpec, typename TSpec>
+	inline typename StringSetLimits< StringSet<TString, TSSetSpec> const >::Type & 
+	stringSetLimits(Index<StringSet<TString, TSSetSpec>, TSpec> const &index) {
+		return stringSetLimits(indexText(index)); 
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexRawText:
+..summary:Shortcut for $getFibre(.., EsaRawText)$.
+..cat:Index
+..signature:indexRawText(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference to the @Tag.ESA Index Fibres.EsaRawText@ fibre (concatenated input text).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreRawText>::Type & indexRawText(Index<TText, TSpec> &index) { return getFibre(index, FibreRawText()); }
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreRawText>::Type & indexRawText(Index<TText, TSpec> const &index) { return getFibre(index, FibreRawText()); }
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexSA:
+..summary:Shortcut for $getFibre(.., EsaSA)$.
+..cat:Index
+..signature:indexSA(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference to the @Tag.ESA Index Fibres.EsaSA@ fibre (suffix array).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreSA>::Type & indexSA(Index<TText, TSpec> &index) { return getFibre(index, FibreSA()); }
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreSA>::Type & indexSA(Index<TText, TSpec> const &index) { return getFibre(index, FibreSA()); }
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexRawSA:
+..summary:Shortcut for $getFibre(.., EsaRawSA)$.
+..cat:Index
+..signature:indexRawSA(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference to the @Tag.ESA Index Fibres.EsaRawSA@ fibre (suffix array).
+..include:seqan/index.h
+*/
+/*
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreRawSA>::Type const & indexRawSA(Index<TText, TSpec> &index) { return getFibre(index, FibreRawSA()); }
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreRawSA>::Type const & indexRawSA(Index<TText, TSpec> const &index) { return getFibre(index, FibreRawSA()); }
+*/
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreRawSA>::Type indexRawSA(Index<TText, TSpec> &index) { return getFibre(index, FibreRawSA()); }
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreRawSA>::Type indexRawSA(Index<TText, TSpec> const &index) { return getFibre(index, FibreRawSA()); }
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexLcp:
+..summary:Shortcut for $getFibre(.., EsaLcp)$.
+..cat:Index
+..signature:indexLcp(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference to the @Tag.ESA Index Fibres.EsaLcp@ fibre (lcp table).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreLcp>::Type & indexLcp(Index<TText, TSpec> &index) { return getFibre(index, FibreLcp()); }
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreLcp>::Type & indexLcp(Index<TText, TSpec> const &index) { return getFibre(index, FibreLcp()); }
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexLcpe:
+..summary:Shortcut for $getFibre(.., EsaLcpe)$.
+..cat:Index
+..signature:indexLcpe(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference to the @Tag.ESA Index Fibres.EsaLcpe@ fibre (enhanced lcp table).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreLcpe>::Type & indexLcpe(Index<TText, TSpec> &index) { return getFibre(index, FibreLcpe()); }
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreLcpe>::Type & indexLcpe(Index<TText, TSpec> const &index) { return getFibre(index, FibreLcpe()); }
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexBwt:
+..summary:Shortcut for $getFibre(.., EsaBwt)$.
+..cat:Index
+..signature:indexBwt(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference to the @Tag.ESA Index Fibres.EsaBwt@ fibre (Burrows-Wheeler table).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreBwt>::Type & indexBwt(Index<TText, TSpec> &index) { return getFibre(index, FibreBwt()); }
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreBwt>::Type & indexBwt(Index<TText, TSpec> const &index) { return getFibre(index, FibreBwt()); }
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexChildtab:
+..summary:Shortcut for $getFibre(.., EsaChildtab)$.
+..cat:Index
+..signature:indexChildtab(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexEsa
+..returns:A reference to the @Tag.ESA Index Fibres.EsaChildtab@ fibre (child table).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreChildtab>::Type & indexChildtab(Index<TText, TSpec> &index) { return getFibre(index, FibreChildtab()); }
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreChildtab>::Type & indexChildtab(Index<TText, TSpec> const &index) { return getFibre(index, FibreChildtab()); }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_bwt.h b/src/SeqAn-1.3/seqan/index/index_bwt.h
new file mode 100644
index 0000000..86e770e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_bwt.h
@@ -0,0 +1,313 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_BWT_H
+#define SEQAN_HEADER_INDEX_BWT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+	
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	struct Bwt {};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // external Bwt algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+
+    template < typename TTextInput, typename TSuffixArrayInput >
+    struct Value< Pipe< Bundle2< TTextInput, TSuffixArrayInput >, Bwt > > {
+        typedef typename Value<TTextInput>::Type Type;
+    };
+
+	//////////////////////////////////////////////////////////////////////////////
+    // bwt class
+    template < typename TTextInput, typename TSuffixArrayInput >
+    struct Pipe< Bundle2< TTextInput, TSuffixArrayInput >, Bwt >
+    {
+        // *** SPECIALIZATION ***
+
+        typedef Pipe< TSuffixArrayInput, Counter > TSA;
+		                                typedef typename Size<TTextInput>::Type	TSize;
+		typedef Pool< TypeOf_(TSA), MapperSpec< MapperConfigSize< filterI1<TypeOf_(TSA)>, TSize> > > TInverter;
+        typedef Pipe< TInverter, Filter< filterI2<TypeOf_(TInverter)> > > TCounterFilter;
+		typedef Pipe< TTextInput, Shifter< -1, false > > TShiftText;
+
+		typedef Pipe< Bundle2< TCounterFilter, TShiftText >, Joiner > TJoiner;
+		typedef Pool< TypeOf_(TJoiner), MapperSpec< MapperConfigSize< filterI1<TypeOf_(TJoiner)>, TSize> > > TLinearMapper;
+        typedef Pipe< TLinearMapper, Filter< filterI2<TypeOf_(TLinearMapper)> > > TFilter;
+
+        TLinearMapper		mapper;
+		TFilter				in;
+        
+        Pipe():
+            in(mapper) {}
+
+        Pipe(Bundle2< TTextInput, TSuffixArrayInput > const &_bundleIn):
+            in(mapper)
+		{
+			process(_bundleIn.in1, _bundleIn.in2);
+		}
+
+		template < typename TTextInput_, typename TSuffixArrayInput_ >
+        bool process(TTextInput_ &textIn, TSuffixArrayInput_ &suffixArrayIn) {
+
+            // *** INSTANTIATION ***
+
+			TSA							sa(suffixArrayIn);
+			TInverter					inverter;
+			TCounterFilter				filter(inverter);
+			
+            #ifdef SEQAN_DEBUG_INDEX
+				::std::cerr << "  invert suffix array" << ::std::endl;
+            #endif
+			inverter << sa;
+			SEQAN_PROMARK("Suffix-Array invertiert");
+
+			TShiftText					shifter(textIn);
+			TJoiner						joiner(bundle2(filter, shifter));
+			
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "  de-invert suffix array" << ::std::endl;
+            #endif
+			mapper << joiner;
+			SEQAN_PROMARK("Suffix-Array linearisiert");
+
+            return true;
+        }
+
+        inline typename Value<Pipe>::Type const operator*() const {
+            return *in;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }
+	};
+
+    // not sure which interface is more intuitive, we support both
+    // you can call "skew << pipe" or "skew_t skew(pipe); skew.process()"
+    // for the first we would need no _in member
+	template < typename TInput, typename TTextInput_, typename TSuffixArrayInput_ >
+    inline bool operator<<(Pipe< TInput, Bwt > &me, Bundle2< TTextInput_, TSuffixArrayInput_ > const &bundleIn) {
+ 	    return me.process(bundleIn.in1, bundleIn.in2);
+    }
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // external Bwt algorithm (optimized for multiple sequences)
+    //////////////////////////////////////////////////////////////////////////////
+
+
+    template < typename TTextInput, typename TSuffixArrayInput, typename TPair, typename TLimitsString >
+    struct Value< Pipe< Bundle2< TTextInput, TSuffixArrayInput >, Multi<Bwt, TPair, TLimitsString> > > {
+        typedef typename Value<TTextInput>::Type Type;
+    };
+
+	template <typename InType, typename TLimitsString, typename Result = typename Value<TLimitsString>::Type>
+	struct _filterGlobalizer : public ::std::unary_function<InType,Result> {
+		TLimitsString const &limits;
+		_filterGlobalizer(TLimitsString const &_limits) : limits(_limits) {}
+        inline Result operator()(const InType& x) const
+        {
+			return posGlobalize(x, limits);
+		}
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+    // bwt class
+    template < typename TTextInput, typename TSuffixArrayInput, typename TPair, typename TLimitsString >
+    struct Pipe< Bundle2< TTextInput, TSuffixArrayInput >, Multi<Bwt, TPair, TLimitsString> >
+    {
+        // *** SPECIALIZATION ***
+
+										typedef _filterGlobalizer<TypeOf_(TSuffixArrayInput), TLimitsString, TSizeOf_(TSuffixArrayInput)> filter_globalizer_t;
+		typedef Pipe< TSuffixArrayInput, Filter<filter_globalizer_t> > TGlobalizer;
+        typedef Pipe< TGlobalizer, Counter > TSA;
+		                                typedef typename Size<TTextInput>::Type	TSize;
+		typedef Pool< TypeOf_(TSA), MapperSpec< MapperConfigSize< filterI1<TypeOf_(TSA)>, TSize> > > TInverter;
+        typedef Pipe< TInverter, Filter< filterI2<TypeOf_(TInverter)> > > TCounterFilter;
+		typedef Pipe< TTextInput, Shifter< -1, false > > TShiftText;
+
+		typedef Pipe< Bundle2< TCounterFilter, TShiftText >, Joiner > TJoiner;
+		typedef Pool< TypeOf_(TJoiner), MapperSpec< MapperConfigSize< filterI1<TypeOf_(TJoiner)>, TSize> > > TLinearMapper;
+        typedef Pipe< TLinearMapper, Filter< filterI2<TypeOf_(TLinearMapper)> > > TFilter;
+
+		TTextInput			*textIn;
+		TSuffixArrayInput	*suffixArrayIn;
+        TLinearMapper		mapper;
+		TFilter				in;
+
+		TLimitsString const	&limits;
+        
+        Pipe(TLimitsString const &_limits):
+            in(mapper),
+			limits(_limits)	{}
+
+        Pipe(Bundle2< TTextInput, TSuffixArrayInput > const &_bundleIn, TLimitsString const &_limits):
+            textIn(&_bundleIn.in1),
+			suffixArrayIn(&_bundleIn.in2),
+            in(mapper),
+			limits(_limits)
+		{
+			process();
+		}
+
+        inline void process() {
+            process(*textIn, *suffixArrayIn);
+        }
+
+		template < typename TTextInput_, typename TSuffixArrayInput_ >
+        bool process(TTextInput_ &textIn, TSuffixArrayInput_ &suffixArrayIn) {
+
+            // *** INSTANTIATION ***
+
+			for(int i=0;i<length(limits);++i)
+				::std::cout << limits[i]<<"  ";
+			::std::cout<<::std::endl;
+			
+			TGlobalizer					globalizer(suffixArrayIn, limits);
+			TSA							sa(globalizer);
+			TInverter					inverter;
+			TCounterFilter				filter(inverter);
+			
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "  invert suffix array" << ::std::endl;
+            #endif
+			inverter << sa;
+			SEQAN_PROMARK("Suffix-Array invertiert");
+
+			TShiftText					shifter(textIn);
+			TJoiner						joiner(bundle2(filter, shifter));
+			
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "  de-invert suffix array" << ::std::endl;
+            #endif
+			mapper << joiner;
+			SEQAN_PROMARK("Suffix-Array linearisiert");
+
+            return true;
+        }
+
+        inline typename Value<Pipe>::Type const operator*() const {
+            return *in;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }
+	};
+
+    // not sure which interface is more intuitive, we support both
+    // you can call "bwt << pipe" or "bwt_t bwt(pipe); bwt.process()"
+    // for the first we would need no _in member
+	template < typename TInput, typename TTextInput_, typename TSuffixArrayInput_, typename TPair, typename TLimitsString >
+    inline bool operator<<(Pipe< TInput, Multi<Bwt, TPair, TLimitsString> > &me, Bundle2< TTextInput_, TSuffixArrayInput_ > const &bundleIn) {
+ 	    return me.process(bundleIn.in1, bundleIn.in2);
+    }
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // internal Bwt algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+
+    template < typename TBWT,
+               typename TText,
+               typename TSA >
+    void createBWTableInt(
+		TBWT &bwt,
+		TText const &s,
+		TSA const &SA)
+	{
+		typedef typename Value<TBWT>::Type		TValue;
+		typedef typename GetValue<TSA>::Type	TSAValue;
+		typedef typename Size<TSA>::Type		TSize;
+
+		TSize n = length(s);
+
+		for (TSize i = 0; i < n; ++i)
+		{
+			TSAValue sa = getValue(SA, i);
+			if (sa != 0)
+				bwt[i] = getValue(s, sa - 1);
+			else
+				bwt[i] = TValue();
+//				bwt[i] = getValue(s, n - 1);
+		}
+	}
+
+    template < typename TBWT,
+               typename TString,
+			   typename TSpec,
+               typename TSA >
+    void createBWTableInt(
+		TBWT &bwt,
+		StringSet<TString, TSpec> const &s,
+		TSA const &SA)
+	{
+		typedef typename Value<TBWT>::Type		TValue;
+		typedef typename GetValue<TSA>::Type	TSAValue;
+		typedef typename Size<TSA>::Type		TSize;
+
+		TSize n = length(s);
+		Pair<unsigned, typename Size<TString>::Type> loc;
+
+		for (TSize i = 0; i < n; ++i)
+		{
+			posLocalize(loc, getValue(SA, i), stringSetLimits(s));
+			if (loc.i2 != 0)
+				bwt[i] = s[loc.i1][loc.i2 - 1];
+			else
+				if (loc.i1 != 0)
+					bwt[i] = s[loc.i1 - 1][length(s[loc.i1 - 1]) - 1];
+				else
+					bwt[i] = TValue();
+//					bwt[i] = getValue(s, n - 1);
+		}
+	}
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_childtab.h b/src/SeqAn-1.3/seqan/index/index_childtab.h
new file mode 100644
index 0000000..7978f62
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_childtab.h
@@ -0,0 +1,328 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_CHILDTAB_H
+#define SEQAN_HEADER_INDEX_CHILDTAB_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	struct Childtab {};
+
+    //////////////////////////////////////////////////////////////////////////////
+    // external childtab algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+    template < typename TLCPInput >
+    struct Value< Pipe< TLCPInput, Childtab > > {
+        typedef typename Size<TLCPInput>::Type Type;
+    };
+
+
+	template < typename TLCPInput, typename TDest >
+	inline void _childtabProcess(TLCPInput &lcpIn, TDest &dest)
+	{
+		typedef typename Value<TLCPInput>::Type				TValue;
+		typedef typename Size<TLCPInput>::Type				TSize;
+
+		typedef Pair<TSize, TValue, Compressed>				TPair;		// (i, lcptab[i])
+		typedef ::std::stack<TPair> 						TStack;
+
+		TStack stack_updown;
+		TStack stack_nextl;
+
+        #ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "--- CREATE CHILD TABLE ---" << std::endl;
+            std::cerr << "Start stack-processing [pipelining]" << std::endl;
+        #endif
+
+		stack_updown.push(TPair(0, 0));
+		stack_nextl.push(TPair(0, 0));
+
+		dest.undefinedValue = TPair(MaxValue<TSize>::VALUE, 0);		// undefined value for unused entries
+		resize(dest, length(lcpIn));
+		beginRead(lcpIn);
+		beginWrite(dest);
+
+		TSize n = length(lcpIn);
+		TSize undef = n + 1;
+		TSize lastIndex_nextl;
+		TPair lastIndex_updown = TPair(undef, 0);
+
+		TValue lcp_i;
+		for(TSize i = 0; i < n; ++i) {
+			lcp_i = *lcpIn; ++lcpIn;
+
+			//////////////////////////////////////////////////////////////////////////////
+			// nextlIndex part
+			lastIndex_nextl = undef;
+			while (lcp_i < stack_nextl.top().i2)
+				stack_nextl.pop();
+
+			if (lcp_i == stack_nextl.top().i2) {
+				lastIndex_nextl = stack_nextl.top().i1;
+				push(dest, TPair(lastIndex_nextl, i + 1));					// childtab[top].nextl
+
+//				::std::cerr << "nextl:\t\t\t" << TPair(lastIndex_nextl, i + 1) << ::std::endl;
+				stack_nextl.pop();
+			}
+			stack_nextl.push(TPair(i + 1, lcp_i));
+
+
+			//////////////////////////////////////////////////////////////////////////////
+			// up/down part
+			TPair top;
+			while (lcp_i < stack_updown.top().i2) {
+				lastIndex_updown = stack_updown.top();
+				stack_updown.pop();
+				
+				top = stack_updown.top();
+				if (lcp_i <= top.i2 && top.i2 != lastIndex_updown.i2 && top.i1 != lastIndex_nextl) {
+					push(dest, TPair(top.i1, lastIndex_updown.i1));			// childtab[top].down
+
+//					::std::cerr << "down:\t\t" << TPair(top.i1, lastIndex_updown.i1) << ::std::endl;			// childtab[top].down
+				}
+			}
+			if (lastIndex_updown.i1 != undef) {
+				push(dest, TPair(i, lastIndex_updown.i1));			// childtab[top].up goes to [top - 1]
+
+//				::std::cerr << "up:\t" << TPair(i, lastIndex_updown.i1) << ::std::endl;
+				lastIndex_updown.i1 = undef;
+			}
+			stack_updown.push(TPair(i + 1, lcp_i));
+		}
+
+		endRead(lcpIn);
+		endWrite(dest);
+    }
+
+
+	//////////////////////////////////////////////////////////////////////////////
+    // Enhanced class (outputs only the childtab (3rd) column of the Enhanced Suffix Array)
+    template < typename TLCPInput >
+    struct Pipe< TLCPInput, Childtab >
+    {
+        // *** SPECIALIZATION ***
+
+		typedef typename Value<TLCPInput>::Type		TValue;
+		typedef typename Size<TLCPInput>::Type		TSize;
+
+		typedef Pair<TSize, TValue, Compressed>		TCoreType;		// (i, lcptab[i])
+
+		typedef Pool< TCoreType, MapperSpec< MapperConfigSize< filterI1<TCoreType>, TSize > > > TLinearMapper;
+        typedef Pipe< TLinearMapper, Filter< filterI2<TCoreType> > > TFilter;
+
+        TLinearMapper   mapper;
+		TFilter			in;
+        
+        Pipe():
+            in(mapper) {}
+
+        Pipe(TLCPInput &_in):
+            in(mapper)
+		{
+			process(_in);
+		}
+
+		template < typename TLcpInput_ >
+        inline bool process(TLcpInput_ &_lcpIn) {
+
+            // *** INSTANTIATION ***
+			
+			_childtabProcess(_lcpIn, mapper);
+            return true;
+        }
+
+        inline typename Value<Pipe>::Type const operator*() const {
+            return *in;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }
+	};
+
+	template < typename TInput, typename TLcpInput_ >
+    inline bool operator<<(Pipe< TInput, Childtab > &me, TLcpInput_ const &in) {
+ 	    return me.process(in);
+    }
+
+	template < typename TLCPTable,
+               typename TChildTable >
+    void createChildtabExt(
+		TChildTable &childtab,
+		TLCPTable &lcp)
+	{
+		typedef Pipe< TLCPTable, Source<> >	TSource;
+		typedef Pipe< TSource, Childtab >	TESA;
+
+		TSource source(lcp);
+		TESA	esa(source);
+
+		childtab << esa;
+	}
+
+/**
+.Function.createChildtab:
+..summary:Creates a child table from a given lcp table.
+..cat:Index
+..signature:createChildtab(childTab, lcp[, algo_tag])
+..param.childTab:A reference to the resulting child table.
+..param.lcp:A given lcp table.
+..param.algo_tag:A tag that identifies the algorithm which is used for creation.
+..remarks:The size of $childTab$ must be at least $length(text)$ before calling this function.
+..include:seqan/index.h
+*/
+	template < typename TLCPTable,
+               typename TValue,
+			   typename TConfig >
+    inline void createChildtab(
+		String<TValue, External<TConfig> > &childtab,
+		TLCPTable &lcp)
+	{
+		createChildtabExt(childtab, lcp);
+	}
+
+	
+	
+    //////////////////////////////////////////////////////////////////////////////
+    // internal childtab algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+	template < typename TLCPInput, typename TDest >
+	inline void createChildtab(TDest &dest, TLCPInput const &lcpIn)
+	{
+		typedef typename Value<TLCPInput>::Type				TValue;
+		typedef typename Size<TLCPInput>::Type				TSize;
+		typedef typename Iterator<TLCPInput const>::Type	TIter;
+
+		typedef Pair<TSize, TValue>							TPair;		// (i, lcptab[i])
+		typedef ::std::stack<TPair> 						TStack;
+
+        #ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "--- CREATE CHILD TABLE ---" << std::endl;
+            std::cerr << "Start stack-processing [random access]" << std::endl;
+        #endif
+
+		TStack stack_updown;
+		TStack stack_nextl;
+
+		stack_updown.push(TPair(0, 0));
+		stack_nextl.push(TPair(0, 0));
+
+		resize(dest, length(lcpIn));
+
+		TSize n = length(lcpIn);
+		TSize undef = n + 1;
+		TSize lastIndex_nextl;
+		TPair lastIndex_updown = TPair(undef, 0);
+
+		TValue lcp_i;
+		TIter lcpI = begin(lcpIn);
+/*		for(TSize i = 0; i < n; ++i, ++lcpI) {
+			lcp_i = *lcpI;
+
+			//////////////////////////////////////////////////////////////////////////////
+			// nextlIndex part
+			lastIndex_nextl = undef;
+			while (lcp_i < stack_nextl.top().i2)
+				stack_nextl.pop();
+
+			if (lcp_i == stack_nextl.top().i2) {
+				lastIndex_nextl = stack_nextl.top().i1;
+				dest[i + 1] = lastIndex_nextl;						// childtab[top].nextl
+
+				::std::cerr << "nextl:\t\t\t" << TPair(lastIndex_nextl, i + 1) << ::std::endl;
+				stack_nextl.pop();
+			}
+			stack_nextl.push(TPair(i + 1, lcp_i));
+		}
+*/
+		for(TSize i = 0; i < n; ++i, ++lcpI) {
+			lcp_i = *lcpI;
+
+			//////////////////////////////////////////////////////////////////////////////
+			// up/down part
+			TPair top;
+			while (lcp_i < stack_updown.top().i2) {
+				lastIndex_updown = stack_updown.top();
+				stack_updown.pop();
+				
+				top = stack_updown.top();
+				if (lcp_i <= top.i2 && top.i2 != lastIndex_updown.i2 /*&& top.i1 != lastIndex_nextl*/) {
+					dest[top.i1] = lastIndex_updown.i1;				// childtab[top].down
+
+//					::std::cerr << "down:\t\t" << TPair(top.i1, lastIndex_updown.i1) << ::std::endl;			// childtab[top].down
+				}
+			}
+			if (lastIndex_updown.i1 != undef) {
+				dest[i] = lastIndex_updown.i1;						// childtab[top].up goes to [top - 1]
+
+//				::std::cerr << "up:\t" << TPair(i, lastIndex_updown.i1) << ::std::endl;
+				lastIndex_updown.i1 = undef;
+			}
+			stack_updown.push(TPair(i + 1, lcp_i));
+		}
+
+		lcpI = begin(lcpIn);
+		for(TSize i = 0; i < n; ++i, ++lcpI) {
+			lcp_i = *lcpI;
+
+			//////////////////////////////////////////////////////////////////////////////
+			// nextlIndex part
+			lastIndex_nextl = undef;
+			while (lcp_i < stack_nextl.top().i2)
+				stack_nextl.pop();
+
+			if (lcp_i == stack_nextl.top().i2) {
+				lastIndex_nextl = stack_nextl.top().i1;
+				dest[lastIndex_nextl] = i + 1;						// childtab[top].nextl
+
+//				::std::cerr << "nextl:\t\t\t" << TPair(lastIndex_nextl, i + 1) << ::std::endl;
+				stack_nextl.pop();
+			}
+			stack_nextl.push(TPair(i + 1, lcp_i));
+		}
+
+    }
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_dfi.h b/src/SeqAn-1.3/seqan/index/index_dfi.h
new file mode 100644
index 0000000..2e59060
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_dfi.h
@@ -0,0 +1,599 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_DFI_H
+#define SEQAN_HEADER_INDEX_DFI_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// simple struct to store frequency vectors
+
+	struct DfiEntry_
+	{
+		unsigned						lastSeqSeen;
+//		String<unsigned, Array<2> >		freq;
+		String<unsigned>				freq;
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// constant frequency predicate
+
+	template <bool Result>
+	struct DfiPredDefault_ 
+	{
+        inline bool operator()(DfiEntry_ const &) const {
+			return Result;
+		}
+    };
+
+
+///.Spec.VSTree Iterator.param.TContainer.type:Spec.IndexDfi
+///.Spec.TopDown Iterator.param.TContainer.type:Spec.IndexDfi
+///.Spec.TopDownHistory Iterator.param.TContainer.type:Spec.IndexDfi
+
+//////////////////////////////////////////////////////////////////////////////
+// Dfi - The Deferred Frequency Index
+
+/**
+.Spec.IndexDfi:
+..summary:The Deferred Frequency Index (see Weese and Schulz, "Efficient string mining under constraints via the
+deferred frequency index").
+..cat:Index
+..general:Spec.IndexWotd
+..signature:Index<TText, IndexWotd< Dfi<TPredHull, TPred> > >
+..param.TText:The text type.
+...type:Class.String
+..param.TPred:An arbitrary frequency predicate
+..param.TPredHull:A monotonic hull of $TPred$
+..remarks:This index is based on a lazy suffix tree (see @Spec.IndexWotd@).
+All $TPredHull$ sufficing nodes can be iterated using a @Spec.TopDown Iterator at .
+To iterate the exact solution set of $TPred$, use a $Spec.TopDownHistory Iterator$ of this index.
+..include:seqan/index.h
+*/
+
+	template < 
+		typename TPredHull = DfiPredDefault_<true>,
+		typename TPred = DfiPredDefault_<true>
+	>
+	struct Dfi;
+
+	template < 
+		typename TObject,
+		typename TPredHull,
+		typename TPred
+	>
+	class Index<TObject, IndexWotd< Dfi<TPredHull, TPred> > >:
+		public Index<TObject, IndexWotd<> > 
+	{
+	public:
+		
+		typedef Index<TObject, IndexWotd<> >	TBase;
+
+		// extending base class
+		typedef typename TBase::TText	TText;
+		typedef typename TBase::TValue	TValue;
+		typedef typename TBase::TSize	TSize;
+		
+		using TBase::LEAF;
+		using TBase::LAST_CHILD;
+		using TBase::UNEVALUATED;
+		using TBase::SENTINELS;
+
+		// frequency strings for Dfi
+		typedef DfiEntry_						TDFIEntry;
+		typedef String<
+			TDFIEntry, 
+			Array<ValueSize<TValue>::VALUE> >	TDFIEntries;
+		typedef String<unsigned>				TDFIDatasets;
+
+		// 1st word flags
+		static TSize const DFI_PRED_HULL	= (TSize)1 << (BitsPerValue<TSize>::VALUE - 3); // this node fulfills all monotonic frequency predicates (e.g. min_freq)
+		static TSize const DFI_PRED			= (TSize)1 << (BitsPerValue<TSize>::VALUE - 4); // this node fulfills all frequency predicates (e.g. emerging, minmax_freq)
+		static TSize const DFI_PARENT_FREQ	= (TSize)1 << (BitsPerValue<TSize>::VALUE - 5); // this node has the same frequency as its parent
+
+		static TSize const BITMASK0			= ~(LEAF | LAST_CHILD | DFI_PRED_HULL | DFI_PRED | DFI_PARENT_FREQ);
+		static TSize const BITMASK1			= ~(UNEVALUATED | SENTINELS);
+
+		TDFIEntry		nodeEntry;			// current nodes frequencies
+		TDFIEntries		childEntry;			// child frequencies for each first letter of outgoing edges
+		TDFIDatasets	ds;
+
+		TPredHull		predHull;
+		TPred			pred;
+		
+		Index() {}
+
+		Index(Index &other):
+			TBase((TBase &)other),
+			childEntry(other.childEntry),
+			ds(other.ds),
+			predHull(other.predHull),
+			pred(other.pred) {}
+
+		Index(Index const &other):
+			TBase((TBase const &)other),
+			childEntry(other.childEntry),
+			ds(other.ds),
+			predHull(other.predHull),
+			pred(other.pred) {}
+
+		template <typename TText_>
+		Index(TText_ &_text):
+			TBase(_text) {}
+
+		template <typename TText_>
+		Index(TText_ &_text, TPredHull const &_predHull):
+			TBase(_text),
+			predHull(_predHull) {}
+
+		template <typename TText_>
+		Index(TText_ &_text, TPredHull const &_predHull, TPred const &_pred):
+			TBase(_text),
+			predHull(_predHull),
+			pred(_pred) {}
+	};
+
+	
+	template < 
+		typename TText, 
+		typename TPredHull,
+		typename TPred,
+		typename TSpec
+	>
+	inline bool nodePredicate(
+		Iter<Index<TText, IndexWotd< Dfi<TPredHull, TPred> > >, TSpec> &it)
+	{
+		typedef Index<TText, IndexWotd< Dfi<TPredHull, TPred> > > TIndex;
+		return (dirAt(value(it).node, container(it)) & TIndex::DFI_PRED) != 0;
+	}
+
+	template < 
+		typename TText, 
+		typename TPredHull,
+		typename TPred,
+		typename TSpec
+	>
+	inline bool nodeHullPredicate(
+		Iter<Index<TText, IndexWotd< Dfi<TPredHull, TPred> > >, TSpec> &it)
+	{
+		typedef Index<TText, IndexWotd< Dfi<TPredHull, TPred> > > TIndex;
+		return (dirAt(value(it).node, container(it)) & TIndex::DFI_PRED_HULL) != 0;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// we modify counting sort used in the wotd-index
+// to count the frequencies in passing
+
+	template < typename TText, typename TSpec, typename TPredHull, typename TPred >
+	typename Size< Index<StringSet<TText, TSpec>, IndexWotd<Dfi<TPredHull, TPred> > > >::Type
+	_sortFirstWotdBucket(Index<StringSet<TText, TSpec>, IndexWotd<Dfi<TPredHull, TPred> > > &index)
+	{
+	SEQAN_CHECKPOINT
+		typedef Index<StringSet<TText, TSpec>, IndexWotd<Dfi<TPredHull, TPred> > >	TIndex;
+		typedef typename Fibre<TIndex, WotdSA >::Type			TSA;
+		typedef typename TIndex::TCounter						TCounter;
+
+		typedef typename TIndex::TDFIEntry						TDFIEntry;
+		typedef typename TIndex::TDFIDatasets					TDFIDatasets;
+		typedef typename Iterator<TDFIDatasets, Standard>::Type	TDFIDatasetsIterator;
+
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA, Standard>::Type			TSAIterator;
+		typedef typename Iterator<TCounter, Standard>::Type		TCntIterator;
+		typedef typename Size<TText>::Type						TSize;
+		typedef typename Value<TText>::Type						TValue;
+		
+		StringSet<TText, TSpec> const &stringSet = indexText(index);
+		TCounter &occ = index.tempOcc;
+		TCounter &bound = index.tempBound;
+
+		// 1. clear counters and copy SA to temporary SA
+		arrayFill(begin(occ, Standard()), end(occ, Standard()), 0);
+
+		index.nodeEntry.lastSeqSeen = -1;
+		for(unsigned j = 0; j < length(index.nodeEntry.freq); ++j)
+			index.nodeEntry.freq[j] = 0;
+		for(unsigned i = 0; i < ValueSize<TValue>::VALUE; ++i) 
+		{
+			TDFIEntry &childEntry = index.childEntry[i];
+			childEntry.lastSeqSeen = -1;
+			for(unsigned j = 0; j < length(childEntry.freq); ++j)
+				childEntry.freq[j] = 0;
+		}
+
+		// 2. count characters
+		_wotdCountChars(occ, stringSet);
+
+		// 3. cummulative sum
+		TSize requiredSize = _wotdCummulativeSum(bound, occ);
+
+		// 4. fill suffix array
+		unsigned dsNo = 0;
+		TDFIDatasetsIterator currentDS = begin(index.ds, Standard()) + 1;
+		for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+		{
+			// search for surrounding dataset
+			while (seqNo >= *currentDS) {
+				++dsNo;
+				++currentDS;
+			}
+
+			TSA &sa = indexSA(index);
+			TSAIterator saBeg = begin(sa, Standard());
+			TCntIterator boundBeg = begin(bound, Standard());
+
+			typename Value<TSA>::Type localPos;
+			assignValueI1(localPos, seqNo);
+			assignValueI2(localPos, 0);
+
+			TText const &text = value(stringSet, seqNo);
+			TTextIterator itText = begin(text, Standard());
+			TTextIterator itTextEnd = end(text, Standard());
+			for(; itText != itTextEnd; ++itText) 
+			{
+				unsigned ord = ordValue(*itText);
+				TDFIEntry &childEntry = index.childEntry[ord];
+				// new sequence is seen for <ord> character
+				// -> increment frequency of current dataset
+				if (childEntry.lastSeqSeen != seqNo) 
+				{
+					childEntry.lastSeqSeen = seqNo;
+					++childEntry.freq[dsNo];
+				}
+
+				*(saBeg + (*(boundBeg + ord))++) = localPos;
+				assignValueI2(localPos, getValueI2(localPos) + 1);
+			}
+		}
+		index.sentinelOcc = 0;
+		index.sentinelBound = 0;
+
+		return requiredSize;
+	}
+
+	// sort bucket using radixsort
+	// - all buckets are in lexicographical order
+	// - SA[left,right) contains real SA entries (the beginning positions of the suffices)
+	template < typename TText, typename TSpec, typename TPredHull, typename TPred, typename TBeginPos, typename TEndPos, typename TSize >
+	TSize _sortWotdBucket(
+		Index<StringSet<TText, TSpec>, IndexWotd<Dfi<TPredHull, TPred> > > &index,
+		TBeginPos left, 
+		TEndPos right,
+		TSize prefixLen)
+	{
+	SEQAN_CHECKPOINT
+		typedef Index<StringSet<TText, TSpec>, IndexWotd<Dfi<TPredHull, TPred> > >	TIndex;
+		typedef typename Fibre<TIndex, WotdSA >::Type				TSA;
+		typedef typename TIndex::TCounter							TCounter;
+		typedef typename TIndex::TTempSA							TTempSA;
+		typedef typename TIndex::TDFIEntry							TDFIEntry;
+		typedef typename TIndex::TDFIDatasets						TDFIDatasets;
+		typedef typename Iterator<TDFIDatasets, Standard>::Type		TDFIDatasetsIterator;
+
+		typedef typename Iterator<TText const, Standard>::Type		TTextIterator;
+		typedef typename Iterator<TSA, Standard>::Type				TSAIterator;
+		typedef typename Iterator<TTempSA, Standard>::Type			TTempSAIterator;
+		typedef typename Iterator<TCounter, Standard>::Type			TCntIterator;
+		typedef typename Size<TText>::Type							TTextSize;
+		typedef typename Value<TText>::Type							TValue;
+
+		StringSet<TText, TSpec> const &stringSet = indexText(index);
+		TTempSA const &tempSA = index.tempSA;
+		TCounter &occ = index.tempOcc;
+		TCounter &bound = index.tempBound;
+
+		// 1. clear counters and copy SA to temporary SA
+		TCntIterator occBeg = begin(occ, Standard());
+
+		arrayFill(occBeg, end(occ, Standard()), 0);
+		index.tempSA = infix(indexSA(index), left, right);
+
+		index.nodeEntry.lastSeqSeen = -1;
+		for(unsigned j = 0; j < length(index.nodeEntry.freq); ++j)
+			index.nodeEntry.freq[j] = 0;
+		for(unsigned i = 0; i < ValueSize<TValue>::VALUE; ++i) {
+			TDFIEntry &childEntry = index.childEntry[i];
+			childEntry.lastSeqSeen = -1;
+			for(unsigned  j = 0; j < length(childEntry.freq); ++j)
+				childEntry.freq[j] = 0;
+		}
+
+		index.sentinelOcc = 0;
+		index.sentinelBound = 0;
+
+		// 2. count characters
+		{
+			TDFIDatasetsIterator currentDS = begin(index.ds, Standard()) + 1;
+			TTextIterator itText = TTextIterator();
+			TTempSAIterator itSA = begin(tempSA, Standard());
+			TTempSAIterator itSAEnd = end(tempSA, Standard());
+			TTextSize textLength = 0;
+			unsigned lastSeqSeen = -1;
+			unsigned dsNo = 0;
+			Pair<unsigned, TTextSize> lPos;
+			for (; itSA != itSAEnd; ++itSA) 
+			{
+				posLocalize(lPos, *itSA, stringSetLimits(index));
+				if (lastSeqSeen != getSeqNo(lPos))
+				{
+					lastSeqSeen = getSeqNo(lPos);
+
+					// search for surrounding dataset
+					while (lastSeqSeen >= *currentDS) 
+					{
+						++dsNo;
+						++currentDS;
+					}
+					++index.nodeEntry.freq[dsNo];
+
+					// shift textBegin and textLength by prefixLen
+					textLength = length(stringSet[lastSeqSeen]) - prefixLen;
+					itText = begin(stringSet[lastSeqSeen], Standard()) + prefixLen;
+				}
+				if (textLength > getSeqOffset(lPos)) 
+				{
+					unsigned ord = ordValue(*(itText + getSeqOffset(lPos)));
+					TDFIEntry &childEntry = index.childEntry[ord];
+					// new sequence is seen for <ord> character
+					// -> increment frequency of current dataset
+					if (childEntry.lastSeqSeen != lastSeqSeen) 
+					{
+						childEntry.lastSeqSeen = lastSeqSeen;
+						++childEntry.freq[dsNo];
+					}
+					++*(occBeg + ord);
+				} else
+					if (textLength == getSeqOffset(lPos)) ++index.sentinelOcc;
+			}
+		}
+
+		// 3. cumulative sum
+		TSize requiredSize = 0;
+		if (index.interSentinelNodes) {
+			if (index.sentinelOcc != 0)
+				requiredSize = (index.sentinelOcc > 1)? 2: 1;	// insert *one* $-edge for all $_i suffices
+		} else
+			requiredSize = index.sentinelOcc;					// insert each $_i suffix one-by-one
+
+		requiredSize += _wotdCummulativeSum(bound, occ, left + index.sentinelOcc);
+		index.sentinelBound = left;
+/*
+		::std::cout << "$=" << index.sentinelOcc<<"@"<<index.sentinelBound << "\t";
+		for(int i=0; i<length(occ);++i)
+			if (occ[i])
+				::std::cout << i << "=" << occ[i]<<"@"<<bound[i] << "\t";
+*/
+		// 4. fill suffix array
+		{
+			TSA &sa = indexSA(index);
+			TSAIterator saBeg = begin(sa, Standard());
+			TCntIterator boundBeg = begin(bound, Standard());
+
+			TTextIterator itText = TTextIterator();
+			TTempSAIterator itSA = begin(tempSA, Standard());
+			TTempSAIterator itSAEnd = end(tempSA, Standard());
+			TTextSize textLength = 0;
+			unsigned lastSeqSeen = -1;
+			Pair<unsigned, TTextSize> lPos;
+			for(; itSA != itSAEnd; ++itSA)
+			{
+				posLocalize(lPos, *itSA, stringSetLimits(index));
+				if (lastSeqSeen != getSeqNo(lPos))
+				{
+					lastSeqSeen = getSeqNo(lPos);
+
+					// shift textBegin and textLength by prefixLen
+					textLength = length(stringSet[lastSeqSeen]) - prefixLen;
+					itText = begin(stringSet[lastSeqSeen], Standard()) + prefixLen;
+				}
+				if (textLength > getSeqOffset(lPos))
+					*(saBeg + (*(boundBeg + ordValue(*(itText + getSeqOffset(lPos)))))++) = *itSA;
+				else
+					if (textLength == getSeqOffset(lPos))
+						*(saBeg + index.sentinelBound++) = *itSA;
+			}
+		}
+
+		return requiredSize;
+	}
+
+
+	// store buckets into directory
+	// storing SA links and topology links in Dir
+	template <typename TText, typename TPredHull, typename TPred, typename TSize>
+	inline void 
+	_storeWotdChildren(
+		Index<TText, IndexWotd<Dfi<TPredHull, TPred> > > &index,
+		TSize dirOfs,
+		TSize lcp)
+	{
+	SEQAN_CHECKPOINT
+		typedef Index<TText, IndexWotd<Dfi<TPredHull, TPred> > >	TIndex;
+
+		typedef typename Fibre<TIndex, WotdDir>::Type		TDir;
+		typedef typename TIndex::TCounter					TCounter;
+		typedef typename TIndex::TDFIEntries				TEntries;
+
+		typedef typename Iterator<TDir, Standard>::Type		TDirIterator;
+		typedef typename Size<TDir>::Type					TDirSize;
+		typedef typename Iterator<TCounter, Standard>::Type	TCntIterator;
+		typedef typename Iterator<TEntries, Standard>::Type	TEntriesIterator;
+
+		typedef typename Value<TCounter>::Type				TCntValue;
+		typedef typename Value<TDir>::Type					TDirValue;
+
+		TDirIterator itDirBegin = begin(indexDir(index), Standard()) + dirOfs;
+		TDirIterator itDirEnd = end(indexDir(index), Standard());
+		TDirIterator itDir = itDirBegin;
+		TDirIterator itPrev = itDirEnd;
+
+		TCntIterator it = begin(index.tempOcc, Standard());
+		TCntIterator bit = begin(index.tempBound, Standard());
+		TCntIterator itEnd = end(index.tempOcc, Standard());
+		TEntriesIterator itEntry = begin(index.childEntry, Standard());
+
+		TCntValue occ;
+		if (index.sentinelOcc != 0)
+		{
+			TDirValue orMask = (index.predHull(*itEntry))? index.DFI_PRED_HULL: 0;
+			if (index.pred(*itEntry)) orMask |= index.DFI_PRED;
+
+			if (index.sentinelOcc > 1 && index.interSentinelNodes)	// occurs on multiseqs
+			{
+				itPrev = itDir;
+				*itDir = (index.sentinelBound - index.sentinelOcc) | orMask;	++itDir;
+				*itDir = index.sentinelBound | index.UNEVALUATED;				++itDir;
+			} else
+				orMask |= index.LEAF;
+				for (TDirSize d = index.sentinelBound - index.sentinelOcc; d != index.sentinelBound; ++d)
+				{
+					itPrev = itDir;
+					*itDir = d | orMask;										++itDir;
+				}
+		}
+
+		for (; it != itEnd; ++it, ++bit, ++itEntry)
+		{
+			if ((occ = *it) == 0) continue;
+
+			TDirValue orMask = (index.predHull(*itEntry))? index.DFI_PRED_HULL: 0;
+			if (index.pred(*itEntry)) orMask |= index.DFI_PRED;
+			if ((*itEntry).freq == index.nodeEntry.freq) orMask |= index.DFI_PARENT_FREQ;
+
+			if (occ > 1) {
+				itPrev = itDir;
+				*itDir = (*bit - occ) | orMask;					++itDir;
+				*itDir = *bit | index.UNEVALUATED;				++itDir;
+			} else {
+				itPrev = itDir;
+				*itDir = (*bit - occ) | index.LEAF | orMask;	++itDir;
+			}
+		}
+
+		// first child gets the mutual lcp value of the children (== parent repLength)
+		*itDirBegin = ((*itDirBegin) & ~index.BITMASK0) | lcp;
+
+		// mark the last child
+		if (itPrev != itDirEnd)
+			*itPrev |= index.LAST_CHILD;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// debug output
+
+	template <typename TText, typename TPredHull, typename TPred>
+	inline void
+	_dump(Index<TText, IndexWotd< Dfi<TPredHull, TPred> > > &index)
+	{
+		typedef IndexWotd< Dfi<TPredHull, TPred> >		TSpec;
+		typedef Index<TText, TSpec>							TIndex;
+		typedef typename Fibre<TIndex, WotdDir>::Type		TDir;
+		typedef typename Value<TDir>::Type					TDirValue;
+
+		::std::cout << "  Dir (wotd/Dfi)" << ::std::endl;
+		for(unsigned i=0; i < length(indexDir(index)); ++i) {
+			TDirValue d = indexDir(index)[i];
+			::std::cout << i << ":  " << (d & index.BITMASK0);
+			if (d & index.LEAF)				::std::cout << "  (Leaf/Uneval)";
+			if (d & index.LAST_CHILD)		::std::cout << "  (LastChild/SENTINELS)";
+			if (d & index.DFI_PRED_HULL)	::std::cout << "  (PRED_HULL)";
+			if (d & index.DFI_PRED)			::std::cout << "  (PRED)";
+			if (d & index.DFI_PARENT_FREQ)	::std::cout << "  (PARENT_FREQ)";
+			::std::cout << ::std::endl;
+		}
+
+		::std::cout << ::std::endl << "  SA" << ::std::endl;
+		for(unsigned i=0; i < length(indexSA(index)); ++i)
+			::std::cout << i << ":  " << indexSA(index)[i] << "  " << suffix(indexText(index), indexSA(index)[i]) << ::std::endl;
+
+		::std::cout << ::std::endl;
+	}
+
+	template <typename TText, typename TPredHull, typename TPred>
+	inline void
+	_dumpFreq(Index<TText, IndexWotd< Dfi<TPredHull, TPred> > > &index)
+	{
+		typedef Dfi<TPredHull, TPred> TSpec;
+		typedef Index<TText, IndexWotd<TSpec> >				TIndex;
+		typedef typename Value<TIndex>::Type					TValue;
+
+		::std::cout << "  ParentF = (";
+		for(unsigned d=0; d<length(index.nodeEntry.freq); ++d) {
+			if (d>0) ::std::cout << ",";
+			::std::cout << index.nodeEntry.freq[d];
+		}
+		::std::cout << ")" << ::std::endl;
+
+		for(unsigned i=0; i<length(index.tempOcc); ++i)
+			if (index.tempOcc[i] != 0) {
+				::std::cout << "  Freq[" << (TValue)i << "] = (";
+				for(unsigned d=0; d<length(index.childEntry[i].freq); ++d) {
+					if (d>0) ::std::cout << ",";
+					::std::cout << index.childEntry[i].freq[d];
+				}
+				::std::cout << ")" << ::std::endl;
+			}
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// interface for automatic index creation 
+
+	template <typename TText, typename TPredHull, typename TPred>
+	inline bool indexCreate(Index<TText, IndexWotd<Dfi<TPredHull, TPred> > > &index, WotdDir const, Default const)
+	{
+		typedef Index<TText, IndexWotd<Dfi<TPredHull, TPred> > >	TIndex;
+		typedef typename Value<TIndex>::Type							TValue;
+		typedef typename TIndex::TBase									TBase;
+
+		resize(index.childEntry, (unsigned) ValueSize<TValue>::VALUE);
+		if (empty(index.ds)) {
+			resize(index.ds, 2);
+			index.ds[0] = 0;
+			index.ds[1] = countSequences(index);
+		}
+		resize(index.nodeEntry.freq, length(index.ds) - 1, Exact());
+		for(unsigned i = 0; i < ValueSize<TValue>::VALUE; ++i)
+			resize(index.childEntry[i].freq, length(index.ds) - 1, Exact());
+
+		_wotdCreateFirstLevel(index);
+		return true;
+	}
+}
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/index/index_esa_algs.h b/src/SeqAn-1.3/seqan/index/index_esa_algs.h
new file mode 100644
index 0000000..fd4c351
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_esa_algs.h
@@ -0,0 +1,1010 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_ESA_ALGS_H
+#define SEQAN_HEADER_INDEX_ESA_ALGS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+	
+	//////////////////////////////////////////////////////////////////////////////
+	// more sophisticated algorithms on enhanced suffix arrays of 1 sequence
+	// (also called virtual suffix trees)
+	//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Spec.SuperMaxRepeats Iterator:
+..cat:Index
+..general:Spec.BottomUp Iterator
+..summary:Iterator to search for all supermaximal repeats.
+..signature:Iterator<TContainer, SuperMaxRepeats>::Type
+..signature:Iter<TContainer, VSTree< BottomUp<SuperMaxRepeats> > >
+..param.TContainer:Type of an index that can be iterated with a bottom-up iterator.
+...type:Spec.IndexEsa
+...metafunction:Metafunction.Container
+..include:seqan/index.h
+
+.Memfunc.SuperMaxRepeats Iterator#Iterator
+..class:Spec.SuperMaxRepeats Iterator
+..summary:Constructor
+..signature:Iterator(index[, minLength])
+..signature:Iterator(iterator)
+..param.index:An index object.
+..param.minLength:Minimum length of the supermaximal repeats, default value is 1.
+..param.iterator:Another SuperMaxRepeats iterator. (copy constructor)
+...type:Spec.SuperMaxRepeats Iterator
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// super-maximal repeats - suffix tree version
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TSTree >
+	struct GetVSTreeIteratorTraits< Iter< TSTree, VSTree< BottomUp<SuperMaxRepeats> > > > {
+		typedef PostorderEmptyEdges	Type;
+	};
+
+	template < typename TSTree >
+	class Iter< TSTree, VSTree< BottomUp<SuperMaxRepeats> > >:
+		public Iter< TSTree, VSTree< BottomUp<> > > 
+	{
+	public:
+		typedef Iter< TSTree, VSTree< BottomUp<> > >	TBase;
+		typedef typename Size<TSTree>::Type				TSize;
+		typedef typename Value<TSTree>::Type			TValue;
+//____________________________________________________________________________
+
+		TSize						minLength;
+		typename Set<TValue>::Type	charSet;
+//____________________________________________________________________________
+
+		Iter(TSTree &_tree):
+			TBase(_tree),
+			minLength(1)
+		{
+			indexRequire(_tree, EsaChildtab());
+			indexRequire(_tree, EsaBwt());
+			goNext(*this);	// the iterator starts in a suffix, i.e. not a repeat
+		}
+
+		Iter(TSTree &_tree, MinimalCtor):
+			TBase(_tree, MinimalCtor()) {}
+
+		Iter(TSTree &_tree, TSize _minLength):
+			TBase(_tree),
+			minLength(_minLength)
+		{
+			indexRequire(_tree, EsaChildtab());
+			indexRequire(_tree, EsaBwt());
+			goNext(*this);	// the iterator starts in a suffix, i.e. not a repeat
+		}
+
+		Iter(Iter const &_origin):
+			TBase((TBase const &)_origin),
+			minLength(_origin.minLength),
+			charSet(_origin.charSet) {}
+	};
+
+	template < typename TSTree >
+	inline void goNext(Iter< TSTree, VSTree< BottomUp<SuperMaxRepeats> > > &it) {
+		do {
+			goNext(it, PostorderEmptyEdges());
+		} while (!atEnd(it) && 
+			     !(	childrenAreLeaves(it) && 
+					(repLength(it) >= it.minLength) &&
+					!isPartiallyLeftExtensible(it, it.charSet)) );
+	}
+		
+
+/**
+.Spec.SuperMaxRepeatsFast Iterator:
+..cat:Index
+..general:Spec.BottomUp Iterator
+..summary:Iterator to search for all supermaximal repeats (for enh. suffix arrays only).
+..signature:Iterator<TContainer, SuperMaxRepeatsFast>::Type
+..signature:Iter<TContainer, VSTree< BottomUp<SuperMaxRepeatsFast> > >
+..param.TContainer:Type of an index based on enhanced suffix array.
+...type:Spec.IndexEsa
+...metafunction:Metafunction.Container
+..include:seqan/index.h
+
+.Memfunc.SuperMaxRepeatsFast Iterator#Iterator
+..class:Spec.SuperMaxRepeatsFast Iterator
+..summary:Constructor
+..signature:Iterator(index[, minLength])
+..signature:Iterator(iterator)
+..param.index:An index object.
+..param.minLength:Minimum length of the supermaximal repeats, default value is 1.
+..param.iterator:Another SuperMaxRepeatsFast iterator. (copy constructor)
+...type:Spec.SuperMaxRepeatsFast Iterator
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// supermaximal repeats - specialized for Enhanced Suffix Arrays
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TSTree >
+	struct GetVSTreeIteratorTraits< Iter< TSTree, VSTree< BottomUp<SuperMaxRepeatsFast> > > > {
+		typedef PostorderEmptyEdges	Type;
+	};
+
+	template < typename TText, typename TSpec >
+	class Iter< Index<TText, IndexEsa<TSpec> >, VSTree< BottomUp<SuperMaxRepeatsFast> > >:
+		public Iter< Index<TText, IndexEsa<TSpec> >, VSTree< BottomUp<> > > 
+	{
+	public:
+		typedef Index< TText, IndexEsa<TSpec> >		TIndex;
+		typedef Iter< TIndex, VSTree< BottomUp<> > >	TBase;
+		typedef typename Size<TIndex>::Type				TSize;
+		typedef typename Value<TIndex>::Type			TValue;
+
+		typedef typename Iterator<typename Fibre<TIndex, EsaLcp>::Type const>::Type	TLCPIter;
+//____________________________________________________________________________
+
+		TSize		minLength;
+		TLCPIter	lIter, lEnd;	// lcp table iterators (optimization)
+		TSize		lValueLast;		// current l-value of interval
+		bool 		rising;			// is the left interval border valid
+		typename Set<TValue>::Type	charSet;
+//____________________________________________________________________________
+
+		Iter(TIndex &_index):
+			TBase(_index),
+			minLength(1),
+			lValueLast(0),
+			rising(true)
+		{
+			this->vDesc.range = Pair<TSize>(0,0);
+			indexRequire(_index, EsaBwt());
+			lIter = begin(indexLcp(container(*this)));
+			lEnd  = end(indexLcp(container(*this)));
+			goNext(*this);
+		}
+
+		Iter(TIndex &_index, MinimalCtor):
+			TBase(_index, MinimalCtor()) {}
+
+		Iter(TIndex &_index, TSize _minLength):
+			TBase(_index),
+			minLength(_minLength),
+			lValueLast(0),
+			rising(true)
+		{
+			this->vDesc.i1 = Pair<TSize>(0,0);
+			indexRequire(_index, EsaBwt());
+			lIter = begin(indexLcp(container(*this)));
+			lEnd  = end(indexLcp(container(*this)));
+			goNext(*this);
+		}
+
+		Iter(Iter const &_origin):
+			TBase((TBase const &)_origin),
+			minLength(_origin.minLength),
+			lIter(_origin.lIter),
+			lEnd(_origin.lEnd),
+			lValueLast(_origin.lValueLast),
+			rising(_origin.rising) {}
+	};
+
+	template < typename TText, typename TSpec >
+	inline void goNext(Iter< Index<TText, IndexEsa<TSpec> >, VSTree< BottomUp<SuperMaxRepeatsFast> > > &it) 
+	{
+		typedef Index<TText, IndexEsa<TSpec> >		TIndex;
+		typename Size<TIndex>::Type					lcp;
+
+		while (it.lIter != it.lEnd) {
+			lcp = *it.lIter;
+
+			if (lcp < it.lValueLast) {
+				if (it.rising) {
+					if (it.lValueLast > it.minLength) {
+						_dfsLcp(it) = it.lValueLast;
+						++_dfsRange(it).i2;
+						++it.lIter;
+						it.lValueLast = lcp;
+						if (!isPartiallyLeftExtensible(it, it.charSet)) return;
+						continue;
+					}
+					it.rising = false;
+				}
+			} else
+			if (lcp > it.lValueLast) {
+				_dfsRange(it).i1 = _dfsRange(it).i2;
+				it.rising = true;
+			}
+
+			++_dfsRange(it).i2;
+			++it.lIter;
+			it.lValueLast = lcp;
+		}
+		_dfsRange(it).i2 = 0;
+		return;
+	}
+
+	
+/**
+.Spec.MaxRepeats Iterator:
+..cat:Index
+..general:Spec.BottomUp Iterator
+..summary:Iterator to search for all maximal repeats.
+..signature:Iterator<TContainer, MaxRepeats>::Type
+..signature:Iter<TContainer, VSTree< BottomUp<MaxRepeats> > >
+..param.TContainer:Type of an index that can be iterated with a bottom-up iterator.
+...type:Spec.IndexEsa
+...metafunction:Metafunction.Container
+..include:seqan/index.h
+
+.Memfunc.MaxRepeats Iterator#Iterator
+..class:Spec.MaxRepeats Iterator
+..summary:Constructor
+..signature:Iterator(index[, minLength])
+..signature:Iterator(iterator)
+..param.index:An index object.
+..param.minLength:Minimum length of the maximal repeats, default value is 1.
+..param.iterator:Another MaxRepeats iterator. (copy constructor)
+...type:Spec.MaxRepeats Iterator
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// maximal repeats - suffix tree version
+	//////////////////////////////////////////////////////////////////////////////
+
+	// contains a list of indices of the same bwt value (fraction)
+	template <typename TSize>
+	struct FractionHeader_ {
+		TSize	begin, end;
+		TSize	size;
+		FractionHeader_() {}
+		FractionHeader_(TSize _begin, TSize _end, TSize _size):
+			begin(_begin), end(_end), size(_size) {}
+	};
+
+	// contains a set of fractions (one for each bwt value) 
+	// and a fraction for the undefined bwt value (for the virtual character at position -1)
+	template <typename TValue, typename TSize>
+	struct FractionCompound_ {
+		typedef FractionHeader_<TSize>			TFractionHeader;
+		typedef Pair<TValue, TFractionHeader>	TFraction;	// TFraction = (c,(begin,end))
+		typedef typename Set<TFraction>::Type	TSet;		// c..char, begin/end indices in posList
+
+		TSet			set;
+		TFractionHeader	leftmost;
+
+		FractionCompound_():
+			leftmost(0,0,0) {}
+	};
+
+	// tests existence of left maximal repeats
+	// right maximality is implicitly given
+	template <typename TValue, typename TSize>
+	int _haveMaximalRepeats(
+		FractionCompound_<TValue, TSize> const &a,
+		FractionCompound_<TValue, TSize> const &b)
+	{
+		TSize cs = length(a.set), ps = length(b.set);
+
+		if (a.leftmost.size > 0) ++cs;
+		if (b.leftmost.size > 0) ++ps;
+
+		if (cs == 0 || ps == 0) return false;
+		if (cs  > 1 || ps  > 1) return true;
+
+		if (a.leftmost.size > 0 || b.leftmost.size > 0)
+			return true;
+
+		return (keyOf(begin(a.set)) != keyOf(begin(b.set)));
+	}
+
+
+	template <typename TValue, typename TSize>
+	int _haveMaximalRepeats(
+		FractionCompound_<TValue, TSize> const &a,
+		FractionCompound_<TValue, TSize> const &b,
+		TValue &equalKey)
+	{
+		TSize cs = length(a.set), ps = length(b.set);
+
+		if (a.leftmost.size > 0) ++cs;
+		if (b.leftmost.size > 0) ++ps;
+
+		if (cs == 0 || ps == 0) return 0;
+		if (cs  > 1 || ps  > 1) return 2;	// more than 2
+
+		if (a.leftmost.size > 0 || b.leftmost.size > 0)
+			return 2;
+
+		if ((equalKey = keyOf(begin(a.set))) != keyOf(begin(b.set)))
+			return 2;
+		else
+			return 1;
+	}
+
+
+	template < typename TSTree, typename TSpec >
+	struct GetVSTreeIteratorTraits< Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > > {
+		typedef PostorderEmptyEdges	Type;
+	};
+
+	template < typename TSTree, typename TSpec >
+	class Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > >:
+		public Iter< TSTree, VSTree< BottomUp<> > > 
+	{
+	public:
+		typedef Iter< TSTree, VSTree< BottomUp<> > >	TBase;
+		typedef typename Value<TSTree>::Type			TValue;
+		typedef typename Size<TSTree>::Type				TSize;
+
+		typedef FractionCompound_<TValue, TSize>		TFractionCompound;
+		typedef String<TFractionCompound, Block<> >		TSetStack;
+		typedef String<TSize>							TPositionList;
+		
+		typedef typename TFractionCompound::TSet		TSet;
+		typedef typename Iterator<TSet>::Type			TSetIterator;
+		typedef typename Iterator<TSet const>::Type		TConstSetIterator;
+
+		typedef typename TBase::TStackEntry				TStackEntry;
+
+//____________________________________________________________________________
+
+		TSize			minLength;
+		TSetStack		setStack;
+		TPositionList	posList;	// this list is indexed just as SA is and contains the next entry's index
+		bool			canMerge;	// is false, if parent node appears after its first child on stack
+//____________________________________________________________________________
+
+		Iter(TSTree &_index):
+			TBase(_index, MinimalCtor()),
+			minLength(1),
+			canMerge(true)
+		{
+			indexRequire(_index, EsaSA());
+			indexRequire(_index, EsaLcp());
+			indexRequire(_index, EsaBwt());
+			resize(posList, length(_index));
+
+			if (!empty(indexSA(_index))) 
+			{
+				TStackEntry e;
+				e.range.i1 = 0;
+				e.range.i2 = 0;
+				_dfsOnPush(*this, e);
+				goNext(*this);
+			}
+		}
+
+		Iter(TSTree &_tree, MinimalCtor):
+			TBase(_tree, MinimalCtor()) {}
+
+		Iter(TSTree &_index, TSize _minLength):
+			TBase(_index, MinimalCtor()),
+			minLength(_minLength),
+			canMerge(true)
+		{
+			indexRequire(_index, EsaSA());
+			indexRequire(_index, EsaLcp());
+			indexRequire(_index, EsaBwt());
+			resize(posList, length(_index));
+
+			if (!empty(indexSA(_index))) 
+			{
+				TStackEntry e;
+				e.range.i1 = 0;
+				e.range.i2 = 0;
+				_dfsOnPush(*this, e);
+				goNext(*this);
+			}
+		}
+
+		Iter(Iter const &_origin):
+			TBase((TBase const &)_origin),
+			minLength(_origin.minLength),
+			setStack(_origin.setStack),
+			posList(_origin.posList),
+			canMerge(_origin.canMerge) {}
+
+//____________________________________________________________________________
+
+		inline bool hasRepeats() 
+		{
+			if (length(setStack) < 2) return false;
+			return _haveMaximalRepeats(top(setStack), topPrev(setStack)) > 0;
+		}
+
+		inline TSize countRepeats() const
+		{
+			if (length(setStack) < 2) return 0;
+
+			TFractionCompound const &child  = top(setStack);
+			TFractionCompound const &parent = topPrev(setStack);
+
+			TConstSetIterator childFraction	= begin(child.set);
+			TConstSetIterator childEnd		= end(child.set);
+			TConstSetIterator parentFraction	= begin(parent.set);
+			TConstSetIterator parentEnd		= end(parent.set);
+
+			TSize sum = 0;
+			for(; childFraction != childEnd; ++childFraction) {
+				for(; parentFraction != parentEnd; ++parentFraction) {
+					if (keyOf(childFraction) != keyOf(parentFraction))
+						sum += objectOf(childFraction).size * objectOf(parentFraction).size;
+
+					sum += child.leftmost.size * objectOf(parentFraction).size;
+				}
+				sum += objectOf(childFraction).size * parent.leftmost.size;
+			}
+			sum += child.leftmost.size * parent.leftmost.size;
+			return sum;
+		}
+//____________________________________________________________________________
+
+		inline void _dump() const {
+			::std::cerr << "SETSTACK of " << representative(*this) << ":" << ::std::endl;
+			typename Iterator<TSetStack const>::Type it = begin(setStack), itEnd = end(setStack);
+			while (it != itEnd) {
+				TSet const &set = (*it).set;
+				typename Iterator<TSet const>::Type sit = begin(set), sitEnd = end(set);
+
+				while (sit != sitEnd) {
+					::std::cerr << keyOf(sit) << "::";
+					typename TFractionCompound::TFractionHeader head = objectOf(sit);
+					TSize i = head.begin;
+					while (!_isSizeInval(i)) {
+						::std::cerr << saAt(i,container(*this)) << "  ";
+						i = posList[i];
+					}
+					::std::cerr << ::std::endl;
+					++sit;
+				}
+				
+				if ((*it).leftmost.size > 0)
+				{
+					::std::cerr << "\"\"::";
+					TSize i = (*it).leftmost.begin;
+					while (!_isSizeInval(i)) {
+						::std::cerr << saAt(i,container(*this)) << "  ";
+						i = posList[i];
+					}
+					::std::cerr << ::std::endl;
+				}
+				
+				::std::cerr << "_________________________" << ::std::endl;
+				++it;
+			}
+		}
+	};
+//____________________________________________________________________________
+
+	// add bwt partitions of child to parent node
+	template < typename TSTree, typename TSpec, typename TValue, typename TSize >
+	inline void _fractionMerge(
+		Iter<TSTree, VSTree< BottomUp<TSpec> > > &it, 
+		FractionCompound_<TValue, TSize> &parent,
+		FractionCompound_<TValue, TSize> &child)
+	{
+		typedef FractionCompound_<TValue, TSize>	TCompound;
+		typedef typename TCompound::TFraction		TFraction;
+		typedef typename TCompound::TFractionHeader	TFractionHeader;
+		typedef typename TCompound::TSet			TSet;
+		typedef typename Iterator<TSet>::Type		TSetIterator;
+
+		TSetIterator _end = end(child.set);
+		for(TSetIterator i = begin(child.set); i != _end; ++i) {
+			if (in(keyOf(i), parent.set)) {	// append child fraction to parent's fraction
+				TFractionHeader &parent_header = objectOf(find(keyOf(i), parent.set));
+				TFractionHeader const &child_header = objectOf(i);
+				it.posList[parent_header.end] = child_header.begin;
+				parent_header.end = child_header.end;
+				parent_header.size += child_header.size;
+			} else
+				insert(TFraction(keyOf(i), objectOf(i)), parent.set);	// insert child fraction in parent's set
+		}
+		if (parent.leftmost.size > 0) {
+			if (child.leftmost.size > 0) {
+				it.posList[parent.leftmost.end] = child.leftmost.begin;
+				parent.leftmost.end = child.leftmost.end;
+				parent.leftmost.size += child.leftmost.size;
+			}
+		} else
+			parent.leftmost = child.leftmost;
+	}
+
+	// maximal repeat push/leaf handlers of lcp-dfs-traversal
+	template < typename TSTree, typename TElement, typename TSpec >
+	inline void _dfsOnPush(Iter<TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it, TElement const &e) 
+	{
+		typedef Iter<TSTree, VSTree< BottomUp<> > > TBase;
+		_dfsOnPush((TBase&)it, e);
+
+		if (it.canMerge)
+			push(it.setStack);
+/*
+		::std::cerr << "PUSH ";
+		_dumpHistoryStack(it);
+		it._dump();
+*/	}
+
+	template < typename TSTree, typename TSpec >
+	inline void _dfsOnLeaf(Iter<TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it) 
+	{
+		typedef Iter<TSTree, VSTree< BottomUp<> > > TBase;
+		_dfsOnLeaf((TBase&)it);
+
+		typedef typename Value<TSTree>::Type	TValue;
+		typedef typename Size<TSTree>::Type		TSize;
+		typedef typename SAValue<TSTree>::Type	TSAValue;
+		typedef FractionHeader_<TSize>			TFractionHeader;
+		typedef Pair<TValue, TFractionHeader>	TFraction;
+
+		push(it.setStack);
+
+		TSTree &index = container(it);
+
+		TSize       i = _dfsRange(it).i1;
+		TSAValue	lPos;
+		posLocalize(lPos, getOccurrence(it), stringSetLimits(index));
+
+		if (!posAtFirstLocal(lPos))
+			insert(
+				TFraction(
+					bwtAt(i, container(it)),
+					TFractionHeader(i, i, 1)), 
+				top(it.setStack).set);
+		else
+			top(it.setStack).leftmost = TFractionHeader(i, i, 1);
+
+		_setSizeInval(it.posList[i]);
+/*
+		::std::cerr << "LEAF ";
+		_dumpHistoryStack(it);
+		it._dump();
+*/	}
+
+//____________________________________________________________________________
+
+	template < typename TSTree, typename TSpec >
+	inline void goNext(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it) {
+		do {
+			if (it.canMerge && length(it.setStack) >= 2) {
+				_fractionMerge(it, topPrev(it.setStack), top(it.setStack));
+				pop(it.setStack);
+			}
+			goNext(it, PostorderEmptyEdges());
+			if (empty(it.history))
+				it.canMerge = false;
+			else
+				it.canMerge = !_dfsReversedOrder(it);
+		} while (!eof(it) && !(it.canMerge && (repLength(it) >= it.minLength) && it.hasRepeats()));
+	}
+//____________________________________________________________________________
+
+	template < typename TSTree, typename TSpec >
+	inline typename VertexDescriptor<TSTree>::Type 
+	value(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > const &it) 
+	{
+		if (empty(it.history))
+			return it.vDesc;
+		typedef typename VertexDescriptor<TSTree>::Type TDesc;
+		return TDesc(top(it.history).range.i1, it.vDesc.range.i2, 0);
+	}
+//____________________________________________________________________________
+
+	template < typename TSTree, typename TSpec >
+	inline typename Size<TSTree>::Type 
+	repLength(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > const &it) 
+	{
+		return top(it.history).range.i2;
+	}
+//____________________________________________________________________________
+
+///.Function.length.param.object.type:Spec.MaxRepeats Iterator
+	template < typename TSTree, typename TSpec >
+	inline typename Size<TSTree>::Type 
+	length(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > const &it) {
+		return it.countRepeats();
+	}
+//____________________________________________________________________________
+
+///.Function.begin.param.object.type:Spec.MaxRepeats Iterator
+	template < typename TSTree, class TSpec >
+	inline typename Iterator< Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > >::Type
+	begin(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it) 
+	{
+		typedef Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > >	TIter;
+		return typename Iterator<TIter>::Type(it);
+	}
+//____________________________________________________________________________
+
+///.Function.end.param.object.type:Spec.MaxRepeats Iterator
+	template < typename TSTree, class TSpec >
+	inline typename Iterator< Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > >::Type
+	end(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it) 
+	{
+		typedef Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > >	TIter;
+		return typename Iterator<TIter>::Type(it, MinimalCtor());
+	}
+
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// maximal repeat representation
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TSTree>
+	struct MaxRepeat {
+//		Iter< TSTree, VSTree<BottomUp<MaxRepeats> > > ⁢
+	};
+
+	template <typename TSTree>
+	struct Value< MaxRepeat<TSTree> > {
+		typedef Pair< typename SAValue<TSTree>::Type > Type;
+	};
+
+	template <typename TSTree>
+	struct Size< MaxRepeat<TSTree> > {
+		typedef typename Size<TSTree>::Type Type;
+	};
+
+
+	template <typename TSTree>
+	inline typename Size< MaxRepeat<TSTree> >::Type 
+	length(MaxRepeat<TSTree> const &repeat) {
+		return repeat.it.countRepeats();
+	}
+
+/*
+	template <typename TSTree>
+	inline typename Iterator< MaxRepeat<TSTree> >::Type 
+	begin(MaxRepeat<TSTree> &repeat) {
+		return Iterator< MaxRepeat<TSTree> >::Type(repeat.it);
+	}
+
+	template <typename TSTree>
+	inline typename Iterator< MaxRepeat<TSTree> const >::Type 
+	begin(MaxRepeat<TSTree> const &repeat) {
+		return Iterator< MaxRepeat<TSTree> >::Type(repeat.it);
+	}
+*/
+
+
+	template <typename TSTree>
+	class Iter< MaxRepeat<TSTree>, MaxRepeatOccurrences > {
+	public:
+
+		typedef typename Value<TSTree>::Type	TValue;
+		typedef typename Size<TSTree>::Type		TSize;
+		typedef	Pair<TSize>						TPair;
+
+		typedef FractionCompound_<TValue, TSize>	TFractionCompound;
+		typedef typename TFractionCompound::TSet	TSet;
+		typedef typename Iterator<TSet const>::Type	TSetIterator;
+
+		TSize			childPtr, parentPtr;
+		TSetIterator	childFraction, childEnd;
+		TSetIterator	parentFraction, parentEnd;
+		bool			_atEnd;
+		TPair			tmp;
+		bool			leftmostChild, leftmostParent;
+		
+		Iter<TSTree, VSTree<BottomUp<MaxRepeats> > > const *maxIt;
+
+		inline Iter():
+			childPtr(0), parentPtr(0),
+			_atEnd(true),
+			tmp(TPair(0, 0)),
+			leftmostChild(false), leftmostParent(false) {}
+
+		inline Iter(Iter<TSTree, VSTree<BottomUp<MaxRepeats> > > const &_maxIt):
+			childPtr(0), parentPtr(0),
+			_atEnd(true), 
+			tmp(TPair(0, 0)),
+			leftmostChild(false), leftmostParent(false),
+			maxIt(&_maxIt)
+		{
+			_init();
+		}
+		
+		inline Iter(Iter<TSTree, VSTree<BottomUp<MaxRepeats> > > const &_maxIt, MinimalCtor):
+			maxIt(&_maxIt),
+			_atEnd(true) {}
+		
+		inline void _reinitParentFraction() {
+			if (leftmostParent)
+			{
+				TFractionCompound const &parent = topPrev(maxIt->setStack);
+				parentPtr = parent.leftmost.begin;
+			} else
+				parentPtr = objectOf(parentFraction).begin;
+		}
+
+		inline bool _innerStep() {
+			if (_isSizeInval(childPtr = maxIt->posList[childPtr])) {
+				if (_isSizeInval(parentPtr = maxIt->posList[parentPtr]))
+				{
+					_reinitParentFraction();
+					return false;
+				}
+				childPtr = objectOf(childFraction).begin;
+			}
+			return true;
+		}
+
+		inline void _firstParentFraction() {
+			TFractionCompound const &parent = topPrev(maxIt->setStack);
+
+			parentFraction	= begin(parent.set);
+			parentEnd		= end(parent.set);
+
+			if (parentFraction != parentEnd) {
+				leftmostParent = false;
+				parentPtr = objectOf(parentFraction).begin;
+			} else {
+				leftmostParent = true;
+				parentPtr = parent.leftmost.begin;
+			}
+		}
+
+		inline void _firstChildFraction() {
+			TFractionCompound const &child = top(maxIt->setStack);
+
+			childFraction	= begin(child.set);
+			childEnd		= end(child.set);
+
+			if (childFraction != childEnd) {
+				leftmostChild = false;
+				childPtr = objectOf(childFraction).begin;
+			} else {
+				leftmostChild = true;
+				childPtr = child.leftmost.begin;
+			}
+		}
+
+		inline bool _nextParentFraction() {
+			if (leftmostParent)
+				return false;
+
+			if (++parentFraction == parentEnd) {
+				if (topPrev(maxIt->setStack).leftmost.size > 0) {
+					leftmostParent = true;
+					parentPtr = topPrev(maxIt->setStack).leftmost.begin;
+				} else
+					return false;
+			} else
+				parentPtr = objectOf(parentFraction).begin;
+
+			return true;
+		}
+
+		inline bool _nextChildFraction() {
+			if (leftmostChild)
+				return false;
+
+			if (++childFraction == childEnd) {
+				if (top(maxIt->setStack).leftmost.size > 0) {
+					leftmostChild = true;
+					childPtr = top(maxIt->setStack).leftmost.begin;
+				} else
+					return false;
+			} else
+				childPtr = objectOf(childFraction).begin;
+
+			return true;
+		}
+
+		inline bool _outerStep() {
+			do {
+				if (!_nextChildFraction()) {
+					_firstChildFraction();
+					if (!_nextParentFraction()) {
+						_atEnd = true;
+						return false;
+					}
+				}
+				if (leftmostChild || leftmostParent) break;
+			} while (keyOf(childFraction) == keyOf(parentFraction));		// ignore occurences with equal bwt entries
+			return true;
+		}
+
+		inline void _init() 
+		{
+			if (length(maxIt->setStack) < 2) {
+				_atEnd = true;
+				return;
+			}
+
+			_firstChildFraction();
+			_firstParentFraction();
+
+			if (!leftmostChild && !leftmostParent &&
+				(keyOf(childFraction) == keyOf(parentFraction)))
+				_atEnd = !_outerStep();
+			else
+				_atEnd = false;
+
+			if (!_atEnd) {
+				tmp.i1 = saAt(parentPtr, container(*maxIt));
+				tmp.i2 = saAt(childPtr, container(*maxIt));
+			}
+		}
+	};
+
+//____________________________________________________________________________
+
+	template < typename TRepeat >
+	inline typename Value< Iter<TRepeat, MaxRepeatOccurrences> >::Type &
+	value(Iter<TRepeat, MaxRepeatOccurrences> const &it)  {
+		return it.tmp;
+	}
+
+	template < typename TRepeat >
+	inline typename Value< Iter<TRepeat, MaxRepeatOccurrences> >::Type &
+	value(Iter<TRepeat, MaxRepeatOccurrences> &it)  {
+		return it.tmp;
+	}
+//____________________________________________________________________________
+
+	template < typename TRepeat >
+	inline Iter<TRepeat, MaxRepeatOccurrences> &
+	goNext(Iter<TRepeat, MaxRepeatOccurrences> &it)  {
+		if (it._innerStep()) {
+			it.tmp.i1 = saAt(it.parentPtr, container(*it.maxIt));
+			it.tmp.i2 = saAt(it.childPtr, container(*it.maxIt));
+			return it;
+		}
+		if (it._outerStep()) {
+			it.tmp.i1 = saAt(it.parentPtr, container(*it.maxIt));
+			it.tmp.i2 = saAt(it.childPtr, container(*it.maxIt));
+		}
+		return it;
+	}
+//____________________________________________________________________________
+
+	template < typename TRepeat >
+	inline void
+	goBegin(Iter<TRepeat, MaxRepeatOccurrences> &it) 
+	{
+		it._init;
+	}
+
+//____________________________________________________________________________
+
+	template < typename TRepeat >
+	inline void
+	goEnd(Iter<TRepeat, MaxRepeatOccurrences> &it) 
+	{
+		it._atEnd = true;
+	}
+
+	template < typename TRepeat >
+	inline bool atEnd(Iter<TRepeat, MaxRepeatOccurrences> const &it) {
+		return it._atEnd;
+	}
+
+	template < typename TRepeat >
+	inline bool atEnd(Iter<TRepeat, MaxRepeatOccurrences> &it) {
+		return it._atEnd;
+	}
+
+//____________________________________________________________________________
+
+	template < typename TRepeat >
+	inline bool
+	operator == (
+		Iter<TRepeat, MaxRepeatOccurrences> const &itA,
+		Iter<TRepeat, MaxRepeatOccurrences> const &itB)
+	{
+		if (itA._atEnd && itB._atEnd) return true;
+		if (itA._atEnd || itB._atEnd) return false;
+		return (itA.childPtr == itB.childPtr) && (itA.parentPtr == itB.parentPtr);
+	}
+
+	template < typename TRepeat >
+	inline bool
+	operator != (
+		Iter<TRepeat, MaxRepeatOccurrences> const &itA,
+		Iter<TRepeat, MaxRepeatOccurrences> const &itB)
+	{
+		if (itA._atEnd && itB._atEnd) return false;
+		if (itA._atEnd || itB._atEnd) return true;
+		return (itA.childPtr != itB.childPtr) || (itA.parentPtr != itB.parentPtr);
+	}
+//____________________________________________________________________________
+
+
+	template <typename TSTree, typename TSpec>
+	struct Size< Iter<TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > > {
+		typedef typename Size<TSTree>::Type Type;
+	};
+
+	template <typename TSTree>
+	struct Size< Iter<MaxRepeat<TSTree>, MaxRepeatOccurrences> > {
+		typedef typename Size<TSTree>::Type Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Iterator wrappers
+	//////////////////////////////////////////////////////////////////////////////
+
+	// iterates over all supermaximal repeats
+	template <typename TSTree>
+	struct Iterator< TSTree, SuperMaxRepeats > {
+		typedef Iter< TSTree, VSTree< BottomUp<SuperMaxRepeats> > > Type;
+	};
+//____________________________________________________________________________
+
+	// iterates over all maximal unique matches
+	template <typename TSTree>
+	struct Iterator< TSTree, SuperMaxRepeatsFast > {
+		typedef Iter< TSTree, VSTree< BottomUp<SuperMaxRepeatsFast> > > Type;
+	};
+//____________________________________________________________________________
+
+	// iterates over all maximal repeat structures
+	template <typename TSTree, typename TSpec>
+	struct Iterator< TSTree, MaxRepeats_<TSpec> > {
+		typedef Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > Type;
+	};
+//____________________________________________________________________________
+
+	// iterates over all maximal repeat pairs of a repeat structure
+
+	// Iterator of Iterator<TIndex, MaxRepeats>
+	template <typename TSTree, typename TSpec>
+	struct Iterator< Iter< TSTree, TSpec >, MaxRepeatOccurrences > {
+		typedef Iter< MaxRepeat<TSTree>, MaxRepeatOccurrences > Type;
+	};
+
+	template <typename TSTree, typename TSpec>
+	struct DefaultIteratorSpec< Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > > {
+		typedef MaxRepeatOccurrences Type;
+	};
+
+	// alternative (use MaxRepeat<TIndex> as a wrapper in between)
+	template <typename TSTree>
+	struct Iterator< MaxRepeat<TSTree>, MaxRepeatOccurrences > {
+		typedef Iter <MaxRepeat<TSTree>, MaxRepeatOccurrences > Type;
+	};
+
+	template <typename TSTree>
+	struct DefaultIteratorSpec< MaxRepeat<TSTree> > {
+		typedef MaxRepeatOccurrences Type;
+	};
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_esa_algs_multi.h b/src/SeqAn-1.3/seqan/index/index_esa_algs_multi.h
new file mode 100644
index 0000000..8b9ac22
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_esa_algs_multi.h
@@ -0,0 +1,720 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_ESA_ALGS_MULTI_H
+#define SEQAN_HEADER_INDEX_ESA_ALGS_MULTI_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+	
+	//////////////////////////////////////////////////////////////////////////////
+	// more sophisticated algorithms on suffix trees of
+	// multiple sequences (generalized suffix tree)
+	//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Spec.Mums Iterator:
+..cat:Index
+..general:Spec.BottomUp Iterator
+..summary:Iterator to search for all maximum unique matches.
+..signature:Iterator<TContainer, Mums>::Type
+..signature:Iter<TContainer, VSTree< BottomUp<Mums> > >
+..param.TContainer:Type of an index that can be iterated with a bottom-up iterator.
+...type:Spec.IndexEsa
+...metafunction:Metafunction.Container
+..include:seqan/index.h
+
+.Memfunc.Mums Iterator#Iterator
+..class:Spec.Mums Iterator
+..summary:Constructor
+..signature:Iterator(index[, minLength])
+..signature:Iterator(iterator)
+..param.index:An index object.
+..param.minLength:Minimum length of the maximal unique matches, default value is 1.
+..param.iterator:Another Mums iterator. (copy constructor)
+...type:Spec.Mums Iterator
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Mums - generalized suffix tree version
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TSTree >
+	struct GetVSTreeIteratorTraits< Iter< TSTree, VSTree< BottomUp<Mums> > > > {
+		typedef PostorderEmptyEdges	Type;
+	};
+
+	template < typename TSTree >
+	class Iter< TSTree, VSTree< BottomUp<Mums> > >:
+		public Iter< TSTree, VSTree< BottomUp<> > > 
+	{
+	public:
+		typedef Iter< TSTree, VSTree< BottomUp<> > >	TBase;
+		typedef typename Size<TSTree>::Type				TSize;
+		typedef VectorSet_<TSize, Alloc<> >				TSeqSet;
+//____________________________________________________________________________
+
+		TSize		minLength;
+		TSize		seqCount;
+		TSeqSet		seqSet;
+//____________________________________________________________________________
+
+		Iter(TSTree &_tree):
+			TBase(_tree),
+			minLength(1),
+			seqCount(countSequences(_tree)),
+			seqSet(countSequences(_tree))
+		{
+			indexRequire(_tree, EsaBwt());
+			goNext(*this);	// the iterator starts in a suffix, i.e. not a MUM node (length(occ)<2<=seqCount)
+		}
+
+		Iter(TSTree &_tree, MinimalCtor):
+			TBase(_tree, MinimalCtor()) {}
+
+		Iter(TSTree &_tree, TSize _minLength):
+			TBase(_tree),
+			minLength(_minLength),
+			seqCount(countSequences(_tree)),
+			seqSet(countSequences(_tree))
+		{
+			indexRequire(_tree, EsaBwt());
+			goNext(*this);	// the iterator starts in a suffix, i.e. not a MUM node (length(occ)<2<=seqCount)
+		}
+
+		Iter(Iter const &_origin):
+			TBase((TBase const &)_origin),
+			minLength(_origin.minLength),
+			seqCount(countSequences(container(_origin))),
+			seqSet(countSequences(container(_origin))) {}
+	};
+
+	template < typename TSTree >
+	inline void goNext(Iter< TSTree, VSTree< BottomUp<Mums> > > &it) {
+		do {
+			goNext(it, PostorderEmptyEdges());
+		} while (!atEnd(it) && 
+			     !(	(countOccurrences(it) == it.seqCount) && 
+					(repLength(it) >= it.minLength) &&
+					isUnique(it, it.seqSet) && 
+					isLeftMaximal(it)) );
+	}
+
+
+
+	
+/**
+.Spec.MultiMems Iterator:
+..cat:Index
+..general:Spec.BottomUp Iterator
+..summary:Iterator to search for MultiMems.
+..signature:Iterator<TContainer, MultiMems>::Type
+..signature:Iter<TContainer, VSTree< BottomUp<MultiMems> > >
+..param.TContainer:Type of an index that can be iterated with a bottom-up iterator.
+...type:Spec.IndexEsa
+...metafunction:Metafunction.Container
+..include:seqan/index.h
+
+.Memfunc.MultiMems Iterator#Iterator
+..class:Spec.MultiMems Iterator
+..summary:Constructor
+..signature:Iterator(index[, minLength])
+..signature:Iterator(iterator)
+..param.index:An index object.
+..param.minLength:Minimum length of the multiple maximal exact matches, default value is 1.
+..param.iterator:Another MultiMems iterator. (copy constructor)
+...type:Spec.MultiMems Iterator
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// MultiMems
+	//////////////////////////////////////////////////////////////////////////////
+
+	// contains a set of fraction compounds
+	// one compound for each sequence
+	template <typename TValue, typename TSize>
+	struct FractionMultiCompound_ {
+		typedef FractionCompound_<TValue, TSize>	TCompound;
+		typedef String<TCompound>					TSet;	// seqNo..unsigned, compound: bwt character->suffixes
+
+		TSet	set;
+	};
+
+
+	template < typename TSTree >
+	class Iter< TSTree, VSTree< BottomUp<MultiMems> > >:
+		public Iter< TSTree, VSTree< BottomUp<> > > 
+	{
+	public:
+		typedef Iter< TSTree, VSTree< BottomUp<> > >	TBase;
+		typedef typename Value<TSTree>::Type			TValue;
+		typedef typename Size<TSTree>::Type				TSize;
+
+		typedef FractionMultiCompound_<TValue, TSize>	TMultiCompound;
+		typedef String<TMultiCompound, Block<> >		TSetStack;
+		typedef String<TSize>							TPositionList;
+		
+		typedef typename TMultiCompound::TSet			TSet;
+		typedef typename Iterator<TSet>::Type			TSetIterator;
+
+		typedef typename TBase::TStackEntry				TStackEntry;
+
+//____________________________________________________________________________
+
+		TSize			minLength;
+		unsigned		minSupport;	// the support is the number of distinct sequences
+		unsigned		maxSupport;	// a repeat/match occurs in
+		TSetStack		setStack;
+		TPositionList	posList;	// this list is indexed just as SA is and contains the next entry's index
+		bool			canMerge;	// is false, if parent node appears after its first child on stack
+//____________________________________________________________________________
+
+		Iter(TSTree &_index):
+			TBase(_index, MinimalCtor()),
+			minSupport(countSequences(_index)),
+			maxSupport(countSequences(_index)),
+			canMerge(true)
+		{
+			indexRequire(_index, EsaSA());
+			indexRequire(_index, EsaLcp());
+			indexRequire(_index, EsaBwt());
+			resize(posList, length(_index));
+
+			if (!empty(indexSA(_index))) 
+			{
+				TStackEntry e;
+				e.range.i1 = 0;
+				e.range.i2 = 0;
+				_dfsOnPush(*this, e);
+				goNext(*this);
+			}
+		}
+
+		Iter(TSTree &_tree, MinimalCtor):
+			TBase(_tree, MinimalCtor()) {}
+
+		Iter(TSTree &_index, TSize _minLength):
+			TBase(_index, MinimalCtor()),
+			minLength(_minLength),
+			minSupport(countSequences(_index)),
+			maxSupport(countSequences(_index)),
+			canMerge(true)
+		{
+			indexRequire(_index, EsaSA());
+			indexRequire(_index, EsaLcp());
+			indexRequire(_index, EsaBwt());
+			resize(posList, length(_index));
+
+			if (!empty(indexSA(_index))) 
+			{
+				TStackEntry e;
+				e.range.i1 = 0;
+				e.range.i2 = 0;
+				_dfsOnPush(*this, e);
+				goNext(*this);
+			}
+		}
+
+		Iter(Iter const &_origin):
+			TBase((TBase const &)_origin),
+			minLength(_origin.minLength),
+			minSupport(_origin.minSupport),
+			maxSupport(_origin.maxSupport),
+			setStack(_origin.setStack),
+			posList(_origin.posList),
+			canMerge(_origin.canMerge) {}
+
+//____________________________________________________________________________
+
+		inline bool hasRepeats() 
+		{
+			if (length(setStack) < 2) return false;
+
+			TMultiCompound &child  = top(setStack);
+			TMultiCompound &parent = topPrev(setStack);
+
+			TValue prevKey = TValue();
+			TValue equalKey = TValue();
+
+			unsigned distinctSeqs = 0;
+			bool distinctKeys = false;
+
+			TSetIterator parentCompound	= begin(parent.set);
+			TSetIterator parentEnd		= end(parent.set);
+			TSetIterator childCompound	= begin(child.set);
+			TSetIterator childEnd		= end(child.set);
+
+			while (childCompound != childEnd && parentCompound != parentEnd)
+			{
+				int result = _haveMaximalRepeats(*childCompound, *parentCompound, equalKey);
+				if (result > 0) {
+					if (!distinctKeys && result == 1) {
+						if (distinctSeqs > 0 && prevKey != equalKey)
+							distinctKeys = true;						// there is a left maximal repeat
+						prevKey = equalKey;
+					} else
+						distinctKeys = true;
+
+					if (++distinctSeqs > minSupport && distinctKeys)	// if it is also a  repeat in at least
+						return true;									// minSequences distinct sequences then
+				}														// we have at least one repeat
+				++childCompound;
+				++parentCompound;
+			}
+			return false;
+		}
+/*
+		inline TSize countRepeats() 
+		{
+			if (length(setStack) < 2) return 0;
+
+			TFractionCompound &child  = top(setStack);
+			TFractionCompound &parent = topPrev(setStack);
+
+			TSetIterator childFraction	= begin(child.set);
+			TSetIterator childEnd		= end(child.set);
+			TSetIterator parentFraction	= begin(parent.set);
+			TSetIterator parentEnd		= end(parent.set);
+
+			TSize sum = 0;
+			for(; childFraction != childEnd; ++childFraction) {
+				for(; parentFraction != parentEnd; ++parentFraction) {
+					if (keyOf(childFraction) != keyOf(parentFraction))
+						sum += (*childFraction).size * (*parentFraction).size;
+
+					sum += child.leftmost.size * (*parentFraction).size;
+				}
+				sum += (*childFraction).size * parent.leftmost.size;
+			}
+			sum += child.leftmost.size * parent.leftmost.size;
+			return sum;
+		}
+*/
+//____________________________________________________________________________
+/*
+		inline void _dump() const {
+			::std::cerr << "SETSTACK of " << representative(*this) << ":" << ::std::endl;
+			typename Iterator<TSetStack const>::Type it = begin(setStack), itEnd = end(setStack);
+			while (it != itEnd) {
+				TSet const &set = (*it).set;
+				typename Iterator<TSet const>::Type sit = begin(set), sitEnd = end(set);
+
+				while (sit != sitEnd) {
+					::std::cerr << keyOf(sit) << "::";
+					typename TFractionCompound::TFractionHeader head = objectOf(sit);
+					TSize i = head.begin;
+					while (!_isSizeInval(i)) {
+						::std::cerr << i << "  ";
+						i = posList[i];
+					}
+					::std::cerr << ::std::endl;
+					++sit;
+				}
+
+				::std::cerr << "_________________________" << ::std::endl;
+				++it;
+			}
+		}
+*/
+	};
+
+	// add bwt partitions of child to parent node
+	template < typename TSTree, typename TSpec, typename TValue, typename TSize >
+	inline void _fractionMerge(
+		Iter<TSTree, VSTree< BottomUp<TSpec> > > &it, 
+		FractionMultiCompound_<TValue, TSize> &parent,
+		FractionMultiCompound_<TValue, TSize> &child)
+	{
+		typedef FractionMultiCompound_<TValue, TSize>	TCompound;
+		typedef typename TCompound::TSet				TSet;
+		typedef typename Iterator<TSet, Standard>::Type	TSetIterator;
+
+		TSetIterator parentCompound	= begin(parent.set, Standard());
+		TSetIterator parentEnd		= end(parent.set, Standard());
+		TSetIterator childCompound	= begin(child.set, Standard());
+		TSetIterator childEnd		= end(child.set, Standard());
+
+		while (childCompound != childEnd && parentCompound != parentEnd)
+		{
+			// append child compound to parent compound
+			_fractionMerge(it, *parentCompound, *childCompound);
+			++childCompound;
+			++parentCompound;
+		}
+	}
+
+	template < typename TSTree >
+	inline void _dfsOnLeaf(Iter<TSTree, VSTree< BottomUp<MultiMems> > > &it) 
+	{
+		typedef Iter<TSTree, VSTree< BottomUp<> > > TBase;
+		_dfsOnLeaf((TBase&)it);
+
+		typedef typename Value<TSTree>::Type		TValue;
+		typedef typename Size<TSTree>::Type			TSize;
+		typedef typename SAValue<TSTree>::Type		TSAValue;
+		typedef FractionHeader_<TSize>				TFractionHeader;
+		typedef Pair<TValue, TFractionHeader>		TFraction;
+		typedef typename Set<TFraction>::Type		TFractionSet;
+
+		typedef FractionCompound_<TValue, TSize>	TCompound;
+		typedef Pair<unsigned, TCompound>			TCompoundPair;
+		typedef typename Set<TCompoundPair>::Type	TSet;
+
+		push(it.setStack);
+
+		TSTree &index = container(it);
+
+		TSize		gPos = posGlobalize(_dfsRange(it).i1, stringSetLimits(index));
+		TSAValue	lPos;
+		posLocalize(lPos, _dfsRange(it).i1, stringSetLimits(index));
+
+		TCompound &compound = top(it.setStack).set[getValueI1(lPos)];
+		if (!posAtFirstLocal(lPos))
+			insert(
+				TFraction(
+					bwtAt(gPos, container(it)),
+					TFractionHeader(gPos, gPos, 1)), 
+				compound.set);
+		else
+			compound.leftmost = TFractionHeader(gPos, gPos, 1);
+
+		_setSizeInval(it.posList[gPos]);
+/*
+		::std::cerr << "LEAF ";
+		_dumpHistoryStack(it);
+		it._dump();
+*/	}
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// maximal repeat representation
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TSTree>
+	struct MultiMem {
+//		Iter< TSTree, VSTree<BottomUp<MultiMems> > > ⁢
+	};
+
+	template <typename TSTree>
+	struct Value< MultiMem<TSTree> > {
+		typedef Pair< typename SAValue<TSTree>::Type > Type;
+	};
+
+	template <typename TSTree>
+	struct Size< MultiMem<TSTree> > {
+		typedef typename Size<TSTree>::Type Type;
+	};
+
+
+	template <typename TSTree>
+	inline typename Size< MultiMem<TSTree> >::Type 
+	length(MultiMem<TSTree> const &repeat) {
+		return repeat.it.countRepeats();
+	}
+
+/*
+	template <typename TSTree>
+	inline typename Iterator< MultiMem<TSTree> >::Type 
+	begin(MultiMem<TSTree> &repeat) {
+		return Iterator< MultiMem<TSTree> >::Type(repeat.it);
+	}
+
+	template <typename TSTree>
+	inline typename Iterator< MultiMem<TSTree> const >::Type 
+	begin(MultiMem<TSTree> const &repeat) {
+		return Iterator< MultiMem<TSTree> >::Type(repeat.it);
+	}
+*/
+
+
+	template <typename TSTree>
+	class Iter< MultiMem<TSTree>, MultiMemOccurences > {
+	public:
+
+		typedef typename Value<TSTree>::Type	TValue;
+		typedef typename Size<TSTree>::Type		TSize;
+		typedef typename SAValue<TSTree>::Type	TSAValue;
+		typedef	Pair<TSAValue>					TPair;
+
+		typedef FractionCompound_<TValue, TSize> const	TFractionCompound;
+		typedef typename TFractionCompound::TSet const	TSet;
+		typedef typename Iterator<TSet>::Type			TSetIterator;
+
+		typedef Iter<TSTree, VSTree<BottomUp<MultiMems> > >	const	TIterator;
+		typedef typename TIterator::TPositionList const				TPositionList;
+
+		TIterator	*mmemIt;
+		bool		_atEnd;
+		unsigned	seqCount;
+		TPair		tmp;
+	
+		
+		// for every sequence there is a SubState stucture
+		// storing the current enumeration state
+		// that is necessary to enumerate every combination
+		// of left maximal multi match
+
+		struct SubState 
+		{
+			SubState			*prevState;
+			TPositionList		*posList;
+			TFractionCompound	*child, *parent;
+			TSize				childPtr, parentPtr;			// per seq. suffix iterators
+			TSetIterator		childFraction,  childBegin,  childEnd;
+			TSetIterator		parentFraction, parentBegin, parentEnd;	
+			bool				leftmostChild, leftmostParent;	// use undef. bwt (leftmost) set
+			TValue				leftChar;						// are the keys of seq[1..i] equal?
+			bool				charsEqual;
+
+			inline void _updateLeftMaximality() {
+				if (prevState)
+					charsEqual = prevState->charsEqual && (leftChar == keyOf(childFraction));
+			}
+
+			inline bool _innerStep()
+			{
+				if (_isSizeInval(childPtr = ((*posList)[childPtr]))) {
+					if (_isSizeInval(parentPtr = (*posList)[parentPtr])) {
+						parentPtr = objectOf(parentFraction).begin;
+						return false;
+					}
+					childPtr = objectOf(childFraction).begin;
+				}
+				return true;
+			}
+
+			inline void _firstParentFraction()
+			{
+				parentBegin		= parentFraction	= begin(parent->set);
+				parentEnd		= end(parent->set);
+
+				if (parentFraction != parentEnd) {
+					leftmostParent = false;
+					parentPtr = objectOf(parentFraction).begin;
+				} else {
+					leftmostParent = true;
+					parentPtr = parent->leftmost.begin;
+				}
+
+				leftChar = keyOf(parentFraction);
+			}
+
+			inline void _firstChildFraction() 
+			{
+				childBegin		= childFraction		= begin(child->set);
+				childEnd		= end(child->set);
+
+				if (childFraction != childEnd) {
+					leftmostChild = false;
+					childPtr = objectOf(childFraction).begin;
+				} else {
+					leftmostChild = true;
+					childPtr = child->leftmost.begin;
+				}
+			}
+
+			inline bool _nextParentFraction() 
+			{
+				if (leftmostParent) return false;
+
+				if (++parentFraction == parentEnd) {
+					if (parent->leftmost.size > 0) {
+						leftmostParent = true;
+						parentPtr = parent->leftmost.begin;
+					} else
+						return false;
+				} else
+					parentPtr = objectOf(parentFraction).begin;
+
+				return true;
+			}
+
+			inline bool _nextChildFraction() 
+			{
+				if (leftmostChild) return false;
+
+				if (++childFraction == childEnd) {
+					if (child->leftmost.size > 0) {
+						leftmostChild = true;
+						childPtr = child->leftmost.begin;
+					} else
+						return false;
+				} else
+					childPtr = objectOf(childFraction).begin;
+
+				return true;
+			}
+
+			// single per-sequence enumeration step
+			inline bool _outerStep() 
+			{
+				if (!_nextChildFraction()) {
+					_firstChildFraction();
+					if (!_nextParentFraction()) {
+						_firstParentFraction();
+						return false;
+					}
+				}
+				return true;
+			}
+
+		};
+
+		String<SubState>	subState;
+
+
+		inline Iter(Iter<TSTree, VSTree<BottomUp<MultiMems> > > const &_maxIt):
+			mmemIt(&_maxIt),
+			seqCount(countSequences(container(_maxIt)))
+		{
+			_init();
+		}
+
+		inline bool _isLeftMaximal() {
+			return !subState[seqCount - 1].charsEqual;
+		}
+		
+		// inner enumeration
+		inline bool _innerStep() {
+			for(unsigned seq = 0; seq < seqCount; ++seq)
+				if (subState[seq]._innerStep()) return true;
+			return false;
+		}
+
+		inline bool _outerStepNoCheck() {
+			for(unsigned seq = 0; seq < seqCount; ++seq)
+				if (subState[seq]._outerStep()) return true;
+			return false;
+		}
+
+		// outer enumeration
+		inline bool _outerStep() {
+			while (!((_atEnd = !_outerStepNoCheck()) || _isLeftMaximal())) ;
+			return !_atEnd;
+		}
+
+		inline void _init() 
+		{
+			if (length(mmemIt->setStack) < 2) {
+				_atEnd = true;
+				return;
+			}
+
+			resize(subState, seqCount);
+			SubState *prev = NULL;
+			for(unsigned seq = 0; seq < seqCount; ++seq)
+			{
+				SubState &state = subState[seq];
+
+				state.prevState = prev;
+				state.posList = &(mmemIt->posList);
+				state.parent = &(topPrev(mmemIt->setStack).set[seq]);
+				state.child = &(top(mmemIt->setStack).set[seq]);
+
+				state._firstChildFraction();
+				state._firstParentFraction();
+
+				prev = &state;
+			}
+
+			_atEnd = false;
+			while (!(_isLeftMaximal() || (_atEnd = !_outerStep()))) ;
+		}
+	};
+
+
+	template < typename TRepeat >
+	inline typename Value< Iter<TRepeat, MultiMemOccurences> >::Type &
+	value(Iter<TRepeat, MultiMemOccurences> const &it)  {
+		return it.tmp;
+	}
+
+	template < typename TRepeat >
+	inline typename Value< Iter<TRepeat, MultiMemOccurences> >::Type &
+	value(Iter<TRepeat, MultiMemOccurences> &it)  {
+		return it.tmp;
+	}
+
+//TODO:fix me
+	template < typename TRepeat >
+	inline Iter<TRepeat, MultiMemOccurences> &
+	goNext(Iter<TRepeat, MultiMemOccurences> &it)  {
+		if (it._innerStep()) {
+//			it.tmp.i1 = saAt(it.subState.parentPtr, container(*it.mmemIt));
+//			it.tmp.i2 = saAt(it.subState.childPtr, container(*it.mmemIt));
+			return it;
+		}
+		if (it._outerStep()) {
+//			it.tmp.i1 = saAt(it.subState.parentPtr, container(*it.mmemIt));
+//			it.tmp.i2 = saAt(it.subState.childPtr, container(*it.mmemIt));
+		}
+		return it;
+	}
+
+	template < typename TRepeat >
+	inline bool atEnd(Iter<TRepeat, MultiMemOccurences> const &it) {
+		return it._atEnd;
+	}
+
+	template < typename TRepeat >
+	inline bool atEnd(Iter<TRepeat, MultiMemOccurences> &it) {
+		return it._atEnd;
+	}
+
+
+	template <typename TSTree>
+	struct Iterator< MultiMem<TSTree> > {
+		typedef Iter<MultiMem<TSTree>, MultiMemOccurences> Type;
+	};
+
+	template <typename TSTree>
+	struct Size< Iter<MultiMem<TSTree>, MultiMemOccurences> > {
+		typedef typename Size<TSTree>::Type Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Iterator wrappers
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TObject>
+	struct Iterator< TObject, Mums > {
+		typedef Iter< TObject, VSTree< BottomUp<Mums> > > Type;
+	};
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_esa_base.h b/src/SeqAn-1.3/seqan/index/index_esa_base.h
new file mode 100644
index 0000000..225d490
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_esa_base.h
@@ -0,0 +1,434 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_ESA_BASE_H
+#define SEQAN_HEADER_INDEX_ESA_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	// dfs order
+	struct Preorder_;
+	struct Postorder_;
+
+	template <typename TDfsOrder = Postorder_, typename THideEmptyEdges = True>
+	struct VSTreeIteratorTraits {
+		typedef TDfsOrder DfsOrder;
+		typedef THideEmptyEdges HideEmptyEdges;
+	};
+
+/**
+.Tag.Preorder:
+..summary:Preorder depth-first search.
+..cat:Index
+..signature:Preorder
+..remarks:When given as a second parameter in @Function.goNext@ the Suffix Tree is traversed in a preorder fashion (visit the node before its children).
+..see:Tag.Postorder
+..include:seqan/index.h
+*/
+
+/**
+.Tag.Postorder:
+..summary:Postorder depth-first search.
+..cat:Index
+..signature:Postorder
+..remarks:When given as a second parameter in @Function.goNext@ the Suffix Tree is traversed in a postorder fashion (visit the node after its children).
+..see:Tag.Preorder
+..include:seqan/index.h
+*/
+
+/**
+.Tag.PreorderEmptyEdges:
+..summary:Preorder depth-first search in a suffix tree with leaves for every suffix.
+..cat:Index
+..signature:PreorderEmptyEdges
+..remarks:When given as a second parameter in @Function.goNext@ the Suffix Tree is traversed in a preorder fashion (visit the node before its children).
+Empty edges are traversed also, i.e. for every suffix there is a leaf node representing it.
+..see:Tag.PostorderEmptyEdges
+..see:Tag.Preorder
+..include:seqan/index.h
+*/
+
+/**
+.Tag.PostorderEmptyEdges:
+..summary:Postorder depth-first search in a suffix tree with leaves for every suffix.
+..cat:Index
+..signature:PostorderEmptyEdges
+..remarks:When given as a second parameter in @Function.goNext@ the Suffix Tree is traversed in a postorder fashion (visit the node after its children).
+Empty edges are traversed also, i.e. for every suffix there is a leaf node representing it.
+..see:Tag.Postorder
+..include:seqan/index.h
+*/
+
+/**
+.Tag.EmptyEdges:
+..summary:Consider a suffix tree with leaves for every suffix.
+..cat:Index
+..signature:EmptyEdges
+..remarks:When given as a second parameter in @Function.goDown@, empty edges are traversed also, i.e. for every suffix there is a leaf node representing it.
+..see:Tag.HideEmptyEdges
+..include:seqan/index.h
+*/
+
+/**
+.Tag.HideEmptyEdges:
+..summary:Consider a suffix tree with no empty edges (default behaviour).
+..cat:Index
+..signature:HideEmptyEdges
+..remarks:When given as a second parameter in @Function.goDown@, only non-empty edges are traversed.
+..see:Tag.EmptyEdges
+..include:seqan/index.h
+*/
+
+	// predefined iterator traits
+	struct Preorder:			VSTreeIteratorTraits<Preorder_,  True> {};
+	struct Postorder:			VSTreeIteratorTraits<Postorder_, True> {};
+	struct PreorderEmptyEdges:	VSTreeIteratorTraits<Preorder_,  False> {};	// also iterate over
+	struct PostorderEmptyEdges:	VSTreeIteratorTraits<Postorder_, False> {};	// empty edges (with $-label)
+
+	// traits for TopDown iterators (w/o ParentLinks) for which postorder/preorder is ignored
+	struct HideEmptyEdges:		VSTreeIteratorTraits<Postorder_, True> {};
+	struct EmptyEdges:			VSTreeIteratorTraits<Postorder_, False> {};	// empty edges (with $-label)
+	
+	// MultiMems are more specialized MaxRepeats
+	template <typename TSpec = void>
+	struct MaxRepeats_;	// base class
+	struct MultiMems_;	// subclass tag
+
+
+
+	// virtual suffix tree iterators
+	template <typename TSpec = void>
+	struct VSTree;
+
+		// top down traversal iterators
+		template <typename TSpec = Preorder>
+		struct TopDown {};					// starts in the suffix tree root and can go down and go right
+
+			// allows an top-down iterator to go up
+			template < typename TSpec = Preorder >
+			struct ParentLinks {};			// .. can also go up
+
+		// bottom up traversal iterators
+		template <typename TSpec = Postorder>
+		struct BottomUp {};					// starts in the first node of a depth-first-search and can go next
+
+			struct	SuperMaxRepeats;					// maximal repeat and not part of a longer repeat
+			struct	SuperMaxRepeatsFast;
+			struct	Mums;								// Maximal Unique Match (unique in every sequence)
+
+			typedef MaxRepeats_<void>		MaxRepeats;	// maximal repeat
+			struct	MaxRepeatOccurrences;
+			typedef MaxRepeats_<MultiMems_> MultiMems;	// Multiple Maximal Exact Match
+			struct	MultiMemOccurences;					// i.e. maximal match over different sequences
+
+
+/**
+.Metafunction.GetVSTreeIteratorTraits:
+..cat:Index
+..summary:Default behaviour of @Function.goNext@ when no second parameter is given.
+..signature:GetVSTreeIteratorTraits<TIterator>::Type
+..param.TIterator:A @Spec.VSTree Iterator at .
+..returns:$Tag.Postorder$ by default and $Tag.Preorder$ if $TIterator$ is $VSTree<TopDown<ParentLinks<> > >$ or $VSTree<TopDown<ParentLinks<Preorder> > >$.
+..include:seqan/index.h
+*/
+
+	template <typename TIterator>
+	struct GetVSTreeIteratorTraits:
+		DeepestSpec<TIterator> {};
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TSize>
+	struct VertexEsa {
+		Pair<TSize> range;			// current SA interval of hits (unique node identifier)
+		TSize		parentRight;	// right boundary of parent node's range (allows to go right)
+
+		VertexEsa() {}
+
+		VertexEsa(MinimalCtor):
+			range(0,0),
+			parentRight(0) {}
+
+		VertexEsa(TSize otherRangeLeft, TSize otherRangeRight, TSize otherParentRight):
+			range(Pair<TSize>(otherRangeLeft, otherRangeRight)),
+			parentRight(otherParentRight) {}
+
+		VertexEsa(Pair<TSize> const &otherRange, TSize otherParentRight):
+			range(otherRange),
+			parentRight(otherParentRight) {}
+
+		VertexEsa(VertexEsa const &other):
+			range(other.range),
+			parentRight(other.parentRight) {}
+	};
+	
+	template <typename TSize>
+	inline bool operator==(VertexEsa<TSize> const &a, VertexEsa<TSize> const &b)
+	{
+		return a.range == b.range;
+	}
+
+	template <typename TSize>
+	inline bool operator!=(VertexEsa<TSize> const &a, VertexEsa<TSize> const &b)
+	{
+		return a.range != b.range;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Metafunction.VertexDescriptor.param.T.type:Spec.IndexEsa
+
+	template < typename TText, typename TSpec >
+	struct VertexDescriptor< Index<TText, IndexEsa<TSpec> > > {
+		typedef typename Size< Index<TText, IndexEsa<TSpec> > >::Type TSize;
+		typedef VertexEsa<TSize> Type;
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// needful forward declarations
+
+	struct ArrayGaps;
+
+	template <typename TSource, typename TSpec>
+	class Align;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// ESA fibres
+
+/**
+.Tag.ESA Index Fibres
+..summary:Tag to select a specific fibre (e.g. table, object, ...) of an @Spec.IndexEsa.ESA@ index.
+..remarks:These tags can be used to get @Metafunction.Fibre.Fibres@ of an Enhanced Suffix Array based @Spec.IndexEsa.Index at .
+..cat:Index
+
+..tag.EsaText:The original text the index should be based on.
+
+..tag.EsaRawText:The raw text the index is really based on.
+...remarks:$EsaText$ and $EsaRawText$ fibres are equal by default.
+They differ if the index text is a set of strings. Then, raw text is the concatenation of all strings in this set.
+
+..tag.EsaSA:The suffix array.
+...remarks:The suffix array contains the indices of all suffices of $EsaRawText$ in lexicographical order.
+...remarks:@Metafunction.Fibre@ returns a @Class.String@ over the alphabet of the @Metafunction.SAValue@ of $TIndex$.
+
+..tag.EsaLcp:The lcp table.
+...remarks:The lcp table contains the lcp-value of two adjacent suffices in the suffix array $EsaSA$.
+...remarks:@Metafunction.Fibre@ returns a @Class.String@ over the alphabet of a size type.
+
+..tag.EsaChildtab:The child table.
+...remarks:The child table contains structural information of the suffix tree (see Abhouelda et al.).
+...remarks:@Metafunction.Fibre@ returns a @Class.String@ over the alphabet of a size type.
+
+..tag.EsaBwt:The Burrows-Wheeler table.
+...remarks:The Burrows-Wheeler table contains the Burrows-Wheeler transformation of $EsaRawText$.
+The entries are the characters left of the corresponding suffix in the suffix array $EsaSA$.
+...remarks:@Metafunction.Fibre@ returns the same type for $EsaRawText$ and for $EsaBwt$.
+
+..see:Metafunction.Fibre
+..see:Function.getFibre
+..see:Spec.IndexEsa
+..include:seqan/index.h
+*/
+
+///.Metafunction.Fibre.param.TSpec.type:Tag.ESA Index Fibres
+
+	typedef FibreText		EsaText;
+	typedef FibreRawText	EsaRawText;
+	typedef FibreSA		EsaSA;
+	typedef FibreRawSA		EsaRawSA;
+	typedef FibreSae		EsaSae;
+	typedef FibreLcp		EsaLcp;
+	typedef FibreLcpe		EsaLcpe;
+	typedef FibreChildtab	EsaChildtab;
+	typedef FibreBwt		EsaBwt;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// ESA index
+
+/**
+.Spec.IndexEsa:
+..summary:An index based on an enhanced suffix array.
+..cat:Index
+..general:Class.Index
+..signature:Index<TText, IndexEsa<> >
+..param.TText:The text type.
+...type:Class.String
+..remarks:The fibres (see @Class.Index@ and @Metafunction.Fibre@) of this index are a suffix array (see @Tag.ESA Index Fibres.EsaSA@), a lcp table (see @Tag.ESA Index Fibres.EsaLcp@), etc.
+..remarks:This index can be accessed as a Suffix Tree using the @Spec.VSTree Iterator@ classes.
+..include:seqan/index.h
+*/
+
+/*
+	already defined in index_base.h
+
+	template <typename TSpec = void>
+	struct IndexEsa;
+*/
+
+	template < typename TText, typename TSpec >
+	class Index<TText, IndexEsa<TSpec> > {
+	public:
+		Holder<typename Fibre<Index, EsaText>::Type>	text;
+		typename Fibre<Index, EsaSA>::Type				sa;			// suffix array 
+		typename Fibre<Index, EsaLcp>::Type			lcp;		// longest-common-prefix table
+		typename Fibre<Index, EsaLcpe>::Type			lcpe;		// extended lcp table
+		typename Fibre<Index, EsaChildtab>::Type		childtab;	// child table (tree topology)
+		typename Fibre<Index, EsaBwt>::Type			bwt;		// burrows-wheeler table
+		typename Cargo<Index>::Type						cargo;		// user-defined cargo
+
+		Index() {}
+
+		Index(Index &other):
+			text(other.text),
+			sa(other.sa),
+			lcp(other.lcp),
+			lcpe(other.lcpe),
+			childtab(other.childtab),
+			bwt(other.bwt),
+			cargo(other.cargo) {}
+
+		Index(Index const &other):
+			text(other.text),
+			sa(other.sa),
+			lcp(other.lcp),
+			lcpe(other.lcpe),
+			childtab(other.childtab),
+			bwt(other.bwt),
+			cargo(other.cargo) {}
+
+		template <typename TText_>
+		Index(TText_ &_text):
+			text(_text) {}
+
+		template <typename TText_>
+		Index(TText_ const &_text):
+			text(_text) {}
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TText, typename TSpec >
+	void _indexRequireTopDownIteration(Index<TText, IndexEsa<TSpec> > &index) 
+	{
+		indexRequire(index, EsaSA());
+		indexRequire(index, EsaLcp());
+		indexRequire(index, EsaChildtab());
+	}
+
+	template < typename TText, typename TSpec >
+	void _indexRequireBottomUpIteration(Index<TText, IndexEsa<TSpec> > &index) 
+	{
+		indexRequire(index, EsaSA());
+		indexRequire(index, EsaLcp());
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.clear.param.object.type:Class.Index
+
+	template <typename TText, typename TSpec>
+	inline void clear(Index<TText, IndexEsa<TSpec> > &index) {
+		clear(getFibre(index, EsaSA()));
+		clear(getFibre(index, EsaLcp()));
+		clear(getFibre(index, EsaLcpe()));
+		clear(getFibre(index, EsaChildtab()));
+		clear(getFibre(index, EsaBwt()));
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// open
+
+	template < typename TObject, typename TSpec >
+	inline bool open(
+		Index< TObject, IndexEsa<TSpec> > &index, 
+		const char *fileName,
+		int openMode)
+	{
+		String<char> name;
+		name = fileName;	append(name, ".txt");	
+
+		bool result = true;
+		if ((!open(getFibre(index, EsaText()), toCString(name), openMode)) && 
+			(!open(getFibre(index, EsaText()), fileName, openMode))) 
+			result = false;
+
+		name = fileName;	append(name, ".sa");	open(getFibre(index, EsaSA()), toCString(name), openMode);
+		name = fileName;	append(name, ".lcp");	open(getFibre(index, EsaLcp()), toCString(name), openMode);
+		name = fileName;	append(name, ".child");	open(getFibre(index, EsaChildtab()), toCString(name), openMode);
+		name = fileName;	append(name, ".bwt");	open(getFibre(index, EsaBwt()), toCString(name), openMode);
+		return result;
+	}
+	template < typename TObject, typename TSpec >
+	inline bool open(
+		Index< TObject, IndexEsa<TSpec> > &index, 
+		const char *fileName) 
+	{
+		return open(index, fileName, DefaultOpenMode<Index< TObject, IndexEsa<TSpec> > >::VALUE);
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// save
+
+	template < typename TObject, typename TSpec >
+	inline bool save(
+		Index< TObject, IndexEsa<TSpec> > &index, 
+		const char *fileName,
+		int openMode)
+	{
+		String<char> name;
+		name = fileName;	append(name, ".txt");	
+		if ((!save(getFibre(index, EsaText()), toCString(name), openMode)) && 
+			(!save(getFibre(index, EsaText()), fileName, openMode))) return false;
+
+		name = fileName;	append(name, ".sa");	save(getFibre(index, EsaSA()), toCString(name), openMode);
+		name = fileName;	append(name, ".lcp");	save(getFibre(index, EsaLcp()), toCString(name), openMode);
+		name = fileName;	append(name, ".child");	save(getFibre(index, EsaChildtab()), toCString(name), openMode);
+		name = fileName;	append(name, ".bwt");	save(getFibre(index, EsaBwt()), toCString(name), openMode);
+		return true;
+	}
+	template < typename TObject, typename TSpec >
+	inline bool save(
+		Index< TObject, IndexEsa<TSpec> > &index, 
+		const char *fileName)
+	{
+		return save(index, fileName, DefaultOpenMode<Index< TObject, IndexEsa<TSpec> > >::VALUE);
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_esa_drawing.h b/src/SeqAn-1.3/seqan/index/index_esa_drawing.h
new file mode 100644
index 0000000..d04dda8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_esa_drawing.h
@@ -0,0 +1,108 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_ESA_DRAWING_H
+#define SEQAN_HEADER_INDEX_ESA_DRAWING_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template <typename TFile, typename TText, typename TESASpec>
+void write(TFile & file, 
+	   Index<TText, IndexEsa<TESASpec> > & stree,
+	   DotDrawing) 
+{
+	SEQAN_CHECKPOINT
+	typedef Index<TText, IndexEsa<TESASpec> > TIndex;
+	
+	_streamWrite(file, "digraph G {\n");
+	_streamPut(file, '\n');
+	_streamWrite(file, "/* Graph Attributes */\n");
+	_streamWrite(file, "graph [rankdir = LR];\n");
+	_streamPut(file, '\n');
+	_streamWrite(file, "/* Node Attributes */\n");
+	_streamWrite(file, "node [shape = ellipse, fillcolor = lightgrey, style = filled, fontname = \"Times-Italic\"];\n");
+	_streamPut(file, '\n');
+	_streamWrite(file, "/* Edge Attributes */\n");
+	_streamWrite(file, "edge [fontname = \"Times-Italic\", arrowsize = 0.75, fontsize = 16];\n");
+	_streamPut(file, '\n');
+
+	_streamWrite(file, "/* Edges */\n");
+	typedef typename Iterator<TIndex, TopDown<ParentLinks<Preorder> > >::Type TIterator;
+	typedef typename Iterator<TIndex, TopDown<> >::Type TIteratorSimple;
+	TIterator it(stree);
+
+	for(;!atEnd(it);++it) 
+	{
+		// dump node
+       		_streamWrite(file, "\"[");
+ 		_streamPutInt(file, value(it).range.i1);
+		_streamPut(file, ':');
+		_streamPutInt(file, value(it).range.i2);
+       		_streamWrite(file, ")\"");
+       		if (!isRightTerminal(it))
+			_streamWrite(file, " [style = dashed]");
+       		_streamWrite(file, ";\n");
+
+		// dump edge from parent (if not root)
+		if (!isRoot(it)) {
+			TIteratorSimple src(container(it), nodeUp(it));
+
+			_streamWrite(file, "\"[");
+			_streamPutInt(file, value(src).range.i1);
+			_streamPut(file, ':');
+			_streamPutInt(file, value(src).range.i2);
+			_streamWrite(file, ")\"");
+
+			_streamWrite(file, " -> ");
+
+			_streamWrite(file, "\"[");
+			_streamPutInt(file, value(it).range.i1);
+			_streamPut(file, ':');
+			_streamPutInt(file, value(it).range.i2);
+			_streamWrite(file, ")\"");
+
+			_streamWrite(file, " [label = \"");
+			_streamWrite(file, parentEdgeLabel(it));
+			_streamWrite(file, "\"];\n");
+		}
+	}
+	_streamPut(file, '\n');
+
+	_streamWrite(file, "}\n");
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/index/index_esa_stree.h b/src/SeqAn-1.3/seqan/index/index_esa_stree.h
new file mode 100644
index 0000000..62d7bca
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_esa_stree.h
@@ -0,0 +1,2288 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_ESA_STREE_H
+#define SEQAN_HEADER_INDEX_ESA_STREE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Spec.VSTree Iterator:
+..cat:Index
+..summary:Abstract iterator for suffix trees.
+..signature:Iter<TContainer, VSTree<TSpec> >
+..param.TContainer:Type of the container that can be iterated.
+...type:Spec.IndexEsa
+...metafunction:Metafunction.Container
+..param.TSpec:The specialization type.
+..remarks:This iterator is a pointer to a node in the suffix tree (given by the enhanced suffix array @Spec.IndexEsa@).
+Every node can uniquely be mapped to an interval of the suffix array containing all suffixes of the node's subtree.
+This interval and some extra information constitute the @Metafunction.VertexDescriptor@ returned by the @Function.value@ function of the iterator.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, typename TSpec >
+    struct Value< Iter< TIndex, VSTree<TSpec> > > {
+		typedef typename VertexDescriptor<TIndex>::Type Type;
+	};
+ 
+	template < typename TIndex, typename TSpec >
+	struct Size< Iter< TIndex, VSTree<TSpec> > > {
+		typedef typename Size<TIndex>::Type Type;
+	};
+ 
+	template < typename TIndex, typename TSpec >
+	struct Position< Iter< TIndex, VSTree<TSpec> > > {
+		typedef typename Position<TIndex>::Type Type;
+	};
+ 
+
+/**
+.Spec.TopDown Iterator:
+..cat:Index
+..general:Spec.VSTree Iterator
+..summary:Iterator for suffix trees that can go down and right beginning from the root.
+..signature:Iterator<TContainer, TopDown<TSpec> >::Type
+..signature:Iter<TContainer, VSTree< TopDown<TSpec> > >
+..param.TContainer:Type of the container that can be iterated.
+...type:Spec.IndexEsa
+...metafunction:Metafunction.Container
+..param.TSpec:The specialization type.
+..remarks:If not copy-constructed the @Spec.TopDown Iterator@ starts in the root node of the suffix tree.
+..include:seqan/index.h
+
+.Memfunc.TopDown Iterator#Iterator
+..class:Spec.TopDown Iterator
+..summary:Constructor
+..signature:Iterator(index[, vertexDesc])
+..signature:Iterator(iterator)
+..param.index:An index object.
+..param.vertexDesc:The vertex descriptor of a node the iterator should start in.
+The iterator starts in the root node by default.
+..param.iterator:Another TopDown iterator. (copy constructor)
+...type:Spec.TopDown Iterator
+...type:Spec.TopDownHistory Iterator
+..remarks:If not copy-constructed the @Spec.TopDown Iterator@ starts in the root node of the suffix tree.
+*/
+
+
+	template < typename TIndex, class TSpec >
+	class Iter< TIndex, VSTree< TopDown<TSpec> > > 
+	{
+	public:
+
+		typedef typename VertexDescriptor<TIndex>::Type	TVertexDesc;
+		typedef Iter									iterator;
+
+		TIndex const	*index;		// container of all necessary tables
+		TVertexDesc		vDesc;		// current interval in suffix array and
+									// right border of parent interval (needed in goRight)
+
+		// pseudo history stack (to go up at most one node)
+		TVertexDesc		_parentDesc;
+
+//____________________________________________________________________________
+
+		Iter(TIndex &_index):
+			index(&_index)
+		{
+			_indexRequireTopDownIteration(_index);
+			goRoot(*this);
+		}
+
+		Iter(TIndex &_index, MinimalCtor):
+			index(&_index),
+			vDesc(MinimalCtor()) {}
+
+		Iter(TIndex &_index, TVertexDesc const &_vDesc):
+			index(&_index),
+			vDesc(_vDesc)
+		{
+			_indexRequireTopDownIteration(_index);
+		}
+
+		Iter(Iter const &_origin):
+			index(&container(_origin)),
+			vDesc(value(_origin)),
+			_parentDesc(_origin._parentDesc) {}
+
+//____________________________________________________________________________
+
+		inline Iter const &
+		operator = (Iter const &_origin)
+		{
+			index = &container(_origin);
+			vDesc = _origin.vDesc;
+			_parentDesc = _origin._parentDesc;
+			return *this;
+		}
+	};
+
+
+/**
+.Spec.TopDownHistory Iterator:
+..cat:Index
+..general:Spec.TopDown Iterator
+..summary:Iterator for suffix trees that can go down, right, and up. Supports depth-first search.
+..signature:Iterator<TContainer, TopDown< ParentLinks<TSpec> > >::Type
+..signature:Iter<TContainer, VSTree< TopDown< ParentLinks<TSpec> > > >
+..param.TContainer:Type of the container that can be iterated.
+...type:Spec.IndexEsa
+...metafunction:Metafunction.Container
+..implements:Concept.Iterator
+..param.TSpec:The specialization type. Specifies the depth-first search mode.
+...type:Tag.Preorder
+...type:Tag.PreorderEmptyEdges
+...type:Tag.Postorder
+...type:Tag.PostorderEmptyEdges
+..remarks:If not copy-constructed the @Spec.TopDownHistory Iterator@ starts in the root node of the suffix tree.
+Depending on the depth-first search mode the root is not the first DFS node. To go to the first DFS node use @Function.goBegin at .
+..include:seqan/index.h
+
+.Memfunc.TopDownHistory Iterator#Iterator
+..class:Spec.TopDownHistory Iterator
+..summary:Constructor
+..signature:Iterator(index)
+..signature:Iterator(iterator)
+..param.index:An index object.
+..param.iterator:Another TopDownHistory iterator. (copy constructor)
+...type:Spec.TopDownHistory Iterator
+..remarks:If not copy-constructed the @Spec.TopDownHistory Iterator@ starts in the root node of the suffix tree.
+*/
+
+	template < typename TVSTreeIter >
+	struct HistoryStackEntry_;
+	
+	template <typename TSize>
+	struct HistoryStackEsa_
+	{
+		Pair<TSize> range;		// current SA interval of hits
+		HistoryStackEsa_() {}
+		template <typename TSize_>
+		HistoryStackEsa_(Pair<TSize_> const &_range): range(_range) {}
+	};
+
+	template < typename TIndex, typename TSpec >
+	struct HistoryStackEntry_< Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > >
+	{
+		typedef HistoryStackEsa_<typename Size<TIndex>::Type>	Type;
+	};
+
+	template < typename TIndex, class TSpec >
+	class Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > >:
+		public Iter< TIndex, VSTree< TopDown<> > >
+	{
+	public:
+
+		typedef Iter< TIndex, VSTree< TopDown<> > >		TBase;
+		typedef	typename HistoryStackEntry_<Iter>::Type	TStackEntry;
+		typedef String<TStackEntry, Block<> >			TStack;
+		typedef Iter									iterator;
+
+		TStack			history;	// contains all previously visited intervals (allows to go up)
+
+//____________________________________________________________________________
+
+		Iter(TIndex &_index):
+			TBase(_index) {}
+
+		Iter(TIndex &_index, MinimalCtor):
+			TBase(_index, MinimalCtor()) {}
+
+		Iter(Iter const &_origin):
+			TBase((TBase const &)_origin),
+			history(_origin.history) {}
+
+//____________________________________________________________________________
+
+		inline Iter const &
+		operator = (Iter const &_origin)
+		{
+			*(TBase*)(this) = _origin;
+			history = _origin.history;
+			return *this;
+		}
+	};
+
+
+/**
+.Spec.BottomUp Iterator:
+..cat:Index
+..general:Spec.VSTree Iterator
+..summary:Iterator for an efficient postorder depth-first search in a suffix tree.
+..signature:Iterator<TContainer, BottomUp<TSpec> >::Type
+..signature:Iter<TContainer, VSTree< BottomUp<TSpec> > >
+..param.TContainer:Type of the container that can be iterated.
+...type:Spec.IndexEsa
+...metafunction:Metafunction.Container
+..implements:Concept.Iterator
+..param.TSpec:The specialization type.
+..include:seqan/index.h
+
+.Memfunc.BottomUp Iterator#Iterator
+..class:Spec.BottomUp Iterator
+..summary:Constructor
+..signature:Iterator(index)
+..signature:Iterator(iterator)
+..param.index:An index object.
+..param.iterator:Another BottomUp iterator. (copy constructor)
+...type:Spec.BottomUp Iterator
+..remarks:If not copy-constructed the @Spec.BottomUp Iterator@ starts in the first DFS node, which is the left-most leaf of the suffix tree.
+*/
+
+	template < typename TIndex, typename TSpec >
+	struct HistoryStackEntry_< Iter< TIndex, VSTree< BottomUp<TSpec> > > >
+	{
+		typedef HistoryStackEsa_<typename Size<TIndex>::Type>	Type;
+	};
+
+	template < typename TIndex, typename TSpec >
+	class Iter< TIndex, VSTree< BottomUp<TSpec> > > 
+	{
+	public:
+
+		typedef typename VertexDescriptor<TIndex>::Type	TVertexDesc;
+		typedef typename Size<TIndex>::Type				TSize;
+		typedef	typename HistoryStackEntry_<Iter>::Type	TStackEntry;
+		typedef String<TStackEntry, Block<> >			TStack;
+		typedef Iter									iterator;
+
+		TIndex	const	*index;			// container of all necessary tables
+		TVertexDesc		vDesc;			// current interval in suffix array and
+										// right border of parent interval (unused here)
+		TSize			lValue;			// current l-value
+		TStack			history;		// contains all left borders of current l-intervals (== left borders of history intervals)
+
+//____________________________________________________________________________
+
+		Iter(TIndex &_index):
+			index(&_index),
+			vDesc(MinimalCtor()),
+			lValue(0)
+		{
+			_indexRequireBottomUpIteration(_index);
+			goBegin(*this);
+		}
+
+		Iter(TIndex &_index, MinimalCtor):
+			index(&_index),
+			vDesc(MinimalCtor()),
+			lValue(0) {}
+
+		Iter(Iter const &_origin):
+			index(&container(_origin)),
+			vDesc(value(_origin)),
+			lValue(_dfsLcp(_origin)),
+			history(_origin.history) {}
+
+//____________________________________________________________________________
+
+		inline Iter const &
+		operator = (Iter const &_origin)
+		{
+			index = &container(_origin);
+			vDesc = _origin.vDesc;
+			lValue = _origin.lValue;
+			history = _origin.history;
+			return *this;
+		}
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Iterator wrappers
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TObject, typename TSpec>
+	struct Iterator< TObject, BottomUp<TSpec> > {
+		typedef Iter< TObject, VSTree< BottomUp<TSpec> > > Type;
+	};
+
+	template <typename TObject, typename TSpec>
+	struct Iterator< TObject, TopDown<TSpec> > {
+		typedef Iter< TObject, VSTree< TopDown<TSpec> > > Type;
+	};
+
+
+
+
+	template < typename TIndex, typename TSpec >
+	inline void _dumpHistoryStack(Iter<TIndex, VSTree<TSpec> > &it) {
+		for(typename Size<TIndex>::Type i = 0; i < length(it.history); ++i)
+			::std::cerr << it.history[i].range << '\t';
+		::std::cerr << value(it) << ::std::endl;
+	}
+
+	template <typename TText, typename TSpec>
+	inline void
+	_dump(Index<TText, IndexEsa<TSpec> > &index)
+	{
+		::std::cout << "  SA" << ::std::endl;
+		for(unsigned i=0; i < length(indexSA(index)); ++i)
+			::std::cout << i << ":  " << indexSA(index)[i] << "  " << suffix(indexText(index), indexSA(index)[i]) << ::std::endl;
+
+		::std::cout << ::std::endl << "  LCP" << ::std::endl;
+		for(unsigned i=0; i < length(indexLcp(index)); ++i)
+			::std::cout << i << ":  " << indexLcp(index)[i] << ::std::endl;
+
+		::std::cout << ::std::endl << "  Childtab" << ::std::endl;
+		for(unsigned i=0; i < length(indexChildtab(index)); ++i)
+			::std::cout << i << ":  " << indexChildtab(index)[i] << ::std::endl;
+
+		::std::cout << ::std::endl;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TIndex, typename TSpec >
+	inline bool _dfsReversedOrder(Iter<TIndex, VSTree< BottomUp<TSpec> > > &it) {
+        return lcpAt(_dfsRange(it).i2 - 1, container(it)) > top(it.history).range.i2;
+	}
+
+	// standard push/pop handlers of lcp-dfs-traversal
+	template < typename TIndex, typename TSpec, typename TSize >
+	inline void _dfsOnPop(Iter<TIndex, VSTree< BottomUp<TSpec> > > &it, TSize const) {
+        _dfsRange(it).i1 = top(it.history).range.i1;
+		_dfsLcp(it) = top(it.history).range.i2;
+		pop(it.history);
+	}
+
+	template < typename TIndex, typename TSpec, typename TElement >
+	inline void _dfsOnPush(Iter<TIndex, VSTree< BottomUp<TSpec> > > &it, TElement const &e) {
+		push(it.history, e);
+	}
+
+	template < typename TIndex, typename TSpec >
+	inline void _dfsOnLeaf(Iter<TIndex, VSTree< BottomUp<TSpec> > > &it) {
+		_setSizeInval(_dfsLcp(it));
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// postorder bottom up iterator (dfs)
+
+	template < typename TIndex, typename TSpec, typename THideEmptyEdges >
+	inline void goNextImpl(
+		Iter<TIndex, VSTree< BottomUp<TSpec> > > &it, 
+		VSTreeIteratorTraits<Postorder_, THideEmptyEdges> const) 
+	{
+		TIndex const &index = container(it);
+		do {
+			// postorder dfs via lcp-table
+			if (isRoot(it)) {
+				_dfsClear(it);
+				return;
+			}
+			
+			if (_dfsRange(it).i2)
+			{
+				typedef typename Size<TIndex>::Type TSize;
+				typedef typename Iter<TIndex, VSTree< BottomUp<TSpec> > >::TStackEntry TStackEntry;
+				TStackEntry	_top_ = top(it.history);
+				TSize		lcp_i = lcpAt(_dfsRange(it).i2 - 1, index);
+
+				if (lcp_i < _top_.range.i2) {
+					_dfsOnPop(it, lcp_i);
+					if (nodePredicate(it)) return;
+					else continue;
+				}
+
+				if (lcp_i > _top_.range.i2) {
+					_top_.range.i1 = _dfsRange(it).i1;
+					_top_.range.i2 = lcp_i;
+					_dfsOnPush(it, _top_);
+				}
+
+	// innerer Knoten:
+	// wenn kein Pop, aber Push -> begehe mind. 2. Teilbaum irgendeines Vorfahrs
+	// wenn kein Pop, kein Push -> verlasse mind. zweites Kindblatt
+	// wenn Pop, aber kein Push -> verlasse Wurzel des mind. 2.Teilbaums
+	// wenn Pop und Push        -> verlasse ersten Teilbaum (sieht Vater zum ersten Mal und pusht jenen)
+
+	// wenn nach Pop ein Pop folgen wuerde	-> Vater ist Top of Stack
+	// wenn nach Pop ein Push folgen wuerde	-> Vater erst beim Push auf Stack (-> zwischenspeichern)
+			}
+
+			// last lcp entry (== 0) causes removal of toplevel interval
+			if ((_dfsRange(it).i1 = _dfsRange(it).i2++) == length(index)) {
+				_dfsOnPop(it, 0);
+				_dfsRange(it).i2 = _dfsRange(it).i1;
+			} else {
+				// skip $ leafs (empty edges)
+				if (THideEmptyEdges::VALUE &&
+					suffixLength(saAt(_dfsRange(it).i1, index), index) == lcpAt(_dfsRange(it).i1, index))
+					continue;
+
+				_dfsOnLeaf(it);
+	// Blatt:
+	// wenn danach kein Pop, aber Push -> Vater wird erst noch gepusht
+	// wenn danach Pop				   -> Vater ist Top des Stack
+			}
+			if (nodePredicate(it)) return;
+		} while (true);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.repLength:
+..summary:Returns the length of the substring representing the path from root to $iterator$ node.
+..cat:Index
+..signature:repLength(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:The length of the sequence returned by @Function.representative@
+...type:Metafunction.Size|Size type of the underlying index
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, typename TSpec >
+	inline typename Size<TIndex>::Type 
+	repLength(Iter< TIndex, VSTree<BottomUp<TSpec> > > const &it) 
+	{
+		typename Size<TIndex>::Type lcp;
+		if (!_isSizeInval(lcp = it.lValue))
+			return lcp;
+		else
+			return suffixLength(getOccurrence(it), container(it));
+	}
+
+
+	template < typename TIndex, typename TSize >
+	inline typename Size<TIndex>::Type
+	repLength(TIndex const &index, VertexEsa<TSize> const &vDesc) 
+	{
+		if (_isLeaf(vDesc)) return suffixLength(saAt(vDesc.range.i1, index), index);
+		if (_isRoot(vDesc)) return 0;
+
+		// get l-value of suffix array range
+		TSize lval = _getUp(vDesc.range.i2, index);
+		if (!(vDesc.range.i1 < lval && lval < vDesc.range.i2))
+			lval = _getDown(vDesc.range.i1, index);
+		
+		// retrieve the longest-common-prefix length of suffices in range
+		return lcpAt(lval - 1, index);
+	}
+
+	template < typename TIndex, typename TSpec >
+	inline typename Size<TIndex>::Type
+	repLength(Iter< TIndex, VSTree<TopDown<TSpec> > > const &it) 
+	{
+		return repLength(container(it), value(it));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.nodeDepth:
+..summary:Returns the zero-based node depth of the $iterator$ node.
+..cat:Index
+..signature:nodeDepth(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDownHistory Iterator
+..returns:The length of the path from root to $iterator$ node, e.g. 0 is returned for the root node.
+...type:Metafunction.Size|Size type of the underlying index
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, typename TSpec >
+	inline typename Size<TIndex>::Type
+	nodeDepth(Iter< TIndex, VSTree<TopDown<ParentLinks<TSpec> > > > const &it) 
+	{
+		return length(it.history);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.parentRepLength:
+..summary:Returns the length of the substring representing the path from root to $iterator$'s parent node.
+..cat:Index
+..signature:parentRepLength(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDown Iterator
+..returns:The length of the sequence returned by @Function.representative@ of the parent node.
+...type:Metafunction.Size|Size type of the underlying index
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, typename TSpec >
+	inline typename Size<TIndex>::Type
+	parentRepLength(Iter< TIndex, VSTree<TopDown<TSpec> > > const &it) 
+	{
+		return repLength(container(it), nodeUp(it));
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.emptyParentEdge:
+..summary:Returns $true$ iff the edge label from the $iterator$ node to its parent is empty.
+..cat:Index
+..signature:bool emptyParentEdge(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDown Iterator
+..returns:$true$ if @Function.parentEdgeLength@$ returns 0, otherwise $false$.
+...type:Metafunction.Size|Size type of the underlying index
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, typename TSpec >
+	inline bool
+	emptyParentEdge(Iter< TIndex, VSTree<TopDown<TSpec> > > const &it) 
+	{
+		// the following is more efficient than 
+		// return parentEdgeLength(it) == 0;
+		TIndex const &index = container(it);
+		typename SAValue<TIndex>::Type pos = getOccurrence(it);
+		return getSeqOffset(pos, stringSetLimits(index)) + parentRepLength(it)
+			== sequenceLength(getSeqNo(pos, stringSetLimits(index)), index);
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.lca:
+..summary:Returns the last common ancestor of two tree nodes.
+..cat:Index
+..signature:bool lca(a, b, result)
+..param.a:The first node.
+...type:Spec.TopDownHistory Iterator
+..param.b:The second node.
+...type:Spec.TopDownHistory Iterator
+..param.result:A reference to the resulting lca node.
+...type:Spec.TopDownHistory Iterator
+..returns:$false$ if the lca of $a$ and $b$ is the root node, otherwise $true$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec1, class TSpec2 >
+	inline bool lca(
+		Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec1> > > > &a, 
+		Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec2> > > > &b, 
+		Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec1> > > > &_lca)
+	{
+		typedef Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec1> > > > TIter;
+		typename TIter::TStack::const_iterator iA;
+		typename TIter::TStack::const_iterator iB;
+
+		typedef typename Size<TIndex>::Type TSize;
+
+		typename HistoryStackEntry_<TIter>::Type hA, hB;
+
+		// push current intervals
+		hA = value(a).range;
+		hB = value(b).range;
+		push(a.history, hA);
+		push(b.history, hB);
+
+		TSize s = min(length(a.history), length(b.history)), i0 = 0;
+		
+		while (s) {
+			TSize m = s / 2;
+			iA = begin(a.history, Standard()) + i0 + m;
+			iB = begin(b.history, Standard()) + i0 + m;
+			if ((*iA).range == (*iB).range) {
+				i0 += m + 1;
+				s -= m + 1;
+			} else
+				s = m;
+		}
+
+		_lca.history = prefix(a.history, i0);
+
+		// pop current intervals
+		pop(a.history);
+		pop(b.history);
+		goUp(_lca);
+
+		return i0;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.lcp:
+..summary:Returns the length of the longest-common-prefix of two suffix tree nodes.
+..cat:Index
+..signature:lcp(a, b)
+..param.a:The first node.
+...type:Spec.TopDownHistory Iterator
+..param.b:The second node.
+...type:Spec.TopDownHistory Iterator
+..returns:The lcp-length of $a$ and $b$.
+..include:seqan/index.h
+*/
+
+	// return the lcp of a and b by seeking the lca of them
+	template < typename TIndex, class TSpec1, class TSpec2 >
+	inline typename Size<TIndex>::Type lcp(
+		Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec1> > > > &a, 
+		Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec2> > > > &b) 
+	{
+		typedef Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec1> > > > TIter;
+		typename TIter::TStack::const_iterator iA;
+		typename TIter::TStack::const_iterator iB;
+
+		typedef typename Size<TIndex>::Type TSize;
+
+		typename HistoryStackEntry_<TIter>::Type hA, hB;
+
+		// push current intervals
+		hA = value(a).range;
+		hB = value(b).range;
+		push(a.history, hA);
+		push(b.history, hB);
+
+		TSize s = min(length(a.history), length(b.history)), i0 = 0;
+		
+		while (s) {
+			TSize m = s / 2;
+			iA = begin(a.history, Standard()) + i0 + m;
+			iB = begin(b.history, Standard()) + i0 + m;
+			if ((*iA).range == (*iB).range) {
+				i0 += m + 1;
+				s -= m + 1;
+			} else
+				s = m;
+		}
+
+		TSize _lcp = (i0 > 0)? repLength(container(a), TDesc(a.history[i0 - 1], 0)): 0;
+
+		// pop current intervals
+		pop(a.history);
+		pop(b.history);
+
+		return _lcp;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.container.param.iterator.type:Spec.VSTree Iterator
+
+	template < typename TIndex, class TSpec >
+	inline TIndex const & 
+	container(Iter< TIndex, VSTree<TSpec> > const &it) { 
+		return *it.index; 
+	}
+
+	template < typename TIndex, class TSpec >
+	inline TIndex & 
+	container(Iter< TIndex, VSTree<TSpec> > &it) { 
+		return *const_cast<TIndex*>(it.index); 
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.value.param.object.type:Spec.VSTree Iterator
+
+	template < typename TIndex, class TSpec >
+	inline typename VertexDescriptor<TIndex>::Type & 
+	value(Iter< TIndex, VSTree<TSpec> > &it) { 
+		return it.vDesc;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline typename VertexDescriptor<TIndex>::Type const & 
+	value(Iter< TIndex, VSTree<TSpec> > const &it) { 
+		return it.vDesc;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// property map interface
+
+/**
+.Function.resizeVertexMap:
+..cat:Index
+..signature:resizeVertexMap(index, pm)
+..param.index:An index with a suffix tree interface.
+...type:Spec.IndexEsa
+..include:seqan/index.h
+*/
+
+	template < typename TText, typename TSpec, typename TPropertyMap >
+	inline void
+	resizeVertexMap(
+		Index<TText, TSpec> const& index, 
+		TPropertyMap & pm)
+	{
+		resize(pm, 2 * length(index), Generous());
+	}
+/* // different interface compared to resizeVertexMap(graph, ...)
+	template < typename TText, typename TSpec, typename TPropertyMap, typename TProperty >
+	inline void
+	resizeVertexMap(
+		Index<TText, TSpec> const& index, 
+		TPropertyMap & pm,
+		TProperty const & prop)
+	{
+		resize(pm, 2 * length(index), prop, Generous());
+	}
+*/
+	template < typename TSize >
+	inline typename Id< VertexEsa<TSize> const >::Type
+	_getId(VertexEsa<TSize> const &desc) 
+	{
+		TSize i2 = getValueI2(desc.range);
+		if (_isSizeInval(i2) || i2 == desc.parentRight)
+			// desc is the right-most child -> use left interval border
+			return 2 * getValueI1(desc.range);
+		else
+			// desc is not the right-most child -> use right interval border
+			// ensure that it doesn't collide with the left borders
+			return 2 * getValueI2(desc.range) - 1;
+	}
+
+	template < typename TSize >
+	inline typename Id< VertexEsa<TSize> >::Type
+	_getId(VertexEsa<TSize> &desc) 
+	{
+		return _getId(const_cast<VertexEsa<TSize> const &>(desc));
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getOccurrence:
+..summary:Returns an occurence of the @Function.representative@ substring or a q-gram in the index text.
+..cat:Index
+..signature:getOccurrence(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:A position where the @Function.representative@ of $iterator$ occurs in the text (see @Tag.ESA Index Fibres.EsaText@).
+If $iterator$'s container type is $TIndex$ the return type is $SAValue<TIndex>::Type$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline typename SAValue<TIndex>::Type 
+	getOccurrence(Iter< TIndex, VSTree<TSpec> > const &it)
+	{
+		return saAt(value(it).range.i1, container(it));
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.countOccurrences:
+..summary:Returns the number of occurences of @Function.representative@ substring or a q-gram in the index text.
+..cat:Index
+..signature:countOccurrences(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:The number of positions where the @Function.representative@ of $iterator$ occurs in the text (see @Tag.ESA Index Fibres.EsaText@).
+If $iterator$'s container type is $TIndex$ the return type is $Size<TIndex>::Type$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline typename Size<TIndex>::Type 
+	countOccurrences(Iter< TIndex, VSTree<TSpec> > const &it) 
+	{
+		if (_isSizeInval(value(it).range.i2))
+			return length(indexSA(container(it))) - value(it).range.i1;
+		else
+			return value(it).range.i2 - value(it).range.i1;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.range:
+..summary:Returns the suffix array interval borders of occurences of @Function.representative@ substring or a q-gram in the index text.
+..cat:Index
+..signature:range(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:All positions where a substring occurs in the text (see @Tag.ESA Index Fibres.EsaText@) 
+are stored in a contiguous range of the suffix array.
+$range$ returns begin and end position of this range for occurrences of @Function.representative at .
+If $iterator$'s container type is $TIndex$ the return type is $Pair<Size<TIndex>::Type>.
+..include:seqan/index.h
+*/
+
+	template < typename TText, typename TSpec, typename TDesc >
+	inline Pair<typename Size<Index<TText, TSpec> >::Type>
+	range(Index<TText, TSpec> const &index, TDesc const &desc)
+	{
+		if (_isSizeInval(desc.range.i2))
+			return Pair<typename Size<Index<TText, TSpec> >::Type>(desc.range.i1, length(indexSA(index)));
+		else
+			return desc.range;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline Pair<typename Size<TIndex>::Type>
+	range(Iter< TIndex, VSTree<TSpec> > const &it)
+	{
+		if (_isSizeInval(value(it).range.i2))
+			return Pair<typename Size<TIndex>::Type>(value(it).range.i1, length(indexSA(container(it))));
+		else
+			return value(it).range;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getOccurrences:
+..summary:Returns all occurences of the @Function.representative@ substring or a q-gram in the index text.
+..cat:Index
+..signature:getOccurrences(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:All positions where the @Function.representative@ of $iterator$ occurs in the text (see @Tag.ESA Index Fibres.EsaText@).
+If $iterator$'s container type is $TIndex$ the return type is $Infix<Fibre<TIndex, EsaSA>::Type const>::Type$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline typename Infix< typename Fibre<TIndex, FibreSA>::Type const >::Type 
+	getOccurrences(Iter< TIndex, VSTree<TSpec> > const &it) 
+	{
+		if (_isSizeInval(value(it).range.i2))
+			return infix(indexSA(container(it)), value(it).range.i1, length(indexSA(container(it))));
+		else
+			return infix(indexSA(container(it)), value(it).range.i1, value(it).range.i2);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.alignment:
+..summary:Returns an alignment of the occurences of the @Function.representative@ substring in the index text.
+..cat:Index
+..signature:alignment(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:A local alignment corresponding to the seed of the $iterator$.
+..remarks:The @Function.representative@ must uniquely occur in every sequence (e.g. in Mums), 
+otherwise the seed returned is one many.
+..include:seqan/index.h
+*/
+
+	template < typename TString, typename TSSetSpec, typename TIndexSpec, class TSpec >
+	inline Align<TString, ArrayGaps>
+	alignment(Iter< Index< StringSet<TString, TSSetSpec>, TIndexSpec >, VSTree<TSpec> > &it) 
+	{
+		typedef Index< StringSet<TString, TSSetSpec>, TIndexSpec > TIndex;
+		typedef typename Infix< typename Fibre<TIndex, EsaSA>::Type const >::Type TOccs;
+		typedef typename Iterator<TOccs, Standard>::Type TIter;
+
+		Align<TString, ArrayGaps> align;
+		TIndex &index = container(it);
+		resize(rows(align), length(indexText(index)));	// resize alignment to number of sequences
+		TOccs occs = getOccurrences(it);
+		typename Size<TIndex>::Type repLen = repLength(it);
+		TIter occ = begin(occs, Standard()), occEnd = end(occs, Standard());
+		while (occ != occEnd) {
+			typename Size<TIndex>::Type seqNo = getSeqNo(*occ, stringSetLimits((TIndex const&)index));
+			typename Size<TIndex>::Type seqOfs = getSeqOffset(*occ, stringSetLimits((TIndex const&)index));
+			setSource(row(align, seqNo), value(indexText(index), seqNo), seqOfs, seqOfs + repLen);
+			++occ;
+		}
+		return align;
+	}
+/*
+	template < typename TString, typename TConcSpec, typename TIndexSpec, class TSpec >
+	inline typename Align<TString const, ArrayGaps>
+	alignment(Iter< Index< StringSet<TString, Owner<ConcatDirect<TConcSpec> > >, TIndexSpec >, VSTree<TSpec> > const &it) 
+	{
+		typedef Index< StringSet<TString, Owner<ConcatDirect<TConcSpec> > >, TIndexSpec > TIndex;
+		typedef typename Infix< typename Fibre<TIndex, EsaSA>::Type const >::Type TOccs;
+		typedef typename Iterator<TOccs, Standard>::Type TIter;
+
+		Align<TString const, ArrayGaps> align;
+		TIndex const &index = container(it);
+		resize(rows(align), length(indexText(index)));	// resize alignment to number of sequences
+		TOccs occs = getOccurrences(it);
+		typename Size<TIndex>::Type repLen = repLength(it);
+		TIter occ = begin(occs, Standard()), occEnd = end(occs, Standard());
+		while (occ != occEnd) {
+			typename Size<TIndex>::Type seqNo = getSeqNo(*occ, stringSetLimits(index));
+			typename Size<TIndex>::Type globOfs = posGlobalize(*occ, stringSetLimits(index));
+			setSource(row(align, seqNo), concat(indexText(index)), globOfs, globOfs + repLen);
+			++occ;
+		}
+		return align;
+	}
+*/
+	template < typename TString, typename TConcSpec, typename TIndexSpec, class TSpec >
+	inline Align<TString, ArrayGaps>
+	alignment(Iter< Index< StringSet<TString, Owner<ConcatDirect<TConcSpec> > >, TIndexSpec >, VSTree<TSpec> > &it) 
+	{
+		typedef Index< StringSet<TString, Owner<ConcatDirect<TConcSpec> > >, TIndexSpec > TIndex;
+		typedef typename Infix< typename Fibre<TIndex, EsaSA>::Type const >::Type TOccs;
+		typedef typename Iterator<TOccs, Standard>::Type TIter;
+
+		Align<TString, ArrayGaps> align;
+		TIndex &index = container(it);
+		resize(rows(align), length(indexText(index)));	// resize alignment to number of sequences
+		TOccs occs = getOccurrences(it);
+		typename Size<TIndex>::Type repLen = repLength(it);
+		TIter occ = begin(occs, Standard()), occEnd = end(occs, Standard());
+		while (occ != occEnd) {
+			typename Size<TIndex>::Type seqNo = getSeqNo(*occ, stringSetLimits((TIndex const&)index));
+			typename Size<TIndex>::Type globOfs = posGlobalize(*occ, stringSetLimits((TIndex const&)index));
+			setSource(row(align, seqNo), concat(indexText(index)), globOfs, globOfs + repLen);
+			++occ;
+		}
+		return align;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getOccurrencesBwt:
+..summary:Returns the characters left beside all occurence of the @Function.representative@ substring in the index text.
+..cat:Index
+..signature:getOccurrencesBwt(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:All positions where the @Function.representative@ of $iterator$ occurs in the text (see @Tag.ESA Index Fibres.EsaText@).
+If $iterator$'s container type is $TIndex$ the return type is $Infix<Fibre<TIndex, EsaBwt>::Type const>::Type$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline typename Infix< typename Fibre<TIndex, EsaBwt>::Type const >::Type 
+	getOccurrencesBwt(Iter< TIndex, VSTree<TSpec> > const &it) 
+	{
+		if (_isSizeInval(value(it).range.i2))
+			return infix(indexBwt(container(it)), value(it).range.i1, length(indexSA(container(it))));
+		else
+			return infix(indexBwt(container(it)), value(it).range.i1, value(it).range.i2);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.representative:
+..summary:Returns a substring representing the path from root to $iterator$ node.
+..cat:Index
+..signature:representative(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:An @Spec.InfixSegment@ of the text of an index (see @Tag.ESA Index Fibres.EsaText@).
+If $iterator$'s container type is $TIndex$ the return type is $Infix<Fibre<TIndex, EsaText>::Type const>::Type$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline typename Infix< typename Fibre<TIndex, FibreText>::Type const >::Type 
+	representative(Iter< TIndex, VSTree<TSpec> > const &it) 
+	{
+		return infixWithLength(indexText(container(it)), getOccurrence(it), repLength(it));
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.countChildren:
+..summary:Count the number of children of a tree node.
+..cat:Index
+..signature:countChildren(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:The number of children of a tree node.
+If $iterator$'s container type is $TIndex$, the return type is $Size<TIndex>::Type$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, typename TSpec >
+	inline typename Size<TIndex>::Type 
+	countChildren(Iter<TIndex, VSTree<TSpec> > const &it) 
+	{
+		typedef Iter<TIndex, VSTree<TSpec> >					TIter;
+		typedef typename GetVSTreeIteratorTraits<TIter>::Type	TTraits;
+		
+		Iter<TIndex, VSTree<TopDown<TTraits> > > temp(it);
+		typename Size<TIndex>::Type numChildren = 0; 
+		if (goDown(temp))
+		{
+			++numChildren;
+			while (goRight(temp)) ++numChildren;
+		}
+		return numChildren;
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline typename Size<Index<TText, IndexEsa<TIndexSpec> > >::Type 
+	countChildren(Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree<TSpec> > const &it) 
+	{
+		typedef Index<TText, IndexEsa<TIndexSpec> >			TIndex;
+		typedef Iter<TIndex, VSTree<TSpec> >					TIter;
+		typedef typename GetVSTreeIteratorTraits<TIter>::Type	TTraits;
+		typedef typename TTraits::HideEmptyEdges				THideEmptyEdges;
+
+		if (_isLeaf(it, EmptyEdges())) return 0;
+
+		typedef typename Size<TIndex>::Type TSize;
+		TIndex const &index = container(it);
+		TSize lcp = repLength(it);
+		TSize result = (isRoot(it))? 0: 1;
+
+		// check if child has an empty edge (same representative as its parent)
+		typename SAValue<TIndex>::Type pos = getOccurrence(it);
+		if (THideEmptyEdges::VALUE && getSeqOffset(pos, stringSetLimits(index)) + lcp == sequenceLength(getSeqNo(pos, stringSetLimits(index)), index))
+			--result;	// if so, don't count
+
+		// get l-Value between first and second child
+		TSize i = _getUp(value(it).range.i2, index);
+		if (!(value(it).range.i1 < i && i < value(it).range.i2))
+			i = _getDown(value(it).range.i1, index);
+
+		if (THideEmptyEdges::VALUE)
+		{
+			// only count children with non-empty parent edges (different representative than its parent)
+			pos = saAt(i, index);
+			if (getSeqOffset(pos, stringSetLimits(index)) + lcp != sequenceLength(getSeqNo(pos, stringSetLimits(index)), index))
+				++result;
+		} else
+			++result;
+
+		// try to get next l-Value
+		while (_isNextl(i, index)) 
+		{
+			i = _getNextl(i, index);
+			if (THideEmptyEdges::VALUE)
+			{
+				// only count children with non-empty parent edges (different representative than its parent)
+				pos = saAt(i, index);
+				if (getSeqOffset(pos, stringSetLimits(index)) + lcp != sequenceLength(getSeqNo(pos, stringSetLimits(index)), index))
+					++result;
+			} else
+				++result;
+		}
+		return result;
+	}
+    
+	// get the interval of SA of the subtree under the edge beginning with character c
+	template < typename TText, class TIndexSpec, class TSpec, typename TValue >
+	inline bool 
+	_getNodeByChar(
+		Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree<TSpec> > const &it, 
+		TValue c, 
+		typename VertexDescriptor< Index<TText, IndexEsa<TIndexSpec> > >::Type &childDesc)
+	{
+		typedef Index<TText, IndexEsa<TIndexSpec> >		TIndex;
+		typedef typename Size<TIndex>::Type					TSize;
+        typedef typename Fibre<TIndex, EsaSA>::Type const  TSA;
+		typedef typename Value<TSA>::Type                   TSAValue;
+
+		if (_isLeaf(it, EmptyEdges())) return false;
+
+		Pair<TSize> child(value(it).range.i1, _getUp(value(it).range.i2, container(it)));
+		if (!(value(it).range.i1 < child.i2 && child.i2 < value(it).range.i2))
+			child.i2 = _getDown(value(it).range.i1, container(it));
+
+		TSize _lcp = lcpAt(child.i2 - 1, container(it));
+        TIndex const &index = container(it);
+        TText const &text = indexText(index);
+
+        TSAValue pos = saAt(child.i1, container(it));
+		if (posAddAndCheck(pos, _lcp, text) && (textAt(pos, container(it)) == c)) 
+        {
+			childDesc.range = child;
+			childDesc.parentRight = value(it).range.i2;
+			return true;
+		}
+		child.i1 = child.i2;
+		while (_isNextl(child.i2, container(it))) 
+		{
+			child.i2 = _getNextl(child.i2, container(it));
+            pos = saAt(child.i1, container(it));
+			if (posAddAndCheck(pos, _lcp, text) && (textAt(pos, container(it)) == c)) 
+            {
+				childDesc.range = child;
+				childDesc.parentRight = value(it).range.i2;
+				return true;
+			}
+			child.i1 = child.i2;
+		}
+
+		if (!isRoot(it)) {
+            pos = saAt(child.i1, container(it));
+			if (posAddAndCheck(pos, _lcp, text) && (textAt(pos, container(it)) == c))
+            {
+				childDesc.range.i1 = child.i1;
+				childDesc.range.i2 = childDesc.parentRight = value(it).range.i2;
+				return true;
+			}
+		}
+		return false;
+	}
+
+
+/**
+.Function.nodePredicate:
+..summary:If $false$ this node will be skipped during the bottom-up traversal.
+..cat:Index
+..signature:bool nodePredicate(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline bool
+	nodePredicate(Iter<TIndex, TSpec> &)
+	{
+		return true;
+	}
+
+
+/**
+.Function.nodeHullPredicate:
+..summary:If $false$ this node and its subtree is concealed.
+..cat:Index
+..signature:bool nodeHullPredicate(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline bool
+	nodeHullPredicate(Iter<TIndex, TSpec> &)
+	{
+		return true;
+	}
+
+//____________________________________________________________________________
+
+/**
+.Function.goRoot:
+..summary:Move iterator to the root node.
+..cat:Index
+..signature:goRoot(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDown Iterator
+..include:seqan/index.h
+*/
+
+	template < typename TText, typename TIndexSpec, class TSpec >
+	inline void goRoot(Iter<Index<TText, TIndexSpec>, VSTree<TSpec> > &it) 
+	{
+		_historyClear(it);
+		clear(it);							// start in root node with range (0,infty)
+		_setSizeInval(value(it).range.i2);	// infty is equivalent to length(index) and faster to compare
+	}
+
+//____________________________________________________________________________
+
+///.Function.begin.param.object.type:Class.Index
+	template < typename TText, typename TIndexSpec, class TSpec >
+	inline typename Iterator<Index<TText, TIndexSpec>, TSpec >::Type
+	begin(Index<TText, TIndexSpec> &index, TSpec const) 
+	{
+		return typename Iterator<
+			Index<TText, TIndexSpec>, 
+			TSpec 
+		>::Type (index);
+	}
+
+///.Function.goBegin.param.iterator.type:Spec.BottomUp Iterator
+///.Function.goBegin.param.iterator.type:Spec.TopDownHistory Iterator
+	template < typename TText, typename TIndexSpec, class TSpec >
+	inline void goBegin(Iter<Index<TText, TIndexSpec>, VSTree<TSpec> > &it) 
+	{
+		typedef Iter<Index<TText, TIndexSpec>, VSTree<TSpec> >	TIter;
+		typedef typename GetVSTreeIteratorTraits<TIter>::Type	TTraits;
+		typedef typename TTraits::HideEmptyEdges				THideEmptyEdges;
+
+		goRoot(it);
+
+		if (IsSameType<typename TTraits::DfsOrder, Postorder_>::VALUE) {
+			while (goDown(it)) ;
+			return;
+		}
+
+		// if root doesn't suffice predicate, do a dfs-step
+		if ((THideEmptyEdges::VALUE && emptyParentEdge(it)) || !nodeHullPredicate(it))
+			goNext(it);
+	}
+
+	template < typename TText, typename TIndexSpec, class TSpec >
+	inline void goBegin(Iter<Index<TText, IndexEsa<TIndexSpec> >, VSTree< BottomUp<TSpec> > > &it) 
+	{
+		typedef Index<TText, IndexEsa<TIndexSpec> >		TIndex;
+		typedef Iter<TIndex, VSTree< BottomUp<TSpec> > >	TIter;
+		typedef typename VertexDescriptor<TIndex>::Type		TVertexDesc;
+		typedef typename Size<TIndex>::Type					TSize;
+		typedef	Pair<TSize>									TStackEntry;
+
+		_dfsClear(it);
+		clear(it);							// start in root node with range (0,infty)
+		if (!empty(indexSA(container(it)))) {
+			_dfsOnPush(it, TStackEntry(0,0));
+			goNextImpl(it, typename GetVSTreeIteratorTraits< TIter >::Type());
+		}
+	}
+
+//____________________________________________________________________________
+
+///.Function.end.param.object.type:Class.Index
+	template < typename TText, typename TIndexSpec, class TSpec >
+	inline typename Iterator<Index<TText, TIndexSpec>, TSpec >::Type
+	end(Index<TText, TIndexSpec> &index, TSpec const) 
+	{
+		return typename Iterator< 
+			Index<TText, TIndexSpec>, 
+			TSpec
+		>::Type (index, MinimalCtor());
+	}
+
+///.Function.goEnd.param.iterator.type:Spec.BottomUp Iterator
+///.Function.goEnd.param.iterator.type:Spec.TopDownHistory Iterator
+	template < typename TText, typename TIndexSpec, class TSpec >
+	inline void goEnd(Iter<Index<TText, IndexEsa<TIndexSpec> >, VSTree<TSpec> > &it) 
+	{
+		_historyClear(it);
+		clear(it);
+	}
+
+	template < typename TText, typename TIndexSpec, class TSpec >
+	inline void goEnd(Iter<Index<TText, IndexEsa<TIndexSpec> >, VSTree< BottomUp<TSpec> > > &it) 
+	{
+		_dfsClear(it);
+		clear(it);
+	}
+
+//____________________________________________________________________________
+
+///.Function.goNext.param.iterator.type:Spec.BottomUp Iterator
+///.Function.goNext.param.iterator.type:Spec.TopDownHistory Iterator
+
+	template < typename TIndex, typename TSpec >
+	inline void goNext(Iter<TIndex, VSTree<TSpec> > &it) {
+		goNext(it, typename GetVSTreeIteratorTraits< Iter<TIndex, VSTree<TSpec> > >::Type());
+	}
+
+	template < typename TIndex, typename TSpec, typename TTraits >
+	inline void goNext(Iter<TIndex, VSTree<TSpec> > &it, TTraits const traits) {
+		goNextImpl(it, traits);
+	}
+
+	template < typename TIndex, typename TSpec >
+	inline void goNextRight(Iter<TIndex, VSTree<TSpec> > &it) {
+		goNextRight(it, typename GetVSTreeIteratorTraits< Iter<TIndex, VSTree<TSpec> > >::Type());
+	}
+
+	template < typename TIndex, typename TSpec, typename TTraits >
+	inline void goNextRight(Iter<TIndex, VSTree<TSpec> > &it, TTraits const traits) {
+		goNextRightImpl(it, traits);
+	}
+
+	template < typename TIndex, typename TSpec >
+	inline void goNextUp(Iter<TIndex, VSTree<TSpec> > &it) {
+		goNextUp(it, typename GetVSTreeIteratorTraits< Iter<TIndex, VSTree<TSpec> > >::Type());
+	}
+
+	template < typename TIndex, typename TSpec, typename TTraits >
+	inline void goNextUp(Iter<TIndex, VSTree<TSpec> > &it, TTraits const traits) {
+		goNextUpImpl(it, traits);
+	}
+
+
+/**
+.Function.goDown:
+..summary:Iterates down one edge or a path in a tree.
+..cat:Index
+..signature:bool goDown(iterator)
+..signature:bool goDown(iterator, char)
+..signature:bool goDown(iterator, text[, lcp])
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDown Iterator
+..param.char:$iterator$ goes down the edge beginning with $char$.
+..param.text:$iterator$ goes down the path representing $text$. If $text$ ends within an edge, $iterator$ will point to the child-end of this edge.
+..param.lcp:A reference of a size type. When $goDown$ returns, $lcp$ contains the length of the longest-common-prefix of $text$ and a path beginning at the $iterator$ node.
+...type:Class.String
+...type:Class.Segment
+..remarks:$goDown(iterator)$ goes down the leftmost edge in the suffix tree, i.e. the edge beginning with the lexicographically smallest character.
+..returns:$true$ if the edge or path to go down exists, otherwise $false$.
+..include:seqan/index.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+	// unified history stack access for goDown(..)
+       
+	template < typename TIndex, class TSpec >
+	inline void 
+	_historyClear(Iter< TIndex, VSTree<TSpec> > &) {}
+
+	template < typename TIndex, class TSpec >
+	inline void 
+	_historyClear(Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it) 
+	{
+		clear(it.history);
+	}
+/*
+	template < typename TText, class TIndexSpec, class TSpec >
+	inline void 
+	_historyPush(Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree<TSpec> > &it) 
+	{
+		value(it).parentRight = value(it).range.i2;
+	}
+*/	template < typename TText, class TIndexSpec, class TSpec >
+	inline void 
+	_historyPush(Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it) 
+	{
+		it._parentDesc = value(it);
+		value(it).parentRight = value(it).range.i2;
+	}
+	template < typename TText, class TIndexSpec, class TSpec >
+	inline void 
+	_historyPush(Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it) 
+	{
+		typedef Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > TIter;
+		typename HistoryStackEntry_<TIter>::Type h;
+		h.range = value(it).range;
+
+		value(it).parentRight = value(it).range.i2;
+		push(it.history, h);
+	}
+
+
+	// standard down/right/up handlers of top-down-traversal
+	template < typename TIndex, typename TSpec >
+	inline void _onGoDown(Iter<TIndex, VSTree< TopDown<TSpec> > > &) {}
+
+	template < typename TIndex, typename TSpec >
+	inline void _onGoRight(Iter<TIndex, VSTree< TopDown<TSpec> > > &) {}
+
+	template < typename TIndex, typename TSpec >
+	inline void _onGoUp(Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &) {}
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// goDown
+
+	// go down the leftmost edge (including empty $-edges)
+	template < typename TText, class TIndexSpec, class TSpec, typename TDfsOrder >
+	inline bool _goDown(
+		Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it,
+		VSTreeIteratorTraits<TDfsOrder, False> const)
+	{
+		typedef Index<TText, IndexEsa<TIndexSpec> >	TIndex;
+
+		if (_isLeaf(it, EmptyEdges())) return false;
+		_historyPush(it);
+
+		TIndex const &index = container(it);
+
+		typename Size<TIndex>::Type lval = _getUp(value(it).range.i2, index);
+		if (!(value(it).range.i1 < lval && lval < value(it).range.i2))
+			lval = _getDown(value(it).range.i1, index);
+		value(it).range.i2 = lval;
+		return true;
+	}
+
+	// go down the leftmost edge (skip empty $-edges)
+	template < typename TText, class TIndexSpec, class TSpec, typename TDfsOrder >
+	inline bool _goDown(
+		Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it,
+		VSTreeIteratorTraits<TDfsOrder, True> const)
+	{
+		typedef Index<TText, IndexEsa<TIndexSpec> >	TIndex;
+		
+		if (_isLeaf(it, EmptyEdges())) return false;
+		_historyPush(it);
+
+		TIndex const &index = container(it);
+
+		typename Size<TIndex>::Type lval = _getUp(value(it).range.i2, index);
+		if (!(value(it).range.i1 < lval && lval < value(it).range.i2))
+			lval = _getDown(value(it).range.i1, index);
+		value(it).range.i2 = lval;
+
+		typename Size<TIndex>::Type lcp = lcpAt(lval - 1, index);
+		//typename typename StringSetLimits<TIndex const>::Type &limits = stringSetLimits(index);
+		
+		typename SAValue<TIndex>::Type pos = getOccurrence(it);
+		if (getSeqOffset(pos, stringSetLimits(index)) + lcp == sequenceLength(getSeqNo(pos, stringSetLimits(index)), index)
+			|| !nodeHullPredicate(it)) 
+		{
+			if (!goRight(it)) {
+				_goUp(it);
+				return false;
+			}
+		}
+		return true;
+	}
+
+	// go down the leftmost edge
+	template < typename TIndex, class TSpec >
+	inline bool goDown(Iter< TIndex, VSTree< TopDown<TSpec> > > &it) {
+		if (_goDown(it, typename GetVSTreeIteratorTraits< Iter<TIndex, VSTree< TopDown<TSpec> > > >::Type())) {
+			_onGoDown(it);
+			return true;
+		} else
+			return false;
+	}
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// goDown a specific edge (chosen by the first character)
+
+	// go down the edge beginning with c (returns false iff this edge doesn't exists)
+	template < typename TIndex, class TSpec, typename TValue >
+	inline bool _goDownChar(Iter< TIndex, VSTree< TopDown<TSpec> > > &it, TValue c) 
+	{
+		typename VertexDescriptor<TIndex>::Type nodeDesc;
+		if (_getNodeByChar(it, c, nodeDesc)) {
+			_historyPush(it);
+			value(it) = nodeDesc;
+			return true;
+		}
+		return false;
+	}
+
+	// go down the path corresponding to pattern
+	// lcp is the longest prefix of pattern and path
+	template < typename TIndex, typename TSpec, typename TString, typename TSize >
+	inline bool
+	_goDownString(
+		Iter< TIndex, VSTree< TopDown<TSpec> > > &node,
+		TString const &pattern, 
+		TSize &lcp) 
+	{
+		typedef typename Fibre<TIndex, FibreText>::Type const		TText;
+		typedef typename Infix<TText>::Type							TInfix;
+		typedef typename Iterator<TInfix, Standard>::Type			IText;
+		typedef typename Iterator<TString const, Standard>::Type	IPattern;
+		
+		IPattern p_begin = begin(pattern, Standard()), p_end = end(pattern, Standard());
+		IText t_begin, t_end;
+
+		if (p_begin == p_end) {
+			lcp = 0;
+			return true;
+		}
+
+		TSize parentRepLen = repLength(node);
+		// go down the edge beginning with a pattern character
+		while (_goDownChar(node, *p_begin))
+		{
+			TInfix t = representative(node);
+			t_begin = begin(t, Standard()) + parentRepLen;
+			t_end = end(t, Standard());
+
+			while (t_begin != t_end && p_begin != p_end) 
+			{
+				// compare each character along the edge
+				if (*p_begin != *t_begin) {
+					lcp = p_begin - begin(pattern, Standard());
+					return false;
+				}
+				++t_begin;
+				++p_begin;
+			}
+
+			// was the whole pattern found?
+			if (p_begin == p_end) {
+				lcp = length(pattern);
+				return true;
+			}
+			parentRepLen = length(t);
+		}
+		lcp = p_begin - begin(pattern, Standard());
+		return false;
+	}
+
+	template < typename TIndex, typename TSpec, typename TObject >
+	inline bool 
+	_goDownObject(
+		Iter< TIndex, VSTree< TopDown<TSpec> > > &it, 
+		TObject const &obj,
+		False)
+	{
+		return _goDownChar(it, obj);
+	}
+
+	template < typename TIndex, typename TSpec, typename TObject >
+	inline bool 
+	_goDownObject(
+		Iter< TIndex, VSTree< TopDown<TSpec> > > &it, 
+		TObject const &obj,
+		True)
+	{
+		typename Size<TIndex>::Type dummy;
+		return _goDownString(it, obj, dummy);
+	}
+
+
+	// public interface for goDown(it, ...)
+	template < typename TIndex, typename TSpec, typename TObject >
+	inline bool
+	goDown(
+		Iter< TIndex, VSTree< TopDown<TSpec> > > &it, 
+		TObject const &obj) 
+	{
+		return _goDownObject(it, obj, typename IsSequence<TObject>::Type());
+	}
+
+	template < typename TIndex, typename TSpec, typename TString, typename TSize >
+	inline bool 
+	goDown(
+		Iter< TIndex, VSTree< TopDown<TSpec> > > &it, 
+		TString const &pattern,
+		TSize &lcp)
+	{
+		return _goDownString(it, pattern, lcp);
+	}
+
+		
+/**
+.Function.goUp:
+..summary:Iterates up one edge to the parent in a tree.
+..cat:Index
+..signature:goUp(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDownHistory Iterator
+..include:seqan/index.h
+*/
+
+	// go up one edge (returns false if in root node)
+	// can be used at most once, as no history stack is available
+	template < typename TIndex, class TSpec >
+	inline bool 
+	_goUp(Iter< TIndex, VSTree< TopDown<TSpec> > > &it) 
+	{
+		if (!isRoot(it)) {
+			value(it) = it._parentDesc;
+			return true;
+		}
+		return false;
+	}
+
+	// go up one edge (returns false if in root node)
+	template < typename TIndex, class TSpec >
+	inline bool 
+	_goUp(Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it) 
+	{
+		if (!empty(it.history)) {
+			value(it).range = top(it.history).range;
+			pop(it.history);
+			if (!empty(it.history))
+				value(it).parentRight = top(it.history).range.i2;	// copy right boundary of parent's range
+			return true;
+		}
+		return false;
+	}
+
+	// go up one edge
+	template < typename TIndex, class TSpec >
+	inline bool goUp(Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it) {
+		if (_goUp(it)) {
+			_onGoUp(it);
+			return true;
+		} else
+			return false;
+	}
+
+/**
+.Function.nodeUp:
+..summary:Returns the vertex descriptor of the parent node.
+..cat:Index
+..signature:nodeUp(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDown Iterator
+..returns:The vertex descriptor of the parent node. The type is $VertexDescriptor<TIndex>::Type$.
+If $iterator$ points at the root node, the vertex descriptor of $iterator$ ($value(iterator)$) is returned.
+...type:Metafunction.VertexDescriptor
+..include:seqan/index.h
+*/
+
+	// return vertex descriptor of parent's node
+	template < typename TIndex, class TSpec >
+	inline typename VertexDescriptor<TIndex>::Type
+	nodeUp(Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > const &it) 
+	{
+		if (!empty(it.history)) {
+			typename Size<TIndex>::Type parentRight = 0;
+			if (length(it.history) > 2)
+				parentRight = topPrev(it.history).range.i2;
+			return typename VertexDescriptor<TIndex>::Type(top(it.history).range, parentRight);
+		} else
+			return value(it);
+	}
+
+	// nodeUp adaption for non-history iterators
+	// ATTENTION: Do not call nodeUp after a goDown that returned false (or after _goUp)!
+	template < typename TIndex, class TSpec >
+	inline typename VertexDescriptor<TIndex>::Type const &
+	nodeUp(Iter< TIndex, VSTree< TopDown<TSpec> > > const &it) 
+	{
+		return it._parentDesc;
+	}
+
+/**
+.Function.goRight:
+..summary:Iterates to the next sibling in a tree.
+..cat:Index
+..signature:goRight(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDown Iterator
+..include:seqan/index.h
+*/
+
+	// go right to the lexic. next sibling
+	template < typename TText, class TIndexSpec, class TSpec, typename TDfsOrder, typename THideEmptyEdges >
+	inline bool _goRight(
+		Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it, 
+		VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const) 
+	{
+		typedef Index<TText, IndexEsa<TIndexSpec> > TIndex;
+
+		if (isRoot(it)) return false;		
+
+		typename Size<TIndex>::Type right = value(it).parentRight;
+		if (_isSizeInval(right)) right = length(indexSA(container(it)));
+
+		do {
+			if (value(it).range.i2 == right)				// not the right-most child?
+				return false;
+
+			if (_isNextl(value(it).range.i2, container(it))) 
+			{
+				value(it).range.i1 = value(it).range.i2;	// go right
+				value(it).range.i2 = _getNextl(value(it).range.i2, container(it));
+			} else {
+				value(it).range.i1 = value(it).range.i2;	// now it is the right-most child
+				value(it).range.i2 = value(it).parentRight;
+			}
+
+		} while ((THideEmptyEdges::VALUE && emptyParentEdge(it)) || !nodeHullPredicate(it));
+		return true;
+	}
+
+	// go down the leftmost edge
+	template < typename TIndex, class TSpec >
+	inline bool goRight(Iter< TIndex, VSTree< TopDown<TSpec> > > &it) {
+		if (_goRight(it, typename GetVSTreeIteratorTraits< Iter<TIndex, VSTree< TopDown<TSpec> > > >::Type())) {
+			_onGoRight(it);
+			return true;
+		} else
+			return false;
+	}
+
+/**
+.Function.parentEdgeLength:
+..summary:Returns the length of the edge from the $iterator$ node to its parent.
+..cat:Index
+..signature:parentEdgeLength(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDownHistory Iterator
+..returns:The returned value is equal to $length(parentEdgeLabel(iterator))$.
+..include:seqan/index.h
+*/
+
+	template < typename TText, class TIndexSpec, class TSpec >
+	inline typename Size< Index<TText, IndexEsa<TIndexSpec> > >::Type
+	parentEdgeLength(Iter< 
+		Index<TText, IndexEsa<TIndexSpec> >, 
+		VSTree< TopDown< ParentLinks<TSpec> > > > const &it) 
+	{
+		return repLength(it) - parentRepLength(it);
+	}
+
+/**
+.Function.parentEdgeLabel:
+..summary:Returns a substring representing the edge from an $iterator$ node to its parent.
+..cat:Index
+..signature:parentEdgeLabel(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDownHistory Iterator
+..returns:An @Spec.InfixSegment@ of the text of an index (see @Tag.ESA Index Fibres.EsaText@).
+If $iterator$'s container type is $TIndex$ the return type is $Infix<Fibre<TIndex, EsaText>::Type const>::Type$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline typename Infix< typename Fibre<TIndex, FibreText>::Type const >::Type
+	parentEdgeLabel(Iter< TIndex, VSTree< TopDown<TSpec> > > const &it)
+	{
+		return infixWithLength(
+			indexText(container(it)), 
+			posAdd(getOccurrence(it), parentRepLength(it)),
+			parentEdgeLength(it));
+	}
+
+/**
+.Function.parentEdgeFirstChar:
+..summary:Returns the first character of the edge from an $iterator$ node to its parent.
+..cat:Index
+..signature:parentEdgeFirstChar(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.TopDownHistory Iterator
+..returns:A single character of type $Value<TIndex>::Type$ which is identical to $Value<Fibre<TIndex, EsaRawText>::Type>::Type$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline typename Value<TIndex>::Type 
+	parentEdgeFirstChar(Iter< TIndex, VSTree<TSpec> > const &it) 
+	{
+		return infixWithLength(
+			indexText(container(it)),
+			posAdd(getOccurrence(it), parentRepLength(it)),
+			1)[0];
+	}
+
+
+	template < typename TIndex, class TSpec >
+	inline void clear(Iter<TIndex, VSTree<TSpec> > &it) 
+	{
+		value(it) = typename VertexDescriptor<TIndex>::Type(MinimalCtor());
+    }
+
+	template < typename TIndex, class TSpec >
+	inline void _dfsClear(Iter<TIndex, VSTree<TSpec> > &it) 
+	{
+		clear(it.history);
+    }
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// dfs traversal for ParentLink iterators
+
+	template < typename TIndex, typename TSpec, typename THideEmptyEdges >
+	inline void goNextImpl(
+		Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it, 
+		VSTreeIteratorTraits<Preorder_, THideEmptyEdges> const)
+	{
+		// preorder dfs
+		do {
+			if (!goDown(it) && !goRight(it))
+				while (goUp(it) && !goRight(it)) ;
+			if (isRoot(it)) {
+				clear(it);
+				return;
+			}
+		} while (!nodePredicate(it));
+	}
+
+	template < typename TIndex, typename TSpec, typename THideEmptyEdges >
+    inline void goNextRightImpl(
+		Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it, 
+		VSTreeIteratorTraits<Preorder_, THideEmptyEdges> const)
+    {
+        // preorder dfs
+		do {
+			if (!goRight(it))
+				while (goUp(it) && !goRight(it)) ;
+			if (isRoot(it)) {
+				clear(it);
+				return;
+			}
+		} while (!nodePredicate(it));
+    }
+
+	template < typename TIndex, typename TSpec, typename THideEmptyEdges >
+    inline void goNextUpImpl(
+		Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it, 
+		VSTreeIteratorTraits<Preorder_, THideEmptyEdges> const)
+    {
+        // preorder dfs
+		do {
+			while (goUp(it) && !goRight(it)) ;
+			if (isRoot(it)) {
+				clear(it);
+				return;
+			}
+		} while (!nodePredicate(it));
+    }
+
+
+
+
+	template < typename TIndex, typename TSpec, typename THideEmptyEdges >
+	inline void goNextImpl(
+		Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it, 
+		VSTreeIteratorTraits<Postorder_, THideEmptyEdges> const)
+	{
+		// postorder dfs
+		do {
+			if (goRight(it))
+				while (goDown(it)) ;
+			else
+				if (!goUp(it)) {
+					clear(it);
+					return;
+				}
+		} while (!nodePredicate(it));
+	}
+
+    //////////////////////////////////////////////////////////////////////////////
+	// boolean functions
+
+	template < typename TIndex, class TSpec >
+	inline bool eof(Iter<TIndex, VSTree<TSpec> > &it) 
+	{
+		return !value(it).range.i2;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline bool eof(Iter<TIndex, VSTree<TSpec> > const &it) 
+	{
+		return !value(it).range.i2;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline bool empty(Iter<TIndex, VSTree<TSpec> > &it) 
+	{
+		return !value(it).range.i2;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline bool empty(Iter<TIndex, VSTree<TSpec> > const &it) 
+	{
+		return !value(it).range.i2;
+	}
+
+///.Function.atEnd.param.iterator.type:Spec.BottomUp Iterator
+///.Function.atEnd.param.iterator.type:Spec.TopDownHistory Iterator
+
+	template < typename TIndex, class TSpec >
+	inline bool atEnd(Iter<TIndex, VSTree<TSpec> > &it) 
+	{
+		return !value(it).range.i2;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline bool atEnd(Iter<TIndex, VSTree<TSpec> > const &it) 
+	{
+		return !value(it).range.i2;
+	}
+
+/**
+.Function.isRoot:
+..summary:Test whether iterator points to the root node.
+..cat:Index
+..signature:bool isRoot(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:$true$ if $iterator$ points to the root of the tree, otherwise $false$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline bool isRoot(Iter<TIndex, VSTree< BottomUp<TSpec> > > const &it) 
+	{
+		return empty(it.history);
+	}
+
+	template < typename TIndex, class TSpec >
+	inline bool isRoot(Iter<TIndex, VSTree<TSpec> > const &it) 
+	{
+		return _isRoot(value(it));
+	}
+
+	template < typename TSize >
+	inline bool _isRoot(VertexEsa<TSize> const &value) 
+	{
+		return _isSizeInval(value.range.i2);
+	}
+
+/**
+.Function.isRightTerminal:
+..summary:Test whether iterator points to a suffix.
+..cat:Index
+..signature:bool isRightTerminal(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:$true$ if $iterator$ points to the node representing a suffix, otherwise $false$.
+..remarks:Every leaf is also a right terminal (see @Function.Index#isLeaf@), but not vice versa.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline bool isRightTerminal(Iter<TIndex, VSTree<TSpec> > const &it) 
+	{
+		// do we reach a leaf in a suffix tree with trailing '$'
+		typename SAValue<TIndex>::Type pos = getOccurrence(it);
+		TIndex const &index = container(it);
+		typename StringSetLimits<typename Host<TIndex>::Type const>::Type &limits = stringSetLimits(index);
+
+		return (getSeqOffset(pos, limits) + repLength(it) 
+			== sequenceLength(getSeqNo(pos, limits), index));
+	}
+
+/**
+.Function.isLeftMaximal:
+..summary:Test whether the occurences of an iterator's @Function.representative@ mutually differ in the character left of the hits.
+..cat:Index
+..signature:bool isLeftMaximal(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:$true$ if there are at least two different characters left of the occurences, otherwise $false$.
+..see:Function.getOccurrences
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline bool isLeftMaximal(Iter<TIndex, VSTree<TSpec> > const &it)
+	{
+		typedef typename Infix< typename Fibre<TIndex, EsaSA>::Type const >::Type	TOccs;
+		typedef typename Infix< typename Fibre<TIndex, EsaBwt>::Type const >::Type	TOccsBWT;
+		typedef typename Value< typename Fibre<TIndex, EsaBwt>::Type const >::Type	TValue;
+
+		typedef typename Iterator<TOccs, Standard>::Type	TIter;
+		typedef typename Iterator<TOccsBWT, Standard>::Type TIterBWT;
+		
+		TIndex const &index = container(it);
+		typename StringSetLimits<typename Host<TIndex>::Type const>::Type &limits = stringSetLimits(index);
+
+		TOccs occs = getOccurrences(it);
+		TOccsBWT bwts = getOccurrencesBwt(it);
+
+		TIter oc = begin(occs, Standard()), ocEnd = end(occs, Standard());
+		TIterBWT bw = begin(bwts, Standard());
+
+		if (oc == ocEnd) return true;
+		if (posAtFirstLocal(*oc, limits)) return true;
+
+		TValue seen = *bw;
+		++oc; 
+		++bw;
+		if (oc == ocEnd) return true;
+
+		do {
+			if (posAtFirstLocal(*oc, limits)) return true;
+			if (seen != *bw) return true;
+			++oc;
+			++bw;
+		} while (oc != ocEnd);
+
+		return false;
+	}
+
+/**
+.Function.isPartiallyLeftExtensible:
+..summary:Test whether the characters left of the two occurences of @Function.representative@ are equal.
+..cat:Index
+..signature:bool isPartiallyLeftExtensible(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:$true$ if there are at least two different characters left of the occurences, otherwise $false$.
+..see:Function.getOccurrences
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec, typename TSet >
+	inline bool isPartiallyLeftExtensible(Iter<TIndex, VSTree<TSpec> > const &it, TSet &charSet)
+	{
+		typedef typename Infix< typename Fibre<TIndex, EsaSA>::Type const >::Type	TOccs;
+		typedef typename Infix< typename Fibre<TIndex, EsaBwt>::Type const >::Type	TOccsBWT;
+		typedef typename Value< typename Fibre<TIndex, EsaBwt>::Type const >::Type	TValue;
+
+		typedef typename Iterator<TOccs, Standard>::Type	TIter;
+		typedef typename Iterator<TOccsBWT, Standard>::Type TIterBWT;
+		
+		TIndex const &index = container(it);
+		typename StringSetLimits<typename Host<TIndex>::Type const>::Type &limits = stringSetLimits(index);
+
+		clear(charSet);
+
+		TOccs occs = getOccurrences(it);
+		TOccsBWT bwts = getOccurrencesBwt(it);
+
+		TIter oc = begin(occs, Standard()), ocEnd = end(occs, Standard());
+		TIterBWT bw = begin(bwts, Standard());
+
+		while (oc != ocEnd) {
+			if (!posAtFirstLocal(*oc, limits)) {
+				TValue c = *bw;
+				if (in(c, charSet)) return true;
+				insert(c, charSet);
+			}
+			++oc;
+			++bw;
+		}
+
+		return false;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline bool isPartiallyLeftExtensible(Iter<TIndex, VSTree<TSpec> > const &it)
+	{
+		typename Set<typename Value<TIndex>::Type>::Type set;
+		return isPartiallyLeftExtensible(it, set);
+	}
+
+/**
+.Function.isUnique:
+..summary:Test whether the @Function.representative@ occurs only once in every sequence.
+..cat:Index
+..signature:bool isUnique(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:$true$ if there are at least two different characters left of the occurences, otherwise $false$.
+..see:Function.getOccurrences
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec, typename TSet >
+	inline bool isUnique(Iter<TIndex, VSTree<TSpec> > const &it, TSet &set)
+	{
+		typedef typename Infix< typename Fibre<TIndex, EsaSA>::Type const >::Type TOccs;
+		typedef typename Iterator<TOccs, Standard>::Type TIter;
+		typedef typename Size<TIndex>::Type TSize;
+
+		TIndex const &index = container(it);
+
+		clear(set);
+
+		TOccs occs = getOccurrences(it);
+		TIter oc = begin(occs, Standard()), ocEnd = end(occs, Standard());
+
+		while (oc != ocEnd) {
+			TSize seqNo = getSeqNo(*oc, stringSetLimits(index));
+			if (in(seqNo, set)) return false;
+			insert(seqNo, set);
+			++oc;
+		}
+
+		return true;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline bool isUnique(Iter<TIndex, VSTree<TSpec> > const &it) {
+		VectorSet_<
+			typename Size<TIndex>::Type,
+			Alloc<> 
+		> set(countSequences(container(it)));
+		return isUnique(it, set);
+	}
+
+/**
+.Function.getFrequency:
+..summary:Returns the number of sequences, which contain the @Function.representative@ as a substring.
+..cat:Index
+..signature:int getFrequency(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:The number of different sequences containing the @Function.representative at .
+..see:Function.getOccurrences
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec, typename TSet >
+	inline typename Size<TIndex>::Type
+	getFrequency(Iter<TIndex, VSTree<TSpec> > const &it, TSet &set)
+	{
+		typedef typename Infix< typename Fibre<TIndex, EsaSA>::Type const >::Type TOccs;
+		typedef typename Iterator<TOccs, Standard>::Type TIter;
+		typedef typename Size<TIndex>::Type TSize;
+
+		TIndex const &index = container(it);
+
+		clear(set);
+
+		TOccs occs = getOccurrences(it);
+		TIter oc = begin(occs, Standard()), ocEnd = end(occs, Standard());
+
+		int counter = 0;
+		while (oc != ocEnd) {
+			TSize seqNo = getSeqNo(*oc, stringSetLimits(index));
+			if (!in(seqNo, set)) {
+				++counter;
+				insert(seqNo, set);
+			}
+			++oc;
+		}
+
+		return counter;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline typename Size<TIndex>::Type
+	getFrequency(Iter<TIndex, VSTree<TSpec> > const &it) 
+	{
+		VectorSet_<
+			typename Size<TIndex>::Type,
+			Alloc<> 
+		> set(countSequences(container(it)));
+		return getFrequency(it, set);
+	}
+
+/**
+.Function.childrenAreLeaves:
+..summary:Test whether iterator points to a node with only leaf-children.
+..cat:Index
+..signature:bool childrenAreLeaves(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:$true$ if $iterator$ points to an inner node of the tree, whose children are leaves. Otherwise it is $false$.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex, class TSpec >
+	inline bool childrenAreLeaves(Iter<TIndex, VSTree<TSpec> > const &it) 
+	{
+		return countChildren(it) == countOccurrences(it);
+	}
+
+/**
+.Function.Index#isLeaf:
+..summary:Test whether iterator points to a leaf.
+..cat:Index
+..signature:bool isLeaf(iterator)
+..param.iterator:An iterator of a suffix tree.
+...type:Spec.VSTree Iterator
+..returns:$true$ if $iterator$ points to a leaf of the tree, otherwise $false$.
+..include:seqan/index.h
+*/
+
+	template < typename TSize >
+	inline bool _isLeaf(VertexEsa<TSize> const &vDesc)
+	{
+		// is this a leaf?
+		return vDesc.range.i1 + 1 >= vDesc.range.i2;
+	}
+
+	// is this a leaf? (including empty $-edges)
+	template < typename TIndex, class TSpec, typename TDfsOrder >
+	inline bool _isLeaf(
+		Iter<TIndex, VSTree<TSpec> > const &it,
+		VSTreeIteratorTraits<TDfsOrder, False> const)
+	{
+		return _isLeaf(value(it));
+	}
+
+	// is this a leaf? (hide empty $-edges)
+	template < typename TIndex, class TSpec, typename TDfsOrder >
+	inline bool _isLeaf(
+		Iter<TIndex, VSTree<TSpec> > const &it,
+		VSTreeIteratorTraits<TDfsOrder, True> const)
+	{
+		typedef typename Infix< typename Fibre<TIndex, EsaSA>::Type const >::Type TOccs;
+		typedef typename Iterator<TOccs, Standard>::Type TIter;
+
+		if (_isLeaf(value(it))) return true;
+
+		TIndex const &index = container(it);
+
+		// get representative length (see repLength)
+		typename Size<TIndex>::Type lval = _getUp(value(it).range.i2, index);
+		if (!(value(it).range.i1 < lval && lval < value(it).range.i2))
+			lval = _getDown(value(it).range.i1, index);
+		typename Size<TIndex>::Type lcp = lcpAt(lval - 1, index);
+
+		// test suffices in range for empty edges
+		TOccs occs = getOccurrences(it);
+		TIter oc = begin(occs, Standard()), ocEnd = end(occs, Standard());
+		for (; oc != ocEnd; ++oc)
+			if (getSeqOffset(*oc, stringSetLimits(index)) + lcp != 
+				sequenceLength(getSeqNo(*oc, stringSetLimits(index)), index))
+				return false;
+		return true;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline bool isLeaf(Iter<TIndex, VSTree<TSpec> > const &it)
+	{
+		return _isLeaf(it, typename GetVSTreeIteratorTraits< Iter<TIndex, VSTree<TSpec> > >::Type());
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// (more or less) internal functions for accessing the childtab
+
+	template < typename TSize, typename TIndex >
+	inline bool _isNextl(TSize i, TIndex const &index) 
+	{
+		if (i >= length(index)) return false;
+		TSize j = childAt(i, index);
+		return (j > i) && lcpAt(j - 1, index) == lcpAt(i - 1, index);
+	}
+
+	template < typename TSize, typename TIndex >
+	inline bool _isUp(TSize i, TIndex const &index) 
+	{
+		if (i >= length(index)) return false;
+		TSize j = childAt(i, index);
+		return (j <= i) && lcpAt(j - 1, index) > lcpAt(i - 1, index);
+	}
+
+	template < typename TSize, typename TIndex >
+	inline TSize _getNextl(TSize i, TIndex const &index) 
+	{
+		return childAt(i, index);
+	}
+
+	template < typename TSize, typename TIndex >
+	inline TSize _getUp(TSize i, TIndex const &index) 
+	{
+		if (!_isSizeInval(i))
+			return childAt(i - 1, index);
+		else
+			return childAt(0, index);
+	}
+
+	template < typename TSize, typename TIndex >
+	inline TSize _getDown(TSize i, TIndex const &index) 
+	{
+		return childAt(i, index);
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// depth-first search 
+
+	template < typename TIndex, class TSpec >
+	inline Pair<typename Size<TIndex>::Type> &
+	_dfsRange(Iter< TIndex, VSTree< BottomUp<TSpec> > > &it)
+	{
+		return value(it).range;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline Pair<typename Size<TIndex>::Type> const & 
+	_dfsRange(Iter< TIndex, VSTree< BottomUp<TSpec> > > const &it) 
+	{
+		return value(it).range;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline typename Size<TIndex>::Type & _dfsLcp(Iter< TIndex, VSTree< BottomUp<TSpec> > > &it)
+	{
+		return it.lValue;
+	}
+
+	template < typename TIndex, class TSpec >
+	inline typename Size<TIndex>::Type _dfsLcp(Iter< TIndex, VSTree< BottomUp<TSpec> > > const &it)
+	{
+		return it.lValue;
+	}
+
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_generated_forwards.h b/src/SeqAn-1.3/seqan/index/index_generated_forwards.h
new file mode 100644
index 0000000..cbce2f5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_generated_forwards.h
@@ -0,0 +1,3450 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_INDEX_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_INDEX_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+namespace impl {
+
+//____________________________________________________________________________
+// substringHelperPizzaChili
+
+template <typename TValue, typename TSpec, typename TPos> struct substringHelperPizzaChili;       	// "projects/library/seqan/index/index_pizzachili_string.h"(535)
+
+} //namespace impl
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AddResultsFunctor
+
+template <typename TSAValue1, typename TSAValue2> struct AddResultsFunctor;       	// "projects/library/seqan/index/find_index_approx.h"(43)
+
+//____________________________________________________________________________
+// AddSingleResultsFunctor
+
+template <typename TSAValue> struct AddSingleResultsFunctor;       	// "projects/library/seqan/index/find_index_approx.h"(124)
+
+//____________________________________________________________________________
+// Align
+
+template <typename TSource, typename TSpec> class Align;       	// "projects/library/seqan/index/index_esa_base.h"(225)
+
+//____________________________________________________________________________
+// AllocHelper_
+
+template <typename TValue, typename TSpec> struct AllocHelper_;       	// "projects/library/seqan/index/index_pizzachili_string.h"(298)
+
+//____________________________________________________________________________
+// ArrayGaps
+
+struct ArrayGaps;       	// "projects/library/seqan/index/index_esa_base.h"(222)
+
+//____________________________________________________________________________
+// BTree
+
+template <unsigned BlockSize > struct BTree;       	// "projects/library/seqan/index/find_index_esa.h"(57)
+
+//____________________________________________________________________________
+// BottomUp
+
+template <typename TSpec > struct BottomUp;       	// "projects/library/seqan/index/index_esa_base.h"(145)
+
+//____________________________________________________________________________
+// BucketMap
+
+template <typename THashValue> struct BucketMap;       	// "projects/library/seqan/index/index_qgram_openaddressing.h"(46)
+
+//____________________________________________________________________________
+// Bwt
+
+struct Bwt;       	// "projects/library/seqan/index/index_base.h"(60)
+struct Bwt;       	// "projects/library/seqan/index/index_bwt.h"(44)
+
+//____________________________________________________________________________
+// BwtWalk
+
+template <typename TSpec > struct BwtWalk;       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(62)
+
+//____________________________________________________________________________
+// BwtWalkFast_
+
+struct BwtWalkFast_;       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(55)
+
+//____________________________________________________________________________
+// BwtWalkInPlace_
+
+struct BwtWalkInPlace_;       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(58)
+
+//____________________________________________________________________________
+// Childtab
+
+struct Childtab;       	// "projects/library/seqan/index/index_childtab.h"(44)
+struct Childtab;       	// "projects/library/seqan/index/index_base.h"(59)
+
+//____________________________________________________________________________
+// CompareSkewDCStream
+
+template <typename TValue> struct CompareSkewDCStream;       	// "projects/library/seqan/index/pipe_merger7.h"(109)
+
+//____________________________________________________________________________
+// ContextLss_
+
+template <typename TValue> struct ContextLss_;       	// "projects/library/seqan/index/index_sa_lss.h"(64)
+
+//____________________________________________________________________________
+// DeepShallow
+
+struct DeepShallow;       	// "projects/library/seqan/index/index_shawarma.h"(56)
+
+//____________________________________________________________________________
+// DefaultIndexCreator
+
+template <typename TIndex, typename TFibre > struct DefaultIndexCreator;       	// "projects/library/seqan/index/index_base.h"(231)
+
+//____________________________________________________________________________
+// DefaultIndexSpec
+
+template <typename TObject > struct DefaultIndexSpec;       	// "projects/library/seqan/index/index_base.h"(109)
+
+//____________________________________________________________________________
+// DefaultIndexStringSpec
+
+template <typename TIndex > struct DefaultIndexStringSpec;       	// "projects/library/seqan/index/index_base.h"(125)
+
+//____________________________________________________________________________
+// Dfi
+
+template <typename TPredHull , typename TPred > struct Dfi;       	// "projects/library/seqan/index/index_dfi.h"(93)
+
+//____________________________________________________________________________
+// DfiEntry_
+
+struct DfiEntry_;       	// "projects/library/seqan/index/index_dfi.h"(46)
+
+//____________________________________________________________________________
+// DfiPredDefault_
+
+template <bool Result> struct DfiPredDefault_;       	// "projects/library/seqan/index/index_dfi.h"(58)
+
+//____________________________________________________________________________
+// DivSufSort
+
+struct DivSufSort;       	// "projects/library/seqan/index/index_shawarma.h"(55)
+
+//____________________________________________________________________________
+// EmptyEdges
+
+struct EmptyEdges;       	// "projects/library/seqan/index/index_esa_base.h"(122)
+
+//____________________________________________________________________________
+// ErrorAlphabet_
+
+struct ErrorAlphabet_;       	// "projects/library/seqan/index/shape_threshold.h"(135)
+
+//____________________________________________________________________________
+// ErrorPackedString
+
+struct ErrorPackedString;       	// "projects/library/seqan/index/shape_threshold.h"(157)
+
+//____________________________________________________________________________
+// ErrorPatternLess
+
+struct ErrorPatternLess;       	// "projects/library/seqan/index/shape_threshold.h"(326)
+
+//____________________________________________________________________________
+// ErrorTypes
+
+template <typename TDistance> struct ErrorTypes;       	// "projects/library/seqan/index/shape_threshold.h"(182)
+
+//____________________________________________________________________________
+// Extender3
+
+struct Extender3;       	// "projects/library/seqan/index/pump_extender3.h"(44)
+
+//____________________________________________________________________________
+// Extender7
+
+template <typename TCompression > struct Extender7;       	// "projects/library/seqan/index/pump_extender7.h"(47)
+
+//____________________________________________________________________________
+// Extender7Multi
+
+template <typename TPair, typename TCompression > struct Extender7Multi;       	// "projects/library/seqan/index/pump_extender7.h"(259)
+
+//____________________________________________________________________________
+// Fibre
+
+template <typename TIndex, typename TSpec > struct Fibre;       	// "projects/library/seqan/index/index_base.h"(194)
+
+//____________________________________________________________________________
+// FibreBucketMap_
+
+struct FibreBucketMap_;       	// "projects/library/seqan/index/index_qgram.h"(108)
+
+//____________________________________________________________________________
+// FibreBwt_
+
+struct FibreBwt_;       	// "projects/library/seqan/index/index_base.h"(327)
+
+//____________________________________________________________________________
+// FibreChildtab_
+
+struct FibreChildtab_;       	// "projects/library/seqan/index/index_base.h"(326)
+
+//____________________________________________________________________________
+// FibreCountsDir_
+
+struct FibreCountsDir_;       	// "projects/library/seqan/index/index_qgram.h"(107)
+
+//____________________________________________________________________________
+// FibreCounts_
+
+struct FibreCounts_;       	// "projects/library/seqan/index/index_qgram.h"(106)
+
+//____________________________________________________________________________
+// FibreDir_
+
+struct FibreDir_;       	// "projects/library/seqan/index/index_qgram.h"(103)
+
+//____________________________________________________________________________
+// FibreLcp_
+
+struct FibreLcp_;       	// "projects/library/seqan/index/index_base.h"(324)
+
+//____________________________________________________________________________
+// FibreLcpe_
+
+struct FibreLcpe_;       	// "projects/library/seqan/index/index_base.h"(325)
+
+//____________________________________________________________________________
+// FibreLess
+
+struct FibreLess;       	// "projects/library/seqan/index/index_base.h"(211)
+
+//____________________________________________________________________________
+// FibrePizzaChiliCompressed_
+
+struct FibrePizzaChiliCompressed_;       	// "projects/library/seqan/index/index_pizzachili.h"(56)
+
+//____________________________________________________________________________
+// FibreRawSA_
+
+struct FibreRawSA_;       	// "projects/library/seqan/index/index_base.h"(322)
+
+//____________________________________________________________________________
+// FibreRawText_
+
+struct FibreRawText_;       	// "projects/library/seqan/index/index_base.h"(320)
+
+//____________________________________________________________________________
+// FibreRecord
+
+struct FibreRecord;       	// "projects/library/seqan/index/index_base.h"(203)
+
+//____________________________________________________________________________
+// FibreSADir_
+
+struct FibreSADir_;       	// "projects/library/seqan/index/index_qgram.h"(104)
+
+//____________________________________________________________________________
+// FibreSA_
+
+struct FibreSA_;       	// "projects/library/seqan/index/index_base.h"(321)
+
+//____________________________________________________________________________
+// FibreSae_
+
+struct FibreSae_;       	// "projects/library/seqan/index/index_base.h"(323)
+
+//____________________________________________________________________________
+// FibreText_
+
+struct FibreText_;       	// "projects/library/seqan/index/index_base.h"(319)
+
+//____________________________________________________________________________
+// Fibre_Shape_
+
+struct Fibre_Shape_;       	// "projects/library/seqan/index/index_qgram.h"(105)
+
+//____________________________________________________________________________
+// FinderLcpe_
+
+struct FinderLcpe_;       	// "projects/library/seqan/index/index_base.h"(86)
+
+//____________________________________________________________________________
+// FinderMlr_
+
+struct FinderMlr_;       	// "projects/library/seqan/index/index_base.h"(85)
+
+//____________________________________________________________________________
+// FinderQGramLookup_
+
+struct FinderQGramLookup_;       	// "projects/library/seqan/index/find_index_qgram.h"(44)
+
+//____________________________________________________________________________
+// FinderSTree_
+
+struct FinderSTree_;       	// "projects/library/seqan/index/index_base.h"(87)
+
+//____________________________________________________________________________
+// FractionCompound_
+
+template <typename TValue, typename TSize> struct FractionCompound_;       	// "projects/library/seqan/index/index_esa_algs.h"(297)
+
+//____________________________________________________________________________
+// FractionHeader_
+
+template <typename TSize> struct FractionHeader_;       	// "projects/library/seqan/index/index_esa_algs.h"(286)
+
+//____________________________________________________________________________
+// FractionMultiCompound_
+
+template <typename TValue, typename TSize> struct FractionMultiCompound_;       	// "projects/library/seqan/index/index_esa_algs_multi.h"(166)
+
+//____________________________________________________________________________
+// FunctorGlobalize
+
+template <typename InType, typename TLimitsString, typename Result > struct FunctorGlobalize;       	// "projects/library/seqan/index/index_base.h"(481)
+
+//____________________________________________________________________________
+// GappedShape
+
+template <typename TSpec> struct GappedShape;       	// "projects/library/seqan/index/shape_base.h"(46)
+
+//____________________________________________________________________________
+// GetVSTreeIteratorTraits
+
+template <typename TIterator> struct GetVSTreeIteratorTraits;       	// "projects/library/seqan/index/index_esa_base.h"(169)
+
+//____________________________________________________________________________
+// Hamming_
+
+struct Hamming_;       	// "projects/library/seqan/index/find_swift.h"(100)
+
+//____________________________________________________________________________
+// HardwiredShape
+
+template <int P00 , int P01 , int P02 , int P03 , int P04 , int P05 , int P06 , int P07 , int P08 , int P09 , int P10 , int P11 , int P12 , int P13 , int P14 , int P15 , int P16 , int P17 , int P18 , int P19 > struct HardwiredShape;       	// "projects/library/seqan/index/shape_gapped.h"(66)
+
+//____________________________________________________________________________
+// HideEmptyEdges
+
+struct HideEmptyEdges;       	// "projects/library/seqan/index/index_esa_base.h"(121)
+
+//____________________________________________________________________________
+// HistoryStackEntry_
+
+template <typename TVSTreeIter > struct HistoryStackEntry_;       	// "projects/library/seqan/index/index_esa_stree.h"(186)
+
+//____________________________________________________________________________
+// HistoryStackEsa_
+
+template <typename TSize> struct HistoryStackEsa_;       	// "projects/library/seqan/index/index_esa_stree.h"(190)
+
+//____________________________________________________________________________
+// HistoryStackWotdModified_
+
+template <typename TSize> struct HistoryStackWotdModified_;       	// "projects/library/seqan/index/index_wotd.h"(296)
+
+//____________________________________________________________________________
+// HistoryStackWotdOriginal_
+
+template <typename TSize> struct HistoryStackWotdOriginal_;       	// "projects/library/seqan/index/index_wotd.h"(289)
+
+//____________________________________________________________________________
+// Index
+
+template <typename TObject, typename TSpec > class Index;       	// "projects/library/seqan/index/find_swift.h"(90)
+template <typename TObject, typename TSpec > class Index;       	// "projects/library/seqan/index/index_base.h"(163)
+
+//____________________________________________________________________________
+// IndexEsa
+
+template <typename TSpec > struct IndexEsa;       	// "projects/library/seqan/index/index_base.h"(94)
+
+//____________________________________________________________________________
+// IndexQGram
+
+template <typename TShapeSpec, typename TSpec > struct IndexQGram;       	// "projects/library/seqan/index/index_qgram.h"(151)
+
+//____________________________________________________________________________
+// IndexWotd
+
+template <typename TSpec > struct IndexWotd;       	// "projects/library/seqan/index/index_wotd.h"(101)
+
+//____________________________________________________________________________
+// InvalidPizzaChiliSpec
+
+struct InvalidPizzaChiliSpec;       	// "projects/library/seqan/index/pizzachili_api.h"(51)
+
+//____________________________________________________________________________
+// Kasai
+
+struct Kasai;       	// "projects/library/seqan/index/index_lcp.h"(44)
+struct Kasai;       	// "projects/library/seqan/index/index_base.h"(55)
+
+//____________________________________________________________________________
+// KasaiOriginal
+
+struct KasaiOriginal;       	// "projects/library/seqan/index/index_lcp.h"(45)
+struct KasaiOriginal;       	// "projects/library/seqan/index/index_base.h"(56)
+
+//____________________________________________________________________________
+// LarssonSadakane
+
+struct LarssonSadakane;       	// "projects/library/seqan/index/index_sa_lss.h"(360)
+struct LarssonSadakane;       	// "projects/library/seqan/index/index_base.h"(49)
+
+//____________________________________________________________________________
+// LcpConfig
+
+struct LcpConfig;       	// "projects/library/seqan/index/pump_lcp_core.h"(45)
+
+//____________________________________________________________________________
+// LcpCreatorRandomAccess_
+
+template <typename TLCP, typename TText, typename TSA, typename TAlgSpec > struct LcpCreatorRandomAccess_;       	// "projects/library/seqan/index/index_base.h"(255)
+
+//____________________________________________________________________________
+// LeftCompleteTree
+
+struct LeftCompleteTree;       	// "projects/library/seqan/index/find_index_esa.h"(54)
+
+//____________________________________________________________________________
+// MSufSort
+
+struct MSufSort;       	// "projects/library/seqan/index/index_shawarma.h"(54)
+
+//____________________________________________________________________________
+// ManberMyers
+
+struct ManberMyers;       	// "projects/library/seqan/index/index_sa_mm.h"(41)
+struct ManberMyers;       	// "projects/library/seqan/index/index_base.h"(50)
+
+//____________________________________________________________________________
+// MaxRepeat
+
+template <typename TSTree> struct MaxRepeat;       	// "projects/library/seqan/index/index_esa_algs.h"(666)
+
+//____________________________________________________________________________
+// MaxRepeatOccurrences
+
+struct MaxRepeatOccurrences;       	// "projects/library/seqan/index/index_esa_base.h"(152)
+
+//____________________________________________________________________________
+// MaxRepeats_
+
+template <typename TSpec > struct MaxRepeats_;       	// "projects/library/seqan/index/index_esa_base.h"(126)
+
+//____________________________________________________________________________
+// Merger3
+
+struct Merger3;       	// "projects/library/seqan/index/pipe_merger3.h"(44)
+
+//____________________________________________________________________________
+// Merger7
+
+struct Merger7;       	// "projects/library/seqan/index/pipe_merger7.h"(162)
+
+//____________________________________________________________________________
+// Merger7Multi
+
+template <typename TLimitsString> struct Merger7Multi;       	// "projects/library/seqan/index/pipe_merger7.h"(171)
+
+//____________________________________________________________________________
+// MultiMem
+
+template <typename TSTree> struct MultiMem;       	// "projects/library/seqan/index/index_esa_algs_multi.h"(425)
+
+//____________________________________________________________________________
+// MultiMemOccurences
+
+struct MultiMemOccurences;       	// "projects/library/seqan/index/index_esa_base.h"(154)
+
+//____________________________________________________________________________
+// MultiMems_
+
+struct MultiMems_;       	// "projects/library/seqan/index/index_esa_base.h"(127)
+
+//____________________________________________________________________________
+// Mums
+
+struct Mums;       	// "projects/library/seqan/index/index_esa_base.h"(149)
+
+//____________________________________________________________________________
+// OneGappedShape
+
+struct OneGappedShape;       	// "projects/library/seqan/index/shape_onegapped.h"(71)
+
+//____________________________________________________________________________
+// OpenAddressing_
+
+struct OpenAddressing_;       	// "projects/library/seqan/index/index_qgram_openaddressing.h"(41)
+
+//____________________________________________________________________________
+// ParentLinks
+
+template <typename TSpec > struct ParentLinks;       	// "projects/library/seqan/index/index_esa_base.h"(141)
+
+//____________________________________________________________________________
+// Pipe
+
+template <typename TInput, typename TSpec > struct Pipe;       	// "projects/library/seqan/index/find_swift.h"(332)
+
+//____________________________________________________________________________
+// PizzaChili
+
+template <typename TSpec> struct PizzaChili;       	// "projects/library/seqan/index/index_pizzachili_string.h"(62)
+
+//____________________________________________________________________________
+// PizzaChiliAF_
+
+struct PizzaChiliAF_;       	// "projects/library/seqan/index/pizzachili_api.h"(82)
+
+//____________________________________________________________________________
+// PizzaChiliCcsa_
+
+struct PizzaChiliCcsa_;       	// "projects/library/seqan/index/pizzachili_api.h"(85)
+
+//____________________________________________________________________________
+// PizzaChiliCodeProvider
+
+template <typename TSpec> struct PizzaChiliCodeProvider;       	// "projects/library/seqan/index/pizzachili_api.h"(54)
+
+//____________________________________________________________________________
+// PizzaChiliFM_
+
+struct PizzaChiliFM_;       	// "projects/library/seqan/index/pizzachili_api.h"(88)
+
+//____________________________________________________________________________
+// PizzaChiliFinder_
+
+struct PizzaChiliFinder_;       	// "projects/library/seqan/index/index_pizzachili_find.h"(40)
+
+//____________________________________________________________________________
+// PizzaChiliLZ_
+
+struct PizzaChiliLZ_;       	// "projects/library/seqan/index/pizzachili_api.h"(91)
+
+//____________________________________________________________________________
+// PizzaChiliRlfm_
+
+struct PizzaChiliRlfm_;       	// "projects/library/seqan/index/pizzachili_api.h"(97)
+
+//____________________________________________________________________________
+// PizzaChiliRsa_
+
+struct PizzaChiliRsa_;       	// "projects/library/seqan/index/pizzachili_api.h"(94)
+
+//____________________________________________________________________________
+// PizzaChiliSA_
+
+struct PizzaChiliSA_;       	// "projects/library/seqan/index/pizzachili_api.h"(100)
+
+//____________________________________________________________________________
+// PizzaChiliSada_
+
+struct PizzaChiliSada_;       	// "projects/library/seqan/index/pizzachili_api.h"(103)
+
+//____________________________________________________________________________
+// PizzaChiliSsa_
+
+struct PizzaChiliSsa_;       	// "projects/library/seqan/index/pizzachili_api.h"(106)
+
+//____________________________________________________________________________
+// PizzaChiliTest_
+
+struct PizzaChiliTest_;       	// "projects/library/seqan/index/pizzachili_api.h"(109)
+
+//____________________________________________________________________________
+// Postorder
+
+struct Postorder;       	// "projects/library/seqan/index/index_esa_base.h"(116)
+
+//____________________________________________________________________________
+// PostorderEmptyEdges
+
+struct PostorderEmptyEdges;       	// "projects/library/seqan/index/index_esa_base.h"(118)
+
+//____________________________________________________________________________
+// Postorder_
+
+struct Postorder_;       	// "projects/library/seqan/index/index_esa_base.h"(43)
+
+//____________________________________________________________________________
+// Preorder
+
+struct Preorder;       	// "projects/library/seqan/index/index_esa_base.h"(115)
+
+//____________________________________________________________________________
+// PreorderEmptyEdges
+
+struct PreorderEmptyEdges;       	// "projects/library/seqan/index/index_esa_base.h"(117)
+
+//____________________________________________________________________________
+// Preorder_
+
+struct Preorder_;       	// "projects/library/seqan/index/index_esa_base.h"(42)
+
+//____________________________________________________________________________
+// QGramAlg
+
+struct QGramAlg;       	// "projects/library/seqan/index/index_base.h"(52)
+
+//____________________________________________________________________________
+// QGramLessNoCheckOffset_
+
+template <typename TSAValue, typename TText > struct QGramLessNoCheckOffset_;       	// "projects/library/seqan/index/index_qgram.h"(801)
+
+//____________________________________________________________________________
+// QGramLessNoCheck_
+
+template <typename TSAValue, typename TText > struct QGramLessNoCheck_;       	// "projects/library/seqan/index/index_qgram.h"(719)
+
+//____________________________________________________________________________
+// QGramLessOffset_
+
+template <typename TSAValue, typename TText > struct QGramLessOffset_;       	// "projects/library/seqan/index/index_qgram.h"(655)
+
+//____________________________________________________________________________
+// QGramLess_
+
+template <typename TSAValue, typename TText > struct QGramLess_;       	// "projects/library/seqan/index/index_qgram.h"(560)
+
+//____________________________________________________________________________
+// QSufSort
+
+struct QSufSort;       	// "projects/library/seqan/index/index_shawarma.h"(57)
+
+//____________________________________________________________________________
+// Quasar_
+
+struct Quasar_;       	// "projects/library/seqan/index/find_quasar.h"(47)
+
+//____________________________________________________________________________
+// Repeat
+
+template <typename TPos, typename TPeriod> struct Repeat;       	// "projects/library/seqan/index/repeat_base.h"(42)
+
+//____________________________________________________________________________
+// RepeatFinderParams
+
+template <typename TSize> struct RepeatFinderParams;       	// "projects/library/seqan/index/repeat_base.h"(60)
+
+//____________________________________________________________________________
+// RepeatLess_
+
+template <typename TPos> struct RepeatLess_;       	// "projects/library/seqan/index/repeat_base.h"(95)
+
+//____________________________________________________________________________
+// SACreatorRandomAccess_
+
+template <typename TSA, typename TText, typename TAlgSpec > struct SACreatorRandomAccess_;       	// "projects/library/seqan/index/index_base.h"(243)
+
+//____________________________________________________________________________
+// SAQSort
+
+struct SAQSort;       	// "projects/library/seqan/index/index_sa_qsort.h"(41)
+struct SAQSort;       	// "projects/library/seqan/index/index_base.h"(51)
+
+//____________________________________________________________________________
+// SAValue
+
+template <typename TObject > struct SAValue;       	// "projects/library/seqan/index/find_swift.h"(91)
+template <typename TObject> struct SAValue;       	// "projects/library/seqan/index/index_base.h"(371)
+
+//____________________________________________________________________________
+// SAValueLess_
+
+template <typename TOccValue> struct SAValueLess_;       	// "projects/library/seqan/index/index_shims.h"(519)
+
+//____________________________________________________________________________
+// SearchTreeIterator
+
+template <typename TString, typename TSpec > class SearchTreeIterator;       	// "projects/library/seqan/index/find_index_esa.h"(60)
+
+//____________________________________________________________________________
+// SensitivityDPState_
+
+template <typename TDistance, typename TFloat> struct SensitivityDPState_;       	// "projects/library/seqan/index/shape_threshold.h"(195)
+
+//____________________________________________________________________________
+// Shape
+
+template <typename TValue , typename TSpec > class Shape;       	// "projects/library/seqan/index/shape_base.h"(69)
+
+//____________________________________________________________________________
+// Shawarma
+
+template <typename TSpec> struct Shawarma;       	// "projects/library/seqan/index/index_shawarma.h"(52)
+
+//____________________________________________________________________________
+// Skew3
+
+struct Skew3;       	// "projects/library/seqan/index/index_skew3.h"(44)
+struct Skew3;       	// "projects/library/seqan/index/index_base.h"(47)
+
+//____________________________________________________________________________
+// Skew7
+
+struct Skew7;       	// "projects/library/seqan/index/index_skew7.h"(44)
+struct Skew7;       	// "projects/library/seqan/index/index_base.h"(48)
+
+//____________________________________________________________________________
+// Skew7StringSpec_
+
+template <typename T> struct Skew7StringSpec_;       	// "projects/library/seqan/index/index_skew7.h"(189)
+
+//____________________________________________________________________________
+// SkewDCStream
+
+template <typename TValue> struct SkewDCStream;       	// "projects/library/seqan/index/pipe_merger7.h"(85)
+
+//____________________________________________________________________________
+// SkewNIndex_
+
+template <int I, typename T > struct SkewNIndex_;       	// "projects/library/seqan/index/pipe_merger7.h"(48)
+
+//____________________________________________________________________________
+// SkewShift_
+
+template <int I, typename T > struct SkewShift_;       	// "projects/library/seqan/index/pipe_merger7.h"(45)
+
+//____________________________________________________________________________
+// SortedList
+
+struct SortedList;       	// "projects/library/seqan/index/find_index_esa.h"(53)
+
+//____________________________________________________________________________
+// SuffixLessOffset_
+
+template <typename TSAValue, typename TText > struct SuffixLessOffset_;       	// "projects/library/seqan/index/index_sa_qsort.h"(126)
+
+//____________________________________________________________________________
+// SuffixLess_
+
+template <typename TSAValue, typename TText > struct SuffixLess_;       	// "projects/library/seqan/index/index_sa_qsort.h"(47)
+
+//____________________________________________________________________________
+// SuperMaxRepeats
+
+struct SuperMaxRepeats;       	// "projects/library/seqan/index/index_esa_base.h"(147)
+
+//____________________________________________________________________________
+// SuperMaxRepeatsFast
+
+struct SuperMaxRepeatsFast;       	// "projects/library/seqan/index/index_esa_base.h"(148)
+
+//____________________________________________________________________________
+// Swift
+
+template <typename TSpec > struct Swift;       	// "projects/library/seqan/index/find_swift.h"(105)
+
+//____________________________________________________________________________
+// SwiftBucketParams_
+
+template <typename TSpec, typename TSize_, typename TShortSize_ > struct SwiftBucketParams_;       	// "projects/library/seqan/index/find_swift.h"(181)
+
+//____________________________________________________________________________
+// SwiftBucket_
+
+template <typename TSpec, typename TSize_, typename TShortSize_ > struct SwiftBucket_;       	// "projects/library/seqan/index/find_swift.h"(151)
+
+//____________________________________________________________________________
+// SwiftHit_
+
+template <typename TSpec, typename THstkPos> struct SwiftHit_;       	// "projects/library/seqan/index/find_swift.h"(215)
+
+//____________________________________________________________________________
+// SwiftLocal_
+
+struct SwiftLocal_;       	// "projects/library/seqan/index/find_swift.h"(93)
+
+//____________________________________________________________________________
+// SwiftParameters
+
+struct SwiftParameters;       	// "projects/library/seqan/index/find_swift.h"(134)
+
+//____________________________________________________________________________
+// SwiftSemiGlobal_
+
+template <typename TSpec > struct SwiftSemiGlobal_;       	// "projects/library/seqan/index/find_swift.h"(97)
+
+//____________________________________________________________________________
+// TRepeatFinder
+
+struct TRepeatFinder;       	// "projects/library/seqan/index/repeat_base.h"(66)
+
+//____________________________________________________________________________
+// ThreshDPState_
+
+template <typename TDistance> struct ThreshDPState_;       	// "projects/library/seqan/index/shape_threshold.h"(215)
+
+//____________________________________________________________________________
+// ThreshExact_
+
+struct ThreshExact_;       	// "projects/library/seqan/index/shape_threshold.h"(42)
+
+//____________________________________________________________________________
+// ThreshHeuristic_
+
+struct ThreshHeuristic_;       	// "projects/library/seqan/index/shape_threshold.h"(43)
+
+//____________________________________________________________________________
+// ThreshQGramLemma_
+
+struct ThreshQGramLemma_;       	// "projects/library/seqan/index/shape_threshold.h"(41)
+
+//____________________________________________________________________________
+// TopDown
+
+template <typename TSpec > struct TopDown;       	// "projects/library/seqan/index/index_esa_base.h"(137)
+
+//____________________________________________________________________________
+// TranslateTableErrorToAscii_
+
+template <typename T > struct TranslateTableErrorToAscii_;       	// "projects/library/seqan/index/shape_threshold.h"(143)
+
+//____________________________________________________________________________
+// UngappedShape
+
+template <unsigned q> struct UngappedShape;       	// "projects/library/seqan/index/shape_base.h"(42)
+
+//____________________________________________________________________________
+// VSTree
+
+template <typename TSpec > struct VSTree;       	// "projects/library/seqan/index/index_esa_base.h"(133)
+
+//____________________________________________________________________________
+// VSTreeIteratorTraits
+
+template <typename TDfsOrder , typename THideEmptyEdges > struct VSTreeIteratorTraits;       	// "projects/library/seqan/index/index_esa_base.h"(46)
+
+//____________________________________________________________________________
+// VertexEsa
+
+template <typename TSize> struct VertexEsa;       	// "projects/library/seqan/index/index_esa_base.h"(174)
+
+//____________________________________________________________________________
+// VertexWotdModified_
+
+template <typename TSize> struct VertexWotdModified_;       	// "projects/library/seqan/index/index_wotd.h"(241)
+
+//____________________________________________________________________________
+// VertexWotdOriginal_
+
+template <typename TSize> struct VertexWotdOriginal_;       	// "projects/library/seqan/index/index_wotd.h"(226)
+
+//____________________________________________________________________________
+// WotdOriginal_
+
+struct WotdOriginal_;       	// "projects/library/seqan/index/index_wotd.h"(97)
+
+//____________________________________________________________________________
+// _filterGlobalizer
+
+template <typename InType, typename TLimitsString, typename Result > struct _filterGlobalizer;       	// "projects/library/seqan/index/index_bwt.h"(144)
+
+//____________________________________________________________________________
+// _mapInverse
+
+template <typename InType, typename Result > struct _mapInverse;       	// "projects/library/seqan/index/index_lcp.h"(59)
+
+//____________________________________________________________________________
+// _mapInverseMulti
+
+template <typename InType, typename TLimitsString, typename Result > struct _mapInverseMulti;       	// "projects/library/seqan/index/index_lcp.h"(164)
+
+//____________________________________________________________________________
+// _qgramComp
+
+template <typename InType, typename Result > struct _qgramComp;       	// "projects/library/seqan/index/index_qgram.h"(1628)
+
+//____________________________________________________________________________
+// _qgramHash
+
+template <typename TValue, typename TResult > struct _qgramHash;       	// "projects/library/seqan/index/index_qgram.h"(1663)
+
+//____________________________________________________________________________
+// _skew3ExtendComp
+
+template <typename InType, typename Result > struct _skew3ExtendComp;       	// "projects/library/seqan/index/index_skew3.h"(121)
+
+//____________________________________________________________________________
+// _skew3NComp
+
+template <typename InType, typename Result > struct _skew3NComp;       	// "projects/library/seqan/index/index_skew3.h"(63)
+
+//____________________________________________________________________________
+// _skew3NMapExtended
+
+template <typename InType, typename Result > struct _skew3NMapExtended;       	// "projects/library/seqan/index/index_skew3.h"(115)
+
+//____________________________________________________________________________
+// _skew3NMapLinear
+
+template <typename InType, typename Result > struct _skew3NMapLinear;       	// "projects/library/seqan/index/index_skew3.h"(86)
+
+//____________________________________________________________________________
+// _skew3NMapSliced
+
+template <typename InType, typename Result > struct _skew3NMapSliced;       	// "projects/library/seqan/index/index_skew3.h"(94)
+
+//____________________________________________________________________________
+// _skew3UnslicerFunc
+
+template <typename InType, typename Result > struct _skew3UnslicerFunc;       	// "projects/library/seqan/index/index_skew3.h"(103)
+
+//____________________________________________________________________________
+// _skew7ExtendComp
+
+template <typename InType, const int EXT_LENGTH, typename Result > struct _skew7ExtendComp;       	// "projects/library/seqan/index/index_skew7.h"(151)
+
+//____________________________________________________________________________
+// _skew7GlobalSlicedMulti
+
+template <typename InType, typename TLimitsString, typename TResultSize , typename Result > struct _skew7GlobalSlicedMulti;       	// "projects/library/seqan/index/index_skew7_multi.h"(123)
+
+//____________________________________________________________________________
+// _skew7NComp
+
+template <typename InType, typename Result > struct _skew7NComp;       	// "projects/library/seqan/index/index_skew7.h"(63)
+
+//____________________________________________________________________________
+// _skew7NCompMulti
+
+template <typename InType, typename Result > struct _skew7NCompMulti;       	// "projects/library/seqan/index/index_skew7_multi.h"(56)
+
+//____________________________________________________________________________
+// _skew7NMapExtended
+
+template <typename InType, typename Result > struct _skew7NMapExtended;       	// "projects/library/seqan/index/index_skew7.h"(145)
+
+//____________________________________________________________________________
+// _skew7NMapLinear
+
+template <typename InType, typename Result > struct _skew7NMapLinear;       	// "projects/library/seqan/index/index_skew7.h"(105)
+
+//____________________________________________________________________________
+// _skew7NMapSliced
+
+template <typename InType, typename Result > struct _skew7NMapSliced;       	// "projects/library/seqan/index/index_skew7.h"(113)
+
+//____________________________________________________________________________
+// _skew7UnslicerFunc
+
+template <typename InType, typename Result > struct _skew7UnslicerFunc;       	// "projects/library/seqan/index/index_skew7.h"(129)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+namespace impl {
+
+//____________________________________________________________________________
+// error_t
+
+typedef int error_t;       	// "projects/library/seqan/index/pizzachili_api.h"(48)
+
+//____________________________________________________________________________
+// index_t
+
+typedef void* index_t;       	// "projects/library/seqan/index/pizzachili_api.h"(47)
+
+//____________________________________________________________________________
+// uchar_t
+
+typedef unsigned char uchar_t;       	// "projects/library/seqan/index/pizzachili_api.h"(45)
+
+//____________________________________________________________________________
+// ulong_t
+
+typedef unsigned long ulong_t;       	// "projects/library/seqan/index/pizzachili_api.h"(46)
+
+} //namespace impl
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// BwtWalkFast
+
+typedef Tag<BwtWalkFast_> const BwtWalkFast;       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(56)
+
+//____________________________________________________________________________
+// BwtWalkInPlace
+
+typedef Tag<BwtWalkInPlace_> const BwtWalkInPlace;       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(59)
+
+//____________________________________________________________________________
+// ErrorAlphabet
+
+typedef SimpleType<unsigned char, ErrorAlphabet_> ErrorAlphabet;       	// "projects/library/seqan/index/shape_threshold.h"(136)
+
+//____________________________________________________________________________
+// EsaBwt
+
+typedef FibreBwt EsaBwt;       	// "projects/library/seqan/index/index_esa_base.h"(276)
+
+//____________________________________________________________________________
+// EsaChildtab
+
+typedef FibreChildtab EsaChildtab;       	// "projects/library/seqan/index/index_esa_base.h"(275)
+
+//____________________________________________________________________________
+// EsaFindLcpe
+
+typedef Tag<FinderLcpe_> const EsaFindLcpe;       	// "projects/library/seqan/index/index_base.h"(90)
+
+//____________________________________________________________________________
+// EsaFindMlr
+
+typedef Tag<FinderMlr_> const EsaFindMlr;       	// "projects/library/seqan/index/index_base.h"(89)
+
+//____________________________________________________________________________
+// EsaLcp
+
+typedef FibreLcp EsaLcp;       	// "projects/library/seqan/index/index_esa_base.h"(273)
+
+//____________________________________________________________________________
+// EsaLcpe
+
+typedef FibreLcpe EsaLcpe;       	// "projects/library/seqan/index/index_esa_base.h"(274)
+
+//____________________________________________________________________________
+// EsaRawSA
+
+typedef FibreRawSA EsaRawSA;       	// "projects/library/seqan/index/index_esa_base.h"(271)
+
+//____________________________________________________________________________
+// EsaRawText
+
+typedef FibreRawText EsaRawText;       	// "projects/library/seqan/index/index_esa_base.h"(269)
+
+//____________________________________________________________________________
+// EsaSA
+
+typedef FibreSA EsaSA;       	// "projects/library/seqan/index/index_esa_base.h"(270)
+
+//____________________________________________________________________________
+// EsaSae
+
+typedef FibreSae EsaSae;       	// "projects/library/seqan/index/index_esa_base.h"(272)
+
+//____________________________________________________________________________
+// EsaText
+
+typedef FibreText EsaText;       	// "projects/library/seqan/index/index_esa_base.h"(268)
+
+//____________________________________________________________________________
+// FibreBucketMap
+
+typedef Tag<FibreBucketMap_> const FibreBucketMap;       	// "projects/library/seqan/index/index_qgram.h"(115)
+
+//____________________________________________________________________________
+// FibreBwt
+
+typedef Tag<FibreBwt_> const FibreBwt;       	// "projects/library/seqan/index/index_base.h"(337)
+
+//____________________________________________________________________________
+// FibreChildtab
+
+typedef Tag<FibreChildtab_> const FibreChildtab;       	// "projects/library/seqan/index/index_base.h"(336)
+
+//____________________________________________________________________________
+// FibreCounts
+
+typedef Tag<FibreCounts_> const FibreCounts;       	// "projects/library/seqan/index/index_qgram.h"(113)
+
+//____________________________________________________________________________
+// FibreCountsDir
+
+typedef Tag<FibreCountsDir_> const FibreCountsDir;       	// "projects/library/seqan/index/index_qgram.h"(114)
+
+//____________________________________________________________________________
+// FibreDir
+
+typedef Tag<FibreDir_> const FibreDir;       	// "projects/library/seqan/index/index_qgram.h"(110)
+
+//____________________________________________________________________________
+// FibreLcp
+
+typedef Tag<FibreLcp_> const FibreLcp;       	// "projects/library/seqan/index/index_base.h"(334)
+
+//____________________________________________________________________________
+// FibreLcpe
+
+typedef Tag<FibreLcpe_> const FibreLcpe;       	// "projects/library/seqan/index/index_base.h"(335)
+
+//____________________________________________________________________________
+// FibrePizzaChiliCompressed
+
+typedef Tag<FibrePizzaChiliCompressed_> const FibrePizzaChiliCompressed;       	// "projects/library/seqan/index/index_pizzachili.h"(59)
+
+//____________________________________________________________________________
+// FibrePizzaChiliText
+
+typedef Tag<FibreText_> const FibrePizzaChiliText;       	// "projects/library/seqan/index/index_pizzachili.h"(58)
+
+//____________________________________________________________________________
+// FibreRawSA
+
+typedef Tag<FibreRawSA_> const FibreRawSA;       	// "projects/library/seqan/index/index_base.h"(332)
+
+//____________________________________________________________________________
+// FibreRawText
+
+typedef Tag<FibreRawText_> const FibreRawText;       	// "projects/library/seqan/index/index_base.h"(330)
+
+//____________________________________________________________________________
+// FibreSA
+
+typedef Tag<FibreSA_> const FibreSA;       	// "projects/library/seqan/index/index_base.h"(331)
+
+//____________________________________________________________________________
+// FibreSADir
+
+typedef Tag<FibreSADir_> const FibreSADir;       	// "projects/library/seqan/index/index_qgram.h"(111)
+
+//____________________________________________________________________________
+// FibreSae
+
+typedef Tag<FibreSae_> const FibreSae;       	// "projects/library/seqan/index/index_base.h"(333)
+
+//____________________________________________________________________________
+// FibreShape
+
+typedef Tag<Fibre_Shape_> const FibreShape;       	// "projects/library/seqan/index/index_qgram.h"(112)
+
+//____________________________________________________________________________
+// FibreText
+
+typedef Tag<FibreText_> const FibreText;       	// "projects/library/seqan/index/index_base.h"(329)
+
+//____________________________________________________________________________
+// FinderSTree
+
+typedef Tag<FinderSTree_> const FinderSTree;       	// "projects/library/seqan/index/index_base.h"(91)
+
+//____________________________________________________________________________
+// GenericShape
+
+typedef GappedShape<Default> GenericShape;       	// "projects/library/seqan/index/shape_base.h"(47)
+
+//____________________________________________________________________________
+// MaxRepeats
+
+typedef MaxRepeats_<void> MaxRepeats;       	// "projects/library/seqan/index/index_esa_base.h"(151)
+
+//____________________________________________________________________________
+// MultiMems
+
+typedef MaxRepeats_<MultiMems_> MultiMems;       	// "projects/library/seqan/index/index_esa_base.h"(153)
+
+//____________________________________________________________________________
+// OpenAddressing
+
+typedef Tag<OpenAddressing_> OpenAddressing;       	// "projects/library/seqan/index/index_qgram_openaddressing.h"(42)
+
+//____________________________________________________________________________
+// PizzaChiliAF
+
+typedef Tag<PizzaChiliAF_> const PizzaChiliAF;       	// "projects/library/seqan/index/pizzachili_api.h"(83)
+
+//____________________________________________________________________________
+// PizzaChiliCcsa
+
+typedef Tag<PizzaChiliCcsa_> const PizzaChiliCcsa;       	// "projects/library/seqan/index/pizzachili_api.h"(86)
+
+//____________________________________________________________________________
+// PizzaChiliCompressed
+
+typedef FibrePizzaChiliCompressed PizzaChiliCompressed;       	// "projects/library/seqan/index/index_pizzachili.h"(62)
+
+//____________________________________________________________________________
+// PizzaChiliFM
+
+typedef Tag<PizzaChiliFM_> const PizzaChiliFM;       	// "projects/library/seqan/index/pizzachili_api.h"(89)
+
+//____________________________________________________________________________
+// PizzaChiliFinder
+
+typedef Tag<PizzaChiliFinder_> const PizzaChiliFinder;       	// "projects/library/seqan/index/index_pizzachili_find.h"(51)
+
+//____________________________________________________________________________
+// PizzaChiliLZ
+
+typedef Tag<PizzaChiliLZ_> const PizzaChiliLZ;       	// "projects/library/seqan/index/pizzachili_api.h"(92)
+
+//____________________________________________________________________________
+// PizzaChiliRlfm
+
+typedef Tag<PizzaChiliRlfm_> const PizzaChiliRlfm;       	// "projects/library/seqan/index/pizzachili_api.h"(98)
+
+//____________________________________________________________________________
+// PizzaChiliRsa
+
+typedef Tag<PizzaChiliRsa_> const PizzaChiliRsa;       	// "projects/library/seqan/index/pizzachili_api.h"(95)
+
+//____________________________________________________________________________
+// PizzaChiliSA
+
+typedef Tag<PizzaChiliSA_> const PizzaChiliSA;       	// "projects/library/seqan/index/pizzachili_api.h"(101)
+
+//____________________________________________________________________________
+// PizzaChiliSada
+
+typedef Tag<PizzaChiliSada_> const PizzaChiliSada;       	// "projects/library/seqan/index/pizzachili_api.h"(104)
+
+//____________________________________________________________________________
+// PizzaChiliSsa
+
+typedef Tag<PizzaChiliSsa_> const PizzaChiliSsa;       	// "projects/library/seqan/index/pizzachili_api.h"(107)
+
+//____________________________________________________________________________
+// PizzaChiliTest
+
+typedef Tag<PizzaChiliTest_> const PizzaChiliTest;       	// "projects/library/seqan/index/pizzachili_api.h"(110)
+
+//____________________________________________________________________________
+// PizzaChiliText
+
+typedef FibrePizzaChiliText PizzaChiliText;       	// "projects/library/seqan/index/index_pizzachili.h"(61)
+
+//____________________________________________________________________________
+// QGramBucketMap
+
+typedef FibreBucketMap QGramBucketMap;       	// "projects/library/seqan/index/index_qgram.h"(128)
+
+//____________________________________________________________________________
+// QGramCounts
+
+typedef FibreCounts QGramCounts;       	// "projects/library/seqan/index/index_qgram.h"(126)
+
+//____________________________________________________________________________
+// QGramCountsDir
+
+typedef FibreCountsDir QGramCountsDir;       	// "projects/library/seqan/index/index_qgram.h"(127)
+
+//____________________________________________________________________________
+// QGramDir
+
+typedef FibreDir QGramDir;       	// "projects/library/seqan/index/index_qgram.h"(123)
+
+//____________________________________________________________________________
+// QGramFindLookup
+
+typedef Tag<FinderQGramLookup_> const QGramFindLookup;       	// "projects/library/seqan/index/find_index_qgram.h"(53)
+
+//____________________________________________________________________________
+// QGramRawSA
+
+typedef FibreRawSA QGramRawSA;       	// "projects/library/seqan/index/index_qgram.h"(122)
+
+//____________________________________________________________________________
+// QGramSA
+
+typedef FibreSA QGramSA;       	// "projects/library/seqan/index/index_qgram.h"(121)
+
+//____________________________________________________________________________
+// QGramSADir
+
+typedef FibreSADir QGramSADir;       	// "projects/library/seqan/index/index_qgram.h"(124)
+
+//____________________________________________________________________________
+// QGramShape
+
+typedef FibreShape QGramShape;       	// "projects/library/seqan/index/index_qgram.h"(125)
+
+//____________________________________________________________________________
+// QGramText
+
+typedef FibreText QGramText;       	// "projects/library/seqan/index/index_qgram.h"(119)
+
+//____________________________________________________________________________
+// QGram_RawText
+
+typedef FibreRawText QGram_RawText;       	// "projects/library/seqan/index/index_qgram.h"(120)
+
+//____________________________________________________________________________
+// Quasar
+
+typedef Tag<Quasar_> Quasar;       	// "projects/library/seqan/index/find_quasar.h"(48)
+
+//____________________________________________________________________________
+// SimpleShape
+
+typedef UngappedShape<0> SimpleShape;       	// "projects/library/seqan/index/shape_base.h"(43)
+
+//____________________________________________________________________________
+// SwiftLocal
+
+typedef Tag<SwiftLocal_> SwiftLocal;       	// "projects/library/seqan/index/find_swift.h"(94)
+
+//____________________________________________________________________________
+// SwiftSemiGlobal
+
+typedef Tag<SwiftSemiGlobal_<void> > SwiftSemiGlobal;       	// "projects/library/seqan/index/find_swift.h"(98)
+
+//____________________________________________________________________________
+// SwiftSemiGlobalHamming
+
+typedef Tag<SwiftSemiGlobal_<Hamming_> > SwiftSemiGlobalHamming;       	// "projects/library/seqan/index/find_swift.h"(101)
+
+//____________________________________________________________________________
+// ThreshExact
+
+typedef Tag<ThreshExact_> const  ThreshExact;       	// "projects/library/seqan/index/shape_threshold.h"(47)
+
+//____________________________________________________________________________
+// ThreshHeuristic
+
+typedef Tag<ThreshHeuristic_> const ThreshHeuristic;       	// "projects/library/seqan/index/shape_threshold.h"(46)
+
+//____________________________________________________________________________
+// ThreshQGramLemma
+
+typedef Tag<ThreshQGramLemma_> const ThreshQGramLemma;       	// "projects/library/seqan/index/shape_threshold.h"(45)
+
+//____________________________________________________________________________
+// WotdDir
+
+typedef FibreDir WotdDir;       	// "projects/library/seqan/index/index_wotd.h"(76)
+
+//____________________________________________________________________________
+// WotdOriginal
+
+typedef Tag<WotdOriginal_> const WotdOriginal;       	// "projects/library/seqan/index/index_wotd.h"(98)
+
+//____________________________________________________________________________
+// WotdRawSA
+
+typedef FibreRawSA WotdRawSA;       	// "projects/library/seqan/index/index_wotd.h"(75)
+
+//____________________________________________________________________________
+// WotdRawText
+
+typedef FibreRawText WotdRawText;       	// "projects/library/seqan/index/index_wotd.h"(73)
+
+//____________________________________________________________________________
+// WotdSA
+
+typedef FibreSA WotdSA;       	// "projects/library/seqan/index/index_wotd.h"(74)
+
+//____________________________________________________________________________
+// WotdText
+
+typedef FibreText WotdText;       	// "projects/library/seqan/index/index_wotd.h"(72)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+namespace impl {
+
+//____________________________________________________________________________
+// clearIndex
+
+template <typename TText, typename TSpec> inline void clearIndex(Index<TText, PizzaChili<TSpec> >& me);       	// "projects/library/seqan/index/index_pizzachili.h"(148)
+
+//____________________________________________________________________________
+// createPizzaChiliIndex
+
+template <typename TText, typename TSpec> inline bool createPizzaChiliIndex( Index<TText, PizzaChili<TSpec> >& me, uchar_t* textstart, ulong_t textlength );       	// "projects/library/seqan/index/index_pizzachili.h"(272)
+
+//____________________________________________________________________________
+// getOptionsString
+
+template <typename TText, typename TSpec> inline char const* getOptionsString(Index<TText, PizzaChili<TSpec> >& );       	// "projects/library/seqan/index/index_pizzachili.h"(178)
+template <typename TText> inline char const* getOptionsString(Index<TText, PizzaChili<PizzaChiliSA> >& );       	// "projects/library/seqan/index/index_pizzachili.h"(185)
+template <typename TText> inline char const* getOptionsString(Index<TText, PizzaChili<PizzaChiliFM> >& );       	// "projects/library/seqan/index/index_pizzachili.h"(192)
+template <typename TText> inline char const* getOptionsString(Index<TText, PizzaChili<PizzaChiliRsa> >& );       	// "projects/library/seqan/index/index_pizzachili.h"(199)
+
+//____________________________________________________________________________
+// getPizzaChiliString
+
+template <typename TPattern> inline uchar_t* getPizzaChiliString(TPattern const& pattern);       	// "projects/library/seqan/index/index_pizzachili_find.h"(107)
+inline uchar_t* getPizzaChiliString(char const* pattern);       	// "projects/library/seqan/index/index_pizzachili_find.h"(125)
+
+//____________________________________________________________________________
+// queryText
+
+template <typename TValue, typename TSpec> inline void queryText(String<TValue, PizzaChili<TSpec> > const& me);       	// "projects/library/seqan/index/index_pizzachili_string.h"(434)
+
+} //namespace impl
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _adjustRightBorder
+
+template <typename TText, typename TSpec > inline void _adjustRightBorder( Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > &);       	// "projects/library/seqan/index/index_wotd.h"(631)
+template <typename TText, typename TIndexSpec, typename TSpec > inline void _adjustRightBorder( Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it);       	// "projects/library/seqan/index/index_wotd.h"(637)
+
+//____________________________________________________________________________
+// _approximateStringSearch
+
+template <typename TOnFoundFunctor, typename TString, typename TStringPos, typename TTreeIterator, typename TIterPos, typename TErrors > inline void _approximateStringSearch( TOnFoundFunctor &onFoundFunctor, TString const &string, TStringPos stringPos, TTreeIterator iter, TIterPos iterPos, TErrors errorsLeft);       	// "projects/library/seqan/index/find_index_approx.h"(150)
+
+//____________________________________________________________________________
+// _approximateTreeSearch
+
+template <bool enumerateA, bool enumerateB, typename TOnFoundFunctor, typename TTreeIteratorA, typename TIterPosA, typename TTreeIteratorB, typename TIterPosB, typename TErrors > inline void _approximateTreeSearch( TOnFoundFunctor &onFoundFunctor, TTreeIteratorA iterA, TIterPosA iterPosA, TTreeIteratorB iterB_, TIterPosB iterPosB, TErrors  errorsLeft);       	// "projects/library/seqan/index/find_index_approx.h"(76)
+
+//____________________________________________________________________________
+// _bucketLcp
+
+template <typename TSA, typename TText > typename Size<TText>::Type _bucketLcp(TSA const &sa, TText const &text);       	// "projects/library/seqan/index/index_wotd.h"(1444)
+template <typename TSA, typename TText, typename TSize > typename Size<TText>::Type _bucketLcp(TSA const &sa, TText const &text, TSize prefixLen);       	// "projects/library/seqan/index/index_wotd.h"(1478)
+template <typename TSA, typename TText, typename TSpec, typename TSize > typename Size<TText>::Type _bucketLcp(TSA const &sa, StringSet<TText, TSpec> const &stringSet, TSize prefixLen);       	// "projects/library/seqan/index/index_wotd.h"(1510)
+
+//____________________________________________________________________________
+// _childtabProcess
+
+template <typename TLCPInput, typename TDest > inline void _childtabProcess(TLCPInput &lcpIn, TDest &dest);       	// "projects/library/seqan/index/index_childtab.h"(58)
+
+//____________________________________________________________________________
+// _copySwiftHit
+
+template <typename TFinder, typename TIndex, typename TSpec> inline void _copySwiftHit( TFinder &finder, Pattern<TIndex, Swift<TSpec> > &pattern);       	// "projects/library/seqan/index/find_swift.h"(1648)
+template <typename TFinder, typename TIndex, typename TSpec> inline void _copySwiftHit( TFinder &finder, Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > &pattern);       	// "projects/library/seqan/index/find_swift.h"(1659)
+
+//____________________________________________________________________________
+// _createBWTableWrapper
+
+template <typename TBWT, typename TText, typename TSA, typename TTextRandom_ > inline void _createBWTableWrapper(TBWT &bwt, TText const &s, TSA const &sa, TTextRandom_ const);       	// "projects/library/seqan/index/index_shims.h"(494)
+template <typename TBWT, typename TText, typename TSA > inline void _createBWTableWrapper(TBWT &bwt, TText const &s, TSA const &sa, True const);       	// "projects/library/seqan/index/index_shims.h"(502)
+
+//____________________________________________________________________________
+// _createHit
+
+template <typename THaystack, typename TIndex, typename TSpec, typename TBucket, typename TBucketParams, typename TSize > inline void _createHit( Finder<THaystack, Swift<TSpec> > & finder, Pattern<TIndex, Swift<TSpec> > & pattern, TBucket & bkt, TBucketParams & bucketParams, __int64 diag, TSize ndlSeqNo);       	// "projects/library/seqan/index/find_swift.h"(828)
+
+//____________________________________________________________________________
+// _createLCPTablePipelining
+
+template <typename TLCPTable, typename TObject, typename TSA, typename TAlgSpec > void _createLCPTablePipelining( TLCPTable &LCP, TObject const &text, TSA const &suffixArray, TAlgSpec const);       	// "projects/library/seqan/index/index_shims.h"(223)
+template <typename TLCPTable, typename TString, typename TSpec, typename TSA, typename TAlgSpec > void _createLCPTablePipelining( TLCPTable &LCP, StringSet<TString, TSpec> const &stringSet, TSA const &suffixArray, TAlgSpec const);       	// "projects/library/seqan/index/index_shims.h"(254)
+
+//____________________________________________________________________________
+// _createLCPTableRandomAccess
+
+template <typename TLCPTable, typename TText, typename TSA > void _createLCPTableRandomAccess( TLCPTable &LCP, TText const &s, TSA const &SA, KasaiOriginal const);       	// "projects/library/seqan/index/index_lcp.h"(282)
+template <typename TLCPTable, typename TText, typename TSA > void _createLCPTableRandomAccess( TLCPTable &LCP, TText const &s, TSA const &SA, Kasai const);       	// "projects/library/seqan/index/index_lcp.h"(346)
+template <typename TLCPTable, typename TString, typename TSpec, typename TSA > void _createLCPTableRandomAccess( TLCPTable &LCP, StringSet<TString, TSpec> const &sset, TSA const &SA, Kasai const);       	// "projects/library/seqan/index/index_lcp.h"(431)
+
+//____________________________________________________________________________
+// _createLCPTableWrapper
+
+template <typename TLCP, typename TText, typename TSA, typename TAlgSpec > inline void _createLCPTableWrapper( TLCP &lcp, TText const &s, TSA const &sa, TAlgSpec const &alg, True);       	// "projects/library/seqan/index/index_shims.h"(304)
+template <typename TLCP, typename TText, typename TSA, typename TAlgSpec > inline void _createLCPTableWrapper( TLCP &lcp, TText const &s, TSA const &sa, TAlgSpec const &alg, False);       	// "projects/library/seqan/index/index_shims.h"(320)
+
+//____________________________________________________________________________
+// _createSuffixArray
+
+template <typename TSA, typename TText > inline void _createSuffixArray( TSA &SA, TText const &s, BwtWalk<BwtWalkFast> const &, True const &);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(140)
+template <typename TSA, typename TText > inline void _createSuffixArray( TSA &SA, TText const& s, BwtWalk<BwtWalkFast> const &, False const &);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(175)
+template <typename TSA, typename TText > inline void _createSuffixArray( TSA &SA, TText const &s, BwtWalk<BwtWalkInPlace> const &, False const &);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(209)
+template <typename TSA, typename TText, typename TValue, typename TArray > inline void _createSuffixArray( TSA &SA, TArray & lexxorpos, TValue & p, TText const &s, TValue const & NIL, TValue const &, TValue const &, BwtWalk<BwtWalkInPlace> const &, True const &, True const &);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(255)
+template <typename TSA, typename TText, typename TValue, typename TArray > inline void _createSuffixArray( TSA &SA, TArray & lexxorpos, TValue & p, TText const &s, TValue const & NIL, TValue const & FLAGBIT, TValue const & NOTFLAGBIT, BwtWalk<BwtWalkInPlace> const &, True const &, False const &);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(304)
+template <typename TSA, typename TText > inline void _createSuffixArray( TSA &SA, TText const &s, BwtWalk<BwtWalkInPlace> const &, True const &);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(382)
+
+//____________________________________________________________________________
+// _createSuffixArrayHandleTooLongSuffixArrayType
+
+template <typename TSA, typename TText, typename TValue, typename TArray > inline void _createSuffixArrayHandleTooLongSuffixArrayType( TSA &SA, TArray & lexxorpos, TValue & p, TText const &s, TValue const & NIL, TValue const & FLAGBIT, TValue const & NOTFLAGBIT, BwtWalk<BwtWalkInPlace> const &, True const &, True const &);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(350)
+template <typename TSA, typename TText, typename TValue, typename TArray > inline void _createSuffixArrayHandleTooLongSuffixArrayType( TSA &SA, TArray & lexxorpos, TValue & p, TText const &s, TValue const & NIL, TValue const & FLAGBIT, TValue const & NOTFLAGBIT, BwtWalk<BwtWalkInPlace> const &, True const &, False const &);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(368)
+
+//____________________________________________________________________________
+// _createSuffixArrayPipelining
+
+template <typename TSA, typename TObject, typename TAlgSpec > void _createSuffixArrayPipelining( TSA &suffixArray, TObject const &text, TAlgSpec const);       	// "projects/library/seqan/index/index_shims.h"(54)
+template <typename TSA, typename TString, typename TSpec, typename TAlgSpec > void _createSuffixArrayPipelining( TSA &suffixArray, StringSet<TString, TSpec> const &stringSet, TAlgSpec const);       	// "projects/library/seqan/index/index_shims.h"(88)
+
+//____________________________________________________________________________
+// _createSuffixArrayRandomAccess
+
+template <typename TSA, typename TText, typename TAlgSpec > inline void _createSuffixArrayRandomAccess( TSA &sa, TText const &s, TAlgSpec const &alg);       	// "projects/library/seqan/index/index_shims.h"(137)
+
+//____________________________________________________________________________
+// _createSuffixArrayWrapper
+
+template <typename TSA, typename TText, typename TAlgSpec > inline void _createSuffixArrayWrapper( TSA &sa, TText const &s, TAlgSpec const &alg, True);       	// "projects/library/seqan/index/index_shims.h"(155)
+template <typename TSA, typename TSequence, typename TSetSpec, typename TAlgSpec > inline void _createSuffixArrayWrapper( TSA &sa, StringSet<TSequence, TSetSpec> const &s, TAlgSpec const &, True);       	// "projects/library/seqan/index/index_shims.h"(171)
+template <typename TSA, typename TText, typename TAlgSpec > inline void _createSuffixArrayWrapper( TSA &sa, TText const &s, TAlgSpec const &alg, False);       	// "projects/library/seqan/index/index_shims.h"(185)
+
+//____________________________________________________________________________
+// _createSuffixList
+
+template <typename TArray, typename TText> inline typename Value<TArray>::Type _createSuffixList( TArray &lexprevpos, TArray &lexnextpos, TText const &s);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(444)
+
+//____________________________________________________________________________
+// _createXoredSuffixList
+
+template <typename TArray, typename TText> inline typename Value<TArray>::Type _createXoredSuffixList( TArray &lexxorpos, TText const &s);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(539)
+
+//____________________________________________________________________________
+// _cutErrorPattern
+
+template <typename TPattern> inline int _cutErrorPattern(TPattern &_pattern);       	// "projects/library/seqan/index/shape_threshold.h"(382)
+
+//____________________________________________________________________________
+// _dataHost
+
+template <typename TText, typename TSpec> inline Holder<TText> & _dataHost(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(589)
+template <typename TText, typename TSpec> inline Holder<TText> const & _dataHost(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(593)
+
+//____________________________________________________________________________
+// _deallocateStorage
+
+template <typename TValue, typename TSpec> inline void _deallocateStorage( String<TValue, PizzaChili<TSpec> >& , TValue* begin, typename Size<String<TValue, PizzaChili<TSpec> > >::Type );       	// "projects/library/seqan/index/index_pizzachili_string.h"(385)
+
+//____________________________________________________________________________
+// _dfsClear
+
+template <typename TIndex, class TSpec > inline void _dfsClear(Iter<TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1767)
+
+//____________________________________________________________________________
+// _dfsLcp
+
+template <typename TIndex, class TSpec > inline typename Size<TIndex>::Type & _dfsLcp(Iter< TIndex, VSTree< BottomUp<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(2275)
+template <typename TIndex, class TSpec > inline typename Size<TIndex>::Type _dfsLcp(Iter< TIndex, VSTree< BottomUp<TSpec> > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(2281)
+
+//____________________________________________________________________________
+// _dfsOnLeaf
+
+template <typename TSTree, typename TSpec > inline void _dfsOnLeaf(Iter<TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it);       	// "projects/library/seqan/index/index_esa_algs.h"(560)
+template <typename TIndex, typename TSpec > inline void _dfsOnLeaf(Iter<TIndex, VSTree< BottomUp<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(389)
+template <typename TSTree > inline void _dfsOnLeaf(Iter<TSTree, VSTree< BottomUp<MultiMems> > > &it);       	// "projects/library/seqan/index/index_esa_algs_multi.h"(378)
+
+//____________________________________________________________________________
+// _dfsOnPop
+
+template <typename TIndex, typename TSpec, typename TSize > inline void _dfsOnPop(Iter<TIndex, VSTree< BottomUp<TSpec> > > &it, TSize const);       	// "projects/library/seqan/index/index_esa_stree.h"(377)
+
+//____________________________________________________________________________
+// _dfsOnPush
+
+template <typename TSTree, typename TElement, typename TSpec > inline void _dfsOnPush(Iter<TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it, TElement const &e);       	// "projects/library/seqan/index/index_esa_algs.h"(546)
+template <typename TIndex, typename TSpec, typename TElement > inline void _dfsOnPush(Iter<TIndex, VSTree< BottomUp<TSpec> > > &it, TElement const &e);       	// "projects/library/seqan/index/index_esa_stree.h"(384)
+
+//____________________________________________________________________________
+// _dfsRange
+
+template <typename TIndex, class TSpec > inline Pair<typename Size<TIndex>::Type> & _dfsRange(Iter< TIndex, VSTree< BottomUp<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(2262)
+template <typename TIndex, class TSpec > inline Pair<typename Size<TIndex>::Type> const & _dfsRange(Iter< TIndex, VSTree< BottomUp<TSpec> > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(2269)
+
+//____________________________________________________________________________
+// _dfsReversedOrder
+
+template <typename TIndex, typename TSpec > inline bool _dfsReversedOrder(Iter<TIndex, VSTree< BottomUp<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(371)
+
+//____________________________________________________________________________
+// _dump
+
+template <typename TText, typename TSpec> inline void _dump(Index<TText, IndexEsa<TSpec> > &index);       	// "projects/library/seqan/index/index_esa_stree.h"(351)
+template <typename TText, typename TPredHull, typename TPred> inline void _dump(Index<TText, IndexWotd< Dfi<TPredHull, TPred> > > &index);       	// "projects/library/seqan/index/index_dfi.h"(523)
+template <typename TText, typename TSpec> inline void _dump(Index<TText, IndexWotd<TSpec> > &index);       	// "projects/library/seqan/index/index_wotd.h"(1784)
+
+//____________________________________________________________________________
+// _dumpFreq
+
+template <typename TText, typename TPredHull, typename TPred> inline void _dumpFreq(Index<TText, IndexWotd< Dfi<TPredHull, TPred> > > &index);       	// "projects/library/seqan/index/index_dfi.h"(551)
+
+//____________________________________________________________________________
+// _dumpHistoryStack
+
+template <typename TIndex, typename TSpec > inline void _dumpHistoryStack(Iter<TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(342)
+
+//____________________________________________________________________________
+// _equalRangeLcpe
+
+template <typename TText, typename TSA, typename TLCP, typename TSpec, typename TQuery > inline Pair< typename Iterator<TSA, Standard>::Type > _equalRangeLcpe( TText &text, TSA &sa, SearchTreeIterator< TLCP, TSpec > treeIter, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(1517)
+template <typename TText, typename TSA, typename TLCP, typename TQuery > inline Pair< typename Iterator<TSA, Standard>::Type > _equalRangeLcpe( TText &text, TSA &sa, TLCP &lcp, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(1669)
+
+//____________________________________________________________________________
+// _equalRangeSA
+
+template <typename TText, typename TSA, typename TSpec, typename TQuery > inline Pair< typename Iterator<TSA, Standard>::Type > _equalRangeSA( TText &text, SearchTreeIterator< TSA, TSpec > treeIter, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(760)
+
+//____________________________________________________________________________
+// _equalRangeSANaive
+
+template <typename TText, typename TSA, typename TSpec, typename TQuery > inline Pair< typename Iterator<TSA, Standard>::Type > _equalRangeSANaive( TText &text, SearchTreeIterator< TSA, TSpec > treeIter, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(704)
+
+//____________________________________________________________________________
+// _findFirstIndex
+
+template <typename TText, typename TSpec, typename TSpecFinder, typename TPattern > inline void _findFirstIndex( Finder< Index<TText, TSpec>, TSpecFinder > &finder, TPattern const &pattern, QGramFindLookup const);       	// "projects/library/seqan/index/find_index_qgram.h"(72)
+template <typename TText, typename TSpec, typename TSpecFinder, typename TPattern> inline void _findFirstIndex( Finder<Index<TText, PizzaChili<TSpec> >, TSpecFinder>& finder, TPattern const& pattern, PizzaChiliFinder const );       	// "projects/library/seqan/index/index_pizzachili_find.h"(138)
+template <typename TText, typename TSpec, typename TSpecFinder, typename TPattern > inline void _findFirstIndex( Finder< Index<TText, TSpec>, TSpecFinder > &finder, TPattern const &pattern, EsaFindMlr const);       	// "projects/library/seqan/index/find_index_esa.h"(1897)
+template <typename TText, typename TSpec, typename TSpecFinder, typename TPattern > inline void _findFirstIndex( Finder< Index<TText, TSpec>, TSpecFinder > &finder, TPattern const &pattern, EsaFindLcpe const);       	// "projects/library/seqan/index/find_index_esa.h"(1909)
+template <typename TText, typename TSpec, typename TSpecFinder, typename TPattern > inline void _findFirstIndex( Finder< Index<TText, TSpec>, TSpecFinder > &finder, TPattern const &pattern, FinderSTree const);       	// "projects/library/seqan/index/find_index_esa.h"(1922)
+
+//____________________________________________________________________________
+// _findNewCharInsertionPosition
+
+template <typename TArray, typename TValue > inline void _findNewCharInsertionPosition( TArray &lexfirstpos, TArray &lexlastpos, TValue &pMinus, TValue &pPlus, unsigned int cOrd);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(413)
+
+//____________________________________________________________________________
+// _firstNonRepeatRange
+
+template <typename TFinder, typename TIndex, typename TSpec> inline bool _firstNonRepeatRange( TFinder &finder, Pattern<TIndex, Swift<TSpec> > &pattern);       	// "projects/library/seqan/index/find_swift.h"(1618)
+
+//____________________________________________________________________________
+// _fractionMerge
+
+template <typename TSTree, typename TSpec, typename TValue, typename TSize > inline void _fractionMerge( Iter<TSTree, VSTree< BottomUp<TSpec> > > &it, FractionCompound_<TValue, TSize> &parent, FractionCompound_<TValue, TSize> &child);       	// "projects/library/seqan/index/index_esa_algs.h"(515)
+template <typename TSTree, typename TSpec, typename TValue, typename TSize > inline void _fractionMerge( Iter<TSTree, VSTree< BottomUp<TSpec> > > &it, FractionMultiCompound_<TValue, TSize> &parent, FractionMultiCompound_<TValue, TSize> &child);       	// "projects/library/seqan/index/index_esa_algs_multi.h"(357)
+
+//____________________________________________________________________________
+// _fullDir2Length
+
+template <typename TIndex> inline __int64 _fullDir2Length(TIndex const &index);       	// "projects/library/seqan/index/index_qgram.h"(543)
+
+//____________________________________________________________________________
+// _fullDirLength
+
+template <typename TIndex> inline __int64 _fullDirLength(TIndex const &index);       	// "projects/library/seqan/index/index_qgram.h"(535)
+template <typename TObject, typename TShapeSpec> inline __int64 _fullDirLength(Index<TObject, IndexQGram<TShapeSpec, OpenAddressing> > const &index);       	// "projects/library/seqan/index/index_qgram_openaddressing.h"(306)
+
+//____________________________________________________________________________
+// _getDown
+
+template <typename TSize, typename TIndex > inline TSize _getDown(TSize i, TIndex const &index);       	// "projects/library/seqan/index/index_esa_stree.h"(2251)
+
+//____________________________________________________________________________
+// _getErrorPatternIndex
+
+template <typename TPatternStore, typename TPattern> inline int _getErrorPatternIndex(TPatternStore const &patternStore, TPattern const &pattern);       	// "projects/library/seqan/index/shape_threshold.h"(363)
+
+//____________________________________________________________________________
+// _getId
+
+template <typename TSize > inline typename Id< VertexEsa<TSize> const >::Type _getId(VertexEsa<TSize> const &desc);       	// "projects/library/seqan/index/index_esa_stree.h"(754)
+template <typename TSize > inline typename Id< VertexEsa<TSize> >::Type _getId(VertexEsa<TSize> &desc);       	// "projects/library/seqan/index/index_esa_stree.h"(768)
+template <typename TSize > inline typename Id< VertexWotdOriginal_<TSize> const >::Type _getId(VertexWotdOriginal_<TSize> const &desc);       	// "projects/library/seqan/index/index_wotd.h"(377)
+template <typename TSize > inline typename Id< VertexWotdOriginal_<TSize> >::Type _getId(VertexWotdOriginal_<TSize> &desc);       	// "projects/library/seqan/index/index_wotd.h"(384)
+template <typename TSize > inline typename Id< VertexWotdModified_<TSize> const >::Type _getId(VertexWotdModified_<TSize> const &desc);       	// "projects/library/seqan/index/index_wotd.h"(391)
+template <typename TSize > inline typename Id< VertexWotdModified_<TSize> >::Type _getId(VertexWotdModified_<TSize> &desc);       	// "projects/library/seqan/index/index_wotd.h"(398)
+
+//____________________________________________________________________________
+// _getLastPatternProb
+
+template <typename TState, typename TLogErrorDistr, typename TPattern > inline void _getLastPatternProb(TState &state, TLogErrorDistr const &logError, TPattern const &pattern, int span);       	// "projects/library/seqan/index/shape_threshold.h"(422)
+template <typename TState, typename TPattern > inline void _getLastPatternProb(TState &, Nothing const &, TPattern const &, int);       	// "projects/library/seqan/index/shape_threshold.h"(437)
+
+//____________________________________________________________________________
+// _getNextl
+
+template <typename TSize, typename TIndex > inline TSize _getNextl(TSize i, TIndex const &index);       	// "projects/library/seqan/index/index_esa_stree.h"(2236)
+
+//____________________________________________________________________________
+// _getNodeByChar
+
+template <typename TText, class TIndexSpec, class TSpec, typename TValue > inline bool _getNodeByChar( Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree<TSpec> > const &it, TValue c, typename VertexDescriptor< Index<TText, IndexEsa<TIndexSpec> > >::Type &childDesc);       	// "projects/library/seqan/index/index_esa_stree.h"(1090)
+
+//____________________________________________________________________________
+// _getNodeLP
+
+template <typename TText, typename TSpec, typename TPos> inline TPos _getNodeLP( Index<TText, IndexWotd<TSpec> > const &index, TPos pos);       	// "projects/library/seqan/index/index_wotd.h"(1561)
+
+//____________________________________________________________________________
+// _getProb
+
+template <typename TLogErrorDistr > typename Value<TLogErrorDistr>::Type _getProb(TLogErrorDistr const &logError, int errorType, int readPos);       	// "projects/library/seqan/index/shape_threshold.h"(411)
+
+//____________________________________________________________________________
+// _getUp
+
+template <typename TSize, typename TIndex > inline TSize _getUp(TSize i, TIndex const &index);       	// "projects/library/seqan/index/index_esa_stree.h"(2242)
+
+//____________________________________________________________________________
+// _goDown
+
+template <typename TText, class TIndexSpec, class TSpec, typename TDfsOrder > inline bool _goDown( Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it, VSTreeIteratorTraits<TDfsOrder, False> const);       	// "projects/library/seqan/index/index_esa_stree.h"(1391)
+template <typename TText, class TIndexSpec, class TSpec, typename TDfsOrder > inline bool _goDown( Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it, VSTreeIteratorTraits<TDfsOrder, True> const);       	// "projects/library/seqan/index/index_esa_stree.h"(1411)
+template <typename TText, typename TSpec, typename TDfsOrder, typename THideEmptyEdges > inline bool _goDown( Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > &it, VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_wotd.h"(662)
+template <typename TText, typename TIndexSpec, typename TSpec, typename TDfsOrder, typename THideEmptyEdges > inline bool _goDown( Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it, VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_wotd.h"(698)
+
+//____________________________________________________________________________
+// _goDownChar
+
+template <typename TIndex, class TSpec, typename TValue > inline bool _goDownChar(Iter< TIndex, VSTree< TopDown<TSpec> > > &it, TValue c);       	// "projects/library/seqan/index/index_esa_stree.h"(1456)
+template <typename TText, class TSpec, typename TValue > inline bool _goDownChar( Iter<Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > &it, TValue c);       	// "projects/library/seqan/index/index_wotd.h"(1813)
+template <typename TText, class TIndexSpec, class TSpec, typename TValue > inline bool _goDownChar( Iter<Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it, TValue c);       	// "projects/library/seqan/index/index_wotd.h"(1835)
+
+//____________________________________________________________________________
+// _goDownObject
+
+template <typename TIndex, typename TSpec, typename TObject > inline bool _goDownObject( Iter< TIndex, VSTree< TopDown<TSpec> > > &it, TObject const &obj, False);       	// "projects/library/seqan/index/index_esa_stree.h"(1524)
+template <typename TIndex, typename TSpec, typename TObject > inline bool _goDownObject( Iter< TIndex, VSTree< TopDown<TSpec> > > &it, TObject const &obj, True);       	// "projects/library/seqan/index/index_esa_stree.h"(1534)
+
+//____________________________________________________________________________
+// _goDownString
+
+template <typename TIndex, typename TSpec, typename TString, typename TSize > inline bool _goDownString( Iter< TIndex, VSTree< TopDown<TSpec> > > &node, TString const &pattern, TSize &lcp);       	// "projects/library/seqan/index/index_esa_stree.h"(1474)
+
+//____________________________________________________________________________
+// _goRight
+
+template <typename TText, class TIndexSpec, class TSpec, typename TDfsOrder, typename THideEmptyEdges > inline bool _goRight( Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it, VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_esa_stree.h"(1660)
+template <typename TText, typename TSpec, typename TDfsOrder, typename THideEmptyEdges > inline bool _goRight( Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > &it, VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_wotd.h"(734)
+template <typename TText, typename TIndexSpec, typename TSpec, typename TDfsOrder, typename THideEmptyEdges > inline bool _goRight( Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it, VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_wotd.h"(758)
+
+//____________________________________________________________________________
+// _goUp
+
+template <typename TIndex, class TSpec > inline bool _goUp(Iter< TIndex, VSTree< TopDown<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1576)
+template <typename TIndex, class TSpec > inline bool _goUp(Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1588)
+template <typename TText, typename TWotdSpec, typename TSpec > inline bool _goUp(Iter< Index<TText, IndexWotd<TWotdSpec> >, VSTree< TopDown<TSpec> > > &it);       	// "projects/library/seqan/index/index_wotd.h"(783)
+template <typename TText, typename TSpec > inline bool _goUp(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it);       	// "projects/library/seqan/index/index_wotd.h"(795)
+template <typename TText, typename TIndexSpec, typename TSpec > inline bool _goUp(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it);       	// "projects/library/seqan/index/index_wotd.h"(812)
+
+//____________________________________________________________________________
+// _hashFixedShape
+
+template <typename THValue, typename TValue, typename TIter> inline THValue _hashFixedShape(THValue hash, TIter &, TValue const, UngappedShape<1> const);       	// "projects/library/seqan/index/shape_base.h"(338)
+template <typename THValue, typename TValue, typename TIter, unsigned q> inline THValue _hashFixedShape(THValue hash, TIter &it, TValue const, UngappedShape<q> const);       	// "projects/library/seqan/index/shape_base.h"(344)
+
+//____________________________________________________________________________
+// _hashHardwiredShape
+
+template <typename THValue, typename TValue, typename TIter> inline THValue _hashHardwiredShape(THValue hash, TIter &, TValue const, HardwiredShape< 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0 > const);       	// "projects/library/seqan/index/shape_gapped.h"(479)
+template <int P01, int P02, int P03, int P04, int P05, int P06, int P07, int P08, int P09, int P10, int P11, int P12, int P13, int P14, int P15, int P16, int P17, int P18, int P19, typename THValue, typename TValue, typename TIter > inline THValue _hashHardwiredShape(THValue hash, TIter &it, TValue const, HardwiredShape< 1 ,P01,P02,P03,P04, P05,P06,P07,P08,P09, P10,P11,P12,P13,P14, P15,P16,P17,P18,P19 > const);       	// "projects/library/seqan/index/shape_gapped.h"(496)
+template <int P00, int P01, int P02, int P03, int P04, int P05, int P06, int P07, int P08, int P09, int P10, int P11, int P12, int P13, int P14, int P15, int P16, int P17, int P18, int P19, typename THValue, typename TValue, typename TIter > inline THValue _hashHardwiredShape(THValue hash, TIter &it, TValue const, HardwiredShape< P00,P01,P02,P03,P04, P05,P06,P07,P08,P09, P10,P11,P12,P13,P14, P15,P16,P17,P18,P19 > const);       	// "projects/library/seqan/index/shape_gapped.h"(519)
+
+//____________________________________________________________________________
+// _hashTuple2FixedShape
+
+template <typename THValue, typename TValue, typename TTValue, unsigned SIZE, typename TCompressed> inline THValue _hashTuple2FixedShape( THValue const, Tuple<TTValue, SIZE, TCompressed> const &tuple, TValue const, UngappedShape<1> const);       	// "projects/library/seqan/index/shape_base.h"(401)
+template <typename THValue, typename TValue, typename TTValue, unsigned SIZE, typename TCompressed, unsigned q> inline THValue _hashTuple2FixedShape( THValue const, Tuple<TTValue, SIZE, TCompressed> const &tuple, TValue const, UngappedShape<q> const);       	// "projects/library/seqan/index/shape_base.h"(412)
+
+//____________________________________________________________________________
+// _haveMaximalRepeats
+
+template <typename TValue, typename TSize> int _haveMaximalRepeats( FractionCompound_<TValue, TSize> const &a, FractionCompound_<TValue, TSize> const &b);       	// "projects/library/seqan/index/index_esa_algs.h"(315)
+template <typename TValue, typename TSize> int _haveMaximalRepeats( FractionCompound_<TValue, TSize> const &a, FractionCompound_<TValue, TSize> const &b, TValue &equalKey);       	// "projects/library/seqan/index/index_esa_algs.h"(336)
+
+//____________________________________________________________________________
+// _historyClear
+
+template <typename TIndex, class TSpec > inline void _historyClear(Iter< TIndex, VSTree<TSpec> > &);       	// "projects/library/seqan/index/index_esa_stree.h"(1337)
+template <typename TIndex, class TSpec > inline void _historyClear(Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1342)
+
+//____________________________________________________________________________
+// _historyPush
+
+template <typename TText, class TIndexSpec, class TSpec > inline void _historyPush(Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1355)
+template <typename TText, class TIndexSpec, class TSpec > inline void _historyPush(Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1362)
+template <typename TText, typename TIndexSpec, typename TSpec > inline void _historyPush(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it);       	// "projects/library/seqan/index/index_wotd.h"(322)
+template <typename TText, typename TSpec > inline void _historyPush(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it);       	// "projects/library/seqan/index/index_wotd.h"(331)
+template <typename TText, typename TIndexSpec, typename TSpec > inline void _historyPush(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it);       	// "projects/library/seqan/index/index_wotd.h"(342)
+
+//____________________________________________________________________________
+// _indexRequireBottomUpIteration
+
+template <typename TText, typename TSpec > void _indexRequireBottomUpIteration(Index<TText, IndexEsa<TSpec> > &index);       	// "projects/library/seqan/index/index_esa_base.h"(354)
+
+//____________________________________________________________________________
+// _indexRequireTopDownIteration
+
+template <typename TText, typename TSpec > void _indexRequireTopDownIteration(Index<TText, IndexEsa<TSpec> > &index);       	// "projects/library/seqan/index/index_esa_base.h"(346)
+template <typename TText, typename TSpec > void _indexRequireTopDownIteration(Index<TText, IndexWotd<TSpec> > &index);       	// "projects/library/seqan/index/index_wotd.h"(280)
+
+//____________________________________________________________________________
+// _insertAfter
+
+template <typename TArray, typename TValue > inline void _insertAfter( TArray &lexprevpos, TArray &lexnextpos, TValue p, TValue predecessor);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(115)
+
+//____________________________________________________________________________
+// _insertBefore
+
+template <typename TArray, typename TValue > inline void _insertBefore( TArray &lexprevpos, TArray &lexnextpos, TValue p, TValue successor);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(104)
+
+//____________________________________________________________________________
+// _insertBetween
+
+template <typename TArray, typename TValue > inline void _insertBetween( TArray &lexprevpos, TArray &lexnextpos, TValue p, TValue predecessor, TValue successor);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(89)
+
+//____________________________________________________________________________
+// _insertXorBetween
+
+template <typename TArray, typename TValue > inline void _insertXorBetween( TArray &lexxorpos, TValue p, TValue predecessor, TValue successor);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(126)
+
+//____________________________________________________________________________
+// _isLeaf
+
+template <typename TSize > inline bool _isLeaf(VertexEsa<TSize> const &vDesc);       	// "projects/library/seqan/index/index_esa_stree.h"(2165)
+template <typename TIndex, class TSpec, typename TDfsOrder > inline bool _isLeaf( Iter<TIndex, VSTree<TSpec> > const &it, VSTreeIteratorTraits<TDfsOrder, False> const);       	// "projects/library/seqan/index/index_esa_stree.h"(2175)
+template <typename TIndex, class TSpec, typename TDfsOrder > inline bool _isLeaf( Iter<TIndex, VSTree<TSpec> > const &it, VSTreeIteratorTraits<TDfsOrder, True> const);       	// "projects/library/seqan/index/index_esa_stree.h"(2184)
+template <typename TText, typename TIndexSpec, typename TSpec, typename TDfsOrder > inline bool _isLeaf( Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TSpec> > const &it, VSTreeIteratorTraits<TDfsOrder, False> const);       	// "projects/library/seqan/index/index_wotd.h"(419)
+template <typename TText, typename TIndexSpec, typename TSpec, typename TDfsOrder > inline bool _isLeaf( Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TSpec> > const &it, VSTreeIteratorTraits<TDfsOrder, True> const);       	// "projects/library/seqan/index/index_wotd.h"(430)
+
+//____________________________________________________________________________
+// _isNextl
+
+template <typename TSize, typename TIndex > inline bool _isNextl(TSize i, TIndex const &index);       	// "projects/library/seqan/index/index_esa_stree.h"(2220)
+
+//____________________________________________________________________________
+// _isRoot
+
+template <typename TSize > inline bool _isRoot(VertexEsa<TSize> const &value);       	// "projects/library/seqan/index/index_esa_stree.h"(1909)
+template <typename TSize > inline bool _isRoot(VertexWotdOriginal_<TSize> const &value);       	// "projects/library/seqan/index/index_wotd.h"(405)
+template <typename TSize > inline bool _isRoot(VertexWotdModified_<TSize> const &value);       	// "projects/library/seqan/index/index_wotd.h"(410)
+
+//____________________________________________________________________________
+// _isSizeInval
+
+template <typename TValue> inline bool _isSizeInval(TValue const &v);       	// "projects/library/seqan/index/index_base.h"(1008)
+
+//____________________________________________________________________________
+// _isUp
+
+template <typename TSize, typename TIndex > inline bool _isUp(TSize i, TIndex const &index);       	// "projects/library/seqan/index/index_esa_stree.h"(2228)
+
+//____________________________________________________________________________
+// _lcpProcess
+
+template <typename TTextInput, typename TInvertedSAInput, typename TDest > static void _lcpProcess(TTextInput &textIn, TInvertedSAInput &invertedSAIn, TDest &dest, LcpConfig conf);       	// "projects/library/seqan/index/pump_lcp_core.h"(70)
+template <typename TTextInput, typename TInvertedSAInput, typename TDest > static inline void _lcpProcess(TTextInput &textIn, TInvertedSAInput &invertedSAIn, TDest &dest);       	// "projects/library/seqan/index/pump_lcp_core.h"(210)
+
+//____________________________________________________________________________
+// _lcpProcessMulti
+
+template <typename TTextInput, typename TLimitsString, typename TInvertedSAInput, typename TDest > static void _lcpProcessMulti( TTextInput &textIn, TLimitsString const &limits, TInvertedSAInput &invertedSAIn, TDest &dest, LcpConfig conf);       	// "projects/library/seqan/index/pump_lcp_core.h"(222)
+template <typename TTextInput, typename TLimitsString, typename TInvertedSAInput, typename TDest > static void _lcpProcessMulti( TTextInput &textIn, TLimitsString const &limits, TInvertedSAInput &invertedSAIn, TDest &dest);       	// "projects/library/seqan/index/pump_lcp_core.h"(381)
+
+//____________________________________________________________________________
+// _leqSkew3
+
+template <typename T, typename ST> inline bool _leqSkew3(T a1, ST a2,  T b1, ST b2);       	// "projects/library/seqan/index/index_skew3.h"(327)
+template <typename T, typename ST> inline bool _leqSkew3(T a1, T a2, ST a3,  T b1, T b2, ST b3);       	// "projects/library/seqan/index/index_skew3.h"(333)
+
+//____________________________________________________________________________
+// _leqSkew7
+
+template <typename TTextIter, typename TSize> inline bool _leqSkew7(TTextIter a1, TSize a2,  TTextIter b1, TSize b2,  TSize n);       	// "projects/library/seqan/index/index_skew7.h"(433)
+template <typename TTextIter, typename TSize> inline bool _leqSkew7(TTextIter a,  TTextIter b,  TSize n);       	// "projects/library/seqan/index/index_skew7.h"(444)
+template <typename TTextIter, typename TSize, typename TString> inline bool _leqSkew7(unsigned a, unsigned b,  TTextIter spos[], const TSize tpos[], const bool islast[], const TString &s124, const TSize adjust[7][7]);       	// "projects/library/seqan/index/index_skew7.h"(455)
+
+//____________________________________________________________________________
+// _lowerBoundLcpe
+
+template <typename TText, typename TSA, typename TLCP, typename TSpec, typename TQuery, typename TDiff_ > inline typename Iterator<TSA, Standard>::Type _lowerBoundLcpe( TText &text, TSA &sa, SearchTreeIterator< TLCP, TSpec > treeIter, TQuery &query, TDiff_ lcpLower, TDiff_ lcpUpper);       	// "projects/library/seqan/index/find_index_esa.h"(1147)
+template <typename TText, typename TSA, typename TLCP, typename TSpec, typename TQuery > inline typename Iterator<TSA, Standard>::Type _lowerBoundLcpe( TText &text, TSA &sa, SearchTreeIterator< TLCP, TSpec > &treeIter, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(1324)
+
+//____________________________________________________________________________
+// _lowerBoundSA
+
+template <typename TText, typename TSA, typename TSpec, typename TQuery > inline typename Iterator<TSA, Standard>::Type _lowerBoundSA( TText &text, SearchTreeIterator< TSA, TSpec > treeIter, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(553)
+
+//____________________________________________________________________________
+// _lowerBoundSANaive
+
+template <typename TText, typename TSA, typename TSpec, typename TQuery > inline typename Iterator<TSA, Standard>::Type _lowerBoundSANaive( TText &text, SearchTreeIterator< TSA, TSpec > treeIter, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(511)
+
+//____________________________________________________________________________
+// _nextNonRepeatRange
+
+template <typename TFinder, typename TIndex, typename TSpec> inline bool _nextNonRepeatRange( TFinder &finder, Pattern<TIndex, Swift<TSpec> > &pattern);       	// "projects/library/seqan/index/find_swift.h"(1582)
+
+//____________________________________________________________________________
+// _onGoDown
+
+template <typename TIndex, typename TSpec > inline void _onGoDown(Iter<TIndex, VSTree< TopDown<TSpec> > > &);       	// "projects/library/seqan/index/index_esa_stree.h"(1374)
+
+//____________________________________________________________________________
+// _onGoRight
+
+template <typename TIndex, typename TSpec > inline void _onGoRight(Iter<TIndex, VSTree< TopDown<TSpec> > > &);       	// "projects/library/seqan/index/index_esa_stree.h"(1377)
+
+//____________________________________________________________________________
+// _onGoUp
+
+template <typename TIndex, typename TSpec > inline void _onGoUp(Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &);       	// "projects/library/seqan/index/index_esa_stree.h"(1380)
+
+//____________________________________________________________________________
+// _patternInit
+
+template <typename TNeedle> inline void _patternInit (Pattern<TNeedle, Quasar> & );       	// "projects/library/seqan/index/find_quasar.h"(123)
+template <typename TIndex, typename TFloat, typename TSize_, typename TSpec> inline void _patternInit(Pattern<TIndex, Swift<TSpec> > &pattern, TFloat errorRate, TSize_ minLengthForAll);       	// "projects/library/seqan/index/find_swift.h"(567)
+
+//____________________________________________________________________________
+// _pizzaChiliDeallocate
+
+template <typename TValue> inline void _pizzaChiliDeallocate(TValue* begin);       	// "projects/library/seqan/index/index_pizzachili_string.h"(291)
+
+//____________________________________________________________________________
+// _pizzaChiliReallocate
+
+template <typename TValue, typename TSpec> inline typename Value<String<TValue, PizzaChili<TSpec> > >::Type* _pizzaChiliReallocate( String<TValue, PizzaChili<TSpec> >& me, typename Size<String<TValue, PizzaChili<TSpec> > >::Type new_capacity );       	// "projects/library/seqan/index/index_pizzachili_string.h"(274)
+
+//____________________________________________________________________________
+// _printDots
+
+template <typename THaystack, typename TSpec> inline void _printDots(Finder<THaystack, Swift<TSpec> > &finder);       	// "projects/library/seqan/index/find_swift.h"(1564)
+
+//____________________________________________________________________________
+// _printSwiftBuckets
+
+template <typename TIndex, typename TSpec> inline void _printSwiftBuckets(Pattern< TIndex, Swift<TSpec> > &p);       	// "projects/library/seqan/index/find_swift.h"(460)
+
+//____________________________________________________________________________
+// _printSwiftParams
+
+template <typename TSpec_, typename TSize, typename TShortSize> inline void _printSwiftParams(SwiftBucketParams_<TSpec_, TSize, TShortSize > &bucketParams);       	// "projects/library/seqan/index/find_swift.h"(437)
+template <typename TSpec_, typename TSize, typename TShortSize> inline void _printSwiftParams(SwiftBucketParams_<Tag<SwiftSemiGlobal_<TSpec_> >, TSize, TShortSize > &bucketParams);       	// "projects/library/seqan/index/find_swift.h"(449)
+
+//____________________________________________________________________________
+// _probAdd
+
+template <typename TValue> inline void _probAdd(TValue &a, TValue b);       	// "projects/library/seqan/index/shape_threshold.h"(288)
+
+//____________________________________________________________________________
+// _probDiv
+
+template <typename TValue> inline TValue _probDiv(TValue a, TValue b);       	// "projects/library/seqan/index/shape_threshold.h"(316)
+
+//____________________________________________________________________________
+// _probMul
+
+template <typename TValue> inline TValue _probMul(TValue a, TValue b);       	// "projects/library/seqan/index/shape_threshold.h"(305)
+
+//____________________________________________________________________________
+// _qgramClearDir
+
+template <typename TDir > inline void _qgramClearDir(TDir &dir, Nothing &);       	// "projects/library/seqan/index/index_qgram.h"(868)
+template <typename TDir, typename THashValue > inline void _qgramClearDir(TDir &dir, BucketMap<THashValue> &bucketMap);       	// "projects/library/seqan/index/index_qgram_openaddressing.h"(177)
+
+//____________________________________________________________________________
+// _qgramCountQGrams
+
+template <typename TDir, typename TBucketMap, typename TText, typename TShape, typename TStepSize > inline void _qgramCountQGrams(TDir &dir, TBucketMap &bucketMap, TText const &text, TShape shape, TStepSize stepSize);       	// "projects/library/seqan/index/index_qgram.h"(877)
+template <typename TDir, typename TBucketMap, typename TString, typename TSpec, typename TShape, typename TStepSize > inline void _qgramCountQGrams(TDir &dir, TBucketMap &bucketMap, StringSet<TString, TSpec> const &stringSet, TShape shape, TStepSize stepSize);       	// "projects/library/seqan/index/index_qgram.h"(904)
+
+//____________________________________________________________________________
+// _qgramCummulativeSum
+
+template <typename TDir, typename TWithConstraints > inline typename Value<TDir>::Type _qgramCummulativeSum(TDir &dir, TWithConstraints);       	// "projects/library/seqan/index/index_qgram.h"(949)
+
+//____________________________________________________________________________
+// _qgramCummulativeSumAlt
+
+template <typename TDir, typename TWithConstraints > inline typename Value<TDir>::Type _qgramCummulativeSumAlt(TDir &dir, TWithConstraints const);       	// "projects/library/seqan/index/index_qgram.h"(981)
+
+//____________________________________________________________________________
+// _qgramDisableBuckets
+
+template <typename TIndex > inline bool _qgramDisableBuckets(TIndex &);       	// "projects/library/seqan/index/index_qgram.h"(1181)
+
+//____________________________________________________________________________
+// _qgramFillSuffixArray
+
+template <typename TSA, typename TText, typename TShape, typename TDir, typename TBucketMap, typename TWithConstraints, typename TStepSize > inline void _qgramFillSuffixArray( TSA &sa, TText const &text, TShape shape, TDir &dir, TBucketMap &bucketMap, TStepSize stepSize, TWithConstraints const);       	// "projects/library/seqan/index/index_qgram.h"(1021)
+template <typename TSA, typename TString, typename TSpec, typename TShape, typename TDir, typename TBucketMap, typename TStepSize, typename TWithConstraints > inline void _qgramFillSuffixArray( TSA &sa, StringSet<TString, TSpec> const &stringSet, TShape shape, TDir &dir, TBucketMap &bucketMap, TStepSize stepSize, TWithConstraints const);       	// "projects/library/seqan/index/index_qgram.h"(1076)
+
+//____________________________________________________________________________
+// _qgramLemma
+
+template <typename TIndex, typename TSpec, typename TSeqNo> inline int _qgramLemma(Pattern<TIndex, Swift<TSpec> > const & pattern, TSeqNo seqNo, int errors);       	// "projects/library/seqan/index/find_swift.h"(505)
+
+//____________________________________________________________________________
+// _qgramPostprocessBuckets
+
+template <typename TDir > inline void _qgramPostprocessBuckets(TDir &dir);       	// "projects/library/seqan/index/index_qgram.h"(1140)
+
+//____________________________________________________________________________
+// _qgramQGramCount
+
+template <typename TText, typename TShapeSpec, typename TSpec> inline typename Size<Index<TText, IndexQGram<TShapeSpec, TSpec> > >::Type _qgramQGramCount(Index<TText, IndexQGram<TShapeSpec, TSpec> > const &index);       	// "projects/library/seqan/index/index_qgram.h"(1863)
+
+//____________________________________________________________________________
+// _reallocateStorage
+
+template <typename TValue, typename TSpec> inline typename Value<String<TValue, PizzaChili<TSpec> > >::Type* _reallocateStorage( String<TValue, PizzaChili<TSpec> >& me, typename Size<String<TValue, PizzaChili<TSpec> > >::Type new_capacity, Exact );       	// "projects/library/seqan/index/index_pizzachili_string.h"(374)
+
+//____________________________________________________________________________
+// _refineQGramIndex
+
+template <typename TSA, typename TDir, typename TText, typename TSize1, typename TSize2 > void _refineQGramIndex( TSA &sa, TDir &dir, TText const &text, TSize1 oldQ, TSize2 newQ);       	// "projects/library/seqan/index/index_qgram.h"(1385)
+
+//____________________________________________________________________________
+// _repeatMaskValue
+
+template <typename TValue> inline bool _repeatMaskValue(TValue);       	// "projects/library/seqan/index/repeat_base.h"(104)
+template <> inline bool _repeatMaskValue(Dna5 val);       	// "projects/library/seqan/index/repeat_base.h"(110)
+template <> inline bool _repeatMaskValue(Iupac val);       	// "projects/library/seqan/index/repeat_base.h"(116)
+
+//____________________________________________________________________________
+// _resetBucket
+
+template <typename TSpec, typename TSize, typename TShortSize, typename TPos> inline void _resetBucket(SwiftBucket_<TSpec, TSize, TShortSize> & bkt, TPos lastIncrement);       	// "projects/library/seqan/index/find_swift.h"(532)
+template <typename TSpec, typename TSize, typename TShortSize, typename TPos, typename TThresh> inline void _resetBucket(SwiftBucket_<TSpec, TSize, TShortSize> & bkt, TPos lastIncrement, TThresh threshold);       	// "projects/library/seqan/index/find_swift.h"(541)
+template <typename TSpec_, typename TSize, typename TShortSize, typename TPos> inline void _resetBucket(SwiftBucket_<SwiftSemiGlobal_<TSpec_>, TSize, TShortSize> & bkt, TPos lastIncrement);       	// "projects/library/seqan/index/find_swift.h"(551)
+template <typename TSpec_, typename TSize, typename TShortSize, typename TPos, typename TThresh> inline void _resetBucket(SwiftBucket_<SwiftSemiGlobal_<TSpec_>, TSize, TShortSize> & bkt, TPos lastIncrement, TThresh threshold);       	// "projects/library/seqan/index/find_swift.h"(559)
+
+//____________________________________________________________________________
+// _setLength
+
+template <typename TValue, typename TSpec> inline void _setLength( String<TValue, PizzaChili<TSpec> >& me, size_t new_length );       	// "projects/library/seqan/index/index_pizzachili_string.h"(424)
+
+//____________________________________________________________________________
+// _setSizeInval
+
+template <typename TValue> inline void _setSizeInval(TValue &v);       	// "projects/library/seqan/index/index_base.h"(1003)
+
+//____________________________________________________________________________
+// _skew3Extend
+
+template <typename TTextInput, typename TNameInput, typename TOut0, typename TOut12 > static bool _skew3Extend(TTextInput &textIn, TNameInput &nameIn, TOut0 &out0, TOut12 &out12);       	// "projects/library/seqan/index/pump_extender3.h"(68)
+
+//____________________________________________________________________________
+// _skew7Extend
+
+template <typename TTextInput, typename TNameInput, typename TOut0, typename TOut3, typename TOut5, typename TOut6, typename TOut124 > static bool _skew7Extend(TTextInput &textIn, TNameInput &nameIn, TOut0 &out0, TOut3 &out3, TOut5 &out5, TOut6 &out6, TOut124 &out124);       	// "projects/library/seqan/index/pump_extender7.h"(89)
+
+//____________________________________________________________________________
+// _skew7ExtendMulti
+
+template <typename TTextInput, typename TLimitsString, typename TNameInput, typename TOut0, typename TOut3, typename TOut5, typename TOut6, typename TOut124 > static bool _skew7ExtendMulti( TTextInput &textIn, TLimitsString const &limits, TNameInput &nameIn1, TNameInput &nameIn2, TNameInput &nameIn4, TOut0 &out0, TOut3 &out3, TOut5 &out5, TOut6 &out6, TOut124 &out124);       	// "projects/library/seqan/index/pump_extender7.h"(296)
+
+//____________________________________________________________________________
+// _skew7SeparateSlices
+
+template <typename TInput, typename TFunctor, typename TOut1, typename TOut2, typename TOut4 > static void _skew7SeparateSlices( TInput &in, TFunctor const &funcSlice, TOut1 &out1, TOut2 &out2, TOut4 &out4);       	// "projects/library/seqan/index/pump_separator7.h"(49)
+
+//____________________________________________________________________________
+// _sortBucketQuickSort
+
+template <typename TSA, typename TText, typename TSize> void _sortBucketQuickSort( TSA &sa, TText &text, TSize lcp);       	// "projects/library/seqan/index/index_sa_qsort.h"(142)
+
+//____________________________________________________________________________
+// _sortFirstWotdBucket
+
+template <typename TText, typename TSpec, typename TPredHull, typename TPred > typename Size< Index<StringSet<TText, TSpec>, IndexWotd<Dfi<TPredHull, TPred> > > >::Type _sortFirstWotdBucket(Index<StringSet<TText, TSpec>, IndexWotd<Dfi<TPredHull, TPred> > > &index);       	// "projects/library/seqan/index/index_dfi.h"(206)
+template <typename TIndex > typename Size<TIndex>::Type _sortFirstWotdBucket(TIndex &index);       	// "projects/library/seqan/index/index_wotd.h"(1074)
+template <typename TText, typename TSpec, typename TIndexSpec > typename Size< Index<StringSet<TText, TSpec>, TIndexSpec> >::Type _sortFirstWotdBucket(Index<StringSet<TText, TSpec>, TIndexSpec> &index);       	// "projects/library/seqan/index/index_wotd.h"(1119)
+
+//____________________________________________________________________________
+// _sortWotdBucket
+
+template <typename TText, typename TSpec, typename TPredHull, typename TPred, typename TBeginPos, typename TEndPos, typename TSize > TSize _sortWotdBucket( Index<StringSet<TText, TSpec>, IndexWotd<Dfi<TPredHull, TPred> > > &index, TBeginPos left, TEndPos right, TSize prefixLen);       	// "projects/library/seqan/index/index_dfi.h"(299)
+template <typename TText, typename TBeginPos, typename TEndPos, typename TSize > TSize _sortWotdBucket( Index<TText, IndexWotd<WotdOriginal> > &index, TBeginPos left, TEndPos right, TSize prefixLen);       	// "projects/library/seqan/index/index_wotd.h"(1183)
+template <typename TIndex, typename TBeginPos, typename TEndPos, typename TSize > TSize _sortWotdBucket( TIndex &index, TBeginPos left, TEndPos right, TSize prefixLen);       	// "projects/library/seqan/index/index_wotd.h"(1297)
+template <typename TText, typename TSpec, typename TIndexSpec, typename TBeginPos, typename TEndPos, typename TSize > TSize _sortWotdBucket( Index<StringSet<TText, TSpec>, TIndexSpec> &index, TBeginPos left, TEndPos right, TSize prefixLen);       	// "projects/library/seqan/index/index_wotd.h"(1363)
+
+//____________________________________________________________________________
+// _storeWotdChildren
+
+template <typename TText, typename TPredHull, typename TPred, typename TSize> inline void _storeWotdChildren( Index<TText, IndexWotd<Dfi<TPredHull, TPred> > > &index, TSize dirOfs, TSize lcp);       	// "projects/library/seqan/index/index_dfi.h"(445)
+template <typename TText, typename TPos> inline void _storeWotdChildren( Index<TText, IndexWotd<WotdOriginal> > &index, TPos dirOfs);       	// "projects/library/seqan/index/index_wotd.h"(1580)
+template <typename TText, typename TSpec, typename TSize> inline void _storeWotdChildren( Index<TText, IndexWotd<TSpec> > &index, TSize dirOfs, TSize lcp);       	// "projects/library/seqan/index/index_wotd.h"(1640)
+
+//____________________________________________________________________________
+// _swiftBucketNo
+
+template <typename TIndex, typename TSpec, typename TParams, typename TSize> inline unsigned _swiftBucketNo(Pattern<TIndex, Swift<TSpec> > const &, TParams &bucketParams, TSize seqNo);       	// "projects/library/seqan/index/find_swift.h"(495)
+
+//____________________________________________________________________________
+// _swiftBucketParams
+
+template <typename TIndex, typename TSpec, typename TSize> inline typename Pattern<TIndex, Swift<TSpec> >::TBucketParams & _swiftBucketParams(Pattern<TIndex, Swift<TSpec> > & pattern, TSize seqNo);       	// "projects/library/seqan/index/find_swift.h"(485)
+
+//____________________________________________________________________________
+// _swiftMultiFlushBuckets
+
+template <typename TFinder, typename TIndex, typename TSpec > inline bool _swiftMultiFlushBuckets( TFinder & finder, Pattern<TIndex, Swift<TSpec> > & pattern );       	// "projects/library/seqan/index/find_swift.h"(1150)
+template <typename TFinder, typename TIndex, typename TSpec_ > inline bool _swiftMultiFlushBuckets( TFinder &, Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec_> > > > &);       	// "projects/library/seqan/index/find_swift.h"(1209)
+
+//____________________________________________________________________________
+// _swiftMultiProcessQGram
+
+template <typename TFinder, typename TIndex, typename TSpec, typename THashValue > inline bool _swiftMultiProcessQGram( TFinder & finder, Pattern<TIndex, Swift<TSpec> > & pattern, THashValue hash);       	// "projects/library/seqan/index/find_swift.h"(875)
+template <typename TFinder, typename TIndex, typename TSpec_, typename THValue > inline bool _swiftMultiProcessQGram( TFinder &finder, Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec_> > > > &pattern, THValue hash);       	// "projects/library/seqan/index/find_swift.h"(1008)
+
+//____________________________________________________________________________
+// _transform
+
+template <typename TValue> inline long double _transform(TValue a);       	// "projects/library/seqan/index/shape_threshold.h"(264)
+
+//____________________________________________________________________________
+// _transformBack
+
+template <typename TValue> inline long double _transformBack(TValue a);       	// "projects/library/seqan/index/shape_threshold.h"(275)
+
+//____________________________________________________________________________
+// _treeLevels
+
+template <typename TSize > inline unsigned _treeLevels(TSize lcpSize);       	// "projects/library/seqan/index/index_lcp_tree.h"(160)
+
+//____________________________________________________________________________
+// _upperBoundLcpe
+
+template <typename TText, typename TSA, typename TLCP, typename TSpec, typename TQuery, typename TDiff_ > inline typename Iterator<TSA, Standard>::Type _upperBoundLcpe( TText &text, TSA &sa, SearchTreeIterator< TLCP, TSpec > treeIter, TQuery &query, TDiff_ lcpLower, TDiff_ lcpUpper);       	// "projects/library/seqan/index/find_index_esa.h"(1347)
+template <typename TText, typename TSA, typename TLCP, typename TSpec, typename TQuery > inline typename Iterator<TSA, Standard>::Type _upperBoundLcpe( TText &text, TSA &sa, SearchTreeIterator< TLCP, TSpec > &treeIter, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(1497)
+
+//____________________________________________________________________________
+// _upperBoundSA
+
+template <typename TText, typename TSA, typename TSpec, typename TQuery > inline typename Iterator<TSA, Standard>::Type _upperBoundSA( TText &text, SearchTreeIterator< TSA, TSpec > treeIter, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(650)
+
+//____________________________________________________________________________
+// _upperBoundSANaive
+
+template <typename TText, typename TSA, typename TSpec, typename TQuery > inline typename Iterator<TSA, Standard>::Type _upperBoundSANaive( TText &text, SearchTreeIterator< TSA, TSpec > treeIter, TQuery &query);       	// "projects/library/seqan/index/find_index_esa.h"(607)
+
+//____________________________________________________________________________
+// _wotdCountChars
+
+template <typename TBuckets, typename TText > inline void _wotdCountChars(TBuckets &buckets, TText const &text);       	// "projects/library/seqan/index/index_wotd.h"(883)
+template <typename TBuckets, typename TText, typename TSpec > inline void _wotdCountChars(TBuckets &buckets, StringSet<TText, TSpec> const &stringSet);       	// "projects/library/seqan/index/index_wotd.h"(897)
+template <typename TBuckets, typename TText, typename TSA, typename TSize > inline typename Size<TText>::Type _wotdCountChars( TBuckets &buckets, TText const &text, TSA const &sa, TSize prefixLen);       	// "projects/library/seqan/index/index_wotd.h"(950)
+template <typename TBuckets, typename TText, typename TSpec, typename TSA, typename TSize > inline typename Size<TText>::Type _wotdCountChars( TBuckets &buckets, StringSet<TText, TSpec> const &stringSet, TSA const &sa, TSize prefixLen);       	// "projects/library/seqan/index/index_wotd.h"(986)
+
+//____________________________________________________________________________
+// _wotdCountCharsWotdOriginal
+
+template <typename TBuckets, typename TText, typename TSA, typename TSize > inline typename Size<TText>::Type _wotdCountCharsWotdOriginal( TBuckets &buckets, TText const &text, TSA &sa, TSize prefixLen);       	// "projects/library/seqan/index/index_wotd.h"(919)
+
+//____________________________________________________________________________
+// _wotdCreateFirstLevel
+
+template <typename TText, typename TSpec> inline void _wotdCreateFirstLevel(Index<TText, IndexWotd<TSpec> > &index);       	// "projects/library/seqan/index/index_wotd.h"(1885)
+
+//____________________________________________________________________________
+// _wotdCummulativeSum
+
+template <typename TBounds, typename TBuckets, typename TSize > inline typename Size<TBuckets>::Type _wotdCummulativeSum(TBounds &bounds, TBuckets const &buckets, TSize offset);       	// "projects/library/seqan/index/index_wotd.h"(1027)
+template <typename TBounds, typename TBuckets > inline typename Size<TBuckets>::Type _wotdCummulativeSum(TBounds &bounds, TBuckets const &buckets);       	// "projects/library/seqan/index/index_wotd.h"(1053)
+
+//____________________________________________________________________________
+// _wotdEvaluate
+
+template <typename TText, typename TSpec > inline typename Size< Index<TText, IndexWotd<WotdOriginal> > >::Type _wotdEvaluate(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_wotd.h"(1700)
+template <typename TText, typename TIndexSpec, typename TSpec > inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type _wotdEvaluate(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_wotd.h"(1741)
+
+//____________________________________________________________________________
+// alignment
+
+template <typename TString, typename TSSetSpec, typename TIndexSpec, class TSpec > inline Align<TString, ArrayGaps> alignment(Iter< Index< StringSet<TString, TSSetSpec>, TIndexSpec >, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(892)
+template <typename TString, typename TConcSpec, typename TIndexSpec, class TSpec > inline Align<TString, ArrayGaps> alignment(Iter< Index< StringSet<TString, Owner<ConcatDirect<TConcSpec> > >, TIndexSpec >, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(938)
+
+//____________________________________________________________________________
+// approximateStringSearch
+
+template <typename TOnFoundFunctor, typename TString, typename TTreeIterator, typename TErrors> inline void approximateStringSearch( TOnFoundFunctor &onFoundFunctor, TString const &string, TTreeIterator &iter, TErrors errorsLeft);       	// "projects/library/seqan/index/find_index_approx.h"(198)
+
+//____________________________________________________________________________
+// approximateTreeSearch
+
+template <typename TOnFoundFunctor, typename TTreeIteratorA, typename TTreeIteratorB, typename TErrors> inline void approximateTreeSearch( TOnFoundFunctor &onFoundFunctor, TTreeIteratorA const &iterA, TTreeIteratorB const &iterB, TErrors errorsLeft);       	// "projects/library/seqan/index/find_index_approx.h"(218)
+
+//____________________________________________________________________________
+// assign
+
+inline void assign(Ascii & c_target, ErrorAlphabet const & source);       	// "projects/library/seqan/index/shape_threshold.h"(151)
+template <typename TValue, typename TSpec, typename TSource, typename TExpand> inline void assign( String<TValue, PizzaChili<TSpec> >& target, TSource const& source, Tag<TExpand> const );       	// "projects/library/seqan/index/index_pizzachili_string.h"(211)
+template <typename TValue, typename TSpec, typename TSource, typename TExpand> inline void assign( String<TValue, PizzaChili<TSpec> >& target, TSource const* source, Tag<TExpand> const );       	// "projects/library/seqan/index/index_pizzachili_string.h"(225)
+template <typename TValue, typename TSpec, typename TExpand> inline void assign( String<TValue, PizzaChili<TSpec> >& target, String<TValue, PizzaChili<TSpec> > const& source, Tag<TExpand> const );       	// "projects/library/seqan/index/index_pizzachili_string.h"(239)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename TText, typename TSpec, typename TSpecFinder > inline bool atBegin(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(197)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TRepeat > inline bool atEnd(Iter<TRepeat, MaxRepeatOccurrences> const &it);       	// "projects/library/seqan/index/index_esa_algs.h"(911)
+template <typename TRepeat > inline bool atEnd(Iter<TRepeat, MaxRepeatOccurrences> &it);       	// "projects/library/seqan/index/index_esa_algs.h"(916)
+template <typename THaystack, typename TSpec> inline bool atEnd(Finder<THaystack, Swift<TSpec> > & me);       	// "projects/library/seqan/index/find_swift.h"(371)
+template <typename TIndex, class TSpec > inline bool atEnd(Iter<TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1874)
+template <typename TIndex, class TSpec > inline bool atEnd(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1880)
+template <typename TRepeat > inline bool atEnd(Iter<TRepeat, MultiMemOccurences> const &it);       	// "projects/library/seqan/index/index_esa_algs_multi.h"(686)
+template <typename TRepeat > inline bool atEnd(Iter<TRepeat, MultiMemOccurences> &it);       	// "projects/library/seqan/index/index_esa_algs_multi.h"(691)
+template <typename TText, typename TSpec, typename TSpecFinder > inline bool atEnd(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(205)
+template <typename TText, typename TSpec > inline bool atEnd(Iter<Index<TText, IndexWotd<WotdOriginal> >, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_wotd.h"(615)
+template <typename TText, typename TSpec > inline bool atEnd(Iter<Index<TText, IndexWotd<WotdOriginal> >, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_wotd.h"(621)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TSTree, class TSpec > inline typename Iterator< Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > >::Type begin(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it);       	// "projects/library/seqan/index/index_esa_algs.h"(643)
+template <typename TText, typename TIndexSpec, class TSpec > inline typename Iterator<Index<TText, TIndexSpec>, TSpec >::Type begin(Index<TText, TIndexSpec> &index, TSpec const);       	// "projects/library/seqan/index/index_esa_stree.h"(1203)
+template <typename TValue, typename TSpec, typename TTag> inline typename Iterator<String<TValue, PizzaChili<TSpec> >, Tag<TSpec> const>::Type begin( String<TValue, PizzaChili<TSpec> >& me, Tag<TTag> const );       	// "projects/library/seqan/index/index_pizzachili_string.h"(479)
+template <typename TValue, typename TSpec, typename TTag> inline typename Iterator<String<TValue, PizzaChili<TSpec> > const, Tag<TSpec> const>::Type begin( String<TValue, PizzaChili<TSpec> > const& me, Tag<TTag> const );       	// "projects/library/seqan/index/index_pizzachili_string.h"(490)
+
+//____________________________________________________________________________
+// beginPosition
+
+template <typename THaystack, typename TSpec> inline __int64 beginPosition(Finder<THaystack, Swift<TSpec> > const & finder);       	// "projects/library/seqan/index/find_swift.h"(1288)
+template <typename THaystack, typename TSpec> inline __int64 beginPosition(Finder<THaystack, Swift<TSpec> > & finder);       	// "projects/library/seqan/index/find_swift.h"(1295)
+template <typename TIndex, typename TSpec> inline typename SAValue<TIndex>::Type beginPosition(Pattern<TIndex, Swift<TSpec> > const & pattern);       	// "projects/library/seqan/index/find_swift.h"(1304)
+template <typename TIndex, typename TSpec> inline typename SAValue<TIndex >::Type beginPosition(Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > const & pattern);       	// "projects/library/seqan/index/find_swift.h"(1316)
+template <typename TIndex, typename TSpec> inline typename SAValue<TIndex>::Type beginPosition(Pattern<TIndex, Swift<TSpec> > & pattern);       	// "projects/library/seqan/index/find_swift.h"(1325)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type beginPosition(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(233)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type beginPosition(Finder< Index<TText, TSpec>, TSpecFinder > const & me);       	// "projects/library/seqan/index/find_index.h"(242)
+
+//____________________________________________________________________________
+// bwtAt
+
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex, FibreBwt>::Type>::Type bwtAt(TPos i, TIndex &index);       	// "projects/library/seqan/index/index_base.h"(991)
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex const, FibreBwt>::Type>::Type bwtAt(TPos i, TIndex const &index);       	// "projects/library/seqan/index/index_base.h"(995)
+
+//____________________________________________________________________________
+// cargo
+
+template <typename TText, typename TSpec> inline typename Reference< typename Cargo<Index<TText, TSpec> >::Type >::Type cargo(Index<TText, TSpec> & me);       	// "projects/library/seqan/index/index_shims.h"(670)
+template <typename TText, typename TSpec> inline typename Reference< typename Cargo<Index<TText, TSpec> const>::Type >::Type cargo(Index<TText, TSpec> const & me);       	// "projects/library/seqan/index/index_shims.h"(678)
+
+//____________________________________________________________________________
+// childAt
+
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex, FibreChildtab>::Type>::Type childAt(TPos i, TIndex &index);       	// "projects/library/seqan/index/index_base.h"(969)
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex const, FibreChildtab>::Type>::Type childAt(TPos i, TIndex const &index);       	// "projects/library/seqan/index/index_base.h"(973)
+
+//____________________________________________________________________________
+// childrenAreLeaves
+
+template <typename TIndex, class TSpec > inline bool childrenAreLeaves(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(2148)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TText, typename TSpec> inline void clear(Index<TText, PizzaChili<TSpec> >& me);       	// "projects/library/seqan/index/index_pizzachili.h"(166)
+template <typename TIndex, typename TSpec> inline void clear(Pattern<TIndex, Swift<TSpec> > & me);       	// "projects/library/seqan/index/find_swift.h"(1224)
+template <typename TIndex, class TSpec > inline void clear(Iter<TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1761)
+template <typename TText, typename TShapeSpec, typename TSpec > inline void clear(Index<TText, IndexQGram<TShapeSpec, TSpec> > &index);       	// "projects/library/seqan/index/index_qgram.h"(2352)
+template <typename TValue, typename TSpec> inline void clear(String<TValue, PizzaChili<TSpec> >& me);       	// "projects/library/seqan/index/index_pizzachili_string.h"(193)
+template <typename TText, typename TSpec> inline void clear(Index<TText, IndexEsa<TSpec> > &index);       	// "projects/library/seqan/index/index_esa_base.h"(363)
+template <typename TText, typename TSpec, typename TSpecFinder > inline void clear(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(183)
+template <typename TText, typename TSpec > inline void clear(Index<TText, IndexWotd<TSpec> > &index);       	// "projects/library/seqan/index/index_wotd.h"(1934)
+
+//____________________________________________________________________________
+// computeExactQGramThreshold
+
+template <typename TThreshString, typename TStateString > void computeExactQGramThreshold( TThreshString &treshPerError, TStateString const &states, int span, int maxErrors, int maxN, bool optionMinOutput);       	// "projects/library/seqan/index/shape_threshold.h"(778)
+
+//____________________________________________________________________________
+// computeQGramFilteringSensitivity
+
+template <typename TLossString, typename TLogErrorDistr, typename TStateString > void computeQGramFilteringSensitivity( TLossString &found, TStateString const &states, int span, int maxT, int maxErrors, TLogErrorDistr const &logError, bool optionMinOutput);       	// "projects/library/seqan/index/shape_threshold.h"(910)
+
+//____________________________________________________________________________
+// container
+
+template <typename TIndex, class TSpec > inline TIndex const & container(Iter< TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(694)
+template <typename TIndex, class TSpec > inline TIndex & container(Iter< TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(700)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Parameter_< Index<TText, TSpec> >::Type container(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(116)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Parameter_< Index<TText, TSpec> >::Type container(Finder< Index<TText, TSpec>, TSpecFinder > const & me);       	// "projects/library/seqan/index/find_index.h"(124)
+
+//____________________________________________________________________________
+// control
+
+template <typename TInput > inline bool control(Pipe< TInput, LarssonSadakane > &me, ControlBeginRead const &command);       	// "projects/library/seqan/index/index_sa_lss.h"(437)
+template <typename TInput > inline bool control(Pipe< TInput, Merger7 > &me, ControlBeginRead const &command);       	// "projects/library/seqan/index/pipe_merger7.h"(459)
+template <typename TInput > inline bool control(Pipe< TInput, Merger7 > &me, ControlEof const &);       	// "projects/library/seqan/index/pipe_merger7.h"(467)
+template <typename TInput > inline bool control(Pipe< TInput, Merger7 > &me, ControlEos const &);       	// "projects/library/seqan/index/pipe_merger7.h"(472)
+template <typename TInput, typename TLimitsString > inline bool control(Pipe< TInput, Merger7Multi<TLimitsString> > &me, ControlBeginRead const &command);       	// "projects/library/seqan/index/pipe_merger7.h"(490)
+template <typename TInput, typename TLimitsString > inline bool control(Pipe< TInput, Merger7Multi<TLimitsString> > &me, ControlEof const &);       	// "projects/library/seqan/index/pipe_merger7.h"(497)
+template <typename TInput, typename TLimitsString > inline bool control(Pipe< TInput, Merger7Multi<TLimitsString> > &me, ControlEos const &);       	// "projects/library/seqan/index/pipe_merger7.h"(502)
+template <typename TInput > inline bool control(Pipe< TInput, Merger3 > &me, ControlBeginRead const &command);       	// "projects/library/seqan/index/pipe_merger3.h"(148)
+
+//____________________________________________________________________________
+// coprimeTest
+
+template <typename TSize> inline unsigned coprimeTest(TSize hlen);       	// "projects/library/seqan/index/index_qgram_openaddressing.h"(289)
+
+//____________________________________________________________________________
+// countChildren
+
+template <typename TIndex, typename TSpec > inline typename Size<TIndex>::Type countChildren(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1018)
+template <typename TText, typename TIndexSpec, typename TSpec > inline typename Size<Index<TText, IndexEsa<TIndexSpec> > >::Type countChildren(Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1035)
+
+//____________________________________________________________________________
+// countOccurrences
+
+template <typename TIndex, class TSpec > inline typename Size<TIndex>::Type countOccurrences(Iter< TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(810)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline typename Size< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreSA>::Type const >::Type countOccurrences( Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2291)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline typename Size< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreSA>::Type const >::Type countOccurrences( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2302)
+
+//____________________________________________________________________________
+// countOccurrencesMultiple
+
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline typename Infix< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreCounts>::Type const >::Type countOccurrencesMultiple( Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2330)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline typename Infix< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreCounts>::Type const >::Type countOccurrencesMultiple( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2341)
+
+//____________________________________________________________________________
+// countSequences
+
+template <typename TText, typename TSpec> inline typename Size<TText>::Type countSequences(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(747)
+
+//____________________________________________________________________________
+// cp___
+
+template <typename Dest, typename Ofs, typename Src> static finline Src const cp___(Dest &dst, Ofs const ofs, Src const src);       	// "projects/library/seqan/index/pump_extender7.h"(81)
+
+//____________________________________________________________________________
+// createBWTable
+
+template <typename TBWT, typename TText, typename TSA > inline void createBWTable(TBWT &bwt, TText const &s, TSA const &sa);       	// "projects/library/seqan/index/index_shims.h"(509)
+
+//____________________________________________________________________________
+// createBWTableExt
+
+template <typename TBWT, typename TText, typename TSA > void createBWTableExt( TBWT &bwt, TText const &s, TSA const &SA);       	// "projects/library/seqan/index/index_shims.h"(462)
+
+//____________________________________________________________________________
+// createBWTableInt
+
+template <typename TBWT, typename TText, typename TSA > void createBWTableInt( TBWT &bwt, TText const &s, TSA const &SA);       	// "projects/library/seqan/index/index_bwt.h"(261)
+template <typename TBWT, typename TString, typename TSpec, typename TSA > void createBWTableInt( TBWT &bwt, StringSet<TString, TSpec> const &s, TSA const &SA);       	// "projects/library/seqan/index/index_bwt.h"(287)
+
+//____________________________________________________________________________
+// createChildtab
+
+template <typename TLCPTable, typename TValue, typename TConfig > inline void createChildtab( String<TValue, External<TConfig> > &childtab, TLCPTable &lcp);       	// "projects/library/seqan/index/index_childtab.h"(217)
+template <typename TLCPInput, typename TDest > inline void createChildtab(TDest &dest, TLCPInput const &lcpIn);       	// "projects/library/seqan/index/index_childtab.h"(229)
+
+//____________________________________________________________________________
+// createChildtabExt
+
+template <typename TLCPTable, typename TChildTable > void createChildtabExt( TChildTable &childtab, TLCPTable &lcp);       	// "projects/library/seqan/index/index_childtab.h"(190)
+
+//____________________________________________________________________________
+// createCountsArray
+
+template <typename TCounts, typename TDir, typename TBucketMap, typename TString, typename TSpec, typename TShape, typename TStepSize > void createCountsArray( TCounts &counts, TDir &dir, TBucketMap &bucketMap, StringSet<TString, TSpec> const &stringSet, TShape shape, TStepSize stepSize);       	// "projects/library/seqan/index/index_qgram.h"(1525)
+
+//____________________________________________________________________________
+// createLcpBinTree
+
+template <class LCPFwdIt, class FlatOutIt > inline FlatOutIt createLcpBinTree( LCPFwdIt First_, LCPFwdIt _Last, FlatOutIt Dest_);       	// "projects/library/seqan/index/index_lcp_tree.h"(47)
+template <typename TLCPE, typename TLCP > inline void createLcpBinTree(TLCPE &lcp_enhanced, TLCP &lcp);       	// "projects/library/seqan/index/index_lcp_tree.h"(153)
+template <typename TValue, typename TConfig, typename TLCP > inline void createLcpBinTree(String<TValue, External<TConfig> > &lcp_enhanced, TLCP &lcp);       	// "projects/library/seqan/index/index_lcp_tree.h"(169)
+
+//____________________________________________________________________________
+// createLcpTable
+
+template <typename TLCP, typename TText, typename TSA, typename TAlgSpec > inline void createLcpTable( TLCP &lcp, TText const &s, TSA const &sa, TAlgSpec const &alg);       	// "projects/library/seqan/index/index_shims.h"(335)
+
+//____________________________________________________________________________
+// createLcpeTable
+
+template <typename TValue, typename TSpec, typename TText, typename TSA, typename TLCP, typename TAlgSpec > void createLcpeTable( String< TValue, TSpec > &LCPE, TText const &s, TSA const &, TLCP const &LCP, TAlgSpec const);       	// "projects/library/seqan/index/index_shims.h"(401)
+template <typename TValue, typename TConfig, typename TText, typename TSA, typename TLCP, typename TAlgSpec > void createLcpeTable( String< TValue, External<TConfig> > &LCPE, TText const &s, TSA const &SA, TLCP const &LCP, TAlgSpec const alg);       	// "projects/library/seqan/index/index_shims.h"(425)
+template <typename TValue, typename TSpec, typename TText, typename TSA, typename TLCP> inline void createLcpeTable( String< TValue, TSpec > &LCPE, TText &s, TSA &SA, TLCP &LCP);       	// "projects/library/seqan/index/index_shims.h"(441)
+
+//____________________________________________________________________________
+// createLcpeTableExt
+
+template <typename TValue, typename TSpec, typename TObject, typename TSA, typename TLCP, typename TAlgSpec > void createLcpeTableExt( String< TValue, TSpec > &LCPE, TObject const &text, TSA const &suffixArray, TLCP const & , TAlgSpec const);       	// "projects/library/seqan/index/index_shims.h"(366)
+
+//____________________________________________________________________________
+// createQGramIndex
+
+template <typename TIndex > void createQGramIndex(TIndex &index);       	// "projects/library/seqan/index/index_qgram.h"(1187)
+template <typename TSA, typename TDir, typename TBucketMap, typename TText, typename TShape, typename TStepSize > void createQGramIndex( TSA &sa, TDir &dir, TBucketMap &bucketMap, TText const &text, TShape &shape, TStepSize stepSize);       	// "projects/library/seqan/index/index_qgram.h"(1238)
+template <typename TSA, typename TDir, typename TBucketMap, typename TText, typename TShape, typename TStepSize > void createQGramIndex( TSA &sa, TDir &dir, TBucketMap &bucketMap, TText const &text, TShape &shape);       	// "projects/library/seqan/index/index_qgram.h"(1269)
+
+//____________________________________________________________________________
+// createQGramIndexDirOnly
+
+template <typename TDir, typename TBucketMap, typename TText, typename TShape, typename TStepSize > void createQGramIndexDirOnly( TDir &dir, TBucketMap &bucketMap, TText const &text, TShape &shape, TStepSize stepSize);       	// "projects/library/seqan/index/index_qgram.h"(1450)
+template <typename TDir, typename TBucketMap, typename TString, typename TSpec, typename TShape, typename TStepSize > void createQGramIndexDirOnly( TDir &dir, TBucketMap &bucketMap, StringSet<TString, TSpec> const &stringSet, TShape &shape, TStepSize stepSize);       	// "projects/library/seqan/index/index_qgram.h"(1476)
+
+//____________________________________________________________________________
+// createQGramIndexExt
+
+template <typename TSA, typename TDir, typename TText, typename TValue, unsigned q > void createQGramIndexExt( TSA &suffixArray, TDir &dir, TText &text, Shape<TValue, UngappedShape<q> >);       	// "projects/library/seqan/index/index_qgram.h"(1689)
+template <typename TSA, typename TDir, typename TString, typename TSpec, typename TValue, unsigned q, typename TLimitsString > void createQGramIndexExt( TSA &suffixArray, TDir &dir, StringSet<TString, TSpec> const &stringSet, Shape<TValue, UngappedShape<q> >, TLimitsString &limits);       	// "projects/library/seqan/index/index_qgram.h"(1778)
+
+//____________________________________________________________________________
+// createQGramIndexSAOnly
+
+template <typename TSA, typename TText, typename TShape, typename TStepSize > void createQGramIndexSAOnly( TSA &sa, TText const &text, TShape &shape, TStepSize stepSize);       	// "projects/library/seqan/index/index_qgram.h"(1299)
+template <typename TSA, typename TString, typename TSpec, typename TShape, typename TStepSize > void createQGramIndexSAOnly( TSA &sa, StringSet<TString, TSpec> const &stringSet, TShape &shape, TStepSize stepSize);       	// "projects/library/seqan/index/index_qgram.h"(1336)
+
+//____________________________________________________________________________
+// createSABTree
+
+template <class SAFwdIt, class FlatOutIt > inline FlatOutIt createSABTree( SAFwdIt First_, SAFwdIt _Last, FlatOutIt Dest_, unsigned BlockSize);       	// "projects/library/seqan/index/index_sa_btree.h"(47)
+template <typename TSAB, typename TSA > inline void createSABTree(TSAB &sa_btree, TSA &sa, unsigned BlockSize);       	// "projects/library/seqan/index/index_sa_btree.h"(110)
+template <typename TValue, typename TConfig, typename TSA > inline void createSABTree(String<TValue, External<TConfig> > &sa_btree, TSA &sa, unsigned BlockSize);       	// "projects/library/seqan/index/index_sa_btree.h"(124)
+
+//____________________________________________________________________________
+// createSuffixArray
+
+template <typename TSA, typename TText > void createSuffixArray( TSA &SA, TText &s, Skew7 const &, unsigned K, unsigned maxdepth, unsigned depth);       	// "projects/library/seqan/index/index_skew7.h"(491)
+template <typename TSA, typename TText > inline void createSuffixArray( TSA &SA, TText &s, Skew7 const &alg, unsigned K, unsigned maxdepth);       	// "projects/library/seqan/index/index_skew7.h"(815)
+template <typename TSA, typename TText > void createSuffixArray( TSA &SA, TText &s, LarssonSadakane const &, unsigned K);       	// "projects/library/seqan/index/index_sa_lss.h"(376)
+template <typename TSA, typename TText > void createSuffixArray( TSA &SA, TText &s, Shawarma<DeepShallow> const);       	// "projects/library/seqan/index/index_shawarma.h"(72)
+template <typename TSA, typename TText > void createSuffixArray( TSA &SA, TText &s, ManberMyers const &, unsigned K, unsigned maxdepth);       	// "projects/library/seqan/index/index_sa_mm.h"(56)
+template <typename TSA, typename TValue, typename TConfig > inline void createSuffixArray( TSA &SA, String< TValue, External<TConfig> > &s, Skew3 const &spec, unsigned , unsigned );       	// "projects/library/seqan/index/index_skew3.h"(313)
+template <typename TSA, typename TText > void createSuffixArray( TSA &SA, TText &s, Skew3 const &, unsigned K, unsigned maxdepth, unsigned depth);       	// "projects/library/seqan/index/index_skew3.h"(356)
+template <typename TSA, typename TText > inline void createSuffixArray( TSA &SA, TText &s, Skew3 const &alg, unsigned K, unsigned maxdepth);       	// "projects/library/seqan/index/index_skew3.h"(506)
+template <typename TSA, typename TText > inline void createSuffixArray( TSA &SA, TText &s, SAQSort const &);       	// "projects/library/seqan/index/index_sa_qsort.h"(157)
+template <typename TSA, typename TText, typename TSSetSpec > inline void createSuffixArray( TSA &SA, StringSet< TText, TSSetSpec > const &s, SAQSort const &);       	// "projects/library/seqan/index/index_sa_qsort.h"(182)
+template <typename TSA, typename TText, typename TAlgSpec > inline void createSuffixArray( TSA &sa, TText const &s, TAlgSpec const &alg);       	// "projects/library/seqan/index/index_shims.h"(198)
+template <typename TSA, typename TText, typename TSpec > inline void createSuffixArray( TSA &SA, TText const &s, BwtWalk<TSpec> const &);       	// "projects/library/seqan/index/index_sa_bwtwalk.h"(73)
+
+//____________________________________________________________________________
+// createSuffixArrayPart
+
+template <typename TSA, typename TText, typename TSize > inline void createSuffixArrayPart( TSA &SA, TText &s, Skew7 const &_dummy, TSize maxLCP, unsigned K);       	// "projects/library/seqan/index/index_skew7.h"(829)
+template <typename TSA, typename TText, typename TSize > inline void createSuffixArrayPart( TSA &SA, TText &s, Skew7 const &_dummy, TSize maxLCP);       	// "projects/library/seqan/index/index_skew7.h"(845)
+template <typename TSA, typename TText, typename TSize > inline void createSuffixArrayPart( TSA &SA, TText &s, ManberMyers const &alg, TSize maxLCP, unsigned K);       	// "projects/library/seqan/index/index_sa_mm.h"(181)
+template <typename TSA, typename TText, typename TSize > inline void createSuffixArrayPart( TSA &SA, TText &s, ManberMyers const &alg, TSize maxLCP);       	// "projects/library/seqan/index/index_sa_mm.h"(195)
+template <typename TSA, typename TText, typename TSize > inline void createSuffixArrayPart( TSA &SA, TText &s, Skew3 const &_dummy, TSize maxLCP, unsigned K);       	// "projects/library/seqan/index/index_skew3.h"(520)
+template <typename TSA, typename TText, typename TSize > inline void createSuffixArrayPart( TSA &SA, TText &s, Skew3 const &_dummy, TSize maxLCP);       	// "projects/library/seqan/index/index_skew3.h"(535)
+
+//____________________________________________________________________________
+// dirAt
+
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex, FibreDir>::Type>::Type dirAt(TPos i, TIndex &index);       	// "projects/library/seqan/index/index_qgram.h"(385)
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex const, FibreDir>::Type>::Type dirAt(TPos i, TIndex const &index);       	// "projects/library/seqan/index/index_qgram.h"(390)
+
+//____________________________________________________________________________
+// empty
+
+template <typename TIndex, typename TSpec> inline bool empty(Pattern<TIndex, Swift<TSpec> > & me);       	// "projects/library/seqan/index/find_swift.h"(1217)
+template <typename TIndex, class TSpec > inline bool empty(Iter<TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1859)
+template <typename TIndex, class TSpec > inline bool empty(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1865)
+template <typename TText, typename TSpec, typename TSpecFinder > inline bool empty(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(175)
+
+//____________________________________________________________________________
+// emptyParentEdge
+
+template <typename TIndex, typename TSpec > inline bool emptyParentEdge(Iter< TIndex, VSTree<TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(564)
+template <typename TText, typename TIndexSpec, typename TSpec > inline bool emptyParentEdge(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_wotd.h"(563)
+template <typename TText, typename TIndexSpec, typename TSpec > inline bool emptyParentEdge(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TopDown<ParentLinks<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_wotd.h"(576)
+
+//____________________________________________________________________________
+// end
+
+template <typename TSTree, class TSpec > inline typename Iterator< Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > >::Type end(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it);       	// "projects/library/seqan/index/index_esa_algs.h"(653)
+template <typename TText, typename TIndexSpec, class TSpec > inline typename Iterator<Index<TText, TIndexSpec>, TSpec >::Type end(Index<TText, TIndexSpec> &index, TSpec const);       	// "projects/library/seqan/index/index_esa_stree.h"(1254)
+template <typename TValue, typename TSpec, typename TTag> inline typename Iterator<String<TValue, PizzaChili<TSpec> >, Tag<TSpec> const>::Type end( String<TValue, PizzaChili<TSpec> >& me, Tag<TTag> const );       	// "projects/library/seqan/index/index_pizzachili_string.h"(501)
+template <typename TValue, typename TSpec, typename TTag> inline typename Iterator<String<TValue, PizzaChili<TSpec> > const, Tag<TSpec> const>::Type end( String<TValue, PizzaChili<TSpec> > const& me, Tag<TTag> const );       	// "projects/library/seqan/index/index_pizzachili_string.h"(512)
+
+//____________________________________________________________________________
+// endPosition
+
+template <typename THaystack, typename TSpec> inline typename Position<Finder<THaystack, Swift<TSpec> > >::Type endPosition(Finder<THaystack, Swift<TSpec> > const & finder);       	// "projects/library/seqan/index/find_swift.h"(1334)
+template <typename THaystack, typename TSpec> inline typename Position<Finder<THaystack, Swift<TSpec> > >::Type endPosition(Finder<THaystack, Swift<TSpec> > & finder);       	// "projects/library/seqan/index/find_swift.h"(1342)
+template <typename TIndex, typename TSpec> inline typename SAValue<TIndex>::Type endPosition(Pattern<TIndex, Swift<TSpec> > const & pattern);       	// "projects/library/seqan/index/find_swift.h"(1351)
+template <typename TIndex, typename TSpec> inline typename SAValue<TIndex >::Type endPosition(Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > const & pattern);       	// "projects/library/seqan/index/find_swift.h"(1364)
+template <typename TIndex, typename TSpec> inline typename SAValue<TIndex>::Type endPosition(Pattern<TIndex, Swift<TSpec> > & pattern);       	// "projects/library/seqan/index/find_swift.h"(1374)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type endPosition(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(253)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type endPosition(Finder< Index<TText, TSpec>, TSpecFinder > const & me);       	// "projects/library/seqan/index/find_index.h"(261)
+
+//____________________________________________________________________________
+// eof
+
+template <typename TIndex, class TSpec > inline bool eof(Iter<TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1847)
+template <typename TIndex, class TSpec > inline bool eof(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1853)
+
+//____________________________________________________________________________
+// equalRangeLcpe
+
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline Pair< typename Position<TSA>::Type > equalRangeLcpe( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(1741)
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline Pair< typename Position<TSA>::Type > equalRangeLcpe( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(1843)
+
+//____________________________________________________________________________
+// equalRangeLcpeIterator
+
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline Pair< typename Iterator<TSA, Standard>::Type > equalRangeLcpeIterator( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(1792)
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline Pair< typename Iterator<TSA, Standard>::Type > equalRangeLcpeIterator( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(1862)
+
+//____________________________________________________________________________
+// equalRangeSA
+
+template <typename TText, typename TSA, typename TQuery, typename TFlatTreeSpec > inline Pair< typename Position<TSA>::Type > equalRangeSA( TText const &text, TSA const &sa, TQuery const &query, TFlatTreeSpec const);       	// "projects/library/seqan/index/find_index_esa.h"(1008)
+template <typename TText, typename TSA, typename TQuery > inline Pair< typename Position<TSA>::Type > equalRangeSA( TText const &text, TSA const &sa, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(1025)
+template <typename TText, typename TSA, typename TQuery, typename TFlatTreeSpec > inline Pair< typename Position<TSA>::Type > equalRangeSA( TText const &text, TSA const &sa, TQuery *query, TFlatTreeSpec const);       	// "projects/library/seqan/index/find_index_esa.h"(1105)
+template <typename TText, typename TSA, typename TQuery > inline Pair< typename Position<TSA>::Type > equalRangeSA( TText const &text, TSA const &sa, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(1122)
+
+//____________________________________________________________________________
+// equalRangeSAIterator
+
+template <typename TText, typename TSA, typename TQuery > inline Pair< typename Iterator<TSA const, Standard>::Type > equalRangeSAIterator( TText const &text, TSA const &sa, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(869)
+template <typename TText, typename TSA, typename TQuery > inline Pair< typename Iterator<TSA const, Standard>::Type > equalRangeSAIterator( TText const &text, TSA const &sa, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(928)
+
+//____________________________________________________________________________
+// equalRangeSANaiveIterator
+
+template <typename TText, typename TSA, typename TQuery > inline Pair< typename Iterator<TSA const, Standard>::Type > equalRangeSANaiveIterator( TText const &text, TSA const &sa, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(883)
+
+//____________________________________________________________________________
+// find
+
+template <typename TFinder, typename TNeedle> inline bool find(TFinder & finder, Pattern<TNeedle, Quasar> & me);       	// "projects/library/seqan/index/find_quasar.h"(152)
+template <typename TFinder, typename TIndex, typename TSpec> inline bool find( TFinder &finder, Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > &pattern, double errorRate);       	// "projects/library/seqan/index/find_swift.h"(1671)
+template <typename THaystack, typename TIndex, typename TSpec, typename TSize> inline bool find( Finder<THaystack, Swift<TSpec> > &finder, Pattern<TIndex, Swift<TSpec> > &pattern, double errorRate, TSize minLength);       	// "projects/library/seqan/index/find_swift.h"(1682)
+template <typename THashes, typename TPipeSpec, typename TIndex, typename TSpec> inline bool find( Finder<Pipe<THashes, TPipeSpec>, Swift<TSpec> > &finder, Pattern<TIndex, Swift<TSpec> > &pattern, double errorRate);       	// "projects/library/seqan/index/find_swift.h"(1758)
+template <typename TText, typename TSpec, typename TSpecFinder, typename TPattern > inline bool find( Finder<Index<TText, TSpec>, TSpecFinder> &finder, TPattern const &pattern);       	// "projects/library/seqan/index/find_index.h"(291)
+template <typename TText, typename TSpec, typename TSpecFinder > inline bool find(Finder<Index<TText, TSpec>, TSpecFinder> &finder);       	// "projects/library/seqan/index/find_index.h"(304)
+
+//____________________________________________________________________________
+// findRepeats
+
+template <typename TRepeatStore, typename TString, typename TRepeatSize> inline void findRepeats(TRepeatStore &repString, TString const &text, TRepeatSize minRepeatLen);       	// "projects/library/seqan/index/repeat_base.h"(130)
+template <typename TRepeatStore, typename TString, typename TSpec, typename TRepeatSize> inline void findRepeats(TRepeatStore &repString, StringSet<TString, TSpec> const &text, TRepeatSize minRepeatLen);       	// "projects/library/seqan/index/repeat_base.h"(176)
+template <typename TRepeatStore, typename TText, typename TRepeatSize, typename TPeriodSize> void findRepeats(TRepeatStore &repString, TText const &text, TRepeatSize minRepeatLen, TPeriodSize maxPeriod);       	// "projects/library/seqan/index/repeat_base.h"(228)
+
+//____________________________________________________________________________
+// getBucket
+
+template <typename THashValue > inline THashValue getBucket(Nothing const &, THashValue hash);       	// "projects/library/seqan/index/index_qgram.h"(859)
+template <typename THashValue, typename THashValue2 > inline THashValue getBucket(BucketMap<THashValue> const &bucketMap, THashValue2 hash);       	// "projects/library/seqan/index/index_qgram_openaddressing.h"(242)
+
+//____________________________________________________________________________
+// getFibre
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, PizzaChili<TSpec> > const, PizzaChiliText>::Type getFibre(Index<TText, PizzaChili<TSpec> > const& me, PizzaChiliText const);       	// "projects/library/seqan/index/index_pizzachili.h"(226)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, PizzaChili<TSpec> >, PizzaChiliText>::Type getFibre(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliText const);       	// "projects/library/seqan/index/index_pizzachili.h"(233)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreDir>::Type & getFibre(Index<TText, TSpec> &index, FibreDir);       	// "projects/library/seqan/index/index_qgram.h"(294)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreDir>::Type & getFibre(Index<TText, TSpec> const &index, FibreDir);       	// "projects/library/seqan/index/index_qgram.h"(299)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreCounts>::Type & getFibre(Index<TText, TSpec> &index, FibreCounts);       	// "projects/library/seqan/index/index_qgram.h"(305)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreCounts>::Type & getFibre(Index<TText, TSpec> const &index, FibreCounts);       	// "projects/library/seqan/index/index_qgram.h"(310)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreCountsDir>::Type & getFibre(Index<TText, TSpec> &index, FibreCountsDir);       	// "projects/library/seqan/index/index_qgram.h"(316)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreCountsDir>::Type & getFibre(Index<TText, TSpec> const &index, FibreCountsDir);       	// "projects/library/seqan/index/index_qgram.h"(321)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreBucketMap>::Type & getFibre(Index<TText, TSpec> &index, FibreBucketMap);       	// "projects/library/seqan/index/index_qgram.h"(327)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreBucketMap>::Type & getFibre(Index<TText, TSpec> const &index, FibreBucketMap);       	// "projects/library/seqan/index/index_qgram.h"(332)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreShape>::Type & getFibre(Index<TText, TSpec> &index, FibreShape);       	// "projects/library/seqan/index/index_qgram.h"(338)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreShape>::Type & getFibre(Index<TText, TSpec> const &index, FibreShape);       	// "projects/library/seqan/index/index_qgram.h"(343)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreText>::Type & getFibre(Index<TText, TSpec> &index, FibreText);       	// "projects/library/seqan/index/index_base.h"(601)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreText>::Type & getFibre(Index<TText, TSpec> const &index, FibreText);       	// "projects/library/seqan/index/index_base.h"(606)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreRawText>::Type & getFibre(Index<TText, TSpec> &index, FibreRawText);       	// "projects/library/seqan/index/index_base.h"(614)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreRawText>::Type & getFibre(Index<TText, TSpec> const &index, FibreRawText);       	// "projects/library/seqan/index/index_base.h"(619)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreSA>::Type & getFibre(Index<TText, TSpec> &index, FibreSA);       	// "projects/library/seqan/index/index_base.h"(627)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreSA>::Type & getFibre(Index<TText, TSpec> const &index, FibreSA);       	// "projects/library/seqan/index/index_base.h"(632)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreRawSA>::Type getFibre(Index<TText, TSpec> &index, FibreRawSA);       	// "projects/library/seqan/index/index_base.h"(667)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreLcp>::Type & getFibre(Index<TText, TSpec> &index, FibreLcp);       	// "projects/library/seqan/index/index_base.h"(686)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreLcp>::Type & getFibre(Index<TText, TSpec> const &index, FibreLcp);       	// "projects/library/seqan/index/index_base.h"(691)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreLcpe>::Type & getFibre(Index<TText, TSpec> &index, FibreLcpe);       	// "projects/library/seqan/index/index_base.h"(699)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreLcpe>::Type & getFibre(Index<TText, TSpec> const &index, FibreLcpe);       	// "projects/library/seqan/index/index_base.h"(704)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreChildtab>::Type & getFibre(Index<TText, TSpec> &index, FibreChildtab);       	// "projects/library/seqan/index/index_base.h"(712)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreChildtab>::Type & getFibre(Index<TText, TSpec> const &index, FibreChildtab);       	// "projects/library/seqan/index/index_base.h"(717)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreBwt>::Type & getFibre(Index<TText, TSpec> &index, FibreBwt);       	// "projects/library/seqan/index/index_base.h"(725)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreBwt>::Type & getFibre(Index<TText, TSpec> const &index, FibreBwt);       	// "projects/library/seqan/index/index_base.h"(730)
+
+//____________________________________________________________________________
+// getFrequency
+
+template <typename TIndex, class TSpec, typename TSet > inline typename Size<TIndex>::Type getFrequency(Iter<TIndex, VSTree<TSpec> > const &it, TSet &set);       	// "projects/library/seqan/index/index_esa_stree.h"(2099)
+template <typename TIndex, class TSpec > inline typename Size<TIndex>::Type getFrequency(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(2127)
+
+//____________________________________________________________________________
+// getKmerSimilarityMatrix
+
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TDistMatrix > inline void getKmerSimilarityMatrix( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, TDistMatrix &distMat);       	// "projects/library/seqan/index/index_qgram.h"(1954)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TDistMatrix, typename TSeqNoString > inline void getKmerSimilarityMatrix( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, TDistMatrix &distMat, TSeqNoString const &seqNo);       	// "projects/library/seqan/index/index_qgram.h"(2054)
+
+//____________________________________________________________________________
+// getOccurrence
+
+template <typename TIndex, class TSpec > inline typename SAValue<TIndex>::Type getOccurrence(Iter< TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(789)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline typename SAValue< Index< TObject, IndexQGram<TShapeSpec, TSpec> > >::Type getOccurrence( Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2221)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline typename SAValue< Index< TObject, IndexQGram<TShapeSpec, TSpec> > >::Type getOccurrence( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2230)
+template <typename TText, typename TSpec > inline typename SAValue<Index<TText, IndexWotd<WotdOriginal> > >::Type getOccurrence(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_wotd.h"(556)
+
+//____________________________________________________________________________
+// getOccurrences
+
+template <typename TIndex, class TSpec > inline typename Infix< typename Fibre<TIndex, FibreSA>::Type const >::Type getOccurrences(Iter< TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(868)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline typename Infix< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreSA>::Type const >::Type getOccurrences( Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2255)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline typename Infix< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreSA>::Type const >::Type getOccurrences( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2266)
+
+//____________________________________________________________________________
+// getOccurrencesBwt
+
+template <typename TIndex, class TSpec > inline typename Infix< typename Fibre<TIndex, EsaBwt>::Type const >::Type getOccurrencesBwt(Iter< TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(974)
+
+//____________________________________________________________________________
+// getSequenceByNo
+
+template <typename TSeqNo, typename TText, typename TSpec> inline typename GetSequenceByNo< Index<TText, TSpec> >::Type getSequenceByNo(TSeqNo seqNo, Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(770)
+template <typename TSeqNo, typename TText, typename TSpec> inline typename GetSequenceByNo< Index<TText, TSpec> const>::Type getSequenceByNo(TSeqNo seqNo, Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(777)
+
+//____________________________________________________________________________
+// getStepSize
+
+template <typename TText, typename TShapeSpec, typename TSpec> inline typename Size<TText>::Type getStepSize(Index<TText, IndexQGram<TShapeSpec, TSpec> > const &index);       	// "projects/library/seqan/index/index_qgram.h"(504)
+
+//____________________________________________________________________________
+// getSwiftHits
+
+template <typename THaystack, typename TSpec> inline typename Finder<THaystack, Swift<TSpec> >::THitString & getSwiftHits(Finder<THaystack, Swift<TSpec> > &finder);       	// "projects/library/seqan/index/find_swift.h"(1948)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename TRepeat > inline void goBegin(Iter<TRepeat, MaxRepeatOccurrences> &it);       	// "projects/library/seqan/index/index_esa_algs.h"(897)
+template <typename TText, typename TIndexSpec, class TSpec > inline void goBegin(Iter<Index<TText, TIndexSpec>, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1214)
+template <typename TText, typename TIndexSpec, class TSpec > inline void goBegin(Iter<Index<TText, IndexEsa<TIndexSpec> >, VSTree< BottomUp<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1233)
+template <typename TText, typename TSpec, typename TSpecFinder > inline void goBegin(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(215)
+
+//____________________________________________________________________________
+// goDown
+
+template <typename TIndex, class TSpec > inline bool goDown(Iter< TIndex, VSTree< TopDown<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1441)
+template <typename TIndex, typename TSpec, typename TObject > inline bool goDown( Iter< TIndex, VSTree< TopDown<TSpec> > > &it, TObject const &obj);       	// "projects/library/seqan/index/index_esa_stree.h"(1546)
+template <typename TIndex, typename TSpec, typename TString, typename TSize > inline bool goDown( Iter< TIndex, VSTree< TopDown<TSpec> > > &it, TString const &pattern, TSize &lcp);       	// "projects/library/seqan/index/index_esa_stree.h"(1556)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename TRepeat > inline void goEnd(Iter<TRepeat, MaxRepeatOccurrences> &it);       	// "projects/library/seqan/index/index_esa_algs.h"(906)
+template <typename THaystack, typename TSpec> inline void goEnd(Finder<THaystack, Swift<TSpec> > & me);       	// "projects/library/seqan/index/find_swift.h"(378)
+template <typename TText, typename TIndexSpec, class TSpec > inline void goEnd(Iter<Index<TText, IndexEsa<TIndexSpec> >, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1265)
+template <typename TText, typename TIndexSpec, class TSpec > inline void goEnd(Iter<Index<TText, IndexEsa<TIndexSpec> >, VSTree< BottomUp<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1272)
+template <typename TText, typename TSpec, typename TSpecFinder > inline void goEnd(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(223)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TSTree > inline void goNext(Iter< TSTree, VSTree< BottomUp<SuperMaxRepeats> > > &it);       	// "projects/library/seqan/index/index_esa_algs.h"(121)
+template <typename TText, typename TSpec > inline void goNext(Iter< Index<TText, IndexEsa<TSpec> >, VSTree< BottomUp<SuperMaxRepeatsFast> > > &it);       	// "projects/library/seqan/index/index_esa_algs.h"(223)
+template <typename TSTree, typename TSpec > inline void goNext(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > &it);       	// "projects/library/seqan/index/index_esa_algs.h"(597)
+template <typename TRepeat > inline Iter<TRepeat, MaxRepeatOccurrences> & goNext(Iter<TRepeat, MaxRepeatOccurrences> &it);       	// "projects/library/seqan/index/index_esa_algs.h"(880)
+template <typename TIndex, typename TSpec > inline void goNext(Iter<TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1283)
+template <typename TIndex, typename TSpec, typename TTraits > inline void goNext(Iter<TIndex, VSTree<TSpec> > &it, TTraits const traits);       	// "projects/library/seqan/index/index_esa_stree.h"(1288)
+template <typename TSTree > inline void goNext(Iter< TSTree, VSTree< BottomUp<Mums> > > &it);       	// "projects/library/seqan/index/index_esa_algs_multi.h"(123)
+template <typename TRepeat > inline Iter<TRepeat, MultiMemOccurences> & goNext(Iter<TRepeat, MultiMemOccurences> &it);       	// "projects/library/seqan/index/index_esa_algs_multi.h"(672)
+
+//____________________________________________________________________________
+// goNextImpl
+
+template <typename TIndex, typename TSpec, typename THideEmptyEdges > inline void goNextImpl( Iter<TIndex, VSTree< BottomUp<TSpec> > > &it, VSTreeIteratorTraits<Postorder_, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_esa_stree.h"(401)
+template <typename TIndex, typename TSpec, typename THideEmptyEdges > inline void goNextImpl( Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it, VSTreeIteratorTraits<Preorder_, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_esa_stree.h"(1779)
+template <typename TIndex, typename TSpec, typename THideEmptyEdges > inline void goNextImpl( Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it, VSTreeIteratorTraits<Postorder_, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_esa_stree.h"(1829)
+
+//____________________________________________________________________________
+// goNextRight
+
+template <typename TIndex, typename TSpec > inline void goNextRight(Iter<TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1293)
+template <typename TIndex, typename TSpec, typename TTraits > inline void goNextRight(Iter<TIndex, VSTree<TSpec> > &it, TTraits const traits);       	// "projects/library/seqan/index/index_esa_stree.h"(1298)
+
+//____________________________________________________________________________
+// goNextRightImpl
+
+template <typename TIndex, typename TSpec, typename THideEmptyEdges > inline void goNextRightImpl( Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it, VSTreeIteratorTraits<Preorder_, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_esa_stree.h"(1795)
+
+//____________________________________________________________________________
+// goNextUp
+
+template <typename TIndex, typename TSpec > inline void goNextUp(Iter<TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1303)
+template <typename TIndex, typename TSpec, typename TTraits > inline void goNextUp(Iter<TIndex, VSTree<TSpec> > &it, TTraits const traits);       	// "projects/library/seqan/index/index_esa_stree.h"(1308)
+
+//____________________________________________________________________________
+// goNextUpImpl
+
+template <typename TIndex, typename TSpec, typename THideEmptyEdges > inline void goNextUpImpl( Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it, VSTreeIteratorTraits<Preorder_, THideEmptyEdges> const);       	// "projects/library/seqan/index/index_esa_stree.h"(1811)
+
+//____________________________________________________________________________
+// goRight
+
+template <typename TIndex, class TSpec > inline bool goRight(Iter< TIndex, VSTree< TopDown<TSpec> > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1687)
+
+//____________________________________________________________________________
+// goRoot
+
+template <typename TText, typename TIndexSpec, class TSpec > inline void goRoot(Iter<Index<TText, TIndexSpec>, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1191)
+template <typename TText, typename TSpec > inline void goRoot(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_wotd.h"(592)
+template <typename TText, typename TIndexSpec, typename TSpec > inline void goRoot(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_wotd.h"(604)
+
+//____________________________________________________________________________
+// goUp
+
+template <typename TIndex, class TSpec > inline bool goUp(Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1601)
+
+//____________________________________________________________________________
+// hash
+
+template <typename TValue, typename TIter> inline typename Value< Shape<TValue, OneGappedShape> >::Type hash(Shape<TValue, OneGappedShape> &me, TIter it);       	// "projects/library/seqan/index/shape_onegapped.h"(171)
+template <typename TValue, typename TIter, typename TSize> inline typename Value< Shape<TValue, OneGappedShape> >::Type hash(Shape<TValue, OneGappedShape> &me, TIter it, TSize charsLeft);       	// "projects/library/seqan/index/shape_onegapped.h"(192)
+template <typename TValue, typename TIter> typename Value< Shape<TValue, SimpleShape> >::Type hash(Shape<TValue, SimpleShape> &me, TIter it);       	// "projects/library/seqan/index/shape_base.h"(319)
+template <typename TValue, unsigned q, typename TIter> inline typename Value< Shape<TValue, UngappedShape<q> > >::Type hash(Shape<TValue, UngappedShape<q> > &me, TIter it);       	// "projects/library/seqan/index/shape_base.h"(355)
+template <typename TValue, typename TSpec, typename TIter, typename TSize> inline typename Value< Shape<TValue, TSpec> >::Type hash(Shape<TValue, TSpec> &me, TIter it, TSize charsLeft);       	// "projects/library/seqan/index/shape_base.h"(368)
+template <typename TValue, typename TTValue, unsigned SIZE, unsigned q> typename Value< Shape<TValue, UngappedShape<q> > >::Type hash( Shape<TValue, UngappedShape<q> > &me, Tuple<TTValue, SIZE, Compressed> const &tuple);       	// "projects/library/seqan/index/shape_base.h"(427)
+template <typename TValue, typename TTValue, unsigned SIZE, typename TCompressed, unsigned q> typename Value< Shape<TValue, UngappedShape<q> > >::Type hash( Shape<TValue, UngappedShape<q> > &me, Tuple<TTValue, SIZE, TCompressed> const &tuple);       	// "projects/library/seqan/index/shape_base.h"(448)
+template <typename TValue, typename TIter> inline typename Value< Shape<TValue, GenericShape> >::Type hash(Shape<TValue, GenericShape> &me, TIter it);       	// "projects/library/seqan/index/shape_gapped.h"(393)
+template <typename TValue, typename TSpec, typename TIter, typename TSize> inline typename Value< Shape<TValue, GappedShape<TSpec> > >::Type hash(Shape<TValue, GappedShape<TSpec> > &me, TIter it, TSize charsLeft);       	// "projects/library/seqan/index/shape_gapped.h"(410)
+template <int P00, int P01, int P02, int P03, int P04, int P05, int P06, int P07, int P08, int P09, int P10, int P11, int P12, int P13, int P14, int P15, int P16, int P17, int P18, int P19, typename TValue, typename TIter > inline typename Value< Shape<TValue, GappedShape< HardwiredShape< P00,P01,P02,P03,P04, P05,P06,P07,P08,P09, P10,P11,P12,P13,P14, P15,P16,P17,P18,P19 > > > >::Type hash(Shape<TValue, GappedShape< HardwiredShape< P00,P01,P02,P03,P04, P05,P06,P07,P08,P09, P10,P11,P12,P13 [...]
+
+//____________________________________________________________________________
+// hash2
+
+template <typename TValue, typename TSpec, typename TIter, typename TSize> inline typename Value< Shape<TValue, TSpec> >::Type hash2(Shape<TValue, TSpec> &me, TIter it, TSize charsLeft);       	// "projects/library/seqan/index/shape_base.h"(543)
+
+//____________________________________________________________________________
+// hash2Next
+
+template <typename TValue, typename TSpec, typename TIter, typename TSize> inline typename Value< Shape<TValue, TSpec> >::Type hash2Next(Shape<TValue, TSpec> &me, TIter &it, TSize charsLeft);       	// "projects/library/seqan/index/shape_base.h"(635)
+
+//____________________________________________________________________________
+// hash2Upper
+
+template <typename TValue, typename TSpec, typename TIter, typename TSize> inline typename Value< Shape<TValue, TSpec> >::Type hash2Upper(Shape<TValue, TSpec> &me, TIter it, TSize charsLeft);       	// "projects/library/seqan/index/shape_base.h"(585)
+
+//____________________________________________________________________________
+// hashNext
+
+template <typename TValue, typename TIter> inline typename Value< Shape<TValue, OneGappedShape> >::Type hashNext(Shape<TValue, OneGappedShape> &me, TIter &_it);       	// "projects/library/seqan/index/shape_onegapped.h"(274)
+template <typename TValue, typename TSpec, typename TIter> inline typename Value< Shape<TValue, TSpec> >::Type hashNext(Shape<TValue, TSpec> &me, TIter const &it);       	// "projects/library/seqan/index/shape_base.h"(513)
+template <typename TValue, typename TSpec, typename TIter> inline typename Value< Shape<TValue, GappedShape<TSpec> > >::Type hashNext(Shape<TValue, GappedShape<TSpec> > &me, TIter &it);       	// "projects/library/seqan/index/shape_gapped.h"(567)
+
+//____________________________________________________________________________
+// hashUpper
+
+template <typename TValue, typename TIter, typename TSize> inline typename Value< Shape<TValue, OneGappedShape> >::Type hashUpper(Shape<TValue, OneGappedShape> &me, TIter it, TSize charsLeft);       	// "projects/library/seqan/index/shape_onegapped.h"(232)
+template <typename TValue, typename TSpec, typename TIter, typename TSize> inline typename Value< Shape<TValue, TSpec> >::Type hashUpper(Shape<TValue, TSpec> &me, TIter it, TSize charsLeft);       	// "projects/library/seqan/index/shape_base.h"(471)
+template <typename TValue, typename TSpec, typename TIter, typename TSize> inline typename Value< Shape<TValue, GappedShape<TSpec> > >::Type hashUpper(Shape<TValue, GappedShape<TSpec> > &me, TIter it, TSize charsLeft);       	// "projects/library/seqan/index/shape_gapped.h"(440)
+
+//____________________________________________________________________________
+// host
+
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, Quasar>const>::Type & host(Pattern<TNeedle, Quasar> & me);       	// "projects/library/seqan/index/find_quasar.h"(133)
+template <typename TNeedle> inline typename Host<Pattern<TNeedle, Quasar>const>::Type & host(Pattern<TNeedle, Quasar> const & me);       	// "projects/library/seqan/index/find_quasar.h"(141)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Parameter_< Index<TText, TSpec> >::Type host(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(100)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Parameter_< Index<TText, TSpec> >::Type host(Finder< Index<TText, TSpec>, TSpecFinder > const & me);       	// "projects/library/seqan/index/find_index.h"(108)
+
+//____________________________________________________________________________
+// hostIterator
+
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Iterator< typename Fibre<Index<TText, TSpec>, FibreSA>::Type const, Standard>::Type & hostIterator(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(156)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Iterator< typename Fibre<Index<TText, TSpec>, FibreSA>::Type const, Standard>::Type const & hostIterator(Finder< Index<TText, TSpec>, TSpecFinder > const & me);       	// "projects/library/seqan/index/find_index.h"(164)
+
+//____________________________________________________________________________
+// indexBucketMap
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreBucketMap>::Type & indexBucketMap(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_qgram.h"(455)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreBucketMap>::Type & indexBucketMap(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_qgram.h"(460)
+
+//____________________________________________________________________________
+// indexBwt
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreBwt>::Type & indexBwt(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(1158)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreBwt>::Type & indexBwt(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(1160)
+
+//____________________________________________________________________________
+// indexChildtab
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreChildtab>::Type & indexChildtab(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(1175)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreChildtab>::Type & indexChildtab(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(1177)
+
+//____________________________________________________________________________
+// indexCounts
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreCounts>::Type & indexCounts(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_qgram.h"(409)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreCounts>::Type & indexCounts(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_qgram.h"(414)
+
+//____________________________________________________________________________
+// indexCountsDir
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreCountsDir>::Type & indexCountsDir(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_qgram.h"(432)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreCountsDir>::Type & indexCountsDir(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_qgram.h"(437)
+
+//____________________________________________________________________________
+// indexCreate
+
+template <typename TText, typename TSpec> inline bool indexCreate(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliCompressed const);       	// "projects/library/seqan/index/index_pizzachili.h"(294)
+template <typename TText, typename TShapeSpec, typename TSpec> inline bool indexCreate( Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, FibreSADir, Default const);       	// "projects/library/seqan/index/index_qgram.h"(1884)
+template <typename TText, typename TShapeSpec, typename TSpec> inline bool indexCreate( Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, FibreSA, Default const);       	// "projects/library/seqan/index/index_qgram.h"(1901)
+template <typename TText, typename TShapeSpec, typename TSpec> inline bool indexCreate( Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, FibreCounts, Default const);       	// "projects/library/seqan/index/index_qgram.h"(1912)
+template <typename TText, typename TShapeSpec, typename TSpec> inline bool indexCreate( Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, FibreDir, Default const);       	// "projects/library/seqan/index/index_qgram.h"(1923)
+template <typename TText, typename TSpec, typename TSpecAlg> inline bool indexCreate(Index<TText, TSpec> &index, FibreSA, TSpecAlg const alg);       	// "projects/library/seqan/index/index_shims.h"(570)
+template <typename TText, typename TSpec, typename TSpecAlg> inline bool indexCreate(Index<TText, TSpec> &index, FibreLcp, TSpecAlg const alg);       	// "projects/library/seqan/index/index_shims.h"(578)
+template <typename TText, typename TSpec, typename TSpecAlg> inline bool indexCreate(Index<TText, TSpec> &index, FibreLcpe, TSpecAlg const alg);       	// "projects/library/seqan/index/index_shims.h"(586)
+template <typename TText, typename TSpec> inline bool indexCreate(Index<TText, TSpec> &index, FibreBwt, Bwt const);       	// "projects/library/seqan/index/index_shims.h"(596)
+template <typename TText, typename TSpec> inline bool indexCreate(Index<TText, TSpec> &index, FibreChildtab, Childtab const);       	// "projects/library/seqan/index/index_shims.h"(604)
+template <typename TText, typename TSpec, typename TFibre> inline bool indexCreate(Index<TText, TSpec> &index, Tag<TFibre> const fibre);       	// "projects/library/seqan/index/index_shims.h"(612)
+template <typename TText, typename TPredHull, typename TPred> inline bool indexCreate(Index<TText, IndexWotd<Dfi<TPredHull, TPred> > > &index, WotdDir const, Default const);       	// "projects/library/seqan/index/index_dfi.h"(579)
+template <typename TText, typename TSpec> inline bool indexCreate(Index<TText, IndexWotd<TSpec> > &index, WotdDir const, Default const);       	// "projects/library/seqan/index/index_wotd.h"(1924)
+
+//____________________________________________________________________________
+// indexDir
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreDir>::Type & indexDir(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_qgram.h"(361)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreDir>::Type & indexDir(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_qgram.h"(366)
+
+//____________________________________________________________________________
+// indexLcp
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreLcp>::Type & indexLcp(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(1124)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreLcp>::Type & indexLcp(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(1126)
+
+//____________________________________________________________________________
+// indexLcpe
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreLcpe>::Type & indexLcpe(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(1141)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreLcpe>::Type & indexLcpe(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(1143)
+
+//____________________________________________________________________________
+// indexRawSA
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreRawSA>::Type indexRawSA(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(1107)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreRawSA>::Type indexRawSA(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(1109)
+
+//____________________________________________________________________________
+// indexRawText
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreRawText>::Type & indexRawText(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(1068)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreRawText>::Type & indexRawText(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(1070)
+
+//____________________________________________________________________________
+// indexRequire
+
+template <typename TText, typename TSpec, typename TFibre> inline bool indexRequire(Index<TText, TSpec> &index, Tag<TFibre> const fibre);       	// "projects/library/seqan/index/index_shims.h"(656)
+
+//____________________________________________________________________________
+// indexSA
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreSA>::Type & indexSA(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(1085)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreSA>::Type & indexSA(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(1087)
+
+//____________________________________________________________________________
+// indexShape
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreShape>::Type & indexShape(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_qgram.h"(480)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreShape>::Type & indexShape(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_qgram.h"(485)
+
+//____________________________________________________________________________
+// indexSolveDependencies
+
+template <typename TText, typename TSpec> inline bool indexSolveDependencies(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliCompressed const);       	// "projects/library/seqan/index/index_pizzachili.h"(258)
+template <typename TText, typename TSpec, typename TFibre> inline bool indexSolveDependencies(Index<TText, TSpec> &, Tag<TFibre> const);       	// "projects/library/seqan/index/index_shims.h"(687)
+template <typename TText, typename TSpec> inline bool indexSolveDependencies(Index<TText, TSpec> &index, FibreLcp);       	// "projects/library/seqan/index/index_shims.h"(693)
+template <typename TText, typename TSpec> inline bool indexSolveDependencies(Index<TText, TSpec> &index, FibreLcpe);       	// "projects/library/seqan/index/index_shims.h"(699)
+template <typename TText, typename TSpec> inline bool indexSolveDependencies(Index<TText, TSpec> &index, FibreChildtab);       	// "projects/library/seqan/index/index_shims.h"(705)
+template <typename TText, typename TSpec> inline bool indexSolveDependencies(Index<TText, TSpec> &index, FibreBwt);       	// "projects/library/seqan/index/index_shims.h"(711)
+
+//____________________________________________________________________________
+// indexSupplied
+
+template <typename TText, typename TSpec> inline bool indexSupplied(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliCompressed const);       	// "projects/library/seqan/index/index_pizzachili.h"(242)
+template <typename TText, typename TSpec> inline bool indexSupplied(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliText const);       	// "projects/library/seqan/index/index_pizzachili.h"(249)
+template <typename TText, typename TSpec> inline bool indexSupplied(Index<TText, TSpec> &index, FibreSADir);       	// "projects/library/seqan/index/index_qgram.h"(1892)
+template <typename TText, typename TSpec, typename TFibre> inline bool indexSupplied(Index<TText, TSpec> &index, Tag<TFibre> const fibre);       	// "projects/library/seqan/index/index_shims.h"(634)
+
+//____________________________________________________________________________
+// indexText
+
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, PizzaChili<TSpec> >, PizzaChiliText>::Type indexText(Index<TText, PizzaChili<TSpec> >& me);       	// "projects/library/seqan/index/index_pizzachili.h"(210)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, PizzaChili<TSpec> > const, PizzaChiliText>::Type indexText(Index<TText, PizzaChili<TSpec> > const& me);       	// "projects/library/seqan/index/index_pizzachili.h"(217)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec>, FibreText>::Type & indexText(Index<TText, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(1025)
+template <typename TText, typename TSpec> inline typename Fibre<Index<TText, TSpec> const, FibreText>::Type & indexText(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(1027)
+
+//____________________________________________________________________________
+// infix
+
+template <typename THaystack, typename TSpec> inline typename Infix<THaystack>::Type infix(Finder<THaystack, Swift<TSpec> > &finder);       	// "projects/library/seqan/index/find_swift.h"(1495)
+template <typename THaystack, typename TSpec, typename TText> inline typename Infix<TText>::Type infix(Finder<THaystack, Swift<TSpec> > &finder, TText &text);       	// "projects/library/seqan/index/find_swift.h"(1502)
+template <typename TIndex, typename TSpec, typename TText> inline typename Infix<TText>::Type infix(Pattern<TIndex, Swift<TSpec> > const & pattern, TText &text);       	// "projects/library/seqan/index/find_swift.h"(1527)
+template <typename TIndex, typename TSpec> inline typename Infix< typename GetSequenceByNo< TIndex const >::Type >::Type infix(Pattern<TIndex, Swift<TSpec> > const & pattern);       	// "projects/library/seqan/index/find_swift.h"(1541)
+template <typename TIndex, typename TSpec> inline typename Infix< typename GetSequenceByNo< TIndex const >::Type >::Type infix(Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > const & pattern);       	// "projects/library/seqan/index/find_swift.h"(1548)
+template <typename TIndex, typename TSpec> inline typename Infix< typename GetSequenceByNo< TIndex const >::Type >::Type infix(Pattern<TIndex, Swift<TSpec> > & pattern);       	// "projects/library/seqan/index/find_swift.h"(1555)
+template <typename TValue, typename TSpec, typename TPosBegin, typename TPosEnd> inline typename Infix<String<TValue, PizzaChili<TSpec> > >::Type infix( String<TValue, PizzaChili<TSpec> > const& me, TPosBegin begin, TPosEnd end );       	// "projects/library/seqan/index/index_pizzachili_string.h"(739)
+template <typename TValue, typename TSpec, typename TPosBegin, typename TPosEnd> inline typename Infix<String<TValue, PizzaChili<TSpec> > >::Type infix( String<TValue, PizzaChili<TSpec> >& me, TPosBegin begin, TPosEnd end );       	// "projects/library/seqan/index/index_pizzachili_string.h"(750)
+template <typename TText, typename TSpec, typename TPosBegin, typename TPosEnd> inline typename Infix<TText>::Type infix(Index<TText, TSpec> &index, TPosBegin pos_begin, TPosEnd pos_end);       	// "projects/library/seqan/index/index_base.h"(837)
+template <typename TText, typename TSpec, typename TPosBegin, typename TPosEnd> inline typename Infix<TText>::Type infix(Index<TText, TSpec> const &index, TPosBegin pos_begin, TPosEnd pos_end);       	// "projects/library/seqan/index/index_base.h"(844)
+
+//____________________________________________________________________________
+// infixNoClip
+
+template <typename THaystack, typename TSpec> inline typename Infix<THaystack>::Type infixNoClip(Finder<THaystack, Swift<TSpec> > &finder);       	// "projects/library/seqan/index/find_swift.h"(1511)
+template <typename THaystack, typename TSpec, typename TText> inline typename Infix<TText>::Type infixNoClip(Finder<THaystack, Swift<TSpec> > &finder, TText &text);       	// "projects/library/seqan/index/find_swift.h"(1518)
+
+//____________________________________________________________________________
+// initPatterns
+
+template <typename TStateString, typename TShape, typename TLogErrorDistr, typename TDistance > void initPatterns( TStateString &states, TShape const &bitShape, int maxErrors, TLogErrorDistr const &logError, TDistance, bool optionMinOutput);       	// "projects/library/seqan/index/shape_threshold.h"(455)
+
+//____________________________________________________________________________
+// isLeaf
+
+template <typename TIndex, class TSpec > inline bool isLeaf(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(2210)
+
+//____________________________________________________________________________
+// isLeftMaximal
+
+template <typename TIndex, class TSpec > inline bool isLeftMaximal(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1951)
+
+//____________________________________________________________________________
+// isPartiallyLeftExtensible
+
+template <typename TIndex, class TSpec, typename TSet > inline bool isPartiallyLeftExtensible(Iter<TIndex, VSTree<TSpec> > const &it, TSet &charSet);       	// "projects/library/seqan/index/index_esa_stree.h"(2000)
+template <typename TIndex, class TSpec > inline bool isPartiallyLeftExtensible(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(2034)
+
+//____________________________________________________________________________
+// isRightTerminal
+
+template <typename TIndex, class TSpec > inline bool isRightTerminal(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1927)
+
+//____________________________________________________________________________
+// isRoot
+
+template <typename TIndex, class TSpec > inline bool isRoot(Iter<TIndex, VSTree< BottomUp<TSpec> > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1897)
+template <typename TIndex, class TSpec > inline bool isRoot(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1903)
+
+//____________________________________________________________________________
+// isUnique
+
+template <typename TIndex, class TSpec, typename TSet > inline bool isUnique(Iter<TIndex, VSTree<TSpec> > const &it, TSet &set);       	// "projects/library/seqan/index/index_esa_stree.h"(2053)
+template <typename TIndex, class TSpec > inline bool isUnique(Iter<TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(2076)
+
+//____________________________________________________________________________
+// isinf
+
+template <typename TValue> inline bool isinf(TValue value);       	// "projects/library/seqan/index/shape_threshold.h"(240)
+template <typename TValue> inline bool isinf(TValue value);       	// "projects/library/seqan/index/shape_threshold.h"(254)
+
+//____________________________________________________________________________
+// isnan
+
+template <typename TValue> inline bool isnan(TValue value);       	// "projects/library/seqan/index/shape_threshold.h"(234)
+template <typename TValue> inline bool isnan(TValue value);       	// "projects/library/seqan/index/shape_threshold.h"(248)
+
+//____________________________________________________________________________
+// lca
+
+template <typename TIndex, class TSpec1, class TSpec2 > inline bool lca( Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec1> > > > &a, Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec2> > > > &b, Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec1> > > > &_lca);       	// "projects/library/seqan/index/index_esa_stree.h"(595)
+
+//____________________________________________________________________________
+// lcp
+
+template <typename TIndex, class TSpec1, class TSpec2 > inline typename Size<TIndex>::Type lcp( Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec1> > > > &a, Iter<TIndex, VSTree< TopDown< ParentLinks<TSpec2> > > > &b);       	// "projects/library/seqan/index/index_esa_stree.h"(652)
+
+//____________________________________________________________________________
+// lcpAt
+
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex, FibreLcp>::Type>::Type lcpAt(TPos i, TIndex &index);       	// "projects/library/seqan/index/index_base.h"(925)
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex const, FibreLcp>::Type>::Type lcpAt(TPos i, TIndex const &index);       	// "projects/library/seqan/index/index_base.h"(929)
+
+//____________________________________________________________________________
+// lcpeAt
+
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex, FibreLcpe>::Type>::Type lcpeAt(TPos i, TIndex &index);       	// "projects/library/seqan/index/index_base.h"(947)
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex const, FibreLcpe>::Type>::Type lcpeAt(TPos i, TIndex const &index);       	// "projects/library/seqan/index/index_base.h"(951)
+
+//____________________________________________________________________________
+// length
+
+template <typename TSTree, typename TSpec > inline typename Size<TSTree>::Type length(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_esa_algs.h"(634)
+template <typename TSTree> inline typename Size< MaxRepeat<TSTree> >::Type length(MaxRepeat<TSTree> const &repeat);       	// "projects/library/seqan/index/index_esa_algs.h"(683)
+template <typename TInput > inline typename Size< Pipe< TInput, LarssonSadakane > >::Type length(Pipe< TInput, LarssonSadakane > const &me);       	// "projects/library/seqan/index/index_sa_lss.h"(445)
+template <typename TValue> inline typename Size< Shape<TValue, OneGappedShape> >::Type length(Shape<TValue, OneGappedShape> const &me);       	// "projects/library/seqan/index/shape_onegapped.h"(151)
+template <typename TInput > inline typename Size< Pipe< TInput, Merger7 > >::Type length(Pipe< TInput, Merger7 > const &me);       	// "projects/library/seqan/index/pipe_merger7.h"(478)
+template <typename TInput, typename TLimitsString > inline typename Size< Pipe< TInput, Merger7Multi<TLimitsString> > >::Type length(Pipe< TInput, Merger7Multi<TLimitsString> > const &me);       	// "projects/library/seqan/index/pipe_merger7.h"(508)
+template <typename TInput > inline typename Size< Pipe< TInput, Merger3 > >::Type length(Pipe< TInput, Merger3 > const &me);       	// "projects/library/seqan/index/pipe_merger3.h"(159)
+template <typename TValue, typename TSpec> inline typename Size< Shape<TValue, TSpec> >::Type length(Shape<TValue, TSpec> const &me);       	// "projects/library/seqan/index/shape_base.h"(259)
+template <typename TValue, typename TSpec> inline typename Size<String<TValue, PizzaChili<TSpec> > >::Type length(String<TValue, PizzaChili<TSpec> > const& me);       	// "projects/library/seqan/index/index_pizzachili_string.h"(394)
+template <typename TSTree> inline typename Size< MultiMem<TSTree> >::Type length(MultiMem<TSTree> const &repeat);       	// "projects/library/seqan/index/index_esa_algs_multi.h"(442)
+template <typename TText, typename TSpec> inline typename Size<Index<TText, TSpec> >::Type length(Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(739)
+
+//____________________________________________________________________________
+// lowerBoundLcpe
+
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline typename Position<TLCPE>::Type lowerBoundLcpe( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(1709)
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline typename Position<TLCPE>::Type lowerBoundLcpe( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(1811)
+
+//____________________________________________________________________________
+// lowerBoundLcpeIterator
+
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline typename Iterator<TSA, Standard>::Type lowerBoundLcpeIterator( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(1760)
+
+//____________________________________________________________________________
+// lowerBoundSA
+
+template <typename TText, typename TSA, typename TQuery, typename TFlatTreeSpec > inline typename Position<TSA>::Type lowerBoundSA( TText const &text, TSA const &sa, TQuery const &query, TFlatTreeSpec const);       	// "projects/library/seqan/index/find_index_esa.h"(948)
+template <typename TText, typename TSA, typename TQuery > inline typename Position<TSA>::Type lowerBoundSA( TText const &text, TSA const &sa, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(962)
+template <typename TText, typename TSA, typename TQuery, typename TFlatTreeSpec > inline typename Position<TSA>::Type lowerBoundSA( TText const &text, TSA const &sa, TQuery *query, TFlatTreeSpec const);       	// "projects/library/seqan/index/find_index_esa.h"(1045)
+template <typename TText, typename TSA, typename TQuery > inline typename Position<TSA>::Type lowerBoundSA( TText const &text, TSA const &sa, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(1059)
+
+//____________________________________________________________________________
+// lowerBoundSAIterator
+
+template <typename TText, typename TSA, typename TQuery > inline typename Iterator<TSA const, Standard>::Type lowerBoundSAIterator( TText const &text, TSA const &sa, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(841)
+template <typename TText, typename TSA, typename TQuery > inline typename Iterator<TSA const, Standard>::Type lowerBoundSAIterator( TText const &text, TSA const &sa, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(900)
+
+//____________________________________________________________________________
+// lowerBoundSANaiveIterator
+
+template <typename TText, typename TSA, typename TQuery > inline typename Iterator<TSA const, Standard>::Type lowerBoundSANaiveIterator( TText const &text, TSA const &sa, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(827)
+
+//____________________________________________________________________________
+// nodeDepth
+
+template <typename TIndex, typename TSpec > inline typename Size<TIndex>::Type nodeDepth(Iter< TIndex, VSTree<TopDown<ParentLinks<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(523)
+
+//____________________________________________________________________________
+// nodeHullPredicate
+
+template <typename TIndex, class TSpec > inline bool nodeHullPredicate(Iter<TIndex, TSpec> &);       	// "projects/library/seqan/index/index_esa_stree.h"(1173)
+template <typename TText, typename TSpec> bool nodeHullPredicate(Iter<Index<TText, IndexWotd<TRepeatFinder> >, TSpec> &it);       	// "projects/library/seqan/index/repeat_base.h"(88)
+template <typename TText, typename TPredHull, typename TPred, typename TSpec > inline bool nodeHullPredicate( Iter<Index<TText, IndexWotd< Dfi<TPredHull, TPred> > >, TSpec> &it);       	// "projects/library/seqan/index/index_dfi.h"(193)
+
+//____________________________________________________________________________
+// nodePredicate
+
+template <typename TIndex, class TSpec > inline bool nodePredicate(Iter<TIndex, TSpec> &);       	// "projects/library/seqan/index/index_esa_stree.h"(1154)
+template <typename TText, typename TSpec> bool nodePredicate(Iter<Index<TText, IndexWotd<TRepeatFinder> >, TSpec> &it);       	// "projects/library/seqan/index/repeat_base.h"(80)
+template <typename TText, typename TPredHull, typename TPred, typename TSpec > inline bool nodePredicate( Iter<Index<TText, IndexWotd< Dfi<TPredHull, TPred> > >, TSpec> &it);       	// "projects/library/seqan/index/index_dfi.h"(180)
+
+//____________________________________________________________________________
+// nodeUp
+
+template <typename TIndex, class TSpec > inline typename VertexDescriptor<TIndex>::Type nodeUp(Iter< TIndex, VSTree< TopDown< ParentLinks<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1626)
+template <typename TIndex, class TSpec > inline typename VertexDescriptor<TIndex>::Type const & nodeUp(Iter< TIndex, VSTree< TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1641)
+template <typename TText, typename TSpec > inline typename VertexDescriptor< Index<TText, IndexWotd<WotdOriginal> > >::Type nodeUp(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown< ParentLinks<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_wotd.h"(834)
+template <typename TText, typename TIndexSpec, typename TSpec > inline typename VertexDescriptor< Index<TText, IndexWotd<TIndexSpec> > >::Type nodeUp(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_wotd.h"(859)
+
+//____________________________________________________________________________
+// open
+
+template <typename TText, typename TSpec> inline bool open( Index<TText, PizzaChili<TSpec> >& me, char const* filename );       	// "projects/library/seqan/index/index_pizzachili.h"(350)
+template <typename TObject, typename TShapeSpec, typename TSpec > inline bool open( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_qgram.h"(2367)
+template <typename TObject, typename TShapeSpec, typename TSpec > inline bool open( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, const char *fileName);       	// "projects/library/seqan/index/index_qgram.h"(2383)
+template <typename TValue, typename TSpec > inline bool open(String<TValue, TSpec> &string, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_shims.h"(721)
+template <typename TValue, typename TSpec > inline bool open(String<TValue, TSpec> &string, const char *fileName);       	// "projects/library/seqan/index/index_shims.h"(729)
+template <typename THost, typename TSpec > inline bool open(Segment<THost, TSpec> &string, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_shims.h"(735)
+template <typename THost, typename TSpec > inline bool open(Segment<THost, TSpec> &string, const char *fileName);       	// "projects/library/seqan/index/index_shims.h"(743)
+template <typename TValue, typename TSpec, typename TSSSpec > inline bool open(StringSet<String<TValue, TSpec>, TSSSpec> &multi, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_shims.h"(752)
+template <typename TValue, typename TSpec, typename TSSSpec > inline bool open(StringSet<String<TValue, TSpec>, Owner<ConcatDirect<TSSSpec> > > &multi, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_shims.h"(776)
+template <typename TValue, typename TSpec, typename TSSSpec> inline bool open(StringSet<String<TValue, TSpec>, TSSSpec> &multi, const char *fileName);       	// "projects/library/seqan/index/index_shims.h"(796)
+template <typename TObject, typename TSpec > inline bool open( Index< TObject, IndexEsa<TSpec> > &index, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_esa_base.h"(380)
+template <typename TObject, typename TSpec > inline bool open( Index< TObject, IndexEsa<TSpec> > &index, const char *fileName);       	// "projects/library/seqan/index/index_esa_base.h"(399)
+template <typename TText, typename TSpec > inline bool open( Index< TText, IndexWotd<TSpec> > &index, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_wotd.h"(1947)
+template <typename TText, typename TSpec > inline bool open( Index< TText, IndexWotd<TSpec> > &index, const char *fileName);       	// "projects/library/seqan/index/index_wotd.h"(1962)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TRepeat > inline bool operator!= ( Iter<TRepeat, MaxRepeatOccurrences> const &itA, Iter<TRepeat, MaxRepeatOccurrences> const &itB);       	// "projects/library/seqan/index/index_esa_algs.h"(938)
+template <typename TSize> inline bool operator!=(VertexEsa<TSize> const &a, VertexEsa<TSize> const &b);       	// "projects/library/seqan/index/index_esa_base.h"(205)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TInput, typename TObject > inline bool operator<<(Pipe< TInput, Skew7 > &me, TObject &textIn);       	// "projects/library/seqan/index/index_skew7.h"(418)
+template <typename TInput, typename TTextInput_, typename TSuffixArrayInput_ > inline bool operator<<(Pipe< TInput, Kasai > &me, Bundle2< TTextInput_, TSuffixArrayInput_ > const &bundleIn);       	// "projects/library/seqan/index/index_lcp.h"(147)
+template <typename TInput, typename TTextInput_, typename TSuffixArrayInput_, typename TPair, typename TLimitsString > inline bool operator<<(Pipe< TInput, Multi<Kasai, TPair, TLimitsString> > &me, Bundle2< TTextInput_, TSuffixArrayInput_ > const &bundleIn);       	// "projects/library/seqan/index/index_lcp.h"(252)
+template <typename TInput, typename TObject > inline bool operator<<(Pipe< TInput, Skew3 > &me, TObject &textIn);       	// "projects/library/seqan/index/index_skew3.h"(299)
+template <typename TInput, typename TLcpInput_ > inline bool operator<<(Pipe< TInput, Childtab > &me, TLcpInput_ const &in);       	// "projects/library/seqan/index/index_childtab.h"(181)
+template <typename TValue> std::ostream& operator<<(std::ostream &out, const SkewDCStream<TValue> &s);       	// "projects/library/seqan/index/pipe_merger7.h"(91)
+template <typename TInput, typename TObject, typename TPair, typename TLimitsString > inline bool operator<<(Pipe< TInput, Multi<Skew7, TPair, TLimitsString> > &me, TObject &textIn);       	// "projects/library/seqan/index/index_skew7_multi.h"(418)
+template <typename TInput, typename TTextInput_, typename TSuffixArrayInput_ > inline bool operator<<(Pipe< TInput, Bwt > &me, Bundle2< TTextInput_, TSuffixArrayInput_ > const &bundleIn);       	// "projects/library/seqan/index/index_bwt.h"(127)
+template <typename TInput, typename TTextInput_, typename TSuffixArrayInput_, typename TPair, typename TLimitsString > inline bool operator<<(Pipe< TInput, Multi<Bwt, TPair, TLimitsString> > &me, Bundle2< TTextInput_, TSuffixArrayInput_ > const &bundleIn);       	// "projects/library/seqan/index/index_bwt.h"(243)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TRepeat > inline bool operator== ( Iter<TRepeat, MaxRepeatOccurrences> const &itA, Iter<TRepeat, MaxRepeatOccurrences> const &itB);       	// "projects/library/seqan/index/index_esa_algs.h"(927)
+template <typename TSize> inline bool operator==(VertexEsa<TSize> const &a, VertexEsa<TSize> const &b);       	// "projects/library/seqan/index/index_esa_base.h"(199)
+
+//____________________________________________________________________________
+// orderOccurrences
+
+template <typename TValue, typename TSpec> inline void orderOccurrences(String<TValue, TSpec> &occString);       	// "projects/library/seqan/index/index_shims.h"(545)
+
+//____________________________________________________________________________
+// parentEdgeFirstChar
+
+template <typename TIndex, class TSpec > inline typename Value<TIndex>::Type parentEdgeFirstChar(Iter< TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1751)
+
+//____________________________________________________________________________
+// parentEdgeLabel
+
+template <typename TIndex, class TSpec > inline typename Infix< typename Fibre<TIndex, FibreText>::Type const >::Type parentEdgeLabel(Iter< TIndex, VSTree< TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1730)
+template <typename TText, typename TSpec > inline typename Infix< typename Fibre<Index<TText, IndexWotd<WotdOriginal> >, EsaText>::Type const >::Type parentEdgeLabel(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_wotd.h"(539)
+
+//____________________________________________________________________________
+// parentEdgeLength
+
+template <typename TText, class TIndexSpec, class TSpec > inline typename Size< Index<TText, IndexEsa<TIndexSpec> > >::Type parentEdgeLength(Iter< Index<TText, IndexEsa<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(1711)
+template <typename TIndex, typename TSize > inline typename Size<TIndex>::Type parentEdgeLength(TIndex const &index, VertexWotdOriginal_<TSize> &vDesc);       	// "projects/library/seqan/index/index_wotd.h"(447)
+template <typename TIndex, typename TSize > inline typename Size<TIndex>::Type parentEdgeLength(TIndex const &index, VertexWotdModified_<TSize> &vDesc);       	// "projects/library/seqan/index/index_wotd.h"(470)
+template <typename TText, typename TIndexSpec, typename TSpec > inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type parentEdgeLength(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_wotd.h"(502)
+
+//____________________________________________________________________________
+// parentRepLength
+
+template <typename TIndex, typename TSpec > inline typename Size<TIndex>::Type parentRepLength(Iter< TIndex, VSTree<TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(543)
+template <typename TText, typename TIndexSpec, typename TSpec > inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type parentRepLength(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_wotd.h"(512)
+template <typename TText, typename TIndexSpec, typename TSpec > inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type parentRepLength(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_wotd.h"(521)
+
+//____________________________________________________________________________
+// position
+
+template <typename THaystack, typename TSpec> inline typename Position<Finder<THaystack, Swift<TSpec> > >::Type position(Finder<THaystack, Swift<TSpec> > const & finder);       	// "projects/library/seqan/index/find_swift.h"(1239)
+template <typename THaystack, typename TSpec> inline typename Position<Finder<THaystack, Swift<TSpec> > >::Type position(Finder<THaystack, Swift<TSpec> > & finder);       	// "projects/library/seqan/index/find_swift.h"(1247)
+template <typename TIndex, typename TSpec> inline typename SAValue<TIndex>::Type position(Pattern<TIndex, Swift<TSpec> > const & pattern);       	// "projects/library/seqan/index/find_swift.h"(1256)
+template <typename TIndex, typename TSpec> inline typename SAValue<TIndex>::Type position(Pattern<TIndex, Swift<Tag<SwiftSemiGlobal_<TSpec> > > > const & pattern);       	// "projects/library/seqan/index/find_swift.h"(1269)
+template <typename TIndex, typename TSpec> inline typename SAValue<TIndex>::Type position(Pattern<TIndex, Swift<TSpec> > & pattern);       	// "projects/library/seqan/index/find_swift.h"(1279)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type position(Finder< Index<TText, TSpec>, TSpecFinder > & me);       	// "projects/library/seqan/index/find_index.h"(271)
+template <typename TText, typename TSpec, typename TSpecFinder > inline typename Position< Finder< Index<TText, TSpec>, TSpecFinder > >::Type position(Finder< Index<TText, TSpec>, TSpecFinder > const & me);       	// "projects/library/seqan/index/find_index.h"(279)
+
+//____________________________________________________________________________
+// positionRange
+
+template <typename THaystack, typename TSpec> inline Pair<typename Position<Finder<THaystack, Swift<TSpec> > >::Type> positionRange(Finder<THaystack, Swift<TSpec> > const & finder);       	// "projects/library/seqan/index/find_swift.h"(1434)
+template <typename THaystack, typename TSpec> inline Pair<typename Position<Finder<THaystack, Swift<TSpec> > >::Type> positionRange(Finder<THaystack, Swift<TSpec> > & finder);       	// "projects/library/seqan/index/find_swift.h"(1451)
+template <typename TIndex, typename TSpec> inline Pair<typename SAValue<TIndex>::Type> positionRange(Pattern<TIndex, Swift<TSpec> > & pattern);       	// "projects/library/seqan/index/find_swift.h"(1460)
+
+//____________________________________________________________________________
+// positionRangeNoClip
+
+template <typename THaystack, typename TSpec> inline Pair<typename Position<Finder<THaystack, Swift<TSpec> > >::Type> positionRangeNoClip(Finder<THaystack, Swift<TSpec> > const & finder);       	// "projects/library/seqan/index/find_swift.h"(1399)
+template <typename THaystack, typename TSpec> inline Pair<typename Position<Finder<THaystack, Swift<TSpec> > >::Type> positionRangeNoClip(Finder<THaystack, Swift<TSpec> > & finder);       	// "projects/library/seqan/index/find_swift.h"(1409)
+
+//____________________________________________________________________________
+// prefix
+
+template <typename TValue, typename TSpec, typename TPos> inline typename Prefix<String<TValue, PizzaChili<TSpec> > >::Type prefix( String<TValue, PizzaChili<TSpec> > const& me, TPos end );       	// "projects/library/seqan/index/index_pizzachili_string.h"(762)
+template <typename TValue, typename TSpec, typename TPos> inline typename Prefix<String<TValue, PizzaChili<TSpec> > >::Type prefix( String<TValue, PizzaChili<TSpec> >& me, TPos end );       	// "projects/library/seqan/index/index_pizzachili_string.h"(772)
+
+//____________________________________________________________________________
+// qgramFilteringSensitivity
+
+template <typename TSensitivityMatrix, typename TShape, typename TPatternSize, typename TErrors, typename TThresh, typename TDistance, typename TErrorDist> void qgramFilteringSensitivity( TSensitivityMatrix & sensMat, TShape const & shape, TPatternSize patternLength, TErrors errors, TThresh maxThresh, TDistance const dist, ThreshExact const, TErrorDist const & logErrorDistribution);       	// "projects/library/seqan/index/shape_threshold.h"(1108)
+
+//____________________________________________________________________________
+// qgramThreshold
+
+template <typename TShape, typename TPatternLength, typename TErrors, typename TDistance> inline int qgramThreshold(TShape const & shape, TPatternLength patternLength, TErrors errors, TDistance const, ThreshQGramLemma const);       	// "projects/library/seqan/index/shape_threshold.h"(59)
+template <typename TShape, typename TPatternSize, typename TErrors, typename TDistance> int qgramThreshold(TShape const & shape, TPatternSize patternLength, TErrors errors, TDistance const, ThreshHeuristic const);       	// "projects/library/seqan/index/shape_threshold.h"(74)
+template <typename TShape, typename TPatternSize, typename TErrors, typename TDistance> int qgramThreshold(TShape const & shape, TPatternSize patternLength, TErrors errors, TDistance const dist, ThreshExact const);       	// "projects/library/seqan/index/shape_threshold.h"(1080)
+
+//____________________________________________________________________________
+// radixExtend
+
+template <typename TSortedArray, typename TUnsortedArray, typename TCountArray, typename TText > void radixExtend( TSortedArray &b, TUnsortedArray const &a, TText const &r, TCountArray &c, unsigned K);       	// "projects/library/seqan/index/radix.h"(132)
+
+//____________________________________________________________________________
+// radixExtendClip
+
+template <typename TSortedArray, typename TUnsortedArray, typename TCountArray, typename TText > void radixExtendClip( TSortedArray &b, TUnsortedArray const &a, TText const &r, TCountArray &c, unsigned K);       	// "projects/library/seqan/index/radix.h"(167)
+
+//____________________________________________________________________________
+// radixPass
+
+template <typename TSortedArray, typename TUnsortedArray, typename TCountArray, typename TText > void radixPass( TSortedArray &b, TUnsortedArray const &a, TText const &r, TCountArray &c, unsigned K);       	// "projects/library/seqan/index/radix.h"(53)
+template <typename TSortedArray, typename TUnsortedArray, typename TCountArray, typename TText, typename TShift > void radixPass( TSortedArray &b, TUnsortedArray const &a, TText const &r, TCountArray &c, unsigned K, TShift shift);       	// "projects/library/seqan/index/radix.h"(89)
+
+//____________________________________________________________________________
+// range
+
+template <typename TText, typename TSpec, typename TDesc > inline Pair<typename Size<Index<TText, TSpec> >::Type> range(Index<TText, TSpec> const &index, TDesc const &desc);       	// "projects/library/seqan/index/index_esa_stree.h"(835)
+template <typename TIndex, class TSpec > inline Pair<typename Size<TIndex>::Type> range(Iter< TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(845)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline Pair<typename Size< Index< TObject, IndexQGram<TShapeSpec, TSpec> > >::Type> range( Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2185)
+template <typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue > inline Pair<typename Size< Index< TObject, IndexQGram<TShapeSpec, TSpec> > >::Type> range( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, Shape< TValue, TShapeSpec2 > const &shape);       	// "projects/library/seqan/index/index_qgram.h"(2197)
+
+//____________________________________________________________________________
+// rawsaAt
+
+template <typename TPos, typename TIndex> inline typename Value<typename Fibre<TIndex const, FibreRawSA>::Type>::Type rawsaAt(TPos i, TIndex const &index);       	// "projects/library/seqan/index/index_base.h"(906)
+
+//____________________________________________________________________________
+// rawtextAt
+
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex, FibreRawText>::Type>::Type rawtextAt(TPos i, TIndex &index);       	// "projects/library/seqan/index/index_base.h"(862)
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex const, FibreRawText>::Type>::Type rawtextAt(TPos i, TIndex const &index);       	// "projects/library/seqan/index/index_base.h"(866)
+
+//____________________________________________________________________________
+// repLength
+
+template <typename TSTree, typename TSpec > inline typename Size<TSTree>::Type repLength(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_esa_algs.h"(626)
+template <typename TIndex, typename TSpec > inline typename Size<TIndex>::Type repLength(Iter< TIndex, VSTree<BottomUp<TSpec> > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(474)
+template <typename TIndex, typename TSize > inline typename Size<TIndex>::Type repLength(TIndex const &index, VertexEsa<TSize> const &vDesc);       	// "projects/library/seqan/index/index_esa_stree.h"(486)
+template <typename TIndex, typename TSpec > inline typename Size<TIndex>::Type repLength(Iter< TIndex, VSTree<TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(502)
+template <typename TText, typename TIndexSpec, typename TSpec > inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type repLength(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > const &it);       	// "projects/library/seqan/index/index_wotd.h"(530)
+
+//____________________________________________________________________________
+// representative
+
+template <typename TIndex, class TSpec > inline typename Infix< typename Fibre<TIndex, FibreText>::Type const >::Type representative(Iter< TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(997)
+
+//____________________________________________________________________________
+// requestBucket
+
+template <typename THashValue > inline THashValue requestBucket(Nothing &, THashValue hash);       	// "projects/library/seqan/index/index_qgram.h"(852)
+template <typename THashValue, typename THashValue2 > inline THashValue requestBucket(BucketMap<THashValue> &bucketMap, THashValue2 hash);       	// "projects/library/seqan/index/index_qgram_openaddressing.h"(188)
+
+//____________________________________________________________________________
+// resize
+
+template <typename TValue, typename TSize> inline typename Size< Shape<TValue, SimpleShape> >::Type resize(Shape<TValue, SimpleShape> & me, TSize new_length);       	// "projects/library/seqan/index/shape_base.h"(290)
+
+//____________________________________________________________________________
+// resizeVertexMap
+
+template <typename TText, typename TSpec, typename TPropertyMap > inline void resizeVertexMap( Index<TText, TSpec> const& index, TPropertyMap & pm);       	// "projects/library/seqan/index/index_esa_stree.h"(737)
+template <typename TText, typename TIndexSpec, typename TPropertyMap > inline void resizeVertexMap( Index<TText, IndexWotd<TIndexSpec> > const& index, TPropertyMap & pm);       	// "projects/library/seqan/index/index_wotd.h"(359)
+
+//____________________________________________________________________________
+// reverse
+
+template <typename TValue> inline void reverse(Shape<TValue, OneGappedShape> &me);       	// "projects/library/seqan/index/shape_onegapped.h"(364)
+template <typename TValue, typename TSpec> inline void reverse(Shape<TValue, TSpec> &);       	// "projects/library/seqan/index/shape_base.h"(745)
+template <typename TValue, typename TSpec> inline void reverse(Shape<TValue, GappedShape<TSpec> > &me);       	// "projects/library/seqan/index/shape_gapped.h"(654)
+
+//____________________________________________________________________________
+// saAt
+
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex, FibreSA>::Type>::Type saAt(TPos i, TIndex &index);       	// "projects/library/seqan/index/index_base.h"(884)
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex const, FibreSA>::Type>::Type saAt(TPos i, TIndex const &index);       	// "projects/library/seqan/index/index_base.h"(888)
+
+//____________________________________________________________________________
+// save
+
+template <typename TText, typename TSpec> inline bool save( Index<TText, PizzaChili<TSpec> >& me, char const* filename );       	// "projects/library/seqan/index/index_pizzachili.h"(368)
+template <typename TObject, typename TShapeSpec, typename TSpec > inline bool save( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_qgram.h"(2396)
+template <typename TObject, typename TShapeSpec, typename TSpec > inline bool save( Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, const char *fileName);       	// "projects/library/seqan/index/index_qgram.h"(2410)
+template <typename TValue, typename TSpec > inline bool save(String<TValue, TSpec> const &string, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_shims.h"(806)
+template <typename TValue, typename TSpec > inline bool save(String<TValue, TSpec> &string, const char *fileName);       	// "projects/library/seqan/index/index_shims.h"(816)
+template <typename THost, typename TSpec > inline bool save(Segment<THost, TSpec> const &string, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_shims.h"(822)
+template <typename THost, typename TSpec > inline bool save(Segment<THost, TSpec> const &string, const char *fileName);       	// "projects/library/seqan/index/index_shims.h"(831)
+template <typename TValue, typename TSpec, typename TSSSpec> inline bool save(StringSet<String<TValue, TSpec>, TSSSpec> const &multi, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_shims.h"(837)
+template <typename TValue, typename TSpec, typename TSSSpec > inline bool save(StringSet<String<TValue, TSpec>, Owner<ConcatDirect<TSSSpec> > > &multi, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_shims.h"(853)
+template <typename TValue, typename TSpec, typename TSSSpec> inline bool save(StringSet<String<TValue, TSpec>, TSSSpec> const &multi, const char *fileName);       	// "projects/library/seqan/index/index_shims.h"(865)
+template <typename TObject, typename TSpec > inline bool save( Index< TObject, IndexEsa<TSpec> > &index, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_esa_base.h"(412)
+template <typename TObject, typename TSpec > inline bool save( Index< TObject, IndexEsa<TSpec> > &index, const char *fileName);       	// "projects/library/seqan/index/index_esa_base.h"(428)
+template <typename TText, typename TSpec > inline bool save( Index< TText, IndexWotd<TSpec> > &index, const char *fileName, int openMode);       	// "projects/library/seqan/index/index_wotd.h"(1975)
+template <typename TText, typename TSpec > inline bool save( Index< TText, IndexWotd<TSpec> > &index, const char *fileName);       	// "projects/library/seqan/index/index_wotd.h"(1989)
+
+//____________________________________________________________________________
+// sequenceLength
+
+template <typename TSeqNo, typename TText, typename TSpec> inline typename Size<Index<TText, TSpec> >::Type sequenceLength(TSeqNo seqNo, Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(785)
+
+//____________________________________________________________________________
+// setContainer
+
+template <typename TText, typename TSpec, typename TSpecFinder > inline void setContainer( Finder< Index<TText, TSpec>, TSpecFinder > & me, typename Parameter_<Index<TText, TSpec> >::Type );       	// "projects/library/seqan/index/find_index.h"(146)
+
+//____________________________________________________________________________
+// setHost
+
+template <typename TNeedle, typename TNeedle2> inline void setHost (Pattern<TNeedle, Quasar> & me, TNeedle2 const& needle);       	// "projects/library/seqan/index/find_quasar.h"(106)
+template <typename TNeedle, typename TNeedle2> inline void setHost (Pattern<TNeedle, Quasar> & me, TNeedle2 & needle);       	// "projects/library/seqan/index/find_quasar.h"(114)
+template <typename TText, typename TSpec, typename TSpecFinder > inline void setHost( Finder< Index<TText, TSpec>, TSpecFinder > & me, typename Parameter_<Index<TText, TSpec> >::Type );       	// "projects/library/seqan/index/find_index.h"(136)
+
+//____________________________________________________________________________
+// setIndexText
+
+template <typename TText, typename TSpec, typename TOtherText> inline void setIndexText(Index<TText, PizzaChili<TSpec> >& me, TOtherText& text);       	// "projects/library/seqan/index/index_pizzachili.h"(319)
+
+//____________________________________________________________________________
+// setMinThreshold
+
+template <typename TIndex, typename TSpec, typename TSeqNo, typename TThreshold> inline void setMinThreshold(Pattern<TIndex, Swift<TSpec> > & pattern, TSeqNo seqNo, TThreshold thresh);       	// "projects/library/seqan/index/find_swift.h"(514)
+
+//____________________________________________________________________________
+// setStepSize
+
+template <typename TText, typename TShapeSpec, typename TSpec, typename TSize> inline void setStepSize(Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, TSize stepSize);       	// "projects/library/seqan/index/index_qgram.h"(527)
+
+//____________________________________________________________________________
+// shapeToString
+
+template <typename TShapeString, typename TValue> inline void shapeToString( TShapeString &bitmap, Shape<TValue, OneGappedShape> const &me);       	// "projects/library/seqan/index/shape_onegapped.h"(349)
+template <typename TShapeString, typename TValue, unsigned q> inline void shapeToString( TShapeString &bitmap, Shape<TValue, UngappedShape<q> > const &me);       	// "projects/library/seqan/index/shape_base.h"(731)
+template <typename TShapeString, typename TValue, typename TSpec> inline void shapeToString( TShapeString &bitmap, Shape<TValue, GappedShape<TSpec> > const &me);       	// "projects/library/seqan/index/shape_gapped.h"(634)
+
+//____________________________________________________________________________
+// sizeofLcpe
+
+template <typename TSize > inline TSize sizeofLcpe(TSize n);       	// "projects/library/seqan/index/index_lcp_tree.h"(119)
+template <class LCPFwdIt, typename TSize > inline void sizeofLcpe(LCPFwdIt First_, LCPFwdIt _Last, TSize &Size_);       	// "projects/library/seqan/index/index_lcp_tree.h"(138)
+
+//____________________________________________________________________________
+// sizeofLcph
+
+template <typename TSize > inline TSize sizeofLcph(TSize n);       	// "projects/library/seqan/index/index_lcp_tree.h"(130)
+template <class LCPFwdIt, typename TSize > inline void sizeofLcph(LCPFwdIt First_, LCPFwdIt _Last, TSize &Size_);       	// "projects/library/seqan/index/index_lcp_tree.h"(146)
+
+//____________________________________________________________________________
+// sizeofSABTree
+
+template <typename TSize > inline TSize sizeofSABTree(TSize n, unsigned BlockSize);       	// "projects/library/seqan/index/index_sa_btree.h"(93)
+template <class SAFwdIt, typename TSize > inline void sizeofSABTree(SAFwdIt First_, SAFwdIt _Last, TSize &Size_, unsigned BlockSize);       	// "projects/library/seqan/index/index_sa_btree.h"(104)
+
+//____________________________________________________________________________
+// stringSetLimits
+
+template <typename TText, typename TSpec> inline typename StringSetLimits<TText const>::Type stringSetLimits(Index<TText, TSpec> &);       	// "projects/library/seqan/index/index_base.h"(1033)
+template <typename TText, typename TSpec> inline typename StringSetLimits<TText const>::Type stringSetLimits(Index<TText, TSpec> const &);       	// "projects/library/seqan/index/index_base.h"(1039)
+template <typename TString, typename TSSetSpec, typename TSpec> inline typename StringSetLimits< StringSet<TString, TSSetSpec> const >::Type & stringSetLimits(Index<StringSet<TString, TSSetSpec>, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(1045)
+template <typename TString, typename TSSetSpec, typename TSpec> inline typename StringSetLimits< StringSet<TString, TSSetSpec> const >::Type & stringSetLimits(Index<StringSet<TString, TSSetSpec>, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(1051)
+
+//____________________________________________________________________________
+// stringToShape
+
+template <typename TValue, typename TShapeString> inline bool stringToShape( Shape<TValue, OneGappedShape> &me, TShapeString const &bitmap);       	// "projects/library/seqan/index/shape_onegapped.h"(311)
+template <typename TValue, typename TShapeString> inline bool stringToShape( Shape<TValue, SimpleShape> &me, TShapeString const &bitmap);       	// "projects/library/seqan/index/shape_base.h"(694)
+template <typename TValue, typename TSpec, typename TShapeString> inline bool stringToShape( Shape<TValue, GappedShape<TSpec> > &me, TShapeString const &bitmap);       	// "projects/library/seqan/index/shape_gapped.h"(581)
+
+//____________________________________________________________________________
+// suffix
+
+template <typename TValue, typename TSpec, typename TPos> inline typename Suffix<String<TValue, PizzaChili<TSpec> > >::Type suffix( String<TValue, PizzaChili<TSpec> > const& me, TPos begin );       	// "projects/library/seqan/index/index_pizzachili_string.h"(784)
+template <typename TValue, typename TSpec, typename TPos> inline typename Suffix<String<TValue, PizzaChili<TSpec> > >::Type suffix( String<TValue, PizzaChili<TSpec> >& me, TPos begin );       	// "projects/library/seqan/index/index_pizzachili_string.h"(794)
+
+//____________________________________________________________________________
+// suffixLength
+
+template <typename TPos, typename TText, typename TSpec> inline typename Size<Index<TText, TSpec> >::Type suffixLength(TPos pos, Index<TText, TSpec> const &index);       	// "projects/library/seqan/index/index_base.h"(793)
+
+//____________________________________________________________________________
+// swiftInfix
+
+template <typename TSwiftHit, typename TText> inline typename Infix<TText>::Type swiftInfix(TSwiftHit const &hit, TText &text);       	// "projects/library/seqan/index/find_swift.h"(1476)
+
+//____________________________________________________________________________
+// swiftInfixNoClip
+
+template <typename TSwiftHit, typename TText> inline typename Infix<TText>::Type swiftInfixNoClip(TSwiftHit const &hit, TText &text);       	// "projects/library/seqan/index/find_swift.h"(1469)
+
+//____________________________________________________________________________
+// textAt
+
+template <typename TPos, typename TIndex> inline typename Reference<typename Fibre<TIndex, FibreRawText>::Type>::Type textAt(TPos i, TIndex &index);       	// "projects/library/seqan/index/index_base.h"(813)
+template <typename TPos, typename TString, typename TSSetSpec, typename TSpec> inline typename Reference<typename Fibre< Index< StringSet<TString, TSSetSpec>, TSpec>, FibreRawText>::Type>::Type textAt(TPos i, Index< StringSet<TString, TSSetSpec>, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(818)
+template <typename TPos, typename TString, typename TSpec> inline typename Reference<typename Fibre< Index< StringSet<TString, Owner<Default> >, TSpec>, FibreRawText>::Type>::Type textAt(TPos i, Index< StringSet<TString, Owner<Default> >, TSpec> &index);       	// "projects/library/seqan/index/index_base.h"(823)
+
+//____________________________________________________________________________
+// treeLevelsSAB
+
+template <typename TSize > inline unsigned treeLevelsSAB(TSize saSize, unsigned BlockSize);       	// "projects/library/seqan/index/index_sa_btree.h"(117)
+
+//____________________________________________________________________________
+// unhash
+
+template <typename TString, typename THash> inline void unhash(TString &result, THash hash, unsigned q);       	// "projects/library/seqan/index/shape_base.h"(660)
+
+//____________________________________________________________________________
+// upperBoundLcpe
+
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline typename Position<TLCPE>::Type upperBoundLcpe( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(1725)
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline typename Position<TLCPE>::Type upperBoundLcpe( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(1827)
+
+//____________________________________________________________________________
+// upperBoundLcpeIterator
+
+template <typename TText, typename TSA, typename TLCPE, typename TQuery > inline typename Iterator<TSA, Standard>::Type upperBoundLcpeIterator( TText const &text, TSA const &sa, TLCPE const &lcpe, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(1776)
+
+//____________________________________________________________________________
+// upperBoundSA
+
+template <typename TText, typename TSA, typename TQuery, typename TFlatTreeSpec > inline typename Position<TSA>::Type upperBoundSA( TText const &text, TSA const &sa, TQuery const &query, TFlatTreeSpec const);       	// "projects/library/seqan/index/find_index_esa.h"(978)
+template <typename TText, typename TSA, typename TQuery > inline typename Position<TSA>::Type upperBoundSA( TText const &text, TSA const &sa, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(992)
+template <typename TText, typename TSA, typename TQuery, typename TFlatTreeSpec > inline typename Position<TSA>::Type upperBoundSA( TText const &text, TSA const &sa, TQuery *query, TFlatTreeSpec const);       	// "projects/library/seqan/index/find_index_esa.h"(1075)
+template <typename TText, typename TSA, typename TQuery > inline typename Position<TSA>::Type upperBoundSA( TText const &text, TSA const &sa, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(1089)
+
+//____________________________________________________________________________
+// upperBoundSAIterator
+
+template <typename TText, typename TSA, typename TQuery > inline typename Iterator<TSA const, Standard>::Type upperBoundSAIterator( TText const &text, TSA const &sa, TQuery const &query);       	// "projects/library/seqan/index/find_index_esa.h"(855)
+template <typename TText, typename TSA, typename TQuery > inline typename Iterator<TSA const, Standard>::Type upperBoundSAIterator( TText const &text, TSA const &sa, TQuery *query);       	// "projects/library/seqan/index/find_index_esa.h"(914)
+
+//____________________________________________________________________________
+// value
+
+template <typename TSTree, typename TSpec > inline typename VertexDescriptor<TSTree>::Type value(Iter< TSTree, VSTree< BottomUp<MaxRepeats_<TSpec> > > > const &it);       	// "projects/library/seqan/index/index_esa_algs.h"(615)
+template <typename TRepeat > inline typename Value< Iter<TRepeat, MaxRepeatOccurrences> >::Type & value(Iter<TRepeat, MaxRepeatOccurrences> const &it);       	// "projects/library/seqan/index/index_esa_algs.h"(867)
+template <typename TRepeat > inline typename Value< Iter<TRepeat, MaxRepeatOccurrences> >::Type & value(Iter<TRepeat, MaxRepeatOccurrences> &it);       	// "projects/library/seqan/index/index_esa_algs.h"(873)
+template <typename TIndex, class TSpec > inline typename VertexDescriptor<TIndex>::Type & value(Iter< TIndex, VSTree<TSpec> > &it);       	// "projects/library/seqan/index/index_esa_stree.h"(710)
+template <typename TIndex, class TSpec > inline typename VertexDescriptor<TIndex>::Type const & value(Iter< TIndex, VSTree<TSpec> > const &it);       	// "projects/library/seqan/index/index_esa_stree.h"(716)
+template <typename TValue, typename TSpec> inline typename Value< Shape<TValue, TSpec> >::Type value(Shape<TValue, TSpec> &me);       	// "projects/library/seqan/index/shape_base.h"(241)
+template <typename TValue, typename TSpec> inline typename Value< Shape<TValue, TSpec> >::Type value(Shape<TValue, TSpec> const &me);       	// "projects/library/seqan/index/shape_base.h"(248)
+template <typename TRepeat > inline typename Value< Iter<TRepeat, MultiMemOccurences> >::Type & value(Iter<TRepeat, MultiMemOccurences> const &it);       	// "projects/library/seqan/index/index_esa_algs_multi.h"(659)
+template <typename TRepeat > inline typename Value< Iter<TRepeat, MultiMemOccurences> >::Type & value(Iter<TRepeat, MultiMemOccurences> &it);       	// "projects/library/seqan/index/index_esa_algs_multi.h"(665)
+
+//____________________________________________________________________________
+// weight
+
+template <typename TValue> inline typename Size< Shape<TValue, OneGappedShape> >::Type weight(Shape<TValue, OneGappedShape> const & me);       	// "projects/library/seqan/index/shape_onegapped.h"(161)
+template <typename TValue, typename TSpec> inline typename Size< Shape<TValue, TSpec> >::Type weight(Shape<TValue, TSpec> const &me);       	// "projects/library/seqan/index/shape_base.h"(279)
+template <typename TValue, typename TSpec> inline typename Size< Shape<TValue, GappedShape<TSpec> > >::Type weight(Shape<TValue, GappedShape<TSpec> > const & me);       	// "projects/library/seqan/index/shape_gapped.h"(383)
+
+//____________________________________________________________________________
+// windowFindBegin
+
+template <typename THaystack, typename TIndex, typename TSpec> inline bool windowFindBegin( Finder<THaystack, Swift<TSpec> > &finder, Pattern<TIndex, Swift<TSpec> > &pattern, double errorRate);       	// "projects/library/seqan/index/find_swift.h"(1835)
+
+//____________________________________________________________________________
+// windowFindEnd
+
+template <typename THaystack, typename TIndex, typename TSpec> inline void windowFindEnd( Finder<THaystack, Swift<TSpec> > & finder, Pattern<TIndex, Swift<TSpec> > &pattern);       	// "projects/library/seqan/index/find_swift.h"(1929)
+
+//____________________________________________________________________________
+// windowFindNext
+
+template <typename THaystack, typename TIndex, typename TSpec, typename TSize> inline bool windowFindNext( Finder<THaystack, Swift<TSpec> > &finder, Pattern<TIndex, Swift<TSpec> > &pattern, TSize finderWindowLength );       	// "projects/library/seqan/index/find_swift.h"(1874)
+
+//____________________________________________________________________________
+// write
+
+template <typename TFile, typename TText, typename TESASpec> void write(TFile & file, Index<TText, IndexEsa<TESASpec> > & stree, DotDrawing);       	// "projects/library/seqan/index/index_esa_drawing.h"(45)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/index/index_lcp.h b/src/SeqAn-1.3/seqan/index/index_lcp.h
new file mode 100644
index 0000000..5e33f4c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_lcp.h
@@ -0,0 +1,531 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_LCP_H
+#define SEQAN_HEADER_INDEX_LCP_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+	
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	struct Kasai {};
+	struct KasaiOriginal {};	// original, but more space-consuming algorithm
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // external LCP algorithm (modified Kasai et al. for pipelining)
+    //////////////////////////////////////////////////////////////////////////////
+
+
+    template < typename TTextInput, typename TSuffixArrayInput >
+    struct Value< Pipe< Bundle2< TTextInput, TSuffixArrayInput >, Kasai > > {
+        typedef typename Size<TTextInput>::Type Type;
+    };
+
+	template <typename InType, typename Result = typename InType::T2::T>
+	struct _mapInverse : public std::unary_function<InType,Result> {
+        inline Result operator()(const InType& x) const
+        { return x.i2[0]; }
+    };
+
+	//////////////////////////////////////////////////////////////////////////////
+    // lcp class
+    template < typename TTextInput, typename TSuffixArrayInput >
+    struct Pipe< Bundle2< TTextInput, TSuffixArrayInput >, Kasai >
+    {
+        // *** SPECIALIZATION ***
+
+        typedef Pipe< TSuffixArrayInput, Echoer<2,false> > TEchoer;
+                                        typedef _mapInverse<TypeOf_(TEchoer)> map_inverse_t;
+		                                typedef typename Size<TTextInput>::Type	TSize;
+		typedef Pool< TypeOf_(TEchoer), MapperSpec< MapperConfigSize< map_inverse_t, TSize> > > TInverter;
+		                                typedef Pair<TSize> TCoreType;
+		typedef Pool< TCoreType, MapperSpec< MapperConfigSize< filterI1<TCoreType>, TSize > > > TLinearMapper;
+        typedef Pipe< TLinearMapper, Filter< filterI2<TCoreType> > > TFilter;
+
+		TTextInput				*textIn;
+        TSuffixArrayInput		*suffixArrayIn;
+        TLinearMapper           mapper;
+		TFilter					in;
+        const LcpConfig			conf;
+        
+        Pipe():
+            in(mapper) {}
+
+        Pipe(const LcpConfig &_conf):
+            in(mapper),
+			conf(_conf) {}
+
+        Pipe(Bundle2< TTextInput, TSuffixArrayInput > const &_bundleIn):
+            textIn(&_bundleIn.in1),
+			suffixArrayIn(&_bundleIn.in2),
+            in(mapper)
+		{
+			process();
+		}
+
+        Pipe(Bundle2< TTextInput, TSuffixArrayInput > const &_bundleIn, LcpConfig const &_conf):
+            textIn(&_bundleIn.in1),
+			suffixArrayIn(&_bundleIn.in2),
+            in(mapper),
+			conf(_conf)
+		{
+			process();
+		}
+        
+        inline void process() {
+            process(*textIn, *suffixArrayIn);
+        }
+
+		template < typename TTextInput_, typename TSuffixArrayInput_ >
+        bool process(TTextInput_ &textIn, TSuffixArrayInput_ &suffixArrayIn) {
+
+            // *** INSTANTIATION ***
+			
+			TEchoer						echoer(suffixArrayIn);
+			TInverter					inverter(echoer);
+
+            #ifdef SEQAN_DEBUG_INDEX
+                std::cerr << "--- CREATE LCP TABLE ---" << std::endl;
+                std::cerr << "Start Kasai [pipelining]" << std::endl;
+                std::cerr << "  invert suffix array" << std::endl;
+            #endif
+			inverter << echoer;
+			SEQAN_PROMARK("Suffix-Array invertiert");
+
+			_lcpProcess(textIn, inverter, mapper);
+            return true;
+        }
+
+        inline typename Value<Pipe>::Type const operator*() const {
+            return *in;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }
+	};
+
+    // not sure which interface is more intuitive, we support both
+    // you can call "skew << pipe" or "skew_t skew(pipe); skew.process()"
+    // for the first we would need no _in member
+	template < typename TInput, typename TTextInput_, typename TSuffixArrayInput_ >
+    inline bool operator<<(Pipe< TInput, Kasai > &me, Bundle2< TTextInput_, TSuffixArrayInput_ > const &bundleIn) {
+ 	    return me.process(bundleIn.in1, bundleIn.in2);
+    }
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // external LCP algorithm (optimized for multiple sequences)
+    //////////////////////////////////////////////////////////////////////////////
+
+
+    template < typename TTextInput, typename TSuffixArrayInput, typename TPair, typename TLimitsString >
+    struct Value< Pipe< Bundle2< TTextInput, TSuffixArrayInput >, Multi<Kasai, TPair, TLimitsString> > > {
+        typedef typename Size<TTextInput>::Type Type;
+    };
+
+	template <typename InType, typename TLimitsString, typename Result = typename Value<TLimitsString>::Type>
+	struct _mapInverseMulti : public std::unary_function<InType,Result> {
+		TLimitsString const &limits;
+		_mapInverseMulti(TLimitsString const &_limits) : limits(_limits) {}
+        inline Result operator()(const InType& x) const
+        {
+			return posGlobalize(x.i2[0], limits);
+		}
+    };
+
+    //////////////////////////////////////////////////////////////////////////////
+    // lcp class
+    template < typename TTextInput, typename TSuffixArrayInput, typename TPair, typename TLimitsString >
+    struct Pipe< Bundle2< TTextInput, TSuffixArrayInput >, Multi<Kasai, TPair, TLimitsString> >
+    {
+        // *** SPECIALIZATION ***
+
+        typedef Pipe< TSuffixArrayInput, Echoer<2,false> > TEchoer;
+                                        typedef _mapInverseMulti<TypeOf_(TEchoer), TLimitsString, TSizeOf_(TEchoer)> map_inverse_t;
+		                                typedef typename Size<TTextInput>::Type	TSize;
+		typedef Pool< TypeOf_(TEchoer), MapperSpec< MapperConfigSize< map_inverse_t, TSize> > > TInverter;
+		                                typedef Pair<TSize> TCoreType;
+		typedef Pool< TCoreType, MapperSpec< MapperConfigSize< filterI1<TCoreType>, TSize > > > TLinearMapper;
+        typedef Pipe< TLinearMapper, Filter< filterI2<TCoreType> > > TFilter;
+
+        TLinearMapper           mapper;
+		TFilter					in;
+		TLimitsString const		&limits;
+        const LcpConfig			conf;
+        
+        Pipe(TLimitsString const &_limits):
+            in(mapper),
+			limits(_limits)	{}
+
+        Pipe(TLimitsString const &_limits, LcpConfig const &_conf):
+            in(mapper),
+			limits(_limits),
+			conf(_conf) {}
+
+        Pipe(Bundle2< TTextInput, TSuffixArrayInput > const &_bundleIn, TLimitsString const &_limits):
+            in(mapper),
+			limits(_limits)
+		{
+			process(_bundleIn.in1, _bundleIn.in2);
+		}
+
+        Pipe(Bundle2< TTextInput, TSuffixArrayInput > const &_bundleIn, TLimitsString const &_limits, LcpConfig const &_conf):
+            in(mapper),
+			limits(_limits),
+			conf(_conf)
+		{
+			process(_bundleIn.in1, _bundleIn.in2);
+		}
+        
+		template < typename TTextInput_, typename TSuffixArrayInput_ >
+        bool process(TTextInput_ &textIn, TSuffixArrayInput_ &suffixArrayIn) {
+
+            // *** INSTANTIATION ***
+			
+			TEchoer						echoer(suffixArrayIn);
+			map_inverse_t				_mapInverse(limits);
+			TInverter					inverter(echoer, _mapInverse);
+
+            #ifdef SEQAN_DEBUG_INDEX
+                std::cerr << "--- CREATE LCP TABLE ---" << std::endl;
+                std::cerr << "Start Kasai [pipelining,stringset]" << std::endl;
+                std::cerr << "  invert suffix array" << std::endl;
+            #endif
+			inverter << echoer;
+			SEQAN_PROMARK("Suffix-Array invertiert");
+
+			_lcpProcessMulti(textIn, limits, inverter, mapper);
+            return true;
+        }
+
+        inline typename Value<Pipe>::Type const operator*() const {
+            return *in;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }
+	};
+
+    // not sure which interface is more intuitive, we support both
+    // you can call "skew << pipe" or "skew_t skew(pipe); skew.process()"
+    // for the first we would need no _in member
+	template < typename TInput, typename TTextInput_, typename TSuffixArrayInput_, typename TPair, typename TLimitsString >
+    inline bool operator<<(Pipe< TInput, Multi<Kasai, TPair, TLimitsString> > &me, Bundle2< TTextInput_, TSuffixArrayInput_ > const &bundleIn) {
+ 	    return me.process(bundleIn.in1, bundleIn.in2);
+    }
+
+	
+	
+	//////////////////////////////////////////////////////////////////////////////
+    // internal Kasai algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+	template < 
+        typename TLCP,
+		typename TText,
+		typename TSA >
+    struct LcpCreatorRandomAccess_<TLCP, TText, TSA, Kasai>
+    {
+        typedef typename AllowsFastRandomAccess<TLCP>::Type  TRandomLCP;
+        typedef typename AllowsFastRandomAccess<TSA>::Type   TRandomSA;
+        typedef typename And<TRandomLCP, TRandomSA>::Type Type;
+    };
+
+
+    template < typename TLCPTable,
+               typename TText,
+               typename TSA >
+    void _createLCPTableRandomAccess(
+		TLCPTable &LCP,
+		TText const &s,
+		TSA const &SA,
+		KasaiOriginal const)
+	{
+		typedef typename Value<TSA>::Type TSize;
+
+		#ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "--- CREATE LCP TABLE ---" << std::endl;
+            std::cerr << "Start Kasai [random access]" << std::endl;
+			if (sizeof(TSize) > 4)
+				std::cerr << "WARNING: TSize size is greater 4 (Kasai)" << std::endl;
+        #endif
+
+		TSize n = length(s);
+        if (n < 2) return;
+
+        #ifdef SEQAN_DEBUG_INDEX
+            TSize lcpMax = 0, lcpAvrg = 0, lcpNumer = 0, sigma = 1;	// for lcpMax, lcpMean, |Sigma|
+        #endif
+
+        String<TSize, Alloc<> > ISA;
+		resize(ISA, n, Exact());
+
+		for(TSize i = 0; i < n; ++i)
+			ISA[SA[i]] = i;
+		
+		SEQAN_PROMARK("Suffix-Array invertiert");
+
+		typename Iterator<TText const>::Type Ibegin = begin(s);
+        typename Iterator<TText const>::Type I = Ibegin, J;
+        for(TSize i = 0, h = 0, j, isa; i < n; ++i) {
+			if ((isa = ISA[i])) {
+				J = Ibegin + h + (j = SA[isa - 1]);
+                for(TSize hMax = _min(n - i, n - j); h < hMax && *I == *J; ++I, ++J, ++h) ;
+				LCP[isa - 1] = h;
+                #ifdef SEQAN_DEBUG_INDEX
+                    if ((lcpNumer += h) > n) {
+                        lcpNumer -= n;
+                        ++lcpAvrg;
+                    }
+                    if (lcpMax < h) lcpMax = h;
+					if (!h) ++sigma;
+                #endif
+			}
+			if (h) --h;
+            else ++I;
+        }
+		LCP[n - 1] = 0;
+        #ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "  n: " << n;
+            std::cerr << "  lcpMax: " << lcpMax;
+            std::cerr << "  lcpAvrg: " << (TSize)(lcpAvrg + (lcpNumer + n/2) / n);
+            std::cerr << "  sigma: " << sigma << std::endl;
+        #endif
+	}
+
+	// HINT:
+	// In contrast to the upper functions 
+	// createLCPTableInPlace expects the lcp table to be of size n
+    template < typename TLCPTable,
+               typename TText,
+               typename TSA >
+    void _createLCPTableRandomAccess(
+		TLCPTable &LCP,
+		TText const &s,
+		TSA const &SA,
+		Kasai const)
+	{
+		typedef typename Value<TSA>::Type TSize;
+
+		#ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "--- CREATE LCP TABLE ---" << std::endl;
+            std::cerr << "Start Kasai [random access,inplace]" << std::endl;
+			if (sizeof(TSize) > 4)
+				std::cerr << "WARNING: TSize size is greater 4 (Kasai)" << std::endl;
+        #endif
+
+		TSize n = length(s);
+        if (n < 2) return;
+
+        #ifdef SEQAN_DEBUG_INDEX
+            TSize lcpMax = 0, lcpAvrg = 0, lcpNumer = 0, sigma = 1;	// for lcpMax, lcpMean, |Sigma|
+        #endif
+
+		TSize mark = ~(~0u>>1);
+		TSize mask =   ~0u>>1;
+
+		for(TSize i = 0; i < n; ++i)
+			LCP[SA[i]] = i;
+		
+		SEQAN_PROMARK("Suffix-Array invertiert");
+        #ifdef SEQAN_DEBUG_INDEX
+			std::cerr << "Suffix-Array invertiert" << std::endl;
+		#endif
+
+		typename Iterator<TText const>::Type Ibegin = begin(s);
+        typename Iterator<TText const>::Type I = Ibegin, J;
+        for(TSize i = 0, h = 0, j, isa; i < n; ++i) {
+			if ((isa = LCP[i] + 1) < n) {
+				J = Ibegin + h + (j = SA[isa]);
+                for(TSize hMax = _min(n - i, n - j); h < hMax && *I == *J; ++I, ++J, ++h) ;
+				LCP[i] = h | mark;
+                #ifdef SEQAN_DEBUG_INDEX
+                    if ((lcpNumer += h) > n) {
+                        lcpNumer -= n;
+                        ++lcpAvrg;
+                    }
+                    if (lcpMax < h) lcpMax = h;
+					if (!h) ++sigma;
+                #endif
+			}
+			if (h) --h;
+            else ++I;
+        }
+		LCP[SA[n - 1]] = mark;
+		SEQAN_PROMARK("permutierte LCP-Tabelle erzeugt");
+        #ifdef SEQAN_DEBUG_INDEX
+			std::cerr << "permutierte LCP-Tabelle erzeugt" << std::endl;
+		#endif
+        for(TSize i = 0, j, tmp; i < n; ++i)
+			if (LCP[i] & mark) {
+				j = i;
+				tmp = LCP[j];
+				while (SA[j] != i) {
+					LCP[j] = LCP[SA[j]] & mask;
+					j = SA[j];
+				}
+				LCP[j] = tmp & mask;
+			}
+        #ifdef SEQAN_DEBUG_INDEX
+			std::cerr << "LCP-Tabelle erzeugt" << std::endl;
+		#endif
+
+        #ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "  n: " << n;
+            std::cerr << "  lcpMax: " << lcpMax;
+            std::cerr << "  lcpAvrg: " << (TSize)(lcpAvrg + (lcpNumer + n/2) / n);
+            std::cerr << "  sigma: " << sigma << std::endl;
+        #endif
+	}
+
+
+	// Kasai in-place for multiple sequences
+    template < typename TLCPTable,
+			   typename TString,
+			   typename TSpec,
+               typename TSA >
+    void _createLCPTableRandomAccess(
+		TLCPTable &LCP,
+		StringSet<TString, TSpec> const &sset,
+		TSA const &SA,
+		Kasai const)
+	{
+		typedef typename Concatenator<StringSet<TString, TSpec> const>::Type	TText;
+		typedef typename StringSetLimits<StringSet<TString, TSpec> const>::Type	TLimitsString;
+		typedef typename Value<TSA>::Type										TPair;
+		typedef PairDecrementer_<TPair, TLimitsString>							TDecrementer;
+		typedef typename Value<TLCPTable>::Type									TSize;
+
+		#ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "--- CREATE LCP TABLE ---" << std::endl;
+            std::cerr << "Start Kasai [random access,inplace,stringset]" << std::endl;
+			if (sizeof(TSize) > 4)
+				std::cerr << "WARNING: TSize size is greater 4 (Kasai)" << std::endl;
+        #endif
+
+		TText &s = concat(sset);
+		TSize n = length(s);
+		
+        if (n < 2) return;
+
+        #ifdef SEQAN_DEBUG_INDEX
+            TSize lcpMax = 0, lcpAvrg = 0, lcpNumer = 0, sigma = 1;	// for lcpMax, lcpMean, |Sigma|
+        #endif
+
+		TSize mark = ~(~0u>>1);
+		TSize mask =   ~0u>>1;
+
+		TLimitsString const &limits = stringSetLimits(sset);
+		{
+			typename Iterator<TSA const>::Type itSA = begin(SA);
+			for(TSize i = 0; i < n; ++i, ++itSA)
+				LCP[posGlobalize(*itSA, limits)] = i;
+		}
+		
+		SEQAN_PROMARK("Suffix-Array invertiert");
+        #ifdef SEQAN_DEBUG_INDEX
+			std::cerr << "Suffix-Array invertiert" << std::endl;
+		#endif
+
+		typename Iterator<TText const>::Type Ibegin = begin(s);
+        typename Iterator<TText const>::Type I = Ibegin, J;
+
+		TDecrementer dec(limits);
+
+		for(TSize i = 0, h = 0, j, isa; i < n; ++i, --dec) {
+			if ((isa = LCP[i] + 1) < n) {
+				j = posGlobalize(SA[isa], limits);
+				J = Ibegin + h + j;
+
+                for(TSize hMax = _min(getValueI2((TPair)dec), n - j); h < hMax && *I == *J; ++I, ++J, ++h) ;
+				LCP[i] = h | mark;
+                #ifdef SEQAN_DEBUG_INDEX
+                    if ((lcpNumer += h) > n) {
+                        lcpNumer -= n;
+                        ++lcpAvrg;
+                    }
+                    if (lcpMax < h) lcpMax = h;
+					if (!h) ++sigma;
+                #endif
+			}
+			if (h) 
+				--h;
+			else 
+				++I;
+        }
+
+		LCP[posGlobalize(SA[n - 1], limits)] = mark;
+
+		SEQAN_PROMARK("permutierte LCP-Tabelle erzeugt");
+        #ifdef SEQAN_DEBUG_INDEX
+			std::cerr << "permutierte LCP-Tabelle erzeugt" << std::endl;
+		#endif
+        for(TSize sa_j, i = 0, j, tmp; i < n; ++i)
+			if (LCP[i] & mark) {
+				j = i;
+				tmp = LCP[j];
+				sa_j = posGlobalize(SA[j], limits);
+				while (sa_j != i) {
+					LCP[j] = LCP[sa_j] & mask;
+					j = sa_j;
+					sa_j = posGlobalize(SA[j], limits);
+				}
+				LCP[j] = tmp & mask;
+			}
+        #ifdef SEQAN_DEBUG_INDEX
+			std::cerr << "LCP-Tabelle erzeugt" << std::endl;
+		#endif
+
+        #ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "  n: " << n;
+            std::cerr << "  lcpMax: " << lcpMax;
+            std::cerr << "  lcpAvrg: " << (TSize)(lcpAvrg + (lcpNumer + n/2) / n);
+            std::cerr << "  sigma: " << sigma << std::endl;
+        #endif
+	}
+
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_lcp_tree.h b/src/SeqAn-1.3/seqan/index/index_lcp_tree.h
new file mode 100644
index 0000000..827dfbb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_lcp_tree.h
@@ -0,0 +1,178 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_LCP_TREE_H
+#define SEQAN_HEADER_INDEX_LCP_TREE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+	
+	template <
+		class LCPFwdIt,		// lcp table input iterator
+		class FlatOutIt >	// flat tree output iterator
+	inline FlatOutIt createLcpBinTree(
+		LCPFwdIt First_, LCPFwdIt _Last,
+		FlatOutIt Dest_)
+	{
+        typedef typename Value<LCPFwdIt>::Type  TValue;
+        typedef typename Size<LCPFwdIt>::Type   TSize;
+
+        TSize size = difference(First_, _Last);
+        if (size <= 1) return Dest_;
+		--size;
+
+        // calculate the depth of the lcp tree
+		unsigned treeLevels = 1;
+		TSize _xSize = 1;
+		for(; size > _xSize; _xSize *= 2, ++treeLevels) ;
+	
+		// get output iterators for every level in the flat tree
+		FlatOutIt *level = new FlatOutIt[treeLevels];
+		for(unsigned i = treeLevels - 1; _xSize; --i, _xSize /= 2) {
+			level[i] = Dest_;
+			goFurther(Dest_, (size + _xSize - 1) / _xSize);
+		}
+
+		// fields to keep track of minimum elements and state
+		TValue *minVal = new TValue[treeLevels];
+		bool *half = new bool[treeLevels];
+		for(unsigned i = 0; i < treeLevels; ++i)
+			half[i] = false;
+
+		// it works like a binary counter of half[n]...half[1]half[0]
+		for(TSize j = 0; j < size; ++j, ++First_) {
+			*(level[0]) = minVal[0] = *First_;
+			++(level[0]);
+			for(unsigned i = 1; i < treeLevels; ++i) {
+				if (half[i]) {
+					if (minVal[i-1] < minVal[i]) minVal[i] = minVal[i-1];
+					*(level[i]) = minVal[i];	// min[i] is the minimum of last 2 values in min[i-1]
+					++(level[i]);
+					half[i] = false;
+				} else {
+					minVal[i] = minVal[i-1];
+					half[i] = true;
+					break;
+				}
+			}
+		}
+
+		// complete half filled nodes
+		bool carry = false;
+		for(unsigned i = 1; i < treeLevels; ++i)
+			if (half[i] || carry) {
+				if (half[i]) {
+					if (minVal[i-1] < minVal[i]) minVal[i] = minVal[i-1];
+				} else
+					minVal[i] = minVal[i-1];
+				*(level[i]) = minVal[i];
+				++(level[i]);
+				carry = true;
+			}
+
+		// trailing zero
+		*Dest_ = 0;
+		++Dest_;
+
+		delete[] half;
+		delete[] minVal;
+		delete[] level;
+
+		return Dest_;
+    }
+
+
+
+	template < typename TSize >
+	inline TSize sizeofLcpe(TSize n)
+	{
+		if (n < 2) return n;	// 0 -> 0, 1 -> 1, 2 -> 2, 3 -> 4
+		--n;
+		TSize size = 2;
+		for(TSize _xSize = 1; _xSize < n; _xSize *= 2)
+			size += (n + _xSize - 1) / _xSize;
+		return size;
+	}
+
+	template < typename TSize >
+	inline TSize sizeofLcph(TSize n)
+	{
+		return sizeofLcpe(n);
+	}
+
+	template <
+		class LCPFwdIt,		// lcp table input iterator
+		typename TSize >
+	inline void sizeofLcpe(LCPFwdIt First_, LCPFwdIt _Last, TSize &Size_)
+	{
+		Size_ = sizeofLcpe(difference(First_, _Last));
+	}
+
+	template <
+		class LCPFwdIt,		// lcp table input iterator
+		typename TSize >
+	inline void sizeofLcph(LCPFwdIt First_, LCPFwdIt _Last, TSize &Size_)
+	{
+		sizeofLcpe(First_, _Last, Size_);
+		return;
+	}
+
+
+    template < typename TLCPE, typename TLCP >
+    inline void createLcpBinTree(TLCPE &lcp_enhanced, TLCP &lcp) {
+        createLcpBinTree(begin(lcp, Standard()), end(lcp, Standard()), begin(lcp_enhanced, Standard()));
+    }
+
+
+	template < typename TSize >
+    inline unsigned _treeLevels(TSize lcpSize)
+	{
+		unsigned treeLevels = 1;
+		--lcpSize;
+		TSize _xSize = 1;
+		for(; lcpSize > _xSize; _xSize *= 2, ++treeLevels) ;
+        return treeLevels;
+    }
+
+    template < typename TValue, typename TConfig, typename TLCP >
+    inline void createLcpBinTree(String<TValue, External<TConfig> > &lcp_enhanced, TLCP &lcp) {
+        unsigned writeHeads = _treeLevels(length(lcp)) + 1;   // plus 1 write back buffer
+        if (lcp_enhanced.cache.size() < writeHeads)
+            lcp_enhanced.resizeCache(writeHeads);
+        createLcpBinTree(begin(lcp, Standard()), end(lcp, Standard()), begin(lcp_enhanced));
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_manual_forwards.h b/src/SeqAn-1.3/seqan/index/index_manual_forwards.h
new file mode 100644
index 0000000..e953f87
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_manual_forwards.h
@@ -0,0 +1,69 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_MANUAL_FORWARDS_H 
+#define SEQAN_HEADER_INDEX_MANUAL_FORWARDS_H 
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+	struct FibreText_;		// Original text. Can be a String or a StringSet
+	struct FibreRawText_;	// Concatenation of the strings above
+	struct FibreSA_;		// suffix array (of raw text with virtual $-delimiters) with Pair entries
+	struct FibreRawSA_;	// suffix array with integer entries
+	struct FibreSae_;		// suffix array reordered in a b-tree
+	struct FibreLcp_;		// lcp table of raw text
+	struct FibreLcpe_;		// lcp interval tree
+	struct FibreChildtab_;	// childtab (Kurtz et al.) of raw text
+	struct FibreBwt_;		// burrows wheeler table of raw text
+
+	typedef Tag<FibreText_> const		FibreText;
+	typedef Tag<FibreRawText_> const	FibreRawText;
+	typedef Tag<FibreSA_> const		FibreSA;
+	typedef Tag<FibreRawSA_> const		FibreRawSA;
+	typedef Tag<FibreSae_> const		FibreSae;
+	typedef Tag<FibreLcp_> const		FibreLcp;
+	typedef Tag<FibreLcpe_> const		FibreLcpe;
+	typedef Tag<FibreChildtab_> const	FibreChildtab;
+	typedef Tag<FibreBwt_> const		FibreBwt;
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/index/index_pizzachili.h b/src/SeqAn-1.3/seqan/index/index_pizzachili.h
new file mode 100644
index 0000000..70d71a3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_pizzachili.h
@@ -0,0 +1,384 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Konrad Ludwig Moritz Rudolph <konrad.rudolph at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_PIZZACHILI_H
+#define SEQAN_HEADER_INDEX_PIZZACHILI_H
+
+#include <seqan/index/pizzachili_api.h>
+#include <seqan/index/index_pizzachili_string.h>
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+/**
+.Tag.Pizza & Chili Index Fibres
+..summary:Tag to select a specific fibre (e.g. table, object, ...) of a @Spec.Pizza & Chili Index@ index.
+..cat:Index
+..tag.PizzaChiliText:The original text the index is based on.
+..tag.PizzaChiliCompressed:The compressed suffix array.
+...remarks:Pizza & Chili indices are compressed indices. Hence, this fibre is used for searching in the index.
+..see:Metafunction.Fibre
+..see:Function.getFibre
+..see:Spec.Pizza & Chili Index
+..include:seqan/index.h
+*/
+
+struct FibrePizzaChiliCompressed_;
+
+typedef Tag<FibreText_> const FibrePizzaChiliText;
+typedef Tag<FibrePizzaChiliCompressed_> const FibrePizzaChiliCompressed;
+
+typedef FibrePizzaChiliText PizzaChiliText;
+typedef FibrePizzaChiliCompressed PizzaChiliCompressed;
+
+/**
+.Spec.Pizza & Chili Index:
+..summary:An adapter for the Pizza & Chili index API.
+..remarks:
+..cat:Index
+..general:Class.Index
+..signature:Index<TText, PizzaChili<TSpec> >
+..param.TText:The text type.
+...type:Class.String
+..param.TSpec:Tag specifying the Pizza & Chili index library to use.
+...type:Tag.Pizza & Chili Index Tags
+..see:Spec.Pizza & Chili String
+..see:Tag.Pizza & Chili Index Fibres
+..see:Tag.Index Find Algorithm
+..include:seqan/index.h
+*/
+
+template <typename TText, typename TSpec>
+class Index<TText, PizzaChili<TSpec> > {
+public:
+    typedef typename Value<TText>::Type TValue;
+    typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+
+    impl::index_t index_handle;
+    Holder<String<TValue, PizzaChili<TSpec> > > text;
+
+    Index() : index_handle(0), text() { }
+
+    Index(Index& other) : index_handle(0), text() {
+SEQAN_CHECKPOINT
+        // Explicitly request the other's index text.
+        setIndexText(*this, indexText(other));
+    }
+
+    Index(Index const& other) : index_handle(0), text() {
+SEQAN_CHECKPOINT
+        // Explicitly request the other's index text.
+        setIndexText(*this, indexText(other));
+    }
+
+    template <typename TOtherText>
+    Index(TOtherText& txt) : index_handle(0), text() {
+SEQAN_CHECKPOINT
+        setIndexText(*this, txt);
+    }
+
+    ~Index() {
+SEQAN_CHECKPOINT
+        clear(*this);
+    }
+
+    Index& operator =(Index const& other) {
+SEQAN_CHECKPOINT
+        if (this == &other)
+            return *this;
+
+        clear(*this);
+        setIndexText(*this, indexText(other));
+
+        return *this;
+    }
+
+private:
+    //Index(Index const& other);
+    //Index operator =(Index const& other);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TText, typename TSpec>
+struct Fibre<Index<TText, PizzaChili<TSpec> >, PizzaChiliText> {
+    typedef String<typename Value<TText>::Type, PizzaChili<TSpec> >& Type;
+};
+
+template <typename TText, typename TSpec>
+struct Fibre<Index<TText, PizzaChili<TSpec> > const, PizzaChiliText> {
+    typedef String<typename Value<TText>::Type, PizzaChili<TSpec> > const& Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace impl {
+    template <typename TText, typename TSpec>
+    inline void
+    clearIndex(Index<TText, PizzaChili<TSpec> >& me) {
+SEQAN_CHECKPOINT
+        typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+
+        if (me.index_handle != 0) {
+            impl::error_t e =
+                TCodeProvider::free_index(me.index_handle);
+
+            if (e != 0)
+                SEQAN_ABORT(TCodeProvider::error_index(e));
+
+            me.index_handle = 0;
+        }
+    }
+} // namespace impl
+
+template <typename TText, typename TSpec>
+inline void
+clear(Index<TText, PizzaChili<TSpec> >& me) {
+SEQAN_CHECKPOINT
+    impl::clearIndex(me);
+    clear(me.text);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace impl {
+
+    template <typename TText, typename TSpec>
+    inline char const*
+    getOptionsString(Index<TText, PizzaChili<TSpec> >& /*me*/) {
+SEQAN_CHECKPOINT
+        return "";
+    }
+
+    template <typename TText>
+    inline char const*
+    getOptionsString(Index<TText, PizzaChili<PizzaChiliSA> >& /*me*/) {
+SEQAN_CHECKPOINT
+        return "copy_text";
+    }
+
+    template <typename TText>
+    inline char const*
+    getOptionsString(Index<TText, PizzaChili<PizzaChiliFM> >& /*me*/) {
+SEQAN_CHECKPOINT
+        return "-a 0";
+    }
+
+    template <typename TText>
+    inline char const*
+    getOptionsString(Index<TText, PizzaChili<PizzaChiliRsa> >& /*me*/) {
+SEQAN_CHECKPOINT
+        return "copy_text";
+    }
+
+} // namespace impl
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TText, typename TSpec>
+inline typename Fibre<Index<TText, PizzaChili<TSpec> >, PizzaChiliText>::Type
+indexText(Index<TText, PizzaChili<TSpec> >& me) {
+SEQAN_CHECKPOINT
+    return getFibre(me, PizzaChiliText());
+}
+
+template <typename TText, typename TSpec>
+inline typename Fibre<Index<TText, PizzaChili<TSpec> > const, PizzaChiliText>::Type
+indexText(Index<TText, PizzaChili<TSpec> > const& me) {
+SEQAN_CHECKPOINT
+    return getFibre(me, PizzaChiliText());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TText, typename TSpec>
+inline typename Fibre<Index<TText, PizzaChili<TSpec> > const, PizzaChiliText>::Type
+getFibre(Index<TText, PizzaChili<TSpec> > const& me, PizzaChiliText const) {
+SEQAN_CHECKPOINT
+    return value(me.text);
+}
+
+template <typename TText, typename TSpec>
+inline typename Fibre<Index<TText, PizzaChili<TSpec> >, PizzaChiliText>::Type
+getFibre(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliText const) {
+SEQAN_CHECKPOINT
+    return value(me.text);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TText, typename TSpec>
+inline bool
+indexSupplied(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliCompressed const) {
+SEQAN_CHECKPOINT
+    return me.index_handle != 0;
+}
+
+template <typename TText, typename TSpec>
+inline bool
+indexSupplied(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliText const) {
+SEQAN_CHECKPOINT
+    return length(value(me.text)) > 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TText, typename TSpec>
+inline bool
+indexSolveDependencies(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliCompressed const) {
+SEQAN_CHECKPOINT
+    return indexSupplied(me, PizzaChiliText());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace impl {
+    template <typename TText, typename TSpec>
+    inline bool
+    createPizzaChiliIndex(
+        Index<TText, PizzaChili<TSpec> >& me,
+        uchar_t* textstart,
+        ulong_t textlength
+    ) {
+        typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+        // Read-only access, therefore safe cast.
+        char* options = const_cast<char*>(impl::getOptionsString(me));
+        impl::error_t e =
+            TCodeProvider::build_index(textstart, textlength, options, &me.index_handle);
+
+        if (e != 0) {
+            SEQAN_REPORT(TCodeProvider::error_index(e));
+            SEQAN_REPORT(options);
+            me.index_handle = 0;
+            return false;
+        }
+
+        value(me.text) = String<typename Value<TText>::Type, PizzaChili<TSpec> >(me.index_handle);
+
+        return true;
+    }
+} // namespace impl
+
+template <typename TText, typename TSpec>
+inline bool
+indexCreate(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliCompressed const) {
+SEQAN_CHECKPOINT
+    typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+    typedef
+        typename RemoveConst_<
+            typename Index<TText, PizzaChili<TSpec> >::TValue
+        >::Type alph_t;
+
+    SEQAN_ASSERT(sizeof (alph_t) == 1);
+    SEQAN_ASSERT((IsSameType<typename IsSimple<alph_t>::Type, True>::VALUE));
+
+    impl::clearIndex(me);
+
+    impl::uchar_t* textstart =
+        reinterpret_cast<impl::uchar_t*>(
+            const_cast<alph_t*>(indexText(me).data_begin)
+        );
+    impl::ulong_t textlength = length(indexText(me));
+    return impl::createPizzaChiliIndex(me, textstart, textlength);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TText, typename TSpec, typename TOtherText>
+inline void
+setIndexText(Index<TText, PizzaChili<TSpec> >& me, TOtherText& text) {
+SEQAN_CHECKPOINT
+    typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+    typedef
+        typename RemoveConst_<
+            typename Value<TOtherText>::Type
+        >::Type alph_t;
+    clear(me);
+
+    /*
+    SEQAN_ASSERT(IsContiguous<TOtherText>::VALUE)
+    SEQAN_ASSERT(BitsPerValue<alph_t>::VALUE == 8)
+    SEQAN_ASSERT((IsSameType<typename IsSimple<alph_t>::Type, True>::VALUE));
+
+    String<alph_t, CStyle> cstr = text;
+    impl::uchar_t* textstart =
+        reinterpret_cast<impl::uchar_t*>(
+            const_cast<alph_t*>(static_cast<alph_t const*>(cstr))
+        );
+    impl::ulong_t textlength = length(text);
+    impl::createPizzaChiliIndex(me, textstart, textlength);
+    */
+    getFibre(me, PizzaChiliText()) = text;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TText, typename TSpec>
+inline bool open(
+    Index<TText, PizzaChili<TSpec> >& me,
+    char const* filename
+) {
+SEQAN_CHECKPOINT
+    typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+    clear(me);
+    impl::error_t e =
+        TCodeProvider::load_index(const_cast<char*>(filename), &me.index_handle);
+    if (e != 0) {
+        SEQAN_REPORT(TCodeProvider::error_index(e));
+    }
+    else
+        value(me.text) = String<typename Value<TText>::Type, PizzaChili<TSpec> >(me.index_handle);
+    return e == 0;
+}
+
+template <typename TText, typename TSpec>
+inline bool save(
+    Index<TText, PizzaChili<TSpec> >& me,
+    char const* filename
+) {
+SEQAN_CHECKPOINT
+    typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+    // Before we can save the index we have to construct it, in case it isn't
+    // already constructed.
+    indexRequire(me, PizzaChiliCompressed());
+    impl::error_t e =
+        TCodeProvider::save_index(me.index_handle, const_cast<char*>(filename));
+    if (e != 0) {
+        SEQAN_REPORT(TCodeProvider::error_index(e));
+    }
+    return e == 0;
+}
+
+} // namespace SEQAN_NAMESPACE_MAIN
+
+#endif // SEQAN_HEADER_INDEX_PIZZACHILI_H
diff --git a/src/SeqAn-1.3/seqan/index/index_pizzachili_find.h b/src/SeqAn-1.3/seqan/index/index_pizzachili_find.h
new file mode 100644
index 0000000..b9cc2cd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_pizzachili_find.h
@@ -0,0 +1,174 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Konrad Ludwig Moritz Rudolph <konrad.rudolph at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_PIZZACHILI_FIND_H
+#define SEQAN_HEADER_INDEX_PIZZACHILI_FIND_H
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+struct PizzaChiliFinder_;
+
+/**
+.Tag.Index Find Algorithm
+..cat:Searching
+..tag.PizzaChiliFinder:Finds an occurrence in a @Spec.Pizza & Chili Index@ index.
+...remarks:The actual algorithm used for searching depends on the @Tag.Pizza & Chili Index Tags@ used.
+..see:Spec.Pizza & Chili Index
+..include:seqan/index.h
+*/
+
+typedef Tag<PizzaChiliFinder_> const PizzaChiliFinder;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TText, typename TSpec>
+struct DefaultFinder<Index<TText, PizzaChili<TSpec> > > {
+    typedef PizzaChiliFinder Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+// We define a special suffix array fibre for our finder. This fibre is used to
+// represent the search results and our search results aren't actually part of
+// a suffix array but rather a C array of ulong values.
+template <typename TText, typename TSpec>
+struct Fibre<Index<TText, PizzaChili<TSpec> >, Tag<FibreSA_> const> {
+    typedef impl::ulong_t* Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+// The following specialization of the finder is necessary only because we have
+// to free the data from the C API in the destructor.
+template <typename TText, typename TSpec>
+class Finder<Index<TText, PizzaChili<TSpec> >, PizzaChiliFinder>
+    : public Finder<Index<TText, PizzaChili<TSpec> >, Default>
+{
+    typedef Finder<Index<TText, PizzaChili<TSpec> >, Default> TBase;
+
+    typedef typename TBase::TIndex TIndex;
+    typedef typename TBase::TSA TSA;
+    typedef typename TBase::TIterator TIterator;
+
+public:
+
+    using TBase::index;
+    using TBase::range;
+    using TBase::data_iterator;
+
+    Finder() : TBase() { }
+
+    Finder(TIndex& index) : TBase(index) { }
+
+    Finder(TIndex const& index) : TBase(index) { }
+
+    ~Finder() {
+SEQAN_CHECKPOINT
+        if (range.i1 != 0)
+            ::std::free(range.i1);
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace impl {
+    template <typename TPattern>
+    inline uchar_t* getPizzaChiliString(TPattern const& pattern) {
+SEQAN_CHECKPOINT
+        typedef
+            typename RemoveConst_<
+                typename Value<TPattern>::Type
+            >::Type alph_t;
+
+        // This const_cast is safe because 'cstr' is only read.
+        // On the other hand, this cast is necessary to prevent a copy from
+        // being made: this would result in an invalid pointer to local memory.
+        String<alph_t, CStyle> const cstr = *const_cast<TPattern*>(&pattern);
+        // This const_cast is safe because the return value is only read.
+        return
+            reinterpret_cast<uchar_t*>(
+                const_cast<alph_t*>(static_cast<alph_t const*>(cstr))
+            );
+    }
+
+    inline uchar_t* getPizzaChiliString(char const* pattern) {
+SEQAN_CHECKPOINT
+        return reinterpret_cast<uchar_t*>(const_cast<char*>(pattern));
+    }
+} // namespace impl
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TText, typename TSpec, typename TSpecFinder, typename TPattern>
+inline void _findFirstIndex(
+    Finder<Index<TText, PizzaChili<TSpec> >, TSpecFinder>& finder,
+    TPattern const& pattern,
+    PizzaChiliFinder const
+) {
+SEQAN_CHECKPOINT
+    typedef Index<TText, PizzaChili<TSpec> > TIndex;
+    typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+
+    if (finder.range.i1 != 0)
+        ::std::free(finder.range.i1);
+
+    TIndex& index = haystack(finder);
+    indexRequire(index, PizzaChiliCompressed());
+
+    impl::uchar_t* c_pattern =
+        impl::getPizzaChiliString(pattern);
+    impl::ulong_t patternlength = length(pattern);
+
+    impl::ulong_t numocc;
+    impl::ulong_t* occ;
+
+    impl::error_t e =
+        TCodeProvider::locate(
+            index.index_handle,
+            c_pattern,
+            patternlength,
+            &occ,
+            &numocc
+        );
+
+    if (e != 0)
+        SEQAN_ABORT(TCodeProvider::error_index(e));
+
+    finder.range.i1 = occ;
+    finder.range.i2 = occ + numocc;
+}
+
+} // namespace SEQAN_NAMESPACE_MAIN
+
+#endif // SEQAN_HEADER_INDEX_PIZZACHILI_FIND_H
diff --git a/src/SeqAn-1.3/seqan/index/index_pizzachili_string.h b/src/SeqAn-1.3/seqan/index/index_pizzachili_string.h
new file mode 100644
index 0000000..7e0447e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_pizzachili_string.h
@@ -0,0 +1,803 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Konrad Ludwig Moritz Rudolph <konrad.rudolph at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_PIZZACHILI_STRING_H
+#define SEQAN_HEADER_INDEX_PIZZACHILI_STRING_H
+
+#include <cstdlib> // for std::malloc, std::realloc, std::free
+
+#include <seqan/index/pizzachili_api.h>
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+/**
+.Spec.Pizza & Chili String:
+..summary:String used by the Pizza & Chili indices.
+..remarks:The string is lazy in the sense that it holds a reference to the
+compressed index structure it is associated with. Only when the text is
+actually read, the index is queried for the text. If only a substring is
+needed, this string tries to query only a substring.
+..cat:Strings
+..general:Class.String
+..signature:String<TValue, PizzaChili<TSpec> >
+..param.TValue:The value type, that is the type of them items/characters stored in the string.
+...remarks:This type must be a simple type and it must hold that $sizeof(TValue) == 1$.
+..param.TSpec:Tag specifying the Pizza & Chili index library to use.
+...type:Tag.Pizza & Chili Index Tags
+..include:seqan/index.h
+*/
+
+template <typename TSpec>
+struct PizzaChili;
+
+template <typename TValue, typename TSpec>
+class String<TValue, PizzaChili<TSpec> > {
+public:
+    typedef TValue* TIter;
+    typedef TValue const* TConstIter;
+    typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+
+    impl::index_t index_handle;
+    bool owned;
+    mutable TIter data_begin;
+    mutable TIter data_end;
+
+    String() : index_handle(0), owned(true), data_begin(0), data_end(0) { }
+
+    template <typename TText>
+    String(TText& other)
+        : index_handle(0), owned(true), data_begin(0), data_end(0)
+    {
+SEQAN_CHECKPOINT
+        assign(*this, other);
+    }
+
+    String(impl::index_t index_handle)
+        : index_handle(index_handle), owned(true), data_begin(0), data_end(0) { }
+
+    String(String& other)
+        : index_handle(0), owned(true), data_begin(0), data_end(0)
+    {
+SEQAN_CHECKPOINT
+        assign(*this, other);
+    }
+
+    String(String const& other)
+        : index_handle(0), owned(true), data_begin(0), data_end(0)
+    {
+SEQAN_CHECKPOINT
+        assign(*this, other);
+    }
+
+    String& operator =(String const& other) {
+SEQAN_CHECKPOINT
+        if (this != &other)
+            assign(*this, other);
+        return *this;
+    }
+
+    ~String() {
+SEQAN_CHECKPOINT
+        clear(*this);
+    }
+
+    // Convenience ...
+
+    template <typename TPos>
+    inline TValue& operator [](TPos index) {
+SEQAN_CHECKPOINT
+        return value(*this, index);
+    }
+
+    template <typename TPos>
+    inline TValue operator [](TPos index) const {
+SEQAN_CHECKPOINT
+        return value(*this, index);
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct IsContiguous<String<TValue, PizzaChili<TSpec> > > {
+    enum { VALUE = true };
+};
+
+template <typename TValue, typename TSpec>
+struct IsContiguous<String<TValue, PizzaChili<TSpec> > const> {
+    enum { VALUE = true };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TTag>
+struct Iterator<String<TValue, PizzaChili<TSpec> >, TTag> {
+    typedef typename String<TValue, PizzaChili<TSpec> >::TIter Type;
+};
+
+template <typename TValue, typename TSpec, typename TTag>
+struct Iterator<String<TValue, PizzaChili<TSpec> > const, TTag> {
+    typedef typename String<TValue, PizzaChili<TSpec> >::TConstIter Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct Infix<String<TValue, PizzaChili<TSpec> > > {
+    typedef String<TValue, PizzaChili<TSpec> > Type;
+};
+
+template <typename TValue, typename TSpec>
+struct Infix<String<TValue, PizzaChili<TSpec> > const> {
+    typedef String<TValue, PizzaChili<TSpec> > const Type;
+};
+
+template <typename TValue, typename TSpec>
+struct Prefix<String<TValue, PizzaChili<TSpec> > >
+    : Infix<String<TValue, PizzaChili<TSpec> > > { };
+
+template <typename TValue, typename TSpec>
+struct Prefix<String<TValue, PizzaChili<TSpec> > const>
+    : Infix<String<TValue, PizzaChili<TSpec> > const> { };
+
+template <typename TValue, typename TSpec>
+struct Suffix<String<TValue, PizzaChili<TSpec> > >
+    : Infix<String<TValue, PizzaChili<TSpec> > > { };
+
+template <typename TValue, typename TSpec>
+struct Suffix<String<TValue, PizzaChili<TSpec> > const>
+    : Infix<String<TValue, PizzaChili<TSpec> > const> { };
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct DefaultOverflowImplicit<String<TValue, PizzaChili<TSpec> > > {
+    typedef Exact Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline void
+clear(String<TValue, PizzaChili<TSpec> >& me) {
+SEQAN_CHECKPOINT
+    me.index_handle = 0;
+    if (me.owned) {
+        _deallocateStorage(me, me.data_begin, me.data_end - me.data_begin);
+        me.data_begin = 0;
+        me.data_end = 0;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(
+    String<TValue, PizzaChili<TSpec> >& target,
+    TSource const& source,
+    Tag<TExpand> const
+) {
+SEQAN_CHECKPOINT
+    typedef String<TValue, PizzaChili<TSpec> > TTarget;
+
+    target.owned = true;
+    AssignString_<Tag<TExpand> const>::assign_(target, source);
+}
+
+template<typename TValue, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(
+    String<TValue, PizzaChili<TSpec> >& target,
+    TSource const* source,
+    Tag<TExpand> const
+) {
+SEQAN_CHECKPOINT
+    typedef String<TValue, PizzaChili<TSpec> > TTarget;
+
+    target.owned = true;
+    AssignString_<Tag<TExpand> const>::assign_(target, source);
+}
+
+template<typename TValue, typename TSpec, typename TExpand>
+inline void
+assign(
+    String<TValue, PizzaChili<TSpec> >& target,
+    String<TValue, PizzaChili<TSpec> > const& source,
+    Tag<TExpand> const
+) {
+SEQAN_CHECKPOINT
+    typedef String<TValue, PizzaChili<TSpec> > TTarget;
+
+    target.owned = true;
+
+    if (source.index_handle != 0) {
+        clear(target);
+        target.index_handle = source.index_handle;
+    }
+    else
+        AssignString_<Tag<TExpand> const>::assign_(target, source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+template <typename TValue, typename TSpec>
+inline typename Value<String<TValue, PizzaChili<TSpec> > >::Type*
+_pizzaChiliAllocate(
+    String<TValue, PizzaChili<TSpec> >& me,
+    typename Size<String<TValue, PizzaChili<TSpec> > >::Type new_capacity
+) {
+SEQAN_ CHECKPOINT
+    TValue* old = me.data_begin;
+    me.data_begin = static_cast<TValue*>(::std::malloc(new_capacity));
+    return old == me.data_begin ? 0 : old;
+}
+*/
+
+template <typename TValue, typename TSpec>
+inline typename Value<String<TValue, PizzaChili<TSpec> > >::Type*
+_pizzaChiliReallocate(
+    String<TValue, PizzaChili<TSpec> >& me,
+    typename Size<String<TValue, PizzaChili<TSpec> > >::Type new_capacity
+) {
+SEQAN_CHECKPOINT
+    if (new_capacity <= capacity(me))
+        return 0;
+
+    SEQAN_ASSERT(me.data_begin != 0);
+    //if (me.data_begin == 0)
+    //    return _pizzaChiliAllocate(me, new_capacity);
+
+    me.data_begin =
+        static_cast<TValue*>(::std::realloc(me.data_begin, new_capacity));
+    // ::std::realloc does the cleanup itself.
+    return 0;
+}
+
+template <typename TValue>
+inline void
+_pizzaChiliDeallocate(TValue* begin) {
+SEQAN_CHECKPOINT
+    if (begin != 0)
+        ::std::free(begin);
+}
+
+template <typename TValue, typename TSpec>
+struct AllocHelper_ {
+    typedef String<TValue, PizzaChili<TSpec> > string_type;
+    typedef typename Value<string_type>::Type* pointer_type;
+    typedef typename Size<string_type>::Type size_type;
+
+    /*
+    static pointer_type allocate(string_type& me, size_type new_capacity) {
+SEQAN_ CHECKPOINT
+        return _pizzaChiliAllocate(me, new_capacity);
+    }
+    */
+
+    static pointer_type reallocate(string_type& me, size_type new_capacity) {
+SEQAN_CHECKPOINT
+        return _pizzaChiliReallocate(me, new_capacity);
+    }
+
+    static void deallocate(pointer_type begin) {
+SEQAN_CHECKPOINT
+        _pizzaChiliDeallocate(begin);
+    }
+};
+
+// This specialization is needed because the FM index requires than an
+// overshoot be reserved after each string.
+template <typename TValue>
+struct AllocHelper_<TValue, PizzaChiliFM> {
+    typedef PizzaChiliFM TSpec;
+    typedef String<TValue, PizzaChili<TSpec> > string_type;
+    typedef typename Value<string_type>::Type* pointer_type;
+    typedef typename Size<string_type>::Type size_type;
+
+    static size_type real_capacity(size_type new_capacity) {
+SEQAN_CHECKPOINT
+        typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+        // The numerical constant values are taken from the fm_build.c example
+        // in th FM library folder.
+        return new_capacity + TCodeProvider::init_ds_ssort(500, 2000);
+    }
+
+    /*
+    static pointer_type allocate(string_type& me, size_type new_capacity) {
+SEQAN_ CHECKPOINT
+        return _pizzaChiliAllocate(me, real_capacity(new_capacity));
+    }
+    */
+
+    static pointer_type reallocate(string_type& me, size_type new_capacity) {
+SEQAN_CHECKPOINT
+        return _pizzaChiliReallocate(me, real_capacity(new_capacity));
+    }
+
+    static void deallocate(pointer_type begin) {
+SEQAN_CHECKPOINT
+        _pizzaChiliDeallocate(begin);
+    }
+};
+
+/*
+template <typename TValue, typename TSpec>
+inline typename Value<String<TValue, PizzaChili<TSpec> > >::Type*
+_allocateStorage(
+    String<TValue, PizzaChili<TSpec> >& me,
+    typename Size<String<TValue, PizzaChili<TSpec> > >::Type new_capacity
+) {
+SEQAN_ CHECKPOINT
+    return AllocHelper_<TValue, TSpec>::allocate(me, new_capacity);
+}
+*/
+
+template <typename TValue, typename TSpec>
+inline typename Value<String<TValue, PizzaChili<TSpec> > >::Type*
+_reallocateStorage(
+    String<TValue, PizzaChili<TSpec> >& me,
+    typename Size<String<TValue, PizzaChili<TSpec> > >::Type new_capacity,
+    Exact
+) {
+SEQAN_CHECKPOINT
+    return AllocHelper_<TValue, TSpec>::reallocate(me, new_capacity);
+}
+
+template <typename TValue, typename TSpec>
+inline void
+_deallocateStorage(
+   String<TValue, PizzaChili<TSpec> >& /*me*/,
+   TValue* begin,
+   typename Size<String<TValue, PizzaChili<TSpec> > >::Type /*count*/
+) {
+SEQAN_CHECKPOINT
+    AllocHelper_<TValue, TSpec>::deallocate(begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline typename Size<String<TValue, PizzaChili<TSpec> > >::Type
+length(String<TValue, PizzaChili<TSpec> > const& me) {
+SEQAN_CHECKPOINT
+    typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+
+    if (me.data_begin != 0) {
+SEQAN_CHECKPOINT
+        return me.data_end - me.data_begin;
+    }
+    else if (me.index_handle != 0) {
+SEQAN_CHECKPOINT
+        impl::ulong_t len;
+        impl::error_t e =
+            TCodeProvider::get_length(me.index_handle, &len);
+        if (e != 0) {
+            SEQAN_REPORT(TCodeProvider::error_index(e));
+            struct { } ex;
+            throw ex;
+        }
+
+        return len;
+    }
+    else
+        return 0;
+}
+
+template <typename TValue, typename TSpec>
+inline void
+_setLength(
+    String<TValue, PizzaChili<TSpec> >& me,
+    size_t new_length
+) {
+SEQAN_CHECKPOINT
+    me.data_end = me.data_begin + new_length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace impl {
+    template <typename TValue, typename TSpec>
+    inline void
+    queryText(String<TValue, PizzaChili<TSpec> > const& me) {
+SEQAN_CHECKPOINT
+        typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+        if (me.data_begin != 0) {
+SEQAN_CHECKPOINT
+            return;
+        }
+        if (me.index_handle == 0) {
+SEQAN_CHECKPOINT
+            me.data_begin = static_cast<TValue*>(::std::malloc(1));
+            me.data_begin[0] = '\0';
+            me.data_end = me.data_begin;
+        }
+        else {
+SEQAN_CHECKPOINT
+            impl::uchar_t* snippet;
+            impl::ulong_t len;
+            impl::error_t e =
+                TCodeProvider::extract(
+                    me.index_handle,
+                    0,
+                    length(me) - 1,
+                    &snippet,
+                    &len
+                );
+
+            if (e != 0) {
+                SEQAN_REPORT(TCodeProvider::error_index(e));
+                struct { } ex;
+                throw ex;
+            }
+
+            me.data_begin = reinterpret_cast<TValue*>(snippet);
+            me.data_end = me.data_begin + len;
+        }
+    }
+} // namespace impl
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TTag>
+inline typename Iterator<String<TValue, PizzaChili<TSpec> >, Tag<TSpec> const>::Type 
+begin(
+    String<TValue, PizzaChili<TSpec> >& me,
+    Tag<TTag> const
+) {
+SEQAN_CHECKPOINT
+    impl::queryText(me);
+    return me.data_begin;
+}
+
+template <typename TValue, typename TSpec, typename TTag>
+inline typename Iterator<String<TValue, PizzaChili<TSpec> > const, Tag<TSpec> const>::Type 
+begin(
+    String<TValue, PizzaChili<TSpec> > const& me,
+    Tag<TTag> const
+) {
+SEQAN_CHECKPOINT
+    impl::queryText(me);
+    return me.data_begin;
+}
+
+template <typename TValue, typename TSpec, typename TTag>
+inline typename Iterator<String<TValue, PizzaChili<TSpec> >, Tag<TSpec> const>::Type 
+end(
+    String<TValue, PizzaChili<TSpec> >& me,
+    Tag<TTag> const
+) {
+SEQAN_CHECKPOINT
+    impl::queryText(me);
+    return me.data_end;
+}
+
+template <typename TValue, typename TSpec, typename TTag>
+inline typename Iterator<String<TValue, PizzaChili<TSpec> > const, Tag<TSpec> const>::Type 
+end(
+    String<TValue, PizzaChili<TSpec> > const& me,
+    Tag<TTag> const
+) {
+SEQAN_CHECKPOINT
+    impl::queryText(me);
+    return me.data_end;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// NOTE: The following might seem redundant -- and it is -- but I don't see an
+// easier way to implement it. The helper constructs the infix, prefix and
+// suffix for a given Pizza & Chili string. The partial specializations cover
+// the following cases:
+//
+//  - integral positions are given
+//  - positions are iterators
+//  - positions are const iterators
+//
+// Additionally, every of those cases handles const and non-const string
+// arguments, for all three algorithms. Thus, there's a total of 3 * 3 * 2
+// cases, resulting in 18 functions.
+
+namespace impl {
+    template <typename TValue, typename TSpec, typename TPos>
+    struct substringHelperPizzaChili {
+        typedef String<TValue, PizzaChili<TSpec> > TString;
+        typedef typename Infix<TString>::Type TResult;
+        typedef typename Infix<TString const>::Type TConstResult;
+        typedef typename PizzaChiliCodeProvider<TSpec>::Type TCodeProvider;
+
+        static inline TResult
+        infix(TString& me, TPos begin, TPos end) {
+SEQAN_CHECKPOINT
+            TResult ret;
+
+            if (me.data_begin != 0) {
+SEQAN_CHECKPOINT
+                ret.owned = false;
+                ret.data_begin = me.data_begin + begin;
+                ret.data_end = me.data_begin + end;
+            }
+            else if (me.index_handle != 0) {
+SEQAN_CHECKPOINT
+                impl::uchar_t* snippet;
+                impl::ulong_t len;
+                impl::error_t e =
+                    TCodeProvider::extract(
+                        me.index_handle,
+                        begin,
+                        end - 1,
+                        &snippet,
+                        &len
+                    );
+
+                if (e != 0) {
+                    SEQAN_REPORT(TCodeProvider::error_index(e));
+                    struct { } ex;
+                    throw ex;
+                }
+
+                ret.data_begin = reinterpret_cast<TValue*>(snippet);
+                ret.data_end = ret.data_begin + len;
+            }
+
+            return ret;
+        }
+
+        static inline TConstResult
+        infix(TString const& me, TPos begin, TPos end) {
+SEQAN_CHECKPOINT
+            // This cast is safe as the content is never written to.
+            return infix(const_cast<TString&>(me), begin, end);
+        }
+
+        static inline TResult
+        prefix(TString& me, TPos end) {
+SEQAN_CHECKPOINT
+            return infix(me, 0, end);
+        }
+
+        static inline TConstResult
+        prefix(TString const& me, TPos end) {
+SEQAN_CHECKPOINT
+            return infix(me, 0, end);
+        }
+
+        static inline TResult
+        suffix(TString& me, TPos begin) {
+SEQAN_CHECKPOINT
+            return infix(me, begin, length(me));
+        }
+
+        static inline TConstResult
+        suffix(TString const& me, TPos begin) {
+SEQAN_CHECKPOINT
+            return infix(me, begin, length(me));
+        }
+    }; // substringHelperPizzaChili
+
+    template <typename TValue, typename TSpec>
+    struct substringHelperPizzaChili<
+        TValue,
+        TSpec,
+        typename Iterator<
+            String<TValue, PizzaChili<TSpec> >,
+            typename DefaultIteratorSpec<String<TValue, PizzaChili<TSpec> > >::Type
+        >::Type
+    > {
+        typedef String<TValue, PizzaChili<TSpec> > TString;
+        typedef
+            typename Iterator<
+                TString, typename DefaultIteratorSpec<TString>::Type
+            >::Type TPos;
+        typedef typename Infix<TString>::Type TResult;
+        typedef typename Infix<TString const>::Type TConstResult;
+
+        static inline TResult
+        infix(TString& /*me*/, TPos begin, TPos end) {
+SEQAN_CHECKPOINT
+            // Iterators were used, therefore it's safe to assume that the
+            // string is already in memory.
+            TResult ret;
+            ret.owned = false;
+            ret.data_begin = begin;
+            ret.data_end = end;
+            return ret;
+        }
+
+        static inline TConstResult
+        infix(TString const& me, TPos begin, TPos end) {
+SEQAN_CHECKPOINT
+            // This cast is safe as the content is never written to.
+            return infix(const_cast<TString&>(me), begin, end);
+        }
+
+        static inline TResult
+        prefix(TString& me, TPos end) {
+SEQAN_CHECKPOINT
+            return infix(me, begin(me), end);
+        }
+
+        static inline TConstResult
+        prefix(TString const& me, TPos end) {
+SEQAN_CHECKPOINT
+            // This cast is safe as the content is never written to.
+            return infix(me, begin(const_cast<TString&>(me)), end);
+        }
+
+        static inline TResult
+        suffix(TString& me, TPos begin) {
+SEQAN_CHECKPOINT
+            return infix(me, begin, end(me));
+        }
+
+        static inline TConstResult
+        suffix(TString const& me, TPos begin) {
+SEQAN_CHECKPOINT
+            // This cast is safe as the content is never written to.
+            return infix(me, begin, end(const_cast<TString&>(me)));
+        }
+    }; // substringHelperPizzaChili
+
+    // Specialization for const iterators.
+    template <typename TValue, typename TSpec>
+    struct substringHelperPizzaChili<
+        TValue,
+        TSpec,
+        typename Iterator<
+            String<TValue, PizzaChili<TSpec> > const,
+            typename DefaultIteratorSpec<String<TValue, PizzaChili<TSpec> > >::Type
+        >::Type
+    > : substringHelperPizzaChili<
+        TValue, TSpec,
+        typename Iterator<
+            String<TValue, PizzaChili<TSpec> >,
+            typename DefaultIteratorSpec<String<TValue, PizzaChili<TSpec> > >::Type
+        >::Type
+    > {
+        typedef String<TValue, PizzaChili<TSpec> > TString;
+        typedef
+            typename Iterator<
+                TString const,
+                typename DefaultIteratorSpec<TString>::Type
+            >::Type TPos;
+        typedef typename Infix<TString const>::Type TResult;
+        typedef typename Infix<TString const>::Type TConstResult;
+        typedef substringHelperPizzaChili<
+            TValue, TSpec,
+            typename Iterator<
+                TString,
+                typename DefaultIteratorSpec<TString>::Type
+            >::Type
+        > TBase;
+
+        static inline TConstResult
+        infix(TString const& me, TPos begin, TPos end) {
+SEQAN_CHECKPOINT
+            // This cast is safe as the content is never written to.
+            return TBase::infix(
+                me,
+                const_cast<typename TBase::TPos>(begin),
+                const_cast<typename TBase::TPos>(end)
+            );
+        }
+
+        static inline TConstResult
+        prefix(TString const& me, TPos end) {
+SEQAN_CHECKPOINT
+            return infix(me, begin(me), end);
+        }
+
+        static inline TConstResult
+        suffix(TString const& me, TPos begin) {
+SEQAN_CHECKPOINT
+            return infix(me, begin, end(me));
+        }
+    };
+
+} // namespace impl
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TPosBegin, typename TPosEnd>
+inline typename Infix<String<TValue, PizzaChili<TSpec> > >::Type
+infix(
+    String<TValue, PizzaChili<TSpec> > const& me,
+    TPosBegin begin,
+    TPosEnd end
+) {
+SEQAN_CHECKPOINT
+    return impl::substringHelperPizzaChili<TValue, TSpec, TPosBegin>::infix(me, begin, end);
+}
+
+template <typename TValue, typename TSpec, typename TPosBegin, typename TPosEnd>
+inline typename Infix<String<TValue, PizzaChili<TSpec> > >::Type
+infix(
+    String<TValue, PizzaChili<TSpec> >& me,
+    TPosBegin begin,
+    TPosEnd end
+) {
+SEQAN_CHECKPOINT
+    return impl::substringHelperPizzaChili<TValue, TSpec, TPosBegin>::infix(me, begin, end);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TPos>
+inline typename Prefix<String<TValue, PizzaChili<TSpec> > >::Type
+prefix(
+    String<TValue, PizzaChili<TSpec> > const& me,
+    TPos end
+) {
+SEQAN_CHECKPOINT
+    return impl::substringHelperPizzaChili<TValue, TSpec, TPos>::prefix(me, end);
+}
+
+template <typename TValue, typename TSpec, typename TPos>
+inline typename Prefix<String<TValue, PizzaChili<TSpec> > >::Type
+prefix(
+    String<TValue, PizzaChili<TSpec> >& me,
+    TPos end
+) {
+SEQAN_CHECKPOINT
+    return impl::substringHelperPizzaChili<TValue, TSpec, TPos>::prefix(me, end);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TPos>
+inline typename Suffix<String<TValue, PizzaChili<TSpec> > >::Type
+suffix(
+    String<TValue, PizzaChili<TSpec> > const& me,
+    TPos begin
+) {
+SEQAN_CHECKPOINT
+    return impl::substringHelperPizzaChili<TValue, TSpec, TPos>::suffix(me, begin);
+}
+
+template <typename TValue, typename TSpec, typename TPos>
+inline typename Suffix<String<TValue, PizzaChili<TSpec> > >::Type
+suffix(
+    String<TValue, PizzaChili<TSpec> >& me,
+    TPos begin
+) {
+SEQAN_CHECKPOINT
+    return impl::substringHelperPizzaChili<TValue, TSpec, TPos>::suffix(me, begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} // namespace SEQAN_NAMESPACE_MAIN
+
+#endif // SEQAN_HEADER_INDEX_PIZZACHILI_STRING_H
diff --git a/src/SeqAn-1.3/seqan/index/index_qgram.h b/src/SeqAn-1.3/seqan/index/index_qgram.h
new file mode 100644
index 0000000..48c248c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_qgram.h
@@ -0,0 +1,2416 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_QGRAM_H
+#define SEQAN_HEADER_INDEX_QGRAM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// q-gram index fibres
+
+/**
+.Tag.QGram Index Fibres
+..summary:Tag to select a specific fibre (e.g. table, object, ...) of a @Spec.IndexQGram.q-gram Index at .
+..remarks:These tags can be used to get @Metafunction.Fibre.Fibres@ of a @Spec.IndexQGram.q-gram Index at .
+..cat:Index
+
+..tag.QGramText:The original text the index should be based on.
+
+..tag.QGram_RawText:The concatenation of all text sequences.
+...remarks:$QGramText$ and $QGram_RawText$ fibres are equal by default.
+They differ if the index text is a set of strings. Then, raw text is the concatenation of all strings in this set.
+
+..tag.QGramSA:The suffix array.
+...remarks:Contains all occurrences of q-grams, s.t. the occurrences of a single q-gram are stored in a contiguous block (q-gram bucket).
+q-grams exceeding the end of the text are ignored.
+The beginning of each bucket can be determined by the q-gram directory ($QGramDir$, see below).
+...remarks:It corresponds to a suffix array which is sorted by the first q-gram.
+...remarks:@Metafunction.Fibre@ returns a @Class.String@ over the alphabet of the @Metafunction.SAValue@ of $TIndex$.
+
+..tag.QGramDir:The directory/hash table.
+...remarks:The directory contains for every possible q-gram hash value the start index of the q-gram bucket.
+A q-gram bucket is a contiguous interval in the suffix array ($QGramSA$, see above).
+Each suffix in this interval begins with the same q-gram.
+The end index is the start index of the next bucket.
+...remarks:@Metafunction.Fibre@ returns a @Class.String@ over the alphabet of a size type.
+
+..tag.QGramBucketMap:Maps q-gram hashes to buckets.
+This fibre is used by the @Spec.OpenAddressing@ index and stores all parameters of the open addressing hash function and hash value occupancy in the QGramDir fibre.
+In contrast to @Spec.OpenAddressing@, @Spec.IndexQGram@ uses a trivial 1-to-1 mapping from q-gram hash values to buckets.
+For that index the fibre is of type @Tag.Nothing at .
+
+..tag.QGramCounts:The counts array.
+...remarks:Contains the numbers of occurrences per sequence of each q-gram, s.t. the numbers of the same q-gram are stored in a contiguous block (q-gram count bucket).
+A bucket contains entries (seqNo,count) of sequences with at least one q-gram occurrence. q-grams exceeding the end of the text are ignored.
+The beginning of each count bucket can be determined by the q-gram counts directory ($QGramCountsDir$, see below).
+...remarks:@Metafunction.Fibre@ returns a @Class.String@ over the alphabet of the @Metafunction.SAValue@ of $TIndex$.
+
+..tag.QGramCountsDir:The counts directory.
+...remarks:The counts directory contains for every possible q-gram hash value the start index of the q-gram count bucket.
+A q-gram count bucket is a contiguous interval in the counts array ($QGramCounts$, see above).
+The end index is the start index of the next bucket.
+...remarks:@Metafunction.Fibre@ returns a @Class.String@ over the alphabet of a size type.
+
+..tag.QGramShape:The shape the index is based on.
+...remarks:The q-gram index needs an underlying @Class.Shape at . This shape can be gapped or ungapped.
+The number of '1's (relevant positions) in the shape determines $q$ and the size of the directory table.
+...remarks:Dynamic shapes (@Spec.SimpleShape@, @Spec.GenericShape@, ...) must be initialized before the index can be used.
+
+..tag.QGramSADir:The union of suffix array and directory.
+...remarks:In most applications a q-gram index consisting of both of these table is required.
+To efficiently create them at once use this tag for @Function.indexRequire@ or @Function.indexCreate at .
+ 
+..see:Metafunction.Fibre
+..see:Function.getFibre
+..see:Spec.IndexQGram
+..include:seqan/index.h
+*/
+
+	struct FibreDir_;			// directory/hash table, contains start indices of buckets
+	struct FibreSADir_;		// identifies algorithm to construct both SA and directory at once
+	struct Fibre_Shape_;		// underlying shape
+	struct FibreCounts_;		// counts each q-gram
+	struct FibreCountsDir_;	// directory for counts buckets
+	struct FibreBucketMap_;	// stores a q-gram hash value for each directory entry (-1 if empty)
+
+	typedef Tag<FibreDir_> const		FibreDir;
+	typedef Tag<FibreSADir_> const		FibreSADir;
+	typedef Tag<Fibre_Shape_> const		FibreShape;
+	typedef Tag<FibreCounts_> const	FibreCounts;
+	typedef Tag<FibreCountsDir_> const	FibreCountsDir;
+	typedef Tag<FibreBucketMap_> const	FibreBucketMap;
+
+//////////////////////////////////////////////////////////////////////////////
+
+	typedef FibreText		QGramText;
+	typedef FibreRawText	QGram_RawText;
+	typedef FibreSA		QGramSA;
+	typedef FibreRawSA		QGramRawSA;
+	typedef FibreDir		QGramDir;
+	typedef FibreSADir		QGramSADir;
+	typedef FibreShape		QGramShape;
+	typedef FibreCounts	QGramCounts;
+	typedef FibreCountsDir	QGramCountsDir;
+	typedef FibreBucketMap	QGramBucketMap;
+
+//////////////////////////////////////////////////////////////////////////////
+// q-gram index
+
+/**
+.Spec.IndexQGram:
+..summary:An index based on an array of sorted q-grams.
+..cat:Index
+..general:Class.Index
+..signature:Index<TText, IndexQGram<TShapeSpec[, TSpec]> >
+..param.TText:The text type.
+...type:Class.String
+..param.TShapeSpec:The @Class.Shape@ specialization type.
+...note:This can be either a $TSpec$ argument (e.g. $SimpleShape$) or a complete @Class.Shape@ class (e.g. Shape<Dna, SimpleShape>).
+..param.TSpec:The specializing type.
+...default:Default
+...type:Spec.OpenAddressing
+..remarks:The fibres (see @Class.Index@ and @Metafunction.Fibre@) of this index are a suffix array sorted by the first q characters (see @Tag.QGram Index Fibres.QGramSA@) and a q-gram directory (see @Tag.QGram Index Fibres.QGramDir@).
+..include:seqan/index.h
+*/
+
+	template < typename TShapeSpec, typename TSpec = Default >
+	struct IndexQGram {};
+
+	// use the index value type as shape value type
+	template < typename TObject, typename TShapeSpec, typename TSpec >
+	struct Fibre< Index<TObject, IndexQGram<TShapeSpec, TSpec> >, FibreShape> 
+	{
+		typedef Index< TObject, IndexQGram<TShapeSpec, TSpec> >	TIndex;
+		typedef Shape< typename Value<TIndex>::Type, TShapeSpec >	Type;
+	};
+
+	// allow different value types for the shape
+	template < typename TObject, typename TShapeValue, typename TShapeSpec, typename TSpec >
+	struct Fibre< Index<TObject, IndexQGram<Shape<TShapeValue, TShapeSpec>, TSpec> >, FibreShape> 
+	{
+		typedef Shape<TShapeValue, TShapeSpec>	Type;
+	};
+
+	template < typename TObject, typename TShapeSpec, typename TSpec >
+	struct Fibre< Index<TObject, IndexQGram<TShapeSpec, TSpec> >, FibreBucketMap>
+	{
+		typedef Nothing Type;
+	};
+
+#ifdef PLATFORM_WINDOWS_VS
+#pragma warning( push )
+// Disable warning C4521 locally (multiple copy constructors).
+#pragma warning( disable: 4521 )
+// Disable warning C4522 locally (multiple assignment operators).
+#pragma warning( disable: 4522 )
+#endif  // PLATFORM_WINDOWS_VS
+
+	template < typename TObject, typename TShapeSpec, typename TSpec >
+	class Index<TObject, IndexQGram<TShapeSpec, TSpec> > {
+	public:
+		typedef typename Fibre<Index, QGramText>::Type			TText;
+		typedef typename Fibre<Index, QGramSA>::Type			TSA;
+		typedef typename Fibre<Index, QGramDir>::Type			TDir;
+		typedef typename Fibre<Index, QGramCounts>::Type		TCounts;
+		typedef typename Fibre<Index, QGramCountsDir>::Type	TCountsDir;
+		typedef typename Fibre<Index, QGramShape>::Type		TShape;
+		typedef typename Fibre<Index, QGramBucketMap>::Type	TBucketMap;
+		typedef typename Cargo<Index>::Type						TCargo;
+		typedef typename Size<Index>::Type						TSize;
+
+		Holder<TText>	text;		// underlying text
+		TSA				sa;			// suffix array sorted by the first q chars
+		TDir			dir;		// bucket directory
+		TCounts			counts;		// counts each q-gram per sequence
+		TCountsDir		countsDir;	// directory for count buckets
+		TShape			shape;		// underlying shape
+		TCargo			cargo;		// user-defined cargo
+		TBucketMap		bucketMap;	// bucketMap table (used by open-addressing index)
+		TSize			stepSize;	// store every <stepSize>'th q-gram in the index
+
+		Index():
+			stepSize(1) {}
+
+		Index(Index &other):
+			text(other.text),
+			sa(other.sa),
+			dir(other.dir),
+			counts(other.counts),
+			countsDir(other.countsDir),
+			shape(other.shape),
+			cargo(other.cargo),
+			stepSize(1) {}
+
+		Index(Index const &other):
+			text(other.text),
+			sa(other.sa),
+			dir(other.dir),
+			counts(other.counts),
+			countsDir(other.countsDir),
+			shape(other.shape),
+			cargo(other.cargo),
+			stepSize(1) {}
+
+		template <typename TText_>
+		Index(TText_ &_text):
+			text(_text),
+			stepSize(1) {}
+
+		template <typename TText_>
+		Index(TText_ const &_text):
+			text(_text),
+			stepSize(1) {}
+
+		template <typename TText_, typename TShape_>
+		Index(TText_ &_text, TShape_ const &_shape):
+			text(_text),
+			shape(_shape),
+			stepSize(1) {}
+
+		template <typename TText_, typename TShape_>
+		Index(TText_ const &_text, TShape_ const &_shape):
+			text(_text),
+			shape(_shape),
+			stepSize(1) {}
+	};
+
+#ifdef PLATFORM_WINDOWS_VS
+// Reset warning state to previous values for C4521, C4522.
+#pragma warning( pop )
+#endif  // PLATFORM_WINDOWS_VS
+
+    template < typename TText, typename TShapeSpec, typename TSpec >
+    struct Value< Index<TText, IndexQGram<TShapeSpec, TSpec> > > {
+		typedef typename Value< typename Fibre< Index<TText, IndexQGram<TShapeSpec, TSpec> >, QGram_RawText >::Type >::Type Type;
+    };
+
+	template < typename TText, typename TShapeSpec, typename TSpec >
+    struct Size< Index<TText, IndexQGram<TShapeSpec, TSpec> > > {
+		typedef typename Size< typename Fibre< Index<TText, IndexQGram<TShapeSpec, TSpec> >, QGram_RawText >::Type >::Type Type;
+    };
+
+
+//////////////////////////////////////////////////////////////////////////////
+// default fibre creators
+
+	template < typename TText, typename TShapeSpec, typename TSpec >
+	struct DefaultIndexCreator<Index<TText, IndexQGram<TShapeSpec, TSpec> >, FibreSA> {
+        typedef Default Type;
+    };
+
+//////////////////////////////////////////////////////////////////////////////
+// counts array type
+
+	template < typename TText, typename TSpec >
+	struct Fibre< Index<TText, TSpec>, FibreCounts> {
+		typedef String<
+				Pair<
+					typename Size< TText >::Type,
+					typename Size< Index<TText, TSpec> >::Type
+				>,
+				typename DefaultIndexStringSpec< Index<TText, TSpec> >::Type 
+		> Type;
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreDir>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreDir) {
+		return index.dir;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreDir>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreDir) {
+		return index.dir;
+	}
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreCounts>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreCounts) {
+		return index.counts;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreCounts>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreCounts) {
+		return index.counts;
+	}
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreCountsDir>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreCountsDir) {
+		return index.countsDir;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreCountsDir>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreCountsDir) {
+		return index.countsDir;
+	}
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreBucketMap>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreBucketMap) {
+		return index.bucketMap;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreBucketMap>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreBucketMap) {
+		return index.bucketMap;
+	}
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreShape>::Type & 
+	getFibre(Index<TText, TSpec> &index, FibreShape) {
+		return index.shape;
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreShape>::Type & 
+	getFibre(Index<TText, TSpec> const &index, FibreShape) {
+		return index.shape;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexDir
+..summary:Shortcut for $getFibre(.., QGramDir)$.
+..cat:Index
+..signature:indexDir(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexQGram
+..returns:A reference to the @Tag.QGram Index Fibres.QGramDir@ fibre (q-gram directory).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreDir>::Type & 
+	indexDir(Index<TText, TSpec> &index) { 
+		return getFibre(index, FibreDir()); 
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreDir>::Type & 
+	indexDir(Index<TText, TSpec> const &index) { 
+		return getFibre(index, FibreDir()); 
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.dirAt
+..summary:Shortcut for $value(indexDir(..), ..)$.
+..cat:Index
+..signature:dirAt(position, index)
+..param.position:A position in the array on which the value should be accessed.
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexQGram
+..returns:A reference or proxy to the value.
+..include:seqan/index.h
+*/
+
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex, FibreDir>::Type>::Type 
+	dirAt(TPos i, TIndex &index) {
+		return value(getFibre(index, FibreDir()), i);
+	}
+	template <typename TPos, typename TIndex>
+	inline typename Reference<typename Fibre<TIndex const, FibreDir>::Type>::Type 
+	dirAt(TPos i, TIndex const &index) {
+		return value(getFibre(index, FibreDir()), i);
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexCounts
+..summary:Shortcut for $getFibre(.., QGramCounts)$.
+..cat:Index
+..signature:indexCounts(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexQGram
+..returns:A reference to the @Tag.QGram Index Fibres.QGramCounts@ fibre (counts array).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreCounts>::Type & 
+	indexCounts(Index<TText, TSpec> &index) {
+		return getFibre(index, FibreCounts()); 
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreCounts>::Type & 
+	indexCounts(Index<TText, TSpec> const &index) {
+		return getFibre(index, FibreCounts()); 
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexCountsDir
+..summary:Shortcut for $getFibre(.., QGramCountsDir)$.
+..cat:Index
+..signature:indexCountsDir(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexQGram
+..returns:A reference to the @Tag.QGram Index Fibres.QGramCountsDir@ fibre (counts directory).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreCountsDir>::Type & 
+	indexCountsDir(Index<TText, TSpec> &index) {
+		return getFibre(index, FibreCountsDir()); 
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreCountsDir>::Type & 
+	indexCountsDir(Index<TText, TSpec> const &index) {
+		return getFibre(index, FibreCountsDir()); 
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexBucketMap
+..summary:Shortcut for $getFibre(.., QGramBucketMap)$.
+..cat:Index
+..signature:indexBucketMap(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexQGram
+..returns:A reference to the @Tag.QGram Index Fibres.QGramBucketMap@ fibre (maps q-gram hashes to buckets).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreBucketMap>::Type & 
+	indexBucketMap(Index<TText, TSpec> &index) {
+		return getFibre(index, FibreBucketMap()); 
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreBucketMap>::Type & 
+	indexBucketMap(Index<TText, TSpec> const &index) {
+		return getFibre(index, FibreBucketMap()); 
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexShape
+..summary:Shortcut for $getFibre(.., QGramShape)$.
+..cat:Index
+..signature:indexShape(index)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Spec.IndexQGram
+..returns:Returns a reference to the @Class.Shape@ object of a q-gram index.
+Formally, this is a reference to the @Tag.QGram Index Fibres.QGramShape@ fibre.
+...type:Class.Shape
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec>, FibreShape>::Type & 
+	indexShape(Index<TText, TSpec> &index) { 
+		return getFibre(index, FibreShape()); 
+	}
+	template <typename TText, typename TSpec>
+	inline typename Fibre<Index<TText, TSpec> const, FibreShape>::Type & 
+	indexShape(Index<TText, TSpec> const &index) { 
+		return getFibre(index, FibreShape()); 
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getStepSize
+..summary:Return the q-gram step size used for index creation.
+..cat:Index
+..signature:getStepSize(index)
+..param.index:A q-gram index.
+...type:Spec.IndexQGram
+..returns:The step size. If $x$ is returned every $x$'th q-gram is stored in the index.
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TShapeSpec, typename TSpec>
+	inline typename Size<TText>::Type 
+	getStepSize(Index<TText, IndexQGram<TShapeSpec, TSpec> > const &index)
+	{
+		return (index.stepSize != 0)? index.stepSize: length(indexShape(index));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.setStepSize
+..summary:Change the q-gram step size used for index creation.
+..cat:Index
+..signature:setStepSize(index, stepSize)
+..param.index:A q-gram index.
+...type:Spec.IndexQGram
+..param.stepSize:Store every $stepSize$'th q-gram in the index.
+..remarks:The default step size of a q-gram index is 1, which corresponds to all overlapping q-grams.
+To take effect of changing the $stepSize$ the q-gram index should be empty or recreated. 
+..remarks:A $stepSize$ of 0 corresponds to $stepSize=length(indexShape(index))$, i.e. all non-overlapping q-grams.
+..see:Function.getStepSize
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TShapeSpec, typename TSpec, typename TSize>
+	inline void
+	setStepSize(Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, TSize stepSize)
+	{
+		index.stepSize = stepSize;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TIndex>
+	inline __int64 _fullDirLength(TIndex const &index) 
+	{
+		typedef typename Fibre<TIndex, FibreShape>::Type	TShape;
+		typedef typename Host<TShape>::Type					TTextValue;
+		return _intPow((__int64)ValueSize<TTextValue>::VALUE, weight(indexShape(index))) + 1;
+	}
+
+	template <typename TIndex>
+	inline __int64 _fullDir2Length(TIndex const &index) 
+	{
+		typedef typename Fibre<TIndex, FibreShape>::Type	TShape;
+		typedef typename Host<TShape>::Type					TTextValue;
+		return (_intPow(
+					(__int64)ValueSize<TTextValue>::VALUE,
+					weight(indexShape(index)) + 1) - 1)
+				/ ((unsigned)ValueSize<TTextValue>::VALUE - 1) + 1;
+	}
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // QGramLess
+	//
+	// compare two q-grams of a given text (q-grams can be smaller than q)
+    template < typename TSAValue, typename TText >
+	struct QGramLess_ : 
+		public ::std::binary_function < TSAValue, TSAValue, bool >
+    {
+		typedef typename Iterator<TText, Standard>::Type TIter;
+		TIter _begin, _end;
+		typename Size<TText>::Type _q;
+
+		template <typename TSize>
+		QGramLess_(TText &text, TSize q): 
+			_begin(begin(text, Standard())),
+			_end(end(text, Standard())),
+			_q(q) {}
+
+		// skip the first <offset> characters
+		template <typename TSize1, typename TSize2>
+		QGramLess_(TText &text, TSize1 q, TSize2 offset): 
+			_begin(begin(text, Standard()) + offset),
+			_end(end(text, Standard())),
+			_q(q) {}
+
+		inline bool operator() (TSAValue const a, TSAValue const b) const 
+		{
+			if (a == b) return false;
+			TIter itA = _begin + a;
+			TIter itB = _begin + b;
+			if (a <= b) {
+				TIter itEnd = itB + _q;
+				if (itEnd > _end)
+					itEnd = _end;
+				for(; itB != itEnd; ++itB, ++itA) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return false;
+			} else {
+				TIter itEnd = itA + _q;
+				if (itEnd > _end)
+					itEnd = _end;
+				for(; itA != itEnd; ++itA, ++itB) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return true;
+			}
+		}
+	};
+
+	template < typename TSAValue, typename TString, typename TSpec >
+	struct QGramLess_<TSAValue, StringSet<TString, TSpec> const> : 
+		public ::std::binary_function < TSAValue, TSAValue, bool >
+    {
+		typedef typename Iterator<TString, Standard>::Type TIter;
+		StringSet<TString, TSpec> const &_stringSet;
+		typename Size<TString>::Type _q;
+
+		template <typename TSize>
+		QGramLess_(StringSet<TString, TSpec> const &text, TSize q): 
+			_stringSet(text),
+			_q(q) {}
+
+		inline bool operator() (TSAValue const &a, TSAValue const &b) const 
+		{
+			if (a == b) return false;
+			TIter itA = begin(_stringSet[getValueI1(a)], Standard()) + getValueI2(a);
+			TIter itB = begin(_stringSet[getValueI1(b)], Standard()) + getValueI2(b);
+			if (suffixLength(a, _stringSet) > suffixLength(b, _stringSet)) {
+				TIter _end = end(_stringSet[getValueI1(b)], Standard());
+				TIter itEnd = itB + _q;
+				if (itEnd > _end)
+					itEnd = _end;
+				for(; itB != itEnd; ++itB, ++itA) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return false;
+			} else {
+				TIter _end = end(_stringSet[getValueI1(a)], Standard());
+				TIter itEnd = itA + _q;
+				if (itEnd > _end)
+					itEnd = _end;
+				for(; itA != itEnd; ++itA, ++itB) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return true;
+			}
+		}
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // QGramLessOffset
+	//
+	// compare two q-grams of a given text and skip the first <offset> characters
+    template < typename TSAValue, typename TText >
+	struct QGramLessOffset_ :
+		QGramLess_<TSAValue, TText>
+	{
+		template <typename TSize1, typename TSize2>
+		QGramLessOffset_(TText &text, TSize1 q, TSize2 offset): 
+			QGramLess_<TSAValue, TText> (text, q, offset) {}
+	};
+
+	template < typename TSAValue, typename TString, typename TSpec >
+	struct QGramLessOffset_<TSAValue, StringSet<TString, TSpec> const> : 
+		public ::std::binary_function < TSAValue, TSAValue, bool >
+    {
+		typedef typename Iterator<TString, Standard>::Type	TIter;
+		typedef typename Size<TString>::Type				TSize;
+		StringSet<TString, TSpec> const &_stringSet;
+		typename Size<TString>::Type _q, _offset;
+
+		template <typename TSize1, typename TSize2>
+		QGramLessOffset_(StringSet<TString, TSpec> const &text, TSize1 q, TSize2 offset): 
+			_stringSet(text),
+			_q(q),
+			_offset(offset) {}
+
+		inline bool operator() (TSAValue const &a, TSAValue const &b) const 
+		{
+			if (a == b) return false;
+			TString const &sA = _stringSet[getValueI1(a)];
+			TString const &sB = _stringSet[getValueI1(b)];
+			TIter itA = begin(sA, Standard()) + getValueI2(a) + _offset;
+			TIter itB = begin(sB, Standard()) + getValueI2(b) + _offset;
+			TSize restA = length(sA) - getValueI2(a);
+			TSize restB = length(sB) - getValueI2(b);
+			if (restA > restB) {
+				TIter itEnd;
+				if (restB >= _q)
+					itEnd = itB + _q;
+				else
+					itEnd = end(sB, Standard());
+				for(; itB != itEnd; ++itB, ++itA) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return false;
+			} else {
+				TIter itEnd;
+				if (restA >= _q)
+					itEnd = itA + _q;
+				else
+					itEnd = end(sA, Standard());
+				for(; itA != itEnd; ++itA, ++itB) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return true;
+			}
+		}
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // QGramLessNoCheck
+	//
+	// compare two q-grams of a given text (no check for q-grams smaller than q)
+    template < typename TSAValue, typename TText >
+	struct QGramLessNoCheck_ : 
+		public ::std::binary_function < TSAValue, TSAValue, bool >
+    {
+		typedef typename Iterator<TText, Standard>::Type TIter;
+		TIter _begin;
+		typename Size<TText>::Type _q;
+
+		template <typename TSize>
+		QGramLessNoCheck_(TText &text, TSize q): 
+			_begin(begin(text, Standard())),
+			_q(q) {}
+
+		// skip the first <offset> characters
+		template <typename TSize>
+		QGramLessNoCheck_(TText &text, TSize q, TSize offset): 
+			_begin(begin(text, Standard()) + offset),
+			_q(q) {}
+
+		inline bool operator() (TSAValue const a, TSAValue const b) const 
+		{
+			if (a == b) return false;
+			TIter itA = _begin + a;
+			TIter itB = _begin + b;
+			if (a <= b) {
+				TIter itEnd = itB + _q;
+				for(; itB != itEnd; ++itB, ++itA) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return false;
+			} else {
+				TIter itEnd = itA + _q;
+				for(; itA != itEnd; ++itA, ++itB) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return true;
+			}
+		}
+	};
+
+    template < typename TSAValue, typename TString, typename TSpec >
+	struct QGramLessNoCheck_<TSAValue, StringSet<TString, TSpec> const> : 
+		public ::std::binary_function < TSAValue, TSAValue, bool >
+    {
+		typedef typename Iterator<TString, Standard>::Type TIter;
+		StringSet<TString, TSpec> const &_stringSet;
+		typename Size<TString>::Type _q;
+
+		template <typename TSize>
+		QGramLessNoCheck_(StringSet<TString, TSpec> const &text, TSize q): 
+			_stringSet(text),
+			_q(q) {}
+
+		inline bool operator() (TSAValue const &a, TSAValue const &b) const 
+		{
+			if (a == b) return false;
+			TIter itA = begin(_stringSet[getValueI1(a)], Standard()) + getValueI2(a);
+			TIter itB = begin(_stringSet[getValueI1(b)], Standard()) + getValueI2(b);
+			if (suffixLength(a, _stringSet) > suffixLength(b, _stringSet)) {
+				TIter itEnd = itB + _q;
+				for(; itB != itEnd; ++itB, ++itA) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return false;
+			} else {
+				TIter itEnd = itA + _q;
+				for(; itA != itEnd; ++itA, ++itB) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return true;
+			}
+		}
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // QGramLessNoCheckOffset_
+	//
+	// compare two q-grams of a given text and skip the first <offset> characters
+    template < typename TSAValue, typename TText >
+	struct QGramLessNoCheckOffset_: QGramLessNoCheck_<TSAValue, TText> 
+	{
+		template <typename TSize1, typename TSize2>
+		QGramLessNoCheckOffset_(TText &text, TSize1 q, TSize2 offset): 
+			QGramLessNoCheck_<TSAValue, TText> (text, q, offset) {}
+	};
+
+	template < typename TSAValue, typename TString, typename TSpec >
+	struct QGramLessNoCheckOffset_<TSAValue, StringSet<TString, TSpec> const> : 
+		public ::std::binary_function < TSAValue, TSAValue, bool >
+    {
+		typedef typename Iterator<TString, Standard>::Type TIter;
+		StringSet<TString, TSpec> const &_stringSet;
+		typename Size<TString>::Type _q, _offset;
+
+		template <typename TSize1, typename TSize2>
+		QGramLessNoCheckOffset_(StringSet<TString, TSpec> const &text, TSize1 q, TSize2 offset): 
+			_stringSet(text),
+			_q(q),
+			_offset(offset) {}
+
+		inline bool operator() (TSAValue const &a, TSAValue const &b) const 
+		{
+			if (a == b) return false;
+			TIter itA = begin(_stringSet[getValueI1(a)], Standard()) + getValueI2(a) + _offset;
+			TIter itB = begin(_stringSet[getValueI1(b)], Standard()) + getValueI2(b) + _offset;
+			if (a <= b) {
+				TIter itEnd = itB + _q;
+				for(; itB != itEnd; ++itB, ++itA) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return false;
+			} else {
+				TIter itEnd = itA + _q;
+				for(; itA != itEnd; ++itA, ++itB) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return true;
+			}
+		}
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Counting sort - little helpers
+	//
+	
+	// map hashes 1:1 to directory
+	template < typename THashValue >
+	inline THashValue
+	requestBucket(Nothing &, THashValue hash)
+	{
+		return hash;
+	}
+
+	template < typename THashValue >
+	inline THashValue
+	getBucket(Nothing const &, THashValue hash)
+	{
+		return hash;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Counting sort - Step 1: Clear directory
+	template < typename TDir >
+	inline void
+	_qgramClearDir(TDir &dir, Nothing &)
+	{
+		arrayFill(begin(dir, Standard()), end(dir, Standard()), 0);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Counting sort - Step 2: Count q-grams
+	template < typename TDir, typename TBucketMap, typename TText, typename TShape, typename TStepSize >
+	inline void
+	_qgramCountQGrams(TDir &dir, TBucketMap &bucketMap, TText const &text, TShape shape, TStepSize stepSize)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type	TIterator;
+		typedef typename Value<TDir>::Type						TSize;
+
+		if (length(text) < length(shape)) return;
+		TSize num_qgrams = (length(text) - length(shape)) / stepSize + 1;
+
+		TIterator itText = begin(text, Standard());
+		++dir[requestBucket(bucketMap, hash(shape, itText))];
+		if (stepSize == 1)
+			for(TSize i = 1; i < num_qgrams; ++i)
+			{
+				++itText;
+				++dir[requestBucket(bucketMap, hashNext(shape, itText))];
+			}
+		else
+			for(TSize i = 1; i < num_qgrams; ++i)
+			{
+				itText += stepSize;
+				++dir[requestBucket(bucketMap, hash(shape, itText))];
+			}
+	}
+
+	template < typename TDir, typename TBucketMap, typename TString, typename TSpec, typename TShape, typename TStepSize >
+	inline void
+	_qgramCountQGrams(TDir &dir, TBucketMap &bucketMap, StringSet<TString, TSpec> const &stringSet, TShape shape, TStepSize stepSize)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TString const, Standard>::Type	TIterator;
+		typedef typename Value<TDir>::Type							TSize;
+
+		if (stepSize == 1)
+			for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+			{
+				TString const &sequence = value(stringSet, seqNo);
+				if (length(sequence) < length(shape)) continue;
+				TSize num_qgrams = length(sequence) - length(shape) + 1;
+
+				TIterator itText = begin(sequence, Standard());
+				++dir[requestBucket(bucketMap, hash(shape, itText))];
+				for(TSize i = 1; i < num_qgrams; ++i)
+				{
+					++itText;
+					++dir[requestBucket(bucketMap, hashNext(shape, itText))];
+				}
+			}
+		else
+			for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+			{
+				TString const &sequence = value(stringSet, seqNo);
+				if (length(sequence) < length(shape)) continue;
+				TSize num_qgrams = (length(sequence) - length(shape)) / stepSize + 1;
+
+				TIterator itText = begin(sequence, Standard());
+				for(TSize i = 0; i < num_qgrams; ++i)
+				{
+					++dir[requestBucket(bucketMap, hash(shape, itText))];
+					itText += stepSize;
+				}
+			}
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Counting sort - Step 3: Cumulative sum
+
+	// First two entries are 0.
+	// Step 4 increments the entries hash(qgram)+1 on-the-fly while filling the SA table.
+	// After step 4 each entry (0..n-1) is the beginning of a qgram bucket.
+	template < typename TDir, typename TWithConstraints >
+	inline typename Value<TDir>::Type
+	_qgramCummulativeSum(TDir &dir, TWithConstraints)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TDir, Standard>::Type			TDirIterator;
+		typedef typename Value<TDir>::Type						TSize;
+
+		TDirIterator it = begin(dir, Standard());
+		TDirIterator itEnd = end(dir, Standard());
+		TSize diff = 0, diff_prev = 0, sum = 0;
+		while (it != itEnd) 
+		{
+			if (TWithConstraints::VALUE && diff == (TSize)-1)
+			{
+				sum += diff_prev;
+				diff_prev = 0;
+				diff = *it;
+				*it = (TSize)-1;								// disable bucket
+			} else {
+				sum += diff_prev;
+				diff_prev = diff;
+				diff = *it;
+				*it = sum;
+			}
+			++it;
+		}
+		return sum + diff_prev;
+	}
+
+	// The first entry is 0.
+	// This function is used when Step 4 is ommited.
+	template < typename TDir, typename TWithConstraints >
+	inline typename Value<TDir>::Type
+	_qgramCummulativeSumAlt(TDir &dir, TWithConstraints const)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TDir, Standard>::Type			TDirIterator;
+		typedef typename Value<TDir>::Type						TSize;
+
+		TDirIterator it = begin(dir, Standard());
+		TDirIterator itEnd = end(dir, Standard());
+		TSize diff = 0, sum = 0;
+		while (it != itEnd) 
+		{
+			sum += diff;
+			diff = *it;
+			if (TWithConstraints::VALUE && diff == (TSize)-1) 
+				diff = 0;										// ignore disabled buckets
+			*it = sum;
+			++it;
+		}
+		return sum + diff;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Counting sort - Step 4: Fill suffix array
+	// w/o constraints
+	template <
+		typename TSA,
+		typename TText, 
+		typename TShape, 
+		typename TDir, 
+		typename TBucketMap, 
+		typename TWithConstraints, 
+		typename TStepSize >
+	inline void
+	_qgramFillSuffixArray(
+		TSA &sa, 
+		TText const &text, 
+		TShape shape, 
+		TDir &dir, 
+		TBucketMap &bucketMap, 
+		TStepSize stepSize,
+		TWithConstraints const)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type	TIterator;
+		typedef typename Value<TDir>::Type						TSize;
+
+		TSize num_qgrams = length(text) - length(shape) + 1;
+		TIterator itText = begin(text, Standard());
+
+		if (TWithConstraints::VALUE) {
+			TSize bktNo = getBucket(bucketMap, hash(shape, itText)) + 1;			// first hash
+			if (dir[bktNo] != (TSize)-1) sa[dir[bktNo]++] = 0;						// if bucket is enabled
+		} else
+			sa[dir[getBucket(bucketMap, hash(shape, itText)) + 1]++] = 0;			// first hash
+
+		if (stepSize == 1)
+			for(TSize i = 1; i < num_qgrams; ++i)
+			{
+				++itText;
+				if (TWithConstraints::VALUE) {
+					TSize bktNo = getBucket(bucketMap, hashNext(shape, itText)) + 1;	// next hash
+					if (dir[bktNo] != (TSize)-1) sa[dir[bktNo]++] = i;					// if bucket is enabled
+				} else
+					sa[dir[getBucket(bucketMap, hashNext(shape, itText)) + 1]++] = i;	// next hash
+			}
+		else
+			for(TSize i = 1; i < num_qgrams; i += stepSize)
+			{
+				itText += stepSize;
+				if (TWithConstraints::VALUE) {
+					TSize bktNo = getBucket(bucketMap, hash(shape, itText)) + 1;		// next hash (we mustn't use hashNext here)
+					if (dir[bktNo] != (TSize)-1) sa[dir[bktNo]++] = i;					// if bucket is enabled
+				} else
+					sa[dir[getBucket(bucketMap, hash(shape, itText)) + 1]++] = i;		// next hash
+			}
+	}
+
+	// multiple sequences
+	template <
+		typename TSA, 
+		typename TString, 
+		typename TSpec, 
+		typename TShape, 
+		typename TDir,
+		typename TBucketMap,
+		typename TStepSize,
+		typename TWithConstraints >
+	inline void
+	_qgramFillSuffixArray(
+		TSA &sa, 
+		StringSet<TString, TSpec> const &stringSet,
+		TShape shape, 
+		TDir &dir,
+		TBucketMap &bucketMap,
+		TStepSize stepSize,
+		TWithConstraints const)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TString const, Standard>::Type	TIterator;
+		typedef typename Value<TDir>::Type							TSize;
+
+		if (stepSize == 1)
+			for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+			{
+				TString const &sequence = value(stringSet, seqNo);
+				if (length(sequence) < length(shape)) continue;
+				TSize num_qgrams = length(sequence) - length(shape) + 1;
+
+				typename Value<TSA>::Type localPos;
+				assignValueI1(localPos, seqNo);
+				assignValueI2(localPos, 0);
+
+				TIterator itText = begin(sequence, Standard());
+				if (TWithConstraints::VALUE) {
+					TSize bktNo = getBucket(bucketMap, hash(shape, itText)) + 1;					// first hash
+					if (dir[bktNo] != (TSize)-1) sa[dir[bktNo]++] = localPos;						// if bucket is enabled
+				} else
+					sa[dir[getBucket(bucketMap, hash(shape, itText)) + 1]++] = localPos;			// first hash
+
+				for(TSize i = 1; i < num_qgrams; ++i)
+				{
+					++itText;
+					assignValueI2(localPos, i);
+					if (TWithConstraints::VALUE) {
+						TSize bktNo = getBucket(bucketMap, hashNext(shape, itText)) + 1;			// next hash
+						if (dir[bktNo] != (TSize)-1) sa[dir[bktNo]++] = localPos;					// if bucket is enabled
+					} else
+						sa[dir[getBucket(bucketMap, hashNext(shape, itText)) + 1]++] = localPos;	// next hash
+				}
+			}
+		else
+			for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+			{
+				TString const &sequence = value(stringSet, seqNo);
+				if (length(sequence) < length(shape)) continue;
+				TSize num_qgrams = length(sequence) - length(shape) + 1;
+
+				typename Value<TSA>::Type localPos;
+				assignValueI1(localPos, seqNo);
+				assignValueI2(localPos, 0);
+
+				TIterator itText = begin(sequence, Standard());
+				for(TSize i = 1; i < num_qgrams; i += stepSize)
+				{
+					assignValueI2(localPos, i);
+					if (TWithConstraints::VALUE) {
+						TSize bktNo = getBucket(bucketMap, hash(shape, itText)) + 1;				// hash
+						if (dir[bktNo] != (TSize)-1) sa[dir[bktNo]++] = localPos;					// if bucket is enabled
+					} else
+						sa[dir[getBucket(bucketMap, hash(shape, itText)) + 1]++] = localPos;		// hash
+					itText += stepSize;
+				}
+			}
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Step 5: Correct disabled buckets
+	template < typename TDir >
+	inline void
+	_qgramPostprocessBuckets(TDir &dir)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TDir, Standard>::Type			TDirIterator;
+		typedef typename Value<TDir>::Type						TSize;
+
+		TDirIterator it = begin(dir, Standard());
+		TDirIterator itEnd = end(dir, Standard());
+		TSize prev = 0;
+		for (; it != itEnd; ++it) 
+			if (*it == (TSize)-1)
+				*it = prev;
+			else
+				prev = *it;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.createQGramIndex:
+..summary:Builds a q-gram index on a sequence. 
+..cat:Index
+..signature:createQGramIndex(index)
+..signature:createQGramIndex(sa, dir, bucketMap, text, shape, stepSize) [DEPRECATED]
+..param.index:The q-gram index.
+...type:Spec.IndexQGram
+..param.sa:The resulting list in which all q-grams are sorted alphabetically.
+..param.dir:The resulting array that indicates at which position in index the corresponding q-grams can be found.
+..param.bucketMap:Stores the q-gram hashes for the openaddressing hash maps, see @Function.indexBucketMap at .
+If bucketMap is of the type @Tag.Nothing@ the q-gram hash determines the bucket address in the index.
+..param.text:The sequence.
+..param.shape:The shape to be used.
+...type:Class.Shape
+..param.stepSize:Store every $stepSize$'th q-gram in the index.
+..returns:Index contains the sorted list of qgrams. For each q-gram $dir$ contains the first position in index that corresponds to this q-gram.
+..remarks:This function should not be called directly. Please use @Function.indexCreate@ or @Function.indexRequire at .
+The resulting tables must have appropriate size before calling this function.
+..include:seqan/index.h
+*/
+
+	template < typename TIndex >
+	inline bool _qgramDisableBuckets(TIndex &)
+	{
+		return false;	// we disable no buckets by default
+	}
+
+	template < typename TIndex >
+	void createQGramIndex(TIndex &index)
+	{
+	SEQAN_CHECKPOINT
+		typename Fibre<TIndex, QGramText>::Type const &text      = indexText(index);
+		typename Fibre<TIndex, QGramSA>::Type         &sa        = indexSA(index);
+		typename Fibre<TIndex, QGramDir>::Type        &dir       = indexDir(index);
+		typename Fibre<TIndex, QGramShape>::Type      &shape     = indexShape(index);
+		typename Fibre<TIndex, QGramBucketMap>::Type  &bucketMap = index.bucketMap;
+		
+		// 1. clear counters
+		_qgramClearDir(dir, bucketMap);
+
+		// 2. count q-grams
+		_qgramCountQGrams(dir, bucketMap, text, shape, getStepSize(index));
+
+		if (_qgramDisableBuckets(index))
+		{
+			// 3. cumulative sum
+			_qgramCummulativeSum(dir, True());
+			
+			// 4. fill suffix array
+			_qgramFillSuffixArray(sa, text, shape, dir, bucketMap, getStepSize(index), True());
+
+			// 5. correct disabled buckets
+			_qgramPostprocessBuckets(dir);
+		}
+		else
+		{
+			// 3. cumulative sum
+			_qgramCummulativeSum(dir, False());
+			
+			// 4. fill suffix array
+			_qgramFillSuffixArray(sa, text, shape, dir, bucketMap, getStepSize(index), False());
+		} 
+	}
+
+	// DEPRECATED
+	// better use createQGramIndex(index) (above)
+	template <
+        typename TSA,
+		typename TDir,
+		typename TBucketMap,
+		typename TText,
+		typename TShape,
+		typename TStepSize >
+	void createQGramIndex(
+		TSA &sa,
+		TDir &dir,
+		TBucketMap &bucketMap,
+		TText const &text,
+		TShape &shape,
+		TStepSize stepSize)	
+	{
+	SEQAN_CHECKPOINT
+		
+		// 1. clear counters
+		_qgramClearDir(dir, bucketMap);
+
+		// 2. count q-grams
+		_qgramCountQGrams(dir, bucketMap, text, shape, stepSize);
+
+		// 3. cumulative sum
+		SEQAN_DO(_qgramCummulativeSum(dir, False()) == length(sa));
+		
+		// 4. fill suffix array
+		_qgramFillSuffixArray(sa, text, shape, dir, bucketMap, stepSize, False());
+	}
+
+	// DEPRECATED
+	// better use createQGramIndex(index) (above)
+	template <
+        typename TSA,
+		typename TDir,
+		typename TBucketMap,
+		typename TText,
+		typename TShape,
+		typename TStepSize >
+	void createQGramIndex(
+		TSA &sa,
+		TDir &dir,
+		TBucketMap &bucketMap,
+		TText const &text,
+		TShape &shape)	
+	{
+		createQGramIndex(sa, dir, bucketMap, text, shape, 1);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.createQGramIndexSAOnly:
+..summary:Builds the suffix array of a q-gram index on a sequence. 
+..cat:Index
+..signature:createQGramIndexSAOnly(sa, text, shape, stepSize)
+..param.sa:The resulting list in which all q-grams are sorted alphabetically.
+..param.text:The sequence.
+..param.shape:The shape to be used. q is the length of this shape
+...type:Class.Shape
+..param.stepSize:Store every $stepSize$'th q-gram in the index.
+..remarks:This function should not be called directly. Please use @Function.indexCreate@ or @Function.indexRequire at .
+The resulting tables must have appropriate size before calling this function.
+..include:seqan/index.h
+*/
+
+	template < 
+		typename TSA, 
+		typename TText,
+		typename TShape,
+		typename TStepSize >
+	void createQGramIndexSAOnly(
+		TSA &sa,
+		TText const &text,
+		TShape &shape,
+		TStepSize stepSize)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Size<TSA>::Type TSize;
+		typedef typename Iterator<TSA, Standard>::Type TIter;
+
+		// 1. Fill suffix array with a permutation (the identity)
+		TIter it = begin(sa, Standard());
+		TIter itEnd = end(sa, Standard());
+		TSize i = 0;
+		for(; it != itEnd; ++it, i += stepSize)
+			*it = i;
+
+		// 2. Sort suffix array with quicksort
+		TSize span = length(shape);
+		if (i + span > length(text) + 1)
+			::std::sort(
+				begin(sa, Standard()), 
+				end(sa, Standard()), 
+				QGramLess_<typename Value<TSA>::Type, TText const>(text, span));
+		else
+			::std::sort(
+				begin(sa, Standard()), 
+				end(sa, Standard()), 
+				QGramLessNoCheck_<typename Value<TSA>::Type, TText const>(text, span));
+	}
+
+	template < 
+		typename TSA, 
+		typename TString,
+		typename TSpec,
+		typename TShape,
+		typename TStepSize >
+	void createQGramIndexSAOnly(
+		TSA &sa,
+		StringSet<TString, TSpec> const &stringSet,
+		TShape &shape,
+		TStepSize stepSize)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TSA, Standard>::Type	TIter;
+		typedef typename Value<TSA>::Type				TValue;
+		typedef typename Size<TString>::Type			TSize;
+		typedef StringSet<TString, TSpec>				TStringSet;
+		
+		// 1. Fill suffix array with a permutation (the identity)
+		TIter it = begin(sa, Standard());
+		TValue pair;
+		unsigned int const q1 = length(shape) - 1;
+		for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+		{
+			unsigned int const strlen = length(stringSet[seqNo]);
+			if (strlen > q1) {
+				assignValueI1(pair, seqNo);
+				for (TSize i = 0; i < strlen - q1; ++it, i += stepSize) {
+					assignValueI2(pair, i);
+					*it = pair;
+				}
+			}
+		}
+
+		// 2. Sort suffix array with quicksort
+		TSize q = length(shape);
+		if (lengthSum(stringSet) == length(sa))
+			::std::sort(
+				begin(sa, Standard()), 
+				end(sa, Standard()), 
+				QGramLess_<typename Value<TSA>::Type, TStringSet const>(stringSet, q));
+		else
+			::std::sort(
+				begin(sa, Standard()), 
+				end(sa, Standard()), 
+				QGramLessNoCheck_<typename Value<TSA>::Type, TStringSet const>(stringSet, q));
+	}
+
+	template < 
+		typename TSA, 
+		typename TDir,
+		typename TText,
+		typename TSize1,
+		typename TSize2 >
+	void _refineQGramIndex(
+		TSA &sa,
+		TDir &dir,
+		TText const &text,
+		TSize1 oldQ,
+		TSize2 newQ)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Size<TSA>::Type TSize;
+		typedef typename Iterator<TSA, Standard>::Type		TIter;
+		typedef typename Iterator<TDir, Standard>::Type		TDirIter;
+
+		if (newQ <= (TSize2)oldQ) return;
+
+		if (length(dir) < 2) {
+			::std::sort(
+				begin(sa, Standard()), 
+				end(sa, Standard()), 
+				QGramLess_<typename Value<TSA>::Type, TText const>(text, newQ));
+			return;
+		}
+
+		// 1. Sort each bucket with quicksort and compare substrings s[i+oldQ..i+newQ)
+		TDirIter dirIt = begin(dir, Standard());
+		TDirIter dirItEnd = end(dir, Standard());
+		TIter itBegin = begin(sa, Standard());
+		TIter itBktBegin = itBegin + *dirIt;
+		TIter itBktEnd;
+		++dirIt;
+		for(; dirIt != dirItEnd; ++dirIt, itBktBegin = itBktEnd) {
+			itBktEnd = itBegin + *dirIt;
+			if (itBktEnd - itBktBegin < 2) continue;
+			::std::sort(
+				itBktBegin, 
+				itBktEnd, 
+				QGramLessOffset_<typename Value<TSA>::Type, TText const>(text, newQ - oldQ, oldQ));
+		}
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.createQGramIndexDirOnly:
+..summary:Builds the directory of a q-gram index on a sequence. 
+..cat:Index
+..signature:createQGramIndexDirOnly(dir, bucketMap, text, shape, stepSize)
+..param.dir:The resulting array that indicates at which position in index the corresponding q-grams can be found.
+..param.bucketMap:Stores the q-gram hashes for the openaddressing hash maps, see @Function.indexBucketMap at .
+If bucketMap is of the type @Tag.Nothing@ the q-gram hash determines the bucket address in the index.
+..param.text:The sequence.
+..param.shape:The shape to be used.
+...type:Class.Shape
+..param.stepSize:Store every $stepSize$'th q-gram in the index.
+..returns:Index contains the sorted list of qgrams. For each possible q-gram pos contains the first position in index that corresponds to this q-gram. 
+..remarks:This function should not be called directly. Please use @Function.indexCreate@ or @Function.indexRequire at .
+The resulting tables must have appropriate size before calling this function.
+..include:seqan/index.h
+*/
+
+	template <
+		typename TDir,
+		typename TBucketMap,
+		typename TText,
+		typename TShape,
+		typename TStepSize >
+	void createQGramIndexDirOnly(
+		TDir &dir,
+		TBucketMap &bucketMap,
+		TText const &text,
+		TShape &shape,
+		TStepSize stepSize)
+	{
+	SEQAN_CHECKPOINT
+
+		// 1. clear counters
+		_qgramClearDir(dir, bucketMap);
+
+		// 2. count q-grams
+		_qgramCountQGrams(dir, bucketMap, text, shape, stepSize);
+
+		// 3. cumulative sum (Step 4 is ommited)
+		_qgramCummulativeSumAlt(dir, False());
+	}
+
+	template < 
+		typename TDir,
+		typename TBucketMap,
+		typename TString,
+		typename TSpec,
+		typename TShape,
+		typename TStepSize >
+	void createQGramIndexDirOnly(
+		TDir &dir,
+		TBucketMap &bucketMap,
+		StringSet<TString, TSpec> const &stringSet,
+		TShape &shape,
+		TStepSize stepSize)
+	{
+	SEQAN_CHECKPOINT
+
+		// 1. clear counters
+		_qgramClearDir(dir, bucketMap);
+
+		// 2. count q-grams
+		_qgramCountQGrams(dir, bucketMap, stringSet, shape, stepSize);
+
+		// 3. cumulative sum (Step 4 is ommited)
+		_qgramCummulativeSumAlt(dir, False());
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.createCountArray:
+..summary:Builds an index on a StringSet storing how often a q-gram occurs in each sequence.
+..cat:Index
+..signature:createCountsArray(counts, dir, bucketMap, stringSet, shape, stepSize)
+..param.counts:The resulting list of pairs (seqNo,count).
+..param.dir:The resulting array that indicates at which position in the count table the corresponding a certain q-gram can be found.
+..param.bucketMap:Stores the q-gram hashes for the openaddressing hash maps, see @Function.indexBucketMap at .
+If bucketMap is of the type @Tag.Nothing@ the q-gram hash determines the bucket address in the index.
+..param.stringSet:The StringSet.
+...type:Class.StringSet
+..param.shape:The shape to be used.
+...type:Class.Shape
+..param.stepSize:Store every $stepSize$'th q-gram in the index.
+..remarks:This function should not be called directly. Please use @Function.indexCreate@ or @Function.indexRequire at .
+The resulting tables must have appropriate size before calling this function.
+..include:seqan/index.h
+*/
+
+	template < 
+		typename TCounts, 
+		typename TDir,
+		typename TBucketMap,
+		typename TString,
+		typename TSpec,
+		typename TShape,
+		typename TStepSize >
+	void createCountsArray(
+		TCounts &counts,
+		TDir &dir,
+		TBucketMap &bucketMap,
+		StringSet<TString, TSpec> const &stringSet,
+		TShape shape,
+		TStepSize stepSize)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TString const, Standard>::Type	TIterator;
+		typedef typename Iterator<TDir, Standard>::Type				TDirIterator;
+		typedef typename Value<TShape>::Type						TValue;
+		typedef typename Size<TString>::Type						TSize;
+
+		TDir lastSeqSeen;
+		resize(lastSeqSeen, length(dir));
+		
+		// 1. clear counters
+		_qgramClearDir(dir, bucketMap);
+		arrayFill(begin(lastSeqSeen, Standard()), end(lastSeqSeen, Standard()), -1);
+
+		// 2. count distinct sequences for each q-gram
+		for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+		{
+			TString const &sequence = value(stringSet, seqNo);
+			if (length(sequence) < length(shape)) continue;
+			TSize num_qgrams = (length(sequence) - length(shape)) / stepSize + 1;
+
+			TIterator itText = begin(sequence, Standard());
+			TValue bktNo = requestBucket(bucketMap, hash(shape, itText));
+			lastSeqSeen[bktNo] = seqNo;
+			++dir[bktNo];
+			if (stepSize == 1)
+				for(TSize i = 1; i < num_qgrams; ++i)
+				{
+					++itText;
+					bktNo = requestBucket(bucketMap, hashNext(shape, itText));
+					if (seqNo != lastSeqSeen[bktNo]) {
+						lastSeqSeen[bktNo] = seqNo;
+						++dir[bktNo];
+					}
+				}
+			else
+				for(TSize i = 1; i < num_qgrams; ++i)
+				{
+					itText += stepSize;
+					bktNo = requestBucket(bucketMap, hash(shape, itText));
+					if (seqNo != lastSeqSeen[bktNo]) {
+						lastSeqSeen[bktNo] = seqNo;
+						++dir[bktNo];
+					}
+				}
+		}
+
+		// 3. cumulative sum
+		resize(counts, _qgramCummulativeSum(dir, False()));
+
+		// 4. fill count array
+		arrayFill(begin(lastSeqSeen, Standard()), end(lastSeqSeen, Standard()), -1);
+		for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+		{
+			TString const &sequence = value(stringSet, seqNo);
+			if (length(sequence) < length(shape)) continue;
+			TSize num_qgrams = (length(sequence) - length(shape)) / stepSize + 1;
+
+			TIterator itText = begin(sequence, Standard());
+			TValue bktNo = getBucket(bucketMap, hash(shape, itText));
+			lastSeqSeen[bktNo] = seqNo;
+			TSize pos = dir[bktNo + 1]++;
+			counts[pos].i1 = seqNo;				// first hash
+			counts[pos].i2 = 1;
+
+			if (stepSize == 1)
+				for(TSize i = 1; i < num_qgrams; ++i)
+				{
+					++itText;
+					bktNo = getBucket(bucketMap, hashNext(shape, itText));
+					if (seqNo == lastSeqSeen[bktNo])
+						++(counts[dir[bktNo + 1] - 1].i2);
+					else {
+						lastSeqSeen[bktNo] = seqNo;
+						pos = dir[bktNo + 1]++;
+						counts[pos].i1 = seqNo;				// next hash
+						counts[pos].i2 = 1;
+					}
+				}
+			else
+				for(TSize i = 1; i < num_qgrams; ++i)
+				{
+					itText += stepSize;
+					bktNo = getBucket(bucketMap, hash(shape, itText));
+					if (seqNo == lastSeqSeen[bktNo])
+						++(counts[dir[bktNo + 1] - 1].i2);
+					else {
+						lastSeqSeen[bktNo] = seqNo;
+						pos = dir[bktNo + 1]++;
+						counts[pos].i1 = seqNo;				// next hash
+						counts[pos].i2 = 1;
+					}
+				}
+		}
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// create q-gram index of *one* sequence in external memory 
+
+	// *** COMPARATORS & MAPS ***
+        
+    template <typename InType, typename Result = int>
+    struct _qgramComp : public ::std::binary_function<InType,InType,Result> {
+        inline Result operator()(InType const &a, InType const &b) const
+        {
+			typedef typename Value<InType, 2>::Type TQGram;
+			typename Value<TQGram>::Type const *sa = a.i2.i;
+            typename Value<TQGram>::Type const *sb = b.i2.i;
+			typename Value<TQGram>::Type const *saEnd = sa + length(a.i2);
+
+            for(; sa != saEnd; ++sa, ++sb) {
+                if (*sa == *sb) continue;
+                return (*sa < *sb)? -1 : 1;
+            }
+			return posCompare(a.i1, b.i1);
+        }
+    };
+
+    // optimized for bitvectors
+    template <typename T1, typename TValue, unsigned _size, typename Result>
+    struct _qgramComp< Pair<T1, Tuple<TValue, _size, Compressed>, Compressed >, Result > :
+        public ::std::binary_function<
+            Pair<T1, Tuple<TValue, _size, Compressed>, Compressed >,
+            Pair<T1, Tuple<TValue, _size, Compressed>, Compressed >,
+            Result> {       
+        inline Result operator()(
+            const Pair<T1, Tuple<TValue, _size, Compressed>, Compressed > &a,
+            const Pair<T1, Tuple<TValue, _size, Compressed>, Compressed > &b) const
+        {
+            if (a.i2 < b.i2) return -1;
+            if (a.i2 > b.i2) return 1;
+			return posCompare(a.i1, b.i1);
+        }
+    };
+
+
+    template <typename TValue, typename TResult = unsigned>
+    struct _qgramHash : public ::std::unary_function<TValue, TResult> {
+        inline TResult operator()(TValue const &a) const
+        {
+			typedef typename Value<TValue, 2>::Type	TQGram;
+			TResult hash = 0;
+			unsigned len = length(a.i2);
+            for (unsigned i = 0; i < len; ++i) {
+				hash *= ValueSize< typename Value<TQGram>::Type >::VALUE;
+				hash += ordValue(a.i2[i]);
+            }
+            return hash;
+        }
+    };
+
+	// TODO: replace fixed tuple size of 6 with q and add q to Shape template arguments
+	template < 
+		typename TSA, 
+		typename TDir,
+		typename TText,
+		typename TValue,
+		unsigned q >
+	void createQGramIndexExt(
+		TSA &suffixArray,
+		TDir &dir,
+		TText &text,
+		Shape<TValue, UngappedShape<q> >)
+	{
+        // signed characters behave different than unsigned when compared
+        // to get the same index with signed or unsigned chars we simply cast them to unsigned
+        // before feeding them into the pipeline
+		typedef Shape<TValue, UngappedShape<q> >					TShape;
+        typedef typename MakeUnsigned_<TValue>::Type				TUValue;
+
+        // *** SPECIALIZATION ***
+
+		typedef Pipe< TText, Source<> >								TSource;
+        typedef Pipe< TSource, Caster<TUValue, CasterConvert> >		TUnsigner;
+		typedef Pipe< TUnsigner, Tupler<q> >						TTupler;
+						                typedef _qgramComp<TypeOf_(TTupler)> qcomp_t;
+        typedef Pool< 
+					TypeOf_(TTupler), 
+					SorterSpec< SorterConfigSize<qcomp_t, TSizeOf_(TTupler) > > 
+				> TSortTuples;
+										typedef _qgramHash<TypeOf_(TTupler), typename Size<TDir>::Type> qhash_t;
+
+        // *** INSTANTIATION ***
+
+		TSource			src(text);
+        TUnsigner		unsigner(src);
+		TTupler			tupler(unsigner);
+		TSortTuples		sorter;
+
+		// sort q-grams
+		sorter << tupler;
+
+		// fill sa and dir
+		if (!beginRead(sorter)) return;
+
+		typename Iterator<TSA>::Type itSA = begin(suffixArray);
+		typename Iterator<TDir>::Type itDir = begin(dir);
+
+		qcomp_t	qcomp;
+		qhash_t qhash;
+
+		typename Value<TSortTuples>::Type	old_qgram;
+		typename Size<TDir>::Type			hash, old_hash = 0;
+        typename Size<TSortTuples>::Type	leftToRead = length(sorter);
+		bool first = true;
+
+		for (leftToRead = length(sorter); leftToRead > 0; --leftToRead, ++sorter, ++itSA)
+		{
+			// copy occurence position
+			*itSA = (*sorter).i1;
+			if (first || qcomp(old_qgram, *sorter) != 0) 
+			{
+				old_qgram = *sorter;
+				hash = qhash(old_qgram);
+
+				SEQAN_ASSERT(old_hash < hash);
+
+				// copy bucket begin
+				typename Size<TSortTuples>::Type i = length(sorter) - leftToRead;
+				for(; old_hash < hash; ++old_hash, ++itDir)
+					*itDir = i;
+				first = false;
+			}
+		}
+
+		// fill bucket table
+		typename Size<TSortTuples>::Type i = length(sorter);
+		hash = length(dir);
+		for(; old_hash < hash; ++old_hash, ++itDir)
+			*itDir = i;
+
+		endRead(sorter);
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// create q-gram index of *multiple* sequences in external memory 
+
+	template < 
+		typename TSA, 
+		typename TDir,
+		typename TString,
+		typename TSpec,
+		typename TValue,
+		unsigned q,
+		typename TLimitsString >
+	void createQGramIndexExt(
+		TSA &suffixArray,
+		TDir &dir,
+		StringSet<TString, TSpec> const &stringSet,
+		Shape<TValue, UngappedShape<q> >,
+		TLimitsString &limits)
+	{
+        // signed characters behave different than unsigned when compared
+        // to get the same index with signed or unsigned chars we simply cast them to unsigned
+        // before feeding them into the pipeline
+		typedef typename Concatenator<StringSet<TString, TSpec> >::Type	TConcat;
+		typedef Shape<TValue, UngappedShape<q> >						TShape;
+        typedef typename MakeUnsigned_<TValue>::Type					TUValue;
+		typedef Multi<
+			Tupler<q, true, Compressed>, 
+			typename Value<TSA>::Type,
+			typename StringSetLimits< StringSet<TString, TSpec> >::Type >		TTuplerSpec;
+
+        // *** SPECIALIZATION ***
+
+		typedef Pipe< TConcat, Source<> >							TSource;
+        typedef Pipe< TSource, Caster<TUValue, CasterConvert> >		TUnsigner;
+		typedef Pipe< TUnsigner, TTuplerSpec >						TTupler;
+						                typedef _qgramComp<TypeOf_(TTupler)> qcomp_t;
+        typedef Pool< 
+					TypeOf_(TTupler), 
+					SorterSpec< SorterConfigSize<qcomp_t, TSizeOf_(TTupler) > > 
+				> TSortTuples;
+										typedef _qgramHash<TypeOf_(TTupler), typename Size<TDir>::Type> qhash_t;
+
+        // *** INSTANTIATION ***
+
+		TSource			src(concat(stringSet));
+        TUnsigner		unsigner(src);
+		TTupler			tupler(unsigner, limits);
+		TSortTuples		sorter;
+
+		// sort q-grams
+		sorter << tupler;
+
+		// fill sa and dir
+		if (!beginRead(sorter)) return;
+
+		typename Iterator<TSA>::Type itSA = begin(suffixArray);
+		typename Iterator<TDir>::Type itDir = begin(dir);
+
+		qcomp_t	qcomp;
+		qhash_t qhash;
+
+		typename Value<TSortTuples>::Type	old_qgram = *sorter;
+		typename Size<TDir>::Type			hash, old_hash = 0;
+        typename Size<TSortTuples>::Type	leftToRead;
+		bool first = true;
+
+		for (leftToRead = length(sorter); leftToRead > 0; --leftToRead, ++sorter, ++itSA)
+		{
+			// copy occurence position
+			*itSA = (*sorter).i1;
+			
+			if (first || qcomp(old_qgram, *sorter) != 0) 
+			{
+				old_qgram = *sorter;
+				hash = qhash(old_qgram);
+				
+				SEQAN_ASSERT_LEQ(old_hash, hash);
+
+				// copy bucket begin
+				typename Size<TSortTuples>::Type i = length(sorter) - leftToRead;
+				for(; old_hash < hash; ++old_hash, ++itDir)
+					*itDir = i;
+				first = false;
+			}
+		}
+
+		// fill bucket table
+		typename Size<TSortTuples>::Type i = length(sorter);
+		hash = length(dir);
+		for(; old_hash < hash; ++old_hash, ++itDir)
+			*itDir = i;
+
+		endRead(sorter);
+	}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// interface for automatic index creation 
+
+	template <typename TText, typename TShapeSpec, typename TSpec>
+	inline typename Size<Index<TText, IndexQGram<TShapeSpec, TSpec> > >::Type
+	_qgramQGramCount(Index<TText, IndexQGram<TShapeSpec, TSpec> > const &index)
+	{
+		typedef Index<TText, IndexQGram<TShapeSpec, TSpec> >	TIndex;
+		typedef typename Fibre<TIndex, QGramShape>::Type		TShape;
+		typedef typename Size<TIndex>::Type						TSize;
+
+		TShape const &shape = indexShape(index);
+
+		// count all overlapping q-grams
+		TSize stepSize = getStepSize(index);
+		TSize qgramCount = 0;
+		for(unsigned i = 0; i < countSequences(index); ++i)
+			if (sequenceLength(i, index) >= length(shape))
+				qgramCount += (sequenceLength(i, index) - length(shape)) / stepSize + 1;
+		return qgramCount;
+	}
+
+	template <typename TText, typename TShapeSpec, typename TSpec>
+	inline bool indexCreate(
+		Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, 
+		FibreSADir, 
+		Default const) 
+	{		
+		resize(indexSA(index), _qgramQGramCount(index), Exact());
+		resize(indexDir(index), _fullDirLength(index), Exact());
+		createQGramIndex(index);
+		return true;
+	}
+
+	template <typename TText, typename TSpec>
+	inline bool indexSupplied(Index<TText, TSpec> &index, FibreSADir) {
+		return !(empty(getFibre(index, FibreSA())) || empty(getFibre(index, FibreDir())));
+	}
+
+	template <typename TText, typename TShapeSpec, typename TSpec>
+	inline bool indexCreate(
+		Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, 
+		FibreSA, 
+		Default const)
+	{
+		resize(indexSA(index), _qgramQGramCount(index), Exact());
+		createQGramIndexSAOnly(indexSA(index), indexText(index), indexShape(index), getStepSize(index));
+		return true;
+	}
+
+	template <typename TText, typename TShapeSpec, typename TSpec>
+	inline bool indexCreate(
+		Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, 
+		FibreCounts, 
+		Default const) 
+	{
+		resize(indexCountsDir(index), _fullDirLength(index), Exact());
+		createCountsArray(indexCounts(index), indexCountsDir(index), indexBucketMap(index), indexText(index), indexShape(index), getStepSize(index));
+		return true;
+	}
+
+	template <typename TText, typename TShapeSpec, typename TSpec>
+	inline bool indexCreate(
+		Index<TText, IndexQGram<TShapeSpec, TSpec> > &index, 
+		FibreDir, 
+		Default const)
+	{
+		typedef Index<TText, IndexQGram<TShapeSpec, TSpec> > TIndex;
+
+		resize(indexDir(index), _fullDirLength(index), Exact());
+		createQGramIndexDirOnly(indexDir(index), indexBucketMap(index), indexText(index), indexShape(index), getStepSize(index));
+		return true;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getKmerSimilarityMatrix:
+..summary:Creates a matrix storing the number of common q-grams between all pairs of sequences.
+..cat:Index
+..signature:getKmerSimilarityMatrix(index, distMat[, seqSet])
+..param.index:A q-gram index.
+...type:Spec.IndexQGram
+..param.distMat:The resulting q-gram similarity matrix.
+...type:Concept.Container
+..param.seqSet:Contains sequence numbers if only a subset of sequences should be compared.
+...type:Concept.Container
+..remarks:$distMat$ will be resized to $seqCount*seqCount$, where $seqCount$ is the number of sequences in the index/in $seqSet$.
+The number of common q-grams between sequence $i$ and $j$ is stored at position $i*seqCount + j$.
+It sums up the minimum number of q-gram occurrences between both sequences for each q-gram.
+..include:seqan/index.h
+*/
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TDistMatrix >
+	inline void getKmerSimilarityMatrix(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, 
+		TDistMatrix &distMat)
+	{
+		typedef Index< TObject, IndexQGram<TShapeSpec,TSpec> >	TIndex;
+		typedef typename Size<TIndex>::Type						TSize;
+		typedef typename Size<TDistMatrix>::Type				TSizeMat;
+		typedef typename Value<TDistMatrix>::Type				TValueMat;
+
+		typedef typename Fibre<TIndex, QGramCountsDir>::Type	TCountsDir;
+		typedef typename Iterator<TCountsDir, Standard>::Type	TIterCountsDir;
+		typedef typename Fibre<TIndex, QGramCounts>::Type		TCounts;
+		typedef typename Iterator<TCounts, Standard>::Type		TIterCounts;
+
+		// declare requirements
+		indexRequire(index, QGramCounts());
+
+		// initialize distance matrix
+		TSizeMat seqNoLength = countSequences(index);
+		clear(distMat);
+		resize(distMat, seqNoLength * seqNoLength);
+		arrayFill(begin(distMat, Standard()), end(distMat, Standard()), 0);
+
+		TIterCountsDir itCountsDir = begin(indexCountsDir(index), Standard());
+		TIterCountsDir itCountsDirEnd = end(indexCountsDir(index), Standard());
+		TIterCounts itCountsBegin = begin(indexCounts(index), Standard());
+
+		// for each bucket count common q-grams for each sequence pair
+		TSize bucketBegin = *itCountsDir;
+		for(++itCountsDir; itCountsDir != itCountsDirEnd; ++itCountsDir) 
+		{
+			TSize bucketEnd = *itCountsDir;
+
+			// q-gram must occur in at least 2 different sequences
+			if (bucketBegin != bucketEnd) 
+			{
+				TIterCounts itA = itCountsBegin + bucketBegin;
+				TIterCounts itEnd = itCountsBegin + bucketEnd;
+				for(; itA != itEnd; ++itA) 
+				{
+					TSizeMat ofs = (*itA).i1 * seqNoLength;
+					TSize countA = (*itA).i2;
+					TIterCounts itB = itA;
+
+					for(; itB != itEnd; ++itB) 
+					{
+						TSize countB = (*itB).i2;
+						if (countA < countB)
+							distMat[ofs + (*itB).i1] += countA;
+						else
+							distMat[ofs + (*itB).i1] += countB;
+					}
+				}
+			}
+			bucketBegin = bucketEnd;
+		}
+
+		// copy upper triangle to lower triangle and scale
+		for(TSizeMat row = 0; row < seqNoLength; ++row) 
+		{
+			TValueMat maxValRow = distMat[row * (seqNoLength + 1)];
+			for(TSizeMat col = row + 1; col < seqNoLength; ++col)
+			{
+				// fractional common kmer count
+				TValueMat maxValCol = distMat[col * (seqNoLength + 1)];
+				TValueMat val = distMat[row * seqNoLength + col];
+
+				// number of common q-grams / Number of possible common q-grams
+				if (maxValRow < maxValCol) {
+					if (maxValRow != 0)
+						val /= maxValRow;
+					distMat[col * seqNoLength + row] = val;
+					distMat[row * seqNoLength + col] = val;
+				} else {
+					if (maxValCol != 0)
+						val /= maxValCol;
+					distMat[col * seqNoLength + row] = val;
+					distMat[row * seqNoLength + col] = val;
+				}
+			}
+		}
+
+		// set diagonal to 1
+		for(TSizeMat i = 0; i < seqNoLength; ++i)
+			distMat[i * (seqNoLength + 1)] = 1;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// getKmerSimilarityMatrix 
+//     for a subset of the StringSet given as a sorted string of sequence numbers
+
+	template < 
+		typename TObject, 
+		typename TShapeSpec, 
+		typename TSpec, 
+		typename TDistMatrix, 
+		typename TSeqNoString 
+	>
+	inline void getKmerSimilarityMatrix(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, 
+		TDistMatrix &distMat,
+		TSeqNoString const &seqNo)
+	{
+		typedef Index< TObject, IndexQGram<TShapeSpec,TSpec> >	TIndex;
+		typedef typename Size<TIndex>::Type						TSize;
+		typedef typename Size<TDistMatrix>::Type				TSizeMat;
+		typedef typename Value<TDistMatrix>::Type				TValueMat;
+
+		typedef typename Fibre<TIndex, QGramCountsDir>::Type	TCountsDir;
+		typedef typename Iterator<TCountsDir, Standard>::Type	TIterCountsDir;
+		typedef typename Fibre<TIndex, QGramCounts>::Type		TCounts;
+		typedef typename Iterator<TCounts, Standard>::Type		TIterCounts;
+		typedef typename Iterator<TSeqNoString, Standard>::Type	TIterSeqNo;
+
+		// declare requirements
+		indexRequire(index, QGramCounts());
+
+		// initialize distance matrix
+		TSizeMat seqNoLength = length(seqNo);
+		clear(distMat);
+		resize(distMat, seqNoLength * seqNoLength);
+		arrayFill(begin(distMat, Standard()), end(distMat, Standard()), 0);
+
+		TIterCountsDir itCountsDir = begin(indexCountsDir(index), Standard());
+		TIterCountsDir itCountsDirEnd = end(indexCountsDir(index), Standard());
+		TIterCounts itCountsBegin = begin(indexCounts(index), Standard());
+		TIterSeqNo itSetBegin = begin(seqNo, Standard());
+		TIterSeqNo itSetEnd = end(seqNo, Standard());
+
+		// for each bucket count common q-grams for each sequence pair
+		TSize bucketBegin = *itCountsDir;
+		for(++itCountsDir; itCountsDir != itCountsDirEnd; ++itCountsDir) 
+		{
+			TSize bucketEnd = *itCountsDir;
+
+			// q-gram must occur in at least 2 different sequences
+			if (bucketBegin != bucketEnd) 
+			{
+				TIterCounts itA = itCountsBegin + bucketBegin;
+				TIterCounts itEnd = itCountsBegin + bucketEnd;
+				TIterSeqNo itSetA = itSetBegin;
+
+				while (itA != itEnd && itSetA != itSetEnd)
+				{
+					if ((*itA).i1 < *itSetA)
+						++itA;
+					else if ((*itA).i1 > *itSetA)
+						++itSetA;
+					else 
+					{
+						TSizeMat ofs = (itSetA - itSetBegin) * seqNoLength;
+						TSize countA = (*itA).i2;
+						TIterCounts itB = itA;
+						TIterSeqNo itSetB = itSetA;
+
+						while (itB != itEnd && itSetB != itSetEnd)
+						{
+							if ((*itB).i1 < *itSetB)
+								++itB;
+							else if ((*itB).i1 > *itSetB)
+								++itSetB;
+							else 
+							{
+								TSize countB = (*itB).i2;
+								if (countA < countB)
+									distMat[ofs + (itSetB - itSetBegin)] += countA;
+								else
+									distMat[ofs + (itSetB - itSetBegin)] += countB;
+								++itB;
+								++itSetB;
+							}
+						}
+						++itA;
+						++itSetA;
+					}
+				}
+			}
+			bucketBegin = bucketEnd;
+		}
+
+		// copy upper triangle to lower triangle and scale
+		for(TSizeMat row = 0; row < seqNoLength; ++row) 
+		{
+			TValueMat maxValRow = distMat[row * (seqNoLength + 1)];
+			for(TSizeMat col = row + 1; col < seqNoLength; ++col)
+			{
+				// fractional common kmer count
+				TValueMat maxValCol = distMat[col * (seqNoLength + 1)];
+				TValueMat val = distMat[row * seqNoLength + col];
+
+				// number of common q-grams / Number of possible common q-grams
+				if (maxValRow < maxValCol) {
+					if (maxValRow != 0)
+						val /= maxValRow;
+					distMat[col * seqNoLength + row] = val;
+					distMat[row * seqNoLength + col] = val;
+				} else {
+					if (maxValCol != 0)
+						val /= maxValCol;
+					distMat[col * seqNoLength + row] = val;
+					distMat[row * seqNoLength + col] = val;
+				}
+			}
+		}
+
+		// set diagonal to 1
+		for(TSizeMat i = 0; i < seqNoLength; ++i)
+			distMat[i * (seqNoLength + 1)] = 1;
+	}
+	
+	
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.range:
+..signature:range(index, shape)
+..param.index:A q-gram index.
+...type:Spec.IndexQGram
+..param.shape:A shape object.
+...note:The shape stores the q-gram of the last call to @Function.hash@ or @Function.hashNext at .
+...type:Class.Shape
+..returns:All positions where the q-gram stored in $shape$ occurs in the text (see @Tag.QGram Index Fibres.QGramText@)
+are stored in a contiguous range of the suffix array.
+$range$ returns begin and end position of this range.
+If the type of $index$ is $TIndex$ the return type is $Pair<Size<TIndex>::Type>.
+..note:The necessary index tables are built on-demand via @Function.indexRequire@ if index is not $const$.
+..include:seqan/index.h
+*/
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline Pair<typename Size< Index< TObject, IndexQGram<TShapeSpec, TSpec> > >::Type>
+	range(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index,
+		Shape< TValue, TShapeSpec2 > const &shape)
+	{
+		typedef typename Size< Index< TObject, IndexQGram<TShapeSpec, TSpec> > >::Type TSize;
+		typedef typename Size< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreDir>::Type>::Type TDirSize;
+		TDirSize bucket = getBucket(indexBucketMap(index), value(shape));
+		return Pair<TSize>(indexDir(index)[bucket], indexDir(index)[bucket + 1]);
+	}
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline Pair<typename Size< Index< TObject, IndexQGram<TShapeSpec, TSpec> > >::Type>
+	range(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index,
+		Shape< TValue, TShapeSpec2 > const &shape)
+	{
+		indexRequire(index, QGramDir());
+		return getOccurrences(const_cast<Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &>(index), shape);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getOccurrence:
+..signature:getOccurrence(index, shape)
+..param.index:A q-gram index.
+...type:Spec.IndexQGram
+..param.shape:A shape object.
+...note:The shape stores the q-gram of the last call to @Function.hash@ or @Function.hashNext at .
+...type:Class.Shape
+..returns:A position where the q-gram stored in $shape$ occurs in the text (see @Tag.QGram Index Fibres.QGramText@).
+If the type of $index$ is $TIndex$ the return type is $SAValue<TIndex>::Type$.
+..include:seqan/index.h
+*/
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline typename SAValue< Index< TObject, IndexQGram<TShapeSpec, TSpec> > >::Type
+	getOccurrence(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index,
+		Shape< TValue, TShapeSpec2 > const &shape) 
+	{
+		return saAt(indexDir(index)[getBucket(indexBucketMap(index), value(shape))], index);
+	}
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline typename SAValue< Index< TObject, IndexQGram<TShapeSpec, TSpec> > >::Type
+	getOccurrence(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index,
+		Shape< TValue, TShapeSpec2 > const &shape) 
+	{
+		indexRequire(index, QGramSADir());
+		return getOccurrence(const_cast<Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &>(index), shape);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getOccurrences:
+..signature:getOccurrences(index, shape)
+..param.index:A q-gram index.
+...type:Spec.IndexQGram
+..param.shape:A shape object.
+...note:The shape stores the q-gram of the last call to @Function.hash@ or @Function.hashNext at .
+...type:Class.Shape
+..returns:All positions where the q-gram stored in $shape$ occurs in the text (see @Tag.QGram Index Fibres.QGramText@).
+If the type of $index$ is $TIndex$ the return type is $Infix<Fibre<TIndex, QGramSA>::Type const>::Type$.
+..remarks:The necessary index tables are built on-demand via @Function.indexRequire@ if index is not $const$.
+..include:seqan/index.h
+*/
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline typename Infix< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreSA>::Type const >::Type 
+	getOccurrences(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index,
+		Shape< TValue, TShapeSpec2 > const &shape) 
+	{
+		typedef typename Size<typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreDir>::Type>::Type TDirSize;
+		TDirSize bucket = getBucket(indexBucketMap(index), value(shape));
+		return infix(indexSA(index), indexDir(index)[bucket], indexDir(index)[bucket + 1]);
+	}	
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline typename Infix< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreSA>::Type const >::Type 
+	getOccurrences(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index,
+		Shape< TValue, TShapeSpec2 > const &shape) 
+	{
+		indexRequire(index, QGramSADir());
+		return getOccurrences(const_cast<Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &>(index), shape);
+	}	
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.countOccurrences:
+..signature:countOccurrences(index, shape)
+..param.index:A q-gram index.
+...type:Spec.IndexQGram
+..param.shape:A shape object.
+...note:The shape stores the q-gram of the last call to @Function.hash@ or @Function.hashNext at .
+...type:Class.Shape
+..returns:The number of positions where the q-gram stored in $shape$ occurs in the text (see @Tag.QGram Index Fibres.QGramText@).
+If the type of $index$ is $TIndex$ the return type is $Size<TIndex>::Type$.
+..note:The necessary index tables are built on-demand via @Function.indexRequire@ if index is not $const$.
+..include:seqan/index.h
+*/
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline typename Size< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreSA>::Type const >::Type 
+	countOccurrences(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index,
+		Shape< TValue, TShapeSpec2 > const &shape) 
+	{
+		typedef typename Size<typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreDir>::Type>::Type TDirSize;
+		TDirSize bucket = getBucket(indexBucketMap(index), value(shape));
+		return indexDir(index)[bucket + 1] - indexDir(index)[bucket];
+	}	
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline typename Size< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreSA>::Type const >::Type 
+	countOccurrences(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index,
+		Shape< TValue, TShapeSpec2 > const &shape) 
+	{
+		indexRequire(index, QGramDir());
+		return countOccurrences(const_cast<Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &>(index), shape);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.countOccurrencesMultiple:
+..summary:Returns the number of occurences of a q-gram for every sequence of a @Class.StringSet@ .
+..signature:countOccurrencesMultiple(index, shape)
+..param.index:A q-gram index of a @Class.StringSet at .
+...type:Spec.IndexQGram
+..param.shape:A shape object.
+...note:The shape stores the q-gram of the last call to @Function.hash@ or @Function.hashNext at .
+...type:Class.Shape
+..returns:A sequence of @Class.Pair.pairs@ (seqNo,count), count>0.
+For every @Class.StringSet@ sequence the q-gram occurs in, seqNo is the sequence number and count the number of occurrences.
+If the type of $index$ is $TIndex$ the return type is $Infix<Fibre<TIndex, QGramCounts>::Type const>::Type$.
+..remarks:The necessary index tables are built on-demand via @Function.indexRequire@ if index is not $const$.
+..see:Function.countOccurrences
+..include:seqan/index.h
+*/
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline typename Infix< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreCounts>::Type const >::Type 
+	countOccurrencesMultiple(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &index,
+		Shape< TValue, TShapeSpec2 > const &shape) 
+	{
+		typedef typename Size<typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreCountsDir>::Type>::Type TDirSize;
+		TDirSize bucket = getBucket(indexBucketMap(index), value(shape));
+		return infix(indexCounts(index), indexCountsDir(index)[bucket], indexCountsDir(index)[bucket + 1]);
+	}	
+
+	template < typename TObject, typename TShapeSpec, typename TSpec, typename TShapeSpec2, typename TValue >
+	inline typename Infix< typename Fibre< Index< TObject, IndexQGram<TShapeSpec, TSpec> >, FibreCounts>::Type const >::Type 
+	countOccurrencesMultiple(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index,
+		Shape< TValue, TShapeSpec2 > const &shape) 
+	{
+		indexRequire(index, QGramCounts());
+		return countOccurrencesMultiple(const_cast<Index< TObject, IndexQGram<TShapeSpec, TSpec> > const &>(index), shape);
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// clear
+
+	template < typename TText, typename TShapeSpec, typename TSpec >
+	inline void clear(Index<TText, IndexQGram<TShapeSpec, TSpec> > &index)
+	{
+		clear(getFibre(index, QGramSA()));
+		clear(getFibre(index, QGramDir()));
+		clear(getFibre(index, QGramCounts()));
+		clear(getFibre(index, QGramCountsDir()));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// open
+
+	template < typename TObject, typename TShapeSpec, typename TSpec >
+	inline bool open(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, 
+		const char *fileName,
+		int openMode)
+	{
+		String<char> name;
+		name = fileName;	append(name, ".txt");
+		bool result = true;
+		if ((!open(getFibre(index, QGramText()), toCString(name), openMode)) && 
+			(!open(getFibre(index, QGramText()), fileName, openMode)))
+			result = false;
+
+		name = fileName;	append(name, ".sa");	open(getFibre(index, QGramSA()), toCString(name), openMode);
+		name = fileName;	append(name, ".dir");	open(getFibre(index, QGramDir()), toCString(name), openMode);
+		return result;
+	}
+	template < typename TObject, typename TShapeSpec, typename TSpec >
+	inline bool open(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, 
+		const char *fileName)
+	{
+		return open(index, fileName, OPEN_RDONLY);
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// save
+
+	template < typename TObject, typename TShapeSpec, typename TSpec >
+	inline bool save(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, 
+		const char *fileName,
+		int openMode)
+	{
+		String<char> name;
+		name = fileName;	append(name, ".txt");
+		if ((!save(getFibre(index, QGramText()), toCString(name), openMode)) && 
+			(!save(getFibre(index, QGramText()), fileName, openMode))) return false;
+
+		name = fileName;	append(name, ".sa");	save(getFibre(index, QGramSA()), toCString(name), openMode);
+		name = fileName;	append(name, ".dir");	save(getFibre(index, QGramDir()), toCString(name), openMode);
+		return true;
+	}
+	template < typename TObject, typename TShapeSpec, typename TSpec >
+	inline bool save(
+		Index< TObject, IndexQGram<TShapeSpec, TSpec> > &index, 
+		const char *fileName)
+	{
+		return save(index, fileName, OPEN_WRONLY | OPEN_CREATE);
+	}
+
+}
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/index/index_qgram_openaddressing.h b/src/SeqAn-1.3/seqan/index/index_qgram_openaddressing.h
new file mode 100644
index 0000000..1f8271d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_qgram_openaddressing.h
@@ -0,0 +1,341 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_QGRAM_OPENADRESSING_H
+#define SEQAN_HEADER_INDEX_QGRAM_OPENADRESSING_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	struct OpenAddressing_;
+	typedef Tag<OpenAddressing_> OpenAddressing;
+	
+	template <typename THashValue>
+	struct BucketMap 
+	{
+		String<THashValue>	qgramHash;
+		THashValue			prime;
+	};
+
+	// use the index value type as shape value type
+	template < typename TObject, typename TShapeSpec >
+	struct Fibre< Index<TObject, IndexQGram<TShapeSpec, OpenAddressing> >, FibreBucketMap>
+	{
+		typedef typename Fibre< Index<TObject, IndexQGram<TShapeSpec, OpenAddressing> >, FibreShape>::Type TShape;
+		typedef typename Value<TShape>::Type	THashValue;
+		typedef BucketMap<THashValue>			Type;
+	};
+	
+/**
+.Spec.OpenAddressing
+..summary:An index based on an array of sorted q-grams.
+..cat:Index
+..general:Spec.IndexQGram
+..signature:Index<TText, IndexQGram<TShapeSpec, OpenAddressing> >
+..param.TText:The text type.
+...type:Class.String
+..param.TShapeSpec:The @Class.Shape@ specialization type.
+...note:This can be either a $TSpec$ argument (e.g. $SimpleShape$) or a complete @Class.Shape@ class (e.g. Shape<Dna, SimpleShape>).
+..remarks:This index uses a non-trivial hashing for mapping q-gram hash values to buckets.
+This reduces the sizes of bucket directories (QGramDir, QGramCountsDir fibres) from |\Sigma|^q to min(\alpha*n,|\Sigma|^q), for a load factor \alpha>1.
+..include:seqan/index.h
+.Memvar.OpenAddressing#alpha
+..summary:Load factor. Controls space/time-tradeoff and must be greater 1. Default value is 1.6.
+..class:Spec.OpenAddressing
+*/	
+
+#ifdef PLATFORM_WINDOWS_VS
+#pragma warning( push )
+// Disable warning C4521 locally (multiple copy constructors).
+#pragma warning( disable: 4521 )
+#endif  // PLATFORM_WINDOWS_VS
+
+	template < typename TObject, typename TShapeSpec >
+	class Index<TObject, IndexQGram<TShapeSpec, OpenAddressing> >
+	{
+    private:
+        static const double defaultAlpha;
+	public:
+		typedef typename Fibre<Index, QGramText>::Type		TText;
+		typedef typename Fibre<Index, QGramSA>::Type		TSA;
+		typedef typename Fibre<Index, QGramDir>::Type		TDir;
+		typedef typename Fibre<Index, QGramCounts>::Type	TCounts;
+		typedef typename Fibre<Index, QGramCountsDir>::Type	TCountsDir;
+		typedef typename Fibre<Index, QGramShape>::Type		TShape;
+		typedef typename Fibre<Index, QGramBucketMap>::Type	TBucketMap;
+		typedef typename Cargo<Index>::Type					TCargo;
+		typedef typename Size<Index>::Type					TSize;
+
+		Holder<TText>	text;		// underlying text
+		TSA				sa;			// suffix array sorted by the first q chars
+		TDir			dir;		// bucket directory
+		TCounts			counts;		// counts each q-gram per sequence
+		TCountsDir		countsDir;	// directory for count buckets
+		TShape			shape;		// underlying shape
+		TCargo			cargo;		// user-defined cargo
+		TBucketMap		bucketMap;	// bucketMap table (used by open-addressing index)
+		TSize			stepSize;	// store every <stepSize>'th q-gram in the index
+
+		double			alpha;		// for m entries the hash map has at least size alpha*m
+
+		Index():
+			stepSize(1),
+			alpha(defaultAlpha) {}
+
+		Index(Index &other):
+			text(other.text),
+			sa(other.sa),
+			dir(other.dir),
+			counts(other.counts),
+			countsDir(other.countsDir),
+			shape(other.shape),
+			cargo(other.cargo),
+			stepSize(1),
+			alpha(defaultAlpha) {}
+
+		Index(Index const &other):
+			text(other.text),
+			sa(other.sa),
+			dir(other.dir),
+			counts(other.counts),
+			countsDir(other.countsDir),
+			shape(other.shape),
+			cargo(other.cargo),
+			stepSize(1),
+			alpha(defaultAlpha) {}
+
+		template <typename TText_>
+		Index(TText_ &_text):
+			text(_text),
+			stepSize(1),
+			alpha(defaultAlpha) {}
+
+		template <typename TText_>
+		Index(TText_ const &_text):
+			text(_text),
+			stepSize(1),
+			alpha(defaultAlpha) {}
+
+		template <typename TText_, typename TShape_>
+		Index(TText_ &_text, TShape_ const &_shape):
+			text(_text),
+			shape(_shape),
+			stepSize(1),
+			alpha(defaultAlpha) {}
+
+		template <typename TText_, typename TShape_>
+		Index(TText_ const &_text, TShape_ const &_shape):
+			text(_text),
+			shape(_shape),
+			stepSize(1),
+			alpha(defaultAlpha) {}
+	};
+#ifdef PLATFORM_WINDOWS_VS
+// Enable warning C4521 again (multiple copy operators).
+#pragma warning( pop )
+#endif  // PLATFORM_WINDOWS_VS
+
+
+    template < typename TObject, typename TShapeSpec >
+    const double Index<TObject, IndexQGram<TShapeSpec, OpenAddressing> >::defaultAlpha = 1.6;
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Counting sort - Step 1: Clear directory
+	template < typename TDir, typename THashValue >
+	inline void _qgramClearDir(TDir &dir, BucketMap<THashValue> &bucketMap)
+	{
+		arrayFill(begin(dir, Standard()), end(dir, Standard()), 0);
+		arrayFill(begin(bucketMap.qgramHash, Standard()), end(bucketMap.qgramHash, Standard()), (THashValue)-1);
+	}
+
+	// looks up the bucket for the hash
+	// allocates a new bucket if non for this hash exsits yet
+	// returns the position of the bucket
+	template < typename THashValue, typename THashValue2 >
+	inline THashValue
+	requestBucket(BucketMap<THashValue> &bucketMap, THashValue2 hash)
+	{
+		typedef unsigned long TSize;
+		// get size of the index
+
+		// check whether bucket map is disabled and
+		// where the hash should be found if no collision took place before
+#ifdef SEQAN_OPENADDRESSING_COMPACT
+		register TSize hlen = length(bucketMap.qgramHash) - 1;
+		if (hlen == (TSize)-1) return hash;		
+		register TSize h1 = (TSize)(hash % hlen);
+#else
+		register TSize hlen = length(bucketMap.qgramHash) - 2;
+		if (hlen == (TSize)-2) return hash;
+		register TSize h1 = (TSize)(hash & hlen);
+#endif
+		// -1 is the undefiend value, hence the method works not for the largest word of length 32
+		// if there is no collision with another hash value
+		// the bucket is still empty
+		if (bucketMap.qgramHash[h1] == (THashValue)-1)
+		{
+			bucketMap.qgramHash[h1] = hash;
+			return h1;
+		}
+		// if there is a collision
+		else
+		{
+			// the bucket for this hash was requestet before
+			// return the same bucket
+			if (bucketMap.qgramHash[h1] == hash)
+				return h1;
+			// another hash is occupying this bucket already
+			else 
+			{
+				// TSize step = 1 + (hash % bucketMap.prime);
+				register TSize step = (TSize)bucketMap.prime;
+				// look 'step' buckets further untill one is free or was requested by this hash earlier
+				do {
+#ifdef SEQAN_OPENADDRESSING_COMPACT
+					h1 = (h1 + step) % hlen;
+#else
+					h1 = (h1 + step) & hlen;
+#endif
+				} while (bucketMap.qgramHash[h1] != (THashValue)-1 && bucketMap.qgramHash[h1] != hash);
+				bucketMap.qgramHash[h1] = hash;
+				return h1;
+			}
+		}
+	}
+	
+	// looks up the bucket for the hash
+	// returns the position of the bucket
+	template < typename THashValue, typename THashValue2 >
+	inline THashValue
+	getBucket(BucketMap<THashValue> const &bucketMap, THashValue2 hash)
+	{
+		typedef unsigned long TSize;
+		// get size of the index
+		
+		// check whether bucket map is disabled and
+		// where the hash should be found if no collision took place before
+#ifdef SEQAN_OPENADDRESSING_COMPACT
+		register TSize hlen = length(bucketMap.qgramHash) - 1;
+		if (hlen == (TSize)-1) return hash;		
+		register TSize h1 = (TSize)(hash % hlen);
+#else
+		register TSize hlen = length(bucketMap.qgramHash) - 2;
+		if (hlen == (TSize)-2) return hash;
+		register TSize h1 = (TSize)(hash & hlen);
+#endif
+		
+		// -1 is the undefiend value, hence the method works not for the largest word of length 32
+		// if there is no collision with another hash value
+		// the bucket is still empty
+		if (bucketMap.qgramHash[h1] == (THashValue)-1)
+			return h1;
+		// if there is a collision
+		else
+		{
+			// the bucket for this hash was requestet before
+			// return the same bucket
+			if (bucketMap.qgramHash[h1] == hash)
+				return h1;
+			// another hash is occupying this bucket already
+			else 
+			{
+				register TSize step = bucketMap.prime;
+				// look 'step' buckets further untill one is free or was requested by this hash earlier
+				do {
+#ifdef SEQAN_OPENADDRESSING_COMPACT
+					h1 = (h1 + step) % hlen;
+#else
+					h1 = (h1 + step) & hlen;
+#endif
+				} while (bucketMap.qgramHash[h1] != (THashValue)-1 && bucketMap.qgramHash[h1] != hash);
+				return h1;
+			}
+		}
+	}
+
+	template <typename TSize>
+	inline unsigned coprimeTest(TSize hlen)
+	{
+		static unsigned _primes[42] = { 43, 47, 53, 59, 61, 67, 71, 
+										73, 79, 83, 89, 97, 101, 103, 
+										107, 109, 113, 127, 131, 137, 139, 
+										149, 151, 157, 163, 167, 173, 179,
+										181, 191, 193, 197, 199, 211, 223, 
+										227, 229, 233, 239, 241, 251, 257 };
+
+		for (int i = 0; i < 42; ++i)
+			if ((hlen % _primes[i]) != 0)
+				return _primes[i];
+		
+		return _primes[0];
+	}
+
+	template <typename TObject, typename TShapeSpec>
+	inline __int64 _fullDirLength(Index<TObject, IndexQGram<TShapeSpec, OpenAddressing> > const &index) 
+	{
+		typedef Index<TObject, IndexQGram<TShapeSpec, OpenAddressing> >	TIndex;
+		typedef typename Fibre<TIndex, QGramDir>::Type						TDir;
+		typedef typename Fibre<TIndex, FibreShape>::Type					TShape;
+		typedef typename Host<TShape>::Type									TTextValue;
+		typedef typename Value<TDir>::Type									TDirValue;
+		typedef typename Value<TShape>::Type								THashValue;
+		
+		double num_qgrams = _qgramQGramCount(index) * index.alpha;
+		double max_qgrams = pow((double)ValueSize<TTextValue>::VALUE, (double)weight(indexShape(index)));
+		__int64 qgrams;
+		
+		// compare size of open adressing with 1-1 mapping and use the smaller one
+		if (num_qgrams * (sizeof(TDirValue) + sizeof(THashValue)) < max_qgrams * sizeof(TDirValue))
+		{
+			qgrams = (__int64)ceil(num_qgrams);
+#ifndef SEQAN_OPENADDRESSING_COMPACT
+			__int64 power2 = 1;
+			while (power2 < qgrams)
+				power2 <<= 1;
+			qgrams = power2;
+#endif
+			resize(const_cast<TIndex &>(index).bucketMap.qgramHash, qgrams + 1, Exact());
+		} else
+		{
+			qgrams = (__int64)ceil(max_qgrams);
+			clear(const_cast<TIndex &>(index).bucketMap.qgramHash);	// 1-1 mapping, no bucket map needed
+		}
+		
+		const_cast<TIndex &>(index).bucketMap.prime = coprimeTest(qgrams);
+		return qgrams + 1;
+	}
+	
+}
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/index/index_sa_btree.h b/src/SeqAn-1.3/seqan/index/index_sa_btree.h
new file mode 100644
index 0000000..e623d67
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_sa_btree.h
@@ -0,0 +1,133 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_SA_BTREE_H
+#define SEQAN_HEADER_INDEX_SA_BTREE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+	
+	template <
+		class SAFwdIt,		// suffix array input iterator
+		class FlatOutIt >	// flat tree output iterator
+	inline FlatOutIt createSABTree(
+		SAFwdIt First_, SAFwdIt _Last,
+		FlatOutIt Dest_, unsigned BlockSize)
+	{
+        typedef typename Value<SAFwdIt>::Type	TSize;
+
+        TSize size = difference(First_, _Last);
+		if (!size) return Dest_;
+
+        // calculate the depth of the sa b-tree
+		TSize BlockElements = BlockSize - 1;
+
+		unsigned treeLevels = 1;
+		TSize _xSize;
+		for(_xSize = 1; _xSize * BlockSize <= size; _xSize *= BlockSize, ++treeLevels) ;
+	
+		// get output iterators for every level in the flat tree
+		FlatOutIt *level = new FlatOutIt[treeLevels];
+		for(int i = treeLevels - 1; _xSize; --i, _xSize /= BlockSize) {
+			level[i] = Dest_;
+			goFurther(Dest_, ((size / _xSize + BlockSize - 1) / BlockSize) * BlockSize);
+		}
+
+		// counter for each b-tree level
+		TSize *cnt = new TSize[treeLevels];
+		for(unsigned i = 0; i < treeLevels; ++i)
+			cnt[i] = 0;
+
+		// distribute to responsible levels
+		for(TSize j = 0; j < size; ++j, ++First_)
+			for(unsigned i = 0; i < treeLevels; ++i) {
+				*(level[i]) = *First_;
+				++(level[i]);
+				if (cnt[i] != BlockElements) {
+					++cnt[i];
+					break;
+				} else
+					cnt[i] = 0;
+			}
+
+		delete[] cnt;
+		delete[] level;
+
+		return Dest_;
+    }
+
+
+	template < typename TSize >
+	inline TSize sizeofSABTree(TSize n, unsigned BlockSize)
+	{
+		TSize size = 0;
+		for(TSize _xSize = 1; _xSize <= n; _xSize *= BlockSize)
+			size += (n / _xSize + BlockSize - 1) / BlockSize;
+		return size * BlockSize;
+	}
+
+	template <
+		class SAFwdIt,		// suffix array input iterator
+		typename TSize >
+	inline void sizeofSABTree(SAFwdIt First_, SAFwdIt _Last, TSize &Size_, unsigned BlockSize)
+	{
+		Size_ = sizeofSABTree(difference(First_, _Last), BlockSize);
+	}
+
+
+    template < typename TSAB, typename TSA >
+    inline void createSABTree(TSAB &sa_btree, TSA &sa, unsigned BlockSize) {
+        createSABTree(begin(sa), end(sa), begin(sa_btree), BlockSize);
+    }
+
+
+	template < typename TSize >
+    inline unsigned treeLevelsSAB(TSize saSize, unsigned BlockSize)
+	{
+		unsigned treeLevels = 1;
+		for(TSize _xSize = 1; _xSize <= saSize; _xSize *= BlockSize, ++treeLevels) ;
+        return treeLevels;
+    }
+
+    template < typename TValue, typename TConfig, typename TSA >
+    inline void createSABTree(String<TValue, External<TConfig> > &sa_btree, TSA &sa, unsigned BlockSize) {
+        int writeHeads = treeLevelsSAB(length(sa)) + 1;   // plus 1 write back buffer
+        if (sa_btree.cache.size() < writeHeads)
+            sa_btree.resizeCache(writeHeads);
+        createSABTree(begin(sa), end(sa), begin(sa_btree), BlockSize);
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_sa_bwtwalk.h b/src/SeqAn-1.3/seqan/index/index_sa_bwtwalk.h
new file mode 100644
index 0000000..bad9afe
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_sa_bwtwalk.h
@@ -0,0 +1,660 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Authors: Tobias Marschall <tobias.marschall at cs.uni-dortmund.de>
+//          Marcel Martin <marcel.martin at tu-dortmund.de>
+//          David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_SA_BWTWALK_H
+#define SEQAN_HEADER_INDEX_SA_BWTWALK_H
+
+// TODO export lcp table by defining:
+//    template < typename TSA, typename TLCP, typename TText, typename TAlgSpec >
+//    inline void createSAAndLCP(TSA &sa, TLCP &lcp, TText const &s, TAlgSpec const &alg)
+//
+// TODO: The in-place permutation that uses an extra bit vector is not tested automatically,
+//       since it is only used for strings longer than 2**31 or 2**63 characters.
+
+// definitions:
+// lexnextpos[p] = pos[rank[p]+1]
+// lexprevpos[p] = pos[rank[p]-1]
+// lexxorpos = lexprevpos ^ lexnextpos
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+	// Public tags
+	struct BwtWalkFast_ {};
+	typedef Tag<BwtWalkFast_> const BwtWalkFast;
+
+	struct BwtWalkInPlace_ {};
+	typedef Tag<BwtWalkInPlace_> const BwtWalkInPlace;
+
+	template <typename TSpec = BwtWalkFast >
+	struct BwtWalk {};
+
+	// Public function
+	// NOTE: This function uses the supremum value of Value<TSA>::Type as NIL symbol
+	//       for temporary calculations. Therefore, the caller must ensure that
+	//       length(s) < MaxValue<TValue>::VALUE. Otherwise, behaviour is undefined!
+	template < typename TSA, typename TText, typename TSpec >
+	inline void createSuffixArray(
+		TSA &SA,
+		TText const &s,
+		BwtWalk<TSpec> const &)
+	{
+		typedef typename AllowsFastRandomAccess<TSA>::Type TAllowsFastRandomAccess;
+		_createSuffixArray(SA, s, BwtWalk<TSpec>(), TAllowsFastRandomAccess());
+	}
+
+	// List functions, for internal use (that's why there's a '_' in front)
+
+	// Inserts p into the suffix list between the given predecessor and successor
+	// NOTE: Intentionally not using references for predecessor and successor!
+	template < typename TArray, typename TValue >
+	inline void _insertBetween(
+		TArray &lexprevpos,
+		TArray &lexnextpos,
+		TValue p,
+		TValue predecessor,
+		TValue successor)
+	{
+		value(lexprevpos, p) = predecessor;
+		value(lexnextpos, p) = successor;
+		const TValue NIL = MaxValue<TValue>::VALUE;
+		if (predecessor != NIL) value(lexnextpos, predecessor) = p;
+		if (successor != NIL) value(lexprevpos, successor) = p;
+	}
+
+	// Inserts p into the suffix list before the given successor
+	template < typename TArray, typename TValue >
+	inline void _insertBefore(
+		TArray &lexprevpos,
+		TArray &lexnextpos,
+		TValue p,
+		TValue successor)
+	{
+		_insertBetween(lexprevpos, lexnextpos, p, getValue(lexprevpos, successor), successor);
+	}
+
+	// Inserts p into the suffix list after the given predecessor
+	template < typename TArray, typename TValue >
+	inline void _insertAfter(
+		TArray &lexprevpos,
+		TArray &lexnextpos,
+		TValue p,
+		TValue predecessor)
+	{
+		_insertBetween(lexprevpos, lexnextpos, p, predecessor, getValue(lexnextpos, predecessor));
+	}
+
+	// Inserts p into the suffix list between the given predecessor and successor
+	template < typename TArray, typename TValue >
+	inline void _insertXorBetween(
+		TArray &lexxorpos,
+		TValue p,
+		TValue predecessor,
+		TValue successor)
+	{
+		const TValue NIL = MaxValue<TValue>::VALUE;
+		value(lexxorpos, p) = predecessor ^ successor;
+		if (predecessor != NIL) value(lexxorpos, predecessor) = getValue(lexxorpos, predecessor) ^ successor ^ p;
+		if (successor != NIL) value(lexxorpos, successor) = getValue(lexxorpos, successor) ^ predecessor ^ p;
+	}
+
+	// Creates a suffix array. This is the version for fast random access.
+	template < typename TSA, typename TText >
+	inline void _createSuffixArray(
+		TSA &SA,
+		TText const &s,
+		BwtWalk<BwtWalkFast> const &,
+		True const &)
+	{
+		typedef typename Value<TSA>::Type TValue;
+		typedef typename Iterator<TSA, Standard>::Type TSaIter;
+		typedef String<TValue> TArray;
+		const TValue NIL = MaxValue<TValue>::VALUE;
+		
+		if (empty(s)) return;
+		
+		TArray lexnextpos;
+		// Since SA is capable of fast random access, we can temporarily use it as lexprevpos array.
+		TArray &lexprevpos = SA;
+
+		resize(lexnextpos, length(s), NIL, Exact());
+		std::fill(begin(lexprevpos, Standard()), end(lexprevpos, Standard()), NIL);
+
+		// finally create suffix array
+		//   1) first suffix is returned...
+		TValue p = _createSuffixList(lexprevpos, lexnextpos, s);
+		//   2) sequentially write out suffix array
+		TSaIter saIt = begin(SA, Standard());
+		while (p != NIL) {
+			*saIt = p;
+			p = getValue(lexnextpos, p);
+			++saIt;
+		}
+	}
+
+	// Creates a suffix array. This is the version for external memory.
+	// (SA is written sequentially from start to finish.)
+	template < typename TSA, typename TText >
+	inline void _createSuffixArray(
+		TSA &SA,
+		TText const& s,
+		BwtWalk<BwtWalkFast> const &,
+		False const &)
+	{
+		typedef typename Value<TSA>::Type TValue;
+		typedef typename Iterator<TSA, Standard>::Type TSaIter;
+		const TValue NIL = MaxValue<TValue>::VALUE;
+		typedef String<TValue> TArray;
+
+		if (empty(s)) return;
+
+		TArray lexnextpos;
+		TArray lexprevpos;
+
+		resize(lexnextpos, length(s), NIL, Exact());
+		resize(lexprevpos, length(s), NIL, Exact());
+
+		// finally create suffix array
+		//   1) first suffix is returned...
+		TValue p = _createSuffixList(lexprevpos, lexnextpos, s);
+		//   2) sequentially write out suffix array
+		TSaIter saIt = begin(SA, Standard());
+		while (p != NIL) {
+			*saIt = p;
+			p = getValue(lexnextpos, p);
+			++saIt;
+		}
+	}
+
+	// Note: Writing to SA is done sequential only, i.e. well-suited to be directly
+	//       written to external storage.
+	template < typename TSA, typename TText >
+	inline void _createSuffixArray(
+		TSA &SA,
+		TText const &s,
+		BwtWalk<BwtWalkInPlace> const &,
+		False const &)
+	{
+		typedef typename Value<TSA>::Type TValue;
+		typedef typename Iterator<TSA, Standard>::Type TSaIter;
+		const TValue NIL = MaxValue<TValue>::VALUE;
+		typedef String<TValue> TArray;
+
+		if (empty(s)) return;
+		
+		TArray lexxorpos;
+		// invalid ^ invalid == 0
+		resize(lexxorpos, length(s), 0, Exact());
+
+		// finally create suffix array
+		//   1) first suffix is returned...
+		TValue p = _createXoredSuffixList(lexxorpos, s);
+		//   2) sequentially write out suffix array
+		TValue previous = NIL;
+		TSaIter saIt = begin(SA, Standard());
+		while (p != NIL) {
+			*saIt = p;
+			TValue tmp = p;
+			p = getValue(lexxorpos, p) ^ previous;
+			previous = tmp;
+			++saIt;
+		}
+	}
+
+	// Variant for fast random access SA
+	// This version computes the suffix array in place, but only if the text s is
+	// short enough such that the most significant bit (MSB) of the entries in the
+	// SA can be used as a flag bit, which is needed to invert a permutation in place.
+	// Otherwise, an additional length(s) bits of memory are used.
+
+    // This is a helper function for the case "length(s) >= (NIL && NOTFLAGBIT)".
+	template < typename TSA, typename TText, typename TValue, typename TArray >
+	inline void _createSuffixArray(
+		TSA &SA,
+        TArray & lexxorpos,
+        TValue & p,
+		TText const &s,
+        TValue const & NIL,
+        TValue const &,
+        TValue const &,
+		BwtWalk<BwtWalkInPlace> const &,
+		True const &,
+        True const &)
+    {
+        // If the string is too long, we cannot use the MSB of the SA entries as a flag.
+        // Instead, we allocate a separate bitvector
+        String<bool, Packed<> > visited;
+        resize(visited, length(s), false);
+
+        // 2) convert into inverse suffix array
+        TValue n = 0;
+        TValue previous = NIL;
+        while (p != NIL) {
+            TValue tmp = p;
+            p = getValue(lexxorpos, p) ^ previous;
+            previous = tmp;
+            value(lexxorpos, previous) = n++;
+        }
+
+        // 3) invert array in place to obtain suffix array
+        for (n = 0; n < length(s); ++n) {
+            TValue i = getValue(SA, n);
+            // check if current position has already been processed
+            if (!getValue(visited, i)) {
+                // if not, invert current cycle
+                TValue previous = n;
+                while (i != n) {
+                    TValue next = getValue(SA, i);
+                    value(SA, i) = previous;
+                    value(visited, i) = true;
+                    previous = i;
+                    i = next;
+                }
+                value(visited, n) = true;
+                value(SA, i) = previous;
+            }
+        }
+    }
+
+    // This is a helper function for the case "length(s) < (NIL && NOTFLAGBIT)".
+	template < typename TSA, typename TText, typename TValue, typename TArray >
+	inline void _createSuffixArray(
+		TSA &SA,
+        TArray & lexxorpos,
+        TValue & p,
+		TText const &s,
+        TValue const & NIL,
+        TValue const & FLAGBIT,
+        TValue const & NOTFLAGBIT,
+		BwtWalk<BwtWalkInPlace> const &,
+		True const &,
+        False const &)
+    {
+        // The string is short enough, we can use the MSB of the SA entries as a flag.
+
+        // 2) convert into inverse suffix array and set every flag
+        TValue n = 0;
+        TValue previous = NIL;
+        while (p != NIL) {
+            TValue tmp = p;
+            p = getValue(lexxorpos, p) ^ previous;
+            previous = tmp;
+            value(lexxorpos, previous) = FLAGBIT | n++;
+        }
+
+        // 3) invert array in place to obtain suffix array
+        for (n = 0; n < length(s); ++n) {
+            TValue i = getValue(SA, n);
+            // check if current position has already been processed
+            if ((i & FLAGBIT) != 0) {
+                // if not, invert current cycle
+                i &= NOTFLAGBIT;
+                TValue previous = n;
+                while (i != n) {
+                    TValue next = getValue(SA, i) & NOTFLAGBIT;
+                    value(SA, i) = previous;
+                    previous = i;
+                    i = next;
+                }
+                value(SA, i) = previous;
+            }
+        }
+    }
+
+    // This takes care of the case where the suffix array's entry type is
+    // longer than the string length type to circumvent some warnings.
+	template < typename TSA, typename TText, typename TValue, typename TArray >
+	inline void _createSuffixArrayHandleTooLongSuffixArrayType(
+		TSA &SA,
+        TArray & lexxorpos,
+        TValue & p,
+		TText const &s,
+        TValue const & NIL,
+        TValue const & FLAGBIT,
+        TValue const & NOTFLAGBIT,
+		BwtWalk<BwtWalkInPlace> const &,
+		True const &,
+        True const &)
+    {
+        _createSuffixArray(SA, lexxorpos, p, s, NIL, FLAGBIT, NOTFLAGBIT, BwtWalk<BwtWalkInPlace>(), True(), False());
+    }
+
+    // This takes care of the case where the suffix array's entry type is NOT
+    // longer than the string length type to circumvent some warnings.
+	template < typename TSA, typename TText, typename TValue, typename TArray >
+	inline void _createSuffixArrayHandleTooLongSuffixArrayType(
+		TSA &SA,
+        TArray & lexxorpos,
+        TValue & p,
+		TText const &s,
+        TValue const & NIL,
+        TValue const & FLAGBIT,
+        TValue const & NOTFLAGBIT,
+		BwtWalk<BwtWalkInPlace> const &,
+		True const &,
+        False const &)
+    {
+        if (length(s) >= (NIL & NOTFLAGBIT))
+            _createSuffixArray(SA, lexxorpos, p, s, NIL, FLAGBIT, NOTFLAGBIT, BwtWalk<BwtWalkInPlace>(), True(), True());
+        else 
+            _createSuffixArray(SA, lexxorpos, p, s, NIL, FLAGBIT, NOTFLAGBIT, BwtWalk<BwtWalkInPlace>(), True(), False());
+    }
+
+    // This is the main entry point.
+	template < typename TSA, typename TText >
+	inline void _createSuffixArray(
+		TSA &SA,
+		TText const &s,
+		BwtWalk<BwtWalkInPlace> const &,
+		True const &)
+	{
+		typedef typename Value<TSA>::Type TValue;
+		const TValue NIL = MaxValue<TValue>::VALUE;
+
+		const TValue FLAGBIT = (TValue)1 << (BitsPerValue<TValue>::VALUE-1);
+		const TValue NOTFLAGBIT = ~FLAGBIT;
+
+		typedef String<TValue> TArray;
+
+		if (empty(s)) return;
+		
+		// since SA is capable of fast random access, we can temporarily use it as the lexxorpos array
+		TArray & lexxorpos = SA;
+		std::fill(begin(lexxorpos, Standard()), end(lexxorpos, Standard()), 0);
+
+		// finally create suffix array
+		//   1) first suffix is returned ...
+		TValue p = _createXoredSuffixList(lexxorpos, s);
+
+        typedef typename Size<TText>::Type TSize;
+        typedef typename Eval<!(sizeof(TSize) <= sizeof(TValue))>::Type TBool;
+        _createSuffixArrayHandleTooLongSuffixArrayType(SA, lexxorpos, p, s, NIL, FLAGBIT, NOTFLAGBIT, BwtWalk<BwtWalkInPlace>(), True(), TBool());
+	}
+
+	template < typename TArray, typename TValue >
+	inline void _findNewCharInsertionPosition(
+		TArray &lexfirstpos,
+		TArray &lexlastpos,
+		TValue &pMinus,
+		TValue &pPlus,
+		unsigned int cOrd)
+	{
+		const TValue NIL = MaxValue<TValue>::VALUE;
+
+		// current char does not exist
+		// first find pMinus ...
+		pMinus = NIL;
+		unsigned int cMinus = cOrd;
+		while (cMinus > 0) {
+			--cMinus;
+			if (getValue(lexlastpos, cMinus) != NIL) {
+				pMinus = getValue(lexlastpos, cMinus);
+				break;
+			}
+		}
+
+		// ... and pPlus
+		pPlus = NIL;
+		for (unsigned int cPlus = cOrd+1; cPlus < length(lexfirstpos); ++cPlus) {
+			if (getValue(lexfirstpos, cPlus) != NIL) {
+				pPlus = getValue(lexfirstpos, cPlus);
+				break;
+			}
+		}
+	}
+
+	// returns begin of suffix list
+	template <typename TArray, typename TText>
+	inline typename Value<TArray>::Type _createSuffixList(
+		TArray &lexprevpos,
+		TArray &lexnextpos,
+		TText const &s)
+	{
+		typedef typename Iterator<const TText, Standard>::Type TTextIter;
+		typedef typename Value<TArray>::Type TValue;
+
+		typedef typename Value<const TText>::Type TChar;
+		const unsigned int ALPHABETSIZE = ValueSize<TChar>::VALUE;
+		const TValue NIL = MaxValue<TValue>::VALUE;
+		typedef String<TValue, Array<ALPHABETSIZE> > TAlphabetArray;
+
+		TAlphabetArray lexfirstpos, lexlastpos;
+
+		resize(lexfirstpos, ALPHABETSIZE, NIL, Exact());
+		resize(lexlastpos, ALPHABETSIZE, NIL, Exact());
+
+		// main loop
+		TTextIter it = end(s, Standard());
+		TValue p = length(s);
+		while (it != begin(s, Standard())) {
+			--it;
+			--p;
+			TChar c = *it;
+			// Instead of using c as an index, we use its ordValue.
+			unsigned int cOrd = ordValue(c);
+			if (getValue(lexfirstpos, cOrd) == NIL) {
+				TValue pMinus, pPlus;
+				_findNewCharInsertionPosition(lexfirstpos, lexlastpos, pMinus, pPlus, cOrd);
+				_insertBetween(lexprevpos, lexnextpos, p, pMinus, pPlus);
+				// this is our first suffix starting with c, remember in lexfirstpos/lexlastpos
+				value(lexfirstpos, cOrd) = p;
+				value(lexlastpos, cOrd) = p;
+			} else {
+				// current char already exists (case 2. in the paper)
+				TValue pLeft = getValue(lexprevpos, p+1); // walking left
+				TValue pRight = getValue(lexnextpos, p+1); // walking right
+				// walk along Bwt in both directions
+				while (true) {
+					// check if we have found the insertion position while walking to the left side
+					if (pLeft == NIL) {
+						if (back(s) == c) {
+							// this is the lexicographically second suffix starting with c, the first
+							// suffix starting with c consists only of one character (the last char in s)
+							// this case could be avoided by adding a $ symbol to the end of s.
+							_insertAfter(lexprevpos, lexnextpos, p, (TValue)(length(s)-1));
+							if (getValue(lexlastpos, cOrd) == length(s)-1) value(lexlastpos, cOrd) = p;
+						} else {
+							// this is the lexicographically first suffix starting with c,
+							// insert before lexfirstpos[c]
+							_insertBefore(lexprevpos, lexnextpos, p, getValue(lexfirstpos, cOrd));
+							value(lexfirstpos, cOrd) = p;
+						}
+						break;
+					} else {
+						// check if character has been found walking to the left
+						if (getValue(s, pLeft-1) == c) {
+							// insert in the middle of the list
+							_insertAfter(lexprevpos, lexnextpos, p, pLeft-1);
+							// check if just inserted suffix is now the last suffix starting with c
+							if (getValue(lexlastpos, cOrd) == pLeft-1) value(lexlastpos, cOrd) = p;
+							break;
+						}
+					}
+					pLeft = getValue(lexprevpos, pLeft);
+
+					// check if we have found the insertion position while walking to the right side
+					if (pRight == NIL) {
+						// this is the lexicographically last suffix starting with c,
+						// insert before lexfirstpos[c]
+						_insertAfter(lexprevpos, lexnextpos, p, getValue(lexlastpos, cOrd));
+						value(lexlastpos, cOrd) = p;
+						break;
+					} else {
+						// check if character has been found walking to the right
+						if (getValue(s, pRight-1) == c) {
+							// insert in the middle of the list
+							_insertBefore(lexprevpos, lexnextpos, p, pRight-1);
+							// check if just inserted suffix is now the first suffix starting with c
+							if (getValue(lexfirstpos, cOrd) == pRight-1) value(lexfirstpos, cOrd) = p;
+							break;
+						}
+					}
+					pRight = getValue(lexnextpos, pRight);
+				}
+			}
+		}
+
+		typename Iterator<TAlphabetArray, Standard>::Type fit = begin(lexfirstpos, Standard());
+		while (*fit == NIL) ++fit;
+		return *fit;
+	}
+
+	// returns beginning of suffix list
+	template <typename TArray, typename TText>
+	inline typename Value<TArray>::Type _createXoredSuffixList(
+		TArray &lexxorpos,
+		TText const &s)
+	{
+		typedef typename Iterator<const TText, Standard>::Type TTextIter;
+		typedef typename Value<TArray>::Type TValue;
+
+		typedef typename Value<const TText>::Type TChar;
+		const unsigned int ALPHABETSIZE = ValueSize<TChar>::VALUE;
+		const TValue NIL = MaxValue<TValue>::VALUE;
+		typedef String<TValue, Array<ALPHABETSIZE> > TAlphabetArray;
+
+		TAlphabetArray lexfirstpos;
+		TAlphabetArray lexlastpos;
+		resize(lexfirstpos, ALPHABETSIZE, NIL, Exact());
+		resize(lexlastpos, ALPHABETSIZE, NIL, Exact());
+
+		// main loop
+		TTextIter it = end(s, Standard());
+		TValue p = length(s);
+		// store predecessor and successor from last round (p+1)
+		TValue lastPredecessor = NIL;
+		TValue lastSuccessor = NIL;
+		while (it != begin(s, Standard())) {
+			--it;
+			--p;
+			TChar c = *it;
+			// Instead of using c as an index, we use its ordValue.
+			unsigned int cOrd = ordValue(c);
+			// to insert into xored list, we need to find predecessor _and_ successor
+			TValue predecessor = NIL;
+			TValue successor = NIL;
+			if (getValue(lexfirstpos, cOrd) == NIL) {
+				_findNewCharInsertionPosition(lexfirstpos, lexlastpos, predecessor, successor, cOrd);
+				// this is our first suffix starting with c, remember in lexfirstpos/lexlastpos
+				value(lexfirstpos, cOrd) = p;
+				value(lexlastpos, cOrd) = p;
+			} else {
+				// current char already exists
+				bool skipWalkRight = false;
+				// ----- walk left ------------------ (search for predecessor) ------
+				TValue pLast = p+1;
+				TValue pLeft = getValue(lexxorpos, p+1) ^ lastSuccessor; // walking left
+				while (true) {
+					// check if we have found the insertion position while walking to the left side
+					if (pLeft == NIL) {
+						if (back(s) == c) {
+							// this is the lexicographically second suffix starting with c, the first
+							// suffix starting with c consists only of one character (the last char in s)
+							// this case could be avoided by adding a $ symbol to the end of s.
+							predecessor = (TValue)(length(s)-1);
+							if (getValue(lexlastpos, cOrd) == length(s)-1) value(lexlastpos, cOrd) = p;
+						} else {
+							// this is the lexicographically first suffix starting with c,
+							// insert before lexfirstpos[c]
+							successor = getValue(lexfirstpos, cOrd);
+							// first find pMinus ...
+							unsigned int cMinus = cOrd;
+							while (cMinus > 0) {
+								--cMinus;
+								if (getValue(lexlastpos, cMinus) != NIL) {
+									predecessor = getValue(lexlastpos, cMinus);
+									break;
+								}
+							}
+							skipWalkRight = true;
+							value(lexfirstpos, cOrd)=p;
+						}
+						break;
+					} else {
+						// check if character has been found walking to the left
+						if (getValue(s, pLeft-1) == c) {
+							// insert in the middle of the list
+							predecessor = pLeft-1;
+							// check if just inserted suffix is now the last suffix starting with c
+							if (getValue(lexlastpos, cOrd) == pLeft-1) value(lexlastpos, cOrd) = p;
+							break;
+						}
+					}
+					TValue tmp = pLeft;
+					pLeft = getValue(lexxorpos, pLeft) ^ pLast;
+					pLast = tmp;
+				}
+
+				// ----- walk right ------------------ (search for successor) ------
+				pLast = p+1;
+				TValue pRight = getValue(lexxorpos, p+1) ^ lastPredecessor; // walking right
+				while (!skipWalkRight) {
+					// check if we have found the insertion position while walking to the right side
+					if (pRight == NIL) {
+						// this is the lexicographically last suffix starting with c,
+						for (unsigned int cPlus = cOrd+1; cPlus < length(lexfirstpos); ++cPlus) {
+							if (getValue(lexfirstpos, cPlus) != NIL) {
+								successor = getValue(lexfirstpos, cPlus);
+								break;
+							}
+						}
+						value(lexlastpos, cOrd) = p;
+						break;
+					} else {
+						// check if character has been found walking to the right
+						if (getValue(s, pRight-1) == c) {
+							successor = pRight-1;
+							// check if just inserted suffix is now the first suffix starting with c
+							if (getValue(lexfirstpos, cOrd) == pRight-1) value(lexfirstpos, cOrd) = p;
+							break;
+						}
+					}
+					TValue tmp = pRight;
+					pRight = getValue(lexxorpos, pRight) ^ pLast;
+					pLast = tmp;
+				}
+			}
+			// finally insert between predecessor and successor
+			_insertXorBetween(lexxorpos, p, predecessor, successor);
+			lastPredecessor = predecessor;
+			lastSuccessor = successor;
+		}
+
+		typename Iterator<TArray, Standard>::Type fit = begin(lexfirstpos, Standard());
+		while (*fit == NIL) ++fit;
+		return *fit;
+	}
+}
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_sa_lss.h b/src/SeqAn-1.3/seqan/index/index_sa_lss.h
new file mode 100644
index 0000000..de7349c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_sa_lss.h
@@ -0,0 +1,451 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// This file contains the suffix array algorithm implementation
+// by Larsson and Sadakane with the following modifications.
+//
+// MODIFICATIONS:
+// - a context is used for reentrance
+// - a generic TValue is used instead of int
+// - functions are surrounded by SeqAn's namespace to omit namespace pollution
+// ==========================================================================
+
+/* qsufsort.c
+   Copyright 1999, N. Jesper Larsson, all rights reserved.
+
+   This file contains an implementation of the algorithm presented in "Faster
+   Suffix Sorting" by N. Jesper Larsson (jesper at cs.lth.se) and Kunihiko
+   Sadakane (sada at is.s.u-tokyo.ac.jp).
+
+   This software may be used freely for any purpose. However, when distributed,
+   the original source must be clearly stated, and, when the source code is
+   distributed, the copyright notice must be retained and any alterations in
+   the code must be clearly marked. No warranty is given regarding the quality
+   of this software.*/
+
+#ifndef SEQAN_HEADER_INDEX_SA_LSS_H
+#define SEQAN_HEADER_INDEX_SA_LSS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template <typename TValue>
+struct ContextLss_
+{
+	TValue *I,                   /* group array, ultimately suffix array.*/
+	*V,                          /* inverse array, ultimately inverse of I.*/
+	r,                           /* number of symbols aggregated by transform.*/
+	h;                           /* length of already-sorted prefixes.*/
+
+	// MODIFIED: renamed defines according to SeqAn's naming conventions
+	#define SEQAN_LSSKEY(p)          (V[*(p)+(h)])
+	#define SEQAN_LSSSWAP(p, q)      (tmp=*(p), *(p)=*(q), *(q)=tmp)
+	#define SEQAN_LSSMED3(a, b, c)   (SEQAN_LSSKEY(a)<SEQAN_LSSKEY(b) ?                        \
+			(SEQAN_LSSKEY(b)<SEQAN_LSSKEY(c) ? (b) : SEQAN_LSSKEY(a)<SEQAN_LSSKEY(c) ? (c) : (a))       \
+			: (SEQAN_LSSKEY(b)>SEQAN_LSSKEY(c) ? (b) : SEQAN_LSSKEY(a)>SEQAN_LSSKEY(c) ? (c) : (a)))
+
+	/* Subroutine for select_sort_split and sort_split. Sets group numbers for a
+	   group whose lowest position in I is pl and highest position is pm.*/
+
+	inline void update_group(TValue *pl, TValue *pm)
+	{
+	   TValue g;
+
+	   g=pm-I;                      /* group number.*/
+	   V[*pl]=g;                    /* update group number of first position.*/
+	   if (pl==pm)
+		  *pl=-1;                   /* one element, sorted group.*/
+	   else
+		  do                        /* more than one element, unsorted group.*/
+			 V[*++pl]=g;            /* update group numbers.*/
+		  while (pl<pm);
+	}
+
+	/* Quadratic sorting method to use for small subarrays. To be able to update
+	   group numbers consistently, a variant of selection sorting is used.*/
+
+	inline void select_sort_split(TValue *p, TValue n) {
+	   TValue *pa, *pb, *pi, *pn;
+	   TValue f, v, tmp;
+
+	   pa=p;                        /* pa is start of group being picked out.*/
+	   pn=p+n-1;                    /* pn is last position of subarray.*/
+	   while (pa<pn) {
+		  for (pi=pb=pa+1, f=SEQAN_LSSKEY(pa); pi<=pn; ++pi)
+			 if ((v=SEQAN_LSSKEY(pi))<f) {
+				f=v;                /* f is smallest key found.*/
+				SEQAN_LSSSWAP(pi, pa);       /* place smallest element at beginning.*/
+				pb=pa+1;            /* pb is position for elements equal to f.*/
+			 } else if (v==f) {     /* if equal to smallest key.*/
+				SEQAN_LSSSWAP(pi, pb);       /* place next to other smallest elements.*/
+				++pb;
+			 }
+		  update_group(pa, pb-1);   /* update group values for new group.*/
+		  pa=pb;                    /* continue sorting rest of the subarray.*/
+	   }
+	   if (pa==pn) {                /* check if last part is single element.*/
+		  V[*pa]=pa-I;
+		  *pa=-1;                   /* sorted group.*/
+	   }
+	}
+
+	/* Subroutine for sort_split, algorithm by Bentley & McIlroy.*/
+
+	inline TValue choose_pivot(TValue *p, TValue n) {
+	   TValue *pl, *pm, *pn;
+	   TValue s;
+	   
+	   pm=p+(n>>1);                 /* small arrays, middle element.*/
+	   if (n>7) {
+		  pl=p;
+		  pn=p+n-1;
+		  if (n>40) {               /* big arrays, pseudomedian of 9.*/
+			 s=n>>3;
+			 pl=SEQAN_LSSMED3(pl, pl+s, pl+s+s);
+			 pm=SEQAN_LSSMED3(pm-s, pm, pm+s);
+			 pn=SEQAN_LSSMED3(pn-s-s, pn-s, pn);
+		  }
+		  pm=SEQAN_LSSMED3(pl, pm, pn);      /* midsize arrays, median of 3.*/
+	   }
+	   return SEQAN_LSSKEY(pm);
+	}
+
+	/* Sorting routine called for each unsorted group. Sorts the array of integers
+	   (suffix numbers) of length n starting at p. The algorithm is a ternary-split
+	   quicksort taken from Bentley & McIlroy, "Engineering a Sort Function",
+	   Software -- Practice and Experience 23(11), 1249-1265 (November 1993). This
+	   function is based on Program 7.*/
+
+	inline void sort_split(TValue *p, TValue n)
+	{
+	   TValue *pa, *pb, *pc, *pd, *pl, *pm, *pn;
+	   TValue f, v, s, t, tmp;
+
+	   if (n<7) {                   /* multi-selection sort smallest arrays.*/
+		  select_sort_split(p, n);
+		  return;
+	   }
+
+	   v=choose_pivot(p, n);
+	   pa=pb=p;
+	   pc=pd=p+n-1;
+	   while (1) {                  /* split-end partition.*/
+		  while (pb<=pc && (f=SEQAN_LSSKEY(pb))<=v) {
+			 if (f==v) {
+				SEQAN_LSSSWAP(pa, pb);
+				++pa;
+			 }
+			 ++pb;
+		  }
+		  while (pc>=pb && (f=SEQAN_LSSKEY(pc))>=v) {
+			 if (f==v) {
+				SEQAN_LSSSWAP(pc, pd);
+				--pd;
+			 }
+			 --pc;
+		  }
+		  if (pb>pc)
+			 break;
+		  SEQAN_LSSSWAP(pb, pc);
+		  ++pb;
+		  --pc;
+	   }
+	   pn=p+n;
+	   if ((s=pa-p)>(t=pb-pa))
+		  s=t;
+	   for (pl=p, pm=pb-s; s; --s, ++pl, ++pm)
+		  SEQAN_LSSSWAP(pl, pm);
+	   if ((s=pd-pc)>(t=pn-pd-1))
+		  s=t;
+	   for (pl=pb, pm=pn-s; s; --s, ++pl, ++pm)
+		  SEQAN_LSSSWAP(pl, pm);
+
+	   s=pb-pa;
+	   t=pd-pc;
+	   if (s>0)
+		  sort_split(p, s);
+	   update_group(p+s, p+n-t-1);
+	   if (t>0)
+		  sort_split(p+n-t, t);
+	}
+
+	/* Bucketsort for first iteration.
+
+	   Input: x[0...n-1] holds integers in the range 1...k-1, all of which appear
+	   at least once. x[n] is 0. (This is the corresponding output of transform.) k
+	   must be at most n+1. p is array of size n+1 whose contents are disregarded.
+
+	   Output: x is V and p is I after the initial sorting stage of the refined
+	   suffix sorting algorithm.*/
+	      
+	inline void bucketsort(TValue *x, TValue *p, TValue n, TValue k)
+	{
+	   TValue *pi, i, c, d, g;
+
+	   for (pi=p; pi<p+k; ++pi)
+		  *pi=-1;                   /* mark linked lists empty.*/
+	   for (i=0; i<=n; ++i) {
+		  x[i]=p[c=x[i]];           /* insert in linked list.*/
+		  p[c]=i;
+	   }
+	   for (pi=p+k-1, i=n; pi>=p; --pi) {
+		  d=x[c=*pi];               /* c is position, d is next in list.*/
+		  x[c]=g=i;                 /* last position equals group number.*/
+		  if (d>=0) {               /* if more than one element in group.*/
+			 p[i--]=c;              /* p is permutation for the sorted x.*/
+			 do {
+				d=x[c=d];           /* next in linked list.*/
+				x[c]=g;             /* group number in x.*/
+				p[i--]=c;           /* permutation in p.*/
+			 } while (d>=0);
+		  } else
+			 p[i--]=-1;             /* one element, sorted group.*/
+	   }
+	}
+
+	/* Transforms the alphabet of x by attempting to aggregate several symbols into
+	   one, while preserving the suffix order of x. The alphabet may also be
+	   compacted, so that x on output comprises all integers of the new alphabet
+	   with no skipped numbers.
+
+	   Input: x is an array of size n+1 whose first n elements are positive
+	   integers in the range l...k-1. p is array of size n+1, used for temporary
+	   storage. q controls aggregation and compaction by defining the maximum value
+	   for any symbol during transformation: q must be at least k-l; if q<=n,
+	   compaction is guaranteed; if k-l>n, compaction is never done; if q is
+	   INT_MAX, the maximum number of symbols are aggregated into one.
+	   
+	   Output: Returns an integer j in the range 1...q representing the size of the
+	   new alphabet. If j<=n+1, the alphabet is compacted. The global variable r is
+	   set to the number of old symbols grouped into one. Only x[n] is 0.*/
+
+	inline TValue transform(TValue *x, TValue *p, TValue n, TValue k, TValue l, TValue q)
+	{
+	   TValue b, c, d, e, i, j, m, s;
+	   TValue *pi, *pj;
+	   
+	   for (s=0, i=k-l; i; i>>=1)
+		  ++s;                      /* s is number of bits in old symbol.*/
+	   e=MaxValue<TValue>::VALUE>>s; /* e is for overflow checking.*/
+	   for (b=d=r=0; r<n && d<=e && (c=d<<s|(k-l))<=q; ++r) {
+		  b=b<<s|(x[r]-l+1);        /* b is start of x in chunk alphabet.*/
+		  d=c;                      /* d is max symbol in chunk alphabet.*/
+	   }
+	   m=(1<<(r-1)*s)-1;            /* m masks off top old symbol from chunk.*/
+	   x[n]=l-1;                    /* emulate zero terminator.*/
+	   if (d<=n) {                  /* if bucketing possible, compact alphabet.*/
+		  for (pi=p; pi<=p+d; ++pi)
+			 *pi=0;                 /* zero transformation table.*/
+		  for (pi=x+r, c=b; pi<=x+n; ++pi) {
+			 p[c]=1;                /* mark used chunk symbol.*/
+			 c=(c&m)<<s|(*pi-l+1);  /* shift in next old symbol in chunk.*/
+		  }
+		  for (i=1; i<r; ++i) {     /* handle last r-1 positions.*/
+			 p[c]=1;                /* mark used chunk symbol.*/
+			 c=(c&m)<<s;            /* shift in next old symbol in chunk.*/
+		  }
+		  for (pi=p, j=1; pi<=p+d; ++pi)
+			 if (*pi)
+				*pi=j++;            /* j is new alphabet size.*/
+		  for (pi=x, pj=x+r, c=b; pj<=x+n; ++pi, ++pj) {
+			 *pi=p[c];              /* transform to new alphabet.*/
+			 c=(c&m)<<s|(*pj-l+1);  /* shift in next old symbol in chunk.*/
+		  }
+		  while (pi<x+n) {          /* handle last r-1 positions.*/
+			 *pi++=p[c];            /* transform to new alphabet.*/
+			 c=(c&m)<<s;            /* shift right-end zero in chunk.*/
+		  }
+	   } else {                     /* bucketing not possible, don't compact.*/
+		  for (pi=x, pj=x+r, c=b; pj<=x+n; ++pi, ++pj) {
+			 *pi=c;                 /* transform to new alphabet.*/
+			 c=(c&m)<<s|(*pj-l+1);  /* shift in next old symbol in chunk.*/
+		  }
+		  while (pi<x+n) {          /* handle last r-1 positions.*/
+			 *pi++=c;               /* transform to new alphabet.*/
+			 c=(c&m)<<s;            /* shift right-end zero in chunk.*/
+		  }
+		  j=d+1;                    /* new alphabet size.*/
+	   }
+	   x[n]=0;                      /* end-of-string symbol is zero.*/
+	   return j;                    /* return new alphabet size.*/
+	}
+
+	/* Makes suffix array p of x. x becomes inverse of p. p and x are both of size
+	   n+1. Contents of x[0...n-1] are integers in the range l...k-1. Original
+	   contents of x[n] is disregarded, the n-th symbol being regarded as
+	   end-of-string smaller than all other symbols.*/
+
+	void suffixsort(TValue *x, TValue *p, TValue n, TValue k, TValue l)
+	{
+	   TValue *pi, *pk;
+	   TValue i, j, s, sl;
+	   
+	   V=x;                         /* set global values.*/
+	   I=p;
+	   
+	   if (n>=k-l) {                /* if bucketing possible,*/
+		  j=transform(V, I, n, k, l, n);
+		  bucketsort(V, I, n, j);   /* bucketsort on first r positions.*/
+	   } else {
+		  transform(V, I, n, k, l, MaxValue<TValue>::VALUE);
+		  for (i=0; i<=n; ++i)
+			 I[i]=i;                /* initialize I with suffix numbers.*/
+		  h=0;
+		  sort_split(I, n+1);       /* quicksort on first r positions.*/
+	   }
+	   h=r;                         /* number of symbols aggregated by transform.*/
+	   
+	   while (*I>=-n) {
+		  pi=I;                     /* pi is first position of group.*/
+		  sl=0;                     /* sl is negated length of sorted groups.*/
+		  do {
+			 if ((s=*pi)<0) {
+				pi-=s;              /* skip over sorted group.*/
+				sl+=s;              /* add negated length to sl.*/
+			 } else {
+				if (sl) {
+				   *(pi+sl)=sl;     /* combine sorted groups before pi.*/
+				   sl=0;
+				}
+				pk=I+V[s]+1;        /* pk-1 is last position of unsorted group.*/
+				sort_split(pi, pk-pi);
+				pi=pk;              /* next group.*/
+			 }
+		  } while (pi<=I+n);
+		  if (sl)                   /* if the array ends with a sorted group.*/
+			 *(pi+sl)=sl;           /* combine sorted groups at end of I.*/
+		  h=2*h;                    /* double sorted-depth.*/
+	   }
+
+	   for (i=0; i<=n; ++i)         /* reconstruct suffix array from inverse.*/
+		  I[V[i]]=i;
+	}  
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// SeqAn interface
+
+	struct LarssonSadakane {};
+
+	// WARNING:
+	// 1. the content of s will be destroyed
+	// 2. s and SA have to have size n+1
+	// 3. s[n] must be unique and less than any other character in s
+	//
+	// better use LarssonSadakane as a pipe (look down)
+
+    template < typename TSA,
+               typename TText >
+    void createSuffixArray(
+		TSA &SA,
+		TText &s,
+		LarssonSadakane const &,
+		unsigned K)
+	{
+		typedef typename Value<TSA>::Type			TValue;
+		typedef typename MakeSigned_<TValue>::Type	TSValue;	// LarssonSadakane expects signed values
+		ContextLss_<TSValue> c;
+		c.suffixsort(
+			(TSValue*)begin(s, Standard()),		// text
+			(TSValue*)begin(SA, Standard()),	// SA
+			length(s) - 1,						// n
+			K,									// text[i] <  K
+			0);									// text[i] >= 0
+	}
+
+    //////////////////////////////////////////////////////////////////////////////
+    // qsufsort pipe
+    template < typename TInput >
+    struct Pipe< TInput, LarssonSadakane >
+    {
+		typedef typename SAValue<TInput>::Type	TValue;
+		typedef String<TValue, Alloc<> >		TText;
+		typedef String<TValue, Alloc<> >		TSA;
+		typedef Pipe<TSA, Source<> >			TSource;
+
+		TSA		sa;
+		TSource	in;
+
+		Pipe(TInput &_textIn):
+			in(sa)
+		{
+	        typedef typename Iterator<TText, Standard>::Type TIter;
+
+			TValue len = length(_textIn);
+			TText text;
+			resize(text, len + 1, Exact());
+
+			TIter	it = begin(text);
+			TIter	itEnd = begin(text) + len;
+			TValue	maxChar = 0;
+
+			beginRead(_textIn);
+			for(; it != itEnd; ++it, ++_textIn) {
+				TValue val = (*it = 1 + (TValue)*_textIn);
+				if (val > maxChar)
+					maxChar = val;
+			}
+			endRead(_textIn);
+
+			resize(sa, len + 1, Exact());
+			createSuffixArray(sa, text, LarssonSadakane(), maxChar + 1);
+		}
+
+		inline typename Value<TSource>::Type const & operator*() {
+            return *in;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }        
+	};
+
+	template < typename TInput >
+	inline bool control(Pipe< TInput, LarssonSadakane > &me, ControlBeginRead const &command) {
+		control(me.in, command);
+		++me.in;
+		return true;
+	}
+	
+    template < typename TInput >
+    inline typename Size< Pipe< TInput, LarssonSadakane > >::Type
+	length(Pipe< TInput, LarssonSadakane > const &me) {
+        return length(me.in) - 1;
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_sa_mm.h b/src/SeqAn-1.3/seqan/index/index_sa_mm.h
new file mode 100644
index 0000000..2a3a611
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_sa_mm.h
@@ -0,0 +1,201 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_SA_MM_H
+#define SEQAN_HEADER_INDEX_SA_MM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	struct ManberMyers {};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // internal Manber Myers algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+    template < typename TSA,
+               typename TText >
+    void createSuffixArray(
+		TSA &SA,
+		TText &s,
+		ManberMyers const &,
+		unsigned K,
+        unsigned maxdepth)
+	{
+		typedef typename Value<TSA>::Type	TSize;
+		typedef typename Value<TText>::Type	TValue;
+
+		typedef String<TSize, Alloc<> >		TString;
+		typedef String<bool, Alloc<> >		TBoolString;
+
+		typedef typename Iterator<TString, Standard>::Type	TIter;
+
+		TSize n = length(s);
+
+        TString ISA;        resize(ISA, n, Exact());
+        TString count;
+        TBoolString Bh;		resize(Bh, n, Exact());
+		TBoolString B2h;	resize(B2h, n, Exact());
+
+		// sort the first character (h=1)
+		{
+			resize(count, _max((TSize)K, n), Exact());
+			TIter it = begin(ISA, Standard());
+			for(TSize i = 0; i < n; ++i, ++it)
+				*it = i;
+			SEQAN_PROMARK("Suffix-Array invertiert");
+
+			radixPass(SA, ISA, s, count, length(count));
+			arrayFill(begin(Bh, Standard()), end(Bh, Standard()), false);
+		}
+
+		// update bucket borders Bh
+		{
+			TValue c = 0, d;
+			for(TSize i = 0; i < n; ++i) {
+				if (c != (d = s[SA[i]])) {
+					c = d;
+					Bh[i] = true;
+				}
+			}
+		}
+
+		// extend h-sort to 2h-sort
+		{
+			resize(count, n, Exact());
+			TSize j, k, l, Ti, cd = 0;
+
+			// set necessary number of rounds cd
+			for(TSize h = 1; h < n; h <<= 1, ++cd) ;
+			if (maxdepth > 0 && maxdepth < cd) 
+				cd = maxdepth;
+
+			for(TSize h = 1; cd > 0; h <<= 1, --cd) {
+
+				#ifdef SEQAN_DEBUG_INDEX
+					::std::cerr << "[" << cd << "] ";
+				#endif
+				SEQAN_PROADD(SEQAN_PRODEPTH, 1);
+				SEQAN_PROMARK("Beginne Durchlauf");
+				arrayFill(begin(count, Standard()), end(count, Standard()), 0);
+				arrayFill(begin(B2h, Standard()), end(B2h, Standard()), false);
+
+				l = 0;
+				for(TSize i = 0; i < n; ++i) {
+					if (Bh[i]) l = i;
+					ISA[SA[i]] = l;
+				}
+
+				SEQAN_ASSERT(n >= h);
+				Ti = n - h;
+				TIter p = begin(ISA, Standard()) + Ti;
+
+				SEQAN_ASSERT(*p < n);
+				j = count[*p]++;
+				*p += j;
+
+				SEQAN_ASSERT(*p < n);
+				B2h[*p] = true;
+
+				l = 0;
+				for(TSize i = 0; i < n; ++i) {
+
+					if ((Ti = SA[i]) >= h) {
+						Ti -= h;
+						p = begin(ISA) + Ti;
+
+						SEQAN_ASSERT(*p < n);
+						j = count[*p]++;
+						*p += j;
+
+						SEQAN_ASSERT(*p < n);
+						B2h[*p] = true;
+					}
+
+					if (i + 1 == n || Bh[i + 1]) {
+						for(j = l; j <= i; ++j)
+							if ((Ti = SA[j]) >= h) {
+								Ti -= h;
+								if (B2h[k = ISA[Ti]])
+									while (++k < n && !Bh[k] && B2h[k])
+										B2h[k] = false;
+							}
+						l = i + 1;
+					}
+				}
+
+				for(TSize i = 0; i < n; ++i) {
+					SA[ISA[i]] = i;
+					Bh[i] |= B2h[i];
+				}
+			}
+		}
+        SEQAN_PROSET(SEQAN_PRODEPTH, 0);
+        #ifdef SEQAN_DEBUG_INDEX
+			::std::cerr << ::std::endl;
+        #endif
+	}
+
+    // creates suffix array sorted by the first maxLCP chars of suffixes
+    template < typename TSA,
+               typename TText,
+               typename TSize >
+    inline void createSuffixArrayPart(
+		TSA &SA,
+		TText &s,
+		ManberMyers const &alg,
+        TSize maxLCP,
+        unsigned K)
+    {
+        unsigned depth = 0;
+        for(TSize i = 1; i < maxLCP; i*=2) ++depth;
+        createSuffixArray(SA, s, alg, K, depth);
+    }
+
+    template < typename TSA,
+               typename TText,
+               typename TSize >
+    inline void createSuffixArrayPart(
+		TSA &SA,
+		TText &s,
+		ManberMyers const &alg,
+        TSize maxLCP)
+    {
+        SEQAN_CHECKPOINT;
+        createSuffixArrayPart(SA, s, alg, maxLCP, ValueSize< typename Value<TText>::Type >::VALUE);
+    }
+}
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/index/index_sa_qsort.h b/src/SeqAn-1.3/seqan/index/index_sa_qsort.h
new file mode 100644
index 0000000..096fbf3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_sa_qsort.h
@@ -0,0 +1,241 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_SA_QSORT_H
+#define SEQAN_HEADER_INDEX_SA_QSORT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	struct SAQSort {};
+
+	// compare two suffices of a given text
+    template < typename TSAValue, typename TText >
+	struct SuffixLess_ : 
+		public ::std::binary_function < TSAValue, TSAValue, bool >
+    {
+		typedef typename Iterator<TText, Standard>::Type TIter;
+		TIter _begin, _end;
+
+		SuffixLess_(TText &text): 
+			_begin(begin(text, Standard())),
+			_end(end(text, Standard())) {}
+
+		// skip the first <offset> characters
+		template <typename TSize>
+		SuffixLess_(TText &text, TSize offset): 
+			_begin(begin(text, Standard()) + offset),
+			_end(end(text, Standard())) {}
+
+		inline bool operator() (TSAValue const a, TSAValue const b) const 
+		{
+			if (a == b) return false;
+			TIter itA = _begin + a;
+			TIter itB = _begin + b;
+			if (a <= b) {
+				for(; itB != _end; ++itB, ++itA) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return false;
+			} else {
+				for(; itA != _end; ++itA, ++itB) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return true;
+			}
+		}
+	};
+
+	// compare two suffices of a given text
+    template < typename TSAValue, typename TText, typename TSetSpec >
+	struct SuffixLess_<TSAValue, StringSet<TText, TSetSpec> > : 
+		public ::std::binary_function < TSAValue, TSAValue, bool >
+    {
+		typename Size<TText>::Type _offset;
+		TText const &_text;
+
+		SuffixLess_(TText &text): 
+			_text(text) {}
+			
+		// skip the first <offset> characters
+		template <typename TSize>
+		SuffixLess_(TText &text, TSize offset):
+			_text(text),
+			_offset(offset) {}
+		
+		inline bool operator() (TSAValue const a, TSAValue const b) const 
+		{
+			typedef typename Iterator<TText>::Type TIter;
+			if (a == b) return false;
+			TIter itA = begin(getValue(_text, getSeqNo(a)), Standard()) + getSeqOffset(a);
+			TIter itB = begin(getValue(_text, getSeqNo(b)), Standard()) + getSeqOffset(b);
+			TIter itAEnd = end(getValue(_text, getSeqNo(a)), Standard());
+			TIter itBEnd = end(getValue(_text, getSeqNo(b)), Standard());
+			if (itAEnd - itA <= itBEnd - itB) {
+				for(; itA != itAEnd; ++itA, ++itB) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return false;
+			} else {
+				for(; itB != itBEnd; ++itB, ++itA) {
+					if (lexLess(*itA, *itB)) return true;
+					if (lexLess(*itB, *itA)) return false;
+				}
+				return true;
+			}
+		}	
+	};
+
+	// compare two suffices of a given text and skip the first <lcp> characters
+    template < typename TSAValue, typename TText >
+	struct SuffixLessOffset_: SuffixLess_<TSAValue, TText> 
+	{
+		// skip the first <offset> characters
+		template <typename TSize>
+		SuffixLessOffset_(TText &text, TSize offset): 
+			SuffixLess_<TSAValue, TText> (text, offset) {}
+	};
+
+		
+		
+	template < typename TSA, 
+			typename TText,
+			typename TSize>
+	void _sortBucketQuickSort(
+		TSA &sa,
+		TText &text,
+		TSize lcp)
+	{
+	SEQAN_CHECKPOINT
+		// sort bucket with quicksort
+		::std::sort(
+			begin(sa, Standard()), 
+			end(sa, Standard()), 
+			SuffixLessOffset_<typename Value<TSA>::Type, TText>(text, lcp));
+	}
+
+	template < typename TSA,
+               typename TText >
+    inline void createSuffixArray(
+		TSA &SA,
+		TText &s,
+		SAQSort const &)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Size<TSA>::Type TSize;
+		typedef typename Iterator<TSA, Standard>::Type TIter;
+
+		// 1. Fill suffix array with a permutation (the identity)
+		TIter it = begin(SA, Standard());
+		TIter itEnd = end(SA, Standard());
+		for(TSize i = 0; it != itEnd; ++it, ++i)
+			*it = i;
+
+		// 2. Sort suffix array with quicksort
+		::std::sort(
+			begin(SA, Standard()), 
+			end(SA, Standard()), 
+			SuffixLess_<typename Value<TSA>::Type, TText const>(s));
+	}
+
+	template < typename TSA,
+               typename TText,
+			   typename TSSetSpec >
+    inline void createSuffixArray(
+		TSA &SA,
+		StringSet< TText, TSSetSpec > const &s,
+		SAQSort const &)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Size<TSA>::Type TSize;
+		typedef typename Iterator<TSA, Standard>::Type TIter;
+
+		// 1. Fill suffix array with a permutation (the identity)
+		TIter it = begin(SA, Standard());
+		TIter itEnd = end(SA, Standard());
+		for(unsigned j = 0; j < length(s); ++j)
+		{
+			TSize len = length(s[j]);
+			for(TSize i = 0; i < len; ++i)
+				*it = Pair<unsigned, TSize>(j, i);
+		}
+
+		// 2. Sort suffix array with quicksort
+		::std::sort(
+			begin(SA, Standard()), 
+			end(SA, Standard()), 
+			SuffixLess_<typename Value<TSA>::Type, TText const>(s));
+	}
+
+    //////////////////////////////////////////////////////////////////////////////
+    // suffix quicksort pipe
+    template < typename TInput >
+    struct Pipe< TInput, SAQSort >
+    {
+		typedef typename Value<TInput>::Type	TValue;
+		typedef typename SAValue<TInput>::Type	TSAValue;
+
+		typedef String<TValue, Alloc<> >		TText;
+		typedef String<TSAValue, Alloc<> >		TSA;
+		typedef Pipe<TSA, Source<> >			TSource;
+
+		TSA		sa;
+		TSource	in;
+
+		Pipe(TInput &_textIn):
+			in(sa)
+		{
+			TText text;
+			text << _textIn;
+
+			resize(sa, length(_textIn), Exact());
+			createSuffixArray(sa, text, SAQSort());
+		}
+
+		inline typename Value<TSource>::Type const & operator*() {
+            return *in;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }        
+	};
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_shawarma.h b/src/SeqAn-1.3/seqan/index/index_shawarma.h
new file mode 100644
index 0000000..475226f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_shawarma.h
@@ -0,0 +1,93 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_SHAWARMA_H
+#define SEQAN_HEADER_INDEX_SHAWARMA_H
+
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+	namespace shawarma {
+
+		extern void ds_ssort(unsigned char *t, int *sa, int n);
+		extern int init_ds_ssort(int adist, int bs_ratio);
+
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// SeqAn interface
+
+	template <typename TSpec>
+	struct Shawarma {};
+
+	struct MSufSort{};			// MSufSort
+	struct DivSufSort{};		// DivSufSort
+	struct DeepShallow{};		// Deep-Shallow sort
+	struct QSufSort{};			// QSufSort
+
+	// WARNING:
+	// 1. text value must have char size
+	// 2. SA value must have int size
+	// 3. Deep-Shallow sort expects overshoot bytes behind the text
+	// 4. SA must be contiguous
+	//
+
+    template < typename TSA,
+               typename TText >
+    void createSuffixArray(
+		TSA &SA,
+		TText &s,
+		Shawarma<DeepShallow> const)
+	{
+		typedef typename Value<TText>::Type	TValue;
+		typedef typename Value<TSA>::Type	TSAValue;
+
+		SEQAN_ASSERT(sizeof(TValue) == sizeof(unsigned char));
+		SEQAN_ASSERT(sizeof(TSAValue) == sizeof(int));
+		SEQAN_ASSERT(IsContiguous<TSA>::VALUE);
+
+		int overshoot = shawarma::init_ds_ssort(500, 2000);
+
+		SEQAN_ASSERT(overshoot > 0);
+		reserve(s, length(s) + overshoot);
+		shawarma::ds_ssort(
+			(unsigned char*)toCString(s),		// text
+			(int*)begin(SA, Standard()),		// SA
+			length(s));							// n
+	}
+
+
+} // namespace SEQAN_NAMESPACE_MAIN
+
+#endif // SEQAN_HEADER_INDEX_PIZZACHILI_H
diff --git a/src/SeqAn-1.3/seqan/index/index_shims.h b/src/SeqAn-1.3/seqan/index/index_shims.h
new file mode 100644
index 0000000..d3202f1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_shims.h
@@ -0,0 +1,872 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_SHIMS_H
+#define SEQAN_HEADER_INDEX_SHIMS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Suffix Array creation wrappers
+	//////////////////////////////////////////////////////////////////////////////
+
+	// build suffix array with an external pipeling algorithm (skew3, skew7, ...)
+	template < 
+		typename TSA, 
+		typename TObject, 
+		typename TAlgSpec >
+	void _createSuffixArrayPipelining(
+		TSA &suffixArray,
+		TObject const &text,
+		TAlgSpec const)
+	{
+	SEQAN_CHECKPOINT
+        // signed characters behave different than unsigned when compared
+        // to get the same index with signed or unsigned chars we simply cast them to unsigned
+        // before feeding them into the pipeline
+        typedef typename MakeUnsigned_< typename Value<TObject>::Type >::Type TUValue;
+
+        // specialization
+		typedef Pipe< TObject, Source<> >				src_t;
+        typedef Pipe< src_t, Caster<TUValue> >          unsigner_t;
+		typedef Pipe< unsigner_t, TAlgSpec >	        creator_t;
+
+		// instantiation and processing
+		src_t		src(text);
+        unsigner_t  unsigner(src);
+		creator_t	creator(unsigner);
+
+		suffixArray << creator;
+		#ifdef SEQAN_TEST_INDEX
+			isSuffixArray(suffixArray, text);
+		#endif
+	}
+
+
+	// build suffix array (external) for mutliple sequences
+	template < 
+		typename TSA, 
+		typename TString, 
+		typename TSpec,
+		typename TAlgSpec >
+	void _createSuffixArrayPipelining(
+		TSA &suffixArray,
+		StringSet<TString, TSpec> const &stringSet,
+		TAlgSpec const)
+	{
+	SEQAN_CHECKPOINT
+        // signed characters behave different than unsigned when compared
+        // to get the same index with signed or unsigned chars we simply cast them to unsigned
+        // before feeding them into the pipeline
+		typedef typename Concatenator<StringSet<TString, TSpec> >::Type			TConcat;
+        typedef typename MakeUnsigned_< typename Value<TConcat>::Type >::Type	TUValue;
+		typedef Multi<
+			TAlgSpec, 
+			typename Value<TSA>::Type, 
+			typename StringSetLimits<StringSet<TString, TSpec> >::Type >		MultiConstrSpec;
+
+        // specialization
+		typedef Pipe< TConcat, Source<> >				src_t;
+        typedef Pipe< src_t, Caster<TUValue> >          unsigner_t;
+		typedef Pipe< unsigner_t, MultiConstrSpec >	    creator_t;
+
+		// instantiation and processing
+		src_t		src(concat(stringSet));
+        unsigner_t  unsigner(src);
+		creator_t	creator(unsigner, stringSetLimits(stringSet));
+
+		suffixArray << creator;
+		#ifdef SEQAN_TEST_INDEX
+			//isSuffixArray(suffixArray, stringSet);
+		#endif
+	}
+
+
+/**
+.Function.createSuffixArray:
+..summary:Creates a suffix array from a given text.
+..cat:Index
+..signature:createSuffixArray(suffixArray, text[, algo_tag])
+..param.suffixArray:The resulting suffix array.
+..param.text:A given text.
+..param.algo_tag:A tag that identifies the algorithm which is used for creation.
+..remarks:This function should not be called directly. Please use @Function.indexCreate@ or @Function.indexRequire at .
+The size of $suffixArray$ must be at least $length(text)$ before calling this function.
+..include:seqan/index.h
+*/
+
+    template < typename TSA,
+               typename TText,
+			   typename TAlgSpec >
+    inline void _createSuffixArrayRandomAccess(
+		TSA &sa,
+		TText const &s,
+		TAlgSpec const &alg)
+	{
+	SEQAN_CHECKPOINT
+		// -> call internal memory algorithm with an extended interface (+ alphabet size, max_depth)
+		if (BitsPerValue< typename Value<TText>::Type >::VALUE > 16)
+			createSuffixArray(sa, s, alg, length(s), 0);
+		else
+			createSuffixArray(sa, s, alg, ValueSize< typename Value<TText>::Type >::VALUE, 0);
+	}
+
+	template < 
+		typename TSA, 
+		typename TText, 
+		typename TAlgSpec >
+	inline void _createSuffixArrayWrapper(
+		TSA &sa,
+		TText const &s,
+		TAlgSpec const &alg,
+        True)
+	{
+	SEQAN_CHECKPOINT
+        _createSuffixArrayRandomAccess(sa, s, alg);
+	}
+
+    // always use external Skew7 for multiple strings
+	template < 
+		typename TSA, 
+		typename TSequence, 
+		typename TSetSpec,
+		typename TAlgSpec >
+	inline void _createSuffixArrayWrapper(
+		TSA &sa,
+		StringSet<TSequence, TSetSpec> const &s,
+		TAlgSpec const &,
+        True)
+	{
+	SEQAN_CHECKPOINT
+        _createSuffixArrayPipelining(sa, s, Skew7());
+	}
+
+	template < 
+		typename TSA, 
+		typename TText,
+		typename TAlgSpec >
+	inline void _createSuffixArrayWrapper(
+		TSA &sa,
+		TText const &s,
+		TAlgSpec const &alg,
+        False)
+	{
+	SEQAN_CHECKPOINT
+        _createSuffixArrayPipelining(sa, s, alg);
+	}
+
+	template < 
+		typename TSA,
+		typename TText,
+        typename TAlgSpec >
+	inline void createSuffixArray(
+		TSA &sa,
+		TText const &s,
+		TAlgSpec const &alg)
+	{
+	SEQAN_CHECKPOINT
+        _createSuffixArrayWrapper(sa, s, alg, typename SACreatorRandomAccess_<TSA, TText, TAlgSpec>::Type());
+    }
+
+
+
+//____________________________________________________________________________
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// LCP Table creation wrappers
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < 
+        typename TLCPTable,
+		typename TObject, 
+        typename TSA,
+		typename TAlgSpec >
+	void _createLCPTablePipelining(
+		TLCPTable &LCP,
+		TObject const &text,
+		TSA const &suffixArray,
+		TAlgSpec const)
+	{
+	SEQAN_CHECKPOINT
+		// specialization
+		typedef Pipe< TObject, Source<> >							srcText_t;
+		typedef Pipe< TSA, Source<> >   							srcSA_t;
+	    typedef Pipe< Bundle2< srcText_t, srcSA_t >, TAlgSpec >		creator_t;
+
+		// instantiation and processing
+		srcText_t	srcText(text);
+		srcSA_t		srcSA(suffixArray);
+		creator_t	creator(bundle2(srcText, srcSA));
+
+		LCP << creator;
+		#ifdef SEQAN_TEST_INDEX
+			isLCPTable(LCP, suffixArray, text);
+		#endif
+	}
+
+
+	// build lcp table (external) for mutliple sequences
+	template < 
+        typename TLCPTable,
+		typename TString,
+		typename TSpec,
+        typename TSA,
+		typename TAlgSpec >
+	void _createLCPTablePipelining(
+		TLCPTable &LCP,
+		StringSet<TString, TSpec> const &stringSet,
+		TSA const &suffixArray,
+		TAlgSpec const)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Concatenator<StringSet<TString, TSpec> >::Type TConcat;
+		typedef Multi<
+			TAlgSpec, 
+			typename Value<TSA>::Type, 
+			typename StringSetLimits<StringSet<TString, TSpec> >::Type > MultiConstrSpec;
+
+		// specialization
+		typedef Pipe< TConcat, Source<> >								srcText_t;
+		typedef Pipe< TSA, Source<> >   								srcSA_t;
+	    typedef Pipe< Bundle2< srcText_t, srcSA_t >, MultiConstrSpec >	creator_t;
+
+		// instantiation and processing
+		srcText_t	srcText(concat(stringSet));
+		srcSA_t		srcSA(suffixArray);
+		creator_t	creator(bundle2(srcText, srcSA), stringSetLimits(stringSet));
+
+		LCP << creator;
+		#ifdef SEQAN_TEST_INDEX
+			isLCPTable(LCP, suffixArray, text);
+		#endif
+	}
+
+
+/**
+.Function.createLcpTable:
+..summary:Creates a lcp table from a given text and suffix array.
+..cat:Index
+..signature:createLcpTable(lcp, text, suffixArray[, algo_tag])
+..param.lcp:The resulting lcp table.
+..param.text:A given text.
+..param.suffixArray:The suffix array of $text$.
+..param.algo_tag:A tag that identifies the algorithm which is used for creation.
+..remarks:This function should not be called directly. Please use @Function.indexCreate@ or @Function.indexRequire at .
+The size of $lcp$ must be at least $length(text)$ before calling this function.
+..include:seqan/index.h
+*/
+
+	template < 
+        typename TLCP,
+		typename TText,
+		typename TSA,
+        typename TAlgSpec >
+	inline void _createLCPTableWrapper(
+		TLCP &lcp,
+		TText const &s,
+		TSA const &sa,
+		TAlgSpec const &alg,
+        True)
+	{
+	SEQAN_CHECKPOINT
+        _createLCPTableRandomAccess(lcp, s, sa, alg);
+	}
+
+	template < 
+        typename TLCP,
+		typename TText,
+		typename TSA,
+        typename TAlgSpec >
+	inline void _createLCPTableWrapper(
+		TLCP &lcp,
+		TText const &s,
+		TSA const &sa,
+		TAlgSpec const &alg,
+        False)
+	{
+	SEQAN_CHECKPOINT
+        _createLCPTablePipelining(lcp, s, sa, alg);
+	}
+
+	template < 
+        typename TLCP,
+		typename TText,
+		typename TSA,
+        typename TAlgSpec >
+	inline void createLcpTable(
+		TLCP &lcp,
+		TText const &s,
+		TSA const &sa,
+		TAlgSpec const &alg)
+	{
+	SEQAN_CHECKPOINT
+        _createLCPTableWrapper(lcp, s, sa, alg, typename LcpCreatorRandomAccess_<TLCP, TText, TSA, TAlgSpec>::Type());
+    }
+
+
+//____________________________________________________________________________
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Enhanced LCP Table creation wrappers
+	//////////////////////////////////////////////////////////////////////////////
+
+    // build enhanced LCP table with an external pipelining algorithm (ext kasai, ...)
+	// and a dynamic programming tree construction alg
+	// (in contrast to the LCP table the enhanced LCP table contains the lcp-values 
+	// of suffix intervals used in the binary search)
+	template < 
+		typename TValue, 
+        typename TSpec,
+		typename TObject, 
+        typename TSA,
+        typename TLCP,
+		typename TAlgSpec >
+	void createLcpeTableExt(
+		String< TValue, TSpec > &LCPE,
+		TObject const &text,
+		TSA const &suffixArray,
+        TLCP const & /*LCP*/,
+		TAlgSpec const)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Concatenator<TObject>::Type				TConcat;
+
+		// specialization
+		typedef Pipe< TConcat, Source<> >						    srcText_t;
+		typedef Pipe< TSA, Source<> >					    	    srcSA_t;
+	    typedef Pipe< Bundle2< srcText_t, srcSA_t >, TAlgSpec >		creator_t;
+
+		// instantiation and processing
+		srcText_t	srcText(concat(text));
+		srcSA_t		srcSA(suffixArray);
+		creator_t	creator(bundle2(srcText, srcSA));
+
+		#ifdef SEQAN_TEST_INDEX
+			isLCPTable(creator, suffixArray, text);
+		#endif
+		createLcpBinTree(LCPE, creator);
+	}
+
+    // build enhanced LCP table with an lcp algorithm
+	// and a dynamic programming tree construction alg
+    template <
+        typename TValue,
+        typename TSpec,
+        typename TText,
+        typename TSA,
+        typename TLCP,
+		typename TAlgSpec >
+    void createLcpeTable(
+		String< TValue, TSpec > &LCPE,
+		TText const &s,
+		TSA const &,
+        TLCP const &LCP,
+		TAlgSpec const)
+	{
+	SEQAN_CHECKPOINT
+        //TSA LCP;
+        //resize(LCP, length(s), Exact());
+		// we use LCPE[n-lcpSize..n-1] as a temporary buffer instead of allocating one
+        typename Size<TText>::Type lcpSize = length(s) > 1? length(s) - 1: 0;
+		typename Suffix<String< TValue, TSpec > >::Type LCPcopy = suffix(LCPE, length(LCPE) - lcpSize);
+        LCPcopy = prefix(LCP, lcpSize);
+        createLcpBinTree(LCPE, LCP);
+    }
+
+    template <
+        typename TValue,
+        typename TConfig,
+        typename TText,
+        typename TSA,
+        typename TLCP,
+		typename TAlgSpec >
+    void createLcpeTable(
+		String< TValue, External<TConfig> > &LCPE,
+		TText const &s,
+		TSA const &SA,
+        TLCP const &LCP,
+		TAlgSpec const alg)
+	{
+	SEQAN_CHECKPOINT
+        createLcpeTableExt(LCPE, s, SA, LCP, alg);
+    }
+
+    template <
+        typename TValue,
+        typename TSpec,
+        typename TText,
+        typename TSA,
+        typename TLCP>
+    inline void createLcpeTable(
+		String< TValue, TSpec > &LCPE,
+		TText &s,
+		TSA &SA,
+        TLCP &LCP)
+	{
+	SEQAN_CHECKPOINT
+		createLcpeTable(LCPE, s, SA, LCP, Kasai());
+    }
+
+
+//____________________________________________________________________________
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Burrows-Wheeler-Table creation wrappers
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TBWT,
+               typename TText,
+			   typename TSA >
+    void createBWTableExt(
+		TBWT &bwt,
+		TText const &s,
+		TSA const &SA)
+	{
+	SEQAN_CHECKPOINT
+		// specialization
+		typedef Pipe< TText, Source<> >						srcText_t;
+		typedef Pipe< TSA, Source<> >   					srcSA_t;
+	    typedef Pipe< Bundle2< srcText_t, srcSA_t >, Bwt >	creator_t;
+
+		// instantiation and processing
+		srcText_t	srcText(s);
+		srcSA_t		srcSA(SA);
+		creator_t	creator(bundle2(srcText, srcSA));
+
+		bwt << creator;
+	}
+
+/**
+.Function.createBWTable:
+..summary:Creates a Burrows-Wheeler table from a given text and suffix array.
+..cat:Index
+..signature:createBWTable(bwt, text, suffixArray[, algo_tag])
+..param.bwt:The resulting Burrows-Wheeler table.
+..param.text:A given text.
+..param.suffixArray:The suffix array of $text$.
+..param.algo_tag:A tag that identifies the algorithm which is used for creation.
+..remarks:This function should not be called directly. Please use @Function.indexCreate@ or @Function.indexRequire at .
+The size of $bwt$ must be at least $length(text)$ before calling this function.
+..include:seqan/index.h
+*/
+
+	// default
+	template < typename TBWT, typename TText, typename TSA, typename TTextRandom_ >
+    inline void _createBWTableWrapper(TBWT &bwt, TText const &s, TSA const &sa,		TTextRandom_ const)
+	{
+	SEQAN_CHECKPOINT
+		createBWTableExt(bwt, concat(s), sa);
+	}
+
+	// text supports fast random access
+	template < typename TBWT, typename TText, typename TSA >
+    inline void _createBWTableWrapper(TBWT &bwt, TText const &s, TSA const &sa,		True const)
+	{
+	SEQAN_CHECKPOINT
+		createBWTableInt(bwt, concat(s), sa);
+	}
+
+	template < typename TBWT, typename TText, typename TSA >
+    inline void createBWTable(TBWT &bwt, TText const &s, TSA const &sa)
+	{
+	SEQAN_CHECKPOINT
+		_createBWTableWrapper(bwt, s, sa, typename AllowsFastRandomAccess<TText>::Type());
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TOccValue>
+	struct SAValueLess_:
+		public ::std::less<TOccValue> {};
+
+	template <typename T1, typename T2, typename TCompression>
+	struct SAValueLess_< Pair<T1,T2,TCompression> >:
+		public ::std::binary_function< Pair<T1,T2,TCompression>, Pair<T1,T2,TCompression>, bool> 
+	{
+		inline bool operator()(Pair<T1,T2,TCompression> const &a, Pair<T1,T2,TCompression> const &b) const {
+			return	(getValueI1(a) < getValueI1(b)) ||
+					((getValueI1(a) == getValueI1(b)) && (getValueI2(a) < getValueI2(b)));
+		}
+	};
+
+/**
+.Function.orderOccurrences:
+..summary:Sorts a string of occurrences.
+..cat:Index
+..signature:orderOccurrences(occstring)
+..param.occstring:String of occurrences.
+...remarks:Contains suffix array values returned by @Function.getOccurrences at .
+..remarks:The occurrences are sorted by increasing positions.
+..see:Function.getOccurrences
+..see:Metafunction.SAValue
+..include:seqan/index.h
+*/
+	template <typename TValue, typename TSpec>
+	inline void orderOccurrences(String<TValue, TSpec> &occString)
+	{
+	SEQAN_CHECKPOINT
+		::std::sort(begin(occString, Standard()), end(occString, Standard()), SAValueLess_<TValue>());
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// fibre creators
+
+/**
+.Function.indexCreate:
+..summary:Creates a specific @Metafunction.Fibre at .
+..cat:Index
+..signature:indexCreate(index, fibre_tag[, algo_tag])
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Class.Index
+..param.fibre_tag:A tag that identifies the @Metafunction.Fibre@ (e.g. @Tag.ESA Index Fibres.EsaSA@).
+..param.algo_tag:A tag that identifies the algorithm which is used to create the fibre.
+...default:The result of @Metafunction.DefaultIndexCreator at .
+..returns:A $bool$ which is $true$ on a successful creation.
+..remarks:$indexCreate$ calls the fibre corresponding $createXXX(..)$ function (e.g. @Function.createSuffixArray@).
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec, typename TSpecAlg>
+	inline bool indexCreate(Index<TText, TSpec> &index, FibreSA, TSpecAlg const alg) {
+	SEQAN_CHECKPOINT
+		resize(indexSA(index), length(indexRawText(index)), Exact());
+		createSuffixArray(indexSA(index), indexText(index), alg);
+		return true;
+	}
+
+	template <typename TText, typename TSpec, typename TSpecAlg>
+	inline bool indexCreate(Index<TText, TSpec> &index, FibreLcp, TSpecAlg const alg) {
+	SEQAN_CHECKPOINT
+		resize(indexLcp(index), length(indexRawText(index)), Exact());
+		createLcpTable(indexLcp(index), indexText(index), indexSA(index), alg);
+		return true;
+	}
+
+	template <typename TText, typename TSpec, typename TSpecAlg>
+	inline bool indexCreate(Index<TText, TSpec> &index, FibreLcpe, TSpecAlg const alg) {
+	SEQAN_CHECKPOINT
+	//TODO: separate LCP from LCPE (for now LCPE = LCP + extra)
+		resize(indexLcpe(index), sizeofLcpe(lengthSum(index)), Exact());
+		createLcpeTable(indexLcpe(index), indexRawText(index), indexSA(index), indexLcp(index), alg);
+		return true;
+//		return false;
+	}
+
+	template <typename TText, typename TSpec>
+	inline bool indexCreate(Index<TText, TSpec> &index, FibreBwt, Bwt const) {
+	SEQAN_CHECKPOINT
+		resize(indexBwt(index), length(indexRawText(index)), Exact());
+		createBWTable(indexBwt(index), indexText(index), indexRawSA(index));
+		return true;
+	}
+
+	template <typename TText, typename TSpec>
+	inline bool indexCreate(Index<TText, TSpec> &index, FibreChildtab, Childtab const) {
+	SEQAN_CHECKPOINT
+		resize(indexChildtab(index), length(indexRawText(index)), Exact());
+		createChildtab(indexChildtab(index), indexLcp(index));
+		return true;
+	}
+
+	template <typename TText, typename TSpec, typename TFibre>
+	inline bool indexCreate(Index<TText, TSpec> &index, Tag<TFibre> const fibre) {
+	SEQAN_CHECKPOINT
+		return indexCreate(index, fibre, typename DefaultIndexCreator<Index<TText, TSpec>, Tag<TFibre> const>::Type());
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// automatic fibre creation
+
+/**
+.Function.indexSupplied:
+..summary:Returns whether a specific @Metafunction.Fibre@ is present.
+..cat:Index
+..signature:indexSupplied(index, fibre_tag)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Class.Index
+..param.fibre_tag:A tag that identifies the @Metafunction.Fibre@ (e.g. @Tag.ESA Index Fibres.EsaSA@).
+..returns:A $bool$ which is $true$, iff the fibre is present.
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec, typename TFibre>
+	inline bool indexSupplied(Index<TText, TSpec> &index, Tag<TFibre> const fibre) {
+	SEQAN_CHECKPOINT
+		return !empty(getFibre(index, fibre));
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.indexRequire:
+..summary:On-demand creation of a specific @Metafunction.Fibre at .
+..cat:Index
+..signature:indexRequire(index, fibre_tag)
+..param.index:The @Class.Index@ object holding the fibre.
+...type:Class.Index
+..param.fibre_tag:A tag that identifies the @Metafunction.Fibre@ (e.g. @Tag.ESA Index Fibres.EsaSA@).
+..returns:A $bool$ which is $true$ on a successful creation.
+..remarks:If the fibre already exists (@Function.indexSupplied@ is true) then $indexRequire$ does nothing.
+If the fibre doesn't exist then @Function.indexCreate@ is called to create it.
+..include:seqan/index.h
+*/
+
+	template <typename TText, typename TSpec, typename TFibre>
+	inline bool indexRequire(Index<TText, TSpec> &index, Tag<TFibre> const fibre) {
+	SEQAN_CHECKPOINT
+		if (indexSupplied(index, fibre)) return true;				// if the table doesn't exist,
+		if (!indexSolveDependencies(index, fibre)) return false;	// fulfill requirements
+		return indexCreate(index, fibre);							// and create table
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// index cargo interface
+
+	template <typename TText, typename TSpec>
+	inline typename Reference< typename Cargo<Index<TText, TSpec> >::Type >::Type
+	cargo(Index<TText, TSpec> & me)
+	{
+	SEQAN_CHECKPOINT
+		return me.cargo;
+	}
+
+	template <typename TText, typename TSpec>
+	inline typename Reference< typename Cargo<Index<TText, TSpec> const>::Type >::Type
+	cargo(Index<TText, TSpec> const & me)
+	{
+	SEQAN_CHECKPOINT
+		return me.cargo;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// solve dependencies
+
+	template <typename TText, typename TSpec, typename TFibre>
+	inline bool indexSolveDependencies(Index<TText, TSpec> &, Tag<TFibre> const) {
+	SEQAN_CHECKPOINT
+		return true;
+	}
+
+	template <typename TText, typename TSpec>
+	inline bool indexSolveDependencies(Index<TText, TSpec> &index, FibreLcp) {
+	SEQAN_CHECKPOINT
+		return indexRequire(index, FibreSA());
+	}
+
+	template <typename TText, typename TSpec>
+	inline bool indexSolveDependencies(Index<TText, TSpec> &index, FibreLcpe) {
+	SEQAN_CHECKPOINT
+		return indexRequire(index, FibreLcp());
+	}
+
+	template <typename TText, typename TSpec>
+	inline bool indexSolveDependencies(Index<TText, TSpec> &index, FibreChildtab) {
+	SEQAN_CHECKPOINT
+		return indexRequire(index, FibreLcp());
+	}
+
+	template <typename TText, typename TSpec>
+	inline bool indexSolveDependencies(Index<TText, TSpec> &index, FibreBwt) {
+	SEQAN_CHECKPOINT
+		return indexRequire(index, FibreSA());
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// open
+
+	template < typename TValue, typename TSpec >
+	inline bool open(String<TValue, TSpec> &string, const char *fileName, int openMode) {
+	SEQAN_CHECKPOINT
+		String<TValue, External< ExternalConfigLarge<> > > extString;
+		if (!open(extString, fileName, openMode & ~OPEN_CREATE)) return false;
+		assign(string, extString);
+		return true;
+	}
+	template < typename TValue, typename TSpec >
+	inline bool open(String<TValue, TSpec> &string, const char *fileName) {
+	SEQAN_CHECKPOINT
+		return open(string, fileName, OPEN_RDONLY);
+	}
+
+	template < typename THost, typename TSpec >
+	inline bool open(Segment<THost, TSpec> &string, const char *fileName, int openMode) {
+	SEQAN_CHECKPOINT
+		String<typename Value<THost>::Type, External< ExternalConfigLarge<> > > extString;
+		if (!open(extString, fileName, openMode & ~OPEN_CREATE)) return false;
+		assign(string, extString);
+		return true;
+	}
+	template < typename THost, typename TSpec >
+	inline bool open(Segment<THost, TSpec> &string, const char *fileName) {
+	SEQAN_CHECKPOINT
+		return open(string, fileName, OPEN_RDONLY);
+	}
+
+	// ATTENTION:
+	// This implementation of open doesn't work with external memory StringSets (External<>, MMap<>)
+	// If you need a persistent external StringSet you have to use a Owner<ConcatDirect<> > StringSet.
+	template < typename TValue, typename TSpec, typename TSSSpec >
+	inline bool open(StringSet<String<TValue, TSpec>, TSSSpec> &multi, const char *fileName, int openMode) {
+	SEQAN_CHECKPOINT
+		char id[12]; // 2^32 has 10 decimal digits + 1 (0x00)
+		unsigned i = 0;
+		clear(multi);
+		CharString name;
+		while (true)
+		{
+			sprintf(id, ".%u", i);
+			name = fileName;
+			append(name, id);
+			{
+				resize(multi, i + 1);
+				if (!open(multi[i], toCString(name), (openMode & ~OPEN_CREATE) | OPEN_QUIET))
+				{
+					resize(multi, i - 1);
+					break;
+				}
+			}
+			++i;
+		}
+		return i > 1;
+	}
+	template < typename TValue, typename TSpec, typename TSSSpec >
+	inline bool open(StringSet<String<TValue, TSpec>, Owner<ConcatDirect<TSSSpec> > > &multi, const char *fileName, int openMode) {
+	SEQAN_CHECKPOINT
+		CharString name;
+		name = fileName;
+		append(name, ".concat");
+		if (!open(multi.concat, toCString(name), openMode | OPEN_QUIET)) return false;
+		name = fileName;
+		append(name, ".limits");
+		if (!open(multi.limits, toCString(name), openMode | OPEN_QUIET) && !empty(multi.concat))
+		{
+			clear(multi);
+			return false;
+		}
+		// limits file was just created
+		if (empty(multi.limits))
+			appendValue(multi.limits, 0);
+		return true;
+	}
+
+	template < typename TValue, typename TSpec, typename TSSSpec>
+	inline bool open(StringSet<String<TValue, TSpec>, TSSSpec> &multi, const char *fileName) {
+	SEQAN_CHECKPOINT
+		return open(multi, fileName, OPEN_RDONLY);
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// save
+
+	template < typename TValue, typename TSpec >
+	inline bool save(String<TValue, TSpec> const &string, const char *fileName, int openMode) {
+	SEQAN_CHECKPOINT
+//
+//		if (length(string) == 0) return true;
+		String<TValue, External< ExternalConfigLarge<> > > extString;
+		if (!open(extString, fileName, openMode)) return false;
+		assign(extString, string);
+		return true;
+	}
+	template < typename TValue, typename TSpec >
+	inline bool save(String<TValue, TSpec> &string, const char *fileName) {
+	SEQAN_CHECKPOINT
+		return save(string, fileName, OPEN_WRONLY | OPEN_CREATE);
+	}
+
+	template < typename THost, typename TSpec >
+	inline bool save(Segment<THost, TSpec> const &string, const char *fileName, int openMode) {
+	SEQAN_CHECKPOINT
+		if (length(string) == 0) return true;
+		String<typename Value<THost>::Type, External< ExternalConfigLarge<> > > extString;
+		if (!open(extString, fileName, openMode)) return false;
+		assign(extString, string);
+		return true;
+	}
+	template < typename THost, typename TSpec >
+	inline bool save(Segment<THost, TSpec> const &string, const char *fileName) {
+	SEQAN_CHECKPOINT
+		return save(string, fileName, OPEN_WRONLY | OPEN_CREATE);
+	}
+
+	template < typename TValue, typename TSpec, typename TSSSpec>
+	inline bool save(StringSet<String<TValue, TSpec>, TSSSpec> const &multi, const char *fileName, int openMode) {
+	SEQAN_CHECKPOINT
+		if (length(multi) == 0) return true;
+		char id[12]; // 2^32 has 10 decimal digits + 2 ('.' and 0x00)
+		CharString name;
+		for(unsigned i = 0; i < length(multi); ++i)
+		{
+			sprintf(id, ".%u", i);
+			name = fileName;
+			append(name, &(id[0]));
+			if (!save(multi[i], toCString(name), openMode))
+				return false;
+		}
+		return true;
+	}
+	template < typename TValue, typename TSpec, typename TSSSpec >
+	inline bool save(StringSet<String<TValue, TSpec>, Owner<ConcatDirect<TSSSpec> > > &multi, const char *fileName, int openMode) {
+	SEQAN_CHECKPOINT
+		CharString name;
+		name = fileName;
+		append(name, ".concat");
+		if (!save(multi.concat, toCString(name), openMode)) return false;
+		name = fileName;
+		append(name, ".limits");
+		if (!save(multi.limits, toCString(name), openMode)) return false;
+		return true;
+	}
+	template < typename TValue, typename TSpec, typename TSSSpec>
+	inline bool save(StringSet<String<TValue, TSpec>, TSSSpec> const &multi, const char *fileName) {
+	SEQAN_CHECKPOINT
+		return save(multi, fileName, OPEN_WRONLY | OPEN_CREATE);
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_skew3.h b/src/SeqAn-1.3/seqan/index/index_skew3.h
new file mode 100644
index 0000000..28c248b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_skew3.h
@@ -0,0 +1,544 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_SKEW3_H
+#define SEQAN_HEADER_INDEX_SKEW3_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	struct Skew3 {};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // external Skew3 algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+	template <typename T>
+	struct SkewDC_<3, T> {
+		static const unsigned VALUE[];
+	};
+
+	template <typename T>
+	const unsigned SkewDC_<3, T>::VALUE[] = { 2,   1, 2 };
+
+
+	// *** COMPARATORS & MAPS ***
+
+    template <typename InType, typename Result = int>
+    struct _skew3NComp : public ::std::binary_function<InType,InType,Result> {
+        inline Result operator()(const InType &a, const InType &b) const
+        {
+			typedef typename InType::T1 SizeType;
+            typedef typename InType::T2 Triplet;
+            const typename Triplet::T *sa = a.i2.i;
+            const typename Triplet::T *sb = b.i2.i;
+
+            SizeType n = Triplet::size;
+            if (a.i1 < n) n = a.i1;
+            if (b.i1 < n) n = b.i1;
+            for(SizeType i = 0; i < n; i++, ++sa, ++sb) {
+                if (*sa == *sb) continue;
+                return (*sa < *sb)? -1 : 1;
+            }
+            if (n < Triplet::size) {
+                return (a.i1 < b.i1)? -1 : 1;
+            } else
+                return 0;
+        }
+    };
+
+    template <typename InType, typename Result = typename InType::T1>
+    struct _skew3NMapLinear : public ::std::unary_function<InType,Result> {
+        Result BN;
+        _skew3NMapLinear(Result BN_):BN(BN_) { }
+        inline Result operator()(const InType& x) const
+        { Result i = x.i1; return BN - (i - i / 3); }
+    };
+
+    template <typename InType, typename Result = typename InType::T1>
+    struct _skew3NMapSliced : public ::std::unary_function<InType,Result> {
+        Result BN, BN2;
+        _skew3NMapSliced(Result BN_):BN(BN_-1),BN2(BN_/2-1) { }
+        inline Result operator()(const InType& x) const
+        { return (x.i1 % 3 == 1)? BN - x.i1/3 : BN2 - x.i1/3; }
+    };
+
+
+    template <typename InType, typename Result = InType>
+    struct _skew3UnslicerFunc : public ::std::unary_function<InType,Result> {
+        Result o1, o2, n2;
+        _skew3UnslicerFunc(Result N):
+            o1(N - (N + 2) % 3),
+            o2(N - (N + 1) % 3),
+            n2((N + 1) / 3) { }
+
+        inline Result operator()(const InType& x) const
+        { return (x < n2) ? o2 - x * 3 : o1 - (x - n2) * 3; }
+    };
+
+    template <typename InType, typename Result = typename InType::T2::T>
+    struct _skew3NMapExtended : public ::std::unary_function<InType,Result> {
+        inline Result operator()(const InType& x) const
+        { return x.i2[0]; }
+    };
+
+    template <typename InType, typename Result = int>
+    struct _skew3ExtendComp : public ::std::binary_function<InType,InType,Result> {
+        inline Result operator()(const InType &a, const InType &b) const
+        {
+            return (a.i3[0] <  b.i3[0] ||
+                    (a.i3[0] == b.i3[0] && a.i2[0] < b.i2[0])) ? -1 : 1;
+        }
+    };
+
+
+    template < typename TInput >
+    struct Value< Pipe< TInput, Skew3 > > {
+        typedef typename Size<TInput>::Type Type;
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // Skew3 pipeline module
+
+    template < typename TInput >
+    struct Pipe< TInput, Skew3 >
+    {
+
+        // *** SPECIALIZATION ***
+
+        // step 1
+		typedef Pipe< TInput, Sampler<3> >  TSamplerDC3;
+                                        typedef _skew3NComp<TypeOf_(TSamplerDC3)> ncomp_t;
+        typedef Pool< TypeOf_(TSamplerDC3), SorterSpec< SorterConfigSize<ncomp_t, TSizeOf_(TSamplerDC3) > > > TSortTuples;
+		typedef Pipe< TSortTuples, Namer<ncomp_t> > TNamer;
+                                        typedef _skew3NMapSliced<TypeOf_(TNamer)> nmap_sliced_t;
+                                        typedef _skew3NMapLinear<TypeOf_(TNamer)> nmap_linear_t;
+        typedef Pool< TypeOf_(TNamer), MapperSpec< MapperConfigSize< nmap_sliced_t, TSizeOf_(TNamer) > > > TNames_Sliced;
+
+        // unique names - shortcut
+        typedef Pool< TypeOf_(TNames_Sliced), MapperSpec< MapperConfigSize< nmap_linear_t, TSizeOf_(TNames_Sliced) > > > TNames_Linear_Unique;
+
+        // non-unique names - recursion
+        typedef Pipe< TNames_Sliced, Filter< filterI2<TypeOf_(TNames_Sliced)> > > TFilter;
+        typedef Pipe< TFilter, Skew3 > TRecurse;
+                                        typedef _skew3UnslicerFunc<TypeOf_(TRecurse)> unslicer_func_t;
+        typedef Pipe< TRecurse, Filter<unslicer_func_t> > TUnslicer;
+        typedef Pipe< TUnslicer, Counter > TRenamer;
+        typedef Pool< TypeOf_(TRenamer), MapperSpec< MapperConfigSize< nmap_linear_t, TSizeOf_(TRenamer) > > > TNames_Linear;
+
+        // step 2
+        typedef Pipe< Bundle2< TInput, TNames_Linear >, Extender3 > TExtender;
+                                        typedef _skew3ExtendComp<TypeOf_(typename TExtender::Out0)> extend_comp_t;
+        typedef Pool< TypeOf_(typename TExtender::Out0), SorterSpec< SorterConfigSize< extend_comp_t, TSizeOf_(typename TExtender::Out0) > > > TSorterS0;
+
+        // step 3
+                                        typedef _skew3NMapExtended<TypeOf_(typename TExtender::Out12)> nmap_extended_t;
+		typedef Pool< TypeOf_(typename TExtender::Out12), MapperSpec< MapperConfigSize< nmap_extended_t, TSizeOf_(typename TExtender::Out12) > > > TSorterS12;
+        typedef Pipe< Bundle2< TSorterS0, TSorterS12 >, Merger3 > TMerger;
+
+        TSorterS0   sortedS0;
+        TSorterS12  sortedS12;
+        TMerger     in;
+
+        Pipe() :
+			in(bundle2(sortedS0, sortedS12)) {}
+
+        Pipe(TInput& _textIn) :
+			in(bundle2(sortedS0, sortedS12))
+		{
+			process(_textIn);
+		}
+
+	    template < typename TInput_ >
+        bool process(TInput_ &textIn) {
+
+            SEQAN_PROADD(SEQAN_PRODEPTH, 1);
+            SEQAN_PROMARK("Rekursionsabstieg");
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "enter level " << SEQAN_PROVAL(SEQAN_PRODEPTH) << ::std::endl;
+            #endif
+            {
+
+
+            // *** INSTANTIATION ***
+
+            // step 1
+            TSamplerDC3                 sampler(textIn);
+            TSortTuples                 sorter;
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "  sort names (" << length(sampler)<< ")" << ::std::endl;
+            #endif
+            sorter << sampler;
+            SEQAN_PROMARK("Sorter (2) - Triplets sortieren");
+
+            TNamer                      namer(sorter);
+            nmap_sliced_t               map_sliced(length(namer));
+            nmap_linear_t               map_linear(length(namer));
+            TNames_Sliced               names_sliced(map_sliced);
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "  slice names" << ::std::endl;
+            #endif
+            names_sliced << namer;
+
+            if (namer.unique() || empty(names_sliced)) {
+                // unique names
+
+                clear(sorter);
+                SEQAN_PROMARK("Mapper (4) - s12 konstruieren");
+                TNames_Linear_Unique        names_linear(map_linear);
+
+                #ifdef SEQAN_DEBUG_INDEX
+                    ::std::cerr << "  make names linear" << ::std::endl;
+                #endif
+                names_linear << names_sliced;
+				clear(names_sliced);
+                SEQAN_PROMARK("Mapper (10) - ISA12 konstruieren");
+
+                // step 2
+                _skew3Extend(textIn, names_linear, sortedS0, sortedS12);
+
+            } else {
+                // non-unique names
+
+                clear(sorter);
+                SEQAN_PROMARK("Mapper (4) - s12 konstruieren");
+
+                TFilter                     filter(names_sliced);
+                TRecurse                    recurse(filter);
+
+                #ifdef SEQAN_TEST_SKEW3
+                {
+                    String<typename Value<TFilter>::Type, Alloc<> > _text;
+                    _text << filter;
+                    SEQAN_DO(isSuffixArray(recurse, _text));
+                }
+                #endif
+
+				clear(filter);
+				unslicer_func_t             func(length(textIn));
+                TUnslicer                   unslicer(recurse, func);
+                TRenamer                    renamer(unslicer);
+
+                TNames_Linear               names_linear(map_linear);
+                #ifdef SEQAN_DEBUG_INDEX
+                    ::std::cerr << "  rename names" << ::std::endl;
+                #endif
+                names_linear << renamer;
+				clear(renamer);
+                SEQAN_PROMARK("Mapper (10) - ISA12 konstruieren");
+
+                // step 2
+                #ifdef SEQAN_DEBUG_INDEX
+                    ::std::cerr << "  prepare merge" << ::std::endl;
+                #endif
+				_skew3Extend(textIn, names_linear, sortedS0, sortedS12);
+                SEQAN_PROMARK("Mapper (12), Sorter (13) - SA12 und SA0 verschmelzen");
+            }
+
+            // step 3
+            // ... is done on-demand by merger
+            }
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "left level " << SEQAN_PROVAL(SEQAN_PRODEPTH) << ::std::endl;
+            #endif
+            SEQAN_PROMARK("Rekursionsaufstieg");
+            SEQAN_PROSUB(SEQAN_PRODEPTH, 1);
+            return true;
+        }
+
+        inline typename Value<Pipe>::Type const & operator*() {
+            return *in;
+        }
+
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }
+    };
+
+    // not sure which interface is more intuitive, we support both
+    // you can call "skew << pipe" or "skew_t skew(pipe); skew.process()"
+    // for the first we would need no _in member
+	template < typename TInput, typename TObject >
+    inline bool operator<<(Pipe< TInput, Skew3 > &me, TObject &textIn) {
+        return me.process(textIn);
+    }
+
+	template <
+		typename TSA,
+		typename TValue,
+		typename TConfig >
+	inline void createSuffixArray(
+		TSA &SA,
+		String< TValue, External<TConfig> > &s,
+		Skew3 const &spec,
+		unsigned /*K*/,
+        unsigned /*maxdepth*/)
+	{
+        createSuffixArrayExt(SA, s, spec);
+	}
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // internal Skew3 algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+    //////////////////////////////////////////////////////////////////////////////
+	// typedefs and helpers
+
+    template <typename T, typename ST> inline
+    bool _leqSkew3(T a1, ST a2,   T b1, ST b2)
+    { // lexic. order for pairs
+        return (lexLess(a1, b1) || (a1 == b1 && a2 <= b2));
+    }
+
+    template <typename T, typename ST> inline
+    bool _leqSkew3(T a1, T a2, ST a3,   T b1, T b2, ST b3)
+    { // and triples
+        return (lexLess(a1, b1) || (a1 == b1 && _leqSkew3(a2,a3, b2,b3)));
+    }
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // Skew Implementation
+    // find the suffix array SA of s[0..n-1] in {0..K}^n
+    //
+    // * no trailing 0's required
+    // * no dummy triples in special cases
+
+    // creates suffix array SA of s
+    // chars have to be in the range [0,K)
+    template < typename TSA,
+               typename TText >
+    void createSuffixArray(
+		TSA &SA,
+		TText &s,
+		Skew3 const &,
+		unsigned K,
+        unsigned maxdepth,
+        unsigned depth)
+    {
+		typedef typename Value<TSA>::Type TSize;
+		typedef typename Value<TText>::Type TValue;
+
+        #ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "--- CREATE SUFFIX ARRAY ---" << std::endl;
+            std::cerr << "Skew3 [random access]" << std::endl;
+        #endif
+
+		TSize n = length(s);
+        if (n < 1) return;
+
+        TSize n0=n/3, n1=(n+2)/3, n2=(n+1)/3, n12=n1+n2;
+        TSize         o1=(n+2)%3, o2=(n+1)%3;
+
+        SEQAN_PROSET(SEQAN_PRODEPTH, depth);
+        SEQAN_PROSET(SEQAN_PROEXTRA1, K);
+        SEQAN_PROMARK("Rekursionsabstieg");
+        #ifdef SEQAN_DEBUG_INDEX
+			::std::cerr << "enter level " << depth << " (" << n << ")" << ::std::endl;
+        #endif
+
+        String<TSize, Alloc<> > s12;
+        resize(s12, n12, Exact());
+		// we use SA[n0..n-1] as a temporary buffer instead of allocating one;
+		typename Suffix<TSA>::Type SA12 = suffix(SA, n0);
+
+
+		// generate positions of mod 1 and mod 2 suffixes
+		{
+			//for (TSize i=0, j=0;  i < n;  i++) if ((n-i)%3) s12[j++] = i;
+			s12[0] = o1;
+			for (TSize i=o2, j=n1-n2;  i < n;  i++) {
+				s12[j++] = i++;
+				s12[j++] = i++;
+			}
+		}
+
+
+		// lsb radix sort the mod 1 and mod 2 triples
+		{
+			String<TSize, Alloc<> > cnt;
+			resize(cnt, K, Exact());	// counter array
+
+			radixPass(SA12, s12, s, cnt, K, 2);
+			radixPass(s12, SA12, s, cnt, K, 1);
+			radixPass(SA12, s12, s, cnt, K);
+		}
+        SEQAN_PROMARK("Triplets sortiert");
+
+        // find lexicographic names of triples
+		TSize name = 0;
+
+        bool differ = true;
+		TValue c0 = TValue(), c1 = TValue(), c2 = TValue();
+		for (TSize i = 0, clip = n - 2, l;  i < n12;  i++) {
+			if ((l = SA12[i]) < clip) {
+				if (differ || s[l] != c0 || s[l+1] != c1 || s[l+2] != c2) {
+					name++;  c0 = s[l];  c1 = s[l+1];  c2 = s[l+2];
+					differ = false;
+				}
+			} else {
+				name++;
+				differ = true;  // the last 2 triples always differ from the rest
+			}
+			s12[(n-l) % 3 == 2 ? l/3 : l/3 + n2] = name - 1;    // left or right half
+		}
+        SEQAN_PROMARK("s12 konstruiert");
+
+		// recurse if names are not yet unique
+		if (name < n12) {
+            if (depth != maxdepth)
+            {
+			    createSuffixArray(SA12, s12, Skew3(), name, maxdepth, depth + 1);
+                #ifdef SEQAN_TEST_SKEW3
+                    SEQAN_DO(isSuffixArray(SA12, s12));
+                #endif
+            }
+			// store unique names in s12 using the suffix array
+			for (TSize i = 0;  i < n12;  i++) s12[SA12[i]] = i;
+		} else // generate the suffix array of s12 directly
+			for (TSize i = 0;  i < n12;  i++) SA12[s12[i]] = i;
+
+
+
+		// use SA[0...n0-1] as a temporary buffer instead of s0
+		// and allocate SA0
+
+		{
+			String<TSize, Alloc<> > SA0;
+			resize(SA0, n0, Exact());
+			typename Infix<TSA>::Type s0 = infix(SA, 0, n0);
+
+			// stably sort the mod 0 suffixes from SA12 by their first character
+			{
+				String<TSize, Alloc<> > cnt;
+				resize(cnt, K, Exact());	// counter array
+
+				for (TSize i=0, j=0, l;  i < n12;  i++)
+					if ((l = SA12[i]) < n2)
+						if ((l = o2 + (3 * l) ) > 0)
+							s0[j++] = l - 1;
+				radixPass(SA0, s0, s, cnt, K);
+			}
+            SEQAN_PROMARK("SA0 konstruiert");
+
+			// merge sorted SA0 suffixes and sorted SA12 suffixes
+			#define SEQAN_GET_ISKEW3(ii) (ii < n2 ? ii * 3 + o2 : (ii - n2) * 3 + o1)
+			if (n0)
+			{
+				for (TSize p=0,  t=0,  k=0,  clip = n - 1;  k < n;  k++) {
+					TSize ii = SA12[t];					// pos of current interleave offset 12 suffix
+					TSize i  = SEQAN_GET_ISKEW3(ii);	// pos of current offset 12 suffix
+					TSize j  = SA0[p];					// pos of current offset 0  suffix
+					if (ii < n2 ?
+						_leqSkew3<TValue, TSize> (s[i],       s12[ii + n1],     s[j],        s12[j/3 + n2  - n0]) :
+					(i < clip) ?     // clip if 12 suffix is the last
+						_leqSkew3<TValue, TSize> (s[i],s[i+1],s12[ii + 1 - n1], s[j],s[j+1], s12[j/3 + n12 - n0]) :
+						s[i] <= s[j])
+
+					{ // suffix from SA12 is smaller
+						SA[k] = i;
+						if (++t == n12) // done --- only SA0 suffixes left
+							for (;  p < n0;  p++) SA[++k] = SA0[p];
+					} else {
+						SA[k] = j;
+						if (++p == n0)  // done --- only SA12 suffixes left
+							for (;  t < n12;  t++) { ii = SA12[t]; SA[++k] = SEQAN_GET_ISKEW3(ii); }
+					}
+				}
+			} else
+				for (TSize t = 0;  t < n12;  t++) { TSize ii = SA12[t]; SA[t] = SEQAN_GET_ISKEW3(ii); }
+		}
+        SEQAN_PROMARK("SA12 und SA0 verschmolzen");
+
+        #ifdef SEQAN_DEBUG_INDEX
+            ::std::cerr << "left level " << depth << ::std::endl;
+        #endif
+        SEQAN_PROMARK("Rekursionsaufstieg");
+        SEQAN_PROSUB(SEQAN_PRODEPTH, 1);
+    }
+
+    template < typename TSA,
+               typename TText >
+    inline void createSuffixArray(
+		TSA &SA,
+		TText &s,
+		Skew3 const &alg,
+		unsigned K,
+        unsigned maxdepth)
+	{
+		createSuffixArray(SA, s, alg, K, maxdepth, 1);
+	}
+
+    // creates suffix array sorted by the first maxLCP chars of suffixes
+    template < typename TSA,
+               typename TText,
+               typename TSize >
+    inline void createSuffixArrayPart(
+		TSA &SA,
+		TText &s,
+		Skew3 const &_dummy,
+        TSize maxLCP,
+        unsigned K)
+    {
+        unsigned depth = 0;
+        for(TSize i = 1; i < maxLCP; i*=3) ++depth;
+        createSuffixArray(SA, s, _dummy, K, depth);
+    }
+
+
+    template < typename TSA,
+               typename TText,
+               typename TSize >
+    inline void createSuffixArrayPart(
+		TSA &SA,
+		TText &s,
+		Skew3 const &_dummy,
+        TSize maxLCP)
+    {
+    	SEQAN_CHECKPOINT;
+    	createSuffixArrayPart(SA, s, _dummy, maxLCP, ValueSize< typename Value<TText>::Type >::VALUE);
+    }
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_skew7.h b/src/SeqAn-1.3/seqan/index/index_skew7.h
new file mode 100644
index 0000000..69457c8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_skew7.h
@@ -0,0 +1,853 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_SKEW7_H
+#define SEQAN_HEADER_INDEX_SKEW7_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	struct Skew7 {};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // external Skew7 algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+	template <typename T>
+	struct SkewDC_<7, T> {
+		static const unsigned VALUE[];
+	};
+
+	template <typename T>
+	const unsigned SkewDC_<7, T>::VALUE[] = { 3,   1, 2, 4 };
+
+
+	// *** COMPARATORS & MAPS ***
+        
+    template <typename InType, typename Result = int>
+    struct _skew7NComp : public ::std::binary_function<InType,InType,Result> {
+        inline Result operator()(const InType &a, const InType &b) const
+        {
+			typedef typename InType::T1 SizeType;
+            typedef typename InType::T2 Septet;
+            const typename Septet::T *sa = a.i2.i;
+            const typename Septet::T *sb = b.i2.i;
+
+            SizeType n = Septet::size;
+            if (a.i1 < n) n = a.i1;
+            if (b.i1 < n) n = b.i1;
+            for(SizeType i = 0; i < n; i++, ++sa, ++sb) {
+                if (*sa == *sb) continue;
+                return (*sa < *sb)? -1 : 1;
+            }
+            if (n < Septet::size) {
+                return (a.i1 < b.i1)? -1 : 1;
+            } else
+                return 0;
+        }
+    };
+
+    // optimized for bitvectors
+    template <typename T1, typename TValue, typename Result>
+    struct _skew7NComp< Pair<T1, Tuple<TValue, 7, Compressed>, Compressed >, Result > :
+        public ::std::binary_function<
+            Pair<T1, Tuple<TValue, 7, Compressed>, Compressed >,
+            Pair<T1, Tuple<TValue, 7, Compressed>, Compressed >,
+            Result> {       
+        inline Result operator()(
+            const Pair<T1, Tuple<TValue, 7, Compressed>, Compressed > &a,
+            const Pair<T1, Tuple<TValue, 7, Compressed>, Compressed > &b) const
+        {
+            if (a.i2 < b.i2) return -1;
+            if (a.i2 > b.i2) return 1;
+            if (a.i1 < 7 || b.i1 < 7) 
+                return (a.i1 < b.i1)? -1 : 1;
+            return 0;
+        }
+    };
+
+    template <typename InType, typename Result = typename InType::T1>
+    struct _skew7NMapLinear : public ::std::unary_function<InType,Result> {
+        Result BN4, BN;
+        _skew7NMapLinear(Result BN_):BN4(BN_+1),BN(BN_) { }
+        inline Result operator()(const InType& x) const
+		{ Result i = x.i1; return (i%7 == 4)? BN4-(i-(i/7)*4): BN-(i-(i/7)*4); }
+    };
+
+    template <typename InType, typename Result = typename InType::T1>
+    struct _skew7NMapSliced : public ::std::unary_function<InType,Result> {
+        Result off[5];
+        _skew7NMapSliced(Result BN_)
+        { 
+			off[0] = 0;
+			off[1] = BN_ - 1; 
+			off[2] = (2*BN_)/3 - 1; 
+			off[3] = 0;
+			off[4] = BN_/3 - 1; 
+		}
+        inline Result operator()(const InType& x) const
+        { return off[x.i1 % 7] - x.i1/7; }
+    };
+
+
+    template <typename InType, typename Result = InType>
+    struct _skew7UnslicerFunc : public ::std::unary_function<InType,Result> {
+        Result o1, o2, o4, n4, n24;
+        _skew7UnslicerFunc(Result N):
+            o1(N - (N + 6) % 7),
+            o2(N - (N + 5) % 7),
+            o4(N - (N + 3) % 7),
+            n4((N + 3) / 7),
+            n24((N + 5) / 7 + n4) { }
+        
+        inline Result operator()(const InType& x) const
+        { return (x < n4)  ? o4 -  x        * 7:
+                 (x < n24) ? o2 - (x - n4)  * 7: 
+                             o1 - (x - n24) * 7; }
+    };
+
+    template <typename InType, typename Result = typename InType::T2::T>
+    struct _skew7NMapExtended : public ::std::unary_function<InType,Result> {
+        inline Result operator()(const InType& x) const
+        { return x.i2[0]; }
+    };
+
+    template <typename InType, const int EXT_LENGTH, typename Result = int>
+    struct _skew7ExtendComp : public ::std::binary_function<InType,InType,Result> {
+        inline Result operator()(const InType &a, const InType &b) const
+        {
+            for(unsigned int i = 0; i < EXT_LENGTH; i++) {
+                if (a.i3[i] == b.i3[i]) continue;
+                return (a.i3[i] <  b.i3[i])? -1 : 1;
+            }
+            return (a.i2[0] < b.i2[0])? -1 : 1;
+        }
+    };
+
+    // optimized for bitvectors
+    /*
+    template <typename T1, typename T2, typename T, const int _size, const int EXT_LENGTH, typename Result>
+    struct _skew7ExtendComp< Triple<T1,T2,Tuple<T,_size,Compressed>, Compressed>, EXT_LENGTH, Result> :
+        public ::std::binary_function<
+            Triple<T1,T2,Tuple<T,_size,Compressed>,Compressed>,
+            Triple<T1,T2,Tuple<T,_size,Compressed>,Compressed>,
+            Result> 
+    {
+        inline Result operator()(
+            const Triple<T1,T2,Tuple<T,_size,Compressed>,Compressed> &a,
+            const Triple<T1,T2,Tuple<T,_size,Compressed>,Compressed> &b) const
+        {
+            if (a.i3 < b.i3) return -1;
+            if (a.i3 > b.i3) return 1;
+            return (a.i2[0] < b.i2[0])? -1 : 1;
+        }
+    };
+    */
+
+	template < typename TInput >
+    struct Value< Pipe< TInput, Skew7 > > {
+        typedef typename Size<TInput>::Type Type;
+    };
+
+    template <typename T>
+    struct Skew7StringSpec_:
+        public Spec<T> {};
+
+    template <typename T, typename TStringSpec>
+    struct Skew7StringSpec_<String<T, TStringSpec> >
+	{
+        typedef TStringSpec Type;
+	};
+
+    template <typename T, typename TSegmentSpec>
+    struct Skew7StringSpec_<Segment<T, TSegmentSpec> >:
+        public Skew7StringSpec_<T> {};
+
+    template <typename T>
+    struct Skew7StringSpec_<T const>:
+        public Skew7StringSpec_<T> {};
+
+    //////////////////////////////////////////////////////////////////////////////
+    // skew7 class
+    template < typename TInput >
+    struct Pipe< TInput, Skew7 >
+    {
+  
+        // *** SPECIALIZATION ***
+
+        // use compression if lessorequal 16 different values per char
+        typedef typename If< 
+            (BitsPerValue<TypeOf_(TInput)>::VALUE > 0) && 
+            (BitsPerValue<TypeOf_(TInput)>::VALUE <= 4), 
+            Compressed, 
+            void>::Type compress;
+//        typedef void compress;
+
+        // use skew7 for recursion (more I/O-efficient)
+        typedef Skew7 recurseSpec;
+
+        // step 1
+		typedef Pipe< TInput, Sampler<7, compress> >  TSamplerDC7;          
+                                        typedef _skew7NComp<TypeOf_(TSamplerDC7)> ncomp_t;
+        typedef Pool< TypeOf_(TSamplerDC7), SorterSpec< SorterConfigSize<ncomp_t, TSizeOf_(TSamplerDC7) > > > TSortTuples;
+		typedef Pipe< TSortTuples, Namer<ncomp_t> > TNamer;
+                                        typedef _skew7NMapSliced<TypeOf_(TNamer)> nmap_sliced_t;
+                                        typedef _skew7NMapLinear<TypeOf_(TNamer)> nmap_linear_t;
+        typedef Pool< TypeOf_(TNamer), MapperSpec< MapperConfigSize< nmap_sliced_t, TSizeOf_(TNamer) > > > TNames_Sliced;
+
+        // unique names - shortcut
+        typedef Pool< TypeOf_(TNames_Sliced), MapperSpec< MapperConfigSize< nmap_linear_t, TSizeOf_(TNames_Sliced) > > > TNames_Linear_Unique;
+
+        // non-unique names
+        typedef Pipe< TNames_Sliced, Filter< filterI2<TypeOf_(TNames_Sliced)> > > TFilter;
+
+			// recursion
+			typedef Pipe< TFilter, recurseSpec > TRecurse;
+										typedef _skew7UnslicerFunc<TypeOf_(TRecurse)> unslicer_func_t;
+			typedef Pipe< TRecurse, Filter<unslicer_func_t> > TUnslicer;
+			typedef Pipe< TUnslicer, Counter > TRenamer;
+
+			// no recursion inMemory shortcut
+			typedef Pipe< TFilter, LarssonSadakane > TInMem;
+			typedef Pipe< TInMem, Filter<unslicer_func_t> > TUnslicerInMem;
+			typedef Pipe< TUnslicerInMem, Counter > TRenamerInMem;
+
+        typedef Pool< TypeOf_(TRenamer), MapperSpec< MapperConfigSize< nmap_linear_t, TSizeOf_(TRenamer) > > > TNames_Linear;
+        
+        // step 2
+        typedef Pipe< Bundle2< TInput, TNames_Linear >, Extender7<compress> > TExtender;
+                                        typedef _skew7ExtendComp<TypeOf_(typename TExtender::Out0),3> extend0_comp_t;
+                                        typedef _skew7ExtendComp<TypeOf_(typename TExtender::Out6),2> extend6_comp_t;
+                                        typedef _skew7ExtendComp<TypeOf_(typename TExtender::Out5),1> extend5_comp_t;
+                                        typedef _skew7ExtendComp<TypeOf_(typename TExtender::Out3),1> extend3_comp_t;
+        typedef Pool< TypeOf_(typename TExtender::Out0), SorterSpec< SorterConfigSize< extend0_comp_t, TSizeOf_(typename TExtender::Out0) > > > TSorterS0;
+        typedef Pool< TypeOf_(typename TExtender::Out6), SorterSpec< SorterConfigSize< extend6_comp_t, TSizeOf_(typename TExtender::Out6) > > > TSorterS6;
+        typedef Pool< TypeOf_(typename TExtender::Out5), SorterSpec< SorterConfigSize< extend5_comp_t, TSizeOf_(typename TExtender::Out5) > > > TSorterS5;
+        typedef Pool< TypeOf_(typename TExtender::Out3), SorterSpec< SorterConfigSize< extend3_comp_t, TSizeOf_(typename TExtender::Out3) > > > TSorterS3;
+
+        // step 3
+                                        typedef _skew7NMapExtended<TypeOf_(typename TExtender::Out124)> nmap_extended_t;
+		typedef Pool< TypeOf_(typename TExtender::Out124), MapperSpec< MapperConfigSize< nmap_extended_t, TSizeOf_(typename TExtender::Out124) > > > TSorterS124;
+        typedef Pipe< Bundle5< TSorterS0, TSorterS3, TSorterS5, TSorterS6, TSorterS124 >, Merger7 > TMerger;
+
+        TSorterS0   sortedS0;
+        TSorterS3   sortedS3;
+        TSorterS5   sortedS5;
+        TSorterS6   sortedS6;
+        TSorterS124 sortedS124;
+        TMerger     in;
+            
+        Pipe():
+			in(bundle5(sortedS0, sortedS3, sortedS5, sortedS6, sortedS124)) {}
+
+		Pipe(TInput& _textIn):
+			in(bundle5(sortedS0, sortedS3, sortedS5, sortedS6, sortedS124))
+		{
+			process(_textIn);
+		}
+        
+	    template < typename TInput_ >
+        bool process(TInput_ &textIn) {
+
+            SEQAN_PROADD(SEQAN_PRODEPTH, 1);
+            SEQAN_PROMARK("Rekursionsabstieg");
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "enter level " << SEQAN_PROVAL(SEQAN_PRODEPTH) << " compression: ";
+				::std::cerr << IsSameType<compress, Compressed>::VALUE << " " << BitsPerValue<TypeOf_(TInput)>::VALUE << ::std::endl;
+            #endif
+            {
+
+
+            // *** INSTANTIATION ***
+
+            // step 1
+            TSamplerDC7                 sampler(textIn);
+            TSortTuples                 sorter;
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "  sort names (" << length(sampler)<< ")" << ::std::endl;
+            #endif
+            sorter << sampler;
+            SEQAN_PROMARK("Sorter (2) - 7-lets sortieren");
+
+            TNamer                      namer(sorter);
+            nmap_sliced_t               map_sliced(length(namer));
+            nmap_linear_t               map_linear(length(namer));
+            TNames_Sliced               names_sliced(map_sliced);
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "  slice names" << ::std::endl;
+            #endif
+            names_sliced << namer;
+
+            if (namer.unique() || empty(names_sliced)) {
+                // unique names
+
+                clear(sorter);
+                SEQAN_PROMARK("Mapper (4) - s124 konstruieren");
+                TNames_Linear_Unique        names_linear(map_linear);
+
+                #ifdef SEQAN_DEBUG_INDEX
+                    ::std::cerr << "  make names linear" << ::std::endl;
+                #endif
+                names_linear << names_sliced;
+				clear(names_sliced);
+                SEQAN_PROMARK("Mapper (10) - ISA124 konstruieren");
+
+                // step 2
+                _skew7Extend(textIn, names_linear, sortedS0, sortedS3, sortedS5, sortedS6, sortedS124);
+
+            } else {
+                // non-unique names
+
+                clear(sorter);
+                SEQAN_PROMARK("Mapper (4) - s124 konstruieren");
+
+                TFilter                     filter(names_sliced);
+				TNames_Linear               names_linear(map_linear);
+
+				if (length(filter) > 128*1024*1024) 
+				{
+					// recursion
+					TRecurse                    recurse(filter);
+
+					#ifdef SEQAN_TEST_SKEW7
+					{
+						String<typename Value<TFilter>::Type, Alloc<> > _text;
+						_text << filter;
+						SEQAN_DO(isSuffixArray(recurse, _text));
+					}
+					#endif
+
+					clear(filter);
+					unslicer_func_t             func(length(textIn));
+					TUnslicer                   unslicer(recurse, func);
+					TRenamer                    renamer(unslicer);
+
+					#ifdef SEQAN_DEBUG_INDEX
+						::std::cerr << "  rename names" << ::std::endl;
+					#endif
+
+					names_linear << renamer;
+				}
+				else
+				{
+					TInMem						inMem(filter);
+
+					clear(filter);
+					unslicer_func_t				func(length(textIn));
+					TUnslicerInMem              unslicer(inMem, func);
+					TRenamerInMem               renamer(unslicer);
+
+					#ifdef SEQAN_DEBUG_INDEX
+						::std::cerr << "  rename names" << ::std::endl;
+					#endif
+
+					names_linear << renamer;
+				} 
+
+                SEQAN_PROMARK("Mapper (10) - ISA124 konstruieren");
+               
+                // step 2
+                #ifdef SEQAN_DEBUG_INDEX
+                    ::std::cerr << "  prepare merge" << ::std::endl;
+                #endif
+                _skew7Extend(textIn, names_linear, sortedS0, sortedS3, sortedS5, sortedS6, sortedS124);
+                SEQAN_PROMARK("Mapper (12), Sorter (13-16) - SA124, SA3, SA5, SA6, SA0 verschmelzen");
+            }
+            
+            // step 3
+            // ... is done on-demand by merger
+            }
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "left level " << SEQAN_PROVAL(SEQAN_PRODEPTH) << ::std::endl;
+            #endif
+            SEQAN_PROMARK("Rekursionsaufstieg");
+            SEQAN_PROSUB(SEQAN_PRODEPTH, 1);
+
+            return true;
+        }
+
+        inline typename Value<Pipe>::Type const operator*() {
+            return *in;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }        
+    };
+
+    // not sure which interface is more intuitive, we support both
+    // you can call "skew << pipe" or "skew_t skew(pipe); skew.process()"
+    // for the first we would need no _in member
+	template < typename TInput, typename TObject >
+    inline bool operator<<(Pipe< TInput, Skew7 > &me, TObject &textIn) {
+        return me.process(textIn);
+    }
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // internal Skew7 algorithm
+    //////////////////////////////////////////////////////////////////////////////
+
+    //////////////////////////////////////////////////////////////////////////////
+	// typedefs and helpers
+
+	// compares n characters and in case of equality the names a2 and b2 (no clipping)
+    template <typename TTextIter, typename TSize> inline
+    bool _leqSkew7(TTextIter a1, TSize a2,   TTextIter b1, TSize b2,   TSize n)
+    { // lexic. order for n-tupels
+        for (; n != 0; --n, ++a1, ++b1) {
+            if (lexLess(*a1, *b1)) return true;
+            if (lexLess(*b1, *a1)) return false;
+        }
+        return (a2 <= b2);
+    }
+
+	// compares at most the last n characters (a) with b (clipping)
+    template <typename TTextIter, typename TSize> inline
+    bool _leqSkew7(TTextIter a,   TTextIter b,   TSize n)
+    { // lexic. order for n-tupels
+        for (; n != 0; --n, ++a, ++b) {
+            if (lexLess(*a, *b)) return true;
+            if (lexLess(*b, *a)) return false;
+        }
+        return true;	// a is shorter than b
+    }
+
+	// compares two suffixes of residue classes a and b
+    template <typename TTextIter, typename TSize, typename TString> inline
+    bool _leqSkew7(unsigned a, unsigned b,   TTextIter spos[], const TSize tpos[], const bool islast[], const TString &s124, const TSize adjust[7][7])
+    {
+        TTextIter sa = spos[a];
+        TTextIter sb = spos[b];
+		TSize shft = SkewShift_<7>::VALUE[a][b];
+        if (sa > sb) {
+            if ((a != 0) && (a < shft) && islast[a]) // do we need to clip?
+                return _leqSkew7 (sa,   sb,   a);
+        } else {
+            if ((b != 0) && (b < shft) && islast[b]) // do we need to clip?
+                return !_leqSkew7 (sb,   sa,   b);
+        }
+        return _leqSkew7 (sa, s124[tpos[a] + adjust[a][b]],   sb, s124[tpos[b] + adjust[b][a]],   shft);
+    }
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Alternative Skew Implementation
+	// find the suffix array SA of s[0..n-1] in {0..K}^n
+	//
+	// the following algorithm divides the suffixes in seven residue classes
+	// that results in a more space and time efficient division
+	// 
+	// difference cover is {3,5,6} and corresponds to {1,2,4}'
+	//
+	// * no trailing 0's required
+	// * no dummy triples in special cases
+
+    template < typename TSA,
+               typename TText >
+    void createSuffixArray(
+		TSA &SA,
+		TText &s,
+		Skew7 const &,
+		unsigned K,
+        unsigned maxdepth,
+		unsigned depth)
+    {
+		typedef typename Value<TSA>::Type TSize;
+		typedef typename Value<TText>::Type TValue;
+		typedef typename Iterator<TSA, Standard>::Type TSAIter;
+		typedef typename Iterator<TText const, Standard>::Type TValueIter;
+
+		SEQAN_ASSERT(IsContiguous<TText>::VALUE);
+		SEQAN_ASSERT(IsContiguous<TSA>::VALUE);
+
+        #ifdef SEQAN_DEBUG_INDEX
+            std::cerr << "--- CREATE SUFFIX ARRAY ---" << std::endl;
+            std::cerr << "Skew7 [random access]" << std::endl;
+        #endif
+
+		TSize n = length(s);
+        if (n < 1) return;
+
+		TSize _n[7];
+		TSize _o[7];
+	    
+		_n[0] = n/7;
+		_o[0] = n%7;
+		TSize j = n + 6;
+		for(int i = 1; i < 7; ++i, --j) {
+			_n[i] = j/7;
+			_o[i] = j%7;
+		}
+
+		TSize _n24  = _n[2]+_n[4];
+		TSize _n124 = _n[1]+_n24;
+
+        SEQAN_PROSET(SEQAN_PRODEPTH, depth);
+        SEQAN_PROSET(SEQAN_PROEXTRA1, K);
+        SEQAN_PROMARK("Rekursionsabstieg");
+        #ifdef SEQAN_DEBUG_INDEX
+			::std::cerr << "enter level " << depth << " (" << n << ")" << ::std::endl;
+        #endif
+
+        String<TSize, Alloc<> > s124;
+        resize(s124, _n124, Exact());
+		// we use SA[n-n124..n-1] as a temporary buffer instead of allocating one
+		typename Suffix<TSA>::Type SA124 = suffix(SA, n - _n124);
+
+
+		// generate positions of mod 3, mod 5 and mod 6 suffixes
+		{
+			TSize j = 0;
+			if (_n[2] > _n[4]) s124[j++] = _o[2];
+			if (_n[1] > _n[4]) s124[j++] = _o[1];
+
+			for (TSize i=_o[4];  i < n;  i+=7) {
+				s124[j++] = i;
+				s124[j++] = i + 2;
+				s124[j++] = i + 3;
+			}
+		}
+
+
+		// lsb radix sort the mod 3, mod 5 and mod 6 7-tupels
+		{
+			String<TSize, Alloc<> > cnt;
+			resize(cnt, K, Exact());	// counter array
+
+			radixPass(SA124, s124,  s, cnt, K, 6);
+			radixPass(s124,  SA124, s, cnt, K, 5);
+			radixPass(SA124, s124,  s, cnt, K, 4);
+			radixPass(s124,  SA124, s, cnt, K, 3);
+			radixPass(SA124, s124,  s, cnt, K, 2);
+			radixPass(s124,  SA124, s, cnt, K, 1);
+			radixPass(SA124, s124,  s, cnt, K);
+		}
+        SEQAN_PROMARK("7-lets sortiert");
+
+		// find lexicographic names of 7-tupel
+		TSize name = 0;
+		{
+			TSize ofs[7] = {0, _n24, _n[4], 0, 0, 0, 0};
+			bool differ = true;
+			TValue c0 = TValue(), c1 = TValue(), c2 = TValue(), c3 = TValue(), c4 = TValue(), c5 = TValue(), c6 = TValue();
+			for (TSize i = 0, clip = n - 6, l;  i < _n124;  i++) {
+				if ((l = SA124[i]) < clip) {
+					if (differ || s[l] != c0 || s[l+1] != c1 || s[l+2] != c2 || s[l+3] != c3 ||
+												s[l+4] != c4 || s[l+5] != c5 || s[l+6] != c6) {
+						name++;  c0 = s[l];  c1 = s[l+1];  c2 = s[l+2];  c3 = s[l+3];
+											 c4 = s[l+4];  c5 = s[l+5];  c6 = s[l+6];
+						differ = false;
+					}
+				} else {
+					name++;
+					differ = true;  // the last 6 7-tupels always differ from the rest
+				}
+				s124[(l/7) + ofs[(n-l) % 7]] = name - 1;   // select a third
+			}
+		}
+        SEQAN_PROMARK("s12 konstruiert");
+
+		// recurse if names are not yet unique
+		if (name < _n124) {
+            if (depth != maxdepth)
+            {
+			    createSuffixArray(SA124, s124, Skew7(), name, maxdepth, depth + 1);
+			    #ifdef SEQAN_TEST_SKEW7
+				    SEQAN_DO(isSuffixArray(SA124, s124));
+			    #endif
+            }
+			// store unique names in s124 using the suffix array
+			for (TSize i = 0;  i < _n124;  i++) s124[SA124[i]] = i;
+		} else // generate the suffix array of s124 directly
+			for (TSize i = 0;  i < _n124;  i++) SA124[s124[i]] = i;
+
+
+		// use SA[0...n3-1] and SA[n3...n3+n5-1] as a temporary buffers instead of allocating some
+		// and allocate SA0, SA3, SA5 and SA6
+
+		{
+			typename Infix<TSA>::Type s3 = infix(SA, 0, _n[3]), s5 = infix(SA, _n[3], _n[3] + _n[5]);
+			String<TSize, typename Skew7StringSpec_<TSA>::Type> SA0, SA3, SA5, SA6;
+
+			resize(SA0, _n[0], Exact());
+			resize(SA3, _n[3], Exact());
+			resize(SA5, _n[5], Exact());
+			resize(SA6, _n[6], Exact());
+
+			// stably sort the mod 5 and mod 3 suffixes from SA124 by their first character
+			{
+				for (TSize i=0, j3=0, j5=0, l;  i < _n124;  i++) {
+					l = SA124[i];
+					if (l < _n[4]) {
+						if ((l = _o[4] + (7 * l)) > 0)
+							s5[j5++] = l - 1;
+					} else if (l < _n24) {
+						if ((l = _o[2] + (7 * (l - _n[4]))) > 0)
+							s3[j3++] = l - 1;
+					}
+				}
+
+				{
+					String<TSize, Alloc<> > cnt;
+					resize(cnt, K, Exact());	// counter array
+
+					radixPass(SA3, s3, s, cnt, K);
+                    SEQAN_PROMARK("SA3 konstruiert");
+
+					radixPass(SA5, s5, s, cnt, K);
+                    SEQAN_PROMARK("SA5 konstruiert");
+	    
+					// stably sort the mod 6 suffixes from SA5 by their first character
+
+					if (_n[5] == _n[6]) radixExtend    (SA6, SA5, s, cnt, K);
+					else                radixExtendClip(SA6, SA5, s, cnt, K);
+                    SEQAN_PROMARK("SA6 konstruiert");
+
+					// stably sort the mod 0 suffixes from SA6 by their first character
+
+					if (_n[6] == _n[0]) radixExtend    (SA0, SA6, s, cnt, K);
+					else                radixExtendClip(SA0, SA6, s, cnt, K);	    
+                    SEQAN_PROMARK("SA0 konstruiert");
+				}
+			}
+
+			// MULTIWAY MERGE all SA_ streams
+			{
+				// a helper matrix to lex-name-compare every combination of suffixes
+				TSize adjust[7][7] =
+					//      0               1              2             3             4              5               6
+				   {{0             , _n124-_n[0]   , _n24-_n[0]  , _n124-_n[0] , _n[4]-_n[0] , _n[4]-_n[0]   , _n24-_n[0]    },  // 0
+					{1-_n[1]       , 0             , 0           , 1-_n[1]     , 0           , 1-_n[1]-_n[2] , 1-_n[1]-_n[2] },  // 1*
+					{1-_n[2]       , 0             , 0           , _n[1]       , 0           , _n[1]         , 1-_n[2]       },  // 2*
+					{1+_n[4]-_n[3] , 1+_n[4]-_n[3] , _n24-_n[3]  , 0           , _n124-_n[3] , _n24-_n[3]    , _n124-_n[3]   },  // 3
+					{_n[1]+_n[2]   , 0             , 0           ,_n[2]        , 0           , _n[1]+_n[2]   , _n[2]         },  // 4*
+					{_n24-_n[5]    , _n124-_n[5]   , _n[4]-_n[5] , _n[4]-_n[5] , _n24-_n[5]  , 0             , _n124-_n[5]   },  // 5
+					{_n124-_n[6]   , _n24-_n[6]    , _n124-_n[6] , _n[4]-_n[6] , _n[4]-_n[6] , _n24-_n[6]    , 0             }}; // 6
+
+				TSAIter pos[7] = {begin(SA0)      , begin(SA124)      , begin(SA124)      , 
+								  begin(SA3)      , begin(SA124)      , begin(SA5)        , begin(SA6)      };
+				TSAIter max[7] = {begin(SA0)+_n[0], begin(SA124)+_n124, begin(SA124)+_n124,
+								  begin(SA3)+_n[3], begin(SA124)+_n124, begin(SA5)+_n[5]  , begin(SA6)+_n[6]};
+				TValueIter spos[7];
+				TSize tpos[7];
+				bool islast[7];
+
+				int a, b, rank[5];
+				int fill = 0;
+				TSize k = 0;
+
+				#define SEQAN_GET_ISKEW7(ii) (ii < _n[4] ? (ii * 7) + _o[4] : (ii < _n24 ? ((ii - _n[4]) * 7) + _o[2] : ((ii - _n24) * 7) + _o[1]))
+				#define SEQAN_GET_ASKEW7(ii) (ii < _n[4] ? 4 : (ii < _n24 ? 2 : 1))
+
+				// fill the stream ranking list
+				for(int i = 0; i < 7; ++i) {
+					if (!_n[i]) continue;
+					if (i == 2 || i == 4) continue; // insert only the least suffix of SA124
+
+					if (i == 1) {
+
+						TSize ii  = *(pos[1]);
+						a         = SEQAN_GET_ASKEW7(ii);
+						TSize j	  = SEQAN_GET_ISKEW7(ii);
+
+						tpos[a]   = ii;
+						spos[a]   = begin(s) + j;
+						islast[a] = (j + 7 >= n);
+
+					} else {
+
+						a = i;
+						TSize j   = *(pos[a]);
+
+						tpos[a]   = j / 7;
+						spos[a]   = begin(s) + j;
+						islast[a] = (j + 7 >= n);
+
+					}
+
+					// get the rank of stream a's suffix
+					int j;
+					for(j = 0;  j < fill;  ++j) {
+						b = rank[j];
+						if (_leqSkew7 (a,  b,   spos, tpos, islast, s124, adjust)) break;
+					}
+
+					// insert the suffix
+					for(int i = fill; i > j; --i)
+						rank[i] = rank[i-1];
+					rank[j] = a;
+					fill++;
+				}
+
+				// main merge loop
+				// in order to find the least suffix in every step we use a stream ranking list
+				// so we only need to keep up the ordering and thus rank[0] is always the least suffix
+				while (fill > 1) {
+
+					// add the least suffix to SA and get the next of the corresponding stream
+					a = rank[0];
+					SA[k++] = spos[a] - begin(s);
+					if (a == 1 || a == 2 || a == 4)
+						pos[4] = pos[2] = ++pos[1];
+					else
+						++pos[a];
+
+					if (pos[a] < max[a]) {
+
+						// set corresponding spos, tpos, islast values and adapt a if necessary
+						if (a == 1 || a == 2 || a == 4) {
+
+							TSize ii  = *(pos[1]);
+							a		  = SEQAN_GET_ASKEW7(ii);
+							TSize j   = SEQAN_GET_ISKEW7(ii);
+
+							tpos[a]   = ii;
+							spos[a]   = begin(s) + j;
+							islast[a] = (j + 7 >= n);
+
+						} else {
+
+							TSize j   = *(pos[a]);
+
+							tpos[a]   = j / 7;
+							spos[a]   = begin(s) + j;
+							islast[a] = (j + 7 >= n);
+
+						}
+
+						// get the rank of stream a's suffix
+
+						// linear search
+						int right;
+						for(right = 1;  right < fill;  right++) {
+							b = rank[right];
+							if (_leqSkew7 (a,  b,   spos, tpos, islast, s124, adjust)) break;
+						}
+/*
+						// binary search
+						int left = 0;
+						int right = fill;
+						while (left + 1 != right) {
+							int middle = (left + right) >> 2;
+							if (leq<TValue, TSize> (a,  rank[middle],   spos, tpos, islast, s124, adjust))
+								right = middle;
+							else
+								left = middle;
+						}*/
+
+						// remove the least suffix ...
+						for(int i = 1; i < right; ++i)
+							rank[i-1] = rank[i];
+
+						// ... and insert the new one
+						rank[right-1] = a;
+
+					} else {
+						// only remove the least suffix
+						fill--;
+						for(int i = 0; i < fill; ++i)
+							rank[i] = rank[i+1];
+					}
+				}
+
+				// only one (or less) stream left to fill SA with
+				a = rank[0];
+				if (a == 1 || a == 2 || a == 4)
+					for (;  k < n;  ++k) { TSize ii = *(pos[1]++); SA[k] = SEQAN_GET_ISKEW7(ii); }
+				else
+					for (;  k < n;  ++k) SA[k] = *(pos[a]++);
+			}	    
+		}
+        SEQAN_PROMARK("SA124, SA3, SA5, SA6, SA0 verschmolzen");
+
+        #ifdef SEQAN_DEBUG_INDEX
+            ::std::cerr << "left level " << depth << ::std::endl;
+        #endif
+        SEQAN_PROMARK("Rekursionsaufstieg");
+        SEQAN_PROSUB(SEQAN_PRODEPTH, 1);
+	}
+
+    template < typename TSA,
+               typename TText >
+    inline void createSuffixArray(
+		TSA &SA,
+		TText &s,
+		Skew7 const &alg,
+		unsigned K,
+        unsigned maxdepth)
+	{
+		createSuffixArray(SA, s, alg, K, maxdepth, 1);
+	}
+
+    // creates suffix array sorted by the first maxLCP chars of suffixes
+    template < typename TSA,
+               typename TText,
+               typename TSize >
+    inline void createSuffixArrayPart(
+		TSA &SA,
+		TText &s,
+		Skew7 const &_dummy,
+        TSize maxLCP,
+        unsigned K)
+    {
+        unsigned depth = 0;
+        for(TSize i = 1; i < maxLCP; i*=7) ++depth;
+        createSuffixArray(SA, s, _dummy, K, depth);
+    }
+
+
+    // creates suffix array sorted by the first maxLCP chars of suffixes
+    template < typename TSA,
+               typename TText,
+               typename TSize >
+    inline void createSuffixArrayPart(
+		TSA &SA,
+		TText &s,
+		Skew7 const &_dummy,
+        TSize maxLCP)
+    {
+    	SEQAN_CHECKPOINT;
+    	createSuffixArrayPart(SA, s, _dummy, maxLCP, ValueSize< typename Value<TText>::Type >::VALUE);
+    }
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_skew7_multi.h b/src/SeqAn-1.3/seqan/index/index_skew7_multi.h
new file mode 100644
index 0000000..d1077b2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_skew7_multi.h
@@ -0,0 +1,424 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_SKEW7_MULTI_H
+#define SEQAN_HEADER_INDEX_SKEW7_MULTI_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+    //////////////////////////////////////////////////////////////////////////////
+    // external Skew7 algorithm (optimized for multiple sequences)
+	//  - creates a suffix array of pairs (seqNo,seqPos)
+    //////////////////////////////////////////////////////////////////////////////
+
+
+	template < typename TInput, typename TPair, typename TLimitsString >
+    struct Value< Pipe< TInput, Multi<Skew7, TPair, TLimitsString> > > {
+        typedef TPair Type;
+    };
+
+
+    // *** COMPARATORS & MAPS ***
+        
+    template <typename InType, typename Result = int>
+    struct _skew7NCompMulti : public ::std::binary_function<InType,InType,Result> {
+        inline Result operator()(const InType &a, const InType &b) const
+        {
+			typedef typename InType::T1 LocalPos;
+            typedef typename InType::T2 Septet;
+			typedef typename LocalPos::T2 SizeType;
+            const typename Septet::T *sa = a.i2.i;
+            const typename Septet::T *sb = b.i2.i;
+
+            SizeType n = Septet::size;
+			SizeType aLeft = getValueI2(getValueI1(a));
+			SizeType bLeft = getValueI2(getValueI1(b));
+
+            if (aLeft < n) n = aLeft;
+            if (bLeft < n) n = bLeft;
+            for(SizeType i = 0; i < n; i++, ++sa, ++sb) {
+                if (*sa == *sb) continue;
+                return (*sa < *sb)? -1 : 1;
+            }
+            if (n < Septet::size) {
+				if (aLeft < bLeft) return -1;
+				if (aLeft > bLeft) return 1;
+				return (getValueI1(getValueI1(a)) > getValueI1(getValueI1(b)))? -1 : 1;
+            }
+            return 0;
+        }
+    };
+
+    // optimized for bitvectors
+    template <typename T1, typename TValue, typename Result>
+    struct _skew7NCompMulti< Pair<T1, Tuple<TValue, 7, Compressed>, Compressed >, Result > :
+        public ::std::binary_function<
+            Pair<T1, Tuple<TValue, 7, Compressed>, Compressed >,
+            Pair<T1, Tuple<TValue, 7, Compressed>, Compressed >,
+            Result> {       
+        inline Result operator()(
+            const Pair<T1, Tuple<TValue, 7, Compressed>, Compressed > &a,
+            const Pair<T1, Tuple<TValue, 7, Compressed>, Compressed > &b) const
+        {
+			typedef typename T1::T2 SizeType;
+			SizeType aLeft = getValueI2(getValueI1(a));
+			SizeType bLeft = getValueI2(getValueI1(b));
+
+			if (aLeft >= 7 && bLeft >= 7) {
+				if (a.i2 < b.i2) return -1;
+				if (a.i2 > b.i2) return 1;
+				return 0;
+			}
+
+            SizeType n = 7;
+
+			if (aLeft < n) n = aLeft;
+            if (bLeft < n) n = bLeft;
+            for(SizeType i = 0; i < n; i++) {
+				if (a.i2[i] == b.i2[i]) continue;
+				return (a.i2[i] < b.i2[i])? -1 : 1;
+			}
+			if (aLeft < bLeft) return -1;
+			if (aLeft > bLeft) return 1;
+			return (getValueI1(getValueI1(a)) > getValueI1(getValueI1(b)))? -1 : 1;
+        }
+    };
+
+	template <
+		typename InType, typename TLimitsString, typename TResultSize = typename Value<TLimitsString>::Type,
+		typename Result = Pair<TResultSize, typename Value<InType,2>::Type, typename Spec<InType>::Type> >
+    struct _skew7GlobalSlicedMulti :
+		public ::std::unary_function<InType,Result> {
+
+		typedef TResultSize TSize;
+
+		TSize			n4, n2, n1;
+		TSize			n24;
+		TLimitsString	off[5];
+
+		_skew7GlobalSlicedMulti(TLimitsString const &limits)
+		{
+			typename Iterator<TLimitsString const>::Type it = begin(limits), itEnd = end(limits);
+
+			n4 = n2 = n1 = n24 = 0;
+
+			if (it == itEnd) return;
+
+			// count the numbers of septets in residue class 1, 2, and 4
+			
+			TSize size, cur;
+			TSize old = *it; ++it;
+
+			while (it != itEnd) {
+				cur = *it;
+				size = cur - old;
+				old = cur;
+				
+				n4 += (size + 3) / 7;
+				n2 += (size + 5) / 7;
+				n1 += (size + 6) / 7;
+
+				++it;
+			}
+
+			n24 = n2 + n4;
+
+			// precompute the begin positions (off) of septet names 
+			// in the sliced string for every sequence and every residue class
+
+			resize(off[1], length(limits) - 1);
+			resize(off[2], length(limits) - 1);
+			resize(off[4], length(limits) - 1);
+
+			it = begin(limits);
+			old = *it; ++it;
+
+			TSize seqNo = 0;
+			TSize off4 = 0, off2 = n4, off1 = n24;
+			while (it != itEnd) {
+				cur = *it;
+				size = cur - old;
+				old = cur;
+				
+				off4 += (size + 3) / 7;
+				off2 += (size + 5) / 7;
+				off1 += (size + 6) / 7;
+
+				off[4][seqNo] = (off4)? off4-1 : 0;
+				off[2][seqNo] = (off2)? off2-1 : 0;
+				off[1][seqNo] = (off1)? off1-1 : 0;
+
+				++it; ++seqNo;
+			}
+		}
+
+		inline Result operator()(const InType &x) const {
+			typename Value<InType,1>::Type x_i1 = x.i1;
+			TSize seqOfs = getValueI2(x_i1);
+			return Result(off[seqOfs % 7][getValueI1(x_i1)] - seqOfs/7, x.i2);
+		}
+    };
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // skew7 class
+    template < typename TInput, typename TPair, typename TLimitsString >
+    struct Pipe< TInput, Multi<Skew7, TPair, TLimitsString> >
+    {
+  
+        // *** SPECIALIZATION ***
+
+        // use compression if lessorequal 16 different values per char
+        typedef typename If< 
+            (BitsPerValue<TypeOf_(TInput)>::VALUE > 0) && 
+            (BitsPerValue<TypeOf_(TInput)>::VALUE <= 4), 
+            Compressed, 
+            void>::Type compress;
+
+        // use skew7 for recursion (more I/O-efficient)
+        typedef Skew7 recurseSpec;
+
+        // step 1
+		typedef Pipe< TInput, Multi<Sampler<7, compress>, TPair, TLimitsString> >  TSamplerDC7;
+                                        typedef _skew7NCompMulti<TypeOf_(TSamplerDC7)> ncomp_t;
+        typedef Pool< TypeOf_(TSamplerDC7), SorterSpec< SorterConfigSize<ncomp_t, TSizeOf_(TSamplerDC7) > > > TSortTuples;
+		typedef Pipe< TSortTuples, Namer<ncomp_t> > TNamer;
+                                        typedef _skew7GlobalSlicedMulti<TypeOf_(TNamer), TLimitsString, TSizeOf_(TNamer)> func_slice_t;
+
+		typedef Pipe< TNamer, Filter<func_slice_t> > TSlicedPos;
+        typedef Pool< TypeOf_(TSlicedPos), MapperSpec< MapperConfigSize< filterI1<TypeOf_(TSlicedPos)>, TSizeOf_(TSlicedPos) > > > TNames_Sliced;
+
+        // unique names - shortcut
+        typedef Pool< TypeOf_(TNames_Sliced), MapperSpec< MapperConfigSize< func_slice_t, TSizeOf_(TNames_Sliced) > > > TNames_Linear_Unique;
+
+        // non-unique names
+        typedef Pipe< TNames_Sliced, Filter< filterI2<TypeOf_(TNames_Sliced)> > > TFilter;
+
+			// recursion
+			typedef Pipe< TFilter, recurseSpec > TRecurse;
+			typedef Pipe< TRecurse, Counter > TRenamer;
+
+			// no recursion inMemory shortcut
+			typedef Pipe< TFilter, LarssonSadakane > TInMem;
+			typedef Pipe< TInMem, Counter > TRenamerInMem;
+
+		typedef Pool< TypeOf_(TRenamer), MapperSpec< MapperConfigSize< filterI1<TypeOf_(TRenamer)>, TSizeOf_(TRenamer) > > > TNames_Linear;
+
+        // step 2
+        typedef Pipe< Bundle2< TInput, TNames_Linear >, Extender7Multi<TPair, compress> > TExtender;
+                                        typedef _skew7ExtendComp<TypeOf_(typename TExtender::Out0),3> extend0_comp_t;
+                                        typedef _skew7ExtendComp<TypeOf_(typename TExtender::Out6),2> extend6_comp_t;
+                                        typedef _skew7ExtendComp<TypeOf_(typename TExtender::Out5),1> extend5_comp_t;
+                                        typedef _skew7ExtendComp<TypeOf_(typename TExtender::Out3),1> extend3_comp_t;
+        typedef Pool< TypeOf_(typename TExtender::Out0), SorterSpec< SorterConfigSize< extend0_comp_t, TSizeOf_(typename TExtender::Out0) > > > TSorterS0;
+        typedef Pool< TypeOf_(typename TExtender::Out6), SorterSpec< SorterConfigSize< extend6_comp_t, TSizeOf_(typename TExtender::Out6) > > > TSorterS6;
+        typedef Pool< TypeOf_(typename TExtender::Out5), SorterSpec< SorterConfigSize< extend5_comp_t, TSizeOf_(typename TExtender::Out5) > > > TSorterS5;
+        typedef Pool< TypeOf_(typename TExtender::Out3), SorterSpec< SorterConfigSize< extend3_comp_t, TSizeOf_(typename TExtender::Out3) > > > TSorterS3;
+
+        // step 3
+                                        typedef _skew7NMapExtended<TypeOf_(typename TExtender::Out124)> nmap_extended_t;
+		typedef Pool< TypeOf_(typename TExtender::Out124), MapperSpec< MapperConfigSize< nmap_extended_t, TSizeOf_(typename TExtender::Out124) > > > TSorterS124;
+        typedef Pipe< Bundle5< TSorterS0, TSorterS3, TSorterS5, TSorterS6, TSorterS124 >, Merger7Multi<TLimitsString> > TMerger;
+
+        TSorterS0			sortedS0;
+        TSorterS3			sortedS3;
+        TSorterS5			sortedS5;
+        TSorterS6			sortedS6;
+        TSorterS124			sortedS124;
+        TMerger				in;
+		TLimitsString const &limits;
+            
+        Pipe(TLimitsString const &_limits) :
+			in(bundle5(sortedS0, sortedS3, sortedS5, sortedS6, sortedS124), _limits),
+			limits(_limits) {}
+
+		Pipe(TInput& _textIn, TLimitsString const &_limits) :
+			in(bundle5(sortedS0, sortedS3, sortedS5, sortedS6, sortedS124), _limits),
+			limits(_limits)
+		{
+			process(_textIn);
+		}
+        
+	    template < typename TInput_ >
+        bool process(TInput_ &textIn) {
+
+            SEQAN_PROADD(SEQAN_PRODEPTH, 1);
+            SEQAN_PROMARK("Rekursionsabstieg");
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "enter level " << SEQAN_PROVAL(SEQAN_PRODEPTH) << " compression: ";
+                ::std::cerr << IsSameType<compress, Compressed>::VALUE << " "<<ValueSize<TypeOf_(TInput)>::VALUE<<"" << ::std::endl;
+            #endif
+            {
+
+
+            // *** INSTANTIATION ***
+
+            // step 1
+            TSamplerDC7                 sampler(textIn, limits);
+            TSortTuples                 sorter;
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "  sort names (" << length(sampler)<< ")" << ::std::endl;
+            #endif
+            sorter << sampler;
+            SEQAN_PROMARK("Sorter (2) - 7-lets sortieren");
+
+			TNamer                      namer(sorter);
+            func_slice_t				func_slice(limits);
+
+			TSlicedPos					slicedPos(namer, func_slice);
+            TNames_Sliced               names_sliced;
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "  slice names" << ::std::endl;
+            #endif
+            names_sliced << slicedPos;
+
+			if (namer.unique() || empty(names_sliced)) {
+                // unique names
+
+                clear(sorter);
+                SEQAN_PROMARK("Mapper (4) - s124 konstruieren");
+
+				TNames_Linear               names_S1, names_S2, names_S4;
+
+                #ifdef SEQAN_DEBUG_INDEX
+                    ::std::cerr << "  make names linear" << ::std::endl;
+                #endif
+
+				_skew7SeparateSlices(
+					names_sliced, func_slice, 
+					names_S1, names_S2, names_S4);
+
+				clear(names_sliced);
+                SEQAN_PROMARK("Mapper (10) - ISA124 konstruieren");
+
+                // step 2
+                _skew7ExtendMulti(
+					textIn, limits, 
+					names_S1, names_S2, names_S4, 
+					sortedS0, sortedS3, sortedS5, sortedS6, sortedS124);
+
+            } else {
+                // non-unique names
+
+                clear(sorter);
+                SEQAN_PROMARK("Mapper (4) - s124 konstruieren");
+
+                TFilter                     filter(names_sliced);
+				TNames_Linear               names_S1, names_S2, names_S4;
+
+//				if (length(filter) > 128*1024*1024) 
+				{
+					// recursion
+					TRecurse                    recurse(filter);
+
+					#ifdef SEQAN_TEST_SKEW7
+					{
+						String<typename Value<TFilter>::Type, Alloc<> > _text;
+						_text << filter;
+						SEQAN_DO(isSuffixArray(recurse, _text));
+					}
+					#endif
+
+					clear(filter);
+					TRenamer                    renamer(recurse);
+
+					// partition SA by residue classes
+
+					#ifdef SEQAN_DEBUG_INDEX
+						::std::cerr << "  rename names" << ::std::endl;
+					#endif
+
+					_skew7SeparateSlices(
+						renamer, func_slice, 
+						names_S1, names_S2, names_S4);
+				} 
+/*				else
+				{
+					TInMem						inMem(filter);
+					clear(filter);
+					TRenamerInMem               renamer(inMem);
+					_skew7SeparateSlices(
+						renamer, func_slice, 
+						names_S1, names_S2, names_S4);
+				} 
+*/
+                SEQAN_PROMARK("Mapper (10) - ISA124 konstruieren");
+               
+                // step 2
+                #ifdef SEQAN_DEBUG_INDEX
+                    ::std::cerr << "  prepare merge" << ::std::endl;
+                #endif
+                _skew7ExtendMulti(
+					textIn, limits, 
+					names_S1, names_S2, names_S4, 
+					sortedS0, sortedS3, sortedS5, sortedS6, sortedS124);
+
+                SEQAN_PROMARK("Mapper (12), Sorter (13-16) - SA124, SA3, SA5, SA6, SA0 verschmelzen");
+            }
+ 
+            // step 3
+            // ... is done on-demand by merger
+            }
+            #ifdef SEQAN_DEBUG_INDEX
+                ::std::cerr << "left level " << SEQAN_PROVAL(SEQAN_PRODEPTH) << ::std::endl;
+            #endif
+            SEQAN_PROMARK("Rekursionsaufstieg");
+            SEQAN_PROSUB(SEQAN_PRODEPTH, 1);
+
+            return true;
+        }
+
+        inline typename Value<Pipe>::Type const operator*() {
+            return *in;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            return *this;
+        }        
+    };
+
+    // not sure which interface is more intuitive, we support both
+    // you can call "skew << pipe" or "skew_t skew(pipe); skew.process()"
+    // for the first we would need no _in member
+	template < typename TInput, typename TObject, typename TPair, typename TLimitsString >
+    inline bool operator<<(Pipe< TInput, Multi<Skew7, TPair, TLimitsString> > &me, TObject &textIn) {
+        return me.process(textIn);
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/index_wotd.h b/src/SeqAn-1.3/seqan/index/index_wotd.h
new file mode 100644
index 0000000..18395fb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/index_wotd.h
@@ -0,0 +1,1994 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_WOTD_H
+#define SEQAN_HEADER_INDEX_WOTD_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// wotd tree index fibres
+
+/**
+.Tag.WOTD Index Fibres
+..summary:Tag to select a specific fibre (e.g. table, object, ...) of an @Spec.IndexWotd@ index.
+..remarks:These tags can be used to get @Metafunction.Fibre.Fibres@ of an WOTD based @Spec.IndexWotd at .
+..remarks:TODO(holtgrew): Ask David.
+..cat:Index
+
+..tag.WotdText:The original text the index should be based on.
+...remarks:TODO(holtgrew): Ask David.
+
+..tag.WotdRawText:The raw text the index is really based on.
+...remarks:TODO(holtgrew): Ask David.
+
+..tag.WotdSA:The suffix array.
+...remarks:TODO(holtgrew): Ask David.
+
+..tag.WotdRawSA:The raw suffix array.
+...remarks:TODO(holtgrew): Ask David.
+
+..tag.WotdDir:The child table.
+...remarks:TODO(holtgrew): Ask David.
+
+..see:Metafunction.Fibre
+..see:Function.getFibre
+..see:Spec.IndexWotd
+..include:seqan/index.h
+*/
+	typedef FibreText		WotdText;
+	typedef FibreRawText	WotdRawText;
+	typedef FibreSA		WotdSA;
+	typedef FibreRawSA		WotdRawSA;
+	typedef FibreDir		WotdDir;
+
+///.Spec.VSTree Iterator.param.TContainer.type:Spec.IndexWotd
+///.Spec.TopDown Iterator.param.TContainer.type:Spec.IndexWotd
+///.Spec.TopDownHistory Iterator.param.TContainer.type:Spec.IndexWotd
+
+//////////////////////////////////////////////////////////////////////////////
+// wotd tree index
+
+/**
+.Spec.IndexWotd:
+..summary:An index based on a lazy suffix tree (see Giegerich et al., "Efficient implementation of lazy suffix trees").
+..cat:Index
+..general:Class.Index
+..signature:Index<TText, IndexWotd<> >
+..param.TText:The text type.
+...type:Class.String
+..remarks:The fibres (see @Class.Index@ and @Metafunction.Fibre@) of this index are a partially sorted suffix array (see @Tag.WOTD Index Fibres.WotdSA@) and the wotd tree (see @Tag.WOTD Index Fibres.WotdDir@).
+..include:seqan/index.h
+*/
+
+	struct WotdOriginal_;
+	typedef Tag<WotdOriginal_> const WotdOriginal;
+
+	template < typename TSpec = void >
+	struct IndexWotd {};
+
+/*
+	template < typename TObject, typename TSpec >
+	struct Fibre< Index<TObject, IndexWotd<TSpec> >, FibreDir> 
+	{
+		typedef Index<TObject, IndexWotd<TSpec> > TIndex;
+		typedef String< 
+			typename typename Size<TIndex>::Type,
+			Alloc<>
+		> Type;
+	};
+*/
+	
+	template < typename TObject, typename TSpec >
+	class Index<TObject, IndexWotd<TSpec> > {
+	public:
+		typedef typename Fibre<Index, WotdText>::Type		TText;
+		typedef typename Fibre<Index, WotdSA>::Type		TSA;
+		typedef typename Fibre<Index, WotdDir>::Type		TDir;
+
+		typedef typename Value<Index>::Type					TValue;
+		typedef typename Size<TText>::Type					TSize;
+		typedef String<TSize, Alloc<> >						TCounter;
+		typedef String<typename Value<TSA>::Type, Alloc<> >	TTempSA;
+		typedef typename Cargo<Index>::Type					TCargo;
+
+		// 1st word flags
+		static TSize const LEAF          = (TSize)1 << (BitsPerValue<TSize>::VALUE - 1); // this node is a leaf
+		static TSize const LAST_CHILD    = (TSize)1 << (BitsPerValue<TSize>::VALUE - 2); // this node is the last child
+		// 2nd word flag
+		static TSize const UNEVALUATED   = (TSize)1 << (BitsPerValue<TSize>::VALUE - 1); // this node is partially evalutated and has no evaluated children
+		static TSize const SENTINELS     = (TSize)1 << (BitsPerValue<TSize>::VALUE - 2); // the children of this node have solely $-edges
+
+		static TSize const BITMASK0      = ~(LEAF | LAST_CHILD);
+		static TSize const BITMASK1      = ~(UNEVALUATED | SENTINELS);
+
+
+		Holder<TText>	text;	// underlying text
+		TSA				sa;		// suffix array sorted by the first q chars
+		TDir			dir;	// bucket directory
+		TCargo			cargo;	// user-defined cargo
+
+
+		TTempSA			tempSA;
+		TCounter		tempOcc;
+		TCounter		tempBound;
+
+		TSize			sentinelOcc;
+		TSize			sentinelBound;
+		bool			interSentinelNodes;	// should virtually one (true) $-sign or many (false) $_i-signs be appended to the strings in text 
+
+		Index():
+			interSentinelNodes(false) {}
+
+		Index(Index &other):
+			text(other.text),
+			sa(other.sa),
+			dir(other.dir),
+			cargo(other.cargo),
+			tempSA(other.tempSA),
+			tempBound(other.tempBound),
+			sentinelOcc(other.sentinelOcc),
+			sentinelBound(other.sentinelBound),
+			interSentinelNodes(other.interSentinelNodes) {}
+
+		Index(Index const &other):
+			text(other.text),
+			sa(other.sa),
+			dir(other.dir),
+			cargo(other.cargo),
+			tempSA(other.tempSA),
+			tempBound(other.tempBound),
+			sentinelOcc(other.sentinelOcc),
+			sentinelBound(other.sentinelBound),
+			interSentinelNodes(other.interSentinelNodes) {}
+
+		template <typename TText_>
+		Index(TText_ &_text):
+			text(_text),
+			interSentinelNodes(false) {}
+
+		template <typename TText_>
+		Index(TText_ const &_text):
+			text(_text),
+			interSentinelNodes(false) {}
+	};
+/*
+    template < typename TText, typename TSpec >
+    struct Value< Index<TText, IndexWotd<TSpec> > > {
+		typedef typename Value< typename Fibre< Index<TText, IndexWotd<TSpec> >, WotdRawText >::Type >::Type Type;
+    };
+
+	template < typename TText, typename TSpec >
+    struct Size< Index<TText, IndexWotd<TSpec> > > {
+		typedef typename Size< typename Fibre< Index<TText, IndexWotd<TSpec> >, WotdRawText >::Type >::Type Type;
+    };
+*/
+
+
+//////////////////////////////////////////////////////////////////////////////
+// default fibre creators
+
+	template < typename TText, typename TSpec >
+	struct DefaultIndexCreator<Index<TText, IndexWotd<TSpec> >, FibreDir> {
+        typedef Default Type;
+    };
+
+	template < typename TText, typename TSSetSpec, typename TSpec >
+	struct DefaultIndexCreator<Index<StringSet<TText, TSSetSpec>, IndexWotd<TSpec> >, FibreDir> {
+        typedef Default Type;
+    };
+
+//////////////////////////////////////////////////////////////////////////////
+// default finder
+
+	template < typename TText, typename TSpec >
+	struct DefaultFinder< Index<TText, IndexWotd<TSpec> > > {
+        typedef FinderSTree Type;	// standard suffix array finder is mlr-heuristic
+    };
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	template <typename TSize>
+	struct VertexWotdOriginal_ {
+		TSize		node;			// position of current node entry in directory
+		TSize		parentRepLen;	// representative length of parent node
+		TSize		edgeLen;		// length of edge above current node
+
+		VertexWotdOriginal_() {}
+		VertexWotdOriginal_(MinimalCtor):
+			parentRepLen(0),
+			edgeLen(0) 
+		{
+			_setSizeInval(node);
+		}
+	};
+
+	template <typename TSize>
+	struct VertexWotdModified_ {
+		TSize		node;			// position of current node entry in directory
+		TSize		parentRepLen;	// representative length of parent node
+		TSize		edgeLen;		// length of edge above current node
+		Pair<TSize> range;			// current SA interval of hits
+		TSize		parentRight;	// right boundary of parent node's range (allows to go right)
+
+		VertexWotdModified_() {}
+		VertexWotdModified_(MinimalCtor):
+			node(0),
+			parentRepLen(0),
+			edgeLen(0),
+			range(0,0),
+			parentRight(0) {}
+		VertexWotdModified_(Pair<TSize> const &otherRange, TSize otherParentRight):
+			node(0),
+			parentRepLen(0),
+			edgeLen(0),
+			range(otherRange),
+			parentRight(otherParentRight) {}
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+///.Metafunction.VertexDescriptor.param.T.type:Spec.IndexWotd
+
+	template < typename TText >
+	struct VertexDescriptor< Index<TText, IndexWotd<WotdOriginal> > > {
+		typedef typename Size< Index<TText, IndexWotd<WotdOriginal> > >::Type TSize;
+		typedef VertexWotdOriginal_<TSize> Type;
+	};
+
+	template < typename TText, typename TSpec >
+	struct VertexDescriptor< Index<TText, IndexWotd<TSpec> > > {
+		typedef typename Size< Index<TText, IndexWotd<TSpec> > >::Type TSize;
+		typedef VertexWotdModified_<TSize> Type;
+	};
+
+	template < typename TText, typename TSpec >
+	void _indexRequireTopDownIteration(Index<TText, IndexWotd<TSpec> > &index) 
+	{
+		indexRequire(index, WotdDir());
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// history stack functions
+
+	template <typename TSize>
+	struct HistoryStackWotdOriginal_
+	{
+		TSize		node;		// position of current node entry in directory
+		TSize		edgeLen;	// length of edge above current node
+	};
+
+	template <typename TSize>
+	struct HistoryStackWotdModified_
+	{
+		TSize		node;		// position of current node entry in directory
+		TSize		edgeLen;	// length of edge above current node
+		Pair<TSize> range;		// current SA interval of hits
+	};
+
+	template < typename TText, typename TSpec >
+	struct HistoryStackEntry_< Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown< ParentLinks<TSpec> > > > > 
+	{
+		typedef Index<TText, IndexWotd<WotdOriginal> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+		typedef HistoryStackWotdOriginal_<TSize>		Type;
+	};
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	struct HistoryStackEntry_< Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > >
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+		typedef HistoryStackWotdModified_<TSize>		Type;
+	};
+
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline void 
+	_historyPush(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it) 
+	{
+		it._parentDesc = value(it);
+		value(it).parentRepLen += parentEdgeLength(it);
+		value(it).parentRight = value(it).range.i2;
+	}
+
+	template < typename TText, typename TSpec >
+	inline void 
+	_historyPush(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it) 
+	{
+		typedef typename Size< Index<TText, IndexWotd<WotdOriginal> > >::Type TSize;
+		TSize edgeLen = parentEdgeLength(it);
+		HistoryStackWotdOriginal_<TSize> entry = { value(it).node, edgeLen };
+		push(it.history, entry);
+		value(it).parentRepLen += edgeLen;
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline void 
+	_historyPush(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it) 
+	{
+		typedef typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type TSize;
+		TSize edgeLen = parentEdgeLength(it);
+		HistoryStackWotdModified_<TSize> entry = { value(it).node, edgeLen, value(it).range };
+		push(it.history, entry);
+		value(it).parentRepLen += edgeLen;
+		value(it).parentRight = value(it).range.i2;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.resizeVertexMap.type:Spec.IndexWotd
+
+	template < typename TText, typename TIndexSpec, typename TPropertyMap >
+	inline void
+	resizeVertexMap(
+		Index<TText, IndexWotd<TIndexSpec> > const& index,
+		TPropertyMap & pm)
+	{
+		resize(pm, length(indexDir(index)), Generous());
+	}
+
+/* // different interface compared to resizeVertexMap(graph, ...)
+	template < typename TText, typename TIndexSpec, typename TPropertyMap, typename TProperty >
+	inline void
+	resizeVertexMap(
+		Index<TText, IndexWotd<TIndexSpec> > const& index,
+		TPropertyMap & pm,
+		TProperty const & prop)
+	{
+		resize(pm, length(indexDir(index)), prop, Generous());
+	}
+*/
+	template < typename TSize >
+	inline typename Id< VertexWotdOriginal_<TSize> const >::Type
+	_getId(VertexWotdOriginal_<TSize> const &desc) 
+	{
+		return desc.node;
+	}
+
+	template < typename TSize >
+	inline typename Id< VertexWotdOriginal_<TSize> >::Type
+	_getId(VertexWotdOriginal_<TSize> &desc) 
+	{
+		return _getId(const_cast<VertexWotdOriginal_<TSize> const &>(desc));
+	}
+
+	template < typename TSize >
+	inline typename Id< VertexWotdModified_<TSize> const >::Type
+	_getId(VertexWotdModified_<TSize> const &desc) 
+	{
+		return desc.node;
+	}
+
+	template < typename TSize >
+	inline typename Id< VertexWotdModified_<TSize> >::Type
+	_getId(VertexWotdModified_<TSize> &desc) 
+	{
+		return _getId(const_cast<VertexWotdModified_<TSize> const &>(desc));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TSize >
+	inline bool _isRoot(VertexWotdOriginal_<TSize> const &value) {
+		return value.node == 0;
+	}
+
+	template < typename TSize >
+	inline bool _isRoot(VertexWotdModified_<TSize> const &value) {
+		return value.node == 0; 
+	}
+
+	// is this a leaf? (including empty $-edges)
+	template < typename TText, typename TIndexSpec, typename TSpec, typename TDfsOrder >
+	inline bool _isLeaf(
+		Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TSpec> > const &it,
+		VSTreeIteratorTraits<TDfsOrder, False> const)
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> > TIndex;
+		TIndex const &index = container(it);
+		return (dirAt(value(it).node, index) & index.LEAF) != 0;
+	}
+
+	// is this a leaf? (excluding empty $-edges)
+	template < typename TText, typename TIndexSpec, typename TSpec, typename TDfsOrder >
+	inline bool _isLeaf(
+		Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TSpec> > const &it,
+		VSTreeIteratorTraits<TDfsOrder, True> const)
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+
+		TIndex const &index = container(it);
+		if (dirAt(value(it).node, index) & index.LEAF)
+			return true;
+
+		// ensure node evaluation and test for sentinel child edges?
+		return _wotdEvaluate(it) & index.SENTINELS;
+	}
+
+
+	// parentEdgeLength - ORIGINAL VERSION
+	template < typename TIndex, typename TSize >
+	inline typename Size<TIndex>::Type
+	parentEdgeLength(TIndex const &index, VertexWotdOriginal_<TSize> &vDesc)
+	{
+		TSize edgeLen = vDesc.edgeLen;
+		if (edgeLen != (TSize)-1)
+			return edgeLen;
+
+		TSize pos = vDesc.node;
+		TSize w0 = dirAt(pos, index);
+		if (w0 & index.LEAF)
+			return vDesc.edgeLen = suffixLength(w0 & index.BITMASK0, index);
+
+		TSize w1 = dirAt(pos + 1, index);
+		if (w1 & index.UNEVALUATED)
+			return vDesc.edgeLen = _bucketLcp(
+				infix(indexSA(index), w0 & index.BITMASK0, w1 & index.BITMASK1),
+				indexText(index));
+		else
+			return vDesc.edgeLen = _getNodeLP(index, w1) - (w0 & index.BITMASK0);
+	}
+
+	// parentEdgeLength - MODIFIED VERSION
+	template < typename TIndex, typename TSize >
+	inline typename Size<TIndex>::Type
+	parentEdgeLength(TIndex const &index, VertexWotdModified_<TSize> &vDesc)
+	{
+		TSize edgeLen = vDesc.edgeLen;
+		if (edgeLen != (TSize)-1)
+			return edgeLen;
+
+		TSize pos = vDesc.node;
+		TSize w0 = dirAt(pos, index);
+		if (w0 & index.LEAF)
+			return vDesc.edgeLen =
+				suffixLength(saAt(vDesc.range.i1, index), index) - vDesc.parentRepLen;
+
+		TSize w1 = dirAt(pos + 1, index);
+		if (w1 & index.UNEVALUATED)
+			if (_isSizeInval(vDesc.range.i2))
+				return vDesc.edgeLen = _bucketLcp(
+					suffix(indexSA(index), vDesc.range.i1),
+					indexText(index),
+					vDesc.parentRepLen) - vDesc.parentRepLen;
+			else
+				return vDesc.edgeLen = _bucketLcp(
+					infix(indexSA(index), vDesc.range.i1, vDesc.range.i2),
+					indexText(index),
+					vDesc.parentRepLen) - vDesc.parentRepLen;
+		else
+			return (dirAt(w1 & index.BITMASK1, index) & index.BITMASK0) - vDesc.parentRepLen;
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type
+	parentEdgeLength(Iter<
+		Index<TText, IndexWotd<TIndexSpec> >, 
+		VSTree< TopDown<TSpec> > > const &it)
+	{
+		typedef Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > TIter;
+		return parentEdgeLength(container(it), value(const_cast<TIter&>(it)));
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type
+	parentRepLength(Iter<
+		Index<TText, IndexWotd<TIndexSpec> >, 
+		VSTree< TopDown<TSpec> > > const &it)
+	{
+		return value(it).parentRepLen;
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type
+	parentRepLength(Iter<
+		Index<TText, IndexWotd<TIndexSpec> >, 
+		VSTree< TopDown< ParentLinks<TSpec> > > > const &it)
+	{
+		return value(it).parentRepLen;
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type
+	repLength(Iter<
+		Index<TText, IndexWotd<TIndexSpec> >, 
+		VSTree< TopDown<TSpec> > > const &it) 
+	{
+		return parentRepLength(it) + parentEdgeLength(it);
+	}
+
+
+	// parentEdgeLabel - ORIGINAL VERSION (doesn't work if TText is a StringSet)
+	template < typename TText, typename TSpec >
+	inline typename Infix< typename Fibre<Index<TText, IndexWotd<WotdOriginal> >, EsaText>::Type const >::Type 
+	parentEdgeLabel(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > const &it) 
+	{
+		typedef Index<TText, IndexWotd<WotdOriginal> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+
+		TIndex const &index = container(it);
+
+		if (isRoot(it))
+			return infix(indexText(index), 0, 0);
+		else {
+			TSize occ = _getNodeLP(index, value(it).node);
+			return infix(indexText(index), occ, occ + parentEdgeLength(it));
+		}
+	}
+
+	// getOccurrence - ORIGINAL VERSION
+	template < typename TText, typename TSpec >
+	inline typename SAValue<Index<TText, IndexWotd<WotdOriginal> > >::Type 
+	getOccurrence(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree<TSpec> > const &it) {
+		return _getNodeLP(container(it), value(it).node) - value(it).parentRepLen;
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline bool
+	emptyParentEdge(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TopDown<TSpec> > > const &it) 
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> > TIndex;
+
+		TIndex const &index = container(it);
+		typename SAValue<TIndex>::Type pos = getOccurrence(it);
+		return getSeqOffset(pos, stringSetLimits(index)) + value(it).parentRepLen
+			== sequenceLength(getSeqNo(pos, stringSetLimits(index)), index);
+	}
+
+	// to avoid ambiguity
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline bool
+	emptyParentEdge(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TopDown<ParentLinks<TSpec> > > > const &it) 
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> > TIndex;
+
+		TIndex const &index = container(it);
+		typename SAValue<TIndex>::Type pos = getOccurrence(it);
+		return getSeqOffset(pos, stringSetLimits(index)) + value(it).parentRepLen
+			== sequenceLength(getSeqNo(pos, stringSetLimits(index)), index);
+	}
+
+
+
+	template < typename TText, typename TSpec >
+	inline void 
+	goRoot(Iter<
+		Index<TText, IndexWotd<WotdOriginal> >, 
+		VSTree<TSpec> > &it) 
+	{
+		_historyClear(it);
+		value(it).node = 0;			// start in root node (first entry in dir)
+		value(it).parentRepLen = 0;	// parent prefix length is 0
+		value(it).edgeLen = 0;		// edge length is 0
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline void 
+	goRoot(Iter<
+		Index<TText, IndexWotd<TIndexSpec> >, 
+		VSTree<TSpec> > &it) 
+	{
+		_historyClear(it);
+		value(it).range.i1 = 0;		// start in root node with range (0,infty)
+		_setSizeInval(value(it).range.i2);	// infty is equivalent to length(index) and faster to compare
+		value(it).node = 0;			// start in root node (first entry in dir)
+		value(it).parentRepLen = 0;	// parent prefix length is 0
+		value(it).edgeLen = 0;		// edge length is 0
+	}
+
+	template < typename TText, typename TSpec >
+	inline bool atEnd(Iter<Index<TText, IndexWotd<WotdOriginal> >, VSTree<TSpec> > &it) 
+	{
+		return _isSizeInval(value(it).node);
+	}
+
+	template < typename TText, typename TSpec >
+	inline bool atEnd(Iter<Index<TText, IndexWotd<WotdOriginal> >, VSTree<TSpec> > const &it) 
+	{
+		return _isSizeInval(value(it).node);
+	}
+
+		
+	// adjust iterator's right border of SA range
+	template < typename TText, typename TSpec >
+	inline void
+	_adjustRightBorder(
+		Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > &) 
+	{}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline void
+	_adjustRightBorder(
+		Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it)
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+
+		TIndex	const &index = container(it);
+		TSize	pos = value(it).node;
+
+		TSize w0 = dirAt(pos, index);
+		if (w0 & index.LEAF)
+			value(it).range.i2 = value(it).range.i1 + 1;
+		else
+			if (w0 & index.LAST_CHILD)
+				value(it).range.i2 = value(it).parentRight;
+			else {
+				w0 = dirAt(pos + 2, index);
+				value(it).range.i2 = w0 & index.BITMASK0;
+			}
+	}
+
+	// go down the leftmost edge (including empty $-edges)
+	template < typename TText, typename TSpec, typename TDfsOrder, typename THideEmptyEdges >
+	inline bool 
+	_goDown(
+		Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > &it,
+		VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const)
+	{
+		typedef Index<TText, IndexWotd<WotdOriginal> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+
+		if (_isLeaf(it, EmptyEdges())) return false;
+
+		TIndex &index = container(it);
+		_historyPush(it);
+
+		// ensure node evaluation
+		TSize childNode = _wotdEvaluate(it);
+
+		if (THideEmptyEdges::VALUE && (childNode & index.SENTINELS) != 0)
+			return false;
+
+		// go down
+		value(it).node = childNode & index.BITMASK1;
+		value(it).edgeLen = -1;
+
+		// go right if parent edge is empty 
+		// or hull predicate is false
+		if ((THideEmptyEdges::VALUE && emptyParentEdge(it)) || !nodeHullPredicate(it))
+			if (!goRight(it)) {
+				_goUp(it);
+				return false;
+			}
+
+		return true;
+	}
+
+	// go down the leftmost edge (excluding empty $-edges)
+	template < typename TText, typename TIndexSpec, typename TSpec, typename TDfsOrder, typename THideEmptyEdges >
+	inline bool 
+	_goDown(
+		Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it,
+		VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const)
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+
+		if (_isLeaf(it, EmptyEdges())) return false;
+		TIndex const &index = container(it);
+
+		// ensure node evaluation
+		TSize childNode = _wotdEvaluate(it);
+
+		if (THideEmptyEdges::VALUE && (childNode & index.SENTINELS) != 0)
+			return false;
+
+		// go down
+		_historyPush(it);
+		value(it).node = childNode & index.BITMASK1;
+		value(it).edgeLen = -1;
+		_adjustRightBorder(it);
+
+		// go right if parent edge is empty
+		// or hull predicate is false
+		if ((THideEmptyEdges::VALUE && emptyParentEdge(it)) || !nodeHullPredicate(it))
+			if (!goRight(it)) {
+				_goUp(it);
+				return false;
+			}
+
+		return true;
+	}
+
+	// go right to the lexic. next sibling
+	template < typename TText, typename TSpec, typename TDfsOrder, typename THideEmptyEdges >
+	inline bool 
+	_goRight(
+		Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > &it,
+		VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const) 
+	{
+		typedef Index<TText, IndexWotd<WotdOriginal> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+
+		TIndex const &index = container(it);
+
+		do {
+			TSize w0 = dirAt(value(it).node, index);
+			if (w0 & index.LAST_CHILD)
+				return false;
+
+			value(it).node += (w0 & index.LEAF)? 1: 2;
+			value(it).edgeLen = -1;
+
+			_adjustRightBorder(it);
+		} while ((THideEmptyEdges::VALUE && emptyParentEdge(it)) || !nodeHullPredicate(it));
+		return true;
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec, typename TDfsOrder, typename THideEmptyEdges >
+	inline bool 
+	_goRight(
+		Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it,
+		VSTreeIteratorTraits<TDfsOrder, THideEmptyEdges> const) 
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+
+		TIndex const &index = container(it);
+
+		do {
+			TSize w0 = dirAt(value(it).node, index);
+			if (w0 & index.LAST_CHILD)
+				return false;
+
+			value(it).node += (w0 & index.LEAF)? 1: 2;
+			value(it).edgeLen = -1;
+
+			value(it).range.i1 = value(it).range.i2;
+			_adjustRightBorder(it);
+		} while ((THideEmptyEdges::VALUE && emptyParentEdge(it)) || !nodeHullPredicate(it));
+		return true;
+	}
+
+	// go up one edge (returns false if in root node)
+	// can be used at most once, as no history stack is available
+	template < typename TText, typename TWotdSpec, typename TSpec >
+	inline bool 
+	_goUp(Iter< Index<TText, IndexWotd<TWotdSpec> >, VSTree< TopDown<TSpec> > > &it) 
+	{
+		if (!isRoot(it)) {
+			value(it) = it._parentDesc;
+			return true;
+		}
+		return false;
+	}
+
+	// go up one edge (returns false if in root node)
+	template < typename TText, typename TSpec >
+	inline bool 
+	_goUp(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it) 
+	{
+		typedef typename Size< Index<TText, IndexWotd<WotdOriginal> > >::Type TSize;
+
+		if (!empty(it.history)) {
+			HistoryStackWotdOriginal_<TSize> const &entry = top(it.history);
+			value(it).node = entry.node;
+			value(it).parentRepLen -= entry.edgeLen;
+			value(it).edgeLen = entry.edgeLen;
+			pop(it.history);
+			return true;
+		}
+		return false;
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline bool 
+	_goUp(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > &it) 
+	{
+		typedef typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type TSize;
+
+		if (!empty(it.history)) 
+		{
+			HistoryStackWotdModified_<TSize> const &entry = top(it.history);
+			value(it).node = entry.node;
+			value(it).parentRepLen -= entry.edgeLen;
+			value(it).edgeLen = entry.edgeLen;
+			value(it).range = entry.range;
+			pop(it.history);
+			if (!empty(it.history))
+				value(it).parentRight = top(it.history).range.i2;	// copy right boundary of parent's range
+			return true;
+		}
+		return false;
+	}
+
+	// return vertex descriptor of parent's node
+	template < typename TText, typename TSpec >
+	inline typename VertexDescriptor< Index<TText, IndexWotd<WotdOriginal> > >::Type
+	nodeUp(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown< ParentLinks<TSpec> > > > const &it) 
+	{
+		typedef Index<TText, IndexWotd<WotdOriginal> > TIndex;
+		typedef typename Size<TIndex>::Type TSize;
+
+		if (!empty(it.history))
+		{
+			HistoryStackWotdModified_<TSize> const &entry = top(it.history);
+			typename VertexDescriptor<TIndex>::Type desc;
+
+			desc.node = entry.node;
+			desc.parentRepLen = value(it).parentRepLen - entry.edgeLen;
+			desc.edgeLen = entry.edgeLen;
+			desc.range = entry.range;
+			TSize h = length(it.history) - 1;
+			if (h != 0) --h;
+			desc.parentRight = it.history[h].range.i2;	// copy right boundary of parent's range
+			return desc;
+		} else
+			return value(it);
+	}
+
+	// return vertex descriptor of parent's node
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline typename VertexDescriptor< Index<TText, IndexWotd<TIndexSpec> > >::Type
+	nodeUp(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown< ParentLinks<TSpec> > > > const &it) 
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> > TIndex;
+		typedef typename Size<TIndex>::Type TSize;
+
+		if (!empty(it.history))
+		{
+			HistoryStackWotdModified_<TSize> const &entry = top(it.history);
+			typename VertexDescriptor<TIndex>::Type desc;
+
+			desc.node = entry.node;
+			desc.parentRepLen = value(it).parentRepLen - entry.edgeLen;
+			desc.edgeLen = entry.edgeLen;
+			return desc;
+		} else
+			return value(it);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	// Counting sort - Step 2a: Count characters
+	template < typename TBuckets, typename TText >
+	inline void
+	_wotdCountChars(TBuckets &buckets, TText const &text)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type TTextIterator;
+
+		TTextIterator itText = begin(text, Standard());
+		TTextIterator itTextEnd = end(text, Standard());
+		for (; itText != itTextEnd; ++itText)
+			++buckets[ordValue(*itText)];
+	}
+
+
+	template < typename TBuckets, typename TText, typename TSpec >
+	inline void
+	_wotdCountChars(TBuckets &buckets, StringSet<TText, TSpec> const &stringSet)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type TTextIterator;
+
+		for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+		{
+			TText const &text = value(stringSet, seqNo);
+			TTextIterator itText = begin(text, Standard());
+			TTextIterator itTextEnd = end(text, Standard());
+			for (; itText != itTextEnd; ++itText)
+				++buckets[ordValue(*itText)];
+		}
+	}
+
+	// Counting sort - Step 2b: Count the prefixLen'th characters of suffices
+	template < typename TBuckets, typename TText, typename TSA, typename TSize >
+	inline typename Size<TText>::Type
+	_wotdCountCharsWotdOriginal(
+		TBuckets &buckets, 
+		TText const &text, 
+		TSA &sa,
+		TSize prefixLen)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA const, Standard>::Type	TSAIterator;
+		typedef typename Size<TText>::Type						TTextSize;
+
+		TTextIterator itText = begin(text, Standard());
+		TSAIterator itSA = begin(sa, Standard());
+		TSAIterator itSAEnd = end(sa, Standard());
+
+		TTextSize sentinels = 0;
+		TTextSize textLength = length(text);
+		for (; itSA != itSAEnd; ++itSA) 
+		{
+			// add prefix on entries in sa
+			TTextSize saValue = (*itSA += prefixLen);
+			if (textLength > saValue)
+				++buckets[ordValue(*(itText + saValue))];
+			else
+				if (textLength == saValue) ++sentinels;
+		}
+		return sentinels;
+	}
+
+	template < typename TBuckets, typename TText, typename TSA, typename TSize >
+	inline typename Size<TText>::Type
+	_wotdCountChars(
+		TBuckets &buckets, 
+		TText const &text, 
+		TSA const &sa,
+		TSize prefixLen)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA const, Standard>::Type	TSAIterator;
+		typedef typename Size<TText>::Type						TTextSize;
+
+		TTextIterator itText = begin(text, Standard()) + prefixLen;
+		TSAIterator itSA = begin(sa, Standard());
+		TSAIterator itSAEnd = end(sa, Standard());
+
+		TTextSize sentinels = 0;
+		TTextSize textLength = length(text) - prefixLen;
+		for (; itSA != itSAEnd; ++itSA) 
+		{
+			TTextSize saValue = *itSA;
+			if (textLength > saValue)
+				++buckets[ordValue(*(itText + saValue))];
+			else
+				if (textLength == saValue) ++sentinels;
+		}
+		return sentinels;
+	}
+
+	template < 
+		typename TBuckets, 
+		typename TText, 
+		typename TSpec, 
+		typename TSA, 
+		typename TSize 
+	>
+	inline typename Size<TText>::Type
+	_wotdCountChars(
+		TBuckets &buckets, 
+		StringSet<TText, TSpec> const &stringSet,
+		TSA const &sa,
+		TSize prefixLen)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA const, Standard>::Type	TSAIterator;
+		typedef typename Size<TText>::Type						TTextSize;
+
+		TTextIterator itText = TTextIterator();
+		TSAIterator itSA = begin(sa, Standard());
+		TSAIterator itSAEnd = end(sa, Standard());
+
+		TTextSize sentinels = 0;
+		TTextSize textLength = 0;
+		unsigned lastSeqSeen = -1;
+		Pair<unsigned, TTextSize> lPos;
+		for (; itSA != itSAEnd; ++itSA) 
+		{
+			posLocalize(lPos, *itSA, stringSetLimits(stringSet));
+			if (lastSeqSeen != getSeqNo(lPos))
+			{
+				lastSeqSeen = getSeqNo(lPos);
+
+				// shift textBegin and textLength by prefixLen
+				textLength = length(stringSet[lastSeqSeen]) - prefixLen;
+				itText = begin(stringSet[lastSeqSeen], Standard()) + prefixLen;
+			}
+			if (textLength > getSeqOffset(lPos))
+				++buckets[ordValue(*(itText + getSeqOffset(lPos)))];
+			else
+				if (textLength == getSeqOffset(lPos)) ++sentinels;
+		}
+		return sentinels;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	// Counting sort - Step 3: Cumulative sum
+	template < typename TBounds, typename TBuckets, typename TSize >
+	inline typename Size<TBuckets>::Type
+	_wotdCummulativeSum(TBounds &bounds, TBuckets const &buckets, TSize offset)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TBounds, Standard>::Type		TBoundIterator;
+		typedef typename Iterator<TBuckets, Standard>::Type		TBucketsIterator;
+
+		TBucketsIterator it = begin(buckets, Standard());
+		TBucketsIterator itEnd = end(buckets, Standard());
+		TBoundIterator bit = begin(bounds, Standard());
+
+		typename Value<TBounds>::Type	sum = offset;
+		typename Size<TBuckets>::Type	requiredSize = 0;
+		typename Value<TBuckets>::Type	diff;
+
+		for (; it != itEnd; ++it, ++bit)
+			if ((diff = *it) != 0) {
+				requiredSize += (diff > 1)? 2: 1;
+				*bit = sum;
+				sum += diff;
+			}
+
+		return requiredSize;
+	}
+
+	template < typename TBounds, typename TBuckets >
+	inline typename Size<TBuckets>::Type
+	_wotdCummulativeSum(TBounds &bounds, TBuckets const &buckets)
+	{
+		return _wotdCummulativeSum(bounds, buckets, 0);
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.createWotdIndex:
+..summary:Builds a q-gram index on a sequence. 
+..cat:Index
+..signature:createWotdIndex(sa, dir, text)
+..param.text:The sequence.
+..param.sa:The resulting list in which all q-grams are sorted alphabetically.
+..param.dir:The resulting array that indicates at which position in index the corresponding q-grams can be found.
+..returns:Index contains the sorted list of qgrams. For each possible q-gram pos contains the first position in index that corresponds to this q-gram. 
+..include:seqan/index.h
+*/
+
+	// single sequence
+	template < typename TIndex >
+	typename Size<TIndex>::Type
+	_sortFirstWotdBucket(TIndex &index)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Fibre<TIndex, WotdText >::Type		TText;
+		typedef typename Fibre<TIndex, WotdSA >::Type			TSA;
+		typedef typename TIndex::TCounter						TCounter;
+
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA, Standard>::Type			TSAIterator;
+		typedef typename Iterator<TCounter, Standard>::Type		TCntIterator;
+		typedef typename Size<TText>::Type						TSize;
+		
+		TText const &text = indexText(index);
+		TCounter &occ = index.tempOcc;
+		TCounter &bound = index.tempBound;
+
+		// 1. clear counters and copy SA to temporary SA
+		arrayFill(begin(occ, Standard()), end(occ, Standard()), 0);
+
+		// 2. count characters
+		_wotdCountChars(occ, text);
+
+		// 3. cumulative sum
+		TSize requiredSize = _wotdCummulativeSum(bound, occ);
+
+		// 4. fill suffix array
+		{
+			TSA &sa = indexSA(index);
+			TSAIterator saBeg = begin(sa, Standard());
+			TCntIterator boundBeg = begin(bound, Standard());
+
+			TTextIterator itText = begin(text, Standard());
+			TTextIterator itTextEnd = end(text, Standard());
+			for(TSize i = 0; itText != itTextEnd; ++itText, ++i)
+				*(saBeg + (*(boundBeg + ordValue(*itText)))++) = i;
+		}
+		index.sentinelOcc = 0;
+		index.sentinelBound = 0;
+
+		return requiredSize;
+	}
+
+	// multiple sequences
+	template < typename TText, typename TSpec, typename TIndexSpec >
+	typename Size< Index<StringSet<TText, TSpec>, TIndexSpec> >::Type
+	_sortFirstWotdBucket(Index<StringSet<TText, TSpec>, TIndexSpec> &index)
+	{
+	SEQAN_CHECKPOINT
+		typedef Index<StringSet<TText, TSpec>, TIndexSpec>		TIndex;
+		typedef typename Fibre<TIndex, WotdSA >::Type			TSA;
+		typedef typename TIndex::TCounter						TCounter;
+
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA, Standard>::Type			TSAIterator;
+		typedef typename Iterator<TCounter, Standard>::Type		TCntIterator;
+		typedef typename Size<TText>::Type						TSize;
+		typedef typename Value<TText>::Type						TValue;
+		
+		StringSet<TText, TSpec> const &stringSet = indexText(index);
+		TCounter &occ = index.tempOcc;
+		TCounter &bound = index.tempBound;
+
+		// 1. clear counters and copy SA to temporary SA
+		arrayFill(begin(occ, Standard()), end(occ, Standard()), 0);
+
+		// 2. count characters
+		_wotdCountChars(occ, stringSet);
+
+		// 3. cummulative sum
+		TSize requiredSize = _wotdCummulativeSum(bound, occ);
+
+		// 4. fill suffix array
+		for(unsigned seqNo = 0; seqNo < length(stringSet); ++seqNo) 
+		{
+			TSA &sa = indexSA(index);
+			TSAIterator saBeg = begin(sa, Standard());
+			TCntIterator boundBeg = begin(bound, Standard());
+
+			typename Value<TSA>::Type localPos;
+			assignValueI1(localPos, seqNo);
+			assignValueI2(localPos, 0);
+
+			TText const &text = value(stringSet, seqNo);
+			TTextIterator itText = begin(text, Standard());
+			TTextIterator itTextEnd = end(text, Standard());
+			for(; itText != itTextEnd; ++itText) 
+			{
+				*(saBeg + (*(boundBeg + ordValue(*itText)))++) = localPos;
+				assignValueI2(localPos, getValueI2(localPos) + 1);
+			}
+		}
+		index.sentinelOcc = 0;
+		index.sentinelBound = 0;
+
+		return requiredSize;
+	}
+
+
+
+	// sort bucket using counting sort
+	// (nearly) ORIGINAL VERSION:
+	// - brings the bucket with the longest suffix (lpBucket) to front
+	// - all other buckets are in lexicographical order
+	// - adds prefixLen to all SA entries in SA[left,right)
+	template < typename TText, typename TBeginPos, typename TEndPos, typename TSize >
+	TSize _sortWotdBucket(
+		Index<TText, IndexWotd<WotdOriginal> > &index,
+		TBeginPos left, 
+		TEndPos right,
+		TSize prefixLen)
+	{
+	SEQAN_CHECKPOINT
+		typedef Index<TText, IndexWotd<WotdOriginal> >			TIndex;
+		typedef typename Fibre<TIndex, WotdSA >::Type			TSA;
+		typedef typename TIndex::TCounter						TCounter;
+
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA, Standard>::Type			TSAIterator;
+		typedef typename Iterator<TCounter, Standard>::Type		TCntIterator;
+		typedef typename Size<TText>::Type						TTextSize;
+
+		TText const &text = indexText(index);
+		TCounter const &tempSA = index.tempSA;
+		TCounter &occ = index.tempOcc;
+		TCounter &bound = index.tempBound;
+
+		// 1. clear counters and copy SA to temporary SA
+		arrayFill(begin(occ, Standard()), end(occ, Standard()), 0);
+
+		// 2. count characters
+		index.tempSA = infix(indexSA(index), left, right);
+		index.sentinelBound = 0;
+		index.sentinelOcc =
+			_wotdCountCharsWotdOriginal(occ, text, tempSA, prefixLen);
+
+		// 3. cumulative sum
+		TSize requiredSize = 0;
+
+		// actually, here sentinelOcc<=1 holds (this is the original wotd)
+		if (index.interSentinelNodes) {
+			if (index.sentinelOcc != 0)
+				requiredSize = (index.sentinelOcc > 1)? 2: 1;	// insert *one* $-edge for all $_i suffices
+		} else
+			requiredSize = index.sentinelOcc;					// insert each $_i suffix one-by-one
+
+		requiredSize += _wotdCummulativeSum(bound, occ, left + index.sentinelOcc);
+		index.sentinelBound = left;
+
+		// 4. fill suffix array
+		{
+			TSA &sa = indexSA(index);
+			TSAIterator saBeg = begin(sa, Standard());
+			TCntIterator boundBeg = begin(bound, Standard());
+
+			TTextIterator itText = begin(text, Standard());
+			TCntIterator itSA = begin(tempSA, Standard());
+			TCntIterator itSAEnd = end(tempSA, Standard());
+			TTextSize textLength = length(text);
+			for(; itSA != itSAEnd; ++itSA)
+			{
+				TTextSize saValue = *itSA;
+				if (textLength > saValue)
+					*(saBeg + (*(boundBeg + ordValue(*(itText + saValue))))++) = saValue;
+				else
+					if (textLength == saValue)
+						*(saBeg + index.sentinelBound++) = saValue;
+			}
+		}
+
+		// 5. move lpBucket to front and add saOffset to hash directory entries
+		{
+			TSize lpBucket = ordValue(text[tempSA[0]]);
+			if (lpBucket != 0) {
+				TSize lpBucketOcc = occ[lpBucket];
+				TSize lpBucketBound = bound[lpBucket];
+
+				TCntIterator itOcc = begin(occ, Standard()) + lpBucket;
+				TCntIterator itBound = begin(bound, Standard()) + lpBucket;
+				TCntIterator itBeg = begin(bound, Standard());
+				for(; itBound != itBeg; --itBound, --itOcc) {
+					*itOcc = *(itOcc - 1);
+					*itBound = *(itBound - 1);
+				}
+				if (index.sentinelOcc != 0) {
+					// bring first bucket before sentinel bucket
+					*itOcc = index.sentinelOcc;
+					*itBound = index.sentinelBound;
+					index.sentinelOcc = lpBucketOcc;
+					index.sentinelBound = lpBucketBound;
+				} else {
+					*itOcc = lpBucketOcc;
+					*itBound = lpBucketBound;
+				}
+			} else
+				if (index.sentinelOcc != 0) {
+					// bring first bucket before sentinel bucket
+					TSize swap = index.sentinelOcc;
+					index.sentinelOcc = occ[0];
+					occ[0] = swap;
+					swap = index.sentinelBound;
+					index.sentinelBound = bound[0];
+					bound[0] = swap;
+				}
+		}
+
+		return requiredSize;
+	}
+
+
+
+
+
+	// sort bucket using counting sort
+	// MODIFIED VERSION:
+	// - all buckets are in lexicographical order
+	// - SA[left,right) contains real SA entries (the beginning positions of the suffices)
+
+	// single sequence
+	template < typename TIndex, typename TBeginPos, typename TEndPos, typename TSize >
+	TSize _sortWotdBucket(
+		TIndex &index,
+		TBeginPos left, 
+		TEndPos right,
+		TSize prefixLen)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Fibre<TIndex, WotdText >::Type		TText;
+		typedef typename Fibre<TIndex, WotdSA >::Type			TSA;
+		typedef typename TIndex::TCounter						TCounter;
+
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA, Standard>::Type			TSAIterator;
+		typedef typename Iterator<TCounter, Standard>::Type		TCntIterator;
+		typedef typename Size<TText>::Type						TTextSize;
+
+		TText const &text = indexText(index);
+		TCounter const &tempSA = index.tempSA;
+		TCounter &occ = index.tempOcc;
+		TCounter &bound = index.tempBound;
+
+		// 1. clear counters and copy SA to temporary SA
+		arrayFill(begin(occ, Standard()), end(occ, Standard()), 0);
+		index.tempSA = infix(indexSA(index), left, right);
+
+		// 2. count characters
+		index.sentinelBound = 0;
+		index.sentinelOcc = _wotdCountChars(occ, text, tempSA, prefixLen);
+
+		// 3. cumulative sum
+		TSize requiredSize = 0;
+		if (index.interSentinelNodes) {
+			if (index.sentinelOcc != 0)
+				requiredSize = (index.sentinelOcc > 1)? 2: 1;	// insert *one* $-edge for all $_i suffices
+		} else
+			requiredSize = index.sentinelOcc;					// insert each $_i suffix one-by-one
+
+		requiredSize += _wotdCummulativeSum(bound, occ, left + index.sentinelOcc);
+		index.sentinelBound = left;
+
+		// 4. fill suffix array
+		{
+			TSA &sa = indexSA(index);
+			TSAIterator saBeg = begin(sa, Standard());
+			TCntIterator boundBeg = begin(bound, Standard());
+
+			TTextIterator itText = begin(text, Standard()) + prefixLen;
+			TCntIterator itSA = begin(tempSA, Standard());
+			TCntIterator itSAEnd = end(tempSA, Standard());
+			TTextSize textLength = length(text) - prefixLen;
+			for(; itSA != itSAEnd; ++itSA)
+			{
+				TTextSize saValue = *itSA;
+				if (textLength > saValue)
+					*(saBeg + (*(boundBeg + ordValue(*(itText + saValue))))++) = saValue;
+				else
+					if (textLength == saValue)
+						*(saBeg + index.sentinelBound++) = saValue;
+			}
+		}
+
+		return requiredSize;
+	}
+
+	// multiple sequences
+	template < typename TText, typename TSpec, typename TIndexSpec, typename TBeginPos, typename TEndPos, typename TSize >
+	TSize _sortWotdBucket(
+		Index<StringSet<TText, TSpec>, TIndexSpec> &index,
+		TBeginPos left, 
+		TEndPos right,
+		TSize prefixLen)
+	{
+	SEQAN_CHECKPOINT
+		typedef Index<StringSet<TText, TSpec>, TIndexSpec>			TIndex;
+		typedef typename Fibre<TIndex, WotdSA >::Type				TSA;
+		typedef typename TIndex::TCounter							TCounter;
+		typedef typename TIndex::TTempSA							TTempSA;
+
+		typedef typename Iterator<TText const, Standard>::Type		TTextIterator;
+		typedef typename Iterator<TSA, Standard>::Type				TSAIterator;
+		typedef typename Iterator<TTempSA, Standard>::Type			TTempSAIterator;
+		typedef typename Iterator<TCounter, Standard>::Type			TCntIterator;
+		typedef typename Size<TText>::Type							TTextSize;
+		typedef typename Value<TText>::Type							TValue;
+
+		StringSet<TText, TSpec> const &stringSet = indexText(index);
+		TTempSA const &tempSA = index.tempSA;
+		TCounter &occ = index.tempOcc;
+		TCounter &bound = index.tempBound;
+
+		// 1. clear counters and copy SA to temporary SA
+		TCntIterator occBeg = begin(occ, Standard());
+
+		arrayFill(occBeg, end(occ, Standard()), 0);
+		index.tempSA = infix(indexSA(index), left, right);
+
+		// 2. count characters
+		index.sentinelBound = 0;
+		index.sentinelOcc = _wotdCountChars(occ, stringSet, tempSA, prefixLen);
+
+		// 3. cumulative sum
+		TSize requiredSize = 0;
+		if (index.interSentinelNodes) {
+			if (index.sentinelOcc != 0)
+				requiredSize = (index.sentinelOcc > 1)? 2: 1;	// insert *one* $-edge for all $_i suffices
+		} else
+			requiredSize = index.sentinelOcc;					// insert each $_i suffix one-by-one
+
+		requiredSize += _wotdCummulativeSum(bound, occ, left + index.sentinelOcc);
+		index.sentinelBound = left;
+
+		// 4. fill suffix array
+		{
+			TSA &sa = indexSA(index);
+			TSAIterator saBeg = begin(sa, Standard());
+			TCntIterator boundBeg = begin(bound, Standard());
+
+			TTextIterator itText = TTextIterator();
+			TTempSAIterator itSA = begin(tempSA, Standard());
+			TTempSAIterator itSAEnd = end(tempSA, Standard());
+			TTextSize textLength = 0;
+			unsigned lastSeqSeen = -1;
+			Pair<unsigned, TTextSize> lPos;
+			for(; itSA != itSAEnd; ++itSA)
+			{
+				posLocalize(lPos, *itSA, stringSetLimits(index));
+				if (lastSeqSeen != getSeqNo(lPos))
+				{
+					lastSeqSeen = getSeqNo(lPos);
+
+					// shift textBegin and textLength by prefixLen
+					textLength = length(stringSet[lastSeqSeen]) - prefixLen;
+					itText = begin(stringSet[lastSeqSeen], Standard()) + prefixLen;
+				}
+				if (textLength > getSeqOffset(lPos))
+					*(saBeg + (*(boundBeg + ordValue(*(itText + getSeqOffset(lPos)))))++) = *itSA;
+				else
+					if (textLength == getSeqOffset(lPos))
+						*(saBeg + index.sentinelBound++) = *itSA;
+			}
+		}
+
+		return requiredSize;
+	}
+
+
+
+
+
+	template < typename TSA, typename TText >
+	typename Size<TText>::Type 
+	_bucketLcp(TSA const &sa, TText const &text)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA const, Standard>::Type	TSAIterator;
+		typedef typename Value<TText>::Type						TValue;
+		typedef typename Size<TText>::Type						TTextSize;
+
+		TTextSize prefixLen = 0;
+		
+		if (length(sa) < 2) return prefixLen;
+
+		TTextIterator itText = begin(text, Standard());
+		TSAIterator itSAEnd = end(sa, Standard());
+		TTextSize textLength = length(text);
+
+		do {
+			TSAIterator itSA = begin(sa, Standard());
+			TTextSize sa = *itSA;
+			if (textLength == sa) return prefixLen;
+
+			TValue c = *(itText + sa);
+			for(++itSA; itSA != itSAEnd; ++itSA) {
+				sa = *itSA;
+				if (textLength == sa || c != *(itText + sa))
+					return prefixLen;
+			}
+			++prefixLen; --textLength;
+			++itText;
+		} while (true);
+	}
+
+	template < typename TSA, typename TText, typename TSize >
+	typename Size<TText>::Type 
+	_bucketLcp(TSA const &sa, TText const &text, TSize prefixLen)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA const, Standard>::Type	TSAIterator;
+		typedef typename Value<TText>::Type						TValue;
+		typedef typename Size<TText>::Type						TTextSize;
+
+		if (length(sa) < 2) return prefixLen;
+
+		TTextIterator itText = begin(text, Standard()) + prefixLen;
+		TSAIterator itSAEnd = end(sa, Standard());
+		TTextSize textLength = length(text) - prefixLen;
+
+		do {
+			TSAIterator itSA = begin(sa, Standard());
+			TTextSize sa = *itSA;
+			if (textLength == sa) return prefixLen;
+
+			TValue c = *(itText + sa);
+			for(++itSA; itSA != itSAEnd; ++itSA) {
+				sa = *itSA;
+				if (textLength == sa || c != *(itText + sa))
+					return prefixLen;
+			}
+			++prefixLen; --textLength;
+			++itText;
+		} while (true);
+	}
+
+	template < typename TSA, typename TText, typename TSpec, typename TSize >
+	typename Size<TText>::Type 
+	_bucketLcp(TSA const &sa, StringSet<TText, TSpec> const &stringSet, TSize prefixLen)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TText const, Standard>::Type	TTextIterator;
+		typedef typename Iterator<TSA const, Standard>::Type	TSAIterator;
+		typedef typename Value<TText>::Type						TValue;
+		typedef typename Size<TText>::Type						TTextSize;
+
+		if (length(sa) < 2) return prefixLen;
+
+		TSAIterator itSAEnd = end(sa, Standard());
+		TTextIterator itText;
+		TTextSize textLength;
+
+		Pair<unsigned, TTextSize> lPos;
+		do {
+			TSAIterator itSA = begin(sa, Standard());
+			posLocalize(lPos, *itSA, stringSetLimits(stringSet));
+
+			unsigned lastSeqSeen = getSeqNo(*itSA);
+			textLength = length(stringSet[lastSeqSeen]) - prefixLen;
+			if (textLength == getSeqOffset(lPos)) return prefixLen;
+
+			itText = begin(stringSet[lastSeqSeen], Standard()) + prefixLen;
+			TValue c = *(itText + getSeqOffset(*itSA));
+			for(++itSA; itSA != itSAEnd; ++itSA)
+			{
+				posLocalize(lPos, *itSA, stringSetLimits(stringSet));
+
+				if (lastSeqSeen != getSeqNo(lPos))
+				{
+					lastSeqSeen = getSeqNo(lPos);
+
+					// shift textBegin and textLength by prefixLen
+					textLength = length(stringSet[lastSeqSeen]) - prefixLen;
+					itText = begin(stringSet[lastSeqSeen], Standard()) + prefixLen;
+				}
+
+				if (textLength == getSeqOffset(lPos) || c != *(itText + getSeqOffset(lPos)))
+					return prefixLen;
+			}
+			++prefixLen; --textLength;
+			++itText;
+		} while (true);
+	}
+
+
+	template <typename TText, typename TSpec, typename TPos>
+	inline TPos
+	_getNodeLP(
+		Index<TText, IndexWotd<TSpec> > const &index, 
+		TPos pos)
+	{
+		TPos w0 = dirAt(pos, index);
+		if (w0 & index.LEAF)
+			return w0 & index.BITMASK0;
+
+		TPos w1 = dirAt(pos + 1, index);
+		if (w1 & index.UNEVALUATED)
+			return saAt(w0 & index.BITMASK0, index);
+		else
+			return w0 & index.BITMASK0;
+	}
+
+	// store buckets into directory 
+	// ORIGINAL VERSION: storing SA entries and topology links in Dir
+	template <typename TText, typename TPos>
+	inline void 
+	_storeWotdChildren(
+		Index<TText, IndexWotd<WotdOriginal> > &index,
+		TPos dirOfs)
+	{
+	SEQAN_CHECKPOINT
+		typedef Index<TText, IndexWotd<WotdOriginal> >		TIndex;
+		typedef typename Fibre<TIndex, WotdDir>::Type		TDir;
+		typedef typename Iterator<TDir, Standard>::Type		TDirIterator;
+		typedef typename Size<TDir>::Type					TDirSize;
+		typedef typename TIndex::TCounter					TCounter;
+		typedef typename Iterator<TCounter, Standard>::Type	TCntIterator;
+
+		typedef typename Value<TCounter>::Type				TValue;
+
+		TDirIterator itDir = begin(indexDir(index), Standard()) + dirOfs;
+		TDirIterator itDirEnd = end(indexDir(index), Standard());
+		TDirIterator itPrev = itDirEnd;
+
+		TCntIterator it = begin(index.tempOcc, Standard());
+		TCntIterator bit = begin(index.tempBound, Standard());
+		TCntIterator itEnd = end(index.tempOcc, Standard());
+
+		TValue occ;
+		if (index.sentinelOcc != 0)
+		{
+			if (index.sentinelOcc > 1 && index.interSentinelNodes)	// occurs on multiseqs
+			{
+				itPrev = itDir;
+				*itDir = index.sentinelBound - index.sentinelOcc;	++itDir;
+				*itDir = index.sentinelBound | index.UNEVALUATED;	++itDir;
+			} else
+				for (TDirSize d = index.sentinelBound - index.sentinelOcc; d != index.sentinelBound; ++d)
+				{
+					itPrev = itDir;
+					*itDir = saAt(d, index) | index.LEAF;			++itDir;
+				}
+		}
+		for (; it != itEnd; ++it, ++bit)
+		{
+			if ((occ = *it) == 0) continue;
+			if (occ > 1) {
+				itPrev = itDir;
+				*itDir = *bit - occ; 							++itDir;
+				*itDir = *bit | index.UNEVALUATED;				++itDir;
+			} else {
+				itPrev = itDir;
+				*itDir = saAt(*bit - occ, index) | index.LEAF;	++itDir;
+			}
+		}
+
+		// mark the last child
+		if (itPrev != itDirEnd)
+			*itPrev |= index.LAST_CHILD;
+	}
+
+	// store buckets into directory
+	// MODIFIED VERSION: storing SA links and topology links in Dir
+	template <typename TText, typename TSpec, typename TSize>
+	inline void 
+	_storeWotdChildren(
+		Index<TText, IndexWotd<TSpec> > &index,
+		TSize dirOfs,
+		TSize lcp)
+	{
+	SEQAN_CHECKPOINT
+		typedef Index<TText, IndexWotd<TSpec> >			TIndex;
+		typedef typename Fibre<TIndex, WotdDir>::Type		TDir;
+		typedef typename Iterator<TDir, Standard>::Type		TDirIterator;
+		typedef typename Size<TDir>::Type					TDirSize;
+		typedef typename TIndex::TCounter					TCounter;
+		typedef typename Iterator<TCounter, Standard>::Type	TCntIterator;
+
+		typedef typename Value<TCounter>::Type				TValue;
+
+		TDirIterator itDirBegin = begin(indexDir(index), Standard()) + dirOfs;
+		TDirIterator itDirEnd = end(indexDir(index), Standard());
+		TDirIterator itDir = itDirBegin;
+		TDirIterator itPrev = itDirEnd;
+
+		TCntIterator it = begin(index.tempOcc, Standard());
+		TCntIterator bit = begin(index.tempBound, Standard());
+		TCntIterator itEnd = end(index.tempOcc, Standard());
+
+		TValue occ;
+		if (index.sentinelOcc != 0)
+		{
+			if (index.sentinelOcc > 1 && index.interSentinelNodes)	// occurs on multiseqs
+			{ 
+				itPrev = itDir;
+				*itDir = index.sentinelBound - index.sentinelOcc;	++itDir;
+				*itDir = index.sentinelBound | index.UNEVALUATED;	++itDir;
+			} else
+				for (TDirSize d = index.sentinelBound - index.sentinelOcc; d != index.sentinelBound; ++d)
+				{
+					itPrev = itDir;
+					*itDir = d | index.LEAF;						++itDir;
+				}
+		}
+		for (; it != itEnd; ++it, ++bit)
+		{
+			if ((occ = *it) == 0) continue;
+			if (occ > 1) {
+				itPrev = itDir;
+				*itDir = *bit - occ; 				++itDir;
+				*itDir = *bit | index.UNEVALUATED;	++itDir;
+			} else {
+				itPrev = itDir;
+				*itDir = (*bit - occ) | index.LEAF;	++itDir;
+			}
+		}
+
+		// first child gets the mutual lcp value of the children (== parent repLength)
+		*itDirBegin = ((*itDirBegin) & ~index.BITMASK0) | lcp;
+
+		// mark the last child
+		if (itPrev != itDirEnd)
+			*itPrev |= index.LAST_CHILD;
+	}
+
+
+	template < typename TText, typename TSpec >
+	inline typename Size< Index<TText, IndexWotd<WotdOriginal> > >::Type 
+	_wotdEvaluate(Iter< Index<TText, IndexWotd<WotdOriginal> >, VSTree<TSpec> > const &it)
+	{
+		typedef Index<TText, IndexWotd<WotdOriginal> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+
+		TIndex &index = const_cast<TIndex&>(container(it));
+		TSize pos = value(it).node;
+		TSize w1 = dirAt(pos + 1, index);
+
+		// test for evaluation
+		if (w1 & index.UNEVALUATED)
+		{
+			TSize w0 = dirAt(pos, index);
+			TSize lp = saAt(w0 & index.BITMASK0, index);
+			TSize dst = length(indexDir(index));
+
+			TSize size = _sortWotdBucket(
+				index, 
+				w0 & index.BITMASK0, 
+				w1 & index.BITMASK1, 
+				parentEdgeLength(it));
+
+			resize(indexDir(index), dst + size, Generous());
+			_storeWotdChildren(index, dst);
+
+			// mark nodes with solely empty child edges
+			w1 = dst;
+			if (index.sentinelOcc > 1)
+				if (size == 2) w1 |= index.SENTINELS;
+
+			assert(!(index.sentinelOcc == 1 && size == 1));
+
+			dirAt(pos, index)     = (w0 & ~index.BITMASK0) | lp;
+			dirAt(pos + 1, index) = w1;
+		}
+
+		return w1;
+	}
+
+	template < typename TText, typename TIndexSpec, typename TSpec >
+	inline typename Size< Index<TText, IndexWotd<TIndexSpec> > >::Type 
+	_wotdEvaluate(Iter< Index<TText, IndexWotd<TIndexSpec> >, VSTree<TSpec> > const &it)
+	{
+		typedef Index<TText, IndexWotd<TIndexSpec> >	TIndex;
+		typedef typename Size<TIndex>::Type				TSize;
+
+		TIndex &index = const_cast<TIndex&>(container(it));
+		TSize pos = value(it).node;
+		TSize w1 = dirAt(pos + 1, index);
+
+		// test for evaluation
+		if (w1 & index.UNEVALUATED) 
+		{
+			TSize dst = length(indexDir(index));
+
+			TSize size = _sortWotdBucket(
+				index, 
+				value(it).range.i1, 
+				w1 & index.BITMASK1, 
+				repLength(it));
+
+/*			if (globalDumpFlag) 
+			{
+				::std::cerr << '"' << representative(it) << '"' << ::std::endl;
+				_dumpFreq(index);
+			}
+*/
+			resize(indexDir(index), dst + size, Generous());
+			_storeWotdChildren(index, dst, repLength(it));
+
+			// mark nodes with solely empty child edges
+			w1 = dst;
+			if (index.sentinelOcc > 1)
+				if (size == 2) w1 |= index.SENTINELS;
+
+			dirAt(pos + 1, index) = w1;
+		}
+
+		return w1;
+	}
+
+
+	template <typename TText, typename TSpec>
+	inline void
+	_dump(Index<TText, IndexWotd<TSpec> > &index)
+	{
+		typedef Index<TText, IndexWotd<TSpec> >			TIndex;
+		typedef typename Fibre<TIndex, WotdDir>::Type		TDir;
+		typedef typename Value<TDir>::Type					TDirValue;
+
+		::std::cout << "  Dir (wotd)" << ::std::endl;
+		for(unsigned i=0; i < length(indexDir(index)); ++i) {
+			TDirValue d = indexDir(index)[i];
+			::std::cout << i << ":  " << (d & index.BITMASK0);
+			if (d & index.LEAF)			::std::cout << "  (Leaf/Uneval)";
+			if (d & index.LAST_CHILD)	::std::cout << "  (LastChild/SENTINELS)";
+			::std::cout << ::std::endl;
+		}
+
+		::std::cout << ::std::endl << "  SA" << ::std::endl;
+		for(unsigned i=0; i < length(indexSA(index)); ++i)
+			::std::cout << i << ":  " << indexSA(index)[i] << "  " << suffix(indexText(index), indexSA(index)[i]) << ::std::endl;
+
+		::std::cout << ::std::endl;
+
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// _goDownChar
+
+	template < typename TText, class TSpec, typename TValue >
+	inline bool _goDownChar(
+		Iter<Index<TText, IndexWotd<WotdOriginal> >, VSTree< TopDown<TSpec> > > &it,
+		TValue c)
+	{
+		typedef Index<TText, IndexWotd<TSpec> >	TIndex;
+		typedef typename Value<TIndex>::Type		TIndexValue;
+
+		bool sorted = false;
+		if (!goDown(it)) return false;
+		do {
+			if (parentEdgeLength(it) != 0) {
+				TIndexValue edgeChar = parentEdgeLabel(it)[0];
+				if (edgeChar == c) return true;		// the edge is found
+				if (sorted && edgeChar > c) break;	// too far (except the first one,
+			}										// child edges are sorted)
+			sorted = true;
+		} while (goRight(it));
+		_goUp(it);
+		return false;
+	}
+
+	template < typename TText, class TIndexSpec, class TSpec, typename TValue >
+	inline bool _goDownChar(
+		Iter<Index<TText, IndexWotd<TIndexSpec> >, VSTree< TopDown<TSpec> > > &it,
+		TValue c)
+	{
+		typedef Index<TText, IndexWotd<TSpec> >	TIndex;
+		typedef typename Value<TIndex>::Type		TIndexValue;
+
+		if (!goDown(it)) return false;
+		do {
+			if (parentEdgeLength(it) != 0) {
+				TIndexValue edgeChar = parentEdgeLabel(it)[0];
+				if (edgeChar == c) return true;	// the edge is found
+				if (edgeChar > c) break;		// too far (child edges are sorted)
+			}
+		} while (goRight(it));
+		_goUp(it);
+		return false;
+	}
+
+/*
+	template < typename TText, typename TSpec, typename TValue >
+	inline bool
+	_getNodeByChar(
+		Iter< Index<TText, IndexWotd<TSpec> >, VSTree<TSpec> > const &it,
+		TValue c, 
+		typename VertexDescriptor< Index<TText, IndexWotd<TSpec> > >::Type &childDesc)
+	{
+		typedef Index<TText, IndexWotd<TSpec> >			TIndex;
+		typedef typename Fibre<TIndex, WotdDir>::Type		TDir;
+		typedef typename Fibre<TIndex, WotdSA>::Type		TSA;
+
+		typedef typename Value<TSA>::Type					TSAValue;
+		typedef typename Value<TDir>::Type					TDirValue;
+
+		typename Size<TIndex>::Type len = length(index);
+		typename VertexDescriptor<TIndex>::Type	desc;
+
+		TSAValue pos = _firstSuffixOfBucket(index, value(it).node);
+		while (pos == len || value < (c = textAt(index, pos + value.i2))) {
+			value.node += (dirAt(value.node, index) & index.LEAF)? 1: 2;
+			pos = _firstSuffixOfBucket(index, value.node);
+		}
+		assert(pos != len);
+
+		return c == value;
+	}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// interface for automatic index creation 
+
+	template <typename TText, typename TSpec>
+	inline void _wotdCreateFirstLevel(Index<TText, IndexWotd<TSpec> > &index)
+	{
+		typedef Index<TText, IndexWotd<TSpec> >	TIndex;
+		typedef typename Value<TIndex>::Type		TValue;
+		typedef typename Size<TIndex>::Type			TSize;
+
+		resize(index.tempOcc, ValueSize<TValue>::VALUE + 1);
+		resize(index.tempBound, ValueSize<TValue>::VALUE + 1);
+
+		TSize size;
+		if (empty(indexSA(index)))
+		{
+			resize(indexSA(index), length(indexRawText(index)));
+			size = _sortFirstWotdBucket(index);
+		} else
+		{
+			size = _sortWotdBucket(index, 0, length(indexSA(index)), 0);
+		}
+		
+		if (size > 0) 
+		{
+			resize(indexDir(index), size + 2, Generous());
+			_storeWotdChildren(index, 2, 0);
+
+			// mark nodes with solely empty child edges
+			TSize w1 = 2;
+			if (index.sentinelOcc > 1)
+				if (size == 2) w1 |= index.SENTINELS;
+
+			dirAt(0, index) = 0 | index.LAST_CHILD;
+			dirAt(1, index) = w1;
+
+		} else {
+			resize(indexDir(index), 1);
+			dirAt(0, index) = 0 | index.LAST_CHILD | index.LEAF;
+		}
+	}
+
+	template <typename TText, typename TSpec>
+	inline bool indexCreate(Index<TText, IndexWotd<TSpec> > &index, WotdDir const, Default const)
+	{
+		_wotdCreateFirstLevel(index);
+		return true;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// clear
+
+	template < typename TText, typename TSpec >
+	inline void clear(Index<TText, IndexWotd<TSpec> > &index)
+	{
+		clear(getFibre(index, WotdSA()));
+		clear(getFibre(index, WotdDir()));
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// open
+
+	template < typename TText, typename TSpec >
+	inline bool open(
+		Index< TText, IndexWotd<TSpec> > &index, 
+		const char *fileName,
+		int openMode)
+	{
+		String<char> name;
+		name = fileName;	append(name, ".txt");
+		bool result = true;
+		if ((!open(getFibre(index, WotdText()), toCString(name), openMode)) && 
+			(!open(getFibre(index, WotdText()), fileName, openMode)))
+			result = false;
+		name = fileName;	append(name, ".sa");	open(getFibre(index, WotdSA()), toCString(name), openMode);
+		name = fileName;	append(name, ".dir");	open(getFibre(index, WotdDir()), toCString(name), openMode);
+		return result;
+	}
+	template < typename TText, typename TSpec >
+	inline bool open(
+		Index< TText, IndexWotd<TSpec> > &index, 
+		const char *fileName) 
+	{
+		return open(index, fileName, OPEN_RDONLY);
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// save
+
+	template < typename TText, typename TSpec >
+	inline bool save(
+		Index< TText, IndexWotd<TSpec> > &index, 
+		const char *fileName,
+		int openMode)
+	{
+		String<char> name;
+		name = fileName;	append(name, ".txt");
+		if ((!save(getFibre(index, WotdText()), toCString(name), openMode)) && 
+			(!save(getFibre(index, WotdText()), fileName, openMode))) return false;
+
+		name = fileName;	append(name, ".sa");	save(getFibre(index, WotdSA()), toCString(name), openMode);
+		name = fileName;	append(name, ".dir");	save(getFibre(index, WotdDir()), toCString(name), openMode);
+		return true;
+	}
+	template < typename TText, typename TSpec >
+	inline bool save(
+		Index< TText, IndexWotd<TSpec> > &index, 
+		const char *fileName)
+	{
+		return save(index, fileName, OPEN_WRONLY | OPEN_CREATE);
+	}
+}
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/index/pipe_merger3.h b/src/SeqAn-1.3/seqan/index/pipe_merger3.h
new file mode 100644
index 0000000..b2b1e0e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/pipe_merger3.h
@@ -0,0 +1,167 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_MERGER3_H
+#define SEQAN_HEADER_INDEX_MERGER3_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	struct Merger3;
+
+    template < typename TInput0, typename TInput12 >
+    struct Value< Pipe< Bundle2< TInput0, TInput12 >, Merger3 > > {
+        typedef typename Size<TInput0>::Type Type;
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // merger3 class
+    template < typename TInput0, typename TInput12 >
+    struct Pipe< Bundle2< TInput0, TInput12 >, Merger3 >
+    {
+        typedef typename Value<TInput0>::Type   InType0;
+        typedef typename Value<TInput12>::Type  InType12;
+        typedef typename Size<Pipe>::Type       SizeType;
+
+        Bundle2 <
+            TInput0,
+            TInput12 >  in;
+        SizeType        N, tmp;
+        int             minStream;
+        bool            twoStreams;
+
+        Pipe(Bundle2< TInput0, TInput12 > _in):
+            in(_in) {}
+        
+        static inline bool less1(const InType0& i0, const InType12& i12)
+        { // lexic. order for pairs
+            return (i0.i3[0] <  i12.i3[0] ||
+                    (i0.i3[0] == i12.i3[0] && i0.i2[0] < i12.i2[1]));
+        }
+
+        static inline bool less2(const InType0& i0, const InType12& i12)
+        { // and triples
+            if (i0.i3[0] < i12.i3[0]) return true;
+            if (i0.i3[0] > i12.i3[0]) return false;
+            if (i0.i3[1] < i12.i3[1]) return true;
+            if (i0.i3[1] > i12.i3[1]) return false;
+            if (i0.i2[1] < i12.i2[1]) return true;
+            return false; // is also false if the names are equal (cross-border compare)
+        }
+
+        inline void getMin() {
+            if (twoStreams)
+                if ((*in.in2).i1 % 3 == 2 ? less1(*in.in1, *in.in2): less2(*in.in1, *in.in2)) {
+                    minStream = 0;
+                    tmp = N - (*in.in1).i1;
+                } else {
+                    minStream = 1;
+                    tmp = N - (*in.in2).i1;
+                }
+            else
+                if (minStream >= 0)
+                    tmp = minStream? N - (*in.in2).i1: N - (*in.in1).i1;
+        }
+
+        inline typename Value<Pipe>::Type const & operator*() const {
+            return tmp;
+        }
+        
+        inline Pipe& operator++() {
+            if (minStream) {
+                #ifdef SEQAN_TEST_SKEW3
+                    InType12 a = *in.in2;
+                #endif
+                ++in.in2;
+                if (eof(in.in2)) {
+                    minStream = (twoStreams)? 0: -1;
+                    twoStreams = false;
+                }
+                #ifdef SEQAN_TEST_SKEW3
+                    else {
+                        InType12 b = *in.in2;
+                        SEQAN_ASSERT((a.i3[0] < b.i3[0]) || (a.i3[0] == b.i3[0] && a.i3[1] <= b.i3[1]));
+                        SEQAN_ASSERT(a.i2[0] < b.i2[0]);
+                    }
+                #endif
+            } else {
+                #ifdef SEQAN_TEST_SKEW3
+                    InType0 a = *in.in1;
+                #endif
+                ++in.in1;
+                if (eof(in.in1)) {
+                    minStream = (twoStreams)? 1: -1;
+                    twoStreams = false;
+                }
+                #ifdef SEQAN_TEST_SKEW3
+                    else {
+                        InType0 b = *in.in1;
+                        SEQAN_ASSERT((a.i3[0] < b.i3[0]) || (a.i3[0] == b.i3[0] && a.i3[1] <= b.i3[1]));
+                        SEQAN_ASSERT((a.i3[0] < b.i3[0]) || (a.i3[0] == b.i3[0] && a.i2[0] < b.i2[0]));
+                    }
+                #endif
+            }
+            getMin();
+            return *this;
+        }
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+    template < typename TInput >
+	inline bool control(Pipe< TInput, Merger3 > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+        me.twoStreams = !eof(me.in.in1);
+        me.minStream = eof(me.in.in2)? -1: 1;
+        me.N = length(me);
+        me.getMin();
+		return true;
+	}
+    
+    template < typename TInput >
+    inline typename Size< Pipe< TInput, Merger3 > >::Type
+    length(Pipe< TInput, Merger3 > const &me) {
+        return length(me.in.in1) + length(me.in.in2);
+    }
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/pipe_merger7.h b/src/SeqAn-1.3/seqan/index/pipe_merger7.h
new file mode 100644
index 0000000..6ab8d4d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/pipe_merger7.h
@@ -0,0 +1,520 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_MERGER7_H
+#define SEQAN_HEADER_INDEX_MERGER7_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	template <int I, typename T = void>
+	struct SkewShift_;
+
+	template <int I, typename T = void>
+	struct SkewNIndex_;
+
+
+	template <typename T>
+	struct SkewShift_<7, T> {
+		static const unsigned VALUE[7][7];
+	};
+
+	template <typename T>
+	struct SkewNIndex_<7, T> {
+		static const unsigned VALUE[7][7];
+	};
+
+
+	template <typename T>
+	const unsigned SkewShift_<7, T>::VALUE[7][7] =
+								  {{0,6,5,6,3,3,5},
+                                   {6,0,0,6,0,4,4},
+                                   {5,0,0,1,0,1,5},
+                                   {6,6,1,0,2,1,2},
+                                   {3,0,0,2,0,3,2},
+                                   {3,4,1,1,3,0,4},
+                                   {5,4,5,2,2,4,0}};
+
+
+	template <typename T>
+	const unsigned SkewNIndex_<7, T>::VALUE[7][7] =
+								  {{0,0,0,0,0,1,2},
+                                   {0,0,0,0,1,1,2},
+                                   {0,1,1,1,1,2,2},
+                                   {0,0,1,1,1,1,2},
+                                   {0,0,1,2,2,2,2},
+                                   {0,0,0,1,2,2,2},
+                                   {0,0,0,0,1,2,2}};
+
+
+    template <typename TValue>
+    struct SkewDCStream {
+        TValue      i;
+        unsigned    stream;
+    };
+    
+    template <typename TValue>
+	std::ostream& operator<<(std::ostream &out, const SkewDCStream<TValue> &s) {
+		out << "< " << s.i.i1 << " , [ ";
+		for(unsigned i = 0; i < 3; ++i)
+			out << s.i.i2[i] << " ";
+		out << "] , [ ";
+		for(unsigned i = 0; i < 6; ++i)
+			out << s.i.i3[i] << " ";
+		out << "] , " << s.stream << " >";
+		return out;
+	}
+
+
+	// greater-operator for two SkewDCStreams
+    template <typename TValue>
+    struct CompareSkewDCStream :
+        public ::std::binary_function < SkewDCStream<TValue>,
+                                      SkewDCStream<TValue>,
+                                      bool >
+    {
+        inline bool operator()(const SkewDCStream<TValue> &a,
+			                   const SkewDCStream<TValue> &b) const 
+        {
+            typedef typename TValue::T2::T SizeType;
+            int shft = SkewShift_<7>::VALUE[a.stream][b.stream];
+            for(int i = 0; i < shft; ++i) {
+                if (a.i.i3[i] < b.i.i3[i]) return false;
+                if (a.i.i3[i] > b.i.i3[i]) return true;
+            }
+            SizeType na = a.i.i2[SkewNIndex_<7>::VALUE[a.stream][shft]];
+            SizeType nb = b.i.i2[SkewNIndex_<7>::VALUE[b.stream][shft]];
+            if (na < nb) return false;
+            if (na > nb) return true;
+
+			// we get here, only if a septet crosses the border of
+			// the single text or a sequence in a multiple sequence text
+			return a.stream - 1 > b.stream - 1; // this is NOT the same as a.stream > b.stream, 0 should be bigger than 6
+        }
+    };
+
+
+	// greater-operator for two SkewDCStreams (optimized for bit-compressed character tuples)
+    template <typename T1, typename T2, typename T, unsigned _size>
+    struct CompareSkewDCStream< Triple<T1,T2,Tuple<T,_size,Compressed>, Compressed> > :
+        public ::std::binary_function < SkewDCStream<Triple<T1,T2,Tuple<T,_size,Compressed>,Compressed> >,
+                                      SkewDCStream<Triple<T1,T2,Tuple<T,_size,Compressed>,Compressed> >,
+                                      bool >
+    {
+        typedef Tuple<T,_size,Compressed> T3;
+        inline bool operator()(const SkewDCStream<Triple<T1,T2,T3,Compressed> > &a,
+			                   const SkewDCStream<Triple<T1,T2,T3,Compressed> > &b) const 
+        {
+            typedef typename T2::T SizeType;
+            int shft = SkewShift_<7>::VALUE[a.stream][b.stream];
+            typename T3::CT mask = ~((1 << ((_size - shft) * T3::bitSize)) - 1);
+
+            if ((a.i.i3.i & mask) < (b.i.i3.i & mask)) return false;
+            if ((a.i.i3.i & mask) > (b.i.i3.i & mask)) return true;
+            SizeType na = a.i.i2[SkewNIndex_<7>::VALUE[a.stream][shft]];
+            SizeType nb = b.i.i2[SkewNIndex_<7>::VALUE[b.stream][shft]];
+            if (na < nb) return false;
+            if (na > nb) return true;
+
+			// we get here, only if a septet crosses the border of
+			// the single text or a sequence in a multiple sequence text
+			return a.stream - 1 > b.stream - 1; // this is NOT the same as a.stream > b.stream, 0 should be bigger than 6
+		}
+    };
+
+
+
+
+	struct Merger7;
+
+    template < typename TInput0, typename TInput3, typename TInput5, typename TInput6, typename TInput124 >
+    struct Value< Pipe< Bundle5< TInput0, TInput3, TInput5, TInput6, TInput124 >, Merger7 > > {
+		typedef typename Value<TInput0>::Type::T1 Type;
+    };
+
+
+	template <typename TLimitsString>
+	struct Merger7Multi;
+
+    template < typename TInput0, typename TInput3, typename TInput5, typename TInput6, typename TInput124, typename TLimitsString >
+    struct Value< Pipe< Bundle5< TInput0, TInput3, TInput5, TInput6, TInput124 >, Merger7Multi<TLimitsString> > > {
+		typedef typename Value<TInput0>::Type::T1 Type;
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // merger7 class
+    template < typename TInput0, typename TInput3, typename TInput5, typename TInput6, typename TInput124 >
+    struct Pipe< Bundle5< TInput0, TInput3, TInput5, TInput6, TInput124 >, Merger7 >
+    {
+        typedef typename Value<TInput0>::Type       InType0;
+        typedef typename Value<TInput3>::Type       InType3;
+        typedef typename Value<TInput5>::Type       InType5;
+        typedef typename Value<TInput6>::Type       InType6;
+        typedef typename Value<TInput124>::Type     InType124;
+        typedef typename Size<Pipe>::Type           SizeType;
+
+        typedef typename InType0::T3::T             Type;
+                
+        typedef SkewDCStream<InType0>               TSkewDCStream;
+
+		TSkewDCStream								inValue[7];
+		unsigned									rank[5];
+		unsigned									first;
+        CompareSkewDCStream<InType0>				streamGreater;
+
+        Bundle5 <
+            TInput0,
+            TInput3,
+            TInput5,
+            TInput6,
+            TInput124 > in;
+        SizeType        N;
+        
+        Pipe(Bundle5< TInput0, TInput3, TInput5, TInput6, TInput124 > _in):
+            in(_in) {}
+
+        template <typename T1, typename T2, typename T3>
+        inline static void _copy(TSkewDCStream &dst, Triple<T1,T2,T3,Compressed> const &src) {
+            memcpy(&dst.i.i2, &src.i2, sizeof(T2));
+            memcpy(&dst.i.i3, &src.i3, sizeof(T3));
+        }
+
+        template <typename T1, typename T2, typename T, unsigned _size>
+        inline static void _copy(TSkewDCStream &dst, Triple<T1,T2,Tuple<T,_size,Compressed>,Compressed> const &src) 
+		{
+			typedef typename InType0::T3 CharTuple;
+            memcpy(&dst.i.i2, &src.i2, sizeof(T2));
+            dst.i.i3 = src.i3;
+            dst.i.i3 <<= CharTuple::size - _size;
+        }
+
+        inline typename Value<Pipe>::Type const operator*() {
+            return getValueI1(inValue[rank[first]].i);
+        }
+
+		inline void insertStream(unsigned stream) {
+            switch (stream) {
+                case 0:
+					if (eof(in.in1)) {
+						++first;
+						return;
+					}
+					inValue[0].i.i1 = N - (*in.in1).i1;
+					_copy(inValue[0], *in.in1);
+					++in.in1;
+                    break;
+
+                case 3:
+					if (eof(in.in2)) {
+						++first;
+						return;
+					}
+					inValue[3].i.i1 = N - (*in.in2).i1;
+					_copy(inValue[3], *in.in2);
+					++in.in2;
+                    break;
+
+                case 5:
+					if (eof(in.in3)) {
+						++first;
+						return;
+					}
+					inValue[5].i.i1 = N - (*in.in3).i1;
+					_copy(inValue[5], *in.in3);
+					++in.in3;
+                    break;
+
+                case 6:
+					if (eof(in.in4)) {
+						++first;
+						return;
+					}
+					inValue[6].i.i1 = N - (*in.in4).i1;
+					_copy(inValue[6], *in.in4);
+					++in.in4;
+					break;
+
+				default:	// case 1, 2, or 4
+					if (eof(in.in5)) {
+						++first;
+						return;
+					}
+					// calculate residue class from the suffix length
+					inValue[1].stream = (*in.in5).i1 % 7;
+					inValue[1].i.i1 = N - (*in.in5).i1;
+					_copy(inValue[1], *in.in5);
+					++in.in5;
+            }
+
+			// linear search
+			int right;
+			for(right = first + 1;  right < 5;  ++right)
+				if (!streamGreater(inValue[stream],inValue[rank[right]])) break;
+
+			// remove the least suffix ...
+			for(int i = first + 1;  i < right;  ++i)
+				rank[i-1] = rank[i];
+
+			// ... and insert the new one
+			rank[right-1] = stream;
+		}
+        
+        Pipe& operator++() {
+			insertStream(rank[first]);
+            return *this;
+        }
+
+        void fill() {
+			inValue[0].stream = 0;
+			inValue[3].stream = 3;
+			inValue[5].stream = 5;
+			inValue[6].stream = 6;
+
+			first = 4;	insertStream(0);
+			--first;    insertStream(3);
+			--first;    insertStream(5);
+			--first;    insertStream(6);
+			--first;	insertStream(1);
+        }
+	};
+    
+
+    //////////////////////////////////////////////////////////////////////////////
+    // merger7 class for multiple sequences
+    template < typename TInput0, typename TInput3, typename TInput5, typename TInput6, typename TInput124, typename TLimitsString >
+    struct Pipe< Bundle5< TInput0, TInput3, TInput5, TInput6, TInput124 >, Merger7Multi<TLimitsString> >
+    {
+        typedef typename Value<TInput0>::Type       InType0;
+        typedef typename Value<TInput3>::Type       InType3;
+        typedef typename Value<TInput5>::Type       InType5;
+        typedef typename Value<TInput6>::Type       InType6;
+        typedef typename Value<TInput124>::Type     InType124;
+        typedef typename Size<Pipe>::Type           SizeType;
+
+        typedef typename InType0::T3::T             Type;
+        
+        typedef SkewDCStream<InType0>               TSkewDCStream;
+
+		TSkewDCStream								inValue[7];
+		unsigned									rank[5];
+		unsigned									first;
+        CompareSkewDCStream<InType0>				streamGreater;
+
+        Bundle5 <
+            TInput0,
+            TInput3,
+            TInput5,
+            TInput6,
+            TInput124 >		in;
+		TLimitsString const &limits;
+        
+        Pipe(Bundle5< TInput0, TInput3, TInput5, TInput6, TInput124 > _in, TLimitsString const &_limits):
+            in(_in),
+			limits(_limits) {}
+
+        template <typename T1, typename T2, typename T3>
+        inline static void _copy(TSkewDCStream &dst, Triple<T1,T2,T3,Compressed> const &src) {
+            memcpy(&dst.i.i1, &src.i1, sizeof(T1));
+            memcpy(&dst.i.i2, &src.i2, sizeof(T2));
+            memcpy(&dst.i.i3, &src.i3, sizeof(T3));
+        }
+
+        template <typename T1, typename T2, typename T, unsigned _size>
+        inline static void _copy(TSkewDCStream &dst, Triple<T1,T2,Tuple<T,_size,Compressed>,Compressed> const &src) 
+		{
+			typedef typename InType0::T3 CharTuple;
+            memcpy(&dst.i.i1, &src.i1, sizeof(T1));
+            memcpy(&dst.i.i2, &src.i2, sizeof(T2));
+            dst.i.i3 = src.i3;
+            dst.i.i3 <<= CharTuple::size - _size;
+        }
+
+        inline typename Value<Pipe>::Type const operator*() {
+            return getValueI1(inValue[rank[first]].i);
+        }
+
+		inline void insertStream(unsigned stream) {
+            switch (stream) {
+                case 0:
+					if (eof(in.in1)) {
+						++first;
+						return;
+					}
+					_copy(inValue[0], *in.in1);
+					++in.in1;
+                    break;
+
+                case 3:
+					if (eof(in.in2)) {
+						++first;
+						return;
+					}
+					_copy(inValue[3], *in.in2);
+					++in.in2;
+                    break;
+
+                case 5:
+					if (eof(in.in3)) {
+						++first;
+						return;
+					}
+					_copy(inValue[5], *in.in3);
+					++in.in3;
+                    break;
+
+                case 6:
+					if (eof(in.in4)) {
+						++first;
+						return;
+					}
+					_copy(inValue[6], *in.in4);
+					++in.in4;
+					break;
+
+				default:	// case 1, 2, or 4
+					if (eof(in.in5)) {
+						++first;
+						return;
+					}
+					// calculate residue class from the suffix length
+					typename Value<InType124,1>::Type in_in5_i1 = getValueI1(*in.in5);
+					unsigned seqNo = getValueI1(in_in5_i1);
+					inValue[1].stream = ((limits[seqNo + 1] - limits[seqNo]) - getValueI2(in_in5_i1)) % 7;
+
+					_copy(inValue[1], *in.in5);
+					++in.in5;
+            }
+
+			// linear search
+			int right;
+			for(right = first + 1;  right < 5;  ++right)
+				if (!streamGreater(inValue[stream],inValue[rank[right]])) break;
+
+			// remove the least suffix ...
+			for(int i = first + 1;  i < right;  ++i)
+				rank[i-1] = rank[i];
+
+			// ... and insert the new one
+			rank[right-1] = stream;
+		}
+        
+        Pipe& operator++() {
+			insertStream(rank[first]);
+            return *this;
+        }
+
+        void fill() {
+			inValue[0].stream = 0;
+			inValue[3].stream = 3;
+			inValue[5].stream = 5;
+			inValue[6].stream = 6;
+
+			first = 4;	insertStream(0);
+			--first;    insertStream(3);
+			--first;    insertStream(5);
+			--first;    insertStream(6);
+			--first;	insertStream(1);
+        }
+	};
+    
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+    template < typename TInput >
+	inline bool control(Pipe< TInput, Merger7 > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+        me.N = length(me);
+        me.fill();
+		return true;
+	}
+    
+    template < typename TInput >
+	inline bool control(Pipe< TInput, Merger7 > &me, ControlEof const &) {
+		return me.first == 5;
+    }
+
+    template < typename TInput >
+	inline bool control(Pipe< TInput, Merger7 > &me, ControlEos const &) {
+		return control(me, ControlEof());
+    }
+
+    template < typename TInput >
+    inline typename Size< Pipe< TInput, Merger7 > >::Type
+    length(Pipe< TInput, Merger7 > const &me) {
+        return length(me.in.in1) +
+               length(me.in.in2) + 
+               length(me.in.in3) +
+               length(me.in.in4) +
+               length(me.in.in5);
+    }
+
+
+
+
+    template < typename TInput, typename TLimitsString >
+	inline bool control(Pipe< TInput, Merger7Multi<TLimitsString> > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+        me.fill();
+		return true;
+	}
+    
+    template < typename TInput, typename TLimitsString >
+	inline bool control(Pipe< TInput, Merger7Multi<TLimitsString> > &me, ControlEof const &) {
+		return me.first == 5;
+    }
+
+    template < typename TInput, typename TLimitsString >
+	inline bool control(Pipe< TInput, Merger7Multi<TLimitsString> > &me, ControlEos const &) {
+		return control(me, ControlEof());
+    }
+
+    template < typename TInput, typename TLimitsString >
+    inline typename Size< Pipe< TInput, Merger7Multi<TLimitsString> > >::Type
+    length(Pipe< TInput, Merger7Multi<TLimitsString> > const &me) {
+        return length(me.in.in1) +
+               length(me.in.in2) + 
+               length(me.in.in3) +
+               length(me.in.in4) +
+               length(me.in.in5);
+    }
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/pizzachili_api.h b/src/SeqAn-1.3/seqan/index/pizzachili_api.h
new file mode 100755
index 0000000..7d331a2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/pizzachili_api.h
@@ -0,0 +1,182 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Konrad Ludwig Moritz Rudolph <konrad.rudolph at fu-berlin.de>
+// ==========================================================================
+
+//SEQAN_xNO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_PIZZACHILI_API_H
+#define SEQAN_HEADER_PIZZACHILI_API_H
+
+#include <seqan/basic.h>
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+namespace impl {
+    typedef unsigned char uchar_t;
+    typedef unsigned long ulong_t;
+    typedef void* index_t;
+    typedef int error_t;
+} // namespace impl
+
+struct InvalidPizzaChiliSpec;
+
+template <typename TSpec>
+struct PizzaChiliCodeProvider {
+    typedef InvalidPizzaChiliSpec Type;
+};
+
+/**
+.Tag.Pizza & Chili Index Tags
+..summary:Tag specifying the Pizza & Chili library to use.
+..remarks:More information for all the index libraries can be found in the
+ at http://pizzachili.dcc.uchile.cl|original documentation@ (or the
+ at http://pizzachili.di.unipi.it|Italian mirror@).
+..cat:Index
+..tag.PizzaChiliAF:The alphabet-friendly FM index.
+..tag.PizzaChiliCcsa:The compressed compact suffix array index.
+..tag.PizzaChiliFM: The FM (full-text in minute space) index.
+..tag.PizzaChiili_RSA:The repair suffix array index.
+...remarks:The index cannot be saved and loaded.
+..tag.PizzaChiliSA: The simple suffix array index.
+...remarks:The index cannot be saved and loaded.
+..tag.PizzaChiliSada: the compressed suffix array index.
+...remarks:The index cannot be saved and loaded.
+..see:Spec.Pizza & Chili Index
+..see:Spec.Pizza & Chili String
+..include:seqan/index.h
+*/
+
+// We need to declare these explicitly instead through macro expansion in order
+// for them to be included in the forward generated declarations.
+
+struct PizzaChiliAF_;
+typedef Tag<PizzaChiliAF_> const PizzaChiliAF;
+
+struct PizzaChiliCcsa_;
+typedef Tag<PizzaChiliCcsa_> const PizzaChiliCcsa;
+
+struct PizzaChiliFM_;
+typedef Tag<PizzaChiliFM_> const PizzaChiliFM;
+
+struct PizzaChiliLZ_;
+typedef Tag<PizzaChiliLZ_> const PizzaChiliLZ;
+
+struct PizzaChiliRsa_;
+typedef Tag<PizzaChiliRsa_> const PizzaChiliRsa;
+
+struct PizzaChiliRlfm_;
+typedef Tag<PizzaChiliRlfm_> const PizzaChiliRlfm;
+
+struct PizzaChiliSA_;
+typedef Tag<PizzaChiliSA_> const PizzaChiliSA;
+
+struct PizzaChiliSada_;
+typedef Tag<PizzaChiliSada_> const PizzaChiliSada;
+
+struct PizzaChiliSsa_;
+typedef Tag<PizzaChiliSsa_> const PizzaChiliSsa;
+
+struct PizzaChiliTest_;
+typedef Tag<PizzaChiliTest_> const PizzaChiliTest;
+
+#define SEQAN_MAKE_PIZZACHILI_PROVIDER(name) \
+    class PizzaChiliApi##name { \
+    public: \
+        static char* error_index(impl::error_t e); \
+        static int build_index( \
+            impl::uchar_t* text, \
+            impl::ulong_t length, \
+            char* build_options, \
+            impl::index_t* index \
+            ); \
+        static int save_index(impl::index_t index, char* filename); \
+        static int load_index(char* filename, impl::index_t* index); \
+        static int free_index(impl::index_t index); \
+        static int index_size(impl::index_t index, impl::ulong_t* size); \
+        static int count( \
+            impl::index_t index, \
+            impl::uchar_t* pattern, \
+            impl::ulong_t length, \
+            impl::ulong_t* numocc \
+        ); \
+        static int locate( \
+            impl::index_t index, \
+            impl::uchar_t* pattern, \
+            impl::ulong_t length, \
+            impl::ulong_t** occ, \
+            impl::ulong_t* numocc \
+        ); \
+        static int get_length(impl::index_t index, impl::ulong_t* length); \
+        static int extract( \
+            impl::index_t index, \
+            impl::ulong_t from, \
+            impl::ulong_t to, \
+            impl::uchar_t** snippet, \
+            impl::ulong_t* snippet_length \
+        ); \
+        static int display( \
+            impl::index_t index, \
+            impl::uchar_t* pattern, \
+            impl::ulong_t length, \
+            impl::ulong_t numc,  \
+            impl::ulong_t* numocc, \
+            impl::uchar_t** snippet_text, \
+            impl::ulong_t** snippet_length \
+        ); \
+        static int init_ds_ssort(int adist, int bs_ratio); \
+    }; \
+    \
+    /*struct PizzaChili##name_; \
+    typedef Tag<PizzaChili##name_> const PizzaChili##name;*/ \
+    \
+    template <> \
+    struct PizzaChiliCodeProvider<PizzaChili##name> { \
+        typedef PizzaChiliApi##name Type; \
+    };
+
+SEQAN_MAKE_PIZZACHILI_PROVIDER(AF)
+SEQAN_MAKE_PIZZACHILI_PROVIDER(Ccsa)
+SEQAN_MAKE_PIZZACHILI_PROVIDER(FM)
+SEQAN_MAKE_PIZZACHILI_PROVIDER(LZ)
+SEQAN_MAKE_PIZZACHILI_PROVIDER(Rsa)
+SEQAN_MAKE_PIZZACHILI_PROVIDER(Rlfm)
+SEQAN_MAKE_PIZZACHILI_PROVIDER(SA)
+SEQAN_MAKE_PIZZACHILI_PROVIDER(Sada)
+SEQAN_MAKE_PIZZACHILI_PROVIDER(Ssa)
+SEQAN_MAKE_PIZZACHILI_PROVIDER(Test)
+
+#undef SEQAN_MAKE_PIZZACHILI_PROVIDER
+
+} // namespace SEQAN_NAMESPACE_MAIN
+
+#endif // SEQAN_HEADER_PIZZACHILI_API_H
diff --git a/src/SeqAn-1.3/seqan/index/pump_extender3.h b/src/SeqAn-1.3/seqan/index/pump_extender3.h
new file mode 100644
index 0000000..61c5481
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/pump_extender3.h
@@ -0,0 +1,136 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PUMP_EXTENDER3_H
+#define SEQAN_HEADER_PUMP_EXTENDER3_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+    struct Extender3;
+
+    template < typename TTextInput, typename TNameInput >
+    struct Pipe< Bundle2< TTextInput, TNameInput >, Extender3 >
+    {
+		enum { maxShift = 2 };
+		typedef typename Size<Pipe>::Type           SizeType;
+        typedef typename Value<TTextInput>::Type    TextInType;
+        typedef typename Value<TNameInput>::Type    NameInType;
+
+        typedef Tuple<TextInType, maxShift> XTuple;
+        typedef Tuple<typename NameInType::T2, maxShift> NTuple;
+        typedef Triple<SizeType, NTuple, XTuple, Compressed> OutType0;
+        typedef Triple<SizeType, NTuple, XTuple, Compressed> OutType12;
+
+        // pipeline interfaces to ease specialization
+        typedef Pipe< void, AbstractSource< OutType0, SizeType > > Out0;
+        typedef Pipe< void, AbstractSource< OutType12, SizeType > > Out12;
+        //Out0 out0;
+        //Out12 out12;
+    };
+        
+    template < typename TTextInput, typename TNameInput, typename TOut0, typename TOut12 >
+    static bool _skew3Extend(TTextInput &textIn, TNameInput &nameIn, TOut0 &out0, TOut12 &out12)
+    {
+        resize(out0, length(textIn) / 3);
+        resize(out12, length(nameIn));
+        if (!(
+            beginRead(textIn) && 
+            beginRead(nameIn) &&
+            beginWrite(out0) && 
+            beginWrite(out12))) return false;
+		
+		typename Value<TOut0>::Type  o0 = typename Value<TOut0>::Type();
+		typename Value<TOut12>::Type o1 = typename Value<TOut12>::Type();
+		typename Value<TOut12>::Type o2 = typename Value<TOut12>::Type();
+
+        unsigned r = (unsigned)(length(textIn) % 3);
+        bool filled = (r != 0);
+        if (r == 2) {
+            o2.i1 = (*nameIn).i1;
+            o2.i2[0] = (*nameIn).i2; ++nameIn;
+            o2.i3[0] = *textIn; ++textIn;
+        }
+            
+        if (r >= 1) {
+            o1.i1 = (*nameIn).i1;
+            o1.i2[0] = (*nameIn).i2; ++nameIn;
+            o1.i3[0] = *textIn; ++textIn;
+        }
+        
+        if (r == 2) {
+            o2.i2[1] = o1.i2[0];
+            o2.i3[1] = o1.i3[0];
+            push(out12, o2);
+        }
+        
+        while (!eof(nameIn)) {
+            o1.i3[1] = o0.i3[0] = *textIn; ++textIn;
+            o2.i3[0] = o0.i3[1] = *textIn; ++textIn;
+            
+            o2.i1 = (*nameIn).i1;
+            o0.i2[0] = o2.i2[0] = o1.i2[1] = (*nameIn).i2; ++nameIn;
+            o2.i3[1] = *textIn; ++textIn;
+            if (filled)
+                push(out12, o1);
+            else
+                filled = true;
+            
+            o1.i1 = (*nameIn).i1;
+            o0.i2[1] = o2.i2[1] = o1.i2[0] = (*nameIn).i2; ++nameIn;
+            o1.i3[0] = o2.i3[1];
+            push(out12, o2);
+            o0.i1 = o2.i1 + 1;
+            push(out0, o0);
+        }
+
+        o1.i2[1] = 0;
+        o1.i3[1] = 0;
+        if (filled) push(out12, o1);
+
+        endWrite(out12);
+        endWrite(out0);
+        endRead(nameIn);
+        endRead(textIn);
+        return true;
+    }
+    
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/pump_extender7.h b/src/SeqAn-1.3/seqan/index/pump_extender7.h
new file mode 100644
index 0000000..bb7bda4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/pump_extender7.h
@@ -0,0 +1,514 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PUMP_EXTENDER7_H
+#define SEQAN_HEADER_PUMP_EXTENDER7_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+//////////////////////////////////////////////////////////////////////////////
+
+    template <typename TCompression = void>
+    struct Extender7;
+
+	template <typename TTextInput, typename TNameInput, typename TCompression >
+    struct Pipe< Bundle2< TTextInput, TNameInput >, Extender7<TCompression> >
+    {
+        typedef typename Size<Pipe>::Type           SizeType;
+        typedef typename Value<TTextInput>::Type    TextInType;
+        typedef typename Value<TNameInput>::Type    NameInType;
+
+        typedef Tuple<TextInType, 4, TCompression>  X4Tuple;
+        typedef Tuple<TextInType, 5, TCompression>  X5Tuple;
+        typedef Tuple<TextInType, 6, TCompression>  X6Tuple;
+        typedef Tuple<typename NameInType::T2, 3>   NTuple;
+        typedef Triple<SizeType, NTuple, X6Tuple, Compressed>   OutType0;
+        typedef Triple<SizeType, NTuple, X6Tuple, Compressed>   OutType3;
+        typedef Triple<SizeType, NTuple, X4Tuple, Compressed>   OutType5;
+        typedef Triple<SizeType, NTuple, X5Tuple, Compressed>   OutType6;
+        typedef Triple<SizeType, NTuple, X6Tuple, Compressed>   OutType124;
+
+        // pipeline interfaces to ease specialization
+        typedef Pipe< void, AbstractSource< OutType0, SizeType > > Out0;
+        typedef Pipe< void, AbstractSource< OutType3, SizeType > > Out3;
+        typedef Pipe< void, AbstractSource< OutType5, SizeType > > Out5;
+        typedef Pipe< void, AbstractSource< OutType6, SizeType > > Out6;
+        typedef Pipe< void, AbstractSource< OutType124, SizeType > > Out124;
+    };
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	// little copy helper
+	// which is needed for bitpacked structs (no =sign possible)
+	template <typename Dest, typename Ofs, typename Src>
+	static finline Src const cp___(Dest &dst, Ofs const ofs, Src const src) {
+		return dst.i3.assignValueAt(ofs, src);
+	}
+        
+    template < typename TTextInput, typename TNameInput,
+               typename TOut0, typename TOut3, typename TOut5, typename TOut6, typename TOut124 >
+    static bool _skew7Extend(TTextInput &textIn, TNameInput &nameIn,
+                             TOut0 &out0, TOut3 &out3, TOut5 &out5, TOut6 &out6, TOut124 &out124)
+    {
+        resize(out0, length(textIn) / 7);
+        resize(out3, (length(textIn) + 4) / 7);
+        resize(out5, (length(textIn) + 2) / 7);
+        resize(out6, (length(textIn) + 1) / 7);
+        resize(out124, length(nameIn));
+        if (!(
+            beginRead(textIn) &&
+            beginRead(nameIn) &&
+            beginWrite(out0) &&
+            beginWrite(out3) &&
+            beginWrite(out5) &&
+            beginWrite(out6) &&
+            beginWrite(out124))) return false;
+
+		// not necessary, but this hides an 'uninitialized' warning...
+		typename Value<TOut0>::Type   o0;
+		typename Value<TOut124>::Type o1;
+		o1.i1 = typename Value<typename Value<TOut124>::Type, 1>::Type();
+		o1.i2 = typename Value<typename Value<TOut124>::Type, 2>::Type();
+		o1.i3 = typename Value<typename Value<TOut124>::Type, 3>::Type();
+
+		typename Value<TOut124>::Type o2 = o1;
+		typename Value<TOut3>::Type   o3;
+		typename Value<TOut124>::Type o4 = o1;
+		typename Value<TOut5>::Type   o5;
+		typename Value<TOut6>::Type   o6;
+		
+		o0.i1 = typename Value<typename Value<TOut0>::Type, 1>::Type();
+		o0.i2 = typename Value<typename Value<TOut0>::Type, 2>::Type();
+		o0.i3 = typename Value<typename Value<TOut0>::Type, 3>::Type();
+
+		o3.i1 = typename Value<typename Value<TOut3>::Type, 1>::Type();
+		o3.i2 = typename Value<typename Value<TOut3>::Type, 2>::Type();
+		o3.i3 = typename Value<typename Value<TOut3>::Type, 3>::Type();
+
+		o5.i1 = typename Value<typename Value<TOut5>::Type, 1>::Type();
+		o5.i2 = typename Value<typename Value<TOut5>::Type, 2>::Type();
+		o5.i3 = typename Value<typename Value<TOut5>::Type, 3>::Type();
+
+		o6.i1 = typename Value<typename Value<TOut6>::Type, 1>::Type();
+		o6.i2 = typename Value<typename Value<TOut6>::Type, 2>::Type();
+		o6.i3 = typename Value<typename Value<TOut6>::Type, 3>::Type();
+
+		typename Size<TTextInput>::Type p = length(textIn);
+        unsigned r = (unsigned)(p % 7);
+
+
+        // BEGIN I: PREFILL
+
+        switch (r) {
+        case 6:
+/* 6 */                                                                    cp___(o6,0,    *textIn); ++textIn; o6.i1 = p--;
+
+        case 5:
+/* 5 */                                                         cp___(o5,0,cp___(o6,1,    *textIn)); ++textIn; o5.i1 = p--;
+
+        case 4:
+/* 4 */                                                 o4.i2[0] = o5.i2[0] = o6.i2[0] = (*nameIn).i2; ++nameIn; o4.i1 = p--;
+                                                     cp___(o4,0,cp___(o5,1,cp___(o6,2,    *textIn))); ++textIn;
+            
+        case 3:
+/* 3 */                                   cp___(o3,0,cp___(o4,1,cp___(o5,2,cp___(o6,3,   *textIn)))); ++textIn; o3.i1 = p--;
+                
+        case 2:
+/* 2 */                           o2.i2[0] = o3.i2[0] = o4.i2[1] = o5.i2[1] = o6.i2[1] = (*nameIn).i2; ++nameIn; o2.i1 = p--;
+                               cp___(o2,0,cp___(o3,1,cp___(o4,2,cp___(o5,3,cp___(o6,4,    *textIn))))); ++textIn;
+                
+        case 1:
+/* 1 */                o1.i2[0] = o2.i2[1] = o3.i2[1] = o4.i2[2] = o5.i2[2] = o6.i2[2] = (*nameIn).i2; ++nameIn; o1.i1 = p--;
+                    cp___(o1,0,cp___(o2,1,cp___(o3,2,                                     *textIn))); ++textIn;
+            if (r >= 6) push(out6, o6);
+            if (r >= 5) push(out5, o5);
+            if (r >= 4) push(out124, o4);
+
+        case 0:;
+        }
+
+            // BEGIN II: PREFILL And PUSH FULLY FILLED TRIPLES
+
+        if (!eof(nameIn)) {
+/* 0 */  cp___(o0,0,cp___(o1,1,cp___(o2,2,cp___(o3,3,                                     *textIn)))); ++textIn; o0.i1 = p--;
+                
+/* 6 */  cp___(o0,1,cp___(o1,2,cp___(o2,3,cp___(o3,4,                      cp___(o6,0,    *textIn))))); ++textIn; o6.i1 = p--;
+                
+/* 5 */  cp___(o0,2,cp___(o1,3,cp___(o2,4,cp___(o3,5,           cp___(o5,0,cp___(o6,1,    *textIn)))))); ++textIn; o5.i1 = p--;
+
+/* 4 */     o0.i2[0] = o1.i2[1] = o2.i2[2] = o3.i2[2] = o4.i2[0] = o5.i2[0] = o6.i2[0] = (*nameIn).i2; ++nameIn; o4.i1 = p--;
+         cp___(o0,3,cp___(o1,4,                      cp___(o4,0,cp___(o5,1,cp___(o6,2,    *textIn))))); ++textIn;
+            if (r >= 3) push(out3, o3);
+            if (r >= 2) push(out124, o2);
+                
+/* 3 */  cp___(o0,4,cp___(o1,5,           cp___(o3,0,cp___(o4,1,cp___(o5,2,cp___(o6,3,    *textIn)))))); ++textIn; o3.i1 = p--;
+                
+/* 2 */     o0.i2[1] = o1.i2[2] = o2.i2[0] = o3.i2[0] = o4.i2[1] = o5.i2[1] = o6.i2[1] = (*nameIn).i2; ++nameIn; o2.i1 = p--;
+         cp___(o0,5,           cp___(o2,0,cp___(o3,1,cp___(o4,2,cp___(o5,3,cp___(o6,4,    *textIn)))))); ++textIn;
+            if (r >= 1) push(out124, o1);
+                
+/* 1 */     o0.i2[2] = o1.i2[0] = o2.i2[1] = o3.i2[1] = o4.i2[2] = o5.i2[2] = o6.i2[2] = (*nameIn).i2; ++nameIn; o1.i1 = p--;
+                    cp___(o1,0,cp___(o2,1,cp___(o3,2,                                     *textIn))); ++textIn;
+            push(out0, o0);
+            push(out6, o6);
+            push(out5, o5);
+			push(out124, o4);
+            r = 7;
+        }
+
+        // MAIN Loop: PUSH FULLY FILLED TRIPLES
+        
+        while (!eof(nameIn)) {
+/* 0 */  cp___(o0,0,cp___(o1,1,cp___(o2,2,cp___(o3,3,                                     *textIn)))); ++textIn; o0.i1 -= 7;
+                
+/* 6 */  cp___(o0,1,cp___(o1,2,cp___(o2,3,cp___(o3,4,                      cp___(o6,0,    *textIn))))); ++textIn; o6.i1 -= 7;
+                
+/* 5 */  cp___(o0,2,cp___(o1,3,cp___(o2,4,cp___(o3,5,           cp___(o5,0,cp___(o6,1,    *textIn)))))); ++textIn; o5.i1 -= 7;
+
+/* 4 */     o0.i2[0] = o1.i2[1] = o2.i2[2] = o3.i2[2] = o4.i2[0] = o5.i2[0] = o6.i2[0] = (*nameIn).i2; ++nameIn; o4.i1 -= 7;
+         cp___(o0,3,cp___(o1,4,                      cp___(o4,0,cp___(o5,1,cp___(o6,2,    *textIn))))); ++textIn;
+            push(out3, o3);
+            push(out124, o2);
+                
+/* 3 */  cp___(o0,4,cp___(o1,5,           cp___(o3,0,cp___(o4,1,cp___(o5,2,cp___(o6,3,    *textIn)))))); ++textIn; o3.i1 -= 7;
+                
+/* 2 */     o0.i2[1] = o1.i2[2] = o2.i2[0] = o3.i2[0] = o4.i2[1] = o5.i2[1] = o6.i2[1] = (*nameIn).i2; ++nameIn; o2.i1 -= 7;
+         cp___(o0,5,           cp___(o2,0,cp___(o3,1,cp___(o4,2,cp___(o5,3,cp___(o6,4,    *textIn)))))); ++textIn;
+            push(out124, o1);
+                
+/* 1 */     o0.i2[2] = o1.i2[0] = o2.i2[1] = o3.i2[1] = o4.i2[2] = o5.i2[2] = o6.i2[2] = (*nameIn).i2; ++nameIn; o1.i1 -= 7;
+                    cp___(o1,0,cp___(o2,1,cp___(o3,2,                                     *textIn))); ++textIn;
+            push(out0, o0);
+            push(out6, o6);
+            push(out5, o5);
+            push(out124, o4);
+        }
+
+        // END: FLUSH PARTIALLY FILLED TRIPLES
+
+        {
+/* 0 */             cp___(o1,1,cp___(o2,2,cp___(o3,3,   0)));
+                
+/* 6 */             cp___(o1,2,cp___(o2,3,cp___(o3,4,   0)));
+
+/* 5 */             cp___(o1,3,cp___(o2,4,cp___(o3,5,   0)));
+
+/* 4 */                o1.i2[1] = o2.i2[2] = o3.i2[2] = 0;
+                    cp___(o1,4,                         0);
+            if (r >= 3) push(out3, o3);
+            if (r >= 2) push(out124, o2);
+
+/* 3 */             cp___(o1,5,                         0);
+
+/* 2 */                o1.i2[2] =						0;
+            if (r >= 1) push(out124, o1);
+        
+        }
+                
+        endWrite(out124);
+        endWrite(out6);
+        endWrite(out5);
+        endWrite(out3);
+        endWrite(out0);
+        endRead(nameIn);
+        endRead(textIn);
+        return false;
+    }
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+    template <typename TPair, typename TCompression = void>
+    struct Extender7Multi;
+
+    template <typename TTextInput, typename TNameInput, typename TPair, typename TCompression >
+    struct Pipe< Bundle2< TTextInput, TNameInput >, Extender7Multi<TPair, TCompression> >
+    {
+        typedef typename Size<Pipe>::Type           SizeType;
+        typedef typename Value<TTextInput>::Type    TextInType;
+        typedef typename Value<TNameInput>::Type    NameInType;
+
+        typedef Tuple<TextInType, 4, TCompression>  X4Tuple;
+        typedef Tuple<TextInType, 5, TCompression>  X5Tuple;
+        typedef Tuple<TextInType, 6, TCompression>  X6Tuple;
+        typedef Tuple<typename NameInType::T2, 3>   NTuple;
+        typedef Triple<TPair, NTuple, X6Tuple, Compressed>	OutType0;
+        typedef Triple<TPair, NTuple, X6Tuple, Compressed>	OutType3;
+        typedef Triple<TPair, NTuple, X4Tuple, Compressed>	OutType5;
+        typedef Triple<TPair, NTuple, X5Tuple, Compressed>	OutType6;
+        typedef Triple<TPair, NTuple, X6Tuple, Compressed>	OutType124;
+
+        // pipeline interfaces to ease specialization
+        typedef Pipe< void, AbstractSource< OutType0, SizeType > > Out0;
+        typedef Pipe< void, AbstractSource< OutType3, SizeType > > Out3;
+        typedef Pipe< void, AbstractSource< OutType5, SizeType > > Out5;
+        typedef Pipe< void, AbstractSource< OutType6, SizeType > > Out6;
+        typedef Pipe< void, AbstractSource< OutType124, SizeType > > Out124;
+    };
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+    template < typename TTextInput, typename TLimitsString, typename TNameInput,
+               typename TOut0, typename TOut3, typename TOut5, typename TOut6, typename TOut124 >
+    static bool _skew7ExtendMulti(
+		TTextInput &textIn, TLimitsString const &limits, 
+		TNameInput &nameIn1, TNameInput &nameIn2, TNameInput &nameIn4, 
+		TOut0 &out0, TOut3 &out3, TOut5 &out5, TOut6 &out6, TOut124 &out124)
+    {
+		typedef typename Value<TLimitsString>::Type TSize;
+		typename Iterator<TLimitsString const>::Type it = begin(limits), itEnd = end(limits);
+
+		if (it == itEnd) return true;
+
+		{
+			TSize n0 = 0, n3 = 0, n5 = 0, n6 = 0, n124 = 0;
+
+			// count the numbers of septets in residue class 1, 2, and 4
+			
+			TSize size;
+			TSize old = *it; ++it;
+
+			while (it != itEnd) {
+				size = *it - old;
+				old = *it;
+				
+				n0   +=  size      / 7;
+				n3   += (size + 4) / 7;
+				n5   += (size + 2) / 7;
+				n6   += (size + 1) / 7;
+				n124 += (size + 6) / 7 + (size + 5) / 7 + (size + 3) / 7;
+
+				++it;
+			}
+
+			resize(out0, n0);
+			resize(out3, n3);
+			resize(out5, n5);
+			resize(out6, n6);
+			resize(out124, n124);
+		}
+
+
+        if (!(
+            beginRead(textIn) &&
+            beginRead(nameIn1) &&
+            beginRead(nameIn2) &&
+            beginRead(nameIn4) &&
+            beginWrite(out0) &&
+            beginWrite(out3) &&
+            beginWrite(out5) &&
+            beginWrite(out6) &&
+            beginWrite(out124))) return false;
+
+		// not necessary, but this hides an 'uninitialized' warning...
+		typename Value<TOut0>::Type   o0;
+		typename Value<TOut124>::Type o1;
+		o1.i1 = typename Value<typename Value<TOut124>::Type, 1>::Type();
+		o1.i2 = typename Value<typename Value<TOut124>::Type, 2>::Type();
+		o1.i3 = typename Value<typename Value<TOut124>::Type, 3>::Type();
+
+		typename Value<TOut124>::Type o2 = o1;
+		typename Value<TOut3>::Type   o3;
+		typename Value<TOut124>::Type o4 = o1;
+		typename Value<TOut5>::Type   o5;
+		typename Value<TOut6>::Type   o6;
+		
+		o0.i1 = typename Value<typename Value<TOut0>::Type, 1>::Type();
+		o0.i2 = typename Value<typename Value<TOut0>::Type, 2>::Type();
+		o0.i3 = typename Value<typename Value<TOut0>::Type, 3>::Type();
+
+		o3.i1 = typename Value<typename Value<TOut3>::Type, 1>::Type();
+		o3.i2 = typename Value<typename Value<TOut3>::Type, 2>::Type();
+		o3.i3 = typename Value<typename Value<TOut3>::Type, 3>::Type();
+
+		o5.i1 = typename Value<typename Value<TOut5>::Type, 1>::Type();
+		o5.i2 = typename Value<typename Value<TOut5>::Type, 2>::Type();
+		o5.i3 = typename Value<typename Value<TOut5>::Type, 3>::Type();
+
+		o6.i1 = typename Value<typename Value<TOut6>::Type, 1>::Type();
+		o6.i2 = typename Value<typename Value<TOut6>::Type, 2>::Type();
+		o6.i3 = typename Value<typename Value<TOut6>::Type, 3>::Type();
+
+		it = begin(limits);
+
+		TSize rounds, cur;
+		TSize old = *it; ++it;
+
+		typedef typename Value<TOut0>::Type::T1 TPair;
+		PairIncrementer_<TPair, TLimitsString> p;
+		setHost(p, limits);
+
+		while (it != itEnd) {
+			cur = *it; ++it;
+			unsigned r = (unsigned)((cur - old) % 7);
+			rounds = (cur - old) / 7;
+			old = cur;
+
+
+			// BEGIN I: PREFILL
+
+			switch (r) {
+			case 6:
+	/* 6 */                                                                    cp___(o6,0,    *textIn); ++textIn; o6.i1 = p; ++p;
+
+			case 5:
+	/* 5 */                                                         cp___(o5,0,cp___(o6,1,    *textIn)); ++textIn; o5.i1 = p; ++p;
+
+			case 4:
+	/* 4 */                                                 o4.i2[0] = o5.i2[0] = o6.i2[0] = (*nameIn4).i2; ++nameIn4; o4.i1 = p; ++p;
+														cp___(o4,0,cp___(o5,1,cp___(o6,2,    *textIn))); ++textIn;
+	            
+			case 3:
+	/* 3 */                                   cp___(o3,0,cp___(o4,1,cp___(o5,2,cp___(o6,3,   *textIn)))); ++textIn; o3.i1 = p; ++p;
+	                
+			case 2:
+	/* 2 */                           o2.i2[0] = o3.i2[0] = o4.i2[1] = o5.i2[1] = o6.i2[1] = (*nameIn2).i2; ++nameIn2; o2.i1 = p; ++p;
+								cp___(o2,0,cp___(o3,1,cp___(o4,2,cp___(o5,3,cp___(o6,4,    *textIn))))); ++textIn;
+	                
+			case 1:
+	/* 1 */                o1.i2[0] = o2.i2[1] = o3.i2[1] = o4.i2[2] = o5.i2[2] = o6.i2[2] = (*nameIn1).i2; ++nameIn1; o1.i1 = p; ++p;
+						cp___(o1,0,cp___(o2,1,cp___(o3,2,                                     *textIn))); ++textIn;
+				if (r >= 6) push(out6, o6);
+				if (r >= 5) push(out5, o5);
+				if (r >= 4) push(out124, o4);
+
+			case 0:;
+			}
+
+				// BEGIN II: PREFILL And PUSH FULLY FILLED TRIPLES
+
+			if (rounds != 0) {
+	/* 0 */  cp___(o0,0,cp___(o1,1,cp___(o2,2,cp___(o3,3,                                     *textIn)))); ++textIn; o0.i1 = p; ++p;
+	                
+	/* 6 */  cp___(o0,1,cp___(o1,2,cp___(o2,3,cp___(o3,4,                      cp___(o6,0,    *textIn))))); ++textIn; o6.i1 = p; ++p;
+	                
+	/* 5 */  cp___(o0,2,cp___(o1,3,cp___(o2,4,cp___(o3,5,           cp___(o5,0,cp___(o6,1,    *textIn)))))); ++textIn; o5.i1 = p; ++p;
+
+	/* 4 */     o0.i2[0] = o1.i2[1] = o2.i2[2] = o3.i2[2] = o4.i2[0] = o5.i2[0] = o6.i2[0] = (*nameIn4).i2; ++nameIn4; o4.i1 = p; ++p;
+			cp___(o0,3,cp___(o1,4,                      cp___(o4,0,cp___(o5,1,cp___(o6,2,    *textIn))))); ++textIn;
+				if (r >= 3) push(out3, o3);
+				if (r >= 2) push(out124, o2);
+	                
+	/* 3 */  cp___(o0,4,cp___(o1,5,           cp___(o3,0,cp___(o4,1,cp___(o5,2,cp___(o6,3,    *textIn)))))); ++textIn; o3.i1 = p; ++p;
+	                
+	/* 2 */     o0.i2[1] = o1.i2[2] = o2.i2[0] = o3.i2[0] = o4.i2[1] = o5.i2[1] = o6.i2[1] = (*nameIn2).i2; ++nameIn2; o2.i1 = p; ++p;
+			cp___(o0,5,           cp___(o2,0,cp___(o3,1,cp___(o4,2,cp___(o5,3,cp___(o6,4,    *textIn)))))); ++textIn;
+				if (r >= 1) push(out124, o1);
+	                
+	/* 1 */     o0.i2[2] = o1.i2[0] = o2.i2[1] = o3.i2[1] = o4.i2[2] = o5.i2[2] = o6.i2[2] = (*nameIn1).i2; ++nameIn1; o1.i1 = p; ++p;
+						cp___(o1,0,cp___(o2,1,cp___(o3,2,                                     *textIn))); ++textIn;
+				push(out0, o0);
+				push(out6, o6);
+				push(out5, o5);
+				push(out124, o4);
+				r = 7;
+				--rounds;
+			}
+
+			// MAIN Loop: PUSH FULLY FILLED TRIPLES
+	        
+			while (rounds != 0) {
+	/* 0 */  cp___(o0,0,cp___(o1,1,cp___(o2,2,cp___(o3,3,                                     *textIn)))); ++textIn; o0.i1 = p; ++p;
+	                
+	/* 6 */  cp___(o0,1,cp___(o1,2,cp___(o2,3,cp___(o3,4,                      cp___(o6,0,    *textIn))))); ++textIn; o6.i1 = p; ++p;
+	                
+	/* 5 */  cp___(o0,2,cp___(o1,3,cp___(o2,4,cp___(o3,5,           cp___(o5,0,cp___(o6,1,    *textIn)))))); ++textIn; o5.i1 = p; ++p;
+
+	/* 4 */     o0.i2[0] = o1.i2[1] = o2.i2[2] = o3.i2[2] = o4.i2[0] = o5.i2[0] = o6.i2[0] = (*nameIn4).i2; ++nameIn4; o4.i1 = p; ++p;
+			cp___(o0,3,cp___(o1,4,                      cp___(o4,0,cp___(o5,1,cp___(o6,2,    *textIn))))); ++textIn;
+				push(out3, o3);
+				push(out124, o2);
+	                
+	/* 3 */  cp___(o0,4,cp___(o1,5,           cp___(o3,0,cp___(o4,1,cp___(o5,2,cp___(o6,3,    *textIn)))))); ++textIn; o3.i1 = p; ++p;
+	                
+	/* 2 */     o0.i2[1] = o1.i2[2] = o2.i2[0] = o3.i2[0] = o4.i2[1] = o5.i2[1] = o6.i2[1] = (*nameIn2).i2; ++nameIn2; o2.i1 = p; ++p;
+			cp___(o0,5,           cp___(o2,0,cp___(o3,1,cp___(o4,2,cp___(o5,3,cp___(o6,4,    *textIn)))))); ++textIn;
+				push(out124, o1);
+	                
+	/* 1 */     o0.i2[2] = o1.i2[0] = o2.i2[1] = o3.i2[1] = o4.i2[2] = o5.i2[2] = o6.i2[2] = (*nameIn1).i2; ++nameIn1; o1.i1 = p; ++p;
+						cp___(o1,0,cp___(o2,1,cp___(o3,2,                                     *textIn))); ++textIn;
+				push(out0, o0);
+				push(out6, o6);
+				push(out5, o5);
+				push(out124, o4);
+				--rounds;
+			}
+
+			// END: FLUSH PARTIALLY FILLED TRIPLES
+
+			{
+	/* 0 */             cp___(o1,1,cp___(o2,2,cp___(o3,3,   0)));
+	                
+	/* 6 */             cp___(o1,2,cp___(o2,3,cp___(o3,4,   0)));
+
+	/* 5 */             cp___(o1,3,cp___(o2,4,cp___(o3,5,   0)));
+
+	/* 4 */                o1.i2[1] = o2.i2[2] = o3.i2[2] = 0;
+						cp___(o1,4,                         0);
+				if (r >= 3) push(out3, o3);
+				if (r >= 2) push(out124, o2);
+
+	/* 3 */             cp___(o1,5,                         0);
+
+	/* 2 */                o1.i2[2] =						0;
+				if (r >= 1) push(out124, o1);
+	        
+			}
+		}
+	                
+        endWrite(out124);
+        endWrite(out6);
+        endWrite(out5);
+        endWrite(out3);
+        endWrite(out0);
+        endRead(nameIn4);
+        endRead(nameIn2);
+        endRead(nameIn1);
+        endRead(textIn);
+        return false;
+    }
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/pump_lcp_core.h b/src/SeqAn-1.3/seqan/index/pump_lcp_core.h
new file mode 100644
index 0000000..c4e3f9e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/pump_lcp_core.h
@@ -0,0 +1,391 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PUMP_LCP_CORE_H
+#define SEQAN_HEADER_PUMP_LCP_CORE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+    struct LcpConfig
+    {
+        enum { DefaultWindowSize		= 512 * 1024*1024,	// 512 MB
+               DefaultAbsoluteSizes     = true };
+
+		unsigned windowSize;
+        bool     absoluteSizes;     // when false, sizes are measured in units of TValue
+                                    // when true, sizes are measured in bytes
+
+		LcpConfig():
+            windowSize(DefaultWindowSize),
+            absoluteSizes(DefaultAbsoluteSizes) {}
+
+		template < typename TValue >
+        void absolutize(TValue *) {
+            if (!absoluteSizes) return;
+            windowSize /= sizeof(TValue);
+            if (windowSize < 4096) windowSize = 4096;
+        }
+    };
+
+
+
+	template < typename TTextInput, typename TInvertedSAInput, typename TDest >
+	static void _lcpProcess(TTextInput &textIn, TInvertedSAInput &invertedSAIn, 
+						    TDest &dest, LcpConfig conf)
+	{
+		typedef typename Value<TTextInput>::Type			TValue;
+		typedef typename Size<TTextInput>::Type				TSize;
+		typedef typename BufReadHandler<TTextInput>::Type	TBufReader;
+
+        SEQAN_PROSET(SEQAN_PRODEPTH, 0);
+		TSize rest = length(textIn);
+        if (rest < 2) {
+            resize(dest, 0);
+            return;
+        }
+
+        // buffer is a window of textIn
+        conf.absolutize((TValue*)NULL);
+		TBufReader reader(textIn, conf.windowSize);
+
+        Pair<TSize> out;
+		TSize windowBegin = 0;
+		TSize overlap = 0;
+        TSize _pushes = 0;
+        //TSize _olaps = 0;
+        //char *seenISA = new bool[n];
+        //memset(seenISA, 0, length(invertedSAIn));
+		
+        #ifdef SEQAN_DEBUG_INDEX
+            TSize n = rest;
+            TSize lcpMax = 0, lcpAvrg = 0, lcpNumer = 0, sigma = 1;	// for lcpMax, lcpMean, |Sigma|
+        #endif
+
+        resize(dest, rest);
+		beginWrite(dest);
+		// read the first block of textIn
+		typename Value<TBufReader>::Type buffer = reader.first();
+		while (length(buffer))
+        {
+            SEQAN_PROADD(SEQAN_PRODEPTH, 1);
+            SEQAN_PROMARK("LCP-Durchlauf beginnen");
+            beginRead(textIn);
+			beginRead(invertedSAIn);
+
+            out.i2 = 0;                                             // out.i2 == h
+            TSize windowSize = length(buffer);
+			TSize windowEnd = windowBegin + windowSize;
+			TSize newOverlap = windowEnd;
+            #ifdef SEQAN_DEBUG_INDEX
+				::std::cerr << ::std::hex << "  read window[" << windowBegin << "," << windowEnd;
+				::std::cerr << ") overlay " << overlap << " rest " << rest << ::std::dec << ::std::endl;
+            #endif
+            rest -= windowSize;
+
+            //unsigned _pops = 0;
+
+            while (!eof(invertedSAIn)) {
+
+				if ((*invertedSAIn).i1 != 0) {
+
+					TSize left = (*invertedSAIn).i2[1] + out.i2;        // left == j + h
+
+					if (overlap <= (*invertedSAIn).i2[1] && left <= windowEnd) {
+	//                        ::std::cerr << "* ";
+						for(; left < windowBegin; ++left) {
+							++textIn;
+							++out.i2;
+						}
+
+						TSize k = left - windowBegin;                   // k is relative to window
+						while (k < windowSize && (!eof(textIn)) && *textIn == buffer[k]) {
+							++textIn;
+							++k;
+						}
+						TSize hAdd = k - (left - windowBegin);
+						out.i2 += hAdd;                                 // increase h by successful compares
+						left += hAdd;
+
+						if (k != windowSize || rest == 0) {
+							out.i1 = (*invertedSAIn).i1 - 1;
+							push(dest, out);
+							//SEQAN_ASSERT(!seenISA[out.i1] && 0 <= out.i1 && out.i1 < n);
+							//seen[out.i1] = true;
+							++_pushes;
+
+                            #ifdef SEQAN_DEBUG_INDEX
+                                if ((lcpNumer += out.i2) > n) {
+                                    lcpNumer -= n;
+                                    ++lcpAvrg;
+                                }
+                                if (lcpMax < out.i2) lcpMax = out.i2;
+								if (!out.i2) ++sigma;
+                            #endif
+						}
+					}
+
+					if (left >= windowEnd && (*invertedSAIn).i2[1] < newOverlap) {
+						#ifdef SEQAN_VERBOSE
+							::std::cerr << "crossing border @ " << (*invertedSAIn).i2[1] << " len " << out.i2 << ::std::endl;
+						#endif
+						newOverlap = (*invertedSAIn).i2[1];    //++_olaps;
+					}
+				}
+
+				if (out.i2) --out.i2;                               // if (h > 0) h = h - 1
+				else ++textIn;
+
+                ++invertedSAIn; //++_pops;
+			}
+
+			endRead(invertedSAIn);
+			endRead(textIn);
+
+			windowBegin = windowEnd;
+			overlap = newOverlap;
+			buffer = reader.next();                                 // read the following block
+
+			//::std::cerr << "pops:" << _pops << " pushes:" << _pushes << " overlaps:" << _olaps << ::std::endl;
+		}
+		// trailing zero
+		push(dest, Pair<TSize>(length(textIn) - 1, 0));
+
+		//::std::cerr << "pushes:" << _pushes << " length:" << length(textIn) << ::std::endl;
+        //SEQAN_ASSERT(_pushes == length(textIn));
+        //for (unsigned i = 0; i < n; ++i)
+        //    if (!seen[i])
+        //        ::std::cerr << "___" << i << "______HUH?" << ::std::endl;
+        //delete[] seenISA;
+
+        #ifdef SEQAN_DEBUG_INDEX
+            ::std::cerr << "  n: " << n;
+            ::std::cerr << "  lcpMax: " << lcpMax;
+            ::std::cerr << "  lcpAvrg: " << lcpAvrg + lcpNumer / (double)n;
+            ::std::cerr << "  sigma: " << sigma << ::std::endl;
+        #endif
+
+//TODO: uncomment this line
+//		reader.end();
+		endWrite(dest);
+        SEQAN_PROSET(SEQAN_PRODEPTH, 0);
+    }
+
+	template < typename TTextInput, typename TInvertedSAInput, typename TDest >
+	static inline void _lcpProcess(TTextInput &textIn, TInvertedSAInput &invertedSAIn, TDest &dest)
+	{
+		_lcpProcess(textIn, invertedSAIn, dest, LcpConfig());
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	template < typename TTextInput, typename TLimitsString, typename TInvertedSAInput, typename TDest >
+	static void _lcpProcessMulti(
+		TTextInput &textIn, TLimitsString const &limits, 
+		TInvertedSAInput &invertedSAIn, 
+		TDest &dest, LcpConfig conf)
+	{
+		typedef typename Value<TTextInput>::Type			TValue;
+		typedef typename Size<TTextInput>::Type				TSize;
+		typedef typename BufReadHandler<TTextInput>::Type	TBufReader;
+
+		typedef typename Value<TInvertedSAInput>::Type::T2::T	TPair;
+
+        SEQAN_PROSET(SEQAN_PRODEPTH, 0);
+		TSize rest = length(textIn);
+        if (rest < 2) {
+            resize(dest, 0);
+            return;
+        }
+
+        // buffer is a window of textIn
+        conf.absolutize((TValue*)NULL);
+		TBufReader reader(textIn, conf.windowSize);
+
+        Pair<TSize> out;
+		TSize windowBegin = 0;
+		TSize overlap = 0;
+        TSize _pushes = 0;
+        //TSize _olaps = 0;
+        //char *seenISA = new bool[n];
+        //memset(seenISA, 0, length(invertedSAIn));
+		
+        #ifdef SEQAN_DEBUG_INDEX
+            TSize n = rest;
+            TSize lcpMax = 0, lcpAvrg = 0, lcpNumer = 0, sigma = 1;	// for lcpMax, lcpMean, |Sigma|
+        #endif
+
+        resize(dest, rest);
+		beginWrite(dest);
+		// read the first block of textIn
+		typename Value<TBufReader>::Type buffer = reader.first();
+		while (length(buffer))
+        {
+            SEQAN_PROADD(SEQAN_PRODEPTH, 1);
+            SEQAN_PROMARK("LCP-Durchlauf beginnen");
+
+            beginRead(textIn);
+			beginRead(invertedSAIn);
+
+            out.i2 = 0;                                             // out.i2 == h
+            TSize windowSize = length(buffer);
+			TSize windowEnd = windowBegin + windowSize;
+			TSize newOverlap = windowEnd;
+            #ifdef SEQAN_DEBUG_INDEX
+				::std::cerr << ::std::hex << "  read window[" << windowBegin << "," << windowEnd;
+				::std::cerr << ") overlay " << overlap << " rest " << rest << ::std::dec << ::std::endl;
+            #endif
+            rest -= windowSize;
+
+            //unsigned _pops = 0;
+
+			TSize leftOrig, left;		// begin and begin + seen_lcp of the lower string (global)
+
+            while (!eof(invertedSAIn)) {
+
+				if ((*invertedSAIn).i1 != 0) {
+
+					leftOrig = posGlobalize((*invertedSAIn).i2[1], limits);
+					left = leftOrig + out.i2;        // left == j + h
+
+					if (overlap <= leftOrig && left <= windowEnd) {
+	//                        ::std::cerr << "* ";
+						for(; left < windowBegin; ++left) {
+							++textIn;
+							++out.i2;
+						}
+
+						// end of lower string relative to window
+						TSize kEnd = limits[getValueI1((*invertedSAIn).i2[1]) + 1] - windowBegin;
+						if (kEnd > windowSize) kEnd = windowSize;
+
+						TSize k = left - windowBegin;						// k is relative to window
+
+						// comparision will break before the end of the upper string
+						// -> only lower string needs a clipping
+
+						while (k < kEnd && (!eof(textIn)) && *textIn == buffer[k]) {
+							++textIn;
+							++k;
+						}
+						TSize hAdd = k - (left - windowBegin);
+						out.i2 += hAdd;                                 // increase h by successful compares
+						left += hAdd;
+
+						if (k != windowSize || rest == 0) {
+							out.i1 = (*invertedSAIn).i1 - 1;
+							push(dest, out);
+							//SEQAN_ASSERT(!seenISA[out.i1] && 0 <= out.i1 && out.i1 < n);
+							//seen[out.i1] = true;
+							++_pushes;
+
+                            #ifdef SEQAN_DEBUG_INDEX
+                                if ((lcpNumer += out.i2) > n) {
+                                    lcpNumer -= n;
+                                    ++lcpAvrg;
+                                }
+                                if (lcpMax < out.i2) lcpMax = out.i2;
+								if (!out.i2) ++sigma;
+                            #endif
+						}
+					}
+
+					if (left >= windowEnd && leftOrig < newOverlap) {
+						#ifdef SEQAN_VERBOSE
+							::std::cerr << "crossing border @ " << (*invertedSAIn).i2[1] << " len " << out.i2 << ::std::endl;
+						#endif
+						newOverlap = leftOrig;    //++_olaps;
+					}
+				}
+
+				if (out.i2) 
+					--out.i2;                               // if (h > 0) h = h - 1
+				else 
+					++textIn; 
+
+                ++invertedSAIn; //++_pops;
+			}
+
+			endRead(invertedSAIn);
+			endRead(textIn);
+
+			windowBegin = windowEnd;
+			overlap = newOverlap;
+			buffer = reader.next();                                 // read the following block
+
+			//::std::cerr << "pops:" << _pops << " pushes:" << _pushes << " overlaps:" << _olaps << ::std::endl;
+		}
+		// trailing zero
+		push(dest, Pair<TSize>(length(textIn) - 1, 0));
+
+		//::std::cerr << "pushes:" << _pushes << " length:" << length(textIn) << ::std::endl;
+        //SEQAN_ASSERT(_pushes == length(textIn));
+        //for (unsigned i = 0; i < n; ++i)
+        //    if (!seen[i])
+        //        ::std::cerr << "___" << i << "______HUH?" << ::std::endl;
+        //delete[] seenISA;
+
+        #ifdef SEQAN_DEBUG_INDEX
+            ::std::cerr << "  n: " << n;
+            ::std::cerr << "  lcpMax: " << lcpMax;
+            ::std::cerr << "  lcpAvrg: " << lcpAvrg + lcpNumer / (double)n;
+            ::std::cerr << "  sigma: " << sigma << ::std::endl;
+        #endif
+
+//TODO: uncomment this line
+//		reader.end();
+		endWrite(dest);
+        SEQAN_PROSET(SEQAN_PRODEPTH, 0);
+    }
+
+	template < typename TTextInput, typename TLimitsString, typename TInvertedSAInput, typename TDest >
+	static void _lcpProcessMulti(
+		TTextInput &textIn, TLimitsString const &limits, 
+		TInvertedSAInput &invertedSAIn, 
+		TDest &dest)
+	{
+		_lcpProcessMulti(textIn, limits, invertedSAIn, dest, LcpConfig());
+	}
+
+
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/pump_separator7.h b/src/SeqAn-1.3/seqan/index/pump_separator7.h
new file mode 100644
index 0000000..9ccaed5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/pump_separator7.h
@@ -0,0 +1,85 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_INDEX_PUMP_SEPARATOR_H
+#define SEQAN_HEADER_INDEX_PUMP_SEPARATOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+    template < 
+		typename TInput, typename TFunctor,
+		typename TOut1, typename TOut2, typename TOut4 
+	>
+    static void _skew7SeparateSlices(
+		TInput &in, TFunctor const &funcSlice,
+		TOut1 &out1, TOut2 &out2, TOut4 &out4)
+    {
+		beginRead(in);
+
+		resize(out1, funcSlice.n1);
+		resize(out2, funcSlice.n2);
+		resize(out4, funcSlice.n4);
+
+		beginWrite(out1);
+		beginWrite(out2);
+		beginWrite(out4);
+
+		typename Value<TInput>::Type i;
+		while (!eof(in)) {
+			pop(in, i);
+			if (i.i1 < funcSlice.n4) {
+				push(out4, i);
+			} else 
+				if (i.i1 < funcSlice.n24) {
+					i.i1 -= funcSlice.n4;
+					push(out2, i);
+				} else {
+					i.i1 -= funcSlice.n24;
+					push(out1, i);
+				}
+		}
+
+		endWrite(out4);
+		endWrite(out2);
+		endWrite(out1);
+		endRead(in);
+    }
+    
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/radix.h b/src/SeqAn-1.3/seqan/index/radix.h
new file mode 100644
index 0000000..8b6035e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/radix.h
@@ -0,0 +1,195 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_RADIX_H
+#define SEQAN_HEADER_RADIX_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	// stably sort a[0..n-1] to b[0..n-1] with keys in 0..K-1 from r
+	template <
+		typename TSortedArray, 
+		typename TUnsortedArray, 
+		typename TCountArray, 
+		typename TText >
+	void radixPass(
+		TSortedArray &b,			// result array (sorted by 1 character)
+		TUnsortedArray const &a,	// source array (unsorted)
+		TText const &r,				// text to compare with
+		TCountArray &c,				// temp. counter array
+		unsigned K)					// alphabet size
+	{
+		typedef typename Value<TCountArray>::Type TSize;
+
+		TSize i, sum = 0, n = length(a);
+		arrayFill(begin(c, Standard()), begin(c, Standard()) + K, 0);	// reset counters
+		
+		for (i = 0;  i < n;  i++)										// count occurences
+			c[ordValue(getValue(r,getValue(a,i)))]++;
+			
+		for (i = 0;  i < K;  i++)
+		{																// exclusive prefix sums
+			TSize t = getValue(c,i);
+			c[i] = sum;
+			sum += t;
+		}
+		
+		for (i = 0;  i < n;  i++)
+		{
+			TSize j = getValue(a,i);									// sort
+			b[c[ordValue(getValue(r,j))]++] = j;
+		}
+	}
+
+	template <
+		typename TSortedArray, 
+		typename TUnsortedArray, 
+		typename TCountArray, 
+		typename TText, 
+		typename TShift >
+	void radixPass(
+		TSortedArray &b,			// result array (sorted by 1 character)
+		TUnsortedArray const &a,	// source array (unsorted)
+		TText const &r,				// text to compare with
+		TCountArray &c,				// temp. counter array
+		unsigned K,					// alphabet size
+		TShift shift)				// shift value
+	{
+		typedef typename Value<TCountArray>::Type TSize;
+
+		TSize i, sum = 0, n = length(a), sn = length(r);
+		arrayFill(begin(c, Standard()), begin(c, Standard()) + K, 0);	// reset counters
+		
+		for (i = 0;  i < n;  i++)
+		{
+			TSize j = getValue(a,i) + shift;							// count occurences
+			if (j < sn) c[ordValue(getValue(r,j))]++;
+			else        sum++;
+		}
+		
+		for (i = 0;  i < K;  i++)
+		{																// exclusive prefix sums
+			TSize t = getValue(c,i);
+			c[i] = sum;
+			sum += t;
+		}
+		
+		for (i = 0, sum = 0;  i < n;  i++)
+		{																// sort
+			TSize j = getValue(a,i);
+			TSize k = j + shift;
+			if (k < sn) 
+				b[c[ordValue(getValue(r,k))]++] = j;	// On Exception: Make sure, you have resized your sufarray
+			else
+				b[sum++] = j;							// before calling createSuffixArray(..) to length(text)?
+		}
+	}
+
+    // stably sort a[0..n-1] to b[0..n-1] with keys in 0..K-1 from r
+	template <
+		typename TSortedArray, 
+		typename TUnsortedArray, 
+		typename TCountArray, 
+		typename TText >
+	void radixExtend(
+		TSortedArray &b,			// result array (sorted by 1 character)
+		TUnsortedArray const &a,	// source array (unsorted)
+		TText const &r,				// text to compare with
+		TCountArray &c,				// temp. counter array
+		unsigned K)					// alphabet size
+	{
+		typedef typename Value<TCountArray>::Type TSize;
+
+		TSize i, sum = 0, n = length(a);
+		arrayFill(begin(c, Standard()), begin(c, Standard()) + K, 0);	// reset counters
+		
+		for (i = 0;  i < n;  i++)										// count occurences
+			c[ordValue(getValue(r,getValue(a,i)-1))]++;
+			
+		for (i = 0;  i < K;  i++) 
+		{																// exclusive prefix sums
+			TSize t = getValue(c,i);
+			c[i] = sum;
+			sum += t;
+		}
+		
+		for (i = 0;  i < n;  i++)
+		{
+			TSize j = getValue(a,i);									// sort
+			b[c[ordValue(getValue(r,j-1))]++] = j - 1;
+		}
+	}
+
+    // stably sort a[0..n-1] to b[0..n-1] with keys in 0..K-1 from r
+	template <
+		typename TSortedArray, 
+		typename TUnsortedArray, 
+		typename TCountArray, 
+		typename TText >
+	void radixExtendClip(
+		TSortedArray &b,			// result array (sorted by 1 character)
+		TUnsortedArray const &a,	// source array (unsorted)
+		TText const &r,				// text to compare with
+		TCountArray &c,				// temp. counter array
+		unsigned K)					// alphabet size
+	{
+		typedef typename Value<TCountArray>::Type TSize;
+
+		TSize i, sum = 0, n = length(a);
+		arrayFill(begin(c, Standard()), begin(c, Standard()) + K, 0);	// reset counters
+		
+		for (i = 0;  i < n;  i++)
+		{																// count occurences
+	        TSize j = getValue(a,i);
+			if (j > 0) c[ordValue(getValue(r,j-1))]++;
+		}
+		
+		for (i = 0;  i < K;  i++)
+		{																// exclusive prefix sums
+			TSize t = getValue(c,i);
+			c[i] = sum;
+			sum += t;
+		}
+		
+		for (i = 0;  i < n;  i++)
+		{
+			TSize j = getValue(a,i);									// sort
+			if (j > 0) b[c[ordValue(getValue(r,j-1))]++] = j - 1;
+		}
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/repeat_base.h b/src/SeqAn-1.3/seqan/index/repeat_base.h
new file mode 100644
index 0000000..ec913cf
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/repeat_base.h
@@ -0,0 +1,325 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_REPEAT_BASE_H
+#define SEQAN_HEADER_REPEAT_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	template <typename TPos, typename TPeriod>
+	struct Repeat {
+		TPos		beginPosition;
+		TPos		endPosition;
+		TPeriod		period;
+	};
+
+	template <typename TPos, typename TPeriod>
+	struct Value< Repeat<TPos, TPeriod> > {
+		typedef TPos Type;
+	};
+
+	template <typename TPos, typename TPeriod>
+	struct Size< Repeat<TPos, TPeriod> > {
+		typedef TPeriod Type;
+	};
+
+
+	template <typename TSize>
+	struct RepeatFinderParams {
+		TSize minRepeatLen;
+		TSize maxPeriod;
+	};
+
+	// custom TSpec for our customized wotd-Index
+	struct TRepeatFinder;
+
+	template <typename TText>
+	struct Cargo<Index<TText, IndexWotd<TRepeatFinder> > > 
+	{
+		typedef Index<TText, IndexWotd<TRepeatFinder> >	TIndex;
+		typedef typename Size<TIndex>::Type					TSize;
+		typedef RepeatFinderParams<TSize>					Type;
+	};
+
+
+	// node predicate
+	template <typename TText, typename TSpec>
+	bool nodePredicate(Iter<Index<TText, IndexWotd<TRepeatFinder> >, TSpec> &it) 
+	{
+//		return countOccurrences(it) * nodeDepth(it) >= cargo(container(it)).minRepeatLen;
+		return countOccurrences(it) * repLength(it) >= cargo(container(it)).minRepeatLen;
+	}
+
+	// monotonic hull
+	template <typename TText, typename TSpec>
+	bool nodeHullPredicate(Iter<Index<TText, IndexWotd<TRepeatFinder> >, TSpec> &it) 
+	{
+//		return nodeDepth(it) <= cargo(container(it)).maxPeriod;
+		return repLength(it) <= cargo(container(it)).maxPeriod;
+	}
+
+	template <typename TPos>
+	struct RepeatLess_ : public ::std::binary_function<TPos, TPos, bool>
+	{
+		// key less
+		inline bool operator() (TPos const &a, TPos const &b) {
+			return posLess(a, b);
+		}
+	};
+
+	template <typename TValue>
+	inline bool _repeatMaskValue(TValue) 
+	{
+		return false;
+	}
+
+	template <>
+	inline bool _repeatMaskValue(Dna5 val) 
+	{
+		return val.value == 4; // 'N'
+	}
+
+	template <>
+	inline bool _repeatMaskValue(Iupac val) 
+	{
+		static const Iupac n = 'N';
+		return val.value == n.value;
+	}
+/*
+	template <>
+	inline bool _repeatMaskValue(AminoAcid val) 
+	{
+		return val == 'X';
+	}
+*/
+	// period-1 optimization
+	template <typename TRepeatStore, typename TString, typename TRepeatSize>
+	inline void findRepeats(TRepeatStore &repString, TString const &text, TRepeatSize minRepeatLen) 
+	{
+		typedef typename Value<TRepeatStore>::Type	TRepeat;
+		typedef typename Iterator<TString>::Type	TIterator;
+		typedef typename Value<TString>::Type		TValue;
+		typedef typename Size<TString>::Type		TSize;
+
+		TRepeat rep;
+		rep.period = 1;
+		clear(repString);
+
+		TIterator it = begin(text, Standard());
+		TIterator itEnd = end(text, Standard());
+		if (it == itEnd) return;
+
+		TValue last = *it;
+		TSize repLeft = 0;
+		TSize repRight = 1;
+
+		for (++it; it != itEnd; ++it, ++repRight) 
+		{
+			if (last != *it)
+			{
+				if (_repeatMaskValue(last) || (TRepeatSize)(repRight - repLeft) > minRepeatLen)
+				{
+					// insert repeat
+					rep.beginPosition = repLeft;
+					rep.endPosition = repRight;
+//					::std::cerr<<"left:"<<rep.beginPosition<<"  right:"<<rep.endPosition<<"  length:"<<posSub(rep.endPosition,rep.beginPosition)<<"  period:"<<rep.period<<::std::endl;
+					appendValue(repString, rep);
+				}
+				repLeft = repRight;
+				last = *it;
+			}
+		}
+		if (_repeatMaskValue(last) || (TRepeatSize)(repRight - repLeft) > minRepeatLen)
+		{
+			// insert repeat
+			rep.beginPosition = repLeft;
+			rep.endPosition = repRight;
+//			::std::cerr<<"left:"<<rep.beginPosition<<"  right:"<<rep.endPosition<<"  length:"<<posSub(rep.endPosition,rep.beginPosition)<<"  period:"<<rep.period<<::std::endl;
+			appendValue(repString, rep);
+		}
+	}
+
+	template <typename TRepeatStore, typename TString, typename TSpec, typename TRepeatSize>
+	inline void findRepeats(TRepeatStore &repString, StringSet<TString, TSpec> const &text, TRepeatSize minRepeatLen) 
+	{
+		typedef typename Value<TRepeatStore>::Type	TRepeat;
+		typedef typename Iterator<TString>::Type	TIterator;
+		typedef typename Value<TString>::Type		TValue;
+		typedef typename Size<TString>::Type		TSize;
+
+		TRepeat rep;
+		rep.period = 1;
+		clear(repString);
+
+		for (unsigned i = 0; i < length(text); ++i)
+		{
+			TIterator it = begin(text[i], Standard());
+			TIterator itEnd = end(text[i], Standard());
+			if (it == itEnd) continue;
+
+			TValue last = *it;
+			TSize repLeft = 0;
+			TSize repRight = 1;
+			rep.beginPosition.i1 = i;
+			rep.endPosition.i1 = i;
+
+			for (++it; it != itEnd; ++it, ++repRight) 
+			{
+				if (last != *it)
+				{
+					if (_repeatMaskValue(last) || (TRepeatSize)(repRight - repLeft) > minRepeatLen)
+					{
+						// insert repeat
+						rep.beginPosition.i2 = repLeft;
+						rep.endPosition.i2 = repRight;
+//						::std::cerr<<"left:"<<rep.beginPosition<<"  right:"<<rep.endPosition<<"  length:"<<posSub(rep.endPosition,rep.beginPosition)<<"  period:"<<rep.period<<::std::endl;
+						appendValue(repString, rep);
+					}
+					repLeft = repRight;
+					last = *it;
+				}
+			}
+			if (_repeatMaskValue(last) || (TRepeatSize)(repRight - repLeft) > minRepeatLen)
+			{
+				// insert repeat
+				rep.beginPosition.i2 = repLeft;
+				rep.endPosition.i2 = repRight;
+//				::std::cerr<<"left:"<<rep.beginPosition<<"  right:"<<rep.endPosition<<"  length:"<<posSub(rep.endPosition,rep.beginPosition)<<"  period:"<<rep.period<<::std::endl;
+				appendValue(repString, rep);
+			}
+		}
+	}
+
+	// main function
+	template <typename TRepeatStore, typename TText, typename TRepeatSize, typename TPeriodSize>
+	void findRepeats(TRepeatStore &repString, TText const &text, TRepeatSize minRepeatLen, TPeriodSize maxPeriod) 
+	{
+		typedef Index<TText, IndexWotd<TRepeatFinder> >					TIndex;
+		typedef typename Size<TIndex>::Type									TSize;
+		typedef typename Iterator<TIndex, TopDown<ParentLinks<> > >::Type	TNodeIterator;
+		typedef typename Fibre<TIndex, FibreSA>::Type const				TSA;
+		typedef typename Infix<TSA>::Type									TOccString;
+		typedef typename Iterator<TOccString>::Type							TOccIterator;
+
+		typedef typename Value<TRepeatStore>::Type							TRepeat;
+		typedef typename Value<TOccString>::Type							TOcc;
+
+		typedef ::std::map<TOcc,TRepeat,RepeatLess_<TOcc> >					TRepeatList;
+
+		if (maxPeriod < 1) return;
+		if (maxPeriod == 1) 
+		{
+			findRepeats(repString, text, minRepeatLen);
+			return;
+		}
+
+		TIndex		index(text);
+		TRepeatList list;
+
+		// set repeat finder parameters
+		cargo(index).minRepeatLen = minRepeatLen;
+		cargo(index).maxPeriod = maxPeriod;
+
+		TNodeIterator nodeIt(index);
+		TOccIterator itA, itB, itRepBegin, itEnd;
+		TRepeat rep;
+		for (; !atEnd(nodeIt); goNext(nodeIt))
+		{
+			if (isRoot(nodeIt)) continue;
+
+			// get occurrences
+			TOccString occ = getOccurrences(nodeIt);
+			itA = begin(occ, Standard());
+			itEnd = end(occ, Standard());
+			itRepBegin = itB = itA;
+
+			TSize repLen = repLength(nodeIt);		// representative length
+			if ((TSize)minRepeatLen <= repLen) continue;
+
+			TSize diff, period = 0;					// period of current repeat
+			TSize repeatLen = 0;					// overall length of current repeat
+			TSize minLen = minRepeatLen - repLen;	// minimum repeat length minus length of representative
+
+			for (++itB; itB != itEnd; ++itB)
+			{
+				diff = posSub(*itB, *itA);
+				if (diff != period || getSeqNo(*itA) != getSeqNo(*itB))
+				{
+					// is the repeat long enough?
+					if (repeatLen >= minLen)
+						// is the repeat self overlapping or connected?
+						if (parentRepLength(nodeIt) < period && period <= repLen)
+						{
+							// insert repeat
+							rep.beginPosition = *itRepBegin;
+							rep.endPosition = posAdd(*itA, period);
+							rep.period = period;
+//							::std::cerr<<"left:"<<rep.beginPosition<<"  right:"<<rep.endPosition<<"  length:"<<posSub(rep.endPosition,rep.beginPosition)<<"  period:"<<rep.period<<::std::endl;
+							list.insert(::std::pair<TOcc,TRepeat>(rep.beginPosition, rep));
+						}
+					itRepBegin = itA;
+					period = diff;
+					repeatLen = 0;
+				}
+				repeatLen += period;
+				itA = itB;
+			}
+
+			// is the last repeat long enough?
+			if (repeatLen >= minLen)
+				// is the repeat self overlapping or connected?
+				if (parentRepLength(nodeIt) < period && period <= repLen)
+				{
+					// insert repeat
+					rep.beginPosition = *itRepBegin;
+					rep.endPosition = posAdd(*itA, period);
+					rep.period = period;
+//					::std::cerr<<"left:"<<rep.beginPosition<<"  right:"<<rep.endPosition<<"  length:"<<posSub(rep.endPosition,rep.beginPosition)<<"  period:"<<rep.period<<::std::endl;
+					list.insert(::std::pair<TOcc,TRepeat>(rep.beginPosition, rep));
+				}
+		}
+
+		// copy low-complex regions to result string
+		resize(repString, list.size());
+		typename TRepeatList::const_iterator lit = list.begin();
+		typename TRepeatList::const_iterator litEnd = list.end();
+		for (TSize i = 0; lit != litEnd; ++lit, ++i)
+			repString[i] = (*lit).second;
+	}
+
+
+}	// namespace seqan
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/shape_base.h b/src/SeqAn-1.3/seqan/index/shape_base.h
new file mode 100644
index 0000000..7e7ee58
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/shape_base.h
@@ -0,0 +1,750 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SHAPE_BASE_H
+#define SEQAN_HEADER_SHAPE_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	template <unsigned q>
+	struct UngappedShape {};
+	typedef UngappedShape<0> SimpleShape;
+
+	template <typename TSpec>
+	struct GappedShape {};
+	typedef GappedShape<Default> GenericShape;
+
+
+/**
+.Class.Shape:
+..cat:Index
+..summary:Stores hash value and shape for an ungapped or gapped q-gram.
+..signature:Shape<TValue, TSpec>
+..param.TValue:The @Metafunction.Value@ type of the string the shape is applied to (e.g. $Dna$).
+..param.TSpec:The specializing type.
+...default:@Spec.SimpleShape@, for ungapped q-grams.
+..remarks:The @Metafunction.ValueSize@ of Shape is the ValueSize of TValue which is the alphabet size.
+..remarks:To get the span or the weight of a shape call @Function.length@ or @Function.weight at .
+.Memfunc.Shape#Shape:
+..class:Class.Shape
+..summary:Constructor
+..signature:Shape<TValue, TSpec> ()
+..signature:Shape<TValue, TSpec> (shape)
+..param.shape:Other Shape object. (copy constructor)
+..include:seqan/index.h
+*/
+	template <typename TValue = Dna, typename TSpec = SimpleShape>
+	class Shape;
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.Shape
+	template <typename TValue, typename TSpec>
+	struct Value<Shape<TValue,TSpec> >
+	{
+		typedef __uint64 Type;
+	};
+
+///.Metafunction.Size.param.T.type:Class.Shape
+	template <typename TValue, typename TSpec>
+	struct Size<Shape<TValue,TSpec> >
+	{
+		typedef unsigned long Type;
+	};
+
+///.Metafunction.LENGTH.param.T.type:Class.Shape
+    template <typename TValue, unsigned q>
+	struct LENGTH< Shape<TValue, UngappedShape<q> > >
+	{
+		enum { VALUE = q };
+	};
+
+///.Metafunction.WEIGHT.param.T.type:Class.Shape
+    template <typename TValue, unsigned q>
+	struct WEIGHT< Shape<TValue, UngappedShape<q> > >
+	{
+		enum { VALUE = q };
+	};
+
+///.Metafunction.ValueSize.param.T.type:Class.Shape
+	template <typename TValue, typename TSpec>
+	struct ValueSize< Shape<TValue, TSpec> > 
+	{
+		typedef typename Value<Shape<TValue, TSpec> >::Type THashValue;
+		static const THashValue VALUE = Power<
+						ValueSize<TValue>::VALUE, 
+						WEIGHT< Shape<TValue, TSpec> >::VALUE >::VALUE;
+	};
+
+///.Metafunction.Host.param.T.type:Class.Shape
+	template <typename TValue, typename TSpec>
+	struct Host<Shape<TValue,TSpec> >
+	{
+		typedef TValue Type;
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.SimpleShape:
+..cat:Index
+..summary:A variable length ungapped shape (also called q-gram or k-mer).
+..general:Class.Shape
+..signature:Shape<TValue, SimpleShape>
+..param.TValue:The @Metafunction.Value@ type of the string the shape is applied to (e.g. $Dna$).
+..remarks:A SimpleShape must be resized first to a valid length. To do so, call @Function.resize at .
+..see:Spec.UngappedShape
+..include:seqan/index.h
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// ungapped shape with variable length
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TValue>
+	class Shape<TValue, SimpleShape>
+	{
+	public:
+//____________________________________________________________________________
+
+		unsigned					span;
+		typename Value<Shape>::Type	hValue;
+		typename Value<Shape>::Type	XValue;
+		typename Value<Shape>::Type	leftFactor;
+		typename Value<Shape>::Type	leftFactor2;
+		TValue						leftChar;
+//____________________________________________________________________________
+		
+/**
+.Memfunc.SimpleShape#Shape:
+..class:Spec.SimpleShape
+..summary:Constructor
+..signature:Shape<TValue, SimpleShape> ()
+..signature:Shape<TValue, SimpleShape> (shape)
+..signature:Shape<TValue, SimpleShape> (q)
+..param.shape:Other Shape object. (copy constructor)
+..param.q:Length of the ungapped q-gram.
+*/
+		Shape():
+			span(0),
+			hValue(0),
+			XValue(0),
+			leftFactor(0),
+			leftFactor2(0) {}
+		
+		Shape(unsigned _span):
+			hValue(0),
+			XValue(0)
+		{
+			resize(*this, _span);
+		}
+
+		template <unsigned q>
+		Shape(Shape<TValue, UngappedShape<q> > const &other)
+		{
+			*this = other;
+		}	
+
+//____________________________________________________________________________
+
+		template <unsigned q>
+		inline Shape &
+		operator=(Shape<TValue, UngappedShape<q> > const &other)
+		{
+			span = other.span;
+			hValue = other.hValue;
+			XValue = other.XValue;
+			leftFactor = other.leftFactor;
+			leftFactor2 = other.leftFactor2;
+			leftChar = other.leftChar;
+			return *this;
+		}
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// ungapped shape with fixed length q
+	//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.UngappedShape:
+..cat:Index
+..summary:A fixed length ungapped shape (also called q-gram or k-mer).
+..general:Class.Shape
+..signature:Shape<TValue, UngappedShape<q> >
+..param.TValue:The @Metafunction.Value@ type of the sequence the shape is applied to (e.g. $Dna$).
+..param.q:The length of the shape.
+..include:seqan/index.h
+*/
+
+	template <typename TValue, unsigned q>
+	class Shape<TValue, UngappedShape<q> >
+	{
+	public:
+		typedef typename Value<Shape>::Type THashValue;
+//____________________________________________________________________________
+
+		static const unsigned span = q;
+		static const THashValue leftFactor = Power<ValueSize<TValue>::VALUE, q - 1>::VALUE;
+		static const THashValue leftFactor2 = (Power<ValueSize<TValue>::VALUE, q>::VALUE - 1) / (ValueSize<TValue>::VALUE - 1);
+		// Sigma^(q-1) + Sigma^(q-2) + ... + Sigma + 1
+
+		THashValue	hValue;		// current hash value
+		THashValue	XValue;		// Sum_{i=0..q-1} (x_i + 1)
+		TValue		leftChar;	// leftmost character
+//____________________________________________________________________________
+		Shape():
+			hValue(0),
+			XValue(0) {}
+	};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.value.param.object.type:Class.Shape
+	template <typename TValue, typename TSpec>
+	inline typename Value< Shape<TValue, TSpec> >::Type
+	value(Shape<TValue, TSpec> &me)
+	{
+		return me.hValue;
+	}
+
+	template <typename TValue, typename TSpec>
+	inline typename Value< Shape<TValue, TSpec> >::Type
+	value(Shape<TValue, TSpec> const &me)
+	{
+		return me.hValue;
+	}
+
+
+//____________________________________________________________________________
+
+///.Function.length.param.object.type:Class.Shape
+	template <typename TValue, typename TSpec>
+	inline typename Size< Shape<TValue, TSpec> >::Type
+	length(Shape<TValue, TSpec> const &me)
+	{
+	SEQAN_CHECKPOINT
+		return me.span;
+	}
+
+//____________________________________________________________________________
+
+/**.Function.weight:
+..cat:Index
+..summary:Number of relevant positions in a shape.
+..signature:weight(shape)
+..param.shape:Shape object for which the number of relevant positions is determined.
+...type:Class.Shape
+..returns:Number of relevant positions.
+..remarks.text:For ungapped shapes the return value is the result of the @Function.length@ function.
+For gapped shapes this is the number of '1's.
+*/
+	template <typename TValue, typename TSpec>
+	inline typename Size< Shape<TValue, TSpec> >::Type
+	weight(Shape<TValue, TSpec> const &me)
+	{
+	SEQAN_CHECKPOINT
+		return length(me);
+	}
+
+//____________________________________________________________________________
+
+///.Function.resize.param.object.type:Spec.SimpleShape
+	template <typename TValue, typename TSize>
+	inline typename Size< Shape<TValue, SimpleShape> >::Type
+	resize(Shape<TValue, SimpleShape> & me, TSize new_length)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, SimpleShape> >::Type	THValue;
+		me.leftFactor = _intPow((THValue)ValueSize<TValue>::VALUE, new_length - 1);
+		me.leftFactor2 = (_intPow((THValue)ValueSize<TValue>::VALUE, new_length) - 1) / (ValueSize<TValue>::VALUE - 1);
+		return me.span = new_length;
+	}
+
+//____________________________________________________________________________
+
+/**.Function.hash:
+..cat:Index
+..summary:Computes a (lower) hash value for a shape applied to a sequence.
+..signature:hash(shape, it)
+..signature:hash(shape, it, charsLeft)
+..param.shape:Shape to be used for hashing.
+...type:Class.Shape
+..param.it:Sequence iterator pointing to the first character of the shape.
+..param.charsLeft:The distance of $it$ to the string end. 
+If $charsLeft$ is smaller than the shape's span, the hash value corresponds to the smallest shape beginning with $charsLeft$ characters.
+..returns:Hash value of the shape.
+..see:Function.hashNext
+..see:Function.hashUpper
+..see:Function.hash2
+*/
+
+	template <typename TValue, typename TIter>
+	typename Value< Shape<TValue, SimpleShape> >::Type
+	hash(Shape<TValue, SimpleShape> &me, TIter it)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, SimpleShape> >::Type	THValue;
+		typedef typename Size< Shape<TValue, SimpleShape> >::Type	TSize;
+
+		me.hValue = ordValue(me.leftChar = *it);
+		for(TSize i = 1; i < me.span; ++i) {
+			++it;
+			me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+		}
+		return me.hValue;
+	}
+
+//____________________________________________________________________________
+// fixed ungapped shapes
+
+	// loop unrolling ...
+	template <typename THValue, typename TValue, typename TIter>
+	inline THValue
+	_hashFixedShape(THValue hash, TIter &, TValue const, UngappedShape<1> const) {
+		return hash;
+	}
+
+	template <typename THValue, typename TValue, typename TIter, unsigned q>
+	inline THValue
+	_hashFixedShape(THValue hash, TIter &it, TValue const, UngappedShape<q> const) {
+		++it;
+		return _hashFixedShape(
+			hash * ValueSize<TValue>::VALUE + ordValue((TValue)*it),
+			it, TValue(), UngappedShape<q - 1>());
+	}
+
+	// ... for fixed ungapped shapes
+	template <typename TValue, unsigned q, typename TIter>
+	inline typename Value< Shape<TValue, UngappedShape<q> > >::Type
+	hash(Shape<TValue, UngappedShape<q> > &me, TIter it)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, UngappedShape<q> > >::Type	THValue;
+		typedef typename Size< Shape<TValue, UngappedShape<q> > >::Type	TSize;
+
+		me.hValue = ordValue(me.leftChar = *it);
+		return me.hValue = _hashFixedShape(me.hValue, it, TValue(), UngappedShape<q>());
+	}
+
+
+	template <typename TValue, typename TSpec, typename TIter, typename TSize>
+	inline typename Value< Shape<TValue, TSpec> >::Type
+	hash(Shape<TValue, TSpec> &me, TIter it, TSize charsLeft)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, TSpec> >::Type	THValue;
+
+		TSize iEnd = me.span;
+		if (iEnd > charsLeft) iEnd = charsLeft;
+
+		TSize i = 0;
+		if (iEnd > 0) {
+			me.hValue = ordValue(me.leftChar = *it);
+			for(i = 1; i < iEnd; ++i) {
+				++it;
+				me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+			}
+		} else
+			return me.hValue = 0;
+
+		// fill shape with zeros
+		for(; i < (TSize)me.span; ++i)
+			me.hValue *= ValueSize<TValue>::VALUE;
+		return me.hValue;
+	}
+
+//____________________________________________________________________________
+// Tuple -> fixed ungapped shapes
+
+	template <typename THValue, typename TValue, typename TTValue, unsigned SIZE, typename TCompressed>
+	inline THValue
+	_hashTuple2FixedShape(
+		THValue const, 
+		Tuple<TTValue, SIZE, TCompressed> const &tuple,
+		TValue const,
+		UngappedShape<1> const) 
+	{
+		return ordValue(tuple[0]);
+	}
+
+	template <typename THValue, typename TValue, typename TTValue, unsigned SIZE, typename TCompressed, unsigned q>
+	inline THValue
+	_hashTuple2FixedShape(
+		THValue const, 
+		Tuple<TTValue, SIZE, TCompressed> const &tuple,
+		TValue const,
+		UngappedShape<q> const) 
+	{
+		return _hashTuple2FixedShape(THValue(), tuple, TValue(), UngappedShape<q - 1>()) 
+			* ValueSize<TValue>::VALUE + ordValue(tuple[q-1]);
+	}
+
+	// ... for fixed ungapped shapes
+	template <
+		typename TValue,
+		typename TTValue, 
+		unsigned SIZE, 
+		unsigned q>
+	typename Value< Shape<TValue, UngappedShape<q> > >::Type
+	hash(
+		Shape<TValue, UngappedShape<q> > &me, 
+		Tuple<TTValue, SIZE, Compressed> const &tuple)
+	{
+	SEQAN_CHECKPOINT
+		if (ValueSize<TValue>::VALUE == (1 << BitsPerValue<TTValue>::VALUE))
+			if (q == SIZE)
+				return tuple.i;
+			else
+				return tuple >> (q - SIZE);
+		else
+			return me.hValue = _hashTuple2FixedShape(me.hValue, tuple, TValue(), UngappedShape<q>());
+	}
+
+	template <
+		typename TValue,
+		typename TTValue, 
+		unsigned SIZE, 
+		typename TCompressed, 
+		unsigned q>
+	typename Value< Shape<TValue, UngappedShape<q> > >::Type
+	hash(
+		Shape<TValue, UngappedShape<q> > &me, 
+		Tuple<TTValue, SIZE, TCompressed> const &tuple)
+	{
+	SEQAN_CHECKPOINT
+		return me.hValue = _hashTuple2FixedShape(me.hValue, tuple, TValue(), UngappedShape<q>());
+	}
+
+//____________________________________________________________________________
+
+/**.Function.hashUpper:
+..cat:Index
+..summary:Computes an upper hash value for a shape applied to a sequence.
+..signature:hashUpper(shape, it, charsLeft)
+..param.shape:Shape to be used for hashing.
+...type:Class.Shape
+..param.it:Sequence iterator pointing to the first character of the shape.
+..param.charsLeft:The distance of $it$ to the string end. 
+..returns:Upper hash value of the shape.
+The hash value corresponds to the maximal @Function.hash@ value of a shape beginning with $min(charsLeft,length(shape))$ characters + 1.
+..remarks:This function in conjunction with @Function.hash@ is useful to search a q-gram index for p-grams with p<q.
+*/
+
+	template <typename TValue, typename TSpec, typename TIter, typename TSize>
+	inline typename Value< Shape<TValue, TSpec> >::Type
+	hashUpper(Shape<TValue, TSpec> &me, TIter it, TSize charsLeft)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, TSpec> >::Type	THValue;
+
+		TSize iEnd = me.span;
+		if (iEnd > charsLeft) iEnd = charsLeft;
+
+		TSize i = 0;
+		if (iEnd > 0) {
+			me.hValue = ordValue(me.leftChar = *it);
+			for(i = 1; i < iEnd; ++i) {
+				++it;
+				me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+			}
+			++me.hValue;
+		} else
+			me.hValue = 1;
+
+		// fill shape with zeros
+		for(; i < (TSize)me.span; ++i)
+			me.hValue *= ValueSize<TValue>::VALUE;
+		return me.hValue;
+	}
+
+//____________________________________________________________________________
+
+/**
+.Function.hashNext:
+..cat:Index
+..summary:Computes the hash value for the adjacent shape.
+..signature:hashNext(shape, it)
+..param.shape:Shape to be used for hashing.
+...type:Class.Shape
+..param.it:Sequence iterator pointing to the first character of the adjacent shape.
+..returns:Hash value of the q-gram.
+..remarks:@Function.hash@ has to be called before.
+..include:seqan/index.h
+*/
+
+	template <typename TValue, typename TSpec, typename TIter>
+	inline typename Value< Shape<TValue, TSpec> >::Type
+	hashNext(Shape<TValue, TSpec> &me, TIter const &it)
+	{
+	SEQAN_CHECKPOINT
+		// remove first, shift left, and add next character
+		typedef typename Value< Shape<TValue, TSpec> >::Type	THValue;
+		typedef typename Size< Shape<TValue, TSpec> >::Type		TSize;
+		me.hValue = 
+			(me.hValue - ordValue(me.leftChar) * (THValue)me.leftFactor) * ValueSize<TValue>::VALUE
+			+ ordValue((TValue)*(it + (TSize)me.span - 1));
+		me.leftChar = *it;
+		return me.hValue;
+	}
+
+//____________________________________________________________________________
+
+/**.Function.hash2:
+..cat:Index
+..summary:Computes an unique hash value of a shape applied to a sequence, even if the sequence is shorter than the shape span
+..signature:hash2(shape, it, charsLeft)
+..param.shape:Shape to be used for hashing.
+...type:Class.Shape
+..param.it:Sequence iterator pointing to the first character of the shape.
+..param.charsLeft:The distance of $it$ to the string end. 
+..returns:Hash value of the shape.
+..see:Function.hash2Next
+..see:Function.hash2Upper
+*/
+
+	template <typename TValue, typename TSpec, typename TIter, typename TSize>
+	inline typename Value< Shape<TValue, TSpec> >::Type
+	hash2(Shape<TValue, TSpec> &me, TIter it, TSize charsLeft)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, TSpec> >::Type	THValue;
+
+		TSize iEnd = me.span;
+		if (iEnd > charsLeft) iEnd = charsLeft;
+
+		TSize i = 0;
+		if (iEnd > 0) {
+			me.hValue = me.XValue = ordValue(me.leftChar = *it);
+			for(i = 1; i < iEnd; ++i) {
+				++it;
+				// update sum of x_i
+				me.XValue += ordValue((TValue)*it);
+				// shift hash
+				me.hValue = me.hValue * ValueSize<TValue>::VALUE + me.XValue;
+			}
+		} else
+			return me.hValue = me.XValue = 0;
+
+		// fill shape with zeros
+		for(; i < (TSize)me.span; ++i)
+			me.hValue = me.hValue * ValueSize<TValue>::VALUE + me.XValue;
+		return me.hValue += iEnd;
+	}
+
+/**.Function.hash2Upper:
+..cat:Index
+..summary:Computes an upper unique hash value of a shape applied to a sequence, even if the sequence is shorter than the shape span.
+..signature:hash2Upper(shape, it, charsLeft)
+..param.shape:Shape to be used for hashing.
+...type:Class.Shape
+..param.it:Sequence iterator pointing to the first character of the shape.
+..param.charsLeft:The distance of $it$ to the string end. 
+..returns:Upper hash value of the shape.
+The hash value corresponds to the maximal @Function.hash2@ value of a shape beginning with the $min(charsLeft,length(shape))$ characters + 1
+..remarks:This function in conjunction with @Function.hash2@ is useful to search a q-gram index for p-grams with p<q.
+*/
+
+	template <typename TValue, typename TSpec, typename TIter, typename TSize>
+	inline typename Value< Shape<TValue, TSpec> >::Type
+	hash2Upper(Shape<TValue, TSpec> &me, TIter it, TSize charsLeft)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, TSpec> >::Type	THValue;
+
+		TSize iEnd = me.span;
+		if (iEnd > charsLeft) iEnd = charsLeft;
+
+		THValue hValue, XValue;
+		TSize i = 0;
+		if (iEnd > 0) {
+			hValue = XValue = ordValue((TValue)*it);
+			for(i = 1; i < iEnd; ++i) {
+				++it;
+				// update sum of x_i
+				XValue += ordValue((TValue)*it);
+				// shift hash
+				hValue = hValue * ValueSize<TValue>::VALUE + XValue;
+			}
+		} else
+			hValue = XValue = 0;
+
+		if (charsLeft <= me.span) {
+			++XValue;
+			++hValue;
+		}
+
+		// fill shape with zeros
+		for(; i < (TSize)me.span; ++i)
+			hValue = hValue * ValueSize<TValue>::VALUE + XValue;
+		return hValue += iEnd;
+	}
+
+//____________________________________________________________________________
+
+/**
+.Function.hash2Next:
+..cat:Index
+..summary:Computes a unique hash value for the adjacent shape, even if it is shorter than q.
+..signature:hash2Next(shape, it)
+..param.shape:Shape to be used for hashing the q-gram.
+...type:Class.Shape
+..param.it:Sequence iterator pointing to the first character of the adjacent shape.
+..returns:Hash value of the shape.
+..remarks:@Function.hash@ has to be called before with $shape$ on the left adjacent q-gram.
+..include:seqan/index.h
+*/
+
+	template <typename TValue, typename TSpec, typename TIter, typename TSize>
+	inline typename Value< Shape<TValue, TSpec> >::Type
+	hash2Next(Shape<TValue, TSpec> &me, TIter &it, TSize charsLeft)
+	{
+	SEQAN_CHECKPOINT
+		// remove first, shift left, and add next character
+		typedef typename Value< Shape<TValue, TSpec> >::Type	THValue;
+
+		if (charsLeft >= me.span) {
+			// update sum of x_i
+			me.XValue = me.XValue + ordValue((TValue)*(it + me.span - 1)) - ordValue(me.leftChar);
+			// shift hash
+			me.hValue = (me.hValue - ordValue(me.leftChar) * (THValue)me.leftFactor2) * ValueSize<TValue>::VALUE + me.XValue
+						- me.span * (ValueSize<TValue>::VALUE - 1);
+		} else {
+			// update sum of x_i
+			me.XValue -= ordValue(me.leftChar);
+			// shift hash
+			me.hValue = (me.hValue - ordValue(me.leftChar) * (THValue)me.leftFactor2) * ValueSize<TValue>::VALUE + me.XValue
+				        - charsLeft * (ValueSize<TValue>::VALUE - 1) - ValueSize<TValue>::VALUE;
+		}
+
+		me.leftChar = *it;
+		return me.hValue;
+	}
+
+	template <typename TString, typename THash>
+	inline void unhash(TString &result, THash hash, unsigned q)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value<TString>::Type	TValue;
+
+		resize(result, q);
+		for (unsigned i = q; i > 0; ) 
+		{
+			result[--i] = (TValue)(hash % ValueSize<TValue>::VALUE);
+			hash /= ValueSize<TValue>::VALUE;
+		}
+	}
+
+//____________________________________________________________________________
+
+/**.Function.stringToShape:
+..cat:Index
+..summary:Takes a shape given as a string of '1' (relevant position) and '0' 
+(irrelevant position) and converts it into a Shape object.
+..signature:stringToShape(shape, bitmap)
+..param.shape:Shape object that is manipulated.
+...type:Spec.SimpleShape
+..param.bitmap:A character string of '1' and '0' representing relevant and irrelevant positions (blanks) respectively.
+...remarks:This string must begin with a '1'. Trailing '0's are ignored.
+...remarks:If $shape$ is a @Spec.SimpleShape@ at most one contiguous sequences of $1$s is allowed.
+...type:Class.String
+..see:Function.shapeToString
+..see:Function.reverse
+*/
+
+	template <typename TValue, typename TShapeString>
+	inline bool
+	stringToShape(
+		Shape<TValue, SimpleShape> &me, 
+		TShapeString const &bitmap)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TShapeString const>::Type		TIter;
+		typedef typename Size<TShapeString const>::Type			TSize;
+
+		TIter it = begin(bitmap, Standard());
+		TIter itEnd = end(bitmap, Standard());
+
+		TSize ones = 0;
+		for(; it != itEnd && *it == '0' ; ++it) ;
+		for(; it != itEnd && *it == '1' ; ++it)	++ones;
+		for(; it != itEnd && *it == '0' ; ++it) ;
+
+		resize(me, ones);
+
+		return it == itEnd;
+	}
+
+//____________________________________________________________________________
+
+/**.Function.shapeToString:
+..cat:Index
+..summary:Converts a given shape into a sequence of '1' (relevant position) and '0' 
+(irrelevant position).
+..signature:shapeToString(bitmap, shape)
+..param.bitmap:The resulting sequence object.
+...type:Class.String
+..param.shape:Shape object.
+...type:Class.Shape
+..see:Function.stringToShape
+*/
+
+	template <typename TShapeString, typename TValue, unsigned q>
+	inline void
+	shapeToString(
+		TShapeString &bitmap,
+		Shape<TValue, UngappedShape<q> > const &me)
+	{
+	SEQAN_CHECKPOINT
+
+		clear(bitmap);
+		resize(bitmap, length(me), '1');
+	}
+
+//____________________________________________________________________________
+	
+///.Function.reverse.param.object.type:Spec.SimpleShape
+
+	template <typename TValue, typename TSpec>
+	inline void
+	reverse(Shape<TValue, TSpec> &)
+	{
+	}
+	
+}	// namespace seqan
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/shape_gapped.h b/src/SeqAn-1.3/seqan/index/shape_gapped.h
new file mode 100644
index 0000000..b613b36
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/shape_gapped.h
@@ -0,0 +1,661 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SHAPE_GAPPED_H
+#define SEQAN_HEADER_SHAPE_GAPPED_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// HardwiredShape allows compiler-time defined gapped shape
+
+/**
+.Class.HardwiredShape:
+..cat:Index
+..summary:A structure to define a fixed gapped shape.
+..signature:HardwiredShape<P1, P2, ..., Pn>
+..param.Pi:Pi is the distance of the i'th '1' to the next '1' in the shape.
+...nowarn:unknown param
+...remarks:At most 20 parameters are allowed, so the maximal shape weight is 21.
+..remarks:You can use this structure to define your one gapped shapes in conjunction with @Spec.GappedShape at .
+...note:The shape $1100101$ corresponds to $HardwiredShape<1,3,2>$.
+...note:The following predefined shapes are already available in $seqan/index/shape_predefined.h$:
+..file:../projects/library/seqan/index/shape_predefined.h
+..include:seqan/index.h
+*/
+
+	// Pxx = spaces between '1's
+	template <
+		int P00 = 0, int P01 = 0, int P02 = 0, int P03 = 0, int P04 = 0, 
+		int P05 = 0, int P06 = 0, int P07 = 0, int P08 = 0, int P09 = 0,
+		int P10 = 0, int P11 = 0, int P12 = 0, int P13 = 0, int P14 = 0,
+		int P15 = 0, int P16 = 0, int P17 = 0, int P18 = 0, int P19 = 0	
+	>
+	struct HardwiredShape {
+		static const int DIFFS[];
+	};
+
+	template <
+		int P00, int P01, int P02, int P03, int P04, 
+		int P05, int P06, int P07, int P08, int P09,
+		int P10, int P11, int P12, int P13, int P14,
+		int P15, int P16, int P17, int P18, int P19	
+	>
+	const int HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19 
+	>::DIFFS[] = {
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19, 0 
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// LENGTH meta-function for fixed gapped shapes
+
+	template <>
+	struct LENGTH< HardwiredShape<
+		0,0,0,0,0,
+		0,0,0,0,0,
+		0,0,0,0,0,
+		0,0,0,0,0> >
+	{
+		enum { VALUE = 1 };
+	};
+
+	template <
+		int P00, int P01, int P02, int P03, int P04, 
+		int P05, int P06, int P07, int P08, int P09,
+		int P10, int P11, int P12, int P13, int P14,
+		int P15, int P16, int P17, int P18, int P19	
+	>
+	struct LENGTH< HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19> >
+	{
+		enum { VALUE = LENGTH< HardwiredShape<
+			P01,P02,P03,P04,P05,
+			P06,P07,P08,P09,P10,
+			P11,P12,P13,P14,P15,
+			P16,P17,P18,P19, 0 > >::VALUE + P00 };
+	};
+
+	template <
+	    typename TValue,
+		int P00, int P01, int P02, int P03, int P04, 
+		int P05, int P06, int P07, int P08, int P09,
+		int P10, int P11, int P12, int P13, int P14,
+		int P15, int P16, int P17, int P18, int P19	
+	>
+	struct LENGTH< Shape<TValue, GappedShape< HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19 
+	> > > >:
+	LENGTH< HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19 
+	> > {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// WEIGHT meta-function for fixed gapped shapes
+
+	template <>
+	struct WEIGHT< HardwiredShape<
+		0,0,0,0,0,
+		0,0,0,0,0,
+		0,0,0,0,0,
+		0,0,0,0,0> >
+	{
+		enum { VALUE = 1 };
+	};
+
+	template <
+		int P00, int P01, int P02, int P03, int P04, 
+		int P05, int P06, int P07, int P08, int P09,
+		int P10, int P11, int P12, int P13, int P14,
+		int P15, int P16, int P17, int P18, int P19	
+	>
+	struct WEIGHT< HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19> >
+	{
+		enum { VALUE = WEIGHT< HardwiredShape<
+			P01,P02,P03,P04,P05,
+			P06,P07,P08,P09,P10,
+			P11,P12,P13,P14,P15,
+			P16,P17,P18,P19, 0 > >::VALUE + 1 };
+	};
+
+	template <
+	    typename TValue,
+		int P00, int P01, int P02, int P03, int P04, 
+		int P05, int P06, int P07, int P08, int P09,
+		int P10, int P11, int P12, int P13, int P14,
+		int P15, int P16, int P17, int P18, int P19	
+	>
+	struct WEIGHT< Shape<TValue, GappedShape< HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19 
+	> > > >:
+	WEIGHT< HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19 
+	> > {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.GenericShape:
+..cat:Index
+..summary:A variable gapped shape.
+..general:Class.Shape
+..signature:Shape<TValue, GenericShape>
+..param.TValue:The @Metafunction.Value@ type of the string the shape is applied to (e.g. $Dna$).
+..remarks:A GenericShape must be initialized first with a valid shape. To do so, call @Function.stringToShape at .
+..see:Spec.GappedShape
+..include:seqan/index.h
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// variable gapped shape
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TValue>
+	class Shape<TValue, GenericShape>
+	{
+	public:
+//____________________________________________________________________________
+
+		unsigned span;
+		unsigned weight;
+		String<int> diffs;
+	
+		typename Value<Shape>::Type	hValue;		// current hash value
+//____________________________________________________________________________
+
+/**
+.Memfunc.GenericShape#Shape:
+..class:Spec.GenericShape
+..summary:Constructor
+..signature:Shape<TValue, GenericShape> ()
+..signature:Shape<TValue, GenericShape> (q)
+..signature:Shape<TValue, GenericShape> (shape)
+..signature:Shape<TValue, GenericShape> (bitmap)
+..signature:Shape<TValue, GenericShape> (predefined)
+..param.q:Creates an ungapped q-gram.
+..param.shape:Any other gapped/ungapped shape.
+..param.bitmap:Bitmap string. Sequence of '0's and '1's.
+...see:Function.stringToShape
+..param.predefined:Any instance of a predefined shape spec (e.g. $ShapePatternHunter$).
+..see:Class.HardwiredShape
+*/
+		Shape():
+			hValue(0) {}
+
+		// c'tor for ungapped shapes
+		Shape(unsigned _span):
+			span(_span),
+			weight(_span),
+			hValue(0)
+		{
+		SEQAN_CHECKPOINT
+			resize(diffs, _span);
+			for(unsigned i = 0; i < _span; ++i)
+				diffs[i] = 1;
+		}
+
+		Shape(Shape const &other):
+			span(other.span),
+			weight(other.weight),
+			diffs(other.diffs),
+			hValue(other.hValue) {}	
+
+		template <typename TSpec>
+		Shape(Shape<TValue, TSpec> const &other)
+		{
+			*this = other;
+		}	
+
+		template <typename TSpec>
+		Shape(GappedShape<TSpec> const &other)
+		{
+			*this = other;
+		}
+
+		template <typename TStringValue, typename TSpec>
+		Shape(String<TStringValue, TSpec> const &bitmap)
+		{
+			*this = bitmap;
+		}	
+
+//____________________________________________________________________________
+
+		template <unsigned q>
+		inline Shape &
+		operator=(Shape<TValue, UngappedShape<q> > const &other)
+		{
+			span = length(other);
+			weight = seqan::weight(other);
+			resize(diffs, weight);
+			for(unsigned i = 1; i < weight; ++i)
+				diffs[i] = 1;
+			hValue = other.hValue;
+			return *this;
+		}
+
+		template <typename TSpec>
+		inline Shape &
+		operator=(Shape<TValue, GappedShape<TSpec> > const &other)
+		{
+			span = other.span;
+			weight = other.weight;
+			diffs = other.diffs;
+			hValue = other.hValue;
+			return *this;
+		}
+
+		template <typename TSpec>
+		inline Shape &
+		operator=(GappedShape<TSpec> const)
+		{
+			typedef Shape<TValue, GappedShape<TSpec> > TShape;
+			return *this = TShape();
+		}
+
+		template <typename TStringValue, typename TSpec>
+		inline Shape &
+		operator=(String<TStringValue, TSpec> const &bitmap)
+		{
+			stringToShape(*this, bitmap);
+			return *this;
+		}
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.GappedShape:
+..cat:Index
+..summary:A fixed gapped shape.
+..general:Class.Shape
+..signature:Shape<TValue, GappedShape<TSpec> >
+..param.TValue:The @Metafunction.Value@ type of the string the shape is applied to (e.g. $Dna$).
+..param.TSpec:A structure to store the shape at compile-time.
+...type:Class.HardwiredShape
+..remarks:There are predefined shapes in $index/shape_predefined.h$.
+You can simply use them with $Shape<TValue, ShapePatternHunter>$ for example.
+..see:Class.HardwiredShape
+..include:seqan/index.h
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// fixed gapped shape
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TValue, typename TSpec>
+	class Shape<TValue, GappedShape<TSpec> >
+	{
+	public:
+//____________________________________________________________________________
+
+		typedef GappedShape<TSpec>	TShapeSpec;
+
+		enum { span = LENGTH<Shape>::VALUE };
+		enum { weight = WEIGHT<Shape>::VALUE };
+		const int *diffs;
+	
+		typename Value<Shape>::Type	hValue;		// current hash value
+//____________________________________________________________________________
+
+		Shape():
+			diffs(TSpec::DIFFS),
+			hValue(0) {}
+
+		Shape(Shape const &other):
+			diffs(other.diffs),	
+			hValue(other.hValue) {}
+//____________________________________________________________________________
+
+		inline Shape &
+		operator=(Shape const &other)
+		{
+			hValue = other.hValue;
+      return *this;
+		}
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TValue, typename TSpec>
+	inline typename Size< Shape<TValue, GappedShape<TSpec> > >::Type
+	weight(Shape<TValue, GappedShape<TSpec> > const & me)
+	{
+	SEQAN_CHECKPOINT
+		return me.weight;
+	}
+
+//____________________________________________________________________________
+
+	template <typename TValue, typename TIter>
+	inline typename Value< Shape<TValue, GenericShape> >::Type
+	hash(Shape<TValue, GenericShape> &me, TIter it)	
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, GenericShape> >::Type	THValue;
+		typedef typename Size< Shape<TValue, GenericShape> >::Type	TSize;
+
+		me.hValue = ordValue((TValue)*it);
+		TSize iEnd = me.weight - 1;
+		for(TSize i = 0; i < iEnd; ++i) {
+			goFurther(it, me.diffs[i]);
+			me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+		}
+		return me.hValue;
+	}
+
+	template <typename TValue, typename TSpec, typename TIter, typename TSize>
+	inline typename Value< Shape<TValue, GappedShape<TSpec> > >::Type
+	hash(Shape<TValue, GappedShape<TSpec> > &me, TIter it, TSize charsLeft)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, GappedShape<TSpec> > >::Type	THValue;
+
+		if (charsLeft >= (TSize)me.span) 
+			return hash(me, it);
+
+		TSize i = 0;
+		if (charsLeft > 0) {
+			me.hValue = ordValue((TValue)*it);
+			TSize d;
+			while (charsLeft > (d = me.diffs[i])) {
+				charsLeft -= d;
+				goFurther(it, d);
+				me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+				++i;
+			}
+			++i;
+		} else
+			return me.hValue = 0;
+
+		// fill shape with zeros
+		for(; i < (TSize)me.weight; ++i)
+			me.hValue *= ValueSize<TValue>::VALUE;
+		return me.hValue;
+	}
+
+	template <typename TValue, typename TSpec, typename TIter, typename TSize>
+	inline typename Value< Shape<TValue, GappedShape<TSpec> > >::Type
+	hashUpper(Shape<TValue, GappedShape<TSpec> > &me, TIter it, TSize charsLeft)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, GappedShape<TSpec> > >::Type	THValue;
+
+		if (charsLeft >= (TSize)me.span) {
+			hash(me, it);
+			return ++me.hValue;
+		}
+
+		TSize i = 0;
+		if (charsLeft > 0) {
+			me.hValue = ordValue((TValue)*it);
+			TSize d;
+			while (charsLeft > (d = me.diffs[i])) {
+				charsLeft -= d;
+				goFurther(it, d);
+				me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+				++i;
+			}
+			++i;
+			++me.hValue;
+		} else
+			me.hValue = 1;
+
+		// fill shape with zeros
+		for(; i < (TSize)me.weight; ++i)
+			me.hValue *= ValueSize<TValue>::VALUE;
+		return me.hValue;
+	}
+
+//____________________________________________________________________________
+
+	template <typename THValue, typename TValue, typename TIter>
+	inline THValue
+	_hashHardwiredShape(THValue hash, TIter &, TValue const, HardwiredShape<
+		0,0,0,0,0,
+		0,0,0,0,0,
+		0,0,0,0,0,
+		0,0,0,0,0 > const)
+	{
+		return hash;
+	}
+
+	template <
+		         int P01, int P02, int P03, int P04,
+		int P05, int P06, int P07, int P08, int P09,
+		int P10, int P11, int P12, int P13, int P14,
+		int P15, int P16, int P17, int P18, int P19,
+		typename THValue, typename TValue, typename TIter
+	>
+	inline THValue
+	_hashHardwiredShape(THValue hash, TIter &it, TValue const, HardwiredShape<
+		 1 ,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19 > const)
+	{
+		++it;
+		return _hashHardwiredShape(hash * ValueSize<TValue>::VALUE + ordValue((TValue)*it),
+			it, TValue(), HardwiredShape<
+				P01,P02,P03,P04,P05,
+				P06,P07,P08,P09,P10,
+				P11,P12,P13,P14,P15,
+				P16,P17,P18,P19, 0 >());
+	}
+
+	template <
+		int P00, int P01, int P02, int P03, int P04,
+		int P05, int P06, int P07, int P08, int P09,
+		int P10, int P11, int P12, int P13, int P14,
+		int P15, int P16, int P17, int P18, int P19,
+		typename THValue, typename TValue, typename TIter
+	>
+	inline THValue
+	_hashHardwiredShape(THValue hash, TIter &it, TValue const, HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19 > const)
+	{
+		it += P00;
+		return _hashHardwiredShape(hash * ValueSize<TValue>::VALUE + ordValue((TValue)*it),
+			it, TValue(), HardwiredShape<
+				P01,P02,P03,P04,P05,
+				P06,P07,P08,P09,P10,
+				P11,P12,P13,P14,P15,
+				P16,P17,P18,P19, 0 >());
+	}
+
+	template <
+		int P00, int P01, int P02, int P03, int P04,
+		int P05, int P06, int P07, int P08, int P09,
+		int P10, int P11, int P12, int P13, int P14,
+		int P15, int P16, int P17, int P18, int P19,
+		typename TValue, typename TIter
+	>
+	inline typename Value< Shape<TValue, GappedShape< HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19 
+	> > > >::Type
+	hash(Shape<TValue, GappedShape< HardwiredShape<
+		P00,P01,P02,P03,P04,
+		P05,P06,P07,P08,P09,
+		P10,P11,P12,P13,P14,
+		P15,P16,P17,P18,P19 
+	> > > &me, TIter it)
+	{
+	SEQAN_CHECKPOINT
+		typedef HardwiredShape<
+			P00,P01,P02,P03,P04,
+			P05,P06,P07,P08,P09,
+			P10,P11,P12,P13,P14,
+			P15,P16,P17,P18,P19 >								TSpec;
+		typedef GappedShape<TSpec>							TShape;
+		typedef typename Value< Shape<TValue, TShape> >::Type	THValue;
+
+		me.hValue = (THValue)ordValue((TValue)*it);
+		return me.hValue = _hashHardwiredShape(me.hValue, it, TValue(), TSpec());
+	}
+
+//____________________________________________________________________________
+
+	template <typename TValue, typename TSpec, typename TIter>
+	inline typename Value< Shape<TValue, GappedShape<TSpec> > >::Type
+	hashNext(Shape<TValue, GappedShape<TSpec> > &me, TIter &it)
+	{
+	SEQAN_CHECKPOINT
+		return hash(me, it);
+	}
+
+
+//____________________________________________________________________________
+///.Function.stringToShape.param.shape.type:Spec.GenericShape
+
+	template <typename TValue, typename TSpec, typename TShapeString>
+	inline bool
+	stringToShape(
+		Shape<TValue, GappedShape<TSpec> > &me, 
+		TShapeString const &bitmap)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TShapeString const>::Type		TIter;
+		typedef typename Iterator<String<int> >::Type			TShapeIter;
+
+		unsigned oneCount = 0;
+		TIter it = begin(bitmap, Standard());
+		TIter itEnd = end(bitmap, Standard());
+		for(; it != itEnd; ++it)
+			if (*it == '1')
+				++oneCount;
+
+		if ((me.weight = oneCount) == 0) {
+			me.span = 0;
+			return false;
+		}
+		
+		resize(me.diffs, oneCount - 1);
+
+		unsigned diff = 1;
+		me.span = 1;
+		TShapeIter itS = begin(me.diffs, Standard());
+
+		it = begin(bitmap, Standard());
+		
+		// skip leading zeros
+		for(; it != itEnd && *it == '0' ; ++it) ;
+
+		if (*it != '1')
+			return false;
+
+		for(++it; it != itEnd; ++it) 
+		{
+			if (*it == '1') 
+			{
+				me.span += diff;
+				*itS = diff;
+				++itS;
+				diff = 0;
+			}
+			++diff;
+		}
+
+		return true;
+	}
+
+//____________________________________________________________________________
+
+	template <typename TShapeString, typename TValue, typename TSpec>
+	inline void
+	shapeToString(
+		TShapeString &bitmap,
+		Shape<TValue, GappedShape<TSpec> > const &me)
+	{
+	SEQAN_CHECKPOINT
+
+		clear(bitmap);
+		reserve(bitmap, length(me));		
+		appendValue(bitmap, '1');
+		for (unsigned i = 0; i < weight(me) - 1; ++i)
+		{
+			for (int j = 1; j < me.diffs[i]; ++j)
+				appendValue(bitmap, '0');
+			appendValue(bitmap, '1');
+		}
+	}
+
+//____________________________________________________________________________
+///.Function.reverse.param.object.type:Spec.GenericShape
+
+	template <typename TValue, typename TSpec>
+	inline void
+	reverse(Shape<TValue, GappedShape<TSpec> > &me)
+	{
+	SEQAN_CHECKPOINT
+		reverse(me.diffs);
+	}
+
+}	// namespace seqan
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/shape_onegapped.h b/src/SeqAn-1.3/seqan/index/shape_onegapped.h
new file mode 100644
index 0000000..96cdfaf
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/shape_onegapped.h
@@ -0,0 +1,376 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SHAPE_ONEGAPPED_H
+#define SEQAN_HEADER_SHAPE_ONEGAPPED_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// shape with one gap
+	//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.OneGappedShape:
+..cat:Index
+..summary:A variable shape with one optional gap.
+..general:Class.Shape
+..signature:Shape<TValue, OneGappedShape>
+..param.TValue:The @Metafunction.Value@ type of the string the shape is applied to (e.g. $Dna$).
+..remarks:A OneGappedShape must be initialized first with a valid shape. To do so, call @Function.stringToShape at .
+..see:Spec.GenericShape
+..include:seqan/index.h
+.Memfunc.OneGappedShape#Shape:
+..class:Spec.OneGappedShape
+..summary:Constructor
+..signature:Shape<TValue, OneGappedShape> ()
+..signature:Shape<TValue, OneGappedShape> (shape)
+..signature:Shape<TValue, OneGappedShape> (bitmap)
+..signature:Shape<TValue, OneGappedShape> (blockLen1, gapLen, blockLen2)
+..param.shape:Other Shape object. (copy constructor)
+..param.bitmap:Bitmap string. Sequence of '0's and '1's.
+...see:Function.stringToShape
+..param.blockLen1:Number of '1's in the first block.
+..param.gapLen:Number of '0's in the second block.
+..param.blockLen2:Number of '1's in the third block.
+*/
+
+	struct OneGappedShape;
+
+	template <typename TValue>
+	class Shape<TValue, OneGappedShape>
+	{
+	public:
+//____________________________________________________________________________
+
+		unsigned blockLen1;
+		unsigned gapLen;
+		unsigned blockLen2;
+	
+		typename Value<Shape>::Type	hValue;		// current hash value
+
+		TValue						leftChar;
+		typename Value<Shape>::Type	factor1;
+		typename Value<Shape>::Type	factor2;
+
+//____________________________________________________________________________
+
+		Shape():
+			hValue(0) {}
+
+		// c'tor for ungapped shapes
+		Shape(unsigned _blockLen1, unsigned _gapLen, unsigned _blockLen2):
+			blockLen1(_blockLen1),
+			gapLen(_gapLen),
+			blockLen2(_blockLen2),
+			hValue(0)
+		{
+		SEQAN_CHECKPOINT
+			typedef typename Value< Shape<TValue, OneGappedShape> >::Type	THValue;
+			factor1 = _intPow((THValue)ValueSize<TValue>::VALUE, weight(*this) - 1);
+			factor2 = _intPow((THValue)ValueSize<TValue>::VALUE, blockLen2);
+		}
+
+		Shape(Shape const &other):
+			blockLen1(other.blockLen1),
+			gapLen(other.gapLen),
+			blockLen2(other.blockLen2),
+			hValue(other.hValue),
+			leftChar(other.leftChar),
+			factor1(other.factor1), 
+			factor2(other.factor2) {}
+
+		template <typename TSpec>
+		Shape(Shape<TValue, TSpec> const &other)
+		{
+			*this = other;
+		}	
+
+		template <typename TSpec>
+		Shape(GappedShape<TSpec> const &other)
+		{
+			*this = other;
+		}
+
+		template <typename TStringValue, typename TSpec>
+		Shape(String<TStringValue, TSpec> const &bitmap)
+		{
+			*this = bitmap;
+		}	
+
+//____________________________________________________________________________
+
+
+		template <typename TStringValue, typename TSpec>
+		inline Shape &
+		operator=(String<TStringValue, TSpec> const &bitmap)
+		{
+			stringToShape(*this, bitmap);
+			return *this;
+		}
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TValue>
+	inline typename Size< Shape<TValue, OneGappedShape> >::Type
+	length(Shape<TValue, OneGappedShape> const &me)
+	{
+	SEQAN_CHECKPOINT
+		return me.blockLen1 + me.gapLen + me.blockLen2;
+	}
+
+//____________________________________________________________________________
+
+	template <typename TValue>
+	inline typename Size< Shape<TValue, OneGappedShape> >::Type
+	weight(Shape<TValue, OneGappedShape> const & me)
+	{
+	SEQAN_CHECKPOINT
+		return me.blockLen1 + me.blockLen2;
+	}
+
+//____________________________________________________________________________
+
+	template <typename TValue, typename TIter>
+	inline typename Value< Shape<TValue, OneGappedShape> >::Type
+	hash(Shape<TValue, OneGappedShape> &me, TIter it)	
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, OneGappedShape> >::Type	THValue;
+		typedef typename Size< Shape<TValue, OneGappedShape> >::Type	TSize;
+
+		me.hValue = ordValue(me.leftChar = *it);
+		for(TSize i = 1; i < me.blockLen1; ++i) {
+			goNext(it);
+			me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+		}
+		goFurther(it, me.gapLen);
+		for(TSize i = 0; i < me.blockLen2; ++i) {
+			goNext(it);
+			me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+		}
+		return me.hValue;
+	}
+
+	template <typename TValue, typename TIter, typename TSize>
+	inline typename Value< Shape<TValue, OneGappedShape> >::Type
+	hash(Shape<TValue, OneGappedShape> &me, TIter it, TSize charsLeft)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, OneGappedShape> >::Type	THValue;
+		TSize blockLen1 = me.blockLen1;
+		TSize blockLen2 = me.blockLen2;
+
+		if ((TSize)length(me) > charsLeft)
+		{
+			if (blockLen1 > charsLeft)
+			{
+				blockLen1 = charsLeft;
+				blockLen2 = 0;
+				if (blockLen1 == 0) return me.hValue = 0;
+			} else
+				if (blockLen1 + (TSize)me.gapLen > charsLeft)
+					blockLen2 = 0;
+				else
+					blockLen2 = charsLeft - (blockLen1 + me.gapLen);
+		}
+		
+		me.hValue = ordValue(me.leftChar = *it);
+		for(TSize i = 1; i < blockLen1; ++i) {
+			goNext(it);
+			me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+		}
+		goFurther(it, me.gapLen);
+		for(TSize i = 0; i < blockLen2; ++i) {
+			goNext(it);
+			me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+		}
+		// fill shape with zeros
+		TSize w = (TSize)weight(me);
+		for(TSize i = blockLen1 + blockLen2; i < w; ++i)
+			me.hValue *= ValueSize<TValue>::VALUE;
+		return me.hValue;
+	}
+
+	template <typename TValue, typename TIter, typename TSize>
+	inline typename Value< Shape<TValue, OneGappedShape> >::Type
+	hashUpper(Shape<TValue, OneGappedShape> &me, TIter it, TSize charsLeft)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, OneGappedShape> >::Type	THValue;
+		TSize blockLen1 = me.blockLen1;
+		TSize blockLen2 = me.blockLen2;
+
+		if ((TSize)length(me) > charsLeft)
+		{
+			if (blockLen1 > charsLeft)
+			{
+				blockLen1 = charsLeft;
+				blockLen2 = 0;
+			} else
+				if (blockLen1 + (TSize)me.gapLen > charsLeft)
+					blockLen2 = 0;
+				else
+					blockLen2 = charsLeft - (blockLen1 + me.gapLen);
+		}
+
+		me.hValue = 0;
+		me.leftChar = *it;
+		for(TSize i = 0; i < blockLen1; ++i) {
+			me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+			goNext(it);
+		}
+		goFurther(it, me.gapLen);
+		for(TSize i = 0; i < blockLen2; ++i) {
+			me.hValue = me.hValue * ValueSize<TValue>::VALUE + ordValue((TValue)*it);
+			goNext(it);
+		}
+		++me.hValue;
+
+		// fill shape with zeros
+		TSize w = (TSize)weight(me);
+		for(TSize i = blockLen1 + blockLen2; i < w; ++i)
+			me.hValue *= ValueSize<TValue>::VALUE;
+		return me.hValue;
+	}
+
+	template <typename TValue, typename TIter>
+	inline typename Value< Shape<TValue, OneGappedShape> >::Type
+	hashNext(Shape<TValue, OneGappedShape> &me, TIter &_it)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, OneGappedShape> >::Type	THValue;
+		TIter it(_it);
+
+		// remove leftmost character
+		me.hValue -= ordValue(me.leftChar) * me.factor1;
+		me.leftChar = *it;
+
+		// shift
+		me.hValue *= ValueSize<TValue>::VALUE;
+
+		// add emerging character
+		goFurther(it, me.blockLen1 - 1);
+		me.hValue += ordValue((TValue)*it) * me.factor2;
+
+		// subtract vanishing character
+		goFurther(it, me.gapLen);
+		me.hValue -= ordValue((TValue)*it) * me.factor2;
+
+		// add rightmost emerging character
+		goFurther(it, me.blockLen2);
+		me.hValue += ordValue((TValue)*it);
+
+		return me.hValue;
+	}
+
+
+//____________________________________________________________________________
+///.Function.stringToShape.param.shape.type:Spec.OneGappedShape
+///.Function.stringToShape.param.bitmap.remarks:If $shape$ is a @Spec.OneGappedShape@ at most two contiguous sequences of '1's are allowed.
+
+	template <typename TValue, typename TShapeString>
+	inline bool
+	stringToShape(
+		Shape<TValue, OneGappedShape> &me, 
+		TShapeString const &bitmap)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Iterator<TShapeString const>::Type				TIter;
+		typedef typename Value< Shape<TValue, OneGappedShape> >::Type	THValue;
+
+		TIter it = begin(bitmap, Standard());
+		TIter itEnd = end(bitmap, Standard());
+
+		me.blockLen1 = 0;
+		me.gapLen = 0;
+		me.blockLen2 = 0;
+
+		for(; it != itEnd && *it == '0' ; ++it) ;
+
+		for(; it != itEnd && *it == '1' ; ++it)
+			++me.blockLen1;
+
+		for(; it != itEnd && *it == '0' ; ++it)
+			++me.gapLen;
+
+		for(; it != itEnd && *it == '1' ; ++it)
+			++me.blockLen2;
+
+		for(; it != itEnd && *it == '0' ; ++it) ;
+
+		me.factor1 = _intPow((THValue)ValueSize<TValue>::VALUE, weight(me) - 1);
+		me.factor2 = _intPow((THValue)ValueSize<TValue>::VALUE, me.blockLen2);
+
+		return it == itEnd && me.blockLen1 > 0;
+	}
+
+//____________________________________________________________________________
+
+	template <typename TShapeString, typename TValue>
+	inline void
+	shapeToString(
+		TShapeString &bitmap,
+		Shape<TValue, OneGappedShape> const &me)
+	{
+	SEQAN_CHECKPOINT
+
+		clear(bitmap);
+		resize(bitmap, me.blockLen1, '1');
+		resize(bitmap, me.blockLen1 + me.gapLen, '0');
+		resize(bitmap, me.blockLen1 + me.gapLen + me.blockLen2, '1');
+	}
+
+//____________________________________________________________________________
+///.Function.reverse.param.object.type:Spec.OneGappedShape
+
+	template <typename TValue>
+	inline void
+	reverse(Shape<TValue, OneGappedShape> &me)
+	{
+	SEQAN_CHECKPOINT
+		typedef typename Value< Shape<TValue, OneGappedShape> >::Type	THValue;
+
+		unsigned temp = me.blockLen1;
+		me.blockLen1 = me.blockLen2;
+		me.blockLen2 = temp;
+		me.factor2 = _intPow((THValue)ValueSize<TValue>::VALUE, me.blockLen2);
+	}
+	
+}	// namespace seqan
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/shape_predefined.h b/src/SeqAn-1.3/seqan/index/shape_predefined.h
new file mode 100644
index 0000000..cfc3934
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/shape_predefined.h
@@ -0,0 +1,128 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SHAPE_PREDEFINED_H
+#define SEQAN_HEADER_SHAPE_PREDEFINED_H
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	//////////////////////////////////////////////////////////////////////////////
+	// some predefined gapped shapes
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Single seed of
+	// B.Ma and J.Tromp and M.Li, 
+	// "PatternHunter: faster and more sensitive homology search"
+	// Bioinformatics 18, 2002
+	//
+	// weight:11 
+	// length:18
+	// 
+	// shape:
+	// 111010010100110111
+
+	typedef GappedShape< 
+		HardwiredShape< 1, 1, 2, 3, 2, 3, 1, 2, 1, 1 > 
+	> ShapePatternHunter;
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Multiple seeds of
+	// L.Ilie and S.Ilie, "Fast Computation of Good Multiple Spaced Seeds"
+	// WABI, 2007
+	//
+	// weight:9 
+	// length:15 
+	//
+	// shapes:
+	// 111010100100111
+	// 110100110011101
+	// 111010001011011
+	//
+	// sensitivity:
+	// 65% 0.747975		70% 0.897741
+	// 75% 0.973134		80% 0.996226
+
+	typedef GappedShape< 
+		HardwiredShape< 1, 1, 2, 2, 3, 3, 1, 1 > 
+	> ShapeIlieA1;
+
+	typedef GappedShape< 
+		HardwiredShape< 1, 2, 3, 1, 3, 1, 1, 2 > 
+	> ShapeIlieA2;
+
+	typedef GappedShape< 
+		HardwiredShape< 1, 1, 2, 4, 2, 1, 2, 1 > 
+	> ShapeIlieA3;
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Multiple seeds of
+	// L.Ilie and S.Ilie, "Fast Computation of Good Multiple Spaced Seeds"
+	// WABI 2007
+	//
+	// weight:9 
+	// length:13..23 
+	//
+	// shapes:
+	// 1110110100111
+	// 11010000110010111
+	// 11100010010000101011
+	//
+	// sensitivity:
+	// 65% 0.767413		70% 0.910949
+	// 75% 0.978558		80% 0.997357
+
+	typedef GappedShape< 
+		HardwiredShape< 1, 1, 2, 1, 2, 3, 1, 1 > 
+	> ShapeIlieB1;
+
+	typedef GappedShape< 
+		HardwiredShape< 1, 2, 5, 1, 3, 2, 1, 1 > 
+	> ShapeIlieB2;
+
+	typedef GappedShape< 
+		HardwiredShape< 1, 1, 4, 3, 5, 2, 2, 1 > 
+	> ShapeIlieB3;
+
+
+}	// namespace seqan
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/index/shape_threshold.h b/src/SeqAn-1.3/seqan/index/shape_threshold.h
new file mode 100755
index 0000000..f1df337
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/index/shape_threshold.h
@@ -0,0 +1,1124 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SHAPE_THRESHOLD_H
+#define SEQAN_HEADER_SHAPE_THRESHOLD_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+struct ThreshQGramLemma_;
+struct ThreshExact_;
+struct ThreshHeuristic_;
+
+typedef Tag<ThreshQGramLemma_> const	ThreshQGramLemma;
+typedef Tag<ThreshHeuristic_> const		ThreshHeuristic;
+typedef Tag<ThreshExact_> const			ThreshExact;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// q-gram lemma
+//
+// - exact for ungapped shapes or errors <= 1
+// - lower bound gapped shapes
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TShape, typename TPatternLength, typename TErrors, typename TDistance>
+inline int qgramThreshold(TShape const & shape, TPatternLength patternLength, TErrors errors, TDistance const, ThreshQGramLemma const)
+{
+	int t = (int)patternLength - (int)length(shape) + 1 - (int)errors * (int)weight(shape);
+	return (t > 0)? t: 0;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// q-gram heuristic
+//
+// - exact for errors <= 1
+// - upper bound
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TShape, typename TPatternSize, typename TErrors, typename TDistance>
+int qgramThreshold(TShape const & shape, TPatternSize patternLength, TErrors errors, TDistance const, ThreshHeuristic const)
+{
+	String<unsigned char> coverage;
+	String<bool> preserved;
+	String<unsigned> ones;
+	CharString bitString;
+
+	// initialize coverage map and bitmap of preserved q-grams
+	resize(preserved, patternLength - length(shape) + 1, true);
+	resize(coverage, patternLength, 0);
+
+	shapeToString(bitString, shape);
+	for (unsigned i = 0; i < length(bitString); ++i)
+		if (bitString[i] == '1')
+		{
+			appendValue(ones, i);
+			for (unsigned j = 0; j < length(preserved); ++j)
+				++coverage[i + j];
+		}
+
+	// greedily destroy a maximum number of q-grams
+	for (; errors > 0; --errors)
+	{
+		// find position that destroys a maximum number of q-grams
+		unsigned maxCoverage = 0;
+		unsigned maxCoveragePos = 0;
+		for (unsigned i = 0; i < length(coverage); ++i)
+			if (maxCoverage < coverage[i])
+			{
+				maxCoverage = coverage[i];
+				maxCoveragePos = i;
+			}
+
+		// destroy q-grams
+		for (unsigned k = 0; k < length(ones); ++k)
+			if (ones[k] <= maxCoveragePos)
+			{
+				unsigned startPos = maxCoveragePos - ones[k];
+				if (startPos < length(preserved) && preserved[startPos])
+				{
+					preserved[startPos] = false;
+					for (unsigned l = 0; l < length(ones); ++l)
+						--coverage[startPos + ones[l]];
+				}
+			}
+	}
+
+	unsigned thresh = 0;
+	for (unsigned i = 0; i < length(preserved); ++i)
+		if (preserved[i])
+			++thresh;
+
+	return thresh;
+}	
+
+
+
+
+
+//____________________________________________________________________________
+// Extensions to SeqAn
+
+	struct ErrorAlphabet_ {};
+	typedef SimpleType<unsigned char, ErrorAlphabet_> ErrorAlphabet;
+
+	template <> struct ValueSize< ErrorAlphabet >    { enum { VALUE = 4 }; };
+	template <> struct BitsPerValue< ErrorAlphabet > { enum { VALUE = 2 }; };
+
+	template <typename T = void>
+	struct TranslateTableErrorToAscii_
+	{
+		static char const VALUE[4];
+	};
+	template <typename T>
+	char const TranslateTableErrorToAscii_<T>::VALUE[4] = {'.', 'M', 'I', 'D'};
+
+	inline void assign(Ascii & c_target, 
+					   ErrorAlphabet const & source)
+	{
+	SEQAN_CHECKPOINT
+		c_target = TranslateTableErrorToAscii_<>::VALUE[source.value];
+	}
+
+
+	struct ErrorPackedString;
+
+	template <typename TValue>
+	struct Host<String<TValue, Packed<ErrorPackedString> > >
+	{
+		typedef String<__int64, Array<1> > Type;
+	};
+
+	template <typename TValue>
+	struct Host<String<TValue, Packed<ErrorPackedString> > const >
+	{
+		typedef String<__int64, Array<1> > const Type;
+	};
+
+
+//____________________________________________________________________________
+
+	enum ErrorType {
+		SEQAN_MATCH    = 0,
+		SEQAN_MISMATCH = 1,
+		SEQAN_INSERT   = 2,
+		SEQAN_DELETE   = 3
+	};
+	
+	template <typename TDistance>
+	struct ErrorTypes {
+		enum { VALUE = 4 };
+	};
+
+	template <>
+	struct ErrorTypes<HammingDistance> {
+		enum { VALUE = 2 };
+	};
+
+	// descriptor of the modification pattern
+	// in the recursion it modifies the last q-gram of a read sequence
+	template <typename TDistance, typename TFloat>
+	struct SensitivityDPState_
+	{
+		enum { TRANSITIONS = ErrorTypes<TDistance>::VALUE };
+		TFloat prob;				// probability of this state
+		int transition[ErrorTypes<TDistance>::VALUE];	// returns previous state
+		unsigned char len;			// length of this pattern (shapeSpan-errors <= this value <= shapeSpan+errors)
+		unsigned char errors:4;		// errors in this state
+		bool skipFirst:1;			// skip this pattern if it is the first
+		bool skipLast:1;			// skip this pattern if it is the last
+		bool intermediate:1;		// this is an intermediate result (beginning with INSERT)
+		bool qgramHit:1;			// is this a q-gram hit? (result of the former delta function)
+	}
+#ifndef PLATFORM_WINDOWS
+	__attribute__((packed))
+#endif
+	;
+
+	// descriptor of the modification pattern
+	// in the recursion it modifies the last q-gram of a read sequence
+	template <typename TDistance>
+	struct ThreshDPState_
+	{
+		enum { TRANSITIONS = ErrorTypes<TDistance>::VALUE };
+		int transition[ErrorTypes<TDistance>::VALUE];	// returns previous state
+		unsigned char len;			// length of this pattern (shapeSpan-errors <= this value <= shapeSpan+errors)
+		unsigned char errors:4;		// errors in this state
+		bool skipFirst:1;			// skip this pattern if it is the first
+		bool skipLast:1;			// skip this pattern if it is the last
+		bool intermediate:1;		// this is an intermediate result (beginning with INSERT)
+		bool qgramHit:1;			// is this a q-gram hit? (result of the former delta function)
+	}
+#ifndef PLATFORM_WINDOWS
+	__attribute__((packed))
+#endif
+	;
+
+#ifdef PLATFORM_WINDOWS
+
+	template<typename TValue>
+	inline bool isnan(TValue value)
+	{
+		return value != value;
+	}
+
+	template<typename TValue>
+	inline bool isinf(TValue value)
+	{
+		return value == log(0.0);
+	}
+
+#else
+
+	template<typename TValue>
+	inline bool isnan(TValue value)
+	{
+		return std::isnan(value);
+	}
+
+	template<typename TValue>
+	inline bool isinf(TValue value)
+	{
+		return std::isinf(value);
+	}
+
+#endif
+
+
+	template <typename TValue>
+	inline long double
+	_transform(TValue a)
+	{
+#ifdef USE_LOGVALUES
+		return log(a);
+#else
+		return a;
+#endif
+	}
+
+	template <typename TValue>
+	inline long double
+	_transformBack(TValue a)
+	{
+#ifdef USE_LOGVALUES
+		return exp(a);
+#else
+		return a;
+#endif
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Returns the sum of two probability values in log space
+	template <typename TValue>
+	inline void
+	_probAdd(TValue &a, TValue b)
+	{
+#ifdef USE_LOGVALUES
+		if (isinf(a)) {
+			a = b;
+			return;
+		}
+		if (isinf(b)) return;
+		if (isnan(a + log(1 + exp(b - a)))) return;
+		a += log(1 + exp(b - a));
+#else
+		a += b;
+#endif
+	}
+
+	template <typename TValue>
+	inline TValue
+	_probMul(TValue a, TValue b)
+	{
+#ifdef USE_LOGVALUES
+		return a + b;
+#else
+		return a * b;
+#endif
+	}
+
+	template <typename TValue>
+	inline TValue
+	_probDiv(TValue a, TValue b)
+	{
+#ifdef USE_LOGVALUES
+		return a - b;
+#else
+		return a / b;
+#endif
+	}
+
+
+struct ErrorPatternLess
+{
+	template <typename TPattern>
+	bool operator() (TPattern const &a, TPattern const &b) const
+	{
+		typedef typename Iterator<TPattern const>::Type TIter;
+		TIter itA = end(a, Standard());
+		TIter itB = end(b, Standard());
+		TIter itEnd;
+		if (length(a) <= length(b))
+		{
+			itEnd = begin(a, Standard());
+			for (; itA != itEnd;) 
+			{
+				--itA;
+				--itB;
+				if (*itA < *itB) return true;
+				if (*itA > *itB) return false;
+			}
+			return false;
+		} else 
+		{
+			itEnd = begin(b, Standard());
+			for (; itB != itEnd;) 
+			{
+				--itA;
+				--itB;
+				if (*itA < *itB) return true;
+				if (*itA > *itB) return false;
+			}
+			return true;
+		}
+	}
+};
+
+template <typename TPatternStore, typename TPattern>
+inline int 
+_getErrorPatternIndex(TPatternStore const &patternStore, TPattern const &pattern)
+{
+	typedef typename Iterator<TPatternStore const>::Type TIter;
+	TIter lb = std::lower_bound(begin(patternStore, Standard()), end(patternStore, Standard()), pattern, ErrorPatternLess());
+	TIter invalid = end(patternStore, Standard());
+	if (lb != invalid && *lb == pattern) {
+//		std::cout << pattern;
+		return lb - begin(patternStore, Standard());
+	} else {
+/*		std::cerr << "  !Pattern Not Found! " << pattern;
+		if (lb != invalid) std::cerr << "\tnext is " << *lb;
+		std::cerr << std::endl;
+*/		return -1;
+	}
+}
+
+// Cut 1 read character and trailing INSERTs of the pattern
+template <typename TPattern>
+inline int 
+_cutErrorPattern(TPattern &_pattern)
+{
+	typedef typename Iterator<TPattern const, Standard>::Type TIter;
+	TPattern const & pattern = const_cast<TPattern const&>(_pattern);
+	TIter it = end(pattern, Standard());
+	int cuttedErrors = -2;
+
+	// cut trailing INSERTs
+	do {
+		--it;
+		++cuttedErrors;
+	} while ((int)getValue(it) == SEQAN_INSERT);
+
+	// cut non INSERT
+	if ((int)getValue(it) != SEQAN_MATCH)
+		++cuttedErrors;
+
+	//  and all adjacent INSERTs
+	do {
+		--it;
+		++cuttedErrors;
+	} while ((int)getValue(it) == SEQAN_INSERT);
+
+	resize(_pattern, 1 + (it - begin(pattern, Standard())));
+	return cuttedErrors;
+}
+
+template < typename TLogErrorDistr >
+typename Value<TLogErrorDistr>::Type 
+_getProb(TLogErrorDistr const &logError, int errorType, int readPos)
+{
+	int maxN = length(logError) / 4;
+	SEQAN_ASSERT(readPos >= 0 && readPos < maxN);
+	return logError[maxN * (int)errorType + readPos];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Returns log probability of q-gram-configuration q ending at position pos in sequence
+template < typename TState, typename TLogErrorDistr, typename TPattern >
+inline void
+_getLastPatternProb(TState &state, TLogErrorDistr const &logError, TPattern const &pattern, int span)
+{
+	int maxN = length(logError) / 4;
+	typename Value<TLogErrorDistr>::Type prob = _transform(1.0);
+	for (int i = 0, j = 0; j < (int)length(pattern); ++j)
+	{
+		prob = _probMul(prob, _getProb(logError, getValue(pattern, j), maxN - span + i));
+		if ((int)getValue(pattern, j) != SEQAN_INSERT)
+			++i;
+	}
+	state.prob = prob;
+}
+
+template < typename TState, typename TPattern >
+inline void
+_getLastPatternProb(TState &, Nothing const &, TPattern const &, int)
+{
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Initialize states-string for edit/hamming-distance filters
+template <
+	typename TStateString,
+	typename TShape,
+	typename TLogErrorDistr,
+	typename TDistance >
+void initPatterns(
+	TStateString &states,				// resulting states-string
+	TShape const &bitShape,				// bit-string of the shape
+	int maxErrors,						// allowed errors per pattern
+	TLogErrorDistr const &logError,		// error distribution (Nothing or string of 4*patternLen floats)
+	TDistance,							// enumerate hamming or edit distance patterns
+	bool optionMinOutput)				// omit output
+{
+#ifndef DEBUG_RECOG_DP
+//	typedef String<ErrorAlphabet, Packed<ErrorPackedString> >	TPattern;
+	typedef String<ErrorAlphabet>								TPattern;
+#endif
+
+	typedef typename Iterator<TPattern, Standard>::Type			TIter;
+	typedef typename Value<TStateString>::Type					TState;
+	
+	ErrorType lastErrorType = (IsSameType<TDistance, HammingDistance>::VALUE)? SEQAN_MISMATCH: SEQAN_DELETE;
+
+	SEQAN_ASSERT(SEQAN_MATCH == 0);
+	SEQAN_ASSERT((length(logError) % 4) == 0);
+
+#ifndef DEBUG_RECOG_DP
+	String<TPattern> patternStore;
+#endif
+
+	// a modifier is a pair of position and error type
+	String<Pair<int, ErrorType> > mods;
+	resize(mods, maxErrors, Pair<int, ErrorType> (0, SEQAN_MATCH));
+
+	TPattern pattern;
+	int span = length(bitShape);
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Enumerate all edit-modification patterns with up to k errors
+	if (maxErrors == 0) 
+	{
+		resize(pattern, span, (ErrorAlphabet)SEQAN_MATCH);
+		appendValue(patternStore, pattern, Generous());
+	}
+	else
+	do 
+	{
+		clear(pattern);
+		resize(pattern, span, (ErrorAlphabet)SEQAN_MATCH);
+
+		// place errors in the pattern
+		bool skip = false;
+		for (int i = 0; (i < maxErrors) && !skip; ++i)
+		{
+//			std::cout << mods[i].i1 << " " << (ErrorAlphabet)mods[i].i2 << "\t";
+			switch (mods[i].i2)
+			{
+			case SEQAN_MISMATCH:
+			case SEQAN_DELETE:
+				if (pattern[mods[i].i1] != (ErrorAlphabet)SEQAN_MATCH)
+				{
+					skip = true;
+					break;
+				}
+				pattern[mods[i].i1] = (ErrorAlphabet)mods[i].i2;
+				break;
+
+			case SEQAN_INSERT:
+				insertValue(pattern, mods[i].i1, (ErrorAlphabet)SEQAN_INSERT);
+				break;
+				
+			case SEQAN_MATCH:
+				break;
+			}
+		}
+
+		// remove redundant patterns
+		if (!skip) 
+		{
+			TIter it = begin(pattern, Standard());
+			TIter itEnd = end(pattern, Standard());
+			int left = getValue(it);
+			int right;
+			for (++it; (it != itEnd) && !skip; ++it, left = right) 
+			{
+				right = getValue(it);
+
+#ifdef NON_REDUNDANT
+				if (left == SEQAN_MISMATCH && right == SEQAN_DELETE) 
+					skip = true;	// MISMATCH before DELETE is DELETE before MISMATCH (already enumerated)
+
+				if (left == SEQAN_MISMATCH && right == SEQAN_INSERT) 
+					skip = true;	// MISMATCH before INSERT is INSERT before MISMATCH (already enumerated)
+
+				if (left == SEQAN_INSERT && right == SEQAN_DELETE) 
+					skip = true;	// INSERT before DELETE is one MISMATCH (already enumerated)
+				
+				if (left == SEQAN_DELETE && right == SEQAN_INSERT) 
+					skip = true;	// DELETE before INSERT is one MISMATCH (already enumerated)
+#endif
+			}
+			if (left == SEQAN_INSERT)
+				skip = true;		// no trailing INSERT allowed
+		}
+
+		if (!skip)
+		{
+			appendValue(patternStore, pattern, Generous());
+//			std::cout << pattern << std::endl;
+		}
+
+		// reposition modifiers
+		int i = 0;
+		for (; i < maxErrors; ++i)
+		{
+			if (mods[i].i2 == SEQAN_MATCH) continue;
+			int endPos = (mods[i].i2 == SEQAN_INSERT)? span + 1: span;
+			if (++mods[i].i1 < endPos) 
+			{
+				for(--i; i >= 0; --i)
+					mods[i].i1 = mods[i + 1].i1;
+				break;
+			}
+		}
+
+		if (i < maxErrors) continue;
+
+		for (i = 0; i < maxErrors; ++i)
+			mods[i].i1 = 0;
+		
+		// next state combination
+		for (i = 0; i < maxErrors; ++i)
+		{
+			if (mods[i].i2 == lastErrorType) continue;
+			mods[i].i2 = (ErrorType)(mods[i].i2 + 1);
+			for(--i; i >= 0; --i)
+				mods[i].i2 = SEQAN_MISMATCH;
+			break;
+		}
+		
+		if (i == maxErrors) break;
+
+	} while (true);
+	
+	if (!optionMinOutput) 
+		std::cout << "Stored " << length(patternStore) << " modification patterns" << std::flush;
+
+	reserve(patternStore, length(patternStore), Exact());
+	std::sort(begin(patternStore, Standard()), end(patternStore, Standard()), ErrorPatternLess());
+	for (int p = 1; p < (int)length(patternStore); ++p)
+	{
+		if (patternStore[p-1] == patternStore[p])
+			std::cerr << "  !Found duplicate! " << patternStore[p] << std::endl;
+	}
+
+	if (!optionMinOutput) 
+		std::cout << " and sorted them." << std::endl;
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Calculate transitions
+	resize(states, length(patternStore));
+	for (int p = 0; p < (int)length(patternStore); ++p)
+	{
+		pattern = patternStore[p];
+		TState &state = states[p];
+
+//		std::cout << pattern << "\t";
+
+		// count errors of current pattern
+		int errors = 0;
+		for (int i = 0; i < (int)length(pattern); ++i)
+			if ((int)getValue(pattern, i) != SEQAN_MATCH)
+				++errors;
+				
+		state.len = length(pattern);
+		state.errors = errors;
+		state.intermediate = (int)getValue(pattern, 0) == SEQAN_INSERT;
+		_getLastPatternProb(state, logError, pattern, span);
+//		std::cout << pattern << "\t";
+
+		state.skipFirst = false;
+		state.skipLast = false;
+
+#ifdef NON_REDUNDANT
+		int err = 0, del = 0;
+		for (int j = 0; j < (int)length(pattern); ++j)
+		{
+			switch ((int)getValue(pattern, j)) {
+				case SEQAN_MATCH:
+					++del;
+					break;
+
+				case SEQAN_DELETE:
+					++del;
+	
+				case SEQAN_INSERT:
+					++err;
+					break;
+
+				default:;
+			}
+			if (del > 0 && del <= err)
+				state.skipFirst = true;
+		}
+		err = del = 0;
+		for (int j = (int)length(pattern) - 1; j >= 0; --j)
+		{
+			switch ((int)getValue(pattern, j)) {
+				case SEQAN_MATCH:
+					++del;
+					break;
+
+				case SEQAN_DELETE:
+					++del;
+	
+				case SEQAN_INSERT:
+					++err;
+					break;
+			
+				default:;
+			}
+			if (del > 0 && del <= err)
+				state.skipLast = true;
+		}
+#else
+		state.skipFirst = (int)getValue(pattern, 0) == SEQAN_INSERT;
+#endif
+		// apply pattern to read q-gram
+		// and check if shape is recognized in the genome
+		state.qgramHit = false;
+		int delta = 0;
+		for (int j = 0, readPos = 0, genomePos = 0; j < (int)length(pattern); ++j) 
+		{
+			switch ((int)getValue(pattern, j))
+			{
+				case SEQAN_MATCH:
+					if (readPos == 0) {
+						// assert(bitShape[0] == '1')
+						delta = genomePos;
+						state.qgramHit = true;
+					} else
+						if (bitShape[readPos] == '1')
+							state.qgramHit &= (readPos + delta == genomePos);
+//					std::cout << readPos;
+					++readPos; ++genomePos;
+					break;
+				case SEQAN_MISMATCH:
+					// was it a relevant read position?
+					if (bitShape[readPos] == '1')
+						state.qgramHit = false;
+//					std::cout << 'x';
+					++readPos; ++genomePos;
+					break;
+				case SEQAN_DELETE:
+					// was it a relevant read position?
+					if (bitShape[readPos] == '1')
+						state.qgramHit = false;
+					++readPos;
+					break;
+				case SEQAN_INSERT:
+					++genomePos;
+//					std::cout << 'x';
+			}				
+		}
+//		std::cout << std::endl;
+
+		// prepend INSERT
+		++errors;
+		insertValue(pattern, 0, SEQAN_INSERT);
+		if ((int)SEQAN_INSERT < (int)state.TRANSITIONS)
+		{
+			if (errors <= maxErrors)
+				state.transition[SEQAN_INSERT] = _getErrorPatternIndex(patternStore, pattern);
+			else
+				state.transition[SEQAN_INSERT] = -1;
+		}
+
+		// prepend MISMATCH and cut INSERTS
+		errors -= _cutErrorPattern(pattern);
+		if ((int)SEQAN_MISMATCH < (int)state.TRANSITIONS)
+		{
+			pattern[0] = SEQAN_MISMATCH;
+			if (errors <= maxErrors)
+				state.transition[SEQAN_MISMATCH] = _getErrorPatternIndex(patternStore, pattern);
+			else
+				state.transition[SEQAN_MISMATCH] = -1;
+		}
+		
+		// prepend DELETE
+		if ((int)SEQAN_DELETE < (int)state.TRANSITIONS)
+		{
+			pattern[0] = SEQAN_DELETE;
+			if (errors <= maxErrors)
+				state.transition[SEQAN_DELETE] = _getErrorPatternIndex(patternStore, pattern);
+			else
+				state.transition[SEQAN_DELETE] = -1;
+		}
+
+		// prepend MATCH
+		if ((int)SEQAN_MATCH < (int)state.TRANSITIONS)
+		{
+			--errors;
+			pattern[0] = SEQAN_MATCH;
+			if (errors <= maxErrors)
+				state.transition[SEQAN_MATCH] = _getErrorPatternIndex(patternStore, pattern);
+			else
+				state.transition[SEQAN_MATCH] = -1;
+		}
+/*		
+		std::cout << "\t" << state.errors;
+		std::cout << "\t" << state.qgramHit;
+		std::cout << "\t" << state.leftError;
+		std::cout << "\t" << state.rightError;
+		std::cout << "\t" << state.transition[0];
+		std::cout << "\t" << state.transition[1];
+		std::cout << "\t" << state.transition[2];
+		std::cout << "\t" << state.transition[3];
+		std::cout << std::endl;
+*/	}
+	if (!optionMinOutput) 
+		std::cout << "Preprocessing finished." << std::endl;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Compute filtering loss of any q-gram filter (given a states-string)
+template <
+	typename TThreshString, 
+	typename TStateString >
+void computeExactQGramThreshold(
+	TThreshString &treshPerError,
+	TStateString const &states,
+	int span,
+	int maxErrors,
+	int maxN,
+	bool optionMinOutput)
+{
+	typedef typename Value<TStateString>::Type		TState;
+	typedef unsigned								TThresh;
+	typedef String<TThresh>							TMatrixCol;
+
+	int statesCount = length(states);
+//	int span = length(bitShape);
+
+	// columns n-1 and n for recursion 
+	TMatrixCol col0;	// addressing is colx[errors * statesCount + state]
+	TMatrixCol col1;
+	const TThresh infty = MaxValue<TThresh>::VALUE >> 1;
+	
+	resize(col0, maxErrors * statesCount, infty);
+	resize(col1, maxErrors * statesCount);
+
+	// RECURSION BEGIN
+	for (int s = 0; s < statesCount; ++s)
+	{
+		TState const &state = states[s];
+		if (state.skipFirst) continue;
+
+		// threshold is 1 iff we have a q-gram hit at the end
+		col0[s] = (state.qgramHit)? 1: 0;
+	}
+
+	// iterate over sequence length n
+	TMatrixCol *col = &col1;
+	TMatrixCol *colPrev = &col0;
+
+#ifdef DEBUG_RECOG_DP
+	std::cout << span << ":0";
+	dump(col0, 0,statesCount);
+	std::cout << " :1";
+	dump(col0, 1,statesCount);
+#endif
+	
+
+	// RECURSION
+	//
+	// thresh(n,q,e) = min(thresh(n-1,0|(q>>1),e),              delta=1/0 <-> q hat 0/>0 error
+	//                     thresh(n-1,1|(q>>1),e-1)) + delta
+		
+	for (int n = span; n < maxN; ++n)
+	{
+		for (int e = 0; e < maxErrors * statesCount; e += statesCount)
+		{		
+			for (int s = 0; s < statesCount; ++s)
+			{
+				TState const &state = states[s];				
+
+				// MATCH
+				TThresh t = (*colPrev)[e + state.transition[SEQAN_MATCH]];
+
+				// MISMATCH, INSERT, DELETE
+				if (e > 0)
+					for (int m = SEQAN_MISMATCH; m < TState::TRANSITIONS; ++m)
+					{
+						int prevState = state.transition[m];
+						if (prevState >= 0)
+						{
+							if (m == SEQAN_INSERT)
+								t = _min(t, (*col)[(e - statesCount) + prevState]);
+							else
+								t = _min(t, (*colPrev)[(e - statesCount) + prevState]);
+						}
+					}
+
+				(*col)[e + s] = t + state.qgramHit;
+			}
+			if (!optionMinOutput)
+				std::cout << '.' << std::flush;
+		}
+
+		TMatrixCol *tmp = col;
+		col = colPrev;
+		colPrev = tmp;
+
+#ifdef DEBUG_RECOG_DP
+		std::cout << n+1 << ":0";
+		dump(*colPrev, 0,statesCount);
+		std::cout << " :1";
+		dump(*colPrev, 1,statesCount);
+		std::cout << " :2";
+		dump(*colPrev, 2,statesCount);
+#endif
+	}
+	
+	if (!optionMinOutput)
+		std::cout << std::endl;
+
+	resize(treshPerError, maxErrors);
+	
+	// RECURSION END
+	for (int eSum = 0; eSum < maxErrors; ++eSum)
+	{
+		TThresh t = infty;
+		for (int s = 0; s < statesCount; ++s)
+		{
+			TState const &state = states[s];
+
+			// skip intermediate results
+			if (state.intermediate || state.skipLast) continue;
+			if (state.errors <= eSum)
+			{
+				int e = eSum - state.errors;
+				// multiply probability for the trailing pattern
+				t = _min(t, (*colPrev)[e * statesCount + s]);
+			}
+		}
+
+		if (t >= infty) t = 0;
+		treshPerError[eSum] = t;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Compute filtering loss of any q-gram filter (given a states-string)
+template <
+	typename TLossString, 
+	typename TLogErrorDistr, 
+	typename TStateString >
+void computeQGramFilteringSensitivity(
+	TLossString &found,
+	TStateString const &states,
+	int span,
+	int maxT,
+	int maxErrors,
+	TLogErrorDistr const &logError,
+//	bool optionAbsolute = false,
+	bool optionMinOutput)
+{
+	typedef typename Value<TLossString>::Type		TFloat;
+	typedef typename Value<TLogErrorDistr>::Type	TProbValue;
+	typedef typename Value<TStateString>::Type		TState;
+
+	typedef String<TFloat>							TMatrixCol;
+	typedef String<int>								TIntCol;
+
+	SEQAN_ASSERT((length(logError) % 4) == 0);
+
+	int maxN = length(logError) / 4;
+	int statesCount = length(states);
+	const bool optionAbsolute = false;
+//	int span = length(bitShape);
+
+	// columns n-1 and n for recursion 
+	TMatrixCol col0;
+	TMatrixCol col1;
+	resize(col0, maxErrors * statesCount * maxT, (TFloat)_transform(0.0));
+	resize(col1, maxErrors * statesCount * maxT);
+
+#ifdef COUNT_LOSSES
+	TFloat positive = _transform(0.0);
+	TFloat negative = _transform(1.0);
+#else
+	TFloat positive = _transform(1.0);
+	TFloat negative = _transform(0.0);
+#endif
+
+	// RECURSION BEGIN
+	for (int s = 0; s < statesCount; ++s) 
+	{
+		TState const &state = states[s];
+
+		if (state.skipFirst) continue;
+
+		// we miss no match if threshold t is 0
+		col0[s*maxT] = positive;
+
+		// for n==0
+		if (state.qgramHit)
+		{
+			// we miss no match if read q-gram is recognized
+			// --> probability of finding this MMP is 1, if t=1
+			col0[s*maxT+1] = positive;
+			// --> probability of finding this MMP is 0, if t>1
+			for (int t = 2; t < maxT; ++t)
+				col0[s*maxT+t] = negative;
+		} else
+		{
+			// we miss 1 match if t>0 and read q-gram is not recognized
+			// --> probability of finding this MMP is 0, if t>=1
+			for (int t = 1; t < maxT; ++t)
+				col0[s*maxT+t] = negative;
+		}
+	}
+
+	// iterate over sequence length n
+	TMatrixCol *col = &col1;
+	TMatrixCol *colPrev = &col0;
+
+#ifdef DEBUG_RECOG_DP
+	::std::cout << span << ":0";
+	dump(col0, 0,statesCount);
+	::std::cout << " :1";
+	dump(col0, 1,statesCount);
+#endif
+	
+
+	// RECURSION
+	//
+	// found(n,q,t,e) = (1-errorProb[n-span]) * found(n-1,0|(q>>1),t-delta,e) delta=1/0 <-> q hat 0/>0 fehler
+	//               + errorProb[n-span] * found(n-1,1|(q>>1),t-delta,e-1)
+	
+	// rekursion (fuer q-gram matches <=1 fehler)
+	// found(n,q,t,e) = (1-errorProb[n-span]) * found(n-1,0|(q>>1),t-delta,e) delta=1/0 <-> q hat <=1/>1 fehler
+	//               + errorProb[n-span] * found(n-1,1|(q>>1),t-delta,e-1)
+	
+	for (int n = span; n < maxN; ++n)
+	{
+		for (int e = 0; e < maxErrors * statesCount; e += statesCount)
+		{		
+			for (int s = 0; s < statesCount; ++s)
+			{
+				TState const &state = states[s];				
+				for (int t = 0; t < maxT; ++t)
+				{
+					int _t = t;
+					if (_t > 0 && state.qgramHit) --_t;
+
+					// MATCH
+					TFloat recovered = _probMul(
+						_getProb(logError, SEQAN_MATCH, n-span),
+						(*colPrev)[(e+state.transition[SEQAN_MATCH])*maxT+_t]);
+
+					// MISMATCH, INSERT, DELETE
+					for (int m = SEQAN_MISMATCH; m < 4; ++m)
+						if (e > 0)
+						{
+							int prevState = state.transition[m];
+							if (prevState >= 0)
+							{
+								if (m == SEQAN_INSERT)
+									_probAdd(recovered, _probMul(_getProb(logError,m,n-span), (*col)[((e-statesCount)+prevState)*maxT+t]));
+								else
+									_probAdd(recovered, _probMul(_getProb(logError,m,n-span), (*colPrev)[((e-statesCount)+prevState)*maxT+_t]));
+							}
+						}
+					(*col)[(e+s)*maxT+t] = recovered;
+				}
+			}
+			if (!optionMinOutput)
+				::std::cout << '.' << ::std::flush;
+		}
+
+		TMatrixCol *tmp = col;
+		col = colPrev;
+		colPrev = tmp;
+
+#ifdef DEBUG_RECOG_DP
+		::std::cout << n+1 << ":0";
+		dump(*colPrev, 0,statesCount);
+		::std::cout << " :1";
+		dump(*colPrev, 1,statesCount);
+		::std::cout << " :2";
+		dump(*colPrev, 2,statesCount);
+#endif
+	}
+	
+	if (!optionMinOutput)
+		::std::cout << ::std::endl;
+
+	// RECURSION END
+	for (int eSum = 0; eSum < maxErrors; ++eSum)
+		for (int t = 0; t < maxT; ++t) 
+		{
+			TFloat recovered = _transform(0.0);
+			for (int s = 0; s < statesCount; ++s)
+			{
+				TState const &state = states[s];
+
+				// skip intermediate results
+				if (state.intermediate || state.skipLast) continue;
+				if (state.errors <= eSum)
+				{
+					int e = eSum - state.errors;
+					// multiply probability for the trailing pattern
+					_probAdd(recovered, _probMul(state.prob, (*colPrev)[(e*statesCount+s)*maxT+t]));
+				}
+			}
+
+#ifndef COUNT_LOSSES
+			// we can only normalize probs if t==0 contains all k-pattern probs
+			if (t > 0 && !optionAbsolute)
+				recovered = _probDiv(recovered, found[eSum*maxT]);
+#endif
+
+			found[eSum*maxT+t] = recovered;
+		}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// q-gram threshold DP algorithm
+//
+// - exact threshold
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TShape, typename TPatternSize, typename TErrors, typename TDistance>
+int qgramThreshold(TShape const & shape, TPatternSize patternLength, TErrors errors, TDistance const dist, ThreshExact const)
+{
+	String<ThreshDPState_<TDistance> > states;
+	String<unsigned> thresh;
+	String<char> bitString;
+	
+	shapeToString(bitString, shape);
+	initPatterns(states, bitString, errors, Nothing(), dist, true);
+	computeExactQGramThreshold(thresh, states, length(bitString), errors + 1, patternLength, true);
+	
+	return thresh[errors];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// q-gram filter sensitivity DP algorithm
+//
+// - exact threshold
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSensitivityMatrix, typename TShape, typename TPatternSize, typename TErrors, typename TThresh, typename TDistance, typename TErrorDist>
+void qgramFilteringSensitivity(
+	TSensitivityMatrix & sensMat, 
+	TShape const & shape, 
+	TPatternSize patternLength, 
+	TErrors errors, 
+	TThresh maxThresh, 
+	TDistance const dist, 
+	ThreshExact const,
+	TErrorDist const & logErrorDistribution)
+{
+	typedef typename Value<TSensitivityMatrix>::Type TFloat;
+	String<SensitivityDPState_<TDistance, TFloat> > states;
+	String<unsigned> thresh;
+	String<char> bitString;
+	
+	maxThresh = _min(maxThresh, patternLength - length(shape) + 1);
+	resize(sensMat, (maxThresh + 1) * (errors + 1));
+	shapeToString(bitString, shape);
+
+	initPatterns(states, bitString, errors, logErrorDistribution, dist, true);
+	computeQGramFilteringSensitivity(sensMat, states, length(bitString), maxThresh + 1, errors + 1, logErrorDistribution, true);
+}
+
+}	// namespace seqan
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/map.h b/src/SeqAn-1.3/seqan/map.h
new file mode 100644
index 0000000..f018646
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map.h
@@ -0,0 +1,68 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MAP_H
+#define SEQAN_HEADER_MAP_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <set>
+#include <map>
+
+#include <seqan/sequence.h>
+#include <seqan/misc/misc_random.h>
+
+
+//____________________________________________________________________________
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/map/map_generated_forwards.h>
+#endif
+
+//____________________________________________________________________________
+
+#include <seqan/map/map_base.h>
+#include <seqan/map/map_vector.h>
+#include <seqan/map/map_skiplist.h>
+#include <seqan/map/map_chooser.h>
+#include <seqan/map/map_adapter_stl.h>
+
+//____________________________________________________________________________
+
+#include <seqan/map/sumlist.h>
+#include <seqan/map/sumlist_mini.h>
+#include <seqan/map/sumlist_skip.h>
+
+//____________________________________________________________________________
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/map/map_adapter_stl.h b/src/SeqAn-1.3/seqan/map/map_adapter_stl.h
new file mode 100644
index 0000000..270d7bc
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map/map_adapter_stl.h
@@ -0,0 +1,753 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MAP_ADAPTER_STL_H
+#define SEQAN_HEADER_MAP_ADAPTER_STL_H
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+struct Value< ::std::map<TKey, TCargo, TCompare, TAlloc> > 
+{
+    typedef Pair<TKey,TCargo> Type;
+};
+
+template <typename TKey, typename TCompare, typename TAlloc>
+struct Value< ::std::set<TKey, TCompare, TAlloc> > 
+{
+    typedef bool Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+struct Key< ::std::map<TKey,TCargo, TCompare, TAlloc>  >
+{
+    typedef TKey Type;
+};
+
+template <typename TKey, typename TCompare, typename TAlloc>
+struct Key< ::std::set<TKey, TCompare, TAlloc>  >
+{
+    typedef TKey Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+struct Cargo< ::std::map<TKey,TCargo, TCompare, TAlloc> >
+{
+    typedef TCargo Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TCompare, typename TAlloc>
+struct Size< ::std::set<TKey, TCompare, TAlloc> >
+{
+    //typedef ::std::set<TKey>::size_type Type;
+    typedef unsigned Type;
+};
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+struct Size< ::std::map<TKey,TCargo, TCompare, TAlloc> >
+{
+    //typedef ::std::map<TKey,TCargo>::size_type Type;
+    typedef unsigned Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+// traits for stl usage
+/*
+template <typename TKey, typename TCompare, typename TAlloc>
+struct AllocatorType< ::std::set<TKey, TCompare, TAlloc> >
+{
+    typedef TAlloc Type;
+};
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+struct AllocatorType< ::std::map<TKey, TCargo, TCompare, TAlloc> >
+{
+    typedef TAlloc Type;
+};
+
+template <typename T>
+struct StlComparator_;
+
+template <typename TKey, typename TCompare, typename TAlloc>
+struct StlComparator_< ::std::set<TKey, TCompare, TAlloc> >
+{
+    typedef TCompare Type;
+};
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+struct StlComparator_< ::std::map<TKey, TCargo, TCompare, TAlloc> >
+{
+    typedef TCompare Type;
+};
+
+*/
+
+
+template <typename T>
+struct StlIterator_
+{
+	typedef int Type;
+};
+template <typename TKey, typename TCompare, typename TAlloc>
+struct StlIterator_< ::std::set<TKey, TCompare, TAlloc> >
+{
+	typedef typename ::std::set<TKey, TCompare, TAlloc>::iterator Type;
+};
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+struct StlIterator_< ::std::map<TKey, TCargo, TCompare, TAlloc> >
+{
+	typedef typename ::std::map<TKey, TCargo, TCompare, TAlloc>::iterator Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TCompare, typename TAlloc>
+inline void
+assign(::std::set<TKey, TCompare, TAlloc> & target,
+	   ::std::set<TKey, TCompare, TAlloc> const & source)
+{
+    target = source;
+}
+
+template <typename TKey,typename TCargo, typename TCompare, typename TAlloc>
+inline void
+assign(::std::map<TKey,TCargo, TCompare, TAlloc> & target,
+	   ::std::map<TKey,TCargo, TCompare, TAlloc> const & source)
+{
+    target = source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc, typename TKey2>
+inline bool
+hasKey(::std::set<TValue,TCompare,TAlloc> & me, TKey2 const & _key)
+{
+SEQAN_CHECKPOINT
+    return (me.count(_key) != 0);
+}
+
+template <typename TValue, typename TCompare, typename TAlloc, typename TKey2>
+inline bool
+hasKey(::std::set<TValue,TCompare,TAlloc> const & me, TKey2 const & _key)
+{
+SEQAN_CHECKPOINT
+    return (me.count(_key) != 0);
+}
+
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2>
+inline bool
+hasKey(::std::map<TKey, TCargo, TCompare, TAlloc> & me, TKey2 const & _key)
+{
+SEQAN_CHECKPOINT
+    return (me.count(_key) != 0);
+}
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2>
+inline bool
+hasKey(::std::map<TKey, TCargo, TCompare, TAlloc> const & me, TKey2 const & _key)
+{
+SEQAN_CHECKPOINT
+    return (me.count(_key) != 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc>
+inline typename Size< ::std::set<TValue, TCompare, TAlloc> >::Type
+length(::std::set<TValue, TCompare, TAlloc> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.size();
+}
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+inline typename Size< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type
+length(::std::map<TKey,TCargo, TCompare, TAlloc> const & me)
+{
+SEQAN_CHECKPOINT
+	return me.size();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc, typename TValue2>
+inline void
+insert(::std::set<TValue, TCompare, TAlloc> & me,TValue2 const & _value)
+{
+SEQAN_CHECKPOINT
+    me.insert(_value);
+}
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2, typename TCargo2>
+inline void
+insert(::std::map<TKey,TCargo, TCompare, TAlloc> & me, 
+	   TKey2 const & _key, 
+	   TCargo2 const & _cargo)
+{
+SEQAN_CHECKPOINT
+
+	me[_key] = _cargo;
+}
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2>
+inline void
+insert(::std::map<TKey,TCargo, TCompare, TAlloc> & me,TKey2 const & _key)
+{
+SEQAN_CHECKPOINT
+
+	insert(me, _key, TCargo());
+}
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2, typename TCargo2, typename TSpec>
+inline void
+insert(::std::map<TKey,TCargo, TCompare, TAlloc> & me, Pair<TKey2,TCargo2,TSpec> const & _value)
+{
+SEQAN_CHECKPOINT
+	insert(me, _value.i1, _value.i2);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc>
+inline void
+clear(::std::set<TValue, TCompare, TAlloc> & me)
+{
+SEQAN_CHECKPOINT
+    me.clear();
+}
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+inline void
+clear(::std::map<TKey,TCargo, TCompare, TAlloc> & me)
+{
+SEQAN_CHECKPOINT
+    me.clear();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2>
+//inline typename Value< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type &
+//value(::std::map<TKey,TCargo, TCompare, TAlloc> & me,
+//	  TKey2 const & _key)
+//{    
+//    return me[_key];
+//}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2>
+inline typename Cargo< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type &
+cargo(::std::map<TKey,TCargo, TCompare, TAlloc> & me,
+	  TKey2 const & _key)
+{
+SEQAN_CHECKPOINT
+	return me[_key];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct StlSetIterator;
+struct StlMapIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+//                            MapIterator                                   //
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TIteratorSpec>
+struct Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc> , TIteratorSpec >
+{
+    typedef ::std::map<TKey,TCargo, TCompare, TAlloc> TStlMap_;
+	typedef Iter<TStlMap_, StlMapIterator> Type;
+};
+
+
+template <typename TStlMap>
+class Iter<TStlMap, StlMapIterator>
+{
+public:    
+    //typedef typename ::std::map<typename Key<TSTLMap>::Type,
+    //                            typename Cargo<TSTLMap>::Type,
+    //                            typename StlComparator_<TStlMap>::Type,
+    //                            typename AllocatorType<TStlMap>::Type >::iterator THostIter;
+
+	typedef typename StlIterator_<TStlMap>::Type THostIter;
+	THostIter _iter;
+    Holder<TStlMap> host_map_holder;
+
+	Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter(Iter const & other)
+		: _iter(other._iter)
+	{
+SEQAN_CHECKPOINT
+        host_map_holder = other.host_map_holder;
+	}
+
+	Iter(TStlMap & map)
+		: _iter(map.begin())
+    {
+SEQAN_CHECKPOINT
+        setValue(host_map_holder,map);
+	}
+
+	~Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter const & 
+	operator = (Iter const & other)
+	{
+SEQAN_CHECKPOINT
+        host_map_holder = other.host_map_holder;
+        _iter = other._iter;
+        return *this;
+	}
+	operator bool () const
+	{
+SEQAN_CHECKPOINT
+        return (_iter != value(host_map_holder).end());
+	}
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline bool
+operator == (Iter<TStlMap, StlMapIterator> const & left,
+			 Iter<TStlMap, StlMapIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return left._iter == right._iter;
+}
+
+template <typename TStlMap>
+inline bool
+operator != (Iter<TStlMap, StlMapIterator> const & left,
+			 Iter<TStlMap, StlMapIterator> const & right)
+{
+SEQAN_CHECKPOINT
+    return left._iter != right._iter;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TIteratorSpec>
+inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc>, TIteratorSpec>::Type
+begin(::std::map<TKey,TCargo, TCompare, TAlloc> & me,
+	  TIteratorSpec)
+{
+    typedef ::std::map<TKey,TCargo, TCompare, TAlloc> TStlMap;
+    typedef typename Iterator<TStlMap , TIteratorSpec>::Type TIterator;
+    return TIterator(me);
+}
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type
+begin(::std::map<TKey,TCargo, TCompare, TAlloc> & me)
+{
+    typedef ::std::map<TKey,TCargo, TCompare, TAlloc> TStlMap;
+    typedef typename Iterator<TStlMap>::Type TIterator;
+    return TIterator(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TIteratorSpec>
+inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type
+end(::std::map<TKey,TCargo, TCompare, TAlloc> & me,
+	  TIteratorSpec)
+{
+    typedef ::std::map<TKey,TCargo, TCompare, TAlloc> TStlMap;
+	typedef typename Iterator<TStlMap, TIteratorSpec>::Type TIterator;
+	TIterator _iter(me);
+    _iter._iter = me.end();
+    return _iter;
+}
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc>
+inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type
+end(::std::map<TKey,TCargo, TCompare, TAlloc> & me)
+{
+    typedef ::std::map<TKey,TCargo, TCompare, TAlloc> TStlMap;
+	typedef typename Iterator<TStlMap>::Type TIterator;
+	TIterator _iter(me);
+    _iter._iter = me.end();
+    return _iter;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline bool
+atEnd(Iter<TStlMap, StlMapIterator> & it)
+{
+SEQAN_CHECKPOINT
+	return (it._iter == value(it.host_map_holder).end());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline void
+goNext(Iter<TStlMap, StlMapIterator> & it)
+{
+SEQAN_CHECKPOINT
+	it._iter++;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline typename Value<TStlMap>::Type &
+value(Iter<TStlMap, StlMapIterator> & it)
+{
+SEQAN_CHECKPOINT
+    return it._iter->second;
+}
+template <typename TStlMap>
+inline typename Value<TStlMap>::Type &
+value(Iter<TStlMap, StlMapIterator> const & it)
+{
+SEQAN_CHECKPOINT
+	return it._iter->second;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline typename Key<TStlMap>::Type const &
+key(Iter<TStlMap, StlMapIterator> & it)
+{
+SEQAN_CHECKPOINT
+	return it._iter->first;
+}
+template <typename TStlMap>
+inline typename Key<TStlMap>::Type const &
+key(Iter<TStlMap, StlMapIterator> const & it)
+{
+SEQAN_CHECKPOINT
+	return it._iter->first;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline typename Cargo<TStlMap>::Type &
+cargo(Iter<TStlMap, StlMapIterator> & it)
+{
+SEQAN_CHECKPOINT
+	return it._iter->second;
+}
+template <typename TStlMap>
+inline typename Cargo<TStlMap>::Type &
+cargo(Iter<TStlMap, StlMapIterator> const & it)
+{
+SEQAN_CHECKPOINT
+	return it._iter->second;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//                             SetIterator                                    //
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc, typename TIteratorSpec>
+struct Iterator< ::std::set<TValue, TCompare, TAlloc> , TIteratorSpec >
+{
+    typedef ::std::set<TValue, TCompare, TAlloc> TStlMap_;
+	typedef Iter<TStlMap_, StlSetIterator> Type;
+};
+
+template <typename TStlMap>
+class Iter< TStlMap, StlSetIterator>
+{
+public:    
+    //typedef typename ::std::set<typename Key<TSTLMap>::Type,
+    //                            typename StlComparator_<TSTLMap>::Type,
+    //                            typename AllocatorType<TSTLMap>::Type >::iterator THostIter;
+	typedef typename StlIterator_<TStlMap>::Type THostIter;
+	THostIter _iter;
+    Holder<TStlMap> host_map_holder;
+
+	Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter(Iter const & other)
+		: _iter(other._iter)
+	{
+SEQAN_CHECKPOINT
+        host_map_holder = other.host_map_holder;
+	}
+
+	Iter(TStlMap & map)
+		: _iter(map.begin())
+    {
+SEQAN_CHECKPOINT
+        setValue(host_map_holder,map);
+	}
+
+	~Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter const & 
+	operator = (Iter const & other)
+	{
+SEQAN_CHECKPOINT
+        host_map_holder = other.host_map_holder;
+        _iter = other._iter;
+        return *this;
+	}
+	operator bool () const
+	{
+SEQAN_CHECKPOINT
+        return (_iter != value(host_map_holder).end());
+	}
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline bool
+operator == (Iter<TStlMap, StlSetIterator> const & left,
+			 Iter<TStlMap, StlSetIterator> const & right)
+{
+SEQAN_CHECKPOINT
+	return left._iter == right._iter;
+}
+
+template <typename TStlMap>
+inline bool
+operator != (Iter<TStlMap, StlSetIterator> const & left,
+			 Iter<TStlMap, StlSetIterator> const & right)
+{
+SEQAN_CHECKPOINT
+    return left._iter != right._iter;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc, typename TIteratorSpec>
+inline typename Iterator< ::std::set<TValue,TCompare,TAlloc>, TIteratorSpec>::Type
+begin(::std::set<TValue,TCompare,TAlloc> & me,
+	  TIteratorSpec)
+{
+    typedef ::std::set<TValue,TCompare,TAlloc> TStlMap;
+    typedef typename Iterator<TStlMap , TIteratorSpec>::Type TIterator;
+    return TIterator(me);
+}
+template <typename TValue, typename TCompare, typename TAlloc>
+inline typename Iterator< ::std::set<TValue,TCompare,TAlloc> >::Type
+begin(::std::set<TValue,TCompare,TAlloc> & me)
+{
+    typedef ::std::set<TValue,TCompare,TAlloc> TStlMap;
+    typedef typename Iterator<TStlMap>::Type TIterator;
+    return TIterator(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc, typename TIteratorSpec>
+inline typename Iterator< ::std::set<TValue, TCompare, TAlloc>, TIteratorSpec>::Type
+end(::std::set<TValue, TCompare, TAlloc> & me,
+	  TIteratorSpec)
+{
+    typedef ::std::set<TValue,TCompare,TAlloc> TStlMap;
+	typedef typename Iterator<TStlMap, TIteratorSpec>::Type TIterator;
+	TIterator _iter(me);
+    _iter._iter = me.end();
+    return _iter;
+}
+
+template <typename TValue, typename TCompare, typename TAlloc>
+inline typename Iterator< ::std::set<TValue,TCompare,TAlloc> >::Type
+end(::std::set<TValue,TCompare,TAlloc> & me)
+{
+    typedef ::std::set<TValue,TCompare,TAlloc> TStlMap;
+	typedef typename Iterator<TStlMap>::Type TIterator;
+	TIterator _iter(me);
+    _iter._iter = me.end();
+    return _iter;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline bool
+atEnd(Iter<TStlMap, StlSetIterator> & it)
+{
+SEQAN_CHECKPOINT
+	return (it._iter == value(it.host_map_holder).end());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline void
+goNext(Iter<TStlMap, StlSetIterator> & it)
+{
+SEQAN_CHECKPOINT
+    it._iter++;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//template <typename TStlMap>
+//inline typename Value<TStlMap>::Type &
+//value(Iter<TStlMap, StlSetIterator> & it)
+//{
+//    return hasKey(*it);
+//}
+//template <typename TStlMap>
+//inline typename Value<TStlMap>::Type &
+//value(Iter<TStlMap, StlSetIterator> const & it)
+//{
+//	return hasKey(*it);
+//}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStlMap>
+inline typename Key<TStlMap>::Type const &
+key(Iter<TStlMap, StlSetIterator> & it)
+{
+SEQAN_CHECKPOINT
+    return (*it._iter);
+}
+template <typename TStlMap>
+inline typename Key<TStlMap>::Type const &
+key(Iter<TStlMap, StlSetIterator> const & it)
+{
+SEQAN_CHECKPOINT
+	return (*it._iter);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc,typename TFind>
+inline typename Iterator< ::std::set<TValue, TCompare, TAlloc> >::Type
+find(::std::set<TValue, TCompare, TAlloc> & me,
+	 TFind const & _find)
+{
+SEQAN_CHECKPOINT
+    typedef ::std::set<TValue, TCompare, TAlloc> TMap;
+    typedef typename Iterator< TMap >::Type TMapIterator;  
+
+    TMapIterator _iter(me);
+    _iter._iter = me.find(_find);
+    if(!_iter){
+        _iter._iter = me.upper_bound(_find); 
+    }
+    return _iter;
+}
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TFind>
+inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type
+find(::std::map<TKey,TCargo, TCompare, TAlloc> & me,
+	 TFind const & _find)
+{
+SEQAN_CHECKPOINT
+    typedef ::std::map<TKey,TCargo, TCompare, TAlloc> TMap;
+    typedef typename Iterator< TMap >::Type TMapIterator;  
+
+    TMapIterator _iter(me);
+    _iter._iter = me.find(_find);
+    if(!_iter){
+        _iter._iter = me.upper_bound(_find); 
+    }
+    return _iter;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc, typename TMap2>
+inline void
+erase(::std::set<TValue, TCompare, TAlloc> & me,
+	  Iter<TMap2, StlSetIterator> const & it)
+{
+SEQAN_CHECKPOINT
+    me.erase(it._iter);
+}
+
+template <typename TKey, typename TCargo ,typename TMap2>
+inline void
+erase(::std::map<TKey,TCargo> & me,
+	  Iter<TMap2, StlMapIterator> const & it)
+{
+SEQAN_CHECKPOINT
+    me.erase(it._iter);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TCompare, typename TAlloc, typename TToRemove>
+inline void
+erase(::std::set<TValue, TCompare, TAlloc> & me,
+	  TToRemove const & to_remove)
+{
+SEQAN_CHECKPOINT
+    me.erase(to_remove);
+}
+
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TToRemove>
+inline void
+erase(::std::map<TKey,TCargo, TCompare, TAlloc> & me,
+	  TToRemove const & to_remove)
+{
+SEQAN_CHECKPOINT
+    me.erase(to_remove);
+}
+
+}
+#endif // #ifndef SEQAN_HEADER
diff --git a/src/SeqAn-1.3/seqan/map/map_base.h b/src/SeqAn-1.3/seqan/map/map_base.h
new file mode 100644
index 0000000..a7747ce
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map/map_base.h
@@ -0,0 +1,253 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MAP_BASE_H
+#define SEQAN_HEADER_MAP_BASE_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//insertion tags
+
+template <typename TSpec = Default>
+struct Skiplist;
+
+
+/**
+.Class.Map:
+..cat:Map
+..summary:Set/dictionary container.
+..signature:Map<TValue, TSpec >
+..param.TValue:Type of values that are stored in the map.
+...metafunction:Metafunction.Value
+...remarks:Use a @Class.Pair.Pair<Key, Cargo>@ to implement a dictionary mapping from $Key$ to $Cargo$.
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:@Spec.Skiplist@
+..include:seqan/map.h
+*/
+template <typename TElement, typename TSpec = Skiplist<> >
+class Map;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// In SeqAn sets and maps store elements as pairs of (key,cargo) 
+// the elements of sets without objects are the keys.
+//////////////////////////////////////////////////////////////////////////////
+
+/*moved to basic_aggregates.h
+template <typename TKey, typename TObject, typename TSpec>
+struct Key< Pair<TKey, TObject, TSpec> > 
+{
+	typedef TKey Type;
+};
+
+template <typename TKey, typename TCargo, typename TSpec>
+struct Cargo< Pair<TKey, TCargo, TSpec> > 
+{
+	typedef TCargo Type;
+};
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// Type for mapValue function that implements [] for map types 
+
+template <typename TMap, typename TCargo>
+struct MapValueImpl_
+{
+	typedef TCargo & Type;
+};
+template <typename TMap>
+struct MapValueImpl_<TMap, Nothing>
+{
+	typedef bool Type;
+};
+
+/**
+.Metafunction.MapValue:
+..cat:Map
+..summary:Type of the map value type.
+..signature:MapValue<T>::Type
+..param.T:A map type.
+...type:Class.Map
+..returns.param.Type:The type of the value of T.
+..see:Metafunction.Cols
+..include:seqan/map.h
+ */
+template <typename TMap>
+struct MapValue :
+	MapValueImpl_< TMap, typename Cargo<TMap>::Type >
+{
+};
+
+
+
+template <typename TCargo>
+struct ImplMapValue_
+{
+	template <typename TMap, typename TKey2>
+	static inline TCargo &
+	mapValue_(TMap & me,
+		TKey2 const & _key)
+	{
+		return cargo(me, _key);
+	}
+};
+
+template <>
+struct ImplMapValue_<Nothing>
+{
+	template <typename TMap, typename TKey2>
+	static inline bool
+	mapValue_(TMap & me,
+		TKey2 const & _key)
+	{
+		return hasKey(me, _key);
+	}
+};
+
+/**
+.Function.mapValue:
+..cat:Map
+..summary:Subscript operator $[ ]$ of maps. 
+..signature:MapValue mapValue(map, key)
+..param.map:A map.
+...type:Class.Map
+..param.key:A key.
+...metafunction:Metafunction.Key
+..returns:If $map$ is a set: The same as @Function.map#hasKey.hasKey(map, key)@.
+...text:If $map$ is a dictionary: The same as @Function.map#value.value(map, key)@.
+...metafunction:Metafunction.MapValue
+..remarks: Usually, @Function.map#value@ implements the subscript operator $[ ]$, but for maps, 
+this operator is implemented in $mapValue$. 
+The semantic of this operator depends on the kind of map: If the map has a @Metafunction.Cargo.cargo@, 
+than $mapValue(map, key)$ returns the cargo of the (first) value in the map of the given key.
+If the map has no @Metafunction.Cargo.cargo@, than the function returns a $true$, if $key$ is in $map$, or $false$ otherwise.
+...note:There is no way to create a set of @Class.Pair@, since it is always interpreted as a key/value pair.
+If you need a key type that holds two members, define your own key type.
+..remarks:You may overload @Function.key@ and @Function.cargo@ for your own value type in order to define, what part of your value type is used as key and what as cargo.
+..see:Function.map#value
+..see:Function.map#cargo
+..see:Function.map#hasKey
+..include:seqan/map.h
+*/
+
+template <typename TMap, typename TKey>
+inline typename MapValue<TMap>::Type
+mapValue(TMap & me,
+		 TKey const & _key)
+{
+	typedef typename Cargo<TMap>::Type TCargo;
+	return ImplMapValue_<TCargo>::mapValue_(me, _key);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TElement>
+inline TElement & 
+key(TElement & element) 
+{
+	return element;
+}
+template <typename TElement>
+inline TElement const & 
+key(TElement const & element) 
+{
+	return element;
+}
+
+template <typename TKey, typename TObject, typename TSpec>
+inline TKey & 
+key(Pair<TKey, TObject, TSpec> & element) 
+{
+	return element.i1;
+}
+template <typename TKey, typename TObject, typename TSpec>
+inline TKey const &
+key(Pair<TKey, TObject, TSpec> const & element) 
+{
+	return element.i1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TElement, typename TSource>
+inline void
+setKey(TElement & element,
+	   TSource const & source) 
+{
+	element = source;
+}
+template <typename TKey, typename TObject, typename TSpec, typename TSource>
+inline void 
+setKey(Pair<TKey, TObject, TSpec> & element,
+	   TSource const & source) 
+{
+	element.i1 = source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//no default cargo function
+
+template <typename TKey, typename TObject, typename TSpec>
+inline TObject & 
+cargo(Pair<TKey, TObject, TSpec> & element) 
+{
+	return element.i2;
+}
+template <typename TKey, typename TObject, typename TSpec>
+inline TObject const &
+cargo(Pair<TKey, TObject, TSpec> const & element) 
+{
+	return element.i2;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TObject, typename TSpec, typename TSource>
+inline void 
+setCargo(Pair<TKey, TObject, TSpec> & element,
+	   TSource const & source) 
+{
+	element.i2 = source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/map/map_chooser.h b/src/SeqAn-1.3/seqan/map/map_chooser.h
new file mode 100644
index 0000000..5906934
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map/map_chooser.h
@@ -0,0 +1,66 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MAP_CHOOSER_H
+#define SEQAN_HEADER_MAP_CHOOSER_H
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Set meta-function to choose an efficient implementation
+
+template <typename TValue, size_t SIZE>
+struct ChooseMap2_
+{
+	typedef Map<TValue, Skiplist< > > Type;
+};
+template <typename TValue>
+struct ChooseMap2_<TValue, 1>
+{
+	typedef Map<TValue, VectorSet< > > Type;
+};
+
+
+template <typename TValue>
+struct ChooseMap:
+	ChooseMap2_<TValue, sizeof(typename Key<TValue>::Type)>
+{};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/map/map_generated_forwards.h b/src/SeqAn-1.3/seqan/map/map_generated_forwards.h
new file mode 100644
index 0000000..4a94fa3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map/map_generated_forwards.h
@@ -0,0 +1,581 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_MAP_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_MAP_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AllocatorType
+
+template <typename T> struct AllocatorType;       	// "projects/library/seqan/map/map_skiplist.h"(85)
+
+//____________________________________________________________________________
+// ChooseMap
+
+template <typename TValue> struct ChooseMap;       	// "projects/library/seqan/map/map_chooser.h"(59)
+
+//____________________________________________________________________________
+// ChooseMap2_
+
+template <typename TValue, size_t SIZE> struct ChooseMap2_;       	// "projects/library/seqan/map/map_chooser.h"(46)
+
+//____________________________________________________________________________
+// DIMENSION
+
+template <typename T> struct DIMENSION;       	// "projects/library/seqan/map/sumlist.h"(54)
+
+//____________________________________________________________________________
+// ImplMapValue_
+
+template <typename TCargo> struct ImplMapValue_;       	// "projects/library/seqan/map/map_base.h"(120)
+
+//____________________________________________________________________________
+// Map
+
+template <typename TElement, typename TSpec > class Map;       	// "projects/library/seqan/map/map_base.h"(63)
+template <typename TValue, typename TSpec> class Map;       	// "projects/library/seqan/map/map_skiplist.h"(66)
+
+//____________________________________________________________________________
+// MapValue
+
+template <typename TMap> struct MapValue;       	// "projects/library/seqan/map/map_base.h"(113)
+
+//____________________________________________________________________________
+// MapValueImpl_
+
+template <typename TMap, typename TCargo> struct MapValueImpl_;       	// "projects/library/seqan/map/map_base.h"(90)
+
+//____________________________________________________________________________
+// MiniListEntry_
+
+template <typename TValue> struct MiniListEntry_;       	// "projects/library/seqan/map/sumlist_mini.h"(46)
+
+//____________________________________________________________________________
+// MiniSumList
+
+template <unsigned short SIZE , typename TSpec > struct MiniSumList;       	// "projects/library/seqan/map/sumlist_mini.h"(163)
+
+//____________________________________________________________________________
+// MiniSumListIterator
+
+struct MiniSumListIterator;       	// "projects/library/seqan/map/sumlist_mini.h"(652)
+
+//____________________________________________________________________________
+// MiniSumListValueIterator_
+
+struct MiniSumListValueIterator_;       	// "projects/library/seqan/map/sumlist_mini.h"(165)
+
+//____________________________________________________________________________
+// SkipListMapValue_
+
+template <typename TCargo> struct SkipListMapValue_;       	// "projects/library/seqan/map/map_skiplist.h"(958)
+
+//____________________________________________________________________________
+// SkipSumList
+
+template <typename TSpec > struct SkipSumList;       	// "projects/library/seqan/map/sumlist.h"(43)
+
+//____________________________________________________________________________
+// Skiplist
+
+template <typename TSpec > struct Skiplist;       	// "projects/library/seqan/map/map_base.h"(46)
+
+//____________________________________________________________________________
+// SkiplistElement
+
+template <typename TValue, typename TSpec> class SkiplistElement;       	// "projects/library/seqan/map/map_skiplist.h"(69)
+template <typename TValue, typename TSpec> class SkiplistElement;       	// "projects/library/seqan/map/map_skiplist.h"(213)
+
+//____________________________________________________________________________
+// SkiplistElement_
+
+template <typename T> struct SkiplistElement_;       	// "projects/library/seqan/map/map_skiplist.h"(105)
+
+//____________________________________________________________________________
+// SkiplistIterator
+
+struct SkiplistIterator;       	// "projects/library/seqan/map/map_skiplist.h"(80)
+
+//____________________________________________________________________________
+// SkiplistNext
+
+template <typename TValue, typename TSpec> class SkiplistNext;       	// "projects/library/seqan/map/map_skiplist.h"(72)
+template <typename TValue, typename TSpec> class SkiplistNext;       	// "projects/library/seqan/map/map_skiplist.h"(236)
+
+//____________________________________________________________________________
+// SkiplistPath
+
+template <typename TValue, typename TSpec> class SkiplistPath;       	// "projects/library/seqan/map/map_skiplist.h"(75)
+template <typename TValue, typename TSpec> class SkiplistPath;       	// "projects/library/seqan/map/map_skiplist.h"(264)
+
+//____________________________________________________________________________
+// StlIterator_
+
+template <typename T> struct StlIterator_;       	// "projects/library/seqan/map/map_adapter_stl.h"(127)
+
+//____________________________________________________________________________
+// StlMapIterator
+
+struct StlMapIterator;       	// "projects/library/seqan/map/map_adapter_stl.h"(291)
+
+//____________________________________________________________________________
+// StlSetIterator
+
+struct StlSetIterator;       	// "projects/library/seqan/map/map_adapter_stl.h"(290)
+
+//____________________________________________________________________________
+// SumList
+
+template <unsigned int DIM, typename TValue, typename TSpec > class SumList;       	// "projects/library/seqan/map/sumlist.h"(48)
+
+//____________________________________________________________________________
+// SumListValues
+
+template <unsigned int DIM, typename TValue> struct SumListValues;       	// "projects/library/seqan/map/sumlist.h"(91)
+
+//____________________________________________________________________________
+// Values
+
+template <typename T> struct Values;       	// "projects/library/seqan/map/sumlist.h"(135)
+
+//____________________________________________________________________________
+// VectorSet
+
+template <typename TSpec > struct VectorSet;       	// "projects/library/seqan/map/map_vector.h"(65)
+
+//____________________________________________________________________________
+// VectorSetElement_
+
+template <typename TCargo> struct VectorSetElement_;       	// "projects/library/seqan/map/map_vector.h"(73)
+
+//____________________________________________________________________________
+// VectorSetElements_
+
+template <typename T> struct VectorSetElements_;       	// "projects/library/seqan/map/map_vector.h"(87)
+
+//____________________________________________________________________________
+// VectorSetInsert_
+
+template <typename TCargo> struct VectorSetInsert_;       	// "projects/library/seqan/map/map_vector.h"(255)
+
+//____________________________________________________________________________
+// VectorSetIterator
+
+struct VectorSetIterator;       	// "projects/library/seqan/map/map_vector.h"(177)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _insertValues
+
+template <typename TSumList, typename TValues> inline bool _insertValues(TSumList & me, Iter<TSumList, MiniSumListValueIterator_> it, TValues const & new_values,  unsigned int & new_values_size);       	// "projects/library/seqan/map/sumlist_mini.h"(389)
+template <typename TSumList, typename TValue> inline bool _insertValues(TSumList & me, Iter<TSumList, MiniSumListValueIterator_> it, TValue const * new_values,  unsigned int & new_values_size);       	// "projects/library/seqan/map/sumlist_mini.h"(398)
+
+//____________________________________________________________________________
+// _miniSumListAssignValue
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TValue2> inline bool _miniSumListAssignValue(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me, unsigned char * ptr, int dim, TValue2 new_value);       	// "projects/library/seqan/map/sumlist_mini.h"(313)
+
+//____________________________________________________________________________
+// _miniSumListInsertValues
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TPosition, typename TValue2> inline bool _miniSumListInsertValues(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me, TPosition byte_pos, TValue2 const & new_values,  unsigned int & new_values_size);       	// "projects/library/seqan/map/sumlist_mini.h"(356)
+
+//____________________________________________________________________________
+// _miniSumListSizeOfValues
+
+template <unsigned int DIM, typename TValue> inline TValue _miniSumListSizeOfValues(SumListValues<DIM, TValue> const & vals);       	// "projects/library/seqan/map/sumlist_mini.h"(337)
+
+//____________________________________________________________________________
+// _skiplistAllocateElement
+
+template <typename TValue, typename TSpec> inline SkiplistElement<TValue, TSpec> & _skiplistAllocateElement(Map<TValue, Skiplist<TSpec> > & me, unsigned char height);       	// "projects/library/seqan/map/map_skiplist.h"(320)
+
+//____________________________________________________________________________
+// _skiplistConstructElement
+
+template <typename TValue, typename TSpec, typename TValue2> inline SkiplistElement<TValue, TSpec> & _skiplistConstructElement(Map<TValue, Skiplist<TSpec> > & me, unsigned char height, TValue2 const & _value);       	// "projects/library/seqan/map/map_skiplist.h"(364)
+
+//____________________________________________________________________________
+// _skiplistCreateHeight
+
+template <typename TValue, typename TSpec> inline unsigned char _skiplistCreateHeight(Map<TValue, Skiplist<TSpec> > & me);       	// "projects/library/seqan/map/map_skiplist.h"(408)
+template <typename TValue, typename TSpec> inline unsigned char _skiplistCreateHeight(Map<TValue, Skiplist<TSpec> > & me, SkiplistPath<TValue, TSpec> & path);       	// "projects/library/seqan/map/map_skiplist.h"(423)
+
+//____________________________________________________________________________
+// _skiplistDeallocateElement
+
+template <typename TValue, typename TSpec> inline void _skiplistDeallocateElement(Map<TValue, Skiplist<TSpec> > & me, SkiplistElement<TValue, TSpec> & el, unsigned char height);       	// "projects/library/seqan/map/map_skiplist.h"(380)
+
+//____________________________________________________________________________
+// _skiplistDestructElement
+
+template <typename TValue, typename TSpec> inline void _skiplistDestructElement(Map<TValue, Skiplist<TSpec> > & me, SkiplistElement<TValue, TSpec> & el, unsigned char height);       	// "projects/library/seqan/map/map_skiplist.h"(395)
+
+//____________________________________________________________________________
+// _skiplistFind
+
+template <typename TValue, typename TSpec, typename TFind> inline void _skiplistFind(Map<TValue, Skiplist<TSpec> > & me, TFind const & find,  SkiplistPath<TValue, TSpec> & path);       	// "projects/library/seqan/map/map_skiplist.h"(519)
+
+//____________________________________________________________________________
+// _skiplistFindGoNext
+
+template <typename TValue, typename TSpec, typename TKey> inline bool _skiplistFindGoNext(SkiplistNext<TValue, TSpec> & next, unsigned char, TKey const & _key);       	// "projects/library/seqan/map/map_skiplist.h"(490)
+template <typename TValue, typename TSpec> inline bool _skiplistFindGoNext(SkiplistNext<TValue, TSpec> & next, unsigned char, SkiplistElement<TValue, TSpec> const & el);       	// "projects/library/seqan/map/map_skiplist.h"(499)
+template <typename TValue, typename TSpec> inline bool _skiplistFindGoNext(SkiplistNext<TValue, TSpec> & next, unsigned char , GoEnd);       	// "projects/library/seqan/map/map_skiplist.h"(508)
+
+//____________________________________________________________________________
+// _skiplistGetHeight
+
+template <typename TValue, typename TSpec> inline unsigned char _skiplistGetHeight(Map<TValue, Skiplist<TSpec> > & me, SkiplistElement<TValue, TSpec> & el, SkiplistPath<TValue, TSpec> & path);       	// "projects/library/seqan/map/map_skiplist.h"(448)
+template <typename TValue, typename TSpec> inline unsigned char _skiplistGetHeight(Map<TValue, Skiplist<TSpec> > & me, SkiplistElement<TValue, TSpec> & el);       	// "projects/library/seqan/map/map_skiplist.h"(461)
+
+//____________________________________________________________________________
+// _skiplistInsertElement
+
+template <typename TValue, typename TSpec> inline void _skiplistInsertElement(Map<TValue, Skiplist<TSpec> > & me, SkiplistElement<TValue, TSpec> & el, SkiplistPath<TValue, TSpec> & path, unsigned char height);       	// "projects/library/seqan/map/map_skiplist.h"(590)
+template <typename TValue, typename TSpec> inline void _skiplistInsertElement(Map<TValue, Skiplist<TSpec> > & me, SkiplistElement<TValue, TSpec> & el, unsigned char height);       	// "projects/library/seqan/map/map_skiplist.h"(605)
+
+//____________________________________________________________________________
+// _skiplistUnlinkElement
+
+template <typename TValue, typename TSpec> inline void _skiplistUnlinkElement(Map<TValue, Skiplist<TSpec> > & me, SkiplistElement<TValue, TSpec> & el);       	// "projects/library/seqan/map/map_skiplist.h"(787)
+
+//____________________________________________________________________________
+// add
+
+template <typename TValue, typename TSpec, typename TValue2> inline void add(Map<TValue, Skiplist<TSpec> > & me, TValue2 const & _value);       	// "projects/library/seqan/map/map_skiplist.h"(759)
+template <typename TValue, typename TSpec, typename TKey2, typename TCargo2> inline void add(Map<TValue, Skiplist<TSpec> > & me, TKey2 const & _key, TCargo2 const & _cargo);       	// "projects/library/seqan/map/map_skiplist.h"(772)
+
+//____________________________________________________________________________
+// appendValues
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TValues> inline bool appendValues(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me, TValues const & new_values);       	// "projects/library/seqan/map/sumlist_mini.h"(410)
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TValue2> inline bool appendValues(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me, TValue2 const * new_values);       	// "projects/library/seqan/map/sumlist_mini.h"(418)
+
+//____________________________________________________________________________
+// assign
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec> inline void assign(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & target, SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const & source);       	// "projects/library/seqan/map/sumlist_mini.h"(230)
+template <typename TKey, typename TCompare, typename TAlloc> inline void assign(::std::set<TKey, TCompare, TAlloc> & target, ::std::set<TKey, TCompare, TAlloc> const & source);       	// "projects/library/seqan/map/map_adapter_stl.h"(147)
+template <typename TKey,typename TCargo, typename TCompare, typename TAlloc> inline void assign(::std::map<TKey,TCargo, TCompare, TAlloc> & target, ::std::map<TKey,TCargo, TCompare, TAlloc> const & source);       	// "projects/library/seqan/map/map_adapter_stl.h"(155)
+template <typename TValue, typename TSpec> inline void assign(Map<TValue, Skiplist<TSpec> > & target, Map<TValue, Skiplist<TSpec> > const & source);       	// "projects/library/seqan/map/map_skiplist.h"(283)
+
+//____________________________________________________________________________
+// assignValue
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TValue2> inline bool assignValue(Iter<SumList<DIM, TValue, MiniSumList<SIZE, TSpec> >, MiniSumListIterator > & it, int dim, TValue2 val);       	// "projects/library/seqan/map/sumlist_mini.h"(839)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TSet> inline bool atEnd(Iter<TSet, VectorSetIterator> & a);       	// "projects/library/seqan/map/map_vector.h"(405)
+template <typename TSet> inline bool atEnd(Iter<TSet, VectorSetIterator> const & a);       	// "projects/library/seqan/map/map_vector.h"(411)
+template <typename TSumList, typename TSumList2> inline bool atEnd(Iter< TSumList, MiniSumListValueIterator_ > & it, TSumList2 & container);       	// "projects/library/seqan/map/sumlist_mini.h"(635)
+template <typename TSumList, typename TSumList2> inline bool atEnd(Iter< TSumList, MiniSumListValueIterator_ > & it, TSumList2 const & container);       	// "projects/library/seqan/map/sumlist_mini.h"(643)
+template <typename TSumList> inline bool atEnd(Iter<TSumList, MiniSumListIterator> & it);       	// "projects/library/seqan/map/sumlist_mini.h"(793)
+template <typename TStlMap> inline bool atEnd(Iter<TStlMap, StlMapIterator> & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(428)
+template <typename TStlMap> inline bool atEnd(Iter<TStlMap, StlSetIterator> & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(626)
+template <typename TSkiplist> inline bool atEnd(Iter<TSkiplist, SkiplistIterator> & it);       	// "projects/library/seqan/map/map_skiplist.h"(1078)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TElement, typename TSpec> inline typename Iterator< Map<TElement, VectorSet<TSpec> > >::Type begin(Map<TElement, VectorSet<TSpec> > & set);       	// "projects/library/seqan/map/map_vector.h"(366)
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec> inline typename Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >::Type begin(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me);       	// "projects/library/seqan/map/sumlist_mini.h"(272)
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec> inline typename Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const>::Type begin(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const & me);       	// "projects/library/seqan/map/sumlist_mini.h"(280)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TIteratorSpec> inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc>, TIteratorSpec>::Type begin(::std::map<TKey,TCargo, TCompare, TAlloc> & me, TIteratorSpec);       	// "projects/library/seqan/map/map_adapter_stl.h"(384)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc> inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type begin(::std::map<TKey,TCargo, TCompare, TAlloc> & me);       	// "projects/library/seqan/map/map_adapter_stl.h"(392)
+template <typename TValue, typename TCompare, typename TAlloc, typename TIteratorSpec> inline typename Iterator< ::std::set<TValue,TCompare,TAlloc>, TIteratorSpec>::Type begin(::std::set<TValue,TCompare,TAlloc> & me, TIteratorSpec);       	// "projects/library/seqan/map/map_adapter_stl.h"(582)
+template <typename TValue, typename TCompare, typename TAlloc> inline typename Iterator< ::std::set<TValue,TCompare,TAlloc> >::Type begin(::std::set<TValue,TCompare,TAlloc> & me);       	// "projects/library/seqan/map/map_adapter_stl.h"(590)
+template <typename TValue, typename TSpec, typename TIteratorSpec> inline typename Iterator< Map<TValue, Skiplist<TSpec> >, TIteratorSpec>::Type begin(Map<TValue, Skiplist<TSpec> > & me, TIteratorSpec);       	// "projects/library/seqan/map/map_skiplist.h"(920)
+template <typename TValue, typename TSpec> inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type begin(Map<TValue, Skiplist<TSpec> > & me);       	// "projects/library/seqan/map/map_skiplist.h"(927)
+
+//____________________________________________________________________________
+// cargo
+
+template <typename TKey, typename TObject, typename TSpec> inline TObject & cargo(Pair<TKey, TObject, TSpec> & element);       	// "projects/library/seqan/map/map_base.h"(228)
+template <typename TKey, typename TObject, typename TSpec> inline TObject const & cargo(Pair<TKey, TObject, TSpec> const & element);       	// "projects/library/seqan/map/map_base.h"(234)
+template <typename TKey, typename TSpec, typename TKey2> inline typename Cargo< Map<TKey, VectorSet<TSpec> > >::Type & cargo(Map<TKey, VectorSet<TSpec> > & set, TKey2 const & _key);       	// "projects/library/seqan/map/map_vector.h"(349)
+template <typename TSet> inline typename Cargo<TSet>::Type & cargo(Iter<TSet, VectorSetIterator> &it);       	// "projects/library/seqan/map/map_vector.h"(434)
+template <typename TSet> inline typename Cargo<TSet>::Type & cargo(Iter<TSet, VectorSetIterator> const &it);       	// "projects/library/seqan/map/map_vector.h"(439)
+template <typename TSet> inline typename Cargo<TSet>::Type & cargo(Proxy<IteratorProxy<Iter<TSet, VectorSetIterator> > >& pr);       	// "projects/library/seqan/map/map_vector.h"(497)
+template <typename TSet> inline typename Cargo<TSet>::Type & cargo(Proxy<IteratorProxy<Iter<TSet, VectorSetIterator> > > const & pr);       	// "projects/library/seqan/map/map_vector.h"(503)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2> inline typename Cargo< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type & cargo(::std::map<TKey,TCargo, TCompare, TAlloc> & me, TKey2 const & _key);       	// "projects/library/seqan/map/map_adapter_stl.h"(283)
+template <typename TStlMap> inline typename Cargo<TStlMap>::Type & cargo(Iter<TStlMap, StlMapIterator> & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(482)
+template <typename TStlMap> inline typename Cargo<TStlMap>::Type & cargo(Iter<TStlMap, StlMapIterator> const & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(489)
+template <typename TValue, typename TSpec, typename TKey2> inline typename Cargo< Map<TValue, Skiplist<TSpec> > >::Type & cargo(Map<TValue, Skiplist<TSpec> > & me, TKey2 const & _key);       	// "projects/library/seqan/map/map_skiplist.h"(689)
+template <typename TSkiplist> inline typename Cargo<TSkiplist>::Type & cargo(Iter<TSkiplist, SkiplistIterator> & it);       	// "projects/library/seqan/map/map_skiplist.h"(1126)
+template <typename TSkiplist> inline typename Cargo<TSkiplist>::Type & cargo(Iter<TSkiplist, SkiplistIterator> const & it);       	// "projects/library/seqan/map/map_skiplist.h"(1132)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TValue, typename TSpec> inline void clear(Map<TValue, VectorSet<TSpec> > & me);       	// "projects/library/seqan/map/map_vector.h"(239)
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec> inline void clear(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me);       	// "projects/library/seqan/map/sumlist_mini.h"(261)
+template <typename TSumList> inline void clear(Iter<TSumList, MiniSumListIterator> & it);       	// "projects/library/seqan/map/sumlist_mini.h"(743)
+template <typename TValue, typename TCompare, typename TAlloc> inline void clear(::std::set<TValue, TCompare, TAlloc> & me);       	// "projects/library/seqan/map/map_adapter_stl.h"(254)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc> inline void clear(::std::map<TKey,TCargo, TCompare, TAlloc> & me);       	// "projects/library/seqan/map/map_adapter_stl.h"(262)
+template <unsigned int DIM, typename TValue> inline void clear(SumListValues<DIM, TValue> & me);       	// "projects/library/seqan/map/sumlist.h"(200)
+template <typename TValue, typename TSpec> inline void clear(Map<TValue, Skiplist<TSpec> > & me);       	// "projects/library/seqan/map/map_skiplist.h"(885)
+
+//____________________________________________________________________________
+// end
+
+template <typename TElement, typename TSpec> inline typename Iterator< Map<TElement, VectorSet<TSpec> > >::Type end(Map<TElement, VectorSet<TSpec> > &set);       	// "projects/library/seqan/map/map_vector.h"(377)
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec> inline typename Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >::Type end(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me);       	// "projects/library/seqan/map/sumlist_mini.h"(290)
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec> inline typename Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const>::Type end(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const& me);       	// "projects/library/seqan/map/sumlist_mini.h"(298)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TIteratorSpec> inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type end(::std::map<TKey,TCargo, TCompare, TAlloc> & me, TIteratorSpec);       	// "projects/library/seqan/map/map_adapter_stl.h"(404)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc> inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type end(::std::map<TKey,TCargo, TCompare, TAlloc> & me);       	// "projects/library/seqan/map/map_adapter_stl.h"(415)
+template <typename TValue, typename TCompare, typename TAlloc, typename TIteratorSpec> inline typename Iterator< ::std::set<TValue, TCompare, TAlloc>, TIteratorSpec>::Type end(::std::set<TValue, TCompare, TAlloc> & me, TIteratorSpec);       	// "projects/library/seqan/map/map_adapter_stl.h"(602)
+template <typename TValue, typename TCompare, typename TAlloc> inline typename Iterator< ::std::set<TValue,TCompare,TAlloc> >::Type end(::std::set<TValue,TCompare,TAlloc> & me);       	// "projects/library/seqan/map/map_adapter_stl.h"(613)
+template <typename TValue, typename TSpec, typename TIteratorSpec> inline typename Iterator< Map<TValue, Skiplist<TSpec> >, TIteratorSpec>::Type end(Map<TValue, Skiplist<TSpec> > &, TIteratorSpec);       	// "projects/library/seqan/map/map_skiplist.h"(940)
+template <typename TValue, typename TSpec> inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type end(Map<TValue, Skiplist<TSpec> > &);       	// "projects/library/seqan/map/map_skiplist.h"(947)
+
+//____________________________________________________________________________
+// erase
+
+template <typename TValue, typename TSpec, typename T> inline void erase(Map<TValue, VectorSet<TSpec> > &set, T const & tokill);       	// "projects/library/seqan/map/map_vector.h"(314)
+template <typename TValue, typename TCompare, typename TAlloc, typename TMap2> inline void erase(::std::set<TValue, TCompare, TAlloc> & me, Iter<TMap2, StlSetIterator> const & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(717)
+template <typename TKey, typename TCargo ,typename TMap2> inline void erase(::std::map<TKey,TCargo> & me, Iter<TMap2, StlMapIterator> const & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(726)
+template <typename TValue, typename TCompare, typename TAlloc, typename TToRemove> inline void erase(::std::set<TValue, TCompare, TAlloc> & me, TToRemove const & to_remove);       	// "projects/library/seqan/map/map_adapter_stl.h"(738)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TToRemove> inline void erase(::std::map<TKey,TCargo, TCompare, TAlloc> & me, TToRemove const & to_remove);       	// "projects/library/seqan/map/map_adapter_stl.h"(747)
+template <typename TValue, typename TSpec, typename TMap2> inline void erase(Map<TValue, Skiplist<TSpec> > & me, Iter<TMap2, SkiplistIterator> const & it);       	// "projects/library/seqan/map/map_skiplist.h"(827)
+template <typename TValue, typename TSpec, typename TToRemove> inline void erase(Map<TValue, Skiplist<TSpec> > & me, TToRemove const & to_remove);       	// "projects/library/seqan/map/map_skiplist.h"(836)
+
+//____________________________________________________________________________
+// eraseAll
+
+template <typename TValue, typename TSpec, typename TToRemove> inline void eraseAll(Map<TValue, Skiplist<TSpec> > & me, TToRemove const & to_remove);       	// "projects/library/seqan/map/map_skiplist.h"(868)
+
+//____________________________________________________________________________
+// find
+
+template <typename TKey, typename TKey2, typename TSpec> inline typename Iterator< Map<TKey2, VectorSet<TSpec> > >::Type find(Map<TKey2, VectorSet<TSpec> > & set, TKey const &key);       	// "projects/library/seqan/map/map_vector.h"(337)
+template <typename TValue, typename TCompare, typename TAlloc,typename TFind> inline typename Iterator< ::std::set<TValue, TCompare, TAlloc> >::Type find(::std::set<TValue, TCompare, TAlloc> & me, TFind const & _find);       	// "projects/library/seqan/map/map_adapter_stl.h"(680)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TFind> inline typename Iterator< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type find(::std::map<TKey,TCargo, TCompare, TAlloc> & me, TFind const & _find);       	// "projects/library/seqan/map/map_adapter_stl.h"(697)
+template <typename TValue, typename TSpec, typename TFind> inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type find(Map<TValue, Skiplist<TSpec> > & me, TFind const & _find, SkiplistPath<TValue, TSpec> & path);       	// "projects/library/seqan/map/map_skiplist.h"(561)
+template <typename TValue, typename TSpec, typename TFind> inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type find(Map<TValue, Skiplist<TSpec> > & me, TFind const & _find);       	// "projects/library/seqan/map/map_skiplist.h"(571)
+
+//____________________________________________________________________________
+// getSum
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec> inline typename Value< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >::Type & getSum(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me, unsigned int dim);       	// "projects/library/seqan/map/sumlist_mini.h"(252)
+template <typename TSumList> inline typename Value<TSumList>::Type getSum(Iter<TSumList, MiniSumListIterator > & it, int dim);       	// "projects/library/seqan/map/sumlist_mini.h"(813)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TSumList> inline typename Value<TSumList>::Type getValue(Iter<TSumList, MiniSumListValueIterator_ > & it);       	// "projects/library/seqan/map/sumlist_mini.h"(608)
+template <typename TSumList> inline typename Value<TSumList>::Type getValue(Iter<TSumList, MiniSumListIterator > & it, int dim);       	// "projects/library/seqan/map/sumlist_mini.h"(803)
+
+//____________________________________________________________________________
+// goBeforeEnd
+
+template <typename TSumList> inline void goBeforeEnd(Iter<TSumList, MiniSumListIterator> & it);       	// "projects/library/seqan/map/sumlist_mini.h"(780)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename TSumList> inline void goBegin(Iter<TSumList, MiniSumListIterator> & it);       	// "projects/library/seqan/map/sumlist_mini.h"(769)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TSet> inline void goNext(Iter<TSet, VectorSetIterator> & it);       	// "projects/library/seqan/map/map_vector.h"(466)
+template <typename TSumList> inline void goNext(Iter< TSumList, MiniSumListValueIterator_ > & it);       	// "projects/library/seqan/map/sumlist_mini.h"(596)
+template <typename TSumList> inline void goNext(Iter<TSumList, MiniSumListIterator> & it);       	// "projects/library/seqan/map/sumlist_mini.h"(755)
+template <typename TStlMap> inline void goNext(Iter<TStlMap, StlMapIterator> & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(438)
+template <typename TStlMap> inline void goNext(Iter<TStlMap, StlSetIterator> & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(636)
+template <typename TSkiplist> inline void goNext(Iter<TSkiplist, SkiplistIterator> & it);       	// "projects/library/seqan/map/map_skiplist.h"(1087)
+
+//____________________________________________________________________________
+// hasKey
+
+template <typename TKey, typename TValue, typename TSpec> inline bool hasKey(Map<TValue, VectorSet<TSpec> > const &set, TKey const &key);       	// "projects/library/seqan/map/map_vector.h"(327)
+template <typename TValue, typename TCompare, typename TAlloc, typename TKey2> inline bool hasKey(::std::set<TValue,TCompare,TAlloc> & me, TKey2 const & _key);       	// "projects/library/seqan/map/map_adapter_stl.h"(164)
+template <typename TValue, typename TCompare, typename TAlloc, typename TKey2> inline bool hasKey(::std::set<TValue,TCompare,TAlloc> const & me, TKey2 const & _key);       	// "projects/library/seqan/map/map_adapter_stl.h"(172)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2> inline bool hasKey(::std::map<TKey, TCargo, TCompare, TAlloc> & me, TKey2 const & _key);       	// "projects/library/seqan/map/map_adapter_stl.h"(181)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2> inline bool hasKey(::std::map<TKey, TCargo, TCompare, TAlloc> const & me, TKey2 const & _key);       	// "projects/library/seqan/map/map_adapter_stl.h"(189)
+template <typename TValue, typename TSpec, typename TKey2> inline bool hasKey(Map<TValue, Skiplist<TSpec> > & me, TKey2 const & _key);       	// "projects/library/seqan/map/map_skiplist.h"(1009)
+
+//____________________________________________________________________________
+// insert
+
+template <typename TValue, typename TSpec, typename TElement> inline void insert(Map<TValue, VectorSet<TSpec> > & set, TElement const &element);       	// "projects/library/seqan/map/map_vector.h"(289)
+template <typename TValue, typename TSpec, typename TKey, typename TCargo> inline void insert(Map<TValue, VectorSet<TSpec> > &set, TKey const & _key, TCargo const & _cargo);       	// "projects/library/seqan/map/map_vector.h"(299)
+template <typename TValue, typename TCompare, typename TAlloc, typename TValue2> inline void insert(::std::set<TValue, TCompare, TAlloc> & me,TValue2 const & _value);       	// "projects/library/seqan/map/map_adapter_stl.h"(217)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2, typename TCargo2> inline void insert(::std::map<TKey,TCargo, TCompare, TAlloc> & me, TKey2 const & _key, TCargo2 const & _cargo);       	// "projects/library/seqan/map/map_adapter_stl.h"(227)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2> inline void insert(::std::map<TKey,TCargo, TCompare, TAlloc> & me,TKey2 const & _key);       	// "projects/library/seqan/map/map_adapter_stl.h"(235)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc, typename TKey2, typename TCargo2, typename TSpec> inline void insert(::std::map<TKey,TCargo, TCompare, TAlloc> & me, Pair<TKey2,TCargo2,TSpec> const & _value);       	// "projects/library/seqan/map/map_adapter_stl.h"(243)
+template <typename TValue, typename TSpec, typename TValue2> inline void insert(Map<TValue, Skiplist<TSpec> > & me, TValue2 const & _value);       	// "projects/library/seqan/map/map_skiplist.h"(722)
+template <typename TValue, typename TSpec, typename TKey2, typename TCargo2> inline void insert(Map<TValue, Skiplist<TSpec> > & me, TKey2 const & _key, TCargo2 const & _cargo);       	// "projects/library/seqan/map/map_skiplist.h"(730)
+
+//____________________________________________________________________________
+// insertValues
+
+template <typename TSumList, typename TValues> inline bool insertValues(Iter<TSumList, MiniSumListIterator > & it, TValues const & vals);       	// "projects/library/seqan/map/sumlist_mini.h"(888)
+template <typename TSumList, typename TValue> inline bool insertValues(Iter<TSumList, MiniSumListIterator > & it, TValue const * p_vals);       	// "projects/library/seqan/map/sumlist_mini.h"(902)
+
+//____________________________________________________________________________
+// key
+
+template <typename TElement> inline TElement & key(TElement & element);       	// "projects/library/seqan/map/map_base.h"(182)
+template <typename TElement> inline TElement const & key(TElement const & element);       	// "projects/library/seqan/map/map_base.h"(188)
+template <typename TKey, typename TObject, typename TSpec> inline TKey & key(Pair<TKey, TObject, TSpec> & element);       	// "projects/library/seqan/map/map_base.h"(195)
+template <typename TKey, typename TObject, typename TSpec> inline TKey const & key(Pair<TKey, TObject, TSpec> const & element);       	// "projects/library/seqan/map/map_base.h"(201)
+template <typename TSet> inline typename Key<TSet>::Type key(Iter<TSet, VectorSetIterator> &it);       	// "projects/library/seqan/map/map_vector.h"(420)
+template <typename TSet> inline typename Key<TSet>::Type key(Iter<TSet, VectorSetIterator> const &it);       	// "projects/library/seqan/map/map_vector.h"(426)
+template <typename TSet> inline typename Key<TSet>::Type key(Proxy<IteratorProxy<Iter<TSet, VectorSetIterator> > > & pr);       	// "projects/library/seqan/map/map_vector.h"(482)
+template <typename TSet> inline typename Key<TSet>::Type key(Proxy<IteratorProxy<Iter<TSet, VectorSetIterator> > > const & pr);       	// "projects/library/seqan/map/map_vector.h"(488)
+template <typename TStlMap> inline typename Key<TStlMap>::Type const & key(Iter<TStlMap, StlMapIterator> & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(465)
+template <typename TStlMap> inline typename Key<TStlMap>::Type const & key(Iter<TStlMap, StlMapIterator> const & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(472)
+template <typename TStlMap> inline typename Key<TStlMap>::Type const & key(Iter<TStlMap, StlSetIterator> & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(661)
+template <typename TStlMap> inline typename Key<TStlMap>::Type const & key(Iter<TStlMap, StlSetIterator> const & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(668)
+template <typename TSkiplist> inline typename Key<TSkiplist>::Type const & key(Iter<TSkiplist, SkiplistIterator> & it);       	// "projects/library/seqan/map/map_skiplist.h"(1111)
+template <typename TSkiplist> inline typename Key<TSkiplist>::Type const & key(Iter<TSkiplist, SkiplistIterator> const & it);       	// "projects/library/seqan/map/map_skiplist.h"(1117)
+
+//____________________________________________________________________________
+// length
+
+template <typename TValue, typename TSpec> inline typename Size< Map<TValue, VectorSet<TSpec> > >::Type length(Map<TValue, VectorSet<TSpec> > const &set);       	// "projects/library/seqan/map/map_vector.h"(170)
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec> inline typename Size< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >::Type length(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me);       	// "projects/library/seqan/map/sumlist_mini.h"(242)
+template <typename TValue, typename TCompare, typename TAlloc> inline typename Size< ::std::set<TValue, TCompare, TAlloc> >::Type length(::std::set<TValue, TCompare, TAlloc> const & me);       	// "projects/library/seqan/map/map_adapter_stl.h"(199)
+template <typename TKey, typename TCargo, typename TCompare, typename TAlloc> inline typename Size< ::std::map<TKey,TCargo, TCompare, TAlloc> >::Type length(::std::map<TKey,TCargo, TCompare, TAlloc> const & me);       	// "projects/library/seqan/map/map_adapter_stl.h"(207)
+template <typename TValue, typename TSpec> inline typename Size< Map<TValue, Skiplist<TSpec> > >::Type length(Map<TValue, Skiplist<TSpec> > const & me);       	// "projects/library/seqan/map/map_skiplist.h"(908)
+
+//____________________________________________________________________________
+// mapValue
+
+template <typename TMap, typename TKey> inline typename MapValue<TMap>::Type mapValue(TMap & me, TKey const & _key);       	// "projects/library/seqan/map/map_base.h"(172)
+template <typename TValue, typename TSpec, typename TKey2> inline typename MapValue< Map<TValue, Skiplist<TSpec> > >::Type mapValue(Map<TValue, Skiplist<TSpec> > & me, TKey2 const & _key);       	// "projects/library/seqan/map/map_skiplist.h"(984)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TSet> inline bool operator!=(Iter<TSet, VectorSetIterator> const &a, Iter<TSet, VectorSetIterator> const &b);       	// "projects/library/seqan/map/map_vector.h"(396)
+template <typename TSumList, typename TSumList2> inline bool operator!= (Iter<TSumList, MiniSumListIterator> const & left, Iter<TSumList2, MiniSumListIterator> const & right);       	// "projects/library/seqan/map/sumlist_mini.h"(948)
+template <typename TStlMap> inline bool operator!= (Iter<TStlMap, StlMapIterator> const & left, Iter<TStlMap, StlMapIterator> const & right);       	// "projects/library/seqan/map/map_adapter_stl.h"(373)
+template <typename TStlMap> inline bool operator!= (Iter<TStlMap, StlSetIterator> const & left, Iter<TStlMap, StlSetIterator> const & right);       	// "projects/library/seqan/map/map_adapter_stl.h"(571)
+template <unsigned int DIM, typename TValue> inline bool operator!= (SumListValues<DIM, TValue> const & left, SumListValues<DIM, TValue> const & right);       	// "projects/library/seqan/map/sumlist.h"(188)
+template <typename TSkiplist> inline bool operator!= (Iter<TSkiplist, SkiplistIterator> const & left, Iter<TSkiplist, SkiplistIterator> const & right);       	// "projects/library/seqan/map/map_skiplist.h"(1150)
+
+//____________________________________________________________________________
+// operator+=
+
+template <unsigned int DIM, typename TValue> inline SumListValues<DIM, TValue> const & operator+= (SumListValues<DIM, TValue> & left, SumListValues<DIM, TValue> const & right);       	// "projects/library/seqan/map/sumlist.h"(149)
+
+//____________________________________________________________________________
+// operator-=
+
+template <unsigned int DIM, typename TValue> inline SumListValues<DIM, TValue> const & operator-= (SumListValues<DIM, TValue> & left, SumListValues<DIM, TValue> const & right);       	// "projects/library/seqan/map/sumlist.h"(163)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TSet> inline bool operator==(Iter<TSet, VectorSetIterator> const &a, Iter<TSet, VectorSetIterator> const &b);       	// "projects/library/seqan/map/map_vector.h"(389)
+template <typename TSumList, typename TSumList2> inline bool operator== (Iter<TSumList, MiniSumListIterator> const & left, Iter<TSumList2, MiniSumListIterator> const & right);       	// "projects/library/seqan/map/sumlist_mini.h"(940)
+template <typename TStlMap> inline bool operator== (Iter<TStlMap, StlMapIterator> const & left, Iter<TStlMap, StlMapIterator> const & right);       	// "projects/library/seqan/map/map_adapter_stl.h"(364)
+template <typename TStlMap> inline bool operator== (Iter<TStlMap, StlSetIterator> const & left, Iter<TStlMap, StlSetIterator> const & right);       	// "projects/library/seqan/map/map_adapter_stl.h"(562)
+template <unsigned int DIM, typename TValue> inline bool operator== (SumListValues<DIM, TValue> const & left, SumListValues<DIM, TValue> const & right);       	// "projects/library/seqan/map/sumlist.h"(177)
+template <typename TSkiplist> inline bool operator== (Iter<TSkiplist, SkiplistIterator> const & left, Iter<TSkiplist, SkiplistIterator> const & right);       	// "projects/library/seqan/map/map_skiplist.h"(1142)
+
+//____________________________________________________________________________
+// removeValues
+
+template <typename TSumList> inline void removeValues(Iter<TSumList, MiniSumListIterator > & it);       	// "projects/library/seqan/map/sumlist_mini.h"(912)
+
+//____________________________________________________________________________
+// scanValues
+
+template <typename TSumList, typename TValues> inline void scanValues( Iter< TSumList, MiniSumListValueIterator_ > & it,  TValues & values);       	// "projects/library/seqan/map/sumlist_mini.h"(621)
+
+//____________________________________________________________________________
+// searchSumList
+
+template <typename TSumList, typename TValue> inline void searchSumList(Iter< TSumList, MiniSumListIterator > & it, TValue const & val, int dim);       	// "projects/library/seqan/map/sumlist_mini.h"(824)
+
+//____________________________________________________________________________
+// setCargo
+
+template <typename TKey, typename TObject, typename TSpec, typename TSource> inline void setCargo(Pair<TKey, TObject, TSpec> & element, TSource const & source);       	// "projects/library/seqan/map/map_base.h"(244)
+
+//____________________________________________________________________________
+// setKey
+
+template <typename TElement, typename TSource> inline void setKey(TElement & element, TSource const & source);       	// "projects/library/seqan/map/map_base.h"(211)
+template <typename TKey, typename TObject, typename TSpec, typename TSource> inline void setKey(Pair<TKey, TObject, TSpec> & element, TSource const & source);       	// "projects/library/seqan/map/map_base.h"(218)
+
+//____________________________________________________________________________
+// splitSumList
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec> inline void splitSumList(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me, SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & right);       	// "projects/library/seqan/map/sumlist_mini.h"(432)
+
+//____________________________________________________________________________
+// value
+
+template <typename TSet> inline typename Reference<TSet>::Type value(Iter<TSet, VectorSetIterator> &it);       	// "projects/library/seqan/map/map_vector.h"(448)
+template <typename TSet> inline typename Reference<TSet>::Type value(Iter<TSet, VectorSetIterator> const &it);       	// "projects/library/seqan/map/map_vector.h"(455)
+template <typename TStlMap> inline typename Value<TStlMap>::Type & value(Iter<TStlMap, StlMapIterator> & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(448)
+template <typename TStlMap> inline typename Value<TStlMap>::Type & value(Iter<TStlMap, StlMapIterator> const & it);       	// "projects/library/seqan/map/map_adapter_stl.h"(455)
+template <typename TValue, typename TSpec, typename TKey2> inline typename Value< Map<TValue, Skiplist<TSpec> > >::Type & value(Map<TValue, Skiplist<TSpec> > & me, TKey2 const & _key);       	// "projects/library/seqan/map/map_skiplist.h"(641)
+template <typename TSkiplist> inline typename Value<TSkiplist>::Type & value(Iter<TSkiplist, SkiplistIterator> & it);       	// "projects/library/seqan/map/map_skiplist.h"(1096)
+template <typename TSkiplist> inline typename Value<TSkiplist>::Type & value(Iter<TSkiplist, SkiplistIterator> const & it);       	// "projects/library/seqan/map/map_skiplist.h"(1102)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/map/map_skiplist.h b/src/SeqAn-1.3/seqan/map/map_skiplist.h
new file mode 100644
index 0000000..0da6c7f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map/map_skiplist.h
@@ -0,0 +1,1163 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MISC_SKIPLIST_H
+#define SEQAN_HEADER_MISC_SKIPLIST_H
+
+//////////////////////////////////////////////////////////////////////////////
+
+#include <seqan/misc/misc_random.h>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Spec.Skiplist:
+..cat:Map
+..general:Class.Map
+..summary:General purpose map container.
+..signature:Map<TValue, Skiplist<TSpec> >
+..param.TValue:The type of value stored in the map.
+...metafunction:Metafunction.Value
+..param.TSpec:The specializing type.
+..remarks:The skiplist takes in average an oberhead of only two pointers per value stored in the map.
+...default:$Default$
+..include:seqan/map.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// Skiplist
+//////////////////////////////////////////////////////////////////////////////
+
+//forwards
+
+template <typename TValue, typename TSpec>
+class Map;
+
+template <typename TValue, typename TSpec>
+class SkiplistElement;
+
+template <typename TValue, typename TSpec>
+class SkiplistNext;
+
+template <typename TValue, typename TSpec>
+class SkiplistPath;
+
+//////////////////////////////////////////////////////////////////////////////
+// Tags
+
+struct SkiplistIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct AllocatorType;
+
+template <typename TValue, typename TSpec>
+struct AllocatorType<Map<TValue, Skiplist<TSpec> > >
+{
+	typedef Allocator<SimpleAlloc<> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct Value<Map<TValue, Skiplist<TSpec> > >
+{
+	typedef TValue Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct SkiplistElement_
+{
+	typedef char Type; //dummy implementation for VC++ bug
+};
+
+template <typename TValue, typename TSpec>
+struct SkiplistElement_<Map<TValue, Skiplist<TSpec> > >
+{
+	typedef SkiplistElement<TValue, TSpec> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct Key<Map<TValue, Skiplist<TSpec> > >:
+	Key<typename Value< Map<TValue, Skiplist<TSpec> > >::Type>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct Cargo<Map<TValue, Skiplist<TSpec> > >:
+	Cargo<typename Value< Map<TValue, Skiplist<TSpec> > >::Type>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TIteratorSpec>
+struct Iterator<Map<TValue, Skiplist<TSpec> >, TIteratorSpec >
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist_;
+	typedef Iter<TSkiplist_, SkiplistIterator> Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Skiplist Map
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+class Map<TValue, Skiplist<TSpec> >
+{
+public:
+	typedef typename AllocatorType<Map>::Type TAllocator;
+	typedef SkiplistElement<TValue, TSpec> TElement;
+	typedef typename Size<Map>::Type TSize;
+
+	enum
+	{
+		MAX_HEIGHT = 28, //heights are in {0, 1, ..., MAX_HEIGHT-1}
+		BLOCK_SIZE_1_ = sizeof(TElement) * 20, //store min. 20 elements
+		BLOCK_SIZE_2_ = 0x200,	//minimal block size
+		BLOCK_SIZE = (BLOCK_SIZE_1_ > BLOCK_SIZE_2_) ? BLOCK_SIZE_1_ : BLOCK_SIZE_2_ //block size is the max out of both values
+	};
+
+	Holder<TAllocator> data_allocator;
+	TElement * data_recycle[MAX_HEIGHT];
+	unsigned char * data_mem_begin;
+	unsigned char * data_mem_end;
+
+	SkiplistElement<TValue, TSpec> data_border;
+	TSize data_length;
+	unsigned char data_height;
+
+	Map()
+		: data_mem_begin(0)
+		, data_mem_end(0)
+		, data_length(0)
+		, data_height(0)
+	{
+		for (unsigned char i = 0; i < MAX_HEIGHT; ++i)
+		{
+			data_recycle[i] = 0;
+			valueConstruct(data_border.data_next + i, NonMinimalCtor()); 
+		}
+
+		mtRandInit();
+	}
+	Map(Map const & other)
+		: data_mem_begin(0)
+		, data_mem_end(0)
+		, data_length(0)
+		, data_height(0)
+	{
+		assign(*this, other);
+	}
+	~Map()
+	{
+	}
+	Map const & operator =(Map const & other)
+	{
+		assign(*this, other);
+		return *this;
+	}
+
+	template <typename TKey>
+	inline typename MapValue<Map>::Type
+	operator [] (TKey const & key)
+	{
+		return mapValue(*this, key);
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+class SkiplistElement
+{
+public:
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+	typedef SkiplistNext<TValue, TSpec> TNext;
+
+	enum
+	{
+		MAX_HEIGHT = TSkiplist::MAX_HEIGHT
+	};
+
+	TValue data_value;
+	TNext data_next[MAX_HEIGHT]; //note: only parts of this array available
+
+	//indirect constructor in _skiplistConstructElement
+	//indirect destructor in _skiplistDestructElement
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+//representation of "horizontal" pointer in skiplist
+//can be overloaded if label is needed
+template <typename TValue, typename TSpec>
+class SkiplistNext
+{
+public:
+	typedef SkiplistElement<TValue, TSpec> TElement;
+
+	TElement * data_element;
+
+	SkiplistNext()
+	{}
+	SkiplistNext(NonMinimalCtor)
+		: data_element(0)
+	{}
+	SkiplistNext(SkiplistNext const & other)
+		: data_element(other.data_element)
+	{}
+	~SkiplistNext()
+	{}
+	SkiplistNext const & operator = (SkiplistNext const & other)
+	{
+		data_element = other.data_element;
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+//represents a path from the root to the predecessor of a skiplist element
+template <typename TValue, typename TSpec>
+class SkiplistPath
+{
+public:
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+	typedef SkiplistElement<TValue, TSpec> TElement;
+
+	enum
+	{
+		MAX_HEIGHT = TSkiplist::MAX_HEIGHT
+	};
+
+	TElement * data_elements[MAX_HEIGHT];
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSpec>
+inline void
+assign(Map<TValue, Skiplist<TSpec> > & target,
+	   Map<TValue, Skiplist<TSpec> > const & source)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+	typedef SkiplistPath<TValue, TSpec> TPath;
+	typedef SkiplistElement<TValue, TSpec> TElement;
+	typedef typename Iterator<TSkiplist>::Type TIterator;
+	typedef typename Value<TSkiplist>::Type TValue2;
+
+	clear(target);
+
+	TPath path;
+	path.data_elements[0] = & target.data_border;
+
+	for (TIterator it(source); !atEnd(it); goNext(it))
+	{
+		unsigned char height = _skiplistCreateHeight(target, path);
+		TElement & el = _skiplistConstructElement(target, height, value(it));
+
+		for (int i = 0; i <= height; ++i)
+		{
+			el.data_next[i].data_element = 0;
+			path.data_elements[i]->data_next[i].data_element = & el;
+			path.data_elements[i] = & el;
+		}
+
+	}
+
+	target.data_length = length(source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//create Space for SkiplistElement of given height
+
+template <typename TValue, typename TSpec>
+inline SkiplistElement<TValue, TSpec> &
+_skiplistAllocateElement(Map<TValue, Skiplist<TSpec> > & me,
+						 unsigned char height)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+	typedef SkiplistElement<TValue, TSpec> TElement;
+	typedef SkiplistNext<TValue, TSpec> TNext;
+
+	TElement * ret;
+
+	if (me.data_recycle[height])
+	{//use recycled
+		ret = me.data_recycle[height];
+		me.data_recycle[height] = * reinterpret_cast<TElement **>(me.data_recycle[height]);
+	}
+	else
+	{
+		int const element_base_size = sizeof(TElement) - TSkiplist::MAX_HEIGHT * sizeof(TNext);
+		int need_size = element_base_size + (height+1) * sizeof(TNext);
+		int buf_size = me.data_mem_end - me.data_mem_begin;
+		if (buf_size < need_size)
+		{//need new memory
+			if (buf_size >= (int) (element_base_size + sizeof(TNext)))
+			{//link rest memory in recycle 
+				int rest_height = (buf_size - element_base_size) / sizeof(TNext) - 1; //must be < height, because buf_size < need_size
+				* reinterpret_cast<TElement **>(me.data_mem_begin) = me.data_recycle[rest_height];
+				me.data_recycle[rest_height] = reinterpret_cast<TElement *>(me.data_mem_begin);
+			}
+			//else: a small part of memory is wasted
+			allocate(value(me.data_allocator), me.data_mem_begin, (size_t) TSkiplist::BLOCK_SIZE, TagAllocateStorage());
+			me.data_mem_end = me.data_mem_begin + TSkiplist::BLOCK_SIZE;
+		}
+		ret = reinterpret_cast<TElement *>(me.data_mem_begin);
+		me.data_mem_begin += need_size;
+	}
+
+	return *ret;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//Creates New SkiplistElement
+template <typename TValue, typename TSpec, typename TValue2>
+inline SkiplistElement<TValue, TSpec> &
+_skiplistConstructElement(Map<TValue, Skiplist<TSpec> > & me,
+						  unsigned char height,
+						  TValue2 const & _value)
+{
+	typedef SkiplistElement<TValue, TSpec> TElement;
+	TElement & el = _skiplistAllocateElement(me, height);
+	valueConstruct(& (el.data_value), _value);
+	//no need to construct the next array
+
+	return el;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline void
+_skiplistDeallocateElement(Map<TValue, Skiplist<TSpec> > & me,
+						   SkiplistElement<TValue, TSpec> & el,
+						   unsigned char height)
+{
+	typedef SkiplistElement<TValue, TSpec> TElement;
+	* reinterpret_cast<TElement **>(& el) = me.data_recycle[height];
+	me.data_recycle[height] = reinterpret_cast<TElement *>(&el);
+	//the real deallocation is done by the allocator on destruction 
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//Destroys New SkiplistElement
+template <typename TValue, typename TSpec>
+inline void
+_skiplistDestructElement(Map<TValue, Skiplist<TSpec> > & me,
+						 SkiplistElement<TValue, TSpec> & el,
+						 unsigned char height)
+{
+	valueDestruct(& (el.value) );
+	//no need to construct the next array
+	_skiplistDeallocateElement(me, el, height);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//creates height for new SkiplistElement.
+//increases the Skiplist height if necessary
+template <typename TValue, typename TSpec>
+inline unsigned char
+_skiplistCreateHeight(Map<TValue, Skiplist<TSpec> > & me)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+
+	unsigned char height = geomRand<unsigned char>();
+	if (height >= TSkiplist::MAX_HEIGHT) height = TSkiplist::MAX_HEIGHT-1;
+
+	if (height > me.data_height) me.data_height = height;
+
+	return height;
+}
+
+template <typename TValue, typename TSpec>
+inline unsigned char
+_skiplistCreateHeight(Map<TValue, Skiplist<TSpec> > & me,
+					  SkiplistPath<TValue, TSpec> & path) //extend path if height is increased
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+
+	unsigned char height = geomRand<unsigned char>();
+	if (height >= TSkiplist::MAX_HEIGHT) height = TSkiplist::MAX_HEIGHT-1;
+
+	if (height > me.data_height)
+	{
+		for (unsigned char i = me.data_height + 1; i <= height; ++i)
+		{
+			path.data_elements[i] = & me.data_border;
+		}
+		me.data_height = height;
+	}
+
+	return height;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline unsigned char
+_skiplistGetHeight(Map<TValue, Skiplist<TSpec> > & me,
+				   SkiplistElement<TValue, TSpec> & el,
+				   SkiplistPath<TValue, TSpec> & path)
+{
+	int height = me.data_height;
+	for (; height > 0 ; --height)
+	{
+		if (path.elements[height]->data_next[height] == el) break;
+	}
+	return height;
+}
+
+template <typename TValue, typename TSpec>
+inline unsigned char
+_skiplistGetHeight(Map<TValue, Skiplist<TSpec> > & me, 
+				   SkiplistElement<TValue, TSpec> & el)
+{
+	typedef SkiplistPath<TValue, TSpec> TPath;
+
+	TPath path;
+	_skiplistFind(me, el, path);
+
+	return _skiplistGetHeight(el, path);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//Note: always store paths to the element LEFT of the actually wanted element.
+//this element will be the predecessor during insertion.
+
+//Given a key: find path to the elment that is left to:
+// - the first element that has the given key, if there is any, or
+// - the first element that has the smallest key larger than the given key,
+//or a path to the last element, if all keys are smaller than the given key
+
+//Given an element: find path to the element that is left to:
+// - the given element, or
+// - the first element that has the smallest key larger than the key of the given element,
+//or a path to the last element, if all keys are smaller than the key of the given element
+
+template <typename TValue, typename TSpec, typename TKey>
+inline bool
+_skiplistFindGoNext(SkiplistNext<TValue, TSpec> & next,
+					unsigned char,
+					TKey const & _key)
+{
+	return (key(next.data_element->data_value) < _key);
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+_skiplistFindGoNext(SkiplistNext<TValue, TSpec> & next,
+					unsigned char,
+					SkiplistElement<TValue, TSpec> const & el)
+{
+	return (key(next.data_element->data_value) <= key(el.data_value)) && (next.data_element != & el);
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+_skiplistFindGoNext(SkiplistNext<TValue, TSpec> & next,
+					unsigned char /*height*/,
+					GoEnd)
+{
+	return next.data_element;
+//	return next.data_element->data_next[height];
+}
+
+
+template <typename TValue, typename TSpec, typename TFind>
+inline void
+_skiplistFind(Map<TValue, Skiplist<TSpec> > & me,
+			  TFind const & find, //can be a key or a SkiplistElement or GoEnd
+			  /*OUT*/ SkiplistPath<TValue, TSpec> & path)
+{
+	typedef SkiplistElement<TValue, TSpec> TElement;
+	typedef SkiplistNext<TValue, TSpec> TNext;
+
+	TElement * here = & me.data_border;
+
+	for (int i = me.data_height; i >= 0; --i)
+	{
+		while (true)
+		{
+			TNext & next = here->data_next[i];
+			if (!next.data_element || !_skiplistFindGoNext(next, i, find)) break;
+			here = next.data_element;
+		}
+		path.data_elements[i] = here;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.map#find:
+..cat:Map
+..summary:Find a value in a map. 
+..signature:Iterator find(map, key)
+..param.map:A map.
+...type:Class.Map
+..param.key:A key.
+...metafunction:Metafunction.Key
+..returns:An iterator to the first value in $map$ of the given key, if there is any.
+An iterator to the fist value in $map$ with key > $key$, otherwise
+...metafunction:Metafunction.Iterator
+..see:Function.map#value
+..include:seqan/map.h
+*/
+
+template <typename TValue, typename TSpec, typename TFind>
+inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type
+find(Map<TValue, Skiplist<TSpec> > & me,
+	 TFind const & _find, //can be a TKey or a SkiplistElement or GoEnd
+	 SkiplistPath<TValue, TSpec> & path) 
+{
+	typedef typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type TIterator;
+
+	_skiplistFind(me, _find, path);
+	return TIterator(path.data_elements[0]->data_next[0].data_element);
+}
+template <typename TValue, typename TSpec, typename TFind>
+inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type
+find(Map<TValue, Skiplist<TSpec> > & me,
+	 TFind const & _find) //can be a TKey or a SkiplistElement or GoEnd
+{
+	typedef SkiplistPath<TValue, TSpec> TPath;
+	TPath path;
+	return find(me, _find, path);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//insert elements after at the position path points to
+//Requirements: 
+// - height <= height of the skiplist
+// - next must be filled at least up to height
+// - el.data_next must have space for at least height many entries
+template <typename TValue, typename TSpec>
+inline void
+_skiplistInsertElement(Map<TValue, Skiplist<TSpec> > & me,
+					   SkiplistElement<TValue, TSpec> & el,
+					   SkiplistPath<TValue, TSpec> & path,
+					   unsigned char height)
+{
+	for (int i = height; i >= 0; --i)
+	{
+		el.data_next[i].data_element = path.data_elements[i]->data_next[i].data_element;
+		path.data_elements[i]->data_next[i].data_element = & el;
+	}
+
+	++me.data_length;
+}
+
+template <typename TValue, typename TSpec>
+inline void
+_skiplistInsertElement(Map<TValue, Skiplist<TSpec> > & me,
+					   SkiplistElement<TValue, TSpec> & el,
+					   unsigned char height)
+{
+	typedef SkiplistElement<TValue, TSpec> TElement;
+	typedef SkiplistPath<TValue, TSpec> TPath;
+
+	TPath path;
+	_skiplistFind(me, key(el.data_value), path);
+
+	_skiplistInsertElement(me, el, path, height);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//creates entry if necessary
+
+/**
+.Function.map#value:
+..cat:Map
+..summary:Returns a value given a key. 
+..signature:Reference find(map, key)
+..param.map:A map.
+...type:Class.Map
+..param.key:A key.
+...metafunction:Metafunction.Key
+..returns:The first value in $map$ of the given key, if there is any.
+Otherwise, a new value that is inserted to $map$.
+...metafunction:Metafunction.Reference
+..remarks:
+...note:Do not change the key of a value in the map.
+..see:Function.map#find
+..see:Function.map#insert
+..include:seqan/map.h
+*/
+
+template <typename TValue, typename TSpec, typename TKey2>
+inline typename Value< Map<TValue, Skiplist<TSpec> > >::Type &
+value(Map<TValue, Skiplist<TSpec> > & me,
+	  TKey2 const & _key)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+	typedef SkiplistPath<TValue, TSpec> TPath;
+	typedef SkiplistElement<TValue, TSpec> TElement;
+	typedef typename Iterator<TSkiplist>::Type TIterator;
+	typedef typename Value<TSkiplist>::Type TValue2;
+
+	TPath path;
+	TIterator it = find(me, _key, path);
+	if (it && (key(it) == _key))
+	{
+		return value(it);
+	}
+	else
+	{// insert new value
+		unsigned char height = _skiplistCreateHeight(me, path);
+		TValue2 val_temp;
+		setKey(val_temp, _key);
+		TElement & el = _skiplistConstructElement(me, height, val_temp);
+		_skiplistInsertElement(me, el, path, height);
+		return el.data_value;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.map#cargo:
+..cat:Map
+..summary:Returns a cargo given a key. 
+..signature:Cargo find(map, key)
+..param.map:A map.
+...type:Class.Map
+..param.key:A key.
+...metafunction:Metafunction.Key
+..returns:The cargo of the first value in $map$ of the given key, if there is any.
+Otherwise, the cargo of a new value that is inserted to $map$.
+...metafunction:Metafunction.Cargo
+..see:Function.map#value
+..see:Function.map#find
+..see:Function.map#insert
+..include:seqan/map.h
+*/
+
+template <typename TValue, typename TSpec, typename TKey2>
+inline typename Cargo< Map<TValue, Skiplist<TSpec> > >::Type &
+cargo(Map<TValue, Skiplist<TSpec> > & me,
+	  TKey2 const & _key)
+{
+	return cargo(value(me, _key));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.map#insert:
+..cat:Map
+..summary:Insert new value into map. 
+..signature:insert(map, value)
+..signature:insert(map, key, cargo)
+..param.map:A map.
+...type:Class.Map
+..param.value:A value that is added to $map$.
+...metafunction:Metafunction.Value
+..param.key:A key.
+...metafunction:Metafunction.Key
+..param.cargo:A cargo.
+...metafunction:Metafunction.Cargo
+..remarks:If $key$ and $cargo$ are specified, a new value of that key and value is added.
+If there is already a value of that key in $map$, the value of this element is changed to $cargo$.
+...text:If $value$ is specified, and there is already a value in map of that key, than
+the cargo of this value is changed to @Function.cargo.cargo(value)@.
+...text:Use @Function.map#add@ instead to insert multiple values of the same key
+..see:Function.map#add
+..include:seqan/map.h
+*/
+
+template <typename TValue, typename TSpec, typename TValue2>
+inline void
+insert(Map<TValue, Skiplist<TSpec> > & me,
+	   TValue2 const & _value)
+{
+	value(me, key(_value)) = _value;
+}
+template <typename TValue, typename TSpec, typename TKey2, typename TCargo2>
+inline void
+insert(Map<TValue, Skiplist<TSpec> > & me,
+	   TKey2 const & _key,
+	   TCargo2 const & _cargo)
+{
+	cargo(me, _key) = _cargo;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//multiple key insert
+
+/**
+.Function.map#add:
+..cat:Map
+..summary:Insert another value into a multi map.
+..signature:add(map, value)
+..signature:add(map, key, cargo)
+..param.map:A map.
+...type:Spec.Skiplist
+..param.value:A value that is added to $map$.
+...metafunction:Metafunction.Value
+..param.key:A key.
+...metafunction:Metafunction.Key
+..param.cargo:A cargo.
+...metafunction:Metafunction.Cargo
+..remarks:If $key$ and $cargo$ are specified, a new value of that key and value is added.
+..include:seqan/map.h
+*/
+
+template <typename TValue, typename TSpec, typename TValue2>
+inline void
+add(Map<TValue, Skiplist<TSpec> > & me,
+	TValue2 const & _value)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+	typedef SkiplistElement<TValue, TSpec> TElement;
+
+	unsigned char height = _skiplistCreateHeight(me);
+	TElement & el = _skiplistConstructElement(me, height, _value);
+	_skiplistInsertElement(me, el, height);
+}
+template <typename TValue, typename TSpec, typename TKey2, typename TCargo2>
+inline void
+add(Map<TValue, Skiplist<TSpec> > & me,
+	TKey2 const & _key,
+	TCargo2 const & _cargo)
+{
+	TValue temp_val;
+	setKey(temp_val, _key);
+	setCargo(temp_val, _cargo);
+
+	add(me, temp_val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//extract element from Skiplist
+template <typename TValue, typename TSpec>
+inline void
+_skiplistUnlinkElement(Map<TValue, Skiplist<TSpec> > & me,
+					   SkiplistElement<TValue, TSpec> & el)
+{
+	typedef SkiplistPath<TValue, TSpec> TPath;
+
+	TPath path;
+	_skiplistFind(me, el, path);
+
+	for (int i = me.data_height; i >= 0; --i)
+	{
+		if (path.data_elements[i]->data_next[i].data_element == & el)
+		{
+			path.data_elements[i]->data_next[i].data_element = el.data_next[i].data_element;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.map#erase:
+..cat:Map
+..summary:Removes a value from a map. 
+..signature:erase(map, key)
+..signature:erase(map, iterator)
+..param.map:A map.
+...type:Class.Map
+..param.key:The key of a value in $map$.
+...metafunction:Metafunction.Key
+..param.iterator:An iterator to a value in $map$.
+...metafunction:Metafunction.Iterator
+..remarks:Removes the first value in $map$ of the given key, if there is any.
+...text:Use @Function.map#eraseAll@ to remove all values of the given key in a multi map.
+..see:Function.map#add
+..see:Function.map#insert
+..include:seqan/map.h
+*/
+
+template <typename TValue, typename TSpec, typename TMap2>
+inline void
+erase(Map<TValue, Skiplist<TSpec> > & me,
+	  Iter<TMap2, SkiplistIterator> const & it)
+{
+	_skiplistUnlinkElement(me, * it.data_pointer);
+	--me.data_length;
+}
+
+template <typename TValue, typename TSpec, typename TToRemove>
+inline void
+erase(Map<TValue, Skiplist<TSpec> > & me,
+	  TToRemove const & to_remove)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TMap;
+	typedef typename Iterator<TMap>::Type TIterator;
+	TIterator it = find(me, to_remove);
+	if (it && (key(it) == key(to_remove)))
+	{
+		erase(me, it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.map#eraseAll:
+..cat:Map
+..summary:Removes a value from a map. 
+..signature:eraseAll(map, key)
+..param.map:A map.
+...type:Spec.Skiplist
+..param.key:The key of a value in $map$.
+...metafunction:Metafunction.Key
+..remarks:Removes all values in $map$ of the given key, if there is any.
+..see:Function.map#add
+..see:Function.map#insert
+..see:Function.map#erase
+..include:seqan/map.h
+*/
+
+template <typename TValue, typename TSpec, typename TToRemove>
+inline void
+eraseAll(Map<TValue, Skiplist<TSpec> > & me,
+		 TToRemove const & to_remove)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TMap;
+	typedef typename Iterator<TMap>::Type TIterator;
+	TIterator it = find(me, to_remove);
+	while (it && (key(it) == key(to_remove)))
+	{
+		TIterator it_old = it;
+		++it;
+		erase(me, it_old);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline void
+clear(Map<TValue, Skiplist<TSpec> > & me)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+
+	me.data_mem_begin = me.data_mem_end = 0;
+	me.data_length = 0;
+	me.data_height = 0;
+
+	for (unsigned char i = 0; i < TSkiplist::MAX_HEIGHT; ++i)
+	{
+		me.data_recycle[i] = 0;
+		valueConstruct(me.data_border.data_next + i, NonMinimalCtor()); 
+	}
+
+	clear(value(me.data_allocator));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.length.param.object.type:Class.Map
+
+template <typename TValue, typename TSpec>
+inline typename Size< Map<TValue, Skiplist<TSpec> > >::Type
+length(Map<TValue, Skiplist<TSpec> > const & me)
+{
+	return me.data_length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.begin.param.object.type:Class.Map
+
+template <typename TValue, typename TSpec, typename TIteratorSpec>
+inline typename Iterator< Map<TValue, Skiplist<TSpec> >, TIteratorSpec>::Type
+begin(Map<TValue, Skiplist<TSpec> > & me,
+	  TIteratorSpec)
+{
+	typedef typename Iterator< Map<TValue, Skiplist<TSpec> >, TIteratorSpec>::Type TIterator;
+	return TIterator(me);
+}
+template <typename TValue, typename TSpec>
+inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type
+begin(Map<TValue, Skiplist<TSpec> > & me)
+{
+	typedef typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type TIterator;
+	return TIterator(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.end.param.object.type:Class.Map
+
+template <typename TValue, typename TSpec, typename TIteratorSpec>
+inline typename Iterator< Map<TValue, Skiplist<TSpec> >, TIteratorSpec>::Type
+end(Map<TValue, Skiplist<TSpec> > &,
+	TIteratorSpec)
+{
+	typedef typename Iterator< Map<TValue, Skiplist<TSpec> >, TIteratorSpec>::Type TIterator;
+	return TIterator();
+}
+template <typename TValue, typename TSpec>
+inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type
+end(Map<TValue, Skiplist<TSpec> > &)
+{
+	typedef typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type TIterator;
+	return TIterator();
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TCargo>
+struct SkipListMapValue_
+{
+	template <typename TValue, typename TSpec, typename TKey2>
+	static inline TCargo &
+	mapValue_(Map<TValue, Skiplist<TSpec> > & me,
+		TKey2 const & _key)
+	{
+		return cargo(me, _key);
+	}
+};
+
+template <>
+struct SkipListMapValue_<Nothing>
+{
+	template <typename TValue, typename TSpec, typename TKey2>
+	static inline bool
+	mapValue_(Map<TValue, Skiplist<TSpec> > & me,
+		TKey2 const & _key)
+	{
+		return hasKey(me, _key);
+	}
+};
+
+template <typename TValue, typename TSpec, typename TKey2>
+inline typename MapValue< Map<TValue, Skiplist<TSpec> > >::Type
+mapValue(Map<TValue, Skiplist<TSpec> > & me,
+		 TKey2 const & _key)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+	typedef typename Cargo<TSkiplist>::Type TCargo;
+	return SkipListMapValue_<TCargo>::mapValue_(me, _key);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.map#hasKey:
+..cat:Map
+..summary:Determines whether a map contains a value given key. 
+..signature:hasKey(map, key)
+..param.map:A map.
+...type:Class.Map
+..param.key:A key.
+...metafunction:Metafunction.Key
+..returns:$true$, if there is a value in $map$ of that key, $false$ otherwise.
+..include:seqan/map.h
+*/
+
+template <typename TValue, typename TSpec, typename TKey2>
+inline bool
+hasKey(Map<TValue, Skiplist<TSpec> > & me,
+	   TKey2 const & _key)
+{
+	typedef Map<TValue, Skiplist<TSpec> > TSkiplist;
+	typedef typename Iterator<TSkiplist>::Type TIterator;
+	TIterator it = find(me, _key);
+
+	return (it && (key(it) == _key));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// SkiplistIterator: Standard Iterator for Skiplist
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSkiplist>
+class Iter< TSkiplist, SkiplistIterator>
+{
+public:
+	typedef typename SkiplistElement_<TSkiplist>::Type TElement;
+	typedef typename Value<TSkiplist>::Type TValue;
+
+	TElement * data_pointer;
+
+	Iter()
+		: data_pointer(0)
+	{
+	}
+	Iter(Iter const & other)
+		: data_pointer(other.data_pointer)
+	{
+	}
+	Iter(TElement * ptr)
+		: data_pointer(ptr)
+	{
+	}
+	Iter(TSkiplist const & sk)
+		: data_pointer(sk.data_border.data_next[0].data_element)
+	{
+	}
+	~Iter()
+	{
+	}
+
+	Iter const & 
+	operator = (Iter const & other)
+	{
+		data_pointer = other.data_pointer;
+		return *this;
+	}
+
+    // TODO(holtgrew): Why conversion to boolean?
+	operator bool () const
+	{
+        // Using != 0 instead of implicit/explicit task here to suppress
+        // performance warning C4800 in Visual Studio.
+		return data_pointer != 0;
+	}
+
+	TValue *
+	operator -> () const
+	{
+		return & data_pointer->data_value;
+	}
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSkiplist>
+inline bool
+atEnd(Iter<TSkiplist, SkiplistIterator> & it)
+{
+	return (!it.data_pointer);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSkiplist>
+inline void
+goNext(Iter<TSkiplist, SkiplistIterator> & it)
+{
+	it.data_pointer = it.data_pointer->data_next[0].data_element;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSkiplist>
+inline typename Value<TSkiplist>::Type &
+value(Iter<TSkiplist, SkiplistIterator> & it)
+{
+	return it.data_pointer->data_value;
+}
+template <typename TSkiplist>
+inline typename Value<TSkiplist>::Type &
+value(Iter<TSkiplist, SkiplistIterator> const & it)
+{
+	return it.data_pointer->data_value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSkiplist>
+inline typename Key<TSkiplist>::Type const &
+key(Iter<TSkiplist, SkiplistIterator> & it)
+{
+	return key(it.data_pointer->data_value);
+}
+template <typename TSkiplist>
+inline typename Key<TSkiplist>::Type const &
+key(Iter<TSkiplist, SkiplistIterator> const & it)
+{
+	return key(it.data_pointer->data_value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSkiplist>
+inline typename Cargo<TSkiplist>::Type &
+cargo(Iter<TSkiplist, SkiplistIterator> & it)
+{
+	return cargo(it.data_pointer->data_value);
+}
+template <typename TSkiplist>
+inline typename Cargo<TSkiplist>::Type &
+cargo(Iter<TSkiplist, SkiplistIterator> const & it)
+{
+	return cargo(it.data_pointer->data_value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSkiplist>
+inline bool
+operator == (Iter<TSkiplist, SkiplistIterator> const & left,
+			 Iter<TSkiplist, SkiplistIterator> const & right)
+{
+	return left.data_pointer == right.data_pointer;
+}
+
+template <typename TSkiplist>
+inline bool
+operator != (Iter<TSkiplist, SkiplistIterator> const & left,
+			 Iter<TSkiplist, SkiplistIterator> const & right)
+{
+	return left.data_pointer != right.data_pointer;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+//____________________________________________________________________________
+
+//////////////////////////////////////////////////////////////////////////////
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/map/map_vector.h b/src/SeqAn-1.3/seqan/map/map_vector.h
new file mode 100644
index 0000000..245ba42
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map/map_vector.h
@@ -0,0 +1,512 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_MAP_VECTOR_H
+#define SEQAN_HEADER_MAP_VECTOR_H
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Spec.VectorSet:
+..cat:Map
+..general:Class.Map
+..summary:A fast map for small key types.
+..signature:Map<TValue, VectorSet<TSpec> >
+..param.TValue:The type of value stored in the map.
+...metafunction:Metafunction.Value
+..param.TSpec:The specializing type.
+...default:@Spec.Alloc String.Alloc@
+...remarks:$TSpec$ is used as specialization for the @Class.String@ type that is used to store the values.
+..remarks:The memory needed is linear to the number different values the @Metafunction.Key.key type@ of $TValue$ can get.
+So do not use this map for large key types.
+..include:seqan/map.h
+*/
+//////////////////////////////////////////////////////////////////////////////
+// 
+//	VectorSet
+// 
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TSpec = Alloc<> >
+struct VectorSet;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// internal set meta-functions
+
+template <typename TCargo>
+struct VectorSetElement_
+{
+	bool data_valid;
+	TCargo data_cargo;
+};
+template <>
+struct VectorSetElement_<Nothing>
+{
+	bool data_valid;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct VectorSetElements_
+{
+	typedef char * Type; //dummy implementation for VC++
+};
+template <typename TValue, typename TSpec>
+struct VectorSetElements_<Map<TValue, VectorSet<TSpec> > >
+{
+	typedef Map<TValue, VectorSet<TSpec> > TMap_;
+	typedef typename Cargo<TMap_>::Type TCargo_;
+	typedef VectorSetElement_<TCargo_> TElement_;
+	typedef String<TElement_, TSpec> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// VectorSet class
+
+template <typename TValue, typename TSpec>
+class Map<TValue, VectorSet<TSpec> >
+{
+public:
+	typedef typename Key<Map>::Type TKey;
+	typedef typename Size<Map>::Type TSize;
+	typedef typename VectorSetElements_<Map>::Type TElements;
+
+	TElements	data_elements;
+	TSize		data_length;
+
+	Map()
+	{
+		resize(data_elements, (TSize) ValueSize<TKey>::VALUE); 
+		clear(*this);
+	}
+
+	Map(TSize _vectorSize)
+	{
+		resize(data_elements, (TSize) _vectorSize);
+		clear(*this);
+	}
+	
+	template <typename TKey>
+	inline typename MapValue<Map>::Type
+	operator [] (TKey const & key)
+	{
+		return mapValue(*this, key);
+	}
+
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// set meta-functions
+
+template <typename TValue, typename TSpec>
+struct Value< Map<TValue, VectorSet<TSpec> > > 
+{
+	typedef TValue Type;
+};
+template <typename TValue, typename TSpec>
+struct Reference< Map<TValue, VectorSet<TSpec> > > 
+{
+	typedef Map<TValue, VectorSet<TSpec> > TMap_;
+	typedef typename Iterator<TMap_>::Type TIterator_;
+	typedef Proxy<IteratorProxy<TIterator_> > Type;
+};
+
+
+template <typename TValue, typename TSpec>
+struct Size< Map<TValue, VectorSet<TSpec> > >:
+	Size<typename VectorSetElements_< Map<TValue, VectorSet<TSpec> > >::Type> {};
+
+template <typename TValue, typename TSpec>
+struct Key< Map<TValue, VectorSet<TSpec> > > :
+	Key<TValue> {};
+
+template <typename TValue, typename TSpec>
+struct Cargo< Map<TValue, VectorSet<TSpec> > > :
+	Cargo<TValue> {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline typename Size< Map<TValue, VectorSet<TSpec> > >::Type 
+length(Map<TValue, VectorSet<TSpec>  > const &set) 
+{
+	return set.data_length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+
+struct VectorSetIterator;
+
+template <typename TMap>
+class Iter<TMap,  VectorSetIterator> 
+{
+public:
+	typedef typename Size<TMap>::Type TSize;
+	typedef typename VectorSetElements_<TMap>::Type TElements;
+	typedef typename Iterator<TElements, Rooted>::Type TElementsIterator;
+	typedef typename Value<TElementsIterator>::Type TValue;
+
+	TElementsIterator data_iterator;
+
+	Iter() 
+	{	}
+	Iter(TElementsIterator it) 
+		: data_iterator(it)
+	{	
+		if (!atEnd(*this) && !(*data_iterator).data_valid) 
+		{
+			goNext(*this);
+		}
+	}
+	Iter(Iter const & other)
+		: data_iterator(other.data_iterator)
+	{	}
+	~Iter()
+	{	}
+
+	Iter const & operator = (Iter const & other)
+	{
+		data_iterator = other.data_iterator;
+		return *this;
+	}
+
+	operator bool()
+	{
+		return data_iterator != 0;
+	}
+
+	TValue *
+	operator -> () const
+	{
+		return & value(data_iterator);
+	}
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TObject, typename TSpec, typename TIteratorSpec>
+struct Iterator< Map<TObject, VectorSet<TSpec> >, TIteratorSpec > 
+{
+	typedef Map<TObject, VectorSet<TSpec> > TMap_;
+	typedef Iter<TMap_, VectorSetIterator> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline void 
+clear(Map<TValue, VectorSet<TSpec> > & me) 
+{
+	typedef Map<TValue, VectorSet<TSpec> > TMap;
+	typedef typename VectorSetElements_<TMap>::Type TElements;
+	typedef typename Iterator<TElements>::Type TIterator;
+	TIterator it_end = end(me.data_elements);
+	for (TIterator it = begin(me.data_elements); it != it_end; ++it)
+	{
+		(*it).data_valid = false;
+	}
+	me.data_length = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TCargo>
+struct VectorSetInsert_
+{
+	template <typename TValue, typename TSpec, typename TElement>
+	static inline void 
+	insert_(Map<TValue, VectorSet<TSpec> > & set,
+		TElement const &element) 
+	{
+		if (!set.data_elements[ordValue(key(element))].data_valid) 
+		{
+			++set.data_length;
+			set.data_elements[ordValue(key(element))].data_valid = true;
+		}
+		set.data_elements[ordValue(key(element))].data_cargo = cargo(element);
+	}
+};
+template <>
+struct VectorSetInsert_<Nothing>
+{
+	template <typename TValue, typename TSpec, typename TElement>
+	static inline void 
+	insert_(Map<TValue, VectorSet<TSpec> > & set,
+		TElement const &element) 
+	{
+		if (!set.data_elements[ordValue(key(element))].data_valid) 
+		{
+			++set.data_length;
+			set.data_elements[ordValue(key(element))].data_valid = true;
+		}
+	}
+};
+
+template <typename TValue, typename TSpec, typename TElement>
+inline void 
+insert(Map<TValue, VectorSet<TSpec> > & set,
+	   TElement const &element) 
+{
+	typedef Map<TValue, VectorSet<TSpec> > TMap;
+	typedef typename Cargo<TMap>::Type TCargo;
+	VectorSetInsert_<TCargo>::insert_(set, element);
+}
+template <typename TValue, typename TSpec, typename TKey, typename TCargo>
+inline void 
+insert(Map<TValue, VectorSet<TSpec> > &set,
+	   TKey const & _key,
+	   TCargo const & _cargo) 
+{
+	typedef Map<TValue, VectorSet<TSpec> > TMap;
+	typedef typename Value<TMap>::Type TValue2;
+	TValue2 new_val;
+	key(new_val) = _key;
+	cargo(new_val) = _cargo;
+	VectorSetInsert_<TCargo>::insert_(set, new_val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename T>
+inline void 
+erase(Map<TValue, VectorSet<TSpec> > &set, 
+	  T const & tokill)  //can be an element, a key, or an iterator
+{
+	if (set.data_elements[ordValue(key(tokill))].data_valid) 
+	{
+		--set.data_length;
+		set.data_elements[ordValue(key(tokill))].data_valid = false;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TValue, typename TSpec>
+inline bool 
+hasKey(Map<TValue, VectorSet<TSpec> > const &set, TKey const &key) 
+{
+	return set.data_elements[ordValue(key)].data_valid;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TKey2, typename TSpec>
+inline typename Iterator< Map<TKey2, VectorSet<TSpec> > >::Type 
+find(Map<TKey2, VectorSet<TSpec> > & set, 
+	 TKey const &key) 
+{
+	typedef Map<TKey2, VectorSet<TSpec> > TMap;
+	typedef typename Iterator<TMap>::Type TIterator;
+	return TIterator(begin(set.data_elements) + ordValue(key));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TKey, typename TSpec, typename TKey2>
+inline typename Cargo< Map<TKey, VectorSet<TSpec> > >::Type &
+cargo(Map<TKey, VectorSet<TSpec> > & set, 
+	  TKey2 const & _key) 
+{
+	if (!hasKey(set, _key))
+	{
+		typedef Map<TKey, VectorSet<TSpec> > TMap;
+		typedef typename Value<TMap>::Type TValue;
+		TValue new_value;
+		key(new_value) = _key;
+		insert(set, new_value);
+	}
+	return set.data_elements[ordValue(_key)].data_cargo;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TElement, typename TSpec>
+inline typename Iterator< Map<TElement, VectorSet<TSpec> > >::Type 
+begin(Map<TElement, VectorSet<TSpec> > & set) 
+{
+	typedef Map<TElement, VectorSet<TSpec> > TMap;
+	typedef typename Iterator<TMap>::Type TIterator;
+	return TIterator(begin(set.data_elements));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TElement, typename TSpec>
+inline typename Iterator< Map<TElement, VectorSet<TSpec> > >::Type 
+end(Map<TElement, VectorSet<TSpec> > &set) 
+{
+	typedef Map<TElement, VectorSet<TSpec> > TMap;
+	typedef typename Iterator<TMap>::Type TIterator;
+	return TIterator(end(set.data_elements));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSet>
+inline bool 
+operator==(Iter<TSet, VectorSetIterator> const &a, 
+		   Iter<TSet, VectorSetIterator> const &b) 
+{
+	return a.data_iterator == b.data_iterator;
+}
+template <typename TSet>
+inline bool 
+operator!=(Iter<TSet, VectorSetIterator> const &a, 
+		   Iter<TSet, VectorSetIterator> const &b) 
+{
+	return a.data_iterator != b.data_iterator;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSet>
+inline bool 
+atEnd(Iter<TSet, VectorSetIterator> & a) 
+{
+	return atEnd(a.data_iterator);
+}
+template <typename TSet>
+inline bool 
+atEnd(Iter<TSet, VectorSetIterator> const & a) 
+{
+	return atEnd(a.data_iterator);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSet>
+inline typename Key<TSet>::Type
+key(Iter<TSet, VectorSetIterator> &it) 
+{
+	return position(it.data_iterator);
+}
+template <typename TSet>
+inline typename Key<TSet>::Type
+key(Iter<TSet, VectorSetIterator> const &it) 
+{
+	return position(it.data_iterator);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSet>
+inline typename Cargo<TSet>::Type &
+cargo(Iter<TSet, VectorSetIterator> &it) {
+	return (*it.data_iterator).data_cargo;
+}
+template <typename TSet>
+inline typename Cargo<TSet>::Type &
+cargo(Iter<TSet, VectorSetIterator> const &it) {
+	return (*it.data_iterator).data_cargo;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSet>
+inline typename Reference<TSet>::Type 
+value(Iter<TSet, VectorSetIterator> &it) 
+{
+	typedef typename Reference<TSet>::Type TReference;
+	return TReference(it);
+}
+template <typename TSet>
+inline typename Reference<TSet>::Type 
+value(Iter<TSet, VectorSetIterator> const &it) 
+{
+	typedef typename Reference<TSet>::Type TReference;
+	return TReference(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TSet>
+inline void
+goNext(Iter<TSet, VectorSetIterator> & it) 
+{
+	++it.data_iterator;
+	while (!atEnd(it.data_iterator))
+	{
+		if ((*it.data_iterator).data_valid) 
+			break;
+		++it.data_iterator;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSet>
+inline typename Key<TSet>::Type
+key(Proxy<IteratorProxy<Iter<TSet, VectorSetIterator> > > & pr) 
+{
+	return key(iter(pr));
+}
+template <typename TSet>
+inline typename Key<TSet>::Type
+key(Proxy<IteratorProxy<Iter<TSet, VectorSetIterator> > > const & pr) 
+{
+	return key(iter(pr));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSet>
+inline typename Cargo<TSet>::Type &
+cargo(Proxy<IteratorProxy<Iter<TSet, VectorSetIterator> > >& pr) 
+{
+	return cargo(iter(pr));
+}
+template <typename TSet>
+inline typename Cargo<TSet>::Type &
+cargo(Proxy<IteratorProxy<Iter<TSet, VectorSetIterator> > > const & pr) 
+{
+	return cargo(iter(pr));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/map/sumlist.h b/src/SeqAn-1.3/seqan/map/sumlist.h
new file mode 100644
index 0000000..43edbd6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map/sumlist.h
@@ -0,0 +1,214 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SUMLIST_H
+#define SEQAN_HEADER_SUMLIST_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//Default Specialization Tag
+
+template <typename TSpec = Default>
+struct SkipSumList;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec = SkipSumList<> >
+class SumList;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct DIMENSION
+{
+	enum { VALUE = 1}; //dummy implementation to make VC++ happy
+};
+
+template <unsigned int DIM_, typename TValue, typename TSpec>
+struct DIMENSION< SumList<DIM_, TValue, TSpec> >
+{
+	enum { VALUE = DIM_};
+};
+template <unsigned int DIM_, typename TValue, typename TSpec>
+struct DIMENSION< SumList<DIM_, TValue, TSpec> const>
+{
+	enum { VALUE = DIM_};
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+struct Value< SumList<DIM, TValue, TSpec> >
+{
+	typedef TValue Type;
+};
+template <unsigned int DIM, typename TValue, typename TSpec>
+struct Value< SumList<DIM, TValue, TSpec> const >
+{
+	typedef TValue Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// SumListValues: 
+// Stores one DIM tupel of Values
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <unsigned int DIM, typename TValue>
+struct SumListValues
+{
+	TValue values[DIM];
+
+	SumListValues(MinimalCtor)
+	{}
+	SumListValues()
+	{
+		clear(*this);
+	}
+	SumListValues(SumListValues const & other)
+	{
+		*this = other;
+	}
+	SumListValues(TValue const * arr)
+	{
+		*this = arr;
+	}
+	~SumListValues()
+	{
+	}
+	SumListValues const & operator = (SumListValues const & other)
+	{
+		arrayCopy(other.values, other.values + DIM, values);
+		return *this;
+	}
+	SumListValues const & operator = (TValue const * arr)
+	{
+		arrayCopy(arr, arr + DIM, values);
+		return *this;
+	}
+
+	TValue & operator [] (unsigned int pos)
+	{
+		return values[pos];
+	}
+	TValue const & operator [] (unsigned int pos) const
+	{
+		return values[pos];
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct Values;
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+struct Values< SumList<DIM, TValue, TSpec> >
+{
+	typedef SumListValues<DIM, TValue> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue>
+inline SumListValues<DIM, TValue> const &
+operator += (SumListValues<DIM, TValue> & left,
+			 SumListValues<DIM, TValue> const & right)
+{
+	for (unsigned int i = 0; i < DIM; ++i)
+	{
+		left.values[i] += right.values[i];
+	}
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue>
+inline SumListValues<DIM, TValue> const &
+operator -= (SumListValues<DIM, TValue> & left,
+			 SumListValues<DIM, TValue> const & right)
+{
+	for (unsigned int i = 0; i < DIM; ++i)
+	{
+		left.values[i] -= right.values[i];
+	}
+	return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue>
+inline bool
+operator == (SumListValues<DIM, TValue> const & left,
+			 SumListValues<DIM, TValue> const & right)
+{
+	for (unsigned int i = 0; i < DIM; ++i)
+	{
+		if (left.values[i] != right.values[i]) return false;
+	}
+	return true;
+}
+template <unsigned int DIM, typename TValue>
+inline bool
+operator != (SumListValues<DIM, TValue> const & left,
+			 SumListValues<DIM, TValue> const & right)
+{
+	for (unsigned int i = 0; i < DIM; ++i)
+	{
+		if (left.values[i] != right.values[i]) return true;
+	}
+	return false;
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue>
+inline void
+clear(SumListValues<DIM, TValue> & me)
+{
+	arrayFill(me.values, me.values + DIM, 0);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//____________________________________________________________________________
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/map/sumlist_mini.h b/src/SeqAn-1.3/seqan/map/sumlist_mini.h
new file mode 100644
index 0000000..120f064
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map/sumlist_mini.h
@@ -0,0 +1,976 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SUMLIST_MINI_H
+#define SEQAN_HEADER_SUMLIST_MINI_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// MiniSumList
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TValue>
+struct MiniListEntry_
+{
+	enum
+	{
+		LIMIT_0 = 1 << 6,
+		LIMIT_1 = 1 << 14,
+		LIMIT_2 = 1 << 30
+	};
+
+	static const unsigned char SIZES [4]; 
+
+	union _union
+	{
+		struct struct_0
+		{
+			unsigned char select: 2;
+			unsigned char value_0: 6;
+		} _0;
+		struct struct_1
+		{
+			unsigned short select_1: 2;
+			unsigned short value_1: 14;
+		} _1;
+		struct struct_2
+		{
+			unsigned int select_2: 2;
+			unsigned int value_2: 30;
+		} _2;
+		unsigned char value_3[sizeof(TValue)+1];
+	} data;
+
+	MiniListEntry_() {}
+	MiniListEntry_(TValue val) { this->assignValue(val); }
+	~MiniListEntry_() {}
+
+	static inline unsigned int
+	sizeNeeded(TValue val)
+	{
+		if (val < LIMIT_1)
+		{
+			if (val < LIMIT_0)
+			{
+				return SIZES[0];
+			}
+			else
+			{
+				return SIZES[1];
+			}
+		}
+		else
+		{
+			if (val < LIMIT_2)
+			{
+				return SIZES[2];
+			}
+			else
+			{
+				return SIZES[3];
+			}
+		}
+	}
+
+	inline TValue getValue() const
+	{
+		switch(data._0.select)
+		{
+		case 0: return data._0.value_0;
+		case 1: return data._1.value_1;
+		case 2: return data._2.value_2;
+		default: return * reinterpret_cast<TValue const *>(data.value_3 + 1);
+		}
+	}
+
+	inline int size() const
+	{
+		return SIZES[data._0.select];
+	}
+
+	inline void assignValue(TValue val)
+	{
+		if (val < LIMIT_1)
+		{
+			if (val < LIMIT_0)
+			{
+				data._0.select = 0;
+				data._0.value_0 = val;
+			}
+			else
+			{
+				data._0.select = 1;
+				data._1.value_1 = val;
+			}
+		}
+		else
+		{
+			if (val < LIMIT_2)
+			{
+				data._0.select = 2;
+				data._2.value_2 = val;
+			}
+			else
+			{
+				data._0.select = 3;
+				*reinterpret_cast<TValue *>(data.value_3 + 1) = val;
+			}
+		}
+	}
+};
+
+//____________________________________________________________________________
+
+template <typename TValue>
+const unsigned char MiniListEntry_<TValue>::SIZES [4] = {1, 2, 4, 1 + sizeof(TValue)};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned short SIZE = 0x0020, typename TSpec = Default>
+struct MiniSumList;
+
+struct MiniSumListValueIterator_;
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+class SumList<DIM, TValue, MiniSumList<SIZE, TSpec> >
+{
+public:
+	typedef typename Size<SumList>::Type TSize;
+	typedef SumListValues<DIM, TValue> TValues;
+
+	unsigned char data_ [SIZE];
+	TSize data_length;  //number of elements in list
+	TSize data_size;  //number of bytes used in data_
+	TValues data_sum; //sum of all list numbers
+
+	SumList()
+		: data_length(0)
+		, data_size(0)
+	{
+	}
+
+	SumList(SumList const & other)
+		: data_length(other.data_length)
+		, data_size(other.data_size)
+		, data_sum(other.data_sum)
+	{
+		arrayCopyForward(other.data_, other.data_ + SIZE, data_);
+	}
+
+	~SumList() 
+	{}
+
+	SumList const &
+	operator = (SumList const & other)
+	{
+		assign(*this, other);
+		return *this;
+	}
+
+
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+struct Size< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >
+{
+	typedef unsigned short Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+struct Position< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >
+{
+	typedef unsigned short Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+inline void
+assign(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & target,
+	   SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const & source)
+{
+	arrayCopyForward(source.data_, source.data_ + source.data_size, target.data_);
+	target.data_length = source.data_length;
+	target.data_size = source.data_size;
+	target.data_sum = source.data_sum;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+inline typename Size< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >::Type
+length(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me)
+{
+	return me.data_length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+inline typename Value< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >::Type &
+getSum(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me,
+	   unsigned int dim)
+{
+	return me.data_sum[dim];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+inline void
+clear(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me)
+{
+	me.data_length = 0;
+	me.data_size = 0;
+	clear(me.data_sum);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+inline typename Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >::Type
+begin(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me)
+{
+	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > TMe;
+	typedef typename Iterator<TMe>::Type TIterator;
+	return TIterator(me);
+}
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+inline typename Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const>::Type
+begin(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const & me)
+{
+	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const TMe;
+	typedef typename Iterator<TMe>::Type TIterator;
+	return TIterator(me);
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+inline typename Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > >::Type
+end(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me)
+{
+	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > TMe;
+	typedef typename Iterator<TMe>::Type TIterator;
+	return TIterator(me, GoEnd());
+}
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+inline typename Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const>::Type
+end(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const& me)
+{
+	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const TMe;
+	typedef typename Iterator<TMe>::Type TIterator;
+	return TIterator(me, GoEnd());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//changes the value at ptr (which is at the dim-th tuple position) to new_value
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TValue2>
+inline bool 
+_miniSumListAssignValue(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me,
+						 unsigned char * ptr,
+						 int dim,
+						 TValue2 new_value)
+{
+	typedef MiniListEntry_<TValue> TEntry;
+
+	TEntry new_entr(new_value);
+	TEntry & old_entr = * reinterpret_cast<TEntry *>(ptr);
+
+	if (new_entr.size() != old_entr.size())
+	{
+		int new_size = me.data_size + new_entr.size() - old_entr.size();
+		if (new_size > SIZE) return false; //not enough space
+		arrayCopy(ptr + old_entr.size(), me.data_ + me.data_size, ptr + new_entr.size());
+	}
+	me.data_sum[dim] += (new_value - old_entr.getValue());
+	old_entr.assignValue(new_value);
+	return true;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//computes the size needed to store the values in the DIM-tupel vals
+template <unsigned int DIM, typename TValue>
+inline TValue
+_miniSumListSizeOfValues(SumListValues<DIM, TValue> const & vals)
+{
+	unsigned int sum = 0;
+	for (unsigned int i = 0; i < DIM; ++i)
+	{
+		sum += MiniListEntry_<TValue>::sizeNeeded(vals[i]);
+	}
+	return sum;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//inserts DIM-tupel at byte_position
+//returns false on capacity owerflow, true otherwise
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TPosition, typename TValue2>
+inline bool 
+_miniSumListInsertValues(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me,
+						  TPosition byte_pos,
+						  TValue2 const & new_values,
+						  /*OUT*/ unsigned int & new_values_size)
+{
+	typedef MiniListEntry_<TValue> TEntry;
+
+	new_values_size = _miniSumListSizeOfValues<DIM>(new_values);
+	unsigned int new_size = me.data_size + new_values_size;
+	if (new_size > SIZE) return false; //not enough space
+
+	if (byte_pos < me.data_size)
+	{ //make room
+		arrayCopyBackward(me.data_ + byte_pos, me.data_ + me.data_size, me.data_ + byte_pos + new_values_size);
+	}
+
+	unsigned char * ptr = me.data_ + byte_pos;
+	for (unsigned int i = 0; i < DIM; ++i)
+	{
+		TEntry & entr = * reinterpret_cast<TEntry *>(ptr);
+		entr.assignValue(new_values[i]);
+		ptr += entr.size();
+	}
+	
+	me.data_size = new_size;
+	me.data_sum += new_values;
+	++me.data_length;
+	return true;
+}
+
+
+template <typename TSumList, typename TValues>
+inline bool 
+_insertValues(TSumList & me,
+			  Iter<TSumList, MiniSumListValueIterator_> it,
+			  TValues const & new_values,
+			  /*OUT*/ unsigned int & new_values_size)
+{
+	return _miniSumListInsertValues(me, it.data_ptr - me.data_, new_values, new_values_size);
+}
+template <typename TSumList, typename TValue>
+inline bool 
+_insertValues(TSumList & me,
+			  Iter<TSumList, MiniSumListValueIterator_> it,
+			  TValue const * new_values,
+			  /*OUT*/ unsigned int & new_values_size)
+{
+	SumListValues<DIMENSION<TSumList>::VALUE, typename Value<TSumList>::Type > vals(new_values);
+	return _miniSumListInsertValues(me, it.data_ptr - me.data_, vals, new_values_size);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//appends DIM-tupel
+//returns false on capacity owerflow, true otherwise
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TValues>
+inline bool 
+appendValues(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me,
+			 TValues const & new_values)
+{
+	unsigned int dummy;
+	return _miniSumListInsertValues(me, me.data_size, new_values, dummy);
+}
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TValue2>
+inline bool 
+appendValues(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me,
+			 TValue2 const * new_values)
+{
+	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > TSumList;
+	SumListValues<DIMENSION<TSumList>::VALUE, typename Value<TSumList>::Type > vals(new_values);
+	unsigned int dummy;
+	return _miniSumListInsertValues(me, me.data_size, vals, dummy);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//moves the right half of $me$ into $right$
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+inline void
+splitSumList(SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & me,
+			 SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & right)
+{
+	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > TSumList;
+	typedef Iter<TSumList, MiniSumListValueIterator_> TIterator;
+	typedef typename Size<TSumList>::Type TSize;
+	typedef SumListValues<DIM, TValue> TValues;
+
+	clear(right);
+
+	if (me.data_size <= SIZE/2) return; //nothing to split
+
+	TIterator it(me);
+	if (atEnd(it, me)) return; //nothing to split
+
+	TValues sum;
+
+	TSize me_len = 0;
+	while (true)
+	{
+		if ((it.data_ptr - me.data_) >= SIZE/2) break;
+
+		TValues vals;
+		scanValues(it, vals);
+		sum += vals;
+		++me_len;
+	}
+
+	if (atEnd(it, me)) return; //nothing to split
+
+	//split
+
+	arrayCopyForward(it.data_ptr, me.data_ + me.data_size, right.data_);
+	right.data_length = me.data_length - me_len;
+	right.data_size = me.data_size - (it.data_ptr - me.data_);
+	right.data_sum = me.data_sum;
+	right.data_sum -= sum;
+
+	me.data_length = me_len;
+	me.data_size = it.data_ptr - me.data_;
+	me.data_sum = sum;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//finds tupel in which the dim-th sum would exceed val
+//template <typename TSumList, typename TValue2, typename TValues>
+//inline Iter<TSumList, MiniSumListValueIterator_>
+//_miniSumListSearchSumList(TSumList & me,
+//						   TValue2 val,
+//						   int dim,
+//						   /*OUT*/ TValues const & sums)
+//{
+//	typedef Iter<TSumList, MiniSumListValueIterator_> TIterator;
+//
+//	clear(sums);
+//	TIterator it(me);
+//
+//	while (true)
+//	{
+//		if (atEnd(it, me)) return it;
+//
+//		TIterator it_next = it;
+//		TValues vals;
+//		scanValues(it_next, vals);
+//
+//		if (sums[dim] + vals[dim] >= val) return it;
+//
+//		it = it_next;
+//	}
+//}
+//
+
+//////////////////////////////////////////////////////////////////////////////
+// Iterator for MiniSumList
+//////////////////////////////////////////////////////////////////////////////
+
+
+//struct MiniSumListIteratorRooted;
+//
+//template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+//class Iter<SumList<DIM, TValue, MiniSumList<SIZE, TSpec> >, MiniSumListIteratorRooted>
+//{
+//public:
+//	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > TContainer;
+//	typedef typename Size<TContainer>::Type TContainerSize;
+//	typedef typename Position<TContainer>::Type TContainerPosition;
+//
+//	TContainer & data_container;
+//	TContainerSize data_bytepos;  //position of entry in container.data_
+//	TContainerPosition data_position;
+//	TValue data_sum[DIM];
+//
+//	Iter(TContainer & cont, TContainerSize bytepos = 0, TContainerPosition pos = 0)
+//		: data_container(cont)
+//		, data_bytepos(bytepos)
+//		, data_position(pos)
+//	{
+//	}
+//	Iter(Iter const & other)
+//		: data_container(other.data_container)
+//		, data_bytepos(other.bytepos)
+//		, data_position(other.data_position)
+//	{
+//	}
+//	~Iter()
+//	{
+//	}
+//	inline Iter const & 
+//	operator = (Iter const & other)
+//	{
+//		data_container = other.data_container;
+//		data_bytepos = other.bytepos;
+//		data_position = other.data_position;
+//	}
+//};
+
+//////////////////////////////////////////////////////////////////////////////
+
+//Iterator for iterating through the single values in the minisumlist
+
+template <typename TSumList>
+class Iter<TSumList, MiniSumListValueIterator_>
+{
+public:
+	typedef typename CopyConst_<TSumList, unsigned char>::Type TUnsignedChar;
+	mutable TUnsignedChar * data_ptr;
+
+	Iter()
+		: data_ptr(0)
+	{
+	}
+	Iter(TSumList & cont)
+		: data_ptr(cont.data_)
+	{
+	}
+	Iter(Iter const & other)
+		: data_ptr(other.data_ptr)
+	{
+	}
+	Iter(TUnsignedChar * ptr)
+		: data_ptr(ptr)
+	{
+	}
+	~Iter()
+	{
+	}
+	inline Iter const & 
+	operator = (Iter const & other)
+	{
+		data_ptr = other.data_ptr;
+		return *this;
+	}
+	inline Iter const & 
+	operator = (TUnsignedChar * ptr)
+	{
+		data_ptr = ptr;
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline void
+goNext(Iter< TSumList, MiniSumListValueIterator_ > & it)
+{
+	typedef typename Value<TSumList>::Type TValue;
+	typedef MiniListEntry_<TValue> const TEntry;
+	TEntry & entr = * reinterpret_cast<TEntry *>(it.data_ptr);
+	it.data_ptr += entr.size();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline typename Value<TSumList>::Type
+getValue(Iter<TSumList, MiniSumListValueIterator_ > & it)
+{
+	typedef typename Value<TSumList>::Type TValue;
+	typedef MiniListEntry_<TValue> const TEntry;
+	TEntry & entr = * reinterpret_cast<TEntry *>(it.data_ptr);
+	return entr.getValue();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList, typename TValues>
+inline void
+scanValues(/*IN and OUT*/ Iter< TSumList, MiniSumListValueIterator_ > & it,
+		   /*OUT*/ TValues & values)
+{
+	for (unsigned int i = 0; i < DIMENSION<TSumList>::VALUE; ++i)
+	{
+		values[i] = getValue(it);
+		goNext(it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList, typename TSumList2>
+inline bool
+atEnd(Iter< TSumList, MiniSumListValueIterator_ > & it,
+	  TSumList2 & container)
+{
+	return (!it.data_ptr) || (it.data_ptr == container.data_ + container.data_size);
+}
+
+template <typename TSumList, typename TSumList2>
+inline bool
+atEnd(Iter< TSumList, MiniSumListValueIterator_ > & it,
+	  TSumList2 const & container)
+{
+	return (!it.data_ptr) || (it.data_ptr == container.data_ + container.data_size);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+//The "real" iterator that iterates through the tuples and "knows" the sums
+
+struct MiniSumListIterator;
+
+
+template <typename TSumList>
+class Iter<TSumList, MiniSumListIterator>
+{
+public:
+	typedef Iter<TSumList, MiniSumListValueIterator_> TValueIterator;
+//	typedef typename CopyConst_<TSumList, TValueIterator_>::Type TValueIterator;
+	typedef typename Value<TSumList>::Type TValue;
+	typedef SumListValues<DIMENSION<TSumList>::VALUE, TValue> TValues;
+
+	TSumList * container_;
+	mutable TValueIterator here_;
+	mutable TValueIterator next_;
+	mutable TValues values_;
+	mutable TValues sums_;
+
+	Iter()
+	{
+	}
+	Iter(TSumList & cont)
+		: container_(& cont)
+		, here_(cont.data_)
+		, next_(cont.data_)
+	{
+		if (!atEnd(next_, cont))
+		{
+			scanValues(next_, values_);
+		}
+	}
+	Iter(TSumList & cont, GoEnd)
+		: container_(& cont)
+		, here_(cont.data_ + cont.data_size)
+		, sums_(cont.data_sum)
+	{
+	}
+	Iter(Iter const & other)
+		: container_(other.container_)
+		, here_(other.here_)
+		, next_(other.next_)
+		, values_(other.values_)
+		, sums_(other.sums_)
+	{
+	}
+
+	~Iter()
+	{
+	}
+	inline Iter const & 
+	operator = (Iter const & other)
+	{
+		container_ = other.container_;
+		here_ = other.here_;
+		next_ = other.next_;
+		values_ = other.values_;
+		sums_ = other.sums_;
+		return *this;
+	}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TIteratorSpec>
+struct Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> >, TIteratorSpec>
+{
+	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > TSumList_;
+	typedef Iter<TSumList_, MiniSumListIterator> Type;
+};
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TIteratorSpec>
+struct Iterator< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const, TIteratorSpec>
+{
+	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > const TSumList_;
+	typedef Iter<TSumList_, MiniSumListIterator> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+//template <typename TSumList>
+//struct Values< Iter<TSumList, MiniSumListIterator> >
+//{
+//	typedef typename Value<TSumList>::Type TValue;
+//	typedef SumListValues<DIMENSION<TSumList>::VALUE, TValue> Type;
+//};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline void
+clear(Iter<TSumList, MiniSumListIterator> & it)
+{
+	it.here_ = it.next_ = 0;
+	it.container_ = 0;
+	clear(it.values_);
+	clear(it.sums_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline void
+goNext(Iter<TSumList, MiniSumListIterator> & it)
+{
+	it.sums_ += it.values_;
+	it.here_ = it.next_;
+	if (!atEnd(it.next_, *it.container_))
+	{
+		scanValues(it.next_, it.values_);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline void
+goBegin(Iter<TSumList, MiniSumListIterator> & it)
+{
+	clear(it.sums_);
+	it.here_ = it.next_ = it.container_->data_;
+	scanValues(it.next_, it.values_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline void
+goBeforeEnd(Iter<TSumList, MiniSumListIterator> & it)
+{
+	goBegin(it);
+	while (!atEnd(it.next_, *it.container_))
+	{
+		goNext(it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline bool
+atEnd(Iter<TSumList, MiniSumListIterator> & it)
+{
+	return atEnd(it.here_, * it.container_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline typename Value<TSumList>::Type
+getValue(Iter<TSumList, MiniSumListIterator > & it,
+		 int dim)
+{
+	return it.values_[dim];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline typename Value<TSumList>::Type
+getSum(Iter<TSumList, MiniSumListIterator > & it,
+		 int dim)
+{
+	return it.sums_[dim];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList, typename TValue>
+inline void
+searchSumList(Iter< TSumList, MiniSumListIterator > & it,
+			  TValue const & val,
+			  int dim)
+{
+	goBegin(it);
+	while (!atEnd(it) && ((getSum(it, dim) + getValue(it, dim))<= val)) // SEARCH SEMANTICS
+	{
+		goNext(it);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec, typename TValue2>
+inline bool 
+assignValue(Iter<SumList<DIM, TValue, MiniSumList<SIZE, TSpec> >, MiniSumListIterator > & it,
+			int dim,
+			TValue2 val)
+{
+	typedef SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > TSumList;
+	typedef Iter<TSumList, MiniSumListValueIterator_> TValueIterator;
+	typedef MiniListEntry_<TValue> TEntry;
+
+	//find a pointer to the value
+	TValueIterator vit = it.here_;
+	for (int i = 0; i < dim; ++i)
+	{
+		goNext(vit);
+	}
+
+	//save old value
+	TValue old_val = getValue(vit);
+
+	//create TEntry accessors
+	TEntry new_entr(val);
+	TEntry & old_entr = * reinterpret_cast<TEntry *>(vit.data_ptr);
+
+	int diff = new_entr.size() -  old_entr.size();
+	if (diff)
+	{//entries take different spaces:
+
+		int new_size = it.container_->data_size + diff;
+		if (new_size > SIZE) return false; //not enough space
+
+		//make room!
+		arrayCopy(vit.data_ptr + old_entr.size(), it.container_->data_ + it.container_->data_size, vit.data_ptr + new_entr.size());
+		it.container_->data_size += diff;
+
+		//adjust next_ pointer
+		it.next_.data_ptr += diff;
+	}
+	//adjust sum
+	it.container_->data_sum[dim] += (val - old_val);
+
+	//save new value
+	old_entr.assignValue(val);
+	it.values_[dim] = val;
+
+	return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList, typename TValues>
+inline bool 
+insertValues(Iter<TSumList, MiniSumListIterator > & it,
+			 TValues const & vals)
+{
+	unsigned int new_values_size;
+	bool ret = _insertValues(*it.container_, it.here_, vals, new_values_size);
+	if (ret)
+	{
+		it.next_.data_ptr = it.here_.data_ptr + new_values_size;
+		it.values_ = vals;
+	}
+	return ret;
+}
+template <typename TSumList, typename TValue>
+inline bool 
+insertValues(Iter<TSumList, MiniSumListIterator > & it,
+			 TValue const * p_vals)
+{
+	SumListValues<DIMENSION<TSumList>::VALUE, typename Value<TSumList>::Type > vals(p_vals);
+	return insertValues(it, vals);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline void 
+removeValues(Iter<TSumList, MiniSumListIterator > & it)
+{
+	//adjust sums
+	for (int i = 0; i < DIMENSION<TSumList>::VALUE; ++i)
+	{
+		it.container_->data_sum[i] -= it.values_[i];
+	}
+	if (!atEnd(it.next_, * it.container_))
+	{//move the rest
+		arrayCopyForward(it.next_.data_ptr, it.container_->data_ + it.container_->data_size, it.here_.data_ptr);
+	}
+	//adjust size and length
+	it.container_->data_size -= (it.next_.data_ptr - it.here_.data_ptr);
+	--it.container_->data_length;
+
+	//find new next pointer
+	it.next_ = it.here_;
+	if (!atEnd(it.next_, *it.container_))
+	{
+		scanValues(it.next_, it.values_);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList, typename TSumList2>
+inline bool
+operator == (Iter<TSumList, MiniSumListIterator> const & left,
+			 Iter<TSumList2, MiniSumListIterator> const & right)
+{
+	return left.here_.data_ptr == right.here_.data_ptr;
+}
+
+template <typename TSumList, typename TSumList2>
+inline bool
+operator != (Iter<TSumList, MiniSumListIterator> const & left,
+			 Iter<TSumList2, MiniSumListIterator> const & right)
+{
+	return left.here_.data_ptr != right.here_.data_ptr;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//assignValues
+
+//////////////////////////////////////////////////////////////////////////////
+
+//template <unsigned int DIM, typename TValue, unsigned short SIZE, typename TSpec>
+//inline bool
+//atEnd(Iter< SumList<DIM, TValue, MiniSumList<SIZE, TSpec> >, MiniSumListValueIterator_ > & it,
+//	  SumList<DIM, TValue, MiniSumList<SIZE, TSpec> > & container)
+//{
+//	return it.data_ptr == container.data_ + container.data_size;
+//}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//____________________________________________________________________________
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/map/sumlist_skip.h b/src/SeqAn-1.3/seqan/map/sumlist_skip.h
new file mode 100644
index 0000000..f3f93b7
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/map/sumlist_skip.h
@@ -0,0 +1,1124 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_SUMLIST_SKIP_H
+#define SEQAN_HEADER_SUMLIST_SKIP_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Skipsumlist_
+//////////////////////////////////////////////////////////////////////////////
+
+//Spec for Map
+template <unsigned int DIM, typename TSpec = Default>
+struct Skipsumlist_;
+
+//////////////////////////////////////////////////////////////////////////////
+// Map<Skipsumlist_>
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+/*
+template <typename TValue, unsigned int DIM, typename TSpec>
+struct SkipListBlockSize_<Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > >
+{
+	typedef SumList<DIM, TValue, MiniSumList< > > TMiniSumList;
+	typedef Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > TMap;
+	enum
+	{
+		VALUE = sizeof(TMiniSumList) + TMap::MAX_HEIGHT * sizeof(
+	};
+};
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned int DIM, typename TSpec>
+class SkiplistNext<TValue, Skipsumlist_<DIM, TSpec> >
+{
+public:
+	typedef Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > TMap;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	typedef SumListValues<DIM, TValue> TValues;
+
+	TElement * data_element;
+	TValues values;
+
+	SkiplistNext()
+		: values(MinimalCtor())
+	{}
+	SkiplistNext(NonMinimalCtor)
+		: data_element(0)
+	{}
+	SkiplistNext(SkiplistNext const & other)
+		: data_element(other.data_element)
+		, values(other.values)
+	{}
+	~SkiplistNext()
+	{}
+	SkiplistNext const & operator = (SkiplistNext const & other)
+	{
+		data_element = other.data_element;
+		values = other.values;
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TValue, unsigned int DIM, typename TSpec>
+class SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> >
+{
+public:
+	typedef Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > TSkiplist;
+	typedef SkiplistNext<TValue, Skipsumlist_<DIM, TSpec> > TNext;
+	typedef SumList<DIM, TValue, MiniSumList< > > TMiniSumList;
+
+	enum
+	{
+		MAX_HEIGHT = TSkiplist::MAX_HEIGHT
+	};
+
+	TMiniSumList minilist;
+	TNext data_next[MAX_HEIGHT]; //note: only parts of this array available
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned int DIM, typename TSpec>
+class SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> >
+{
+public:
+	typedef Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > TSkiplist;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	typedef SumListValues<DIM, TValue> TValues;
+
+	enum
+	{
+		MAX_HEIGHT = TSkiplist::MAX_HEIGHT
+	};
+
+	TElement * data_elements[MAX_HEIGHT];
+	TValues sums[MAX_HEIGHT];
+
+	SkiplistPath() {}
+	SkiplistPath(TSkiplist & sl)
+	{
+		for (unsigned int i = 0; i <= sl.data_height; ++i)
+		{
+			data_elements[i] = & (sl.data_border);
+		}
+	}
+};
+
+
+//____________________________________________________________________________
+
+//make path to a kind of iterator
+
+template <typename TValue, unsigned int DIM, typename TSpec>
+bool atEnd(SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > & path)
+{
+	return (!path.data_elements[0]);
+}
+
+template <typename TValue, unsigned int DIM, typename TSpec, typename TSkiplist>
+void goNext(SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > & path,
+			TSkiplist const & skiplist)
+{
+	typedef SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > TPath;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+
+	TElement * next = path.data_elements[0]->data_next[0].data_element;
+	for (unsigned int i = 0; i <= skiplist.data_height; ++i)
+	{
+		if (!path.data_elements[i]) break;
+		if (path.data_elements[i]->data_next[i].data_element != next) break;
+
+		path.sums[i] += path.data_elements[i]->data_next[i].values;
+		path.data_elements[i] = next;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//if true, go right
+//if false, go down
+
+//find a value
+template <typename TNext, typename THere, typename TValues, typename TValue>
+inline bool
+_skipsumlistFindGoNext(TNext const & _next,
+					   THere const & /*_here*/,
+					   unsigned char /*_height*/,
+					   TValues const & _sum,
+					   unsigned int _dim,
+					   TValue const & _value)
+{
+	return (static_cast<TValue>((_sum[_dim] + _next.values[_dim])) <= _value); // SEARCH SEMANTICS
+}
+//find an element, given (sum, element_pointer)-pair
+template <typename TNext, typename THere, typename TValues, typename TValue, typename TElementPtr>
+inline bool
+_skipsumlistFindGoNext(TNext const & _next,
+					   THere const & _here,
+					   unsigned char /*_height*/,
+					   TValues const & _sum,
+					   unsigned int _dim,
+					   Pair<TValue, TElementPtr> const & pair)
+{
+	return (_sum[_dim] + _next.values[_dim] <= pair.i1) && (pair.i2 != _here);
+}
+//find the end of the skiplist
+template <typename TNext, typename THere, typename TValues>
+inline bool
+_skipsumlistFindGoNext(TNext const & _next,
+					   THere const & /*_here*/,
+					   unsigned char /*_height*/,
+					   TValues const & /*_sum*/,
+					   unsigned int /*_dim*/,
+					   GoEnd)
+{
+	return _next.data_element != 0;
+}
+
+
+template <typename TValue, unsigned int DIM, typename TSpec, typename TFind>
+inline void
+_skipsumlistFind(Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > & me,
+				 TFind const & find,
+				 unsigned int dim,
+				 /*OUT*/ SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > & path)
+{
+	typedef Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > TMap;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	typedef SkiplistNext<TValue, Skipsumlist_<DIM, TSpec> > TNext;
+	typedef SumListValues<DIM, TValue> TValues;
+
+	typedef typename Size<TMap>::Type TSize;
+
+	TElement * here = & me.data_border;
+
+	TValues sum;
+
+	for (int i = me.data_height; i >= 0; --i)
+	{
+		while (true)
+		{
+			TNext & next = here->data_next[i];
+			if (!next.data_element) break;
+
+			if (!_skipsumlistFindGoNext(next, here, i, sum, dim, find)) break;
+
+			here = next.data_element;
+			sum += next.values;
+		}
+		path.data_elements[i] = here;
+		path.sums[i] = sum;
+	}
+}
+template <typename TValue, unsigned int DIM, typename TSpec, typename TFind>
+inline void
+_skipsumlistFind(Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > const & me,
+				 TFind const & find,
+				 unsigned int dim,
+				 /*OUT*/ SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > & path)
+{//destroy const
+	typedef Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > TMap;
+	_skipsumlistFind(const_cast<TMap &>(me), find, dim, path);
+}
+
+
+template <typename TValue, unsigned int DIM, typename TSpec>
+inline void
+assign(Map<TValue, Skiplist< Skipsumlist_<DIM, TSpec> > > & target,
+	   Map<TValue, Skiplist< Skipsumlist_<DIM, TSpec> > > const & source_)
+{
+	typedef Map<TValue, Skiplist< Skipsumlist_<DIM, TSpec> > > TSkiplist;
+	typedef SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > TPath;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	//typedef typename Iterator<TSkiplist>::Type TIterator;
+	//typedef typename Value<TSkiplist>::Type TValue2;
+
+	TSkiplist & source = const_cast<TSkiplist &>(source_); //oh, I'm so damned lazy :-P
+
+	//first clear target
+	clear(target);
+
+	//init path variable that is used as iterator-like construct to build up target
+	//and copy link values outgoing from target border
+	TPath target_path(target);
+	target.data_height = source.data_height;
+	for (unsigned int i = 0; i <= target.data_height; ++i)
+	{
+		target_path.data_elements[i] = & target.data_border;
+		target.data_border.data_next[i].values = source.data_border.data_next[i].values;
+	}
+
+	//copy the first minilist
+	target.data_border.minilist = source.data_border.minilist;
+
+	TPath source_path(source);
+	//copy rest of the values
+	while (true)
+	{
+		goNext(source_path, source);
+
+		if (atEnd(source_path)) break;
+
+		//determine height of current tower
+		unsigned char height;
+		for (height = 1; height < TSkiplist::MAX_HEIGHT; ++height)
+		{
+			if (source_path.data_elements[height] != source_path.data_elements[0]) break;
+		}
+		--height;
+
+		//create new element in target and copy minilist
+		TElement & el = _skiplistAllocateElement(target, height);
+		el.minilist = source_path.data_elements[0]->minilist;
+
+		//insert element in target
+		for (int i = 0; i <= height; ++i)
+		{
+			el.data_next[i].data_element = 0;
+			el.data_next[i].values = source_path.data_elements[i]->data_next[i].values;
+			target_path.data_elements[i]->data_next[i].data_element = & el;
+			target_path.data_elements[i] = & el;
+		}
+
+	}
+
+	//set length
+	target.data_length = length(source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned int DIM, typename TSpec>
+inline void
+clear(Map<TValue, Skiplist< Skipsumlist_<DIM, TSpec> > > & me)
+{
+	typedef Map<TValue, Skiplist< Skipsumlist_<DIM, TSpec> > > TSkiplist;
+
+	me.data_mem_begin = me.data_mem_end = 0;
+	me.data_length = 0;
+	me.data_height = 0;
+
+	for (unsigned char i = 0; i < TSkiplist::MAX_HEIGHT; ++i)
+	{
+		me.data_recycle[i] = 0;
+		valueConstruct(me.data_border.data_next + i, NonMinimalCtor()); 
+	}
+	clear(me.data_border.minilist); //thats new
+
+	clear(value(me.data_allocator));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// SumList<Skipsumlist_>
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+class SumList<DIM, TValue, SkipSumList<TSpec> >
+{
+public:
+	typedef Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > TMap;
+	typedef typename Size<SumList>::Type TSize;
+	typedef SumListValues<DIM, TValue> TValues;
+
+	TMap map;
+	TSize length;
+	TValues sum;
+
+	SumList()
+		: length(0)
+	{}
+	SumList(SumList const & other)
+		: length(0)
+	{
+		assign(*this, other);
+	}
+	~SumList() 
+	{}
+	SumList const & operator = (SumList const & other)
+	{
+		assign(*this, other);
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline void
+assign(SumList<DIM, TValue, SkipSumList<TSpec> > & target,
+	   SumList<DIM, TValue, SkipSumList<TSpec> > const & source)
+{
+	target.map = source.map;
+	target.length = source.length;
+	target.sum = source.sum;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline typename Size< SumList<DIM, TValue, SkipSumList<TSpec> > >::Type
+length(SumList<DIM, TValue, SkipSumList<TSpec> > const & me)
+{
+	return me.length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline typename Value< SumList<DIM, TValue, SkipSumList<TSpec> > >::Type 
+getSum(SumList<DIM, TValue, SkipSumList<TSpec> > const & me,
+	   unsigned int dim)
+{
+	return me.sum[dim];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline void
+clear(SumList<DIM, TValue, SkipSumList<TSpec> > & me)
+{
+	clear(me.map);
+	me.length = 0;
+	clear(me.sum);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline typename Iterator< SumList<DIM, TValue, SkipSumList<TSpec> > >::Type
+begin(SumList<DIM, TValue, SkipSumList<TSpec> > & me)
+{
+	typedef SumList<DIM, TValue, SkipSumList<TSpec> >  TMe;
+	typedef typename Iterator<TMe>::Type TIterator;
+	return TIterator(me);
+}
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline typename Iterator< SumList<DIM, TValue, SkipSumList<TSpec> > const>::Type
+begin(SumList<DIM, TValue, SkipSumList<TSpec> > const & me)
+{
+	typedef SumList<DIM, TValue, SkipSumList<TSpec> > const TMe;
+	typedef typename Iterator<TMe>::Type TIterator;
+	return TIterator(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline typename Iterator< SumList<DIM, TValue, SkipSumList<TSpec> > >::Type
+end(SumList<DIM, TValue, SkipSumList<TSpec> > & me)
+{
+	typedef SumList<DIM, TValue, SkipSumList<TSpec> >  TMe;
+	typedef typename Iterator<TMe>::Type TIterator;
+	return TIterator(me, GoEnd());
+}
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline typename Iterator< SumList<DIM, TValue, SkipSumList<TSpec> > const>::Type
+end(SumList<DIM, TValue, SkipSumList<TSpec> > const & me)
+{
+	typedef SumList<DIM, TValue, SkipSumList<TSpec> > const TMe;
+	typedef typename Iterator<TMe>::Type TIterator;
+	return TIterator(me, GoEnd());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//NOTE: the first argument is Sumlist, not Map!
+template <typename TValue, unsigned int DIM, typename TSpec, typename TSpec2>
+inline unsigned char
+_skiplistCreateHeight(SumList<DIM, TValue, SkipSumList<TSpec> > & me,
+					  SkiplistPath<TValue, TSpec2 > & path) //extend path if height is increased
+{
+	typedef Map<TValue, Skiplist<Skipsumlist_<DIM, TSpec> > > TSkiplist;
+
+	unsigned char height = geomRand<unsigned char>();
+	if (height >= TSkiplist::MAX_HEIGHT) height = TSkiplist::MAX_HEIGHT-1;
+
+	if (height > me.map.data_height)
+	{
+		for (unsigned char i = me.map.data_height + 1; i <= height; ++i)
+		{
+			path.data_elements[i] = & me.map.data_border;
+			//path.sums[i] = me.sum;
+			me.map.data_border.data_next[i].values = me.sum;
+		}
+		me.map.data_height = height;
+	}
+
+	return height;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec, typename TValues>
+inline void 
+appendValues(SumList<DIM, TValue, SkipSumList<TSpec> > & me,
+			 TValues const & vals)
+{
+	typedef SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > TPath;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	typedef Pair<TValue, TElement *> TPair;
+	typedef SumList<DIM, TValue, MiniSumList< > > TMiniSumList;
+
+	//find end of skip list
+	TPath path;
+	_skipsumlistFind(me.map, GoEnd(), 0, path);
+
+	if (!appendValues(path.data_elements[0]->minilist, vals))
+	{//not enough space in the current last element: append new
+		//create new element
+		unsigned char height = _skiplistCreateHeight(me, path);
+		TElement & el = _skiplistAllocateElement(me.map, height); //see map_skiplist.
+		valueConstruct(& (el.minilist));
+
+		//append value into minilist of the new element
+		appendValues(el.minilist, vals);
+
+		//link new element el into skiplist, adjust link weights
+		for (int i = height; i >= 0; --i)
+		{
+			path.data_elements[i]->data_next[i].data_element = & el;
+
+			el.data_next[i].data_element = 0;
+			el.data_next[i].values = vals;
+		}
+		for (int i = me.map.data_height; i > height ; --i)
+		{
+			path.data_elements[i]->data_next[i].values += vals;
+		}
+
+		//adjust map properties
+		++me.map.data_length;
+	}
+	else
+	{
+		//update skiplist path sums
+		for (int i = me.map.data_height; i >= 0 ; --i)
+		{
+			path.data_elements[i]->data_next[i].values += vals;
+		}
+	}
+
+	//update sumlist variables
+	me.sum += vals;
+	++me.length;
+}
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline void 
+appendValues(SumList<DIM, TValue, SkipSumList<TSpec> > & me,
+			 TValue * p_vals)
+{
+	SumListValues<DIM, TValue> vals(p_vals);
+	appendValues(me, vals);
+}
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline void 
+appendValues(SumList<DIM, TValue, SkipSumList<TSpec> > & me,
+			 TValue const * p_vals)
+{
+	SumListValues<DIM, TValue> vals(p_vals);
+	appendValues(me, vals);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Iterator for SkipSumList
+//////////////////////////////////////////////////////////////////////////////
+
+//Helpers for SkipSumListIterator
+
+template <typename TSumList>
+struct SumlistSkipListElement_
+{//dummy implementation
+	typedef SkiplistElement<int, void> Type;
+};
+template <unsigned int DIM, typename TValue, typename TSpec>
+struct SumlistSkipListElement_< SumList<DIM, TValue, SkipSumList<TSpec> > >
+{
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > Type;
+};
+template <unsigned int DIM, typename TValue, typename TSpec>
+struct SumlistSkipListElement_< SumList<DIM, TValue, SkipSumList<TSpec> > const >
+{
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > const Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+template <typename TSumList>
+struct SumListSkiplistMinilist_
+{//dummy implementation
+	typedef SumList<1, int, MiniSumList< > > Type;
+};
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+struct SumListSkiplistMinilist_< SumList<DIM, TValue, SkipSumList<TSpec> > >
+{
+	typedef SumList<DIM, TValue, MiniSumList< > > Type;
+};
+template <unsigned int DIM, typename TValue, typename TSpec>
+struct SumListSkiplistMinilist_< SumList<DIM, TValue, SkipSumList<TSpec> > const >
+{
+	typedef SumList<DIM, TValue, MiniSumList< > > const Type;
+};
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct SkipSumListIterator;
+
+template <typename TSumList>
+class Iter<TSumList, SkipSumListIterator>
+{
+public:
+	typedef typename Value<TSumList>::Type TValue;
+	typedef SumList<DIMENSION<TSumList>::VALUE, TValue, MiniSumList< > > TMiniSumList_;
+	typedef typename CopyConst_<TSumList, TMiniSumList_>::Type TMiniSumList;
+//	typedef typename SumListSkiplistMinilist_<TSumList>::Type TMiniSumList;
+	typedef typename Iterator<TMiniSumList>::Type TMiniSumListIterator;
+	typedef typename SumlistSkipListElement_<TSumList>::Type TElement;
+
+	TSumList * container;
+	mutable TMiniSumListIterator iter;
+	mutable TElement * element;
+
+	Iter()
+	{
+	}
+	Iter(TSumList & cont)
+		: container(& cont)
+	{
+		goBegin(*this);
+	}
+	Iter(TSumList & cont, GoEnd)
+		: container(& cont)
+		, element(0)
+	{
+	}
+	Iter(Iter const & other)
+		: container(other.container)
+		, iter(other.iter)
+		, element(other.element)
+	{
+	}
+
+	~Iter()
+	{
+	}
+	inline Iter const & 
+	operator = (Iter const & other)
+	{
+		container = other.container;
+		iter = other.iter;
+		element = other.element;
+		return *this;
+	}
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec, typename TIteratorSpec>
+struct Iterator< SumList<DIM, TValue, SkipSumList<TSpec> >, TIteratorSpec>
+{
+	typedef SumList<DIM, TValue, SkipSumList<TSpec> > TSumList_;
+	typedef Iter<TSumList_, SkipSumListIterator> Type;
+};
+template <unsigned int DIM, typename TValue, typename TSpec, typename TIteratorSpec>
+struct Iterator< SumList<DIM, TValue, SkipSumList<TSpec> > const, TIteratorSpec>
+{
+	typedef SumList<DIM, TValue, SkipSumList<TSpec> > const TSumList_;
+	typedef Iter<TSumList_, SkipSumListIterator> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline void
+goNext(Iter<TSumList, SkipSumListIterator> & it)
+{
+	goNext(it.iter);
+	if (atEnd(it.iter))
+	{
+		it.element = it.element->data_next[0].data_element;
+		if (it.element)
+		{
+			it.iter.container_ = & it.element->minilist;
+			it.iter.next_ = it.iter.here_ = it.element->minilist.data_;
+			scanValues(it.iter.next_, it.iter.values_);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//nicht ganz sauber, aber sollte funzen
+template <typename TSumList>
+inline void
+goPrevious(Iter<TSumList, SkipSumListIterator> & it)
+{
+	searchSumList(it, getSum(it, 0) - 1, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline void
+goBegin(Iter<TSumList, SkipSumListIterator> & it)
+{
+	it.element = & (it.container->map.data_border);
+	it.iter = begin(it.element->minilist);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline void
+goEnd(Iter<TSumList, SkipSumListIterator> & it)
+{
+	it.element = 0;
+	it.iter.sums_ = it.container->sum;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline void 
+goBeforeEnd(Iter<SumList<DIM, TValue, SkipSumList<TSpec> >, SkipSumListIterator > & it)
+{
+	typedef SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > TPath;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	typedef SumList<DIM, TValue, MiniSumList< > > TMiniSumList;
+
+	//find end of skip list
+	TPath path;
+	_skipsumlistFind(it.container->map, GoEnd(), 0, path);
+
+	it.element = path.data_elements[0];
+
+	//set minilist iterator to end of last minilist
+	it.iter.container_ = & it.element->minilist;
+	goBeforeEnd(it.iter);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline bool
+atBegin(Iter<TSumList, SkipSumListIterator> & it)
+{
+	return (it.iter == begin(it.element->minilist));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline bool
+atEnd(Iter<TSumList, SkipSumListIterator> & it)
+{
+	return (!it.element);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline typename Value<TSumList>::Type
+getValue(Iter<TSumList, SkipSumListIterator > & it,
+		 int dim)
+{
+	return it.iter.values_[dim];
+}
+template <typename TSumList>
+inline typename Value<TSumList>::Type
+getValue(Iter<TSumList, SkipSumListIterator > const & it,
+		 int dim)
+{
+	return it.iter.values_[dim];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline typename Values<TSumList>::Type
+getValues(Iter<TSumList, SkipSumListIterator > & it)
+{
+	return it.iter.values_;
+}
+template <typename TSumList>
+inline typename Values<TSumList>::Type
+getValues(Iter<TSumList, SkipSumListIterator > const & it)
+{
+	return it.iter.values_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList>
+inline typename Value<TSumList>::Type
+getSum(Iter<TSumList, SkipSumListIterator > & it,
+	   int dim)
+{
+	return it.iter.sums_[dim];
+}
+template <typename TSumList>
+inline typename Value<TSumList>::Type
+getSum(Iter<TSumList, SkipSumListIterator > const & it,
+	   int dim)
+{
+	return it.iter.sums_[dim];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//split the mini list at it and insert a new mini list in skiplist
+//path must be a path to it.element
+//path and it are adjusted to the new element if necessary
+template <unsigned int DIM, typename TValue, typename TSpec, typename TPath>
+inline void 
+_splitMiniList(Iter<SumList<DIM, TValue, SkipSumList<TSpec> >, SkipSumListIterator > & it,
+			   TPath & path)
+{
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	typedef SumListValues<DIM, TValue> TValues;
+
+	//height for new element, adjust path if necessary (if the height of the complete skiplist increases)
+	unsigned char height = _skiplistCreateHeight(* it.container, path);
+
+	//the current element
+	TElement & el1 = *(it.element);
+
+	//create new element
+	TElement & el2 = _skiplistAllocateElement(it.container->map, height); //see map_skiplist.h
+	valueConstruct(& (el2.minilist));
+
+	//move half of the values in el1 to el2
+	splitSumList(el1.minilist, el2.minilist);
+
+	if (!length(el2))
+	{//el1 was not full enough to create a split: remove el2 from skiplist and exit
+	 //(this should not happen, since _splitMiniList is only called it el1 is full)
+		_skiplistDeallocateElement(it.container->map, el2, height);
+		return;
+	}
+
+	//must adjust the iterator "it"?
+	int it_bytepos = it.iter.here_.data_ptr - el1.minilist.data_;
+	bool it_was_moved = (it_bytepos >= el1.minilist.data_size); //true if "it" points to el2
+
+	//insert new element el2 into skiplist
+	for (int i = height; i >= 0; --i)
+	{
+		TElement * predecessor;
+		if (path.data_elements[i] == & el1)
+		{//el2 is linked behind el1
+			predecessor = & el1;
+
+			//adjust values
+			el2.data_next[i].values = predecessor->data_next[i].values;
+			el2.data_next[i].values -= predecessor->minilist.data_sum;
+			predecessor->data_next[i].values = predecessor->minilist.data_sum;
+
+			if (it_was_moved)
+			{//adjust path
+				path.data_elements[i] = & el2;
+				path.sums[i] += predecessor->minilist.data_sum;
+			}
+		}
+		else
+		{//el2 is linked behind another element
+			predecessor = path.data_elements[i];
+
+			//adjust values
+			TValues pred_values = path.sums[0];
+			pred_values -= path.sums[i];
+			pred_values += el1.minilist.data_sum;
+
+			el2.data_next[i].values = predecessor->data_next[i].values;
+			el2.data_next[i].values -= pred_values;
+			predecessor->data_next[i].values = pred_values;
+
+			if (it_was_moved)
+			{//adjust path
+				path.data_elements[i] = & el2;
+				path.sums[i] += pred_values;
+			}
+		}
+
+		//link el2 into skiplist
+		el2.data_next[i].data_element = predecessor->data_next[i].data_element;
+		predecessor->data_next[i].data_element = & el2;
+	}
+
+	//adjust map properties
+	++it.container->map.data_length;
+
+	//adjust it.iter if it was moved
+	if (it_was_moved)
+	{
+		int here_length = it.iter.next_.data_ptr - it.iter.here_.data_ptr; //difference between next_ and here_
+		it.iter.here_.data_ptr = el2.minilist.data_ + it_bytepos - el1.minilist.data_size; //redirect here_
+		it.iter.next_.data_ptr = it.iter.here_.data_ptr + here_length; //redirect next_
+		it.element = & el2;
+		it.iter.container_ = & el2.minilist;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec, typename TValue2>
+inline void 
+assignValue(Iter<SumList<DIM, TValue, SkipSumList<TSpec> >, SkipSumListIterator > & it,
+			int dim,
+			TValue2 val)
+{
+	typedef SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > TPath;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	typedef Pair<TValue, TElement *> TPair;
+
+	TValue val_old = getValue(it, dim);
+
+	TPath path;
+	_skipsumlistFind(it.container->map, TPair(getSum(it, 0), it.element), 0, path);
+
+	if (!assignValue(it.iter, dim, val))
+	{//split
+		_splitMiniList(it, path);
+		assignValue(it.iter, dim, val);
+	}
+
+	//update skiplist path sums
+	for (int i = it.container->map.data_height; i >= 0 ; --i)
+	{
+		if (path.data_elements[i]->data_next[i].data_element == it.element)
+		{// adjust link outgoing from it.element
+			it.element->data_next[i].values[dim] += (val - val_old);
+		}
+		else
+		{// adjust link that jumps over it.element
+			path.data_elements[i]->data_next[i].values[dim] += (val - val_old);
+		}
+	}
+	it.container->sum[dim] += (val - val_old);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec, typename TValues>
+inline void 
+insertValues(Iter<SumList<DIM, TValue, SkipSumList<TSpec> >, SkipSumListIterator > & it,
+			 TValues const & vals)
+{
+	typedef SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > TPath;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	typedef Pair<TValue, TElement *> TPair;
+
+	TPath path;
+	_skipsumlistFind(it.container->map, TPair(getSum(it, 0), it.element), 0, path);
+
+	if (!insertValues(it.iter, vals))
+	{//split
+		_splitMiniList(it, path);
+		insertValues(it.iter, vals);
+	}
+
+	//update skiplist path sums
+	for (int i = it.container->map.data_height; i >= 0 ; --i)
+	{
+		path.data_elements[i]->data_next[i].values += vals;
+	}
+
+	//update sumlist variables
+	it.container->sum += vals;
+	++it.container->length;
+}
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline void 
+insertValues(Iter<SumList<DIM, TValue, SkipSumList<TSpec> >, SkipSumListIterator > & it,
+			 TValue * p_vals)
+{
+	SumListValues<DIM, TValue > vals(p_vals);
+	insertValues(it, vals);
+}
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline void 
+insertValues(Iter<SumList<DIM, TValue, SkipSumList<TSpec> >, SkipSumListIterator > & it,
+			 TValue const * p_vals)
+{
+	SumListValues<DIM, TValue > vals(p_vals);
+	insertValues(it, vals);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int DIM, typename TValue, typename TSpec>
+inline void 
+removeValues(Iter<SumList<DIM, TValue, SkipSumList<TSpec> >, SkipSumListIterator > & it)
+{
+	typedef SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > TPath;
+	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+	typedef Pair<TValue, TElement *> TPair;
+
+	TPath path;
+	_skipsumlistFind(it.container->map, TPair(getSum(it, 0), it.element), 0, path);
+
+	//update skiplist path sums
+	for (int i = it.container->map.data_height; i >= 0 ; --i)
+	{
+		path.data_elements[i]->data_next[i].values -= it.iter.values_;
+	}
+
+	//update sumlist variables
+	it.container->sum -= it.iter.values_;
+	--it.container->length;
+
+	//remove values
+	removeValues(it.iter);
+		
+	if (atEnd(it.iter))
+	{//move to next element
+		it.element = it.element->data_next[0].data_element;
+		if (it.element)
+		{
+			it.iter.container_ = & it.element->minilist;
+			it.iter.here_ = it.iter.next_ = it.iter.container_->data_;
+			scanValues(it.iter.next_, it.iter.values_);
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//template <unsigned int DIM, typename TValue, typename TSpec, typename TValue2>
+//inline void 
+//searchSumList(Iter<SumList<DIM, TValue, SkipSumList<TSpec> >, SkipSumListIterator > & it,
+//			  TValue2 const & val,
+//			  int dim)
+template <unsigned int DIM, typename TValue, typename TSpec, typename TSumList, typename TValue2>
+inline void 
+_searchSumlistSkip(Iter<TSumList, SkipSumListIterator > & it,
+					TValue2 const & val,
+					int dim)
+{
+	typedef SkiplistPath<TValue, Skipsumlist_<DIM, TSpec> > TPath;
+//	typedef SkiplistElement<TValue, Skipsumlist_<DIM, TSpec> > TElement;
+//	typedef Pair<TValue, TElement *> TPair;
+//	typedef SumList<DIM, TValue, MiniSumList< > > TMiniSumList;
+
+	TPath path;
+
+  // The assumpiton here is that val is signed and getSum() fits into it.
+	if (val >= static_cast<TValue2>(getSum(*it.container, dim)))
+	{
+		goEnd(it);
+		return;
+	}
+
+	_skipsumlistFind(it.container->map, val, dim, path);
+
+	it.element = path.data_elements[0];
+	it.iter.container_ = & it.element->minilist;
+	searchSumList(it.iter, val - path.sums[0][dim], dim);
+	it.iter.sums_ += path.sums[0];
+}
+
+template <unsigned int DIM, typename TValue, typename TSpec, typename TValue2>
+inline void 
+searchSumList(Iter<SumList<DIM, TValue, SkipSumList<TSpec> >, SkipSumListIterator > & it,
+			  TValue2 const & val,
+			  int dim)
+{
+	_searchSumlistSkip<DIM, TValue, TSpec>(it, val, dim);
+}
+template <unsigned int DIM, typename TValue, typename TSpec, typename TValue2>
+inline void 
+searchSumList(Iter<SumList<DIM, TValue, SkipSumList<TSpec> > const, SkipSumListIterator > & it,
+			  TValue2 const & val,
+			  int dim)
+{
+	_searchSumlistSkip<DIM, TValue, TSpec>(it, val, dim);
+}
+//template <unsigned int DIM, typename TValue, typename TSpec, typename TValue2>
+//inline void 
+//searchSumList(Iter<SumList<DIM, TValue, SkipSumList<TSpec> > const, SkipSumListIterator > & it,
+//			  TValue2 const & val,
+//			  int dim)
+//{
+//	_searchSumlistSkip<DIM, TValue, TSpec>(it, val, dim);
+//}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSumList, typename TSumList2>
+inline bool
+operator == (Iter<TSumList, SkipSumListIterator> const & left,
+			 Iter<TSumList2, SkipSumListIterator> const & right)
+{
+	return ((left.element == 0) && (right.element == 0)) || ((left.element == right.element) && (left.iter == right.iter));
+}
+
+template <typename TSumList, typename TSumList2>
+inline bool
+operator != (Iter<TSumList, SkipSumListIterator> const & left,
+			 Iter<TSumList2, SkipSumListIterator> const & right)
+{
+	return !(left == right);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//____________________________________________________________________________
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/misc/edit_environment.h b/src/SeqAn-1.3/seqan/misc/edit_environment.h
new file mode 100644
index 0000000..e1bd1fb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/edit_environment.h
@@ -0,0 +1,883 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MISC_EDIT_ENVIRONMENT_H
+#define SEQAN_HEADER_MISC_EDIT_ENVIRONMENT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+    template < typename TDistanceSpec, unsigned DISTANCE /*= 1*/ >
+    struct EditEnvironment;
+
+//////////////////////////////////////////////////////////////////////////////
+/*DUBLICATED DOCUMENTATION, SEE pipe_edit_environment.h
+.Spec.EditEnvironment:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Outputs tuples of the $tupleLen$ consecutive elements of the input stream.
+..signature:Pipe<TInput, Tupler<tupleLen, omitLast> >
+..param.TInput:The type of the pipeline module this module reads from.
+..param.tupleLen:The tuple length.
+...remarks:The tuples contain elements $in[i]in[i+1]...in[i+(tupleLen-1)]$.
+..param.omitLast:Omit half filled tuples.
+..param.omitLast:If $true$, the output stream is $tupleLen-1$ elements shorter than the input stream.
+..param.omitLast:If $false$, the lengths are identical and the last tuples are filled with blanks (default constructed elements) for undefined entries.
+..remarks:The output type is a @Class.Tuple@ of input elements and length $tupleLen$ (i.e. $Tuple<Value<TInput>::Type, tupleLen>$).
+..remarks:The tuples are sequences of the form $in[i]in[i-1]in[i-2]..in[i-tupleLen+1]$. For $omitLast=false$ $i$ begins with 0 and for $omitLast=true$ $i$ begins with $tupleLen-1$.
+..include:seqan/misc.h
+*/
+
+    template < typename TObject, typename TSpec >
+    class Enumerator
+    {
+	public:
+		Holder<TObject> data_host;
+		unsigned		minDist;
+		bool			trim;
+
+        Enumerator(TObject& _original):
+            data_host(_original),
+			minDist(0),
+			trim(true) {}
+
+		Enumerator(TObject& _original, unsigned _minDist):
+            data_host(_original),
+			minDist(_minDist),
+			trim(true) {}
+	};
+		
+	template <typename TObject, typename TSpec>
+	struct Value< Enumerator<TObject, TSpec> >:
+		Value<TObject> {};
+
+	template <typename TObject, typename TSpec>
+	struct Reference< Enumerator<TObject, TSpec> > {
+		typedef TObject & Type;
+	};
+
+	template <typename TObject, typename TSpec>
+	struct Reference< Enumerator<TObject, TSpec> const > {
+		typedef TObject const & Type;
+	};
+
+	template <typename TObject, typename TSpec>
+	struct Size< Enumerator<TObject, TSpec> >:
+		Size<TObject> {};
+
+	template <typename TObject, typename TSpec>
+	struct Difference< Enumerator<TObject, TSpec> >:
+		Difference<TObject> {};
+
+	template <typename TObject, typename TSpec>
+	struct Position< Enumerator<TObject, TSpec> >:
+		Position<TObject> {};
+
+	template <typename TObject, typename TSpec>
+	struct Iterator< Enumerator<TObject, TSpec>, Standard > {
+		typedef Iter< Enumerator<TObject, TSpec>, Standard > Type;
+	};
+	template <typename TObject, typename TSpec>
+	struct Iterator< Enumerator<TObject, TSpec> const, Standard > {
+		typedef Iter< Enumerator<TObject, TSpec>, Standard > Type;
+	};
+
+	template <typename TObject, typename TSpec>
+	struct Host< Enumerator< TObject, TSpec> > {
+		typedef TObject Type;
+	};
+	template <typename TObject, typename TSpec>
+	struct Host< Enumerator< TObject, TSpec> const > {
+		typedef TObject const Type;
+	};
+
+	template <typename TText, typename TSpec>
+	inline Holder<TText> & 
+	_dataHost(Enumerator<TText, TSpec> &enumerator) {
+		return enumerator.data_host;
+	}
+	template <typename TText, typename TSpec>
+	inline Holder<TText> const & 
+	_dataHost(Enumerator<TText, TSpec> const &enumerator) {
+		return enumerator.data_host;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TSize>
+	struct EnumeratorHammingModifier_
+	{
+		TSize		errorPos;		// position of substitution
+		unsigned	character;		// replacement character 
+		unsigned	skipChar;		// skip the original character
+	};
+
+	template < typename TObject, unsigned DISTANCE >
+    class Iter< Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard >
+    {
+	public:
+		typedef typename Value<TObject>::Type			TValue;
+		typedef typename Size<TObject>::Type			TSize;
+		typedef typename MakeSigned_<TSize>::Type		TSignedSize;
+		typedef EnumeratorHammingModifier_<TSignedSize> TModifier;
+        
+		TObject									&orig;
+//		typename RemoveConst_<TObject>::Type	tmp;
+		String<TValue>							tmp;
+
+		TModifier	mod[DISTANCE];
+		unsigned	minDist;
+		bool		trim;
+		
+		Iter(TObject& _original):
+            orig(_original),
+			minDist(0)
+		{
+			goBegin(*this);
+		}
+
+		Iter(TObject& _original, unsigned _minDist, bool _trim):
+            orig(_original),
+			minDist(_minDist),
+			trim(_trim)
+		{
+			goBegin(*this);
+		}
+
+		Iter(TObject& _original, MinimalCtor):
+			orig(_original),
+			minDist(0) {}
+
+		Iter(TObject& _original, unsigned _minDist, bool _trim, MinimalCtor):
+			orig(_original),
+			minDist(_minDist),
+			trim(_trim) {}
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TObject, typename TSpec >
+    inline TObject const &
+	operator * (Iter<Enumerator<TObject, TSpec>, Standard> & it)
+	{
+		return it.tmp;
+	}
+
+	template < typename TObject, typename TSpec >
+    inline TObject const &
+	operator * (Iter<Enumerator<TObject, TSpec>, Standard> const & it)
+	{
+		return it.tmp;
+	}
+
+//////////////////////////////////////////////////////////////////////////////
+// enumerate the hamming 1-environment
+
+	template < typename TObject, unsigned DISTANCE >
+    inline void
+	goBegin(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it)
+	{
+		typedef typename Value<TObject>::Type			TValue;
+		typedef typename Size<TObject>::Type			TSize;
+		typedef typename MakeSigned_<TSize>::Type		TSignedSize;
+		typedef EnumeratorHammingModifier_<TSignedSize>	TModifier;
+
+		if (empty(it.orig) || it.minDist > DISTANCE || it.minDist > length(it.orig)) {
+			goEnd(it);
+			return;
+		}
+
+		it.tmp = it.orig;
+
+		unsigned i = 0;
+		unsigned mDist = it.minDist;
+
+		if (mDist > length(it.orig))
+			mDist = length(it.orig);
+
+		if (mDist == 0) {
+			it.mod[0].errorPos = 0;
+			it.mod[0].skipChar = -1;
+			it.mod[0].character = 0;
+			assignValueAt(it.tmp, 0, (TValue) 0);
+			i = 1;
+		} else
+			for(; i < mDist; ++i) {
+				TModifier &mod = it.mod[i];
+				mod.errorPos = (mDist - 1) - i;
+				mod.skipChar = (unsigned) it.orig[mod.errorPos];
+				mod.character = (0 == mod.skipChar)? 1: 0;
+				assignValueAt(it.tmp, mod.errorPos, (TValue) mod.character);
+			}
+		for(; i < DISTANCE; ++i) {
+			TModifier &mod = it.mod[i];
+			mod.errorPos = -1;
+			mod.character = 0;
+			mod.skipChar = -1;
+		}
+	}
+	
+	template < typename TObject, unsigned DISTANCE >
+    inline void
+	atBegin(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & it)
+	{
+		Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> tmp(it.orig, it.minDist, it.trim);
+		return tmp == it;
+	}
+
+	template < typename TObject, unsigned DISTANCE >
+    inline bool
+	atBegin(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it)
+	{
+		return atBegin(const_cast<Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const &>(it));
+	}
+
+	template < typename TObject, unsigned DISTANCE >
+    inline void
+	goEnd(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it)
+	{
+		typedef typename Size<TObject>::Type			TSize;
+		typedef typename MakeSigned_<TSize>::Type		TSignedSize;
+		typedef EnumeratorHammingModifier_<TSignedSize>	TModifier;
+
+		for(unsigned i = 0; i < DISTANCE; ++i) {
+			TModifier &mod = it.mod[i];
+			mod.errorPos = -1;
+			mod.character = 0;
+		}
+	}
+
+	template < typename TObject, unsigned DISTANCE >
+    inline bool
+	atEnd(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & it)
+	{
+		typedef typename Size<TObject>::Type			TSize;
+		typedef typename MakeSigned_<TSize>::Type		TSignedSize;
+		typedef EnumeratorHammingModifier_<TSignedSize>	TModifier;
+
+		for(unsigned i = 0; i < DISTANCE; ++i) {
+			TModifier const &mod = it.mod[i];
+			if (mod.errorPos != (TSignedSize)-1 || mod.character != 0u)
+				return false;
+		}
+		return true;
+	}
+
+	template < typename TObject, unsigned DISTANCE >
+    inline bool
+	atEnd(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it)
+	{
+		return atEnd(const_cast<Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const &>(it));
+	}
+
+	template < typename TObject, unsigned DISTANCE >
+    inline Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> &
+	operator ++ (Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it) 
+	{
+		typedef typename Value<TObject>::Type			TValue;
+		typedef typename Size<TObject>::Type			TSize;
+		typedef typename MakeSigned_<TSize>::Type		TSignedSize;
+		typedef EnumeratorHammingModifier_<TSignedSize>	TModifier;
+
+		for(unsigned i = 0; true;)
+		{
+			TModifier *mod = &it.mod[i];
+
+			// next replacement value
+			if (++mod->character < ValueSize<TValue>::VALUE) {
+				// output the original tuple only once
+				if (mod->character == mod->skipChar) continue;
+				assignValueAt(it.tmp, mod->errorPos, (TValue) mod->character);
+				break;
+			}
+			mod->character = (0 == mod->skipChar)? 1: 0;
+			assignValueAt(it.tmp, mod->errorPos, (TValue) mod->character);
+
+			if (++i == DISTANCE || (mod + 1)->errorPos == (TSignedSize)-1)
+			{
+				for(i = 0; i < DISTANCE; ++i) 
+				{
+					mod = &it.mod[i];
+
+					// restore char at old position
+					if (mod->errorPos >= 0)
+					{
+						std::cout<<"org"<<it.orig<<"  tmp"<<it.tmp<<" ___  ";
+						assignValueAt(it.tmp, mod->errorPos, it.orig[mod->errorPos]);
+						std::cout<<"org"<<it.orig<<"  tmp"<<it.tmp<<std::endl;
+					}
+
+					// next error position
+					if (++(mod->errorPos) < (TSignedSize)(length(it.tmp) - i)) 
+					{
+						mod->skipChar = (unsigned) it.orig[mod->errorPos];
+						mod->character = (0 == mod->skipChar)? 1: 0;
+						assignValueAt(it.tmp, mod->errorPos, (TValue) mod->character);
+
+						for(; i > 0;) {
+							mod = &it.mod[i];
+							it.mod[i - 1].errorPos = mod->errorPos + 1;
+							--i;
+							mod->skipChar = (unsigned) it.orig[mod->errorPos];
+							mod->character = (0 == mod->skipChar)? 1: 0;
+							assignValueAt(it.tmp, mod->errorPos, (TValue) mod->character);
+						}
+						return it;
+					}
+				}
+				// end
+				for(i = 0; i < DISTANCE; ++i) {
+					mod = &it.mod[i];
+					mod->errorPos = -1;
+					mod->character = 0;
+				}
+				return it;
+			}
+		}
+        return it;
+    }
+
+	template < typename TObject, unsigned DISTANCE >
+	inline typename Size< Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> > >::Type
+    length(Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> > const & me)
+	{
+		typedef typename Value<TObject>::Type TValue;
+		typedef typename Size<TObject>::Type TSize;
+
+		static const unsigned alphabetSize = ValueSize<TValue>::VALUE;
+		TSize sum = 0;
+		TSize numerator = 1;
+		TSize alpha = 1;
+		TSize divisor = 1;
+
+		for(unsigned i = 0; i <= DISTANCE; ++i) 
+		{
+			if (i >= me.minDist)
+				sum += alpha * (numerator / divisor);
+
+			divisor		*= i + 1;
+			numerator	*= length(host(me)) - i;
+			alpha		*= alphabetSize - 1;
+		}
+
+		return sum;
+    }
+
+
+//////////////////////////////////////////////////////////////////////////////
+// enumerate the levenshtein 1-environment
+
+	template <typename TSize>
+	struct EnumeratorLevenshteinModifier_ 
+	{
+		enum TState { DISABLED_, SUBST_, DELETE_, INSERT_, Eof_ };
+		TSize		errorPosOrig;	// position of edit operation in original string
+		TSize		errorPos;		// position of edit operation in modified string
+		TSize		errorPosEnd;	// errorPos < errorPosEnd must be fulfilled
+		unsigned	character;		// replacement character 
+		unsigned	skipChar;		// skip the original character
+		TState		state;			// current state subst/insert before/delete
+	};
+
+	template < typename TObject, unsigned DISTANCE >
+	class Iter< Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard >
+	{
+	public:
+		typedef typename Value<TObject>::Type				TValue;
+		typedef typename Size<TObject>::Type				TSize;
+		typedef typename MakeSigned_<TSize>::Type			TSignedSize;
+		typedef EnumeratorLevenshteinModifier_<TSignedSize> TModifier;
+        
+		TObject									&orig;
+//		typename RemoveConst_<TObject>::Type	tmp;
+		String<TValue>							tmp;
+
+		TModifier	mod[DISTANCE + 1];
+		unsigned	minDist;
+		unsigned	currentDistance;		// upper bound for dist(original, *this)
+		bool		trim;
+
+		Iter(TObject& _original):
+            orig(_original),
+			minDist(0),
+			trim(true)
+		{
+			goBegin(*this);
+		}
+
+		Iter(TObject& _original, unsigned _minDist, bool _trim):
+            orig(_original),
+			minDist(_minDist),
+			trim(_trim)
+		{
+			goBegin(*this);
+		}
+
+		Iter(TObject& _original, MinimalCtor):
+			orig(_original),
+			minDist(0) {}
+
+		Iter(TObject& _original, unsigned _minDist, bool _trim, MinimalCtor):
+			orig(_original),
+			minDist(_minDist),
+			trim(_trim) {}
+
+		inline bool _reinit(int pos, int posOrig)
+		{
+			tmp = orig;
+			int posOrigEnd = length(tmp);
+			typename TModifier::TState lastState = TModifier::DISABLED_;
+			// i from high to low  =  modifier from left to right
+			for(int i = currentDistance - 1; i >= 0; --i)
+			{
+				TModifier &_mod = mod[i];
+				switch (_mod.state) {
+					case TModifier::SUBST_:
+						// INSERT+SUBST is SUBST+INSERT (already enumerated)
+						// DELETE+SUBST is SUBST+DELETE (already enumerated)
+						// eventually trim front SUBSTs
+						if (lastState == TModifier::INSERT_ || lastState == TModifier::DELETE_ ||
+							(trim && posOrig == 0)) 
+						{
+							++posOrig;
+							++pos;
+						}
+						if (posOrig >= posOrigEnd)
+							return false;
+						_mod.errorPosOrig = posOrig;
+						_mod.errorPos = pos;
+						_mod.skipChar = (unsigned) orig[posOrig];
+						_mod.character = (0 == _mod.skipChar)? 1: 0;
+						assignValueAt(tmp, pos, (TValue) _mod.character);
+						++pos;
+						++posOrig;
+						break;
+
+					case TModifier::DELETE_:
+						// INSERT after DELETE is one SUBST (already enumerated)
+						if (lastState == TModifier::INSERT_) {
+							++posOrig;
+							++pos;
+						}
+						if (posOrig >= posOrigEnd)
+							return false;
+						_mod.errorPosOrig = posOrig;
+						_mod.errorPos = pos;
+						_mod.character = ValueSize<TValue>::VALUE - 1;
+						_mod.skipChar = -1;
+						++posOrig;
+						erase(tmp, pos);
+						break;
+
+					case TModifier::INSERT_:
+					default:
+						// DELETE after INSERT is one SUBST (already enumerated)
+						// eventually trim front SUBSTs
+						if (lastState == TModifier::DELETE_ || (trim && posOrig == 0)) 
+						{
+							++posOrig;
+							++pos;
+						}
+						if (posOrig > posOrigEnd)
+							return false;
+						_mod.errorPosOrig = posOrig;
+						_mod.errorPos = pos;
+						_mod.character = 0;
+						_mod.skipChar = -1;
+						insertValue(tmp, pos, (TValue)0);
+						++pos;
+						break;
+				}
+				lastState = _mod.state;
+			}
+
+			pos = length(tmp);
+			bool cut = trim;
+			for(unsigned i = 0; i < currentDistance; ++i) 
+			{
+				TModifier &_mod = mod[i];
+				if (_mod.state != TModifier::DELETE_) {
+					if (cut) {
+						if (_mod.errorPos >= (TSignedSize)(pos - 1))
+							return false;
+						_mod.errorPosEnd = pos - 1;
+					} else {
+						if (_mod.errorPos >= (TSignedSize)pos)
+							return false;
+						_mod.errorPosEnd = pos;
+					}
+					--pos;
+				} else {
+					cut = false;
+					if (_mod.errorPos > (TSignedSize)pos)
+						return false;
+					_mod.errorPosEnd = pos + 1;
+				}
+			}
+			return true;
+		}
+	};
+
+
+	template < typename TObject, unsigned DISTANCE >
+    inline void
+	goBegin(Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> & it)
+	{
+		typedef typename Value<TObject>::Type				TValue;
+		typedef typename Size<TObject>::Type				TSize;
+		typedef typename MakeSigned_<TSize>::Type			TSignedSize;
+		typedef EnumeratorLevenshteinModifier_<TSignedSize>	TModifier;
+
+		if (empty(it.orig) || it.minDist > DISTANCE || it.minDist > length(it.orig)) {
+			goEnd(it);
+			return;
+		}
+
+		it.tmp = it.orig;
+		for(unsigned i = 0; i <= DISTANCE; ++i) {
+			it.mod[i].errorPosOrig = -1;
+			it.mod[i].errorPos = -1;
+			it.mod[i].errorPosEnd = -1;
+			it.mod[i].character = ValueSize<TValue>::VALUE - 1;
+			it.mod[i].state = TModifier::DISABLED_;
+		}
+		it.currentDistance = it.minDist;
+		if (!it._reinit(0, 0))
+			goEnd(it);
+	}
+
+	template < typename TObject, unsigned DISTANCE >
+    inline void
+	goEnd(Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> & it)
+	{
+		typedef typename Size<TObject>::Type				TSize;
+		typedef typename MakeSigned_<TSize>::Type			TSignedSize;
+		typedef EnumeratorLevenshteinModifier_<TSignedSize>	TModifier;
+
+		for(unsigned i = 0; i < DISTANCE; ++i) {
+			TModifier &mod = it.mod[i];
+			mod.errorPos = -1;
+			mod.character = 0;
+			mod.state = TModifier::SUBST_;
+		}
+	}
+
+
+	template < typename TObject, unsigned DISTANCE >
+    inline Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> &
+	operator ++ (Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> &it) 
+	{
+		typedef typename Value<TObject>::Type				TValue;
+		typedef typename Size<TObject>::Type				TSize;
+		typedef typename MakeSigned_<TSize>::Type			TSignedSize;
+		typedef EnumeratorLevenshteinModifier_<TSignedSize>	TModifier;
+		typedef typename TModifier::TState					TState;
+
+		// increment characters
+		TModifier *mod = it.mod;
+		do
+		{
+			// next replacement/insert value (loop core)
+			if (++(mod->character) < ValueSize<TValue>::VALUE) {
+				// output the original tuple only once
+				if (mod->character == mod->skipChar) continue;
+				assignValueAt(it.tmp, mod->errorPos, (TValue) mod->character);
+				return it;
+			}
+
+			// reset counter
+			if (mod->state != mod->DELETE_) {
+				mod->character = (0 == mod->skipChar)? 1: 0;
+				assignValueAt(it.tmp, mod->errorPos, (TValue) mod->character);
+			}
+
+			// next modifier
+			++mod;
+		} while (mod->state != TModifier::DISABLED_);
+
+		// increment positions
+		mod = it.mod;
+		do
+		{
+			// restore char at old position
+			if (mod->errorPos >= 0)
+				assignValueAt(it.tmp, mod->errorPos, it.orig[mod->errorPosOrig]);
+
+//					int iMax = (TSignedSize)(length(it.tmp) - i);
+//					if (mod->state == mod->INSERT_) ++iMax;
+
+			// next error position
+			if (++(mod->errorPos) < mod->errorPosEnd)
+			{
+				++(mod->errorPosOrig);
+
+				// set next char
+				if (mod == it.mod)
+				{	// for the first modifier we use an optimization
+					if (mod->state != mod->DELETE_) {
+						if (mod->state == mod->SUBST_)
+							mod->skipChar = (unsigned) it.orig[mod->errorPosOrig];
+						else
+							mod->skipChar = -1;
+						mod->character = (0 == mod->skipChar)? 1: 0;
+						assignValueAt(it.tmp, mod->errorPos, (TValue) mod->character);
+					}
+				} else
+					if (!it._reinit(mod->errorPos, mod->errorPosOrig))
+						break;
+
+				return it;
+			}
+			++mod;
+		} while (mod->state != TModifier::DISABLED_);
+
+		// increment states
+		mod = it.mod;
+		TModifier *modEnd = mod + DISTANCE;
+		do 
+		{
+			// next edit state (subst->insert->delete)
+			if (mod->state != mod->INSERT_) 
+			{
+				mod->state = (TState)(mod->state + 1);
+				if (mod->state == TModifier::SUBST_)
+					++it.currentDistance;
+			
+				if (!it._reinit(0, 0)) {
+					mod = it.mod;
+                    continue;						
+				}
+				return it;
+			} else
+				mod->state = mod->SUBST_;
+			++mod;
+		} while (mod != modEnd);
+
+		// end
+		for(mod = it.mod; mod != modEnd; ++mod) {
+			mod->errorPos = -1;
+			mod->character = 0;
+			mod->state = mod->SUBST_;
+		}
+		return it;
+    }
+
+	template < typename TObject, unsigned DISTANCE >
+	inline typename Size< Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> > >::Type
+    length(Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> > const & me)
+	{
+		typedef typename Value<TObject>::Type TValue;
+		typedef typename Size<TObject>::Type TSize;
+
+		static const unsigned alpha = ValueSize<TValue>::VALUE;
+		TSize sum = 0;
+		TSize numerator = 1;
+		TSize divisor = 1;
+		TSize len = length(host(me));
+
+		if (me.minDist == 0 && len > 0)
+			++sum;
+
+		if (me.minDist <= 1 && DISTANCE >= 1)
+		{
+			if (me.trim) {
+				if (len > 2) sum += (alpha - 1) * (len - 2);	// substitutions
+				sum += len;										// deletions
+				if (len > 1) sum += alpha * (len - 1);			// inserts
+			} else {
+				sum += (alpha - 1) * len;						// substitutions
+				sum += len;										// deletions
+				sum += alpha * (len + 1);						// inserts
+			}
+		}
+
+		if (me.minDist <= 2 && DISTANCE >= 2)
+		{
+			if (me.trim) {
+				sum += (alpha  - 1) * (alpha - 1) *  len      * (len - 1) / 2;	// subst^2
+				sum += (alpha  - 1)               * (len - 1) * (len - 1);		// subst*del
+				sum += (alpha  - 1) *  alpha      *  len      * (len + 1);		// subst*ins
+				sum +=                               len      * (len - 1) / 2;	// del^2
+				sum +=  alpha       *  alpha      * (len + 1) * (len + 1) / 2;	// ins^2
+			} else {
+				sum += (alpha  - 1) * (alpha - 1) *  len      * (len - 1) / 2;	// subst^2
+				sum += (alpha  - 1)               * (len - 1) * (len - 1);		// subst*del
+				sum += (alpha  - 1) *  alpha      *  len      * (len + 1);		// subst*ins
+				sum +=                               len      * (len - 1) / 2;	// del^2
+				sum +=  alpha       *  alpha      * (len + 1) * (len + 1) / 2;	// ins^2
+			}
+		}
+
+		// TODO: length function for DISTANCE >= 3 (if anyone needs should this)
+
+		return sum;
+    }
+
+//////////////////////////////////////////////////////////////////////////////
+
+	//////////////////////////////////////////////////////////////////////////////
+	// begin
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TObject, typename TSpec >
+	inline Iter< Enumerator<TObject, TSpec>, Standard >
+	begin(Enumerator<TObject, TSpec> &enumerator, Standard) {
+		return Iter< Enumerator<TObject, TSpec>, Standard >(host(enumerator), enumerator.minDist, enumerator.trim);
+	}
+	template < typename TObject, typename TSpec >
+	inline Iter< Enumerator<TObject, TSpec>, Standard >
+	begin(Enumerator<TObject, TSpec> const &enumerator, Standard) {
+		return Iter< Enumerator<TObject, TSpec>, Standard >(host(enumerator), enumerator.minDist, enumerator.trim);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// end
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename TObject, typename TSpec >
+	inline Iter< Enumerator<TObject, TSpec>, Standard >
+	end(Enumerator<TObject, TSpec> &enumerator, Standard) {
+		Iter< Enumerator<TObject, TSpec>, Standard > iter(host(enumerator), enumerator.minDist, enumerator.trim, MinimalCtor());
+		goEnd(iter);
+		return iter;
+	}
+	template < typename TObject, typename TSpec >
+	inline Iter< Enumerator<TObject, TSpec>, Standard >
+	end(Enumerator<TObject, TSpec> const &enumerator, Standard) {
+		Iter< Enumerator<TObject, TSpec>, Standard > iter(host(enumerator), enumerator.minDist, enumerator.trim, MinimalCtor());
+		goEnd(iter);
+		return iter;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator ==
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TObject, unsigned DISTANCE>
+	inline bool
+	operator == (
+		Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & a,
+		Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & b)
+	{
+		typedef typename Size<TObject>::Type			TSize;
+		typedef typename MakeSigned_<TSize>::Type		TSignedSize;
+		typedef EnumeratorHammingModifier_<TSignedSize>	TModifier;
+
+		if (&a.orig != &b.orig) return false;
+
+		for(unsigned i = 0; i < DISTANCE; ++i) {
+			TModifier const &modA = a.mod[i];
+			TModifier const &modB = b.mod[i];
+			if (modA.errorPos != modB.errorPos || modA.character != modB.character)
+				return false;
+		}
+
+		return true;
+	}
+
+	template <typename TObject, unsigned DISTANCE>
+	inline bool
+	operator == (
+		Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> const & a,
+		Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> const & b)
+	{
+		typedef typename Size<TObject>::Type				TSize;
+		typedef typename MakeSigned_<TSize>::Type			TSignedSize;
+		typedef EnumeratorLevenshteinModifier_<TSignedSize>	TModifier;
+
+		if (&a.orig != &b.orig) return false;
+
+		for(unsigned i = 0; i < DISTANCE; ++i) {
+			TModifier const &modA = a.mod[i];
+			TModifier const &modB = b.mod[i];
+			if (modA.errorPos != modB.errorPos || 
+				modA.character != modB.character || 
+				modA.state != modB.state)
+				return false;
+		}
+
+		return true;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator !=
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TObject, unsigned DISTANCE>
+	inline bool
+	operator != (
+		Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & a,
+		Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & b)
+	{
+		typedef typename Size<TObject>::Type			TSize;
+		typedef typename MakeSigned_<TSize>::Type		TSignedSize;
+		typedef EnumeratorHammingModifier_<TSignedSize>	TModifier;
+
+		if (&a.orig != &b.orig) return true;
+
+		for(unsigned i = 0; i < DISTANCE; ++i) {
+			TModifier const &modA = a.mod[i];
+			TModifier const &modB = b.mod[i];
+			if (modA.errorPos != modB.errorPos || modA.character != modB.character)
+				return true;
+		}
+
+		return false;
+	}
+
+	template <typename TObject, unsigned DISTANCE>
+	inline bool
+	operator != (
+		Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> const & a,
+		Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> const & b)
+	{
+		typedef typename Size<TObject>::Type				TSize;
+		typedef typename MakeSigned_<TSize>::Type			TSignedSize;
+		typedef EnumeratorLevenshteinModifier_<TSignedSize>	TModifier;
+
+		if (&a.orig != &b.orig) return true;
+
+		for(unsigned i = 0; i < DISTANCE; ++i) {
+			TModifier const &modA = a.mod[i];
+			TModifier const &modB = b.mod[i];
+			if (modA.errorPos != modB.errorPos || 
+				modA.character != modB.character || 
+				modA.state != modB.state)
+				return true;
+		}
+
+		return false;
+	}
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/misc/misc_base.h b/src/SeqAn-1.3/seqan/misc/misc_base.h
new file mode 100644
index 0000000..eaceaf0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_base.h
@@ -0,0 +1,124 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MISC_BASE_H
+#define SEQAN_HEADER_MISC_BASE_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	//////////////////////////////////////////////////////////////////////////////
+	// In SeqAn sets and maps store elements as pairs of (key,object) 
+	// the elements of sets without objects are the keys.
+	//////////////////////////////////////////////////////////////////////////////
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Key/Object meta-functions
+	//////////////////////////////////////////////////////////////////////////////
+
+/* moved to basic_h, see #6
+	template <typename TElement>
+	struct Key {
+		typedef TElement Type;
+	};
+*/
+/* moved to basic_aggregates
+	template <typename TKey, typename TObject, typename TSpec>
+	struct Key< Pair<TKey, TObject, TSpec> > 
+	{
+		typedef TKey Type;
+	};
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TElement>
+	struct Object {
+		typedef Nothing Type;
+	};
+
+	template <typename TKey, typename TObject, typename TSpec>
+	struct Object< Pair<TKey, TObject, TSpec> > {
+		typedef TObject Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// keyOf function
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TElement>
+	inline typename Key<TElement>::Type & 
+	keyOf(TElement & element) 
+	{
+		return element;
+	}
+	template <typename TElement>
+	inline typename Key<TElement const>::Type & 
+	keyOf(TElement const & element) 
+	{
+		return element;
+	}
+
+	template <typename TKey, typename TObject, typename TSpec>
+	inline TKey & 
+	keyOf(Pair<TKey, TObject, TSpec> &element) {
+		return element.i1;
+	}
+	template <typename TKey, typename TObject, typename TSpec>
+	inline TKey const &
+	keyOf(Pair<TKey, TObject, TSpec> const &element) {
+		return element.i1;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// objectOf
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TKey, typename TObject, typename TSpec>
+	inline TObject & 
+	objectOf(Pair<TKey, TObject, TSpec> &element) {
+		return element.i2;
+	}
+	template <typename TKey, typename TObject, typename TSpec>
+	inline TObject const &
+	objectOf(Pair<TKey, TObject, TSpec> const &element) {
+		return element.i2;
+	}
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/misc/misc_cmdparser.h b/src/SeqAn-1.3/seqan/misc/misc_cmdparser.h
new file mode 100644
index 0000000..1bce9d3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_cmdparser.h
@@ -0,0 +1,1722 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_MISC_CMDPARSER
+#define SEQAN_MISC_CMDPARSER
+
+#include <sstream>
+#include <seqan/map.h>
+#include <seqan/sequence.h>
+#include <seqan/file.h>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+//  TODO:
+//      * support some more formating options
+//      * store/return error code (invalid argument, invalid option, etc.)
+//      * support named arguments (e.g. <ARG1> -> <INPUT FILE>)
+//////////////////////////////////////////////////////////////////////////////
+template<typename TChar>
+inline bool
+_isDigit(TChar const c)
+{
+    return (c >= '0') && (c <= '9');
+}
+
+template<typename TString>
+inline bool
+_isDouble(TString const s)
+{
+    bool _dot = true;
+    unsigned l = length(s);
+    unsigned i = 0;
+
+    // skip leading sign
+    if(s[i] == '-') ++i;
+    while(i < l){
+        if(!_isDigit(s[i])){
+            if(s[i] == '.' && _dot){
+                _dot = false;
+            }else return false;
+        }
+        ++i;
+    }
+    return true;
+}
+
+template<typename TString>
+inline bool
+_isInt(TString const s)
+{
+    unsigned l = length(s);
+    unsigned i = 0;
+    // skip leading sign
+    if (s[i] == '-') ++i;
+    while(i < l){
+        if(!_isDigit(s[i])) return false;
+        ++i;
+    }
+    return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct OptionType
+{
+    // TODO(holtgrew): Should be all upper case!
+    enum {
+        Bool = 1,		    // option needs no argument, value is true iff given on command line
+        Boolean = 1,		// option needs no argument, value is true iff given on command line
+        String = 2,			// argument is a string
+        Int = 4,			// ... an integer
+        Integer = 4,		// ... an integer
+        Double = 8,			// ... a float
+        Mandatory = 16,		// option must be set
+		Label = 32,			// automatically print a label for the argument(s) on the help screen
+		List = 64,			// option is a list of values
+        Hidden = 128		// hide this option from the help screen
+	};
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Class.CommandLineOption:
+..cat:Miscellaneous
+..summary:Stores information for a specific command line option.
+..signature:CommandLineOption
+..remarks:A @Class.CommandLineOption@ object can be added to a @Class.CommandLineParser@ via @Function.addOption at .
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+class CommandLineOption
+{
+public:
+    CharString			longName;			// long option name
+    CharString			shortName;			// short option name
+	CharString			arguments;			// argument names seperated by spaces
+
+    CharString			helpText;			// option description
+    int					optionType;			// option type
+	int					argumentsPerOption;	// number of arguments per option
+	
+	String<CharString>	defaultValue;
+	String<CharString>	value;
+
+    CommandLineOption() {}
+
+    CommandLineOption(
+		CharString const & _short,
+		CharString const & _long,
+		CharString const & _help,
+		int _type
+	) :
+		longName(_long),
+		shortName(_short),
+		helpText(_help),
+		optionType(_type),
+		argumentsPerOption(1)
+	{
+	}
+
+    CommandLineOption(
+		CharString const & _short,
+		CharString const & _long,
+		int _argumentsPerOption,
+		CharString const & _help,
+		int _type
+	) :
+		longName(_long),
+		shortName(_short),
+		helpText(_help),
+		optionType(_type),
+		argumentsPerOption(_argumentsPerOption)
+	{
+	}
+
+	template <typename TValue>
+    CommandLineOption(
+		CharString const & _short,
+		CharString const & _long,
+		int _argumentsPerOption,
+		CharString const & _help,
+		int _type,
+		TValue const & _default
+	) :
+		longName(_long),
+		shortName(_short),
+		helpText(_help),
+		optionType(_type),
+		argumentsPerOption(_argumentsPerOption)
+	{
+		std::stringstream strm;
+		strm << _default;
+		appendValue(defaultValue, strm.str());
+		append(helpText, " (default ");
+		append(helpText, strm.str());
+		appendValue(helpText, ')');
+	}
+
+	template <typename TValue>
+    CommandLineOption(
+		CharString const & _short,
+		CharString const & _long,
+		CharString const & _help,
+		int _type,
+		TValue const & _default
+	) :
+		longName(_long),
+		shortName(_short),
+		helpText(_help),
+		optionType(_type),
+		argumentsPerOption(1)
+	{
+		std::stringstream strm;
+		strm << _default;
+		appendValue(defaultValue, strm.str());
+		append(helpText, " (default ");
+		append(helpText, strm.str());
+		appendValue(helpText, ')');
+	}
+
+/**
+.Memfunc.CommandLineOption#CommandLineOption:
+..class:Class.CommandLineOption
+..summary:Constructor
+..signature:CommandLineOption ()
+..signature:CommandLineOption (shortName, longName[, argumentsPerOption], helpText, optionType[, defaultValue])
+..param.shortName:A @Shortcut.CharString@ containing the short-name option identifier (e.g. $"h"$ for the $-h/--help$ option).
+Although not suggested the short-name can contain more than 1 character.
+...remarks:Note that the leading "-" is not passed.
+..param.longName:A @Shortcut.CharString@ containing the long-name option identifier (e.g. $"help"$ for the $-h/--help$ option).
+...type:Shortcut.CharString
+...remarks:Note that the leading "--" is not passed.
+..param.argumentsPerOption:The number of required arguments per option (e.g. if set to 3 then 3 arguments must follow the option: "-foo x1 x2 x3").
+...default:0 for boolean options and 1 for the rest.
+..param.helpText:A @Shortcut.CharString@ containing the help text associated with this option.
+...type:Shortcut.CharString
+..param.optionType:Option type. This can be the sum of the some of the following values:
+...tableheader:Flag|Value|Description
+...table:$OptionType::Bool$ or $OptionType::Boolean$|1|Option needs no argument, value is true iff given on command line
+...table:$OptionType::String$|2|Argument is a string
+...table:$OptionType::Int$ or $OptionType::Integer$|4|An integer
+...table:$OptionType::Double$|8|A float
+...table:$OptionType::Mandatory$|16|Option must be set
+...table:$OptionType::Label$|32|Automatically print a label for the argument(s) on the help screen
+...table:$OptionType::List$|64|Option is a list of values
+...table:$OptionType::Hidden$|128|Hide this option from the help screen
+..param.defaultValue:The default value of this option.
+...default:No default value.
+*/
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.addArgumentText:
+..summary:Return a @Class.CommandLineOption@ object extended by an argument text.
+..cat:Miscellaneous
+..signature:addArgumentText(option, text)
+..param.option:A @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..param.text:A @Shortcut.CharString@ containing the argument text.
+...type:Shortcut.CharString
+..returns:The option extended by the argument text.
+Instead of using $option$, the return value can be used as argument for @Function.addOption at .
+..remarks:The result type is a @Class.CommandLineOption@ object.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline CommandLineOption
+addArgumentText(CommandLineOption const & opt, CharString const & text)
+{
+	CommandLineOption temp = opt;
+	temp.arguments = " ";
+	append(temp.arguments, text);
+	return temp;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.longName:
+..summary:Returns the long-name of a @Class.CommandLineOption@ object.
+..cat:Miscellaneous
+..signature:longName(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:A @Shortcut.CharString@ holding the long name of the CommandLine Option (e.g. $help$ in case of $-h/--help$)
+..remarks:The result type is @Shortcut.CharString at .
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline CharString &
+longName(CommandLineOption & me){
+    return me.longName;
+}
+
+inline const CharString &
+longName(CommandLineOption const & me){
+    return me.longName;
+}
+
+/**
+.Function.setLongName:
+..summary:Sets the long-name of a @Class.CommandLineOption@ object.
+..cat:Miscellaneous
+..signature:setLongName(option, newName)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..param.newName:A @Shortcut.CharString@ containing the new long name of the option.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline void
+setLongName(CommandLineOption & me, CharString const & newName){
+    me.longName = newName;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.shortName:
+..summary:Returns the short-name of a @Class.CommandLineOption@ object.
+..cat:Miscellaneous
+..signature:shortName(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:A @Shortcut.CharString@ holding the short name of the CommandLine Option (e.g. $h$ in case of $-h/--help$)
+..remarks:The result type is @Shortcut.CharString at .
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline CharString &
+shortName(CommandLineOption & me){
+    return me.shortName;
+}
+
+inline const CharString &
+shortName(CommandLineOption const & me){
+    return me.shortName;
+}
+
+/**
+.Function.setShortName:
+..summary:Sets the short-name of a @Class.CommandLineOption@ object.
+..cat:Miscellaneous
+..signature:setShortName(option,newName)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..param.newName:A @Shortcut.CharString@ containing the new short name of the option.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline void
+setShortName(CommandLineOption & me, CharString const & newName){
+    me.shortName = newName;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.helpText:
+..summary:Returns the help text associated with the @Class.CommandLineOption@ object.
+..cat:Miscellaneous
+..signature:helpText(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:A @Shortcut.CharString@ holding the help text of the CommandLine Option
+..remarks:The result type is @Shortcut.CharString at .
+..include:seqan/misc/misc_cmdparser.h
+*/
+inline CharString &
+helpText(CommandLineOption & me){
+    return me.helpText;
+}
+
+inline const CharString &
+helpText(CommandLineOption const & me){
+    return me.helpText;
+}
+
+/**
+.Function.setHelpText:
+..summary:Sets the help text associated with the @Class.CommandLineOption@ object.
+..cat:Miscellaneous
+..signature:setHelpText(option, newHelpText)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..param.newHelpText:A @Shortcut.CharString@ containing the new help text.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+inline void
+setHelpText(CommandLineOption & me, CharString const & newHelp){
+    me.helpText = newHelp;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.isStringOption:
+..summary:Returns whether option argument can be a string.
+..cat:Miscellaneous
+..signature:isStringOption(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:$true$ if the option argument can be a string.
+..see:Memfunc.CommandLineOption#CommandLineOption.param.optionType
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isStringOption(CommandLineOption const & me)
+{
+    return (me.optionType & OptionType::String) != 0;
+}
+
+/**
+.Function.isBooleanOption:
+..summary:Returns whether option is a switch.
+..cat:Miscellaneous
+..signature:isBooleanOption(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:$true$ if the option is a switch.
+..see:Memfunc.CommandLineOption#CommandLineOption.param.optionType
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isBooleanOption(CommandLineOption const & me)
+{
+    return (me.optionType & OptionType::Boolean) != 0;
+}
+
+/**
+.Function.isDoubleOption:
+..summary:Returns whether option argument can be a double.
+..cat:Miscellaneous
+..signature:isDoubleOption(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:$true$ if the option argument can be a double.
+..see:Memfunc.CommandLineOption#CommandLineOption.param.optionType
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isDoubleOption(CommandLineOption const & me)
+{
+    return (me.optionType & OptionType::Double) != 0;
+}
+
+/**
+.Function.isIntOption:
+..summary:Returns whether option argument can be an integer.
+..cat:Miscellaneous
+..signature:isIntOption(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:$true$ if the option argument can be an integer.
+..see:Memfunc.CommandLineOption#CommandLineOption.param.optionType
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isIntOption(CommandLineOption const & me)
+{
+    return (me.optionType & OptionType::Int) != 0;
+}
+
+/**
+.Function.isHiddenOption:
+..summary:Returns whether option is hidden on the help screen.
+..cat:Miscellaneous
+..signature:isHiddenOption(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:$true$ if the option is hidden on the help screen.
+..see:Memfunc.CommandLineOption#CommandLineOption.param.optionType
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isHiddenOption(CommandLineOption const & me)
+{
+    return (me.optionType & OptionType::Hidden) != 0;
+}
+
+/**
+.Function.isOptionMandatory:
+..summary:Returns whether option is mandatory.
+..cat:Miscellaneous
+..signature:isOptionMandatory(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:$true$ if the option is mandatory.
+..see:Memfunc.CommandLineOption#CommandLineOption.param.optionType
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isOptionMandatory(CommandLineOption const & me)
+{
+    return (me.optionType & OptionType::Mandatory) != 0;
+}
+
+/**
+.Function.isLabelOption:
+..summary:Returns whether an option label should be printed on the help screen.
+..cat:Miscellaneous
+..signature:isLabelOption(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:$true$ if an option label should be printed on the help screen.
+..see:Memfunc.CommandLineOption#CommandLineOption.param.optionType
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isLabelOption(CommandLineOption const & me)
+{
+    return (me.optionType & OptionType::Label) != 0;
+}
+
+/**
+.Function.isOptionList:
+..summary:Returns whether the option can be given multiple times.
+..cat:Miscellaneous
+..signature:isOptionList(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:$true$ if the option can be given multiple times on command line.
+..see:Memfunc.CommandLineOption#CommandLineOption.param.optionType
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isOptionList(CommandLineOption const & me)
+{
+    return (me.optionType & OptionType::List) != 0;
+}
+
+/**
+.Function.setOptionType:
+..summary:Set the option type.
+..cat:Miscellaneous
+..signature:setOptionType(option, newOptionType)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..param.newOptionType:Option Type.
+..see:Memfunc.CommandLineOption#CommandLineOption.param.optionType
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline void
+setOptionType(CommandLineOption & me, const int _newOptionType)
+{
+    me.optionType = _newOptionType;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.argumentText:
+..summary:Returns the argument text of a @Class.CommandLineOption@ object.
+..cat:Miscellaneous
+..signature:argumentText(option)
+..param.option:The @Class.CommandLineOption@ object.
+...type:Class.CommandLineOption
+..returns:A text consisting of label and help text of the option.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline CharString
+argumentText(CommandLineOption const & me)
+{	
+	if (empty(me.arguments))
+	{
+		CharString label;
+		if (isLabelOption(me))
+		{
+			if (isStringOption(me))
+				label = " STR";
+			else if (isIntOption(me) || isDoubleOption(me))
+				label = " NUM";
+			
+			if (me.argumentsPerOption >= 2)
+			{
+				std::stringstream strm;
+				if (!empty(label))
+					for (int i = 0; i < me.argumentsPerOption; ++i)
+						strm << label << (i + 1);
+				return strm.str();
+			}
+		}
+		return label;
+    }
+	else
+		return me.arguments;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream>
+inline void
+_writeOptName(TStream & target, CommandLineOption const & me)
+{
+    _streamWrite(target, empty(shortName(me)) ? "" : "-");
+    _streamWrite(target, shortName(me));
+    _streamWrite(target, (empty(shortName(me)) || empty(longName(me))) ? "" : ", ");
+    if (!empty(longName(me)))
+    {
+        _streamWrite(target, "--");
+        _streamWrite(target, longName(me));
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream>
+inline void
+write(TStream & target, CommandLineOption const & me)
+{
+    _streamPut(target,'\t');
+    _writeOptName(target, me);
+    _streamPut(target,'\t');
+    _streamPut(target,'\t');
+    _streamWrite(target,me.helpText);
+}
+
+template <typename TStream>
+inline TStream &
+operator << (TStream & target, CommandLineOption const & source)
+{
+    write(target, source);
+    return target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Class.CommandLineParser:
+..cat:Miscellaneous
+..summary:Stores multiple @Class.CommandLineOption@ objects and parses the command line arguments for these options.
+..signature:CommandLineParser
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+class CommandLineParser
+{
+public:
+    typedef String<CommandLineOption>           TOptionMap;
+    typedef Size<TOptionMap>::Type              TSize;
+    
+    typedef std::map<CharString, TSize>       TStringMap;
+    typedef String<CharString>                  TValueMap;
+
+    TStringMap           shortNameMap;
+    TStringMap           longNameMap;
+    TOptionMap           optionMap;
+    
+    unsigned             required_arguments;
+    String<CharString>   arguments;
+    CharString           appName;
+	String<CharString>   titleText;
+    String<CharString>   usageText;
+	String<CharString>   versionText;
+
+    unsigned line_width;
+    unsigned padding_left;
+	unsigned short_width;
+	unsigned long_width;
+	unsigned full_width;
+
+	const CharString			null;			// empty return values
+	const String<CharString>	nullSet;
+	
+	friend inline void addOption(CommandLineParser & me, CommandLineOption const & opt);
+	
+/**
+.Memfunc.CommandLineParser#CommandLineParser:
+..class:Class.CommandLineParser
+..summary:Constructor
+..signature:CommandLineParser ()
+..signature:CommandLineParser (applicationName)
+..param.applicationName:A @Shortcut.CharString@ containing the name of the application.
+..remarks:If the name of the application is not passed to the constructor it will be extracted from the command line.
+*/
+
+    CommandLineParser()
+	{
+		line_width         = 32;
+		padding_left       = 2;
+		short_width        = 0;
+		long_width         = 0;
+		full_width         = 0;
+		required_arguments = 0;
+		addOption(*this, CommandLineOption("h", "help", "displays this help message", OptionType::Boolean));
+	}
+
+    CommandLineParser(CharString appName)
+        : appName(appName)
+	{
+		line_width         = 32;
+		padding_left       = 2;
+		short_width        = 0;
+		long_width         = 0;
+		full_width         = 0;
+		required_arguments = 0;
+		addOption(*this, CommandLineOption("h", "help", "displays this help message", OptionType::Boolean));
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.addOption:
+..summary:Adds a @Class.CommandLineOption@ object to the @Class.CommandLineParser at .
+..cat:Miscellaneous
+..signature:addOption(parser, option)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.option:The new @Class.CommandLineOption@ object that should be added.
+...type:Class.CommandLineOption
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline void
+addOption(CommandLineParser & me, CommandLineOption const & opt)
+{
+	unsigned labelLen = length(argumentText(opt));
+    appendValue(me.optionMap, opt);
+    if (!empty(shortName(opt)))
+	{
+		insert(me.shortNameMap,shortName(opt), length(me.optionMap) - 1);
+		unsigned width = 3 + length(shortName(opt));
+		if (me.short_width < width)
+			me.short_width = width;
+		if (empty(longName(opt)))
+		{
+			width += 1 + length(argumentText(opt));
+			if (me.full_width < width)
+				me.full_width = width;
+		}
+	}
+    if (!empty(longName(opt)))
+	{
+		insert(me.longNameMap,longName(opt), length(me.optionMap) - 1);
+		unsigned width = 3 + length(longName(opt)) + labelLen;
+		if (me.long_width < width)
+			me.long_width = width;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.addLine:
+..summary:Adds a line of text to the help output of the @Class.CommandLineParser at .
+..cat:Miscellaneous
+..signature:addLine(parser, text)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.text:A line of text that will be added to the help output.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TString>
+inline void
+addLine(CommandLineParser & me, TString const & line)
+{
+	addOption(me, CommandLineOption("", "", line, 0));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.addHelpLine:
+..summary:Adds an extra line of text below the help text of an option.
+..cat:Miscellaneous
+..signature:addHelpLine(parser, text)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.text:A line of text that will be added below the help text of an option.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TString>
+inline void
+addHelpLine(CommandLineParser & me, TString const & line)
+{
+	addOption(me, CommandLineOption("", "", line, 1));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.addSection:
+..summary:Adds a new section the help output of the @Class.CommandLineParser at .
+..cat:Miscellaneous
+..signature:addSection(parser, text)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.text:A section header that will be added to the help output.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TString>
+inline void
+addSection(CommandLineParser & me, TString const & line)
+{
+	addLine(me, "");
+	addLine(me, line);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.addTitleLine:
+..summary:Adds a line of text to the title output of the @Class.CommandLineParser at .
+..cat:Miscellaneous
+..signature:addTitleLine(parser, text)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.text:A text line that will be added to the title output.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TString>
+inline void
+addTitleLine(CommandLineParser & me, TString const & line)
+{
+	appendValue(me.titleText, line);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.addVersionLine:
+..summary:Adds a line of text to the version output of the @Class.CommandLineParser at .
+..cat:Miscellaneous
+..signature:addVersionLine(parser, text)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.text:A text line that will be added to the version output.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TString>
+inline void
+addVersionLine(CommandLineParser & me, TString const & line)
+{
+	if (empty(me.versionText))
+		addOption(me, CommandLineOption("V", "version", "print version information", OptionType::Boolean));
+	appendValue(me.versionText, line);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.addUsageLine:
+..summary:Adds a line of text to the usage output of the @Class.CommandLineParser at .
+..cat:Miscellaneous
+..signature:addUsageLine(parser, text)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.text:A text line that will be added to the usage output.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline void
+addUsageLine(CommandLineParser & me, CharString const & line)
+{
+    appendValue(me.usageText, line);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.hasOptionLong:
+..summary:Returns whether a certain long-name option is registered in the parser.
+..cat:Miscellaneous
+..signature:hasOptionLong(parser, optionIdentifier)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.optionIdentifier:A @Shortcut.CharString@ that identifies the long-name option.
+..returns:$true$ if the option is registered.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool 
+hasOptionLong(CommandLineParser const & me, CharString const & _long)
+{
+    return hasKey(me.longNameMap, _long);
+}
+
+/**
+.Function.hasOptionShort:
+..summary:Returns whether a certain short-name option is registered in the parser.
+..cat:Miscellaneous
+..signature:hasOptionShort(parser, optionIdentifier)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.optionIdentifier:A @Shortcut.CharString@ that identifies the short-name option.
+..returns:$true$ if the option is registered.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool 
+hasOptionShort(CommandLineParser const & me, CharString const & _short)
+{
+    return hasKey(me.shortNameMap, _short);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.requiredArguments:
+..summary:Sets the number of arguments (non-parameterized options) are required by the program.
+..cat:Miscellaneous
+..signature:requiredArguments(parser, count)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.count:A $unsigned int$ defining the amount of non-parameterized options requried by the program.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline void
+requiredArguments(CommandLineParser & me, unsigned count)
+{
+    me.required_arguments = count;
+}	
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStringSet, typename TStream>
+inline void
+_printStringSet(TStringSet const & set, TStream & target)
+{
+    for(unsigned r = 0; r < length(set); ++r)
+    {
+        _streamWrite(target, set[r]);
+		_streamPut(target, '\n');
+    }
+}
+
+template <typename TStream>
+inline void
+_usage(CommandLineParser const & me, TStream & target)
+{
+	_streamWrite(target, "Usage: ");
+	if (empty(me.usageText))
+	{
+		_streamWrite(target, me.appName);
+		_streamWrite(target, " [OPTION]... ");
+		for (unsigned r = 0; r < me.required_arguments; ++r)
+		{
+			_streamWrite(target, "<ARG");
+			_streamPutInt(target, r + 1);
+			_streamWrite(target,"> ");
+		}
+		_streamPut(target,'\n');
+	}
+	else
+	{
+		for (unsigned r = 0; r < length(me.usageText); ++r)
+		{
+			if (r) _streamWrite(target, "       ");
+			_streamWrite(target, me.appName);
+			_streamPut(target, ' ');
+			_streamWrite(target, me.usageText[r]);
+			_streamPut(target,'\n');
+		}
+	}
+}
+
+template <typename TStream>
+inline void
+_title(CommandLineParser const & me, TStream & target)
+{
+	_printStringSet(me.titleText, target);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.shortHelp:
+..summary:Prints a short help message for the parser to a stream
+..cat:Miscellaneous
+..signature:shortHelp(parser[, stream])
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.stream:Target stream (e.g. $std::cerr$).
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TStream>
+inline void
+shortHelp(CommandLineParser const & me, TStream & target)
+{
+	_title(me, target);
+    _usage(me, target);
+    _streamWrite(target, "Try '");
+    _streamWrite(target, me.appName);
+    _streamWrite(target, " --help' for more information.\n");
+}
+
+template <typename TStream>
+inline void
+shortHelp(CommandLineParser const & me)
+{
+	shortHelp(me, std::cerr);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.help:
+..summary:Prints the complete help message for the parser to a stream.
+..cat:Miscellaneous
+..signature:help(parser[, stream])
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.stream:Target stream (e.g. $std::cerr$).
+...default: $std::cerr$
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TStream>
+inline void
+help(CommandLineParser const & me, TStream & target)
+{
+	_title(me, target);
+    _streamPut(target, '\n');
+    _usage(me,target);
+    _streamPut(target, '\n');
+
+    for (unsigned o = 0; o < length(me.optionMap); ++o)
+    {
+        const CommandLineOption & opt = me.optionMap[o];
+        if (isHiddenOption(opt)) continue;								// do not print hidden options
+		
+		if (opt.optionType > 0)
+		{       
+			unsigned s = 0;
+			for (; s < me.padding_left; ++s)
+				_streamPut(target, ' ');
+			
+			unsigned t1 = s + me.short_width;							// first tab
+			unsigned t2 = _max(t1 + me.long_width, me.full_width) + 1;	// second tab (one extra space looks better)
+
+			if (!empty(shortName(opt)))
+			{
+				_streamPut(target, '-');
+				_streamWrite(target, shortName(opt));
+				s += 1 + length(shortName(opt));
+				if (!empty(longName(opt)))
+				{
+					_streamPut(target, ',');
+					++s;
+				} else {
+					_streamWrite(target, argumentText(opt));
+					s += length(argumentText(opt));
+				}
+			}
+			
+			for (; s < t1; ++s)
+				_streamPut(target, ' ');
+			
+			if (!empty(longName(opt)))
+			{
+				_streamWrite(target, "--");
+				_streamWrite(target, longName(opt));
+				_streamWrite(target, argumentText(opt));
+				s += 2 + length(longName(opt)) + length(argumentText(opt));
+			}
+
+			for (; s < t2; ++s)
+				_streamPut(target, ' ');
+		}
+
+		_streamWrite(target, helpText(opt));
+
+/*
+        if (s < me.line_width){
+			for (; s < me.line_width; ++s)
+				_streamPut(target, ' ');
+            _streamWrite(target, helpText(opt));
+        }
+        else
+        {
+            _streamPut(target, '\n');
+            s = 0;
+			for (; s < me.line_width; ++s)
+				_streamPut(target, ' ');
+            _streamWrite(target, helpText(opt));
+        }
+*/
+        _streamPut(target, '\n');
+    }
+	_streamPut(target, '\n');
+}
+
+inline void
+help(CommandLineParser const & me)
+{
+    help(me, std::cerr);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.version:
+..summary:Prints a version text to a stream.
+..cat:Miscellaneous
+..signature:version(parser[, stream])
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.stream:Target stream (e.g. $std::cerr$).
+...default: $std::cerr$
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TStream>
+inline void
+version(CommandLineParser const & me, TStream & target)
+{
+	_printStringSet(me.versionText, target);
+}
+
+inline void
+version(CommandLineParser const & me)
+{
+    version(me,std::cerr);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.isSetShort:
+..summary:Returns whether a short-name option was set on the parsed command line.
+..cat:Miscellaneous
+..signature:isSetShort(parser,optionIdentifier)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.optionIdentifier:A @Shortcut.CharString@ that identifies the short-name option.
+..returns:$true$ if the option was set.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isSetShort(CommandLineParser & me, CharString const & shortName)
+{
+    if (!hasKey(me.shortNameMap, shortName))
+		return false; // this option does not exist
+
+	// if value != "" -> value was set
+	return !empty(me.optionMap[cargo(me.shortNameMap, shortName)].value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.isSetLong:
+..summary:Returns whether a long-name option was set on the parsed command line.
+..cat:Miscellaneous
+..signature:isSetLong(parser, optionIdentifier)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.optionIdentifier:A @Shortcut.CharString@ that identifies the long-name option.
+..returns:$true$ if the option was set.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline bool
+isSetLong(CommandLineParser & me,CharString const & longName)
+{
+    if (!hasKey(me.longNameMap, longName))
+		return false; // this option does not exist
+
+	// if value != "" -> value was set
+	return !empty(me.optionMap[cargo(me.longNameMap, longName)].value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+inline bool
+_allMandatorySet(CommandLineParser const & me)
+{
+    for (unsigned o = 0; o < length(me.optionMap); ++o)
+        if (empty(me.optionMap[o].value) && isOptionMandatory(me.optionMap[o])) return false;
+    return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+inline CharString
+_parseAppName(CharString const & candidate)
+{
+    int i = length(candidate) - 1;
+	
+    for(; i >= 0; --i)
+        if (candidate[i] == '\\' || candidate[i] == '/') 
+            break;
+
+    return suffix(candidate, i + 1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TErrorStream>
+bool
+_assignOptionValue(CommandLineParser & me, unsigned option_index, CharString const & val, unsigned argNo, TErrorStream & estream)
+{
+    // get the option object
+    CommandLineOption & opt = me.optionMap[option_index];
+    if(isDoubleOption(opt)){
+        if(!_isDouble(val))
+        {
+            _streamWrite(estream,me.appName);
+            _streamWrite(estream,": ");
+            _streamWrite(estream, "\"");
+            _streamWrite(estream, val);
+            _streamWrite(estream, "\" is not a valid double value for '");
+            _writeOptName(estream, opt);
+            _streamWrite(estream, "'\n");
+            return false;
+        }
+    }else if(isIntOption(opt)){
+        if(!_isInt(val))
+        {
+            _streamWrite(estream,me.appName);
+            _streamWrite(estream,": ");
+            _streamWrite(estream, "\"");
+            _streamWrite(estream, val);
+            _streamWrite(estream, "\" is not a valid integer value for '");
+            _writeOptName(estream, opt);
+            _streamWrite(estream, "'\n");
+            return false;
+        }
+    }
+	if (isOptionList(opt))
+		appendValue(opt.value, val, Generous());
+	else
+	{
+		if (argNo == 0) clear(opt.value);
+		appendValue(opt.value, val, Exact());
+	}
+    return true;
+}
+
+template<typename TErrorStream>
+inline bool 
+_assignOptionValue(CommandLineParser & me, unsigned option_index, CharString const & val, TErrorStream & estream)
+{
+	return _assignOptionValue(me, option_index, val, 0, estream);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.parse:
+..summary:Parses the command line.
+..cat:Miscellaneous
+..signature:parse(parser, argc, argv[, errorStream])
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.argc:Count of the objects on the command line.
+..param.argv:Array of the different command line arguments ($const char *argv[]$). 
+..param.errorStream:A stream where error messages are sent to.
+..remarks:Must be called before retrieving options or arguments.
+..returns:$true$ if all required arguments are set and parseable and neither the help nor version argument is set.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template<typename TErrorStream>
+bool
+parse(CommandLineParser & me, int argc, const char *argv[], TErrorStream & estream)
+{
+    typedef Size<String<CommandLineOption> >::Type TOptionPosition;
+    // if the appName wasn't set .. parse from command line
+    if (empty(me.appName)) me.appName = _parseAppName(argv[0]);
+
+    for (int i = 1; i < argc; ++i) 
+    {
+        if (argv[i][0] == '-')  // this is possibly an option value
+        {
+            CharString inParam = argv[i];
+            unsigned len = length(inParam);
+            
+            if (len == 1)
+            {
+                _streamWrite(estream,me.appName);
+                _streamWrite(estream,": invalid option '-'\n");
+                return false;
+            }
+            else if (inParam[1] != '-') // maybe a combination of multiple bool opts
+            {
+                for (unsigned s = 1; s < len; ++s)
+				{
+					unsigned e = len;
+					for (; s < e; --e)
+					{
+						if (hasOptionShort(me, infix(inParam, s, e)))
+						{
+							TOptionPosition option_index = cargo(me.shortNameMap, infix(inParam, s, e));
+							CommandLineOption const & opt = me.optionMap[option_index];
+							s = --e;
+							if (isBooleanOption(opt))
+								_assignOptionValue(me, option_index, "true", estream);
+							else
+							{
+								int firstArgIndex = 0;
+
+								if (e < len - 1)
+								{
+									// Try getting the first option argument from the remaining characters
+									// of this program argument. Use-case: immediately adjacent option
+									// values without separating space, as in `-x1` instead of `-x 1`.
+									if (!_assignOptionValue(me, option_index, suffix(inParam, e + 1), 0, estream)) return false;
+									firstArgIndex = 1;
+									s = len - 1;
+								}
+
+								if (i + opt.argumentsPerOption - firstArgIndex < argc)
+								{
+									for (int t = firstArgIndex; t < opt.argumentsPerOption; ++t)
+										if (!_assignOptionValue(me, option_index, argv[++i], t, estream)) return false;
+								}
+								else // no value available
+								{
+									_streamWrite(estream, me.appName);
+									_streamWrite(estream, ": \'");
+									_writeOptName(estream, opt);
+									_streamWrite(estream, "\' requires ");
+									_streamPutInt(estream, opt.argumentsPerOption);
+									_streamWrite(estream, " value(s)\n");
+									return false;
+								}
+							}
+						}
+					}
+					if (s == e)
+					{
+                        _streamWrite(estream, me.appName);
+                        _streamWrite(estream, ": invalid option '-");
+                        _streamWrite(estream, suffix(inParam, s));
+                        _streamWrite(estream, "\'\n");
+                        return false;
+					}
+				}
+            }
+            else if (inParam[1] == '-') // this is a long option
+            {
+                unsigned t = 2;
+                CharString longOpt, val;
+                for (; t < len && inParam[t] != '='; ++t)
+					appendValue(longOpt, inParam[t], Generous());
+                if (t < len) // this one is a --name=value option
+					val = suffix(inParam, t + 1);
+				
+                // we may be got already a value
+                if (hasOptionLong(me, longOpt))
+                {
+                    TOptionPosition option_index = cargo(me.longNameMap, longOpt);
+                    CommandLineOption opt = me.optionMap[option_index];
+
+                    if (!empty(val))
+                    {
+						if (opt.argumentsPerOption == 1)
+						{
+							if (!_assignOptionValue(me, option_index, val, estream)) return false;
+						}
+						else
+						{
+							_streamWrite(estream, me.appName);
+							_streamWrite(estream, ": \'");
+							_writeOptName(estream, opt);
+							_streamWrite(estream, "\' requires ");
+							_streamPutInt(estream, opt.argumentsPerOption);
+							_streamWrite(estream, " values\n");
+							return false;
+						}
+                    }
+                    else if(isBooleanOption(opt))
+                    {
+						_assignOptionValue(me, option_index, "true", estream);
+                    }
+                    else if (i + opt.argumentsPerOption < argc)
+					{
+						for (int t = 0; t < opt.argumentsPerOption; ++t)
+							if (!_assignOptionValue(me, option_index, argv[++i], t, estream)) return false;
+					}
+					else // no value available
+					{
+						_streamWrite(estream, me.appName);
+						_streamWrite(estream, ": \'");
+						_writeOptName(estream, opt);
+						_streamWrite(estream, "\' requires ");
+						_streamPutInt(estream, opt.argumentsPerOption);
+						_streamWrite(estream, " value(s)\n");
+						return false;
+					}
+                }
+                else
+                {
+                    _streamWrite(estream, me.appName);
+                    _streamWrite(estream, ": invalid option \'--");
+                    _streamWrite(estream, longOpt);
+                    _streamWrite(estream, "'\n");
+                    return false;
+                }
+            }            
+        }
+        else
+        { // this seems to be a normal argument
+            appendValue(me.arguments,argv[i] );
+        }
+    }
+	if (isSetLong(me, "version"))
+	{
+		version(me, estream);
+        return false;
+	}
+    if (isSetLong(me, "help"))
+    {
+        help(me, estream);
+        return false;
+    }
+	if (argc == 1 && me.required_arguments > 0)
+	{
+		shortHelp(me, estream);	// print short help and exit
+		return 0;
+	}
+	return _allMandatorySet(me) && (length(me.arguments) >= me.required_arguments);
+}
+
+inline bool
+parse(CommandLineParser & me, int argc, const char *argv[])
+{
+    return parse(me, argc, argv, std::cerr);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+inline String<CharString> const &
+_getOptionValues(CommandLineParser const & me, unsigned option_index)
+{
+    CommandLineOption const & opt = me.optionMap[option_index];
+	if (empty(opt.value))
+		return opt.defaultValue;
+	else
+		return opt.value;
+}
+
+inline CharString const &
+_getOptionValue(CommandLineParser const & me, unsigned option_index, unsigned argNo)
+{
+    CommandLineOption const & opt = me.optionMap[option_index];
+	if (argNo < length(opt.value))
+		return opt.value[argNo];
+	else if (argNo < length(opt.defaultValue))
+		return opt.defaultValue[argNo];
+	else
+		return me.null;
+}
+
+inline CharString const &
+_getOptionValue(CommandLineParser const & me, unsigned option_index)
+{
+	return _getOptionValue(me, option_index, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+inline bool
+_convertOptionValue(CommandLineOption const & opt, bool & dst, CharString const & src)
+{
+    if (!isBooleanOption(opt)) return false;
+	dst = !empty(src);
+	return true;
+}
+
+inline bool
+_convertOptionValue(CommandLineOption const & opt, int & dst, CharString const & src)
+{
+    if (!isIntOption(opt)) return false;
+	std::istringstream stream(toCString(src));
+	return !(stream >> dst).fail();
+}
+
+inline bool
+_convertOptionValue(CommandLineOption const & opt, unsigned int & dst, CharString const & src)
+{
+    if (!isIntOption(opt)) return false;
+	std::istringstream stream(toCString(src));
+	return !(stream >> dst).fail();
+}
+
+inline bool
+_convertOptionValue(CommandLineOption const & opt, __int64 & dst, CharString const & src)
+{
+    if (!isIntOption(opt)) return false;
+	std::istringstream stream(toCString(src));
+	return !(stream >> dst).fail();
+}
+
+inline bool
+_convertOptionValue(CommandLineOption const & opt, __uint64 & dst, CharString const & src)
+{
+    if (!isIntOption(opt)) return false;
+	std::istringstream stream(toCString(src));
+	return !(stream >> dst).fail();
+}
+
+inline bool
+_convertOptionValue(CommandLineOption const & opt, float & dst, CharString const & src)
+{
+    if (!isDoubleOption(opt)) return false;
+	std::istringstream stream(toCString(src));
+	return !(stream >> dst).fail();
+}
+
+inline bool
+_convertOptionValue(CommandLineOption const & opt, double & dst, CharString const & src)
+{
+    if (!isDoubleOption(opt)) return false;
+	std::istringstream stream(toCString(src));
+	return !(stream >> dst).fail();
+}
+
+template <typename TObject>
+inline bool
+_convertOptionValue(CommandLineOption const & opt, TObject & dst, CharString const & src)
+{
+    if (!isStringOption(opt)) return false;
+	assign(dst, src);
+	return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getOptionValueShort:
+..summary:Retrieves the value of a short-name option given on the command line.
+..cat:Miscellaneous
+..signature:getOptionValueShort(parser, optionIdentifier[, argNo], value)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.optionIdentifier:A @Shortcut.CharString@ that identifies the short-name of the option.
+..param.argNo:If the option is list, the $argNo$-th list element is returned.
+..param.value:The variable where the resulting value should be stored.
+...remarks:The type of $value$ must be compatible the option type.
+..returns: $true$ if the requested option is set and has the requested type, $false$ otherwise.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TValue>
+inline bool
+getOptionValueShort(CommandLineParser & me, CharString const & shortName, unsigned argNo, TValue & val)
+{
+    typedef Size<String<CommandLineOption> >::Type TOptionPosition;
+
+    if (!hasOptionShort(me, shortName))
+	{
+		_streamWrite(std::cerr, me.appName);
+		_streamWrite(std::cerr, ": \'");
+		_streamWrite(std::cerr, shortName);
+		_streamWrite(std::cerr, "\' is not an option\n");
+		return false;
+	}
+    TOptionPosition option_index = cargo(me.shortNameMap, shortName);
+	return _convertOptionValue(me.optionMap[option_index], val, _getOptionValue(me, option_index, argNo));
+}
+
+template <typename TValue>
+inline bool
+getOptionValueShort(CommandLineParser & me, CharString const & shortName, TValue & val)
+{
+	return getOptionValueShort(me, shortName, 0, val);
+}
+
+/**
+.Function.getOptionValuesShort:
+..summary:Returns all values of a short-name option given on the command line.
+..cat:Miscellaneous
+..signature:getOptionValuesShort(parser, optionIdentifier)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.optionIdentifier:A @Shortcut.CharString@ that identifies the short-name of the option.
+..returns: A $String<CharString>$ of option values.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline String<CharString> const &
+getOptionValuesShort(CommandLineParser & me,CharString const & shortName)
+{
+    typedef Size<String<CommandLineOption> >::Type TOptionPosition;
+
+    if (!hasOptionShort(me, shortName))
+	{
+		_streamWrite(std::cerr, me.appName);
+		_streamWrite(std::cerr, ": \'");
+		_streamWrite(std::cerr, shortName);
+		_streamWrite(std::cerr, "\' is not an option\n");
+		return me.nullSet;
+	}
+    TOptionPosition option_index = cargo(me.shortNameMap, shortName);
+	return _getOptionValues(me, option_index);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getOptionValueLong:
+..summary:Retrieves the value of a long-name option given on the command line.
+..cat:Miscellaneous
+..signature:getOptionValueLong(parser, optionIdentifier[, argNo], value)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.optionIdentifier:A @Shortcut.CharString@ that identifies the long-name of the option.
+..param.argNo:If the option is list, the $argNo$-th list element is returned.
+..param.value:The variable where the resulting value should be stored.
+...remarks:The type of $value$ must be compatible the option type.
+..returns: $true$ if the requested option is set and has the requested type, $false$ otherwise.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+template <typename TValue>
+inline bool
+getOptionValueLong(CommandLineParser & me, CharString const & longName, unsigned argNo, TValue & val)
+{
+    typedef Size<String<CommandLineOption> >::Type TOptionPosition;
+
+    if (!hasOptionLong(me, longName))
+	{
+		_streamWrite(std::cerr, me.appName);
+		_streamWrite(std::cerr, ": \'");
+		_streamWrite(std::cerr, longName);
+		_streamWrite(std::cerr, "\' is not an option\n");
+		return false;
+	}
+    TOptionPosition option_index = cargo(me.longNameMap, longName);
+	return _convertOptionValue(me.optionMap[option_index], val, _getOptionValue(me, option_index, argNo));
+}
+
+template <typename TValue>
+inline bool
+getOptionValueLong(CommandLineParser & me,CharString const & longName, TValue & val)
+{
+	return getOptionValueLong(me, longName, 0, val);
+}
+
+/**
+.Function.getOptionValuesLong:
+..summary:Returns all values of a long-name option given on the command line.
+..cat:Miscellaneous
+..signature:getOptionValuesLong(parser, optionIdentifier)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.optionIdentifier:A @Shortcut.CharString@ that identifies the long-name of the option.
+..returns: A $String<CharString>$ of option values.
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline String<CharString> const &
+getOptionValuesLong(CommandLineParser & me, CharString const & longName)
+{
+    typedef Size<String<CommandLineOption> >::Type TOptionPosition;
+
+    if (!hasOptionLong(me, longName))
+	{
+		_streamWrite(std::cerr, me.appName);
+		_streamWrite(std::cerr, ": \'");
+		_streamWrite(std::cerr, longName);
+		_streamWrite(std::cerr, "\' is not an option\n");
+		return me.nullSet;
+	}
+    TOptionPosition option_index = cargo(me.longNameMap, longName);
+	return _getOptionValues(me, option_index);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.getArgumentValue:
+..summary:Returns an argument set on the command line.
+..cat:Miscellaneous
+..signature:getArgumentValue(parser, position)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..param.position:A zero based $int$ indicating which argument you want to get.
+..returns:The command line argument or an empty string if it doesn't exist.
+...type:Shortcut.CharString
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline CharString const &
+getArgumentValue(CommandLineParser const & me, unsigned position)
+{
+    if (position < length(me.arguments))
+        return me.arguments[position];
+    else
+		return me.null;
+}
+
+/**
+.Function.getArgumentValues:
+..summary:Returns all arguments set on the command line.
+..cat:Miscellaneous
+..signature:getArgumentValues(parser)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..returns:All command line arguments as a $String<CharString>$.
+..see:Function.getArgumentValue
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline String<CharString> const &
+getArgumentValues(CommandLineParser const & me)
+{
+	return me.arguments;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.argumentCount:
+..summary:Returns the count of passed arguments.
+..cat:Miscellaneous
+..signature:argumentCount(parser)
+..param.parser:The @Class.CommandLineParser@ object.
+...type:Class.CommandLineParser
+..include:seqan/misc/misc_cmdparser.h
+*/
+
+inline Size<String<CharString> >::Type
+argumentCount(CommandLineParser const & me)
+{
+    return length(me.arguments);
+}
+
+
+} // end SEQAN_NAMESPACE_MAIN
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/misc/misc_dequeue.h b/src/SeqAn-1.3/seqan/misc/misc_dequeue.h
new file mode 100644
index 0000000..f9dc2bb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_dequeue.h
@@ -0,0 +1,369 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MISC_DEQUEUE_H
+#define SEQAN_HEADER_MISC_DEQUEUE_H
+
+#include <algorithm>
+#include <seqan/sequence.h>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Class.Dequeue:
+..cat:Miscellaneous
+..summary:A double-ended queue implementation on top of a @Class.String at .
+..signature:Dequeue<TValue, TSpec>
+..param.TValue:Type of the ungapped sequences.
+...metafunction:Metafunction.Value
+..param.TSpec:The specializing type of the underlying @Class.String at .
+...metafunction:Metafunction.Spec
+...default:$Alloc<>$, see @Spec.Alloc String@
+..include:seqan/misc.h
+*/
+template <typename TValue, typename TSpec = Alloc<> >
+class Dequeue
+{
+public:
+	typedef String<TValue, TSpec>						TString;
+	typedef typename Iterator<TString, Standard>::Type	TIter;
+
+	String<TValue, TSpec> data_string;
+
+	TIter data_begin;	// string beginning
+	TIter data_end;		// string end
+
+	TIter data_front;	// front fifo character
+	TIter data_back;	// back fifo character
+	bool data_empty;	// fifo is empty
+
+//____________________________________________________________________________
+
+public:
+	inline Dequeue()
+	{
+		clear(*this);
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Iterators
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Iterator.param.T.type:Class.Dequeue
+
+template<typename TValue, typename TSpec>
+struct Iterator<Dequeue<TValue, TSpec>, Standard> 
+{
+	typedef Iter<Dequeue<TValue, TSpec>, PositionIterator> Type;
+};
+
+template<typename TValue, typename TSpec>
+struct Iterator<Dequeue<TValue, TSpec> const, Standard> 
+{
+	typedef Iter<Dequeue<TValue, TSpec> const, PositionIterator> Type;
+};
+
+template<typename TValue, typename TSpec>
+struct Iterator<Dequeue<TValue, TSpec>, Rooted> 
+{
+	typedef Iter<Dequeue<TValue, TSpec>, PositionIterator> Type;
+};
+
+template<typename TValue, typename TSpec>
+struct Iterator<Dequeue<TValue, TSpec> const, Rooted> 
+{
+	typedef Iter<Dequeue<TValue, TSpec> const, PositionIterator> Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline bool
+empty(Dequeue<TValue, TSpec> const &me)
+{
+	return me.data_empty;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline void
+clear(Dequeue<TValue, TSpec> &me)
+{
+	clear(me.data_string);
+	me.data_begin = begin(me.data_string, Standard());
+	me.data_end = end(me.data_string, Standard());
+
+	me.data_front = me.data_back = me.data_begin;
+	me.data_empty = true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TPos>
+inline TValue &
+value(Dequeue<TValue, TSpec> &me, TPos pos)
+{
+	typedef typename Size<Dequeue<TValue, TSpec> >::Type TSize;
+	TSize wrap = length(me.data_string) - (me.data_front - me.data_begin);
+	
+	if ((TSize)pos < wrap)
+		return value(me.data_front + pos);
+	else
+		return value(me.data_begin + (pos - wrap));
+}
+
+template <typename TValue, typename TSpec, typename TPos>
+inline TValue const &
+value(Dequeue<TValue, TSpec> const &me, TPos pos)
+{
+	typedef typename Size<Dequeue<TValue, TSpec> >::Type TSize;
+	TSize wrap = length(me.data_string) - (me.data_front - me.data_begin);
+	
+	if ((TSize)pos < wrap)
+		return value(me.data_front + pos);
+	else
+		return value(me.data_begin + (pos - wrap));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline TValue &
+front(Dequeue<TValue, TSpec> &me)
+{
+	return *me.data_front;
+}
+
+template <typename TValue, typename TSpec>
+inline TValue const &
+front(Dequeue<TValue, TSpec> const &me)
+{
+	return *me.data_front;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline TValue &
+back(Dequeue<TValue, TSpec> &me)
+{
+	return *me.data_back;
+}
+
+template <typename TValue, typename TSpec>
+inline TValue const &
+back(Dequeue<TValue, TSpec> const &me)
+{
+	return *me.data_back;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline bool
+popFront(Dequeue<TValue, TSpec> &me)
+{
+	if (me.data_empty) return false;
+
+	if (me.data_front == me.data_back)
+		me.data_empty = true;
+	else
+	{
+		if (++me.data_front == me.data_end)
+			me.data_front = me.data_begin;
+	}
+
+	return true;
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+popBack(Dequeue<TValue, TSpec> &me)
+{
+	if (me.data_empty) return false;
+
+	if (me.data_front == me.data_back)
+		me.data_empty = true;
+	else
+	{
+		if (me.data_back == me.data_begin)
+			me.data_back = me.data_end;
+		--me.data_back;
+	}
+
+	return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline void
+pushFront(Dequeue<TValue, TSpec> &me, TValue const & _value)
+{
+	typedef typename Dequeue<TValue, TSpec>::TIter TIter;
+
+	if (me.data_empty) 
+	{
+		if (me.data_begin == me.data_end)
+			reserve(me, computeGenerousCapacity(me, length(me.data_string) + 1), Generous());
+		me.data_empty = false;
+	}
+	else 
+	{
+		TIter new_front = me.data_front;
+		if (new_front == me.data_begin)
+			new_front = me.data_end;
+		--new_front;
+
+		if (new_front == me.data_back)
+		{
+			reserve(me, computeGenerousCapacity(me, length(me.data_string) + 1), Generous());
+
+			if (me.data_front == me.data_begin)
+				me.data_front = me.data_end;
+			--me.data_front;
+		} else
+			me.data_front = new_front;
+	}
+	assign(*me.data_front, _value);
+}
+
+template <typename TValue, typename TSpec>
+inline void
+pushBack(Dequeue<TValue, TSpec> &me, TValue const & _value)
+{
+	typedef typename Dequeue<TValue, TSpec>::TIter TIter;
+
+	if (me.data_empty) 
+	{
+		if (me.data_begin == me.data_end)
+			reserve(me, computeGenerousCapacity(me, length(me.data_string) + 1), Generous());
+		me.data_empty = false;
+	}
+	else 
+	{
+		TIter new_back = me.data_back;
+		if (++new_back == me.data_end)
+			new_back = me.data_begin;
+
+		if (new_back == me.data_front)
+		{
+			reserve(me, computeGenerousCapacity(me, length(me.data_string) + 1), Generous());
+			// in this case reserve adds new space behind data_back
+			++me.data_back;
+		} else
+			me.data_back = new_back;
+	}
+	assign(*me.data_back, _value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+inline typename Size<Dequeue<TValue, TSpec> >::Type
+length(Dequeue<TValue, TSpec> const &me)
+{
+	if (empty(me)) return 0;
+
+	if (me.data_front <= me.data_back)
+		return (me.data_back - me.data_front) + 1;
+	else
+		return (me.data_end - me.data_begin) - (me.data_front - me.data_back) + 1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TSize_, typename TExpand>
+inline typename Size<Dequeue<TValue, TSpec> >::Type
+reserve(Dequeue<TValue, TSpec> &me, TSize_ new_capacity, Tag<TExpand> const tag)
+{
+	typedef typename Size<Dequeue<TValue, TSpec> >::Type TSize;
+//	::std::cout << "resize to "<<new_capacity<<::std::endl;
+	TSize len = length(me);
+	if (len < new_capacity && length(me.data_string) != new_capacity)
+	{
+		TSize pos_front = me.data_front - me.data_begin;
+		TSize pos_back  = me.data_back  - me.data_begin;
+		TSize new_freeSpace = new_capacity - len;
+
+		if (pos_front <= pos_back)
+		{
+			// |empty|data|empty|
+			// 0
+			TSize freeSpace = length(me.data_string) - len;
+			if (new_freeSpace > freeSpace)
+				resize(me.data_string, new_capacity, tag);
+			else
+			{
+				freeSpace -= new_freeSpace;	// reduce the free space by <freeSpace>
+				if (pos_front >= freeSpace)
+				{
+					resizeSpace(me.data_string, pos_front - freeSpace, (TSize)0, pos_front, tag);
+					pos_back -= freeSpace;
+					pos_front -= freeSpace;
+				}
+				else
+				{
+					freeSpace -= pos_front;
+					resizeSpace(me.data_string, length(me.data_string) - freeSpace, pos_back + 1, length(me.data_string), tag);
+					resizeSpace(me.data_string, (TSize)0, (TSize)0, pos_front, tag);
+					pos_back -= pos_front;
+					pos_front = 0;
+				}
+			}
+		}
+		else
+		{
+			// |data|empty|data|
+			// 0
+			resizeSpace(me.data_string, new_freeSpace, pos_back + 1, pos_front, tag);
+			pos_front += new_freeSpace;
+		}
+
+		me.data_begin = begin(me.data_string, Standard());
+		me.data_end = end(me.data_string, Standard());
+		me.data_front = me.data_begin + pos_front;
+		me.data_back = me.data_begin + pos_back;
+	}
+	return length(me.data_string);
+}
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/misc/misc_generated_forwards.h b/src/SeqAn-1.3/seqan/misc/misc_generated_forwards.h
new file mode 100644
index 0000000..70deb25
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_generated_forwards.h
@@ -0,0 +1,1123 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_MISC_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_MISC_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// CommandLineOption
+
+class CommandLineOption;       	// "projects/library/seqan/misc/misc_cmdparser.h"(123)
+
+//____________________________________________________________________________
+// CommandLineParser
+
+class CommandLineParser;       	// "projects/library/seqan/misc/misc_cmdparser.h"(636)
+
+//____________________________________________________________________________
+// Dequeue
+
+template <typename TValue, typename TSpec > class Dequeue;       	// "projects/library/seqan/misc/misc_dequeue.h"(58)
+
+//____________________________________________________________________________
+// EditEnvironment
+
+template <typename TDistanceSpec, unsigned DISTANCE > struct EditEnvironment;       	// "projects/library/seqan/misc/edit_environment.h"(40)
+
+//____________________________________________________________________________
+// Enumerator
+
+template <typename TObject, typename TSpec > class Enumerator;       	// "projects/library/seqan/misc/edit_environment.h"(62)
+
+//____________________________________________________________________________
+// EnumeratorHammingModifier_
+
+template <typename TSize> struct EnumeratorHammingModifier_;       	// "projects/library/seqan/misc/edit_environment.h"(139)
+
+//____________________________________________________________________________
+// EnumeratorLevenshteinModifier_
+
+template <typename TSize> struct EnumeratorLevenshteinModifier_;       	// "projects/library/seqan/misc/edit_environment.h"(402)
+
+//____________________________________________________________________________
+// IntervalAndCargo
+
+template <typename TValue , typename TCargo > class IntervalAndCargo;       	// "projects/library/seqan/misc/misc_interval_tree.h"(65)
+
+//____________________________________________________________________________
+// IntervalTree
+
+template <typename TValue, typename TCargo> class IntervalTree;       	// "projects/library/seqan/misc/misc_interval_tree.h"(297)
+
+//____________________________________________________________________________
+// IntervalTreeNode
+
+template <typename TInterval, typename TSpec> class IntervalTreeNode;       	// "projects/library/seqan/misc/misc_interval_tree.h"(214)
+
+//____________________________________________________________________________
+// ListType
+
+template <typename T> struct ListType;       	// "projects/library/seqan/misc/misc_interval_tree.h"(792)
+
+//____________________________________________________________________________
+// MersenneBuffer_
+
+template <typename T > struct MersenneBuffer_;       	// "projects/library/seqan/misc/misc_random.h"(69)
+
+//____________________________________________________________________________
+// Object
+
+template <typename TElement> struct Object;       	// "projects/library/seqan/misc/misc_base.h"(68)
+
+//____________________________________________________________________________
+// OptionType
+
+struct OptionType;       	// "projects/library/seqan/misc/misc_cmdparser.h"(96)
+
+//____________________________________________________________________________
+// PointAndCargo
+
+template <typename TValue, typename TCargo> class PointAndCargo;       	// "projects/library/seqan/misc/misc_interval_tree.h"(130)
+
+//____________________________________________________________________________
+// PriorityHeap
+
+struct PriorityHeap;       	// "projects/library/seqan/misc/priority_type_base.h"(43)
+
+//____________________________________________________________________________
+// PriorityType
+
+template <typename TValue , typename TLess , typename TSpec > class PriorityType;       	// "projects/library/seqan/misc/priority_type_base.h"(62)
+
+//____________________________________________________________________________
+// SVGFile
+
+struct SVGFile;       	// "projects/library/seqan/misc/misc_svg.h"(44)
+
+//____________________________________________________________________________
+// Set
+
+template <typename TKey> struct Set;       	// "projects/library/seqan/misc/misc_set.h"(562)
+
+//____________________________________________________________________________
+// SetLess_
+
+template <typename TElement> struct SetLess_;       	// "projects/library/seqan/misc/misc_set.h"(379)
+
+//____________________________________________________________________________
+// SetObjVector_
+
+template <typename TSet> struct SetObjVector_;       	// "projects/library/seqan/misc/misc_set.h"(83)
+
+//____________________________________________________________________________
+// SetSetVector_
+
+template <typename TSet> struct SetSetVector_;       	// "projects/library/seqan/misc/misc_set.h"(68)
+
+//____________________________________________________________________________
+// StoreIntervals
+
+struct StoreIntervals;       	// "projects/library/seqan/misc/misc_interval_tree.h"(187)
+
+//____________________________________________________________________________
+// StorePointsOnly
+
+struct StorePointsOnly;       	// "projects/library/seqan/misc/misc_interval_tree.h"(183)
+
+//____________________________________________________________________________
+// TagComputeCenter_
+
+struct TagComputeCenter_;       	// "projects/library/seqan/misc/misc_interval_tree.h"(426)
+
+//____________________________________________________________________________
+// TagRandomCenter_
+
+struct TagRandomCenter_;       	// "projects/library/seqan/misc/misc_interval_tree.h"(437)
+
+//____________________________________________________________________________
+// VectorSetIterator_
+
+struct VectorSetIterator_;       	// "projects/library/seqan/misc/misc_set.h"(173)
+
+//____________________________________________________________________________
+// VectorSetKeySize_
+
+template <typename TElement> struct VectorSetKeySize_;       	// "projects/library/seqan/misc/misc_set.h"(62)
+
+//____________________________________________________________________________
+// VectorSet_
+
+template <typename TElement, typename TSpec> class VectorSet_;       	// "projects/library/seqan/misc/misc_set.h"(55)
+template <typename TElement , typename TSpec > class VectorSet_;       	// "projects/library/seqan/misc/misc_set.h"(103)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// DynamicWidth_
+
+struct DynamicWidth_;       	// "projects/library/seqan/misc/misc_long_word.h"(68)
+
+//____________________________________________________________________________
+// LongWord
+
+template <typename TSpec> struct LongWord;       	// "projects/library/seqan/misc/misc_long_word.h"(53)
+
+//____________________________________________________________________________
+// LongWordBitProxy
+
+template <typename TWord, typename TSpec> struct LongWordBitProxy;       	// "projects/library/seqan/misc/misc_long_word.h"(57)
+
+//____________________________________________________________________________
+// StaticWidth
+
+template <unsigned LENGTH> struct StaticWidth;       	// "projects/library/seqan/misc/misc_long_word.h"(73)
+
+//____________________________________________________________________________
+// _NativeWideWidth
+
+struct _NativeWideWidth;       	// "projects/library/seqan/misc/misc_long_word.h"(64)
+
+//____________________________________________________________________________
+// _NativeWidth
+
+struct _NativeWidth;       	// "projects/library/seqan/misc/misc_long_word.h"(60)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// ComputeCenter
+
+typedef Tag<TagComputeCenter_> const ComputeCenter;       	// "projects/library/seqan/misc/misc_interval_tree.h"(427)
+
+//____________________________________________________________________________
+// RandomCenter
+
+typedef Tag<TagRandomCenter_> const RandomCenter;       	// "projects/library/seqan/misc/misc_interval_tree.h"(438)
+
+//____________________________________________________________________________
+// VectorSetIterator__
+
+typedef Tag<VectorSetIterator_> VectorSetIterator__;       	// "projects/library/seqan/misc/misc_set.h"(174)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// DynamicWidth
+
+typedef Tag<DynamicWidth_> DynamicWidth;       	// "projects/library/seqan/misc/misc_long_word.h"(69)
+
+//____________________________________________________________________________
+// NativeWideWidth
+
+typedef Tag<_NativeWideWidth> NativeWideWidth;       	// "projects/library/seqan/misc/misc_long_word.h"(65)
+
+//____________________________________________________________________________
+// NativeWidth
+
+typedef Tag<_NativeWidth> NativeWidth;       	// "projects/library/seqan/misc/misc_long_word.h"(61)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _adjustHeapTowardLeaves
+
+template <typename TValue, typename TLess, typename TSize> inline void _adjustHeapTowardLeaves( PriorityType<TValue, TLess, PriorityHeap> & me, TValue element, TSize h, TSize i );       	// "projects/library/seqan/misc/priority_type_heap.h"(288)
+
+//____________________________________________________________________________
+// _adjustHeapTowardRoot
+
+template <typename TValue, typename TLess, typename TSize> inline void _adjustHeapTowardRoot( PriorityType<TValue, TLess, PriorityHeap> & me, TValue const & element, TSize h );       	// "projects/library/seqan/misc/priority_type_heap.h"(236)
+
+//____________________________________________________________________________
+// _alignNeedlemanWunschMatrix
+
+template <typename TStringSet, typename TTrace, typename TIndexPair> void _alignNeedlemanWunschMatrix(SVGFile& svg, TStringSet const& str, TTrace const& trace, TIndexPair const&);       	// "projects/library/seqan/misc/misc_svg.h"(399)
+
+//____________________________________________________________________________
+// _alignTracePrint
+
+template <typename TStringSet, typename TId, typename TPos, typename TTraceValue> inline void _alignTracePrint(SVGFile& svg, TStringSet const&, TId const, TPos pos1, TId const, TPos pos2, TPos const segLen, TTraceValue const tv);       	// "projects/library/seqan/misc/misc_svg.h"(448)
+
+//____________________________________________________________________________
+// _allMandatorySet
+
+inline bool _allMandatorySet(CommandLineParser const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1169)
+
+//____________________________________________________________________________
+// _appendIntervalTreeNodeLists
+
+template <typename TInterval> void _appendIntervalTreeNodeLists(IntervalTreeNode<TInterval,StoreIntervals> & knot,TInterval & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(729)
+template <typename TInterval> void _appendIntervalTreeNodeLists(IntervalTreeNode<TInterval,StorePointsOnly> & knot,TInterval & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(756)
+
+//____________________________________________________________________________
+// _assignOptionValue
+
+template <typename TErrorStream> bool _assignOptionValue(CommandLineParser & me, unsigned option_index, CharString const & val, unsigned argNo, TErrorStream & estream);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1194)
+template <typename TErrorStream> inline bool _assignOptionValue(CommandLineParser & me, unsigned option_index, CharString const & val, TErrorStream & estream);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1235)
+
+//____________________________________________________________________________
+// _calcIntervalTreeNodeCenterLeft
+
+template <typename TIntervals, typename TValue> TValue _calcIntervalTreeNodeCenterLeft(TIntervals & intervals, TValue &, TValue &, Tag<TagRandomCenter_> const);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1156)
+
+//____________________________________________________________________________
+// _calcIntervalTreeNodeCenterRight
+
+template <typename TIntervals, typename TValue> TValue _calcIntervalTreeNodeCenterRight(TIntervals & intervals, TValue &, TValue &, Tag<TagRandomCenter_> const);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1168)
+
+//____________________________________________________________________________
+// _calcIntervalTreeRootCenter
+
+template <typename TIntervals> typename Value<typename Value<TIntervals>::Type>::Type _calcIntervalTreeRootCenter(TIntervals & intervals);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1180)
+
+//____________________________________________________________________________
+// _convertOptionValue
+
+inline bool _convertOptionValue(CommandLineOption const & opt, bool & dst, CharString const & src);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1458)
+inline bool _convertOptionValue(CommandLineOption const & opt, int & dst, CharString const & src);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1466)
+inline bool _convertOptionValue(CommandLineOption const & opt, unsigned int & dst, CharString const & src);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1474)
+inline bool _convertOptionValue(CommandLineOption const & opt, __int64 & dst, CharString const & src);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1482)
+inline bool _convertOptionValue(CommandLineOption const & opt, __uint64 & dst, CharString const & src);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1490)
+inline bool _convertOptionValue(CommandLineOption const & opt, float & dst, CharString const & src);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1498)
+inline bool _convertOptionValue(CommandLineOption const & opt, double & dst, CharString const & src);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1506)
+template <typename TObject> inline bool _convertOptionValue(CommandLineOption const & opt, TObject & dst, CharString const & src);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1515)
+
+//____________________________________________________________________________
+// _copyHeapElement
+
+template <typename TValue, typename TLess, typename TSize> inline void _copyHeapElement (PriorityType<TValue, TLess, PriorityHeap> & me, TSize i, TSize & h);       	// "projects/library/seqan/misc/priority_type_heap.h"(157)
+template <typename TValue, typename TLess, typename TSize> inline void _copyHeapElement (PriorityType<TValue, TLess, PriorityHeap> & me, TValue const & element, TSize h);       	// "projects/library/seqan/misc/priority_type_heap.h"(167)
+
+//____________________________________________________________________________
+// _createIntervalTree
+
+template <typename TGraph, typename TPropertyMap, typename TIntervalPointer, typename TValue> void _createIntervalTree(TGraph & g, TPropertyMap & pm, String<TIntervalPointer*> & intervals, typename VertexDescriptor<TGraph>::Type & knot, TValue, TValue center, typename VertexDescriptor<TGraph>::Type len, Tag<TagComputeCenter_> const tag);       	// "projects/library/seqan/misc/misc_interval_tree.h"(956)
+template <typename TGraph, typename TPropertyMap, typename TSpec, typename TInterval, typename TValue> void _createIntervalTree(TGraph & g, TPropertyMap & pm, String<TInterval*> & intervals, typename VertexDescriptor<TGraph>::Type & knot, TValue last_center, TValue center, typename VertexDescriptor<TGraph>::Type len, Tag<TSpec> const tag);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1055)
+
+//____________________________________________________________________________
+// _dataHost
+
+template <typename TText, typename TSpec> inline Holder<TText> & _dataHost(Enumerator<TText, TSpec> &enumerator);       	// "projects/library/seqan/misc/edit_environment.h"(125)
+template <typename TText, typename TSpec> inline Holder<TText> const & _dataHost(Enumerator<TText, TSpec> const &enumerator);       	// "projects/library/seqan/misc/edit_environment.h"(130)
+
+//____________________________________________________________________________
+// _getOptionValue
+
+inline CharString const & _getOptionValue(CommandLineParser const & me, unsigned option_index, unsigned argNo);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1438)
+inline CharString const & _getOptionValue(CommandLineParser const & me, unsigned option_index);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1450)
+
+//____________________________________________________________________________
+// _getOptionValues
+
+inline String<CharString> const & _getOptionValues(CommandLineParser const & me, unsigned option_index);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1428)
+
+//____________________________________________________________________________
+// _greater_compI2_ITree
+
+template <typename TPair> bool _greater_compI2_ITree(TPair const& p1, TPair const& p2);       	// "projects/library/seqan/misc/misc_interval_tree.h"(698)
+
+//____________________________________________________________________________
+// _isDigit
+
+template <typename TChar> inline bool _isDigit(TChar const c);       	// "projects/library/seqan/misc/misc_cmdparser.h"(53)
+
+//____________________________________________________________________________
+// _isDouble
+
+template <typename TString> inline bool _isDouble(TString const s);       	// "projects/library/seqan/misc/misc_cmdparser.h"(60)
+
+//____________________________________________________________________________
+// _isInt
+
+template <typename TString> inline bool _isInt(TString const s);       	// "projects/library/seqan/misc/misc_cmdparser.h"(81)
+
+//____________________________________________________________________________
+// _less_compI1_ITree
+
+template <typename TPair> bool _less_compI1_ITree(TPair const& p1, TPair const& p2);       	// "projects/library/seqan/misc/misc_interval_tree.h"(691)
+
+//____________________________________________________________________________
+// _makePointerInterval
+
+template <typename TIntervals, typename TIntervalPointers> void _makePointerInterval(TIntervals & intervals,TIntervalPointers & interval_pointers);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1131)
+
+//____________________________________________________________________________
+// _parseAppName
+
+inline CharString _parseAppName(CharString const & candidate);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1179)
+
+//____________________________________________________________________________
+// _printContig
+
+template <typename TFormatTag, typename TContigGaps, typename TContigName> inline void _printContig( SVGFile &svg, Tag<TFormatTag> const &format, AlignedReadLayout &, TContigGaps &contigGaps, TContigName const &contigName);       	// "projects/library/seqan/misc/misc_svg.h"(210)
+
+//____________________________________________________________________________
+// _printRead
+
+template <typename TFormatTag, typename TContigGaps, typename TReadGaps, typename TAlignedRead, typename TLine> inline void _printRead( SVGFile &svg, Tag<TFormatTag> const &, AlignedReadLayout &layout, TContigGaps &contigGaps, TReadGaps &readGaps, TAlignedRead &alignedRead, TLine line);       	// "projects/library/seqan/misc/misc_svg.h"(263)
+
+//____________________________________________________________________________
+// _printStringSet
+
+template <typename TStringSet, typename TStream> inline void _printStringSet(TStringSet const & set, TStream & target);       	// "projects/library/seqan/misc/misc_cmdparser.h"(924)
+
+//____________________________________________________________________________
+// _setIntervalTreeNode
+
+template <typename TValue, typename TInterval> void _setIntervalTreeNode(IntervalTreeNode<TInterval,StoreIntervals> & knot,TValue center,TInterval & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(717)
+template <typename TValue, typename TInterval> void _setIntervalTreeNode(IntervalTreeNode<TInterval,StorePointsOnly> & knot,TValue center,TInterval & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(742)
+
+//____________________________________________________________________________
+// _streamPut
+
+template <typename TChar> inline void _streamPut(SVGFile & svg, TChar character);       	// "projects/library/seqan/misc/misc_svg.h"(183)
+
+//____________________________________________________________________________
+// _title
+
+template <typename TStream> inline void _title(CommandLineParser const & me, TStream & target);       	// "projects/library/seqan/misc/misc_cmdparser.h"(965)
+
+//____________________________________________________________________________
+// _usage
+
+template <typename TStream> inline void _usage(CommandLineParser const & me, TStream & target);       	// "projects/library/seqan/misc/misc_cmdparser.h"(935)
+
+//____________________________________________________________________________
+// _writeOptName
+
+template <typename TStream> inline void _writeOptName(TStream & target, CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(594)
+
+//____________________________________________________________________________
+// addArgumentText
+
+inline CommandLineOption addArgumentText(CommandLineOption const & opt, CharString const & text);       	// "projects/library/seqan/misc/misc_cmdparser.h"(261)
+
+//____________________________________________________________________________
+// addHelpLine
+
+template <typename TString> inline void addHelpLine(CommandLineParser & me, TString const & line);       	// "projects/library/seqan/misc/misc_cmdparser.h"(776)
+
+//____________________________________________________________________________
+// addInterval
+
+template <typename TGraph, typename TPropertyMap, typename TInterval> void addInterval(TGraph & g, TPropertyMap & pm, TInterval interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1223)
+template <typename TValue, typename TCargo, typename TInterval> void addInterval(IntervalTree<TValue,TCargo> & itree, TInterval interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1322)
+template <typename TValue, typename TCargo> void addInterval(IntervalTree<TValue,TCargo> & itree, TValue begin, TValue end, TCargo cargo);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1341)
+template <typename TValue, typename TCargo> void addInterval(IntervalTree<TValue,TCargo> & itree, TValue begin, TValue end);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1360)
+
+//____________________________________________________________________________
+// addLine
+
+template <typename TString> inline void addLine(CommandLineParser & me, TString const & line);       	// "projects/library/seqan/misc/misc_cmdparser.h"(756)
+
+//____________________________________________________________________________
+// addOption
+
+inline void addOption(CommandLineParser & me, CommandLineOption const & opt);       	// "projects/library/seqan/misc/misc_cmdparser.h"(715)
+
+//____________________________________________________________________________
+// addSection
+
+template <typename TString> inline void addSection(CommandLineParser & me, TString const & line);       	// "projects/library/seqan/misc/misc_cmdparser.h"(796)
+
+//____________________________________________________________________________
+// addTitleLine
+
+template <typename TString> inline void addTitleLine(CommandLineParser & me, TString const & line);       	// "projects/library/seqan/misc/misc_cmdparser.h"(817)
+
+//____________________________________________________________________________
+// addUsageLine
+
+inline void addUsageLine(CommandLineParser & me, CharString const & line);       	// "projects/library/seqan/misc/misc_cmdparser.h"(858)
+
+//____________________________________________________________________________
+// addVersionLine
+
+template <typename TString> inline void addVersionLine(CommandLineParser & me, TString const & line);       	// "projects/library/seqan/misc/misc_cmdparser.h"(837)
+
+//____________________________________________________________________________
+// adjustTop
+
+template <typename TValue, typename TLess> inline void adjustTop (PriorityType<TValue, TLess, PriorityHeap> & me);       	// "projects/library/seqan/misc/priority_type_heap.h"(185)
+
+//____________________________________________________________________________
+// argumentCount
+
+inline Size<String<CharString> >::Type argumentCount(CommandLineParser const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1715)
+
+//____________________________________________________________________________
+// argumentText
+
+inline CharString argumentText(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(563)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename TObject, unsigned DISTANCE > inline void atBegin(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & it);       	// "projects/library/seqan/misc/edit_environment.h"(253)
+template <typename TObject, unsigned DISTANCE > inline bool atBegin(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it);       	// "projects/library/seqan/misc/edit_environment.h"(261)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TObject, unsigned DISTANCE > inline bool atEnd(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & it);       	// "projects/library/seqan/misc/edit_environment.h"(283)
+template <typename TObject, unsigned DISTANCE > inline bool atEnd(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it);       	// "projects/library/seqan/misc/edit_environment.h"(299)
+template <typename TSet> inline bool atEnd(Iter<TSet, VectorSetIterator__> const &a);       	// "projects/library/seqan/misc/misc_set.h"(335)
+
+//____________________________________________________________________________
+// back
+
+template <typename TValue, typename TSpec> inline TValue & back(Dequeue<TValue, TSpec> &me);       	// "projects/library/seqan/misc/misc_dequeue.h"(184)
+template <typename TValue, typename TSpec> inline TValue const & back(Dequeue<TValue, TSpec> const &me);       	// "projects/library/seqan/misc/misc_dequeue.h"(191)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TObject, typename TSpec > inline Iter< Enumerator<TObject, TSpec>, Standard > begin(Enumerator<TObject, TSpec> &enumerator, Standard);       	// "projects/library/seqan/misc/edit_environment.h"(754)
+template <typename TObject, typename TSpec > inline Iter< Enumerator<TObject, TSpec>, Standard > begin(Enumerator<TObject, TSpec> const &enumerator, Standard);       	// "projects/library/seqan/misc/edit_environment.h"(759)
+template <typename TElement, typename TSpec> inline typename Iterator< VectorSet_<TElement, TSpec> >::Type begin(VectorSet_<TElement, TSpec> &set);       	// "projects/library/seqan/misc/misc_set.h"(294)
+template <typename TElement, typename TSpec> inline typename Iterator< VectorSet_<TElement, TSpec> const>::Type begin(VectorSet_<TElement, TSpec> const &set);       	// "projects/library/seqan/misc/misc_set.h"(300)
+
+//____________________________________________________________________________
+// cargo
+
+template <typename TValue, typename TCargo> TCargo & cargo(IntervalAndCargo<TValue,TCargo> & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(542)
+template <typename TValue, typename TCargo> TCargo & cargo(PointAndCargo<TValue,TCargo> & point);       	// "projects/library/seqan/misc/misc_interval_tree.h"(649)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TValue, typename TLess> inline void clear (PriorityType<TValue,TLess, PriorityHeap> & me);       	// "projects/library/seqan/misc/priority_type_heap.h"(95)
+template <typename TValue, typename TSpec> inline void clear(Dequeue<TValue, TSpec> &me);       	// "projects/library/seqan/misc/misc_dequeue.h"(126)
+template <typename TValue, typename TSpec> finline void clear(VectorSet_<TValue, TSpec> &set);       	// "projects/library/seqan/misc/misc_set.h"(228)
+
+//____________________________________________________________________________
+// close
+
+inline bool close(SVGFile &svg);       	// "projects/library/seqan/misc/misc_svg.h"(171)
+
+//____________________________________________________________________________
+// createIntervalTree
+
+template <typename TGraph, typename TPropertyMap, typename TIntervals, typename TSpec> void createIntervalTree(TGraph & g, TPropertyMap & pm, TIntervals & intervals, Tag<TSpec> const tag);       	// "projects/library/seqan/misc/misc_interval_tree.h"(841)
+template <typename TGraph, typename TPropertyMap, typename TIntervals> void createIntervalTree(TGraph & g, TPropertyMap & pm, TIntervals & intervals);       	// "projects/library/seqan/misc/misc_interval_tree.h"(880)
+template <typename TGraph, typename TPropertyMap, typename TIntervals, typename TSpec> void createIntervalTree(TGraph & g, TPropertyMap & pm, TIntervals & intervals, typename Value<typename Value<TIntervals>::Type>::Type center, Tag<TSpec> const tag);       	// "projects/library/seqan/misc/misc_interval_tree.h"(896)
+template <typename TGraph, typename TPropertyMap, typename TIntervals> void createIntervalTree(TGraph & g, TPropertyMap & pm, TIntervals & intervals, typename Value<typename Value<TIntervals>::Type>::Type center);       	// "projects/library/seqan/misc/misc_interval_tree.h"(937)
+
+//____________________________________________________________________________
+// empty
+
+template <typename TValue, typename TLess> inline bool empty(PriorityType<TValue, TLess, PriorityHeap> const & me);       	// "projects/library/seqan/misc/priority_type_heap.h"(104)
+template <typename TValue, typename TSpec> inline bool empty(Dequeue<TValue, TSpec> const &me);       	// "projects/library/seqan/misc/misc_dequeue.h"(117)
+
+//____________________________________________________________________________
+// end
+
+template <typename TObject, typename TSpec > inline Iter< Enumerator<TObject, TSpec>, Standard > end(Enumerator<TObject, TSpec> &enumerator, Standard);       	// "projects/library/seqan/misc/edit_environment.h"(769)
+template <typename TObject, typename TSpec > inline Iter< Enumerator<TObject, TSpec>, Standard > end(Enumerator<TObject, TSpec> const &enumerator, Standard);       	// "projects/library/seqan/misc/edit_environment.h"(776)
+template <typename TElement, typename TSpec> inline typename Iterator< VectorSet_<TElement, TSpec> >::Type end(VectorSet_<TElement, TSpec> &set);       	// "projects/library/seqan/misc/misc_set.h"(307)
+template <typename TElement, typename TSpec> inline typename Iterator< VectorSet_<TElement, TSpec> const>::Type end(VectorSet_<TElement, TSpec> const &set);       	// "projects/library/seqan/misc/misc_set.h"(313)
+
+//____________________________________________________________________________
+// eof
+
+template <typename TSet> inline bool eof(Iter<TSet, VectorSetIterator__> const &a);       	// "projects/library/seqan/misc/misc_set.h"(330)
+
+//____________________________________________________________________________
+// erase
+
+template <typename TKey, typename TValue, typename TSpec> finline void erase(TKey const &key, VectorSet_<TValue, TSpec> &set);       	// "projects/library/seqan/misc/misc_set.h"(258)
+
+//____________________________________________________________________________
+// find
+
+template <typename TKey, typename TKey2, typename TSpec> inline typename Iterator< VectorSet_<TKey2, TSpec> >::Type find(TKey const &key, VectorSet_<TKey2, TSpec> &set);       	// "projects/library/seqan/misc/misc_set.h"(273)
+template <typename TKey, typename TKey2, typename TSpec> inline typename Iterator< VectorSet_<TKey2, TSpec> const>::Type find(TKey const &key, VectorSet_<TKey2, TSpec> const &set);       	// "projects/library/seqan/misc/misc_set.h"(283)
+
+//____________________________________________________________________________
+// findIntervals
+
+template <typename TGraph, typename TPropertyMap, typename TValue,typename TCargo> void findIntervals(TGraph & g, TPropertyMap & pm, TValue query, String<TCargo> & result);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1383)
+template <typename TValue,typename TCargo> void findIntervals(IntervalTree<TValue,TCargo> & it, TValue query, String<TCargo> & result);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1461)
+template <typename TValue,typename TCargo> void findIntervals(IntervalTree<TValue,TCargo> & tree, TValue query_begin, TValue query_end, String<TCargo> & result);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1585)
+template <typename TGraph, typename TPropertyMap, typename TValue,typename TCargo> void findIntervals(TGraph & g, TPropertyMap & pm, TValue query_begin, TValue query_end, String<TCargo> & result);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1597)
+template <typename TGraph, typename TPropertyMap, typename TValue,typename TCargo> void findIntervals(TGraph & g, TPropertyMap & pm, typename VertexDescriptor<TGraph>::Type & act_knot, TValue query_begin, TValue query_end, String<TCargo> & result);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1620)
+
+//____________________________________________________________________________
+// findIntervalsExcludeTouching
+
+template <typename TGraph, typename TPropertyMap, typename TValue,typename TCargo> void findIntervalsExcludeTouching(TGraph & g, TPropertyMap & pm, TValue query, String<TCargo> & result);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1485)
+template <typename TValue,typename TCargo> void findIntervalsExcludeTouching(IntervalTree<TValue,TCargo> & tree, TValue query, String<TCargo> & result);       	// "projects/library/seqan/misc/misc_interval_tree.h"(1566)
+
+//____________________________________________________________________________
+// front
+
+template <typename TValue, typename TSpec> inline TValue & front(Dequeue<TValue, TSpec> &me);       	// "projects/library/seqan/misc/misc_dequeue.h"(168)
+template <typename TValue, typename TSpec> inline TValue const & front(Dequeue<TValue, TSpec> const &me);       	// "projects/library/seqan/misc/misc_dequeue.h"(175)
+
+//____________________________________________________________________________
+// geomRand
+
+template <typename T> inline T geomRand();       	// "projects/library/seqan/misc/misc_random.h"(212)
+
+//____________________________________________________________________________
+// getArgumentValue
+
+inline CharString const & getArgumentValue(CommandLineParser const & me, unsigned position);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1677)
+
+//____________________________________________________________________________
+// getArgumentValues
+
+inline String<CharString> const & getArgumentValues(CommandLineParser const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1698)
+
+//____________________________________________________________________________
+// getCargo
+
+template <typename TValue, typename TCargo> TCargo getCargo(IntervalAndCargo<TValue,TCargo> & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(557)
+template <typename TValue, typename TCargo> TCargo getCargo(PointAndCargo<TValue,TCargo> & point);       	// "projects/library/seqan/misc/misc_interval_tree.h"(665)
+
+//____________________________________________________________________________
+// getLeftBoundary
+
+template <typename TValue, typename TCargo> TValue getLeftBoundary(IntervalAndCargo<TValue,TCargo> & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(505)
+template <typename TValue, typename TCargo> TValue getLeftBoundary(PointAndCargo<TValue,TCargo> & point);       	// "projects/library/seqan/misc/misc_interval_tree.h"(621)
+
+//____________________________________________________________________________
+// getOptionValueLong
+
+template <typename TValue> inline bool getOptionValueLong(CommandLineParser & me, CharString const & longName, unsigned argNo, TValue & val);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1610)
+template <typename TValue> inline bool getOptionValueLong(CommandLineParser & me,CharString const & longName, TValue & val);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1628)
+
+//____________________________________________________________________________
+// getOptionValueShort
+
+template <typename TValue> inline bool getOptionValueShort(CommandLineParser & me, CharString const & shortName, unsigned argNo, TValue & val);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1540)
+template <typename TValue> inline bool getOptionValueShort(CommandLineParser & me, CharString const & shortName, TValue & val);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1558)
+
+//____________________________________________________________________________
+// getOptionValuesLong
+
+inline String<CharString> const & getOptionValuesLong(CommandLineParser & me, CharString const & longName);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1646)
+
+//____________________________________________________________________________
+// getOptionValuesShort
+
+inline String<CharString> const & getOptionValuesShort(CommandLineParser & me,CharString const & shortName);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1576)
+
+//____________________________________________________________________________
+// getRightBoundary
+
+template <typename TValue, typename TCargo> TValue getRightBoundary(IntervalAndCargo<TValue,TCargo> & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(526)
+template <typename TValue, typename TCargo> TValue getRightBoundary(PointAndCargo<TValue,TCargo> & point);       	// "projects/library/seqan/misc/misc_interval_tree.h"(635)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename TObject, unsigned DISTANCE > inline void goBegin(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it);       	// "projects/library/seqan/misc/edit_environment.h"(209)
+template <typename TObject, unsigned DISTANCE > inline void goBegin(Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> & it);       	// "projects/library/seqan/misc/edit_environment.h"(555)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename TObject, unsigned DISTANCE > inline void goEnd(Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it);       	// "projects/library/seqan/misc/edit_environment.h"(268)
+template <typename TObject, unsigned DISTANCE > inline void goEnd(Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> & it);       	// "projects/library/seqan/misc/edit_environment.h"(582)
+
+//____________________________________________________________________________
+// hasOptionLong
+
+inline bool hasOptionLong(CommandLineParser const & me, CharString const & _long);       	// "projects/library/seqan/misc/misc_cmdparser.h"(877)
+
+//____________________________________________________________________________
+// hasOptionShort
+
+inline bool hasOptionShort(CommandLineParser const & me, CharString const & _short);       	// "projects/library/seqan/misc/misc_cmdparser.h"(895)
+
+//____________________________________________________________________________
+// help
+
+template <typename TStream> inline void help(CommandLineParser const & me, TStream & target);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1015)
+inline void help(CommandLineParser const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1089)
+
+//____________________________________________________________________________
+// helpText
+
+inline CharString & helpText(CommandLineOption & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(360)
+inline const CharString & helpText(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(365)
+
+//____________________________________________________________________________
+// in
+
+template <typename TKey, typename TValue, typename TSpec> finline bool in(TKey const &key, VectorSet_<TValue, TSpec> const &set);       	// "projects/library/seqan/misc/misc_set.h"(267)
+
+//____________________________________________________________________________
+// insert
+
+template <typename TElement, typename TSetKey, typename TSpec> finline void insert(TElement const &element, VectorSet_<TSetKey, TSpec> &set);       	// "projects/library/seqan/misc/misc_set.h"(235)
+template <typename TElement, typename TSetKey, typename TSetObject, typename TPairSpec, typename TSpec> finline void insert(TElement const &element, VectorSet_< Pair<TSetKey, TSetObject, TPairSpec>, TSpec > &set);       	// "projects/library/seqan/misc/misc_set.h"(248)
+
+//____________________________________________________________________________
+// isBooleanOption
+
+inline bool isBooleanOption(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(418)
+
+//____________________________________________________________________________
+// isDoubleOption
+
+inline bool isDoubleOption(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(436)
+
+//____________________________________________________________________________
+// isHiddenOption
+
+inline bool isHiddenOption(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(472)
+
+//____________________________________________________________________________
+// isIntOption
+
+inline bool isIntOption(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(454)
+
+//____________________________________________________________________________
+// isLabelOption
+
+inline bool isLabelOption(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(508)
+
+//____________________________________________________________________________
+// isOptionList
+
+inline bool isOptionList(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(526)
+
+//____________________________________________________________________________
+// isOptionMandatory
+
+inline bool isOptionMandatory(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(490)
+
+//____________________________________________________________________________
+// isSetLong
+
+inline bool isSetLong(CommandLineParser & me,CharString const & longName);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1157)
+
+//____________________________________________________________________________
+// isSetShort
+
+inline bool isSetShort(CommandLineParser & me, CharString const & shortName);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1134)
+
+//____________________________________________________________________________
+// isStringOption
+
+inline bool isStringOption(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(400)
+
+//____________________________________________________________________________
+// keyOf
+
+template <typename TElement> inline typename Key<TElement>::Type & keyOf(TElement & element);       	// "projects/library/seqan/misc/misc_base.h"(85)
+template <typename TElement> inline typename Key<TElement const>::Type & keyOf(TElement const & element);       	// "projects/library/seqan/misc/misc_base.h"(91)
+template <typename TKey, typename TObject, typename TSpec> inline TKey & keyOf(Pair<TKey, TObject, TSpec> &element);       	// "projects/library/seqan/misc/misc_base.h"(97)
+template <typename TKey, typename TObject, typename TSpec> inline TKey const & keyOf(Pair<TKey, TObject, TSpec> const &element);       	// "projects/library/seqan/misc/misc_base.h"(102)
+template <typename TSet> inline typename Key<TSet>::Type keyOf(Iter<TSet, VectorSetIterator__> &it);       	// "projects/library/seqan/misc/misc_set.h"(343)
+template <typename TSet> inline typename Key<TSet>::Type keyOf(Iter<TSet, VectorSetIterator__> const &it);       	// "projects/library/seqan/misc/misc_set.h"(348)
+
+//____________________________________________________________________________
+// leftBoundary
+
+template <typename TValue, typename TCargo> TValue & leftBoundary(IntervalAndCargo<TValue,TCargo> & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(463)
+template <typename TValue, typename TCargo> TValue & leftBoundary(PointAndCargo<TValue,TCargo> & point);       	// "projects/library/seqan/misc/misc_interval_tree.h"(593)
+
+//____________________________________________________________________________
+// length
+
+template <typename TObject, unsigned DISTANCE > inline typename Size< Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> > >::Type length(Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> > const & me);       	// "projects/library/seqan/misc/edit_environment.h"(373)
+template <typename TObject, unsigned DISTANCE > inline typename Size< Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> > >::Type length(Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> > const & me);       	// "projects/library/seqan/misc/edit_environment.h"(698)
+template <typename TValue, typename TLess> inline typename Size<PriorityType<TValue, TLess, PriorityHeap> >::Type length( PriorityType<TValue, TLess, PriorityHeap> const & me);       	// "projects/library/seqan/misc/priority_type_heap.h"(114)
+template <typename TValue, typename TSpec> inline typename Size<Dequeue<TValue, TSpec> >::Type length(Dequeue<TValue, TSpec> const &me);       	// "projects/library/seqan/misc/misc_dequeue.h"(300)
+template <typename TObject, typename TSpec> inline typename Size< VectorSet_<TObject, TSpec> >::Type length(VectorSet_<TObject, TSpec> const &set);       	// "projects/library/seqan/misc/misc_set.h"(164)
+
+//____________________________________________________________________________
+// lognormRand
+
+inline double lognormRand(double mean, double stddev);       	// "projects/library/seqan/misc/misc_random.h"(279)
+
+//____________________________________________________________________________
+// longName
+
+inline CharString & longName(CommandLineOption & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(282)
+inline const CharString & longName(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(287)
+
+//____________________________________________________________________________
+// mtRand
+
+inline unsigned mtRand();       	// "projects/library/seqan/misc/misc_random.h"(156)
+
+//____________________________________________________________________________
+// mtRandDouble
+
+inline double mtRandDouble();       	// "projects/library/seqan/misc/misc_random.h"(191)
+
+//____________________________________________________________________________
+// mtRandInit
+
+inline void mtRandInit(bool _doSRand );       	// "projects/library/seqan/misc/misc_random.h"(113)
+inline void mtRandInit();       	// "projects/library/seqan/misc/misc_random.h"(133)
+
+//____________________________________________________________________________
+// normRand
+
+inline double normRand(double mean, double stddev);       	// "projects/library/seqan/misc/misc_random.h"(248)
+
+//____________________________________________________________________________
+// objectOf
+
+template <typename TKey, typename TObject, typename TSpec> inline TObject & objectOf(Pair<TKey, TObject, TSpec> &element);       	// "projects/library/seqan/misc/misc_base.h"(112)
+template <typename TKey, typename TObject, typename TSpec> inline TObject const & objectOf(Pair<TKey, TObject, TSpec> const &element);       	// "projects/library/seqan/misc/misc_base.h"(117)
+template <typename TSet> inline typename Object<TSet>::Type & objectOf(Iter<TSet, VectorSetIterator__> &it);       	// "projects/library/seqan/misc/misc_set.h"(354)
+template <typename TSet> inline typename Object<TSet>::Type & objectOf(Iter<TSet, VectorSetIterator__> const &it);       	// "projects/library/seqan/misc/misc_set.h"(359)
+
+//____________________________________________________________________________
+// open
+
+template <typename TFileName> inline bool open(SVGFile &svg, TFileName const &fileName);       	// "projects/library/seqan/misc/misc_svg.h"(163)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TObject, unsigned DISTANCE> inline bool operator!= ( Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & a, Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & b);       	// "projects/library/seqan/misc/edit_environment.h"(841)
+template <typename TObject, unsigned DISTANCE> inline bool operator!= ( Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> const & a, Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> const & b);       	// "projects/library/seqan/misc/edit_environment.h"(863)
+template <typename TSet> inline bool operator!=(Iter<TSet, VectorSetIterator__> const &a, Iter<TSet, VectorSetIterator__> const &b);       	// "projects/library/seqan/misc/misc_set.h"(325)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TObject, typename TSpec > inline TObject const & operator* (Iter<Enumerator<TObject, TSpec>, Standard> & it);       	// "projects/library/seqan/misc/edit_environment.h"(192)
+template <typename TObject, typename TSpec > inline TObject const & operator* (Iter<Enumerator<TObject, TSpec>, Standard> const & it);       	// "projects/library/seqan/misc/edit_environment.h"(199)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename TObject, unsigned DISTANCE > inline Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & operator++ (Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> & it);       	// "projects/library/seqan/misc/edit_environment.h"(306)
+template <typename TObject, unsigned DISTANCE > inline Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> & operator++ (Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> &it);       	// "projects/library/seqan/misc/edit_environment.h"(599)
+
+//____________________________________________________________________________
+// operator<<
+
+inline SVGFile & operator<< (SVGFile & target, char source);       	// "projects/library/seqan/misc/misc_svg.h"(378)
+inline SVGFile & operator<< (SVGFile & target, char const *source);       	// "projects/library/seqan/misc/misc_svg.h"(386)
+template <typename TStream> inline TStream & operator<< (TStream & target, CommandLineOption const & source);       	// "projects/library/seqan/misc/misc_cmdparser.h"(621)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TObject, unsigned DISTANCE> inline bool operator== ( Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & a, Iter<Enumerator<TObject, EditEnvironment<HammingDistance, DISTANCE> >, Standard> const & b);       	// "projects/library/seqan/misc/edit_environment.h"(791)
+template <typename TObject, unsigned DISTANCE> inline bool operator== ( Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> const & a, Iter<Enumerator<TObject, EditEnvironment<LevenshteinDistance, DISTANCE> >, Standard> const & b);       	// "projects/library/seqan/misc/edit_environment.h"(813)
+template <typename TSet> inline bool operator==(Iter<TSet, VectorSetIterator__> const &a, Iter<TSet, VectorSetIterator__> const &b);       	// "projects/library/seqan/misc/misc_set.h"(320)
+
+//____________________________________________________________________________
+// parse
+
+template <typename TErrorStream> bool parse(CommandLineParser & me, int argc, const char *argv[], TErrorStream & estream);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1258)
+inline bool parse(CommandLineParser & me, int argc, const char *argv[]);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1419)
+
+//____________________________________________________________________________
+// pop
+
+template <typename TValue, typename TLess> inline void pop (PriorityType<TValue, TLess, PriorityHeap> & me);       	// "projects/library/seqan/misc/priority_type_heap.h"(266)
+
+//____________________________________________________________________________
+// popBack
+
+template <typename TValue, typename TSpec> inline bool popBack(Dequeue<TValue, TSpec> &me);       	// "projects/library/seqan/misc/misc_dequeue.h"(217)
+
+//____________________________________________________________________________
+// popFront
+
+template <typename TValue, typename TSpec> inline bool popFront(Dequeue<TValue, TSpec> &me);       	// "projects/library/seqan/misc/misc_dequeue.h"(200)
+
+//____________________________________________________________________________
+// push
+
+template <typename TValue, typename TLess> inline void push (PriorityType<TValue, TLess, PriorityHeap> & me, TValue const & element);       	// "projects/library/seqan/misc/priority_type_heap.h"(214)
+
+//____________________________________________________________________________
+// pushBack
+
+template <typename TValue, typename TSpec> inline void pushBack(Dequeue<TValue, TSpec> &me, TValue const & _value);       	// "projects/library/seqan/misc/misc_dequeue.h"(269)
+
+//____________________________________________________________________________
+// pushFront
+
+template <typename TValue, typename TSpec> inline void pushFront(Dequeue<TValue, TSpec> &me, TValue const & _value);       	// "projects/library/seqan/misc/misc_dequeue.h"(237)
+
+//____________________________________________________________________________
+// requiredArguments
+
+inline void requiredArguments(CommandLineParser & me, unsigned count);       	// "projects/library/seqan/misc/misc_cmdparser.h"(914)
+
+//____________________________________________________________________________
+// reserve
+
+template <typename TValue, typename TSpec, typename TSize_, typename TExpand> inline typename Size<Dequeue<TValue, TSpec> >::Type reserve(Dequeue<TValue, TSpec> &me, TSize_ new_capacity, Tag<TExpand> const tag);       	// "projects/library/seqan/misc/misc_dequeue.h"(314)
+
+//____________________________________________________________________________
+// rightBoundary
+
+template <typename TValue, typename TCargo> TValue & rightBoundary(IntervalAndCargo<TValue,TCargo> & interval);       	// "projects/library/seqan/misc/misc_interval_tree.h"(484)
+template <typename TValue, typename TCargo> TValue & rightBoundary(PointAndCargo<TValue,TCargo> & point);       	// "projects/library/seqan/misc/misc_interval_tree.h"(607)
+
+//____________________________________________________________________________
+// setHelpText
+
+inline void setHelpText(CommandLineOption & me, CharString const & newHelp);       	// "projects/library/seqan/misc/misc_cmdparser.h"(381)
+
+//____________________________________________________________________________
+// setLongName
+
+inline void setLongName(CommandLineOption & me, CharString const & newName);       	// "projects/library/seqan/misc/misc_cmdparser.h"(304)
+
+//____________________________________________________________________________
+// setOptionType
+
+inline void setOptionType(CommandLineOption & me, const int _newOptionType);       	// "projects/library/seqan/misc/misc_cmdparser.h"(544)
+
+//____________________________________________________________________________
+// setShortName
+
+inline void setShortName(CommandLineOption & me, CharString const & newName);       	// "projects/library/seqan/misc/misc_cmdparser.h"(343)
+
+//____________________________________________________________________________
+// shortHelp
+
+template <typename TStream> inline void shortHelp(CommandLineParser const & me, TStream & target);       	// "projects/library/seqan/misc/misc_cmdparser.h"(984)
+template <typename TStream> inline void shortHelp(CommandLineParser const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(995)
+
+//____________________________________________________________________________
+// shortName
+
+inline CharString & shortName(CommandLineOption & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(322)
+inline const CharString & shortName(CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(327)
+
+//____________________________________________________________________________
+// svgWriteFooter
+
+inline void svgWriteFooter(SVGFile &svg);       	// "projects/library/seqan/misc/misc_svg.h"(155)
+
+//____________________________________________________________________________
+// svgWriteHeader
+
+inline void svgWriteHeader(SVGFile &svg);       	// "projects/library/seqan/misc/misc_svg.h"(120)
+
+//____________________________________________________________________________
+// top
+
+template <typename TValue, typename TLess> inline TValue & top(PriorityType<TValue, TLess, PriorityHeap> & me);       	// "projects/library/seqan/misc/priority_type_heap.h"(140)
+template <typename TValue, typename TLess> inline TValue const & top(PriorityType<TValue, TLess, PriorityHeap> const & me);       	// "projects/library/seqan/misc/priority_type_heap.h"(148)
+
+//____________________________________________________________________________
+// value
+
+template <typename TValue, typename TSpec, typename TPos> inline TValue & value(Dequeue<TValue, TSpec> &me, TPos pos);       	// "projects/library/seqan/misc/misc_dequeue.h"(140)
+template <typename TValue, typename TSpec, typename TPos> inline TValue const & value(Dequeue<TValue, TSpec> const &me, TPos pos);       	// "projects/library/seqan/misc/misc_dequeue.h"(153)
+
+//____________________________________________________________________________
+// version
+
+template <typename TStream> inline void version(CommandLineParser const & me, TStream & target);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1109)
+inline void version(CommandLineParser const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(1115)
+
+//____________________________________________________________________________
+// write
+
+template <typename TStream> inline void write(TStream & target, CommandLineOption const & me);       	// "projects/library/seqan/misc/misc_cmdparser.h"(610)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// length
+
+inline size_t length(LongWord<NativeWidth> const &);       	// "projects/library/seqan/misc/misc_long_word.h"(144)
+template <unsigned LENGTH> size_t length(LongWord<StaticWidth<LENGTH> > const &);       	// "projects/library/seqan/misc/misc_long_word.h"(276)
+size_t length(LongWord<DynamicWidth> const & a);       	// "projects/library/seqan/misc/misc_long_word.h"(622)
+
+//____________________________________________________________________________
+// operator!=
+
+template <unsigned LENGTH> bool operator!=(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(297)
+bool operator!=(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(641)
+
+//____________________________________________________________________________
+// operator&
+
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > operator&(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(390)
+LongWord<DynamicWidth> operator&(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(711)
+
+//____________________________________________________________________________
+// operator&=
+
+inline LongWord<NativeWidth> & operator&=(LongWord<NativeWidth> & x, LongWord<NativeWidth> const & mask);       	// "projects/library/seqan/misc/misc_long_word.h"(164)
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > & operator&=(LongWord<StaticWidth<LENGTH> > & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(402)
+LongWord<DynamicWidth> & operator&=(LongWord<DynamicWidth> & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(701)
+
+//____________________________________________________________________________
+// operator<
+
+template <unsigned LENGTH> bool operator<(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(338)
+bool operator<(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(671)
+
+//____________________________________________________________________________
+// operator<<
+
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > operator<<(LongWord<StaticWidth<LENGTH> > const & a, unsigned shift);       	// "projects/library/seqan/misc/misc_long_word.h"(478)
+LongWord<DynamicWidth> operator<<(LongWord<DynamicWidth> const & a, unsigned shift);       	// "projects/library/seqan/misc/misc_long_word.h"(803)
+
+//____________________________________________________________________________
+// operator<<=
+
+inline LongWord<NativeWidth> & operator<<=(LongWord<NativeWidth> & x, unsigned const shift);       	// "projects/library/seqan/misc/misc_long_word.h"(157)
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > & operator<<=(LongWord<StaticWidth<LENGTH> > & a, unsigned shift);       	// "projects/library/seqan/misc/misc_long_word.h"(487)
+LongWord<DynamicWidth> & operator<<=(LongWord<DynamicWidth> & a, unsigned shift);       	// "projects/library/seqan/misc/misc_long_word.h"(773)
+
+//____________________________________________________________________________
+// operator<=
+
+template <unsigned LENGTH> bool operator<=(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(312)
+bool operator<=(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(647)
+
+//____________________________________________________________________________
+// operator==
+
+template <unsigned LENGTH> bool operator==(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(283)
+bool operator==(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(628)
+
+//____________________________________________________________________________
+// operator>
+
+template <unsigned LENGTH> bool operator>(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(352)
+bool operator>(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(677)
+
+//____________________________________________________________________________
+// operator>=
+
+template <unsigned LENGTH> bool operator>=(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(325)
+bool operator>=(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(659)
+
+//____________________________________________________________________________
+// operator>>
+
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > operator>>(LongWord<StaticWidth<LENGTH> > const & a, unsigned shift);       	// "projects/library/seqan/misc/misc_long_word.h"(438)
+LongWord<DynamicWidth> operator>>(LongWord<DynamicWidth> const & a, unsigned shift);       	// "projects/library/seqan/misc/misc_long_word.h"(766)
+
+//____________________________________________________________________________
+// operator>>=
+
+inline LongWord<NativeWidth> & operator>>=(LongWord<NativeWidth> & x, unsigned const shift);       	// "projects/library/seqan/misc/misc_long_word.h"(150)
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > & operator>>=(LongWord<StaticWidth<LENGTH> > & a, unsigned shift);       	// "projects/library/seqan/misc/misc_long_word.h"(447)
+LongWord<DynamicWidth> & operator>>=(LongWord<DynamicWidth> & a, unsigned shift);       	// "projects/library/seqan/misc/misc_long_word.h"(737)
+
+//____________________________________________________________________________
+// operator^
+
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > operator^(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(414)
+LongWord<DynamicWidth> operator^(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(729)
+
+//____________________________________________________________________________
+// operator^=
+
+inline LongWord<NativeWidth> & operator^=(LongWord<NativeWidth> & x, LongWord<NativeWidth> const & mask);       	// "projects/library/seqan/misc/misc_long_word.h"(178)
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > & operator^=(LongWord<StaticWidth<LENGTH> > & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(426)
+LongWord<DynamicWidth> & operator^=(LongWord<DynamicWidth> & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(719)
+
+//____________________________________________________________________________
+// operator|
+
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > operator|(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(366)
+LongWord<DynamicWidth> operator|(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(693)
+
+//____________________________________________________________________________
+// operator|=
+
+inline LongWord<NativeWidth> & operator|=(LongWord<NativeWidth> & x, LongWord<NativeWidth> const & mask);       	// "projects/library/seqan/misc/misc_long_word.h"(171)
+template <unsigned LENGTH> LongWord<StaticWidth<LENGTH> > & operator|=(LongWord<StaticWidth<LENGTH> > & a, LongWord<StaticWidth<LENGTH> > const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(378)
+LongWord<DynamicWidth> & operator|=(LongWord<DynamicWidth> & a, LongWord<DynamicWidth> const & b);       	// "projects/library/seqan/misc/misc_long_word.h"(683)
+
+//____________________________________________________________________________
+// reset
+
+inline LongWord<NativeWidth> & reset(LongWord<NativeWidth> & x);       	// "projects/library/seqan/misc/misc_long_word.h"(137)
+template <unsigned LENGTH> inline LongWord<StaticWidth<LENGTH> > & reset(LongWord<StaticWidth<LENGTH> > & a);       	// "projects/library/seqan/misc/misc_long_word.h"(266)
+inline LongWord<DynamicWidth> & reset(LongWord<DynamicWidth> & a);       	// "projects/library/seqan/misc/misc_long_word.h"(614)
+
+} //namespace seqan
+//////////////////////////////////////////////////////////////////////////////
+
+namespace std {
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TStream, unsigned LENGTH> TStream & operator<<(TStream & stream, seqan::LongWord<seqan::StaticWidth<LENGTH> > const & a);       	// "projects/library/seqan/misc/misc_long_word.h"(816)
+template <typename TStream> TStream & operator<<(TStream & stream, seqan::LongWord<seqan::DynamicWidth> const & a);       	// "projects/library/seqan/misc/misc_long_word.h"(833)
+
+} //namespace std
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/misc/misc_interval_tree.h b/src/SeqAn-1.3/seqan/misc/misc_interval_tree.h
new file mode 100644
index 0000000..2f37e41
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_interval_tree.h
@@ -0,0 +1,1715 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Anne-Katrin Emde <emde at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MISC_INTERVAL_TREE_H
+#define SEQAN_HEADER_MISC_INTERVAL_TREE_H
+
+#include <seqan/graph_types.h>
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Interval Tree Types
+//////////////////////////////////////////////////////////////////////////////
+
+///---------------------------------------------------------------///
+
+//////////////////// Interval and ID type ///////////////////
+/**
+.Class.IntervalAndCargo:
+..cat:Miscellaneous
+..summary:A simple record type that stores an interval and a cargo value.
+..signature:IntervalAndCargo<TValue, TCargo>
+..param.TValue:The value type, that is the type of the interval borders.
+...default:int.
+...metafunction:Metafunction.Value
+..param.TCargo:The cargo type.
+...default:int.
+...metafunction:Metafunction.Cargo
+..include:seqan/misc/misc_interval_tree.h
+*/
+template<typename TValue = int, typename TCargo = int>
+class IntervalAndCargo
+{
+public:
+    /**
+.Memvar.IntervalAndCargo#i1:
+..class:Class.PointAndCargo
+..summary:The first element in the interval of type i1.
+     */
+	TValue i1;
+
+    /**
+.Memvar.IntervalAndCargo#i2:
+..class:Class.PointAndCargo
+..summary:The last element in the interval of type i2.
+     */
+	TValue i2;
+
+    /**
+.Memvar.IntervalAndCargo#cargo:
+..class:Class.PointAndCargo
+..summary:The stored cargo of type TCargo.
+     */
+	TCargo cargo;
+
+    /**
+.Memfunc.IntervalAndCargo#IntervalAndCargo:
+..signature:IntervalAndCargo()
+     */
+    IntervalAndCargo()
+    {
+SEQAN_CHECKPOINT
+    }
+
+    /**
+.Memfunc.IntervalAndCargo#IntervalAndCargo:
+..class:Class.IntervalAndCargo
+..summary:Constructor.
+..signature:IntervalAndCargo(i1, i2, cargo)
+..param.i1:The first element in the interval, of type TValue.
+..param.i2:The last element in the interval of type TValue.
+..param.cargo:The cargo value of type TCargo.
+     */
+	IntervalAndCargo(TValue i1, TValue i2, TCargo cargo):
+		i1(i1), i2(i2), cargo(cargo)
+	{
+SEQAN_CHECKPOINT
+	}
+};
+
+
+
+/////////////////////// Point and ID type ////////////////
+/**
+.Class.PointAndCargo:
+..cat:Miscellaneous
+..summary:Simple record class storing a point (one-value interval) and a cargo.
+..signature:PointAndCargo<TValue, TCargo>
+..param.TValue:
+...default:int.
+...metafunction:Metafunction.Value
+..param.TCargo:
+...default:int.
+...metafunction:Metafunction.Value
+..include:seqan/misc/misc_interval_tree.h
+*/
+template<typename TValue=int, typename TCargo=int>
+class PointAndCargo {
+public:
+    /**
+.Memvar.PointAndCargo#point:
+..class:Class.PointAndCargo
+..summary:The stored point of type TValue.
+     */
+	TValue point;
+
+    /**
+.Memvar.PointAndCargo#cargo:
+..class:Class.PointAndCargo
+..summary:The stored cargo of type TCargo.
+     */
+	TCargo cargo;
+
+    /**
+.Memfunc.PointAndCargo#PointAndCargo
+..class:Class.PointAndCargo
+..signature:PointAndCargo(point, cargo)
+    */
+	PointAndCargo() {
+SEQAN_CHECKPOINT
+	}
+
+    /**
+.Memfunc.PointAndCargo#PointAndCargo
+..class:Class.PointAndCargo
+..summary:Constructor.
+..signature:PointAndCargo(point, cargo)
+..param.point:
+...summary:The point to store of type TValue.
+..param.cargo:
+...summary:The cargo to store of type TCargo.
+    */
+	PointAndCargo(TValue point, TCargo cargo):
+		point(point), cargo(cargo)
+	{
+SEQAN_CHECKPOINT
+	}
+};
+
+///////////////////////////////////////////////////////////////////////////
+/////////////////////////// IntervalTreeNode	///////////////////////////
+
+/**
+.Tag.IntervalTree Node Types
+..summary:Tags to select the node type for @Class.IntervalTree at .
+..cat:Miscellaneous
+
+..tag.StorePointsOnly:The tree nodes store points.
+..include:seqan/misc/misc_interval_tree.h
+*/
+struct StorePointsOnly {};
+
+
+///..tag.StoreIntervals:The tree nodes store intervals.
+struct StoreIntervals {};
+
+
+/**
+.Class.IntervalTreeNode:
+..cat:Miscellaneous
+..summary:Element of @Class.IntervalTree at .
+..signature:IntervalTreeNode<TInterval, TSpec>
+..param.TInterval:The type of interval to store.
+..param.TSpec:The type of interval to store.
+...default:StorePointsOnly.
+...metafunction:Metafunction.Spec
+..include: seqan/misc/misc_interval_tree.h
+
+.Memvar.IntervalTreeNode#center:
+..class:Class.IntervalTreeNode
+..summary:The center of the interval of type TValue.
+
+.Memvar.IntervalTreeNode#list1
+..class:Class.IntervalTreeNode
+..summary:Sorted list of pointers to intervals, sorted in ascending according to their left boundary points.
+
+.Memvar.IntervalTreeNode#list2
+..class:Class.IntervalTreeNode
+..summary:Sorted list of pointers to intervals, sorted in descending according to their right boundary points.
+ */
+template<typename TInterval, typename TSpec=StorePointsOnly>
+class IntervalTreeNode;
+
+
+/**
+.Spec.Interval Tree Node
+..cat:Miscellaneous
+..general:Class.IntervalTreeNode
+..summary:An Interval Tree Node that stores intervals explicitely in each node.
+..signature:IntervalTreeNode<TInterval, StoreIntervals>
+..param.TInterval:The interval type to store in the node.
+..include:seqan/misc/misc_interval_tree.h
+ */
+template<typename TInterval>
+class IntervalTreeNode<TInterval, StoreIntervals> {
+public:
+	typedef typename Value<TInterval>::Type TValue;
+
+	TValue center;
+	String<TInterval> list1;
+	String<TInterval> list2;
+};
+
+
+/**
+.Spec.Points Only Tree Node
+..cat:Miscellaneous
+..general:Class.IntervalTreeNode
+..summary:Spec for IntervalTreeNode that stores only the relevant point in each node meaning the endpoint of the interval in the list sorted by endpoints (list2) and only the beginpoint of the interval in the list sorted by beginpoints (list1).
+..signature:IntervalTreeNode<TInterval, StorePointsOnly>
+..param.TInterval:The interval type to store in the node.
+..include:seqan/misc/misc_interval_tree.h
+ */
+template<typename TInterval>
+class IntervalTreeNode<TInterval, StorePointsOnly> {
+public:
+	typedef typename Cargo<TInterval>::Type TCargo;
+	typedef typename Value<TInterval>::Type TValue;
+
+	TValue center;
+	String<PointAndCargo<TValue,TCargo> > list1;
+	String<PointAndCargo<TValue,TCargo> > list2;
+
+    /**
+.Memfunc.IntervalTreeNode#IntervalTreeNode:
+..class:Class.IntervalTreeNode
+..summary:Default constructor.
+..signature:IntervalTreeNode()
+     */
+    IntervalTreeNode()
+    {
+SEQAN_CHECKPOINT
+    }
+
+	IntervalTreeNode(IntervalTreeNode const & other):
+		center(other.center),
+		list1(other.list1),
+		list2(other.list2)
+	{
+SEQAN_CHECKPOINT
+	}
+};
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph - Interval Tree
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.IntervalTree:
+..cat:Miscellaneous
+..summary:A datastructure that efficiently stores intervals.
+..signature:IntervalTree<TValue, TCargo>
+..param.TValue:The value type.
+..param.TCargo:The cargo/id type.
+...default:int
+...remarks:If the intervals are not associated with cargos/IDs, they will be numbered consecutively.
+..include:seqan/misc/misc_interval_tree.h
+*/
+template<typename TValue=int, typename TCargo=unsigned int>
+class IntervalTree
+{
+public:
+	typedef Graph<Directed<void,WithoutEdgeId> > TGraph;
+	typedef IntervalAndCargo<TValue,TCargo> TInterval;
+	typedef IntervalTreeNode<TInterval> TNode;
+	typedef String<TNode> TPropertyMap;
+
+	TGraph g;
+	TPropertyMap pm;
+	size_t interval_counter;
+	
+	
+	IntervalTree()
+	{
+SEQAN_CHECKPOINT
+		interval_counter = 0;
+	}
+	
+	/**
+.Memfunc.IntervalTree#IntervalTree
+..class:Class.IntervalTree
+..summary:Constructor
+..signature:IntervalTree(intervalBegins, intervalEnds, intervalCargos, len)
+..param.intervalBegins:Iterator pointing to begin position of first interval.
+..param.intervalEnds:Iterator pointing to end position of first interval.
+..param.intervalCargos:Iterator pointing to cargos/ids for intervals.
+..param.len:Number of intervals to store in tree.
+     */
+	template<typename TIterator,typename TCargoIterator>
+	IntervalTree(TIterator interval_begins,
+				 TIterator interval_ends, 
+				 TCargoIterator interval_cargos, 
+				 size_t len)	
+	{
+SEQAN_CHECKPOINT
+		String<TInterval> intervals;
+		resize(intervals,len);
+		size_t i = 0;
+		while(i<len)
+		{
+			intervals[i].i1 = value(interval_begins);
+			++interval_begins;
+			intervals[i].i2 = value(interval_ends);
+			++interval_ends;
+			intervals[i].cargo = value(interval_cargos);
+			++interval_cargos;
+			++i;
+		}
+		interval_counter = len;
+		
+		createIntervalTree(g,pm,intervals);
+	}
+
+	/**
+..signature:IntervalTree(intervalBegins, intervalEnds, len)
+     */
+	template<typename TIterator>
+	IntervalTree(TIterator interval_begins,
+				 TIterator interval_ends,
+				 size_t len)
+	{
+SEQAN_CHECKPOINT
+		String<TInterval> intervals;
+		resize(intervals,len);
+		size_t i = 0;
+		while(i<len)
+		{
+			intervals[i].i1 = value(interval_begins);
+			++interval_begins;
+			intervals[i].i2 = value(interval_ends);
+			++interval_ends;
+			intervals[i].cargo = i;
+			++i;
+		}
+		interval_counter = len;
+		createIntervalTree(g,pm,intervals);
+	}
+	
+	/**
+..signature:IntervalTree(String<TInterval> intervals)
+     */
+	IntervalTree(String<TInterval> intervals)	
+	{
+SEQAN_CHECKPOINT
+		interval_counter = length(intervals);
+		createIntervalTree(g,pm,intervals);
+	}
+
+	/**
+..signature:IntervalTree(String<TInterval> intervals, Tag<TTagSpec> const tag)
+     */
+	template <typename TTagSpec>
+	IntervalTree(String<TInterval> intervals, Tag<TTagSpec> const tag)
+	{
+SEQAN_CHECKPOINT
+		interval_counter = length(intervals);
+		createIntervalTree(g,pm,intervals,tag);
+	}
+
+    /**
+..signature:IntervalTree(String<TInterval> intervals, TValue center)
+    */
+	IntervalTree(String<TInterval> intervals, TValue center)	
+	{
+SEQAN_CHECKPOINT
+		interval_counter = length(intervals);
+		createIntervalTree(g,pm,intervals,center);
+	}
+};
+
+
+
+///////Specs for the way interval centers are determined
+/**
+.Tag.IntervalTree Centers
+..cat:Miscellaneous
+..summary:Tag to select a specific way to compute the center of an interval tree node.
+..see:Class.IntervalTree
+..include:seqan/misc/misc_interval_tree.h
+ */
+
+
+/**
+..Tag.ComputeCenter
+...summary:For intervals that are more or less uniformly distributed in the value range, using the ComputeCenter tag may result in a more balanced tree compared to using the RandomCenter tag.
+...signature:ComputeCenter
+...remarks:center = minbegin + (maxend-minbegin)/2
+ */
+//template <typename TSpec = SpecPointAndCargo>
+struct TagComputeCenter_;
+typedef Tag<TagComputeCenter_> const ComputeCenter;
+
+
+/**
+..Tag.RandomCenter
+...summary:The RandomCenter tag guarantees that each node contains at least one interval, therefore the size of the tree is limited by the nummer of intervals. This may lead to an unbalanced tree, but is the most space-efficient and in practice the fastest method.
+...signature:RandomCenter
+...remarks:center = center of random interval
+ */
+//template <typename TSpec = SpecPointAndCargo>
+struct TagRandomCenter_;
+typedef Tag<TagRandomCenter_> const RandomCenter;
+
+
+///////////////////////////////////////////////////////////////////////////
+///////////////////// IntervalAndCargo functions //////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+
+
+
+/**
+.Function.leftBoundary:
+..cat:Miscellaneous
+..summary:Access to the right boundary.
+..signature:leftBoundary(interval)
+..param.interval:The interval to return the left boundary for.
+...type:Class.IntervalAndCargo
+..returns:The reference to the left boundary of the interval of type TValue&.
+..see:Function.getLeftBoundary
+..see:Function.rightBoundary
+..see:Function.getRightBoundary
+*/
+template<typename TValue, typename TCargo>
+TValue &
+leftBoundary(IntervalAndCargo<TValue,TCargo> & interval)
+{
+SEQAN_CHECKPOINT
+	return interval.i1;
+}
+
+
+/**
+.Function.rightBoundary:
+..cat:Miscellaneous
+..summary:Access to the right boundary.
+..signature:leftBoundary(interval)
+..param.interval:The interval to return the left boundary for.
+...type:Class.IntervalAndCargo
+..returns:The reference to the right boundary of the interval of type TValue&.
+..see:Function.getRightBoundary
+..see:Function.leftBoundary
+..see:Function.getLeftBoundary
+*/
+template<typename TValue, typename TCargo>
+TValue &
+rightBoundary(IntervalAndCargo<TValue,TCargo> & interval)
+{
+SEQAN_CHECKPOINT
+	return interval.i2;
+}
+
+
+/**
+.Function.getLeftBoundary:
+..cat:Miscellaneous
+..summary:Get method for the left boundary.
+..signature:leftBoundary(interval)
+..param.interval:The interval to return the left boundary for.
+...type:Class.IntervalAndCargo
+..returns:The copy of the left boundary of the interval of type TValue.
+..see:Function.leftBoundary
+..see:Function.getRightBoundary
+..see:Function.rightBoundary
+*/
+template<typename TValue, typename TCargo>
+TValue
+getLeftBoundary(IntervalAndCargo<TValue,TCargo> & interval)
+{
+SEQAN_CHECKPOINT
+	return interval.i1;
+}
+
+
+/**
+.Function.getRightBoundary:
+..cat:Miscellaneous
+..summary:Get method for the right boundary.
+..signature:leftBoundary(interval)
+..param.interval:The interval to return the right boundary for.
+...type:Class.IntervalAndCargo
+..returns:The copy of the right boundary of the interval of type TValue.
+..see:Function.rightBoundary
+..see:Function.getLeftBoundary
+..see:Function.leftBoundary
+*/
+template<typename TValue, typename TCargo>
+TValue
+getRightBoundary(IntervalAndCargo<TValue,TCargo> & interval)
+{
+SEQAN_CHECKPOINT
+	return interval.i2;
+}
+
+
+/**
+.Function.cargo:
+..signature:cargo(me)
+..param.me:
+...type:Class.IntervalAndCargo
+..see:Function.getCargo
+*/
+template<typename TValue, typename TCargo>
+TCargo &
+cargo(IntervalAndCargo<TValue,TCargo> & interval)
+{
+SEQAN_CHECKPOINT
+	return interval.cargo;
+}
+
+/**
+.Function.getCargo:
+..signature:getCargo(me)
+..param.me:
+...type:Class.IntervalAndCargo
+..see:Function.cargo
+*/
+template<typename TValue, typename TCargo>
+TCargo
+getCargo(IntervalAndCargo<TValue,TCargo> & interval)
+{
+SEQAN_CHECKPOINT
+	return interval.cargo;
+}
+
+
+/////////////////// Metafunctions //////////////////////
+    
+///.Metafunction.Value.param.T.type:Class.IntervalAndCargo
+template<typename TValue,typename TCargo>
+struct Value<IntervalAndCargo<TValue,TCargo> >
+{
+	typedef TValue Type;
+};
+
+
+///.Metafunction.Cargo.param.T.type:Class.IntervalAndCargo
+template<typename TValue,typename TCargo>
+struct Cargo<IntervalAndCargo<TValue,TCargo> >
+{
+	typedef TCargo Type;
+};
+
+
+///////////////////////////////////////////////////////////////////////////
+///////////////////// PointAndCargo functions /////////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.leftBoundary:
+..signature:leftBoundary(point)
+..param.point.type:Class.PointAndCargo
+ */
+template<typename TValue, typename TCargo>
+TValue &
+leftBoundary(PointAndCargo<TValue,TCargo> & point)
+{
+SEQAN_CHECKPOINT
+	return point.point;
+}
+
+
+/**
+.Function.rightBoundary:
+..signature:rightBoundary(point)
+..param.point.type:Class.PointAndCargo
+ */
+template<typename TValue, typename TCargo>
+TValue &
+rightBoundary(PointAndCargo<TValue,TCargo> & point)
+{
+SEQAN_CHECKPOINT
+	return point.point;
+}
+
+
+/**
+.Function.getLeftBoundary:
+..signature:getLeftBoundary(point)
+..param.point.type:Class.PointAndCargo
+ */
+template<typename TValue, typename TCargo>
+TValue
+getLeftBoundary(PointAndCargo<TValue,TCargo> & point)
+{
+SEQAN_CHECKPOINT
+	return point.point;
+}
+
+
+/**
+.Function.getRightBoundary:
+..signature:getRightBoundary(point)
+..param.point.type:Class.PointAndCargo
+ */
+template<typename TValue, typename TCargo>
+TValue
+getRightBoundary(PointAndCargo<TValue,TCargo> & point)
+{
+SEQAN_CHECKPOINT
+	return point.point;
+}
+
+
+/**
+.Function.cargo:
+..signature:cargo(point)
+..param.point.type:Class.PointAndCargo
+ */
+template<typename TValue, typename TCargo>
+TCargo &
+cargo(PointAndCargo<TValue,TCargo> & point)
+{
+SEQAN_CHECKPOINT
+	return point.cargo;
+}
+
+
+/**
+.Function.cargo:
+..signature:getCargo(point)
+..param.point:
+...type:Class.IntervalAndCargo
+..see:Function.getCargo
+*/
+template<typename TValue, typename TCargo>
+TCargo
+getCargo(PointAndCargo<TValue,TCargo> & point)
+{
+SEQAN_CHECKPOINT
+	return point.cargo;
+}
+
+
+
+////////////////// Metafunctions //////////////////
+///.Metafunction.Value.param.T.type:Class.PointAndCargo
+template<typename TValue,typename TCargo>
+struct Value<PointAndCargo<TValue,TCargo> >
+{
+	typedef TValue Type;
+};
+
+
+///.Metafunction.Cargo.param.T.type:Class.PointAndCargo
+template<typename TValue,typename TCargo>
+struct Cargo<PointAndCargo<TValue,TCargo> >
+{
+	typedef TCargo Type;
+};
+
+
+//// Comparators
+template <typename TPair>
+bool _less_compI1_ITree(TPair const& p1, TPair const& p2){
+SEQAN_CHECKPOINT
+  return (leftBoundary(const_cast<TPair&>(p1)) < leftBoundary(const_cast<TPair&>(p2)));
+}
+
+
+template <typename TPair>
+bool _greater_compI2_ITree(TPair const& p1, TPair const& p2){
+SEQAN_CHECKPOINT
+  return (rightBoundary(const_cast<TPair&>(p1)) > rightBoundary(const_cast<TPair&>(p2)));
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////
+///////////////////// IntervalTreeNode functions //////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+//internal set functions
+template<typename TValue, typename TInterval>
+void
+_setIntervalTreeNode(IntervalTreeNode<TInterval,StoreIntervals> & knot,TValue center,TInterval & interval)
+{
+SEQAN_CHECKPOINT
+	
+	knot.center = center;
+	appendValue(knot.list1,interval);
+	appendValue(knot.list2,interval);
+
+}
+
+template<typename TInterval>
+void
+_appendIntervalTreeNodeLists(IntervalTreeNode<TInterval,StoreIntervals> & knot,TInterval & interval)
+{
+SEQAN_CHECKPOINT
+	
+	appendValue(knot.list1,interval);
+	appendValue(knot.list2,interval);
+
+}
+
+
+//internal set functions
+template<typename TValue, typename TInterval>
+void
+_setIntervalTreeNode(IntervalTreeNode<TInterval,StorePointsOnly> & knot,TValue center,TInterval & interval)
+{
+SEQAN_CHECKPOINT
+	
+	knot.center = center;
+	appendValue(knot.list1,PointAndCargo<TValue,typename Cargo<TInterval>::Type>(leftBoundary(interval),cargo(interval)));
+	appendValue(knot.list2,PointAndCargo<TValue,typename Cargo<TInterval>::Type>(rightBoundary(interval),cargo(interval)));
+	
+
+}
+
+
+template<typename TInterval>
+void
+_appendIntervalTreeNodeLists(IntervalTreeNode<TInterval,StorePointsOnly> & knot,TInterval & interval)
+{
+SEQAN_CHECKPOINT
+	
+	appendValue(knot.list1,PointAndCargo<typename Value<TInterval>::Type,typename Cargo<TInterval>::Type>(leftBoundary(interval),cargo(interval)));
+	appendValue(knot.list2,PointAndCargo<typename Value<TInterval>::Type,typename Cargo<TInterval>::Type>(rightBoundary(interval),cargo(interval)));
+	
+
+}
+
+/////////////////// Metafunctions ///////////////////////
+///.Metafunction.Value.param.T.type:Class.IntervalTreeNode
+template<typename TInterval, typename TSpec>
+struct Value<IntervalTreeNode<TInterval,TSpec> >
+{
+	typedef typename Value<TInterval>::Type Type;
+};
+
+
+///.Metafunction.Cargo.param.T.type:Class.IntervalTreeNode
+template<typename TInterval, typename TSpec>
+struct Cargo<IntervalTreeNode<TInterval,TSpec> >
+{
+	typedef typename Cargo<TInterval>::Type Type;
+};
+
+
+/**
+.Metafunction.ListType:
+..cat:Miscellaneous
+..signature:ListType<T>::ListType
+..summary:Type of lists in tree nodes.
+..param.T:The type to retrieve the list type for.
+..returns:Returns the type of the the lists in @Class.IntervalTreeNode@ objects.
+..include:seqan/misc/misc_interval_tree.h
+ */
+template<typename T>
+struct ListType;
+
+
+///.Metafunction.ListType.param.T.type:Class.IntervalTreeNode
+template<typename TInterval>
+struct ListType<IntervalTreeNode<TInterval,StorePointsOnly> >
+{
+	typedef String<PointAndCargo<typename Value<TInterval>::Type,typename Cargo<TInterval>::Type> > Type;
+
+};
+
+
+///.Metafunction.ListType.param.T.type:Class.IntervalTreeNode
+template<typename TInterval>
+struct ListType<IntervalTreeNode<TInterval,StoreIntervals> >
+{
+	typedef String<IntervalAndCargo<typename Value<TInterval>::Type,typename Cargo<TInterval>::Type> > Type;
+
+};
+
+
+
+///////////////////////////////////////////////////////////////////////////
+/////////////////////// IntervalTree functions ////////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.createIntervalTree
+..summary:Create an interval tree.
+..cat:Miscellaneous
+..signature:createIntervalTree(TGraph &g, TPropertyMap &pm, TIntervals &intervals, Tag<TSpec> const tag)
+..param.g:DirectedGraph to create interval tree in.
+...type:Class.Graph
+..param.pm:Property map to use for the created interval tree.
+...type:Class.PropertyMap
+..param.intervals:Container of intervals.
+...type:Class.String
+...remark:Should be a String of @Class.Interval@ or @Class.IntervalAndCargo@ objects.
+..param.tag:Tag for tree construction method. @Tag.IntervalTree Centers.Tag.RandomCenter@ or @Tag.IntervalTree Centers. at Tag.ComputeCenter@
+..remark:center of root node is computed by _calcIntervalTreeRootCenter
+..include:seqan/misc/misc_interval_tree.h
+ */
+template<typename TGraph, typename TPropertyMap, typename TIntervals, typename TSpec>
+void 
+createIntervalTree(TGraph & g, 
+				   TPropertyMap & pm, 
+				   TIntervals & intervals,
+				   Tag<TSpec> const tag)
+{
+SEQAN_CHECKPOINT
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Value<TIntervals>::Type TInterval;
+	typedef typename Value<TInterval>::Type TValue;
+
+	reserve(g.data_vertex,length(intervals));
+	reserve(pm,length(intervals));
+
+	TVertexDescriptor root = addVertex(g);
+	resizeVertexMap(g,pm);
+
+    if (length(intervals) > 0u) {
+        TValue center =	_calcIntervalTreeRootCenter(intervals);
+
+        std::sort(begin(intervals),end(intervals),_less_compI1_ITree<TInterval>);
+
+        String<TInterval*> interval_pointers;
+        resize(interval_pointers,length(intervals));
+        _makePointerInterval(intervals,interval_pointers);
+
+        _createIntervalTree(g,pm,interval_pointers,root,(TValue)0.0,center,length(intervals),tag);
+        reserve(pm, length(pm), Exact());
+        reserve(g.data_vertex, length(g.data_vertex), Exact());
+    }
+}
+
+
+/**
+..signature:createIntervalTree(TGraph &g, TPropertyMap &pm, TIntervals &intervals)
+..param.tag.default:Tag.IntervalTree Centers.tag.ComputeCenter
+ */
+// most user friendly interval tree construction for the moment...
+// RandomCenter tag as default construction method
+template<typename TGraph, typename TPropertyMap, typename TIntervals>
+void 
+createIntervalTree(TGraph & g, 
+				   TPropertyMap & pm, 
+				   TIntervals & intervals)
+{
+SEQAN_CHECKPOINT
+	createIntervalTree(g,pm,intervals,RandomCenter());
+}
+
+
+/**
+..signature:createIntervalTree(TGraph &g, TPropertyMap &pm, TIntervals &intervals, center, tag)
+ */
+template<typename TGraph, typename TPropertyMap, typename TIntervals, typename TSpec>
+void 
+createIntervalTree(TGraph & g,
+ TPropertyMap & pm, 
+				   TIntervals & intervals,
+				   typename Value<typename Value<TIntervals>::Type>::Type center,
+				   Tag<TSpec> const tag)
+{
+SEQAN_CHECKPOINT
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Value<TIntervals>::Type TInterval;
+	typedef typename Value<typename Value<TIntervals>::Type>::Type TValue;
+	
+	reserve(g.data_vertex,length(intervals));
+	reserve(pm,length(intervals));
+	
+	TVertexDescriptor root = addVertex(g);
+	resizeVertexMap(g,pm);
+	
+	TInterval a;
+	typename Iterator<TIntervals, Standard>::Type begin_ = begin(intervals);
+	typename Iterator<TIntervals, Standard>::Type end_ = end(intervals);
+	std::sort(begin_, end_ ,_less_compI1_ITree<TInterval>);
+
+	String<TInterval*> interval_pointers;
+	resize(interval_pointers,length(intervals));
+
+	_makePointerInterval(intervals,interval_pointers);
+
+	if(length(intervals)==1)
+		center = (rightBoundary(intervals[0])-leftBoundary(intervals[0]))/(TValue)2.0;
+
+	_createIntervalTree(g,pm,interval_pointers,root,(TValue)0.0,center,length(intervals),tag);
+		
+	reserve(pm, length(pm), Exact());
+	reserve(g.data_vertex, length(g.data_vertex), Exact());
+
+}
+
+/**
+..signature:createIntervalTree(TGraph &g, TPropertyMap &pm, TIntervals &intervals, center)
+ */
+// RandomCenter tag as default construction method
+template<typename TGraph, typename TPropertyMap, typename TIntervals>
+void 
+createIntervalTree(TGraph & g, TPropertyMap & pm, 
+				   TIntervals & intervals, 
+				   typename Value<typename Value<TIntervals>::Type>::Type center)
+{
+SEQAN_CHECKPOINT
+	createIntervalTree(g,pm,intervals,center,RandomCenter());
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//remembers minimum and maximum of point values in intervals and sets the center
+//of each node to min+(max-min)/2
+template<typename TGraph, typename TPropertyMap, typename TIntervalPointer, typename TValue>
+void 
+_createIntervalTree(TGraph & g, TPropertyMap & pm, 
+				   String<TIntervalPointer*> & intervals,
+				   typename VertexDescriptor<TGraph>::Type & knot, 
+				   TValue, 
+				   TValue center, 
+				   typename VertexDescriptor<TGraph>::Type len,
+				   Tag<TagComputeCenter_> const tag)
+{
+SEQAN_CHECKPOINT
+	//  Rekursionsanker
+	if(len==1){
+		_setIntervalTreeNode(value(pm,knot),center,*intervals[0]);
+		return;
+	}
+
+	typedef typename Value<TPropertyMap>::Type TNode;
+	typedef typename ListType<TNode>::Type TList;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef String<TIntervalPointer*> TIntervalPointers;
+
+	// one list of interval pointers for the intervals to the left of center
+	TIntervalPointers S_left;
+	// one list of interval pointers for the intervals to the right of center
+	TIntervalPointers S_right;
+
+	TValue min1 = maxValue<TValue>();
+	TValue min2 = maxValue<TValue>();
+	TValue max1 = minValue<TValue>();
+	TValue max2 = minValue<TValue>();
+
+	value(pm,knot).center = center;
+	
+ 
+	typedef typename Iterator<TIntervalPointers,Standard>::Type TIntervalIterator;
+	TIntervalIterator it = begin(intervals,Standard());
+	TIntervalIterator it_end = end(intervals,Standard());
+	
+	// walk through intervals
+	while(it != it_end)
+	{
+		// interval belongs to the left list
+		if((**it).i2<=center)
+		{
+			appendValue(S_left,*it, Generous());
+			 //remember right most and left most point in left list
+			if((**it).i2 > max1)
+				max1 = (**it).i2;
+			if((**it).i1 < min1)
+				min1 = (**it).i1;
+		}
+		else
+		{
+			// interval belongs to the right list
+			if((**it).i1>center)
+			{
+				appendValue(S_right,(*it), Generous());
+				 //remember right most and left most point in right list
+				if((**it).i2 > max2)
+					max2 = (**it).i2;
+				if ((**it).i1 < min2)
+					min2 = (**it).i1;
+			}
+			else // interval belongs to this node
+			{
+				_appendIntervalTreeNodeLists(value(pm,knot),**it);
+			}
+		}
+        ++it;
+	}
+
+//	std::sort(begin(value(pm,knot).list1),end(value(pm,knot).list1),_less_compI1_ITree<typename Value<TList>::Type>);
+	std::sort(begin(value(pm,knot).list2),end(value(pm,knot).list2),_greater_compI2_ITree<typename Value<TList>::Type>);
+
+	// build subtree to the left
+	if(!empty(S_left))
+	{
+		TVertexDescriptor vd = addVertex(g);
+		resize(pm, vd+1); 
+		addEdge(g,knot,vd);
+		_createIntervalTree(g,pm,S_left,vd,center,min1+(max1-min1)/2,length(S_left),tag);
+	}
+	// build subtree to the right
+	if(!empty(S_right))
+	{
+		TVertexDescriptor vd = addVertex(g);
+		resize(pm, vd+1); 
+		addEdge(g,knot,vd);
+		_createIntervalTree(g,pm,S_right,vd,center,min2+(max2-min2)/2,length(S_right),tag);
+	}
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//createIntervalTree for all specs except CompCenter, the center value of each 
+//node is determined by functions _calcIntervalTreeNodeCenterLeft and 
+//_calcIntervalTreeNodeCenterRight
+template<typename TGraph, typename TPropertyMap, typename TSpec, typename TInterval, typename TValue>
+void 
+_createIntervalTree(TGraph & g, TPropertyMap & pm, 
+				   String<TInterval*> & intervals, 
+				   typename VertexDescriptor<TGraph>::Type & knot, 
+				   TValue last_center, TValue center, 
+				   typename VertexDescriptor<TGraph>::Type len,
+				   Tag<TSpec> const tag)
+{
+SEQAN_CHECKPOINT
+	// Rekursionsanker
+	if(len==1){
+		_setIntervalTreeNode(value(pm,knot),center,*value(intervals,0));
+		return;
+	}
+
+	typedef typename Value<TPropertyMap>::Type TNode;
+	typedef typename ListType<TNode>::Type TList;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef String<TInterval*> TIntervalPointers;
+	
+	// one list of interval pointers for the intervals to the left of center
+	TIntervalPointers S_left;
+	// one list of interval pointers for the intervals to the right of center
+	TIntervalPointers S_right;
+		
+	value(pm,knot).center = center;
+	
+	typedef typename Iterator<TIntervalPointers,Standard>::Type TIntervalIterator;
+	TIntervalIterator it = begin(intervals,Standard());
+	TIntervalIterator it_end = end(intervals,Standard());
+	
+	// walk through intervals
+	while(it != it_end)
+	{
+		// interval belongs to the left list
+		if((**it).i2<=center)
+		{
+			appendValue(S_left,*it, Generous());
+		}
+		else
+		{	// interval belongs to the right list
+			if((**it).i1>center)
+			{
+				appendValue(S_right,(*it), Generous());
+			}
+			else
+			{
+				// interval belongs to the current node
+				_appendIntervalTreeNodeLists(value(pm,knot),**it);
+			}
+		}
+        ++it;
+	}
+
+//	std::sort(begin(value(pm,knot).list1),end(value(pm,knot).list1),_less_compI1_ITree<typename Value<TList>::Type>);
+	std::sort(begin(value(pm,knot).list2),end(value(pm,knot).list2),_greater_compI2_ITree<typename Value<TList>::Type>);
+
+	// build subtree to the left
+	if(!empty(S_left))
+	{
+		TVertexDescriptor vd = addVertex(g);
+		resizeVertexMap(g,pm);
+		addEdge(g,knot,vd);
+		TValue next_center = _calcIntervalTreeNodeCenterLeft(S_left,last_center,center,tag);
+		_createIntervalTree(g,pm,S_left,vd,center,next_center,length(S_left),tag);
+	}
+	// build subtree to the right
+	if(!empty(S_right))
+	{
+		TVertexDescriptor vd = addVertex(g);
+		resizeVertexMap(g,pm);
+		addEdge(g,knot,vd);
+		TValue next_center = _calcIntervalTreeNodeCenterRight(S_right,last_center,center,tag);
+		_createIntervalTree(g,pm,S_right,vd,center,next_center,length(S_right),tag);
+	}
+}
+
+
+// fill the container interval_pointers with pointers to the corresponding objects in intervals.
+// this is done to avoid copying and passing the whole IntervalAndCargo objects during interval tree construction
+template<typename TIntervals, typename TIntervalPointers>
+void
+_makePointerInterval(TIntervals & intervals,TIntervalPointers & interval_pointers)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TIntervalPointers>::Type TIntervalPointer;
+	typedef typename Iterator<TIntervalPointers, Rooted>::Type TIntervalPointerIterator;
+
+	TIntervalPointer it;
+	TIntervalPointerIterator iit = begin(interval_pointers);
+	if(length(intervals)>0)
+		for(it = &intervals[0]; it <= &intervals[length(intervals)-1]; ++it)
+		{
+			*iit = it;	
+			++iit;
+		}
+
+}
+
+
+
+
+//the RandomCenter spec way of chosing center values:
+//pick a random interval from the list and take its center as the center value 
+//for the left child node (during interval tree construction)
+template<typename TIntervals, typename TValue>
+TValue
+_calcIntervalTreeNodeCenterLeft(TIntervals & intervals, TValue &, TValue &, Tag<TagRandomCenter_> const)
+{
+SEQAN_CHECKPOINT
+	TValue rand_index = rand()%length(intervals);  
+	return (rightBoundary(*value(intervals,rand_index))+leftBoundary(*value(intervals,rand_index)))/(TValue)2.0;
+}
+
+//the RandomCenter spec way of chosing center values:
+//pick a random interval from the list and take its center as the center value 
+//for the right child node (during interval tree construction)
+template<typename TIntervals, typename TValue>
+TValue
+_calcIntervalTreeNodeCenterRight(TIntervals & intervals, TValue &, TValue &, Tag<TagRandomCenter_> const)
+{
+SEQAN_CHECKPOINT
+	TValue rand_index = rand()%length(intervals);  
+	return (rightBoundary(*value(intervals,rand_index))+leftBoundary(*value(intervals,rand_index)))/(TValue)2.0;
+}
+
+
+// if the center of the root is not given, it is placed in the "ComputeCenter way": in the middle of minValue and maxValue
+// where minValue is the minimum left boundary and maxValue is the maximum right boundary of all intervals
+template<typename TIntervals>
+typename Value<typename Value<TIntervals>::Type>::Type
+_calcIntervalTreeRootCenter(TIntervals & intervals)
+{
+    SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_GT(length(intervals), 0u);
+	
+	typedef typename Value<typename Value<TIntervals>::Type>::Type TValue;
+	typedef typename Iterator<TIntervals,Standard>::Type TIntervalIterator;
+
+	TIntervalIterator it = begin(intervals);
+	TIntervalIterator it_end = end(intervals);
+
+	TValue min = maxValue<TValue>();
+	TValue max = minValue<TValue>();
+
+	while(it != it_end)
+	{
+		if(leftBoundary(*it)<min) min = leftBoundary(*it);
+		if(rightBoundary(*it)>max) max = rightBoundary(*it);
+	  SEQAN_ASSERT_LEQ(min, max);
+		++it;
+	}
+
+	SEQAN_ASSERT_LEQ(min, max);
+	
+	return (min+(max-min)/(TValue)2.0);
+
+}
+
+
+
+/**
+.Function.addInterval
+..cat:Miscellaneous
+..signature:addInterval(graph, propertyMap, interval)
+..param.graph:The directed graph that contains the topography of the interval tree.
+..param.propertyMap:The property map containing the node properties of the interval tree.
+..param.interval:The interval to be added to the interval tree.
+..summary:Adds an interval to an interval tree.
+..include:seqan/misc/misc_interval_tree.h
+*/
+template<typename TGraph, typename TPropertyMap, typename TInterval>
+void
+addInterval(TGraph & g, TPropertyMap & pm, TInterval interval)
+{
+SEQAN_CHECKPOINT
+
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Value<TPropertyMap>::Type TProperty;
+	typedef typename Value<TInterval>::Type TValue;
+	typedef typename ListType<TProperty>::Type TList;
+	
+
+	if(empty(pm))
+	{
+		TVertexDescriptor vd = addVertex(g);
+		resizeVertexMap(g,pm);
+		_setIntervalTreeNode(property(pm,vd),(rightBoundary(interval)+leftBoundary(interval))/2,interval);
+		return;
+		
+	}
+	// start at root
+	TVertexDescriptor act_knot = 0;
+	TProperty act_prop = property(pm,act_knot);
+	TProperty next_prop;
+		
+	while(true)
+	{
+		TOutEdgeIterator it(g, act_knot);
+		act_prop = property(pm,act_knot);
+		if(act_prop.center < leftBoundary(interval))
+		{
+			if(atEnd(it)){
+				TVertexDescriptor vd = addVertex(g);
+				resizeVertexMap(g,pm);
+				addEdge(g,act_knot,vd);
+				_setIntervalTreeNode(property(pm,vd),(rightBoundary(interval)+leftBoundary(interval))/(TValue)2.0,interval);
+				break;
+			}
+			else{
+				next_prop = property(pm,targetVertex(it));
+				if(next_prop.center <= act_prop.center)
+				{
+					goNext(it);
+					if(atEnd(it)){
+						TVertexDescriptor vd = addVertex(g);
+						resizeVertexMap(g,pm);
+						addEdge(g,act_knot,vd);
+						_setIntervalTreeNode(property(pm,vd),(rightBoundary(interval)+leftBoundary(interval))/(TValue)2.0,interval);
+						break;
+					}
+				}
+			}
+			act_knot = targetVertex(it);
+		}
+		else{
+			if(rightBoundary(interval) <= act_prop.center)
+			{
+				if(atEnd(it)){
+					TVertexDescriptor vd = addVertex(g);
+					resizeVertexMap(g,pm);
+					addEdge(g,act_knot,vd);
+					_setIntervalTreeNode(property(pm,vd),(rightBoundary(interval)+leftBoundary(interval))/2,interval);
+					break;
+				}
+				else
+				{
+					next_prop = property(pm,targetVertex(it));
+					if(next_prop.center >= act_prop.center)
+					{
+						goNext(it);
+						if(atEnd(it)){
+							TVertexDescriptor vd = addVertex(g);
+							resizeVertexMap(g,pm);
+							addEdge(g,act_knot,vd);
+							_setIntervalTreeNode(property(pm,vd),(rightBoundary(interval)+leftBoundary(interval))/2,interval);
+							break;
+						}
+					}
+				}
+				act_knot = targetVertex(it);
+			}
+			else{
+				_appendIntervalTreeNodeLists(property(pm, act_knot),interval);
+				std::sort(begin(property(pm,act_knot).list1),end(property(pm,act_knot).list1),_less_compI1_ITree<typename Value<TList>::Type>);
+				std::sort(begin(property(pm,act_knot).list2),end(property(pm,act_knot).list2),_greater_compI2_ITree<typename Value<TList>::Type>);
+				break;
+			}
+		}
+	}
+
+}
+
+
+/**
+..signature:addInterval(intervalTree, interval)
+..param.intervalTree:The interval tree to add the interval to.
+...type:Class.IntervalTree
+ */
+template<typename TValue, typename TCargo, typename TInterval>
+void
+addInterval(IntervalTree<TValue,TCargo> & itree, TInterval interval)
+{
+SEQAN_CHECKPOINT
+
+	++itree.interval_counter;
+	addInterval(itree.g,itree.pm,interval);
+
+}
+
+
+// TODO(holtgrewe): Is this begin/end in C++ style or is it first/last?
+/**
+..signature:addInterval(intervalTree, begin, end, cargo)
+..param.begin:Begin position of interval of type TValue.
+..param.end:End position of interval of type TValue.
+..param.cargo:Cargo to attach to the interval.
+ */
+template<typename TValue, typename TCargo>
+void
+addInterval(IntervalTree<TValue,TCargo> & itree, TValue begin, TValue end, TCargo cargo)
+{
+SEQAN_CHECKPOINT
+
+	IntervalAndCargo<TValue,TCargo> interval;
+	interval.i1 = begin;
+	interval.i2 = end;
+	interval.cargo = cargo;
+	++itree.interval_counter;
+	addInterval(itree.g,itree.pm,interval);
+
+}
+
+
+/**
+..signature:addInterval(intervalTree, begin, end)
+ */
+template<typename TValue, typename TCargo>
+void
+addInterval(IntervalTree<TValue,TCargo> & itree, TValue begin, TValue end)
+{
+SEQAN_CHECKPOINT
+
+	IntervalAndCargo<TValue,TCargo> interval;
+	interval.i1 = begin;
+	interval.i2 = end;
+	interval.cargo = itree.interval_counter;
+	++itree.interval_counter;
+	addInterval(itree.g,itree.pm,interval);
+
+}
+
+
+/**
+.Function.findIntervals
+..summary:Find all intervals that contain the query point or overlap with the query interval.
+..signature:findIntervals(graph, propertyMap, query, result)
+..param.query:A query point.
+..include:seqan/misc/misc_interval_tree.h
+*/
+template<typename TGraph, typename TPropertyMap, typename TValue,typename TCargo>
+void
+findIntervals(TGraph & g, TPropertyMap & pm, TValue query, String<TCargo> & result)
+{
+SEQAN_CHECKPOINT
+
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Value<TPropertyMap>::Type TProperty;
+	typedef typename Value<TProperty>::Type    TPropertyValue;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+
+	resize(result,0);
+
+	// start at root
+	TVertexDescriptor act_knot = 0;
+	TProperty act_prop = property(pm,act_knot);
+	TProperty next_prop;
+		
+	while(true)
+	{
+		TOutEdgeIterator it(g, act_knot);
+		act_prop = property(pm,act_knot);
+		if(act_prop.center < (TPropertyValue)query)
+		{
+			unsigned int i = 0;
+			while(i < length(act_prop.list2) && rightBoundary(value(act_prop.list2,i)) > (TPropertyValue)query)
+			{
+				appendValue(result,cargo(value(act_prop.list2,i)), Generous());
+				++i;	
+			}
+			if(atEnd(it)) break;
+			else{
+				next_prop = property(pm,targetVertex(it));
+				if(next_prop.center <= act_prop.center)
+				{
+					goNext(it);
+					if(atEnd(it)) break;
+				}
+			}
+			act_knot = targetVertex(it);
+		}
+		else{
+			if((TPropertyValue)query < act_prop.center)
+			{
+				unsigned int i = 0;
+				while(i < length(act_prop.list1) && leftBoundary(value(act_prop.list1,i)) <= (TPropertyValue)query)
+				{
+					appendValue(result,cargo(value(act_prop.list1,i)), Generous());
+					++i;
+				}
+				if(atEnd(it)) break;
+				else
+				{
+					next_prop = property(pm,targetVertex(it));
+					if(next_prop.center >= act_prop.center)
+					{
+						goNext(it);
+						if(atEnd(it)) break;
+					}
+				}
+				act_knot = targetVertex(it);
+			}
+			else{
+				for(unsigned int i = 0; i < length(act_prop.list1); ++i)
+                    appendValue(result, cargo(value(act_prop.list1,i)), Generous());
+				break;
+			}
+		}
+	}
+
+}
+
+
+/**
+..signature:findIntervals(intervalTree, query, result)
+..param.intervalTree:An interval tree
+...type:Class.IntervalTree
+*/
+template<typename TValue,typename TCargo>
+void
+findIntervals(IntervalTree<TValue,TCargo> & it, TValue query, String<TCargo> & result)
+{
+SEQAN_CHECKPOINT
+
+	findIntervals(it.g,it.pm,query,result);
+
+}
+
+
+/**
+.Function.findIntervalsExcludeTouching
+..cat:Miscellaneous
+..summary::Find all intervals that contain the query point, exclude intervals that touch the query, i.e. where the query point equals the start or end point.
+..signature:findIntervalsExcludeTouching(graph, propertyMap, query, result)
+..param.graph:The directed graph that contains the topography of the interval tree.
+..param.propertyMap:The property map containing the node properties of the interval tree
+..param.query:The TValue to query here.
+..param.result:The resulting string of cargos/ids of the intervals that contain the query point.
+...type:Class.String
+...remark:Should be a string of TCargo.
+..include:seqan/misc/misc_interval_tree.h
+ */
+template<typename TGraph, typename TPropertyMap, typename TValue,typename TCargo>
+void
+findIntervalsExcludeTouching(TGraph & g, TPropertyMap & pm, TValue query, String<TCargo> & result)
+{
+SEQAN_CHECKPOINT
+
+	typedef typename Iterator<TGraph, OutEdgeIterator >::Type TOutEdgeIterator;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Value<TPropertyMap>::Type TProperty;
+	
+	resize(result,0);
+
+	// start at root
+	TVertexDescriptor act_knot = 0;
+	TProperty act_prop = property(pm,act_knot);
+	TProperty next_prop;
+		
+	while(true)
+	{
+		TOutEdgeIterator it(g, act_knot);
+		act_prop = property(pm,act_knot);
+		if( (TValue) act_prop.center < query)
+		{
+			int i = 0;
+			while(i < (int) length(act_prop.list2) && (TValue) rightBoundary(value(act_prop.list2,i)) > query)
+			{
+				appendValue(result,cargo(value(act_prop.list2,i)), Generous());
+				++i;	
+			}
+			if(atEnd(it)) break;
+			else{
+				next_prop = property(pm,targetVertex(it));
+				if(next_prop.center <= act_prop.center)
+				{
+					goNext(it);
+					if(atEnd(it)) break;
+				}
+			}
+			act_knot = targetVertex(it);
+		}
+		else{
+			if(query < (TValue) act_prop.center)
+			{
+				int i = 0;
+				while(i < (int) length(act_prop.list1) && (TValue) leftBoundary(value(act_prop.list1,i)) < query)
+				{
+					appendValue(result,cargo(value(act_prop.list1,i)), Generous());
+					++i;
+				}
+				if(atEnd(it)) break;
+				else
+				{
+					next_prop = property(pm,targetVertex(it));
+					if(next_prop.center >= act_prop.center)
+					{
+						goNext(it);
+						if(atEnd(it)) break;
+					}
+				}
+				act_knot = targetVertex(it);
+			}
+			else{
+				int i = 0;
+				while(i < (int) length(act_prop.list1) && (TValue) leftBoundary(value(act_prop.list1,i)) < query)
+				{
+					appendValue(result,cargo(value(act_prop.list1,i)), Generous());
+					++i;
+				}
+				break;
+			}
+		}
+	}
+
+}
+
+
+/**
+..signature:findIntervalsExcludeTouching(intervalTree, query, result)
+..param.intervalTree:An interval tree
+...type:Class.IntervalTree
+*/
+template<typename TValue,typename TCargo>
+void
+findIntervalsExcludeTouching(IntervalTree<TValue,TCargo> & tree, TValue query, String<TCargo> & result)
+{
+SEQAN_CHECKPOINT
+
+	findIntervalsExcludeTouching(tree.g,tree.pm,query,result);
+
+}
+
+
+
+
+/**
+.Function.findIntervals
+..signature:findIntervals(intervalTree, query_begin, query_end, result)
+..param.query_begin:The begin position of the query interval.
+..param.query_end:The end position of the query interval.
+*/
+template<typename TValue,typename TCargo>
+void
+findIntervals(IntervalTree<TValue,TCargo> & tree, TValue query_begin, TValue query_end, String<TCargo> & result)
+{
+SEQAN_CHECKPOINT
+
+	findIntervals(tree.g,tree.pm,query_begin,query_end,result);
+
+}
+
+
+
+template<typename TGraph, typename TPropertyMap, typename TValue,typename TCargo>
+void
+findIntervals(TGraph & g, TPropertyMap & pm, TValue query_begin, TValue query_end, String<TCargo> & result)
+{
+SEQAN_CHECKPOINT
+
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Value<TPropertyMap>::Type TProperty;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+
+	resize(result,0);
+
+	// start at root
+	TVertexDescriptor act_knot = 0;
+	findIntervals(g, pm, act_knot, query_begin, query_end, result);
+}
+
+
+template<typename TGraph, typename TPropertyMap, typename TValue,typename TCargo>
+void
+findIntervals(TGraph & g, 
+			  TPropertyMap & pm, 
+			  typename VertexDescriptor<TGraph>::Type & act_knot, 
+			  TValue query_begin, 
+			  TValue query_end, 
+			  String<TCargo> & result)
+{
+SEQAN_CHECKPOINT
+
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Value<TPropertyMap>::Type TProperty;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+
+	TProperty act_prop = property(pm,act_knot);
+	TProperty next_prop;
+		
+	while(true)
+	{
+		TOutEdgeIterator it(g, act_knot);
+		act_prop = property(pm,act_knot);
+		//
+		if(act_prop.center < query_begin) // query interval is to the right of node center
+		{
+			unsigned int i = 0;
+			while(i < length(act_prop.list2) && rightBoundary(value(act_prop.list2,i)) > query_begin)
+			{
+				appendValue(result,cargo(value(act_prop.list2,i)), Generous());
+				++i;	
+			}
+			if(atEnd(it)) break;
+			else{
+				next_prop = property(pm,targetVertex(it));
+				if(next_prop.center <= act_prop.center)
+				{
+					goNext(it);
+					if(atEnd(it)) break;
+				}
+			}
+			act_knot = targetVertex(it);
+		}
+		else{
+			if(query_end < act_prop.center) // query interval is to the left of node center
+			{
+				unsigned int i = 0;
+				while(i < length(act_prop.list1) && leftBoundary(value(act_prop.list1,i)) < query_end)
+				{
+					appendValue(result,cargo(value(act_prop.list1,i)), Generous());
+					++i;
+				}
+				if(atEnd(it)) break;
+				else
+				{
+					next_prop = property(pm,targetVertex(it));
+					if(next_prop.center >= act_prop.center)
+					{
+						goNext(it);
+						if(atEnd(it)) break;
+					}
+				}
+				act_knot = targetVertex(it);
+			}
+			else{//node center is contained in query interval
+				for(unsigned int i = 0; i < length(act_prop.list1); ++i)
+                    appendValue(result, cargo(value(act_prop.list1,i)), Generous());
+				
+				while(!atEnd(it))
+				{
+					TVertexDescriptor next_knot = targetVertex(it);
+					findIntervals(g,pm, next_knot, query_begin, query_end, result);
+					goNext(it);
+				}
+				break;
+
+				//break; //dont break! continue in both subtrees!!
+			}
+		}
+	}
+
+}
+
+
+
+/////////////////// Metafunctions ///////////////////////
+
+///.Metafunction.Value.param.T.type:Class.IntervalTree
+template<typename TValue, typename TCargo>
+struct Value<IntervalTree<TValue,TCargo> >
+{
+	typedef TValue Type;
+};
+
+
+///.Metafunction.Cargo.param.T.type:Class.IntervalTree
+template<typename TValue, typename TCargo>
+struct Cargo<IntervalTree<TValue,TCargo> >
+{
+	typedef TCargo Type;
+};
+
+}  // namespace SEQAN_NAMESPACE_MAIN
+
+#endif  //#ifndef SEQAN_MISC_INTERVAL_TREE_H
diff --git a/src/SeqAn-1.3/seqan/misc/misc_long_word.h b/src/SeqAn-1.3/seqan/misc/misc_long_word.h
new file mode 100644
index 0000000..c3a76a0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_long_word.h
@@ -0,0 +1,850 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// State: Tested but not used in real code.
+// ==========================================================================
+// Implementation of the LongWord class.  It provides an almost
+// transparent interface to arbitrarily long words.  In contrast to
+// std::bitset, it provides a specialization that allows to set the
+// number of bits in the virtual word at runtime.
+// ==========================================================================
+
+// TODO(holtgrew): This should probably not be called LongWord, maybe BitSet/BitVector/BitString is more appropriate?
+// TODO(holtgrew): Optimize implementation of operator>>(TWord, 1) and operator<<(TWord, 1).
+// TODO(holtgrew): Optimized implementation of value(TWord, index), operator[] always seems to call the proxy version!
+
+#ifndef SEQAN_MISC_MISC_LONG_WORD_H_
+#define SEQAN_MISC_MISC_LONG_WORD_H_
+
+namespace seqan {
+
+// TODO(holtgrew): Document this.
+template <typename TSpec>
+struct LongWord;
+
+
+template <typename TWord, typename TSpec>
+struct LongWordBitProxy;
+
+
+struct _NativeWidth;
+typedef Tag<_NativeWidth> NativeWidth;
+
+
+struct _NativeWideWidth;
+typedef Tag<_NativeWideWidth> NativeWideWidth;
+
+
+struct DynamicWidth_;
+typedef Tag<DynamicWidth_> DynamicWidth;
+
+
+template <unsigned LENGTH>
+struct StaticWidth;
+
+
+template <typename TWord>
+struct LongWordBitProxy<TWord, NativeWidth> {
+    TWord &_word;
+    unsigned _bitIndex;
+
+    LongWordBitProxy(TWord & word, unsigned bitIndex)
+            : _word(word), _bitIndex(bitIndex) {
+        SEQAN_CHECKPOINT;
+    }
+
+    LongWordBitProxy & operator=(unsigned x) {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LT(x, sizeof(unsigned) * 8);
+        _word._value = (_word._value ^ (1 << _bitIndex)) | (x << _bitIndex);
+        return *this;
+    }
+
+    operator unsigned() const {
+        return (_word & (1u << _bitIndex)) >> _bitIndex;
+    }
+};
+
+
+// Forward declaration.
+inline LongWord<NativeWidth> & reset(LongWord<NativeWidth> & x);
+
+
+template <>
+struct LongWord<NativeWidth> {
+    typedef LongWord<NativeWidth> TWord;
+    unsigned _value;
+
+    LongWord() {
+        SEQAN_CHECKPOINT;
+        reset(*this);
+    }
+
+    LongWord(unsigned const & value) : _value(value) {
+        SEQAN_CHECKPOINT;
+    }
+
+    // Conversion operators must be member functions.
+    operator unsigned() const {
+        SEQAN_CHECKPOINT;
+        return _value;
+    }
+
+    unsigned operator[](unsigned index) const {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LT(index, sizeof(unsigned) * 8);
+        return (_value & (1u << index)) >> index;
+    }
+
+    LongWordBitProxy<TWord, NativeWidth> operator[](unsigned index) {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LT(index, sizeof(unsigned) * 8);
+        return LongWordBitProxy<TWord, NativeWidth>(*this, index);
+    }
+};
+
+
+inline LongWord<NativeWidth> & reset(LongWord<NativeWidth> & x) {
+    SEQAN_CHECKPOINT;
+    x._value = 0u;
+    return x;
+}
+
+
+inline size_t length(LongWord<NativeWidth> const &) {
+    SEQAN_CHECKPOINT;
+    return sizeof(unsigned) * 8;
+}
+
+
+inline LongWord<NativeWidth> & operator>>=(LongWord<NativeWidth> & x, unsigned const shift) {
+    SEQAN_CHECKPOINT;
+    x._value >>= shift;
+    return x;
+}
+
+
+inline LongWord<NativeWidth> & operator<<=(LongWord<NativeWidth> & x, unsigned const shift) {
+    SEQAN_CHECKPOINT;
+    x._value <<= shift;
+    return x;
+}
+
+
+inline LongWord<NativeWidth> & operator&=(LongWord<NativeWidth> & x, LongWord<NativeWidth> const & mask) {
+    SEQAN_CHECKPOINT;
+    x._value &= mask;
+    return x;
+}
+
+
+inline LongWord<NativeWidth> & operator|=(LongWord<NativeWidth> & x, LongWord<NativeWidth> const & mask) {
+    SEQAN_CHECKPOINT;
+    x._value |= mask;
+    return x;
+}
+
+
+inline LongWord<NativeWidth> & operator^=(LongWord<NativeWidth> & x, LongWord<NativeWidth> const & mask) {
+    SEQAN_CHECKPOINT;
+    x._value ^= mask;
+    return x;
+}
+
+
+template <>
+struct LongWord<NativeWideWidth> {
+};
+
+
+template <typename TWord, unsigned LENGTH>
+struct LongWordBitProxy<TWord, StaticWidth<LENGTH> > {
+    TWord &_word;
+    unsigned _bitIndex;
+
+    LongWordBitProxy(TWord & word, unsigned bitIndex)
+            : _word(word), _bitIndex(bitIndex) {
+        SEQAN_CHECKPOINT;
+    }
+
+    LongWordBitProxy & operator=(unsigned x) {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LT(x, LENGTH);
+        unsigned & block = _word._data[TWord::UNSIGNED_COUNT - 1 - _bitIndex / BitsPerValue<unsigned>::VALUE];
+        unsigned bitIndex = _bitIndex % BitsPerValue<unsigned>::VALUE;
+        block = (block ^ (1 << bitIndex)) | (x << bitIndex);
+        return *this;
+    }
+
+    operator unsigned() const {
+        SEQAN_CHECKPOINT;
+        unsigned const & block = _word._data[TWord::UNSIGNED_COUNT - 1 - _bitIndex / BitsPerValue<unsigned>::VALUE];
+        unsigned bitIndex = _bitIndex % BitsPerValue<unsigned>::VALUE;
+//         std::cerr << "LongWordBitProxy<... StaticWidth<" << LENGTH << "> >" << std::endl;
+//         std::cerr << "  _word      = " << _word << std::endl;
+//         std::cerr << "  _bitIndex  = " << _bitIndex << std::endl;
+//         std::cerr << "  block      = " << block << std::endl;
+//         std::cerr << "  bitIndex   = " << bitIndex << std::endl;
+//         std::cerr << "  (block & (1 << bitIndex)) >> bitIndex = " << ((block & (1 << bitIndex)) >> bitIndex) << std::endl;
+//         std::cerr << std::endl;
+        return (block & (1 << bitIndex)) >> bitIndex;
+    }
+};
+
+
+template <unsigned LENGTH>
+struct LongWord<StaticWidth<LENGTH> > {
+    typedef LongWord<StaticWidth<LENGTH> > TWord;
+    enum TDummy { UNSIGNED_COUNT = (LENGTH / BitsPerValue<unsigned>::VALUE + ((LENGTH % BitsPerValue<unsigned>::VALUE > 0) ? 1 : 0)) };
+    unsigned _data[UNSIGNED_COUNT];
+
+    LongWord() {
+        SEQAN_CHECKPOINT;
+        reset(*this);
+    }
+
+    LongWord(LongWord const & other) {
+        SEQAN_CHECKPOINT;
+        for (size_t i = 0; i < UNSIGNED_COUNT; ++i)
+            _data[i] = other._data[i];
+    }
+
+    LongWord & operator=(LongWord const & other) {
+        SEQAN_CHECKPOINT;
+        for (size_t i = 0; i < UNSIGNED_COUNT; ++i)
+            _data[i] = other._data[i];
+        return *this;
+    }
+
+    unsigned operator[](unsigned index) const {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LT(index, LENGTH);
+        unsigned const & block = _data[UNSIGNED_COUNT - 1 - index / BitsPerValue<unsigned>::VALUE];
+        unsigned bitIndex = index % BitsPerValue<unsigned>::VALUE;
+        return (block & (1 << bitIndex)) >> bitIndex;
+    }
+
+    LongWordBitProxy<TWord, StaticWidth<LENGTH> > operator[](unsigned index) {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LT(index, LENGTH);
+        return LongWordBitProxy<TWord, StaticWidth<LENGTH> >(*this, index);
+    }
+};
+
+
+template <unsigned LENGTH>
+inline LongWord<StaticWidth<LENGTH> > & reset(LongWord<StaticWidth<LENGTH> > & a) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    for (size_t i = 0; i < TLongWord::UNSIGNED_COUNT; ++i)
+        a._data[i] = 0u;
+    return a;
+}
+
+
+template <unsigned LENGTH>
+size_t length(LongWord<StaticWidth<LENGTH> > const &) {
+    SEQAN_CHECKPOINT;
+    return LENGTH;
+}
+
+
+template <unsigned LENGTH>
+bool operator==(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+    for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i) {
+        if (a._data[i] != b._data[i]) {
+            return false;
+        }
+    }
+    return true;    
+}
+
+
+template <unsigned LENGTH>
+bool operator!=(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+//     for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i) {
+//         if (a._data[i] == b._data[i]) {
+//             return false;
+//         }
+//     }
+//     return true;
+    return !(a == b);
+}
+
+
+template <unsigned LENGTH>
+bool operator<=(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+    for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i) {
+        if (a._data[TLongWord::UNSIGNED_COUNT - 1 - i] > b._data[TLongWord::UNSIGNED_COUNT - 1 - i])
+            return false;
+    }
+    return true;    
+}
+
+
+template <unsigned LENGTH>
+bool operator>=(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+    for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i) {
+        if (a._data[TLongWord::UNSIGNED_COUNT - 1 - i] <= b._data[TLongWord::UNSIGNED_COUNT - 1 - i])
+            return false;
+    }
+    return true;    
+}
+
+
+template <unsigned LENGTH>
+bool operator<(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    return !(a >= b);
+//     typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+//     // TODO(holtgrew): Roll out loop?
+//     for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i) {
+//         if (a._data[i] >= b._data[i])
+//             return false;
+//     }
+//     return true;    
+}
+
+
+template <unsigned LENGTH>
+bool operator>(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    return !(a <= b);
+//     typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+//     // TODO(holtgrew): Roll out loop?
+//     for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i) {
+//         if (a._data[i] <= b._data[i])
+//             return false;
+//     }
+//     return true;    
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > operator|(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+    TLongWord result;
+    for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i)
+        result._data[i] = a._data[i] | b._data[i];
+    return result;
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > & operator|=(LongWord<StaticWidth<LENGTH> > & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+    TLongWord result;
+    for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i)
+        a._data[i] |= b._data[i];
+    return a;
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > operator&(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+    TLongWord result;
+    for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i)
+        result._data[i] = a._data[i] & b._data[i];
+    return result;
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > & operator&=(LongWord<StaticWidth<LENGTH> > & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+    TLongWord result;
+    for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i)
+        a._data[i] &= b._data[i];
+    return a;
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > operator^(LongWord<StaticWidth<LENGTH> > const & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+    TLongWord result;
+    for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i)
+        result._data[i] = a._data[i] ^ b._data[i];
+    return result;
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > & operator^=(LongWord<StaticWidth<LENGTH> > & a, LongWord<StaticWidth<LENGTH> > const & b) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // TODO(holtgrew): Roll out loop?
+    TLongWord result;
+    for (unsigned i = 0; i < TLongWord::UNSIGNED_COUNT; ++i)
+        a._data[i] ^= b._data[i];
+    return a;
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > operator>>(LongWord<StaticWidth<LENGTH> > const & a, unsigned shift) {
+    SEQAN_CHECKPOINT;
+    LongWord<StaticWidth<LENGTH> > x(a);
+    x >>= shift;
+    return x;
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > & operator>>=(LongWord<StaticWidth<LENGTH> > & a, unsigned shift) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // Clear if shift is larger than the number of bits.
+    if (shift > LENGTH)
+        return reset(a);
+    // Do nothing if shift is zero.
+    if (shift == 0u)
+        return a;
+
+    // Otherwise, perform shift operation.
+    size_t const last = TLongWord::UNSIGNED_COUNT - 1;
+    size_t const blockShift = shift / BitsPerValue<unsigned>::VALUE;    // Number of blocks to shift values from.
+    size_t const indexInBlock = shift % BitsPerValue<unsigned>::VALUE;
+    if (indexInBlock != 0) {
+        // More common case: shift is not multiple of bit count of unsigned.
+        unsigned const x = BitsPerValue<unsigned>::VALUE - indexInBlock;
+        for (size_t i = last - blockShift; i < last; ++i)
+            a._data[i + blockShift] = (a._data[i] >> indexInBlock) | (a._data[i + 1] << x);
+        a._data[last - blockShift] = a._data[0] >> indexInBlock;
+    } else {
+        // Less common case: We can simply copy these unsigneds.
+        for (size_t i = blockShift; i <= last; ++i)
+            a._data[i + blockShift] = a._data[0];
+    }
+    std::fill_n(&(a._data[TLongWord::UNSIGNED_COUNT - 1 - blockShift]), blockShift, 0u);
+    return a;
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > operator<<(LongWord<StaticWidth<LENGTH> > const & a, unsigned shift) {
+    SEQAN_CHECKPOINT;
+    LongWord<StaticWidth<LENGTH> > x(a);
+    x <<= shift;
+    return x;
+}
+
+
+template<unsigned LENGTH>
+LongWord<StaticWidth<LENGTH> > & operator<<=(LongWord<StaticWidth<LENGTH> > & a, unsigned shift) {
+    SEQAN_CHECKPOINT;
+    typedef LongWord<StaticWidth<LENGTH> > TLongWord;
+    // Clear if shift is larger than the number of bits.
+    if (shift > LENGTH)
+        return reset(a);
+    // Do nothing if shift is zero.
+    if (shift == 0u)
+        return a;
+
+    // Otherwise, perform shift operation.
+    size_t const last = TLongWord::UNSIGNED_COUNT - 1;
+    size_t const blockShift = shift / BitsPerValue<unsigned>::VALUE;    // Number of blocks to shift values from.
+    size_t const indexInBlock = shift % BitsPerValue<unsigned>::VALUE;
+    if (indexInBlock != 0) {
+        // More common case: shift is not multiple of bit count of unsigned.
+        unsigned const x = BitsPerValue<unsigned>::VALUE - indexInBlock;
+        for (size_t i = last - blockShift; i > 0; --i)
+            a._data[i + blockShift] = (a._data[i] << indexInBlock) | (a._data[i - 1] >> x);
+        a._data[blockShift] = a._data[0] << indexInBlock;
+    } else {
+        // Less common case: We can simply copy these unsigneds.
+        for (size_t i = last - blockShift; i > 0; --i)
+            a._data[i + blockShift] = a._data[0];
+        a._data[blockShift] = a._data[0];
+    }
+    std::fill_n(&(a._data[0]), blockShift, 0u);
+    return a;
+}
+
+
+template <typename TWord>
+struct LongWordBitProxy<TWord, DynamicWidth> {
+    TWord &_word;
+    unsigned _bitIndex;
+
+    LongWordBitProxy(TWord & word, unsigned bitIndex)
+            : _word(word), _bitIndex(bitIndex) {
+        SEQAN_CHECKPOINT;
+    }
+
+    LongWordBitProxy & operator=(unsigned x) {
+        SEQAN_CHECKPOINT;
+        unsigned & block = _word._data[_word._unsignedCount() - 1 - _bitIndex / BitsPerValue<unsigned>::VALUE];
+        unsigned bitIndex = _bitIndex % BitsPerValue<unsigned>::VALUE;
+        block = (block ^ (1 << bitIndex)) | (x << bitIndex);
+        return *this;
+    }
+
+    operator unsigned() const {
+        SEQAN_CHECKPOINT;
+        unsigned const & block = _word._data[_word._unsignedCount() - 1 - _bitIndex / BitsPerValue<unsigned>::VALUE];
+        unsigned bitIndex = _bitIndex % BitsPerValue<unsigned>::VALUE;
+//         std::cerr << "LongWordBitProxy<... StaticWidth<" << LENGTH << "> >" << std::endl;
+//         std::cerr << "  _word      = " << _word << std::endl;
+//         std::cerr << "  _bitIndex  = " << _bitIndex << std::endl;
+//         std::cerr << "  block      = " << block << std::endl;
+//         std::cerr << "  bitIndex   = " << bitIndex << std::endl;
+//         std::cerr << "  (block & (1 << bitIndex)) >> bitIndex = " << ((block & (1 << bitIndex)) >> bitIndex) << std::endl;
+//         std::cerr << std::endl;
+        return (block & (1 << bitIndex)) >> bitIndex;
+    }
+};
+
+
+// Forward Declarations.
+inline LongWord<DynamicWidth> & reset(LongWord<DynamicWidth> & a);
+
+
+template <>
+struct LongWord<DynamicWidth> {
+    typedef LongWord<DynamicWidth> TWord;
+    unsigned _length;  // Number of bits in the word.
+    unsigned * _data;
+
+    explicit
+    LongWord(unsigned const & length)
+            : _length(length) {
+        SEQAN_CHECKPOINT;
+        _data = new unsigned[_unsignedCount()];
+        reset(*this);
+    }
+
+    LongWord(LongWord const & other) {
+        SEQAN_CHECKPOINT;
+        _length = other._length;
+        _data = new unsigned[_unsignedCount()];
+        for (size_t i = 0; i < _unsignedCount(); ++i)
+            _data[i] = other._data[i];
+    }
+
+    ~LongWord() {
+        delete [] _data;
+    }
+
+    LongWord & operator=(LongWord const & other) {
+        SEQAN_CHECKPOINT;
+        if (_length != other._length) {
+            _length = other._length;
+            _data = new unsigned[_unsignedCount()];
+        }
+        for (size_t i = 0; i < _unsignedCount(); ++i)
+            _data[i] = other._data[i];
+        return *this;
+    }
+
+    unsigned operator[](unsigned index) const {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LT(index, _length);
+        unsigned const & block = _data[_unsignedCount() - 1 - index / BitsPerValue<unsigned>::VALUE];
+        unsigned bitIndex = index % BitsPerValue<unsigned>::VALUE;
+        return (block & (1 << bitIndex)) >> bitIndex;
+    }
+
+    LongWordBitProxy<TWord, DynamicWidth> operator[](unsigned index) {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LT(index, _length);
+        return LongWordBitProxy<TWord, DynamicWidth>(*this, index);
+    }
+
+    unsigned _unsignedCount() const {
+        SEQAN_CHECKPOINT;
+        return _length / BitsPerValue<unsigned>::VALUE + ((_length % BitsPerValue<unsigned>::VALUE > 0) ? 1 : 0);
+    }
+};
+
+
+inline LongWord<DynamicWidth> & reset(LongWord<DynamicWidth> & a) {
+    SEQAN_CHECKPOINT;
+    for (size_t i = 0; i < a._unsignedCount(); ++i)
+        a._data[i] = 0u;
+    return a;
+}
+
+
+size_t length(LongWord<DynamicWidth> const & a) {
+    SEQAN_CHECKPOINT;
+    return a._length;
+}
+
+
+bool operator==(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_EQ(a._length, b._length);
+    // TODO(holtgrew): Roll out loop?
+    for (unsigned i = 0; i < a._unsignedCount(); ++i) {
+        if (a._data[i] != b._data[i]) {
+            return false;
+        }
+    }
+    return true;    
+}
+
+
+bool operator!=(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    return !(a == b);
+}
+
+
+bool operator<=(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_EQ(a._length, b._length);
+    // TODO(holtgrew): Roll out loop?
+    for (unsigned i = 0; i < a._unsignedCount(); ++i) {
+        if (a._data[a._unsignedCount() - 1 - i] > b._data[a._unsignedCount() - 1 - i])
+            return false;
+    }
+    return true;    
+}
+
+
+bool operator>=(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_EQ(a._length, b._length);
+    // TODO(holtgrew): Roll out loop?
+    for (unsigned i = 0; i < a._unsignedCount(); ++i) {
+        if (a._data[a._unsignedCount() - 1 - i] <= b._data[a._unsignedCount() - 1 - i])
+            return false;
+    }
+    return true;    
+}
+
+
+bool operator<(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    return !(a >= b);
+}
+
+
+bool operator>(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    return !(a <= b);
+}
+
+
+LongWord<DynamicWidth> & operator|=(LongWord<DynamicWidth> & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_EQ(a._length, b._length);
+    // TODO(holtgrew): Roll out loop?
+    for (unsigned i = 0; i < a._unsignedCount(); ++i)
+        a._data[i] |= b._data[i];
+    return a;
+}
+
+
+LongWord<DynamicWidth> operator|(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_EQ(a._length, b._length);
+    LongWord<DynamicWidth> result(a);
+    return result |= b;
+}
+
+
+LongWord<DynamicWidth> & operator&=(LongWord<DynamicWidth> & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_EQ(a._length, b._length);
+    // TODO(holtgrew): Roll out loop?
+    for (unsigned i = 0; i < a._unsignedCount(); ++i)
+        a._data[i] &= b._data[i];
+    return a;
+}
+
+
+LongWord<DynamicWidth> operator&(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_EQ(a._length, b._length);
+    LongWord<DynamicWidth> result(a);
+    return result &= b;
+}
+
+
+LongWord<DynamicWidth> & operator^=(LongWord<DynamicWidth> & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_EQ(a._length, b._length);
+    // TODO(holtgrew): Roll out loop?
+    for (unsigned i = 0; i < a._unsignedCount(); ++i)
+        a._data[i] ^= b._data[i];
+    return a;
+}
+
+
+LongWord<DynamicWidth> operator^(LongWord<DynamicWidth> const & a, LongWord<DynamicWidth> const & b) {
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_EQ(a._length, b._length);
+    LongWord<DynamicWidth> result(a);
+    return result ^= b;
+}
+
+
+LongWord<DynamicWidth> & operator>>=(LongWord<DynamicWidth> & a, unsigned shift) {
+    SEQAN_CHECKPOINT;
+    // Clear if shift is larger than the number of bits.
+    if (shift > a._length)
+        return reset(a);
+    // Do nothing if shift is zero.
+    if (shift == 0u)
+        return a;
+
+    // Otherwise, perform shift operation.
+    size_t const last = a._unsignedCount() - 1;
+    size_t const blockShift = shift / BitsPerValue<unsigned>::VALUE;    // Number of blocks to shift values from.
+    size_t const indexInBlock = shift % BitsPerValue<unsigned>::VALUE;
+    if (indexInBlock != 0) {
+        // More common case: shift is not multiple of bit count of unsigned.
+        unsigned const x = BitsPerValue<unsigned>::VALUE - indexInBlock;
+        for (size_t i = last - blockShift; i < last; ++i)
+            a._data[i + blockShift] = (a._data[i] >> indexInBlock) | (a._data[i + 1] << x);
+        a._data[last - blockShift] = a._data[0] >> indexInBlock;
+    } else {
+        // Less common case: We can simply copy these unsigneds.
+        for (size_t i = blockShift; i <= last; ++i)
+            a._data[i + blockShift] = a._data[0];
+    }
+    std::fill_n(&(a._data[a._unsignedCount() - 1 - blockShift]), blockShift, 0u);
+    return a;
+}
+
+
+LongWord<DynamicWidth> operator>>(LongWord<DynamicWidth> const & a, unsigned shift) {
+    SEQAN_CHECKPOINT;
+    LongWord<DynamicWidth> result(a);
+    return result >>= shift;
+}
+
+
+LongWord<DynamicWidth> & operator<<=(LongWord<DynamicWidth> & a, unsigned shift) {
+    SEQAN_CHECKPOINT;
+    // Clear if shift is larger than the number of bits.
+    if (shift > a._length)
+        return reset(a);
+    // Do nothing if shift is zero.
+    if (shift == 0u)
+        return a;
+
+    // Otherwise, perform shift operation.
+    size_t const last = a._unsignedCount() - 1;
+    size_t const blockShift = shift / BitsPerValue<unsigned>::VALUE;    // Number of blocks to shift values from.
+    size_t const indexInBlock = shift % BitsPerValue<unsigned>::VALUE;
+    if (indexInBlock != 0) {
+        // More common case: shift is not multiple of bit count of unsigned.
+        unsigned const x = a._unsignedCount() - indexInBlock;
+        for (size_t i = last - blockShift; i > 0; --i)
+            a._data[i + blockShift] = (a._data[i] << indexInBlock) | (a._data[i - 1] >> x);
+        a._data[blockShift] = a._data[0] << indexInBlock;
+    } else {
+        // Less common case: We can simply copy these unsigneds.
+        for (size_t i = last - blockShift; i > 0; --i)
+            a._data[i + blockShift] = a._data[0];
+        a._data[blockShift] = a._data[0];
+    }
+    std::fill_n(&(a._data[0]), blockShift, 0u);
+    return a;
+}
+
+
+LongWord<DynamicWidth> operator<<(LongWord<DynamicWidth> const & a, unsigned shift) {
+    SEQAN_CHECKPOINT;
+    LongWord<DynamicWidth> x(a);
+    x <<= shift;
+    return x;
+}
+
+}  // namespace seqan
+
+
+namespace std {
+
+template <typename TStream, unsigned LENGTH>
+TStream & operator<<(TStream & stream, seqan::LongWord<seqan::StaticWidth<LENGTH> > const & a) {
+    SEQAN_CHECKPOINT;
+    for (size_t i = 0; i < LENGTH; ++i) {
+        unsigned x = a[LENGTH - 1 - i];
+        stream << x;
+    }
+    typedef seqan::LongWord<seqan::StaticWidth<LENGTH> > TLongWord;
+    stream << "  ( ";
+    for (size_t i = 0; i < TLongWord::UNSIGNED_COUNT; ++i) {
+        stream << a._data[i] << " ";
+    }
+    stream << ")";
+    return stream;
+}
+
+
+template <typename TStream>
+TStream & operator<<(TStream & stream, seqan::LongWord<seqan::DynamicWidth> const & a) {
+    SEQAN_CHECKPOINT;
+    for (size_t i = 0; i < a._length; ++i) {
+        unsigned x = a[a._length - 1 - i];
+        stream << x;
+    }
+    typedef seqan::LongWord<seqan::DynamicWidth> TLongWord;
+    stream << "  ( ";
+    for (size_t i = 0; i < a._unsignedCount(); ++i) {
+        stream << a._data[i] << " ";
+    }
+    stream << ")";
+    return stream;
+}
+
+}  // namespace std
+
+#endif  // SEQAN_MISC_MISC_LONG_WORD_H_
diff --git a/src/SeqAn-1.3/seqan/misc/misc_map.h b/src/SeqAn-1.3/seqan/misc/misc_map.h
new file mode 100644
index 0000000..d3740af
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_map.h
@@ -0,0 +1,218 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Note that this file originally did not compile.  Me (holtgrew) change it
+// it it compiled.  However, it might not make sense to fix it so it actually
+// works.
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_MISC_MAP_H
+#define SEQAN_HEADER_MISC_MAP_H
+
+#include <algorithm>
+#include "misc_base.h"
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	//////////////////////////////////////////////////////////////////////////////
+	//
+
+	template <typename TPair>
+	inline typename TPair::T1 & keyOf(TPair &pair) {
+		return getValueI1(pair);
+	}
+	template <typename TPair>
+	inline typename TPair::T1 const & keyOf(TPair const &pair) {
+		return getValueI1(pair);
+	}
+	template <typename TPair>
+	inline typename TPair::T2 & objectOf(TPair &pair) {
+		return getValueI2(pair);
+	}
+	template <typename TPair>
+	inline typename TPair::T2 const & objectOf(TPair const &pair) {
+		return getValueI2(pair);
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	//
+
+	template <typename TString, typename TLess = ::std::less<typename Value<TString>::Type::T1> >
+	struct SequenceMap;
+
+
+	template <typename TString>
+	struct Value< SequenceMap<TString> > {
+		typedef typename Value<TString>::Type Type;
+	};
+	template <typename TString>
+	struct Size< SequenceMap<TString> > {
+		typedef typename Size<TString>::Type Type;
+	};
+
+	template <typename TString>
+	inline typename Size< SequenceMap<TString> >::Type length(SequenceMap<TString> const &set) {
+		return length(set.string);
+	}
+
+
+
+	template <typename TKey, typename TObject, typename TSpec, typename TLess>
+	struct SequenceMap< String< Pair<TKey, TObject>, TSpec >, TLess > {
+		typedef Pair<TKey, TObject>						TValue;
+		typedef String< Pair<TKey, TObject>, TSpec >	TSequence;
+		typedef typename TSequence::size_type				TSize;
+
+		TKey				maxKey;
+		TLess				comp;
+		Holder<TSequence>	string;
+
+		SequenceMap():
+			maxKey(0)	{}
+
+		SequenceMap(TLess const &_comp):
+			maxKey(0),
+			comp(_comp) {}
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	//
+
+//	template <typename TKey>
+//	struct Map {
+//		typedef ::std::map<TKey> Type;
+//	};
+	template <typename TKey, typename TObject>
+	class Map< Pair<TKey, TObject> > {
+//		typedef ::std::set< Pair<TKey, TObject>, SetLess< Pair<TKey, TObject> > > Type;
+	};
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	//
+
+	template <typename TString, typename TLess>
+	struct Iterator< SequenceMap<TString, TLess> > {
+		typedef typename Iterator<TString>::Type	Type;
+	};
+
+	template <typename TString, typename TLess>
+	struct Iterator< SequenceMap<TString, TLess> const > {
+		typedef typename Iterator<TString const>::Type	Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	//
+
+	template <typename TString, typename TLess>
+	inline void clear(SequenceMap<TString, TLess> &map) {
+		clear(map.string);
+		map.maxKey = 0;
+	}
+
+	template <typename TKey, typename TString, typename TLess>
+	inline typename Iterator< SequenceMap<TString, TLess> >::Type find(TKey const &key, SequenceMap<TString, TLess> &map) {
+
+		typedef typename Size< SequenceMap<TString, TLess> >::Type		TSize;
+		typedef typename Iterator< SequenceMap<TString, TLess> >::Type	TIter;
+		
+		// accelerate binary search
+		if (map.comp(map.maxKey, key))
+			return end(map.string);
+
+		TIter First_ = begin(map.string);
+		TSize Count_ = end(map.string) - First_;
+
+		for (; 0 < Count_; )
+		{	// divide and conquer, find half that contains answer
+			TSize Count2_ = Count_ / 2;
+			TIter Mid_ = First_ + Count2_;
+
+			if (map.comp((*Mid_).i1, key))
+				First_ = ++Mid_, Count_ -= Count2_ + 1;
+			else
+				Count_ = Count2_;
+		}
+		return (First_);
+	}
+
+	template <typename TPair, typename TString, typename TLess>
+	inline void insert(TPair &pair, SequenceMap<TString> &map)
+	{
+		typedef typename Iterator< SequenceMap<TString, TLess> >::Type	TIter;
+
+		// accelerate binary search
+		if (map.comp(map.maxKey, pair.i1)) {
+// whatever
+			map.maxKey = pair.i1;
+			return append(map.string);
+		}
+
+		TIter iter = find(pair.i1, map);
+// whatever
+		insert(pair, map);
+	}
+
+
+	template <typename TKey, typename TString>
+	inline void erase(TKey const &/*key*/, SequenceMap<TString> &/*map*/)
+	{
+            // TODO(holtgrew): Commented out the following, no idea how to make it work.
+            /* 
+		if (!max.comp(map.maxKey, key) && !max.comp(key, map.maxKey)) {
+			// delete last element
+			if (length(map.string))
+				map.maxKey = *(map.string.end() - 1).i2;
+			else
+				map.maxKey = 0;
+		}
+
+		typedef typename Iterator< SequenceMap<TString, TLess> >::Type	TIter;
+		TIter iter = find(pair.i1, map);
+		delete iter;
+            */
+	}
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/misc/misc_parsing.h b/src/SeqAn-1.3/seqan/misc/misc_parsing.h
new file mode 100644
index 0000000..d80ab9d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_parsing.h
@@ -0,0 +1,622 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_MISC_PARSING_H
+#define SEQAN_HEADER_MISC_PARSING_H
+
+#include <cmath>
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// General parsing funtions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TChar>
+inline void 
+_parseSkipLine(TFile& file, TChar& c)
+{
+	if (c == '\n') {
+		c = _streamGet(file);
+		return;
+	}
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (c == '\n') break;
+	}
+	c = _streamGet(file);
+}
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TFile, typename TChar>
+inline void 
+_parseSkipWhitespace(TFile& file, TChar& c)
+{
+	if ((unsigned) c > 32) return;
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if ((unsigned) c > 32) break;
+	}
+}
+
+template<typename TFile, typename TChar>
+inline void 
+_parseSkipSpace(TFile& file, TChar& c)
+{
+	if (c != '\t' && c != ' ') return;
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (c != '\t' && c != ' ') break;
+	}
+}
+
+
+/**
+.Internal._parseSkipUntilChar:
+..summary:Skip to the next ocurrence of x in file.
+..cat:Miscenalleous
+..signature:_parseSkipUntilChar(file, x, c)
+..param.file:The file to read from.
+..param.x:The character to skip to.
+..param.c:Parser state character.
+ */
+template<typename TFile, typename TChar>
+inline void 
+_parseSkipUntilChar(TFile& file, const TChar &x, TChar& c)
+{
+	if (c == x) return;
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (c == x) break;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TChar>
+inline bool
+_parseIsDigit(TChar const c)
+{
+	return (((unsigned) c >  47) && ((unsigned) c <  58));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TChar>
+inline bool
+_parseIsLetter(TChar const c)
+{
+	return ( (((unsigned) c > 64) && ((unsigned) c < 91)) || (((unsigned) c > 96) && ((unsigned) c < 123)) );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// TODO(holtgrew): The name of this function is WRONG.
+template<typename TChar>
+inline bool
+_parseIsAlphanumericChar(TChar const c)
+{
+	return ((_parseIsDigit(c)) || (_parseIsLetter(c)) || (c == '_') || (c == '.') || (c == '-') || (c == '|') || (c == '/') || (c == ':'));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TChar>
+inline int
+_parseReadNumber(TFile & file, TChar& c)
+{
+	// Read number
+	String<char> str(c);
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (!_parseIsDigit(c)) break;
+		append(str, c);
+	}
+ 	return atoi(toCString(str));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TChar>
+inline double
+_parseReadDouble(TFile & file, TChar& c)
+{
+	// Read number
+	String<char> str(c);
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (!_parseIsDigit(c) && (c != '.')) break;
+		append(str, c);
+	}
+ 	return atof(toCString(str));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TChar>
+inline String<char>
+_parseReadIdentifier(TFile & file, TChar& c)
+{
+	// Read identifier
+	String<char> str(c);
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (!_parseIsAlphanumericChar(c)) break;
+		append(str, c);
+	}
+	return str;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TChar>
+inline char
+_parseReadChar(TFile & file, TChar& c)
+{
+    char result = c;
+    if (!_streamEOF(file))
+        c = _streamGet(file);
+    return result;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TString, typename TChar>
+inline void
+_parseReadIdentifier(TFile & file, TString& str, TChar& c)
+{
+	// Read identifier
+	append(str, c, Generous());
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (!_parseIsAlphanumericChar(c)) break;
+		append(str, c, Generous());
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TChar>
+inline String<char>
+_parseReadWord(TFile & file, TChar& c)
+{
+	// Read word
+	String<char> str(c);
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (!_parseIsLetter(c)) break;
+		append(str, c);
+	}
+	return str;
+}
+
+
+// parse word up to a maximum length
+template<typename TFile, typename TChar, typename TSize>
+inline String<char>
+_parseReadWord(TFile & file, TChar& c, TSize max_len)
+{
+	// Read word
+	String<char> str(c);
+	--max_len;
+	TSize i = 0;
+	while (!_streamEOF(file) ) {
+		c = _streamGet(file);
+		if (!_parseIsLetter(c) || i >= max_len) break;
+		append(str, c);
+		++i;
+	}
+	return str;
+}
+
+
+
+
+//read filename (read line and trim trailing whitespaces)
+template<typename TFile, typename TChar>
+inline String<char>
+_parseReadFilepath(TFile& file, TChar& c)
+{
+	String<char> str(c);
+	if (c == '\n' || (c == '\r' && _streamPeek(file) != '\n')) {
+		c = _streamGet(file);
+		return str;
+	}
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (c == '\n' || (c == '\r' && _streamPeek(file) != '\n')) break;
+		append(str, c);
+	}
+	typename Iterator<String<char>,Rooted >::Type str_it = end(str);	
+	while(str_it != begin(str)) {
+		--str_it;
+		if(*str_it != ' ' && *str_it != '\t'){
+		++str_it;
+		break;
+		}
+	}
+	resize(str,position(str_it));
+	return str;
+}
+
+
+//read filename (read line and trim trailing whitespaces)
+template<typename TFile, typename TChar>
+inline String<char>
+_parseReadWordUntilWhitespace(TFile& file, TChar& c)
+{
+	String<char> str(c);
+	if (c == '\n' || (c == '\r' && _streamPeek(file) != '\n')) {
+		c = _streamGet(file);
+		return str;
+	}
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (c== ' ' || c== '\t' || c == '\n' || (c == '\r' && _streamPeek(file) != '\n')) break;
+		append(str, c);
+	}
+	return str;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TFile, typename TChar, typename TString>
+inline void
+_parseReadSequenceData(TFile & file,
+						TChar & c,
+						TString& str)
+{
+	SEQAN_CHECKPOINT
+
+	append(str, c);
+
+	// Read sequence
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (!_parseIsLetter(c)) break;
+		else append(str, c);
+	}
+}
+
+
+
+template<typename TFile, typename TChar>
+inline void 
+_parseSkipBlanks(TFile& file, TChar& c)
+{
+	if ((c != ' ') && (c != '\t')) return;
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if ((c != ' ') && (c != '\t')) break;
+	}
+}
+
+template<typename TFile, typename TChar>
+inline void 
+_parseSkipLine2(TFile& file, TChar& c)
+{
+	if (c != '\n' && c != '\r')
+		while (!_streamEOF(file)) {
+			c = _streamGet(file);
+			if (c == '\n' || c == '\r') break;
+		}
+	if (!_streamEOF(file))
+		c = _streamGet(file);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+template<typename TFile, typename TChar>
+inline double
+_parseReadEValue(TFile & file, TChar& c)
+{
+SEQAN_CHECKPOINT
+
+	// Read number
+	String<char> str(c);
+	bool e = false;
+	double val1 = 0;
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if(!e && c == 'e'){
+			e = true;
+			val1 = atof(toCString(str));
+			c = _streamGet(file);
+			resize(str,0);
+		}
+		if (!_parseIsDigit(c) && c != '.' && c != '-' && c != '+') break;
+		append(str, c);
+	}
+	if(e)
+	{
+		return val1 * pow((double)10.0,(double)atof(toCString(str)));
+	}	
+ 	else 
+		return (double)atof(toCString(str));
+}
+
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////////
+// read floating point value
+template<typename TFile, typename TChar>
+inline float
+_parseReadFloat(TFile & file, TChar& c)
+{
+SEQAN_CHECKPOINT
+	// Read number
+	String<char> str(c);
+	while (!_streamEOF(file)) {
+		c = _streamGet(file);
+		if (c != '.' && c != ',' && !_parseIsDigit(c)) break;
+		append(str, c);
+	}
+ 	return atof(toCString(str));
+}
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//parse until line begins with character x (skip whitespaces)
+// zeigt am ende darauf!!!
+template<typename TFile, typename TChar>
+inline bool
+_parseUntilBeginLine(TFile & file, TChar& c, TChar x)
+{
+SEQAN_CHECKPOINT
+	_parseSkipWhitespace(file,c);
+	typename Position<TFile>::Type pos = _streamTellG(file);
+	TChar c_before = c;
+	while (!_streamEOF(file) && c != x){
+		_parseSkipLine(file, c);
+		_parseSkipWhitespace(file,c);
+	}
+	if(!_streamEOF(file)) return true;
+	_streamSeekG(file,pos);
+	c = c_before;
+	return false;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//parse until line begins with word
+//zeigt am ende dahinter!
+template<typename TFile, typename TChar, typename TSize>
+inline bool
+_parseUntilBeginLine(TFile & file, TChar& c, String<TChar> & word, TSize len)
+{
+SEQAN_CHECKPOINT
+	_parseSkipWhitespace(file,c);
+	typename Position<TFile>::Type pos = _streamTellG(file);
+	TChar c_before = c;
+	while (!_streamEOF(file)){
+		if(c == word[0])
+			if(word == _parseReadWord(file,c,len))
+				break;
+		_parseSkipLine(file, c);
+		_parseSkipWhitespace(file,c);
+	}
+	if(!_streamEOF(file)) return true;
+	_streamSeekG(file,pos);
+	c = c_before;
+	return false;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//parse until line begins with word (parse no more than num_lines lines)
+//zeigt am ende dahinter!
+template<typename TFile, typename TChar, typename TSize>
+inline bool
+_parseUntilBeginLine(TFile & file, TChar& c, String<TChar> & word, TSize len, TSize num_lines)
+{
+SEQAN_CHECKPOINT
+	_parseSkipWhitespace(file,c);
+	typename Position<TFile>::Type pos = _streamTellG(file);
+	TChar c_before = c;
+	TSize i = 0;
+	bool found = false;
+	while (!_streamEOF(file)){
+		if(c == word[0])
+			if(word == _parseReadWord(file,c,len))
+			{
+				found = true;
+				break;
+			}
+		if(i >= num_lines)
+			break;
+		++i;
+		_parseSkipLine(file, c);
+		_parseSkipWhitespace(file,c);
+	}
+	if(!_streamEOF(file) && found) return true;
+	_streamSeekG(file,pos);
+	c = c_before;
+	return false;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//parse until line begins with one of the characters in string x (skip whitespaces)
+//zeigt am ende darauf!
+template<typename TFile, typename TChar, typename TSize>
+inline bool
+_parseUntilBeginLineOneOf(TFile & file, TChar& c, String<TChar> & x, TSize len)
+{
+SEQAN_CHECKPOINT
+	_parseSkipWhitespace(file,c);
+	typename Position<TFile>::Type pos = _streamTellG(file);
+	TChar c_before = c;
+	bool found = false;
+	while (!_streamEOF(file)){
+		for(int i = 0; i < len; ++i)
+			if(c == x[i]) 
+			{
+				found = true;
+				break;
+			}
+		if(found) break;
+		_parseSkipLine(file, c);
+		_parseSkipWhitespace(file,c);
+	}
+	if(!_streamEOF(file)) return true;
+	_streamSeekG(file,pos);
+	c = c_before;
+	return false;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//parse until c == x
+//zeigt am ende darauf!
+template<typename TFile, typename TChar>
+inline bool
+_parseUntil(TFile & file, TChar& c, TChar x)
+{
+SEQAN_CHECKPOINT
+	typename Position<TFile>::Type pos = _streamTellG(file);
+	TChar c_before = c;
+	while (!_streamEOF(file) && c != x){
+		c = _streamGet(file);
+	}
+	if(!_streamEOF(file)) return true;
+	_streamSeekG(file,pos);
+	c = c_before;
+	return false;
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//parse until word
+//zeigt am ende dahinter!
+template<typename TFile, typename TChar, typename TSize>
+inline bool
+_parseUntil(TFile & file, TChar& c, String<TChar> & word, TSize len)
+{
+SEQAN_CHECKPOINT
+	typename Position<TFile>::Type pos = _streamTellG(file);
+	TChar c_before = c;
+	while (!_streamEOF(file)){
+		if(c == word[0])
+			if(word == _parseReadWord(file,c,len))
+				break;
+		c = _streamGet(file);
+	}
+	if(!_streamEOF(file)) return true;
+	_streamSeekG(file,pos);
+	c = c_before;
+	return false;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//parse until c == x or new line
+//zeigt am ende darauf!
+template<typename TFile, typename TChar>
+inline bool
+_parseLineUntil(TFile & file, TChar& c, TChar x)
+{
+SEQAN_CHECKPOINT
+	typename Position<TFile>::Type pos = _streamTellG(file);
+	TChar c_before = c;
+	while (!_streamEOF(file) && c != x){
+		if (c == '\n' || c == '\r')
+		{
+			_streamSeekG(file,pos);
+			c = c_before;
+			return false;
+		}
+		c = _streamGet(file);
+	}
+	if(!_streamEOF(file)) return true;
+	_streamSeekG(file,pos);
+	c = c_before;
+	return false;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//parse this line until word
+//zeigt am ende hinter wort if true, oder auf ende der zeile
+template<typename TFile, typename TChar, typename TSize>
+inline bool
+_parseLineUntil(TFile & file, TChar& c, String<TChar> & word, TSize len)
+{
+SEQAN_CHECKPOINT
+	typename Position<TFile>::Type pos = _streamTellG(file);
+	TChar c_before = c;
+	while (!_streamEOF(file)){
+		if(c == word[0])
+		{	if(word == _parseReadWord(file,c,len))
+				break;
+		}
+		else if (c == '\n' || c == '\r')
+			{
+				_streamSeekG(file,pos);
+				c = c_before;
+				return false;
+			}
+		c = _streamGet(file);
+	}
+	if(!_streamEOF(file)) return true;
+	_streamSeekG(file,pos);
+	c = c_before;
+	return false;
+}
+
+
+
+
+
+
+}
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/misc/misc_random.h b/src/SeqAn-1.3/seqan/misc/misc_random.h
new file mode 100644
index 0000000..8b1cb8e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_random.h
@@ -0,0 +1,287 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MISC_RANDOM_H
+#define SEQAN_HEADER_MISC_RANDOM_H
+
+#include <cmath>
+#include <cstdlib>
+#include <ctime>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Mersenne Twister Random Number Generator
+// Implementation by Michael Brundage;
+// with some modifications
+// http://www.qbrundage.com/michaelb/pubs/essays/random_number_generation.html
+//////////////////////////////////////////////////////////////////////////////
+
+
+#define SEQAN_MERSENNE_MT_LEN			624
+#define SEQAN_MERSENNE_MT_IA			397
+#define SEQAN_MERSENNE_MT_IB			(SEQAN_MERSENNE_MT_LEN - SEQAN_MERSENNE_MT_IA)
+#define SEQAN_MERSENNE_UPPER_MASK      0x80000000
+#define SEQAN_MERSENNE_LOWER_MASK      0x7FFFFFFF
+#define SEQAN_MERSENNE_MATRIX_A        0x9908B0DF
+#define SEQAN_MERSENNE_TWIST(b,i,j)    ((b)[i] & SEQAN_MERSENNE_UPPER_MASK) | ((b)[j] & SEQAN_MERSENNE_LOWER_MASK)
+#define SEQAN_MERSENNE_MAGIC(s)        (((s)&1)*SEQAN_MERSENNE_MATRIX_A)
+
+//////////////////////////////////////////////////////////////////////////////
+//forward declaration
+
+inline unsigned mtRand(); 
+inline void mtRandInit();
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T = void>
+struct MersenneBuffer_
+{
+    static unsigned long buffer[SEQAN_MERSENNE_MT_LEN];
+	static int index;
+	static bool is_initialized;
+
+};
+//____________________________________________________________________________
+
+template <typename T>
+unsigned long MersenneBuffer_<T>::buffer[SEQAN_MERSENNE_MT_LEN];
+
+//____________________________________________________________________________
+
+template <typename T>
+int MersenneBuffer_<T>::index = 0;
+
+//____________________________________________________________________________
+
+template <typename T>
+bool MersenneBuffer_<T>::is_initialized = false;
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: mtRandInit() must have been called at least once before mtRand() is used.
+// Can also be called several times since it is protected against multiple initalizations. 
+
+/**
+.Function.mtRandInit:
+..status:deprecated, use @Class.Rng@ and @Class.Pdf@ from $<seqan/random.h>$ instead
+..summary:Initialize the Mersenne-Twister random number generator.
+..cat:Misc
+..signature:mtRandInit()
+..signature:mtRandInit(doSRand)
+..param.doSRand:If $true$, the Mersenne-Twister is initialized with a random number from $std::rand$.
+...type:nolink:bool
+..remarks:@Function.mtRandInit@ must have been called at least once before @Function.mtRand@ is used.
+..include:seqan/misc.h
+*/
+
+inline void 
+mtRandInit(bool 
+#ifndef SEQAN_NOSRAN
+		   _doSRand
+#endif
+		   )
+{
+	// test whether mtRandInit was already initialized
+	// return immediately if this is the case
+	if (MersenneBuffer_<>::is_initialized) return;
+	MersenneBuffer_<>::is_initialized = true;
+
+#ifndef SEQAN_NOSRAN
+	if (_doSRand)
+		::std::srand((unsigned) ::std::time(0));
+#endif
+
+	int i;
+	for (i = 0; i < SEQAN_MERSENNE_MT_LEN; i++)
+		MersenneBuffer_<>::buffer[i] = ::std::rand();
+
+	mtRand(); //pop the first number, since it is not as "random" as we like it
+}
+
+inline void 
+mtRandInit()
+{
+	mtRandInit(true);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: mtRandInit() must be called once before mtRand() is used.
+
+
+/**
+.Function.mtRand:
+..status:deprecated, use @Class.Rng@ and @Class.Pdf@ from $<seqan/random.h>$ instead
+..summary:Return a Mersenne-Twister random number.
+..cat:Misc
+..signature:mtRand()
+..returns:A random number between 0 and $MaxValue<unsigned>::VALUE$.
+...type:nolink:unsigned
+..remarks:@Function.mtRandInit@ must have been called at least once before @Function.mtRand@ is used.
+..see:Function.mtRandInit
+..include:seqan/misc.h
+*/
+
+inline unsigned 
+mtRand()
+{
+	unsigned long * b = MersenneBuffer_<>::buffer;
+	int idx = MersenneBuffer_<>::index;
+	unsigned long s;
+	int i;
+	
+	if (idx == SEQAN_MERSENNE_MT_LEN*sizeof(unsigned long))
+	{
+		idx = 0;
+		i = 0;
+		for (; i < SEQAN_MERSENNE_MT_IB; i++) {
+			s = SEQAN_MERSENNE_TWIST(b, i, i+1);
+			b[i] = b[i + SEQAN_MERSENNE_MT_IA] ^ (s >> 1) ^ SEQAN_MERSENNE_MAGIC(s);
+		}
+		for (; i < SEQAN_MERSENNE_MT_LEN-1; i++) {
+			s = SEQAN_MERSENNE_TWIST(b, i, i+1);
+			b[i] = b[i - SEQAN_MERSENNE_MT_IB] ^ (s >> 1) ^ SEQAN_MERSENNE_MAGIC(s);
+		}
+        
+		s = SEQAN_MERSENNE_TWIST(b, SEQAN_MERSENNE_MT_LEN-1, 0);
+		b[SEQAN_MERSENNE_MT_LEN-1] = b[SEQAN_MERSENNE_MT_IA-1] ^ (s >> 1) ^ SEQAN_MERSENNE_MAGIC(s);
+	}
+	MersenneBuffer_<>::index = idx + sizeof(unsigned long);
+	return *(unsigned long *)((unsigned char *)b + idx);
+}
+
+/**
+.Function.mtRandDouble:
+..status:deprecated, use @Class.Rng@ and @Class.Pdf@ from $<seqan/random.h>$ instead
+..summary:Return a random number between 0 and 1 using mtRand.
+..see:Function.mtRand
+..include:seqan/misc.h
+*/
+inline double
+mtRandDouble()
+{
+    return static_cast<double>(mtRand()) / static_cast<double>(MaxValue<unsigned>::VALUE);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// Geometrical Distribution Heuristics
+// from Numerical Recipes in C
+//////////////////////////////////////////////////////////////////////////////
+
+
+#define SEQAN_RG_IB1 1
+#define SEQAN_RG_IB2 2
+#define SEQAN_RG_IB5 16
+#define SEQAN_RG_IB18 131072
+#define SEQAN_RG_MASK ( SEQAN_RG_IB1 + SEQAN_RG_IB2 + SEQAN_RG_IB5 )
+
+template <typename T>
+inline T
+geomRand()
+{
+	static unsigned long seed = ::std::rand();
+	T value = 0;
+	while ( true )
+	{
+		if( ( seed & SEQAN_RG_IB18 ) )
+		{
+			seed = ( ( seed ^ SEQAN_RG_MASK ) << 1 ) | SEQAN_RG_IB1;
+			++value;
+		}
+		else 
+		{
+			seed <<= 1;
+			break;
+		}
+	}
+	return value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// Normal Distribution Heuristics.
+//
+// Ported from Python.
+//
+// Kinderman and Monahan method. Reference: Kinderman,
+// A.J. and Monahan, J.F., "Computer generation of random
+// variables using the ratio of uniform deviates", ACM Trans
+// Math Software, 3, (1977), pp257-260.
+//////////////////////////////////////////////////////////////////////////////
+
+static const double SEQAN_NV_MAGICCONST = 1.7155277699214135;  // == 4 * exp(-0.5)/sqrt(2.0)
+
+inline double
+normRand(double mean, double stddev)
+{
+    /* in Python:
+        random = self.random
+        while 1:
+            u1 = random()
+            u2 = 1.0 - random()
+            z = NV_MAGICCONST*(u1-0.5)/u2
+            zz = z*z/4.0
+            if zz <= -_log(u2):
+                break
+        return mu + z*sigma
+    */
+    double z;
+    while (true) {
+        double u1 = mtRandDouble();
+        double u2 = 1 - mtRandDouble();
+        z = SEQAN_NV_MAGICCONST * (u1 - 0.5) / u2;
+        double zz = z * z / 4.0;
+        if (zz < -::std::log10(u2))
+            break;
+    }
+    return mean + z * stddev;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// Lognormal Distribution Heuristics.
+
+inline double
+lognormRand(double mean, double stddev)
+{
+  return ::std::exp(normRand(mean, stddev));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}  // namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/misc/misc_set.h b/src/SeqAn-1.3/seqan/misc/misc_set.h
new file mode 100644
index 0000000..528f29c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_set.h
@@ -0,0 +1,613 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MISC_SET_H
+#define SEQAN_HEADER_MISC_SET_H
+
+#include <set>
+#include <seqan/misc/misc_base.h>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	//////////////////////////////////////////////////////////////////////////////
+	// 
+	//	VectorSet_
+	// 
+	//////////////////////////////////////////////////////////////////////////////
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// forward declaration
+
+	template <typename TElement, typename TSpec>
+	class VectorSet_;
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// internal set meta-functions
+
+	template <typename TElement>
+	struct VectorSetKeySize_ {
+		enum { VALUE = ValueSize< typename Key<TElement>::Type >::VALUE };
+	};
+
+
+	template <typename TSet>
+	struct SetSetVector_ {
+		typedef void* Type;
+	};
+	template <typename TElement, typename TSpec>
+	struct SetSetVector_< VectorSet_<TElement, TSpec> > {
+		typedef String<bool, TSpec> Type;
+	};
+	template <typename TSet>
+	struct SetSetVector_<TSet const> {
+		typedef typename SetSetVector_<TSet>::Type const Type;
+	};
+
+
+
+	template <typename TSet>
+	struct SetObjVector_ {
+		typedef void* Type;
+	};
+	template <typename TKey, typename TObject, typename TPairSpec, typename TSpec>
+	struct SetObjVector_< VectorSet_<Pair<TKey, TObject, TPairSpec>, TSpec> > {
+		typedef String<TObject, TSpec> Type;
+	};
+	template <typename TSet>
+	struct SetObjVector_<TSet const> {
+		typedef typename SetObjVector_<TSet>::Type const Type;
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// VectorSet_ class
+
+	template <
+		typename TElement = char,
+		typename TSpec = Alloc<> /*Array<VectorSetKeySize_<TKey>::VALUE>*/
+	>
+	class VectorSet_ {
+	public:
+		typedef typename SetSetVector_<VectorSet_>::Type		TSetVector;
+		typedef typename SetObjVector_<VectorSet_>::Type		TObjVector;
+		typedef typename Size<VectorSet_>::Type				TSize;
+
+		TSetVector	vector;
+		TObjVector	obj;
+		TSize		size;
+
+		VectorSet_():
+			size(0)	
+		{
+			_autoSize(*this);
+			clear(*this);
+		}
+
+		VectorSet_(TSize _vectorSize):
+			size(0)	
+		{
+			resize(vector, _vectorSize);
+			clear(*this);
+		}
+		
+		template <typename TSet_>
+		inline void _autoSize(TSet_ &) {}
+
+		template <typename TElement_>
+		inline void _autoSize(VectorSet_<TElement_, Alloc<> > &) {
+			resize(vector, (unsigned)ValueSize<TElement_>::VALUE);
+		}
+
+		template <typename TKey_, typename TObject_, typename TSpec_>
+		inline void _autoSize(VectorSet_<Pair<TKey_, TObject_, TSpec_>, Alloc<> > &) {
+			resize(vector, (unsigned)ValueSize<TKey_>::VALUE);
+			resize(obj, (unsigned)ValueSize<TKey_>::VALUE);
+		}
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// set meta-functions
+
+	template <typename TElement, typename TSpec>
+	struct Value< VectorSet_<TElement, TSpec> > {
+		typedef TElement Type;
+	};
+	template <typename TElement, typename TSpec>
+	struct Size< VectorSet_<TElement, TSpec> >:
+		Size< SetSetVector_< VectorSet_<TElement, TSpec> > > {};
+
+	template <typename TElement, typename TSpec>
+	struct Key< VectorSet_<TElement, TSpec> > :
+		Key<TElement> {};
+
+	template <typename TElement, typename TSpec>
+	struct Object< VectorSet_<TElement, TSpec> > :
+		Object<TElement> {};
+
+	template <typename TObject, typename TSpec>
+	inline typename Size< VectorSet_<TObject, TSpec> >::Type 
+	length(VectorSet_<TObject, TSpec> const &set) {
+		return set.size;
+	}
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	//
+
+	struct VectorSetIterator_;
+	typedef Tag<VectorSetIterator_> VectorSetIterator__;
+
+	template <typename TVectorSet>
+	class Iter< TVectorSet, VectorSetIterator__ > 
+	{
+		typedef typename SetSetVector_<TVectorSet>::Type		TSetVector;
+		typedef typename SetObjVector_<TVectorSet>::Type		TObjVector;
+
+		typedef Iter											iterator;
+		typedef typename Value<TSetVector>::Type				TValue, value;
+		typedef typename Iterator<TSetVector, Rooted>::Type		TSetIter;
+		typedef typename Iterator<TObjVector, Standard>::Type	TObjIter;
+
+	public:
+		TSetIter	ptr;
+		TObjIter	obj;
+
+		Iter():
+			obj(NULL) {}
+
+		Iter(TSetIter _ptr, TObjIter _obj):
+			ptr(_ptr), obj(_obj)
+		{
+			while (!(*ptr) && !atEnd(ptr)) {
+				++ptr;
+				++obj;
+			}
+		}
+
+//		inline TValue operator*() { return TValue(ptr - begin, *obj); }
+
+		inline iterator operator++() {
+			++ptr;
+			++obj;
+			while (!(*ptr) && !atEnd(ptr)) {
+				++ptr;
+				++obj;
+			}
+			return *this;
+		}
+	};
+
+
+	template <typename TObject, typename TSpec, typename TIteratorSpec>
+	struct Iterator< VectorSet_<TObject, TSpec>, TIteratorSpec > {
+		typedef Iter<VectorSet_<TObject, TSpec>, VectorSetIterator__> Type;
+	};
+	template <typename TObject, typename TSpec, typename TIteratorSpec>
+	struct Iterator< VectorSet_<TObject, TSpec> const, TIteratorSpec> {
+		typedef Iter<VectorSet_<TObject, TSpec> const, VectorSetIterator__> Type;
+	};
+
+	template <typename TValue, typename TSpec>
+	finline void 
+	clear(VectorSet_<TValue, TSpec> &set) {
+		arrayFill(begin(set.vector), end(set.vector), false);
+		set.size = 0;
+	}
+
+	template <typename TElement, typename TSetKey, typename TSpec>
+	finline void 
+	insert(TElement const &element, VectorSet_<TSetKey, TSpec> &set) {
+		if (!set.vector[(unsigned)(element)]) {
+			++set.size;
+			set.vector[(unsigned)(element)] = true;
+		}
+	}
+	template <
+		typename TElement,
+		typename TSetKey, 
+		typename TSetObject, 
+		typename TPairSpec, 
+		typename TSpec>
+	finline void 
+	insert(TElement const &element, VectorSet_< Pair<TSetKey, TSetObject, TPairSpec>, TSpec > &set) {
+		if (!set.vector[(unsigned)(keyOf(element))]) {
+			++set.size;
+			set.vector[(unsigned)(keyOf(element))] = true;
+		}
+		set.obj[(unsigned)(keyOf(element))] = objectOf(element);
+	}
+
+	template <typename TKey, typename TValue, typename TSpec>
+	finline void 
+	erase(TKey const &key, VectorSet_<TValue, TSpec> &set) {
+		if (set.vector[(unsigned)(key)]) {
+			--set.size;
+			set.vector[(unsigned)(key)] = false;
+		}
+	}
+
+	template <typename TKey, typename TValue, typename TSpec>
+	finline bool 
+	in(TKey const &key, VectorSet_<TValue, TSpec> const &set) {
+		return set.vector[(unsigned)(key)];
+	}
+
+	template <typename TKey, typename TKey2, typename TSpec>
+	inline typename Iterator< VectorSet_<TKey2, TSpec> >::Type 
+	find(TKey const &key, VectorSet_<TKey2, TSpec> &set) {
+		if (in(key, set))
+			return Iter<VectorSet_<TKey2, TSpec>, VectorSetIterator__>
+				(begin(set.vector, Rooted()) + (unsigned)(key),
+				 begin(set.obj, Standard()) + (unsigned)(key));
+		else
+			return end(set);
+	}
+	template <typename TKey, typename TKey2, typename TSpec>
+	inline typename Iterator< VectorSet_<TKey2, TSpec> const>::Type 
+	find(TKey const &key, VectorSet_<TKey2, TSpec> const &set) {
+		if (in(key, set))
+			return Iter<VectorSet_<TKey2, TSpec> const, VectorSetIterator__>
+				(begin(set.vector, Rooted()) + (unsigned)(key), 
+				 begin(set.obj, Standard()) + (unsigned)(key));
+		else
+			return end(set);
+	}
+
+	template <typename TElement, typename TSpec>
+	inline typename Iterator< VectorSet_<TElement, TSpec> >::Type 
+	begin(VectorSet_<TElement, TSpec> &set) {
+		return Iter<VectorSet_<TElement, TSpec>, VectorSetIterator__> 
+			(begin(set.vector, Rooted()), begin(set.obj, Standard()));
+	}
+	template <typename TElement, typename TSpec>
+	inline typename Iterator< VectorSet_<TElement, TSpec> const>::Type 
+	begin(VectorSet_<TElement, TSpec> const &set) {
+		return Iter<VectorSet_<TElement, TSpec> const, VectorSetIterator__> 
+			(begin(set.vector, Rooted()), begin(set.obj, Standard()));
+	}
+
+	template <typename TElement, typename TSpec>
+	inline typename Iterator< VectorSet_<TElement, TSpec> >::Type 
+	end(VectorSet_<TElement, TSpec> &set) {
+		return Iter<VectorSet_<TElement, TSpec>, VectorSetIterator__> 
+			(end(set.vector, Rooted()), begin(set.obj, Standard()));
+	}
+	template <typename TElement, typename TSpec>
+	inline typename Iterator< VectorSet_<TElement, TSpec> const>::Type 
+	end(VectorSet_<TElement, TSpec> const &set) {
+		return Iter<VectorSet_<TElement, TSpec> const, VectorSetIterator__> 
+			(end(set.vector, Rooted()), begin(set.obj, Standard()));
+	}
+
+	template <typename TSet>
+	inline bool 
+	operator==(Iter<TSet, VectorSetIterator__> const &a, Iter<TSet, VectorSetIterator__> const &b) {
+		return a.ptr == b.ptr;
+	}
+	template <typename TSet>
+	inline bool 
+	operator!=(Iter<TSet, VectorSetIterator__> const &a, Iter<TSet, VectorSetIterator__> const &b) {
+		return a.ptr != b.ptr;
+	}
+	template <typename TSet>
+	inline bool 
+	eof(Iter<TSet, VectorSetIterator__> const &a) {
+		return atEnd(a.ptr);
+	}
+	template <typename TSet>
+	inline bool 
+	atEnd(Iter<TSet, VectorSetIterator__> const &a) {
+		return atEnd(a.ptr);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TSet>
+	inline typename Key<TSet>::Type
+	keyOf(Iter<TSet, VectorSetIterator__> &it) {
+		return position(it.ptr);
+	}
+	template <typename TSet>
+	inline typename Key<TSet>::Type
+	keyOf(Iter<TSet, VectorSetIterator__> const &it) {
+		return position(it.ptr);
+	}
+
+	template <typename TSet>
+	inline typename Object<TSet>::Type &
+	objectOf(Iter<TSet, VectorSetIterator__> &it) {
+		return *it.obj;
+	}
+	template <typename TSet>
+	inline typename Object<TSet>::Type &
+	objectOf(Iter<TSet, VectorSetIterator__> const &it) {
+		return *it.obj;
+	}
+
+
+
+//____________________________________________________________________________
+
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// 
+	//	STL set adaptation
+	// 
+	//////////////////////////////////////////////////////////////////////////////
+
+
+	template <typename TElement>
+	struct SetLess_ : public ::std::binary_function<TElement, TElement, bool>
+	{
+		// key less
+		inline bool operator() (TElement const &a, TElement const &b) {
+			return keyOf(a) < keyOf(b);
+		}
+	};
+
+/* DISABLED: this part of code interferes with map_adapter_stl.h
+
+	template <typename TElement>
+	struct Value< ::std::set<TElement> > {
+		typedef TElement Type;
+	};
+	template <typename TElement>
+	struct Size< ::std::set<TElement> > {
+		typedef typename ::std::set<TElement>::size_type Type;
+	};
+
+	template <typename TElement>
+	struct Key< ::std::set<TElement> > :
+		Key<TElement> {};
+
+	template <typename TElement>
+	struct Object< ::std::set<TElement> > :
+		Object<TElement> {};
+
+
+
+	template <typename TKey>
+	inline void 
+	clear(::std::set<TKey> &set) {
+		set.clear();
+	}
+
+	template <typename TElement, typename TSetKey>
+	inline void 
+	insert(TElement const &element, ::std::set<TSetKey> &set) {
+		set.insert(element);
+	}
+
+	template <typename TKey, typename TSetKey>
+	inline void 
+	erase(TKey const &key, ::std::set<TSetKey> &set) {
+		set.erase(key);
+	}
+	template <typename TKey, typename TSetKey, typename TSetObject, typename TPairSpec>
+	inline void 
+	erase(TKey const &key, ::std::set< Pair<TSetKey, TSetObject, TPairSpec> > &set) {
+		set.erase(Pair<TSetKey, TSetObject, TPairSpec>(key, TSetObject()));
+	}
+
+	template <typename TKey, typename TSetKey>
+	inline bool 
+	in(TKey const &key, ::std::set<TSetKey> const &set) {
+		return set.count(key) != 0;
+	}
+	template <typename TKey, typename TSetKey, typename TSetObject, typename TPairSpec>
+	inline bool 
+	in(TKey const &key, ::std::set<Pair<TSetKey, TSetObject, TPairSpec> > const &set) {
+		return set.count(Pair<TSetKey, TSetObject, TPairSpec>(key, TSetObject())) != 0;
+	}
+
+	template <typename TKey>
+	inline typename Size< ::std::set<TKey> >::Type 
+	length(::std::set<TKey> const &set) {
+		return set.size();
+	}
+
+	template <typename TKey, typename TSetKey>
+	inline typename Iterator< ::std::set<TSetKey> >::Type 
+	find(TKey const &key, ::std::set<TSetKey> &set) {
+		return set.find(key);
+	}
+	template <typename TKey, typename TSetKey>
+	inline typename Iterator< ::std::set<TSetKey> const>::Type 
+	find(TKey const &key, ::std::set<TSetKey> const &set) {
+		return set.find(key);
+	}
+	template <typename TKey, typename TSetKey, typename TSetObject, typename TPairSpec>
+	inline typename Iterator< ::std::set<Pair<TSetKey, TSetObject, TPairSpec> > >::Type 
+	find(TKey const &key, ::std::set<Pair<TSetKey, TSetObject> > &set) {
+		return set.find(Pair<TSetKey, TSetObject>(key, TSetObject()));
+	}
+	template <typename TKey, typename TSetKey, typename TSetObject>
+	inline typename Iterator< ::std::set<Pair<TSetKey, TSetObject> > const>::Type 
+	find(TKey const &key, ::std::set<Pair<TSetKey, TSetObject> > const &set) {
+		return set.find(Pair<TSetKey, TSetObject>(key, TSetObject()));
+	}
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TObject>
+	struct Iterator< ::std::set<TObject> > {
+		typedef typename ::std::set<TObject>::iterator Type;
+	};
+	template <typename TObject>
+	struct Iterator< ::std::set<TObject> const > {
+		typedef typename ::std::set<TObject>::const_iterator Type;
+	};
+
+
+	template <typename TObject>
+	typename Iterator< ::std::set<TObject> >::Type begin(::std::set<TObject> &set) {
+		return set.begin();
+	}
+	template <typename TObject>
+	typename Iterator< ::std::set<TObject> const >::Type begin(::std::set<TObject> const &set) {
+		return set.begin();
+	}
+	template <typename TObject>
+	typename Iterator< ::std::set<TObject> >::Type end(::std::set<TObject> &set) {
+		return set.end();
+	}
+	template <typename TObject>
+	typename Iterator< ::std::set<TObject> const >::Type end(::std::set<TObject> const &set) {
+		return set.end();
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TElement>
+	inline typename Key< ::std::set<TElement> >::Type &
+	keyOf(typename ::std::set<TElement>::iterator &it) {
+		return keyOf(*it);
+	}
+	template <typename TElement>
+	inline typename Key< ::std::set<TElement> >::Type &
+	keyOf(typename ::std::set<TElement>::iterator const &it) {
+		return keyOf(*it);
+	}
+	template <typename TElement>
+	inline typename Key< ::std::set<TElement> >::Type const &
+	keyOf(typename ::std::set<TElement>::const_iterator &it) {
+		return keyOf(*it);
+	}
+	template <typename TElement>
+	inline typename Key< ::std::set<TElement> >::Type const &
+	keyOf(typename ::std::set<TElement>::const_iterator const &it) {
+		return keyOf(*it);
+	}
+
+	template <typename TElement>
+	inline typename Object< ::std::set<TElement> >::Type &
+	objectOf(typename ::std::set<TElement>::iterator &it) {
+		return objectOf(*it);
+	}
+	template <typename TElement>
+	inline typename Object< ::std::set<TElement> >::Type &
+	objectOf(typename ::std::set<TElement>::iterator const &it) {
+		return objectOf(*it);
+	}
+	template <typename TElement>
+	inline typename Object< ::std::set<TElement> >::Type const &
+	objectOf(typename ::std::set<TElement>::const_iterator &it) {
+		return objectOf(*it);
+	}
+	template <typename TElement>
+	inline typename Object< ::std::set<TElement> >::Type const &
+	objectOf(typename ::std::set<TElement>::const_iterator const &it) {
+		return objectOf(*it);
+	}
+
+
+*/
+
+//____________________________________________________________________________
+
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// 
+	//	Set chooser
+	// 
+	//////////////////////////////////////////////////////////////////////////////
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// Set meta-function to choose an efficient implementation
+
+	template <typename TKey>
+	struct Set {
+		typedef ::std::set<TKey> Type;
+	};
+	template <typename TKey, typename TObject, typename TPairSpec>
+	struct Set< Pair<TKey, TObject, TPairSpec> > {
+		typedef ::std::set< 
+			Pair<TKey, TObject, TPairSpec>, 
+			SetLess_< Pair<TKey, TObject, TPairSpec> > > Type;
+	};
+
+
+	template <typename TValue, typename TSpec>
+	struct Set< SimpleType<TValue, TSpec> > {
+		typedef VectorSet_< SimpleType<TValue, TSpec> > Type;
+	};
+	template <typename TValue, typename TSpec, typename TObject, typename TPairSpec>
+	struct Set< Pair<SimpleType<TValue, TSpec>, TObject, TPairSpec> > {
+		typedef VectorSet_< Pair<SimpleType<TValue, TSpec>, TObject, TPairSpec> > Type;
+	};
+
+
+	template <>
+	struct Set<char> {
+		typedef VectorSet_<char> Type;
+	};
+	template <typename TObject, typename TPairSpec>
+	struct Set< Pair<char, TObject, TPairSpec> > {
+		typedef VectorSet_< Pair<char, TObject, TPairSpec> > Type;
+	};
+
+
+	template <>
+	struct Set<signed char> {
+		typedef VectorSet_<signed char> Type;
+	};
+	template <typename TObject, typename TPairSpec>
+	struct Set< Pair<signed char, TObject, TPairSpec> > {
+		typedef VectorSet_< Pair<signed char, TObject, TPairSpec> > Type;
+	};
+
+	template <>
+	struct Set<unsigned char> {
+		typedef VectorSet_<unsigned char> Type;
+	};
+	template <typename TObject, typename TPairSpec>
+	struct Set< Pair<unsigned char, TObject, TPairSpec> > {
+		typedef VectorSet_< Pair<unsigned char, TObject, TPairSpec> > Type;
+	};
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/misc/misc_svg.h b/src/SeqAn-1.3/seqan/misc/misc_svg.h
new file mode 100644
index 0000000..0b7f071
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/misc_svg.h
@@ -0,0 +1,470 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MISC_SVG_H
+#define SEQAN_HEADER_MISC_SVG_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// SVG File Context
+//////////////////////////////////////////////////////////////////////////////
+
+struct SVGFile
+{
+	std::fstream file;
+
+	Pair<int> cursor;
+	String<CharString> style;
+	
+	int dpSequence;
+	int dpMatrix;
+	int dpTrace;
+	
+	int text;
+	
+	int readForward;
+	int readReverse;
+	int readText;
+	int rulerTextTicks;
+	int rulerTextLabel;
+
+	friend inline void svgWriteHeader(SVGFile &svg);
+	friend inline void svgWriteFooter(SVGFile &svg);
+	
+	template <typename TFileName>
+	friend inline bool open(SVGFile &svg, TFileName const &fileName);
+	friend inline bool close(SVGFile &svg);
+	
+	SVGFile():
+		cursor(0,0) 
+	{
+		resetStyles();
+	}
+
+	SVGFile(char const *fileName):
+		cursor(0,0) 
+	{
+		resetStyles();
+		open(*this, fileName);
+	}
+
+	~SVGFile()
+	{
+		close(*this);
+	}
+
+private:
+
+	inline void resetStyles()
+	{
+		clear(style);
+		readText = dpSequence = length(style);
+		appendValue(style, "style=\"text-anchor:middle; font-family:Bitstream Vera Sans,Verdana,sans-serif;\" font-size=\"18px\"");
+		text = length(style);
+		appendValue(style, "style=\"text-anchor:middle; font-family:Courier New,Verdana,sans-serif; font-weight:bold;\" font-size=\"20px\"");
+		rulerTextTicks = length(style);
+		appendValue(style, "style=\"text-anchor:middle; font-family:Verdana,sans-serif;\" font-size=\"6px\"");
+		rulerTextLabel = length(style);
+		appendValue(style, "style=\"text-anchor:left; font-family:Verdana,sans-serif; font-weight:bold;\" font-size=\"8px\"");
+
+		dpMatrix = length(style);
+		appendValue(style, "style=\"stroke:lightgray;stroke-width:1;\" marker-end=\"url(#startMarkerNormal)\"");
+		dpTrace = length(style);
+		appendValue(style, "style=\"stroke:black;stroke-width:2;\" marker-end=\"url(#startMarkerBold)\"");
+
+		readForward = length(style);
+		appendValue(style, "style=\"stroke:darkblue;stroke-width:3;\"");
+		appendValue(style, "style=\"stroke:lightblue;stroke-width:1;\"");
+		appendValue(style, "style=\"stroke:darkblue;stroke-width:3;\" marker-end=\"url(#startMarkerForward)\"");
+		appendValue(style, "style=\"stroke:lightblue;stroke-width:1;\" marker-end=\"url(#startMarkerForward)\"");
+		readReverse = length(style);
+		appendValue(style, "style=\"stroke:darkred;stroke-width:3;\"");
+		appendValue(style, "style=\"stroke:salmon;stroke-width:1;\"");
+		appendValue(style, "style=\"stroke:darkred;stroke-width:3;\" marker-end=\"url(#startMarkerReverse)\"");
+		appendValue(style, "style=\"stroke:salmon;stroke-width:1;\" marker-end=\"url(#startMarkerReverse)\"");
+	}
+};
+
+inline void svgWriteHeader(SVGFile &svg)
+{
+	svg.file << "<?xml version=\"1.0\"?>" << std::endl;
+	svg.file << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"" << std::endl;
+	svg.file << "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">" << std::endl;
+	svg.file << std::endl;
+	svg.file << "<svg version=\"1.1\"" << std::endl;
+	svg.file << "    xmlns=\"http://www.w3.org/2000/svg\"" << std::endl;
+	svg.file << "    xmlns:xlink=\"http://www.w3.org/1999/xlink\">" << std::endl;
+    svg.file << "<defs>" << std::endl;
+
+	// trace back arrow markers
+    svg.file << "	<g id=\"arrowMarker\" stroke-linecap=\"round\">" << std::endl;
+    svg.file << "		<line x1=\"-6\" y1=\"1.5\" x2=\"0\" y2=\"0\" />" << std::endl;
+    svg.file << "		<line x1=\"-6\" y1=\"-1.5\" x2=\"0\" y2=\"0\" />" << std::endl;
+    svg.file << "	</g>" << std::endl;
+    svg.file << "	<marker id=\"startMarkerNormal\" markerWidth=\"6\" markerHeight=\"3\" style=\"overflow:visible\" orient=\"auto\" markerUnits=\"userSpaceOnUse\">" << std::endl;
+    svg.file << "		<use xlink:href=\"#arrowMarker\" stroke=\"lightgray\" />" << std::endl;
+    svg.file << "	</marker>" << std::endl;
+    svg.file << "	<marker id=\"startMarkerBold\" markerWidth=\"6\" markerHeight=\"4\" style=\"overflow:visible\" orient=\"auto\" markerUnits=\"userSpaceOnUse\">" << std::endl;
+    svg.file << "		<use xlink:href=\"#arrowMarker\" stroke-width=\"2\" stroke=\"black\" />" << std::endl;
+    svg.file << "	</marker>" << std::endl;
+
+	// read mapping arrow markers
+    svg.file << "	<marker id=\"startMarkerForward\" markerWidth=\"10\" markerHeight=\"4\" style=\"overflow:visible\" orient=\"auto\" markerUnits=\"userSpaceOnUse\">" << std::endl;
+    svg.file << "		<polyline points=\"-8,0 -9,-6 3,0 -9,6 -8,0\" fill=\"darkblue\" />" << std::endl;
+    svg.file << "	</marker>" << std::endl;
+    svg.file << "	<marker id=\"startMarkerReverse\" markerWidth=\"10\" markerHeight=\"4\" style=\"overflow:visible\" orient=\"auto\" markerUnits=\"userSpaceOnUse\">" << std::endl;
+    svg.file << "		<polyline points=\"-8,0 -9,-6 3,0 -9,6 -8,0\" fill=\"darkred\" />" << std::endl;
+    svg.file << "	</marker>" << std::endl;
+	
+    svg.file << " </defs>" << std::endl;
+	svg.file << std::endl;
+}
+
+inline void svgWriteFooter(SVGFile &svg)
+{
+	svg.file << std::endl;
+	svg.file << "</svg>" << std::endl;
+}
+
+
+template <typename TFileName>
+inline bool open(SVGFile &svg, TFileName const &fileName)
+{
+	svg.file.open(fileName, std::ios_base::out);
+	if (!svg.file.is_open()) return false;
+	svgWriteHeader(svg);
+	return true;
+}
+
+inline bool close(SVGFile &svg)
+{
+	if (svg.file.is_open())
+	{
+		svgWriteFooter(svg);
+		svg.file.close();
+	}
+	return true;
+}
+
+template <typename TChar>
+inline void
+_streamPut(SVGFile & svg, TChar character)
+{
+	if (convert<char>(character) == '\n')
+	{
+		++svg.cursor.i2;
+		svg.cursor.i1 = 0;
+	} else if (convert<char>(character) == '\t')
+	{
+		svg.cursor.i1 = (svg.cursor.i1 & ~7) + 8;
+	} else
+	{
+		if (convert<char>(character) != ' ')
+		{
+			svg.file << "<g transform=\"translate(" << svg.cursor.i1*20+10 << ',' << svg.cursor.i2*20+10 << ")\"><text y=\"0.3em\" " << svg.style[svg.text] << '>';
+			_streamPut(svg.file, convert<char>(character));
+			svg.file << "</text></g>" << std::endl;
+		}
+		++svg.cursor.i1;
+	}
+}
+
+template <typename TFormatTag, typename TContigGaps, typename TContigName>
+inline void _printContig(
+	SVGFile &svg, 
+	Tag<TFormatTag> const &format,
+	AlignedReadLayout &, 
+	TContigGaps &contigGaps,
+	TContigName const &contigName)
+{
+	typedef typename Iterator<TContigGaps, Standard>::Type TContigIterator;
+
+	TContigIterator cit = begin(contigGaps, Standard());
+	TContigIterator citEnd = end(contigGaps, Standard());	
+	for (__int64 ofs = 0; cit != citEnd; ++cit, ++ofs)
+	{
+		if (!isGap(cit))
+		{
+			if (ofs == 0)
+			{
+				svg.file << "<g transform=\"translate(" << ofs*20+2 << ',' << svg.cursor.i2*20+10 << ")\"><text y=\"0.3em\" " << svg.style[svg.rulerTextLabel] << '>';
+				svg.file << contigName << "</text></g>" << std::endl;
+			}
+			
+			__int64 seqPos = cit.current.seqPos + 1;
+			if (seqPos % 5 == 0)
+			{
+				if (seqPos % 10 == 0)
+				{
+					if (ofs >= 5)
+					{
+						svg.file << "<g transform=\"translate(" << ofs*20+10 << ',' << svg.cursor.i2*20+10 << ")\"><text y=\"0.3em\" " << svg.style[svg.rulerTextTicks] << '>';
+						svg.file << seqPos << "</text></g>" << std::endl;
+					}
+					
+					svg.file << "<line x1=\"" << ofs*20+10 << "\" x2=\"" << ofs*20+10 << "\" ";
+					svg.file << "y1=\"" << svg.cursor.i2*20+12 << "\" y2=\"" << svg.cursor.i2*20+15 << "\" ";
+				} else {
+					svg.file << "<line x1=\"" << ofs*20+10 << "\" x2=\"" << ofs*20+10 << "\" ";
+					svg.file << "y1=\"" << svg.cursor.i2*20+12 << "\" y2=\"" << svg.cursor.i2*20+15 << "\" ";
+				}
+				svg.file << "stroke-width=\"1\" stroke=\"gray\" />" << std::endl;
+			}
+		}
+	}
+	_streamPut(svg, '\n');
+	
+	int savedStyle = svg.text;
+	svg.text = svg.readText;
+	write(svg, contigGaps, "", format);
+	svg.text = savedStyle;
+}
+
+template <typename TFormatTag, typename TContigGaps, typename TReadGaps, typename TAlignedRead, typename TLine>
+inline void _printRead(
+	SVGFile &svg, 
+	Tag<TFormatTag> const &,
+	AlignedReadLayout &layout, 
+	TContigGaps &contigGaps,
+	TReadGaps &readGaps,
+	TAlignedRead &alignedRead,
+	TLine line)
+{
+	typedef typename Iterator<TContigGaps, Standard>::Type TContigIterator;
+	typedef typename Iterator<TReadGaps, Standard>::Type TIterator;
+
+	__int64 x;
+	__int64 xEnd;
+	int style, arrow;
+	const char *first;
+	const char *second;
+	if (alignedRead.beginPos < alignedRead.endPos)
+	{
+		xEnd = alignedRead.beginPos * 20;
+		x = xEnd + 5;
+		first = "<line x1=\"";
+		second = "\" x2=\"";
+		style = svg.readForward;
+		arrow = 0;
+	} else {
+		xEnd = alignedRead.endPos * 20;
+		x = xEnd + 10;
+		first = "<line x2=\"";
+		second = "\" x1=\"";
+		style = svg.readReverse;
+		arrow = 2;
+	}
+	line = svg.cursor.i2 * 20 + 10;
+	
+	if (length(layout.mateCoords) <= alignedRead.pairMatchId)
+		resize(layout.mateCoords, alignedRead.pairMatchId + 1, Pair<int>(-1,-1));
+	else
+	{
+		if (layout.mateCoords[alignedRead.pairMatchId].i2 != -1)
+		{
+			Pair<__int64> a(alignedRead.beginPos * 20, line);
+			Pair<__int64> b(layout.mateCoords[alignedRead.pairMatchId]);
+			if (a.i1 < b.i1)
+			{
+				Pair<__int64> tmp = a;
+				a = b;
+				b = tmp;
+			}
+			__int64 dx = (b.i1 - a.i1);
+			__int64 dy = (b.i2 - a.i2);
+			
+			svg.file << "<path d=\"M " << a.i1 << ',' << a.i2;
+			svg.file << " C " << a.i1+dy/10 << ',' << a.i2-dx/10;
+			svg.file << ' ' << b.i1+dy/10 << ',' << b.i2-dx/10;
+			svg.file << ' ' << b.i1 << ',' << b.i2;
+			svg.file << "\" stroke-width=\"2\" stroke=\"black\" stroke-opacity=\"0.2\" fill=\"none\"/>";
+		}
+		else
+			layout.mateCoords[alignedRead.pairMatchId] = Pair<int>(alignedRead.beginPos * 20, line);
+	}
+	
+
+	TContigIterator cit = begin(contigGaps, Standard()) + _min(alignedRead.beginPos, alignedRead.endPos);
+	TIterator it = begin(readGaps, Standard());
+	TIterator itEnd = end(readGaps, Standard());
+	int lastWasGap = -1;
+	int inGap;
+	
+	for (; it != itEnd; ++it, ++cit, xEnd += 20)
+	{
+		inGap = isGap(it);
+		if (lastWasGap != inGap || inGap != static_cast<int>(isGap(cit)) || (!inGap && convert<Dna5>(*cit) != convert<Dna5>(*it)))
+		{
+			if (x < xEnd && lastWasGap != -1)
+			{
+				svg.file << first << x << "\" y1=\"" << line << second << xEnd; 
+				svg.file << "\" y2=\"" << line << "\" " << svg.style[style + arrow + lastWasGap] << " />" << std::endl;
+				arrow = 0;
+			}
+			lastWasGap = inGap;
+			x = xEnd;
+			if (!inGap && convert<Dna5>(*cit) != convert<Dna5>(*it))
+			{
+				svg.file << "<g transform=\"translate(" << xEnd + 10 << ',' << line << ")\"><text y=\"0.3em\" " << svg.style[svg.readText] << '>';
+				_streamPut(svg.file, convert<char>(*it));
+				svg.file << "</text></g>" << std::endl;
+				x += 20;
+				arrow = 0;
+			}
+		}
+	}
+	if (x < xEnd && lastWasGap != -1)
+	{
+		if (alignedRead.beginPos < alignedRead.endPos)
+		{
+			arrow = 2;
+			xEnd -= 10;
+		} else
+			xEnd -= 5;
+		svg.file << first << x << "\" y1=\"" << line << second << xEnd;
+		svg.file << "\" y2=\"" << line << "\" " << svg.style[style + arrow + lastWasGap] << " />" << std::endl;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// stream operators
+//////////////////////////////////////////////////////////////////////////////
+/*
+template <typename TSource>
+inline SVGFile &
+operator << (SVGFile & target, 
+			 TSource  source)
+{
+SEQAN_CHECKPOINT
+	write(target, source);
+	return target;
+}
+*/
+
+inline SVGFile &
+operator << (SVGFile & target, char source)
+{
+SEQAN_CHECKPOINT
+	write(target, source);
+	return target;
+}
+
+inline SVGFile &
+operator << (SVGFile & target, char const *source)
+{
+SEQAN_CHECKPOINT
+	write(target, source);
+	return target;
+}
+
+
+template <typename TStringSet, typename TTrace, typename TIndexPair>
+void
+_alignNeedlemanWunschMatrix(SVGFile& svg,
+							  TStringSet const& str,
+							  TTrace const& trace,
+							  TIndexPair const&)
+{
+SEQAN_CHECKPOINT
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename Value<TTrace>::Type TTraceValue;
+
+	// TraceBack values
+	const int Diagonal = 0; 
+	const int Horizontal = 1; 
+	const int Vertical = 2;
+	
+	// Initialization
+	TSize numCols = length(str[0]);
+	TSize numRows = length(str[1]);
+
+	// Print trace matrix	
+	for (TSize pos0 = 0; pos0 < numCols; ++pos0)
+	{
+		for (TSize pos1 = 0; pos1 < numRows; ++pos1)
+		{
+			int tv =(int)trace[pos0*numRows + pos1];
+				if (tv & (1 << Diagonal))
+					svg.file << "<line x2=\"" << pos0*20+10 << "\" y2=\"" << pos1*20+10 << "\"" << " x1=\"" << (pos0+1)*20+10 << "\" y1=\"" << (pos1+1)*20+10 << "\" " << svg.style[svg.dpMatrix] << " />" << std::endl;
+				
+				if (tv & (1 << Horizontal))
+					svg.file << "<line x2=\"" << pos0*20+10 << "\" y2=\"" << (pos1+1)*20+10 << "\"" << " x1=\"" << (pos0+1)*20+10 << "\" y1=\"" << (pos1+1)*20+10 << "\" " << svg.style[svg.dpMatrix] << " />" << std::endl;
+
+				if (tv & (1 << Vertical))
+					svg.file << "<line x2=\"" << (pos0+1)*20+10 << "\" y2=\"" << pos1*20+10 << "\"" << " x1=\"" << (pos0+1)*20+10 << "\" y1=\"" << (pos1+1)*20+10 << "\" " << svg.style[svg.dpMatrix] << " />" << std::endl;
+		}
+	}
+
+	// Print sequences
+	for (TSize pos0 = 0; pos0 < numCols; ++pos0)
+		svg.file << "<g transform=\"translate(" << pos0*20+20 << ",5)\"><text y=\"0.3em\" " << svg.style[svg.dpSequence] << '>' << str[0][pos0] << "</text></g>" << std::endl;
+
+	for (TSize pos1 = 0; pos1 < numRows; ++pos1)
+		svg.file << "<g transform=\"translate(0," << pos1*20+25 << ")\"><text y=\"0.3em\" " << svg.style[svg.dpSequence] << '>' << str[1][pos1] << "</text></g>" << std::endl;
+}
+
+template <typename TStringSet, typename TId, typename TPos, typename TTraceValue>
+inline void
+_alignTracePrint(SVGFile& svg,
+				   TStringSet const&,
+				   TId const,
+				   TPos pos1,
+				   TId const,
+				   TPos pos2,
+				   TPos const segLen,
+				   TTraceValue const tv)
+{
+	// TraceBack values
+	TTraceValue Diagonal = 0; TTraceValue Horizontal = 1; TTraceValue Vertical = 2;
+
+	svg.file << "<line x2=\"" << pos1*20+10 << "\" y2=\"" << pos2*20+10 << "\"";
+	if (tv == Diagonal) {
+		pos1 += segLen; pos2 += segLen;
+	} else if (tv == Horizontal) {
+		pos1 += segLen;
+	} else if (tv == Vertical) {
+		pos2 += segLen;
+	}
+	svg.file << " x1=\"" << pos1*20+10 << "\" y1=\"" << pos2*20+10;
+	svg.file << "\" " << svg.style[svg.dpTrace] << " />" << std::endl;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/misc/priority_type_base.h b/src/SeqAn-1.3/seqan/misc/priority_type_base.h
new file mode 100644
index 0000000..1150728
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/priority_type_base.h
@@ -0,0 +1,82 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PRIORITY_TYPE_BASE_H
+#define SEQAN_HEADER_PRIORITY_TYPE_BASE_H
+
+#include <functional>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct PriorityHeap;
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Class.PriorityType:
+..cat:Miscellaneous
+..summary:Stores items in such a way that the item with the highest priority is at the top.
+..signature:PriorityType<TValue, TLess, TSpec>
+..param.TValue:The value type that is stored.
+...default:int
+..param.TLess:The comparator type that is used for sorting the items stored.
+...default:std::less<TValue>
+..param.TSpec:The specializing type.
+...default:@Spec.PriorityHeap@
+..include:seqan/misc.h
+*/
+template <typename TValue = int, typename TLess = ::std::less<TValue>, typename TSpec = PriorityHeap>
+class PriorityType;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TLess, typename TSpec>
+struct Value< PriorityType<TValue, TLess, TSpec> >
+{
+	typedef TValue Type;
+};
+
+template <typename TValue, typename TLess, typename TSpec>
+struct Size< PriorityType<TValue, TLess, TSpec> >
+{
+	typedef typename Size<TValue>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/misc/priority_type_heap.h b/src/SeqAn-1.3/seqan/misc/priority_type_heap.h
new file mode 100644
index 0000000..118049d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/misc/priority_type_heap.h
@@ -0,0 +1,357 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PRIORITY_TYPE_TREE_H
+#define SEQAN_HEADER_PRIORITY_TYPE_TREE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Spec.PriorityHeap
+..cat:Miscellaneous
+..general:Class.PriorityType
+..summary:Stores the priority data on a heap.
+..signature:PriorityType<TValue, TLess, PriorityHeap> >
+..include:seqan/misc.h
+*/
+template < typename TValue, typename TLess>
+class PriorityType<TValue,TLess,PriorityHeap>
+{
+public: 
+	typedef String<TValue> THeap;
+//____________________________________________________________________________
+
+	TLess less;
+	THeap heap;
+//____________________________________________________________________________
+
+	inline PriorityType()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	inline explicit PriorityType(TLess const & _less):
+		less(_less)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	inline PriorityType(PriorityType const & _other):
+		less(_other.less),
+		heap(_other.heap)
+	{
+SEQAN_CHECKPOINT
+	}
+		
+//	inline PriorityType const &
+//	operator = (PriorityType const & other_)
+//	{
+//		less = other_.less;
+//		heap = other_.heap;
+//		return *this;
+//	}
+	
+}; // class PriorityType
+
+
+
+
+// Empty the priority queue
+///.Function.clear.param.object.type:Class.PriorityType
+template <typename TValue, typename TLess>
+inline void 
+clear (PriorityType<TValue,TLess, PriorityHeap> & me)
+{
+	clear(me.heap); 
+}
+
+// true if priority queue is empty 
+///.Function.empty.param.object.type:Class.PriorityType
+template <typename TValue, typename TLess>
+inline bool 
+empty(PriorityType<TValue, TLess, PriorityHeap> const & me) 
+{
+SEQAN_CHECKPOINT
+	return empty(me.heap); 
+}
+
+// Number of elements in the priority queue
+///.Function.length.param.object.type:Class.PriorityType
+template <typename TValue, typename TLess>
+inline typename Size<PriorityType<TValue, TLess, PriorityHeap> >::Type
+length( PriorityType<TValue, TLess, PriorityHeap> const & me)
+{ 
+SEQAN_CHECKPOINT
+	return length(me.heap);
+}
+
+
+
+
+
+
+// Return the `best' element
+/**
+.Function.PriorityType#top:
+..summary:Reference to the item with the highest priority.
+..cat:Content Manipulation
+..signature:top(object)
+..param.object:A priority queue.
+...type:Class.PriorityType
+..remarks:To delete this item and adjust the priority queue use @Function.PriorityType#pop at .
+..see:Function.PriorityType#pop
+..see:Function.PriorityType#push
+..include:seqan/misc.h
+*/
+template <typename TValue, typename TLess>
+inline TValue & 
+top(PriorityType<TValue, TLess, PriorityHeap> & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.heap, beginPosition(me.heap));
+}
+
+template <typename TValue, typename TLess>
+inline TValue const & 
+top(PriorityType<TValue, TLess, PriorityHeap> const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.heap, beginPosition(me.heap));
+}
+
+// Copy heap position i to heap position h.
+template <typename TValue, typename TLess, typename TSize>
+inline void 
+_copyHeapElement (PriorityType<TValue, TLess, PriorityHeap> & me, TSize i, TSize & h)
+{
+SEQAN_CHECKPOINT
+	me.heap[h] = me.heap[i];
+	h = i;
+}
+
+// Copy element to heap position h.
+template <typename TValue, typename TLess, typename TSize>
+inline void 
+_copyHeapElement (PriorityType<TValue, TLess, PriorityHeap> & me, TValue const & element, TSize h)
+{
+SEQAN_CHECKPOINT
+	me.heap[h] = element;
+}
+
+/////////////////////////////////////////////////////////////////////////////////
+//  lower priority of first element in queue 
+/**
+.Function.adjustTop
+..cat:Miscellaneous
+..summary:Adjusts the priority of the first item.
+..param.object
+...type:Class.PriorityType
+..include:seqan/misc.h
+*/
+template <typename TValue, typename TLess>
+inline void 
+adjustTop (PriorityType<TValue, TLess, PriorityHeap> & me)	// so k�nnte man es dann auch nennen
+{
+SEQAN_CHECKPOINT
+	if (!empty(me.heap))
+		_adjustHeapTowardLeaves (me, me.heap[0], 0, 2);
+}
+
+////////////
+//?? adjustHeapElement...
+/////////////
+
+/////////////////////////////////////////////////////////////////////////////////
+/// Push a new element
+/**
+.Function.PriorityType#push:
+..summary:Inserts a new item and adjusts the priority queue if necessary.
+..cat:Content Manipulation
+..signature:push(object, element)
+..param.object:A priority queue.
+...type:Class.PriorityType
+..param.element:The item to be inserted in the priority queue.
+...metafunction:Metafunction.Value
+..remarks:The result of this operation is stored in $object$.
+..see:Function.PriorityType#top
+..see:Function.PriorityType#pop
+..include:seqan/misc.h
+*/
+template <typename TValue, typename TLess>
+inline void 
+push (PriorityType<TValue, TLess, PriorityHeap> & me, TValue const & element)
+{
+SEQAN_CHECKPOINT
+	// root index is zero
+	if (empty(me.heap)) {
+		resize(me.heap, 1, Generous());
+		_copyHeapElement (me, element, 0);
+		return;
+	}
+	typedef typename Size<PriorityType<TValue, TLess, PriorityHeap> >::Type TSize;
+	TSize h = length(me.heap); 
+	resize(me.heap, h + 1, Generous());
+	_adjustHeapTowardRoot(me, element, h); 
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+/// Priority got better.  Perform a cyclic shift along the tree edges toward root.
+template <typename TValue, typename TLess, typename TSize>
+inline void 
+_adjustHeapTowardRoot(
+	PriorityType<TValue, TLess, PriorityHeap> & me, 
+	TValue const & element, 
+	TSize h )
+{
+SEQAN_CHECKPOINT
+	// root index is zero
+	while ( h > 0) {
+		const TSize i = (h-1)/2; 
+		if ( me.less ( me.heap[i], element ) )
+			_copyHeapElement ( me, i, h );
+		else
+			break;
+	}
+	_copyHeapElement ( me, element, h );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/// Pop 'best' element
+/**
+.Function.PriorityType#pop:
+..summary:Deletes item with the highest priority and adjusts the priority queue.
+..cat:Content Manipulation
+..signature:pop(object)
+..param.object:A priority queue.
+...type:Class.PriorityType
+..remarks:This function only deletes this item, but does not return it. To access the item use @Function.PriorityType#top at .
+..see:Function.PriorityType#top
+..see:Function.PriorityType#push
+..include:seqan/misc.h
+*/
+template <typename TValue, typename TLess>
+inline void 
+pop (PriorityType<TValue, TLess, PriorityHeap> & me)
+{
+SEQAN_CHECKPOINT
+	// root index is zero
+	TValue element = getValue(me.heap,endPosition(me.heap)-1); 
+	typedef typename Size<PriorityType<TValue, TLess, PriorityHeap> >::Type TSize;
+	TSize heapsize = length(me.heap) - 1 ;
+	resize(me.heap, heapsize, Generous());
+	if ( heapsize > 0 ) 
+		_adjustHeapTowardLeaves(me, element, 0, 2 );
+
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+/// Priority got worse. Perform a cyclic shift along the tree edges toward leaves.
+template <typename TValue, typename TLess, typename TSize>
+inline void 
+_adjustHeapTowardLeaves(
+	PriorityType<TValue, TLess, PriorityHeap> & me, 
+	TValue element, 
+	TSize h, 
+	TSize i ) //f�r mich: h=0, i=1
+{
+SEQAN_CHECKPOINT
+	// root index is zero
+	const TSize heapsize = length(me.heap);
+	TLess less = me.less;
+	while ( i < heapsize )
+	{
+		if ( less ( element, me.heap[i] ) )
+			if ( less ( me.heap[i-1], me.heap[i] ) )
+				_copyHeapElement ( me, i, h );
+			else
+				_copyHeapElement ( me, i-1, h );
+		else
+			if ( less ( element, me.heap[i-1] ) )
+				_copyHeapElement ( me, i-1, h );
+			else
+				break;
+		i = 2*(h+1);
+	}
+	if ( i == heapsize && less ( element, me.heap[i-1] ) )
+		_copyHeapElement ( me, i-1, h );
+	_copyHeapElement ( me, element, h );
+}
+
+
+	//MetaFunctions
+
+///.Metafunction.Size.param.T.type:Class.PriorityType
+template < typename TValue, typename TLess>
+struct Size<PriorityType<TValue, TLess, PriorityHeap> >
+{
+	typedef typename Size<typename PriorityType<TValue, TLess, PriorityHeap>::THeap>::Type Type;
+};
+
+///.Metafunction.Value.param.T.type:Class.PriorityType
+template < typename TValue, typename TLess>
+struct Value<PriorityType<TValue, TLess, PriorityHeap> >
+{
+	typedef TValue Type;
+};
+
+
+
+
+////////////////////////
+// debug
+//template <typename TValue, typename THeap, typename TLess>
+//void check(PriorityType<TValue, THeap, TLess> & me) { // debug
+//	typedef typename Size<PriorityType<TValue, THeap, TLess> >::Type TSize;
+//	bool okay = true;
+//	for ( TSize i = 1; i < length(me.heap)-1; ++i )
+//		if ( me.less ( me.heap[(i-1)/2], me.heap[i] ) ) {
+//			cout << '\n' << (i-1)/2 << " < " << i << " : "<< (me.heap[(i-1)/2]).value_ << " !< " << (me.heap[i]).value_;
+//			okay = false;
+//		}
+//	if ( okay )
+//		cout << " ... seems okay\n";
+//	else
+//		cout << "\n... there were errors!\n";
+//}
+
+	//////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/modifier.h b/src/SeqAn-1.3/seqan/modifier.h
new file mode 100644
index 0000000..950d140
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier.h
@@ -0,0 +1,70 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MODIFIER_H
+#define SEQAN_HEADER_MODIFIER_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <functional>
+#include <list>
+
+//____________________________________________________________________________
+// basics
+
+#include <seqan/sequence.h> //also include basic.h
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/modifier/modifier_generated_forwards.h>
+#endif
+
+//____________________________________________________________________________
+
+#include <seqan/modifier/modifier_alphabet.h>
+#include <seqan/modifier/modifier_alphabet_expansion.h>
+
+//____________________________________________________________________________
+
+#include <seqan/modifier/modifier_iterator.h>
+#include <seqan/modifier/modifier_string.h>
+
+//____________________________________________________________________________
+// applications
+
+#include <seqan/modifier/modifier_functors.h>
+#include <seqan/modifier/modifier_view.h>
+#include <seqan/modifier/modifier_reverse.h>
+#include <seqan/modifier/modifier_shortcuts.h>
+
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/modifier/modifier_alphabet.h b/src/SeqAn-1.3/seqan/modifier/modifier_alphabet.h
new file mode 100644
index 0000000..9ce2806
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier/modifier_alphabet.h
@@ -0,0 +1,774 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MODIFIER_ALPHABET_H
+#define SEQAN_HEADER_MODIFIER_ALPHABET_H
+
+namespace seqan
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.ModifiedAlphabet:
+..summary:Modifies value types.
+..cat:Modifier
+..signature:ModifiedAlphabet<TAlphabet, TSpec>
+..param.TAlphabet:Original value type.
+..param.TSpec:The modifier type.
+...metafunction:Metafunction.Spec
+...remarks:There is no default specialization.
+..include:seqan/modifier.h
+*/
+
+template <typename THost, typename TSpec>
+class ModifiedAlphabet;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// sizes
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec>
+struct BitsPerValue<ModifiedAlphabet<THost, TSpec> >
+    : BitsPerValue<THost>
+{};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec>
+struct ValueSize<ModifiedAlphabet<THost, TSpec> >
+    : ValueSize<THost>
+{};
+
+//////////////////////////////////////////////////////////////////////////////
+// conversions
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTarget, typename T, typename THost, typename TSpec>
+inline typename Convert<TTarget, THost>::Type
+convertImpl(Convert<TTarget, T> const convert_,
+			ModifiedAlphabet<THost, TSpec> const & source_)
+{
+    SEQAN_CHECKPOINT;
+	return convertImpl(convert_, static_cast<THost const &>(source_));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec>
+inline unsigned ordValue(ModifiedAlphabet<THost,TSpec> const &c) 
+{
+    SEQAN_CHECKPOINT;
+	return ordValue(static_cast<THost const &>(c));
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// comparisons
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename THost, typename TSpec, typename TRight>
+struct CompareType<ModifiedAlphabet<THost, TSpec>, TRight>
+{
+	typedef typename CompareType<THost, TRight>::Type Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// operator ==
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator==(ModifiedAlphabet<THost, TSpec> const & left_, 
+           TRight const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename THost, typename TSpec>
+inline bool
+operator==(TLeft const & left_, 
+           ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec>
+inline bool
+operator==(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, 
+           ModifiedAlphabet<TRightHost, TRightSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<TLeftHost, TLeftSpec> TLeft;
+	typedef ModifiedAlphabet<TRightHost, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+template <typename THost, typename TSpec>
+inline bool
+operator==(ModifiedAlphabet<THost, TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	return ordValue(left_) == ordValue(right_);
+}
+
+//SimpleType
+
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator==(SimpleType<TValue, TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator==(ModifiedAlphabet<THost, TSpec2> const & left_,
+           SimpleType<TValue, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+//Proxy
+
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator==(Proxy<TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef Proxy<TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator==(ModifiedAlphabet<THost, TSpec2> const & left_,
+			 Proxy<TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) == convert<TCompareType>(right_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator !=
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator!=(ModifiedAlphabet<THost, TSpec> const & left_, 
+           TRight const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename THost, typename TSpec>
+inline bool
+operator!=(TLeft const & left_, 
+           ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec>
+inline bool
+operator!=(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, 
+			 ModifiedAlphabet<TRightHost, TRightSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<TLeftHost, TLeftSpec> TLeft;
+	typedef ModifiedAlphabet<TRightHost, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+template <typename THost, typename TSpec>
+inline bool
+operator!=(ModifiedAlphabet<THost, TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	return ordValue(left_) != ordValue(right_);
+}
+
+//SimpleType
+
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator!=(SimpleType<TValue, TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator!=(ModifiedAlphabet<THost, TSpec2> const & left_,
+           SimpleType<TValue, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+//Proxy
+
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator!=(Proxy<TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef Proxy<TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator!=(ModifiedAlphabet<THost, TSpec2> const & left_,
+           Proxy<TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) != convert<TCompareType>(right_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator <=
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator<=(ModifiedAlphabet<THost, TSpec> const & left_, 
+           TRight const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename THost, typename TSpec>
+inline bool
+operator<=(TLeft const & left_, 
+           ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec>
+inline bool
+operator<=(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, 
+			 ModifiedAlphabet<TRightHost, TRightSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<TLeftHost, TLeftSpec> TLeft;
+	typedef ModifiedAlphabet<TRightHost, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+template <typename THost, typename TSpec>
+inline bool
+operator<=(ModifiedAlphabet<THost, TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	return ordValue(left_) <= ordValue(right_);
+}
+
+//SimpleType
+
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator<=(SimpleType<TValue, TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator<=(ModifiedAlphabet<THost, TSpec2> const & left_,
+           SimpleType<TValue, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+//Proxy
+
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator<=(Proxy<TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef Proxy<TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator<=(ModifiedAlphabet<THost, TSpec2> const & left_,
+           Proxy<TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) <= convert<TCompareType>(right_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator <
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator<(ModifiedAlphabet<THost, TSpec> const & left_, 
+          TRight const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename THost, typename TSpec>
+inline bool
+operator<(TLeft const & left_, 
+          ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec>
+inline bool
+operator<(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, 
+          ModifiedAlphabet<TRightHost, TRightSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<TLeftHost, TLeftSpec> TLeft;
+	typedef ModifiedAlphabet<TRightHost, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+template <typename THost, typename TSpec>
+inline bool
+operator<(ModifiedAlphabet<THost, TSpec> const & left_, 
+          ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	return ordValue(left_) < ordValue(right_);
+}
+
+//SimpleType
+
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator<(SimpleType<TValue, TSpec> const & left_, 
+          ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator<(ModifiedAlphabet<THost, TSpec2> const & left_,
+          SimpleType<TValue, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+//Proxy
+
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator<(Proxy<TSpec> const & left_, 
+          ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef Proxy<TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator<(ModifiedAlphabet<THost, TSpec2> const & left_,
+          Proxy<TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) < convert<TCompareType>(right_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator >=
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator>=(ModifiedAlphabet<THost, TSpec> const & left_, 
+           TRight const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename THost, typename TSpec>
+inline bool
+operator>=(TLeft const & left_, 
+           ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec>
+inline bool
+operator>=(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, 
+           ModifiedAlphabet<TRightHost, TRightSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<TLeftHost, TLeftSpec> TLeft;
+	typedef ModifiedAlphabet<TRightHost, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+template <typename THost, typename TSpec>
+inline bool
+operator>=(ModifiedAlphabet<THost, TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	return ordValue(left_) >= ordValue(right_);
+}
+
+//SimpleType
+
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator>=(SimpleType<TValue, TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator>=(ModifiedAlphabet<THost, TSpec2> const & left_,
+           SimpleType<TValue, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+//Proxy
+
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator>=(Proxy<TSpec> const & left_, 
+           ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef Proxy<TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator>=(ModifiedAlphabet<THost, TSpec2> const & left_,
+           Proxy<TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) >= convert<TCompareType>(right_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator >
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator>(ModifiedAlphabet<THost, TSpec> const & left_, 
+          TRight const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+template <typename TLeft, typename THost, typename TSpec>
+inline bool
+operator>(TLeft const & left_, 
+          ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec>
+inline bool
+operator>(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, 
+          ModifiedAlphabet<TRightHost, TRightSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<TLeftHost, TLeftSpec> TLeft;
+	typedef ModifiedAlphabet<TRightHost, TRightSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+template <typename THost, typename TSpec>
+inline bool
+operator>(ModifiedAlphabet<THost, TSpec> const & left_, 
+          ModifiedAlphabet<THost, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	return ordValue(left_) > ordValue(right_);
+}
+
+//SimpleType
+
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator>(SimpleType<TValue, TSpec> const & left_, 
+          ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef SimpleType<TValue, TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+template <typename TValue, typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator>(ModifiedAlphabet<THost, TSpec2> const & left_,
+          SimpleType<TValue, TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef SimpleType<TValue, TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+//Proxy
+
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator>(Proxy<TSpec> const & left_, 
+          ModifiedAlphabet<THost, TSpec2> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef Proxy<TSpec> TLeft;
+	typedef ModifiedAlphabet<THost, TSpec> TRight;
+	typedef typename CompareType<TRight, TLeft>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+template <typename TSpec, typename THost, typename TSpec2>
+inline bool
+operator>(ModifiedAlphabet<THost, TSpec2> const & left_,
+          Proxy<TSpec> const & right_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, TSpec> TLeft;
+	typedef Proxy<TSpec> TRight;
+	typedef typename CompareType<TLeft, TRight>::Type TCompareType;
+	return convert<TCompareType>(left_) > convert<TCompareType>(right_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTarget, typename TSource>
+inline void
+_initializeAlphabetConversionTable(TTarget *,
+								   TSource const &)
+{
+    SEQAN_CHECKPOINT;
+	//default: do nothing (because this array is not used)
+	//define this function for each conversion table
+}
+
+
+template <typename TTarget, typename TSource>
+struct AlphabetConversionTable_
+{
+	enum { SIZE = InternalValueSize_<TSource>::VALUE };
+private:
+	static TTarget table_store[SIZE];
+public:
+	static TTarget * table;
+	static TTarget * initialize()
+	{
+        SEQAN_CHECKPOINT;
+		static bool _is_initialized = false;
+		if (! _is_initialized)
+		{
+			_initializeAlphabetConversionTable(table_store, TSource());
+		}
+		_is_initialized = true;
+		return table_store;
+	}
+};
+
+template <typename TTarget, typename TSource>
+TTarget AlphabetConversionTable_<TTarget, TSource>::table_store[AlphabetConversionTable_<TTarget, TSource>::SIZE];
+
+
+template <typename TTarget, typename TSource>
+TTarget * AlphabetConversionTable_<TTarget, TSource>::table = AlphabetConversionTable_<TTarget, TSource>::initialize();
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTarget, typename TSource>
+inline void
+_initializeAlphabetOrdTable(TTarget *,
+							TSource const &)
+{
+    SEQAN_CHECKPOINT;
+	//default: do nothing (because this array is not used)
+	//define this function for each conversion table
+}
+
+
+template <typename TSource>
+struct AlphabetOrdTable_
+{
+	enum { SIZE = InternalValueSize_<TSource>::VALUE };
+private:
+	static unsigned table_store[SIZE];
+public:
+	static unsigned * table;
+	static unsigned * initialize()
+	{
+        SEQAN_CHECKPOINT;
+		static bool _is_initialized = false;
+		if (! _is_initialized)
+		{
+			_initializeAlphabetOrdTable(table_store, TSource());
+		}
+		_is_initialized = true;
+		return table_store;
+	}
+};
+
+
+template <typename TSource>
+unsigned AlphabetOrdTable_<TSource>::table_store[AlphabetOrdTable_<TSource>::SIZE];
+
+
+template <typename TSource>
+unsigned * AlphabetOrdTable_<TSource>::table = AlphabetOrdTable_<TSource>::initialize();
+
+}  // namespace seqan
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/modifier/modifier_alphabet_expansion.h b/src/SeqAn-1.3/seqan/modifier/modifier_alphabet_expansion.h
new file mode 100644
index 0000000..b18eef4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier/modifier_alphabet_expansion.h
@@ -0,0 +1,494 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MODIFIER_ALPHABET_EXPANSION_H
+#define SEQAN_HEADER_MODIFIER_ALPHABET_EXPANSION_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Alphabet Expansion:
+..summary:Modifier that adds a character to an alphabet.
+..cat:Modifier
+..signature:ModifiedAlphabet<TAlphabet, ModExpand<CHAR [,TSpec]> >
+..param.TAlphabet:Original value type.
+..param.CHAR:$char$ character that specifies, what value should added to the alphabet.
+...remarks:$CHAR$ should not be a $char$ that already stands for a value in $TAlphabet$.
+	For example, do not use $'A'$ or $'a'$ as $CHAR$ when expanding @Spec.Dna at .
+...remarks:Some values of $CHAR$ have special meaning:
+....table:$'-'$|A gap character. The value in the expanded alphabet that corresponds to $'-'$ will be returned by the @Function.gapValue at .
+....table:$'\$'$|An end of string character.
+..param.TSpec:Optional specialization tag.
+...default:$Default$
+...remarks:This modifier is intended to expand @Class.SimpleType@ classes.
+..include:seqan/modifier.h
+*/
+
+template <char CHAR, typename TSpec = Default>
+struct ModExpand;
+
+
+template <typename THost, char CHAR, typename TSpec>
+class ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >
+{
+public:
+	typedef typename IntegralForValue<ModifiedAlphabet>::Type TData;
+	TData data;
+
+	ModifiedAlphabet() 
+	{
+	}
+	ModifiedAlphabet(ModifiedAlphabet const & other)
+		: data(_internalOrdValue(other))
+	{
+	}
+	template <typename TOther>
+	ModifiedAlphabet(TOther const & other_data)
+		: data(_internalOrdValue(convert<ModifiedAlphabet>(other_data)))
+	{
+	}
+	~ModifiedAlphabet()
+	{
+	}
+	ModifiedAlphabet const & 
+	operator = (ModifiedAlphabet const & other)
+	{
+		data = other.data;
+		return *this;
+	}
+	template <typename TOther>
+	ModifiedAlphabet const & 
+	operator = (TOther const & other_data)
+	{
+		data = _internalOrdValue(convert<ModifiedAlphabet>(other_data));
+		return *this;
+	}
+
+/*	operator TData ()
+	{
+		return data;
+	}
+
+	operator THost()
+	{
+		return convert<THost>(data);
+	}
+*/
+//____________________________________________________________________________
+
+	//TODO(weese): investigate the issue below
+	//this cannot be a template since a template would be in conflict to
+	//the template c'tor
+
+/*
+	// weese: I tried the template below without problems in the tests
+	template <typename TValue>
+	operator TValue() const
+	{
+SEQAN_CHECKPOINT
+		return convert<TValue>(*this);
+	}
+*/
+	operator long() const
+	{
+SEQAN_CHECKPOINT
+		return convert<long>(*this);
+	}
+	operator unsigned long() const
+	{
+SEQAN_CHECKPOINT
+		return convert<unsigned long>(*this);
+	}
+	operator int() const
+	{
+SEQAN_CHECKPOINT
+		return convert<int>(*this);
+	}
+	operator unsigned int() const
+	{
+SEQAN_CHECKPOINT
+		return convert<unsigned int>(*this);
+	}
+	operator short() const
+	{
+SEQAN_CHECKPOINT
+		return convert<short>(*this);
+	}
+	operator unsigned short() const
+	{
+SEQAN_CHECKPOINT
+		return convert<unsigned short>(*this);
+	}
+	operator char() const
+	{
+SEQAN_CHECKPOINT
+		return convert<char>(*this);
+	}
+	operator signed char() const
+	{
+SEQAN_CHECKPOINT
+		return convert<signed char>(*this);
+	}
+	operator unsigned char() const
+	{
+SEQAN_CHECKPOINT
+		return convert<unsigned char>(*this);
+	}
+};
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// sizes
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, char CHAR, typename TSpec>
+struct BitsPerValue<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > >
+{
+	typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TValue;
+	enum { VALUE = Log2< ValueSize<TValue>::VALUE >::VALUE };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, char CHAR, typename TSpec>
+struct ValueSize<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > >
+{
+	enum { VALUE = ValueSize<THost>::VALUE + 1 };
+};
+
+template <typename THost, char CHAR, typename TSpec>
+struct InternalValueSize_<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > >
+{
+	enum { VALUE = InternalValueSize_<THost>::VALUE + 1 };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// _internalCreateChar
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TNum>
+inline TValue
+_internalCreateChar(TValue const &, TNum i)
+{
+	return convert<TValue>(i);
+}
+
+template <typename TValue, typename TSpec, typename TNum>
+inline SimpleType<TValue, TSpec>
+_internalCreateChar(SimpleType<TValue, TSpec> const &, TNum i)
+{
+	SimpleType<TValue, TSpec> s;
+	s.value = i;
+	return s;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// conversions
+//////////////////////////////////////////////////////////////////////////////
+
+
+// some type => ModExpand
+template <typename THost, char CHAR, typename TSpec, typename TSource>
+inline void
+_initializeAlphabetConversionTable(ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > * buf,
+								   TSource const &)
+{
+	typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TTarget;
+
+	//assure that the conversion from TSource to THost is possible
+//	AlphabetConversionTable_<THost, TSource>::initialize();
+	
+	//copy the conversion table for converting TSouce => THost
+	//maybe, if there is no CHAR in TSource, the entry for CHAR is overwritten now
+	for (int i = InternalValueSize_<TSource>::VALUE; i > 0; )
+	{
+		--i;
+		buf[i].data = _internalOrdValue(convert<THost>(_internalCreateChar(TSource(), i)));
+	}
+
+	//add the new character CHAR to the table
+	buf[_internalOrdValue(convert<TSource>(CHAR))].data = InternalValueSize_<THost>::VALUE;
+}
+
+template <int SIZE_OF_SOURCE>
+struct ConvertImplModExpand_
+{
+	//default implementation for large source types
+	template <typename THost, char CHAR, typename TSpec, typename T, typename TSource>
+	inline 
+	static typename Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, TSource>::Type
+	_convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const,
+		TSource const & source_)
+	{
+		typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TTarget;
+		if (source_ == ValueSize<THost>::VALUE)
+		{// the extra character
+			TTarget tmp;
+			tmp.data = InternalValueSize_<THost>::VALUE;
+			return tmp;
+		}
+		return convert<TTarget>(convert<THost>(source_));
+	}
+};
+
+//for 1 byte source: use translation table
+template <>
+struct ConvertImplModExpand_<1>
+{
+	template <typename THost, char CHAR, typename TSpec, typename T, typename TSource>
+	inline 
+	static typename Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, TSource>::Type
+	_convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const,
+		TSource const & source_)
+	{
+		typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TTarget;
+		TTarget * table = AlphabetConversionTable_<TTarget, TSource>::table;
+		return table[_internalOrdValue(source_)];
+	}
+};
+
+//generic source: dispatch for size of BytesPerValue
+template <typename THost, char CHAR, typename TSpec, typename T, typename TSource>
+inline typename Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, TSource>::Type
+convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const convert_,
+			TSource const & source_)
+{
+	return ConvertImplModExpand_<BytesPerValue<TSource>::VALUE>::_convertImpl(convert_, source_);
+}
+
+//for SimpleType sources
+template <typename THost, char CHAR, typename TSpec, typename T, typename TSourceValue, typename TSourceSpec>
+inline typename Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, SimpleType<TSourceValue, TSourceSpec> >::Type
+convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const,
+			SimpleType<TSourceValue, TSourceSpec> const & source_)
+{
+SEQAN_CHECKPOINT
+	typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TTarget;
+	typedef SimpleType<TSourceValue, TSourceSpec> TSource;
+	return AlphabetConversionTable_<TTarget, TSource>::table[_internalOrdValue(source_)];
+}
+
+
+// For SimpleType sources with the same underlying alphabet.
+template <char CHAR, typename TSpec, typename T, typename TSourceValue, typename TSourceSpec>
+inline typename Convert<ModifiedAlphabet<SimpleType<TSourceValue, TSourceSpec>, ModExpand<CHAR, TSpec> >, SimpleType<TSourceValue, TSourceSpec> >::Type
+convertImpl(Convert<ModifiedAlphabet<SimpleType<TSourceValue, TSourceSpec>, ModExpand<CHAR, TSpec> >, T> const,
+			SimpleType<TSourceValue, TSourceSpec> const & source_)
+{
+    SEQAN_CHECKPOINT;
+	typedef SimpleType<TSourceValue, TSourceSpec> TSource;
+	typedef ModifiedAlphabet<TSource, ModExpand<CHAR, TSpec> > TTarget;
+	
+	TTarget tmp;
+	tmp.data = _internalOrdValue(source_);
+	return tmp;
+}
+
+
+//for Proxy sources
+template <typename THost, char CHAR, typename TSpec, typename T, typename TSpec2>
+inline typename Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, Proxy<TSpec2> >::Type
+convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const,
+			Proxy<TSpec2> const & source_)
+{
+SEQAN_CHECKPOINT
+	typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TTarget;
+	return convert<TTarget>(getValue(source_));
+}
+
+
+// ModExpand => some type
+
+template <typename TTarget, typename THost, char CHAR, typename TSpec>
+inline void
+_initializeAlphabetConversionTable(TTarget * buf,
+								   ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const &)
+{
+	typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TSource;
+
+	//assure that the conversion from THost to TTarget is possible
+	AlphabetConversionTable_<TTarget, THost>::initialize(); 
+	
+	//copy the conversion table for converting THost => TTarget
+	for (int i = InternalValueSize_<THost>::VALUE; i > 0; )
+	{
+		--i;
+		buf[i] = convert<TTarget>(_internalCreateChar(THost(), i));
+	}
+
+	//add the new character CHAR to the table
+	buf[InternalValueSize_<THost>::VALUE] = convert<TTarget, char>(CHAR);
+}
+
+template <typename TTarget, typename THost, char CHAR, typename TSpec>
+inline void
+_initializeAlphabetOrdTable(TTarget * buf,
+							ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const &)
+{
+	typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TSource;
+
+	//assure that the conversion from THost to TTarget is possible
+	AlphabetOrdTable_<THost>::initialize(); 
+	
+	//copy the conversion table for converting THost => TTarget
+	for (int i = InternalValueSize_<THost>::VALUE; i > 0; )
+	{
+		--i;
+		buf[i] = ordValue(_internalCreateChar(THost(), i));
+	}
+
+	//add the new character CHAR to the table
+	buf[InternalValueSize_<THost>::VALUE] = ValueSize<THost>::VALUE;
+}
+
+
+// Conversion from modified alphabet to non-modified alphabet with an
+// arbitrary type.  The conversion is done through an alphabet
+// conversion table.  See below for a specialization where the
+// underlying type of the modified alphabet and the target type are
+// the same SimpleType specialization.
+template <typename TTarget, typename T, typename THost, char CHAR, typename TSpec>
+inline typename Convert<TTarget, ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > >::Type
+convertImpl(Convert<TTarget, T> const,
+			ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const & source_)
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TSource;
+	return AlphabetConversionTable_<TTarget, TSource>::table[_internalOrdValue(source_)];
+}
+
+
+// Conversion from modified alphabet to non-modified with the same underlying type.
+template <typename TTargetValue, typename TTargetSpec, char CHAR, typename TSpec>
+inline typename Convert<SimpleType<TTargetValue, TTargetSpec>, ModifiedAlphabet<SimpleType<TTargetValue, TTargetSpec>, ModExpand<CHAR, TSpec> > >::Type
+convertImpl(Convert<SimpleType<TTargetValue, TTargetSpec>, ModifiedAlphabet<SimpleType<TTargetValue, TTargetSpec>, ModExpand<CHAR, TSpec> > > const,
+			ModifiedAlphabet<SimpleType<TTargetValue, TTargetSpec>, ModExpand<CHAR, TSpec> > const & source_)
+{
+    SEQAN_CHECKPOINT;
+    typedef SimpleType<TTargetValue, TTargetSpec> TTarget;
+    TTarget target;
+	if (source_.data == InternalValueSize_<TTarget>::VALUE)
+		assign(target, CHAR);
+	else
+		target.value = source_.data;
+    return target;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/*
+template 
+<
+	typename TTargetHost, char TARGET_CHAR, typename TTargetSpec, typename T, 
+	typename TSourceHost, char SOURCE_CHAR, typename TSourceSpec
+>
+inline typename Convert<ModifiedAlphabet<TTargetHost, ModExpand<TARGET_CHAR, TTargetSpec> > , ModifiedAlphabet<TSourceHost, ModExpand<SOURCE_CHAR, TSourceSpec> > >::Type
+convertImpl(Convert<ModifiedAlphabet<TTargetHost, ModExpand<TARGET_CHAR, TTargetSpec> >, T> const,
+			ModifiedAlphabet<TSourceHost, ModExpand<SOURCE_CHAR, TSourceSpec> > const & source_)
+{
+	ModifiedAlphabet<TTargetHost, ModExpand<TARGET_CHAR, TTargetSpec> > TTarget;
+	ModifiedAlphabet<TSourceHost, ModExpand<SOURCE_CHAR, TSourceSpec> > TSource;
+	return convert<TTarget>(convert<TTargetHost>(convert<TSourceHost>(source_)));
+}
+*/
+
+//no conversion 
+template <typename THost, char CHAR, typename TSpec, typename T>
+inline ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >
+convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const,
+			ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const & source_)
+{
+	return source_;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, char CHAR, typename TSpec>
+inline unsigned
+_internalOrdValue(ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const & c) 
+{
+	return c.data;
+}
+
+template <typename THost, char CHAR, typename TSpec>
+inline unsigned
+ordValue(ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const & c) 
+{
+    SEQAN_CHECKPOINT;
+	typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TSource;
+	return AlphabetOrdTable_<TSource>::table[_internalOrdValue(c)];
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// comparisons
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TModExpand, typename THost, typename TRight, typename TCompareHostRight>
+struct CompareTypeModExpandImpl_
+{
+	typedef TCompareHostRight Type; //fallback
+};
+template <typename TModExpand, typename THost, typename TRight>
+struct CompareTypeModExpandImpl_<TModExpand, THost, TRight, THost>
+{
+	typedef TModExpand Type;
+};
+template <typename TModExpand, typename THost, typename TRight>
+struct CompareTypeModExpandImpl_<TModExpand, THost, TRight, TRight>
+{
+	typedef TRight Type;
+};
+
+
+template <typename THost, char CHAR, typename TSpec, typename TRight>
+struct CompareType<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, TRight>
+{
+	typedef ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > TModExpand;
+	typedef typename CompareType<THost, TRight>::Type TCompareHostRight;
+	typedef typename CompareTypeModExpandImpl_<TModExpand, THost, TRight, TCompareHostRight>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace 
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/modifier/modifier_functors.h b/src/SeqAn-1.3/seqan/modifier/modifier_functors.h
new file mode 100644
index 0000000..03eb81f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier/modifier_functors.h
@@ -0,0 +1,228 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_MODIFIER_MODIFIER_FUNCTORS_H_
+#define SEQAN_MODIFIER_MODIFIER_FUNCTORS_H_
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// text transformation
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.FunctorUpcase:
+..cat:Modifier
+..summary:Functor that returns the upper case character to a given character.
+..signature:FunctorUpcase<TValue>
+..param.TValue:The input value type.
+..remarks:This Functor is a derivation of the STL unary function.
+..include:seqan/modifier.h
+*/
+template <typename InType, typename Result = InType>
+struct FunctorUpcase : public ::std::unary_function<InType,Result> 
+{
+    inline Result operator()(InType x) const {
+        SEQAN_CHECKPOINT;
+        if (('a' <= x) && (x <= 'z')) return (x + ('A' - 'a'));
+        return x; 
+    }
+};
+
+
+/**
+.Class.FunctorLowcase:
+..cat:Modifier
+..summary:Functor that returns the lower case character to a given character.
+..signature:FunctorLowcase<TValue>
+..param.TValue:The input value type.
+..remarks:This Functor is a derivation of the STL unary function.
+..include:seqan/modifier.h
+*/
+template <typename InType, typename Result = InType>
+struct FunctorLowcase : public ::std::unary_function<InType,Result> 
+{
+    inline Result operator()(InType x) const {
+        SEQAN_CHECKPOINT;
+        if (('A' <= x) && (x <= 'Z')) return (x + ('a' - 'A'));
+        return x; 
+    }
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// alphabet transformation
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.FunctorConvert:
+..cat:Modifier
+..summary:Functor that converts a $TInValue$ type to a $TOutValue$ type character.
+..signature:FunctorConvert<TInValue, TOutValue>
+..param.TInValue:The input value type.
+..param.TOutValue:The output value type.
+..remarks:This Functor is a derivation of the STL unary function.
+..include:seqan/modifier.h
+*/
+template <typename InType, typename OutType>
+struct FunctorConvert : public ::std::unary_function<InType,OutType> 
+{
+    inline OutType operator()(InType x) const {
+        SEQAN_CHECKPOINT;
+        return x; 
+    }
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// DNA/RNA complement
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.FunctorComplement:
+..cat:Modifier
+..summary:Functor that returns the complement nucleotide to a given nucleotide.
+..signature:FunctorComplement<TValue>
+..param.TValue:The input value type.
+...type:Spec.Dna
+...type:Spec.Dna5
+...type:Spec.Rna
+...type:Spec.Rna5
+..remarks:This Functor is a derivation of the STL unary function.
+..include:seqan/modifier.h
+*/
+template <typename TValue>
+struct FunctorComplement;
+
+
+template <typename T = void>
+struct TranslateTableDna5ToDna5Complement_
+{
+    static char const VALUE[5];
+};
+
+
+template <typename T>
+char const TranslateTableDna5ToDna5Complement_<T>::VALUE[5] = {'T', 'G', 'C', 'A', 'N'};
+
+
+template <typename T = void>
+struct TranslateTableRna5ToRna5Complement_
+{
+    static char const VALUE[5];
+};
+
+
+template <typename T>
+char const TranslateTableRna5ToRna5Complement_<T>::VALUE[5] = {'U', 'G', 'C', 'A', 'N'};
+
+
+template <>
+struct FunctorComplement<char> : public ::std::unary_function<Dna5,Dna5> 
+{
+    inline Dna5 operator()(Dna5 x) const {
+        SEQAN_CHECKPOINT;
+        return TranslateTableDna5ToDna5Complement_<>::VALUE[x.value]; 
+    }
+};
+
+template <>
+struct FunctorComplement<Dna> : public ::std::unary_function<Dna,Dna> 
+{
+    inline Dna operator()(Dna x) const {
+        SEQAN_CHECKPOINT;
+        return TranslateTableDna5ToDna5Complement_<>::VALUE[x.value]; 
+    }
+};
+
+
+template <>
+struct FunctorComplement<Dna5> : public ::std::unary_function<Dna5,Dna5> 
+{
+    inline Dna5 operator()(Dna5 x) const {
+        SEQAN_CHECKPOINT;
+        return TranslateTableDna5ToDna5Complement_<>::VALUE[x.value]; 
+    }
+};
+
+
+template <>
+struct FunctorComplement<Rna> : public ::std::unary_function<Rna,Rna> 
+{
+    inline Rna operator()(Rna x) const {
+        SEQAN_CHECKPOINT;
+        return TranslateTableRna5ToRna5Complement_<>::VALUE[x.value]; 
+    }
+};
+
+
+template <>
+struct FunctorComplement<Rna5> : public ::std::unary_function<Rna5,Rna5> 
+{
+    inline Dna5 operator()(Rna5 x) const {
+        SEQAN_CHECKPOINT;
+        return TranslateTableRna5ToRna5Complement_<>::VALUE[x.value]; 
+    }
+};
+
+
+template <>
+struct FunctorComplement<DnaQ> : public ::std::unary_function<DnaQ,DnaQ> 
+{
+    inline DnaQ operator()(DnaQ x) const {
+        SEQAN_CHECKPOINT;
+        int qual = getQualityValue(x);
+        x = TranslateTableDna5ToDna5Complement_<>::VALUE[ordValue((Dna)x)];
+        assignQualityValue(x, qual);
+        return x;
+    }
+};
+
+
+template <>
+struct FunctorComplement<Dna5Q> : public ::std::unary_function<Dna5Q,Dna5Q> 
+{
+    inline Dna5Q operator()(Dna5Q x) const {
+        SEQAN_CHECKPOINT;
+        int qual = getQualityValue(x);
+        x = TranslateTableDna5ToDna5Complement_<>::VALUE[ordValue((Dna5)x)];
+        assignQualityValue(x, qual);
+        return x;
+    }
+};
+
+}  // namespace seqan
+
+#endif  // SEQAN_MODIFIER_MODIFIER_FUNCTORS_H_
diff --git a/src/SeqAn-1.3/seqan/modifier/modifier_generated_forwards.h b/src/SeqAn-1.3/seqan/modifier/modifier_generated_forwards.h
new file mode 100644
index 0000000..a3775a1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier/modifier_generated_forwards.h
@@ -0,0 +1,717 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_MODIFIER_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_MODIFIER_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// CompareTypeModExpandImpl_
+
+template <typename TModExpand, typename THost, typename TRight, typename TCompareHostRight> struct CompareTypeModExpandImpl_;       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(467)
+
+//____________________________________________________________________________
+// ConvertImplModExpand_
+
+template <int SIZE_OF_SOURCE> struct ConvertImplModExpand_;       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(251)
+
+//____________________________________________________________________________
+// FunctorComplement
+
+template <typename TValue> struct FunctorComplement;       	// "projects/library/seqan/modifier/modifier_functors.h"(127)
+
+//____________________________________________________________________________
+// FunctorConvert
+
+template <typename InType, typename OutType> struct FunctorConvert;       	// "projects/library/seqan/modifier/modifier_functors.h"(101)
+
+//____________________________________________________________________________
+// FunctorLowcase
+
+template <typename InType, typename Result > struct FunctorLowcase;       	// "projects/library/seqan/modifier/modifier_functors.h"(76)
+
+//____________________________________________________________________________
+// FunctorUpcase
+
+template <typename InType, typename Result > struct FunctorUpcase;       	// "projects/library/seqan/modifier/modifier_functors.h"(56)
+
+//____________________________________________________________________________
+// ModExpand
+
+template <char CHAR, typename TSpec > struct ModExpand;       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(62)
+
+//____________________________________________________________________________
+// ModReverse
+
+struct ModReverse;       	// "projects/library/seqan/modifier/modifier_reverse.h"(61)
+
+//____________________________________________________________________________
+// ModifiedIterator
+
+template <typename THost, typename TSpec > class ModifiedIterator;       	// "projects/library/seqan/modifier/modifier_iterator.h"(59)
+
+//____________________________________________________________________________
+// ModifiedString
+
+template <typename THost, typename TSpec > class ModifiedString;       	// "projects/library/seqan/modifier/modifier_string.h"(56)
+template <typename THost, typename TSpec> class ModifiedString;       	// "projects/library/seqan/modifier/modifier_iterator.h"(186)
+
+//____________________________________________________________________________
+// TranslateTableDna5ToDna5Complement_
+
+template <typename T > struct TranslateTableDna5ToDna5Complement_;       	// "projects/library/seqan/modifier/modifier_functors.h"(132)
+
+//____________________________________________________________________________
+// TranslateTableRna5ToRna5Complement_
+
+template <typename T > struct TranslateTableRna5ToRna5Complement_;       	// "projects/library/seqan/modifier/modifier_functors.h"(143)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// AlphabetConversionTable_
+
+template <typename TTarget, typename TSource> struct AlphabetConversionTable_;       	// "projects/library/seqan/modifier/modifier_alphabet.h"(703)
+
+//____________________________________________________________________________
+// AlphabetOrdTable_
+
+template <typename TSource> struct AlphabetOrdTable_;       	// "projects/library/seqan/modifier/modifier_alphabet.h"(745)
+
+//____________________________________________________________________________
+// ModView
+
+template <typename TFunctor> struct ModView;       	// "projects/library/seqan/modifier/modifier_view.h"(57)
+
+//____________________________________________________________________________
+// ModViewCargo
+
+template <typename TFunctor> struct ModViewCargo;       	// "projects/library/seqan/modifier/modifier_view.h"(60)
+
+//____________________________________________________________________________
+// ModifiedAlphabet
+
+template <typename THost, typename TSpec> class ModifiedAlphabet;       	// "projects/library/seqan/modifier/modifier_alphabet.h"(56)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Dna5StringComplement
+
+typedef ModifiedString<Dna5String, ModView< FunctorComplement<Dna5> > > Dna5StringComplement;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(51)
+
+//____________________________________________________________________________
+// Dna5StringReverse
+
+typedef ModifiedString<Dna5String, ModReverse> Dna5StringReverse;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(58)
+
+//____________________________________________________________________________
+// Dna5StringReverseComplement
+
+typedef ModifiedString< ModifiedString< Dna5String, ModView< FunctorComplement<Dna5> > >, ModReverse > Dna5StringReverseComplement;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(76)
+
+//____________________________________________________________________________
+// DnaStringComplement
+
+typedef ModifiedString<DnaString, ModView< FunctorComplement<Dna> > > DnaStringComplement;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(50)
+
+//____________________________________________________________________________
+// DnaStringReverse
+
+typedef ModifiedString<DnaString, ModReverse> DnaStringReverse;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(57)
+
+//____________________________________________________________________________
+// DnaStringReverseComplement
+
+typedef ModifiedString< ModifiedString<DnaString, ModView< FunctorComplement<Dna> > >, ModReverse > DnaStringReverseComplement;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(71)
+
+//____________________________________________________________________________
+// ModComplementDna
+
+typedef ModView< FunctorComplement<Dna> > ModComplementDna;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(43)
+
+//____________________________________________________________________________
+// ModComplementDna5
+
+typedef ModView< FunctorComplement<Dna5> > ModComplementDna5;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(44)
+
+//____________________________________________________________________________
+// ModComplementRna
+
+typedef ModView< FunctorComplement<Rna> > ModComplementRna;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(45)
+
+//____________________________________________________________________________
+// ModComplementRna5
+
+typedef ModView< FunctorComplement<Rna5> > ModComplementRna5;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(46)
+
+//____________________________________________________________________________
+// Rna5StringComplement
+
+typedef ModifiedString<Rna5String, ModView< FunctorComplement<Rna5> > > Rna5StringComplement;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(53)
+
+//____________________________________________________________________________
+// Rna5StringReverse
+
+typedef ModifiedString<Rna5String, ModReverse> Rna5StringReverse;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(60)
+
+//____________________________________________________________________________
+// Rna5StringReverseComplement
+
+typedef ModifiedString< ModifiedString< Rna5String, ModView< FunctorComplement<Rna5> > >, ModReverse > Rna5StringReverseComplement;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(86)
+
+//____________________________________________________________________________
+// RnaStringComplement
+
+typedef ModifiedString<RnaString, ModView< FunctorComplement<Rna> > > RnaStringComplement;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(52)
+
+//____________________________________________________________________________
+// RnaStringReverse
+
+typedef ModifiedString<RnaString, ModReverse> RnaStringReverse;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(59)
+
+//____________________________________________________________________________
+// RnaStringReverseComplement
+
+typedef ModifiedString< ModifiedString<RnaString, ModView< FunctorComplement<Rna> > >, ModReverse > RnaStringReverseComplement;       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(81)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _assignModifiedIterator
+
+template <typename TTarget, typename TSource> inline void _assignModifiedIterator(TTarget &me, TSource &_origin, True);       	// "projects/library/seqan/modifier/modifier_iterator.h"(309)
+template <typename TTarget, typename TSource> inline void _assignModifiedIterator(TTarget &me, TSource &_origin, False);       	// "projects/library/seqan/modifier/modifier_iterator.h"(316)
+
+//____________________________________________________________________________
+// _copyCargo
+
+template <typename TDest, typename TSource> inline void _copyCargo(TDest & me, TSource & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(254)
+
+//____________________________________________________________________________
+// _copyCargoImpl
+
+template <typename TDest, typename TSource> inline void _copyCargoImpl(TDest &, TSource &, False const);       	// "projects/library/seqan/modifier/modifier_string.h"(245)
+template <typename TDest, typename TSource> inline void _copyCargoImpl(TDest & me, TSource & _origin, True const);       	// "projects/library/seqan/modifier/modifier_string.h"(248)
+
+//____________________________________________________________________________
+// _dataHost
+
+template <typename THost, typename TSpec> inline Holder<THost> & _dataHost(ModifiedString<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_string.h"(211)
+template <typename THost, typename TSpec> inline Holder<THost> const & _dataHost(ModifiedString<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_string.h"(219)
+template <typename THost, typename TSpec> inline Holder<THost, Simple> & _dataHost(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(208)
+template <typename THost, typename TSpec> inline Holder<THost, Simple> const & _dataHost(ModifiedIterator<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(216)
+
+//____________________________________________________________________________
+// _initializeAlphabetConversionTable
+
+template <typename THost, char CHAR, typename TSpec, typename TSource> inline void _initializeAlphabetConversionTable(ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > * buf, TSource const &);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(231)
+template <typename TTarget, typename THost, char CHAR, typename TSpec> inline void _initializeAlphabetConversionTable(TTarget * buf, ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const &);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(342)
+
+//____________________________________________________________________________
+// _initializeAlphabetOrdTable
+
+template <typename TTarget, typename THost, char CHAR, typename TSpec> inline void _initializeAlphabetOrdTable(TTarget * buf, ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const &);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(363)
+
+//____________________________________________________________________________
+// _internalCreateChar
+
+template <typename TValue, typename TNum> inline TValue _internalCreateChar(TValue const &, TNum i);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(208)
+template <typename TValue, typename TSpec, typename TNum> inline SimpleType<TValue, TSpec> _internalCreateChar(SimpleType<TValue, TSpec> const &, TNum i);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(215)
+
+//____________________________________________________________________________
+// _internalOrdValue
+
+template <typename THost, char CHAR, typename TSpec> inline unsigned _internalOrdValue(ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const & c);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(448)
+
+//____________________________________________________________________________
+// assign
+
+template <typename THost, typename TSpec, typename THost2> inline ModifiedString<THost, TSpec> const & assign(ModifiedString<THost, TSpec> & me, ModifiedString<THost2, TSpec> & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(264)
+template <typename THost, typename TSpec, typename THost2> inline ModifiedString<THost, TSpec> const & assign(ModifiedString<THost, TSpec> & me, ModifiedString<THost2, TSpec> const & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(273)
+template <typename THost, typename TSpec, typename T> inline ModifiedString<THost, TSpec> const & assign(ModifiedString<THost, TSpec> & me, T & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(282)
+template <typename THost, typename TSpec, typename T> inline ModifiedString<THost, TSpec> const & assign(ModifiedString<THost, TSpec> & me, T const & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(290)
+template <typename THost, typename TSpec, typename THost2> inline ModifiedIterator<THost, TSpec> const & assign(ModifiedIterator<THost, TSpec> & me, ModifiedIterator<THost2, TSpec> & _origin);       	// "projects/library/seqan/modifier/modifier_iterator.h"(323)
+template <typename THost, typename TSpec, typename THost2> inline ModifiedIterator<THost, TSpec> const & assign(ModifiedIterator<THost, TSpec> & me, ModifiedIterator<THost2, TSpec> const & _origin);       	// "projects/library/seqan/modifier/modifier_iterator.h"(331)
+template <typename THost, typename TSpec, typename T> inline ModifiedIterator<THost, TSpec> const & assign(ModifiedIterator<THost, TSpec> & me, T & _origin);       	// "projects/library/seqan/modifier/modifier_iterator.h"(339)
+template <typename THost, typename TSpec, typename T> inline ModifiedIterator<THost, TSpec> const & assign(ModifiedIterator<THost, TSpec> & me, T const & _origin);       	// "projects/library/seqan/modifier/modifier_iterator.h"(347)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename THost, typename TSpec, typename TContainer> inline bool atBegin(ModifiedIterator<THost, TSpec> & me, TContainer const & container);       	// "projects/library/seqan/modifier/modifier_iterator.h"(616)
+template <typename THost, typename TSpec, typename TContainer> inline bool atBegin(ModifiedIterator<THost, TSpec> const & me, TContainer const & container);       	// "projects/library/seqan/modifier/modifier_iterator.h"(626)
+template <typename THost, typename TSpec> inline bool atBegin(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(634)
+template <typename THost, typename TSpec> inline bool atBegin(ModifiedIterator<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(643)
+template <typename THost, typename TContainer> inline bool atBegin(ModifiedIterator<THost, ModReverse> const & me, TContainer const & container);       	// "projects/library/seqan/modifier/modifier_reverse.h"(316)
+template <typename THost> inline bool atBegin(ModifiedIterator<THost, ModReverse> const & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(324)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename THost, typename TSpec, typename TContainer> inline bool atEnd(ModifiedIterator<THost, TSpec> & me, TContainer const & container);       	// "projects/library/seqan/modifier/modifier_iterator.h"(656)
+template <typename THost, typename TSpec, typename TContainer> inline bool atEnd(ModifiedIterator<THost, TSpec> const & me, TContainer const & container);       	// "projects/library/seqan/modifier/modifier_iterator.h"(666)
+template <typename THost, typename TSpec> inline bool atEnd(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(674)
+template <typename THost, typename TSpec> inline bool atEnd(ModifiedIterator<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(683)
+template <typename THost, typename TContainer> inline bool atEnd(ModifiedIterator<THost, ModReverse> const & me, TContainer const & );       	// "projects/library/seqan/modifier/modifier_reverse.h"(337)
+template <typename THost> inline bool atEnd(ModifiedIterator<THost, ModReverse> const & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(345)
+
+//____________________________________________________________________________
+// begin
+
+template <typename THost, typename TSpec > inline typename Iterator< ModifiedString<THost, TSpec> const >::Type begin(ModifiedString<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_string.h"(412)
+template <typename THost, typename TSpec > inline typename Iterator< ModifiedString<THost, TSpec> >::Type begin(ModifiedString<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_string.h"(421)
+template <typename THost, typename TSpec, typename TTagSpec > inline typename Iterator< ModifiedString<THost, TSpec> const, Tag<TTagSpec> const >::Type begin(ModifiedString<THost, TSpec> const & me, Tag<TTagSpec> const tag_);       	// "projects/library/seqan/modifier/modifier_string.h"(430)
+template <typename THost, typename TSpec, typename TTagSpec > inline typename Iterator< ModifiedString<THost, TSpec>, Tag<TTagSpec> const >::Type begin(ModifiedString<THost, TSpec> & me, Tag<TTagSpec> const tag_);       	// "projects/library/seqan/modifier/modifier_string.h"(442)
+template <typename THost, typename TTag > inline typename Iterator< ModifiedString<THost, ModReverse> const >::Type begin(ModifiedString<THost, ModReverse> const & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(463)
+template <typename THost > inline typename Iterator< ModifiedString<THost, ModReverse> >::Type begin(ModifiedString<THost, ModReverse> & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(472)
+template <typename THost, typename TTagSpec > inline typename Iterator< ModifiedString<THost, ModReverse> const, Tag<TTagSpec> const >::Type begin(ModifiedString<THost, ModReverse> const & me, Tag<TTagSpec> const);       	// "projects/library/seqan/modifier/modifier_reverse.h"(481)
+template <typename THost, typename TTagSpec > inline typename Iterator< ModifiedString<THost, ModReverse>, Tag<TTagSpec> const >::Type begin(ModifiedString<THost, ModReverse> & me, Tag<TTagSpec> const);       	// "projects/library/seqan/modifier/modifier_reverse.h"(490)
+
+//____________________________________________________________________________
+// cargo
+
+template <typename THost, typename TSpec> inline typename Reference< typename Cargo<ModifiedString<THost, TSpec> >::Type >::Type cargo(ModifiedString<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_string.h"(227)
+template <typename THost, typename TSpec> inline typename Reference< typename Cargo<ModifiedString<THost, TSpec> const>::Type >::Type cargo(ModifiedString<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_string.h"(235)
+template <typename THost, typename TSpec> inline typename Reference< typename Cargo<ModifiedIterator<THost, TSpec> >::Type >::Type cargo(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(224)
+template <typename THost, typename TSpec> inline typename Reference< typename Cargo<ModifiedIterator<THost, TSpec> const>::Type >::Type cargo(ModifiedIterator<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(232)
+
+//____________________________________________________________________________
+// complement
+
+template <typename TSequence > inline void complement(TSequence & sequence);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(106)
+template <typename TSequence > inline void complement(TSequence const & sequence);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(113)
+template <typename TSequence, typename TSpec > inline void complement(StringSet<TSequence, TSpec> & stringSet);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(127)
+template <typename TSequence, typename TSpec > inline void complement(StringSet<TSequence, TSpec> const & stringSet);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(136)
+
+//____________________________________________________________________________
+// container
+
+template <typename THost, typename TSpec> inline typename Container<ModifiedIterator<THost, TSpec> >::Type container(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(244)
+template <typename THost, typename TSpec> inline typename Container<ModifiedIterator<THost, TSpec> const>::Type container(ModifiedIterator<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(255)
+
+//____________________________________________________________________________
+// convertImpl
+
+template <typename THost, char CHAR, typename TSpec, typename T, typename TSource> inline typename Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, TSource>::Type convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const convert_, TSource const & source_);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(291)
+template <typename THost, char CHAR, typename TSpec, typename T, typename TSourceValue, typename TSourceSpec> inline typename Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, SimpleType<TSourceValue, TSourceSpec> >::Type convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const, SimpleType<TSourceValue, TSourceSpec> const & source_);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(300)
+template <char CHAR, typename TSpec, typename T, typename TSourceValue, typename TSourceSpec> inline typename Convert<ModifiedAlphabet<SimpleType<TSourceValue, TSourceSpec>, ModExpand<CHAR, TSpec> >, SimpleType<TSourceValue, TSourceSpec> >::Type convertImpl(Convert<ModifiedAlphabet<SimpleType<TSourceValue, TSourceSpec>, ModExpand<CHAR, TSpec> >, T> const, SimpleType<TSourceValue, TSourceSpec> const & source_);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(313)
+template <typename THost, char CHAR, typename TSpec, typename T, typename TSpec2> inline typename Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, Proxy<TSpec2> >::Type convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const, Proxy<TSpec2> const & source_);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(329)
+template <typename TTarget, typename T, typename THost, char CHAR, typename TSpec> inline typename Convert<TTarget, ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > >::Type convertImpl(Convert<TTarget, T> const, ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const & source_);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(390)
+template <typename TTargetValue, typename TTargetSpec, char CHAR, typename TSpec> inline typename Convert<SimpleType<TTargetValue, TTargetSpec>, ModifiedAlphabet<SimpleType<TTargetValue, TTargetSpec>, ModExpand<CHAR, TSpec> > >::Type convertImpl(Convert<SimpleType<TTargetValue, TTargetSpec>, ModifiedAlphabet<SimpleType<TTargetValue, TTargetSpec>, ModExpand<CHAR, TSpec> > > const, ModifiedAlphabet<SimpleType<TTargetValue, TTargetSpec>, ModExpand<CHAR, TSpec> > const & source_);       	//  [...]
+template <typename THost, char CHAR, typename TSpec, typename T> inline ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > convertImpl(Convert<ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> >, T> const, ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const & source_);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(438)
+
+//____________________________________________________________________________
+// end
+
+template <typename THost, typename TSpec > inline typename Iterator< ModifiedString<THost, TSpec> const >::Type end(ModifiedString<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_string.h"(458)
+template <typename THost, typename TSpec > inline typename Iterator< ModifiedString<THost, TSpec> >::Type end(ModifiedString<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_string.h"(467)
+template <typename THost, typename TSpec, typename TTagSpec > inline typename Iterator< ModifiedString<THost, TSpec> const, Tag<TTagSpec> const >::Type end(ModifiedString<THost, TSpec> const & me, Tag<TTagSpec> const tag_);       	// "projects/library/seqan/modifier/modifier_string.h"(476)
+template <typename THost, typename TSpec, typename TTagSpec > inline typename Iterator< ModifiedString<THost, TSpec>, Tag<TTagSpec> const >::Type end(ModifiedString<THost, TSpec> & me, Tag<TTagSpec> const tag_);       	// "projects/library/seqan/modifier/modifier_string.h"(485)
+template <typename THost > inline typename Iterator< ModifiedString<THost, ModReverse> const >::Type end(ModifiedString<THost, ModReverse> const & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(503)
+template <typename THost > inline typename Iterator< ModifiedString<THost, ModReverse> >::Type end(ModifiedString<THost, ModReverse> & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(512)
+template <typename THost, typename TTagSpec > inline typename Iterator< ModifiedString<THost, ModReverse> const, Tag<TTagSpec> const >::Type end(ModifiedString<THost, ModReverse> const & me, Tag<TTagSpec> const);       	// "projects/library/seqan/modifier/modifier_reverse.h"(521)
+template <typename THost, typename TTagSpec > inline typename Iterator< ModifiedString<THost, ModReverse>, Tag<TTagSpec> const >::Type end(ModifiedString<THost, ModReverse> & me, Tag<TTagSpec> const);       	// "projects/library/seqan/modifier/modifier_reverse.h"(530)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename THost, typename TSpec, typename TContainer> inline void goBegin(ModifiedIterator<THost, TSpec> & me, TContainer const & container);       	// "projects/library/seqan/modifier/modifier_iterator.h"(516)
+template <typename THost, typename TSpec> inline void goBegin(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(524)
+template <typename THost> inline void goBegin(ModifiedIterator<THost, ModReverse> & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(169)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename THost, typename TSpec, typename TContainer> inline void goEnd(ModifiedIterator<THost, TSpec> & me, TContainer const & container);       	// "projects/library/seqan/modifier/modifier_iterator.h"(537)
+template <typename THost, typename TSpec> inline void goEnd(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(545)
+template <typename THost> inline void goEnd(ModifiedIterator<THost, ModReverse> & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(156)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename THost, typename TSpec> inline void goNext(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(400)
+template <typename THost> inline void goNext(ModifiedIterator<THost, ModReverse> & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(126)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename THost, typename TSpec> inline void goPrevious(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(432)
+template <typename THost> inline void goPrevious(ModifiedIterator<THost, ModReverse> & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(141)
+
+//____________________________________________________________________________
+// id
+
+template <typename THost, typename TSpec> inline void const * id(ModifiedString<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_string.h"(639)
+template <typename THost, typename TSpec> inline void const * id(ModifiedString<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_string.h"(646)
+
+//____________________________________________________________________________
+// length
+
+template <typename THost, typename TSpec > inline typename Size< ModifiedString<THost, TSpec> >::Type length(ModifiedString<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_string.h"(401)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename THost, typename TSpec, typename TRight > inline bool operator!=(ModifiedString<THost, TSpec> const & left, TRight const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(519)
+template <typename TLeftValue, typename THost, typename TSpec > inline bool operator!= (TLeftValue * left, ModifiedString<THost, TSpec> const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(528)
+template <typename THost, typename TSpec> inline bool operator!= (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b);       	// "projects/library/seqan/modifier/modifier_iterator.h"(585)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename THost, typename TSpec> inline typename Reference<ModifiedIterator<THost, TSpec> >::Type operator* (ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(378)
+template <typename THost, typename TSpec> inline typename Reference<ModifiedIterator<THost, TSpec> const>::Type operator* (ModifiedIterator<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(386)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename THost, typename TSpec, typename TDelta> inline ModifiedIterator<THost, TSpec> operator+ (ModifiedIterator<THost, TSpec> const & me, TDelta delta);       	// "projects/library/seqan/modifier/modifier_iterator.h"(471)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename THost, typename TSpec> inline ModifiedIterator<THost, TSpec> const & operator++ (ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(408)
+template <typename THost, typename TSpec> inline ModifiedIterator<THost, TSpec> operator++ (ModifiedIterator<THost, TSpec> & me, int);       	// "projects/library/seqan/modifier/modifier_iterator.h"(417)
+
+//____________________________________________________________________________
+// operator+=
+
+template <typename THost, typename TSpec, typename TDelta> inline ModifiedIterator<THost, TSpec> & operator+= (ModifiedIterator<THost, TSpec> & me, TDelta delta);       	// "projects/library/seqan/modifier/modifier_iterator.h"(463)
+template <typename THost, typename TDelta> inline ModifiedIterator<THost, ModReverse> & operator+= (ModifiedIterator<THost, ModReverse> & me, TDelta delta_);       	// "projects/library/seqan/modifier/modifier_reverse.h"(188)
+
+//____________________________________________________________________________
+// operator-
+
+template <typename THost, typename TSpec, typename TDelta> inline ModifiedIterator<THost, TSpec> operator- (ModifiedIterator<THost, TSpec> const & me, TDelta delta);       	// "projects/library/seqan/modifier/modifier_iterator.h"(493)
+template <typename THost, typename TSpec> inline typename Difference< ModifiedIterator<THost, TSpec> >::Type operator- (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b);       	// "projects/library/seqan/modifier/modifier_iterator.h"(503)
+template <typename THost> inline typename Difference< ModifiedIterator<THost, ModReverse> >::Type operator- (ModifiedIterator<THost, ModReverse> const & a, ModifiedIterator<THost, ModReverse> const & b);       	// "projects/library/seqan/modifier/modifier_reverse.h"(241)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename THost, typename TSpec> inline ModifiedIterator<THost, TSpec> const & operator-- (ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(440)
+template <typename THost, typename TSpec> inline ModifiedIterator<THost, TSpec> operator-- (ModifiedIterator<THost, TSpec> & me, int);       	// "projects/library/seqan/modifier/modifier_iterator.h"(449)
+
+//____________________________________________________________________________
+// operator-=
+
+template <typename THost, typename TSpec, typename TDelta> inline ModifiedIterator<THost, TSpec> & operator-= (ModifiedIterator<THost, TSpec> & me, TDelta delta);       	// "projects/library/seqan/modifier/modifier_iterator.h"(485)
+template <typename THost, typename TDelta> inline ModifiedIterator<THost, ModReverse> & operator-= (ModifiedIterator<THost, ModReverse> & me, TDelta delta);       	// "projects/library/seqan/modifier/modifier_reverse.h"(222)
+
+//____________________________________________________________________________
+// operator<
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator< (ModifiedString<THost, TSpec> const & left, TRight const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(540)
+template <typename TLeftValue, typename THost, typename TSpec > inline bool operator< (TLeftValue * left, ModifiedString<THost, TSpec> const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(548)
+template <typename THost, typename TSpec> inline bool operator< (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b);       	// "projects/library/seqan/modifier/modifier_iterator.h"(596)
+template <typename THost> inline bool operator< (ModifiedIterator<THost, ModReverse> const & a, ModifiedIterator<THost, ModReverse> const & b);       	// "projects/library/seqan/modifier/modifier_reverse.h"(303)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TStream, typename THost, typename TSpec > inline TStream & operator<< (TStream & target, ModifiedString<THost, TSpec> const & source);       	// "projects/library/seqan/modifier/modifier_string.h"(617)
+
+//____________________________________________________________________________
+// operator<=
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator<= (ModifiedString<THost, TSpec> const & left, TRight const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(559)
+template <typename TLeftValue, typename THost, typename TSpec > inline bool operator<= (TLeftValue * left, ModifiedString<THost, TSpec> const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(567)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename THost, typename TSpec, typename TRight > inline bool operator== (ModifiedString<THost, TSpec> const & left, TRight const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(498)
+template <typename TLeftValue, typename THost, typename TSpec > inline bool operator== (TLeftValue * left, ModifiedString<THost, TSpec> const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(507)
+template <typename THost, typename TSpec> inline bool operator== (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b);       	// "projects/library/seqan/modifier/modifier_iterator.h"(579)
+template <typename THost> inline bool operator== (ModifiedIterator<THost, ModReverse> const & a, ModifiedIterator<THost, ModReverse> const & b);       	// "projects/library/seqan/modifier/modifier_reverse.h"(292)
+
+//____________________________________________________________________________
+// operator>
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator> (ModifiedString<THost, TSpec> const & left, TRight const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(578)
+template <typename TLeftValue, typename THost, typename TSpec > inline bool operator> (TLeftValue * left, ModifiedString<THost, TSpec> const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(586)
+template <typename THost, typename TSpec> inline bool operator> (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b);       	// "projects/library/seqan/modifier/modifier_iterator.h"(603)
+
+//____________________________________________________________________________
+// operator>=
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator>= (ModifiedString<THost, TSpec> const & left, TRight const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(597)
+template <typename TLeftValue, typename THost, typename TSpec > inline bool operator>= (TLeftValue * left, ModifiedString<THost, TSpec> const & right);       	// "projects/library/seqan/modifier/modifier_string.h"(605)
+
+//____________________________________________________________________________
+// operator>>
+
+template <typename TStream, typename THost, typename TSpec > inline TStream & operator>> (TStream & source, ModifiedString<THost, TSpec> & target);       	// "projects/library/seqan/modifier/modifier_string.h"(628)
+
+//____________________________________________________________________________
+// ordValue
+
+template <typename THost, char CHAR, typename TSpec> inline unsigned ordValue(ModifiedAlphabet<THost, ModExpand<CHAR, TSpec> > const & c);       	// "projects/library/seqan/modifier/modifier_alphabet_expansion.h"(455)
+
+//____________________________________________________________________________
+// position
+
+template <typename THost, typename TSpec> inline typename Position<ModifiedIterator<THost, TSpec> const>::Type position(ModifiedIterator<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(558)
+template <typename THost, typename TSpec, typename TContainer> inline typename Position<ModifiedIterator<THost, TSpec> const>::Type position(ModifiedIterator<THost, TSpec> const & me, TContainer const &cont);       	// "projects/library/seqan/modifier/modifier_iterator.h"(567)
+template <typename THost> inline typename Position<ModifiedIterator<THost, ModReverse> const>::Type position(ModifiedIterator<THost, ModReverse> const & me);       	// "projects/library/seqan/modifier/modifier_reverse.h"(255)
+template <typename THost, typename TContainer> inline typename Position<ModifiedIterator<THost, ModReverse> const>::Type position(ModifiedIterator<THost, ModReverse> const & me, TContainer const &cont);       	// "projects/library/seqan/modifier/modifier_reverse.h"(266)
+
+//____________________________________________________________________________
+// reverse
+
+template <typename TSequence > inline void reverse(TSequence & sequence);       	// "projects/library/seqan/modifier/modifier_reverse.h"(558)
+template <typename TSequence, typename TSpec > inline void reverse(StringSet<TSequence, TSpec> & stringSet);       	// "projects/library/seqan/modifier/modifier_reverse.h"(592)
+template <typename TSequence, typename TSpec > inline void reverse(StringSet<TSequence, TSpec> const & stringSet);       	// "projects/library/seqan/modifier/modifier_reverse.h"(601)
+template <typename TValue> inline void reverse(std::list<TValue> & list);       	// "projects/library/seqan/modifier/modifier_reverse.h"(610)
+
+//____________________________________________________________________________
+// reverseComplement
+
+template <typename TSequence > inline void reverseComplement(TSequence & sequence);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(158)
+template <typename TSequence > inline void reverseComplement(TSequence const & sequence);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(167)
+template <typename TSequence, typename TSpec > inline void reverseComplement(StringSet<TSequence, TSpec> & stringSet);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(182)
+template <typename TSequence, typename TSpec > inline void reverseComplement(StringSet<TSequence, TSpec> const & stringSet);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(192)
+
+//____________________________________________________________________________
+// reverseString
+
+template <typename THost> inline ModifiedString<THost, ModReverse> reverseString(THost const & host);       	// "projects/library/seqan/modifier/modifier_reverse.h"(621)
+
+//____________________________________________________________________________
+// setContainer
+
+template <typename TIteratorHost, typename TSpec, typename TStringHost> inline void setContainer( ModifiedIterator<TIteratorHost, TSpec> & me, ModifiedString<TStringHost, TSpec> & cont);       	// "projects/library/seqan/modifier/modifier_iterator.h"(270)
+template <typename TIteratorHost, typename TSpec, typename TStringHost> inline void setContainer( ModifiedIterator<TIteratorHost, TSpec> & me, ModifiedString<TStringHost, TSpec> const & cont);       	// "projects/library/seqan/modifier/modifier_iterator.h"(280)
+template <typename THost, typename TSpec, typename TContainer> inline void setContainer(ModifiedIterator<THost, TSpec> & me, TContainer & cont);       	// "projects/library/seqan/modifier/modifier_iterator.h"(288)
+
+//____________________________________________________________________________
+// setPosition
+
+template <typename THost, typename TPosition> inline void setPosition(ModifiedIterator<THost, ModReverse> const & me, TPosition pos);       	// "projects/library/seqan/modifier/modifier_reverse.h"(281)
+
+//____________________________________________________________________________
+// setValue
+
+template <typename THost, typename TSpec> inline ModifiedString<THost, TSpec> const & setValue(ModifiedString<THost, TSpec> & me, ModifiedString<THost, TSpec> const & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(322)
+template <typename THost, typename TSpec> inline ModifiedString<THost, TSpec> const & setValue(ModifiedString<THost, TSpec> & me, ModifiedString<THost, TSpec> & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(331)
+template <typename THost, typename THostSpec, typename TSpec, typename THost2> inline ModifiedString< ModifiedString<THost, THostSpec>, TSpec> const & setValue( ModifiedString< ModifiedString<THost, THostSpec>, TSpec> & me, THost2 const & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(344)
+template <typename THost, typename THostSpec, typename TSpec, typename THost2> inline ModifiedString< ModifiedString<THost, THostSpec>, TSpec> const & setValue( ModifiedString< ModifiedString<THost, THostSpec>, TSpec> & me, THost2 & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(355)
+template <typename THost, typename TSpec> inline ModifiedString<THost, TSpec> const & setValue(ModifiedString<THost, TSpec> & me, THost const & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(364)
+template <typename THost, typename TSpec> inline ModifiedString<THost, TSpec> const & setValue(ModifiedString<THost, TSpec> & me, THost & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(372)
+template <typename THost, typename TSpec, typename THost2> inline ModifiedString<THost, TSpec> const & setValue(ModifiedString<THost, TSpec> & me, THost2 & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(381)
+template <typename THost, typename TSpec, typename THost2> inline ModifiedString<THost, TSpec> const & setValue(ModifiedString<THost, TSpec> & me, THost2 const & _origin);       	// "projects/library/seqan/modifier/modifier_string.h"(389)
+
+//____________________________________________________________________________
+// toLower
+
+template <typename TSequence > inline void toLower(TSequence & sequence);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(216)
+template <typename TSequence > inline void toLower(TSequence const & sequence);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(224)
+template <typename TSequence, typename TSpec > inline void toLower(StringSet<TSequence, TSpec> & stringSet);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(238)
+template <typename TSequence, typename TSpec > inline void toLower(StringSet<TSequence, TSpec> const & stringSet);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(248)
+
+//____________________________________________________________________________
+// toUpper
+
+template <typename TSequence > inline void toUpper(TSequence & sequence);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(270)
+template <typename TSequence > inline void toUpper(TSequence const & sequence);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(278)
+template <typename TSequence, typename TSpec > inline void toUpper(StringSet<TSequence, TSpec> & stringSet);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(292)
+template <typename TSequence, typename TSpec > inline void toUpper(StringSet<TSequence, TSpec> const & stringSet);       	// "projects/library/seqan/modifier/modifier_shortcuts.h"(302)
+
+//____________________________________________________________________________
+// value
+
+template <typename THost, typename TSpec, typename TPos> inline typename Reference<ModifiedString<THost, TSpec> >::Type value(ModifiedString<THost, TSpec> & me, TPos pos);       	// "projects/library/seqan/modifier/modifier_string.h"(303)
+template <typename THost, typename TSpec, typename TPos> inline typename Reference<ModifiedString<THost, TSpec> const >::Type value(ModifiedString<THost, TSpec> const & me, TPos pos);       	// "projects/library/seqan/modifier/modifier_string.h"(311)
+template <typename THost, typename TSpec> inline typename Reference<ModifiedIterator<THost, TSpec> >::Type value(ModifiedIterator<THost, TSpec> & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(361)
+template <typename THost, typename TSpec> inline typename Reference<ModifiedIterator<THost, TSpec> const>::Type value(ModifiedIterator<THost, TSpec> const & me);       	// "projects/library/seqan/modifier/modifier_iterator.h"(370)
+template <typename THost, typename TPos> inline typename Reference<ModifiedString<THost, ModReverse> >::Type value(ModifiedString<THost, ModReverse> & me, TPos pos);       	// "projects/library/seqan/modifier/modifier_reverse.h"(444)
+template <typename THost, typename TPos> inline typename Reference<ModifiedString<THost, ModReverse> const>::Type value(ModifiedString<THost, ModReverse> const & me, TPos pos);       	// "projects/library/seqan/modifier/modifier_reverse.h"(452)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _initializeAlphabetConversionTable
+
+template <typename TTarget, typename TSource> inline void _initializeAlphabetConversionTable(TTarget *, TSource const &);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(694)
+
+//____________________________________________________________________________
+// _initializeAlphabetOrdTable
+
+template <typename TTarget, typename TSource> inline void _initializeAlphabetOrdTable(TTarget *, TSource const &);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(736)
+
+//____________________________________________________________________________
+// assignModViewFunctor
+
+template <typename THost, typename TFunctor> inline void assignModViewFunctor(ModifiedIterator<THost, ModView<TFunctor> > & me, TFunctor const & _func);       	// "projects/library/seqan/modifier/modifier_view.h"(205)
+template <typename THost, typename TFunctor> inline void assignModViewFunctor(ModifiedString<THost, ModView<TFunctor> > & me, TFunctor const & _func);       	// "projects/library/seqan/modifier/modifier_view.h"(357)
+
+//____________________________________________________________________________
+// convert
+
+template <typename TSequence, typename TFunctor > inline void convert(TSequence & sequence, TFunctor const &F);       	// "projects/library/seqan/modifier/modifier_view.h"(373)
+template <typename TSequence, typename TFunctor > inline void convert(TSequence const & sequence, TFunctor const &F);       	// "projects/library/seqan/modifier/modifier_view.h"(397)
+
+//____________________________________________________________________________
+// convertImpl
+
+template <typename TTarget, typename T, typename THost, typename TSpec> inline typename Convert<TTarget, THost>::Type convertImpl(Convert<TTarget, T> const convert_, ModifiedAlphabet<THost, TSpec> const & source_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(83)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename THost, typename TFunctor> inline typename GetValue<ModifiedIterator<THost, ModView<TFunctor> > >::Type getValue(ModifiedIterator<THost, ModView<TFunctor> > & me);       	// "projects/library/seqan/modifier/modifier_view.h"(184)
+template <typename THost, typename TFunctor> inline typename GetValue<ModifiedIterator<THost, ModView<TFunctor> > const>::Type getValue(ModifiedIterator<THost, ModView<TFunctor> > const & me);       	// "projects/library/seqan/modifier/modifier_view.h"(192)
+template <typename THost, typename TFunctor, typename TPos> inline typename GetValue<ModifiedString<THost, ModView<TFunctor> > >::Type getValue(ModifiedString<THost, ModView<TFunctor> > & me, TPos pos);       	// "projects/library/seqan/modifier/modifier_view.h"(336)
+template <typename THost, typename TFunctor, typename TPos> inline typename GetValue<ModifiedString<THost, ModView<TFunctor> > const>::Type getValue(ModifiedString<THost, ModView<TFunctor> > const & me, TPos pos);       	// "projects/library/seqan/modifier/modifier_view.h"(344)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator!=(ModifiedAlphabet<THost, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(214)
+template <typename TLeft, typename THost, typename TSpec> inline bool operator!=(TLeft const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(225)
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec> inline bool operator!=(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, ModifiedAlphabet<TRightHost, TRightSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(236)
+template <typename THost, typename TSpec> inline bool operator!=(ModifiedAlphabet<THost, TSpec> const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(248)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator!=(SimpleType<TValue, TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(259)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator!=(ModifiedAlphabet<THost, TSpec2> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(270)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator!=(Proxy<TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(284)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator!=(ModifiedAlphabet<THost, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(295)
+
+//____________________________________________________________________________
+// operator<
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator<(ModifiedAlphabet<THost, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(406)
+template <typename TLeft, typename THost, typename TSpec> inline bool operator<(TLeft const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(417)
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec> inline bool operator<(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, ModifiedAlphabet<TRightHost, TRightSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(428)
+template <typename THost, typename TSpec> inline bool operator<(ModifiedAlphabet<THost, TSpec> const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(440)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator<(SimpleType<TValue, TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(451)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator<(ModifiedAlphabet<THost, TSpec2> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(462)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator<(Proxy<TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(476)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator<(ModifiedAlphabet<THost, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(487)
+
+//____________________________________________________________________________
+// operator<=
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator<=(ModifiedAlphabet<THost, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(310)
+template <typename TLeft, typename THost, typename TSpec> inline bool operator<=(TLeft const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(321)
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec> inline bool operator<=(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, ModifiedAlphabet<TRightHost, TRightSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(332)
+template <typename THost, typename TSpec> inline bool operator<=(ModifiedAlphabet<THost, TSpec> const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(344)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator<=(SimpleType<TValue, TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(355)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator<=(ModifiedAlphabet<THost, TSpec2> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(366)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator<=(Proxy<TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(380)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator<=(ModifiedAlphabet<THost, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(391)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator==(ModifiedAlphabet<THost, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(118)
+template <typename TLeft, typename THost, typename TSpec> inline bool operator==(TLeft const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(129)
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec> inline bool operator==(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, ModifiedAlphabet<TRightHost, TRightSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(140)
+template <typename THost, typename TSpec> inline bool operator==(ModifiedAlphabet<THost, TSpec> const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(152)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator==(SimpleType<TValue, TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(163)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator==(ModifiedAlphabet<THost, TSpec2> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(174)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator==(Proxy<TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(188)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator==(ModifiedAlphabet<THost, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(199)
+
+//____________________________________________________________________________
+// operator>
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator>(ModifiedAlphabet<THost, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(598)
+template <typename TLeft, typename THost, typename TSpec> inline bool operator>(TLeft const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(609)
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec> inline bool operator>(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, ModifiedAlphabet<TRightHost, TRightSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(620)
+template <typename THost, typename TSpec> inline bool operator>(ModifiedAlphabet<THost, TSpec> const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(632)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator>(SimpleType<TValue, TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(643)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator>(ModifiedAlphabet<THost, TSpec2> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(654)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator>(Proxy<TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(668)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator>(ModifiedAlphabet<THost, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(679)
+
+//____________________________________________________________________________
+// operator>=
+
+template <typename THost, typename TSpec, typename TRight> inline bool operator>=(ModifiedAlphabet<THost, TSpec> const & left_, TRight const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(502)
+template <typename TLeft, typename THost, typename TSpec> inline bool operator>=(TLeft const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(513)
+template <typename TLeftHost, typename TLeftSpec, typename TRightHost, typename TRightSpec> inline bool operator>=(ModifiedAlphabet<TLeftHost, TLeftSpec> const & left_, ModifiedAlphabet<TRightHost, TRightSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(524)
+template <typename THost, typename TSpec> inline bool operator>=(ModifiedAlphabet<THost, TSpec> const & left_, ModifiedAlphabet<THost, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(536)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator>=(SimpleType<TValue, TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(547)
+template <typename TValue, typename TSpec, typename THost, typename TSpec2> inline bool operator>=(ModifiedAlphabet<THost, TSpec2> const & left_, SimpleType<TValue, TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(558)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator>=(Proxy<TSpec> const & left_, ModifiedAlphabet<THost, TSpec2> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(572)
+template <typename TSpec, typename THost, typename TSpec2> inline bool operator>=(ModifiedAlphabet<THost, TSpec2> const & left_, Proxy<TSpec> const & right_);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(583)
+
+//____________________________________________________________________________
+// ordValue
+
+template <typename THost, typename TSpec> inline unsigned ordValue(ModifiedAlphabet<THost,TSpec> const &c);       	// "projects/library/seqan/modifier/modifier_alphabet.h"(92)
+
+//____________________________________________________________________________
+// value
+
+template <typename THost, typename TFunctor> inline typename Reference<ModifiedIterator<THost, ModView<TFunctor> > >::Type value(ModifiedIterator<THost, ModView<TFunctor> > & me);       	// "projects/library/seqan/modifier/modifier_view.h"(161)
+template <typename THost, typename TFunctor> inline typename Reference<ModifiedIterator<THost, ModView<TFunctor> > const>::Type value(ModifiedIterator<THost, ModView<TFunctor> > const & me);       	// "projects/library/seqan/modifier/modifier_view.h"(170)
+template <typename THost, typename TFunctor, typename TPos> inline typename Reference<ModifiedString<THost, ModView<TFunctor> > >::Type value(ModifiedString<THost, ModView<TFunctor> > & me, TPos pos);       	// "projects/library/seqan/modifier/modifier_view.h"(313)
+template <typename THost, typename TFunctor, typename TPos> inline typename Reference<ModifiedString<THost, ModView<TFunctor> > const>::Type value(ModifiedString<THost, ModView<TFunctor> > const & me, TPos pos);       	// "projects/library/seqan/modifier/modifier_view.h"(322)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/modifier/modifier_iterator.h b/src/SeqAn-1.3/seqan/modifier/modifier_iterator.h
new file mode 100644
index 0000000..11fb676
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier/modifier_iterator.h
@@ -0,0 +1,706 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MODIFIER_ITERATOR_H
+#define SEQAN_HEADER_MODIFIER_ITERATOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.ModifiedIterator:
+..summary:Allows to modify arbitrary iterators by specializing what differs from an origin.
+..cat:Modifier
+..signature:ModifiedIterator<THost[, TSpec]>
+..param.THost:Original iterator.
+...type:Concept.Iterator
+..param.TSpec:The modifier type.
+...metafunction:Metafunction.Spec
+..implements:Concept.Iterator
+..remarks:$THost$ can also be a modified iterator, so you can create custom iterators by combining predefined ones.
+..include:seqan/modifier.h
+*/
+
+	template < typename THost, typename TSpec = void >
+	class ModifiedIterator {
+	public:
+		Holder<THost, Simple>					data_host;
+		typename Cargo<ModifiedIterator>::Type	data_cargo;
+
+		ModifiedIterator() {
+            SEQAN_CHECKPOINT;
+        }
+
+		ModifiedIterator(ModifiedIterator &_origin):
+			data_host(_origin.data_host),
+			data_cargo(_origin.data_cargo) {
+            SEQAN_CHECKPOINT;
+        }
+
+		ModifiedIterator(ModifiedIterator const &_origin):
+			data_host(_origin.data_host),
+			data_cargo(_origin.data_cargo) {
+            SEQAN_CHECKPOINT;
+        }
+
+		template <typename T>
+		ModifiedIterator(T & _origin) {
+            SEQAN_CHECKPOINT;
+			assign(*this, _origin);
+		}
+
+		template <typename T>
+		ModifiedIterator(T const & _origin) {
+            SEQAN_CHECKPOINT;
+			assign(*this, _origin);
+		}
+//____________________________________________________________________________
+
+		template <typename T>
+		inline ModifiedIterator const &
+		operator = (T & _origin) {
+            SEQAN_CHECKPOINT;
+			assign(*this, _origin);
+			return *this;
+		}
+
+		template <typename T>
+		inline ModifiedIterator const &
+		operator = (T const & _origin) {
+            SEQAN_CHECKPOINT;
+			assign(*this, _origin);
+			return *this;
+		}
+	};
+
+	template < typename THost, typename TSpec >
+	struct Spec< ModifiedIterator<THost, TSpec> > {
+		typedef TSpec Type;
+	};
+
+	template < typename THost, typename TSpec >
+	struct Spec< ModifiedIterator<THost, TSpec> const > {
+		typedef TSpec Type;
+	};
+
+
+	// an iterator is not the owner of the values pointing at
+	// it can be constant while
+	// - pointing to an alterable object
+	// - returning an non-constant value
+	// - being an iterator of an alterable container
+
+	template < typename THost, typename TSpec >
+	struct Value< ModifiedIterator<THost, TSpec> >:
+		Value<THost> {};
+
+	template < typename THost, typename TSpec >
+	struct Value< ModifiedIterator<THost, TSpec> const >:
+		Value< ModifiedIterator<THost, TSpec> > {};
+
+
+	template < typename THost, typename TSpec >
+	struct GetValue< ModifiedIterator<THost, TSpec> >:
+		GetValue<THost> {};
+
+	template < typename THost, typename TSpec >
+	struct GetValue< ModifiedIterator<THost, TSpec> const >:
+		GetValue< ModifiedIterator<THost, TSpec> > {};
+
+
+	template < typename THost, typename TSpec >
+	struct Reference< ModifiedIterator<THost, TSpec> >:
+		Reference<THost> {};
+
+	template < typename THost, typename TSpec >
+	struct Reference< ModifiedIterator<THost, TSpec> const >:
+		Reference< ModifiedIterator<THost, TSpec> > {};
+
+	template < typename THost, typename TSpec >
+	struct Size< ModifiedIterator<THost, TSpec> >:
+		Size<THost> {};
+
+	template < typename THost, typename TSpec >
+	struct Position< ModifiedIterator<THost, TSpec> >:
+		Position<THost> {};
+
+	template < typename THost, typename TSpec >
+	struct Difference< ModifiedIterator<THost, TSpec> >:
+		Difference<THost> {};
+
+
+	template < typename THost, typename TSpec >
+	struct Host< ModifiedIterator<THost, TSpec> > {
+		typedef THost Type;
+	};
+
+	template < typename THost, typename TSpec >
+	struct Host< ModifiedIterator<THost, TSpec> const > {
+		typedef THost const Type;
+	};
+
+
+	//template < typename THost, typename TSpec >
+	//struct Container< ModifiedIterator<THost, TSpec> >:
+	//	Container<THost> {};
+
+	//template < typename THost, typename TSpec >
+	//struct Container< ModifiedIterator<THost, TSpec> const >:
+	//	Container< ModifiedIterator<THost, TSpec> > {};
+
+	template <typename THost, typename TSpec>
+	class ModifiedString;
+
+	template <typename THost, typename TSpec >
+	struct Container< ModifiedIterator<THost, TSpec> >
+	{
+		typedef typename Container<THost>::Type THostContainer;
+		typedef ModifiedString<THostContainer, TSpec> Type;
+	};
+	template <typename THost, typename TSpec >
+	struct Container< ModifiedIterator<THost, TSpec> const>
+	{
+		typedef typename Container<THost>::Type THostContainer;
+		typedef ModifiedString<THostContainer, TSpec> Type;
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// host interface
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TSpec>
+	inline Holder<THost, Simple> &
+	_dataHost(ModifiedIterator<THost, TSpec> & me) 
+	{
+        SEQAN_CHECKPOINT;
+		return me.data_host;
+	}
+	
+	template <typename THost, typename TSpec>
+	inline Holder<THost, Simple> const &
+	_dataHost(ModifiedIterator<THost, TSpec> const & me) 
+	{
+        SEQAN_CHECKPOINT;
+		return me.data_host;
+	}
+
+	template <typename THost, typename TSpec>
+	inline typename Reference< typename Cargo<ModifiedIterator<THost, TSpec> >::Type >::Type
+	cargo(ModifiedIterator<THost, TSpec> & me) 
+	{
+        SEQAN_CHECKPOINT;
+		return me.data_cargo;
+	}
+
+	template <typename THost, typename TSpec>
+	inline typename Reference< typename Cargo<ModifiedIterator<THost, TSpec> const>::Type >::Type
+	cargo(ModifiedIterator<THost, TSpec> const & me) 
+	{
+        SEQAN_CHECKPOINT;
+		return me.data_cargo;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// container/setContainer interface
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TSpec>
+	inline typename Container<ModifiedIterator<THost, TSpec> >::Type //no reference
+	container(ModifiedIterator<THost, TSpec> & me) 
+	{
+        SEQAN_CHECKPOINT;
+		typedef typename Container<ModifiedIterator<THost, TSpec> >::Type TContainer;
+		TContainer temp_(container(host(me)));
+		_copyCargo(temp_, me);
+		return temp_;
+	}
+
+	template <typename THost, typename TSpec>
+	inline typename Container<ModifiedIterator<THost, TSpec> const>::Type //no reference
+	container(ModifiedIterator<THost, TSpec> const & me) 
+	{
+        SEQAN_CHECKPOINT;
+		typedef typename Container<ModifiedIterator<THost, TSpec> const>::Type TContainer;
+		TContainer temp_(container(host(me)));
+		_copyCargo(temp_, me);
+		return temp_;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TIteratorHost, typename TSpec, typename TStringHost>
+	inline void
+	setContainer(
+		ModifiedIterator<TIteratorHost, TSpec> & me, 
+		ModifiedString<TStringHost, TSpec> & cont) 
+	{
+        SEQAN_CHECKPOINT;
+		setContainer(host(me), host(cont));
+		_copyCargo(me, cont);
+	}
+	template <typename TIteratorHost, typename TSpec, typename TStringHost>
+	inline void
+	setContainer(
+		ModifiedIterator<TIteratorHost, TSpec> & me, 
+		ModifiedString<TStringHost, TSpec> const & cont) 
+	{
+        SEQAN_CHECKPOINT;
+		setContainer(host(me), host(const_cast<ModifiedString<TStringHost, TSpec> &>(cont)));
+		_copyCargo(me, cont);
+	}
+	template <typename THost, typename TSpec, typename TContainer>
+	inline void
+	setContainer(ModifiedIterator<THost, TSpec> & me, TContainer & cont) 
+	{
+        SEQAN_CHECKPOINT;
+		setContainer(host(me), cont);
+	}
+/*	template <typename THost, typename TSpec, typename TContainer>
+	inline void
+	setContainer(ModifiedIterator<THost, TSpec> & me, TContainer const & cont) 
+	{
+	SEQAN_CHECKPOINT
+		THost &_host = host(me);
+		setContainer(_host, host(cont));
+		_copyCargo(me, cont);
+	}
+*/
+	//////////////////////////////////////////////////////////////////////////////
+	// assign
+	//////////////////////////////////////////////////////////////////////////////
+    
+    template <typename TTarget, typename TSource>
+    inline void 
+    _assignModifiedIterator(TTarget &me, TSource &_origin, True)
+    {
+		host(me) = _origin;
+    }
+
+    template <typename TTarget, typename TSource>
+    inline void 
+    _assignModifiedIterator(TTarget &me, TSource &_origin, False)
+    {
+		host(me) = host(_origin);
+		cargo(me) = cargo(_origin);
+    }
+
+	template <typename THost, typename TSpec, typename THost2>
+	inline ModifiedIterator<THost, TSpec> const &
+	assign(ModifiedIterator<THost, TSpec> & me, ModifiedIterator<THost2, TSpec> & _origin) {
+        SEQAN_CHECKPOINT;
+        _assignModifiedIterator(me, _origin, typename IsSameType<THost, ModifiedIterator<THost2, TSpec> >::Type());
+		return me;
+	}
+
+	template <typename THost, typename TSpec, typename THost2>
+	inline ModifiedIterator<THost, TSpec> const &
+	assign(ModifiedIterator<THost, TSpec> & me, ModifiedIterator<THost2, TSpec> const & _origin) {
+        SEQAN_CHECKPOINT;
+        _assignModifiedIterator(me, _origin, typename IsSameType<THost, ModifiedIterator<THost2, TSpec> >::Type());
+		return me;
+	}
+
+	template <typename THost, typename TSpec, typename T>
+	inline ModifiedIterator<THost, TSpec> const &
+	assign(ModifiedIterator<THost, TSpec> & me, T & _origin) {
+        SEQAN_CHECKPOINT;
+		host(me) = _origin;
+		return me;
+	}
+
+	template <typename THost, typename TSpec, typename T>
+	inline ModifiedIterator<THost, TSpec> const &
+	assign(ModifiedIterator<THost, TSpec> & me, T const & _origin) {
+        SEQAN_CHECKPOINT;
+		host(me) = _origin;
+		return me;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// value
+	//////////////////////////////////////////////////////////////////////////////
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline typename Reference<ModifiedIterator<THost, TSpec> >::Type 
+	value(ModifiedIterator<THost, TSpec> & me)
+	{
+        SEQAN_CHECKPOINT;
+		return value(host(me));
+	}
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline typename Reference<ModifiedIterator<THost, TSpec> const>::Type 
+	value(ModifiedIterator<THost, TSpec> const & me)
+	{
+        SEQAN_CHECKPOINT;
+		return value(host(me));
+	}
+
+	template <typename THost, typename TSpec>
+	inline typename Reference<ModifiedIterator<THost, TSpec> >::Type 
+	operator * (ModifiedIterator<THost, TSpec> & me)
+	{
+        SEQAN_CHECKPOINT;
+		return value(me);
+	}
+
+	template <typename THost, typename TSpec>
+	inline typename Reference<ModifiedIterator<THost, TSpec> const>::Type 
+	operator * (ModifiedIterator<THost, TSpec> const & me)
+	{
+        SEQAN_CHECKPOINT;
+		return value(me);
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator ++
+	//////////////////////////////////////////////////////////////////////////////
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline void
+	goNext(ModifiedIterator<THost, TSpec> & me)
+	{
+	SEQAN_CHECKPOINT
+		goNext(host(me));
+	}
+
+	template <typename THost, typename TSpec>
+	inline ModifiedIterator<THost, TSpec> const &
+	operator ++ (ModifiedIterator<THost, TSpec> & me)
+	{
+	SEQAN_CHECKPOINT
+		goNext(me);
+		return me;
+	}
+
+	template <typename THost, typename TSpec>
+	inline ModifiedIterator<THost, TSpec>
+	operator ++ (ModifiedIterator<THost, TSpec> & me, int)
+	{
+	SEQAN_CHECKPOINT
+		ModifiedIterator<THost, TSpec> temp_(me);
+		goNext(me);
+		return temp_;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator --
+	//////////////////////////////////////////////////////////////////////////////
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline void
+	goPrevious(ModifiedIterator<THost, TSpec> & me)
+	{
+        SEQAN_CHECKPOINT;
+		goPrevious(host(me));
+	}
+
+	template <typename THost, typename TSpec>
+	inline ModifiedIterator<THost, TSpec> const &
+	operator -- (ModifiedIterator<THost, TSpec> & me)
+	{
+        SEQAN_CHECKPOINT;
+		goPrevious(me);
+		return me;
+	}
+
+	template <typename THost, typename TSpec>
+	inline ModifiedIterator<THost, TSpec>
+	operator -- (ModifiedIterator<THost, TSpec> & me, int)
+	{
+        SEQAN_CHECKPOINT;
+		ModifiedIterator<THost, TSpec> temp_(me);
+		goPrevious(me);
+		return temp_;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator +
+	//////////////////////////////////////////////////////////////////////////////
+
+	// redefinition candidate
+	template <typename THost, typename TSpec, typename TDelta>
+	inline ModifiedIterator<THost, TSpec> &
+	operator += (ModifiedIterator<THost, TSpec> & me, TDelta delta) {
+        SEQAN_CHECKPOINT;
+		host(me) += delta;
+		return me;
+	}
+
+	template <typename THost, typename TSpec, typename TDelta>
+	inline ModifiedIterator<THost, TSpec>
+	operator + (ModifiedIterator<THost, TSpec> const & me, TDelta delta) {
+        SEQAN_CHECKPOINT;
+		ModifiedIterator<THost, TSpec> temp_(me);
+		temp_ += delta;
+		return temp_;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator -
+	//////////////////////////////////////////////////////////////////////////////
+
+	// redefinition candidate
+	template <typename THost, typename TSpec, typename TDelta>
+	inline ModifiedIterator<THost, TSpec> &
+	operator -= (ModifiedIterator<THost, TSpec> & me, TDelta delta) {
+        SEQAN_CHECKPOINT;
+		host(me) -= delta;
+		return me;
+	}
+
+	template <typename THost, typename TSpec, typename TDelta>
+	inline ModifiedIterator<THost, TSpec>
+	operator - (ModifiedIterator<THost, TSpec> const & me, TDelta delta) {
+        SEQAN_CHECKPOINT;
+		ModifiedIterator<THost, TSpec> temp_(me);
+		temp_ -= delta;
+		return temp_;
+	}
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline typename Difference< ModifiedIterator<THost, TSpec> >::Type
+	operator - (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b) {
+        SEQAN_CHECKPOINT;
+		return host(a) - host(b);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// goBegin
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TSpec, typename TContainer>
+	inline void
+	goBegin(ModifiedIterator<THost, TSpec> & me,
+			TContainer const & container)
+	{
+        SEQAN_CHECKPOINT;
+		host(me) = begin(container);
+	}
+
+	template <typename THost, typename TSpec>
+	inline void
+	goBegin(ModifiedIterator<THost, TSpec> & me)
+	{
+        SEQAN_CHECKPOINT;
+		goBegin(me, container(me));
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// goEnd
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TSpec, typename TContainer>
+	inline void
+	goEnd(ModifiedIterator<THost, TSpec> & me,
+			TContainer const & container)
+	{
+        SEQAN_CHECKPOINT;
+		host(me) = end(container);
+	}
+
+	template <typename THost, typename TSpec>
+	inline void
+	goEnd(ModifiedIterator<THost, TSpec> & me)
+	{
+        SEQAN_CHECKPOINT;
+		goEnd(me, container(me));
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// position
+	//////////////////////////////////////////////////////////////////////////////
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline typename Position<ModifiedIterator<THost, TSpec> const>::Type 
+	position(ModifiedIterator<THost, TSpec> const & me)
+	{
+        SEQAN_CHECKPOINT;
+		return position(host(me));
+	}
+
+	// redefinition candidate
+	template <typename THost, typename TSpec, typename TContainer>
+	inline typename Position<ModifiedIterator<THost, TSpec> const>::Type 
+	position(ModifiedIterator<THost, TSpec> const & me, TContainer const &cont)
+	{
+        SEQAN_CHECKPOINT;
+		return position(host(me), cont);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator ==
+	//////////////////////////////////////////////////////////////////////////////
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline bool
+	operator == (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b) {
+		return host(a) == host(b);
+	}
+
+	template <typename THost, typename TSpec>
+	inline bool
+	operator != (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b) {
+		return !(a == b);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator <
+	//////////////////////////////////////////////////////////////////////////////
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline bool
+	operator < (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b) {
+        SEQAN_CHECKPOINT;
+		return host(a) < host(b);
+	}
+
+	template <typename THost, typename TSpec>
+	inline bool
+	operator > (ModifiedIterator<THost, TSpec> const & a, ModifiedIterator<THost, TSpec> const & b) {
+        SEQAN_CHECKPOINT;
+		return b < a;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// atBegin
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TSpec, typename TContainer>
+	inline bool
+	atBegin(ModifiedIterator<THost, TSpec> & me,
+			TContainer const & container)
+	{
+        SEQAN_CHECKPOINT;
+		return atBegin(const_cast<ModifiedIterator<THost, TSpec> const &>(me), container);
+	}
+
+	// redefinition candidate
+	template <typename THost, typename TSpec, typename TContainer>
+	inline bool
+	atBegin(ModifiedIterator<THost, TSpec> const & me,
+			TContainer const & container)
+	{
+        SEQAN_CHECKPOINT;
+		return atBegin(host(me), container);
+	}
+
+	template <typename THost, typename TSpec>
+	inline bool
+	atBegin(ModifiedIterator<THost, TSpec> & me)
+	{
+        SEQAN_CHECKPOINT;
+		return atBegin(const_cast<ModifiedIterator<THost, TSpec> const &>(me));
+	}
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline bool
+	atBegin(ModifiedIterator<THost, TSpec> const & me)
+	{
+        SEQAN_CHECKPOINT;
+		return atBegin(host(me));
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// atEnd
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TSpec, typename TContainer>
+	inline bool
+	atEnd(ModifiedIterator<THost, TSpec> & me,
+			TContainer const & container)
+	{
+        SEQAN_CHECKPOINT;
+		return atEnd(const_cast<ModifiedIterator<THost, TSpec> const &>(me), container);
+	}
+
+	// redefinition candidate
+	template <typename THost, typename TSpec, typename TContainer>
+	inline bool
+	atEnd(ModifiedIterator<THost, TSpec> const & me,
+			TContainer const & container)
+	{
+        SEQAN_CHECKPOINT;
+		return atEnd(host(me), container);
+	}
+
+	template <typename THost, typename TSpec>
+	inline bool
+	atEnd(ModifiedIterator<THost, TSpec> & me)
+	{
+        SEQAN_CHECKPOINT;
+		return atEnd(const_cast<ModifiedIterator<THost, TSpec> const &>(me));
+	}
+
+	// redefinition candidate
+	template <typename THost, typename TSpec>
+	inline bool
+	atEnd(ModifiedIterator<THost, TSpec> const & me)
+	{
+        SEQAN_CHECKPOINT;
+		return atEnd(host(me));
+	}
+
+}
+
+// Adapt SeqAn modified to std.
+namespace std
+{
+	template<typename THost, typename TSpec>
+	struct iterator_traits<seqan::ModifiedIterator<THost, TSpec> >
+	{
+		typedef ::seqan::ModifiedIterator<THost, TSpec> TIter;
+
+		typedef random_access_iterator_tag iterator_category;
+		typedef typename ::seqan::Value<TIter>::Type value_type;
+		typedef typename ::seqan::Difference<TIter>::Type difference_type;
+		typedef typename ::seqan::Value<TIter>::Type * pointer;
+		typedef typename ::seqan::Reference<TIter>::Type reference;
+	};
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/modifier/modifier_reverse.h b/src/SeqAn-1.3/seqan/modifier/modifier_reverse.h
new file mode 100644
index 0000000..f7e138e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier/modifier_reverse.h
@@ -0,0 +1,628 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MODIFIER_REVERSE_H
+#define SEQAN_HEADER_MODIFIER_REVERSE_H
+
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.ModReverse:
+..summary:Mirrors the characters from begin to end.
+..cat:Modifier
+..general:Class.ModifiedIterator
+..general:Class.ModifiedString
+..signature:ModifiedIterator<THost, ModReverse>
+..signature:ModifiedString<THost, ModReverse>
+..param.THost:Original string/iterator.
+...type:Concept.Iterator
+..include:seqan/modifier.h
+*/
+
+	struct ModReverse {};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// reverse iterator
+	//////////////////////////////////////////////////////////////////////////////
+
+
+	template <typename THost>
+	struct Cargo< ModifiedIterator<THost, ModReverse> > {
+		typedef Cargo Type;		// to reduce namespace pollution
+		bool _atEnd;
+		Cargo(): _atEnd(false) {}
+	};
+
+	template <typename THost>
+	class ModifiedIterator<THost, ModReverse> {
+	public:
+		Holder<THost, Simple>					data_host;
+		typename Cargo<ModifiedIterator>::Type	data_cargo;
+
+		ModifiedIterator() {}
+		ModifiedIterator(ModifiedIterator &_origin):
+			data_host(_origin.data_host),
+			data_cargo(_origin.data_cargo) {}
+
+		ModifiedIterator(ModifiedIterator const &_origin):
+			data_host(_origin.data_host),
+			data_cargo(_origin.data_cargo) {}
+
+		template <typename T>
+		ModifiedIterator(T & _origin) {
+			assign(*this, _origin);
+		}
+
+		template <typename T>
+		ModifiedIterator(T const & _origin) {
+			assign(*this, _origin);
+		}
+//____________________________________________________________________________
+
+		template <typename T>
+		inline ModifiedIterator const &
+		operator = (T & _origin) {
+			assign(*this, _origin);
+			return *this;
+		}
+
+		template <typename T>
+		inline ModifiedIterator const &
+		operator = (T const & _origin) {
+			assign(*this, _origin);
+			return *this;
+		}
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator ++
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost>
+	inline void
+	goNext(ModifiedIterator<THost, ModReverse> & me)
+	{
+	SEQAN_CHECKPOINT
+		if (atBegin(host(me)))
+			cargo(me)._atEnd = true;
+		else
+			goPrevious(host(me));
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator --
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost>
+	inline void
+	goPrevious(ModifiedIterator<THost, ModReverse> & me)
+	{
+	SEQAN_CHECKPOINT
+		if (cargo(me)._atEnd)
+			cargo(me)._atEnd = false;
+		else
+			goNext(host(me));
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// goEnd
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost>
+	inline void
+	goEnd(ModifiedIterator<THost, ModReverse> & me)
+	{
+	SEQAN_CHECKPOINT
+		goBegin(host(me));
+		cargo(me)._atEnd = true;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// goBegin
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost>
+	inline void
+	goBegin(ModifiedIterator<THost, ModReverse> & me)
+	{
+	SEQAN_CHECKPOINT
+		goEnd(host(me));
+		if (atBegin(host(me)))
+			cargo(me)._atEnd = true;
+		else
+		{
+			cargo(me)._atEnd = false;
+			goPrevious(host(me));
+		}
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator +
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TDelta>
+	inline ModifiedIterator<THost, ModReverse> &
+	operator += (ModifiedIterator<THost, ModReverse> & me, TDelta delta_) 
+	{
+		typedef ModifiedIterator<THost, ModReverse> TIterator;
+		typedef typename Position<TIterator>::Type TPosition;
+		TPosition delta = delta_;
+
+		if (delta == 0)
+		{
+			return me;
+		}
+		if (delta > 0)
+		{
+			if (position(host(me)) < delta) {
+				cargo(me)._atEnd = true;
+				--delta;
+			}
+			host(me) -= delta;
+		}
+		else
+		{
+			if (cargo(me)._atEnd) {
+				cargo(me)._atEnd = false;
+				++delta;
+			}
+			host(me) -= delta;
+		} 
+		return me;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator -
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TDelta>
+	inline ModifiedIterator<THost, ModReverse> &
+	operator -= (ModifiedIterator<THost, ModReverse> & me, TDelta delta) {
+		if (delta > 0) {
+			if (cargo(me)._atEnd) {
+				cargo(me)._atEnd = false;
+				--delta;
+			}
+			host(me) += delta;
+		} else {
+			if (position(host(me)) < -delta) {
+				cargo(me)._atEnd = true;
+				++delta;
+			}
+			host(me) -= -delta;
+		}
+		return me;
+	}
+
+	template <typename THost>
+	inline typename Difference< ModifiedIterator<THost, ModReverse> >::Type
+	operator - (ModifiedIterator<THost, ModReverse> const & a, ModifiedIterator<THost, ModReverse> const & b) {
+		typename Difference< ModifiedIterator<THost, ModReverse> >::Type diff = host(b) - host(a);
+		if (cargo(a)._atEnd) ++diff;
+		if (cargo(b)._atEnd) --diff;
+		return diff;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// position
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost>
+	inline typename Position<ModifiedIterator<THost, ModReverse> const>::Type 
+	position(ModifiedIterator<THost, ModReverse> const & me)
+	{
+	SEQAN_CHECKPOINT
+		if (cargo(me)._atEnd)
+			return length(container(host(me)));
+		else
+			return length(container(host(me))) - 1 - position(host(me));
+	}
+
+	template <typename THost, typename TContainer>
+	inline typename Position<ModifiedIterator<THost, ModReverse> const>::Type 
+	position(ModifiedIterator<THost, ModReverse> const & me, TContainer const &cont)
+	{
+	SEQAN_CHECKPOINT
+		if (cargo(me)._atEnd)
+			return length(cont);
+		else
+			return length(cont) - 1 - position(host(me), cont);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// setPosition
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TPosition>
+	inline void
+	setPosition(ModifiedIterator<THost, ModReverse> const & me, TPosition pos)
+	{
+	SEQAN_CHECKPOINT
+		setPosition(host(me), length(container(host(me))) - 1 - pos);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator ==
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost>
+	inline bool
+	operator == (ModifiedIterator<THost, ModReverse> const & a, ModifiedIterator<THost, ModReverse> const & b) {
+		return cargo(a)._atEnd == cargo(b)._atEnd && host(a) == host(b);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// operator <
+	//////////////////////////////////////////////////////////////////////////////
+
+	// redefinition candidate
+	template <typename THost>
+	inline bool
+	operator < (ModifiedIterator<THost, ModReverse> const & a, ModifiedIterator<THost, ModReverse> const & b) {
+		return (!cargo(a)._atEnd && cargo(b)._atEnd) ||
+			   (!cargo(a)._atEnd && !cargo(b)._atEnd && host(a) > host(b));
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// atBegin
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TContainer>
+	inline bool
+	atBegin(ModifiedIterator<THost, ModReverse> const & me,
+			TContainer const & container)
+	{
+	SEQAN_CHECKPOINT
+		return position(me, container) == 0;
+	}
+
+	template <typename THost>
+	inline bool
+	atBegin(ModifiedIterator<THost, ModReverse> const & me)
+	{
+	SEQAN_CHECKPOINT
+		return position(me) == 0;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// atEnd
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TContainer>
+	inline bool
+	atEnd(ModifiedIterator<THost, ModReverse> const & me,
+			TContainer const & /*container*/)
+	{
+	SEQAN_CHECKPOINT
+		return cargo(me)._atEnd;
+	}
+
+	template <typename THost>
+	inline bool
+	atEnd(ModifiedIterator<THost, ModReverse> const & me)
+	{
+	SEQAN_CHECKPOINT
+		return cargo(me)._atEnd;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// reverse string
+	//////////////////////////////////////////////////////////////////////////////
+
+
+	template <typename THost>
+	class ModifiedString<THost, ModReverse> {
+	public:
+		Holder<THost>							data_host;
+		typename Cargo<ModifiedString>::Type	data_cargo;
+
+		ModifiedString() {}
+
+		ModifiedString(ModifiedString &_origin):
+			data_host(_origin.data_host),
+			data_cargo(_origin.data_cargo) {}
+
+		ModifiedString(ModifiedString const &_origin):
+			data_host(_origin.data_host),
+			data_cargo(_origin.data_cargo) {}
+
+		template <typename THostHost, typename THostSpec>
+		ModifiedString(ModifiedString<THostHost, THostSpec> &_origin):
+			data_host(_origin.data_host) {}
+
+		ModifiedString(THost &_origin) {
+			setHost(*this, _origin);
+		}
+
+		template <typename T>
+		ModifiedString(T & _origin) {
+			setValue(*this, _origin);
+		}
+
+		template <typename T>
+		ModifiedString(T const & _origin) {
+			setValue(*this, _origin);
+		}
+
+		template <typename T>
+		inline ModifiedString const &
+		operator = (T & _origin) {
+			assign(*this, _origin);
+			return *this;
+		}
+
+		template <typename TPos>
+		inline typename Reference<ModifiedString>::Type 
+		operator [] (TPos pos)
+		{
+		SEQAN_CHECKPOINT
+			return value(*this, pos);
+		}
+
+		template <typename TPos>
+		inline typename Reference<ModifiedString const>::Type 
+		operator [] (TPos pos) const
+		{
+		SEQAN_CHECKPOINT
+			return value(*this, pos);
+		}
+	};
+
+
+	template <typename THost>
+	struct Iterator< ModifiedString<THost, ModReverse>, Standard > {
+		typedef ModifiedIterator<typename Iterator<THost, Rooted>::Type, ModReverse> Type;
+	};
+
+	template <typename THost>
+	struct Iterator< ModifiedString<THost, ModReverse> const, Standard > {
+		typedef ModifiedIterator<typename Iterator<THost const, Rooted>::Type, ModReverse> Type;
+	};
+
+	template <typename THost>
+	struct DefaultIteratorSpec< ModifiedString<THost, ModReverse> >
+	{
+		typedef Rooted Type;
+	};
+
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// value
+	//////////////////////////////////////////////////////////////////////////////
+
+	template <typename THost, typename TPos>
+	inline typename Reference<ModifiedString<THost, ModReverse> >::Type 
+	value(ModifiedString<THost, ModReverse> & me, TPos pos)
+	{
+	SEQAN_CHECKPOINT
+		return value(host(me), (length(host(me)) - 1) - pos);
+	}
+
+	template <typename THost, typename TPos>
+	inline typename Reference<ModifiedString<THost, ModReverse> const>::Type 
+	value(ModifiedString<THost, ModReverse> const & me, TPos pos)
+	{
+	SEQAN_CHECKPOINT
+		return value(host(me), (length(host(me)) - 1) - pos);
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// begin
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename THost, typename TTag >
+	inline typename Iterator< ModifiedString<THost, ModReverse> const >::Type 
+	begin(ModifiedString<THost, ModReverse> const & me) {
+		typename Iterator< ModifiedString<THost, ModReverse> const >::Type temp_(end(host(me), Rooted()));
+		_copyCargo(temp_, me);
+		goNext(temp_);
+		return temp_;
+	}
+
+	template < typename THost >
+	inline typename Iterator< ModifiedString<THost, ModReverse> >::Type 
+	begin(ModifiedString<THost, ModReverse> & me) {
+		typename Iterator< ModifiedString<THost, ModReverse> >::Type temp_(end(host(me), Rooted()));
+		_copyCargo(temp_, me);
+		goNext(temp_);
+		return temp_;
+	}
+
+	template < typename THost, typename TTagSpec >
+	inline typename Iterator< ModifiedString<THost, ModReverse> const, Tag<TTagSpec> const >::Type 
+	begin(ModifiedString<THost, ModReverse> const & me, Tag<TTagSpec> const) {
+		typename Iterator< ModifiedString<THost, ModReverse> const, Tag<TTagSpec> const >::Type temp_(end(host(me), Rooted()));
+		_copyCargo(temp_, me);
+		goNext(temp_);
+		return temp_;
+	}
+
+	template < typename THost, typename TTagSpec >
+	inline typename Iterator< ModifiedString<THost, ModReverse>, Tag<TTagSpec> const >::Type 
+	begin(ModifiedString<THost, ModReverse> & me, Tag<TTagSpec> const) {
+		typename Iterator< ModifiedString<THost, ModReverse>, Tag<TTagSpec> const >::Type temp_(end(host(me), Rooted()));
+		_copyCargo(temp_, me);
+		goNext(temp_);
+		return temp_;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// end
+	//////////////////////////////////////////////////////////////////////////////
+
+	template < typename THost >
+	inline typename Iterator< ModifiedString<THost, ModReverse> const >::Type 
+	end(ModifiedString<THost, ModReverse> const & me) {
+		typename Iterator< ModifiedString<THost, ModReverse> const >::Type temp_(begin(host(me), Rooted()));
+		_copyCargo(temp_, me);
+		goNext(temp_);
+		return temp_;
+	}
+
+	template < typename THost >
+	inline typename Iterator< ModifiedString<THost, ModReverse> >::Type 
+	end(ModifiedString<THost, ModReverse> & me) {
+		typename Iterator< ModifiedString<THost, ModReverse> >::Type temp_(begin(host(me), Rooted()));
+		_copyCargo(temp_, me);
+		goNext(temp_);
+		return temp_;
+	}
+
+	template < typename THost, typename TTagSpec >
+	inline typename Iterator< ModifiedString<THost, ModReverse> const, Tag<TTagSpec> const >::Type 
+	end(ModifiedString<THost, ModReverse> const & me, Tag<TTagSpec> const) {
+		typename Iterator< ModifiedString<THost, ModReverse> const, Tag<TTagSpec> const >::Type temp_(begin(host(me), Rooted()));
+		_copyCargo(temp_, me);
+		goNext(temp_);
+		return temp_;
+	}
+
+	template < typename THost, typename TTagSpec >
+	inline typename Iterator< ModifiedString<THost, ModReverse>, Tag<TTagSpec> const >::Type 
+	end(ModifiedString<THost, ModReverse> & me, Tag<TTagSpec> const) {
+		typename Iterator< ModifiedString<THost, ModReverse>, Tag<TTagSpec> const >::Type temp_(begin(host(me), Rooted()));
+		_copyCargo(temp_, me);
+		goNext(temp_);
+		return temp_;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// reverse
+	//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.reverse
+..summary:Reverse an object/container in-place.
+..cat:Modifiers
+..signature:reverse(object)
+..param.object:The object/container whose elements to reverse.
+...type:Concept.Container
+...type:Adaption.std::list
+..include:seqan/modifier.h
+*/
+	template < typename TSequence >
+	inline void
+	reverse(TSequence & sequence) 
+	{
+		typedef typename Value<TSequence>::Type					TValue;
+
+#if defined (_OPENMP) && defined (SEQAN_PARALLEL)
+		// OpenMP does not support for loop with iterators. Therefore use index variables.
+		typedef typename Position<TSequence>::Type				TPos;
+		typedef typename MakeSigned_<TPos>::Type				TSignedPos;
+
+		TSignedPos pMid = length(sequence) / 2;
+
+		#pragma omp parallel for if(length(sequence) > 1000000)
+		for(TSignedPos p1 = 0; p1 < pMid; ++p1) {
+			TPos p2 = length(sequence) - 1 - p1;
+			TValue tmp = sequence[p1];
+			sequence[p1] = sequence[p2];
+			sequence[p2] = tmp;
+		}
+#else
+		typedef typename Iterator<TSequence, Standard>::Type	TIter;
+		TIter it1 = begin(sequence, Standard());
+		TIter it2 = it1 + length(sequence) - 1;
+		TIter itMid = it1 + length(sequence) / 2;
+
+		for(; it1 != itMid; ++it1, --it2) {
+			TValue tmp = *it1;
+			*it1 = *it2;
+			*it2 = tmp;
+		}
+#endif
+	}
+
+	template < typename TSequence, typename TSpec >
+	inline void
+	reverse(StringSet<TSequence, TSpec> & stringSet) 
+	{
+		unsigned seqCount = length(stringSet);
+		for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+			reverse(stringSet[seqNo]);
+	}
+
+	template < typename TSequence, typename TSpec >
+	inline void
+	reverse(StringSet<TSequence, TSpec> const & stringSet) 
+	{
+		unsigned seqCount = length(stringSet);
+		for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+			reverse(stringSet[seqNo]);
+	}
+
+    template <typename TValue>
+    inline void
+    reverse(std::list<TValue> & list)
+    {
+        SEQAN_CHECKPOINT;
+        list.reverse();
+    }
+
+//////////////////////////////////////////////////////////////////////////////
+// shortcut
+
+template <typename THost>
+inline ModifiedString<THost, ModReverse>
+reverseString(THost const & host)
+{
+	return ModifiedString<THost, ModReverse>(host);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/modifier/modifier_shortcuts.h b/src/SeqAn-1.3/seqan/modifier/modifier_shortcuts.h
new file mode 100644
index 0000000..9fa072b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier/modifier_shortcuts.h
@@ -0,0 +1,516 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MODIFIER_SHORTCUTS_H
+#define SEQAN_HEADER_MODIFIER_SHORTCUTS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+typedef ModView< FunctorComplement<Dna> >	ModComplementDna;
+typedef ModView< FunctorComplement<Dna5> >	ModComplementDna5;
+typedef ModView< FunctorComplement<Rna> >	ModComplementRna;
+typedef ModView< FunctorComplement<Rna5> >	ModComplementRna5;
+
+//////////////////////////////////////////////////////////////////////////////
+
+typedef ModifiedString<DnaString, ModView< FunctorComplement<Dna> > >		DnaStringComplement;
+typedef ModifiedString<Dna5String, ModView< FunctorComplement<Dna5> > >		Dna5StringComplement;
+typedef ModifiedString<RnaString, ModView< FunctorComplement<Rna> > >		RnaStringComplement;
+typedef ModifiedString<Rna5String, ModView< FunctorComplement<Rna5> > >		Rna5StringComplement;
+
+//////////////////////////////////////////////////////////////////////////////
+
+typedef ModifiedString<DnaString, ModReverse>		DnaStringReverse;
+typedef ModifiedString<Dna5String, ModReverse>		Dna5StringReverse;
+typedef ModifiedString<RnaString, ModReverse>		RnaStringReverse;
+typedef ModifiedString<Rna5String, ModReverse>		Rna5StringReverse;
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+typedef ModifiedString<DnaStringReverse, ModComplementDna>		DnaStringReverseComplement;
+typedef ModifiedString<Dna5StringReverse, ModComplementDna5>	Dna5StringReverseComplement;
+*/
+
+typedef ModifiedString<
+			ModifiedString<DnaString, ModView< FunctorComplement<Dna> > >, 
+			ModReverse
+		>	DnaStringReverseComplement;
+
+typedef ModifiedString<
+			ModifiedString<	Dna5String, ModView< FunctorComplement<Dna5> > >, 
+			ModReverse
+		>	Dna5StringReverseComplement;
+
+typedef ModifiedString<
+			ModifiedString<RnaString, ModView< FunctorComplement<Rna> > >, 
+			ModReverse
+		>	RnaStringReverseComplement;
+
+typedef ModifiedString<
+			ModifiedString<	Rna5String, ModView< FunctorComplement<Rna5> > >, 
+			ModReverse
+		>	Rna5StringReverseComplement;
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.complement:
+..cat:Modifier
+..summary:Complement a sequence or a @Class.StringSet@ in-place.
+..signature:complement(sequence)
+..param.sequence:The sequence to complement.
+...type:Class.String
+...type:Class.Segment
+..include:seqan/modifier.h
+..see:Function.reverseComplement
+..see:Function.toLower
+..see:Function.toUpper
+ */
+template < typename TSequence >
+inline void complement(TSequence & sequence) 
+{
+    SEQAN_CHECKPOINT;
+	convert(sequence, FunctorComplement<typename Value<TSequence>::Type>());
+} 
+
+template < typename TSequence >
+inline void complement(TSequence const & sequence) 
+{
+    SEQAN_CHECKPOINT;
+	convert(sequence, FunctorComplement<typename Value<TSequence>::Type>());
+} 
+
+/**
+.Function.complement:
+..signature:complement(stringSet)
+..param.stringSet:The @Class.StringSet@ to complement.
+...type:Class.StringSet
+..include:seqan/modifier.h
+ */
+template < typename TSequence, typename TSpec >
+inline void complement(StringSet<TSequence, TSpec> & stringSet)
+{
+    SEQAN_CHECKPOINT;
+	unsigned seqCount = length(stringSet);
+	for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+		complement(stringSet[seqNo]);
+}
+
+template < typename TSequence, typename TSpec >
+inline void complement(StringSet<TSequence, TSpec> const & stringSet)
+{
+    SEQAN_CHECKPOINT;
+	unsigned seqCount = length(stringSet);
+	for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+		complement(stringSet[seqNo]);
+}
+
+/**
+.Function.reverseComplement:
+..cat:Modifier
+..summary:Reverse and complement a sequence or a @Class.StringSet@ in-place.
+..signature:reverseComplement(sequence)
+..param.sequence:The sequence to complement.
+...type:Class.String
+...type:Class.Segment
+..include:seqan/modifier.h
+..see:Function.complement
+..see:Function.toLower
+..see:Function.toUpper
+ */
+template < typename TSequence >
+inline void reverseComplement(TSequence & sequence) 
+{
+    SEQAN_CHECKPOINT;
+	convert(sequence, FunctorComplement<typename Value<TSequence>::Type>());
+	reverse(sequence);
+} 
+
+// TODO(holtgrew): How is doing anything in-place on a const value possible?
+template < typename TSequence >
+inline void reverseComplement(TSequence const & sequence) 
+{
+    SEQAN_CHECKPOINT;
+	convert(sequence, FunctorComplement<typename Value<TSequence>::Type>());
+	reverse(sequence);
+} 
+
+/**
+.Function.reverseComplement:
+..signature:reverseComplement(stringSet)
+..param.stringSet:The @Class.StringSet@ to complement.
+...type:Class.StringSet
+..include:seqan/modifier.h
+ */
+template < typename TSequence, typename TSpec >
+inline void reverseComplement(StringSet<TSequence, TSpec> & stringSet)
+{
+    SEQAN_CHECKPOINT;
+	unsigned seqCount = length(stringSet);
+	for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+		reverseComplement(stringSet[seqNo]);
+}
+
+// TODO(holtgrew): How is doing anything in-place on a const value possible?
+template < typename TSequence, typename TSpec >
+inline void reverseComplement(StringSet<TSequence, TSpec> const & stringSet)
+{
+    SEQAN_CHECKPOINT;
+	unsigned seqCount = length(stringSet);
+	for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+		reverseComplement(stringSet[seqNo]);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.toLower:
+..cat:Modifier
+..summary:Convert characters in sequence or @Class.StringSet@ to lower case in-place.
+..signature:toLower(sequence)
+..param.sequence:The sequence to convert into lowercase.
+...type:Class.String
+...type:Class.Segment
+..include:seqan/modifier.h
+..see:Function.toUpper
+..see:Function.reverseComplement
+..see:Function.complement
+ */
+template < typename TSequence >
+inline void toLower(TSequence & sequence) 
+{
+    SEQAN_CHECKPOINT;
+	convert(sequence, FunctorLowcase<typename Value<TSequence>::Type>());
+} 
+
+// TODO(holtgrew): How is doing anything in-place on a const value possible?
+template < typename TSequence >
+inline void toLower(TSequence const & sequence) 
+{
+    SEQAN_CHECKPOINT;
+	convert(sequence, FunctorLowcase<typename Value<TSequence>::Type>());
+} 
+
+/**
+.Function.toLower:
+..signature:toLower(stringSet)
+..param.stringSet:The @Class.StringSet@ to convert into lowercase.
+...type:Class.StringSet
+..include:seqan/modifier.h
+ */	
+template < typename TSequence, typename TSpec >
+inline void toLower(StringSet<TSequence, TSpec> & stringSet)
+{
+    SEQAN_CHECKPOINT;
+	unsigned seqCount = length(stringSet);
+	for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+		toLower(stringSet[seqNo]);
+}
+
+// TODO(holtgrew): How is doing anything in-place on a const value possible?
+template < typename TSequence, typename TSpec >
+inline void toLower(StringSet<TSequence, TSpec> const & stringSet)
+{
+    SEQAN_CHECKPOINT;
+	unsigned seqCount = length(stringSet);
+	for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+		toLower(stringSet[seqNo]);
+}
+
+/**
+.Function.toUpper:
+..cat:Modifier
+..summary:Convert characters in sequence or @Class.StringSet@ to lower case in-place.
+..signature:toUpper(sequence)
+..param.sequence:The sequence to convert into uppercase.
+...type:Class.String
+...type:Class.Segment
+..include:seqan/modifier.h
+..see:Function.toLower
+..see:Function.reverseComplement
+..see:Function.complement
+ */
+template < typename TSequence >
+inline void toUpper(TSequence & sequence) 
+{
+    SEQAN_CHECKPOINT;
+	convert(sequence, FunctorUpcase<typename Value<TSequence>::Type>());
+} 
+
+// TODO(holtgrew): How is doing anything in-place on a const value possible?
+template < typename TSequence >
+inline void toUpper(TSequence const & sequence) 
+{
+    SEQAN_CHECKPOINT;
+	convert(sequence, FunctorUpcase<typename Value<TSequence>::Type>());
+} 
+
+/**
+.Function.toUpper:
+..signature:toUpper(stringSet)
+..param.stringSet:The @Class.StringSet@ to convert into uppercase.
+...type:Class.StringSet
+..include:seqan/modifier.h
+ */	
+template < typename TSequence, typename TSpec >
+inline void toUpper(StringSet<TSequence, TSpec> & stringSet)
+{
+    SEQAN_CHECKPOINT;
+	unsigned seqCount = length(stringSet);
+	for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+		toUpper(stringSet[seqNo]);
+}
+
+// TODO(holtgrew): How is doing anything in-place on a const value possible?
+template < typename TSequence, typename TSpec >
+inline void toUpper(StringSet<TSequence, TSpec> const & stringSet)
+{
+    SEQAN_CHECKPOINT;
+	unsigned seqCount = length(stringSet);
+	for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
+		toUpper(stringSet[seqNo]);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Shortcut.ModComplementDna:
+..cat:Modifier
+..summary:Modifier specialization type for the complement of @Spec.Dna@ alphabet sequences.
+..signature:DnaStringComplement
+..shortcutfor:Spec.ModView
+...signature:ModView< FunctorComplement<Dna> >
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+/**
+.Shortcut.ModComplementDna5:
+..cat:Modifier
+..summary:Modifier specialization type for the complement of @Spec.Dna5@ alphabet sequences.
+..signature:Dna5StringComplement
+..shortcutfor:Spec.ModView
+...signature:ModView< FunctorComplement<Dna5> >
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+/**
+.Shortcut.ModComplementRna:
+..cat:Modifier
+..summary:Modifier specialization type for the complement of @Spec.Rna@ alphabet sequences.
+..signature:RnaStringComplement
+..shortcutfor:Spec.ModView
+...signature:ModView< FunctorComplement<Rna> >
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+/**
+.Shortcut.ModComplementRna5:
+..cat:Modifier
+..summary:Modifier specialization type for the complement of @Spec.Rna5@ alphabet sequences.
+..signature:Rna5StringComplement
+..shortcutfor:Spec.ModView
+...signature:ModView< FunctorComplement<Rna5> >
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+
+/**
+.Shortcut.DnaStringComplement:
+..cat:Modifier
+..summary:Modifier for the complement of a @Shortcut.DnaString at .
+..signature:DnaStringComplement
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<DnaString, ModView< FunctorComplement<Dna> > >
+..see:Shortcut.DnaString
+..see:Class.ModifiedString
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+/**
+.Shortcut.Dna5StringComplement:
+..cat:Modifier
+..summary:Modifier for the complement of a @Shortcut.Dna5String at .
+..signature:Dna5StringComplement
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<Dna5String, ModView< FunctorComplement<Dna5> > >
+..see:Shortcut.Dna5String
+..see:Class.ModifiedString
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+/**
+.Shortcut.RnaStringComplement:
+..cat:Modifier
+..summary:Modifier for the complement of a @Shortcut.RnaString at .
+..signature:RnaStringComplement
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<RnaString, ModView< FunctorComplement<Rna> > >
+..see:Shortcut.RnaString
+..see:Class.ModifiedString
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+/**
+.Shortcut.Rna5StringComplement:
+..cat:Modifier
+..summary:Modifier for the complement of a @Shortcut.Rna5String at .
+..signature:Rna5StringComplement
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<Rna5String, ModView< FunctorComplement<Rna5> > >
+..see:Shortcut.Rna5String
+..see:Class.ModifiedString
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+
+/**
+.Shortcut.DnaStringReverse:
+..cat:Modifier
+..summary:Modifier for the reverse of a @Shortcut.DnaString at .
+..signature:DnaStringReverse
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<DnaString, ModReverse>
+..see:Shortcut.DnaString
+..see:Class.ModifiedString
+..see:Spec.ModReverse
+*/
+
+/**
+.Shortcut.Dna5StringReverse:
+..cat:Modifier
+..summary:Modifier for the reverse of a @Shortcut.Dna5String at .
+..signature:Dna5StringReverse
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<Dna5String, ModReverse>
+..see:Shortcut.Dna5String
+..see:Class.ModifiedString
+..see:Spec.ModReverse
+*/
+
+/**
+.Shortcut.RnaStringReverse:
+..cat:Modifier
+..summary:Modifier for the reverse of a @Shortcut.RnaString at .
+..signature:RnaStringReverse
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<RnaString, ModReverse>
+..see:Shortcut.RnaString
+..see:Class.ModifiedString
+..see:Spec.ModReverse
+*/
+
+/**
+.Shortcut.Rna5StringReverse:
+..cat:Modifier
+..summary:Modifier for the reverse of a @Shortcut.Rna5String at .
+..signature:Rna5StringReverse
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<Rna5String, ModReverse>
+..see:Shortcut.Rna5String
+..see:Class.ModifiedString
+..see:Spec.ModReverse
+*/
+
+
+/**
+.Shortcut.DnaStringReverseComplement:
+..cat:Modifier
+..summary:Modifier for the reverse complement of a @Shortcut.DnaString at .
+..signature:DnaStringReverseComplement
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<ModifiedString<DnaString, ModView< FunctorComplement<Dna> > >, ModReverse>
+..see:Shortcut.DnaString
+..see:Class.ModifiedString
+..see:Spec.ModReverse
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+/**
+.Shortcut.Dna5StringReverseComplement:
+..cat:Modifier
+..summary:Modifier for the reverse complement of a @Shortcut.Dna5String at .
+..signature:Dna5StringReverseComplement
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<ModifiedString<Dna5String, ModView< FunctorComplement<Dna> > >, ModReverse>
+..see:Shortcut.Dna5String
+..see:Class.ModifiedString
+..see:Spec.ModReverse
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+/**
+.Shortcut.RnaStringReverseComplement:
+..cat:Modifier
+..summary:Modifier for the reverse complement of a @Shortcut.RnaString at .
+..signature:RnaStringReverseComplement
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<ModifiedString<RnaString, ModView< FunctorComplement<Rna> > >, ModReverse>
+..see:Shortcut.RnaString
+..see:Class.ModifiedString
+..see:Spec.ModReverse
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+/**
+.Shortcut.Rna5StringReverseComplement:
+..cat:Modifier
+..summary:Modifier for the reverse complement of a @Shortcut.Rna5String at .
+..signature:Rna5StringReverseComplement
+..shortcutfor:Class.ModifiedString
+...signature:ModifiedString<ModifiedString<Rna5String, ModView< FunctorComplement<Rna> > >, ModReverse>
+..see:Shortcut.Rna5String
+..see:Class.ModifiedString
+..see:Spec.ModReverse
+..see:Spec.ModView
+..see:Class.FunctorComplement
+*/
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/modifier/modifier_string.h b/src/SeqAn-1.3/seqan/modifier/modifier_string.h
new file mode 100644
index 0000000..a35dcb1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier/modifier_string.h
@@ -0,0 +1,653 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_MODIFIER_MODIFIER_STRING_H_
+#define SEQAN_MODIFIER_MODIFIER_STRING_H_
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Class.ModifiedString:
+..summary:Allows to modify arbitrary strings by specializing what differs from an origin.
+..cat:Modifier
+..signature:ModifiedString<THost[, TSpec]>
+..param.THost:Original sequence type.
+...type:Concept.Container
+..param.TSpec:The modifier type.
+...metafunction:Metafunction.Spec
+..implements:Concept.Container
+..remarks:$THost$ can also be a modified string, so you can create custom strings by combining predefined ones.
+..include:seqan/modifier.h
+*/
+
+template < typename THost, typename TSpec = void >
+class ModifiedString {
+public:
+    Holder<THost>							data_host;
+    typename Cargo<ModifiedString>::Type	data_cargo;
+
+    ModifiedString() {
+        SEQAN_CHECKPOINT;
+    }
+
+    ModifiedString(ModifiedString &_origin):
+            data_host(_origin.data_host),
+            data_cargo(_origin.data_cargo) {
+        SEQAN_CHECKPOINT;
+    }
+
+    ModifiedString(ModifiedString const &_origin):
+            data_host(_origin.data_host),
+            data_cargo(_origin.data_cargo) {
+        SEQAN_CHECKPOINT;
+    }
+    
+    ModifiedString(THost &_origin) {
+        SEQAN_CHECKPOINT;
+        setHost(*this, _origin);
+    }
+
+    template <typename T>
+    ModifiedString(T & _origin) {
+        SEQAN_CHECKPOINT;
+        setValue(*this, _origin);
+    }
+
+    template <typename T>
+    ModifiedString(T const & _origin) {
+        SEQAN_CHECKPOINT;
+        setValue(*this, _origin);
+    }
+
+    template <typename T>
+    inline ModifiedString const &
+    operator=(T & _origin) {
+        SEQAN_CHECKPOINT;
+        assign(*this, _origin);
+        return *this;
+    }
+};
+
+template < typename THost, typename TSpec >
+struct Spec< ModifiedString<THost, TSpec> > {
+    typedef TSpec Type;
+};
+
+template < typename THost, typename TSpec >
+struct Spec< ModifiedString<THost, TSpec> const > {
+    typedef TSpec Type;
+};
+
+
+// use Value, GetValue, Reference, Size, ... from corresponding iterator
+template < typename THost, typename TSpec >
+struct Value< ModifiedString<THost, TSpec> >:
+    Value< typename Iterator< ModifiedString<THost, TSpec>, Rooted >::Type > {};
+
+template < typename THost, typename TSpec >
+struct Value< ModifiedString<THost, TSpec> const >:
+    Value< typename Iterator< ModifiedString<THost, TSpec> const, Rooted >::Type > {};
+
+
+template < typename THost, typename TSpec >
+struct GetValue< ModifiedString<THost, TSpec> >:
+    GetValue< typename Iterator< ModifiedString<THost, TSpec>, Rooted >::Type > {};
+
+template < typename THost, typename TSpec >
+struct GetValue< ModifiedString<THost, TSpec> const >:
+    GetValue< typename Iterator< ModifiedString<THost, TSpec> const, Rooted >::Type > {};
+
+
+template < typename THost, typename TSpec >
+struct Reference< ModifiedString<THost, TSpec> >:
+    Reference< typename Iterator< ModifiedString<THost, TSpec>, Rooted >::Type > {};
+
+template < typename THost, typename TSpec >
+struct Reference< ModifiedString<THost, TSpec> const >:
+    Reference< typename Iterator< ModifiedString<THost, TSpec> const, Rooted >::Type > {};
+
+///.Metafunction.Size.param.T.type:Class.ModifiedString
+
+template < typename THost, typename TSpec >
+struct Size< ModifiedString<THost, TSpec> >:
+    Size< typename Iterator< ModifiedString<THost, TSpec>, Rooted >::Type > {};
+
+template < typename THost, typename TSpec >
+struct Position< ModifiedString<THost, TSpec> >:
+    Position< typename Iterator< ModifiedString<THost, TSpec>, Rooted >::Type > {};
+
+template < typename THost, typename TSpec >
+struct Difference< ModifiedString<THost, TSpec> >:
+    Difference< typename Iterator< ModifiedString<THost, TSpec>, Rooted >::Type > {};
+
+
+///.Metafunction.Iterator.param.T.type:Class.ModifiedString
+
+template <typename THost, typename TSpec>
+struct Iterator< ModifiedString<THost, TSpec>, Standard > {
+    typedef ModifiedIterator<typename Iterator<THost, Standard>::Type, TSpec> Type;
+};
+
+template <typename THost, typename TSpec >
+struct Iterator< ModifiedString<THost, TSpec> const, Standard > {
+    typedef ModifiedIterator<typename Iterator<THost const, Standard>::Type, TSpec> Type;
+};
+
+template <typename THost, typename TSpec>
+struct Iterator< ModifiedString<THost, TSpec>, Rooted > {
+    typedef ModifiedIterator<typename Iterator<THost, Rooted>::Type, TSpec> Type;
+};
+
+template <typename THost, typename TSpec >
+struct Iterator< ModifiedString<THost, TSpec> const, Rooted > {
+    typedef ModifiedIterator<typename Iterator<THost const, Rooted>::Type, TSpec> Type;
+};
+
+
+///.Metafunction.Host.param.T.type:Class.ModifiedString
+
+template < typename THost, typename TSpec >
+struct Host< ModifiedString<THost, TSpec> > {
+    typedef THost Type;
+};
+
+template < typename THost, typename TSpec >
+struct Host< ModifiedString<THost, TSpec> const > {
+    typedef THost const Type;
+};
+
+
+///.Metafunction.IsSequence.param.T.type:Class.ModifiedString
+
+template < typename THost, typename TSpec >
+struct IsSequence< ModifiedString<THost, TSpec> > {
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+template < typename THost, typename TSpec >
+struct AllowsFastRandomAccess< ModifiedString<THost, TSpec> >:
+    AllowsFastRandomAccess<THost> {};
+
+//////////////////////////////////////////////////////////////////////////////
+// host interface
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec>
+inline Holder<THost> &
+_dataHost(ModifiedString<THost, TSpec> & me) 
+{
+    SEQAN_CHECKPOINT;
+    return me.data_host;
+}
+
+template <typename THost, typename TSpec>
+inline Holder<THost> const &
+_dataHost(ModifiedString<THost, TSpec> const & me) 
+{
+    SEQAN_CHECKPOINT;
+    return me.data_host;
+}
+
+template <typename THost, typename TSpec>
+inline typename Reference< typename Cargo<ModifiedString<THost, TSpec> >::Type >::Type
+cargo(ModifiedString<THost, TSpec> & me) 
+{
+    SEQAN_CHECKPOINT;
+    return me.data_cargo;
+}
+
+template <typename THost, typename TSpec>
+inline typename Reference< typename Cargo<ModifiedString<THost, TSpec> const>::Type >::Type
+cargo(ModifiedString<THost, TSpec> const & me) 
+{
+    SEQAN_CHECKPOINT;
+    return me.data_cargo;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// assign
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TDest, typename TSource>
+inline void _copyCargoImpl(TDest &, TSource &, False const) {}
+
+template <typename TDest, typename TSource>
+inline void _copyCargoImpl(TDest & me, TSource & _origin, True const) {
+    SEQAN_CHECKPOINT;
+    cargo(me) = cargo(_origin);
+}
+
+template <typename TDest, typename TSource>
+inline void _copyCargo(TDest & me, TSource & _origin) {
+    SEQAN_CHECKPOINT;
+    _copyCargoImpl(me, _origin, typename IsSameType<
+                   typename RemoveConst_<typename Cargo<TDest>::Type >::Type, 
+                   typename RemoveConst_<typename Cargo<TSource>::Type>::Type >::Type());
+}
+
+
+template <typename THost, typename TSpec, typename THost2>
+inline ModifiedString<THost, TSpec> const &
+assign(ModifiedString<THost, TSpec> & me, ModifiedString<THost2, TSpec> & _origin) {
+    SEQAN_CHECKPOINT;
+   host(me) = host(_origin);
+    _copyCargo(me, _origin);
+    return me;
+}
+
+template <typename THost, typename TSpec, typename THost2>
+inline ModifiedString<THost, TSpec> const &
+assign(ModifiedString<THost, TSpec> & me, ModifiedString<THost2, TSpec> const & _origin) {
+    SEQAN_CHECKPOINT;
+    host(me) = host(_origin);
+    _copyCargo(me, _origin);
+    return me;
+}
+
+template <typename THost, typename TSpec, typename T>
+inline ModifiedString<THost, TSpec> const &
+assign(ModifiedString<THost, TSpec> & me, T & _origin) {
+    SEQAN_CHECKPOINT;
+    host(me) = _origin;
+    return me;
+}
+
+template <typename THost, typename TSpec, typename T>
+inline ModifiedString<THost, TSpec> const &
+assign(ModifiedString<THost, TSpec> & me, T const & _origin) {
+    SEQAN_CHECKPOINT;
+    host(me) = _origin;
+    return me;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// value
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec, typename TPos>
+inline typename Reference<ModifiedString<THost, TSpec> >::Type 
+value(ModifiedString<THost, TSpec> & me, TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return value(begin(me, Standard()) + pos);
+}
+
+template <typename THost, typename TSpec, typename TPos>
+inline typename Reference<ModifiedString<THost, TSpec> const >::Type 
+value(ModifiedString<THost, TSpec> const & me, TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return value(begin(me, Standard()) + pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// setValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec>
+inline ModifiedString<THost, TSpec> const &
+setValue(ModifiedString<THost, TSpec> & me, ModifiedString<THost, TSpec> const & _origin) {
+    SEQAN_CHECKPOINT;
+    setHost(me, host(_origin));
+    _copyCargo(me, _origin);
+    return me;
+}
+
+template <typename THost, typename TSpec>
+inline ModifiedString<THost, TSpec> const &
+setValue(ModifiedString<THost, TSpec> & me, ModifiedString<THost, TSpec> & _origin) {
+    SEQAN_CHECKPOINT;
+    setHost(me, host(_origin));
+    _copyCargo(me, _origin);
+    return me;
+}
+
+// pass _origin to parent modifier
+template <typename THost, typename THostSpec, typename TSpec, typename THost2>
+inline ModifiedString< ModifiedString<THost, THostSpec>, TSpec> const &
+setValue(
+    ModifiedString< ModifiedString<THost, THostSpec>, TSpec> & me, 
+    THost2 const & _origin) 
+{
+    SEQAN_CHECKPOINT;
+    setValue(host(me), _origin);
+    return me;
+}
+
+template <typename THost, typename THostSpec, typename TSpec, typename THost2>
+inline ModifiedString< ModifiedString<THost, THostSpec>, TSpec> const &
+setValue(
+    ModifiedString< ModifiedString<THost, THostSpec>, TSpec> & me, 
+    THost2 & _origin) 
+{
+    SEQAN_CHECKPOINT;
+    setValue(host(me), _origin);
+    return me;
+}
+
+// set _origin at the innermost modifier
+template <typename THost, typename TSpec>
+inline ModifiedString<THost, TSpec> const &
+setValue(ModifiedString<THost, TSpec> & me, THost const & _origin) {
+    SEQAN_CHECKPOINT;
+    assignHost(me, _origin);
+    return me;
+}
+
+template <typename THost, typename TSpec>
+inline ModifiedString<THost, TSpec> const &
+setValue(ModifiedString<THost, TSpec> & me, THost & _origin) {
+    SEQAN_CHECKPOINT;
+    setHost(me, _origin);
+    return me;
+}
+
+// allow _origin conversion at the innermost modifier
+template <typename THost, typename TSpec, typename THost2>
+inline ModifiedString<THost, TSpec> const &
+setValue(ModifiedString<THost, TSpec> & me, THost2 & _origin) {
+    SEQAN_CHECKPOINT;
+    assignHost(me, _origin);
+    return me;
+}
+
+template <typename THost, typename TSpec, typename THost2>
+inline ModifiedString<THost, TSpec> const &
+setValue(ModifiedString<THost, TSpec> & me, THost2 const & _origin) {
+    SEQAN_CHECKPOINT;
+    assignHost(me, _origin);
+    return me;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// length
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename THost, typename TSpec >
+inline typename Size< ModifiedString<THost, TSpec> >::Type 
+length(ModifiedString<THost, TSpec> const & me) {
+    SEQAN_CHECKPOINT;
+    return length(host(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// begin
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename THost, typename TSpec >
+inline typename Iterator< ModifiedString<THost, TSpec> const >::Type 
+begin(ModifiedString<THost, TSpec> const & me) {
+    SEQAN_CHECKPOINT;
+    typename Iterator< ModifiedString<THost, TSpec> const >::Type temp_(begin(host(me)));
+    _copyCargo(temp_, me);
+    return temp_;
+}
+
+template < typename THost, typename TSpec >
+inline typename Iterator< ModifiedString<THost, TSpec> >::Type 
+begin(ModifiedString<THost, TSpec> & me) {
+    SEQAN_CHECKPOINT;
+    typename Iterator< ModifiedString<THost, TSpec> >::Type temp_(begin(host(me)));
+    _copyCargo(temp_, me);
+    return temp_;
+}
+
+template < typename THost, typename TSpec, typename TTagSpec >
+inline typename Iterator< ModifiedString<THost, TSpec> const, Tag<TTagSpec> const >::Type 
+begin(ModifiedString<THost, TSpec> const & me, Tag<TTagSpec> const tag_) {
+    SEQAN_CHECKPOINT;
+    typename Iterator< 
+        ModifiedString<THost, TSpec> const, 
+        Tag<TTagSpec> const 
+    >::Type temp_(begin(host(me), tag_));
+    _copyCargo(temp_, me);
+    return temp_;
+}
+
+template < typename THost, typename TSpec, typename TTagSpec >
+inline typename Iterator< ModifiedString<THost, TSpec>, Tag<TTagSpec> const >::Type 
+begin(ModifiedString<THost, TSpec> & me, Tag<TTagSpec> const tag_) {
+    SEQAN_CHECKPOINT;
+    typename Iterator< 
+        ModifiedString<THost, TSpec>, 
+        Tag<TTagSpec> const 
+    >::Type temp_(begin(host(me), tag_));
+    _copyCargo(temp_, me);
+    return temp_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// end
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename THost, typename TSpec >
+inline typename Iterator< ModifiedString<THost, TSpec> const >::Type 
+end(ModifiedString<THost, TSpec> const & me) {
+    SEQAN_CHECKPOINT;
+    typename Iterator< ModifiedString<THost, TSpec> const >::Type temp_(end(host(me)));
+    _copyCargo(temp_, me);
+    return temp_;
+}
+
+template < typename THost, typename TSpec >
+inline typename Iterator< ModifiedString<THost, TSpec> >::Type 
+end(ModifiedString<THost, TSpec> & me) {
+    SEQAN_CHECKPOINT;
+    typename Iterator< ModifiedString<THost, TSpec> >::Type temp_(end(host(me)));
+    _copyCargo(temp_, me);
+    return temp_;
+}
+
+template < typename THost, typename TSpec, typename TTagSpec >
+inline typename Iterator< ModifiedString<THost, TSpec> const, Tag<TTagSpec> const >::Type 
+end(ModifiedString<THost, TSpec> const & me, Tag<TTagSpec> const tag_) {
+    SEQAN_CHECKPOINT;
+    typename Iterator< ModifiedString<THost, TSpec> const, Tag<TTagSpec> const >::Type temp_(end(host(me), tag_));
+    _copyCargo(temp_, me);
+    return temp_;
+}
+
+template < typename THost, typename TSpec, typename TTagSpec >
+inline typename Iterator< ModifiedString<THost, TSpec>, Tag<TTagSpec> const >::Type 
+end(ModifiedString<THost, TSpec> & me, Tag<TTagSpec> const tag_) {
+    SEQAN_CHECKPOINT;
+    typename Iterator< ModifiedString<THost, TSpec>, Tag<TTagSpec> const >::Type temp_(end(host(me), tag_));
+    _copyCargo(temp_, me);
+    return temp_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec, typename TRight >
+inline bool
+operator == (ModifiedString<THost, TSpec> const & left, 
+			TRight const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<ModifiedString<THost, TSpec> >::Type _lex(left, right);
+    return isEqual(_lex);
+}
+template <typename TLeftValue, typename THost, typename TSpec >
+inline bool
+operator == (TLeftValue * left,
+			 ModifiedString<THost, TSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<ModifiedString<THost, TSpec> >::Type _lex(left, right);
+    return isEqual(_lex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec, typename TRight >
+inline bool
+operator !=(ModifiedString<THost, TSpec> const & left, 
+			TRight const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<ModifiedString<THost, TSpec> >::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+template <typename TLeftValue, typename THost, typename TSpec >
+inline bool
+operator != (TLeftValue * left,
+			 ModifiedString<THost, TSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<ModifiedString<THost, TSpec> >::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator < (ModifiedString<THost, TSpec> const & left, 
+			TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return isLess(left, right, typename DefaultPrefixOrder<ModifiedString<THost, TSpec> >::Type());
+}
+template <typename TLeftValue, typename THost, typename TSpec >
+inline bool
+operator < (TLeftValue * left,
+			 ModifiedString<THost, TSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	return isLess(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator <= (ModifiedString<THost, TSpec> const & left, 
+			 TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return isLessOrEqual(left, right, typename DefaultPrefixOrder<ModifiedString<THost, TSpec> >::Type());
+}
+template <typename TLeftValue, typename THost, typename TSpec >
+inline bool
+operator <= (TLeftValue * left,
+			 ModifiedString<THost, TSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	return isLessOrEqual(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator > (ModifiedString<THost, TSpec> const & left, 
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return isGreater(left, right, typename DefaultPrefixOrder<ModifiedString<THost, TSpec> >::Type());
+}
+template <typename TLeftValue, typename THost, typename TSpec >
+inline bool
+operator > (TLeftValue * left,
+			 ModifiedString<THost, TSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	return isGreater(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec, typename TRight>
+inline bool
+operator >= (ModifiedString<THost, TSpec> const & left, 
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return isGreaterOrEqual(left, right, typename DefaultPrefixOrder<ModifiedString<THost, TSpec> >::Type());
+}
+template <typename TLeftValue, typename THost, typename TSpec >
+inline bool
+operator >= (TLeftValue * left,
+			 ModifiedString<THost, TSpec> const & right)
+{
+SEQAN_CHECKPOINT
+	return isGreaterOrEqual(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// stream operators
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename TStream, typename THost, typename TSpec >
+inline TStream &
+operator << (TStream & target, ModifiedString<THost, TSpec> const & source)
+{
+    SEQAN_CHECKPOINT;
+    write(target, source);
+    return target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename TStream, typename THost, typename TSpec >
+inline TStream &
+operator >> (TStream & source, ModifiedString<THost, TSpec> & target)
+{
+    SEQAN_CHECKPOINT;
+    read(source, target);
+    return source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec>
+inline void const *
+id(ModifiedString<THost, TSpec> & me) 
+{
+    SEQAN_CHECKPOINT;
+    return id(host(me));
+}
+template <typename THost, typename TSpec>
+inline void const *
+id(ModifiedString<THost, TSpec> const & me) 
+{
+    SEQAN_CHECKPOINT;
+    return id(host(me));
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_MODIFIER_MODIFIER_STRING_H_
diff --git a/src/SeqAn-1.3/seqan/modifier/modifier_view.h b/src/SeqAn-1.3/seqan/modifier/modifier_view.h
new file mode 100644
index 0000000..b5096a7
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/modifier/modifier_view.h
@@ -0,0 +1,420 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_MODIFIER_MODIFIER_VIEW_H_
+#define SEQAN_MODIFIER_MODIFIER_VIEW_H_
+
+namespace seqan {
+
+/**
+.Spec.ModView:
+..summary:Transforms the characters of the $THost$ string/iterator using a custom function.
+..cat:Modifier
+..general:Class.ModifiedIterator
+..general:Class.ModifiedString
+..signature:ModifiedIterator<THost, ModView<TFunctor> >
+..signature:ModifiedString<THost, ModView<TFunctor> >
+..param.THost:Original string/iterator.
+...type:Concept.Iterator
+..param.TFunctor:A unary function (see STL's $unary_function$).
+...remarks:The argument type of $TFunctor$ must be $VALUE<THost>::Type$.
+..remarks:The @Metafunction.Value@ type of this modifier is the result type of $TFunctor$.
+..include:seqan/modifier.h
+*/
+
+template <typename TFunctor>
+struct ModView {};
+
+template <typename TFunctor>
+struct ModViewCargo {
+    TFunctor	func;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// view iterator
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename THost, typename TFunctor>
+struct Cargo< ModifiedIterator<THost, ModView<TFunctor> > > {
+    typedef ModViewCargo<TFunctor>	Type;
+};
+
+
+template <typename THost, typename TFunctor>
+class ModifiedIterator<THost, ModView<TFunctor> > {
+public:
+    Holder<THost, Simple>					data_host;
+    typename Cargo<ModifiedIterator>::Type	data_cargo;
+
+    mutable typename Value<ModifiedIterator>::Type	tmp_value;
+
+    ModifiedIterator() {}
+
+    explicit ModifiedIterator(TFunctor &_func) {
+        SEQAN_CHECKPOINT;
+        assignModViewFunctor(*this, _func);
+    }
+
+    explicit ModifiedIterator(TFunctor const &_func) {
+        SEQAN_CHECKPOINT;
+        assignModViewFunctor(*this, _func);
+    }
+
+    ModifiedIterator(ModifiedIterator &_origin):
+        data_host(_origin.data_host),
+        data_cargo(_origin.data_cargo) {
+        SEQAN_CHECKPOINT;
+    }
+
+    ModifiedIterator(ModifiedIterator const &_origin):
+        data_host(_origin.data_host),
+        data_cargo(_origin.data_cargo) {
+        SEQAN_CHECKPOINT;
+    }
+
+    template <typename T>
+    ModifiedIterator(T & _origin) {
+        SEQAN_CHECKPOINT;
+        assign(*this, _origin);
+    }
+
+    template <typename T>
+    ModifiedIterator(T const & _origin) {
+        SEQAN_CHECKPOINT;
+        assign(*this, _origin);
+    }
+//____________________________________________________________________________
+
+    template <typename T>
+    inline ModifiedIterator const &
+    operator = (T & _origin) {
+        SEQAN_CHECKPOINT;
+        assign(*this, _origin);
+        return *this;
+    }
+
+    template <typename T>
+    inline ModifiedIterator const &
+    operator = (T const & _origin) {
+        SEQAN_CHECKPOINT;
+        assign(*this, _origin);
+        return *this;
+    }
+};
+
+template <typename THost, typename TFunctor>
+struct Value< ModifiedIterator<THost, ModView<TFunctor> > > {
+    typedef typename TFunctor::result_type			TResult;
+    typedef typename RemoveConst_<TResult>::Type	Type;
+};
+
+template <typename THost, typename TFunctor>
+struct GetValue< ModifiedIterator<THost, ModView<TFunctor> > >:
+    Value< ModifiedIterator<THost, ModView<TFunctor> > > {};
+
+template <typename THost, typename TFunctor>
+struct Reference< ModifiedIterator<THost, ModView<TFunctor> > > {
+    typedef typename Value< ModifiedIterator<THost, ModView<TFunctor> > >::Type & Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// value
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TFunctor>
+inline typename Reference<ModifiedIterator<THost, ModView<TFunctor> > >::Type 
+value(ModifiedIterator<THost, ModView<TFunctor> > & me)
+{
+    SEQAN_CHECKPOINT;
+    me.tmp_value = cargo(me).func(getValue(host(me)));
+    return me.tmp_value;
+}
+
+template <typename THost, typename TFunctor>
+inline typename Reference<ModifiedIterator<THost, ModView<TFunctor> > const>::Type 
+value(ModifiedIterator<THost, ModView<TFunctor> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    me.tmp_value = cargo(me).func(getValue(host(me)));
+    return me.tmp_value;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// getValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TFunctor>
+inline typename GetValue<ModifiedIterator<THost, ModView<TFunctor> > >::Type 
+getValue(ModifiedIterator<THost, ModView<TFunctor> > & me)
+{
+    SEQAN_CHECKPOINT;
+    return cargo(me).func(getValue(host(me)));
+}
+
+template <typename THost, typename TFunctor>
+inline typename GetValue<ModifiedIterator<THost, ModView<TFunctor> > const>::Type 
+getValue(ModifiedIterator<THost, ModView<TFunctor> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    return cargo(me).func(getValue(host(me)));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// assignModViewFunctor
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TFunctor>
+inline void
+assignModViewFunctor(ModifiedIterator<THost, ModView<TFunctor> > & me, TFunctor const & _func) 
+{
+    SEQAN_CHECKPOINT;
+    cargo(me).func = _func;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// view string
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename THost, typename TFunctor>
+struct Cargo< ModifiedString<THost, ModView<TFunctor> > > {
+    typedef ModViewCargo<TFunctor>	Type;
+};
+
+template <typename THost, typename TFunctor>
+class ModifiedString<THost, ModView<TFunctor> > {
+public:
+    Holder<THost>							data_host;
+    typename Cargo<ModifiedString>::Type	data_cargo;
+
+    mutable typename Value<ModifiedString>::Type	tmp_value;
+
+    ModifiedString() {}
+
+    explicit ModifiedString(TFunctor &_func) {
+        SEQAN_CHECKPOINT;
+        cargo(*this).func = _func;
+    }
+
+    explicit ModifiedString(TFunctor const &_func) {
+        SEQAN_CHECKPOINT;
+        cargo(*this).func = _func;
+    }
+
+    explicit ModifiedString(ModifiedString const &_origin, TFunctor const &_func):
+        data_host(_origin.data_host)
+    {
+        SEQAN_CHECKPOINT;
+        cargo(*this).func = _func;
+    }
+
+    ModifiedString(ModifiedString &_origin):
+        data_host(_origin.data_host),
+        data_cargo(_origin.data_cargo) {
+        SEQAN_CHECKPOINT;
+    }
+
+    ModifiedString(ModifiedString const &_origin):
+        data_host(_origin.data_host),
+        data_cargo(_origin.data_cargo) {
+        SEQAN_CHECKPOINT;
+    }
+
+    ModifiedString(THost &_origin) {
+        SEQAN_CHECKPOINT;
+        setHost(*this, _origin);
+    }
+
+    template <typename T>
+    ModifiedString(T & _origin) {
+        SEQAN_CHECKPOINT;
+        setValue(*this, _origin);
+    }
+
+    template <typename T>
+    ModifiedString(T const & _origin) {
+        SEQAN_CHECKPOINT;
+        setValue(*this, _origin);
+    }
+
+    template <typename T>
+    inline ModifiedString const &
+    operator = (T & _origin) {
+        SEQAN_CHECKPOINT;
+        assign(*this, _origin);
+        return *this;
+    }
+
+    template <typename TPos>
+    inline typename Reference<ModifiedString>::Type 
+    operator [] (TPos pos)
+    {
+        SEQAN_CHECKPOINT;
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<ModifiedString const>::Type 
+    operator [] (TPos pos) const
+    {
+        SEQAN_CHECKPOINT;
+        return value(*this, pos);
+    }
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// value
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TFunctor, typename TPos>
+inline typename Reference<ModifiedString<THost, ModView<TFunctor> > >::Type 
+value(ModifiedString<THost, ModView<TFunctor> > & me, TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    me.tmp_value = cargo(me).func(getValue(host(me), pos));
+    return me.tmp_value;
+}
+
+template <typename THost, typename TFunctor, typename TPos>
+inline typename Reference<ModifiedString<THost, ModView<TFunctor> > const>::Type 
+value(ModifiedString<THost, ModView<TFunctor> > const & me, TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    me.tmp_value = cargo(me).func(getValue(host(me), pos));
+    return me.tmp_value;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// getValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TFunctor, typename TPos>
+inline typename GetValue<ModifiedString<THost, ModView<TFunctor> > >::Type 
+getValue(ModifiedString<THost, ModView<TFunctor> > & me, TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return cargo(me).func(getValue(host(me), pos));
+}
+
+template <typename THost, typename TFunctor, typename TPos>
+inline typename GetValue<ModifiedString<THost, ModView<TFunctor> > const>::Type 
+getValue(ModifiedString<THost, ModView<TFunctor> > const & me, TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return cargo(me).func(getValue(host(me), pos));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// assignModViewFunctor
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TFunctor>
+inline void
+assignModViewFunctor(ModifiedString<THost, ModView<TFunctor> > & me, TFunctor const & _func)
+{
+    SEQAN_CHECKPOINT;
+    cargo(me).func = _func;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// convert
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename TSequence, typename TFunctor >
+inline void
+convert(TSequence & sequence, TFunctor const &F)
+{
+	SEQAN_CHECKPOINT;
+#if defined (_OPENMP) && defined (SEQAN_PARALLEL)
+	// OpenMP does not support for loop with iterators. Therefore use index variables.
+	typedef typename Position<TSequence>::Type	TPos;
+	typedef typename MakeSigned_<TPos>::Type	TSignedPos;
+
+	#pragma omp parallel for if(length(sequence) > 1000000)
+	for(TSignedPos p = 0; p < (TSignedPos)length(sequence); ++p)
+		sequence[p] = F(sequence[p]);
+	
+#else
+	typedef typename Iterator<TSequence, Standard>::Type	TIter;
+
+	TIter it = begin(sequence, Standard());
+	TIter itEnd = end(sequence, Standard());
+	for(; it != itEnd; ++it)
+		*it = F(*it);
+#endif
+}
+
+template < typename TSequence, typename TFunctor >
+inline void
+convert(TSequence const & sequence, TFunctor const &F)
+{
+	SEQAN_CHECKPOINT;
+#if defined (_OPENMP) && defined (SEQAN_PARALLEL)
+	// OpenMP does not support for loop with iterators. Therefore use index variables.
+	typedef typename Position<TSequence>::Type	TPos;
+	typedef typename MakeSigned_<TPos>::Type	TSignedPos;
+
+	#pragma omp parallel for if(length(sequence) > 1000000)
+	for(TSignedPos p = 0; p < (TSignedPos)length(sequence); ++p)
+		sequence[p] = F(sequence[p]);
+	
+#else
+	typedef typename Iterator<TSequence, Standard>::Type	TIter;
+
+	TIter it = begin(sequence, Standard());
+	TIter itEnd = end(sequence, Standard());
+	for(; it != itEnd; ++it)
+		*it = F(*it);
+#endif
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_MODIFIER_MODIFIER_VIEW_H_
diff --git a/src/SeqAn-1.3/seqan/parallel.h b/src/SeqAn-1.3/seqan/parallel.h
new file mode 100755
index 0000000..d1b7d95
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/parallel.h
@@ -0,0 +1,58 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Umbrella header for the parallel module.
+// ==========================================================================
+
+#ifndef SEQAN_PARALLEL_H_
+#define SEQAN_PARALLEL_H_
+
+//____________________________________________________________________________
+// Prerequisites
+
+#include <seqan/basic.h>
+#include <seqan/platform.h>
+
+//____________________________________________________________________________
+// Module Headers
+
+// Misc.
+#include <seqan/parallel/parallel_macros.h>
+
+// Atomic operations.
+#include <seqan/parallel/parallel_atomic_primitives.h>
+#include <seqan/parallel/parallel_atomic_misc.h>
+
+//____________________________________________________________________________
+
+#endif  // SEQAN_PARALLEL_H_
diff --git a/src/SeqAn-1.3/seqan/parallel/parallel_atomic_misc.h b/src/SeqAn-1.3/seqan/parallel/parallel_atomic_misc.h
new file mode 100755
index 0000000..2f5cdf4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/parallel/parallel_atomic_misc.h
@@ -0,0 +1,116 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Misc simple functionality built upon atomic primitives.
+// ==========================================================================
+
+// SEQAN_NO_GENERATED_FORWARDS: No forwards are generated for this file.
+
+#ifndef SEQAN_PARALLEL_PARALLEL_ATOMIC_MISC_H_
+#define SEQAN_PARALLEL_PARALLEL_ATOMIC_MISC_H_
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+/**
+.Function.atomicMax
+..summary:Lock-free implementation of $x = max(x, y)$.
+..cat:Atomic Operations
+..signature:atomicMax(x, y)
+..param.x:Integer to set to $max(x, y)$
+..param.y:Other integer.
+..remarks:This is equivalent to
+...code:
+atomic {
+    x = max(x, y);
+}
+...text:While lock-free, the function tries to update $x$ as long as $x < y$ in a loop and might run a long time if x is incremented continuously in another thread.
+..header:seqan/parallel.h
+..see:Function.atomicMin
+ */
+template <typename T>
+inline void
+atomicMax(T volatile & x, T y)
+{
+    T val = x;
+    while (val < y) {
+        T m = _max(val, y);
+        val = atomicCas(x, val, m);
+    }
+}
+
+/**
+.Function.atomicMin
+..summary:Lock-free implementation of $x = min(x, y)$.
+..cat:Atomic Operations
+..signature:atomicMin(x, y)
+..param.x:Integer to set to min(x, y)$
+..param.y:Other integer.
+..remarks:This is equivalent to
+...code:
+atomic {
+    x = min(x, y);
+}
+...text:While lock-free, the function tries to update $x$ as long as $x > y$ in a loop and might run a long time if x is incremented continuously in another thread.
+..header:seqan/parallel.h
+..see:Function.atomicMax
+ */
+template <typename T>
+inline void
+atomicMin(T volatile & x, T y)
+{
+    T val = x;
+    while (val > y) {
+        T m = _min(val, y);
+        val = atomicCas(x, val, m);
+    }
+}
+
+} // namespace seqan
+
+#endif  // #define SEQAN_PARALLEL_PARALLEL_ATOMIC_MISC_H_
diff --git a/src/SeqAn-1.3/seqan/parallel/parallel_atomic_primitives.h b/src/SeqAn-1.3/seqan/parallel/parallel_atomic_primitives.h
new file mode 100755
index 0000000..da6c932
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/parallel/parallel_atomic_primitives.h
@@ -0,0 +1,291 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+
+// SEQAN_NO_GENERATED_FORWARDS: No forwards are generated for this file.
+
+#ifndef SEQAN_PARALLEL_PARALLEL_ATOMIC_PRIMITIVES_H_
+#define SEQAN_PARALLEL_PARALLEL_ATOMIC_PRIMITIVES_H_
+
+#if defined(PLATFORM_WINDOWS) && !defined(PLATFORM_WINDOWS_MINGW)
+#include <intrin.h>
+#endif  // #if defined(PLATFORM_WINDOWS) && !defined(PLATFORM_WINDOWS_MINGW)
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// TODO(holtgrew): One could implement an HasAtomicFunction<T, Function> Metafunction but that would probably be pretty useless.
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// TODO(holtgrew): What about correct alignment?!
+
+/**
+.Function.atomicInc
+..summary:Atomically increment an integer.
+..cat:Atomic Operations
+..signature:atomicInc(x)
+..param.x:Integer, by reference.
+..returns:The old value of $x.
+..remarks:This is equivalent to an atomic $++x$.
+..remarks:Note that atomic increments are limited to 32 bit and 64 bit with MSVC (64 bit is only available on 64 bit Windows).
+..remarks:You are responsible for correctly aligning $x$ such that the atomic increment works on the hardware you target.
+..see:Function.atomicDec
+..see:Function.atomicAdd
+..see:Function.atomicOr
+..see:Function.atomicXor
+..see:Function.atomicCas
+..include:seqan/parallel.h
+
+.Function.atomicDec
+..summary:Atomically decrement an integer.
+..cat:Atomic Operations
+..signature:atomicDec(x)
+..param.x:Integer, by reference.
+..returns:The old value of $x$.
+..remarks:This is equivalent to an atomic $--x$.
+..remarks:Note that atomic decrements are limited to 32 bit and 64 bit with MSVC (64 bit is only available on 64 bit Windows).
+..remarks:You are responsible for correctly aligning $x$ such that the atomic increment works on the hardware you target.
+..see:Function.atomicInc
+..see:Function.atomicAdd
+..see:Function.atomicOr
+..see:Function.atomicXor
+..see:Function.atomicCas
+..include:seqan/parallel.h
+
+.Function.atomicAdd
+..summary:Atomically add an integer to another integer.
+..cat:Atomic Operations
+..signature:atomicAdd(x, y)
+..param.x:Integer, by reference.
+..param.y:Integer to add to the given value.
+..returns:The old value of $x$.
+..remarks:This is equivalent to an atomic $x += y$.
+..remarks:Note that atomic fetch-and-add is limited to 32 bit and 64 bit with MSVC (64 bit is only available on 64 bit Windows).
+..remarks:You are responsible for correctly aligning $x$ such that the atomic increment works on the hardware you target.
+..see:Function.atomicInc
+..see:Function.atomicDec
+..see:Function.atomicOr
+..see:Function.atomicXor
+..see:Function.atomicCas
+..include:seqan/parallel.h
+
+.Function.atomicOr
+..summary:Atomically combine two integers with $OR$ operation.
+..cat:Atomic Operations
+..signature:atomicOr(x, y)
+..param.x:Integer, by reference.
+..param.y:Integer to combine with $OR$ operation.
+..returns:The old value of $x$.
+..remarks:This is equivalent to an atomic $x |= y$.
+..remarks:Atomic fetch-and-or for 64 bit integers is only available on 64 bit processors when targeting Intel.
+..remarks:Atomic fetch-and-or does not work in VS8 on 64 bit Windows, you can only use $atomicOr()$ portably on 32 and 64 bit integers.
+..remarks:You are responsible for correctly aligning $x$ such that the atomic increment works on the hardware you target.
+..see:Function.atomicInc
+..see:Function.atomicDec
+..see:Function.atomicAdd
+..see:Function.atomicXor
+..see:Function.atomicCas
+..include:seqan/parallel.h
+
+.Function.atomicXor
+..summary:Atomically combine wto integers with $XOR$ operation.
+..cat:Atomic Operations
+..signature:atomicXor(x, y)
+..param.x:x, by reference.
+..param.y:Integer to combine with $XOR$ operation.
+..returns:The old value of $x$.
+..remarks:This is equivalent to an atomic $x ^= y$.
+..remarks:Atomic fetch-and-xor for 64 bit integers is only available on 64 bit processors when targeting Intel.
+..remarks:Atomic fetch-and-xor does not work in VS8 on 64 bit Windows, you can only use $atomicXor()$ portably on 32 and 64 bit integers.
+..remarks:You are responsible for correctly aligning $x$ such that the atomic increment works on the hardware you target.
+..see:Function.atomicInc
+..see:Function.atomicDec
+..see:Function.atomicAdd
+..see:Function.atomicOr
+..see:Function.atomicCas
+..include:seqan/parallel.h
+
+.Function.atomicCas
+..summary:Compare-and-Swap operation.
+..cat:Atomic Operations
+..signature:atomicCas(x, cmp, y)
+..param.x:Pointer to the integer to swap.
+..param.cmp:Value to compare $x$ with.
+..param.y:Value to set $x$ to if it is equal to $cmp$.
+..remarks:The pseudo code for this is
+..remarks:On Windows, atomic CAS is only available for 16, 32, and 64 bit integers, 64 bit is only available on 64 bit Windows.
+..remarks:You are responsible for correctly aligning $x$ such that the atomic increment works on the hardware you target.
+...code:
+atomic
+{
+    T val = *(&x);
+    if (val == cmp)
+        *(&x) = y;
+    return val;
+}
+..see:Function.atomicInc
+..see:Function.atomicDec
+..see:Function.atomicAdd
+..see:Function.atomicOr
+..see:Function.atomicXor
+..include:seqan/parallel.h
+ */
+
+#if defined(PLATFORM_WINDOWS) && !defined(PLATFORM_WINDOWS_MINGW)
+
+// ----------------------------------------------------------------------------
+// Implementation in MSVC
+// ----------------------------------------------------------------------------
+
+// We break the standard code layout here since we only wrap compiler
+// intrinsics and it's easier to see things with one glance this way.
+
+inline          long atomicInc(         long volatile & x) { return InterlockedIncrement(&x); }
+inline unsigned long atomicInc(unsigned long volatile & x) { return InterlockedIncrement(reinterpret_cast<long volatile *>(&x)); }
+#ifdef _WIN64
+inline       __int64 atomicInc( __int64 volatile & x) { return _InterlockedIncrement64(&x); }
+inline      __uint64 atomicInc(__uint64 volatile & x) { return _InterlockedIncrement64(reinterpret_cast<__int64 volatile *>(&x)); }
+#endif  // #ifdef _WIN64
+
+inline          long atomicDec(         long volatile & x) { return _InterlockedDecrement(&x); }
+inline unsigned long atomicDec(unsigned long volatile & x) { return _InterlockedDecrement(reinterpret_cast<long volatile *>(&x)); }
+#ifdef _WIN64
+inline       __int64 atomicDec( __int64 volatile & x) { return _InterlockedDecrement64(&x); }
+inline      __uint64 atomicDec(__uint64 volatile & x) { return _InterlockedDecrement64(reinterpret_cast<__int64 volatile *>(&x)); }
+#endif  // #ifdef _WIN64
+
+inline          long atomicAdd(         long volatile & x, long y) { return _InterlockedExchangeAdd(&x, y); }
+inline unsigned long atomicAdd(unsigned long volatile & x, long y) { return _InterlockedExchangeAdd(reinterpret_cast<long volatile *>(&x), y); }
+#ifdef _WIN64
+inline       __int64 atomicAdd( __int64 volatile & x,  __int64 y) { return _InterlockedExchangeAdd64(&x, y); }
+inline      __uint64 atomicAdd(__uint64 volatile & x, __uint64 y) { return _InterlockedExchangeAdd64(reinterpret_cast<__int64 volatile *>(&x), y); }
+#endif  // #ifdef _WIN64
+
+// TODO(holtgrew): Although documented to work, you get a linker error (LNK2019) in MS VS8 on 64 bit Windows.
+//   LNK2019: unresolved external symbol _InterlockedOr8 referenced in function "char __cdecl seqan::atomicOr(char volatile &,char)" (?atomicOr at seqan@@YADAECDD at Z)
+// inline           char atomicOr(          char volatile & x,           char y) { return _InterlockedOr8(&x, y); }
+// inline unsigned  char atomicOr(unsigned  char volatile & x, unsigned  char y) { return _InterlockedOr8(reinterpret_cast<char volatile *>(&x), y); }
+// inline          short atomicOr(         short volatile & x,          short y) { return _InterlockedOr16(&x, y); }
+// inline unsigned short atomicOr(unsigned short volatile & x, unsigned short y) { return _InterlockedOr16(reinterpret_cast<short volatile *>(&x), y); }
+inline           long atomicOr(          long volatile & x,           long y) { return _InterlockedOr(&x, y); }
+inline unsigned  long atomicOr(unsigned  long volatile & x, unsigned  long y) { return _InterlockedOr(reinterpret_cast<long volatile *>(&x), y); }
+#ifdef _WIN64
+inline        __int64 atomicOr(       __int64 volatile & x,        __int64 y) { return _InterlockedOr64(&x, y); }
+inline       __uint64 atomicOr(      __uint64 volatile & x,       __uint64 y) { return _InterlockedOr64(reinterpret_cast<__int64 volatile*>(&x), y); }
+#endif  // #ifdef _WIN64
+
+// TODO(holtgrew): Although documented to work, you get a linker error (LNK2019) in MS VS8 on 64 bit Windows.
+//   LNK2019: unresolved external symbol _InterlockedOr8 referenced in function "char __cdecl seqan::atomicOr(char volatile &,char)" (?atomicOr at seqan@@YADAECDD at Z)
+// inline           char atomicXor(          char volatile & x,           char y) { return _InterlockedXor8(&x, y); }
+// inline unsigned  char atomicXor(unsigned  char volatile & x, unsigned  char y) { return _InterlockedXor8(reinterpret_cast<char volatile *>(&x), y); }
+// inline          short atomicXor(         short volatile & x,          short y) { return _InterlockedXor16(&x, y); }
+// inline unsigned short atomicXor(unsigned short volatile & x, unsigned short y) { return _InterlockedXor16(reinterpret_cast<short volatile *>(&x), y); }
+inline           long atomicXor(          long volatile & x,           long y) { return _InterlockedXor(&x, y); }
+inline unsigned  long atomicXor(unsigned  long volatile & x, unsigned  long y) { return _InterlockedXor(reinterpret_cast<long volatile *>(&x), y); }
+#ifdef _WIN64
+inline        __int64 atomicXor(       __int64 volatile & x,        __int64 y) { return _InterlockedXor64(&x, y); }
+inline       __uint64 atomicXor(      __uint64 volatile & x,       __uint64 y) { return _InterlockedXor64(reinterpret_cast<__int64 volatile*>(&x), y); }
+#endif  // #ifdef _WIN64
+
+inline          short atomicCas(         short volatile & x,          short cmp,          short y) { return _InterlockedCompareExchange16(&x, y, cmp); }
+inline unsigned short atomicCas(unsigned short volatile & x, unsigned short cmp, unsigned short y) { return _InterlockedCompareExchange16(reinterpret_cast<short volatile *>(&x), y, cmp); }
+inline           long atomicCas(           int volatile & x,            int cmp,            int y) { return _InterlockedCompareExchange(reinterpret_cast<long volatile *>(&x), y, cmp); }
+inline unsigned  long atomicCas(unsigned   int volatile & x, unsigned   int cmp, unsigned   int y) { return _InterlockedCompareExchange(reinterpret_cast<long volatile *>(&x), y, cmp); }
+inline           long atomicCas(          long volatile & x,           long cmp,           long y) { return _InterlockedCompareExchange(&x, y, cmp); }
+inline unsigned  long atomicCas(unsigned  long volatile & x, unsigned  long cmp, unsigned  long y) { return _InterlockedCompareExchange(reinterpret_cast<long volatile *>(&x), y, cmp); }
+#ifdef _WIN64
+inline        __int64 atomicCas(       __int64 volatile & x,        __int64 cmp,        __int64 y) { return _InterlockedCompareExchange64(&x, y, cmp); }
+inline       __uint64 atomicCas(      __uint64 volatile & x,       __uint64 cmp,       __uint64 y) { return _InterlockedCompareExchange64(reinterpret_cast<__int64 volatile *>(&x), y, cmp); }
+#endif  // #ifdef _WIN64
+
+#else  // #if defined(PLATFORM_WINDOWS) && !defined(PLATFORM_WINDOWS_MINGW)
+
+// ----------------------------------------------------------------------------
+// Implementation in GCC (LLVM is GCC compatible)
+// ----------------------------------------------------------------------------
+
+template <typename T>
+inline T atomicInc(T volatile & x)
+{
+    return __sync_fetch_and_add(&x, 1);
+}
+
+template <typename T>
+inline T atomicDec(T volatile & x)
+{
+    return __sync_fetch_and_add(&x, -1);
+}
+
+template <typename T1, typename T2>
+inline T1 atomicAdd(T1 volatile & x, T2 y)
+{
+    return __sync_fetch_and_add(&x, y);
+}
+
+template <typename T>
+inline T atomicOr(T volatile & x, T y)
+{
+    return __sync_fetch_and_or(&x, y);
+}
+
+template <typename T>
+inline T atomicXor(T volatile & x, T y)
+{
+    return __sync_fetch_and_xor(&x, y);
+}
+
+template <typename T>
+inline T atomicCas(T volatile & x, T cmp, T y)
+{
+    return __sync_val_compare_and_swap(&x, cmp, y);
+}
+
+#endif  // #if defined(PLATFORM_WINDOWS) && !defined(PLATFORM_WINDOWS_MINGW)
+	
+} // namespace seqan
+
+#endif  // #if defined(PLATFORM_WINDOWS) && !defined(PLATFORM_WINDOWS_MINGW)
diff --git a/src/SeqAn-1.3/seqan/parallel/parallel_generated_forwards.h b/src/SeqAn-1.3/seqan/parallel/parallel_generated_forwards.h
new file mode 100644
index 0000000..c818f8d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/parallel/parallel_generated_forwards.h
@@ -0,0 +1,55 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_PARALLEL_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_PARALLEL_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/parallel/parallel_macros.h b/src/SeqAn-1.3/seqan/parallel/parallel_macros.h
new file mode 100755
index 0000000..b22a021
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/parallel/parallel_macros.h
@@ -0,0 +1,59 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Utility macros for parallelism.
+// ==========================================================================
+
+#ifndef SEQAN_PARALLEL_PARALLEL_MACROS_H_
+#define SEQAN_PARALLEL_PARALLEL_MACROS_H_
+
+// Macro: SEQAN_OMP_PRAGMA(x)
+//
+// Example: SEQAN_OMP_PRAGMA(omp parallel for)
+//
+// If OpenMP is enabled, this macro expands to "#pragma + $x".  This is useful
+// for disabling OpenMP pragmas on compilers that do not support OpenMP to
+// suppress warnings.
+#ifdef _OPENMP
+  #if defined(PLATFORM_WINDOWS_MINGW) || defined(PLATFORM_GCC)
+    // GCC _Pragma operator
+    #define SEQAN_OMP_PRAGMA(x) _Pragma (#x)
+  #else  // #if defined(PLATFORM_WINDOWS_MINGW) || defined(PLATFORM_GCC)
+    // MSVC __pragma-operator
+    #define SEQAN_OMP_PRAGMA(x) __pragma (x)
+  #endif // #if defined(PLATFORM_WINDOWS_MINGW) || defined(PLATFORM_GCC)
+#else  // #ifdef _OPENMP
+  #define SEQAN_OMP_PRAGMA(x)
+#endif  // #ifdef _OPENMP
+
+#endif  // SEQAN_PARALLEL_PARALLEL_MACROS_H_
diff --git a/src/SeqAn-1.3/seqan/pipe.h b/src/SeqAn-1.3/seqan/pipe.h
new file mode 100644
index 0000000..037dd43
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe.h
@@ -0,0 +1,83 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_H
+#define SEQAN_HEADER_PIPE_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <seqan/file.h>
+#include <seqan/basic/basic_volatile_ptr.h>
+
+#include <cstdio>
+#include <cassert>
+#include <functional>
+#include <iterator>
+#include <climits>
+#include <vector>
+#include <queue>
+
+//____________________________________________________________________________
+// pipes
+
+#define SEQAN_NAMESPACE_PIPELINING pipe
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/pipe/pipe_generated_forwards.h>
+#endif
+
+#include <seqan/pipe/pipe_base.h>
+#include <seqan/pipe/pipe_iterator.h>
+#include <seqan/pipe/pipe_caster.h>
+#include <seqan/pipe/pipe_counter.h>
+#include <seqan/pipe/pipe_echoer.h>
+#include <seqan/pipe/pipe_edit_environment.h>
+#include <seqan/pipe/pipe_filter.h>
+#include <seqan/pipe/pipe_joiner.h>
+#include <seqan/pipe/pipe_namer.h>
+#include <seqan/pipe/pipe_sampler.h>
+#include <seqan/pipe/pipe_shifter.h>
+#include <seqan/pipe/pipe_source.h>
+#include <seqan/pipe/pipe_tupler.h>
+
+//____________________________________________________________________________
+// pools
+
+#include <seqan/pipe/pool_base.h>
+#include <seqan/pipe/pool_mapper.h>
+
+#include <seqan/misc/priority_type_base.h>
+#include <seqan/misc/priority_type_heap.h>
+#include <seqan/pipe/pool_sorter.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_base.h b/src/SeqAn-1.3/seqan/pipe/pipe_base.h
new file mode 100644
index 0000000..040a971
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_base.h
@@ -0,0 +1,857 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_BASE_H
+#define SEQAN_HEADER_PIPE_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+
+	// shortcuts to ease pipeline construction
+    #define TypeOf_(TObject)  typename Value<TObject>::Type
+    #define TSizeOf_(TObject) typename Size<TObject>::Type
+
+/**
+.Class.Pipe:
+..cat:Pipelining
+..summary:Pipes are pop-passive pipeline modules.
+..signature:Pipe<TInput, TSpec>
+..param.TInput:The type of the pipeline module this module reads from.
+...remarks:Use @Class.Bundle2@, @Class.Bundle3@, etc. to read from more than one module.
+..param.TSpec:The specializing type.
+..remarks:Use @Metafunction.Value@ to get the output type of a given Pipe (returns $Value<TInput>::Type$ by default).
+..remarks:Use @Metafunction.Size@ to get the size type of a given Pipe (returns $Size<TInput>::Type$ by default).
+.Memfunc.Pipe#Pipe:
+..class:Class.Pipe
+..summary:Constructor
+..signature:Pipe<TInput, TSpec> (in)
+..param.in:Reference to an input pipe.
+..include:seqan/pipe.h
+*/
+
+    template < typename TInput, typename TSpec >
+    struct Pipe {
+        TInput ∈
+        Pipe(TInput &_in): in(_in) {}
+    };
+
+	// base class for multiple sequence algorithms
+	// to hold extra information about desired position type (TPair)
+	// and the type storing absolute sequence offsets (TLimitsString)
+    template <typename TSpec, typename TPair, typename TLimitsString>
+	struct Multi;
+
+/**
+.Class.Bundle2:
+..cat:Aggregates
+..summary:Stores references to two arbitrary objects.
+..signature:Bundle2<TInput1, TInput2>
+..param.TInput1:The type of the first object.
+..param.TInput2:The type of the second object.
+..remarks:Primarily used as an adaptor for pipes with two sources.
+.Memvar.Bundle2#in1:
+..class:Class.Bundle2
+..summary:TInput1 reference
+.Memvar.Bundle2#in2:
+..class:Class.Bundle2
+..summary:TInput2 reference
+..include:seqan/pipe.h
+*/
+    // pipe input adapter 2->1 pipe
+    template < typename TInput1, typename TInput2 >
+    struct Bundle2 {
+        typedef TInput1 Input1;
+        typedef TInput2 Input2;
+        TInput1 &in1;
+        TInput2 &in2;
+        Bundle2(TInput1 &_in1, TInput2 &_in2): in1(_in1),in2(_in2) {}
+    };
+
+/**
+.Function.bundle2:
+..cat:Pipelining
+..summary:Returns a bundle of two objects.
+..signature:bundle2(in1, in2)
+..param.in1:First object.
+..param.in2:Second object.
+..returns:A @Class.Bundle2@ with references to $in1$ and $in2$.
+..see:Class.Bundle2
+..include:seqan/pipe.h
+*/
+	template < typename TInput1, typename TInput2 >
+	inline Bundle2< TInput1, TInput2 >
+	bundle2(TInput1 &_in1, TInput2 &_in2) {
+		return Bundle2< TInput1, TInput2 >(_in1, _in2);
+	}
+
+/**
+.Class.Bundle3:
+..cat:Aggregates
+..summary:Stores references to three arbitrary objects.
+..signature:Bundle3<TInput1, TInput2, TInput3>
+..param.TInput1:The type of the first object.
+..param.TInput2:The type of the second object.
+..param.TInput3:The type of the third object.
+..remarks:Primarily used as an adaptor for pipes with three sources.
+.Memvar.Bundle3#in1:
+..class:Class.Bundle3
+..summary:TInput1 reference
+.Memvar.Bundle3#in2:
+..class:Class.Bundle3
+..summary:TInput2 reference
+.Memvar.Bundle3#in3:
+..class:Class.Bundle3
+..summary:TInput3 reference
+..include:seqan/pipe.h
+*/
+    // pipe input adapter 3->1 pipe
+    template < typename TInput1, typename TInput2, typename TInput3 >
+    struct Bundle3 {
+        typedef TInput1 Input1;
+        typedef TInput2 Input2;
+        typedef TInput3 Input3;
+        TInput1 &in1;
+        TInput2 &in2;
+        TInput3 &in3;
+        Bundle3(TInput1 &_in1, TInput2 &_in2, TInput3 &_in3): in1(_in1),in2(_in2),in3(_in3) {}
+    };
+
+/**
+.Function.bundle3:
+..cat:Pipelining
+..summary:Returns a bundle of three objects.
+..signature:bundle3(in1, in2, in3)
+..param.in1:First object.
+..param.in2:Second object.
+..param.in3:Third object.
+..returns:A @Class.Bundle3@ with references to $in1$, $in2$, and $in3$.
+..see:Class.Bundle3
+..include:seqan/pipe.h
+*/
+	template < typename TInput1, typename TInput2, typename TInput3 >
+	inline Bundle3< TInput1, TInput2, TInput3 >
+	bundle3(TInput1 &_in1, TInput2 &_in2, TInput3 &_in3) {
+		return Bundle3< TInput1, TInput2, TInput3 >(_in1, _in2, _in3);
+	}
+
+/**
+.Class.Bundle5:
+..cat:Aggregates
+..summary:Stores references to five arbitrary objects.
+..signature:Bundle5<TInput1, TInput2, TInput3, TInput4, TInput5>
+..param.TInput1:The type of the first object.
+..param.TInput2:The type of the second object.
+..param.TInput3:The type of the third object.
+..param.TInput4:The type of the fourth object.
+..param.TInput5:The type of the fifth object.
+..remarks:Primarily used as an adaptor for pipes with five sources.
+.Memvar.Bundle5#in1:
+..class:Class.Bundle5
+..summary:TInput1 reference
+.Memvar.Bundle5#in2:
+..class:Class.Bundle5
+..summary:TInput2 reference
+.Memvar.Bundle5#in3:
+..class:Class.Bundle5
+..summary:TInput3 reference
+.Memvar.Bundle5#in4:
+..class:Class.Bundle5
+..summary:TInput4 reference
+.Memvar.Bundle5#in5:
+..class:Class.Bundle5
+..summary:TInput5 reference
+..include:seqan/pipe.h
+*/
+    // pipe input adapter 5->1 pipe
+    template < typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5 >
+    struct Bundle5 {
+        TIn1 &in1; TIn2 &in2;
+        TIn3 &in3; TIn4 &in4;
+        TIn5 &in5;
+        Bundle5(TIn1& _in1, TIn2& _in2,
+                TIn3& _in3, TIn4& _in4,
+                TIn5& _in5):    in1(_in1),in2(_in2),
+                                in3(_in3),in4(_in4),
+                                in5(_in5) {}
+    };
+
+/**
+.Function.bundle5:
+..cat:Pipelining
+..summary:Returns a bundle of five objects.
+..signature:bundle5(in1, in2, in3, in4, in5)
+..param.in1:First object.
+..param.in2:Second object.
+..param.in3:Third object.
+..param.in4:Fourth object.
+..param.in5:Fifth object.
+..returns:A @Class.Bundle5@ with references to $in1$, $in2$, $in3$, $in4$, and $in5$.
+..see:Class.Bundle5
+..include:seqan/pipe.h
+*/
+    template < typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5 >
+	inline Bundle5< TIn1, TIn2, TIn3, TIn4, TIn5 >
+	bundle5(TIn1 &_in1, TIn2 &_in2, TIn3 &_in3, TIn4 &_in4, TIn5 &_in5) {
+		return Bundle5< TIn1, TIn2, TIn3, TIn4, TIn5 >(_in1, _in2, _in3, _in4, _in5);
+	}
+
+    template < typename TValue, typename TSize >
+    struct AbstractSource {};
+
+    template < typename TValue, typename TSize >
+    struct Value< Pipe<void, AbstractSource<TValue, TSize> > > {
+        typedef TValue Type;
+    };
+
+    template < typename TValue, typename TSize >
+    struct Size< Pipe<void, AbstractSource<TValue, TSize> > > {
+        typedef TSize Type;
+    };
+
+
+
+    
+    template < typename TInput, typename TSpec >
+    struct Value< Pipe<TInput, TSpec> > {
+        typedef typename Value<TInput>::Type Type;
+    };
+
+    template < typename TInput, typename TSpec >
+    struct Size< Pipe<TInput, TSpec> > {
+        typedef typename Size<TInput>::Type Type;
+    };
+
+    template < typename TInput1, typename TInput2 >
+    struct Size< Bundle2< TInput1, TInput2 > > {
+        typedef typename Size<TInput1>::Type Type;
+    };
+
+    template < typename TInput1, typename TInput2, typename TInput3 >
+    struct Size< Bundle3< TInput1, TInput2, TInput3 > > {
+        typedef typename Size<TInput1>::Type Type;
+    };
+
+    template < typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5 >
+    struct Size< Bundle5< TIn1, TIn2, TIn3, TIn4, TIn5 > > {
+        typedef typename Size<TIn1>::Type Type;
+    };
+
+    template < typename TInput, typename TSpec >
+    struct Position< Pipe<TInput, TSpec> > {
+        typedef typename Size<Pipe<TInput, TSpec> >::Type Type;
+    };
+
+    template < typename TInput, typename TSpec >
+    struct Difference< Pipe<TInput, TSpec> > {
+		typedef typename MakeSigned_<typename Size<Pipe<TInput, TSpec> >::Type>::Type Type;
+    };
+/*
+    template < typename TInput, typename TSpec >
+	struct Iterator< Pipe<TInput, TSpec> >;
+
+    template < typename TInput, typename TSpec >
+	struct Iterator< Pipe<TInput, TSpec> const >:
+		Iterator< Pipe<TInput, TSpec> > {};
+*/
+
+	template <typename T>
+	struct Source;
+
+	template <typename TInput, typename TSpec>
+	struct Source<Pipe<TInput, TSpec> >
+	{
+		typedef TInput Type;
+	};
+
+	template < typename TInput, typename TSpec >
+    inline TInput const &
+    source(Pipe<TInput, TSpec> const &me) {
+SEQAN_CHECKPOINT
+        return me.in;
+    }
+
+	template < typename TInput, typename TSpec >
+    inline TInput &
+    source(Pipe<TInput, TSpec> &me) {
+SEQAN_CHECKPOINT
+        return me.in;
+    }
+
+
+///.Function.length.param.object.type:Class.Pipe
+
+	template < typename TInput, typename TSpec >
+    inline typename Size< Pipe<TInput, TSpec> >::Type
+    length(Pipe<TInput, TSpec> const &me) {
+SEQAN_CHECKPOINT
+        return length(me.in);
+    }
+
+    template < typename TInput1, typename TInput2 >
+    inline typename Size< Bundle2<TInput1, TInput2> >::Type
+    length(Bundle2<TInput1, TInput2> const &me) {
+SEQAN_CHECKPOINT
+        return length(me.in1);
+    }
+
+    template < typename TInput1, typename TInput2, typename TInput3 >
+    inline typename Size< Bundle3<TInput1, TInput2, TInput3> >::Type
+    length(Bundle3<TInput1, TInput2, TInput3> const &me) {
+SEQAN_CHECKPOINT
+        return length(me.in1);
+    }
+
+    template < typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5 >
+    inline typename Size< Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5> >::Type
+    length(Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5> const &me) {
+SEQAN_CHECKPOINT
+        return length(me.in1);
+    }
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	template < typename TInput, typename TSpec >
+    inline typename Size< Pipe<TInput, TSpec> >::Type
+    countSequences(Pipe<TInput, TSpec> const &me) {
+SEQAN_CHECKPOINT
+        return countSequences(me.in);
+    }
+
+    template < typename TInput1, typename TInput2 >
+    inline typename Size< Bundle2<TInput1, TInput2> >::Type
+    countSequences(Bundle2<TInput1, TInput2> const &me) {
+SEQAN_CHECKPOINT
+        return countSequences(me.in1);
+    }
+
+    template < typename TInput1, typename TInput2, typename TInput3 >
+    inline typename Size< Bundle3<TInput1, TInput2, TInput3> >::Type
+    countSequences(Bundle3<TInput1, TInput2, TInput3> const &me) {
+SEQAN_CHECKPOINT
+        return countSequences(me.in1);
+    }
+
+    template < typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5 >
+    inline typename Size< Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5> >::Type
+    countSequences(Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5> const &me) {
+SEQAN_CHECKPOINT
+        return countSequences(me.in1);
+    }
+/**
+.Function.Pipelining#front:
+..cat:Pipelining
+..summary:Gets the first element of the remaining stream.
+..signature:front(object)
+..param.object:A pop-passive pipeline module.
+...type:Class.Pipe
+..returns:The first element of the remaining input stream.
+Return type is $Value<TObject>::Type$ for $object$ type $TObject$.
+..remarks:@Function.Pipelining#front@ or @Function.pop@ can only be called within a read process surrounded by @Function.beginRead@ and @Function.endRead at .
+..see:Function.pop
+..include:seqan/pipe.h
+*/
+
+    template < typename TInput, typename TSpec, typename TValue >
+    inline Value< Pipe<TInput, TSpec> > const & 
+    front(Pipe<TInput, TSpec> &me) {
+SEQAN_CHECKPOINT
+        return *me;
+    }
+
+/**
+.Function.pop:
+..cat:Pipelining
+..summary:Pops the first element of the remaining stream.
+..signature:pop(object[, ref])
+..param.object:A pop-passive pipeline module.
+...type:Class.Pipe
+..param.ref:Reference to the result. Result type is $Value<TObject>::Type$ for $object$ type $TObject$.
+...remarks:Returns the first element of the remaining input stream.
+..remarks:In contrast to @Function.Pipelining#front@ this function also steps one element further.
+..remarks:@Function.Pipelining#front@ or @Function.pop@ can only be called within a read process surrounded by @Function.beginRead@ and @Function.endRead at .
+..DISABLED.see:Function.top
+..include:seqan/pipe.h
+*/
+
+    template < typename TInput, typename TSpec, typename TValue >
+    inline void pop(Pipe<TInput, TSpec> &me, TValue &Ref_) {
+SEQAN_CHECKPOINT
+        Ref_ = *me;
+        ++me;
+    }
+
+    template < typename TInput, typename TSpec >
+    inline void pop(Pipe<TInput, TSpec> &me) {
+SEQAN_CHECKPOINT
+        ++me;
+    }
+
+///.Function.atEnd.param.iterator.type:Class.Pipe
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // pipe flow control
+
+	struct ControlEof_;			// end of stream
+	struct ControlEos_;			// end of sequence (for multiple sequences)
+	struct ControlClear_;		// clear previous pool
+	struct ControlBeginRead_;	// begin read process
+	struct ControlEndRead_;		// end read process
+
+	typedef Tag<ControlEof_>		ControlEof;
+	typedef Tag<ControlEos_>		ControlEos;
+	typedef Tag<ControlClear_>		ControlClear;
+	typedef Tag<ControlBeginRead_>	ControlBeginRead;
+	typedef Tag<ControlEndRead_>	ControlEndRead;
+
+    template < typename TInput, typename TSpec, typename TCommand >
+	inline bool control(Pipe<TInput, TSpec> &me, TCommand const &command) {
+SEQAN_CHECKPOINT
+        return control(me.in, command);
+    }
+
+    template < typename TInput, typename TSpec >
+	inline bool eof(Pipe<TInput, TSpec> &me) {
+SEQAN_CHECKPOINT
+        return control(me, ControlEof());
+    }
+
+    template < typename TInput, typename TSpec >
+	inline bool eos(Pipe<TInput, TSpec> &me) {
+SEQAN_CHECKPOINT
+        return control(me, ControlEos());
+    }
+
+    template < typename TInput, typename TSpec >
+	inline bool clear(Pipe<TInput, TSpec> &me) {
+SEQAN_CHECKPOINT
+        return control(me, ControlClear());
+    }
+
+/**
+.Function.beginRead:
+..cat:Pipelining
+..summary:Initiates a read process.
+..signature:beginRead(object)
+..param.object:A pop-passive pipeline module.
+...type:Class.Pipe
+...type:Class.Pool
+..returns:A $bool$ which is $true$ on success.
+..remarks:$beginRead$ rewinds the output stream, prepares $object$ for succeeding reads, and typically calls $beginRead$ of the input pipeline modules.
+..remarks:A read process must be terminated with @Function.endRead at . Nested read processes are not allowed.
+..see:Function.endRead
+..include:seqan/pipe.h
+*/
+
+    template < typename TInput, typename TSpec >
+	inline bool beginRead(Pipe<TInput, TSpec> &me) {
+        return control(me, ControlBeginRead());
+    }
+
+/**
+.Function.endRead:
+..cat:Pipelining
+..summary:Terminates a read process.
+..signature:beginRead(object)
+..param.object:A pop-passive pipeline module.
+...type:Class.Pipe
+...type:Class.Pool
+..returns:A $bool$ which is $true$ on success.
+..remarks:$endRead$ closes the output stream, frees resources possibly allocated by @Function.beginRead@, and typically calls $endRead$ of the input pipeline modules.
+..see:Function.beginRead
+..include:seqan/pipe.h
+*/
+
+    template < typename TInput, typename TSpec >
+	inline bool endRead(Pipe<TInput, TSpec> &me) {
+        return control(me, ControlEndRead());
+    }
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // 2->1 pipe flow control
+    template < typename TInput1, typename TInput2, typename TCommand >
+    inline bool control(Bundle2<TInput1, TInput2> &me, TCommand const &command) {
+        return	control(me.in1, command) &&
+				control(me.in2, command);
+    }
+
+    //////////////////////////////////////////////////////////////////////////////
+    // 3->1 pipe flow control
+    template < typename TInput1, typename TInput2, typename TInput3, typename TCommand >
+    inline bool control(Bundle3<TInput1, TInput2, TInput3> &me, TCommand const &command) {
+        return	control(me.in1, command) &&
+				control(me.in2, command) &&
+				control(me.in3, command);
+    }
+
+    //////////////////////////////////////////////////////////////////////////////
+    // 5->1 pipe flow control
+    template < typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5, typename TCommand >
+    inline bool control(Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5 > &me, TCommand const &command) {
+        return	control(me.in1, command) &&
+				control(me.in2, command) &&
+				control(me.in3, command) &&
+				control(me.in4, command) &&
+				control(me.in5, command);
+    }
+
+///.Function.assign.param.source.type:Class.Pipe
+
+	//////////////////////////////////////////////////////////////////////////////
+    // pipe -> string
+    template < typename TValue,
+               typename TStringSpec,
+               typename TInput,
+               typename TSpec >
+    inline bool assign(String<TValue, TStringSpec> &dest, Pipe<TInput, TSpec> &src) {
+        typedef typename Iterator< String<TValue, TStringSpec>, Standard >::Type TIter;
+        typename Size< Pipe<TInput, TSpec> >::Type _size = length(src);
+        resize(dest, _size);
+        if (!beginRead(src)) return false;
+        TIter _cur = begin(dest), _end = end(dest);
+        while (_cur != _end) {
+            *_cur = *src;
+            ++_cur;
+            ++src;
+        }
+        endRead(src);
+        return true;
+    }
+
+    template < typename TValue,
+               typename TStringSpec,
+               typename TInput,
+               typename TSpec >
+    inline bool operator<<(String<TValue, TStringSpec> &dest, Pipe<TInput, TSpec> &src) {
+        return assign(dest, src);
+    }
+
+	//////////////////////////////////////////////////////////////////////////////
+    // pipe -> out_stream
+    template < typename TInput, typename TSpec >
+	std::ostream& operator<<(std::ostream &out, Pipe<TInput, TSpec> &p) {
+        beginRead(p);
+        while (!eof(p)) {
+			out << *p << ::std::endl;
+            ++p;
+        }
+        endRead(p);
+		return out;
+	}
+
+
+    template < typename TObject, typename TSpec >
+    struct BufferHandler;
+
+    template < typename TObject, typename TSpec >
+    struct Handler;
+
+    // buffer-based read/write handler metafunctions
+    template < typename TInput >
+    struct BufReadHandler;
+
+    template < typename TOutput >
+    struct BufWriteHandler;
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic adapter for buffered readers/writers
+	struct AdapterSpec;
+
+	template < typename TBufferHandler >
+    struct Handler< TBufferHandler, AdapterSpec >
+    {
+        typedef typename TBufferHandler::Type	Type;
+        typedef typename TBufferHandler::Buffer	Buffer;
+		typedef typename Iterator<Buffer>::Type	Iterator;
+
+        TBufferHandler  handler;
+        Buffer			buffer;
+        Iterator        cur;
+
+        template < typename TObject >
+        Handler(TObject &_object):
+            handler(_object) {}
+
+        inline bool begin() {
+            buffer = handler.first();
+            cur = buffer.begin;
+            return true;
+        }
+
+        inline Type const & front() const {
+            return *cur;
+        }
+
+        inline void pop() {
+			if (++cur == buffer.end) {
+                buffer = handler.next();
+				cur = buffer.begin;
+			}
+        }
+
+        inline void pop(Type &Ref_) {
+            Ref_ = *cur;
+            pop();
+        }
+
+        inline void push(Type const & Val_) {
+            if (cur == buffer.end) {
+                buffer = handler.next();
+                cur = buffer.begin;
+            }
+            *cur = Val_;
+            ++cur;
+        }
+
+        inline bool eof() const {
+            return size(buffer) == 0;
+        }
+
+        inline void end() {
+            handler.end();
+            resize(buffer, 0);
+        }
+
+        inline void process() {
+            handler.process();
+        }
+    };
+
+
+    // character-based read/write handler metafunctions
+    template < typename TInput >
+    struct ReadHandler
+    {
+        typedef Handler< typename BufReadHandler< TInput > ::Type, AdapterSpec > Type;
+    };
+
+    template < typename TOutput >
+    struct WriteHandler
+    {
+        typedef Handler< typename BufWriteHandler< TOutput > ::Type, AdapterSpec > Type;
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// pair incrementer
+	//
+	// used by pipes processing multiples sequences 
+	// for generating pairs (seqNo, seqOffs)
+
+	template <typename TPair, typename TLimits>
+	struct PairIncrementer_ {
+		typename Iterator<TLimits const, Standard>::Type			it, itEnd;
+		typename RemoveConst_<typename Value<TLimits>::Type>::Type	old;
+		typename Value<TPair, 2>::Type								localEnd;
+
+		TPair pos;
+		inline operator TPair () const {
+			return pos;
+		}
+
+		inline TPair const & operator++ () {
+			typename TPair::T2 i2 = getValueI2(pos) + 1;
+			if (i2 >= localEnd) {
+				i2 = 0;
+				localEnd = 0;
+				while (!localEnd && (it != itEnd))
+				{
+					assignValueI1(pos, getValueI1(pos) + 1);
+					localEnd = (*it - old);
+					old = *it;
+					++it;
+				}
+				if (!localEnd && it == itEnd)
+					assignValueI1(pos, getValueI1(pos) + 1);	// set pos behind the last sequence
+			}
+			assignValueI2(pos, i2);
+			return pos;
+		}
+	};
+
+	template <typename TPair, typename TLimits>
+	void setHost(PairIncrementer_<TPair, TLimits> &me, TLimits const &limits) {
+		me.it = begin(limits);
+		me.itEnd = end(limits);
+		me.old = 0;
+		me.localEnd = 0;
+		assignValueI1(me.pos, 0);
+		assignValueI2(me.pos, 0);
+		if (length(limits) > 1) {
+			++me.it;
+			++me;
+			assignValueI1(me.pos, getValueI1(me.pos) - 1);
+		}
+	}
+//____________________________________________________________________________
+
+	template <typename TPair, typename TLimits>
+	TPair const & value(PairIncrementer_<TPair, TLimits> const &me) {
+		return me.pos;
+	}
+
+	template <typename TPair, typename TLimits>
+	TPair & value(PairIncrementer_<TPair, TLimits> &me) {
+		return me.pos;
+	}
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// pair decrementer
+	//
+	// used by pipes processing multiples sequences 
+	// for generating pairs (seqNo, seqOffs)
+
+	template <typename TPair, typename TLimits, unsigned m = 0>
+	struct PairDecrementer_ {
+		typename Iterator<TLimits const, Standard>::Type			it, itEnd;
+		typename RemoveConst_<typename Value<TLimits>::Type>::Type	old;
+
+		TPair		pos;
+		unsigned	residue;
+
+		PairDecrementer_() {}
+		PairDecrementer_(TLimits const &_limits) { setHost(*this, _limits); }
+
+		inline operator TPair () const {
+			return pos;
+		}
+
+		inline TPair const & operator-- () {
+			typename Value<TPair,2>::Type i2 = getValueI2(pos);
+			if (i2 > 1) {
+				--i2;
+				if (residue == 0) residue = m;
+				--residue;
+			} 
+			else
+			{
+				i2 = 0;
+				while (!i2 && (it != itEnd))
+				{
+					assignValueI1(pos, getValueI1(pos) + 1);
+					i2 = (*it - old);
+					old = *it;
+					++it;
+				} 
+				residue = i2 % m;
+			}
+			assignValueI2(pos, i2);
+			return pos;
+		}
+	};
+
+	template <typename TPair, typename TLimits, unsigned m, typename TLimits2>
+	void setHost(PairDecrementer_<TPair, TLimits, m> &me, TLimits2 const &limits) {
+		me.it = begin(limits);
+		me.itEnd = end(limits);
+		me.old = 0;
+		assignValueI1(me.pos, 0);
+		assignValueI2(me.pos, 0);
+		if (length(limits) > 1) {
+			++me.it;
+			--me;
+			assignValueI1(me.pos, getValueI1(me.pos) - 1);
+		} else
+			me.residue = 0;
+	}
+//____________________________________________________________________________
+
+	template <typename TPair, typename TLimits>
+	struct PairDecrementer_<TPair, TLimits, 0> {
+		typename Iterator<TLimits const, Standard>::Type			it, itEnd;
+		typename RemoveConst_<typename Value<TLimits>::Type>::Type	old;
+
+		TPair		pos;
+
+		PairDecrementer_() {}
+		PairDecrementer_(TLimits const &_limits) { setHost(*this, _limits); }
+
+		inline operator TPair () const {
+			return pos;
+		}
+
+		inline TPair const & operator-- () {
+			typename Value<TPair,2>::Type i2 = getValueI2(pos);
+			if (i2 > 1)
+				--i2;
+			else
+			{
+				i2 = 0;
+				while (!i2 && (it != itEnd))
+				{
+					assignValueI1(pos, getValueI1(pos) + 1);
+					i2 = (*it - old);
+					old = *it;
+					++it;
+				} 
+			}
+			assignValueI2(pos, i2);
+			return pos;
+		}
+	};
+
+	template <typename TPair, typename TLimits, typename TLimits2>
+	void setHost(PairDecrementer_<TPair, TLimits, 0> &me, TLimits2 const &limits) {
+		me.it = begin(limits);
+		me.itEnd = end(limits);
+		me.old = 0;
+		assignValueI1(me.pos, 0);
+		assignValueI2(me.pos, 0);
+		if (length(limits) > 1) {
+			++me.it;
+			--me;
+			assignValueI1(me.pos, getValueI1(me.pos) - 1);
+		}
+	}
+//____________________________________________________________________________
+
+	template <typename TPair, typename TLimits, unsigned m>
+	TPair const & value(PairDecrementer_<TPair, TLimits, m> const &me) {
+		return me.pos;
+	}
+
+	template <typename TPair, typename TLimits, unsigned m>
+	TPair & value(PairDecrementer_<TPair, TLimits, m> &me) {
+		return me.pos;
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_caster.h b/src/SeqAn-1.3/seqan/pipe/pipe_caster.h
new file mode 100644
index 0000000..67e432b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_caster.h
@@ -0,0 +1,110 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_CASTER_H
+#define SEQAN_HEADER_PIPE_CASTER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	struct CasterReinterpret;
+	struct CasterConvert;
+    
+    template < typename TValue, typename TSpec = CasterReinterpret >
+    struct Caster;
+
+	template < typename TInput, typename TValue, typename TSpec >
+    struct Value< Pipe< TInput, Caster<TValue, TSpec> > > {
+		typedef TValue Type;
+	};
+
+
+/**
+.Spec.Caster:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Casts the input type in a specific output type.
+..signature:Pipe<TInput, Caster<TValue[, TSpec]> >
+..param.TInput:The type of the pipeline module this module reads from.
+..param.TValue:The new output type.
+..param.TSpec:$CasterReinterpret$ (default) or $CasterConvert$.
+..remarks: The input stream is casted using $reinterpret_cast<TValue>$.
+..include:seqan/pipe.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // caster pipe
+    template <typename TInput, typename TValue >
+    struct Pipe< TInput, Caster<TValue, CasterReinterpret> >
+    {
+		TInput      ∈
+        
+        Pipe(TInput& _in):
+            in(_in) {}
+        
+        inline TValue const & operator*() const {
+            return reinterpret_cast<TValue const &>(*in);
+        }
+
+        Pipe& operator++() {
+            ++in;
+            return *this;
+        }
+	};
+    
+    template <typename TInput, typename TValue >
+    struct Pipe< TInput, Caster<TValue, CasterConvert> >
+    {
+		TInput      ∈
+        
+        Pipe(TInput& _in):
+            in(_in) {}
+        
+        inline TValue operator*() const {
+            return TValue(*in);
+        }
+
+        Pipe& operator++() {
+            ++in;
+            return *this;
+        }
+	};
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_counter.h b/src/SeqAn-1.3/seqan/pipe/pipe_counter.h
new file mode 100644
index 0000000..e8b4cce
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_counter.h
@@ -0,0 +1,106 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_COUNTER_H
+#define SEQAN_HEADER_PIPE_COUNTER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	struct Counter;
+
+	template < typename TInput >
+    struct Value< Pipe< TInput, Counter > > {
+		typedef Pair<
+			typename Value<TInput>::Type,
+			typename Size<TInput>::Type,
+			Compressed
+		> Type;
+	};
+
+
+/**
+.Spec.Counter:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Extends the input stream by a second field which enumerates the elements.
+..signature:Pipe<TInput, Counter>
+..param.TInput:The type of the pipeline module this module reads from.
+..remarks:The output type is a @Class.Pair@ of input type and size type (i.e. $Pair<Value<TInput>::Type, Size<TInput>::Type>$).
+..remarks:The first output field is the original input stream.
+..remarks:The second output field begins with 0 and increases by 1 per element.
+..include:seqan/pipe.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // counter class
+    template < typename TInput >
+    struct Pipe< TInput, Counter >
+    {
+		TInput                      ∈
+        typename Value<Pipe>::Type	tmp;
+        
+        Pipe(TInput& _in):
+            in(_in) {}
+        
+        inline typename Value<Pipe>::Type const & operator*() {
+            tmp.i1 = *in;
+            return tmp;
+        }
+        
+        inline Pipe& operator++() {
+            ++in;
+            ++tmp.i2;
+            return *this;
+        }
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+    template < typename TInput >
+	inline bool control(Pipe< TInput, Counter > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+        me.tmp.i2 = 0;
+		return true;
+	}
+    
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_echoer.h b/src/SeqAn-1.3/seqan/pipe/pipe_echoer.h
new file mode 100644
index 0000000..6c739e6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_echoer.h
@@ -0,0 +1,154 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_ECHOER_H
+#define SEQAN_HEADER_PIPE_ECHOER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+    //////////////////////////////////////////////////////////////////////////////
+	// some metaprogramming to unrool fixed-size loops
+    struct EchoerFillWorker_ {
+        template <typename Arg>
+        static inline void body(Arg &arg, unsigned I) {
+            arg.tmp.i2[I-1] = *(arg.in); ++(arg.in);
+        }
+    };
+    
+    struct EchoerClearWorker_ {
+        template <typename Arg>
+        static inline void body(Arg &arg, unsigned I) {
+			arg.i2[I] = typename Value< typename Value<Arg, 2>::Type >::Type ();
+        }
+    };
+    
+    struct EchoerShiftWorker_ {
+        template <typename Arg>
+        static inline void body(Arg &arg, unsigned I) {
+            arg.i2[I] = arg.i2[I-1];
+        }
+    };
+
+
+    template < unsigned echoRepeats, bool omitFirst >
+    struct Echoer;
+
+    template < typename TInput, unsigned echoRepeats, bool omitFirst >
+    struct Value< Pipe< TInput, Echoer< echoRepeats, omitFirst > > > {
+        typedef Tuple<typename Value<TInput>::Type, echoRepeats>	EchoType;
+        typedef Pair<typename Size<TInput>::Type, EchoType>			Type;
+    };
+
+
+/**
+.Spec.Echoer:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Outputs tuples of the $echoRepeats$ last elements of the input stream.
+..signature:Pipe<TInput, Echoer<echoRepeats, omitFirst> >
+..param.TInput:The type of the pipeline module this module reads from.
+..param.echoRepeats:The tuple length.
+...remarks:The tuples contain elements $in[i]in[i-1]...in[i-(echoRepeats-1)]$.
+..param.omitFirst:Omit half filled tuples.
+..param.omitFirst:If $true$, the output stream is $echoRepeats-1$ elements shorter than the input stream.
+..param.omitFirst:If $false$, the lengths are identical and the tuple is filled with blanks (default constructed elements) for undefined entries.
+..remarks:The output type is a @Class.Tuple@ of input elements and length $echoRepeats$ (i.e. $Tuple<Value<TInput>::Type, echoRepeats>$).
+..remarks:The tuples are sequences of the form $in[i]in[i-1]in[i-2]..in[i-echoRepeats+1]$. For $omitFirst=false$ $i$ begins with 0 and for $omitFirst=true$ $i$ begins with $echoRepeats-1$.
+..include:seqan/pipe.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // echoer class
+    template < typename TInput, unsigned echoRepeats, bool omitFirst >
+    struct Pipe< TInput, Echoer<echoRepeats, omitFirst> >
+    {
+        typedef typename Value<Pipe>::Type TValue;
+
+        TInput	∈
+        TValue	tmp;
+
+        Pipe(TInput& _in):
+            in(_in),
+            tmp(0, typename Value<TValue, 2>::Type()) {}
+
+        inline typename Value<Pipe>::Type const & operator*() const {
+            return tmp;
+        }
+
+        inline Pipe& operator++() {
+			++in;
+            if (eof(in)) return *this;
+            LoopReverse<EchoerShiftWorker_, echoRepeats - 1>::run(this->tmp);
+			++tmp.i1;
+            tmp.i2[0] = *in;
+            return *this;
+        }
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+    template < typename TInput, unsigned echoRepeats, bool omitFirst >
+	inline bool control(Pipe< TInput, Echoer< echoRepeats, omitFirst > > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+        me.tmp.i1 = 0;
+        Loop<EchoerClearWorker_, echoRepeats - 1>::run(me.tmp);
+        if (!eof(me.in)) me.tmp.i2[0] = *me.in;
+		return true;
+	}
+    
+    template < typename TInput, unsigned echoRepeats >
+    inline bool control(Pipe< TInput, Echoer< echoRepeats, true > > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command) || size(me.in) < echoRepeats - 1) return false;
+        me.tmp.i1 = 0;
+        LoopReverse<EchoerFillWorker_, echoRepeats - 1>::run(me);
+        if (!eof(me.in)) me.tmp.i2[0] = *me.in;
+		return true;
+    }
+
+    template < typename TInput, unsigned echoRepeats >
+    inline Size< Pipe< TInput, Echoer< echoRepeats, true > > >
+    length(Pipe< TInput, Echoer< echoRepeats, true > > const &me) {
+        return length(me.in) - (echoRepeats - 1);
+    }
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_edit_environment.h b/src/SeqAn-1.3/seqan/pipe/pipe_edit_environment.h
new file mode 100644
index 0000000..f8ddb00
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_edit_environment.h
@@ -0,0 +1,348 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_EDIT_ENVIRONMENT_H
+#define SEQAN_HEADER_PIPE_EDIT_ENVIRONMENT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+    template < typename TDistanceSpec, unsigned STEP_SIZE = 1 >
+    struct EditEnvironment;
+
+/**
+.Spec.EditEnvironment:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Outputs tuples of the $tupleLen$ consecutive elements of the input stream.
+..signature:Pipe<TInput, Tupler<tupleLen, omitLast> >
+..param.TInput:The type of the pipeline module this module reads from.
+..param.tupleLen:The tuple length.
+...remarks:The tuples contain elements $in[i]in[i+1]...in[i+(tupleLen-1)]$.
+..param.omitLast:Omit half filled tuples.
+..param.omitLast:If $true$, the output stream is $tupleLen-1$ elements shorter than the input stream.
+..param.omitLast:If $false$, the lengths are identical and the last tuples are filled with blanks (default constructed elements) for undefined entries.
+..remarks:The output type is a @Class.Tuple@ of input elements and length $tupleLen$ (i.e. $Tuple<Value<TInput>::Type, tupleLen>$).
+..remarks:The tuples are sequences of the form $in[i]in[i-1]in[i-2]..in[i-tupleLen+1]$. For $omitLast=false$ $i$ begins with 0 and for $omitLast=true$ $i$ begins with $tupleLen-1$.
+..include:seqan/pipe.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // pipe to enumerate the hamming 1-environment
+    template < typename TInput, unsigned STEP_SIZE >
+    struct Pipe< TInput, EditEnvironment< Tag<HammingDistance_>, STEP_SIZE > >
+    {
+		typedef typename Value< typename Value<TInput>::Type, 2 >::Type	TTuple;
+		typedef typename Value<TTuple>::Type							TValue;
+
+        TInput                      ∈
+        typename Value<Pipe>::Type	tmp, orig;
+		unsigned					errorPos;		// position of substitution
+		unsigned					character;		// replacement character 
+		unsigned					skipChar;		// skip the original character 
+        
+        Pipe(TInput& _in):
+            in(_in) {}
+
+        inline typename Value<Pipe>::Type const & operator*() const {
+            return tmp;
+        }
+
+        inline Pipe& operator++() {
+			do {
+				if (++character < ValueSize<TValue>::VALUE)
+					// next replacement value
+					assignValueAt(tmp.i2, errorPos, (TValue) character);
+				else {
+					// next error position					
+					assignValueAt(tmp.i2, errorPos, orig.i2[errorPos]);
+					character = 0;
+					if (++errorPos < length(tmp.i2)) {
+						skipChar = (unsigned) orig.i2[errorPos];
+						assignValueAt(tmp.i2, errorPos, (TValue) 0);
+					} else {
+						// next tuple
+						errorPos = 0;
+						++in;
+						for(unsigned i = 1; i < STEP_SIZE && !eof(in); ++i)
+							++in;
+						if (!eof(in)) {
+							tmp = orig = *in;
+							assignValueAt(tmp.i2, 0, (TValue) 0);
+						}
+					}
+				}
+			// output the original tuple only once
+			} while ((errorPos > 0) && (character == skipChar)); 
+
+            return *this;
+        }
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // pipe to enumerate the levenshtein 1-environment
+    template < typename TInput, unsigned STEP_SIZE >
+    struct Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > >
+    {
+		typedef typename Value< typename Value<TInput>::Type, 2 >::Type	TTuple;
+		typedef typename Value<TTuple>::Type							TValue;
+
+		enum TState { SUBST_, DELETE_, INSERT_, INSERT_LAST_, Eof_, INSERT_EOS_ };
+
+        TInput                      ∈
+        typename Value<Pipe>::Type	tmp, orig, prev;
+		unsigned					errorPos;		// position of substitution
+		unsigned					character;		// replacement character 
+		unsigned					skipChar;		// skip the original character 
+		TState						state;
+
+        Pipe(TInput& _in):
+            in(_in),
+			state(Eof_) {}
+
+        inline typename Value<Pipe>::Type const & operator*() const {
+            return tmp;
+        }
+
+        inline Pipe& operator++() {
+			switch (state) {
+			case SUBST_:
+				// before SUBST_ (tmp[1..] == orig[1..] and tmp[0] == 0) holds
+				do {
+					if (++character < ValueSize<TValue>::VALUE) {
+						// next replacement value
+						assignValueAt(tmp.i2, errorPos, (TValue) character);
+					} else {
+						// next substitution position
+						assignValueAt(tmp.i2, errorPos, orig.i2[errorPos]);
+						character = 0;
+						if (++errorPos < length(tmp.i2)) {
+							skipChar = (unsigned) orig.i2[errorPos];
+							assignValueAt(tmp.i2, errorPos, (TValue) 0);
+						} else {
+							// NEXT TUPLE
+							// now (tmp == orig) holds
+							++in;
+							for(unsigned i = 1; i < STEP_SIZE && !eof(in); ++i)
+								++in;
+							if (!eos(in)) {
+								prev = orig;
+								orig = *in;
+								tmp.i2 = orig.i2;
+								assignValueAt(tmp.i2, 0, prev.i2[0]);
+								assignValueAt(tmp.i2, 1, prev.i2[1]);
+								if (length(tmp.i2) >= 4) {
+									errorPos = 2;
+									state = DELETE_;
+									//::std::cerr << ::std::endl << "_DELETIONS____" << ::std::endl;
+									return *this;
+								}
+							} else {
+								// LAST TUPLE
+								shiftLeft(orig.i2);
+								assignValueAt(tmp.i2, 0, orig.i2[0]);
+								assignValueAt(tmp.i2, 1, (TValue) 0);
+								character = 0;
+								errorPos = 1;
+								state = INSERT_LAST_;
+								//::std::cerr << ::std::endl << "_INSERTS______" << ::std::endl;
+								return *this;
+							}
+						}
+					}
+				// output the original tuple only once
+				} while ((errorPos > 0) && (character == skipChar));
+				break;
+			case DELETE_:
+				// before DELETE_ (prev=orig, ++in; tmp=orig=*in) holds
+				assignValueAt(tmp.i2, errorPos, prev.i2[errorPos]);
+				if (++errorPos >= length(tmp.i2) - 1) {
+					assignValueAt(tmp.i2, length(tmp.i2)-1, prev.i2[length(tmp.i2)-1]);
+					assignValueAt(tmp.i2, 0, orig.i2[0]);
+					assignValueAt(tmp.i2, 1, (TValue) 0);
+					character = 0;
+					errorPos = 1;
+					state = INSERT_;
+					//::std::cerr << ::std::endl << "_INSERTS______" << ::std::endl;
+				}
+				break;
+
+			case INSERT_EOS_:
+				state = INSERT_;
+			case INSERT_:
+			case INSERT_LAST_:
+				// before INSERT_ (prev=orig, ++in; tmp=prev) holds
+				if (++character < ValueSize<TValue>::VALUE)
+					// next replacement value
+					assignValueAt(tmp.i2, errorPos, (TValue) character);
+				else {
+					// next insert position					
+					assignValueAt(tmp.i2, errorPos, orig.i2[errorPos]);
+					character = 0;
+					if (++errorPos >= length(tmp.i2) - 1 && state == INSERT_) {
+						tmp = orig;
+						state = SUBST_;
+						//::std::cerr << ::std::endl << "_REPLACEMENTS_" << ::std::endl;
+						errorPos = 0;
+						assignValueAt(tmp.i2, 0, (TValue) 0);
+						break;
+					}
+					if (errorPos >= length(tmp.i2)) {
+						if (eof(in))
+							state = Eof_;
+						else {
+							tmp = orig = *in;
+
+							// begin to insert the first char at position 0
+							shiftRight(tmp.i2);
+							assignValueAt(tmp.i2, 1, (TValue) 0);
+							errorPos = 0;
+							state = INSERT_EOS_;
+							//::std::cerr << ::std::endl << "_INSERTS______" << ::std::endl;
+						}
+						break;
+					}
+					assignValueAt(tmp.i2, errorPos, (TValue) 0);
+				}
+			default:;
+			}			
+            return *this;
+		}
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+    template < typename TInput, unsigned STEP_SIZE >
+	inline bool 
+	control(
+		Pipe< TInput, EditEnvironment< Tag<HammingDistance_>, STEP_SIZE > > &me, 
+		ControlBeginRead const &command) 
+	{
+        if (!control(me.in, command)) return false;
+
+		me.tmp = me.orig = *me.in;
+		me.errorPos = 0;
+		me.character = 0;
+
+		return true;
+	}
+    
+    template < typename TInput, unsigned STEP_SIZE >
+	inline bool 
+	control(
+		Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > &me, 
+		ControlBeginRead const &command) 
+	{
+        if (!control(me.in, command)) return false;
+
+		if (eof(me.in)) {
+			me.state = me.Eof_;
+			return true;
+		}
+
+		typedef typename Value< typename Value<TInput>::Type, 2 >::Type TTuple;
+		typedef typename Value<TTuple>::Type							TValue;
+
+		me.tmp = me.orig = *me.in;
+
+		// begin to insert the first char at position 0
+		shiftRight(me.tmp.i2);
+		assignValueAt(me.tmp.i2, 0, (TValue) 0);
+		me.character = 0;
+		me.errorPos = 0;
+		me.state = me.INSERT_;
+		//::std::cerr << ::std::endl << "_INSERTS______" << ::std::endl;
+
+		return true;
+	}
+    
+    template < typename TInput, unsigned STEP_SIZE >
+	inline bool 
+	control(
+		Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > &me, 
+		ControlEof const &) 
+	{
+		return me.state == me.Eof_;
+    }
+
+    template < typename TInput, unsigned STEP_SIZE >
+	inline bool 
+	control(
+		Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > &me, 
+		ControlEos const &) 
+	{
+		return me.state == me.Eof_ || me.state == me.INSERT_EOS;
+    }
+
+    template < typename TInput, unsigned STEP_SIZE >
+    inline typename Size< Pipe< TInput, Pipe< TInput, EditEnvironment< Tag<HammingDistance_>, STEP_SIZE > > > >::Type
+    length(Pipe< TInput, EditEnvironment< Tag<HammingDistance_>, STEP_SIZE > > const &me) {
+		typedef typename Value< typename Value<TInput>::Type, 2 >::Type TTuple;
+		typedef typename Size< Pipe< TInput, Pipe< TInput, EditEnvironment< Tag<HammingDistance_>, STEP_SIZE > > > >::Type TSize;
+
+		unsigned alphabetSize = ValueSize< typename Value<TTuple>::Type >::VALUE;
+		/*unsigned seqs = countSequences(me.in);*/
+		TSize sum = 0;
+/*		for(unsigned i = 0; i < seqs; ++i)
+			sum += (length((*me.in.in.in.in.set)[i]) / STEP_SIZE) * (1 + length(me.tmp.i2) * (alphabetSize - 1));
+*/		return (length(me.in) / STEP_SIZE) * (1 + length(me.tmp.i2) * (alphabetSize - 1));
+		return sum;
+    }
+
+    template < typename TInput, unsigned STEP_SIZE >
+    inline typename Size< Pipe< TInput, Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > > >::Type
+    length(Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > const &me) {
+		typedef typename Value< typename Value<TInput>::Type, 2 >::Type TTuple;
+		unsigned alphabetSize = ValueSize< typename Value<TTuple>::Type >::VALUE;
+		unsigned seqs = countSequences(me.in);
+		// TODO: We run into problems when one sequence contains 1 or less tuples
+		// length should be ommitted in future, but Pools or the skew algorithm needs to know the stream length
+		if (length(me.in) >= seqs)
+			return 
+				  (length(me.in) / STEP_SIZE)     * (1 + length(me.tmp.i2) * (alphabetSize - 1)) +			// substitutions and original
+				 ((length(me.in) / STEP_SIZE) - seqs) * (length(me.tmp.i2) - 3) +							// deletions
+				(((length(me.in) / STEP_SIZE) + seqs) * (length(me.tmp.i2) - 2) + 2 * seqs) * alphabetSize;	// insertions
+		else
+			return 0;
+    }
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_filter.h b/src/SeqAn-1.3/seqan/pipe/pipe_filter.h
new file mode 100644
index 0000000..ce2c1b2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_filter.h
@@ -0,0 +1,121 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_FILTER_H
+#define SEQAN_HEADER_PIPE_FILTER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+    
+    template <typename InType, typename Result = typename InType::T1>
+    struct filterI1 : public ::std::unary_function<InType,Result> {
+        inline Result operator()(const InType& x) const { return x.i1; }
+    };
+
+    template <typename InType, typename Result = typename InType::T2>
+    struct filterI2 : public ::std::unary_function<InType,Result> {
+        inline Result operator()(const InType& x) const { return x.i2; }
+    };
+
+    template <typename InType, typename Result = typename InType::T3>
+    struct filterI3 : public ::std::unary_function<InType,Result> {
+        inline Result operator()(const InType& x) const { return x.i3; }
+    };
+
+
+    template < typename TFunctor >
+    struct Filter;
+
+	template < typename TInput, typename TFunctor >
+    struct Value< Pipe< TInput, Filter<TFunctor> > > {
+		typedef typename TFunctor::result_type Type;
+	};
+
+
+/**
+.Spec.Filter:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Applies a specific function to the input stream.
+..signature:Pipe<TInput, Filter<TFunctor> >
+..param.TInput:The type of the pipeline module this module reads from.
+..param.TFunctor:A unary function (see STL's $unary_function$).
+...remarks:The argument type of $TFunctor$ must be $VALUE<TInput>::Type$.
+..remarks: The output type of this pipe is the result type of $TFunctor$.
+..include:seqan/pipe.h
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+    // filter class
+    template <typename TInput, typename TFunctor >
+    struct Pipe< TInput, Filter<TFunctor> >
+    {
+		TInput      ∈
+        TFunctor    F;
+        
+/**
+.Memfunc.Filter#Pipe:
+..class:Spec.Filter
+..summary:Constructor
+..signature:Pipe<TInput, Filter<TFunctor> > (in)
+..signature:Pipe<TInput, Filter<TFunctor> > (in, func)
+..param.in:Reference to an input pipe.
+..param.func:A TFunctor object (copy constructor).
+*/
+        Pipe(TInput& _in):
+            in(_in) {}
+        
+        Pipe(TInput& _in, const TFunctor& F_) :
+            in(_in),
+            F(F_) {}
+        
+        inline typename Value<Pipe>::Type const operator*() const {
+            return F(*in);
+        }
+
+        Pipe& operator++() {
+            ++in;
+            return *this;
+        }
+                
+    };
+    
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_generated_forwards.h b/src/SeqAn-1.3/seqan/pipe/pipe_generated_forwards.h
new file mode 100644
index 0000000..f63561c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_generated_forwards.h
@@ -0,0 +1,738 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_PIPE_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_PIPE_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AbstractSource
+
+template <typename TValue, typename TSize > struct AbstractSource;       	// "projects/library/seqan/pipe/pipe_base.h"(231)
+
+//____________________________________________________________________________
+// AdapterSpec
+
+struct AdapterSpec;       	// "projects/library/seqan/pipe/pipe_base.h"(594)
+
+//____________________________________________________________________________
+// AdaptorCompare2Less
+
+template <typename TCompare > struct AdaptorCompare2Less;       	// "projects/library/seqan/pipe/pool_sorter.h"(61)
+
+//____________________________________________________________________________
+// BufReadHandler
+
+template <typename TInput > struct BufReadHandler;       	// "projects/library/seqan/pipe/pipe_base.h"(585)
+
+//____________________________________________________________________________
+// BufWriteHandler
+
+template <typename TOutput > struct BufWriteHandler;       	// "projects/library/seqan/pipe/pipe_base.h"(588)
+
+//____________________________________________________________________________
+// BufferHandler
+
+template <typename TObject, typename TSpec > struct BufferHandler;       	// "projects/library/seqan/pipe/pipe_base.h"(578)
+
+//____________________________________________________________________________
+// Bundle2
+
+template <typename TInput1, typename TInput2 > struct Bundle2;       	// "projects/library/seqan/pipe/pipe_base.h"(94)
+
+//____________________________________________________________________________
+// Bundle3
+
+template <typename TInput1, typename TInput2, typename TInput3 > struct Bundle3;       	// "projects/library/seqan/pipe/pipe_base.h"(141)
+
+//____________________________________________________________________________
+// Bundle5
+
+template <typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5 > struct Bundle5;       	// "projects/library/seqan/pipe/pipe_base.h"(199)
+
+//____________________________________________________________________________
+// Caster
+
+template <typename TValue, typename TSpec > struct Caster;       	// "projects/library/seqan/pipe/pipe_caster.h"(48)
+
+//____________________________________________________________________________
+// CasterConvert
+
+struct CasterConvert;       	// "projects/library/seqan/pipe/pipe_caster.h"(45)
+
+//____________________________________________________________________________
+// CasterReinterpret
+
+struct CasterReinterpret;       	// "projects/library/seqan/pipe/pipe_caster.h"(44)
+
+//____________________________________________________________________________
+// ContainerBuffer
+
+template <typename TContainer > struct ContainerBuffer;       	// "projects/library/seqan/pipe/pipe_source.h"(107)
+
+//____________________________________________________________________________
+// ControlBeginRead_
+
+struct ControlBeginRead_;       	// "projects/library/seqan/pipe/pipe_base.h"(431)
+
+//____________________________________________________________________________
+// ControlClear_
+
+struct ControlClear_;       	// "projects/library/seqan/pipe/pipe_base.h"(430)
+
+//____________________________________________________________________________
+// ControlEndRead_
+
+struct ControlEndRead_;       	// "projects/library/seqan/pipe/pipe_base.h"(432)
+
+//____________________________________________________________________________
+// ControlEof_
+
+struct ControlEof_;       	// "projects/library/seqan/pipe/pipe_base.h"(428)
+
+//____________________________________________________________________________
+// ControlEos_
+
+struct ControlEos_;       	// "projects/library/seqan/pipe/pipe_base.h"(429)
+
+//____________________________________________________________________________
+// Counter
+
+struct Counter;       	// "projects/library/seqan/pipe/pipe_counter.h"(44)
+
+//____________________________________________________________________________
+// Echoer
+
+template <unsigned echoRepeats, bool omitFirst > struct Echoer;       	// "projects/library/seqan/pipe/pipe_echoer.h"(69)
+
+//____________________________________________________________________________
+// EchoerClearWorker_
+
+struct EchoerClearWorker_;       	// "projects/library/seqan/pipe/pipe_echoer.h"(53)
+
+//____________________________________________________________________________
+// EchoerFillWorker_
+
+struct EchoerFillWorker_;       	// "projects/library/seqan/pipe/pipe_echoer.h"(46)
+
+//____________________________________________________________________________
+// EchoerShiftWorker_
+
+struct EchoerShiftWorker_;       	// "projects/library/seqan/pipe/pipe_echoer.h"(60)
+
+//____________________________________________________________________________
+// EditEnvironment
+
+template <typename TDistanceSpec, unsigned STEP_SIZE > struct EditEnvironment;       	// "projects/library/seqan/pipe/pipe_edit_environment.h"(45)
+
+//____________________________________________________________________________
+// ExtStringSourceCachingSpec_
+
+struct ExtStringSourceCachingSpec_;       	// "projects/library/seqan/pipe/pipe_source.h"(282)
+
+//____________________________________________________________________________
+// Filter
+
+template <typename TFunctor > struct Filter;       	// "projects/library/seqan/pipe/pipe_filter.h"(61)
+
+//____________________________________________________________________________
+// Handler
+
+template <typename TObject, typename TSpec > struct Handler;       	// "projects/library/seqan/pipe/pipe_base.h"(581)
+
+//____________________________________________________________________________
+// HandlerArgs
+
+template <typename TPool > struct HandlerArgs;       	// "projects/library/seqan/pipe/pool_base.h"(621)
+
+//____________________________________________________________________________
+// IPipeIterator
+
+template <typename TInput> struct IPipeIterator;       	// "projects/library/seqan/pipe/pipe_iterator.h"(50)
+
+//____________________________________________________________________________
+// IteratorBuffer
+
+template <typename TIterator > struct IteratorBuffer;       	// "projects/library/seqan/pipe/pipe_source.h"(147)
+
+//____________________________________________________________________________
+// Joiner
+
+struct Joiner;       	// "projects/library/seqan/pipe/pipe_joiner.h"(44)
+
+//____________________________________________________________________________
+// MapperAsyncWriter
+
+struct MapperAsyncWriter;       	// "projects/library/seqan/pipe/pool_mapper.h"(404)
+
+//____________________________________________________________________________
+// MapperConfig
+
+template <typename TMap, typename TFile > struct MapperConfig;       	// "projects/library/seqan/pipe/pool_mapper.h"(86)
+
+//____________________________________________________________________________
+// MapperConfigSize
+
+template <typename TMap, typename TSize, typename TFile > struct MapperConfigSize;       	// "projects/library/seqan/pipe/pool_mapper.h"(62)
+
+//____________________________________________________________________________
+// MapperMemAdapter
+
+struct MapperMemAdapter;       	// "projects/library/seqan/pipe/pool_mapper.h"(273)
+
+//____________________________________________________________________________
+// MapperSpec
+
+template <typename TConfig > struct MapperSpec;       	// "projects/library/seqan/pipe/pool_mapper.h"(107)
+
+//____________________________________________________________________________
+// MapperSyncWriter
+
+struct MapperSyncWriter;       	// "projects/library/seqan/pipe/pool_mapper.h"(314)
+
+//____________________________________________________________________________
+// MemorySpec_
+
+struct MemorySpec_;       	// "projects/library/seqan/pipe/pool_base.h"(188)
+
+//____________________________________________________________________________
+// MergeStreamComparer
+
+template <typename TValue, typename Compare > struct MergeStreamComparer;       	// "projects/library/seqan/pipe/pool_sorter.h"(45)
+
+//____________________________________________________________________________
+// Multi
+
+template <typename TSpec, typename TPair, typename TLimitsString> struct Multi;       	// "projects/library/seqan/pipe/pipe_base.h"(74)
+
+//____________________________________________________________________________
+// MultiplexSpec_
+
+struct MultiplexSpec_;       	// "projects/library/seqan/pipe/pool_base.h"(461)
+
+//____________________________________________________________________________
+// Namer
+
+template <typename TCompare > struct Namer;       	// "projects/library/seqan/pipe/pipe_namer.h"(45)
+
+//____________________________________________________________________________
+// OPipeIterator
+
+template <typename TOutput> struct OPipeIterator;       	// "projects/library/seqan/pipe/pipe_iterator.h"(136)
+
+//____________________________________________________________________________
+// PairDecrementer_
+
+template <typename TPair, typename TLimits, unsigned m > struct PairDecrementer_;       	// "projects/library/seqan/pipe/pipe_base.h"(742)
+
+//____________________________________________________________________________
+// PairIncrementer_
+
+template <typename TPair, typename TLimits> struct PairIncrementer_;       	// "projects/library/seqan/pipe/pipe_base.h"(678)
+
+//____________________________________________________________________________
+// Pipe
+
+template <typename TInput, typename TSpec > struct Pipe;       	// "projects/library/seqan/pipe/pipe_base.h"(65)
+
+//____________________________________________________________________________
+// Pool
+
+template <typename TValue, typename TSpec > struct Pool;       	// "projects/library/seqan/pipe/pool_base.h"(114)
+template <typename TValue, typename TSpec > struct Pool;       	// "projects/library/seqan/pipe/pool_base.h"(632)
+
+//____________________________________________________________________________
+// PoolConfig
+
+template <typename TFile > struct PoolConfig;       	// "projects/library/seqan/pipe/pool_base.h"(75)
+
+//____________________________________________________________________________
+// PoolConfigSize
+
+template <typename TSize, typename TFile > struct PoolConfigSize;       	// "projects/library/seqan/pipe/pool_base.h"(56)
+
+//____________________________________________________________________________
+// PoolParameters
+
+struct PoolParameters;       	// "projects/library/seqan/pipe/pool_base.h"(118)
+
+//____________________________________________________________________________
+// PoolSpec
+
+template <typename TConfig > struct PoolSpec;       	// "projects/library/seqan/pipe/pool_base.h"(95)
+
+//____________________________________________________________________________
+// ReadFileSpec_
+
+struct ReadFileSpec_;       	// "projects/library/seqan/pipe/pool_base.h"(228)
+
+//____________________________________________________________________________
+// ReadHandler
+
+template <typename TInput > struct ReadHandler;       	// "projects/library/seqan/pipe/pipe_base.h"(660)
+
+//____________________________________________________________________________
+// ReadMapperSpec_
+
+struct ReadMapperSpec_;       	// "projects/library/seqan/pipe/pool_mapper.h"(118)
+
+//____________________________________________________________________________
+// ReadSorterSpec_
+
+struct ReadSorterSpec_;       	// "projects/library/seqan/pipe/pool_sorter.h"(150)
+
+//____________________________________________________________________________
+// Sampler
+
+template <unsigned m, typename TCompression > struct Sampler;       	// "projects/library/seqan/pipe/pipe_sampler.h"(50)
+
+//____________________________________________________________________________
+// ShiftLeftWorker_
+
+struct ShiftLeftWorker_;       	// "projects/library/seqan/pipe/pipe_tupler.h"(84)
+
+//____________________________________________________________________________
+// Shifter
+
+template <int delta, bool omitBlank , bool _echoing > struct Shifter;       	// "projects/library/seqan/pipe/pipe_shifter.h"(47)
+
+//____________________________________________________________________________
+// SkewDC_
+
+template <int I, typename T > struct SkewDC_;       	// "projects/library/seqan/pipe/pipe_sampler.h"(45)
+
+//____________________________________________________________________________
+// SorterConfig
+
+template <typename TCompare, typename TFile > struct SorterConfig;       	// "projects/library/seqan/pipe/pool_sorter.h"(114)
+
+//____________________________________________________________________________
+// SorterConfigSize
+
+template <typename TCompare, typename TSize, typename TFile > struct SorterConfigSize;       	// "projects/library/seqan/pipe/pool_sorter.h"(90)
+
+//____________________________________________________________________________
+// SorterSpec
+
+template <typename TConfig > struct SorterSpec;       	// "projects/library/seqan/pipe/pool_sorter.h"(136)
+
+//____________________________________________________________________________
+// Source
+
+template <typename T> struct Source;       	// "projects/library/seqan/pipe/pipe_base.h"(290)
+
+//____________________________________________________________________________
+// SourceCachingSpec_
+
+struct SourceCachingSpec_;       	// "projects/library/seqan/pipe/pipe_source.h"(223)
+
+//____________________________________________________________________________
+// SourceNonCachingSpec_
+
+struct SourceNonCachingSpec_;       	// "projects/library/seqan/pipe/pipe_source.h"(184)
+
+//____________________________________________________________________________
+// Tupler
+
+template <unsigned tupleLen, bool omitLast , typename TCompression > struct Tupler;       	// "projects/library/seqan/pipe/pipe_tupler.h"(47)
+
+//____________________________________________________________________________
+// TuplerLastTuples_
+
+template <typename TTupler > struct TuplerLastTuples_;       	// "projects/library/seqan/pipe/pipe_tupler.h"(74)
+
+//____________________________________________________________________________
+// WriteFileSpec_
+
+struct WriteFileSpec_;       	// "projects/library/seqan/pipe/pool_base.h"(346)
+
+//____________________________________________________________________________
+// WriteHandler
+
+template <typename TOutput > struct WriteHandler;       	// "projects/library/seqan/pipe/pipe_base.h"(666)
+
+//____________________________________________________________________________
+// filterI1
+
+template <typename InType, typename Result > struct filterI1;       	// "projects/library/seqan/pipe/pipe_filter.h"(45)
+
+//____________________________________________________________________________
+// filterI2
+
+template <typename InType, typename Result > struct filterI2;       	// "projects/library/seqan/pipe/pipe_filter.h"(50)
+
+//____________________________________________________________________________
+// filterI3
+
+template <typename InType, typename Result > struct filterI3;       	// "projects/library/seqan/pipe/pipe_filter.h"(55)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// ControlBeginRead
+
+typedef Tag<ControlBeginRead_> ControlBeginRead;       	// "projects/library/seqan/pipe/pipe_base.h"(437)
+
+//____________________________________________________________________________
+// ControlClear
+
+typedef Tag<ControlClear_> ControlClear;       	// "projects/library/seqan/pipe/pipe_base.h"(436)
+
+//____________________________________________________________________________
+// ControlEndRead
+
+typedef Tag<ControlEndRead_> ControlEndRead;       	// "projects/library/seqan/pipe/pipe_base.h"(438)
+
+//____________________________________________________________________________
+// ControlEof
+
+typedef Tag<ControlEof_> ControlEof;       	// "projects/library/seqan/pipe/pipe_base.h"(434)
+
+//____________________________________________________________________________
+// ControlEos
+
+typedef Tag<ControlEos_> ControlEos;       	// "projects/library/seqan/pipe/pipe_base.h"(435)
+
+//____________________________________________________________________________
+// ExtStringSourceCachingSpec
+
+typedef Tag<ExtStringSourceCachingSpec_> ExtStringSourceCachingSpec;       	// "projects/library/seqan/pipe/pipe_source.h"(283)
+
+//____________________________________________________________________________
+// MemorySpec
+
+typedef Tag<MemorySpec_> MemorySpec;       	// "projects/library/seqan/pipe/pool_base.h"(189)
+
+//____________________________________________________________________________
+// MultiplexSpec
+
+typedef Tag<MultiplexSpec_> MultiplexSpec;       	// "projects/library/seqan/pipe/pool_base.h"(462)
+
+//____________________________________________________________________________
+// ReadFileSpec
+
+typedef Tag<ReadFileSpec_> ReadFileSpec;       	// "projects/library/seqan/pipe/pool_base.h"(229)
+
+//____________________________________________________________________________
+// ReadMapperSpec
+
+typedef Tag<ReadMapperSpec_> ReadMapperSpec;       	// "projects/library/seqan/pipe/pool_mapper.h"(119)
+
+//____________________________________________________________________________
+// ReadSorterSpec
+
+typedef Tag<ReadSorterSpec_> ReadSorterSpec;       	// "projects/library/seqan/pipe/pool_sorter.h"(151)
+
+//____________________________________________________________________________
+// SourceCachingSpec
+
+typedef Tag<SourceCachingSpec_> SourceCachingSpec;       	// "projects/library/seqan/pipe/pipe_source.h"(224)
+
+//____________________________________________________________________________
+// SourceNonCachingSpec
+
+typedef Tag<SourceNonCachingSpec_> SourceNonCachingSpec;       	// "projects/library/seqan/pipe/pipe_source.h"(185)
+
+//____________________________________________________________________________
+// WriteFileSpec
+
+typedef Tag<WriteFileSpec_> WriteFileSpec;       	// "projects/library/seqan/pipe/pool_base.h"(347)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// append
+
+template <typename TValue, typename TSpec, typename TSource > inline bool append(Pool<TValue, TSpec> &dest, TSource &src);       	// "projects/library/seqan/pipe/pool_base.h"(1182)
+template <typename TValue, typename TSpec, typename TStringSpec > inline bool append(Pool<TValue, TSpec> &dest, String<TValue, TStringSpec> &src);       	// "projects/library/seqan/pipe/pool_base.h"(1198)
+
+//____________________________________________________________________________
+// assign
+
+template <typename TValue, typename TStringSpec, typename TInput, typename TSpec > inline bool assign(String<TValue, TStringSpec> &dest, Pipe<TInput, TSpec> &src);       	// "projects/library/seqan/pipe/pipe_base.h"(540)
+template <typename TValue, typename TSpec, typename TSource > inline bool assign(Pool<TValue, TSpec> &dest, TSource &src);       	// "projects/library/seqan/pipe/pool_base.h"(1214)
+template <typename TValue1, typename TStringSpec, typename TValue2, typename TSpec > inline bool assign(String<TValue1, TStringSpec> &dest, Pool<TValue2, TSpec> &src);       	// "projects/library/seqan/pipe/pool_base.h"(1236)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TValue, typename TSpec > OPipeIterator< Pool< TValue, TSpec > > begin(Pool< TValue, TSpec > &pool);       	// "projects/library/seqan/pipe/pool_base.h"(934)
+template <typename TInput, typename TSpec, typename TTag > inline typename Iterator< Pipe< TInput, Source<TSpec> >, Tag<TTag> const >::Type begin(Pipe< TInput, Source<TSpec> > &pipe, Tag<TTag> const);       	// "projects/library/seqan/pipe/pipe_source.h"(91)
+template <typename TInput, typename TSpec > IPipeIterator< Pipe< TInput, TSpec > > begin(Pipe< TInput, TSpec > &pipe);       	// "projects/library/seqan/pipe/pipe_iterator.h"(237)
+
+//____________________________________________________________________________
+// beginRead
+
+template <typename TInput, typename TSpec > inline bool beginRead(Pipe<TInput, TSpec> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(480)
+template <typename TValue, typename TSpec > inline bool beginRead(Pool< TValue, TSpec > &me);       	// "projects/library/seqan/pipe/pool_base.h"(1165)
+
+//____________________________________________________________________________
+// beginWrite
+
+template <typename TValue, typename TSpec > inline bool beginWrite(Pool< TValue, TSpec > &me);       	// "projects/library/seqan/pipe/pool_base.h"(1133)
+
+//____________________________________________________________________________
+// bundle2
+
+template <typename TInput1, typename TInput2 > inline Bundle2< TInput1, TInput2 > bundle2(TInput1 &_in1, TInput2 &_in2);       	// "projects/library/seqan/pipe/pipe_base.h"(115)
+
+//____________________________________________________________________________
+// bundle3
+
+template <typename TInput1, typename TInput2, typename TInput3 > inline Bundle3< TInput1, TInput2, TInput3 > bundle3(TInput1 &_in1, TInput2 &_in2, TInput3 &_in3);       	// "projects/library/seqan/pipe/pipe_base.h"(165)
+
+//____________________________________________________________________________
+// bundle5
+
+template <typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5 > inline Bundle5< TIn1, TIn2, TIn3, TIn4, TIn5 > bundle5(TIn1 &_in1, TIn2 &_in2, TIn3 &_in3, TIn4 &_in4, TIn5 &_in5);       	// "projects/library/seqan/pipe/pipe_base.h"(226)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TInput, typename TSpec > inline bool clear(Pipe<TInput, TSpec> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(459)
+template <typename TValue, typename TSpec > inline void clear(Pool<TValue, TSpec> &me);       	// "projects/library/seqan/pipe/pool_base.h"(999)
+
+//____________________________________________________________________________
+// control
+
+template <typename TInput, unsigned m, typename TCompression > inline bool control(Pipe< TInput, Sampler<m, TCompression> > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_sampler.h"(276)
+template <typename TInput, unsigned m, typename TCompression > inline bool control(Pipe< TInput, Sampler<m, TCompression> > &me, ControlEof const & );       	// "projects/library/seqan/pipe/pipe_sampler.h"(283)
+template <typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString > inline bool control(Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_sampler.h"(492)
+template <typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString > inline bool control(Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > &me, ControlEof const & );       	// "projects/library/seqan/pipe/pipe_sampler.h"(499)
+template <typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString > inline bool control(Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > &me, ControlEos const & );       	// "projects/library/seqan/pipe/pipe_sampler.h"(504)
+template <typename TInput, typename TCompare > inline bool control(Pipe< TInput, Namer<TCompare> > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_namer.h"(124)
+template <typename TInput, typename TSpec, typename TCommand > inline bool control(Pipe<TInput, TSpec> &me, TCommand const &command);       	// "projects/library/seqan/pipe/pipe_base.h"(441)
+template <typename TInput1, typename TInput2, typename TCommand > inline bool control(Bundle2<TInput1, TInput2> &me, TCommand const &command);       	// "projects/library/seqan/pipe/pipe_base.h"(507)
+template <typename TInput1, typename TInput2, typename TInput3, typename TCommand > inline bool control(Bundle3<TInput1, TInput2, TInput3> &me, TCommand const &command);       	// "projects/library/seqan/pipe/pipe_base.h"(515)
+template <typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5, typename TCommand > inline bool control(Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5 > &me, TCommand const &command);       	// "projects/library/seqan/pipe/pipe_base.h"(524)
+template <typename TInput, unsigned echoRepeats, bool omitFirst > inline bool control(Pipe< TInput, Echoer< echoRepeats, omitFirst > > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_echoer.h"(127)
+template <typename TInput, unsigned echoRepeats > inline bool control(Pipe< TInput, Echoer< echoRepeats, true > > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_echoer.h"(136)
+template <typename TInput > inline bool control(Pipe< TInput, Counter > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_counter.h"(96)
+template <typename TInput, unsigned STEP_SIZE > inline bool control( Pipe< TInput, EditEnvironment< Tag<HammingDistance_>, STEP_SIZE > > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_edit_environment.h"(256)
+template <typename TInput, unsigned STEP_SIZE > inline bool control( Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_edit_environment.h"(271)
+template <typename TInput, unsigned STEP_SIZE > inline bool control( Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > &me, ControlEof const &);       	// "projects/library/seqan/pipe/pipe_edit_environment.h"(300)
+template <typename TInput, unsigned STEP_SIZE > inline bool control( Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > &me, ControlEos const &);       	// "projects/library/seqan/pipe/pipe_edit_environment.h"(309)
+template <typename TValue, typename TSpec > inline bool control(Pool< TValue, TSpec > &me, ControlEof const &);       	// "projects/library/seqan/pipe/pool_base.h"(1093)
+template <typename TValue, typename TSpec > inline bool control(Pool< TValue, TSpec > &me, ControlEos const &);       	// "projects/library/seqan/pipe/pool_base.h"(1098)
+template <typename TValue, typename TSpec > inline bool control(Pool< TValue, TSpec > &me, ControlClear const &);       	// "projects/library/seqan/pipe/pool_base.h"(1103)
+template <typename TValue, typename TSpec > inline bool control(Pool< TValue, TSpec > &me, ControlBeginRead const &);       	// "projects/library/seqan/pipe/pool_base.h"(1109)
+template <typename TValue, typename TSpec > inline bool control(Pool< TValue, TSpec > &me, ControlEndRead const &);       	// "projects/library/seqan/pipe/pool_base.h"(1114)
+template <typename TInput, int delta, bool omitBlank > inline bool control(Pipe< TInput, Shifter< delta, omitBlank, false > > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_shifter.h"(127)
+template <typename TInput, int delta, bool omitBlank > inline bool control(Pipe< TInput, Shifter< delta, omitBlank, true > > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_shifter.h"(137)
+template <typename TInput, int delta, bool omitBlank, bool _echoing > inline bool control(Pipe< TInput, Shifter< delta, omitBlank, _echoing > > &me, ControlEof const & );       	// "projects/library/seqan/pipe/pipe_shifter.h"(154)
+template <typename TInput, int delta, bool omitBlank, bool _echoing > inline bool control(Pipe< TInput, Shifter< delta, omitBlank, _echoing > > &me, ControlEos const & );       	// "projects/library/seqan/pipe/pipe_shifter.h"(159)
+template <typename TInput, typename TSpec, typename TCommand > inline bool control(Pipe< TInput, Source<TSpec> > & , TCommand const &);       	// "projects/library/seqan/pipe/pipe_source.h"(374)
+template <typename TInput, typename TSpec > inline bool control(Pipe< TInput, Source<TSpec> > &me, ControlBeginRead const &);       	// "projects/library/seqan/pipe/pipe_source.h"(379)
+template <typename TInput, typename TSpec > inline bool control(Pipe< TInput, Source<TSpec> > &me, ControlEndRead const &);       	// "projects/library/seqan/pipe/pipe_source.h"(385)
+template <typename TInput, typename TSpec > inline bool control(Pipe< TInput, Source<TSpec> > &me, ControlEof const &);       	// "projects/library/seqan/pipe/pipe_source.h"(391)
+template <typename TInput, typename TSpec > inline bool control(Pipe< TInput, Source<TSpec> > &me, ControlEos const &);       	// "projects/library/seqan/pipe/pipe_source.h"(396)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression > inline bool control( Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_tupler.h"(382)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression, typename TPair, typename TLimitsString > inline bool control( Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > &me, ControlBeginRead const &command);       	// "projects/library/seqan/pipe/pipe_tupler.h"(399)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression > inline bool control( Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > &me, ControlEof const &);       	// "projects/library/seqan/pipe/pipe_tupler.h"(412)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression, typename TPair, typename TLimitsString > inline bool control( Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > &me, ControlEof const &);       	// "projects/library/seqan/pipe/pipe_tupler.h"(427)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression > inline bool control( Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > &me, ControlEos const &);       	// "projects/library/seqan/pipe/pipe_tupler.h"(436)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression, typename TPair, typename TLimitsString > inline bool control( Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > &me, ControlEos const &);       	// "projects/library/seqan/pipe/pipe_tupler.h"(451)
+
+//____________________________________________________________________________
+// countSequences
+
+template <typename TInput, typename TSpec > inline typename Size< Pipe<TInput, TSpec> >::Type countSequences(Pipe<TInput, TSpec> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(348)
+template <typename TInput1, typename TInput2 > inline typename Size< Bundle2<TInput1, TInput2> >::Type countSequences(Bundle2<TInput1, TInput2> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(355)
+template <typename TInput1, typename TInput2, typename TInput3 > inline typename Size< Bundle3<TInput1, TInput2, TInput3> >::Type countSequences(Bundle3<TInput1, TInput2, TInput3> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(362)
+template <typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5 > inline typename Size< Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5> >::Type countSequences(Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(369)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression > inline unsigned countSequences(Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > const &);       	// "projects/library/seqan/pipe/pipe_tupler.h"(487)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression, typename TPair, typename TLimitsString > inline unsigned countSequences(Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > const &me);       	// "projects/library/seqan/pipe/pipe_tupler.h"(499)
+
+//____________________________________________________________________________
+// difference
+
+template <typename TInput > inline typename Difference<TInput>::Type difference(IPipeIterator<TInput> first, IPipeIterator<TInput> last);       	// "projects/library/seqan/pipe/pipe_iterator.h"(250)
+template <typename TOutput > inline typename Difference<TOutput>::Type difference(OPipeIterator<TOutput> first, OPipeIterator<TOutput> last);       	// "projects/library/seqan/pipe/pipe_iterator.h"(256)
+
+//____________________________________________________________________________
+// end
+
+template <typename TValue, typename TSpec > OPipeIterator< Pool< TValue, TSpec > > end(Pool< TValue, TSpec > & );       	// "projects/library/seqan/pipe/pool_base.h"(940)
+template <typename TInput, typename TSpec, typename TTag > inline typename Iterator< Pipe< TInput, Source<TSpec> >, Tag<TTag> const >::Type end(Pipe< TInput, Source<TSpec> > &pipe, Tag<TTag> const);       	// "projects/library/seqan/pipe/pipe_source.h"(97)
+template <typename TInput, typename TSpec > IPipeIterator< Pipe< TInput, TSpec > > end(Pipe< TInput, TSpec > & );       	// "projects/library/seqan/pipe/pipe_iterator.h"(243)
+
+//____________________________________________________________________________
+// endRead
+
+template <typename TInput, typename TSpec > inline bool endRead(Pipe<TInput, TSpec> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(499)
+template <typename TValue, typename TSpec > inline bool endRead(Pool< TValue, TSpec > &me);       	// "projects/library/seqan/pipe/pool_base.h"(1171)
+
+//____________________________________________________________________________
+// endWrite
+
+template <typename TValue, typename TSpec > inline bool endWrite(Pool< TValue, TSpec > &me);       	// "projects/library/seqan/pipe/pool_base.h"(1152)
+
+//____________________________________________________________________________
+// eof
+
+template <typename TInput, typename TSpec > inline bool eof(Pipe<TInput, TSpec> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(447)
+template <typename TValue, typename TSpec > inline bool eof(Pool< TValue, TSpec > &me);       	// "projects/library/seqan/pipe/pool_base.h"(1159)
+
+//____________________________________________________________________________
+// eos
+
+template <typename TInput, typename TSpec > inline bool eos(Pipe<TInput, TSpec> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(453)
+
+//____________________________________________________________________________
+// front
+
+template <typename TInput, typename TSpec, typename TValue > inline Value< Pipe<TInput, TSpec> > const & front(Pipe<TInput, TSpec> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(389)
+template <typename TValue, typename TSpec > inline typename Value< Pool<TValue, TSpec> >::Type const & front(Pool<TValue, TSpec> &me);       	// "projects/library/seqan/pipe/pool_base.h"(1032)
+
+//____________________________________________________________________________
+// length
+
+template <typename TInput, unsigned m, typename TCompression > inline typename Size< Pipe< TInput, Sampler<m, TCompression> > >::Type length(Pipe< TInput, Sampler<m, TCompression> > const &me);       	// "projects/library/seqan/pipe/pipe_sampler.h"(289)
+template <typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString > inline typename Size< Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > >::Type length(Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > const &me);       	// "projects/library/seqan/pipe/pipe_sampler.h"(511)
+template <typename TInput, typename TSpec > inline typename Size< Pipe<TInput, TSpec> >::Type length(Pipe<TInput, TSpec> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(317)
+template <typename TInput1, typename TInput2 > inline typename Size< Bundle2<TInput1, TInput2> >::Type length(Bundle2<TInput1, TInput2> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(324)
+template <typename TInput1, typename TInput2, typename TInput3 > inline typename Size< Bundle3<TInput1, TInput2, TInput3> >::Type length(Bundle3<TInput1, TInput2, TInput3> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(331)
+template <typename TIn1, typename TIn2, typename TIn3, typename TIn4, typename TIn5 > inline typename Size< Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5> >::Type length(Bundle5<TIn1, TIn2, TIn3, TIn4, TIn5> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(338)
+template <typename TInput, unsigned echoRepeats > inline Size< Pipe< TInput, Echoer< echoRepeats, true > > > length(Pipe< TInput, Echoer< echoRepeats, true > > const &me);       	// "projects/library/seqan/pipe/pipe_echoer.h"(146)
+template <typename TInput, unsigned STEP_SIZE > inline typename Size< Pipe< TInput, Pipe< TInput, EditEnvironment< Tag<HammingDistance_>, STEP_SIZE > > > >::Type length(Pipe< TInput, EditEnvironment< Tag<HammingDistance_>, STEP_SIZE > > const &me);       	// "projects/library/seqan/pipe/pipe_edit_environment.h"(315)
+template <typename TInput, unsigned STEP_SIZE > inline typename Size< Pipe< TInput, Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > > >::Type length(Pipe< TInput, EditEnvironment< Tag<LevenshteinDistance_>, STEP_SIZE > > const &me);       	// "projects/library/seqan/pipe/pipe_edit_environment.h"(330)
+template <typename TValue, typename TSpec > inline typename Size< Pool<TValue, TSpec> >::Type length(Pool<TValue, TSpec> const &me);       	// "projects/library/seqan/pipe/pool_base.h"(1016)
+template <typename TInput, int delta, bool _echoing > inline Size< Pipe< TInput, Shifter< delta, true, _echoing > > > length(Pipe< TInput, Shifter< delta, true, _echoing > > const &me);       	// "projects/library/seqan/pipe/pipe_shifter.h"(149)
+template <typename TContainer > inline typename Size< ContainerBuffer<TContainer> >::Type length(ContainerBuffer<TContainer> const &me);       	// "projects/library/seqan/pipe/pipe_source.h"(135)
+template <typename TIterator > inline typename Size< IteratorBuffer<TIterator> >::Type length(IteratorBuffer<TIterator> const &me);       	// "projects/library/seqan/pipe/pipe_source.h"(177)
+template <typename TInput, typename TSpec > inline typename Size< Pipe< TInput, Source<TSpec> > >::Type length(Pipe< TInput, Source<TSpec> > const &me);       	// "projects/library/seqan/pipe/pipe_source.h"(402)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression > inline typename Size< Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > >::Type length(Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > const &me);       	// "projects/library/seqan/pipe/pipe_tupler.h"(458)
+template <typename TInput, unsigned tupleLen, bool omitLast, typename TCompression, typename TPair, typename TLimitsString > inline typename Size< Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > >::Type length(Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > const &me);       	// "projects/library/seqan/pipe/pipe_tupler.h"(475)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TInput> bool operator!=(const IPipeIterator<TInput>& _Left, const IPipeIterator<TInput>& Right_);       	// "projects/library/seqan/pipe/pipe_iterator.h"(124)
+template <typename TOutput> bool operator!=(const OPipeIterator<TOutput>& _Left, const OPipeIterator<TOutput>& Right_);       	// "projects/library/seqan/pipe/pipe_iterator.h"(204)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TValue, typename TStringSpec, typename TInput, typename TSpec > inline bool operator<<(String<TValue, TStringSpec> &dest, Pipe<TInput, TSpec> &src);       	// "projects/library/seqan/pipe/pipe_base.h"(559)
+template <typename TInput, typename TSpec > std::ostream& operator<<(std::ostream &out, Pipe<TInput, TSpec> &p);       	// "projects/library/seqan/pipe/pipe_base.h"(566)
+template <typename TValue, typename TSpec > ::std::ostream& operator<<(::std::ostream &out, Pool<TValue, TSpec> &p);       	// "projects/library/seqan/pipe/pool_base.h"(1066)
+template <typename TValue, typename TSpec, typename TSource > inline bool operator<<(Pool<TValue, TSpec> &dest, TSource &src);       	// "projects/library/seqan/pipe/pool_base.h"(1223)
+template <typename TValue1, typename TStringSpec, typename TValue2, typename TSpec > inline bool operator<<(String<TValue1, TStringSpec> &dest, Pool<TValue2, TSpec> &src);       	// "projects/library/seqan/pipe/pool_base.h"(1256)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TInput> bool operator==(const IPipeIterator<TInput>& _Left, const IPipeIterator<TInput>& Right_);       	// "projects/library/seqan/pipe/pipe_iterator.h"(118)
+template <typename TOutput> bool operator==(const OPipeIterator<TOutput>& _Left, const OPipeIterator<TOutput>& Right_);       	// "projects/library/seqan/pipe/pipe_iterator.h"(198)
+
+//____________________________________________________________________________
+// pop
+
+template <typename TInput, typename TSpec, typename TValue > inline void pop(Pipe<TInput, TSpec> &me, TValue &Ref_);       	// "projects/library/seqan/pipe/pipe_base.h"(410)
+template <typename TInput, typename TSpec > inline void pop(Pipe<TInput, TSpec> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(417)
+template <typename TValue, typename TSpec > inline void pop(Pool<TValue, TSpec> &me);       	// "projects/library/seqan/pipe/pool_base.h"(1039)
+template <typename TValue, typename TSpec > inline void pop(Pool<TValue, TSpec> &me, TValue &Ref_);       	// "projects/library/seqan/pipe/pool_base.h"(1044)
+
+//____________________________________________________________________________
+// processBuffer
+
+template <typename TValue, typename TConfig > inline PageFrame< TValue, typename TConfig::File, Dynamic<> > & processBuffer( PageFrame< TValue, typename TConfig::File, Dynamic<> > &buf, BufferHandler< Pool< TValue, SorterSpec<TConfig> >, WriteFileSpec > &me);       	// "projects/library/seqan/pipe/pool_sorter.h"(397)
+template <typename TValue, typename TConfig > inline SimpleBuffer<TValue> & processBuffer( SimpleBuffer< TValue > &buf, BufferHandler< Pool< TValue, SorterSpec<TConfig> >, MemorySpec > &me);       	// "projects/library/seqan/pipe/pool_sorter.h"(410)
+template <typename TValue, typename TConfig > inline SimpleBuffer< TValue > & processBuffer( PageFrame< TValue, typename TConfig::File, Dynamic<> > &buf, BufferHandler< Pool< TValue, MapperSpec<TConfig> >, ReadFileSpec > &me);       	// "projects/library/seqan/pipe/pool_mapper.h"(158)
+template <typename TBuffer, typename THandler > inline TBuffer& processBuffer(TBuffer &h, THandler &);       	// "projects/library/seqan/pipe/pool_base.h"(181)
+
+//____________________________________________________________________________
+// push
+
+template <typename TValue, typename TSpec > inline void push(Pool<TValue, TSpec> &me, TValue const &Val_);       	// "projects/library/seqan/pipe/pool_base.h"(1061)
+
+//____________________________________________________________________________
+// resize
+
+template <typename TValue, typename TSpec, typename TSize > inline TSize resize(Pool<TValue, TSpec> &me, TSize new_length);       	// "projects/library/seqan/pipe/pool_base.h"(1024)
+
+//____________________________________________________________________________
+// setHost
+
+template <typename TPair, typename TLimits> void setHost(PairIncrementer_<TPair, TLimits> &me, TLimits const &limits);       	// "projects/library/seqan/pipe/pipe_base.h"(709)
+template <typename TPair, typename TLimits, unsigned m, typename TLimits2> void setHost(PairDecrementer_<TPair, TLimits, m> &me, TLimits2 const &limits);       	// "projects/library/seqan/pipe/pipe_base.h"(781)
+template <typename TPair, typename TLimits, typename TLimits2> void setHost(PairDecrementer_<TPair, TLimits, 0> &me, TLimits2 const &limits);       	// "projects/library/seqan/pipe/pipe_base.h"(831)
+
+//____________________________________________________________________________
+// size
+
+template <typename TValue, typename TSpec > inline typename Size< Pool<TValue, TSpec> >::Type size(Pool<TValue, TSpec> const &me);       	// "projects/library/seqan/pipe/pool_base.h"(1007)
+
+//____________________________________________________________________________
+// source
+
+template <typename TInput, typename TSpec > inline TInput const & source(Pipe<TInput, TSpec> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(300)
+template <typename TInput, typename TSpec > inline TInput & source(Pipe<TInput, TSpec> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(307)
+
+//____________________________________________________________________________
+// value
+
+template <typename TPair, typename TLimits> TPair const & value(PairIncrementer_<TPair, TLimits> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(725)
+template <typename TPair, typename TLimits> TPair & value(PairIncrementer_<TPair, TLimits> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(730)
+template <typename TPair, typename TLimits, unsigned m> TPair const & value(PairDecrementer_<TPair, TLimits, m> const &me);       	// "projects/library/seqan/pipe/pipe_base.h"(846)
+template <typename TPair, typename TLimits, unsigned m> TPair & value(PairDecrementer_<TPair, TLimits, m> &me);       	// "projects/library/seqan/pipe/pipe_base.h"(851)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_iterator.h b/src/SeqAn-1.3/seqan/pipe/pipe_iterator.h
new file mode 100644
index 0000000..f219278
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_iterator.h
@@ -0,0 +1,264 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_ITERATOR_H
+#define SEQAN_HEADER_PIPE_ITERATOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	//////////////////////////////////////////////////////////////////////////////
+	// input pipe iterator
+	// interface between pipe modules and algorithms working with iterators
+
+    template <typename TInput>
+    struct IPipeIterator
+    {
+		//////////////////////////////////////////////////////////////////////////////
+		// public iterator interface
+
+		typedef IPipeIterator					iterator;
+		typedef ::std::forward_iterator_tag		iterator_category;
+		typedef typename Value<TInput>::Type	value_type;
+		typedef const value_type			    const_value_type;
+		typedef typename Size<TInput>::Type		difference_type;
+		typedef value_type*						pointer;
+		typedef value_type&						reference;
+		typedef const value_type&				const_reference;
+		
+        TInput*			in;
+		difference_type	rest;
+        
+	    IPipeIterator():
+			in(NULL),
+			rest(0) {}
+
+	    IPipeIterator(TInput &_in):
+			in(&_in),
+			rest(length(_in))
+		{
+			beginRead(*in);
+		}
+
+		IPipeIterator(const iterator &I):
+			in(I.in),
+			rest(I.rest) {}
+
+		const_value_type operator* () const {
+			return **in;
+		}
+    
+		//const_reference operator* () const {
+		//	return **in;
+		//}
+    
+		iterator& operator++ () {
+			++(*in); 
+			if (!--rest) endRead(*in);
+			return *this;
+		}
+
+		iterator operator++ (int) {
+			iterator before = *this;
+			++*this;
+			return before;
+		}
+
+		iterator operator+ (difference_type delta) {
+			for(; delta != 0; --delta)
+				++*this;
+			return *this;
+		}
+		
+        difference_type operator- (const iterator &I) const {
+			return I.rest - rest;
+		}
+		
+		bool Equal_(const iterator &I) const {
+			return rest == I.rest;
+		}
+	};
+    
+    template <typename TInput>
+	bool operator==(const IPipeIterator<TInput>& _Left, const IPipeIterator<TInput>& Right_)
+	{
+		return _Left.Equal_(Right_);
+	}
+
+    template <typename TInput>
+	bool operator!=(const IPipeIterator<TInput>& _Left, const IPipeIterator<TInput>& Right_)
+	{
+		return !(_Left == Right_);
+	}
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// output pipe iterator
+	// interface between algorithms working with iterators and pipe modules 
+
+    template <typename TOutput>
+    struct OPipeIterator
+    {        
+		//////////////////////////////////////////////////////////////////////////////
+		// public iterator interface
+
+		typedef OPipeIterator					iterator;
+		typedef ::std::forward_iterator_tag		iterator_category;
+		typedef typename Value<TOutput>::Type	value_type;
+		typedef typename Size<TOutput>::Type	difference_type;
+		typedef iterator*						pointer;
+		typedef iterator&						reference;
+		typedef value_type const &				const_reference;
+		
+        TOutput*		out;
+		difference_type	rest;
+        
+	    OPipeIterator():
+			out(NULL),
+			rest(0) {}
+
+	    OPipeIterator(TOutput &_out):
+			out(&_out),
+			rest(length(_out))
+		{
+			beginWrite(*out);
+		}
+
+		OPipeIterator(const iterator &I):
+			out(I.out),
+			rest(I.rest) {}
+
+		reference operator* () {
+			return *this;
+		}
+
+		iterator operator= (const_reference _v) {
+			out->push(_v);
+			return *this;
+		}
+    
+		iterator& operator++ () {
+			++(*out);
+			if (!--rest) endWrite(*out);
+			return *this;
+		}
+
+		iterator operator++ (int) {
+			iterator before = *this;
+			++*this;
+			return before;
+		}
+
+        difference_type operator- (const iterator &I) const {
+			return I.rest - rest;
+		}
+		
+		bool Equal_(const iterator &I) const {
+			return rest == I.rest;
+		}
+	};
+
+    template <typename TOutput>
+	bool operator==(const OPipeIterator<TOutput>& _Left, const OPipeIterator<TOutput>& Right_)
+	{
+		return _Left.Equal_(Right_);
+	}
+
+    template <typename TOutput>
+	bool operator!=(const OPipeIterator<TOutput>& _Left, const OPipeIterator<TOutput>& Right_)
+	{
+		return !(_Left == Right_);
+	}
+
+
+    template < typename TInput, typename TSpec, typename TIteratorSpec >
+	struct Iterator< Pipe< TInput, TSpec >, TIteratorSpec> {
+		typedef IPipeIterator< Pipe< TInput, TSpec > > Type;
+	};
+
+	template < typename TInput >
+	struct Value< IPipeIterator< TInput > > {
+		typedef typename Value<TInput>::Type Type;
+	};
+
+	template < typename TInput >
+	struct Size< IPipeIterator< TInput > > {
+		typedef typename Size<TInput>::Type Type;
+	};
+
+	template < typename TOutput >
+	struct Value< OPipeIterator< TOutput > > {
+		typedef typename Value<TOutput>::Type Type;
+	};
+
+	template < typename TOutput >
+	struct Size< OPipeIterator< TOutput > > {
+		typedef typename Size<TOutput>::Type Type;
+	};
+
+
+    template < typename TInput, typename TSpec >
+	IPipeIterator< Pipe< TInput, TSpec > >
+	begin(Pipe< TInput, TSpec > &pipe) {
+		return IPipeIterator< Pipe< TInput, TSpec > >(pipe);
+	}
+
+    template < typename TInput, typename TSpec >
+	IPipeIterator< Pipe< TInput, TSpec > >
+	end(Pipe< TInput, TSpec > &/*pipe*/) {
+		return IPipeIterator< Pipe< TInput, TSpec > >();
+	}
+
+
+	template < typename TInput >
+    inline typename Difference<TInput>::Type
+    difference(IPipeIterator<TInput> first, IPipeIterator<TInput> last) {
+        return last - first;
+    }
+
+	template < typename TOutput >
+    inline typename Difference<TOutput>::Type
+    difference(OPipeIterator<TOutput> first, OPipeIterator<TOutput> last) {
+        return last - first;
+    }
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_joiner.h b/src/SeqAn-1.3/seqan/pipe/pipe_joiner.h
new file mode 100644
index 0000000..063eecd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_joiner.h
@@ -0,0 +1,130 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_JOINER_H
+#define SEQAN_HEADER_PIPE_JOINER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	struct Joiner;
+
+	template < typename TInput1, typename TInput2 >
+    struct Value< Pipe< Bundle2< TInput1, TInput2 >, Joiner > > {
+		typedef Pair<
+			typename Value<TInput1>::Type,
+			typename Value<TInput2>::Type
+		> Type;
+	};
+
+	template < typename TInput1, typename TInput2, typename TInput3 >
+    struct Value< Pipe< Bundle3< TInput1, TInput2, TInput3 >, Joiner > > {
+		typedef Triple<
+			typename Value<TInput1>::Type,
+			typename Value<TInput2>::Type,
+			typename Value<TInput3>::Type
+		> Type;
+	};
+
+
+/**
+.Spec.Joiner:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Joins two or three input streams.
+..signature:Pipe<Bundle2<TInput1, TInput2>, Joiner>
+..signature:Pipe<Bundle3<TInput1, TInput2, TInput3>, Joiner>
+..param.TInput1:The type of the first pipeline module this module reads from.
+..param.TInput2:The type of the second pipeline module this module reads from.
+..param.TInput3:The type of the third pipeline module this module reads from.
+..remarks: The output type is a compressed @Class.Pair@ or @Class.Triple@ of the input types $Value<TInputX>::Type$.
+..include:seqan/pipe.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // joiner class
+	template < typename TInput1, typename TInput2 >
+    struct Pipe< Bundle2< TInput1, TInput2 >, Joiner >
+    {
+		Bundle2< TInput1, TInput2 >	in;
+        typename Value<Pipe>::Type	tmp;
+        
+        Pipe(Bundle2< TInput1, TInput2 > _in):
+            in(_in) {}
+        
+        inline typename Value<Pipe>::Type const & operator*() {
+            tmp.i1 = *in.in1;
+            tmp.i2 = *in.in2;
+            return tmp;
+        }
+        
+        inline Pipe& operator++() {
+            ++in.in1;
+            ++in.in2;
+            return *this;
+        }
+    };
+
+	template < typename TInput1, typename TInput2, typename TInput3 >
+    struct Pipe< Bundle3< TInput1, TInput2, TInput3 >, Joiner >
+    {
+		Bundle3< TInput1, TInput2, TInput3 >	in;
+        typename Value<Pipe>::Type				tmp;
+        
+        Pipe(Bundle3< TInput1, TInput2, TInput3 > _in):
+            in(_in) {}
+        
+        inline typename Value<Pipe>::Type const & operator*() {
+            tmp.i1 = *in.in1;
+            tmp.i2 = *in.in2;
+            tmp.i3 = *in.in2;
+            return tmp;
+        }
+        
+        inline Pipe& operator++() {
+            ++in.in1;
+            ++in.in2;
+            ++in.in3;
+            return *this;
+        }
+    };
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_namer.h b/src/SeqAn-1.3/seqan/pipe/pipe_namer.h
new file mode 100644
index 0000000..ff20ef5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_namer.h
@@ -0,0 +1,138 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_NAMER_H
+#define SEQAN_HEADER_PIPE_NAMER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+    template < typename TCompare >
+    struct Namer;
+
+	template < typename TInput, typename TCompare >
+    struct Value< Pipe< TInput, Namer<TCompare> > > {
+        typedef Pair<
+            typename Value<TInput>::Type::T1,
+			typename Size<TInput>::Type,
+			Compressed
+		> Type;
+    };
+
+
+/**
+.Spec.Namer:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Extends the input stream by a second field which names the elements.
+..signature:Pipe<TInput, Namer<TCompare> >
+..param.TInput:The type of the pipeline module this module reads from.
+..param.TCompare:A binary function (see STL's $binary_function$) with result type $int$.
+...remarks:Should return $0$ if and only if two elements are equal.
+..remarks:The output type is a @Class.Pair@ of input type and size type (i.e. $Pair<Value<TInput>::Type, Size<TInput>::Type>$).
+..remarks:The first output field is the original input stream.
+..remarks:The second output field is the name. This field begins with 0 and increases by 1 for every distinct element. Two elements gets the same name, if and only if they are equal.
+..include:seqan/pipe.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // namer class
+    template < typename TInput, typename TCompare >
+    struct Pipe< TInput, Namer<TCompare> >
+    {
+		TInput                          ∈
+        TCompare                        C;
+        typename Value<Pipe>::Type      tmp;
+        typename Value<TInput>::Type    last;
+
+/**
+.Memfunc.Namer#Pipe:
+..class:Spec.Namer
+..summary:Constructor
+..signature:Pipe<TInput, Namer<TCompare> > (in)
+..signature:Pipe<TInput, Namer<TCompare> > (in, comp)
+..param.in:Reference to an input pipe.
+..param.comp:A $TCompare$ object (copy constructor).
+*/
+        Pipe(TInput& _in):
+            in(_in) {}
+        
+        Pipe(TInput& _in, const TCompare& tmpC) :
+            in(_in),
+            C(tmpC) {}
+        
+        inline typename Value<Pipe>::Type const & operator*() {
+            tmp.i1 = getValueI1(*in);
+            return tmp;
+        }
+
+        inline Pipe& operator++() {
+            ++in;
+            if (!eof(in) && C(last, *in) != 0) {
+                #ifdef SEQAN_TEST
+                    SEQAN_ASSERT(C(last, *in) < 0);
+                #endif
+                last = *in;
+                ++tmp.i2;
+            }
+			return *this;
+        }
+
+        bool unique() const {
+            return tmp.i2 == (length(in) - 1);
+        }
+    };
+    
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+    template < typename TInput, typename TCompare >
+	inline bool control(Pipe< TInput, Namer<TCompare> > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+        if (!eof(me.in)) {
+            me.last = *me.in;
+            me.tmp.i1 = me.last.i1;
+        }
+        me.tmp.i2 = 0;
+		return true;
+	}
+    
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_sampler.h b/src/SeqAn-1.3/seqan/pipe/pipe_sampler.h
new file mode 100644
index 0000000..97c62f8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_sampler.h
@@ -0,0 +1,540 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_SAMPLER_H
+#define SEQAN_HEADER_PIPE_SAMPLER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+	template <int I, typename T = void>
+	struct SkewDC_;
+
+//////////////////////////////////////////////////////////////////////////////
+
+	template < unsigned m, typename TCompression = void >
+	struct Sampler;
+
+    template < typename TInput, unsigned m, typename TCompression >
+    struct Value< Pipe< TInput, Sampler<m, TCompression> > > {
+        typedef Tuple<typename Value<TInput>::Type, m, TCompression>	mTuple;
+        typedef Pair<typename Size<TInput>::Type, mTuple, Compressed>	Type;
+    };
+
+//////////////////////////////////////////////////////////////////////////////
+
+    template < typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString >
+    struct Value< Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > > {
+        typedef Tuple<typename Value<TInput>::Type, m, TCompression>	mTuple;
+        typedef Pair<TPair, mTuple, Compressed>							Type;
+    };
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Spec.Sampler:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Outputs m-tuples beginning at a position of difference cover DC.
+..signature:Pipe<TInput, Sampler<m, DC[, TCompression]> >
+..param.TInput:The type of the pipeline module this module reads from.
+..param.m:The tuple size.
+..param.DC:A set of non-negative integers less than $m$.
+..param.DC:$DC[0]$ contains the size of the set and $DC[1..DC[0]]$ contains the distinct and ordered elements.
+..param.TCompression:Enable/Disable compression.
+..param.TCompression:If $void$, no compression is used.
+..param.TCompression:If $Compressed$, bit-compressed @Class.Tuple at s are used.
+...default:void.
+..example:The set ${1,2,4}$ is represented by $int DC[] = { 3, 1, 2, 4 }$.
+..remarks:The output type is a @Class.Pair@ of size type and @Class.Tuple@ of input elements and length m (i.e. $Pair<Size<TInput>::Type, Tuple<Value<TInput>::Type, m, TCompression> >$).
+..remarks:The first output field contains the number of remaining pipe elements. The m-tuple in the second field contains the first m elements of them.
+The m-tuples are substrings of the input stream beginning at positions $i$, with $(n-i) mod m$ is element of the set DC (n is the input stream length).
+..include:seqan/pipe.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // sampler class
+    template < typename TInput, unsigned m, typename TCompression >
+    struct Pipe< TInput, Sampler<m, TCompression> >
+    {
+        typedef typename Value<Pipe>::Type  OutType;
+        typedef typename Size<Pipe>::Type   SizeType;
+
+		TInput		∈
+        bool        filter[m];
+        SizeType    idx, _size, _rest;
+        unsigned    idxMod;
+        OutType     tmp1, tmp2;
+        OutType     *outRef, *tmpRef;
+        bool        last;
+        
+        Pipe(TInput& _in):
+            in(_in),
+            outRef(&tmp1),
+            tmpRef(&tmp2) {}
+        
+        inline void prepare() {
+            memset<sizeof(filter), 0>(filter);
+			for(unsigned i = 1; i <= SkewDC_<m>::VALUE[0]; i++)
+                filter[SkewDC_<m>::VALUE[i]] = true;
+
+            idx = length(in);
+            idxMod = idx % m;
+
+            while (!filter[idxMod] && !eof(in)) {
+                ++in;
+                if (idxMod == 0) idxMod = m;
+                --idxMod; --idx;
+            }
+            _rest = length(*this);
+            fill();
+            swap();
+        }
+        
+        inline void fill() {
+            unsigned i;
+            for(i = 0; i < m && !eof(in); ++i, ++in)
+                tmpRef->i2.i[i] = *in;
+            last = eof(in);
+            for(; i < m; ++i)
+                tmpRef->i2.i[i] = 0;
+            tmpRef->i1 = idx;
+        }
+        
+        inline void rotate(unsigned r) {
+            for(unsigned i = 0; i < m; ++i, ++r) {
+                if (r == m) r = 0;
+                tmpRef->i2.i[i] = outRef->i2.i[r];
+            }
+        }
+        
+        inline void swap() {
+            OutType *newOutRef = tmpRef;
+            tmpRef = outRef;
+            outRef = newOutRef;
+        }
+        
+        inline OutType const& operator*() {
+            return *outRef;
+        }
+        
+        Pipe& operator++() {
+            unsigned skipped = 0;
+			if (--_rest) {
+				if (!last)
+					do {
+						outRef->i2.i[skipped++] = *in;
+						++in;
+						if (idxMod == 0) idxMod = m;
+						--idxMod; --idx;
+						if (eof(in)) {
+							last = true;
+							while (!filter[idxMod]) {
+								outRef->i2.i[skipped++] = 0;
+								if (idxMod == 0) idxMod = m;
+								--idxMod; --idx;
+							};
+							break;
+						}
+					} while (!filter[idxMod]);
+				else
+					do {
+						outRef->i2.i[skipped++] = 0;
+						if (idxMod == 0) idxMod = m;
+						--idxMod; --idx;
+					} while (!filter[idxMod]);
+			}
+            rotate(skipped);
+            tmpRef->i1 = idx;
+            swap();
+            return *this;
+        }        
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // sampler class (uses bit compression)
+    template < typename TInput, unsigned m >
+    struct Pipe< TInput, Sampler<m, Compressed> >
+    {
+        typedef typename Value<Pipe>::Type  OutType;
+        typedef typename Size<Pipe>::Type   SizeType;
+        typedef typename OutType::T2        TTuple;
+
+		TInput		∈
+        bool        filter[m];
+        SizeType    _size, _rest;
+        unsigned    idxMod;
+        OutType     tmp;
+        bool        last;
+        
+        Pipe(TInput& _in):
+            in(_in) {}
+        
+        inline void prepare() {
+            memset<sizeof(filter), 0>(filter);
+            for(unsigned i = 1; i <= SkewDC_<m>::VALUE[0]; i++)
+                filter[SkewDC_<m>::VALUE[i]] = true;
+
+            tmp.i1 = length(in);
+            idxMod = tmp.i1 % m;
+
+            while (!filter[idxMod] && !eof(in)) {
+                ++in;
+                if (idxMod == 0) idxMod = m;
+                --idxMod; --tmp.i1;
+            }
+            _rest = length(*this);
+            fill();
+        }
+        
+        inline void fill() {
+            unsigned i;
+            clear(tmp.i2);
+            for(i = 0; i < m && !eof(in); ++i, ++in) {
+                tmp.i2 <<= 1;
+                tmp.i2 |= *in;
+            }
+            last = eof(in);
+            tmp.i2 <<= (m - i);
+        }
+        
+        inline OutType const& operator*() {
+            return tmp;
+        }
+        
+        Pipe& operator++() {
+			if (--_rest) {
+				if (!last)
+					do {
+						tmp.i2 <<= 1;
+						tmp.i2 |= *in;
+						++in;
+						if (idxMod == 0) idxMod = m;
+						--idxMod; --tmp.i1;
+						if (eof(in)) {
+							last = true;
+							while (!filter[idxMod]) {
+								tmp.i2 <<= 1;
+								if (idxMod == 0) idxMod = m;
+								--idxMod; --tmp.i1;
+							};
+							break;
+						}
+					} while (!filter[idxMod]);
+				else
+					do {
+						tmp.i2 <<= 1;
+						if (idxMod == 0) idxMod = m;
+						--idxMod; --tmp.i1;
+					} while (!filter[idxMod]);
+			}
+            return *this;
+        }        
+    };
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+    template < typename TInput, unsigned m, typename TCompression >
+	inline bool control(Pipe< TInput, Sampler<m, TCompression> > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+        me.prepare();
+		return true;
+    }
+
+    template < typename TInput, unsigned m, typename TCompression >
+	inline bool control(Pipe< TInput, Sampler<m, TCompression> > &me, ControlEof const &/*command*/) {
+		return me._rest == 0;
+    }
+
+    template < typename TInput, unsigned m, typename TCompression >
+    inline typename Size< Pipe< TInput, Sampler<m, TCompression> > >::Type
+	length(Pipe< TInput, Sampler<m, TCompression> > const &me) {
+        typename Size< Pipe< TInput, Sampler<m> > >::Type _size = 0, n = length(me.in);
+        for(unsigned i = 1; i <= SkewDC_<m>::VALUE[0]; i++)
+            if (SkewDC_<m>::VALUE[i])
+                _size += (n + m - SkewDC_<m>::VALUE[i]) / m;
+            else
+                _size += n / m;
+        return _size;
+    }
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // sampler class
+    template < typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString >
+    struct Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> >
+    {
+        typedef typename Value<Pipe>::Type  OutType;
+        typedef typename Size<Pipe>::Type   SizeType;
+
+		typedef PairDecrementer_<TPair, TLimitsString, m>	Decrementer;
+
+		TInput		∈
+        bool		filter[m];
+        Decrementer	localPos;
+		SizeType	_size, _rest;
+        OutType		tmp1, tmp2;
+        OutType		*outRef, *tmpRef;
+        bool		last;
+
+		TLimitsString const &limits;
+        
+        Pipe(TInput& _in, TLimitsString const &_limits):
+            in(_in),
+            outRef(&tmp1),
+            tmpRef(&tmp2),
+			limits(_limits) {}
+       
+        inline void prepare() {
+            memset<sizeof(filter), 0>(filter);
+			for(unsigned i = 1; i <= SkewDC_<m>::VALUE[0]; i++)
+                filter[SkewDC_<m>::VALUE[i]] = true;
+
+			setHost(localPos, limits);
+
+			while (!filter[localPos.residue] && !eof(in)) {
+                ++in;
+				--localPos;
+            }
+            _rest = length(*this);
+            fill();
+            swap();
+        }
+        
+        inline void fill() {
+            unsigned i;
+            for(i = 0; i < m && !eof(in); ++i, ++in)
+                tmpRef->i2.i[i] = *in;
+            last = eof(in);
+            for(; i < m; ++i)
+                tmpRef->i2.i[i] = 0;
+            tmpRef->i1 = localPos;
+        }
+        
+        inline void rotate(unsigned r) {
+            for(unsigned i = 0; i < m; ++i, ++r) {
+                if (r == m) r = 0;
+                tmpRef->i2.i[i] = outRef->i2.i[r];
+            }
+        }
+        
+        inline void swap() {
+            OutType *newOutRef = tmpRef;
+            tmpRef = outRef;
+            outRef = newOutRef;
+        }
+        
+        inline OutType const& operator*() {
+            return *outRef;
+        }
+        
+        Pipe& operator++() {
+            unsigned skipped = 0;
+			if (--_rest) {
+				if (!last)
+					do {
+						outRef->i2.i[skipped++] = *in;
+						++in;
+						--localPos;
+						if (eof(in)) {
+							last = true;
+							while (!filter[localPos.residue]) {
+								outRef->i2.i[skipped++] = 0;
+								--localPos;
+							};
+							break;
+						}
+					} while (!filter[localPos.residue]);
+				else
+					do {
+						outRef->i2.i[skipped++] = 0;
+						--localPos;
+					} while (!filter[localPos.residue]);
+				rotate(skipped);
+				tmpRef->i1 = localPos;
+				swap();
+			}
+            return *this;
+        }        
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // sampler class (uses bit compression)
+	template < typename TInput, unsigned m, typename TPair, typename TLimitsString >
+    struct Pipe< TInput, Multi<Sampler<m, Compressed>, TPair, TLimitsString> >
+    {
+        typedef typename Value<Pipe>::Type  OutType;
+        typedef typename Size<Pipe>::Type   SizeType;
+        typedef typename OutType::T2        TTuple;
+
+		typedef PairDecrementer_<TPair, TLimitsString, m>	Decrementer;
+
+		TInput		∈
+        bool		filter[m];
+        SizeType	_size, _rest;
+        Decrementer	localPos;
+        OutType		tmp;
+        bool		last;
+
+		TLimitsString const &limits;
+        
+        Pipe(TInput& _in, TLimitsString const &_limits):
+            in(_in),
+			limits(_limits) {}
+        
+        inline void prepare() {
+            memset<sizeof(filter), 0>(filter);
+            for(unsigned i = 1; i <= SkewDC_<m>::VALUE[0]; i++)
+                filter[SkewDC_<m>::VALUE[i]] = true;
+
+			setHost(localPos, limits);
+
+			while (!filter[localPos.residue] && !eof(in)) {
+                ++in;
+				--localPos;
+            }
+            _rest = length(*this);
+            fill();
+        }
+        
+        inline void fill() {
+            unsigned i;
+            clear(tmp.i2);
+            for(i = 0; i < m && !eof(in); ++i, ++in) {
+                tmp.i2 <<= 1;
+                tmp.i2 |= *in;
+            }
+            last = eof(in);
+            tmp.i2 <<= (m - i);
+			tmp.i1 = localPos;
+        }
+        
+        inline OutType const& operator*() {
+            return tmp;
+        }
+        
+        Pipe& operator++() {
+			if (--_rest) {
+				if (!last)
+					do {
+						tmp.i2 <<= 1;
+						tmp.i2 |= *in;
+						++in;
+						--localPos;
+						if (eof(in)) {
+							last = true;
+							while (!filter[localPos.residue]) {
+								tmp.i2 <<= 1;
+								--localPos;
+							};
+							break;
+						}
+					} while (!filter[localPos.residue]);
+				else
+					do {
+						tmp.i2 <<= 1;
+						--localPos;
+					} while (!filter[localPos.residue]);
+			}
+            tmp.i1 = localPos;
+            return *this;
+        }        
+    };
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+	template < typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString >
+	inline bool control(Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+        me.prepare();
+		return true;
+    }
+
+	template < typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString >
+	inline bool control(Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > &me, ControlEof const &/*command*/) {
+		return me._rest == 0;
+    }
+
+	template < typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString >
+	inline bool control(Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > &me, ControlEos const &/*command*/) {
+		return control(me, ControlEof());
+    }
+
+	template < typename TInput, unsigned m, typename TCompression, typename TPair, typename TLimitsString >
+    inline typename Size< Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > >::Type
+	length(Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > const &me)
+	{
+		typedef typename Size< Pipe< TInput, Multi<Sampler<m, TCompression>, TPair, TLimitsString> > >::Type TSize;
+		typename Iterator<TLimitsString const, Standard>::Type it = begin(me.limits), itEnd = end(me.limits);
+		
+		if (it == itEnd) return 0;
+
+		TSize sum = 0;
+		TSize size;
+		TSize old = *it; ++it;
+
+		while (it != itEnd) {
+			size = *it - old;
+			old = *it;
+			
+			for(unsigned i = 1; i <= SkewDC_<m>::VALUE[0]; i++)
+				if (SkewDC_<m>::VALUE[i])
+					sum += (size + m - SkewDC_<m>::VALUE[i]) / m;
+				else
+					sum += size / m;
+
+			++it;
+		}
+
+        return sum;
+    }
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_shifter.h b/src/SeqAn-1.3/seqan/pipe/pipe_shifter.h
new file mode 100644
index 0000000..32c10f4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_shifter.h
@@ -0,0 +1,167 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_SHIFTER_H
+#define SEQAN_HEADER_PIPE_SHIFTER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+//    template < int delta, bool omitBlank = false, bool _echoing = (delta < 0) >
+//    struct Shifter;
+    template < int delta, bool omitBlank = false, bool _echoing = true >
+    struct Shifter;
+
+
+/**
+.Spec.Shifter:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Shifts the input stream by $delta$ elements.
+..signature:Pipe<TInput, Shifter<delta, omitBlank> >
+..param.TInput:The type of the pipeline module this module reads from.
+..param.delta:The shift size. For the output stream holds $out[i]=in[i+delta]$.
+...remarks:For $delta>0$ the input stream is cut of at the beginning and for $delta<0$ at the end.
+..param.omitBlank:Omit undefined entries.
+..param.omitBlank:If $true$, the output stream is $|delta|$ elements shorter than the input stream.
+..param.omitBlank:If $false$, the lengths are equal and blanks (default constructed elements) are inserted on the cut-off-opposite side.
+...default:$false$
+..remarks:The output type equals the input type.
+..include:seqan/pipe.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // echoer class
+    template < typename TInput, int delta, bool omitBlank >
+    struct Pipe< TInput, Shifter<delta, omitBlank, true> >
+    {
+        TInput                      ∈
+        typename Size<Pipe>::Type	blankCounter, charCounter;
+		typename Value<Pipe>::Type	blank;
+        
+        Pipe(TInput& _in):
+            in(_in),
+			blank()	{}
+
+        inline typename Value<Pipe>::Type const & operator*() {
+			if (blankCounter)	return blank;
+			else				return *in;
+        }
+
+        inline Pipe& operator++() {
+			if (blankCounter)
+				--blankCounter;
+			else {
+				++in;
+				--charCounter;
+			}
+            return *this;
+        }
+    };
+
+
+	template < typename TInput, int delta, bool omitBlank >
+    struct Pipe< TInput, Shifter<delta, omitBlank, false> >
+    {
+        TInput                      ∈
+        typename Size<Pipe>::Type	blankCounter, charCounter;
+		typename Value<Pipe>::Type	blank;
+        
+        Pipe(TInput& _in):
+            in(_in),
+			blank()	{}
+
+        inline typename Value<Pipe>::Type const & operator*() {
+			if (charCounter)	return *in;
+			else				return blank;
+        }
+
+        inline Pipe& operator++() {
+			if (charCounter) {
+				++in;
+				--charCounter;
+			} else
+				--blankCounter;
+            return *this;
+        }
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+    template < typename TInput, int delta, bool omitBlank >
+	inline bool control(Pipe< TInput, Shifter< delta, omitBlank, false > > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+		for(typename Size<TInput>::Type i = 0; i < delta && !eof(me.in); ++i)
+			++me.in;
+		me.blankCounter = (omitBlank)? 0: delta;
+		me.charCounter = length(me.in) - delta;
+		return !eof(me.in);
+	}
+
+    template < typename TInput, int delta, bool omitBlank >
+	inline bool control(Pipe< TInput, Shifter< delta, omitBlank, true > > &me, ControlBeginRead const &command) {
+        if (!control(me.in, command)) return false;
+		me.blankCounter = (omitBlank)? 0: -delta;
+		me.charCounter = length(me.in) + delta;
+		return true;
+	}
+
+
+
+
+    template < typename TInput, int delta, bool _echoing >
+    inline Size< Pipe< TInput, Shifter< delta, true, _echoing > > >
+    length(Pipe< TInput, Shifter< delta, true, _echoing > > const &me) {
+        return length(me.in) - abs(delta);
+    }
+
+    template < typename TInput, int delta, bool omitBlank, bool _echoing >
+	inline bool control(Pipe< TInput, Shifter< delta, omitBlank, _echoing > > &me, ControlEof const &/*command*/) {
+		return me.charCounter == 0 && me.blankCounter == 0;
+    }
+
+    template < typename TInput, int delta, bool omitBlank, bool _echoing >
+	inline bool control(Pipe< TInput, Shifter< delta, omitBlank, _echoing > > &me, ControlEos const &/*command*/) {
+		return control(me, ControlEof());
+    }
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_source.h b/src/SeqAn-1.3/seqan/pipe/pipe_source.h
new file mode 100644
index 0000000..64dfb95
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_source.h
@@ -0,0 +1,408 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_SOURCE_H
+#define SEQAN_HEADER_PIPE_SOURCE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/*
+	template < typename TValue >
+    struct Size< Pipe< TValue*, Source<> > > {
+		typedef ptrdiff_t Type;
+	};
+*/
+
+/**
+.Spec.Source:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Pipelining adaptor for arbitrary containers or iterators.
+..signature:Pipe<TInput, Source<> >
+..param.TInput:The type of container or iterator this module reads from.
+..include:seqan/pipe.h
+*/
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// source class
+	template < typename TInput, typename TSpec >
+	struct Pipe< TInput, Source<TSpec> >
+    {
+		TInput const ∈
+		typename Iterator<TInput const, Rooted>::Type cur;
+		typename Value<TInput>::Type val;
+
+		Pipe(typename RemoveConst_<TInput>::Type &_cont):
+			in(_cont) {}
+
+		Pipe(TInput const &_cont):
+			in(_cont) {}
+
+        inline typename Value<TInput>::Type const & operator*() {
+            return val = getValue(cur);
+        }
+    
+        inline Pipe& operator++() {
+            ++cur;
+            return *this;
+        }
+    };
+
+    template < typename TInput, typename TSpec, typename TIteratorSpec >
+	struct Iterator< Pipe< TInput, Source<TSpec> >, TIteratorSpec> {
+		typedef typename Iterator<TInput const, TIteratorSpec>::Type Type;
+	};
+
+    template < typename TInput, typename TSpec, typename TTag >
+	inline typename Iterator< Pipe< TInput, Source<TSpec> >, Tag<TTag> const >::Type
+	begin(Pipe< TInput, Source<TSpec> > &pipe, Tag<TTag> const) {
+		return begin(pipe.in);
+	}
+
+    template < typename TInput, typename TSpec, typename TTag >
+	inline typename Iterator< Pipe< TInput, Source<TSpec> >, Tag<TTag> const >::Type
+	end(Pipe< TInput, Source<TSpec> > &pipe, Tag<TTag> const) {
+		return end(pipe.in);
+	}
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// simple buffer adaption for fast random accessable containers
+    template < typename TContainer >
+	struct ContainerBuffer 
+	{
+		TContainer *cont;
+
+        ContainerBuffer(): cont(NULL) {}
+		ContainerBuffer(TContainer &_cont): cont(&_cont) {}
+
+		template <typename TSize>
+		inline typename Reference<TContainer>::Type 
+		operator[] (TSize i) {
+			return (*cont)[i];
+		}
+    };
+
+    template < typename TContainer, typename TIteratorSpec >
+	struct Iterator< ContainerBuffer<TContainer>, TIteratorSpec>:
+		Iterator<TContainer, TIteratorSpec> {};
+
+    template < typename TContainer  >
+	struct Value< ContainerBuffer<TContainer> >:
+		Value<TContainer> {};
+
+    template < typename TContainer >
+	struct Size< ContainerBuffer<TContainer> >:
+		Size<TContainer> {};
+
+
+	template < typename TContainer >
+    inline typename Size< ContainerBuffer<TContainer> >::Type
+    length(ContainerBuffer<TContainer> const &me) {
+		if (me.cont)
+			return length(*me.cont);
+		else
+			return 0;
+    }
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// simple buffer adaption for fast random accessable iterators
+    template < typename TIterator >
+	struct IteratorBuffer 
+	{
+		TIterator						begin;
+		typename Size<TIterator>::Type	size;
+
+        IteratorBuffer(): begin(NULL), size(0) {}
+		template <typename TSize>
+		IteratorBuffer(TIterator &_begin, TSize _size): begin(&_begin), size(_size) {}
+
+		template <typename TSize>
+		inline typename Reference<TIterator>::Type 
+		operator[] (TSize i) {
+			return *(begin + i);
+		}
+    };
+
+    template < typename TIterator, typename TIteratorSpec >
+	struct Iterator< IteratorBuffer<TIterator>, TIteratorSpec >:
+		Iterator<TIterator, TIteratorSpec> {};
+
+    template < typename TIterator  >
+	struct Value< IteratorBuffer<TIterator> >:
+		Value<TIterator> {};
+
+    template < typename TIterator >
+	struct Size< IteratorBuffer<TIterator> >:
+		Size<TIterator> {};
+
+
+	template < typename TIterator >
+    inline typename Size< IteratorBuffer<TIterator> >::Type
+    length(IteratorBuffer<TIterator> const &me) {
+		return me.size;
+    }
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// handler that emulates a buffer by using a container buffer
+    struct SourceNonCachingSpec_;
+	typedef Tag<SourceNonCachingSpec_> SourceNonCachingSpec;
+
+	template < typename TPipe >
+	struct BufferHandler< TPipe, SourceNonCachingSpec >
+    {
+        typedef typename Source<TPipe>::Type	TSource;
+        typedef ContainerBuffer<TSource const>	TBuffer;
+
+		TPipe	&pipe;
+
+		BufferHandler(TPipe &_pipe):
+			pipe(_pipe) {}
+
+		template <typename TSize>
+		BufferHandler(TPipe &_pipe, TSize):
+			pipe(_pipe) {}
+
+        inline TBuffer first() {
+            return TBuffer(pipe.in);
+        }
+
+        inline TBuffer next() {
+            return TBuffer();
+        }
+
+        inline void process() {}
+        inline void end() {}
+        inline void cancel() {}
+    };
+
+	template < typename TPipe >
+    struct Value< BufferHandler< TPipe, SourceNonCachingSpec > > {
+        typedef ContainerBuffer< typename Source<TPipe>::Type const > Type;
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// caching buffer handler
+    struct SourceCachingSpec_;
+	typedef Tag<SourceCachingSpec_> SourceCachingSpec;
+
+	template < typename TPipe >
+	struct BufferHandler< TPipe, SourceCachingSpec >
+    {
+        typedef typename Value<TPipe>::Type			TValue;
+        typedef typename Size<TPipe>::Type			TSize;
+
+        typedef SimpleBuffer<TValue>						TBuffer;
+		typedef IPipeIterator<TPipe>						ISource;
+		typedef typename Iterator<TBuffer, Standard>::Type	ITarget;
+
+		TPipe		&pipe;
+		size_t		bufferSize;
+        TSize		rest;
+        TBuffer		buffer;
+		ISource		source;
+
+		BufferHandler(TPipe &_pipe, size_t requestedSize):
+			pipe(_pipe),
+			bufferSize(requestedSize),
+            rest(0) {}
+
+        inline TBuffer& first() {
+            rest = length(pipe);
+			allocPage(buffer, _min(bufferSize, rest), *this);
+			source = ISource(pipe);
+			for(ITarget target = buffer.begin; target != buffer.end; ++target) {
+				*target = *source;
+				++source;
+			}
+            if (!(rest -= size(buffer))) source = ISource();
+			return buffer;
+        }
+
+        inline TBuffer& next() {
+			resize(buffer, _min(bufferSize, rest));
+			ITarget _end = buffer.begin + size(buffer);
+			for(ITarget target = buffer.begin; target != _end; ++target) {
+				*target = *source;
+				++source;
+			}
+            if (!(rest -= size(buffer))) source = ISource();
+			return buffer;
+        }
+
+        inline void process() {}
+        inline void end() { cancel(); }
+        inline void cancel() { source = ISource(); freePage(buffer, *this); }
+    };
+
+	template < typename TPipe >
+    struct Value< BufferHandler< TPipe, SourceCachingSpec > > {
+        typedef SimpleBuffer< typename Value<TPipe>::Type > Type;
+    };
+
+    //////////////////////////////////////////////////////////////////////////////
+	// buffer handler optimized for external string sources
+    struct ExtStringSourceCachingSpec_;
+	typedef Tag<ExtStringSourceCachingSpec_> ExtStringSourceCachingSpec;
+
+	template < typename TSequence, typename TSpec >
+	struct BufferHandler< Pipe<TSequence, TSpec>, ExtStringSourceCachingSpec >
+    {
+		typedef typename Value<TSequence>::Type		TValue;
+        typedef typename Size<TSequence>::Type		TSize;
+        typedef SimpleBuffer<TValue>				TBuffer;
+        typedef Pipe<TSequence, TSpec>				TPipe;
+
+		typedef typename Iterator<TSequence const, Standard>::Type	ISource;
+		typedef typename Iterator<TBuffer, Standard>::Type			ITarget;
+
+		TPipe		&pipe;
+		unsigned	bufferSize;
+        TSize		rest;
+        TBuffer		buffer;
+		ISource		source;
+
+		BufferHandler(TPipe &_pipe, unsigned requestedSize):
+			pipe(_pipe),
+			bufferSize(requestedSize),
+            rest(0) {}
+
+        inline TBuffer& first() {
+            rest = length(pipe.in);
+			allocPage(buffer, _min(bufferSize, rest), *this);
+			source = begin(pipe.in);
+			for(ITarget target = buffer.begin; target != buffer.end; ++target) {
+				*target = *source;
+				++source;
+			}
+            if (!(rest -= size(buffer))) source = ISource();
+			return buffer;
+        }
+
+        inline TBuffer& next() {
+			resize(buffer, _min(bufferSize, rest));
+			ITarget _end = buffer.begin + size(buffer);
+			for(ITarget target = buffer.begin; target != _end; ++target) {
+				*target = *source;
+				++source;
+			}
+            if (!(rest -= size(buffer))) source = ISource();
+			return buffer;
+        }
+
+        inline void process() {}
+        inline void end() { cancel(); }
+        inline void cancel() { source = ISource(); freePage(buffer, *this); }
+    };
+
+	template < typename TSequence, typename TSpec >
+    struct Value< BufferHandler< Pipe<TSequence, TSpec>, ExtStringSourceCachingSpec > > {
+		typedef SimpleBuffer< typename Value<TSequence>::Type > Type;
+    };
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global functions
+
+    // choose the most efficient buffer handler
+    template < typename TInput, typename TSpec >
+    struct BufReadHandler< Pipe<TInput, TSpec> > {
+		typedef			
+			typename If<
+				AllowsFastRandomAccess<TInput>::VALUE,
+				SourceNonCachingSpec,
+//				SourceCachingSpec>
+				ExtStringSourceCachingSpec >::Type			TTag;
+		typedef BufferHandler< Pipe<TInput, TSpec>, TTag>	Type;
+    };
+
+
+    template < typename TValue, typename TConfig, typename TSpec >
+    struct BufReadHandler< Pipe< String<TValue, External<TConfig> >, TSpec > > {
+		typedef BufferHandler< 
+			Pipe< String<TValue, External<TConfig> >, TSpec >, 
+			ExtStringSourceCachingSpec 
+		> Type;
+    };
+
+    template < typename TValue, typename TConfig, typename TSpec >
+    struct BufReadHandler< Pipe< String<TValue, External<TConfig> > const, TSpec > > {
+		typedef BufferHandler< 
+			Pipe< String<TValue, External<TConfig> > const, TSpec >, 
+			ExtStringSourceCachingSpec 
+		> Type;
+    };
+
+
+	template < typename TInput, typename TSpec, typename TCommand >
+	inline bool control(Pipe< TInput, Source<TSpec> > &/*me*/, TCommand const &) {
+        return true;
+    }
+
+	template < typename TInput, typename TSpec >
+	inline bool control(Pipe< TInput, Source<TSpec> > &me, ControlBeginRead const &) {
+		me.cur = begin(me.in, Rooted());
+		return true;
+	}
+	
+	template < typename TInput, typename TSpec >
+	inline bool control(Pipe< TInput, Source<TSpec> > &me, ControlEndRead const &) {
+        me.cur = end(me.in, Rooted());
+		return true;
+	}
+	
+	template < typename TInput, typename TSpec >
+	inline bool control(Pipe< TInput, Source<TSpec> > &me, ControlEof const &) {
+		return atEnd(me.cur);
+	}
+
+	template < typename TInput, typename TSpec >
+	inline bool control(Pipe< TInput, Source<TSpec> > &me, ControlEos const &) {
+		return atEndOfSequence(me.cur);
+	}
+
+    template < typename TInput, typename TSpec >
+    inline typename Size< Pipe< TInput, Source<TSpec> > >::Type
+	length(Pipe< TInput, Source<TSpec> > const &me) {
+        return length(me.in);
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pipe_tupler.h b/src/SeqAn-1.3/seqan/pipe/pipe_tupler.h
new file mode 100644
index 0000000..3399179
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pipe_tupler.h
@@ -0,0 +1,507 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PIPE_TUPLER_H
+#define SEQAN_HEADER_PIPE_TUPLER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//namespace SEQAN_NAMESPACE_PIPELINING
+//{
+
+//////////////////////////////////////////////////////////////////////////////
+
+    template < unsigned tupleLen, bool omitLast = false, typename TCompression = void >
+    struct Tupler;
+
+    template < typename TInput, unsigned tupleLen, bool omitLast, typename TCompression >
+    struct Value< Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > > {
+        typedef Tuple<typename Value<TInput>::Type, tupleLen, TCompression>	TTuple;
+        typedef Pair<typename Size<TInput>::Type, TTuple, Compressed>		Type;
+    };
+
+//////////////////////////////////////////////////////////////////////////////
+
+    template < 
+		typename TInput, 
+		unsigned tupleLen, 
+		bool omitLast, 
+		typename TCompression,
+		typename TPair, 
+		typename TLimitsString >
+    struct Value< Pipe< TInput, Multi< Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString > > > {
+        typedef Tuple<typename Value<TInput>::Type, tupleLen, TCompression>	TTuple;
+        typedef Pair<TPair, TTuple, Compressed>								Type;
+    };
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+	// output only fully filled tuples
+	template < typename TTupler >
+	struct TuplerLastTuples_ {
+		enum { VALUE = 1 };
+	};
+
+	// output tupleLen-1 half filled tuples at the end
+    template < typename TInput, unsigned tupleLen, typename TCompression >
+	struct TuplerLastTuples_< Pipe< TInput, Tupler<tupleLen, false, TCompression> > > {
+		enum { VALUE = tupleLen };
+	};
+
+    struct ShiftLeftWorker_ {
+        template <typename Arg>
+        static inline void body(Arg &arg, unsigned I) {
+            arg.i2[I-1] = arg.i2[I];
+        }
+    };
+
+/**
+.Spec.Tupler:
+..cat:Pipelining
+..general:Class.Pipe
+..summary:Outputs tuples of the $tupleLen$ consecutive elements of the input stream.
+..signature:Pipe<TInput, Tupler<tupleLen, omitLast> >
+..param.TInput:The type of the pipeline module this module reads from.
+..param.tupleLen:The tuple length.
+...remarks:The tuples contain elements $in[i]in[i+1]...in[i+(tupleLen-1)]$.
+..param.omitLast:Omit half filled tuples.
+..param.omitLast:If $true$, the output stream is $tupleLen-1$ elements shorter than the input stream.
+..param.omitLast:If $false$, the lengths are identical and the last tuples are filled with blanks (default constructed elements) for undefined entries.
+..remarks:The output type is a @Class.Tuple@ of input elements and length $tupleLen$ (i.e. $Tuple<Value<TInput>::Type, tupleLen>$).
+..remarks:The tuples are sequences of the form $in[i]in[i-1]in[i-2]..in[i-tupleLen+1]$. For $omitLast=false$ $i$ begins with 0 and for $omitLast=true$ $i$ begins with $tupleLen-1$.
+..include:seqan/pipe.h
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+    // tupler class
+    template < typename TInput, unsigned tupleLen, bool omitLast, typename TCompression >
+    struct Pipe< TInput, Tupler<tupleLen, omitLast, TCompression> >
+    {
+		typedef typename Value< typename Value<Pipe>::Type, 2 >::Type	TTuple;
+		typedef typename Value<TTuple>::Type							TValue;
+
+		TInput                      ∈
+        typename Value<Pipe>::Type	tmp;
+		typename Size<TInput>::Type	lastTuples;
+        
+        Pipe(TInput& _in):
+            in(_in) {}
+
+        inline typename Value<Pipe>::Type const & operator*() const {
+            return tmp;
+        }
+
+        inline Pipe& operator++() {
+            if (eof(in)) --lastTuples;
+            Loop<ShiftLeftWorker_, tupleLen - 1>::run(this->tmp);
+			++tmp.i1;
+			if (lastTuples < TuplerLastTuples_<Pipe>::VALUE)
+	            tmp.i2[tupleLen - 1] = TValue();
+			else {
+				tmp.i2[tupleLen - 1] = *in;
+				++in;
+			}
+            return *this;
+        }
+
+        inline void fill() {
+            unsigned i;
+            for(i = 0; i < tupleLen && !eof(in); ++i, ++in)
+                tmp.i2.i[i] = *in;
+			if (TuplerLastTuples_<Pipe>::VALUE > tupleLen - i)
+				lastTuples = TuplerLastTuples_<Pipe>::VALUE - (tupleLen - i);
+			else
+				lastTuples = 0;
+            for(; i < tupleLen; ++i)
+                tmp.i2.i[i] = TValue();
+            tmp.i1 = 0;
+        }
+	};
+
+//____________________________________________________________________________
+
+
+	template < typename TInput, unsigned tupleLen, bool omitLast >
+    struct Pipe< TInput, Tupler<tupleLen, omitLast, Compressed> >
+    {
+        TInput                      ∈
+        typename Value<Pipe>::Type	tmp;
+		typename Size<TInput>::Type	lastTuples;
+        
+        Pipe(TInput& _in):
+            in(_in) {}
+
+        inline typename Value<Pipe>::Type const & operator*() const {
+            return tmp;
+        }
+
+        inline Pipe& operator++() {
+            if (eof(in)) --lastTuples;
+			tmp.i2 <<= 1;
+			++tmp.i1;
+			if (lastTuples == TuplerLastTuples_<Pipe>::VALUE) {
+				tmp.i2 |= *in;
+				++in;
+			}
+            return *this;
+        }
+
+        inline void fill() {
+            unsigned i;
+            clear(tmp.i2);
+			for(i = 0; i < tupleLen && !eof(in); ++i, ++in) {
+                tmp.i2 <<= 1;
+                tmp.i2 |= *in;
+			}
+			if (TuplerLastTuples_<Pipe>::VALUE > tupleLen - i)
+				lastTuples = TuplerLastTuples_<Pipe>::VALUE - (tupleLen - i);
+			else
+				lastTuples = 0;
+            tmp.i2 <<= (tupleLen - i);
+            tmp.i1 = 0;
+        }
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // tupler class for multiple sequences
+    template < 
+		typename TInput, 
+		unsigned tupleLen, 
+		bool omitLast, 
+		typename TCompression, 
+		typename TPair, 
+		typename TLimitsString >
+    struct Pipe< TInput, Multi<Tupler<tupleLen, omitLast, TCompression>, TPair, TLimitsString> >
+    {
+		typedef typename Value< typename Value<Pipe>::Type, 2 >::Type	TTuple;
+		typedef typename Value<TTuple>::Type							TValue;
+
+		typedef PairIncrementer_<TPair, TLimitsString>	Incrementer;
+
+		TInput                      ∈
+        Incrementer					localPos;
+        typename Value<Pipe>::Type	tmp;
+		typename Size<TInput>::Type	seqLength, lastTuples;
+
+		TLimitsString const &limits;
+        
+        Pipe(TInput& _in, TLimitsString const &_limits):
+            in(_in),
+			limits(_limits) {}
+
+        inline typename Value<Pipe>::Type const & operator*() const {
+            return tmp;
+        }
+
+        inline Pipe& operator++() {
+			// process next sequence
+			if (eos())
+				if (--lastTuples == 0) {
+					assignValueI1(tmp.i1, getValueI1(tmp.i1) + 1);
+					fill();
+					return *this;
+				}
+
+			// shift left 1 character
+            Loop<ShiftLeftWorker_, tupleLen - 1>::run(this->tmp);
+			assignValueI2(tmp.i1, getValueI2(tmp.i1) + 1);
+
+			if (lastTuples < TuplerLastTuples_<Pipe>::VALUE) {
+	            tmp.i2[tupleLen - 1] = TValue();
+			} else {
+				tmp.i2[tupleLen - 1] = *in;
+				++localPos;
+				++in;
+			}
+            return *this;
+        }
+
+        inline void fill() {
+			do {
+				unsigned i = 0;
+				if (!eof(in))
+					do {
+						tmp.i2.i[i] = *in;
+						++in;
+						++i;
+						++localPos;
+					} while ((i < tupleLen) && !eos());
+				lastTuples = TuplerLastTuples_<Pipe>::VALUE;
+
+				// fill up with null chars
+				for(; i < tupleLen; ++i)
+					tmp.i2.i[i] = TValue();
+				
+				// eventually, reduce the number of half-filled tuples
+				if (lastTuples <= tupleLen - i)
+					lastTuples = 0;
+				else
+					lastTuples -= tupleLen - i;
+
+				if (lastTuples == 0)
+					assignValueI1(tmp.i1, getValueI1(tmp.i1) + 1);
+
+			} while ((lastTuples == 0) && !eof(in));
+
+			assignValueI2(tmp.i1, 0);
+		}
+
+		inline bool eos() {
+			return (getValueI1(localPos) > 0) && (getValueI2(localPos) == 0);
+		}
+	};
+
+//____________________________________________________________________________
+
+
+	template < 
+		typename TInput, 
+		unsigned tupleLen, 
+		bool omitLast, 
+		typename TPair, 
+		typename TLimitsString >
+    struct Pipe< TInput, Multi<Tupler<tupleLen, omitLast, Compressed>, TPair, TLimitsString> >
+    {
+		typedef typename Value< typename Value<Pipe>::Type, 2 >::Type	TTuple;
+		typedef typename Value<TTuple>::Type							TValue;
+
+		typedef PairIncrementer_<TPair, TLimitsString>	Incrementer;
+
+		TInput                      ∈
+        Incrementer					localPos;
+        typename Value<Pipe>::Type	tmp;
+		typename Size<TInput>::Type	seqLength, lastTuples;
+
+		TLimitsString const &limits;
+        
+        Pipe(TInput& _in, TLimitsString const &_limits):
+            in(_in),
+			limits(_limits) {}
+
+        inline typename Value<Pipe>::Type const & operator*() const {
+            return tmp;
+        }
+
+        inline Pipe& operator++() {
+			// process next sequence
+			if (eos())
+				if (--lastTuples == 0) {
+					assignValueI1(tmp.i1, getValueI1(tmp.i1) + 1);
+					fill();
+					return *this;
+				}
+
+			// shift left 1 character
+			tmp.i2 <<= 1;
+			assignValueI2(tmp.i1, getValueI2(tmp.i1) + 1);
+			if (lastTuples == TuplerLastTuples_<Pipe>::VALUE) {
+				tmp.i2 |= *in;
+				++localPos;
+				++in;
+			}
+            return *this;
+        }
+
+        inline void fill() {
+			do {
+				unsigned i = 0;
+				if (!eof(in))
+					do {
+						tmp.i2 <<= 1;
+						tmp.i2 |= *in;
+						++in;
+						++i;
+						++localPos;
+					} while ((i < tupleLen) && !eos());
+				lastTuples = TuplerLastTuples_<Pipe>::VALUE;
+
+				// fill up with null chars
+	            tmp.i2 <<= (tupleLen - i);
+				
+				// eventually, reduce the number of half-filled tuples
+				if (lastTuples <= tupleLen - i)
+					lastTuples = 0;
+				else
+					lastTuples -= tupleLen - i;
+
+				if (lastTuples == 0)
+					assignValueI1(tmp.i1, getValueI1(tmp.i1) + 1);
+
+			} while ((lastTuples == 0) && !eof(in));
+
+			assignValueI2(tmp.i1, 0);
+        }
+
+		inline bool eos() {
+			return (getValueI1(value(localPos)) > 0) && (getValueI2(value(localPos)) == 0);
+		}
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global pipe functions
+    template < typename TInput, unsigned tupleLen, bool omitLast, typename TCompression >
+	inline bool 
+	control(
+		Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > &me, 
+		ControlBeginRead const &command) 
+	{
+        if (!control(me.in, command)) return false;
+		me.fill();
+		return true;
+	}
+    
+    template < 
+		typename TInput,
+		unsigned tupleLen,
+		bool omitLast,
+		typename TCompression,
+		typename TPair, 
+		typename TLimitsString >
+	inline bool 
+	control(
+		Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > &me, 
+		ControlBeginRead const &command) 
+	{
+        if (!control(me.in, command)) return false;
+		setHost(me.localPos, me.limits);
+		assignValueI1(me.tmp.i1, 0);
+		me.fill();
+		return true;
+	}
+    
+    template < typename TInput, unsigned tupleLen, bool omitLast, typename TCompression >
+	inline bool 
+	control(
+		Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > &me, 
+		ControlEof const &)
+	{
+		return me.lastTuples == 0;
+    }
+
+    template < 
+		typename TInput,
+		unsigned tupleLen,
+		bool omitLast,
+		typename TCompression,
+		typename TPair, 
+		typename TLimitsString >
+	inline bool 
+	control(
+		Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > &me, 
+		ControlEof const &) 
+	{
+		return me.lastTuples == 0;
+	}
+
+    template < typename TInput, unsigned tupleLen, bool omitLast, typename TCompression >
+	inline bool 
+	control(
+		Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > &me, 
+		ControlEos const &) 
+	{
+		return control(me, ControlEof());
+	}
+
+    template < 
+		typename TInput,
+		unsigned tupleLen,
+		bool omitLast,
+		typename TCompression,
+		typename TPair, 
+		typename TLimitsString >
+	inline bool 
+	control(
+		Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > &me, 
+		ControlEos const &) 
+	{
+		return (getValueI1(me.tmp.i1) > 0) && (getValueI2(me.tmp.i1) == 0);
+	}
+
+    template < typename TInput, unsigned tupleLen, bool omitLast, typename TCompression >
+    inline typename Size< Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > >::Type
+    length(Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > const &me) 
+	{
+		typedef Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > >	TPipe;
+		if (length(me.in) >= (tupleLen - TuplerLastTuples_<TPipe>::VALUE))
+			return length(me.in) - (tupleLen - TuplerLastTuples_<TPipe>::VALUE);
+		else
+			return 0;
+    }
+
+    template < 
+		typename TInput,
+		unsigned tupleLen,
+		bool omitLast,
+		typename TCompression,
+		typename TPair, 
+		typename TLimitsString >
+    inline typename Size< Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > >::Type
+    length(Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > const &me)
+	{
+		typedef Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > >	TPipe;
+		unsigned seqs = countSequences(me);
+		
+		if (length(me.in) >= seqs * (tupleLen - TuplerLastTuples_<TPipe>::VALUE))
+			return length(me.in) - seqs * (tupleLen - TuplerLastTuples_<TPipe>::VALUE);
+		else
+			return 0;
+    }
+
+    template < typename TInput, unsigned tupleLen, bool omitLast, typename TCompression >
+    inline unsigned
+    countSequences(Pipe< TInput, Tupler< tupleLen, omitLast, TCompression > > const &) {
+		return 1;
+	}
+
+    template < 
+		typename TInput,
+		unsigned tupleLen,
+		bool omitLast,
+		typename TCompression,
+		typename TPair, 
+		typename TLimitsString >
+    inline unsigned
+	countSequences(Pipe< TInput, Multi<Tupler< tupleLen, omitLast, TCompression >, TPair, TLimitsString> > const &me) {
+		return length(me.limits) - 1;
+	}
+
+//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pool_base.h b/src/SeqAn-1.3/seqan/pipe/pool_base.h
new file mode 100644
index 0000000..ccbb5b5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pool_base.h
@@ -0,0 +1,1262 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_POOL_BASE_H
+#define SEQAN_HEADER_POOL_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Spec.PoolConfigSize:
+..cat:Pipelining
+..general:Spec.PoolSpec
+..summary:Configuration of Pool.
+..signature:PoolConfig<TSize, TFile>
+..param.TSize:The Pool's size type.
+..param.TFile:The underlying @Class.File@ type.
+...default:$File<>$, see @Class.File at .
+..see:Spec.PoolConfig
+..include:seqan/pipe.h
+*/
+
+	template < typename TSize,
+		       typename TFile = File<> >						// default file type
+    struct PoolConfigSize {
+		typedef TSize SizeType;
+        typedef TFile File;
+    };
+
+/**
+.Spec.PoolConfig:
+..cat:Pipelining
+..general:Spec.PoolSpec
+..summary:Configuration of Pool.
+..signature:PoolConfig<TFile>
+..param.TFile:The underlying @Class.File@ type.
+...default:$File<>$, see @Class.File at .
+..remarks:Using this configuration spec., the Pool's size type is $Size<TFile>::Type$. To use a custom size type @Spec.PoolConfigSize@ should be used.
+..see:Spec.PoolConfigSize
+..include:seqan/pipe.h
+*/
+
+	template < typename TFile = File<> >						// default file type
+    struct PoolConfig {
+		typedef typename Size<TFile>::Type SizeType;
+        typedef TFile File;
+    };
+
+/**
+.Spec.PoolSpec:
+..cat:Pipelining
+..general:Class.Pool
+..summary:Stores/Retrieves all elements to/from disk.
+..signature:Pool<TValue, PoolSpec<TConfig> >
+..param.TValue:The value type, that is the type of the stream elements.
+..param.TConfig:Configuration Spec. Defines destination function, size type, and file type.
+...type:Spec.PoolConfig
+...type:Spec.PoolConfigSize
+..remarks:The Pool's input/output type is $TValue$ and the size type is determined by the $TConfig$.
+..include:seqan/pipe.h
+*/
+
+    template < typename TConfig = PoolConfig<> >
+    struct PoolSpec {
+        typedef TConfig Config;
+    };
+
+/**
+.Class.Pool:
+..cat:Pipelining
+..summary:Pools are push- and pop-passive pipeline modules.
+..signature:Pool<TValue, TSpec>
+..param.TValue:The value type, that is the type of the stream elements.
+..param.TSpec:The specializing type.
+...default:PoolSpec<>, see @Spec.PoolSpec at .
+..remarks:Use @Metafunction.Value@ to get the output type of a given Pipe (returns $Value<TInput>::Type$ by default).
+..remarks:Use @Metafunction.Size@ to get the size type of a given Pipe (returns $Size<TInput>::Type$ by default).
+..include:seqan/pipe.h
+*/
+
+    template < typename TValue,
+               typename TSpec = PoolSpec<> >
+    struct Pool;
+
+
+    struct PoolParameters
+    {
+/*
+        enum { DefaultMemBufferSize     = 384 * 1024*1024,			// max memory config
+               DefaultPageSize          = 32 * 1024*1024,
+               DefaultBucketBufferSize  = 64 * 1024*1024,
+               DefaultReadAheadBuffers  = 2,
+               DefaultWriteBackBuffers  = 2,
+               DefaultWriteBackBuckets  = 16,
+               DefaultAbsoluteSizes     = true };
+*/
+
+
+        enum { DefaultMemBufferSize     = 128 * 1024*1024,		// normal memory config
+               DefaultPageSize          = 32 * 1024*1024,
+               DefaultBucketBufferSize  = 64 * 1024*1024,
+               DefaultReadAheadBuffers  = 2,
+               DefaultWriteBackBuffers  = 2,
+               DefaultWriteBackBuckets  = 16,
+               DefaultAbsoluteSizes     = true };
+
+
+/*
+        enum { DefaultMemBufferSize     = 0*8192,//64 * 1024*1024,	// low memory config
+               DefaultPageSize          = 2 * 1024*1024,
+               DefaultBucketBufferSize  = 6 * 1024*1024,
+               DefaultReadAheadBuffers  = 4,
+               DefaultWriteBackBuffers  = 4,
+               DefaultWriteBackBuckets  = 16,
+               DefaultAbsoluteSizes     = true };
+*/
+
+        unsigned memBufferSize;
+        unsigned pageSize;
+        unsigned bucketBufferSize;
+        unsigned readAheadBuffers;
+        unsigned writeBackBuffers;
+        unsigned writeBackBuckets;
+        bool     absoluteSizes;     // when false, sizes are measured in units of TValue
+                                    // when true, sizes are measured in bytes
+
+        PoolParameters():
+            memBufferSize(DefaultMemBufferSize),
+            pageSize(DefaultPageSize),
+            bucketBufferSize(DefaultBucketBufferSize),
+            readAheadBuffers(DefaultReadAheadBuffers),
+            writeBackBuffers(DefaultWriteBackBuffers),
+            writeBackBuckets(DefaultWriteBackBuckets),
+            absoluteSizes(DefaultAbsoluteSizes) {}
+
+        template < typename TValue >
+        void absolutize(unsigned aligning, TValue *) {
+            if (!absoluteSizes) return;
+            memBufferSize = memBufferSize / sizeof(TValue);
+            bucketBufferSize = bucketBufferSize / sizeof(TValue);
+            pageSize = pageSize / sizeof(TValue);
+            pageSize = (pageSize / aligning) * aligning;
+            if (!pageSize) pageSize += aligning;
+        }
+    };
+
+
+        
+    template < typename TBuffer, typename THandler >
+    inline TBuffer& processBuffer(TBuffer &h, THandler &) {
+        return h;
+    }
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// handler that manages a simple memory buffer
+    struct MemorySpec_;
+	typedef Tag<MemorySpec_> MemorySpec;
+
+    template < typename TPool >
+    struct BufferHandler< TPool, MemorySpec >
+    {
+		typedef TPool							Pool;
+        typedef typename TPool::Type            Type;
+
+        typedef SimpleBuffer<Type>				Buffer;
+        typedef Buffer&							BufferRef;
+
+		TPool	&pool;
+        Buffer	empty;
+
+		BufferHandler(TPool &_pool):
+			pool(_pool) {}
+
+		BufferHandler(TPool &_pool, unsigned):
+			pool(_pool) {}
+
+        inline BufferRef first() {
+            return pool.memBuffer;
+        }
+
+        inline BufferRef next() {
+            return empty;
+        }
+
+        inline void process() {
+            processBuffer(pool.memBuffer, *this);
+        }
+
+        inline void end() {}
+        inline void cancel() {}
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// generic block based asynchronous read handler
+    struct ReadFileSpec_;
+	typedef Tag<ReadFileSpec_> ReadFileSpec;
+
+    template < typename TPool >
+    struct BufferHandler< TPool, ReadFileSpec >
+    {
+		typedef TPool								Pool;
+        typedef typename TPool::Type                Type;
+        typedef typename TPool::File                File;
+
+        typedef SimpleBuffer<Type>					Buffer;
+        typedef PageFrame<Type, File, Dynamic<> >   TPageFrame;
+		typedef TPageFrame&                         PageFrameRef;
+        typedef Buffer&								BufferRef;
+        typedef PageChain<TPageFrame>	            TPageChain;
+
+        TPool       &pool;
+        TPageChain   chain;
+        unsigned    pageSize;
+        unsigned    readPageNo, _pages;
+        Buffer	    empty;
+
+        BufferHandler(TPool &_pool):
+            pool(_pool),
+            chain(_min(_pool.readAheadBuffers, _pool.pages())),
+			pageSize(_pool.pageSize) {}
+
+        BufferHandler(TPool &_pool, unsigned _requestedBufferSize, unsigned _readAheadBuffers = 1):
+            pool(_pool),
+//            pageSize(alignSize(_min(_pool.size(), _requestedBufferSize), _pool.pageSize)),
+            chain(_min(_readAheadBuffers, _pool.pages(pageSize = alignSize(_min(_pool.size(), _requestedBufferSize), _pool.pageSize)))) 
+        {
+			#ifdef SEQAN_HEADER_PIPE_DEBUG
+				::std::cerr << "___BufferHandler___" << ::std::endl;
+				::std::cerr << "pagesize: " << pageSize << ::std::endl;
+				::std::cerr << "readaheadbuffers: " << chain.maxFrames << ::std::endl;
+				::std::cerr << "pages: " << pool.pages(pageSize) << ::std::endl;
+			#endif
+        }
+
+        ~BufferHandler() {
+            end();
+        }
+        
+        inline BufferRef first() {
+            _pages = pool.pages(pageSize);
+            if (!_pages) return empty;
+
+            // enqueue reading of the <readAheadBuffers> first blocks
+            readPageNo = 0;
+            TPageFrame *p = chain.first;
+            while (p) {
+                p->pageNo = readPageNo++;
+                _read(*p);
+                p = p->next;
+            }
+
+            // retrieve the very first
+            waitFor(*chain.first);
+            return processBuffer(*chain.first, *this);
+        }
+
+        inline BufferRef next() {
+            // step one buffer ahead
+            chain.getReadyPage();
+
+            // read ahead
+            chain.last->pageNo = readPageNo++;
+            _read(*chain.last);
+            
+            // retrieve the next buffer in order
+            waitFor(*chain.first);
+            return processBuffer(*chain.first, *this);
+        }
+
+        inline void end() {
+            cancel();
+        }
+
+        inline void cancel() {
+            TPageFrame *p = chain.first;
+            while (p) {
+				::seqan::cancel(*p, pool.file);
+                freePage(*p, pool.file);
+                p = p->next;
+            }
+        }
+
+        inline void process() {}
+
+    private:
+		bool _error() {
+//            ::std::cerr << "Error in BufWriteFileHandler::_read " << pool.file.error() << ::std::endl;
+            return true;
+        }
+
+        inline bool _read(TPageFrame &pf) {
+            if (pf.pageNo < _pages) {
+                // alloc if empty
+                if (!pf.begin)
+                    allocPage(pf, pageSize, pool.file);
+
+                // set buffer size according to read size
+                resize(pf, pool.dataSize(pf.pageNo, pageSize));
+
+                // read asynchronously (if possible) from disk
+                return readPage(pf, pool.file) || _error();
+            } else {
+                // free if allocated
+                freePage(pf, pool.file);
+                return false;
+            }
+        }
+    };
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic block based asynchronous write handler
+    struct WriteFileSpec_;
+	typedef Tag<WriteFileSpec_> WriteFileSpec;
+
+    template < typename TPool >
+    struct BufferHandler< TPool, WriteFileSpec >
+    {
+		typedef TPool								Pool;
+        typedef typename TPool::Type                Type;
+        typedef typename TPool::File                File;
+
+        typedef SimpleBuffer<Type>					Buffer;
+        typedef PageFrame<Type, File, Dynamic<> >   TPageFrame;
+		typedef TPageFrame&                          PageFrameRef;
+        typedef Buffer&								BufferRef;
+        typedef PageChain<TPageFrame>	            TPageChain;
+
+        TPool       &pool;
+        TPageChain   chain;
+        unsigned    pageSize;
+        unsigned    writePageNo, _pages;
+        Buffer	    empty;
+
+        BufferHandler(TPool &_pool):
+            pool(_pool),
+            chain(_min(_pool.writeBackBuffers, _pool.pages())),
+			pageSize(_pool.pageSize) {}
+
+        BufferHandler(TPool &_pool, unsigned _requestedBufferSize, unsigned _writeBackBuffers = 1):
+            pool(_pool),
+            chain(_min(_writeBackBuffers, _pool.pages(pageSize))),
+			pageSize(alignSize(_min(_pool.size(), _requestedBufferSize), _pool.pageSize)) {}
+
+        ~BufferHandler() {
+            cancel();
+        }
+        
+    public:
+
+        inline BufferRef first() {
+            _pages = pool.pages(pageSize);
+            if (!_pages) return empty;
+
+            // get a ready page frame
+            PageFrameRef pf = *chain.getReadyPage();
+
+            if (!pf.begin)
+                allocPage(pf, pageSize, pool.file);
+
+            writePageNo = 0;
+            resize(pf, pool.dataSize(pf.pageNo = writePageNo++, pageSize));
+            return pf;
+        }
+
+        inline BufferRef next() {
+            // write previously provided buffer to disk
+            _write(processBuffer(*chain.last, *this));
+
+            // step one buffer ahead
+            PageFrameRef pf = *chain.getReadyPage();
+
+            if (!pf.begin)
+                allocPage(pf, pageSize, pool.file);
+
+            resize(pf, pool.dataSize(pf.pageNo = writePageNo++, pageSize));
+            return pf;
+        }
+
+        inline void end() {
+            // write previously provided buffer to disk
+            _write(processBuffer(*chain.last, *this));
+            flush();
+        }
+
+        inline void flush() {
+            TPageFrame *p = chain.first;
+            while (p) {
+                waitFor(*p);
+                freePage(*p, pool.file);
+                p = p->next;
+            }
+			::seqan::flush(pool.file);
+        }
+
+        inline void cancel() {
+            TPageFrame *p = chain.first;
+            while (p) {
+                ::seqan::cancel(*p, pool.file);
+                freePage(*p, pool.file);
+                p = p->next;
+            }
+        }
+
+        inline void process() {}
+
+    private:
+
+        bool _error() {
+//            ::std::cerr << "Error in BufWriteFileHandler::_write " << pool.file.error() << ::std::endl;
+            return true;
+        }
+
+        bool _write(TPageFrame &pf) {
+            if (pf.pageNo < _pages) {
+                // write asynchronously (if possible) to disk
+                return writePage(pf, pool.file) || _error();
+            } else {
+                // free if allocated
+                freePage(pf, pool.file);
+                return false;
+            }
+        }
+    };
+
+	//////////////////////////////////////////////////////////////////////////////
+	// generic buffered multiplex handler
+    struct MultiplexSpec_;
+	typedef Tag<MultiplexSpec_> MultiplexSpec;
+
+	template < typename TBufferHandler1, typename TBufferHandler2 >
+    struct BufferHandler< Bundle2< TBufferHandler1, TBufferHandler2 >, MultiplexSpec >
+	{
+        typedef typename TBufferHandler1::Type   Type;
+        typedef typename TBufferHandler1::Buffer Buffer;
+
+		TBufferHandler1 *handler1;
+		TBufferHandler2 *handler2;
+
+		template <typename TPool>
+		BufferHandler(TPool &_pool) {
+			if (_pool.memBuffer.begin || _pool._size == 0) {	// decision to choose handler1 or handler2
+				handler1 = new TBufferHandler1(_pool);
+				handler2 = NULL;
+			} else {
+				handler1 = NULL;
+				handler2 = new TBufferHandler2(_pool);
+			}
+		}
+
+		template <typename TPool>
+		BufferHandler(TPool &_pool, unsigned _requestedBufferSize) {
+			if (_pool.memBuffer.begin || _pool._size == 0) {	// decision to choose handler1 or handler2
+				handler1 = new TBufferHandler1(_pool, _requestedBufferSize);
+				handler2 = NULL;
+			} else {
+				handler1 = NULL;
+				handler2 = new TBufferHandler2(_pool, _requestedBufferSize);
+			}
+		}
+
+		~BufferHandler() {
+			delete handler1;
+			delete handler2;
+		}
+		
+        inline Buffer first() {
+			if (handler1)	return handler1->first();
+			else			return handler2->first();
+		}
+
+		inline Buffer next() {
+			if (handler1)	return handler1->next();
+			else			return handler2->next();
+		}
+
+		inline void end() {
+			if (handler1)	return handler1->end();
+			else			return handler2->end();
+		}
+
+		inline void process() {
+			if (handler1)	return handler1->process();
+			else			return handler2->process();
+		}
+
+		inline void cancel() {
+			if (handler1)	return handler1->cancel();
+			else			return handler2->cancel();
+		}
+	};
+
+
+	template < typename THandler1, typename THandler2 >
+    struct Handler< Bundle2< THandler1, THandler2 >, MultiplexSpec >
+	{
+        typedef typename THandler1::Type            Type;
+
+        THandler1 *handler1;
+		THandler2 *handler2;
+
+		template <typename TPool>
+		Handler(TPool &_pool) {
+			if (_pool.memBuffer.begin || _pool._size == 0) {	// decision to choose handler1 or handler2
+				handler1 = new THandler1(_pool);
+				handler2 = NULL;
+			} else {
+				handler1 = NULL;
+				handler2 = new THandler2(_pool);
+			}
+		}
+
+		~Handler() {
+			delete handler1;
+			delete handler2;
+		}
+		
+        inline bool begin() {
+			if (handler1)	return handler1->begin();
+			else			return handler2->begin();
+		}
+
+        inline Type const & front() const {
+            if (handler1)	return handler1->front();
+			else			return handler2->front();
+        }
+
+        inline void pop() {
+            if (handler1)	handler1->pop();
+			else			handler2->pop();
+        }
+
+        inline void pop(Type &Ref_) {
+            if (handler1)	handler1->pop(Ref_);
+			else			handler2->pop(Ref_);
+        }
+
+        inline void push(Type const & Val_) {
+            if (handler1)	handler1->push(Val_);
+			else			handler2->push(Val_);
+        }
+
+        inline bool eof() const {
+            if (handler1)	return handler1->eof();
+			else			return handler2->eof();
+        }
+
+		inline void end() {
+			if (handler1)	return handler1->end();
+			else			return handler2->end();
+		}
+
+		inline void process() {
+			if (handler1)	return handler1->process();
+			else			return handler2->process();
+		}
+	};
+
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// character and buffer based handler definitions
+    template < typename TValue, typename TSpec >
+    struct BufReadHandler< Pool< TValue, TSpec > >
+    {
+        typedef BufferHandler< Bundle2<
+			BufferHandler< Pool< TValue, TSpec >, MemorySpec >, 
+			BufferHandler< Pool< TValue, TSpec >, ReadFileSpec >
+		>, MultiplexSpec > Type;
+    };
+
+    template < typename TValue, typename TSpec >
+    struct BufWriteHandler< Pool< TValue, TSpec > >
+    {
+        typedef BufferHandler< Bundle2<
+			BufferHandler< Pool< TValue, TSpec >, MemorySpec >, 
+			BufferHandler< Pool< TValue, TSpec >, WriteFileSpec >
+		>, MultiplexSpec > Type;
+    };
+
+
+    template < typename TValue, typename TPoolSpec, typename TSpec >
+    struct Value< BufferHandler< Pool< TValue, TPoolSpec >, TSpec > > {
+        typedef SimpleBuffer< TValue > Type;
+    };
+
+    template < typename TPool >
+    struct HandlerArgs {
+		typedef Nothing Type;
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// base class of all pool classes like Pool, Mapper, Sorter
+
+    template < typename TValue,
+               typename TSpec >
+    struct Pool
+    {
+		typedef TValue	                    Type;
+        typedef TSpec                       Spec;
+        typedef typename TSpec::Config      Config;
+        typedef typename Config::File       File;
+        typedef typename Config::SizeType   SizeType;
+        typedef SimpleBuffer<TValue>        Buffer;
+
+		// public handlers to read simultanously buffer- or character-wise
+        typedef typename ReadHandler<Pool>::Type    ReadHandler;
+        typedef typename WriteHandler<Pool>::Type   WriteHandler;
+		typedef typename HandlerArgs<Pool>::Type	HandlerArgs;
+
+		File				file;
+        bool                _temporary, _ownFile;
+		SizeType			_size;
+        unsigned            _pages;
+        unsigned            pageSize;
+        unsigned            bucketBufferSize;
+        unsigned            readAheadBuffers;
+        unsigned            writeBackBuffers;
+        unsigned            writeBackBuckets;
+
+        Buffer				memBuffer;
+        unsigned            memBufferSize;
+        HandlerArgs         handlerArgs;
+
+		bool				_partiallyFilled;		// the pool is partially filled (it contains undefined values)
+		TValue				undefinedValue;			// value to represent undefined (unwritten) entries
+
+    protected:
+        unsigned            _lastPageNo;
+        unsigned            _lastPageSize;
+
+        int                 listeners;
+       
+        ReadHandler         *reader;
+        WriteHandler        *writer;
+
+
+    public:
+
+        //////////////////////////////////////////////////////////////////////////////
+		// public iterator types
+
+		typedef SizeType				size_type;
+
+        Pool(const PoolParameters &_conf = PoolParameters()):
+            file(NULL)
+        {
+			_init(_conf);
+            _setSize(0);
+        }
+        
+		Pool(HandlerArgs const &args, PoolParameters const &_conf = PoolParameters()):
+            file(NULL),
+			handlerArgs(args)
+        {
+			_init(_conf);
+            _setSize(0);
+        }
+        
+        template < typename TInput, typename TPipeSpec >
+        Pool(Pipe<TInput, TPipeSpec> &, const PoolParameters &_conf = PoolParameters()):
+            file(NULL)
+        {
+			_init(_conf);
+            _setSize(0);
+        }
+        
+        template < typename TInput, typename TPipeSpec >
+		Pool(Pipe<TInput, TPipeSpec> &, HandlerArgs const &args, PoolParameters const &_conf = PoolParameters()):
+            file(NULL),
+			handlerArgs(args)
+        {
+			_init(_conf);
+            _setSize(0);
+        }
+        
+        Pool(File &_file, const PoolParameters &_conf = PoolParameters()):
+            file(_file)
+        {
+			_init(_conf);
+            _ownFile = false;
+            _temporary = false;
+            memBufferSize = 0;
+			_setSize(::seqan::size(file) / sizeof(TValue));
+        }
+        
+        Pool(const char *fileName, const PoolParameters &_conf = PoolParameters())
+        {
+			_init(_conf);
+            _temporary = false;
+            memBufferSize = 0;
+            _ownFile = open(file, fileName);
+            if (_ownFile)
+                _setSize(::seqan::size(file) / sizeof(TValue));
+            else
+                _setSize(0);
+        }
+        
+        ~Pool() {
+            endRead();
+            endWrite();
+            if (_temporary) 
+                clear();
+            else
+                if (_ownFile) close(file);
+        }
+        
+        inline void clear() {
+            resize(0);
+        }
+
+		inline size_type size() const {
+			return _size;
+		}
+
+        // this is not a real resize
+        void resize(size_type _newSize) {
+			typedef typename Size<File>::Type TFSize;
+            if (_newSize == _size) return;
+
+            _freeHandlers();	// if you forgot to call endRead/endWrite we have no trouble
+
+			if (_temporary && _ownFile) {
+				if (_size != 0) {
+					if (memBuffer.begin)
+						freePage(memBuffer, *this);
+                    else {
+						close(file);
+                        SEQAN_PROSUB(SEQAN_PROIOVOLUME, (_proFloat)((TFSize)_size * (TFSize)sizeof(TValue)));
+                    }
+				}
+
+				if (_newSize != 0) {
+					if (_newSize <= (size_type)memBufferSize)
+						allocPage(memBuffer, _newSize, *this);
+                    else {
+						openTemp(file);
+                        SEQAN_PROADD(SEQAN_PROIOVOLUME, (_proFloat)((TFSize)_newSize * (TFSize)sizeof(TValue)));
+                    }
+				}
+			}
+
+            _setSize(_newSize);
+        }
+
+
+        //////////////////////////////////////////////////////////////////////////////
+		// auto-disposal interface (deprecated)
+
+        inline void addListener() {
+            if (!listeners) return;
+            ++listeners;
+        }
+
+        inline void delListener() {
+            if (!listeners) return;
+            if (--listeners == 0) {
+                clear();
+            }
+        }
+
+
+        //////////////////////////////////////////////////////////////////////////////
+		// queue interface
+
+        inline Type const & front() const {
+            return reader->front();
+        }
+
+		inline Type const & operator*() const {
+			return reader->front();
+		}
+
+        inline void pop() {
+			reader->pop();
+        }
+
+        inline Pool& operator++() {
+			reader->pop();
+			return *this;
+        }
+
+        inline void pop(Type &Ref_) {
+            reader->pop(Ref_);
+        }
+
+        inline void push(Type const &Val_) {
+            writer->push(Val_);
+        }
+
+        inline bool eof() {
+            if (reader) return reader->eof();
+            if (writer) return writer->eof();
+            return true;
+        }
+
+
+        //////////////////////////////////////////////////////////////////////////////
+		// flow control
+
+        bool beginWrite() {
+            _freeHandlers(); // if you forgot to call endRead/endWrite we have no trouble
+			return (
+                (writer = new WriteHandler(*this)) && 
+                writer->begin());
+        }
+
+        bool endWrite() {
+			if (writer) {
+				writer->end();
+				writer->process();
+			}
+            delete writer;
+            writer = NULL;
+            return true;
+        }
+
+        bool beginRead() {
+            _freeHandlers(); // if you forgot to call endRead/endWrite we have no trouble
+			return (
+                (reader = new ReadHandler(*this)) &&
+                reader->begin());
+        }
+
+        bool endRead() {
+            if (reader) reader->end();
+            delete reader;
+            reader = NULL;
+            delListener();
+            return true;
+        }
+
+
+        inline unsigned pages() const {
+            return _pages;
+        }
+
+        inline unsigned pages(unsigned pageSize__) const {
+            return enclosingBlocks(_size, (unsigned)pageSize__);
+        }
+
+        // used by buffer handlers ...
+        inline unsigned dataSize(unsigned pageNo__) const {
+            return (pageNo__ != _lastPageNo)? pageSize: _lastPageSize;
+        }
+
+        // used by buffer handlers with variable PageSize ...
+        inline unsigned dataSize(unsigned pageNo__, unsigned pageSize__) const {
+            return (pageNo__ != _size / pageSize__)? pageSize__: _size % pageSize__;
+        }
+
+    protected:
+
+        inline void _freeHandlers() {
+            if (reader) reader->end();
+            if (writer) writer->end();
+            delete reader;
+            delete writer;
+            reader = NULL;
+            writer = NULL;
+        }
+
+        inline void _setSize(size_type _newSize) {
+            _size = _newSize;
+            _pages = enclosingBlocks(_size, (unsigned)pageSize);
+            _lastPageNo = _size / pageSize;
+            _lastPageSize = _size % pageSize;
+        }
+
+		void _init(PoolParameters _conf = PoolParameters()) 
+		{
+            _conf.absolutize(16*1024/*sectorSize(file)*/, (Type*)NULL);
+            memBufferSize    = _conf.memBufferSize;
+            pageSize		 = _conf.pageSize;
+            bucketBufferSize = _conf.bucketBufferSize;
+            readAheadBuffers = _conf.readAheadBuffers;
+            writeBackBuffers = _conf.writeBackBuffers;
+            writeBackBuckets = _conf.writeBackBuffers;
+            listeners = 0;
+            reader = NULL;
+            writer = NULL;
+            _ownFile = true;
+            _temporary = true;
+		}
+
+    };
+
+    template < typename TValue, typename TSpec, typename TIteratorSpec>
+	struct Iterator< Pool< TValue, TSpec > const, TIteratorSpec> {
+		typedef IPipeIterator< Pool< TValue, TSpec > > Type;
+	};
+
+    template < typename TValue, typename TSpec, typename TIteratorSpec>
+	struct Iterator< Pool< TValue, TSpec >, TIteratorSpec> {
+		typedef OPipeIterator< Pool< TValue, TSpec > > Type;
+	};
+
+    template < typename TValue, typename TSpec >
+	OPipeIterator< Pool< TValue, TSpec > >
+	begin(Pool< TValue, TSpec > &pool) {
+		return OPipeIterator< Pool< TValue, TSpec > >(pool);
+	}
+
+    template < typename TValue, typename TSpec >
+	OPipeIterator< Pool< TValue, TSpec > >
+	end(Pool< TValue, TSpec > &/*pool*/) {
+		return OPipeIterator< Pool< TValue, TSpec > >();
+	}
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// a pool is a queue-like container for a large amount of data
+    // in contrast to a queue you can read the whole content more than once
+    // but can't pop directly after a push
+    // instead, access to a pool looks like the following:
+    //
+    //  1. resize(<new size>)
+    //  2. beginWrite()
+    //  3. push(a), push(b), push(c) ...
+    //  4. endWrite()
+    // (5. do something else)
+    //  6. beginRead()
+    //  7. pop(a), pop(b), pop(c) ...
+    //  8. endRead()
+    // (9. clear() - if you want to save memory and refill the pool later)
+    //
+    // you can repeat steps 2-4 and 6-8 independently as often as you like
+
+    //template < typename TValue, typename TFile = File<> >
+    //struct Pool: public Pool< TValue, PoolSpec< PoolConfig< TFile > > >
+    //{
+    //    typedef TValue	                    Type;
+    //    typedef TFile                       File;
+    //    typedef typename Size<TFile>::Type  SizeType;
+    //};
+
+
+	// seqan namespace traits
+    template < typename TValue, typename TSpec >
+    struct Value< Pool< TValue, TSpec > > {
+        typedef TValue Type;
+    };
+
+    template < typename TValue, typename TSpec >
+    struct Size< Pool< TValue, TSpec > > {
+        typedef typename Pool< TValue, TSpec >::SizeType Type;
+    };
+
+    template < typename TValue, typename TSpec >
+    struct Position< Pool< TValue, TSpec > > {
+        typedef typename Size<Pool< TValue, TSpec > >::Type Type;
+    };
+
+    template < typename TValue, typename TSpec >
+    struct Difference< Pool< TValue, TSpec > > {
+		typedef typename MakeSigned_<typename Size<Pool< TValue, TSpec > >::Type>::Type Type;
+    };
+
+
+///.Function.clear.param.object.type:Class.Pool
+
+    template < typename TValue, typename TSpec >
+    inline void clear(Pool<TValue, TSpec> &me)
+    {
+        return me.clear();
+    }
+
+	// deprecated
+    template < typename TValue, typename TSpec >
+    inline typename Size< Pool<TValue, TSpec> >::Type
+    size(Pool<TValue, TSpec> const &me)
+    {
+        return me.size();
+    }
+
+///.Function.length.param.object.type:Class.Pool
+
+	template < typename TValue, typename TSpec >
+    inline typename Size< Pool<TValue, TSpec> >::Type
+    length(Pool<TValue, TSpec> const &me)
+    {
+        return me.size();
+    }
+
+///.Function.resize.param.object.type:Class.Pool
+
+	template < typename TValue, typename TSpec, typename TSize >
+    inline TSize resize(Pool<TValue, TSpec> &me, TSize new_length)
+    {
+	    me.resize(new_length);
+        return me.size();
+    }
+
+///.Function.Pipelining#front.param.object.type:Class.Pool
+
+    template < typename TValue, typename TSpec >
+	inline typename Value< Pool<TValue, TSpec> >::Type const & front(Pool<TValue, TSpec> &me) {
+        return me.front();
+    }
+
+///.Function.pop.param.object.type:Class.Pool
+
+    template < typename TValue, typename TSpec >
+    inline void pop(Pool<TValue, TSpec> &me) {
+        me.pop();
+    }
+
+    template < typename TValue, typename TSpec >
+    inline void pop(Pool<TValue, TSpec> &me, TValue &Ref_) {
+        me.pop(Ref_);
+    }
+
+/**
+.Function.push:
+..cat:Pipelining
+..summary:Appends an item at the end of an input stream.
+..signature:push(object, val)
+..param.object:A push-passive pipeline module.
+...type:Class.Pool
+..param.val:Item to be pushed.
+..remarks:@Function.push@ can only be called within a write process surrounded by @Function.beginWrite@ and @Function.endWrite at .
+..include:seqan/pipe.h
+*/
+
+    template < typename TValue, typename TSpec >
+    inline void push(Pool<TValue, TSpec> &me, TValue const &Val_) {
+        me.push(Val_);
+    }
+
+    template < typename TValue, typename TSpec >
+    ::std::ostream& operator<<(::std::ostream &out, Pool<TValue, TSpec> &p) {
+        beginRead(p);
+        while (!eof(p)) {
+		    out << front(p) << ::std::endl;
+            pop(p);
+        }
+        endRead(p);
+		return out;
+	}
+
+
+	// the pipe interface of pool classes
+	//namespace SEQAN_NAMESPACE_PIPELINING
+	//{
+		//template < typename TValue, typename TSpec >
+		//struct Value< Pool< TValue, TSpec > >
+		//{
+		//	typedef TValue Type;
+		//};
+
+		//template < typename TValue, typename TSpec >
+		//struct Size< Pool< TValue, TSpec > >
+		//{
+		//	typedef typename Size< TFile >::Type Type;
+		//};
+
+		template < typename TValue, typename TSpec >
+	    inline bool control(Pool< TValue, TSpec > &me, ControlEof const &) {
+		    return me.eof();
+	    }
+    	
+		template < typename TValue, typename TSpec >
+	    inline bool control(Pool< TValue, TSpec > &me, ControlEos const &) {
+		    return me.eof();
+	    }
+    	
+		template < typename TValue, typename TSpec >
+	    inline bool control(Pool< TValue, TSpec > &me, ControlClear const &) {
+		    me.clear();
+		    return true;
+	    }
+    	
+		template < typename TValue, typename TSpec >
+	    inline bool control(Pool< TValue, TSpec > &me, ControlBeginRead const &) {
+		    return me.beginRead();
+	    }
+    	
+		template < typename TValue, typename TSpec >
+	    inline bool control(Pool< TValue, TSpec > &me, ControlEndRead const &) {
+		    return me.endRead();
+	    }
+    	
+/**
+.Function.beginWrite:
+..cat:Pipelining
+..summary:Initiates a write process.
+..signature:beginWrite(object)
+..param.object:A push-passive pipeline module.
+...type:Class.Pool
+..returns:A $bool$ which is $true$ on success.
+..remarks:$beginWrite$ prepares a @Class.Pool@ for succeeding writes.
+..remarks:A write process must be terminated with @Function.endWrite at . Nested write processes are not allowed.
+..see:Function.endWrite
+..include:seqan/pipe.h
+*/
+
+		template < typename TValue, typename TSpec >
+	    inline bool beginWrite(Pool< TValue, TSpec > &me) {
+SEQAN_CHECKPOINT
+		    return me.beginWrite();
+        }
+
+/**
+.Function.endWrite:
+..cat:Pipelining
+..summary:Terminates a write process.
+..signature:endWrite(object)
+..param.object:A push-passive pipeline module.
+...type:Class.Pool
+..returns:A $bool$ which is $true$ on success.
+..remarks:$endWrite$ closes the input stream and frees resources possibly allocated by @Function.beginWrite at .
+..see:Function.beginWrite
+..include:seqan/pipe.h
+*/
+
+		template < typename TValue, typename TSpec >
+	    inline bool endWrite(Pool< TValue, TSpec > &me) {
+		    return me.endWrite();
+        }
+
+///.Function.atEnd.param.iterator.type:Class.Pool
+
+		template < typename TValue, typename TSpec >
+	    inline bool eof(Pool< TValue, TSpec > &me) {
+SEQAN_CHECKPOINT
+            return control(me, ControlEof());
+        }
+
+		template < typename TValue, typename TSpec >
+	    inline bool beginRead(Pool< TValue, TSpec > &me) {
+SEQAN_CHECKPOINT
+            return control(me, ControlBeginRead());
+        }
+
+		template < typename TValue, typename TSpec >
+	    inline bool endRead(Pool< TValue, TSpec > &me) {
+SEQAN_CHECKPOINT
+            return control(me, ControlEndRead());
+        }
+
+	//}
+
+    // pipe/pool -> pool
+    template < typename TValue,
+               typename TSpec,
+               typename TSource >
+    inline bool append(Pool<TValue, TSpec> &dest, TSource &src) {
+        typename Size<TSource>::Type leftToRead = length(src);
+        if (!beginRead(src)) return false;
+        while (leftToRead) {
+            push(dest, *src);
+            ++src;
+            --leftToRead;
+        }
+        endRead(src);
+        return true;
+    }
+
+    // string -> pool
+    template < typename TValue,
+               typename TSpec,
+               typename TStringSpec >
+    inline bool append(Pool<TValue, TSpec> &dest, String<TValue, TStringSpec> &src) {
+        typedef typename Iterator< String<TValue, TStringSpec> const, Standard >::Type TIter;
+        TIter _cur = begin(src, Standard());
+		TIter _end = end(src, Standard());
+        while (_cur != _end) {
+            push(dest, *_cur);
+            ++_cur;
+        }
+        return true;
+    }
+
+///.Function.assign.param.target.type:Class.Pool
+
+    template < typename TValue,
+               typename TSpec,
+               typename TSource >
+    inline bool assign(Pool<TValue, TSpec> &dest, TSource &src) {
+        typename Size<TSource>::Type _size = length(src);
+        resize(dest, _size);
+        return beginWrite(dest) && append(dest, src) && endWrite(dest);
+    }
+
+    template < typename TValue,
+               typename TSpec,
+               typename TSource >
+    inline bool operator<<(Pool<TValue, TSpec> &dest, TSource &src) {
+        return assign(dest, src);
+    }
+
+
+
+///.Function.assign.param.source.type:Class.Pool
+
+    // pool -> string
+    template < typename TValue1,
+			   typename TStringSpec,
+			   typename TValue2,
+			   typename TSpec >
+    inline bool assign(String<TValue1, TStringSpec> &dest, Pool<TValue2, TSpec> &src) {
+        typedef typename Iterator< String<TValue1, TStringSpec>, Standard >::Type TIter;
+        typename Size< String<TValue1, TStringSpec> >::Type _size = length(src);
+        resize(dest, _size);
+        if (!beginRead(src)) return false;
+        TIter _cur = begin(dest, Standard());
+		TIter _end = end(dest, Standard());
+        while (_cur != _end) {
+            *_cur = *src;
+            ++_cur;
+            ++src;
+        }
+        endRead(src);
+        return true;
+    }
+
+    template < typename TValue1,
+			   typename TStringSpec,
+			   typename TValue2,
+			   typename TSpec >
+    inline bool operator<<(String<TValue1, TStringSpec> &dest, Pool<TValue2, TSpec> &src) {
+        return assign(dest, src);
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pool_mapper.h b/src/SeqAn-1.3/seqan/pipe/pool_mapper.h
new file mode 100644
index 0000000..fe540d6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pool_mapper.h
@@ -0,0 +1,697 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_POOL_MAPPER_H
+#define SEQAN_HEADER_POOL_MAPPER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+    // external synchronous permutation mapping
+
+/**
+.Spec.MapperConfigSize:
+..cat:Pipelining
+..general:Spec.MapperSpec
+..summary:Configuration of Mapper.
+..signature:MapperConfigSize<TMap, TSize, TFile>
+..param.TMap:The destination function (see STL's $unary_function$).
+...remarks:This functions maps a stream element to its destined position. The result type of this unary function should convertible to $TSize$.
+...note:The destination function must be bijective.
+..param.TSize:The Mapper's size type.
+..param.TFile:The underlying @Class.File@ type.
+...default:$File<>$, see @Class.File at .
+..see:Spec.MapperConfig
+..include:seqan/pipe.h
+*/
+
+    template < typename TMap,
+		       typename TSize,
+		       typename TFile = File<> >						// default file type
+    struct MapperConfigSize {
+        typedef TMap        Map;
+		typedef TSize		SizeType;
+        typedef TFile       File;
+    };
+
+/**
+.Spec.MapperConfig:
+..cat:Pipelining
+..general:Spec.MapperSpec
+..summary:Configuration of Mapper.
+..signature:MapperConfig<TMap, TFile>
+..param.TMap:The destination function (see STL's $unary_function$).
+...remarks:This functions maps a stream element to its destined position. The result type of this unary function should convertible to $TSize$.
+...note:The destination function must be bijective.
+..param.TFile:The underlying @Class.File@ type.
+...default:$File<>$, see @Class.File at .
+..remarks:Using this configuration spec., the Mapper's size type is $Size<TFile>::Type$. To use a custom size type @Spec.MapperConfigSize@ should be used.
+..see:Spec.MapperConfigSize
+..include:seqan/pipe.h
+*/
+
+    template < typename TMap,
+		       typename TFile = File<> >
+    struct MapperConfig {
+        typedef TMap						Map;
+		typedef typename Size<TFile>::Type	SizeType;
+        typedef TFile						File;
+    };
+
+/**
+.Spec.MapperSpec:
+..cat:Pipelining
+..general:Class.Pool
+..summary:Permutes all elements using a custom destination function.
+..signature:Pool<TValue, MapperSpec<TConfig> >
+..param.TValue:The value type, that is the type of the stream elements.
+..param.TConfig:Configuration Spec. Defines destination function, size type, and file type.
+...type:Spec.MapperConfig
+...type:Spec.MapperConfigSize
+..remarks:The Pool's input/output type is $TValue$ and the size type is determined by the $TConfig$.
+..include:seqan/pipe.h
+*/
+
+    template < typename TConfig >
+    struct MapperSpec {
+        typedef TConfig Config;
+    };
+
+    template < typename TValue,
+			   typename TConfig >
+    struct HandlerArgs< Pool< TValue, MapperSpec<TConfig> > >
+    {
+        typedef typename TConfig::Map Type;
+    };
+
+    struct ReadMapperSpec_;
+	typedef Tag<ReadMapperSpec_> ReadMapperSpec;
+
+/*
+    // mapping phase 2
+    template < typename TValue,
+			   typename TConfig >
+    inline SimpleBuffer< TValue > & processBuffer(
+        PageFrame< TValue, typename TConfig::File, Dynamic<> > &buf,
+        BufferHandler< Pool< TValue, MapperSpec<TConfig> >, ReadFileSpec > &_me)
+    {
+		typedef BufferHandler< Pool< TValue, MapperSpec<TConfig> >, ReadMapperSpec > Handler;
+        Handler *me = static_cast<Handler*>(&_me);
+        
+        typename Size< Pool< TValue, MapperSpec<TConfig> > >::Type offset = buf.pageNo;
+	    offset *= (unsigned)pageSize(buf);
+
+		typename TConfig::Map M = me->pool.handlerArgs;
+        for(TValue *cur = buf.begin; cur != buf.end; ++cur) {
+            #ifdef SEQAN_DEBUG
+                if (!(M(*cur) >= offset && M(*cur) < offset + pageSize(buf))) {
+					::std::cerr << "Mapper assertion failed: " << ::std::hex << M(*cur);
+					::std::cerr << " not in [" << offset << "," << (offset + pageSize(buf)) << ") at " << (cur - buf.begin);
+                    ::std::cerr << " element is " << ::std::dec << *cur << ::std::endl;
+                }
+            #endif
+            SEQAN_ASSERT(M(*cur) >= offset && M(*cur) < offset + pageSize(buf));
+            me->mapBuffer[M(*cur) - offset] = *cur;
+        }
+		resize(me->mapBuffer, size(buf));
+        return me->mapBuffer;
+    }
+*/
+
+    // mapping phase 2 (in-place)
+    template < typename TValue,
+			   typename TConfig >
+    inline SimpleBuffer< TValue > & processBuffer(
+        PageFrame< TValue, typename TConfig::File, Dynamic<> > &buf,
+        BufferHandler< Pool< TValue, MapperSpec<TConfig> >, ReadFileSpec > &me)
+    {
+        typedef typename Size< Pool< TValue, MapperSpec<TConfig> > >::Type TSize;
+
+		TSize undefinedPos = 0;
+		TSize offset = buf.pageNo;
+		TSize dstPos;
+	    offset *= (unsigned)pageSize(buf);
+
+		typename TConfig::Map M = me.pool.handlerArgs;
+		bool partiallyFilled = me.pool._partiallyFilled;
+
+		if (partiallyFilled)
+			undefinedPos = M(me.pool.undefinedValue);
+
+		for(TValue *cur = buf.begin; cur != buf.end; ++cur) {
+
+			dstPos = M(*cur);
+
+			if (partiallyFilled && dstPos == undefinedPos) 
+				continue;							// don't move undefined values
+
+			#ifdef SEQAN_DEBUG
+                if (!(dstPos >= offset && dstPos < offset + (TSize)pageSize(buf))) {
+					::std::cerr << "Mapper assertion failed: " << ::std::hex << dstPos;
+					::std::cerr << " not in [" << offset << "," << (offset + pageSize(buf)) << ") at " << (cur - buf.begin);
+                    ::std::cerr << " element is " << ::std::dec << *cur << ::std::endl;
+                }
+			#endif
+            SEQAN_ASSERT(dstPos >= offset && dstPos < offset + (TSize)pageSize(buf));
+
+            TValue *I = buf.begin + (dstPos - offset);
+            if (I != cur) {
+				TValue tmp;
+				TValue *refPrev = cur, *refNext = &tmp;
+
+				do {
+					*refNext = *I;
+					*I = *refPrev;
+
+					dstPos = M(*refNext);
+
+					if (partiallyFilled && dstPos == undefinedPos)
+						I = cur;					// move the undefined value to an arbitrary free position (*cur)
+					else 
+					{
+						#ifdef SEQAN_DEBUG
+							if (!(dstPos >= offset && dstPos < offset + (TSize)pageSize(buf))) {
+								::std::cerr << "Mapper assertion failed: " << ::std::hex << dstPos;
+								::std::cerr << " not in [" << offset << "," << (offset + pageSize(buf)) << ") at " << (refNext - buf.begin);
+								::std::cerr << " element is " << ::std::dec << *refNext << ::std::endl;
+							}
+							TValue *oldI = I;
+						#endif
+						SEQAN_ASSERT(dstPos >= offset && dstPos < offset + (TSize)pageSize(buf));
+
+						I = buf.begin + (dstPos - offset);
+
+						#ifdef SEQAN_DEBUG
+							if (!partiallyFilled && I < cur) {
+								::std::cerr << "Mapper assertion failed: I=" << ::std::hex << I;
+								::std::cerr << " < cur=" << cur << ::std::dec << ::std::endl;
+								break;
+							}
+							if (I == oldI) {
+								::std::cerr << "Mapper assertion failed: I=" << ::std::hex << I;
+								::std::cerr << " in endless loop" << ::std::dec << ::std::endl;
+								break;
+							}
+						#endif
+					}
+
+					TValue *_swap = refNext;
+					refNext = refPrev;
+					refPrev = _swap;
+				} while (I != cur);
+
+				if (refPrev != cur)
+					*cur = *refPrev;
+            }
+        }
+        return buf;
+    }
+
+/*
+    // inherits buffered file reader and uses a map buffer
+    template < typename TPool >
+    struct BufferHandler< TPool, ReadMapperSpec >: public BufferHandler< TPool, ReadFileSpec > 
+    {
+        typedef BufferHandler< TPool, ReadFileSpec >    Base;
+        typedef typename Base::Type                     Type;
+        typedef typename Base::Buffer					Buffer;
+
+        Buffer	mapBuffer;
+
+        BufferHandler(TPool &_pool):
+            Base(_pool)
+        {
+            allocPage(mapBuffer, _pool.pageSize, *this);
+        }
+
+        BufferHandler(TPool &_pool, unsigned _requestedBufferSize, unsigned _readAheadBuffers = 1):
+            Base(_pool, _requestedBufferSize, _readAheadBuffers)
+        {
+            allocPage(mapBuffer, alignSize(_min((_pool.size(), _requestedBufferSize), _pool.pageSize), *this);
+        }
+
+        ~BufferHandler()
+        {
+            freePage(mapBuffer, *this);
+        }
+    };
+*/
+
+    //////////////////////////////////////////////////////////////////////////////
+	// generic adapter for buffered memory writers
+    struct MapperMemAdapter;
+
+	template < typename TBufferHandler >
+	struct Handler< TBufferHandler, MapperMemAdapter >
+    {
+		typedef typename TBufferHandler::Pool	Pool;
+        typedef typename TBufferHandler::Type   Type;
+        typedef typename TBufferHandler::Buffer	Buffer;
+
+		Pool			&pool;
+        TBufferHandler  handler;
+        Buffer			buffer;
+
+        template < typename TPool >
+        Handler(TPool &_pool):
+			pool(_pool),
+            handler(_pool) { }
+
+        inline bool begin() {
+            buffer = handler.first();
+            return buffer.begin != NULL;
+        }
+
+        inline void push(Type const & Val_) {
+            buffer[pool.handlerArgs(Val_)] = Val_;
+        }
+
+        inline void end() {
+            handler.end();
+        }
+
+		inline bool eof() { return false; }
+		inline void process() {}
+    };
+
+
+
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// cache bucket based synchronous write handler
+    struct MapperSyncWriter;
+
+	template < typename TPool >
+	struct Handler< TPool, MapperSyncWriter >
+    {
+        typedef typename TPool::Type		Type;
+        typedef typename TPool::Buffer		Buffer;
+        typedef PageBucket<Type>            TPageBucket;
+        typedef ::std::vector<TPageBucket>	Cache;
+
+        TPool   &pool;
+        Buffer	bucketBuffer;
+        Cache   cache;
+
+        Handler(TPool &_pool):
+            pool(_pool) { }
+
+        ~Handler() {
+            cancel();
+        }
+        
+		struct insertBucket : public ::std::unary_function<TPageBucket,void> {
+			Handler &me;
+			insertBucket(Handler &_me): me(_me) {}
+
+			inline void operator() (TPageBucket const &cb) const {
+                me.cache.push_back(cb);
+			}
+		};
+
+        bool begin() {
+    		cache.reserve(pool.pages);
+            return equiDistantDistribution(
+                bucketBuffer, pool.bucketBufferSize, *this,
+                pool._size, pool.pageSize,
+                insertBucket(*this));
+        }
+
+        inline void push(Type const &item) {
+			unsigned pageNo = pool.handlerArgs(item) / pool.pageSize;
+            #ifdef SEQAN_DEBUG
+                if (!(pageNo < cache.size())) {
+					::std::cerr << "Mapper push assertion failed: " << pageNo << " >= " << cache.size();
+                    ::std::cerr << " element is " << item << ::std::endl;
+                }
+			#endif
+    		SEQAN_ASSERT(pageNo < cache.size());
+			TPageBucket &cb = cache[pageNo];
+
+			*cb.cur = item;
+			if (++cb.cur == cb.end)
+				writeBucket(cb, pageNo, pool.pageSize, pool.file);
+        }
+
+        inline void end() {
+            // flush all cache buckets to disk and compact cache
+			pool._partiallyFilled = false;
+			unsigned pageNo = 0;
+			unsigned curOfs, endOfs;
+			for(typename Cache::iterator cb = cache.begin(); cb != cache.end(); ++cb, ++pageNo) {
+				curOfs = cb->pageOfs + (cb->cur - cb->begin);
+				endOfs = pool.dataSize(pageNo);
+				if (curOfs < endOfs) {
+					// this page is partially filled and needs to be filled up with undefined entries
+					for(unsigned i = curOfs; i < endOfs; ++i) {
+						*cb.cur = pool.undefinedValue;
+						if (++cb.cur == cb.end)
+							writeBucket(cb, pageNo, pool.pageSize, pool.file);
+					}
+					pool._partiallyFilled = true;
+				}
+				writeBucket(*cb, pageNo, pool.pageSize, pool.file);
+			}
+			flush(pool.file);
+            cancel();
+        }
+
+        inline void cancel() {
+            cache.clear();
+			cache.reserve(0);
+            freePage(bucketBuffer, *this);
+        }
+        
+		inline bool eof() { return false; }
+        inline void process() {}
+	};
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// cache bucket based synchronous write handler
+    struct MapperAsyncWriter;
+
+	template < typename TPool >
+	struct Handler< TPool, MapperAsyncWriter >
+    {
+        typedef typename TPool::Type                Type;
+        typedef typename TPool::File                File;
+
+        typedef SimpleBuffer<Type>					Buffer;
+        typedef PageFrame<Type, File, Dynamic<> >   TPageFrame;
+        typedef PageBucket<Type>                    TPageBucket;
+        typedef ::std::vector<TPageBucket>	        Cache;
+        typedef PageChain<TPageFrame>	            TPageChain;
+
+        TPool       &pool;
+        Buffer		bucketBuffer;
+        TPageChain	chain;
+        Buffer		writeCache;
+        Cache       cache;
+        unsigned    clusterSize;
+
+        Handler(TPool &_pool):
+            pool(_pool),
+            chain(_pool.writeBackBuckets) {}
+
+        Handler(TPool &_pool, unsigned _writeBackBuckets):
+            pool(_pool),
+            chain(_writeBackBuckets) {}
+
+        ~Handler() {
+            cancel();
+        }
+        
+		struct insertBucket : public ::std::unary_function<TPageBucket,void> {
+			Handler &me;
+			insertBucket(Handler &_me): me(_me) {}
+
+			inline void operator() (TPageBucket const &cb) const {
+                me.cache.push_back(cb);
+			}
+		};
+
+        bool begin() {
+    		cache.reserve(pool.pages());
+            clusterSize = equiDistantAlignedDistribution(
+                bucketBuffer, sectorSize(pool.file), pool.bucketBufferSize, pool.file,
+                pool._size, pool.pageSize,
+                insertBucket(*this));
+
+			if (clusterSize == 0) {
+				clusterSize = UINT_MAX;
+				#ifdef SEQAN_DEBUG
+					::std::cerr << "mapper switched to synchronous mode" << ::std::endl;
+				#endif
+				return equiDistantDistribution(
+					bucketBuffer, pool.bucketBufferSize, pool.file,
+					pool._size, pool.pageSize,
+					insertBucket(*this));
+			}
+
+			#ifdef SEQAN_VERBOSE
+				::std::cerr << "async mapper clustersize " << clusterSize << ::std::endl;
+			#endif
+            allocPage(writeCache, chain.maxFrames * clusterSize, pool.file);
+
+            // distribute write back buffers
+            Type *cur = writeCache.begin;
+            TPageFrame *p = chain.first;
+            while (p) {
+                p->begin = cur; cur += clusterSize;
+                p->end = cur;
+                setPageSize(*p, pool.pageSize);
+                p = p->next;
+            }
+            return true;
+        }
+
+        inline void push(Type const &item) {
+			unsigned pageNo = pool.handlerArgs(item) / pool.pageSize;
+            #ifdef SEQAN_DEBUG
+                if (!(pageNo < cache.size())) {
+					::std::cerr << "Mapper push assertion failed: " << pageNo << " >= " << cache.size();
+                    ::std::cerr << " element is " << item << ::std::endl;
+					::std::cerr << ::std::hex << pool.handlerArgs(item) << " / " << pool.pageSize;
+					::std::cerr << " = " << pageNo << ::std::dec << ::std::endl;
+                }
+			#endif
+            SEQAN_ASSERT(pageNo < cache.size());
+			TPageBucket &cb = cache[pageNo];
+
+			*cb.cur = item;
+			if (++cb.cur == cb.end)
+				_writeBucket(cb, pageNo);
+        }
+
+        inline void end() {
+            // flush all cache buckets to disk and compact cache
+			pool._partiallyFilled = false;
+			unsigned pageNo = 0;
+			unsigned curOfs, endOfs;
+			for(typename Cache::iterator cb = cache.begin(); cb != cache.end(); ++cb, ++pageNo) {
+				curOfs = cb->pageOfs + (cb->cur - cb->begin);
+				endOfs = pool.dataSize(pageNo);
+				if (curOfs < endOfs) {
+					// this page is partially filled and needs to be filled up with undefined entries
+					for(unsigned i = curOfs; i < endOfs; ++i) {
+						*cb->cur = pool.undefinedValue;
+						if (++cb->cur == cb->end)
+							_writeBucket(*cb, pageNo);
+					}
+					pool._partiallyFilled = true;
+				} else
+					_writeBucket(*cb, pageNo);
+			}
+            chain.waitForAll();
+			flush(pool.file);
+            cancel();
+        }
+
+        inline void cancel() {
+            chain.cancelAll(pool.file);
+            cache.clear();
+			cache.reserve(0);
+            freePage(writeCache, pool.file);
+            freePage(bucketBuffer, pool.file);
+        }
+        
+		inline bool eof() { return false; }
+        inline void process() {}
+
+    protected:
+
+        inline void _swap(TPageFrame &pf, TPageBucket &pb) {
+            Type *tmp = pf.begin;
+            pf.begin = pb.begin;
+            pf.end   = pb.cur;
+
+            pb.begin = tmp;
+            pb.cur   = tmp;
+            pb.end   = tmp + clusterSize;
+        }
+
+        bool _writeBucket(TPageBucket &cb, unsigned pageNo) {
+            if ((unsigned)(cb.cur - cb.begin) != clusterSize)
+                return writeBucket(cb, pageNo, pool.pageSize, pool.file);
+
+            TPageFrame *pf = chain.getReadyPage();
+            _swap(*pf, cb);
+            pf->pageNo = pageNo;
+            return writeBucket(*pf, cb.pageOfs, pool.file);
+        }
+	};
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// character and buffer based handler definitions
+	template < typename TValue,
+			   typename TConfig >
+    struct BufReadHandler< Pool< TValue, MapperSpec<TConfig> > >
+    {
+        typedef BufferHandler< Bundle2<
+			BufferHandler< Pool< TValue, MapperSpec<TConfig> >, MemorySpec >,
+//			BufferHandler< Pool< TValue, MapperSpec<TConfig> >, ReadMapperSpec >
+			BufferHandler< Pool< TValue, MapperSpec<TConfig> >, ReadFileSpec >
+		>, MultiplexSpec > Type;
+    };
+
+    template < typename TValue,
+			   typename TConfig >
+    struct WriteHandler< Pool< TValue, MapperSpec<TConfig> > >
+    {
+        typedef Handler< Bundle2<
+			Handler< BufferHandler < Pool< TValue, MapperSpec<TConfig> >, MemorySpec >, MapperMemAdapter >,
+			Handler< Pool< TValue, MapperSpec<TConfig> >, MapperSyncWriter >
+		>, MultiplexSpec > Type;
+	};
+
+
+	// use async MapperHandler for all async files classes
+
+    template < typename TValue,
+   	           typename TMap,
+		       typename TSize,
+			   typename TSpec >
+    struct WriteHandler< Pool< TValue, MapperSpec< MapperConfigSize< TMap, TSize, File<Async<TSpec> > > > > >
+    {
+        typedef Handler< Bundle2<
+			Handler< BufferHandler	< Pool< TValue, MapperSpec<MapperConfigSize< TMap, TSize, File<Async<TSpec> > > > >, MemorySpec >, MapperMemAdapter >,
+			Handler< Pool< TValue, MapperSpec<MapperConfigSize< TMap, TSize, File<Async<TSpec> > > > >, MapperAsyncWriter >
+		>, MultiplexSpec > Type;
+	};
+
+    template < typename TValue,
+   	           typename TMap,
+			   typename TSpec >
+    struct WriteHandler< Pool< TValue, MapperSpec< MapperConfig< TMap, File<Async<TSpec> > > > > >
+    {
+        typedef Handler< Bundle2<
+			Handler< BufferHandler < Pool< TValue, MapperSpec<MapperConfig< TMap, File<Async<TSpec> > > > >, MemorySpec >, MapperMemAdapter >,
+			Handler< Pool< TValue, MapperSpec<MapperConfig< TMap, File<Async<TSpec> > > > >, MapperAsyncWriter >
+		>, MultiplexSpec > Type;
+	};
+
+
+	// async file arrays
+
+    template < typename TValue,
+   	           typename TMap,
+		       typename TSize,
+			   __int64  FileSize_,
+			   typename TSpec >
+    struct WriteHandler< Pool< TValue, MapperSpec< MapperConfigSize< TMap, TSize, File< Chained<FileSize_, File< Async<TSpec> > > > > > > >
+    {
+        typedef Handler< Bundle2<
+			Handler< BufferHandler	< Pool< TValue, MapperSpec<MapperConfigSize< TMap, TSize, File< Chained<FileSize_, File< Async<TSpec> > > > > > >, MemorySpec >, MapperMemAdapter >,
+			Handler< Pool< TValue, MapperSpec<MapperConfigSize< TMap, TSize, File< Chained<FileSize_, File< Async<TSpec> > > > > > >, MapperAsyncWriter >
+		>, MultiplexSpec > Type;
+	};
+
+    template < typename TValue,
+   	           typename TMap,
+			   __int64  FileSize_,
+			   typename TSpec >
+    struct WriteHandler< Pool< TValue, MapperSpec< MapperConfig< TMap, File< Chained< FileSize_, File< Async<TSpec> > > > > > > >
+    {
+        typedef Handler< Bundle2<
+			Handler< BufferHandler < Pool< TValue, MapperSpec<MapperConfig< TMap, File< Chained<FileSize_, File< Async<TSpec> > > > > > >, MemorySpec >, MapperMemAdapter >,
+			Handler< Pool< TValue, MapperSpec<MapperConfig< TMap, File< Chained<FileSize_, File< Async<TSpec> > > > > > >, MapperAsyncWriter >
+		>, MultiplexSpec > Type;
+	};
+
+    template < typename TValue,
+   	           typename TMap,
+		       typename TSize,
+			   unsigned FileCount_,
+			   typename TSpec >
+    struct WriteHandler< Pool< TValue, MapperSpec< MapperConfigSize< TMap, TSize, File< Striped<FileCount_, File< Async<TSpec> > > > > > > >
+    {
+        typedef Handler< Bundle2<
+			Handler< BufferHandler	< Pool< TValue, MapperSpec<MapperConfigSize< TMap, TSize, File< Striped<FileCount_, File< Async<TSpec> > > > > > >, MemorySpec >, MapperMemAdapter >,
+			Handler< Pool< TValue, MapperSpec<MapperConfigSize< TMap, TSize, File< Striped<FileCount_, File< Async<TSpec> > > > > > >, MapperAsyncWriter >
+		>, MultiplexSpec > Type;
+	};
+
+    template < typename TValue,
+   	           typename TMap,
+			   unsigned FileCount_,
+			   typename TSpec >
+    struct WriteHandler< Pool< TValue, MapperSpec< MapperConfig< TMap, File< Striped<FileCount_, File< Async<TSpec> > > > > > > >
+    {
+        typedef Handler< Bundle2<
+			Handler< BufferHandler < Pool< TValue, MapperSpec<MapperConfig< TMap, File< Striped<FileCount_, File< Async<TSpec> > > > > > >, MemorySpec >, MapperMemAdapter >,
+			Handler< Pool< TValue, MapperSpec<MapperConfig< TMap, File< Striped<FileCount_, File< Async<TSpec> > > > > > >, MapperAsyncWriter >
+		>, MultiplexSpec > Type;
+	};
+
+
+/*
+    // WARNING:
+    // Using template based polymorphy with oop inheritance causes
+    // funny side effects, i.e. the VS compiler can't find the right
+    // global template function/structure implicitly. And instead
+	// of redefining every Pool structure for Mapper/Sorter/Pool
+	// we now only use Pool and rename it to Pool
+
+
+    template < typename TValue,
+               typename TMap,
+			   typename TFile = File<> >
+    struct Mapper: public Pool< TValue, MapperSpec< MapperConfig<TMap, TFile> > >
+    {
+        typedef Pool< TValue, MapperSpec< MapperConfig<TMap, TFile> > > Base;
+
+        typedef TValue	                    Type;
+        typedef TFile                       File;
+        typedef typename Size<TFile>::Type  SizeType;
+
+        Mapper(TMap const & M)
+        {
+            Base::handlerArgs = M;
+        }
+
+        template < typename TInput, typename TSpec >
+        Mapper(Pipe<TInput, TSpec> &src, TMap const & M):
+            Base(src)
+        {
+            Base::handlerArgs = M;
+        }
+
+    };
+*/
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/pipe/pool_sorter.h b/src/SeqAn-1.3/seqan/pipe/pool_sorter.h
new file mode 100644
index 0000000..63ccd38
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/pipe/pool_sorter.h
@@ -0,0 +1,479 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_POOL_SORTER_H
+#define SEQAN_HEADER_POOL_SORTER_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+    template < typename TValue, typename Compare >
+    struct MergeStreamComparer : public ::std::binary_function < PageBucket<TValue>,
+														       PageBucket<TValue>,
+														       bool>
+    {
+        Compare C;
+        MergeStreamComparer(Compare &tmpC): C(tmpC) { }
+        inline bool operator()(const PageBucket<TValue> &a,
+			                   const PageBucket<TValue> &b) const {
+            return C(static_cast<const TValue&>(*(a.cur)),
+                     static_cast<const TValue&>(*(b.cur))) > 0;
+        }
+    };
+
+    template < typename TCompare >
+	struct AdaptorCompare2Less : 
+		public ::std::binary_function <
+			typename TCompare::first_argument_type, 
+			typename TCompare::second_argument_type, 
+			bool >
+    {
+        TCompare C;
+        AdaptorCompare2Less(TCompare &tmpC): C(tmpC) { }
+        inline bool operator() (
+			typename TCompare::first_argument_type const &a, 
+			typename TCompare::second_argument_type const &b) const 
+		{
+            return C(a, b) < 0;
+        }
+    };
+
+/**
+.Spec.SorterConfigSize:
+..cat:Pipelining
+..general:Spec.SorterSpec
+..summary:Configuration of Sorter.
+..signature:SorterConfigSize<TCompare, TSize, TFile>
+..param.TCompare:The compare function (see STL's $binary_function$).
+...remarks:Let $comp$ be an object of type $TCompare$. $comp(a,b)$ should return a value less, equal, or greater than $0$ if $a<b$, $a==b$, or $a>b$.
+..param.TSize:The Sorter's size type.
+..param.TFile:The underlying @Class.File@ type.
+...default:$File<>$, see @Class.File at .
+..see:Spec.SorterConfig
+..include:seqan/pipe.h
+*/
+
+	template < typename TCompare,
+		       typename TSize,
+			   typename TFile = File<> >
+    struct SorterConfigSize {
+        typedef TCompare	Compare;
+		typedef TSize		SizeType;
+        typedef TFile		File;
+    };
+
+
+
+/**
+.Spec.SorterConfig:
+..cat:Pipelining
+..general:Spec.SorterSpec
+..summary:Configuration of Sorter.
+..signature:SorterConfig<TCompare, TFile>
+..param.TCompare:The compare function (see STL's $binary_function$).
+...remarks:Let $comp$ be an object of type $TCompare$. $comp(a,b)$ should return a value less, equal, or greater than $0$ if $a<b$, $a==b$, or $a>b$.
+..param.TFile:The underlying @Class.File@ type.
+...default:$File<>$, see @Class.File at .
+..remarks:Using this configuration spec., the Sorter's size type is $Size<TFile>::Type$. To use a custom size type @Spec.SorterConfigSize@ should be used.
+..see:Spec.SorterConfigSize
+..include:seqan/pipe.h
+*/
+
+    template < typename TCompare, typename TFile = File<> >
+    struct SorterConfig {
+        typedef TCompare					Compare;
+		typedef typename Size<TFile>::Type	SizeType;
+        typedef TFile						File;
+    };
+
+/**
+.Spec.SorterSpec:
+..cat:Pipelining
+..general:Class.Pool
+..summary:Sorts all elements using a custom compare function.
+..signature:Pool<TValue, SorterSpec<TConfig> >
+..param.TValue:The value type, that is the type of the stream elements.
+..param.TConfig:Configuration Spec. Defines compare function, size type, and file type.
+...type:Spec.SorterConfig
+...type:Spec.SorterConfigSize
+..remarks:The Pool's input/output type is $TValue$ and the size type is determined by the $TConfig$.
+...note:If there exists an explicit function mapping input elements to their destined positions in the output stream, @Spec.MapperSpec@ should be preferred.
+..include:seqan/pipe.h
+*/
+
+    template < typename TConfig >
+    struct SorterSpec {
+        typedef TConfig Config;
+    };
+
+    template < typename TValue,
+			   typename TConfig >
+    struct HandlerArgs< Pool< TValue, SorterSpec<TConfig> > >
+    {
+        typedef typename TConfig::Compare Type;
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+	// cache bucket based synchronous multiway merge
+    struct ReadSorterSpec_;
+	typedef Tag<ReadSorterSpec_> ReadSorterSpec;
+
+    template < typename TPool >
+    struct Handler< TPool, ReadSorterSpec >
+    {
+        typedef typename TPool::Type                    Type;
+        typedef typename TPool::Buffer					Buffer;
+        typedef typename TPool::Spec::Config::Compare   Compare;
+        typedef PageBucketExtended<Type>                PageBucket;
+
+        typedef MergeStreamComparer<Type, Compare>      StreamComparer;
+/*        typedef ::std::priority_queue <
+            PageBucket,
+            ::std::vector<PageBucket>,
+            MergeStreamComparer<Type, Compare> >	    PQueue;
+*/
+        typedef PriorityType<
+			PageBucket, 
+			MergeStreamComparer<Type, Compare> >	    PQueue;
+
+		TPool   &pool;
+        Buffer	bucketBuffer;
+        PQueue  pqueue;
+
+        Handler(TPool &_pool):
+            pool(_pool),
+            pqueue(StreamComparer(_pool.handlerArgs)) { }
+
+        ~Handler() {
+            cancel();
+        }
+
+		struct insertBucket : public ::std::unary_function<PageBucket,void> {
+			Handler &me;
+			insertBucket(Handler &_me): me(_me) {}
+
+			inline void operator() (PageBucket &pb) const {
+                pb.pageNo = length(me.pqueue);
+                readBucket(pb, pb.pageNo, me.pool.pageSize, me.pool.dataSize(pb.pageNo), me.pool.file);
+                push(me.pqueue, pb);
+			}
+		};
+
+        bool begin() {
+            // 1. initially fill priority queue
+//    		pqueue.reserve(pool.pages);
+            equiDistantDistribution(
+                bucketBuffer, pool.bucketBufferSize, *this,
+                pool._size, pool.pageSize,
+                insertBucket(*this));
+            return true;
+        }
+
+        inline Type const & front() const {
+			return *(top(pqueue).cur);
+        }
+
+        inline void pop(Type &Ref_) 
+		{
+            PageBucket &pb = top(pqueue);
+			SEQAN_ASSERT_LEQ(pb.cur, pb.end);
+			
+            Ref_ = *pb.cur;
+            if (++pb.cur == pb.end)
+			{
+                // bucket is empty, we have to fetch the next bucket
+				if (!readBucket(pb, pb.pageNo, pool.pageSize, pool.dataSize(pb.pageNo), pool.file)) {
+					::seqan::pop(pqueue);
+					return;
+				}
+			}
+			adjustTop(pqueue);
+        }
+
+        inline void pop() {
+            PageBucket &pb = top(pqueue);
+			SEQAN_ASSERT_LEQ(pb.cur, pb.end);
+
+            if (++pb.cur == pb.end)
+                // bucket is empty, we have to fetch the next bucket
+				if (!readBucket(pb, pb.pageNo, pool.pageSize, pool.dataSize(pb.pageNo), pool.file)) {
+					::seqan::pop(pqueue);
+					return;
+				}
+			adjustTop(pqueue);
+        }
+
+		inline bool eof() const {
+			return empty(pqueue);
+		}
+
+        inline void end() {
+            cancel();
+        }
+        
+        void cancel()
+        {
+            clear(pqueue);
+            freePage(bucketBuffer, *this);
+        }
+
+        inline void process() {}
+
+    };
+
+
+    template < typename TPool >
+    struct BufferHandler< TPool, ReadSorterSpec >
+    {
+        typedef typename TPool::Type                Type;
+        typedef typename TPool::Buffer				Buffer;
+        typedef typename TPool::Spec::Compare       Compare;
+
+        typedef Buffer&								BufferRef;
+		typedef PageBucketExtended<Type>            PageBucket;
+
+        typedef MergeStreamComparer<Type, Compare>  StreamComparer;
+        typedef ::std::priority_queue <
+            PageBucket,
+            ::std::vector<PageBucket>,
+            MergeStreamComparer<Type, Compare> >	PQueue;
+
+        TPool       &pool;
+        unsigned    mergeBufferSize;
+        Buffer	    bucketBuffer, mergeBuffer, tmpBuffer;
+        PQueue	    pqueue;
+
+        BufferHandler(TPool &_pool):
+            pool(_pool),
+            mergeBufferSize(_pool.pageSize),
+            pqueue(StreamComparer(_pool.handlerData.compare)) { }
+
+        BufferHandler(TPool &_pool, unsigned _requestedBufferSize):
+            pool(_pool),
+            mergeBufferSize(_min(_pool.size(), _requestedBufferSize)),
+            pqueue(StreamComparer(_pool.handlerData.compare)) { }
+        
+        ~BufferHandler() {
+            cancel();
+        }
+
+		struct insertBucket : public ::std::unary_function<PageBucket,void> {
+			BufferHandler &me;
+			insertBucket(BufferHandler &_me): me(_me) {}
+
+			inline void operator() (PageBucket &pb) const {
+                pb.pageNo = length(pqueue);
+                readBucket(pb, pb.pageNo, me.pool.pageSize, me.pool.dataSize(pb.pageNo), pool.file);
+                push(pqueue, pb);
+			}
+		};
+
+        inline BufferRef first() {
+            // 1. initially fill priority queue
+//    		pqueue.reserve(pool.pages);
+            equiDistantDistribution(
+                bucketBuffer, pool.bucketBufferSize, *this,
+                pool._size, pool.pageSize,
+                insertBucket(*this));
+			allocPage(mergeBuffer, mergeBufferSize, *this);
+			return merge();
+        }
+
+		inline BufferRef next() {
+			return merge();
+		}
+
+        inline void end() {
+            cancel();
+        }
+        
+        void cancel()
+        {
+            clear(pqueue);
+			freePage(mergeBuffer, *this);
+            freePage(bucketBuffer, *this);
+        }
+
+        inline void process() {}
+
+    private:
+
+        BufferRef merge()
+        {
+            // 2. merge streams into mergeBuffer
+            
+			typename PQueue::size_type pqsize = length(pqueue);
+			if (!pqsize) {
+				resize(tmpBuffer, 0);
+				return tmpBuffer;
+			}
+
+            if (pqsize == 1)
+			{
+                // only one stream left => retrieve what's left in stream es
+                PageBucket &pb = pqueue.top();
+
+                // flush stream
+				if (pb.cur != pb.end) {
+					tmpBuffer.begin = pb.cur;
+					tmpBuffer.end = pb.end;
+					pb.cur = pb.end;
+					if (pb.pageOfs == pool.dataSize(pb.pageNo))
+						pop(pqueue);
+					return tmpBuffer;
+				}
+
+                // read directly from disk
+				pb.begin = mergeBuffer.begin;
+				pb.end = pb.cur = pb.begin + pageSize(mergeBuffer);
+
+				resize(mergeBuffer, readBucket(pb, pb.pageNo, pool.pageSize, pool.dataSize(pb.pageNo)));
+				if (pb.pageOfs == pool.dataSize(pb.pageNo))
+					pop(pqueue);
+			}
+            else
+            {
+                for(Type *cur = mergeBuffer.begin; cur != mergeBuffer.end; ++cur) {
+                    PageBucket &pb = pqueue.top();
+                    *cur = *pb.cur;
+					if (++pb.cur == pb.end) {
+						// bucket is empty, we have to fetch the next bucket
+						if (!readBucket(pb, pb.pageNo, pool.pageSize, pool.dataSize(pb.pageNo), pool.file)) {
+							pop(pqueue);
+							// queue contains only one stream
+							// => we return what we have merged
+							if (--pqsize == 1) {
+								resize(cur - mergeBuffer.begin + 1);
+								return mergeBuffer;
+							}
+						}
+					}
+					adjustTop(pqueue);
+                }
+				resize(mergeBuffer, pageSize(mergeBuffer));
+            }
+            
+            return mergeBuffer;
+        }
+	};
+
+	template < typename TValue,
+			   typename TConfig >
+    inline PageFrame< TValue, typename TConfig::File, Dynamic<> > & processBuffer(
+        PageFrame< TValue, typename TConfig::File, Dynamic<> > &buf,
+        BufferHandler< Pool< TValue, SorterSpec<TConfig> >, WriteFileSpec > &me)
+    {
+      std::sort(buf.begin, buf.end, AdaptorCompare2Less<typename TConfig::Compare>(me.pool.handlerArgs));
+		return buf;
+    }
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// character and buffer based handler definitions
+    template < typename TValue,
+               typename TConfig >
+    inline SimpleBuffer<TValue> & processBuffer(
+        SimpleBuffer< TValue > &buf,
+        BufferHandler< Pool< TValue, SorterSpec<TConfig> >, MemorySpec > &me)
+    {
+      std::sort(buf.begin, buf.end, AdaptorCompare2Less<typename TConfig::Compare>(me.pool.handlerArgs));
+		return buf;
+    }
+
+    template < typename TValue,
+			   typename TConfig >
+    struct BufReadHandler< Pool< TValue, SorterSpec<TConfig> > >
+    {
+        typedef BufferHandler< Bundle2<
+			BufferHandler< Pool< TValue, SorterSpec<TConfig> >, MemorySpec >,
+			BufferHandler< Pool< TValue, SorterSpec<TConfig> >, ReadSorterSpec >
+		>, MultiplexSpec > Type;
+    };
+
+    template < typename TValue,
+			   typename TConfig >
+    struct ReadHandler< Pool< TValue, SorterSpec<TConfig> > >
+    {
+        typedef Handler< Bundle2<
+			Handler< BufferHandler < Pool< TValue, SorterSpec<TConfig> >, MemorySpec >, AdapterSpec >,
+			Handler<				 Pool< TValue, SorterSpec<TConfig> >, ReadSorterSpec >
+		>, MultiplexSpec > Type;
+    };
+
+
+    //template < typename TValue,
+    //           typename TCompare,
+			 //  typename TFile = File<> >
+    //struct Sorter: public Pool< TValue, SorterSpec< SorterConfig<TCompare, TFile> > >
+    //{
+    //    typedef Pool< TValue, SorterSpec< SorterConfig<TCompare, TFile> > > Base;
+
+    //    typedef TValue	                    Type;
+    //    typedef TFile                       File;
+    //    typedef typename Size<TFile>::Type  SizeType;
+
+    //    Sorter(TCompare const & C)
+    //    {
+    //        Base::handlerArgs = C;
+    //    }
+
+    //    template < typename TInput, typename TSpec >
+    //    Sorter(Pipe<TInput, TSpec> &src):
+    //        Base(src) {}
+
+    //    template < typename TInput, typename TSpec >
+    //    Sorter(Pipe<TInput, TSpec> &src, TCompare const & C):
+    //        Base(src)
+    //    {
+    //        Base::handlerArgs = C;
+    //    }
+    //};
+
+ //   template < typename TValue,
+ //              typename TCompare,
+	//		   typename TFile >
+ //   ::std::ostream& operator<<(::std::ostream &out, Sorter<TValue, TCompare, TFile> &p) {
+ //       beginRead(p);
+ //       while (!eof(p)) {
+	//	    out << p.front() << ::std::endl;
+ //           p.pop();
+ //       }
+ //       endRead(p);
+	//	return out;
+	//}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/platform.h b/src/SeqAn-1.3/seqan/platform.h
new file mode 100755
index 0000000..8addced
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/platform.h
@@ -0,0 +1,46 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_PLATFORM_H
+#define SEQAN_PLATFORM_H
+
+#ifdef __MINGW32__
+	#include "platform/platform_mingw.h"
+#elif _MSC_VER
+	#include "platform/platform_windows.h"
+#elif __SUNPRO_C
+	#include "platform/platform_solaris.h"
+#else
+	#include "platform/platform_gcc.h"
+#endif
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/platform/platform_gcc.h b/src/SeqAn-1.3/seqan/platform/platform_gcc.h
new file mode 100644
index 0000000..c99037e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/platform/platform_gcc.h
@@ -0,0 +1,86 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef PLATFORM_GCC
+  #define PLATFORM_GCC
+#endif
+
+// should be set before including anything
+#ifndef _FILE_OFFSET_BITS
+  #define _FILE_OFFSET_BITS 64
+#endif
+
+#ifndef _LARGEFILE_SOURCE
+  #define _LARGEFILE_SOURCE
+#endif
+
+// The symbols SEQAN_IS_64_BIT and SEQAN_IS_32_BIT can be used to check
+// whether we are on a 32 bit or on a 64 bit machine.
+#if defined(__amd64__) || defined(__x86_64__) || defined(__ia64__)
+#define SEQAN_IS_64_BIT 1
+#define SEQAN_IS_32_BIT 0
+#else  // #if defined(__amd64__) || defined(__x86_64__) || defined(__ia64__)
+#define SEQAN_IS_64_BIT 0
+#define SEQAN_IS_32_BIT 1
+#endif  // #if defined(__amd64__) || defined(__x86_64__) || defined(__ia64__)
+
+//#include <unistd.h>
+#include <inttypes.h>
+
+#define finline __inline__
+
+// default 64bit type
+typedef int64_t __int64;
+typedef uint64_t __uint64;
+
+// default 32bit type
+typedef int32_t __int32;
+typedef uint32_t __uint32;
+
+// default 16bit type
+typedef int16_t __int16;
+typedef uint16_t __uint16;
+
+// default 8bit type
+typedef int8_t __int8;
+typedef uint8_t __uint8;
+
+//define SEQAN_SWITCH_USE_FORWARDS to use generated forwards 
+#define SEQAN_SWITCH_USE_FORWARDS
+
+#include "platform_generated_forwards.h"
+
+#ifndef SEQAN_HEADER_PLATFORM_GENERATED_FORWARDS_H
+#error To use the SeqAn library you first have to execute 'make forwards' in the root directory
+#endif
diff --git a/src/SeqAn-1.3/seqan/platform/platform_generated_forwards.h b/src/SeqAn-1.3/seqan/platform/platform_generated_forwards.h
new file mode 100644
index 0000000..e48b62e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/platform/platform_generated_forwards.h
@@ -0,0 +1,55 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_PLATFORM_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_PLATFORM_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/platform/platform_mingw.h b/src/SeqAn-1.3/seqan/platform/platform_mingw.h
new file mode 100644
index 0000000..c644590
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/platform/platform_mingw.h
@@ -0,0 +1,65 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#define PLATFORM_WINDOWS
+#define PLATFORM_WINDOWS_MINGW
+
+#define finline __inline__
+
+// The symbols SEQAN_IS_64_BIT and SEQAN_IS_32_BIT can be used to check
+// whether we are on a 32 bit or on a 64 bit machine.
+#if defined(__amd64__) || defined(__x86_64__) || defined(__ia64__)
+#define SEQAN_IS_64_BIT 1
+#define SEQAN_IS_32_BIT 0
+#else  // #if defined(__amd64__) || defined(__x86_64__) || defined(__ia64__)
+#define SEQAN_IS_64_BIT 0
+#define SEQAN_IS_32_BIT 1
+#endif  // #if defined(__amd64__) || defined(__x86_64__) || defined(__ia64__)
+
+#include <inttypes.h>
+
+// Define unsigned variants of builtin Windows compiler types.
+typedef unsigned __int64 __uint64;
+typedef unsigned __int32 __uint32;
+typedef unsigned __int16 __uint16;
+typedef unsigned __int8 __uint8;
+
+//define SEQAN_SWITCH_USE_FORWARDS to use generated forwards 
+#define SEQAN_SWITCH_USE_FORWARDS
+
+#include "platform_generated_forwards.h"
+
+#ifndef SEQAN_HEADER_PLATFORM_GENERATED_FORWARDS_H
+#error To use the SeqAn library you first have to execute 'make forwards' in the root directory
+#endif
diff --git a/src/SeqAn-1.3/seqan/platform/platform_solaris.h b/src/SeqAn-1.3/seqan/platform/platform_solaris.h
new file mode 100644
index 0000000..c26da44
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/platform/platform_solaris.h
@@ -0,0 +1,58 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef PLATFORM_SUN
+  #define PLATFORM_SUN
+#endif
+
+// should be set before including anything
+#define _FILE_OFFSET_BITS 64
+//#include <unistd.h>
+#include <inttypes.h>
+
+#define finline inline
+
+// default 64bit type
+typedef int64_t __int64;
+typedef uint64_t __uint64;
+
+
+//define SEQAN_SWITCH_USE_FORWARDS t generated forwards 
+#define SEQAN_SWITCH_USE_FORWARDS
+
+#include "platform_generated_forwards.h"
+
+#ifndef SEQAN_HEADER_PLATFORM_GENERATED_FORWARDS_H
+#error To use the SeqAn library you first have to execute 'make forwards' in the root directory
+#endif
diff --git a/src/SeqAn-1.3/seqan/platform/platform_windows.h b/src/SeqAn-1.3/seqan/platform/platform_windows.h
new file mode 100644
index 0000000..6661396
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/platform/platform_windows.h
@@ -0,0 +1,81 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#define PLATFORM_WINDOWS
+#define PLATFORM_WINDOWS_VS
+
+// Disable warning "'function' : resolved overload was found by
+// argument-dependent lookup".  Visual Studio warns because Koenig
+// lookup was introduced in later version and behaviour has changed at some
+// point.
+#pragma warning( disable : 4675 )
+// Disable warning for identifer name truncation.
+#pragma warning( disable : 4503 )
+
+// Disabling warning 4267 assigning variables with different size on 32 and 64 bit.
+#pragma warning( disable : 4267 )
+// Disabling warning 4244, loss of data when values with different domain sizes.
+#pragma warning( disable : 4244 )
+
+#define finline __forceinline
+
+typedef unsigned __int64 __uint64;
+typedef unsigned __int32 __uint32;
+typedef unsigned __int16 __uint16;
+typedef unsigned __int8 __uint8;
+
+// The symbols SEQAN_IS_64_BIT and SEQAN_IS_32_BIT can be used to check
+// whether we are on a 32 bit or on a 64 bit machine.
+#if defined(_WIN64)
+#define SEQAN_IS_64_BIT 1
+#define SEQAN_IS_32_BIT 0
+#else
+#define SEQAN_IS_64_BIT 0
+#define SEQAN_IS_32_BIT 1
+#endif  // #if defined(_WIN64)
+
+// Workaround for missing round() from C99 in Visual Studio.
+template <typename T>
+inline T round(T const & x)
+{
+	return floor(x + 0.5);
+}
+
+// Rename some underscore-functions in Windows.
+#ifndef snprintf
+#define snprintf _snprintf
+#endif  // #ifndef snprintf
+
+//define SEQAN_SWITCH_USE_FORWARDS to use generated forwards 
+//#define SEQAN_SWITCH_USE_FORWARDS
diff --git a/src/SeqAn-1.3/seqan/random.h b/src/SeqAn-1.3/seqan/random.h
new file mode 100644
index 0000000..9f09a73
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random.h
@@ -0,0 +1,70 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Umbrella header for the random module.
+// ==========================================================================
+
+#ifndef SEQAN_RANDOM_H_
+#define SEQAN_RANDOM_H_
+
+//____________________________________________________________________________
+// Prerequisites
+
+#include <cmath>
+#include <cstdlib>
+
+#include <seqan/basic.h>
+#include <seqan/misc/misc_random.h>
+
+//____________________________________________________________________________
+// Module Headers
+
+// Basic Definitions
+#include <seqan/random/random_base.h>
+
+// Random Number Generation
+#include <seqan/random/random_mt19937.h>
+
+// Rng With Special Distributions.
+#include <seqan/random/random_uniform.h>
+#include <seqan/random/random_normal.h>
+#include <seqan/random/random_lognormal.h>  // uses normal.h, uniform.h
+#include <seqan/random/random_geometric.h>
+#include <seqan/random/random_rng_functor.h>
+
+// Functions with randomness.
+#include <seqan/random/random_shuffle.h>
+
+//____________________________________________________________________________
+
+#endif  // SEQAN_RANDOM_H_
diff --git a/src/SeqAn-1.3/seqan/random/ext_MersenneTwister.h b/src/SeqAn-1.3/seqan/random/ext_MersenneTwister.h
new file mode 100755
index 0000000..4bc627b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/ext_MersenneTwister.h
@@ -0,0 +1,468 @@
+// MersenneTwister.h
+// Mersenne Twister random number generator -- a C++ class MTRand
+// Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
+// Richard J. Wagner  v1.1  28 September 2009  wagnerr at umich.edu
+
+// The Mersenne Twister is an algorithm for generating random numbers.  It
+// was designed with consideration of the flaws in various other generators.
+// The period, 2^19937-1, and the order of equidistribution, 623 dimensions,
+// are far greater.  The generator is also fast; it avoids multiplication and
+// division, and it benefits from caches and pipelines.  For more information
+// see the inventors' web page at
+// http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
+
+// Reference
+// M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
+// Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on
+// Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
+
+// Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
+// Copyright (C) 2000 - 2009, Richard J. Wagner
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 
+//   1. Redistributions of source code must retain the above copyright
+//      notice, this list of conditions and the following disclaimer.
+//
+//   2. Redistributions in binary form must reproduce the above copyright
+//      notice, this list of conditions and the following disclaimer in the
+//      documentation and/or other materials provided with the distribution.
+//
+//   3. The names of its contributors may not be used to endorse or promote 
+//      products derived from this software without specific prior written 
+//      permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS And CONTRIBUTORS "AS IS"
+// And ANY EXPRESS Or IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY And FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER Or CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, Or
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS Or SERVICES; LOSS OF USE, DATA, Or PROFITS; Or BUSINESS
+// INTERRUPTION) HOWEVER CAUSED And ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, Or TORT (INCLUDING NEGLIGENCE Or OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN If ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+
+// The original code included the following notice:
+// 
+//     When you use this, send an email to: m-mat at math.sci.hiroshima-u.ac.jp
+//     with an appropriate reference to your work.
+// 
+// It would be nice to CC: wagnerr at umich.edu and Cokus at math.washington.edu
+// when you write.
+
+#ifndef MERSENNETWISTER_H
+#define MERSENNETWISTER_H
+
+namespace seqan {
+namespace ext {
+
+// Not thread safe (unless auto-initialization is avoided and each thread has
+// its own MTRand object)
+
+#include <iostream>
+#include <climits>
+#include <cstdio>
+#include <ctime>
+#include <cmath>
+
+class MTRand {
+// Data
+public:
+	typedef unsigned long uint32;  // unsigned integer type, at least 32 bits
+	
+	enum { N = 624 };       // length of state vector
+	enum { SAVE = N + 1 };  // length of array for save()
+
+protected:
+	enum { M = 397 };  // period parameter
+	
+	uint32 state[N];   // internal state
+	uint32 *pNext;     // next value to get from state
+	int left;          // number of values left before reload needed
+
+// Methods
+public:
+	MTRand( const uint32 oneSeed );  // initialize with a simple uint32
+	MTRand( uint32 *const bigSeed, uint32 const seedLength = N );  // or array
+	MTRand();  // auto-initialize with /dev/urandom or time() and clock()
+	MTRand( const MTRand& o );  // copy
+	
+	// Do NOT use for CRYPTOGRAPHY without securely hashing several returned
+	// values together, otherwise the generator state can be learned after
+	// reading 624 consecutive values.
+	
+	// Access to 32-bit random numbers
+	uint32 randInt();                     // integer in [0,2^32-1]
+	uint32 randInt( const uint32 n );     // integer in [0,n] for n < 2^32
+	double rand();                        // real number in [0,1]
+	double rand( const double n );        // real number in [0,n]
+	double randExc();                     // real number in [0,1)
+	double randExc( const double n );     // real number in [0,n)
+	double randDblExc();                  // real number in (0,1)
+	double randDblExc( const double n );  // real number in (0,n)
+	double operator()();                  // same as rand()
+	
+	// Access to 53-bit random numbers (capacity of IEEE double precision)
+	double rand53();  // real number in [0,1)
+	
+	// Access to nonuniform random number distributions
+	double randNorm( const double mean = 0.0, const double stddev = 1.0 );
+	
+	// Re-seeding functions with same behavior as initializers
+	void seed( const uint32 oneSeed );
+	void seed( uint32 *const bigSeed, const uint32 seedLength = N );
+	void seed();
+	
+	// Saving and loading generator state
+	void save( uint32* saveArray ) const;  // to array of size SAVE
+	void load( uint32 *const loadArray );  // from such array
+	friend std::ostream& operator<<( std::ostream& os, const MTRand& mtrand );
+	friend std::istream& operator>>( std::istream& is, MTRand& mtrand );
+	MTRand& operator=( const MTRand& o );
+
+protected:
+	void initialize( const uint32 oneSeed );
+	void reload();
+	uint32 hiBit( const uint32 u ) const { return u & 0x80000000UL; }
+	uint32 loBit( const uint32 u ) const { return u & 0x00000001UL; }
+	uint32 loBits( const uint32 u ) const { return u & 0x7fffffffUL; }
+	uint32 mixBits( const uint32 u, const uint32 v ) const
+		{ return hiBit(u) | loBits(v); }
+	uint32 magic( const uint32 u ) const
+		{ return loBit(u) ? 0x9908b0dfUL : 0x0UL; }
+	uint32 twist( const uint32 m, const uint32 s0, const uint32 s1 ) const
+		{ return m ^ (mixBits(s0,s1)>>1) ^ magic(s1); }
+	static uint32 hash( time_t t, clock_t c );
+};
+
+// Functions are defined in order of usage to assist inlining
+
+inline MTRand::uint32 MTRand::hash( time_t t, clock_t c )
+{
+	// Get a uint32 from t and c
+	// Better than uint32(x) in case x is floating point in [0,1]
+	// Based on code by Lawrence Kirby (fred at genesis.demon.co.uk)
+	
+	static uint32 differ = 0;  // guarantee time-based seeds will change
+	
+	uint32 h1 = 0;
+	unsigned char *p = (unsigned char *) &t;
+	for( size_t i = 0; i < sizeof(t); ++i )
+	{
+		h1 *= UCHAR_MAX + 2U;
+		h1 += p[i];
+	}
+	uint32 h2 = 0;
+	p = (unsigned char *) &c;
+	for( size_t j = 0; j < sizeof(c); ++j )
+	{
+		h2 *= UCHAR_MAX + 2U;
+		h2 += p[j];
+	}
+	return ( h1 + differ++ ) ^ h2;
+}
+
+inline void MTRand::initialize( const uint32 seed )
+{
+	// Initialize generator state with seed
+	// See Knuth TAOCP Vol 2, 3rd Ed, p.106 for multiplier.
+	// In previous versions, most significant bits (MSBs) of the seed affect
+	// only MSBs of the state array.  Modified 9 Jan 2002 by Makoto Matsumoto.
+	register uint32 *s = state;
+	register uint32 *r = state;
+	register int i = 1;
+	*s++ = seed & 0xffffffffUL;
+	for( ; i < N; ++i )
+	{
+		*s++ = ( 1812433253UL * ( *r ^ (*r >> 30) ) + i ) & 0xffffffffUL;
+		r++;
+	}
+}
+
+inline void MTRand::reload()
+{
+	// Generate N new values in state
+	// Made clearer and faster by Matthew Bellew (matthew.bellew at home.com)
+	static const int MmN = int(M) - int(N);  // in case enums are unsigned
+	register uint32 *p = state;
+	register int i;
+	for( i = N - M; i--; ++p )
+		*p = twist( p[M], p[0], p[1] );
+	for( i = M; --i; ++p )
+		*p = twist( p[MmN], p[0], p[1] );
+	*p = twist( p[MmN], p[0], state[0] );
+	
+	left = N, pNext = state;
+}
+
+inline void MTRand::seed( const uint32 oneSeed )
+{
+	// Seed the generator with a simple uint32
+	initialize(oneSeed);
+	reload();
+}
+
+inline void MTRand::seed( uint32 *const bigSeed, const uint32 seedLength )
+{
+	// Seed the generator with an array of uint32's
+	// There are 2^19937-1 possible initial states.  This function allows
+	// all of those to be accessed by providing at least 19937 bits (with a
+	// default seed length of N = 624 uint32's).  Any bits above the lower 32
+	// in each element are discarded.
+	// Just call seed() if you want to get array from /dev/urandom
+	initialize(19650218UL);
+	register int i = 1;
+	register uint32 j = 0;
+	register int k = ( static_cast<uint32>(N) > seedLength ? static_cast<uint32>(N) : seedLength );
+	for( ; k; --k )
+	{
+		state[i] =
+		state[i] ^ ( (state[i-1] ^ (state[i-1] >> 30)) * 1664525UL );
+		state[i] += ( bigSeed[j] & 0xffffffffUL ) + j;
+		state[i] &= 0xffffffffUL;
+		++i;  ++j;
+		if( i >= N ) { state[0] = state[N-1];  i = 1; }
+		if( j >= seedLength ) j = 0;
+	}
+	for( k = N - 1; k; --k )
+	{
+		state[i] =
+		state[i] ^ ( (state[i-1] ^ (state[i-1] >> 30)) * 1566083941UL );
+		state[i] -= i;
+		state[i] &= 0xffffffffUL;
+		++i;
+		if( i >= N ) { state[0] = state[N-1];  i = 1; }
+	}
+	state[0] = 0x80000000UL;  // MSB is 1, assuring non-zero initial array
+	reload();
+}
+
+inline void MTRand::seed()
+{
+	// Seed the generator with an array from /dev/urandom if available
+	// Otherwise use a hash of time() and clock() values
+	
+	// First try getting an array from /dev/urandom
+	FILE* urandom = fopen( "/dev/urandom", "rb" );
+	if( urandom )
+	{
+		uint32 bigSeed[N];
+		register uint32 *s = bigSeed;
+		register int i = N;
+		register bool success = true;
+		while( success && i-- )
+			success = fread( s++, sizeof(uint32), 1, urandom ) != 0;
+		fclose(urandom);
+		if( success ) { seed( bigSeed, N );  return; }
+	}
+	
+	// Was not successful, so use time() and clock() instead
+	seed( hash( time(NULL), clock() ) );
+}
+
+inline MTRand::MTRand( const uint32 oneSeed )
+	{ seed(oneSeed); }
+
+inline MTRand::MTRand( uint32 *const bigSeed, const uint32 seedLength )
+	{ seed(bigSeed,seedLength); }
+
+inline MTRand::MTRand()
+	{ seed(); }
+
+inline MTRand::MTRand( const MTRand& o )
+{
+	register const uint32 *t = o.state;
+	register uint32 *s = state;
+	register int i = N;
+	for( ; i--; *s++ = *t++ ) {}
+	left = o.left;
+	pNext = &state[N-left];
+}
+
+inline MTRand::uint32 MTRand::randInt()
+{
+	// Pull a 32-bit integer from the generator state
+	// Every other access function simply transforms the numbers extracted here
+	
+	if( left == 0 ) reload();
+	--left;
+	
+	register uint32 s1;
+	s1 = *pNext++;
+	s1 ^= (s1 >> 11);
+	s1 ^= (s1 <<  7) & 0x9d2c5680UL;
+	s1 ^= (s1 << 15) & 0xefc60000UL;
+	return ( s1 ^ (s1 >> 18) );
+}
+
+inline MTRand::uint32 MTRand::randInt( const uint32 n )
+{
+	// Find which bits are used in n
+	// Optimized by Magnus Jonsson (magnus at smartelectronix.com)
+	uint32 used = n;
+	used |= used >> 1;
+	used |= used >> 2;
+	used |= used >> 4;
+	used |= used >> 8;
+	used |= used >> 16;
+	
+	// Draw numbers until one is found in [0,n]
+	uint32 i;
+	do
+		i = randInt() & used;  // toss unused bits to shorten search
+	while( i > n );
+	return i;
+}
+
+inline double MTRand::rand()
+	{ return double(randInt()) * (1.0/4294967295.0); }
+
+inline double MTRand::rand( const double n )
+	{ return rand() * n; }
+
+inline double MTRand::randExc()
+	{ return double(randInt()) * (1.0/4294967296.0); }
+
+inline double MTRand::randExc( const double n )
+	{ return randExc() * n; }
+
+inline double MTRand::randDblExc()
+	{ return ( double(randInt()) + 0.5 ) * (1.0/4294967296.0); }
+
+inline double MTRand::randDblExc( const double n )
+	{ return randDblExc() * n; }
+
+inline double MTRand::rand53()
+{
+	uint32 a = randInt() >> 5, b = randInt() >> 6;
+	return ( a * 67108864.0 + b ) * (1.0/9007199254740992.0);  // by Isaku Wada
+}
+
+inline double MTRand::randNorm( const double mean, const double stddev )
+{
+	// Return a real number from a normal (Gaussian) distribution with given
+	// mean and standard deviation by polar form of Box-Muller transformation
+	double x, y, r;
+	do
+	{
+		x = 2.0 * rand() - 1.0;
+		y = 2.0 * rand() - 1.0;
+		r = x * x + y * y;
+	}
+	while ( r >= 1.0 || r == 0.0 );
+	double s = sqrt( -2.0 * log(r) / r );
+	return mean + x * s * stddev;
+}
+
+inline double MTRand::operator()()
+{
+	return rand();
+}
+
+inline void MTRand::save( uint32* saveArray ) const
+{
+	register const uint32 *s = state;
+	register uint32 *sa = saveArray;
+	register int i = N;
+	for( ; i--; *sa++ = *s++ ) {}
+	*sa = left;
+}
+
+inline void MTRand::load( uint32 *const loadArray )
+{
+	register uint32 *s = state;
+	register uint32 *la = loadArray;
+	register int i = N;
+	for( ; i--; *s++ = *la++ ) {}
+	left = *la;
+	pNext = &state[N-left];
+}
+
+inline std::ostream& operator<<( std::ostream& os, const MTRand& mtrand )
+{
+	register const MTRand::uint32 *s = mtrand.state;
+	register int i = mtrand.N;
+	for( ; i--; os << *s++ << "\t" ) {}
+	return os << mtrand.left;
+}
+
+inline std::istream& operator>>( std::istream& is, MTRand& mtrand )
+{
+	register MTRand::uint32 *s = mtrand.state;
+	register int i = mtrand.N;
+	for( ; i--; is >> *s++ ) {}
+	is >> mtrand.left;
+	mtrand.pNext = &mtrand.state[mtrand.N-mtrand.left];
+	return is;
+}
+
+inline MTRand& MTRand::operator=( const MTRand& o )
+{
+	if( this == &o ) return (*this);
+	register const uint32 *t = o.state;
+	register uint32 *s = state;
+	register int i = N;
+	for( ; i--; *s++ = *t++ ) {}
+	left = o.left;
+	pNext = &state[N-left];
+	return (*this);
+}
+
+}  // namespace ext
+}  // namespace seqan
+
+#endif  // MERSENNETWISTER_H
+
+// Change log:
+//
+// v0.1 - First release on 15 May 2000
+//      - Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
+//      - Translated from C to C++
+//      - Made completely ANSI compliant
+//      - Designed convenient interface for initialization, seeding, and
+//        obtaining numbers in default or user-defined ranges
+//      - Added automatic seeding from /dev/urandom or time() and clock()
+//      - Provided functions for saving and loading generator state
+//
+// v0.2 - Fixed bug which reloaded generator one step too late
+//
+// v0.3 - Switched to clearer, faster reload() code from Matthew Bellew
+//
+// v0.4 - Removed trailing newline in saved generator format to be consistent
+//        with output format of built-in types
+//
+// v0.5 - Improved portability by replacing static const int's with enum's and
+//        clarifying return values in seed(); suggested by Eric Heimburg
+//      - Removed MAXINT constant; use 0xffffffffUL instead
+//
+// v0.6 - Eliminated seed overflow when uint32 is larger than 32 bits
+//      - Changed integer [0,n] generator to give better uniformity
+//
+// v0.7 - Fixed operator precedence ambiguity in reload()
+//      - Added access for real numbers in (0,1) and (0,n)
+//
+// v0.8 - Included time.h header to properly support time_t and clock_t
+//
+// v1.0 - Revised seeding to match 26 Jan 2002 update of Nishimura and Matsumoto
+//      - Allowed for seeding with arrays of any length
+//      - Added access for real numbers in [0,1) with 53-bit resolution
+//      - Added access for real numbers from normal (Gaussian) distributions
+//      - Increased overall speed by optimizing twist()
+//      - Doubled speed of integer [0,n] generation
+//      - Fixed out-of-range number generation on 64-bit machines
+//      - Improved portability by substituting literal constants for long enum's
+//      - Changed license from GNU LGPL to BSD
+//
+// v1.1 - Corrected parameter label in randNorm from "variance" to "stddev"
+//      - Changed randNorm algorithm from basic to polar form for efficiency
+//      - Updated includes from deprecated <xxxx.h> to standard <cxxxx> forms
+//      - Cleaned declarations and definitions to please Intel compiler
+//      - Revised twist() operator to work on ones'-complement machines
+//      - Fixed reload() function to work when N and M are unsigned
+//      - Added copy constructor and copy operator from Salvador Espana
+
diff --git a/src/SeqAn-1.3/seqan/random/random_base.h b/src/SeqAn-1.3/seqan/random/random_base.h
new file mode 100644
index 0000000..7692dd4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/random_base.h
@@ -0,0 +1,155 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Basic definitions for the module random.
+// ==========================================================================
+
+#ifndef SEQAN_RANDOM_RANDOM_BASE_H_
+#define SEQAN_RANDOM_RANDOM_BASE_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Forwards, Tags.
+// ===========================================================================
+
+// Forward to MersenneTwister, really defined in random_mt19937.h.
+struct MersenneTwister;
+
+/**
+.Class.Rng:
+..summary:Random Number Generator
+..signature:Rng<>
+..signature:Rng<TSpec>
+..cat:Random
+..param.TSpec:Random Number Generator specialization.
+...default:@Spec.Mersenne Twister Rng@
+..include:seqan/random.h
+*/
+template <typename TSpec = MersenneTwister>
+class Rng;
+
+/**
+.Class.Pdf:
+..summary:ProbabilityDensityFunction
+..signature:Pdf<TSpec>
+..cat:Random
+..param.TSpec:Specialization.
+..include:seqan/random.h
+*/
+template <typename TSpec>
+class Pdf;
+
+// ===========================================================================
+// Classes
+// ===========================================================================
+
+/**
+.Memfunc.Rng#operator()
+..class:Class.Rng
+..summary:Function call operator.
+..signature:operator()
+*/
+        
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+///.Metafunction.Value.param.T.type:Class.Pdf
+// specification only
+
+///.Metafunction.Value.param.T.type:Class.Rng
+///.Metafunction.MinValue.param.T.type:Class.Rng
+///.Metafunction.MaxValue.param.T.type:Class.Rng
+	
+template <typename TSpec>
+struct MaxValue<Rng<TSpec> >
+{
+    typedef typename Value<Rng<TSpec> >::Type TValue_;
+    static const TValue_ VALUE;
+};
+	
+template <typename TSpec>
+const typename Value<Rng<TSpec> >::Type MaxValue<Rng<TSpec> >::VALUE = MaxValue<typename Value<Rng<TSpec> >::Type>::VALUE;
+
+template <typename TSpec>
+struct MaxValue<Rng<TSpec> const>
+{
+	typedef typename Value<Rng<TSpec> const>::Type TValue_;
+	static const TValue_ VALUE;
+};
+
+template <typename TSpec>
+const typename Value<Rng<TSpec> const>::Type MaxValue<Rng<TSpec> const>::VALUE = MaxValue<typename Value<Rng<TSpec> const>::Type>::VALUE;
+
+template <typename TSpec>
+struct MinValue<Rng<TSpec> >
+{
+	typedef typename Value<Rng<TSpec> >::Type TValue_;
+	static const TValue_ VALUE;
+};
+
+template <typename TSpec>
+const typename Value<Rng<TSpec> >::Type MinValue<Rng<TSpec> >::VALUE = MinValue<typename Value<Rng<TSpec> >::Type>::VALUE;
+
+template <typename TSpec>
+struct MinValue<Rng<TSpec> const>
+{
+	typedef typename Value<Rng<TSpec> const>::Type TValue_;
+	static const TValue_ VALUE;
+};
+
+template <typename TSpec>
+const typename Value<Rng<TSpec> const>::Type MinValue<Rng<TSpec> const>::VALUE = MinValue<typename Value<Rng<TSpec> const>::Type>::VALUE;
+	
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+/**
+.Function.pickRandomNumber
+..summary:Pick a random number using a random number generator object, possibly following the given distribution.
+..cat:Random
+..include:seqan/random.h
+..signature:pickRandomNumber(rng[, pdf])
+..param.rng:Random number generator to use.
+...type:Class.Rng
+..param.pdf:Probability density function to use, if any.
+...type:Class.Pdf
+..returns:Random number as specified in pdf, if any, or rng. For more details refer to the SeqAn Tutorial.
+*/
+// specification only
+
+}  // namespace seqan
+
+#endif  // SEQAN_RANDOM_RANDOM_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/random/random_generated_forwards.h b/src/SeqAn-1.3/seqan/random/random_generated_forwards.h
new file mode 100644
index 0000000..ce81b6e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/random_generated_forwards.h
@@ -0,0 +1,251 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_RANDOM_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_RANDOM_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+namespace ext {
+
+//____________________________________________________________________________
+// MTRand
+
+class MTRand;       	// "projects/library/seqan/random/ext_MersenneTwister.h"(73)
+
+} //namespace ext
+} //namespace seqan
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// GeometricFairCoin
+
+struct GeometricFairCoin;       	// "projects/library/seqan/random/random_geometric.h"(47)
+
+//____________________________________________________________________________
+// LogNormal
+
+struct LogNormal;       	// "projects/library/seqan/random/random_lognormal.h"(50)
+
+//____________________________________________________________________________
+// MeanStdDev
+
+struct MeanStdDev;       	// "projects/library/seqan/random/random_lognormal.h"(71)
+
+//____________________________________________________________________________
+// MersenneTwister
+
+struct MersenneTwister;       	// "projects/library/seqan/random/random_base.h"(47)
+struct MersenneTwister;       	// "projects/library/seqan/random/random_mt19937.h"(49)
+
+//____________________________________________________________________________
+// MuSigma
+
+struct MuSigma;       	// "projects/library/seqan/random/random_lognormal.h"(61)
+
+//____________________________________________________________________________
+// Normal
+
+struct Normal;       	// "projects/library/seqan/random/random_lognormal.h"(47)
+struct Normal;       	// "projects/library/seqan/random/random_normal.h"(47)
+
+//____________________________________________________________________________
+// Pdf
+
+template <typename TSpec> class Pdf;       	// "projects/library/seqan/random/random_base.h"(71)
+
+//____________________________________________________________________________
+// Rng
+
+template <typename TSpec > class Rng;       	// "projects/library/seqan/random/random_base.h"(60)
+
+//____________________________________________________________________________
+// RngFunctor
+
+template <typename TRng, typename TPdf> struct RngFunctor;       	// "projects/library/seqan/random/random_rng_functor.h"(48)
+
+//____________________________________________________________________________
+// Uniform
+
+template <typename T> struct Uniform;       	// "projects/library/seqan/random/random_uniform.h"(48)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+namespace ext {
+
+//____________________________________________________________________________
+// MTRand::MTRand
+
+inline MTRand::MTRand( const uint32 oneSeed );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(269)
+inline MTRand::MTRand( uint32 *const bigSeed, const uint32 seedLength );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(272)
+inline MTRand::MTRand();       	// "projects/library/seqan/random/ext_MersenneTwister.h"(275)
+inline MTRand::MTRand( const MTRand& o );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(278)
+
+//____________________________________________________________________________
+// MTRand::hash
+
+inline MTRand::uint32 MTRand::hash( time_t t, clock_t c );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(146)
+
+//____________________________________________________________________________
+// MTRand::initialize
+
+inline void MTRand::initialize( const uint32 seed );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(171)
+
+//____________________________________________________________________________
+// MTRand::load
+
+inline void MTRand::load( uint32 *const loadArray );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(377)
+
+//____________________________________________________________________________
+// MTRand::operator()
+
+inline double MTRand::operator()();       	// "projects/library/seqan/random/ext_MersenneTwister.h"(363)
+
+//____________________________________________________________________________
+// MTRand::operator=
+
+inline MTRand& MTRand::operator=( const MTRand& o );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(405)
+
+//____________________________________________________________________________
+// MTRand::rand
+
+inline double MTRand::rand();       	// "projects/library/seqan/random/ext_MersenneTwister.h"(323)
+inline double MTRand::rand( const double n );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(326)
+
+//____________________________________________________________________________
+// MTRand::rand53
+
+inline double MTRand::rand53();       	// "projects/library/seqan/random/ext_MersenneTwister.h"(341)
+
+//____________________________________________________________________________
+// MTRand::randDblExc
+
+inline double MTRand::randDblExc();       	// "projects/library/seqan/random/ext_MersenneTwister.h"(335)
+inline double MTRand::randDblExc( const double n );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(338)
+
+//____________________________________________________________________________
+// MTRand::randExc
+
+inline double MTRand::randExc();       	// "projects/library/seqan/random/ext_MersenneTwister.h"(329)
+inline double MTRand::randExc( const double n );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(332)
+
+//____________________________________________________________________________
+// MTRand::randInt
+
+inline MTRand::uint32 MTRand::randInt();       	// "projects/library/seqan/random/ext_MersenneTwister.h"(288)
+inline MTRand::uint32 MTRand::randInt( const uint32 n );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(304)
+
+//____________________________________________________________________________
+// MTRand::randNorm
+
+inline double MTRand::randNorm( const double mean, const double stddev );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(347)
+
+//____________________________________________________________________________
+// MTRand::reload
+
+inline void MTRand::reload();       	// "projects/library/seqan/random/ext_MersenneTwister.h"(188)
+
+//____________________________________________________________________________
+// MTRand::save
+
+inline void MTRand::save( uint32* saveArray ) const;       	// "projects/library/seqan/random/ext_MersenneTwister.h"(368)
+
+//____________________________________________________________________________
+// MTRand::seed
+
+inline void MTRand::seed( const uint32 oneSeed );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(204)
+inline void MTRand::seed( uint32 *const bigSeed, const uint32 seedLength );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(211)
+inline void MTRand::seed();       	// "projects/library/seqan/random/ext_MersenneTwister.h"(246)
+
+//____________________________________________________________________________
+// operator<<
+
+inline std::ostream& operator<<( std::ostream& os, const MTRand& mtrand );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(387)
+
+//____________________________________________________________________________
+// operator>>
+
+inline std::istream& operator>>( std::istream& is, MTRand& mtrand );       	// "projects/library/seqan/random/ext_MersenneTwister.h"(395)
+
+} //namespace ext
+} //namespace seqan
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _pickRandomNumber
+
+template <typename TRNG, typename T> inline typename Value<Pdf<Uniform<T> > >::Type _pickRandomNumber(TRNG & rng, Pdf<Uniform<T> > const & pdf, True const &);       	// "projects/library/seqan/random/random_uniform.h"(111)
+template <typename TRNG, typename T> inline typename Value<Pdf<Uniform<T> > >::Type _pickRandomNumber(TRNG & rng, Pdf<Uniform<T> > const & pdf, False const &);       	// "projects/library/seqan/random/random_uniform.h"(127)
+
+//____________________________________________________________________________
+// pickRandomNumber
+
+template <typename TRandomNumberGenerator> inline typename Value<Pdf<LogNormal> >::Type pickRandomNumber(TRandomNumberGenerator & rng, Pdf<LogNormal> const & pdf);       	// "projects/library/seqan/random/random_lognormal.h"(150)
+template <typename TRng, typename TPdf> inline unsigned pickRandomNumber(Rng<RngFunctor<TRng, TPdf> > & rng);       	// "projects/library/seqan/random/random_rng_functor.h"(119)
+template <typename TRNG, typename T> inline typename Value<Pdf<Uniform<T> > >::Type pickRandomNumber(TRNG & rng, Pdf<Uniform<T> > const & pdf);       	// "projects/library/seqan/random/random_uniform.h"(138)
+template <typename TRNG> inline typename Value<Pdf<Normal> >::Type pickRandomNumber(TRNG & rng, Pdf<Normal> const & pdf);       	// "projects/library/seqan/random/random_normal.h"(109)
+template <typename TRNG> inline typename Value<Pdf<GeometricFairCoin> >::Type pickRandomNumber(TRNG & rng, Pdf<GeometricFairCoin> const & );       	// "projects/library/seqan/random/random_geometric.h"(102)
+inline unsigned pickRandomNumber(Rng<MersenneTwister> & mt);       	// "projects/library/seqan/random/random_mt19937.h"(112)
+
+//____________________________________________________________________________
+// shuffle
+
+template <typename TContainer, typename TRNG> void shuffle(TContainer & container, TRNG & rng);       	// "projects/library/seqan/random/random_shuffle.h"(70)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/random/random_geometric.h b/src/SeqAn-1.3/seqan/random/random_geometric.h
new file mode 100644
index 0000000..35506aa
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/random_geometric.h
@@ -0,0 +1,129 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Code for geometrically distributed random number generation, p=0.5.
+// ==========================================================================
+
+#ifndef SEQAN_RANDOM_RANDOM_GEOMETRIC_H_
+#define SEQAN_RANDOM_RANDOM_GEOMETRIC_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Forwards, Tags.
+// ===========================================================================
+
+// Specialization Tag for geometric distribution.
+struct GeometricFairCoin {};
+
+// ===========================================================================
+// Classes
+// ===========================================================================
+
+/**
+.Spec.Geometric Pdf
+..signature:Pdf<GeometricFairCoin>
+..general:Class.Pdf
+..summary:Geometric probability density function with $p=0.5$.
+
+This can be implemented efficiently not using any floating point arithmetics.
+Just bit operations are needed.
+..cat:Random
+..include:seqan/random.h
+*/
+template <>
+class Pdf<GeometricFairCoin>
+{
+public:
+
+/**
+.Memfunc.Geometric Pdf#Pdf
+..class:Spec.Geometric Pdf
+..summary:Constructor for geometric Pdf.
+..signature:Pdf<Geometric>()
+*/
+    Pdf() { SEQAN_CHECKPOINT; }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <>
+struct Value<Pdf<GeometricFairCoin> >
+{
+    typedef unsigned Type;
+};
+
+template <>
+struct Value<const Pdf<GeometricFairCoin> > : Value<Pdf<GeometricFairCoin> > {};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+/*
+..summary:Pick a geometricly distributed random number.
+*/
+template <typename TRNG>
+inline
+typename Value<Pdf<GeometricFairCoin> >::Type
+pickRandomNumber(TRNG & rng, Pdf<GeometricFairCoin> const & /*pdf*/)
+{
+    SEQAN_CHECKPOINT;
+
+    const int RG_IB1 = 1;
+    const int RG_IB2 = 2;
+    const int RG_IB5 = 16;
+    const int RG_IB18 = 131072;
+    const int RG_MASK = RG_IB1 + RG_IB2 + RG_IB5;
+    
+    typename Value<TRNG>::Type seed = pickRandomNumber(rng);
+    typename Value<Pdf<GeometricFairCoin> >::Type value = 0;
+
+    while (true) {
+        if ((seed & RG_IB18)) {
+            seed = ((seed ^ RG_MASK) << 1) | RG_IB1;
+            ++value;
+        } else {
+            seed <<= 1;
+            break;
+        }
+    }
+
+    return value;
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_RANDOM_RANDOM_GEOMETRIC_H_
diff --git a/src/SeqAn-1.3/seqan/random/random_lognormal.h b/src/SeqAn-1.3/seqan/random/random_lognormal.h
new file mode 100644
index 0000000..e5a678a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/random_lognormal.h
@@ -0,0 +1,157 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Code for log-normally distributed random number generation.
+// ==========================================================================
+
+#ifndef SEQAN_RANDOM_RANDOM_LOGNORMAL_H_
+#define SEQAN_RANDOM_RANDOM_LOGNORMAL_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Forwards, Tags.
+// ===========================================================================
+
+// Forward-declarations.
+struct Normal;
+
+// Specialization Tag for log-normal distribution.
+struct LogNormal {};
+
+/**
+.Tag.MuSigma
+..signature:MuSigma
+..summary:Tag to specify that the given parameters are mu and sigma of the underlying normal distribution for lognormal distributions.
+..cat:Random
+..include:seqan/random.h
+..see:Spec.Log-Normal Pdf
+..see:Tag.MeanStdDev
+*/
+struct MuSigma {};
+/**
+.Tag.MeanStdDev
+..signature:MeanStdDev
+..summary:Tag to specify that the given parameters are mean an standard deviation of the lognormal distribution.
+..cat:Random
+..include:seqan/random.h
+..see:Spec.Log-Normal Pdf
+..see:Tag.MuSigma
+*/
+struct MeanStdDev {};
+
+// ===========================================================================
+// Classes
+// ===========================================================================
+
+/**
+.Spec.Log-Normal Pdf
+..general:Class.Pdf
+..summary:Log-normal probability density function.
+..remark:Note that you can construct this either with mu/sigma of the underlying normal distribution (default) or with the mean and standard deviation of the log-normal distribution.
+..cat:Random
+..include:seqan/random.h
+*/
+template <>
+class Pdf<LogNormal>
+{
+public:
+    Pdf<Normal> _normalDist;
+
+/**
+.Memfunc.Log-Normal Pdf#Pdf
+..class:Spec.Log-Normal Pdf
+..summary:Constructor for log-normal Pdf.
+Log-normal PDFs can either be initialized by the mean and standard deviation of the underlying normal distribution or directly of the log-normal distribution.
+..signature:Pdf<LogNormal>(mu, sigma[, MuSigma()])
+..signature:Pdf<LogNormal>(mean, stdDev, MeanStdDev())
+..param.mu:Mean of the underlying normal distribution.
+...type:nolink:double
+..param.sigma:Standard deviation of the underlying normal distribution.
+...type:nolink:double
+..param.mean:Mean of the log-normal distribution.
+...type:nolink:double
+..param.stdDev:Standard deviation of the log-normal distribution.
+...type:nolink:double
+..see:Tag.MuSigma
+..see:Tag.MeanStdDev
+*/
+    Pdf(double mu, double sigma, MuSigma const &)
+            : _normalDist(mu, sigma)
+    {
+        SEQAN_CHECKPOINT;
+    }
+
+    Pdf(double mean, double stddev, MeanStdDev const &)
+            : _normalDist(::std::log(mean) - 0.5 * ::std::log(1.0 + stddev * stddev / mean / mean),
+                          ::std::sqrt(::std::log(1.0 + stddev * stddev / mean / mean)))
+    {
+        SEQAN_CHECKPOINT;
+    }
+
+    Pdf(double mu, double sigma)
+            : _normalDist(mu, sigma)
+    {
+        SEQAN_CHECKPOINT;
+    }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <>
+struct Value<Pdf<LogNormal> >
+{
+    typedef double Type;
+};
+
+template <>
+struct Value<const Pdf<LogNormal> > : Value<Pdf<LogNormal> > {};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TRandomNumberGenerator>
+inline
+typename Value<Pdf<LogNormal> >::Type
+pickRandomNumber(TRandomNumberGenerator & rng, Pdf<LogNormal> const & pdf)
+{
+    SEQAN_CHECKPOINT;
+    return exp(pickRandomNumber(rng, pdf._normalDist));
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_RANDOM_RANDOM_LOGNORMAL_H_
diff --git a/src/SeqAn-1.3/seqan/random/random_mt19937.h b/src/SeqAn-1.3/seqan/random/random_mt19937.h
new file mode 100644
index 0000000..2a94249
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/random_mt19937.h
@@ -0,0 +1,120 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// An implementation of the Mersenne Twister 19937 random number generator.
+// ==========================================================================
+
+#ifndef SEQAN_RANDOM_RANDOM_MT19937_H_
+#define SEQAN_RANDOM_RANDOM_MT19937_H_
+
+#include <seqan/random/ext_MersenneTwister.h>
+
+namespace seqan {
+
+// ===========================================================================
+// Forwards, Tags.
+// ===========================================================================
+
+// Tag for selecting a mersenne twister.
+struct MersenneTwister {};
+
+// ===========================================================================
+// Classes
+// ===========================================================================
+
+/**
+.Spec.Mersenne Twister Rng
+..general:Class.Rng
+..signature:Rng<MersenneTwister>
+..summary:Mersenne Twister 19937 Random Number Generator
+..cat:Random
+..include:seqan/random.h
+*/
+template <>
+class Rng<MersenneTwister>
+{
+public:
+    ext::MTRand _mtRand;
+
+
+/**
+.Memfunc.Mersenne Twister Rng#Rng
+..class:Spec.Mersenne Twister Rng
+..summary:Constructor Mersenne Twister Rng.
+..signature:Rng<MersenneTwister>([seed])
+..param.seed:Seed for the initialization of the Mersenne Twister, defaults to 0.
+...type:nolink:double.
+*/
+    Rng() : _mtRand(0lu)
+    { SEQAN_CHECKPOINT; }
+
+    Rng(unsigned seed) : _mtRand(seed)
+    { SEQAN_CHECKPOINT; }
+    
+    inline
+    unsigned
+    operator()()
+    {
+        SEQAN_CHECKPOINT;
+        return _mtRand.randInt();
+    }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <>
+struct Value<Rng<MersenneTwister> >
+{
+    typedef unsigned Type;
+};
+
+template <>
+struct Value<const Rng<MersenneTwister> > : Value<Rng<MersenneTwister> > {};
+	
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+inline unsigned
+pickRandomNumber(Rng<MersenneTwister> & mt)
+{
+    SEQAN_CHECKPOINT;
+
+    return mt._mtRand.randInt();
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_RANDOM_RANDOM_MT19937_H_
diff --git a/src/SeqAn-1.3/seqan/random/random_normal.h b/src/SeqAn-1.3/seqan/random/random_normal.h
new file mode 100644
index 0000000..b03ea9d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/random_normal.h
@@ -0,0 +1,134 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Code for normally distributed random number generation.
+// ==========================================================================
+
+#ifndef SEQAN_RANDOM_RANDOM_NORMAL_H_
+#define SEQAN_RANDOM_RANDOM_NORMAL_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Forwards, Tags.
+// ===========================================================================
+
+// Specialization Tag for normal distribution.
+struct Normal {};
+
+// ===========================================================================
+// Classes
+// ===========================================================================
+
+/**
+.Spec.Normal Pdf
+..signature:Pdf<Normal>
+..general:Class.Pdf
+..summary:Normal probability density function.
+..cat:Random
+..include:seqan/random.h
+*/
+template <>
+class Pdf<Normal>
+{
+public:
+    double _mu;
+    double _sigma;
+
+/**
+.Memfunc.Normal Pdf#Pdf
+..class:Spec.Normal Pdf
+..summary:Constructor for normal Pdf.
+..signature:Pdf<Normal>(mu, sigma)
+..param.mu:Mean of the normal distribution.
+...type:nolink:double
+..param.sigma:Standard deviation of the normal distribution.
+...type:nolink:double
+*/
+    Pdf(double mu, double sigma)
+            : _mu(mu), _sigma(sigma)
+    {
+        SEQAN_CHECKPOINT;
+    }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <>
+struct Value<Pdf<Normal> >
+{
+    typedef double Type;
+};
+
+template <>
+struct Value<const Pdf<Normal> > : Value<Pdf<Normal> > {};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+/*
+..summary:Pick a normally distributed random number.
+*/
+template <typename TRNG>
+inline
+typename Value<Pdf<Normal> >::Type
+pickRandomNumber(TRNG & rng, Pdf<Normal> const & pdf)
+{
+    SEQAN_CHECKPOINT;
+
+    // Normal Distribution Heuristics, ported from Python.
+    //
+    // Kinderman and Monahan method. Reference: Kinderman, A.J. and
+    // Monahan, J.F., "Computer generation of random variables using
+    // the ratio of uniform deviates", ACM Trans Math Software, 3,
+    // (1977), pp257-260.
+
+    double z;
+    Pdf<Uniform<double> > pdfUniform(0, 1);
+    while (true) {
+        double u1 = pickRandomNumber(rng, pdfUniform);
+        double u2 = 1 - pickRandomNumber(rng, pdfUniform);
+        z = SEQAN_NV_MAGICCONST * (u1 - 0.5) / u2;
+        double zz = z * z / 4.0;
+        if (zz < -::std::log10(u2))
+            break;
+    }
+    return pdf._mu + z * pdf._sigma;
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_RANDOM_RANDOM_NORMAL_H_
diff --git a/src/SeqAn-1.3/seqan/random/random_rng_functor.h b/src/SeqAn-1.3/seqan/random/random_rng_functor.h
new file mode 100644
index 0000000..b0b3fdf
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/random_rng_functor.h
@@ -0,0 +1,127 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Functor for random number generation.
+// ==========================================================================
+
+#ifndef SEQAN_RANDOM_RANDOM_RNG_FUNCTOR_H_
+#define SEQAN_RANDOM_RANDOM_RNG_FUNCTOR_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Forwards, Tags.
+// ===========================================================================
+
+// Tag for selecting the Rng functor specialization.
+template <typename TRng, typename TPdf>
+struct RngFunctor {};
+    
+// ===========================================================================
+// Classes
+// ===========================================================================
+
+/**
+.Spec.Rng Functor
+..general:Class.Rng
+..signature:Rng<RngFunctor<TRng, TPdf> >
+..summary:Functor wrapper for random number generation.
+..cat:Random
+..include:seqan/random.h
+*/
+template <typename TRng, typename TPdf>
+class Rng<RngFunctor<TRng, TPdf> >
+{
+public:
+    TRng & _rng;
+    TPdf & _pdf;
+    
+/**
+.Memfunc.Rng Functor#Rng
+..class:Spec.Rng Functor
+..summary:Constructor Functor Rng.
+..signature:Rng<RngFunctor<TRng, TPdf> >(rng, pdf)
+..param.rng:@Class.Rng@ object to use.
+..param.pdf:@Class.Pdf@ object to use.
+*/
+    Rng(TRng & rng, TPdf & pdf)
+	    : _rng(rng), _pdf(pdf)
+    {}
+    
+    inline
+    typename Value<TPdf>::Type
+    operator()()
+    {
+        SEQAN_CHECKPOINT;
+        return pickRandomNumber(_rng, _pdf);
+    }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <typename TRng, typename TPdf>
+struct Value<RngFunctor<TRng, TPdf> > : Value<TPdf> {};
+
+template <typename TRng, typename TPdf>
+struct Value<RngFunctor<TRng, TPdf> const> : Value<TPdf> {};
+
+template <typename TRng, typename TPdf>
+struct MaxValue<RngFunctor<TRng, TPdf> > : MaxValue<TPdf> {};
+
+template <typename TRng, typename TPdf>
+struct MaxValue<RngFunctor<TRng, TPdf> const> : MaxValue<TPdf> {};
+
+template <typename TRng, typename TPdf>
+struct MinValue<RngFunctor<TRng, TPdf> > : MinValue<TPdf> {};
+
+template <typename TRng, typename TPdf>
+struct MinValue<RngFunctor<TRng, TPdf> const> : MinValue<TPdf> {};
+    
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TRng, typename TPdf>
+inline unsigned
+pickRandomNumber(Rng<RngFunctor<TRng, TPdf> > & rng)
+{
+    SEQAN_CHECKPOINT;
+    
+    return pickRandomNumber(rng._rng, rng._pdf);
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_RANDOM_RANDOM_RNG_FUNCTOR_H_
diff --git a/src/SeqAn-1.3/seqan/random/random_shuffle.h b/src/SeqAn-1.3/seqan/random/random_shuffle.h
new file mode 100644
index 0000000..4095284
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/random_shuffle.h
@@ -0,0 +1,88 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Shuffling.
+// ==========================================================================
+
+#ifndef SEQAN_RANDOM_RANDOM_SHUFFLE_H_
+#define SEQAN_RANDOM_RANDOM_SHUFFLE_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Forwards, Tags.
+// ===========================================================================
+
+// ===========================================================================
+// Classes
+// ===========================================================================
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+/**
+.Function.shuffle
+..summary:Shuffle the given container.
+..cat:Random
+..include:seqan/random.h
+..signature:shuffle(container, rng)
+..param.container:Container to shuffle elements of.
+..param.rng:Random number generator to use.
+...type:Class.Rng
+*/
+template <typename TContainer, typename TRNG>
+void shuffle(TContainer & container, TRNG & rng)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Position<TContainer>::Type TPosition;
+    typedef typename Value<TContainer>::Type TValue;
+
+    TValue tmp;
+    for (TPosition i = 0, iend = length(container); i < iend; ++i) {
+        Pdf<Uniform<TPosition> > uniformDist(i, iend - 1);
+        TPosition j = pickRandomNumber(rng, uniformDist);
+        // swap
+        move(tmp, container[i]);
+        move(container[i], container[j]);
+        move(container[j], tmp);
+    }
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_RANDOM_RANDOM_SHUFFLE_H_
diff --git a/src/SeqAn-1.3/seqan/random/random_uniform.h b/src/SeqAn-1.3/seqan/random/random_uniform.h
new file mode 100644
index 0000000..4f9bfc1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/random/random_uniform.h
@@ -0,0 +1,147 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Code for uniformly distributed random number generation.
+// ==========================================================================
+
+#ifndef SEQAN_RANDOM_RANDOM_UNIFORM_H_
+#define SEQAN_RANDOM_RANDOM_UNIFORM_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Forwards, Tags.
+// ===========================================================================
+
+// Specialization tag for uniform distribution.
+template <typename T>
+struct Uniform;
+
+// ===========================================================================
+// Classes
+// ===========================================================================
+
+/**
+.Spec.Uniform Pdf
+..signature:Pdf<Uniform<T> >
+..general:Class.Pdf
+..summary:Uniform distribution probability density function over a closed interval [min, max].
+..param.T:Type of the values the Pdf is defined on.
+..cat:Random
+..include:seqan/random.h
+*/
+template <typename T>
+class Pdf<Uniform<T> >
+{
+public:
+    T _min;
+    T _max;
+
+// TODO(holtgrew): Switch to [begin, end) instead of [min, max] style?
+/**
+.MemfuncUniform Pdf #Pdf
+..class:Spec.Uniform Pdf
+..summary:Constructor for uniform Pdf.
+..signature:Pdf<Uniform<T> >(min, max)
+..param.min:Smallest value of interval.
+...type:nolink:T
+..param.max:Largest value of interval.
+...type:nolink:T
+*/
+    Pdf(T min, T max)
+            : _min(min), _max(max)
+    {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LEQ(_min, _max);
+    }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <typename T>
+struct Value<Pdf<Uniform<T> > >
+{
+    typedef T Type;
+};
+
+template <typename T>
+struct Value<const Pdf<Uniform<T> > > : Value<Pdf<Uniform<T> > > {};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+// Pick an integral random number uniformly distributed.
+template <typename TRNG, typename T>
+inline
+typename Value<Pdf<Uniform<T> > >::Type
+_pickRandomNumber(TRNG & rng, Pdf<Uniform<T> > const & pdf, True const &)
+{
+    SEQAN_CHECKPOINT;
+    typename Value<TRNG>::Type limit = (MaxValue<TRNG>::VALUE / (pdf._max - pdf._min)) * (pdf._max - pdf._min);
+    typename Value<TRNG>::Type x;
+    do {
+        x = pickRandomNumber(rng);
+    } while (x > limit);
+    T y = x % (pdf._max - pdf._min + 1);
+    return y + pdf._min;
+}
+
+// Pick a continuous random number uniformly distributed.
+template <typename TRNG, typename T>
+inline
+typename Value<Pdf<Uniform<T> > >::Type
+_pickRandomNumber(TRNG & rng, Pdf<Uniform<T> > const & pdf, False const &)
+{
+    SEQAN_CHECKPOINT;
+    T x = static_cast<T>(pickRandomNumber(rng) - MinValue<TRNG>::VALUE);
+    x /= static_cast<T>(MaxValue<TRNG>::VALUE) - static_cast<T>(MinValue<TRNG>::VALUE);
+    return pdf._min + x * (pdf._max - pdf._min);
+}
+
+template <typename TRNG, typename T>
+inline
+typename Value<Pdf<Uniform<T> > >::Type
+pickRandomNumber(TRNG & rng, Pdf<Uniform<T> > const & pdf)
+{
+    SEQAN_CHECKPOINT;
+    if (pdf._min == pdf._max)
+        return pdf._min;
+    return _pickRandomNumber(rng, pdf, typename IsIntegral<T>::Type());
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_RANDOM_RANDOM_UNIFORM_H_
diff --git a/src/SeqAn-1.3/seqan/refinement.h b/src/SeqAn-1.3/seqan/refinement.h
new file mode 100644
index 0000000..9e18463
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement.h
@@ -0,0 +1,67 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_REFINEMENT_H
+#define SEQAN_HEADER_REFINEMENT_H
+
+// External STL
+#include <map>
+
+// Seqan
+#include <seqan/score.h>
+#include <seqan/graph_types.h>
+#include <seqan/graph_algorithms.h>
+
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/refinement/refinement_generated_forwards.h>
+#endif
+
+// Alignment graph
+#include <seqan/refinement/graph_impl_align.h>
+#include <seqan/refinement/graph_impl_align_adapt.h>
+
+// Intervall trees
+#include <seqan/misc/misc_interval_tree.h>
+
+// Refinement
+//#include <seqan/refinement/graph_algorithm_refine.h>
+#include <seqan/refinement/graph_algorithm_refine_scoring.h>
+#include <seqan/refinement/graph_algorithm_refine_fragment.h>
+#include <seqan/refinement/graph_algorithm_refine_aligngraph.h>
+#include <seqan/refinement/graph_algorithm_refine_align.h>
+#include <seqan/refinement/graph_algorithm_refine_annotation.h>
+//#include <seqan/refinement/graph_algorithm_refine_exact.h>
+#include <seqan/refinement/graph_algorithm_refine_exact_iterative.h>
+#include <seqan/refinement/graph_algorithm_refine_inexact.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_align.h b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_align.h
new file mode 100644
index 0000000..36dd270
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_align.h
@@ -0,0 +1,186 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_REFINE_ALIGN_H
+#define SEQAN_HEADER_GRAPH_REFINE_ALIGN_H
+
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////	
+//Functions for Align<TSource,TSpec>
+//project onto other sequence 
+template<typename TSource,typename TSpec,typename TValue,typename TMap>
+void
+_getOtherSequenceAndProject(Align<TSource,TSpec> & segment, 
+				TValue seg_num,
+							TMap & seq_map, 
+						   TValue , 
+						   TValue node_i, 
+						   TValue & seq_j_id, 
+						   TValue & node_j)
+{
+SEQAN_CHECKPOINT
+
+	if(seg_num == 0)
+	{
+		seq_j_id = seq_map[id(source(row(segment,1)))];
+		node_j = toSourcePosition(row(segment,1),toViewPosition(row(segment,0),node_i));
+	}
+	else
+	{
+		seq_j_id  = seq_map[id(source(row(segment,0)))];
+		node_j = toSourcePosition(row(segment,0),toViewPosition(row(segment,1),node_i));
+	}
+}
+
+
+//unspektakul�re funktion, die die int ID zur�ckgibt (braucht man damit es f�r alle alignment typen geht)
+//template<typename TSource,typename TSpec, typename TValue, typename TSeqMap>					
+//int 
+//_getSeqMapId(TSeqMap & seq_map,
+//			Align<TSource,TSpec> & segment,
+//			TValue seq_i)
+//{
+//SEQAN_CHECKPOINT
+//	return seq_map[id(source(row(segment,seq_i)))];
+//}
+//
+//given seq and segment, get the sequenceId (seq_i) and its begin and end
+//if seq = 0 get first sequence (that takes part in the segment match)
+//if seq = 1 get second sequence
+template<typename TAliSource,typename TAliSpec, typename TValue>
+void
+_getSeqBeginAndEnd(Align<TAliSource,TAliSpec> & segment,
+				  std::map<const void * ,int> & seq_map, 
+				  TValue & seq_i_id, 
+				  TValue & begin_i, 
+				  TValue & end_i,
+				  TValue seq)
+{
+	seq_i_id = seq_map[id(source(row(segment,seq)))];
+	begin_i = clippedBeginPosition(row(segment,seq));
+	end_i = clippedEndPosition(row(segment,seq));
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////
+// 50000 _getRefinedMatchScore Functions
+////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////
+//for Align<TAliSource,TAliSpec>
+//get score for alignment of length len starting at pos_i on first sequence
+//and pos_j on second sequence 
+template<typename TScoreValue,typename TScoreSpec,typename TStringSet,typename TAliSource,typename TAliSpec,typename TValue>
+TScoreValue
+_getRefinedMatchScore(Score<TScoreValue,TScoreSpec> & score_type,
+		 TStringSet &,
+		 Align<TAliSource,TAliSpec> & segment,
+		 TValue pos_i,
+		 TValue pos_j,
+		 TValue len,
+		 TValue)
+{
+SEQAN_CHECKPOINT     
+	typedef Align<TAliSource,TAliSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+//	typedef typename Iterator<TRow,GapsIterator<ArrayGaps> >::Type TIterator;	
+	typedef typename Iterator<TRow, Rooted>::Type TIterator;
+	TIterator row0_it, row1_it;
+	row0_it = iter(row(segment,0),toViewPosition(row(segment,0),pos_i));
+	row1_it = iter(row(segment,1),toViewPosition(row(segment,1),pos_j));
+	len = toViewPosition(row(segment,0),pos_i + len) - toViewPosition(row(segment,0),pos_i);
+	TValue i = 0;
+	TScoreValue ret_score = 0;
+	while(i < len)
+	{
+		if(isGap(row1_it)||isGap(row0_it))
+			ret_score += scoreGapExtend(score_type);
+		else
+			ret_score += score(score_type,getValue(row0_it),getValue(row1_it));
+		++i;
+		++row0_it; 
+		++row1_it; 
+	}
+	return ret_score;
+}				
+					
+
+//get score for alignment starting at pos_i on first sequence 
+//and pos_j on second sequence, if len1!=len2 then the refinement
+//process was stopped (the cut is not exact)
+//template<typename TScore,typename TStringSet, typename TAliSource,typename TAliSpec,typename TValue>
+//typename Value<TScore>::Type
+//_getRefinedMatchScore(TScore & score_type,
+//		 TStringSet &, 
+//		 Align<TAliSource,TAliSpec> & segment,
+//		 TValue pos_i,
+//		 TValue pos_j,
+//		 TValue len1,
+//		 TValue len2)
+//{
+//SEQAN_CHECKPOINT
+//	typedef Align<TAliSource,TAliSpec> TAlign;
+//	typedef typename Row<TAlign>::Type TRow;
+//	typedef typename Iterator<TRow>::Type TIterator;	
+//	TIterator row0_it, row1_it;
+//	TValue len;
+//	row0_it = iter(row(segment,0),toViewPosition(row(segment,0),pos_i));
+//	row1_it = iter(row(segment,1),toViewPosition(row(segment,1),pos_j));
+//	len1 = toViewPosition(row(segment,0),pos_i + len1) - toViewPosition(row(segment,0),pos_i);
+//	len2 = toViewPosition(row(segment,1),pos_j + len2) - toViewPosition(row(segment,1),pos_j);
+//	len = (len1 < len2) ? len1 : len2;
+//	int i = 0;
+//	typename Value<TScore>::Type ret_score = 0;
+//	
+//	//calculate score for aligned region
+//	while(i < len)
+//	{
+//		ret_score += score(score_type,getValue(row0_it),getValue(row1_it));
+//		++i;
+//		++row0_it;
+//		++row1_it;
+//	}
+//	//fill up with gaps if one sequence is longer than the other
+//	len = (len1 > len2) ? len1 : len2;
+//	ret_score += (len - i) * scoreGapExtend(score_type);
+//	
+//	return ret_score;
+//}				
+
+
+}
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_aligngraph.h b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_aligngraph.h
new file mode 100644
index 0000000..193a975
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_aligngraph.h
@@ -0,0 +1,292 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_REFINE_ALIGRAPH_H
+#define SEQAN_HEADER_GRAPH_REFINE_ALIGRAPH_H
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	
+/////////////////////// NOCH NICHT EINSATZF�HIG!!!!! /////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////////	
+//Functios for Align Graphs
+//project onto other sequence for Graph<Alignment>
+template<typename TAlignment,typename TValue, typename TMap>
+void
+_getOtherSequenceAndProject(Graph<TAlignment> & segment, 
+			    TValue seg_num,
+                            TMap &, 
+ 							TValue seq_i_id, 
+							TValue pos_i, 
+							TValue & seq_j_id, 
+							TValue & pos_j)
+{
+	getProjectedPosition(segment,seg_num,seq_i_id, pos_i,seq_j_id,pos_j);
+
+}
+
+
+
+
+//given seq and segment, get the sequenceId (seq_i) and its begin and end
+//if seq = 0 get first sequence (that takes part in the segment match)
+//if seq = 1 get second sequence
+template<typename TValue,typename TAlign,typename TId>
+void
+_getSeqBeginAndEnd(Graph<TAlign> & segment,
+				  std::map<const void * ,int> &, 
+				  TId & seq_i_id, 
+				  TValue & begin_i, 
+				  TValue & end_i,
+				  TValue seq)
+{
+SEQAN_CHECKPOINT
+	//walk through edges, take first edge, target, source,
+	//define: seq == 0   ==> seq_i_id = id of source of first edge
+	//        seq == 1   ==> seq_i_id = id of target of first edge
+	typedef Graph<TAlign> TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	
+	TEdgeIterator ed_it(segment);
+	//goBegin(ed_it);
+	if(seq==0)
+	{
+		TVertexDescriptor src = sourceVertex(ed_it);
+		seq_i_id = sequenceId(segment,src);
+	}
+	else
+	{
+		TVertexDescriptor trg = targetVertex(ed_it);
+		seq_i_id = sequenceId(segment,trg);
+	}
+	begin_i = getFirstCoveredPosition(segment,seq_i_id);
+	end_i = getLastCoveredPosition(segment,seq_i_id);
+
+
+}
+
+
+
+
+//////////////////////////
+//for Graph<TAlign>
+//vorsichtig! noch nicht richtig, bis jetzt nur ungapped exact matches...
+//template<typename TScore,typename TStringSet,typename TAlignment,typename TValue>
+//typename Value<TScore>::Type
+//_getRefinedMatchScore(TScore & score_type,
+//		 TStringSet & seqs,
+//		 Graph<TAlignment> & segment,
+//		 TValue pos_i,
+//		 TValue pos_j,
+//		 TValue len)
+//{
+//SEQAN_CHECKPOINT
+//	int pseudo_map = 0;
+//	TValue pos_j_check,seq_j_id;
+//	_getOtherSequenceAndProject(segment,pseudo_map,seq_i_id,pos_i,seq_j_id,pos_j_check);
+//	SEQAN_ASSERT_TRUE(pos_j_check==pos_j);
+//	TValue last_pos_i = pos_i + len;
+//	TValue last_pos_j;
+//	_getOtherSequenceAndProject(segment,pseudo_map,seq_i_id,last_pos_i,seq_j_id,last_pos_j);
+//
+////	typename Infix<typename Value<TStringSet>::Type>::Type label0 = infix(getValueById(seqs,seq_i_id),pos_i,last_pos_i);
+////	typename Infix<typename Value<TStringSet>::Type>::Type label1 = infix(getValueById(seqs,seq_j_id),pos_j,last_pos_j);
+//	
+//	typename Value<TScore>::Type score = 0;
+//	TValue i = 0;
+//	while (i < len)
+//	{
+//		next_pos_j = getProjectedPosition(segment,seq_i_id,pos_i);
+//		//gaps
+//		if(pos_j+1 != next_pos_j)
+//		{
+//			if(pos_j == next_pos_j)
+//			{
+//				score += scoreGapExtend(score_type);
+//				++pos_i;
+//				++i;
+//				continue;
+//			}
+//		}		
+//		pos_j = next_pos_j;
+//		score += score(score_type,getValueById(seqs,seq_i_id)[pos_i],getValueById(seqs,seq_j_id)[pos_j]);
+//		++i;
+//		++pos_i;
+//	}
+//
+//
+//
+//
+//
+//
+//
+//
+//	typename Infix<typename Value<TStringSet>::Type>::Type label0 = label(segment,stringSet(segment)[0]);
+//	typename Infix<typename Value<TStringSet>::Type>::Type label1 = label(segment,stringSet(segment)[1]);
+//
+//
+//	//typename Infix<typename Value<TStringSet>::Type>::Type label0 = label(segment,0);
+//	//typename Infix<typename Value<TStringSet>::Type>::Type label1 = label(segment,1);
+//	int i = 0;
+//	typename Value<TScore>::Type ret_score = 0;
+//	while(i < len)
+//	{
+//		ret_score += score(score_type,label0[i],label1[i]);
+//		++i;
+//	}
+//	//ret_score = scoreMatch(score_type);
+//	//ret_score *= len;
+//	return ret_score;
+//}				
+
+
+//////////////////////////
+//for Graph<TAlign>
+//only for complete refinement 
+template<typename TScoreValue,typename TScoreSpec,typename TStringSet,typename TAlignment,typename TValue>
+TScoreValue
+_getRefinedMatchScore(Score<TScoreValue,TScoreSpec> & score_type,
+		 TStringSet & seqs,
+		 Graph<TAlignment> & segment,
+		 TValue pos_i,
+		 TValue pos_j,
+		 TValue len,
+		 TValue len_j)
+{
+SEQAN_CHECKPOINT
+
+	typedef Graph<TAlignment> TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename TGraph::TPosToVertexMap TPosToVertexMap;
+	typedef typename TPosToVertexMap::const_iterator TVertexMapIter;
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	
+	TValue seq_i_id;
+	TEdgeIterator ed(segment);
+	//goBegin(ed);
+	seq_i_id = sequenceId(segment,sourceVertex(ed));
+		
+	int pseudo_map = 0;
+	TValue pos_j_check,seq_j_id;
+	_getOtherSequenceAndProject(segment,pseudo_map,seq_i_id,pos_i,seq_j_id,pos_j_check);
+	SEQAN_ASSERT_TRUE(pos_j_check==pos_j);
+	TValue last_pos_j = pos_j + len_j;
+		
+	TScoreValue ret_score = 0;
+	bool last_one_was_aligned = false;
+
+	while(len != 0)
+	{
+		TValue rest = 0;
+		TVertexMapIter it = segment.data_pvMap.upper_bound(std::make_pair(seq_i_id, pos_i));
+		// vd definitely exists (unless the input parameters for _getRefinedMatchScore are wrong)	
+		// no! falsch gedacht... nilVertex, falls pos in einem gap liegt
+		if(it->second == nilVertex)
+		{	
+			++it;
+			if(it != segment.data_pvMap.end() && it->first.first == seq_i_id)
+			{
+				rest = fragmentBegin(segment,it->second)-pos_i;
+				last_one_was_aligned = false;
+				if(rest < len)//add rest many gaps
+						ret_score += rest * scoreGapExtend(score_type);
+				else
+				{//add len many gaps
+					ret_score += len * scoreGapExtend(score_type);
+					return ret_score;	//and done!
+				}
+			}
+			else
+			{//add len many gaps
+				ret_score += len * scoreGapExtend(score_type);
+				return ret_score;	//and done!
+			}
+		}
+		else{
+			TVertexDescriptor vd = it->second;
+			rest = fragmentBegin(segment,vd)+fragmentLength(segment,vd)-pos_i;
+			TOutEdgeIterator ed_it(segment,vd);
+			if(!atEnd(ed_it)) //aligned stretch
+			{
+				if(last_one_was_aligned)
+				{
+					TValue next_pos_j,temp;
+					getProjectedPosition(segment,seq_i_id,pos_i,temp,next_pos_j);
+					ret_score += (next_pos_j-pos_j) * scoreGapExtend(score_type);
+					pos_j = next_pos_j; 
+				}
+				last_one_was_aligned = true;
+				TValue i = 0;
+				while(i < rest && i < len)
+				{
+					ret_score += score(score_type,getValueById(seqs,seq_i_id)[pos_i++],getValueById(seqs,seq_j_id)[pos_j++]);
+					++i;
+				}
+				if(rest>len) return ret_score; //done (last_pos_i is somewhere inside the current node)
+				else 
+				{//last_pos_i is the first position of the next node
+					if(rest == len) //check if there is an unalgined stretch on seq_j_id that needs to be included
+					{
+						if(pos_j != last_pos_j)
+							ret_score += (last_pos_j-pos_j) * scoreGapExtend(score_type);
+					}
+				}
+			}
+			else //gap
+			{
+				last_one_was_aligned = false;
+				if(rest < len)//add rest many gaps
+						ret_score += rest * scoreGapExtend(score_type);
+				else
+				{//add len many gaps
+					ret_score += len * scoreGapExtend(score_type);
+					return ret_score;	//and done!
+				}
+			}
+		}
+		len -= rest;	
+	}
+
+
+	return ret_score;
+}				
+
+
+}
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_annotation.h b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_annotation.h
new file mode 100644
index 0000000..0ef98f6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_annotation.h
@@ -0,0 +1,396 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_GRAPH_REFINE_ANNOTATION_H
+#define SEQAN_HEADER_GRAPH_REFINE_ANNOTATION_H
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+template<typename TSequence, typename TValue, typename TSpec = Simple>
+class Annotation;
+
+
+
+/**
+.Class.Annotation:
+..cat:Sequences
+..summary:Class for annotating sequences. 
+..signature:Annotation<TSequence, TLabel, TSpec>  
+..param.TSequence:The sequence that annotation is available for.
+..param.TLabel:The label type (e.g. int or String<char>)
+..param.TSpec:The specializing type.
+...default:Simple
+..include:refinement.h
+*/
+template<typename TSequence,typename TValue>
+class Annotation<TSequence,TValue,Simple>{
+
+public:
+	typedef typename Id<TSequence>::Type TId_;
+	typedef typename Position<TSequence>::Type TPos_;
+	typedef typename Size<TSequence>::Type TSize_;
+
+	TId_ data_seq_id;
+	TPos_ data_begin;
+	TSize_ data_length;
+	//String<char> data_label;
+	TValue data_label;
+
+	Annotation()
+	{
+	}
+
+	Annotation(TId_ seqId, TPos_ begin, TSize_ len, TValue label) :
+			data_seq_id(seqId),
+			data_begin(begin), 
+			data_length(len),
+			data_label(label)
+	{
+	}
+
+	~Annotation()
+	{
+	}
+
+};
+
+
+
+template<typename TSequence,typename TValue,typename TSpec>	
+typename Id<TSequence>::Type&
+sequenceId(Annotation<TSequence,TValue,TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_seq_id;
+}
+
+template<typename TSequence,typename TValue,typename TSpec>	
+typename Position<TSequence>::Type&
+fragmentBegin(Annotation<TSequence,TValue,TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_begin;
+}
+
+template<typename TSequence,typename TValue,typename TSpec>	
+typename Size<TSequence>::Type&
+fragmentLength(Annotation<TSequence,TValue,TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_length;
+}
+
+template<typename TSequence,typename TValue,typename TSpec>	
+TValue
+label(Annotation<TSequence,TValue,TSpec> & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_label;
+}
+
+
+template<typename TSequence,typename TValue,typename TSpec>	
+struct Value<Annotation<TSequence,TValue,TSpec> >
+{
+	typedef TValue Type;
+};
+
+
+template<typename TValue, typename TAliString, typename TGraph, typename TPropertyMap, typename TStringSet, typename TMap, typename TTagSpec>
+inline void
+_addAnnotationCuts(String<std::set<TValue> > &,
+				   TAliString &, 
+				   String<TGraph> &, 
+				   String<TPropertyMap> &, 
+				   TStringSet &,
+				   TMap &,
+				   bool,
+				   TValue,
+				   Tag<TTagSpec>)
+{
+SEQAN_CHECKPOINT
+	return;
+}
+
+
+
+
+//refine positions where annotation changes (borders of annotated stretches)
+template<typename TValue, typename TAliString, typename TGraph, typename TPropertyMap, typename TStringSet, typename TMap, typename TAnnoString, typename TTagSpec>
+inline void
+_addAnnotationCuts(String<std::set<TValue> > & all_nodes,
+				   TAliString & alis, 
+				   String<TGraph> & gs, 
+				   String<TPropertyMap> & pms, 
+				   TStringSet & seq,
+				   TMap & seq_map,
+				   TAnnoString & annotation,
+				   TValue min_fragment_len,
+				   Tag<TTagSpec> tag)
+{
+SEQAN_CHECKPOINT
+
+	//typedef typename Value<TAnnoString>::Type TAnnotation;
+	typedef typename Iterator<TAnnoString,Standard>::Type TAnnoIter;
+	typedef typename std::set<TValue>::iterator TSetIterator;
+	//call function _refine for each position that annotation is given for (the borders of annotated stretches)
+	TAnnoIter anno_it = begin(annotation,Standard());
+	TAnnoIter anno_end = end(annotation,Standard());
+	//for each annotated stretch
+	while(anno_it != anno_end)
+	{
+		
+		TValue seq_i_id = sequenceId(*anno_it);
+		TValue begin_i = fragmentBegin(*anno_it);
+		TValue end_i = begin_i + fragmentLength(*anno_it);
+		TValue seq_i_pos = idToPosition(seq,seq_i_id);
+		
+		//refine begin
+		TSetIterator iter = all_nodes[seq_i_pos].find(begin_i);		
+		if(_cutIsValid(all_nodes,seq_i_pos,begin_i,iter,min_fragment_len,tag))
+		{
+			all_nodes[seq_i_pos].insert(begin_i);
+			_refine(begin_i, seq_i_id, seq, seq_map, alis, gs,pms,all_nodes,min_fragment_len,tag);//TStop());
+		}
+		//and end position
+		iter = all_nodes[seq_i_pos].find(end_i);		
+		if(_cutIsValid(all_nodes,seq_i_pos,end_i,iter,min_fragment_len,tag))
+		{
+			all_nodes[seq_i_pos].insert(end_i);
+			_refine(end_i, seq_i_id, seq, seq_map, alis, gs,pms,all_nodes,min_fragment_len,tag);//TStop());
+		}
+		++anno_it;
+	}
+	      	
+}
+	      
+
+
+template<typename TPropertyMap, typename TStringSet, typename TMap, typename TAnnoString, typename TAliGraph,typename TTagSpec>
+inline void
+_addNodeAnnotation(TStringSet &,
+				   TMap &,
+				   TAnnoString & annotation,
+				   TPropertyMap & pm,
+				   TAliGraph & ali_g,
+				   Tag<TTagSpec>)
+{
+SEQAN_CHECKPOINT
+
+	resizeVertexMap(ali_g, pm);
+
+	typedef typename Value<TAnnoString>::Type TAnnotation;
+	typedef typename Id<TAnnotation>::Type TId;
+	typedef typename Position<TAnnotation>::Type TPos;
+	typedef typename Value<TAnnotation>::Type TLabel;
+	typedef typename VertexDescriptor<TAliGraph>::Type TVertexDescriptor;
+	
+	typedef typename Iterator<TAnnoString,Standard>::Type TAnnoIter;
+	TAnnoIter anno_it = begin(annotation,Standard());
+	TAnnoIter anno_end = end(annotation,Standard());
+
+	//for each annotated stretch
+	while(anno_it != anno_end)
+	{
+		TLabel label_ = label(*anno_it);
+		TId seq_id = sequenceId(*anno_it);
+		TPos act_pos = fragmentBegin(*anno_it);
+		TPos end_pos = act_pos + fragmentLength(*anno_it);
+
+		//for each interval that lies within the current segment/fragement/alignment
+		while(act_pos < end_pos)
+		{
+			//get the node represents the current interval (begin_pos until next_cut_pos or end_pos)
+			TVertexDescriptor act_knot = findVertex(ali_g,seq_id,act_pos);
+
+			String<TLabel> property = getProperty(pm, act_knot);
+			appendValue(property,label_);
+			assignProperty(pm, act_knot, property);
+			SEQAN_ASSERT_TRUE(fragmentBegin(ali_g,act_knot)==act_pos);
+
+			//prepare for next interval
+			act_pos += fragmentLength(ali_g,act_knot);
+		}
+		++anno_it;
+
+	}
+
+
+
+}
+
+template<typename TAliGraph,typename TScore, typename TPropertyMap>
+typename Value<TScore>::Type 
+_getRefinedAnnoScore(TAliGraph &,
+			 TPropertyMap & pm,
+			 typename VertexDescriptor<TAliGraph>::Type vd1,
+			 typename VertexDescriptor<TAliGraph>::Type vd2,
+			 TScore &)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TPropertyMap>::Type TProperty;
+	//typedef typename Value<TProperty>::Type TChar;
+	typedef typename Iterator<TProperty,Standard>::Type TIterator;
+
+	TIterator prop1_it = begin(property(pm,vd1),Standard());
+	TIterator prop1_end = end(property(pm,vd1),Standard());
+	while(prop1_it != prop1_end)
+	{
+		TIterator prop2_it = begin(property(pm,vd2),Standard());
+		TIterator prop2_end = end(property(pm,vd2),Standard());
+		while(prop2_it != prop2_end)
+		{
+			if(*prop2_it==*prop1_it)
+				return 2;/*scoreMatch(score_type);*/
+			++prop2_it;
+		}
+		++prop1_it;
+	}
+	return 1;
+
+}
+
+
+template<typename TAliGraph,typename TScore>
+typename Value<TScore>::Type 
+_getRefinedAnnoScore(TAliGraph &,
+			 bool,
+			 typename VertexDescriptor<TAliGraph>::Type,
+			 typename VertexDescriptor<TAliGraph>::Type,
+			 TScore &)
+{
+SEQAN_CHECKPOINT
+	return (typename Value<TScore>::Type) 1;
+}
+
+
+
+
+/**
+.Function.matchRefinement:
+..signature:matchRefinement(matches,annotation,stringSet,scoringScheme,refinedGraph)
+..param.annotation:Sequence annotation data. 
+...remarks: Additional semgent match subdivisions will be made at sequence positions at which the annotation label changes.
+...type:Class.Annotation
+..include:seqan/refinement.h
+*/
+//annotation given,exact refinement, score type given
+template<typename TAlignmentString, typename TScoreValue,typename TScoreSpec,typename TAnnoString,typename TOutGraph, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				TAnnoString & anno,
+				StringSet<TSequence, TSetSpec> & seq, 
+				Score<TScoreValue,TScoreSpec> & score_type,
+				TOutGraph & ali_graph)
+{
+SEQAN_CHECKPOINT
+	//min_fragment_len = 1   ==> Exact cutting
+	matchRefinement(alis,seq,score_type,ali_graph,1,anno,ExactRefinement());
+}
+
+
+/**
+.Function.matchRefinement:
+..signature:matchRefinement(matches,annotation,stringSet,scoringScheme,refinedGraph,minFragmentLen)
+..include:seqan/refinement.h
+*/
+//annotation given,score type given, min fragment length given, if > 1 ==> inexact refinement
+template<typename TAlignmentString, typename TScoreValue,typename TScoreSpec,typename TAnnoString, typename TOutGraph, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				TAnnoString & anno,
+				StringSet<TSequence, TSetSpec> & seq, 
+				Score<TScoreValue,TScoreSpec> & score_type,
+				TOutGraph & ali_graph,
+				unsigned int min_frag_len)
+{
+SEQAN_CHECKPOINT
+	if(min_frag_len > 1)
+        matchRefinement(alis,seq,score_type,ali_graph,min_frag_len,anno,InexactRefinement());
+	else
+        matchRefinement(alis,seq,score_type,ali_graph,min_frag_len,anno,ExactRefinement());
+}
+
+
+
+/**
+.Function.matchRefinement:
+..signature:matchRefinement(matches,annotation,stringSet,refinedGraph,minFragmentLen)
+..include:seqan/refinement.h
+*/
+//annotation given,score type not given, min fragment length given, if > 1 ==> inexact refinement
+template<typename TAlignmentString, typename TOutGraph, typename TAnnoString, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				TAnnoString & anno,
+				StringSet<TSequence, TSetSpec> & seq, 
+				TOutGraph & ali_graph,
+				unsigned int min_frag_len)
+{
+SEQAN_CHECKPOINT
+//	Score<int,FakeScore > fake_score;
+	typename Cargo<TOutGraph>::Type fake_score = 1;
+	if(min_frag_len > 1)
+        matchRefinement(alis,seq,fake_score,ali_graph,min_frag_len,anno,InexactRefinement());
+	else
+        matchRefinement(alis,seq,fake_score,ali_graph,min_frag_len,anno,ExactRefinement());
+}
+	
+
+
+/**
+.Function.matchRefinement:
+..signature:matchRefinement(matches,annotation,stringSet,refinedGraph)
+..include:seqan/refinement.h
+*/
+//annotation given,exact refinement, score type not given
+template<typename TAlignmentString,typename TAnnoString, typename TOutGraph, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				TAnnoString & anno,
+				StringSet<TSequence, TSetSpec> & seq, 
+				TOutGraph & ali_graph)
+{
+SEQAN_CHECKPOINT
+//	Score<int,FakeScore > fake_score;
+	typename Cargo<TOutGraph>::Type fake_score = 1;
+	matchRefinement(alis,seq,fake_score,ali_graph,1,anno,ExactRefinement());
+}
+
+}
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_exact.h b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_exact.h
new file mode 100644
index 0000000..8853157
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_exact.h
@@ -0,0 +1,567 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_REFINE_EXACT_H
+#define SEQAN_HEADER_GRAPH_REFINE_EXACT_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+	
+struct TagExactRefinement_;
+typedef Tag<TagExactRefinement_> const ExactRefinement;
+
+//exact method, every cut is made (unless it already exists)
+template<typename TValue>
+inline bool
+_cutIsValid(String<std::set<TValue> > & all_nodes,
+		TValue seq_i_pos,
+		TValue,
+		typename std::set<TValue>::iterator iter,
+		TValue,
+		Tag<TagExactRefinement_> const)
+{
+SEQAN_CHECKPOINT
+	//cut already exists
+	if(iter != all_nodes[seq_i_pos].end())
+		return false;
+	return true;
+}
+
+
+template<typename TSize, typename TSpec,typename TPos>
+inline void
+_updateCutPosition(Fragment<TSize, ExactReversableFragment<TSpec> > & f, TPos & pos_j)
+{
+	if(f.reversed)
+		++pos_j;
+}
+//template<typename TSize, typename TSpec,typename TPos>
+//inline void
+//_updateCutPosition(Fragment<TSize, ExactReversableFragment<TSpec> > const& f, TPos & pos_j)
+//{
+//	if(f.reversed)
+//		++pos_j;
+//}
+
+
+template<typename TFrag,typename TPos>
+inline void
+_updateCutPosition(TFrag &, TPos &)
+{
+	return;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////	
+//Recursive Refinement
+//refine position node_i on sequence seq_i
+template<typename TValue, typename TAlignmentString, typename TStringSet,typename TGraph, typename TPropertyMap,typename TSeqMap, typename TTagSpec>
+inline void
+_refine(TValue node_i, 
+	 TValue seq_i_id, 
+	 TStringSet & seqs,
+	 TSeqMap & seq_map,
+	 TAlignmentString & alis, 
+	 String<TGraph> & gs, 
+	 String<TPropertyMap> & pms, 
+     String<std::set<TValue> > & all_nodes, 
+	 TValue min_len,
+	 Tag<TTagSpec> tag)
+{
+SEQAN_CHECKPOINT
+	typedef typename Cargo<typename Value<TPropertyMap>::Type>::Type TAlignmentPointer;
+	typedef typename Iterator<String<TAlignmentPointer>, Rooted>::Type TSegmentIterator;
+	//find all segment matches that contain the current position (node_i)
+	String<TAlignmentPointer> relevant_segments;
+	TValue seq_i_pos = idToPosition(seqs,seq_i_id);
+	findIntervalsExcludeTouching(gs[seq_i_pos],pms[seq_i_pos],node_i,relevant_segments);
+
+	
+	TSegmentIterator segment_it = begin(relevant_segments);
+	TSegmentIterator segment_end = end(relevant_segments);
+	//foreach of those segments
+	while(segment_it != segment_end)
+	{
+		TValue match_id = (*segment_it).i1;
+		TValue seg_num = (*segment_it).i2; // first or second segment in seg match
+
+		//get the sequence that node_i needs to be projected onto (seq_j)
+		//and get the projected position (pos_j)
+		TValue seq_j_id, node_j;
+		_getOtherSequenceAndProject(alis[match_id],seg_num,seq_map,seq_i_id,node_i,seq_j_id,node_j);
+		TValue seq_j_pos = idToPosition(seqs,seq_j_id);
+		_updateCutPosition(alis[match_id],node_j);
+
+		typename std::set<TValue>::iterator iter;
+		iter = all_nodes[seq_j_pos].find(node_j);
+		
+		//if node does not exist yet ---> insert and continue cutting
+		if(_cutIsValid(all_nodes,seq_j_pos,node_j,iter,min_len,tag))
+		{
+			all_nodes[seq_j_pos].insert(node_j);
+			_refine(node_j,seq_j_id,seqs,seq_map,alis,gs,pms,all_nodes,min_len,tag);
+			//TODO: else //verschmelzen, abschneiden und �bergehen, erst sp�ter... 	
+			//do nothing or resolve problems  
+		}
+	
+		++segment_it;
+	}
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////	
+//Construct interval trees 
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//construct intervals from allignments for each sequence (other Alignment types)
+template<typename TInterval, typename TStringSet, typename TAlignmentString, typename TSeqMap>
+void
+_buildIntervalsForAllSequences(TAlignmentString & alis, 
+							   String<String<TInterval> > & intervals, 
+	   						   TStringSet & seqs,
+							   TSeqMap & seq_map)
+{
+SEQAN_CHECKPOINT
+	
+	typedef typename Value<TInterval>::Type TValue;
+	typedef typename Cargo<TInterval>::Type TCargo;
+	typedef typename Iterator<TAlignmentString,Standard>::Type TAliIterator;
+	TAliIterator ali_it = begin(alis,Standard());
+	TAliIterator ali_end = end(alis,Standard());
+	TValue ali_counter = 0;
+	//foreach alignment
+	while(ali_it != ali_end)
+	{
+		TValue seq_i_id,begin_,end_;
+	
+		//get the first sequence (and its begin and end) that takes part in the alignment (seq_i)
+		_getSeqBeginAndEnd(*ali_it,seq_map,seq_i_id,begin_,end_,0);
+		TValue seq_i_pos = idToPosition(seqs, seq_i_id);
+		//and append the interval (ali_begin, ali_end) with cargo ali* to the list of intervals of seq_i
+		appendValue(intervals[seq_i_pos],IntervalAndCargo<TValue,TCargo>(begin_,end_,TCargo(ali_counter,0))); 
+	
+		//get the second sequence (and its begin and end) that takes part in the alignment (seq_i)
+		_getSeqBeginAndEnd(*ali_it,seq_map,seq_i_id,begin_,end_,1);
+		seq_i_pos = idToPosition(seqs, seq_i_id);
+		//and again append the interval (ali_begin, ali_end) with cargo ali* to the list of intervals of seq_i
+		appendValue(intervals[seq_i_pos],IntervalAndCargo<TValue,TCargo>(begin_,end_,TCargo(ali_counter,1))); 
+	
+		++ali_counter;
+		++ali_it;
+	}
+}
+
+
+//get all intervals from the alignments and construct an interval tree for each sequence
+template<typename TGraph, typename TPropertyMap, typename TAlignmentString, typename TSequence, typename TSetSpec, typename TValue, typename TSeqMap>
+void
+_createTreesForAllSequences(String<TGraph> & gs, 
+						   String<TPropertyMap> & pms, 
+						   TAlignmentString & alis, 
+						   StringSet<TSequence,TSetSpec> & seqs,
+                           TSeqMap & seq_map,
+						   TValue numSequences)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TAlignmentString>::Type TAlignment;
+//	typedef TValue TCargo;
+	typedef Pair<unsigned,unsigned,BitCompressed<31,1> > TCargo;
+	typedef IntervalAndCargo<int,TCargo> TInterval;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	
+	//std::cout <<"create interval trees...";
+	clock_t start, finish1;
+	double duration;
+	start = clock();
+	//one tree for each sequence
+	resize(gs,numSequences);
+	resize(pms,numSequences);
+	
+	//and one string of intervals for each sequence
+	String<String<TInterval> > intervals;
+	resize(intervals,numSequences);
+	//fill intervals
+	_buildIntervalsForAllSequences(alis,intervals,seqs,seq_map);
+	
+	TValue i = 0;
+	
+	while(i < numSequences)
+	{
+		//std::cout << (numSequences-i) <<" more ("<<length(intervals[i])<<" intervals)... "<<std::flush;
+		//vllt zum speicher sparen: numSequences mal alle alis durchgehen
+		//und jedes mal nur buildIntervalsForJustOneSequence(); 
+		TValue center = length(seqs[i])/2; // center raus, hat hier nix zu suchen
+		//create interval tree!
+		createIntervalTree(gs[i],pms[i],intervals[i],center);
+		
+		//intervals for sequence i are not needed anymore
+		clear(intervals[i]);
+		++i;
+	}
+	finish1 = clock();
+	duration = (double)(finish1 - start) / CLOCKS_PER_SEC;
+	//std::cout << "\ntook " << duration << " seconds.\n";
+}
+
+
+//step 1 of constructing the refined alignment graph: create all the nodes
+template<typename TStringSet,typename TValue,typename TAliGraph>
+void
+_makeRefinedGraphNodes(String<std::set<TValue> > & all_nodes,
+					  TStringSet & seqs,
+					  TAliGraph & ali_g)
+{
+SEQAN_CHECKPOINT
+	typedef typename std::set<TValue>::iterator TSetIterator;
+	//for each sequence look at all cut positions and create nodes between them
+	for(unsigned int seq_i_pos = 0; seq_i_pos < length(seqs); ++seq_i_pos)
+	{
+		TValue seq_i_id = positionToId(stringSet(ali_g), seq_i_pos);
+		TSetIterator it = all_nodes[seq_i_pos].begin();
+		TSetIterator end_it = all_nodes[seq_i_pos].end();
+		TSetIterator next_it = it;
+		if(next_it != end_it)
+			++next_it;
+		else
+			addVertex(ali_g, seq_i_id, 0, length(seqs[seq_i_pos]));
+		
+		//first unaligned node
+		if(it != end_it && *it != 0)
+			addVertex(ali_g, seq_i_id, 0, *it);
+		//a new node for each interval
+		while(next_it != end_it)
+		{
+			TValue pos_i = *it;
+			addVertex(ali_g, seq_i_id, pos_i, *next_it - pos_i); 
+			++it;
+			++next_it;
+		}
+		//last unaligned node
+		if(it !=end_it && *it<length(seqs[seq_i_pos]))
+			addVertex(ali_g, seq_i_id, *it, (length(seqs[seq_i_pos])) - *it);
+		all_nodes[seq_i_pos].clear();
+	}
+}
+
+
+//step 2 of constructing the refined alignment graph: add all edges    
+//version for exact refinement
+template<typename TAlignmentString,typename TStringSet,typename TSeqMap, typename TPropertyMap,typename TScore,typename TAliGraph>
+void
+_makeRefinedGraphEdges(TAlignmentString & alis,
+					   TPropertyMap & pm,
+					  TStringSet & seqs,
+				      TSeqMap & seq_map,
+				      TScore & score_type,
+					  TAliGraph & ali_g,
+					  Tag<TagExactRefinement_> const)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TAlignmentString>::Type TAlign;
+	typedef typename Size<TAlign>::Type TValue;
+	typedef typename Iterator<TAlignmentString, Rooted>::Type TAliIterator;
+	typedef typename VertexDescriptor<TAliGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TAliGraph>::Type TEdgeDescriptor;
+	typedef typename Cargo<TAliGraph>::Type TCargo;
+	//make edges
+	TAliIterator ali_it = begin(alis);
+	TAliIterator ali_end = end(alis);
+	//for each segment/fragment/alignment
+	while(ali_it != ali_end)
+	{
+		//get sequence, begin position and end position
+		TValue seq_id,begin_pos,end_pos;
+		_getSeqBeginAndEnd(*ali_it,seq_map,seq_id,begin_pos,end_pos,(TValue)0);
+		
+		//get the node represents the current interval (begin_pos until next_cut_pos or end_pos)
+		TVertexDescriptor act_knot = findVertex(ali_g,seq_id,begin_pos);
+		TValue act_pos = begin_pos;
+	
+		//for each interval that lies within the current segment/fragement/alignment
+		while(act_pos < end_pos)
+		{
+			//get other sequence and projected position
+			TValue seq_j_id,pos_j;
+			_getOtherSequenceAndProject(*ali_it,(TValue)0,seq_map,seq_id,act_pos,seq_j_id,pos_j);
+			//find node that contains the projected position (pos_j)
+			TVertexDescriptor vd = findVertex(ali_g, seq_j_id, pos_j);
+		
+			SEQAN_ASSERT_TRUE(fragmentBegin(ali_g,vd)==pos_j);
+			typename Value<TScore>::Type score = _getRefinedMatchScore(score_type,seqs,*ali_it,act_pos,pos_j,fragmentLength(ali_g,act_knot),fragmentLength(ali_g,vd));//,fragmentLength(ali_g,vd));
+	//		typename Value<TScore>::Type score = fragmentLength(ali_g,vd);
+			score *= _getRefinedAnnoScore(ali_g,pm,vd,act_knot,score_type);
+		//this needs to be generalized (makes sense for positive scores only)
+			if(score <= 0) score = 1;
+			if(score > 0)
+			{
+				if (findEdge(ali_g, act_knot, vd) == 0) addEdge(ali_g,act_knot,vd,(TCargo)score);
+				else {
+					TEdgeDescriptor ed = findEdge(ali_g, act_knot, vd);
+					//if((TCargo)score > getCargo(ed))
+						//assignCargo(ed, score);
+					assignCargo(ed, getCargo(ed)+score);
+				}
+			}
+			//prepare for next interval
+			act_pos += fragmentLength(ali_g,act_knot);
+			act_knot = findVertex(ali_g,seq_id,act_pos);
+		
+		}
+		++ali_it;
+	}
+}
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////
+//build refined alignment graph 
+////////////////////////////////////////////////////////////////////////////////////////
+//nodes are numbered ascendingly:
+//seq1   0  1  2  3  4 
+//seq2   5  6  7  8  9 10
+//seq3  11 12 13 14 15 
+template<typename TValue,typename TAlignmentString,typename TScore,typename TSequence, typename TSetSpec,typename TAliGraph,typename TSeqMap,typename TTagSpec>
+void
+_makeAlignmentGraphFromRefinedSegments(String<std::set<TValue> > & all_nodes,
+				   TAlignmentString & alis,
+				   TScore & score_type,
+				   StringSet<TSequence, TSetSpec> & seqs,
+				   TSeqMap & seq_map,
+				   TAliGraph & ali_g,
+			   	   Tag<TTagSpec> const tag, 
+				   bool)
+{
+SEQAN_CHECKPOINT
+	//std::cout << "making refined alignment graph...";
+	//clock_t start, finish1;
+	//double duration;
+	//start = clock();
+	
+	//make nodes (same function for inexact and exact refinement)
+	_makeRefinedGraphNodes(all_nodes,seqs,ali_g);
+
+	bool pm = false;
+	//add edges (different functions depending on exact/inexact refinement)
+	_makeRefinedGraphEdges(alis,pm,seqs,seq_map,score_type,ali_g,tag);
+	
+	//std::cout << "check\n";
+	//finish1 = clock();
+	//duration = (double)(finish1 - start) / CLOCKS_PER_SEC;
+	//std::cout << "\ntook " << duration << " seconds.\n";
+}
+
+
+      
+template<typename TValue,typename TAlignmentString,typename TScore,typename TSequence, typename TSetSpec,typename TAliGraph,typename TSeqMap,typename TAnnoString,typename TTagSpec>
+void
+_makeAlignmentGraphFromRefinedSegments(String<std::set<TValue> > & all_nodes,
+				   TAlignmentString & alis,
+				   TScore & score_type,
+				   StringSet<TSequence, TSetSpec> & seqs,
+				   TSeqMap & seq_map,
+				   TAliGraph & ali_g,
+			   	   Tag<TTagSpec> const tag,
+				   TAnnoString & annotation)
+{
+SEQAN_CHECKPOINT
+	//std::cout << "making refined alignment graph...";
+	//clock_t start, finish1;
+	//double duration;
+	//start = clock();
+	
+	//make nodes (same function for inexact and exact refinement)
+	_makeRefinedGraphNodes(all_nodes,seqs,ali_g);
+
+	//add annotation to nodes
+	typedef typename Value<TAnnoString>::Type TAnnotation;
+	//typedef typename Value<TAnnotation>::Type TLabel;
+	typedef char TLabel;
+	String<String<TLabel> > pm;
+	_addNodeAnnotation(seqs,seq_map,annotation,pm,ali_g,tag);
+
+	//add edges (different functions depending on exact/inexact refinement)
+	_makeRefinedGraphEdges(alis,pm,seqs,seq_map,score_type,ali_g,tag);
+	
+	//std::cout << "check\n";
+	//finish1 = clock();
+	//duration = (double)(finish1 - start) / CLOCKS_PER_SEC;
+	//std::cout << "\ntook " << duration << " seconds.\n";
+}
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////
+//The big matchRefinement function that does everything: build interval trees, do the 
+//refinement and construct a refined alignment graph
+////////////////////////////////////////////////////////////////////////////////////////
+template<typename TAlignmentString, typename TAnnotation, typename TOutGraph, typename TSequence, typename TSetSpec, typename TScore,typename TTagSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				StringSet<TSequence, TSetSpec> & seq, 
+				TScore & score_type,
+				TOutGraph & ali_graph,
+				typename Size<typename Value<TAlignmentString>::Type>::Type min_fragment_len,
+				TAnnotation & annotation,
+				Tag<TTagSpec> const tag)
+{
+SEQAN_CHECKPOINT
+	////////////////////////////////////////////////////////////////
+	//typedefs
+	typedef typename Value<TAlignmentString>::Type TAlign;
+	typedef typename Iterator<TAlignmentString, Rooted>::Type TAliIterator;
+	typedef typename Size<TAlign>::Type TValue;
+//	typedef TValue TCargo;
+	typedef Pair<unsigned,unsigned,BitCompressed<31,1> > TCargo;
+	typedef IntervalAndCargo<int,TCargo> TInterval;
+	typedef Graph<Directed<void,WithoutEdgeId> > TGraph;
+	typedef IntervalTreeNode<TInterval> TNode;
+	typedef String<TNode> TPropertyMap;
+	typedef VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef String<TCargo> TList;
+	typedef typename std::set<TValue>::iterator TSetIterator;
+	
+	////////////////////////////////////////////////////////////////
+	TValue numSequences = length(seq);
+	//weird ID --> good ID map
+	std::map<const void * ,int> seq_map;
+	for(int i = 0; i < (int) numSequences; ++i)
+		seq_map[id(seq[i])] = i;
+	////////////////////////////////////////////////////////////////
+	//build interval trees
+	String<TGraph> gs;
+	String<TPropertyMap> pms;
+	_createTreesForAllSequences(gs, pms, alis, seq, seq_map, numSequences);
+	
+	////////////////////////////////////////////////////////////////
+	//do refinement
+	//std::cout <<"refining..."<<std::flush;
+	clock_t start, finish1;
+	double duration;
+	start = clock();
+	
+	//all_nodes = set of all cut positions
+	String<std::set<TValue> > all_nodes;
+	resize(all_nodes,numSequences);
+	//call function _refine for each startknoten
+	TAliIterator ali_it = begin(alis);
+	TAliIterator ali_end = end(alis);
+	//for each segment/fragement/alignment
+	while(ali_it != ali_end)
+	{
+		//for each of the two sequences
+		for(TValue i = 0; i < 2; ++i)
+		{
+			TValue seq_i_id,begin_i,end_i;
+			_getSeqBeginAndEnd(*ali_it,seq_map,seq_i_id,begin_i,end_i,i);
+			TValue seq_i_pos = idToPosition(seq,seq_i_id);
+			
+			//refine begin
+			TSetIterator iter = all_nodes[seq_i_pos].find(begin_i);		
+			if(_cutIsValid(all_nodes,seq_i_pos,begin_i,iter,min_fragment_len,tag))
+			{
+				all_nodes[seq_i_pos].insert(begin_i);
+				_refine(begin_i, seq_i_id, seq, seq_map, alis, gs,pms,all_nodes,min_fragment_len,tag);//TStop());
+			}
+			//and end position
+			iter = all_nodes[seq_i_pos].find(end_i);		
+			if(_cutIsValid(all_nodes,seq_i_pos,end_i,iter,(TValue) min_fragment_len,tag))
+			{
+				all_nodes[seq_i_pos].insert(end_i);
+				_refine(end_i, seq_i_id, seq, seq_map, alis, gs,pms,all_nodes, min_fragment_len,tag);//TStop());
+			}
+		}	
+		++ali_it;
+	}
+
+	_addAnnotationCuts(all_nodes,alis,gs,pms,seq,seq_map,annotation,min_fragment_len,tag);
+
+	finish1 = clock();
+	duration = (double)(finish1 - start) / CLOCKS_PER_SEC;
+	//std::cout << "\ntook " << duration << " seconds.\n";
+	//for(int seq_i = 0; seq_i < length(seq); ++seq_i)
+	//{
+	//	typename std::set<TValue>::iterator it = all_nodes[seq_i].begin();
+	//	typename std::set<TValue>::iterator end_it = all_nodes[seq_i].end();
+	//
+	//	while(it != end_it)
+	//	{
+	//		std::cout << *it << ",";
+	//		++it;
+	//	}
+	//	std::cout << "\n";
+	//}
+	//std::cout <<"building tree..."<<std::flush;
+	
+	////////////////////////////////////////////////////////////////
+	//build refined alignment graph
+	_makeAlignmentGraphFromRefinedSegments(all_nodes,alis,score_type,seq,seq_map,ali_graph,tag,annotation);
+}
+
+
+///////WRAPPERS
+
+//exact refinement, score type given
+template<typename TAlignmentString, typename TScoreValue,typename TScoreSpec,typename TOutGraph, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				StringSet<TSequence, TSetSpec> & seq, 
+				Score<TScoreValue,TScoreSpec> & score_type,
+				TOutGraph & ali_graph)
+{
+SEQAN_CHECKPOINT
+	//min_fragment_len = 1   ==> Exact cutting
+	bool anno = false;
+	matchRefinement(alis,seq,score_type,ali_graph,1,anno,ExactRefinement());
+}
+
+
+//exact refinement, score type not given
+template<typename TFragmentString, typename TOutGraph, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TFragmentString & matches,
+				StringSet<TSequence, TSetSpec> & strSet, 
+				TOutGraph & ali_graph)
+{
+	SEQAN_CHECKPOINT
+	typename Cargo<TOutGraph>::Type fake_score = 1;
+	bool anno = false;
+	matchRefinement(matches,strSet,fake_score,ali_graph,1,anno,ExactRefinement());
+}
+
+
+}
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_exact_iterative.h b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_exact_iterative.h
new file mode 100644
index 0000000..4a49450
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_exact_iterative.h
@@ -0,0 +1,666 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_REFINE_EXACT_H
+#define SEQAN_HEADER_GRAPH_REFINE_EXACT_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+	
+struct TagExactRefinement_;
+typedef Tag<TagExactRefinement_> const ExactRefinement;
+
+//exact method, every cut is made (unless it already exists)
+template<typename TValue>
+inline bool
+_cutIsValid(String<std::set<TValue> > & all_nodes,
+		TValue seq_i_pos,
+		TValue,
+		typename std::set<TValue>::iterator iter,
+		TValue,
+		Tag<TagExactRefinement_> const)
+{
+SEQAN_CHECKPOINT
+	//cut already exists
+	if(iter != all_nodes[seq_i_pos].end())
+		return false;
+	return true;
+}
+
+
+template<typename TSize, typename TSpec,typename TPos>
+inline void
+_updateCutPosition(Fragment<TSize, ExactReversableFragment<TSpec> > & f, TPos & pos_j)
+{
+	if(f.reversed)
+		++pos_j;
+}
+//template<typename TSize, typename TSpec,typename TPos>
+//inline void
+//_updateCutPosition(Fragment<TSize, ExactReversableFragment<TSpec> > const& f, TPos & pos_j)
+//{
+//	if(f.reversed)
+//		++pos_j;
+//}
+
+
+template<typename TFrag,typename TPos>
+inline void
+_updateCutPosition(TFrag &, TPos &)
+{
+	return;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////	
+//Recursive Refinement
+//refine position node_i on sequence seq_i
+template<typename TValue, typename TAlignmentString, typename TStringSet,typename TGraph, typename TPropertyMap,typename TSeqMap, typename TTagSpec>
+inline void
+_refine(TValue node_i, 
+	 TValue seq_i_id, 
+	 TStringSet & seqs,
+	 TSeqMap & seq_map,
+	 TAlignmentString & alis, 
+	 String<TGraph> & gs, 
+	 String<TPropertyMap> & pms, 
+     String<std::set<TValue> > & all_nodes, 
+	 TValue min_len,
+	 Tag<TTagSpec> tag)
+{
+SEQAN_CHECKPOINT
+	typedef typename Cargo<typename Value<TPropertyMap>::Type>::Type TAlignmentPointer;
+	typedef typename Iterator<String<TAlignmentPointer>, Rooted>::Type TSegmentIterator;
+	//find all segment matches that contain the current position (node_i)
+	String<TAlignmentPointer> relevant_segments;
+	TValue seq_i_pos = idToPosition(seqs,seq_i_id);
+	findIntervalsExcludeTouching(gs[seq_i_pos],pms[seq_i_pos],node_i,relevant_segments);
+
+	
+	TSegmentIterator segment_it = begin(relevant_segments);
+	TSegmentIterator segment_end = end(relevant_segments);
+	//foreach of those segments
+	while(segment_it != segment_end)
+	{
+		TValue match_id = (*segment_it).i1; // segment match
+		TValue seg_num = (*segment_it).i2; // first or second segment in segment match?
+
+		//get the sequence that node_i needs to be projected onto (seq_j)
+		//and get the projected position (pos_j)
+		TValue seq_j_id, node_j;
+		_getOtherSequenceAndProject(alis[match_id],seg_num,seq_map,seq_i_id,node_i,seq_j_id,node_j);
+		TValue seq_j_pos = idToPosition(seqs,seq_j_id);
+		_updateCutPosition(alis[match_id],node_j);
+
+		typename std::set<TValue>::iterator iter;
+		iter = all_nodes[seq_j_pos].find(node_j);
+		
+		//if node does not exist yet ---> insert and continue cutting
+		if(_cutIsValid(all_nodes,seq_j_pos,node_j,iter,min_len,tag))
+		{
+			all_nodes[seq_j_pos].insert(node_j);
+			_refine(node_j,seq_j_id,seqs,seq_map,alis,gs,pms,all_nodes,min_len,tag);
+			//TODO: else //verschmelzen, abschneiden und �bergehen, erst sp�ter... 	
+			//do nothing or resolve problems  
+		}
+	
+		++segment_it;
+	}
+}
+
+//template<typename TFragSize, typename TFragSpec>
+//void
+//printMatch(Fragment<TFragSize,TFragSpec> & f)
+//{
+//	::std::cout << "FRAGMENT:" << " f.len = "<< f.len <<std::endl;
+//	::std::cout << "f.seqId1 = "<< f.seqId1 << " f.begin1 = " << f.begin1 << std::endl;
+//	::std::cout << "f.seqId2 = "<< f.seqId2 << " f.begin2 = " << f.begin2 << std::endl;
+//}
+
+//template<typename TAlign>
+//void
+//printMatch(TAlign & f)
+//{
+//	::std::cout << f;
+//}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////	
+//Construct interval trees 
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//construct intervals from allignments for each sequence (other Alignment types)
+template<typename TInterval, typename TStringSet, typename TAlignmentString, typename TSeqMap>
+void
+_buildIntervalsForAllSequences(TAlignmentString & alis, 
+							   String<String<TInterval> > & intervals, 
+	   						   TStringSet & seqs,
+							   TSeqMap & seq_map)
+{
+SEQAN_CHECKPOINT
+	
+	typedef typename Value<TInterval>::Type TValue;
+	typedef typename Cargo<TInterval>::Type TCargo;
+	typedef typename Iterator<TAlignmentString,Standard>::Type TAliIterator;
+	TAliIterator ali_it = begin(alis,Standard());
+	TAliIterator ali_end = end(alis,Standard());
+	TValue ali_counter = 0;
+	//foreach alignment
+	while(ali_it != ali_end)
+	{
+		TValue seq_i_id,begin_,end_;
+		//printMatch(*ali_it);
+		//get the first sequence (and its begin and end) that takes part in the alignment (seq_i)
+		_getSeqBeginAndEnd(*ali_it,seq_map,seq_i_id,begin_,end_,0);
+		TValue seq_i_pos = idToPosition(seqs, seq_i_id);
+		//and append the interval (ali_begin, ali_end) with cargo ali* to the list of intervals of seq_i
+		appendValue(intervals[seq_i_pos],IntervalAndCargo<TValue,TCargo>(begin_,end_,TCargo(ali_counter,0))); 
+	
+		//get the second sequence (and its begin and end) that takes part in the alignment (seq_i)
+		_getSeqBeginAndEnd(*ali_it,seq_map,seq_i_id,begin_,end_,1);
+		seq_i_pos = idToPosition(seqs, seq_i_id);
+		//and again append the interval (ali_begin, ali_end) with cargo ali* to the list of intervals of seq_i
+		appendValue(intervals[seq_i_pos],IntervalAndCargo<TValue,TCargo>(begin_,end_,TCargo(ali_counter,1))); 
+	
+		++ali_counter;
+		++ali_it;
+	}
+
+}
+
+
+//get all intervals from the alignments and construct an interval tree for each sequence
+template<typename TGraph, typename TPropertyMap, typename TAlignmentString, typename TSequence, typename TSetSpec, typename TValue, typename TSeqMap>
+void
+_createTreesForAllSequences(String<TGraph> & gs, 
+						   String<TPropertyMap> & pms, 
+						   TAlignmentString & alis, 
+						   StringSet<TSequence,TSetSpec> & seqs,
+                           TSeqMap & seq_map,
+						   TValue numSequences)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TAlignmentString>::Type TAlignment;
+//	typedef TAlignment* TCargo;
+	typedef Pair<unsigned,unsigned,BitCompressed<31,1> > TCargo;
+	typedef IntervalAndCargo<int,TCargo> TInterval;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	
+	//std::cout <<"create interval trees...";
+	clock_t start, finish1;
+	double duration;
+	start = clock();
+	//one tree for each sequence
+	resize(gs,numSequences);
+	resize(pms,numSequences);
+	
+	//and one string of intervals for each sequence
+	String<String<TInterval> > intervals;
+	resize(intervals,numSequences);
+	//fill intervals
+	_buildIntervalsForAllSequences(alis,intervals,seqs,seq_map);
+	
+	TValue i = 0;
+	
+	while(i < numSequences)
+	{
+		//std::cout << (numSequences-i) <<" more ("<<length(intervals[i])<<" intervals)... "<<std::flush;
+		//vllt zum speicher sparen: numSequences mal alle alis durchgehen
+		//und jedes mal nur buildIntervalsForJustOneSequence(); 
+		TValue center = length(seqs[i])/2; // center raus, hat hier nix zu suchen
+		//create interval tree!
+		createIntervalTree(gs[i],pms[i],intervals[i],center);
+		
+		//intervals for sequence i are not needed anymore
+		clear(intervals[i]);
+		++i;
+	}
+	finish1 = clock();
+	duration = (double)(finish1 - start) / CLOCKS_PER_SEC;
+	//std::cout << "\ntook " << duration << " seconds.\n";
+}
+
+
+//step 1 of constructing the refined alignment graph: create all the nodes
+template<typename TStringSet,typename TValue,typename TAliGraph>
+void
+_makeRefinedGraphNodes(String<std::set<TValue> > & all_nodes,
+					  TStringSet & seqs,
+					  TAliGraph & ali_g)
+{
+SEQAN_CHECKPOINT
+	typedef typename std::set<TValue>::iterator TSetIterator;
+	//for each sequence look at all cut positions and create nodes between them
+	for(unsigned int seq_i_pos = 0; seq_i_pos < length(seqs); ++seq_i_pos)
+	{
+		TValue seq_i_id = positionToId(stringSet(ali_g), seq_i_pos);
+		TSetIterator it = all_nodes[seq_i_pos].begin();
+		TSetIterator end_it = all_nodes[seq_i_pos].end();
+		TSetIterator next_it = it;
+		if(next_it != end_it)
+			++next_it;
+		else
+			addVertex(ali_g, seq_i_id, 0, length(seqs[seq_i_pos]));
+		
+		//first unaligned node
+		if(it != end_it && *it != 0)
+			addVertex(ali_g, seq_i_id, 0, *it);
+		//a new node for each interval
+		while(next_it != end_it)
+		{
+			TValue pos_i = *it;
+			addVertex(ali_g, seq_i_id, pos_i, *next_it - pos_i); 
+			++it;
+			++next_it;
+		}
+		//last unaligned node
+		if(it !=end_it && *it<length(seqs[seq_i_pos]))
+			addVertex(ali_g, seq_i_id, *it, (length(seqs[seq_i_pos])) - *it);
+		all_nodes[seq_i_pos].clear();
+	}
+}
+
+
+//step 2 of constructing the refined alignment graph: add all edges    
+//version for exact refinement
+template<typename TAlignmentString,typename TStringSet,typename TSeqMap, typename TPropertyMap,typename TScore,typename TAliGraph>
+void
+_makeRefinedGraphEdges(TAlignmentString & alis,
+					   TPropertyMap & pm,
+					  TStringSet & seqs,
+				      TSeqMap & seq_map,
+				      TScore & score_type,
+					  TAliGraph & ali_g,
+					  Tag<TagExactRefinement_> const)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TAlignmentString>::Type TAlign;
+	typedef typename Size<TAlign>::Type TValue;
+	typedef typename Iterator<TAlignmentString, Rooted>::Type TAliIterator;
+	typedef typename VertexDescriptor<TAliGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TAliGraph>::Type TEdgeDescriptor;
+	typedef typename Cargo<TAliGraph>::Type TCargo;
+	//make edges
+	TAliIterator ali_it = begin(alis);
+	TAliIterator ali_end = end(alis);
+	//for each segment/fragment/alignment
+	while(ali_it != ali_end)
+	{
+		//get sequence, begin position and end position
+		TValue seq_id,begin_pos,end_pos;
+		_getSeqBeginAndEnd(*ali_it,seq_map,seq_id,begin_pos,end_pos,(TValue)0);
+		
+		//get the node represents the current interval (begin_pos until next_cut_pos or end_pos)
+		TVertexDescriptor act_knot = findVertex(ali_g,seq_id,begin_pos);
+		TValue act_pos = begin_pos;
+	
+		//for each interval that lies within the current segment/fragement/alignment
+		while(act_pos < end_pos)
+		{
+			//get other sequence and projected position
+			TValue seq_j_id,pos_j;
+			_getOtherSequenceAndProject(*ali_it,(TValue)0,seq_map,seq_id,act_pos,seq_j_id,pos_j);
+			//find node that contains the projected position (pos_j)
+			TVertexDescriptor vd = findVertex(ali_g, seq_j_id, pos_j);
+		
+			SEQAN_ASSERT_TRUE(fragmentBegin(ali_g,vd)==pos_j);
+			typename Value<TScore>::Type score = _getRefinedMatchScore(score_type,seqs,*ali_it,act_pos,pos_j,fragmentLength(ali_g,act_knot),fragmentLength(ali_g,vd));//,fragmentLength(ali_g,vd));
+	//		typename Value<TScore>::Type score = fragmentLength(ali_g,vd);
+			score *= _getRefinedAnnoScore(ali_g,pm,vd,act_knot,score_type);
+		//this needs to be generalized (makes sense for positive scores only)
+			if(score <= 0) score = 1;
+			if(score > 0)
+			{
+				if (findEdge(ali_g, act_knot, vd) == 0) addEdge(ali_g,act_knot,vd,(TCargo)score);
+				else {
+					TEdgeDescriptor ed = findEdge(ali_g, act_knot, vd);
+					//if((TCargo)score > getCargo(ed))
+						//assignCargo(ed, score);
+					assignCargo(ed, getCargo(ed)+score);
+				}
+			}
+			//prepare for next interval
+			act_pos += fragmentLength(ali_g,act_knot);
+			act_knot = findVertex(ali_g,seq_id,act_pos);
+		
+		}
+		++ali_it;
+	}
+}
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////
+//build refined alignment graph 
+////////////////////////////////////////////////////////////////////////////////////////
+//nodes are numbered ascendingly:
+//seq1   0  1  2  3  4 
+//seq2   5  6  7  8  9 10
+//seq3  11 12 13 14 15 
+template<typename TValue,typename TAlignmentString,typename TScore,typename TSequence, typename TSetSpec,typename TAliGraph,typename TSeqMap,typename TTagSpec>
+void
+_makeAlignmentGraphFromRefinedSegments(String<std::set<TValue> > & all_nodes,
+				   TAlignmentString & alis,
+				   TScore & score_type,
+				   StringSet<TSequence, TSetSpec> & seqs,
+				   TSeqMap & seq_map,
+				   TAliGraph & ali_g,
+			   	   Tag<TTagSpec> const tag, 
+				   bool)
+{
+SEQAN_CHECKPOINT
+	//std::cout << "making refined alignment graph...";
+	//clock_t start, finish1;
+	//double duration;
+	//start = clock();
+	
+	//make nodes (same function for inexact and exact refinement)
+	_makeRefinedGraphNodes(all_nodes,seqs,ali_g);
+
+	bool pm = false;
+	//add edges (different functions depending on exact/inexact refinement)
+	_makeRefinedGraphEdges(alis,pm,seqs,seq_map,score_type,ali_g,tag);
+	
+	//std::cout << "check\n";
+	//finish1 = clock();
+	//duration = (double)(finish1 - start) / CLOCKS_PER_SEC;
+	//std::cout << "\ntook " << duration << " seconds.\n";
+}
+
+
+      
+template<typename TValue,typename TAlignmentString,typename TScore,typename TSequence, typename TSetSpec,typename TAliGraph,typename TSeqMap,typename TAnnoString,typename TTagSpec>
+void
+_makeAlignmentGraphFromRefinedSegments(String<std::set<TValue> > & all_nodes,
+				   TAlignmentString & alis,
+				   TScore & score_type,
+				   StringSet<TSequence, TSetSpec> & seqs,
+				   TSeqMap & seq_map,
+				   TAliGraph & ali_g,
+			   	   Tag<TTagSpec> const tag,
+				   TAnnoString & annotation)
+{
+SEQAN_CHECKPOINT
+	//std::cout << "making refined alignment graph...";
+	//clock_t start, finish1;
+	//double duration;
+	//start = clock();
+	
+	//make nodes (same function for inexact and exact refinement)
+	_makeRefinedGraphNodes(all_nodes,seqs,ali_g);
+
+	//add annotation to nodes
+	typedef typename Value<TAnnoString>::Type TAnnotation;
+	//typedef typename Value<TAnnotation>::Type TLabel;
+	typedef char TLabel;
+	String<String<TLabel> > pm;
+	_addNodeAnnotation(seqs,seq_map,annotation,pm,ali_g,tag);
+
+	//add edges (different functions depending on exact/inexact refinement)
+	_makeRefinedGraphEdges(alis,pm,seqs,seq_map,score_type,ali_g,tag);
+	
+	//std::cout << "check\n";
+	//finish1 = clock();
+	//duration = (double)(finish1 - start) / CLOCKS_PER_SEC;
+	//std::cout << "\ntook " << duration << " seconds.\n";
+}
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////
+//The big matchRefinement function that does everything: build interval trees, do the 
+//refinement and construct a refined alignment graph
+////////////////////////////////////////////////////////////////////////////////////////
+template<typename TAlignmentString, typename TAnnotation, typename TOutGraph, typename TSequence, typename TSetSpec, typename TScore,typename TTagSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				StringSet<TSequence, TSetSpec> & seq, 
+				TScore & score_type,
+				TOutGraph & ali_graph,
+				typename Size<typename Value<TAlignmentString>::Type>::Type min_fragment_len,
+				TAnnotation & annotation,
+				Tag<TTagSpec> const tag)
+{
+SEQAN_CHECKPOINT
+	////////////////////////////////////////////////////////////////
+	//typedefs
+	typedef typename Value<TAlignmentString>::Type TAlign;
+	typedef typename Iterator<TAlignmentString, Rooted>::Type TAliIterator;
+	typedef typename Size<TAlign>::Type TValue;
+//	typedef TValue TCargo;
+//	typedef Pair<unsigned,unsigned,BitCompressed<31,1> > TCargo;
+	typedef Pair<unsigned,unsigned,BitCompressed<31,1> > TCargo;
+	typedef IntervalAndCargo<int,TCargo> TInterval;
+	typedef Graph<Directed<void,WithoutEdgeId> > TGraph;
+	typedef IntervalTreeNode<TInterval> TNode;
+	typedef String<TNode> TPropertyMap;
+	typedef VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef String<TCargo> TList;
+	typedef typename std::set<TValue>::iterator TSetIterator;
+	typedef typename Cargo<typename Value<TPropertyMap>::Type>::Type TAlignmentPointer;
+	typedef typename Iterator<String<TAlignmentPointer>, Rooted>::Type TSegmentIterator;
+	
+
+	////////////////////////////////////////////////////////////////
+	TValue numSequences = length(seq);
+	//weird ID --> good ID map
+	std::map<const void * ,int> seq_map;
+	for(int i = 0; i < (int) numSequences; ++i)
+		seq_map[id(seq[i])] = i;
+	////////////////////////////////////////////////////////////////
+	//build interval trees
+	String<TGraph> gs;
+	String<TPropertyMap> pms;
+	_createTreesForAllSequences(gs, pms, alis, seq, seq_map, numSequences);
+	
+	////////////////////////////////////////////////////////////////
+	//do refinement
+	//std::cout <<"refining..."<<std::flush;
+	clock_t start, finish1;
+	double duration;
+	start = clock();
+	
+	//all_nodes = set of all cut positions
+	String<std::set<TValue> > all_nodes;
+	resize(all_nodes,numSequences);
+
+	//all_nodes that need to be processed set of all cut positions
+	String<std::set<TValue> > all_node_queues;
+	resize(all_node_queues,numSequences);
+
+	//call function _refine for each startknoten
+	TAliIterator ali_it = begin(alis);
+	TAliIterator ali_end = end(alis);
+	//for each segment/fragement/alignment
+	while(ali_it != ali_end)
+	{
+		//for each of the two sequences
+		for(TValue i = 0; i < 2; ++i)
+		{
+			TValue seq_i_id,begin_i,end_i;
+			_getSeqBeginAndEnd(*ali_it,seq_map,seq_i_id,begin_i,end_i,i);
+			TValue seq_i_pos = idToPosition(seq,seq_i_id);
+			
+			all_node_queues[seq_i_pos].insert(begin_i);
+			all_node_queues[seq_i_pos].insert(end_i);
+		}	
+		++ali_it;
+	}
+
+
+	TSetIterator queueIt;
+	bool done = false;
+	while(!done)
+	{
+		for(unsigned seq_i_pos = 0; seq_i_pos < numSequences; ++seq_i_pos)
+		{
+			queueIt = all_node_queues[seq_i_pos].begin();
+			while (queueIt != all_node_queues[seq_i_pos].end())
+			{
+				TValue node_i = *queueIt;
+				TSetIterator iter = all_nodes[seq_i_pos].find(node_i);		
+				if(iter == all_nodes[seq_i_pos].end())
+				{
+					TValue seq_i_id = positionToId(seq, seq_i_pos);
+					all_nodes[seq_i_pos].insert(node_i);
+					String<TAlignmentPointer> relevant_segments;
+					findIntervalsExcludeTouching(gs[seq_i_pos],pms[seq_i_pos],node_i,relevant_segments);
+					
+					TSegmentIterator segment_it = begin(relevant_segments);
+					TSegmentIterator segment_end = end(relevant_segments);
+					//foreach of those segments
+					while(segment_it != segment_end)
+					{
+						TValue match_id = (*segment_it).i1;
+						TValue seg_num = (*segment_it).i2;						//get the sequence that node_i needs to be projected onto (seq_j)
+						//and get the projected position (pos_j)
+						TValue seq_j_id, node_j;
+						_getOtherSequenceAndProject(alis[match_id],seg_num,seq_map,seq_i_id,node_i,seq_j_id,node_j);
+						TValue seq_j_pos = idToPosition(seq,seq_j_id);
+						_updateCutPosition(alis[match_id],node_j);
+
+						typename std::set<TValue>::iterator iter_j;
+						iter_j = all_nodes[seq_j_pos].find(node_j);
+						
+						//if node does not exist yet ---> insert and continue cutting
+						if(iter_j == all_nodes[seq_j_pos].end())
+						{
+							all_node_queues[seq_j_pos].insert(node_j);
+						}
+					
+						++segment_it;
+					}
+						
+				}
+				++queueIt;
+			}
+			all_node_queues[seq_i_pos].clear();
+		}
+		unsigned i;
+		for(i = 0; i < numSequences; ++i)
+		{
+			queueIt = all_node_queues[i].begin();
+			if (queueIt != all_node_queues[i].end())
+				break;
+		}
+		if(i==numSequences)
+			done=true;
+	}
+	_addAnnotationCuts(all_nodes,alis,gs,pms,seq,seq_map,annotation,min_fragment_len,tag);
+
+	finish1 = clock();
+	duration = (double)(finish1 - start) / CLOCKS_PER_SEC;
+	//std::cout << "\ntook " << duration << " seconds.\n";
+	//for(int seq_i = 0; seq_i < length(seq); ++seq_i)
+	//{
+	//	typename std::set<TValue>::iterator it = all_nodes[seq_i].begin();
+	//	typename std::set<TValue>::iterator end_it = all_nodes[seq_i].end();
+	//
+	//	while(it != end_it)
+	//	{
+	//		std::cout << *it << ",";
+	//		++it;
+	//	}
+	//	std::cout << "\n";
+	//}
+	//std::cout <<"building tree..."<<std::flush;
+	
+	////////////////////////////////////////////////////////////////
+	//build refined alignment graph
+	_makeAlignmentGraphFromRefinedSegments(all_nodes,alis,score_type,seq,seq_map,ali_graph,tag,annotation);
+}
+
+
+///////WRAPPERS
+
+/**
+.Function.matchRefinement:
+..signature:matchRefinement(matches,stringSet,scoringScheme,refinedGraph)
+..param.matches:The set of matches.
+...type:Class.Fragment
+...type:Class.Align
+...type:Spec.Alignment Graph
+..param.scoringScheme:The scoring scheme used to score the refined matches (scores are attached to 
+edges in the refined Alignment Graph).
+...remarks:If no scoring scheme is given, all edges get weight 1.
+...type:Class.Score
+..include:seqan/refinement.h
+*/
+//exact refinement, score type given
+template<typename TAlignmentString, typename TScoreValue,typename TScoreSpec,typename TOutGraph, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				StringSet<TSequence, TSetSpec> & seq, 
+				Score<TScoreValue,TScoreSpec> & score_type,
+				TOutGraph & ali_graph)
+{
+SEQAN_CHECKPOINT
+	//min_fragment_len = 1   ==> Exact cutting
+	bool anno = false;
+	matchRefinement(alis,seq,score_type,ali_graph,1,anno,ExactRefinement());
+}
+
+
+
+/**
+.Function.matchRefinement:
+..cat:Alignments
+..summary:Refines (i.e. cuts into smaller parts) a set of pairwise segment 
+matches in such a way that none of the segments partly overlap. They are either 
+identical (fully overlapping) or non-overlapping.
+..signature:matchRefinement(matches,stringSet,refinedGraph)
+..param.stringSet:The StringSet containing the sequences which the matches lie on.
+...type:Class.StringSet
+..param.refinedGraph:The resulting refined set of matches stored in a graph.
+...type:Spec.Alignment Graph
+..include:seqan/refinement.h
+*/
+//exact refinement, score type not given
+template<typename TFragmentString, typename TOutGraph, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TFragmentString & matches,
+				StringSet<TSequence, TSetSpec> & strSet, 
+				TOutGraph & ali_graph)
+{
+	SEQAN_CHECKPOINT
+	typename Cargo<TOutGraph>::Type fake_score = 1;
+	bool anno = false;
+	matchRefinement(matches,strSet,fake_score,ali_graph,1,anno,ExactRefinement());
+}
+
+
+}
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_fragment.h b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_fragment.h
new file mode 100644
index 0000000..794b78d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_fragment.h
@@ -0,0 +1,208 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_REFINE_FRAG_H
+#define SEQAN_HEADER_GRAPH_REFINE_FRAG_H
+
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+
+	
+///////////////////////////////////////////////////////////////////////////////////////////////////////	
+//Functions for Fragments
+//project onto other sequence for Graph<Alignment>
+template<typename TFragSize, typename TFragSpec,typename TValue, typename TMap>
+void
+_getOtherSequenceAndProject(Fragment<TFragSize,TFragSpec> & segment,
+						TValue seg_num,
+						   TMap &,
+						   TValue seq_i_id,
+						   TValue pos_i,
+						   TValue & seq_j_id,
+						   TValue & pos_j)
+{
+SEQAN_CHECKPOINT
+	getProjectedPosition(segment,seg_num, seq_i_id, pos_i,seq_j_id,pos_j);
+	
+	//if(seq_i_id == sequenceId(segment,0))
+	//	seq_j_id = sequenceId(segment,1);
+	//else
+	//	seq_j_id = sequenceId(segment,0);
+}
+
+
+//given seq and segment, get the sequenceId (seq_i) and its begin and end
+//if seq = 0 get first sequence (that takes part in the segment match)
+//if seq = 1 get second sequence
+template<typename TFragSize, typename TFragSpec, typename TValue>
+void
+_getSeqBeginAndEnd(Fragment<TFragSize,TFragSpec> & segment,
+				  std::map<const void * ,int> &, 
+				  TValue & seq_i_id, 
+				  TValue & begin_i, 
+				  TValue & end_i,
+				  TValue seq)
+{
+SEQAN_CHECKPOINT
+	seq_i_id = sequenceId(segment,seq);
+	if(seq==0)
+		begin_i = segment.begin1; // fragmentBegin(segment,seq_i_id);
+	else
+		begin_i = segment.begin2; // fragmentBegin(segment,seq_i_id);
+	end_i = begin_i + segment.len; //fragmentLength(segment,seq_i_id);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////
+// 50000 _getRefinedMatchScore Functions
+////////////////////////////////////////////////////////////////////////////////////////
+//get score for alignment starting at pos_i on one sequence (first sequence if i_am_first==true)
+//and pos_j on other sequence (second sequence if i_am_first==true), if len1!=len2 then the refinement
+//process was stopped (the cut is not exact)
+//template<typename TScore,typename TStringSet,typename TFragId,typename TFragPos,typename TFragSize, typename TFragSpec,typename TValue>
+//typename Value<TScore>::Type
+//_getRefinedMatchScore(TScore & score_type, 
+//		 TStringSet & seqs,
+//		 Fragment<TFragId,TFragPos,TFragSize,TFragSpec> & segment, 
+//		 TValue pos_i, 
+//		 TValue pos_j,
+//		 TValue len1, 
+//		 TValue len2)
+//{
+//SEQAN_CHECKPOINT
+//	typename Infix<typename Value<TStringSet>::Type>::Type label0 = label(segment,seqs,sequenceId(segment,0));
+//	typename Infix<typename Value<TStringSet>::Type>::Type label1 = label(segment,seqs,sequenceId(segment,1));
+//	int i = 0;
+//	typename Value<TScore>::Type ret_score = 0;
+//	TValue len = (len1 < len2) ? len1 : len2;
+//	while(i < len)
+//	{
+//		ret_score += score(score_type,label0[i],label1[i]);
+//		++i;
+//	}
+//	len = (len1 > len2) ? len1 : len2;
+//	ret_score += (len - i) * scoreGapExtend(score_type);
+//	return ret_score;
+//}				
+//
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+////die n�chsten beiden funktionen: f�r Fragmente und Score vom Typ Simple
+////f�r den fall dass es keine mismatches innerhalb der segmente gibt und Score vom typ Simple ist
+////TODO: m�sste f�r einen bestimmten TFragSpec sein (Exact oder noMismatches)
+////get score for alignment starting at pos_i on one sequence (first sequence if i_am_first==true)
+////and pos_j on other sequence (second sequence if i_am_first==true), if len1!=len2 then the refinement
+////process was stopped (the cut is not exact)
+//template<typename TScoreValue,typename TStringSet,typename TFragId,typename TFragPos,typename TFragSize, typename TFragSpec>
+//TScoreValue
+//_getRefinedMatchScore(Score<TScoreValue, Simple> & score_type,
+//		 TStringSet & seqs, 
+//		 Fragment<TFragId,TFragPos,TFragSize,TFragSpec> & segment, 
+//		 TFragPos pos_i, 
+//		 TFragPos pos_j, 
+//		 TFragSize len1, 
+//		 TFragSize len2)
+//{
+//SEQAN_CHECKPOINT
+//	typename Infix<typename Value<TStringSet>::Type>::Type label0 = label(segment,seqs,sequenceId(segment,0));
+//	typename Infix<typename Value<TStringSet>::Type>::Type label1 = label(segment,seqs,sequenceId(segment,1));
+//	TScoreValue ret_score = 0;
+//	TFragSize len;
+//	if (len1 < len2) len = len1;
+//	else len = len2;
+//	if(len1 <= len2)
+//	{
+//		ret_score += len1 * scoreMatch(score_type);
+//		ret_score += (len2 - len1) * scoreGapExtend(score_type);
+//	}
+//	else{
+//		ret_score += len2 * scoreMatch(score_type);
+//		ret_score += (len1 - len2) * scoreGapExtend(score_type);
+//	}
+//	return ret_score;
+//}				
+
+
+//get score for alignment of length len starting at pos_i on one sequence (first sequence if i_am_first==true)
+//and pos_j on other sequence (second sequence if i_am_first==true)
+template<typename TScoreValue,typename TScoreSpec,typename TStringSet,typename TFragment,typename TFragPos,typename TFragSize>
+TScoreValue
+_getRefinedMatchScore(Score<TScoreValue,TScoreSpec> & score_type,
+		 TStringSet & seqs,
+		 TFragment& segment,
+		 TFragPos pos_i,
+		 TFragPos pos_j,
+		 TFragSize len,
+		 TFragSize)
+{
+SEQAN_CHECKPOINT
+	typedef typename Infix<typename Value<TStringSet>::Type>::Type TSegmentLabel;
+	TSegmentLabel label0 = label(segment,seqs, sequenceId(segment, 0));
+	TSegmentLabel label1 = label(segment,seqs, sequenceId(segment, 1));
+	typename Iterator<TSegmentLabel, Rooted>::Type label_it0 = begin(label0) + (pos_i - fragmentBegin(segment,sequenceId(segment,0)));
+	typename Iterator<TSegmentLabel, Rooted>::Type label_it1 = begin(label1) + (pos_j - fragmentBegin(segment,sequenceId(segment,1)));
+	int i = 0;
+	TScoreValue ret_score = 0;
+	while(i < (int) len)
+	{
+		ret_score += score(score_type,*label_it0,*label_it1);
+		++label_it0;
+		++label_it1;
+		++i;
+	}
+	return ret_score;
+}				
+
+
+//get score for alignment of length len starting at pos_i on one sequence (first sequence if i_am_first==true)
+//and pos_j on other sequence (second sequence if i_am_first==true)
+template<typename TScoreValue,typename TStringSet,typename TFragPos,typename TFragSize, typename TSpec>
+TScoreValue
+_getRefinedMatchScore(Score<TScoreValue, Simple> & score_type,
+		 TStringSet &,
+		 Fragment<TFragSize,ExactFragment<TSpec> > &,
+		 TFragPos,
+		 TFragPos,
+		 TFragSize len,
+		 TFragSize)
+{
+SEQAN_CHECKPOINT
+	return len*scoreMatch(score_type);
+}				
+
+
+}
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_inexact.h b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_inexact.h
new file mode 100644
index 0000000..a790d3f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_inexact.h
@@ -0,0 +1,300 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_REFINE_INEXACT_H
+#define SEQAN_HEADER_GRAPH_REFINE_INEXACT_H
+
+
+//SEQAN_NO_DDDOC: do not generate documentation for this file
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+struct TagInexactRefinement_;
+typedef Tag<TagInexactRefinement_> const InexactRefinement;
+
+
+///inexact refinement (cuts that would produce segments shorter than min_len are not made)
+template<typename TValue>
+inline bool
+_cutIsValid(String<std::set<TValue> > & all_nodes,
+		TValue seq_i_pos,
+		TValue pos_i,
+		typename std::set<TValue>::iterator iter,
+		TValue min_len,
+		Tag<TagInexactRefinement_> const)
+{
+SEQAN_CHECKPOINT
+	
+	//cut already exists
+	if(iter != all_nodes[seq_i_pos].end())
+		return false;
+	typename std::set<TValue>::iterator tmp_iter = all_nodes[seq_i_pos].upper_bound(pos_i);
+	if(tmp_iter != all_nodes[seq_i_pos].end())
+		if((*tmp_iter - pos_i) < min_len)
+			return false;
+	if(tmp_iter != all_nodes[seq_i_pos].begin())
+	{
+		--tmp_iter;
+		if((pos_i - *tmp_iter) < min_len)
+			return false;
+	}
+	return true;
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//step 2 of constructing the refined alignment graph: add all edges    
+//version for inexact refinement
+template<typename TAliGraph, typename TVertexDescriptor,typename TValue>
+TValue  
+_getClosestRefinedNeighbor(TAliGraph & ali_g,
+						   TVertexDescriptor & vd,
+						   TValue /*seq*/,
+						   TValue pos)
+{
+SEQAN_CHECKPOINT
+	if(pos-fragmentBegin(ali_g,vd) < fragmentBegin(ali_g,vd)+fragmentLength(ali_g,vd)-pos)
+		return fragmentBegin(ali_g,vd);
+	else
+		return fragmentBegin(ali_g,vd) + fragmentLength(ali_g,vd);
+}
+
+
+
+template<typename TAliGraph,typename TValue>
+void
+_getCutEndPos(TAliGraph & ali_g, 
+			  typename VertexDescriptor<TAliGraph>::Type & end_knot,
+			  TValue seq,
+			  TValue end_pos,
+			  TValue & cut_end_pos)
+{
+SEQAN_CHECKPOINT
+	end_knot = findVertex(ali_g,seq,end_pos-1);//end_pos1 is the first position of the next node
+	if(end_pos == fragmentBegin(ali_g,end_knot) + fragmentBegin(ali_g,end_knot))
+		cut_end_pos = end_pos;
+	else
+	{
+		cut_end_pos = _getClosestRefinedNeighbor(ali_g,end_knot,seq,end_pos);
+		end_knot =  findVertex(ali_g,seq,cut_end_pos-1);
+		SEQAN_ASSERT_TRUE(cut_end_pos == fragmentBegin(ali_g,end_knot)+fragmentLength(ali_g,end_knot));
+	}
+		
+}
+
+
+template<typename TAliGraph,typename TValue>
+void
+_getCutBeginPos(TAliGraph & ali_g, 
+			  typename VertexDescriptor<TAliGraph>::Type & act_knot,
+			  TValue seq,
+			  TValue act_pos,
+			  TValue & cut_act_pos)
+{
+SEQAN_CHECKPOINT
+	
+	act_knot = findVertex(ali_g,seq,act_pos);
+	//if completely refined
+	if(act_pos == fragmentBegin(ali_g,act_knot))
+		cut_act_pos = act_pos;
+	else //if incompletely refined
+	{
+		cut_act_pos = _getClosestRefinedNeighbor(ali_g,act_knot,seq,act_pos);
+		act_knot =  findVertex(ali_g,seq,cut_act_pos);
+		SEQAN_ASSERT_TRUE(cut_act_pos == fragmentBegin(ali_g,act_knot));
+	}
+}
+
+
+//step 2 of constructing the refined alignment graph: add all edges    
+//version for inexact refinement
+template<typename TAlignmentString,typename TPropertyMap,typename TStringSet,typename TSeqMap, typename TScore,typename TAliGraph>
+void
+_makeRefinedGraphEdges(TAlignmentString & alis,
+					   TPropertyMap & /*pm*/,
+					  TStringSet & seqs,
+				      TSeqMap & seq_map,
+				      TScore & score_type,
+					  TAliGraph & ali_g,
+					  Tag<TagInexactRefinement_> const)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TAlignmentString>::Type TAlign;
+	typedef typename Value<TAlign>::Type TValue;
+	typedef typename Iterator<TAlignmentString, Rooted>::Type TAliIterator;
+	typedef typename VertexDescriptor<TAliGraph>::Type TVertexDescriptor;
+	typedef typename EdgeDescriptor<TAliGraph>::Type TEdgeDescriptor;
+	typedef typename Cargo<TAliGraph>::Type TCargo;
+	//make edges
+	TAliIterator ali_it = begin(alis);
+	TAliIterator ali_end = end(alis);
+	//for each segment/fragment/alignment
+	while(ali_it != ali_end)
+	{
+		//get first sequence that takes part in the alignment + boundaries of the ali
+		TValue seq1,begin_pos1,end_pos1;
+		_getSeqBeginAndEnd(*ali_it,seq_map,seq1,begin_pos1,end_pos1,(TValue)0);
+		//get the last node that is within the current ali
+		TVertexDescriptor end_knot1;
+		TValue cut_end_pos1;
+		_getCutEndPos(ali_g,end_knot1,seq1,end_pos1,cut_end_pos1);
+	
+		//get the node that represents the current interval (begin_pos until next_cut_pos or end_pos)
+		TVertexDescriptor act_knot1;
+		TValue cut_act_pos1,act_pos1;
+		act_pos1 = begin_pos1;
+		_getCutBeginPos(ali_g,act_knot1,seq1,act_pos1,cut_act_pos1);
+		TValue act_end_pos1 = cut_act_pos1 + fragmentLength(ali_g,act_knot1);
+		//walk through cuts on the first sequence
+//		while (act_end_pos1 <= cut_end_pos1)
+		while (true)
+		{
+			//get other sequence and projected position
+			TValue seq2,act_pos2;
+			_getOtherSequenceAndProject(*ali_it,0,seq_map,seq1,act_pos1,seq2,act_pos2);
+		
+			//get node that corresponds to that position
+			TVertexDescriptor act_knot2;
+			TValue cut_act_pos2;
+			_getCutBeginPos(ali_g,act_knot2,seq2,act_pos2,cut_act_pos2);
+			//corresponding end on seq2 (there might be more than one node on seq2 that corresponds
+			//to the same interval (=node) on seq1)
+			TValue act_end_pos2;
+			_getOtherSequenceAndProject(*ali_it,0,seq_map,seq1,act_end_pos1-1,seq2,act_end_pos2);
+			++act_end_pos2;
+			TVertexDescriptor act_end_knot2;
+			TValue cut_act_end_pos2;
+			_getCutEndPos(ali_g,act_end_knot2,seq2,act_end_pos2,cut_act_end_pos2);
+			
+			if(cut_act_pos2 == cut_act_end_pos2)
+				break;
+			while(true)
+			{
+				//should at the moment return score for:
+				//
+				//seq1 = ....cr...rc....
+				//            ||||||
+				//seq2 = ...c.r...rc....
+				//bzw
+				//seq1 = ..cr.....x....   man will aber nur    ..cr......x....
+				//          |||||||-							 ---||||||  
+				//seq2 = ...r.c...rc... 					   ...r.c...rc....
+				typename Value<TScore>::Type score = 0;
+				score = _getRefinedMatchScore(score_type,seqs,*ali_it,act_pos1,act_pos2,act_end_pos1-act_pos1,cut_act_end_pos2);
+				//score *= _getRefinedAnnoScore(ali_g,pm,act_knot1,act_knot2,score_type);
+				//add score for
+				//
+				//seq1 = ...-cr....x....
+				//          ||
+				//seq2 = ...c.r...rc....
+//					score += getLeftRestScore(score_type,seqs,seq1,seq2,act_pos1,cut_act_pos1,act_pos2,cut_act_pos2);
+				if(score > 0)
+					if(findEdge(ali_g,act_knot1,act_knot2)==0)
+						addEdge(ali_g,act_knot1,act_knot2,score);
+				
+				if(act_knot2==act_end_knot2)
+					break;
+				act_pos2 = cut_act_pos2 + fragmentLength(ali_g,act_knot2);
+				_getCutBeginPos(ali_g,act_knot2,seq2,act_pos2,cut_act_pos2);
+			}
+			if(act_knot1 == end_knot1)
+				break;
+			act_pos1 = act_end_pos1;
+			act_knot1 = findVertex(ali_g,seq1,act_pos1);
+			cut_act_pos1 = act_pos1;
+			act_end_pos1 = cut_act_pos1 + fragmentLength(ali_g,act_knot1);
+		}
+		++ali_it;
+	}
+}
+
+
+
+
+/**
+.Function.matchRefinement:
+..signature:matchRefinement(matches,stringSet,scoringScheme,refinedGraph,minFragmentLen)
+..param.minFragmentLen:The minimal segment length allowed (unsigned int).
+...remarks:If in the refinement process a cut would result in
+a segment shorter than minFragmentLen, then the cut is not made and a heuristic is applied to refine this short overlap.
+...remarks:If no minFragmentLen is given, then all cuts are made. This corresponds to a minFragmentLen of 1.
+..include:seqan/refinement.h
+*/
+//score type given, min fragment length given, if > 1 ==> inexact refinement
+template<typename TAlignmentString, typename TScoreValue,typename TScoreSpec, typename TOutGraph, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				StringSet<TSequence, TSetSpec> & seq, 
+				Score<TScoreValue,TScoreSpec> & score_type,
+				TOutGraph & ali_graph,
+				unsigned int min_frag_len)
+{
+SEQAN_CHECKPOINT
+	bool anno = false;
+	if(min_frag_len > 1)
+        matchRefinement(alis,seq,score_type,ali_graph,min_frag_len,anno,InexactRefinement());
+	else
+        matchRefinement(alis,seq,score_type,ali_graph,min_frag_len,anno,ExactRefinement());
+}
+
+
+/**
+.Function.matchRefinement:
+..signature:matchRefinement(matches,stringSet,refinedGraph,minFragmentLen)
+..include:seqan/refinement.h
+*/
+//score type not given, min fragment length given, if > 1 ==> inexact refinement
+template<typename TAlignmentString, typename TOutGraph, typename TSequence, typename TSetSpec>
+void
+matchRefinement(TAlignmentString & alis,
+				StringSet<TSequence, TSetSpec> & seq, 
+				TOutGraph & ali_graph,
+				unsigned int min_frag_len)
+{
+SEQAN_CHECKPOINT
+//	Score<int,FakeScore > fake_score;
+	typename Cargo<TOutGraph>::Type fake_score = 1;
+	bool anno = false;
+	if(min_frag_len > 1)
+        matchRefinement(alis,seq,fake_score,ali_graph,min_frag_len,anno,InexactRefinement());
+	else
+        matchRefinement(alis,seq,fake_score,ali_graph,min_frag_len,anno,ExactRefinement());
+}
+	
+}
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_scoring.h b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_scoring.h
new file mode 100644
index 0000000..7758ed9
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_algorithm_refine_scoring.h
@@ -0,0 +1,63 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_REFINE_SCORING_H
+#define SEQAN_HEADER_GRAPH_REFINE_SCORING_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+	
+
+
+
+//fake score function 
+template<typename TScoreValue,typename TStringSet,typename TAlign,typename TValue, typename TSize>
+TScoreValue
+_getRefinedMatchScore(TScoreValue &,
+		 TStringSet &,
+		 TAlign &,
+		 TValue,
+		 TValue,
+		 TSize,
+		 TSize)
+{
+SEQAN_CHECKPOINT
+	return 1;
+}				
+
+
+
+
+}
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_impl_align.h b/src/SeqAn-1.3/seqan/refinement/graph_impl_align.h
new file mode 100644
index 0000000..692a851
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_impl_align.h
@@ -0,0 +1,2079 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_ALIGN_H
+#define SEQAN_HEADER_GRAPH_IMPL_ALIGN_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment Graph
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment Graph Output Tags
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Format:
+..summary:A file format to write an alignment graph.
+..include:seqan/refinement.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Format.value.MsfFormat:
+	Msf format to write an alignment graph.
+..include:seqan/refinement.h
+*/
+
+struct MsfFormat_;
+typedef Tag<MsfFormat_> const MsfFormat;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Format.value.FastaFormat:
+	Fasta format to write an alignment graph.
+..include:seqan/refinement.h
+*/
+
+struct FastaFormat_;
+typedef Tag<FastaFormat_> const FastaFormat;
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Alignment Graph Format.value.CgVizFormat:
+	Cgviz format to write an alignment graph.
+..include:seqan/refinement.h
+*/
+
+struct CgVizFormat_;
+typedef Tag<CgVizFormat_> const CgVizFormat;
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Default Alignment Graph
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo = unsigned int, typename TSpec = Default>
+struct Alignment;
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+struct EdgeType<Graph<Alignment<TStringSet, TCargo, TSpec> > const> {
+	typedef typename EdgeType<Graph<Undirected<TCargo, TSpec> > const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+struct EdgeType<Graph<Alignment<TStringSet, TCargo, TSpec> > > {
+	typedef typename EdgeType<Graph<Undirected<TCargo, TSpec> > >::Type Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+struct Host<Graph<Alignment<TStringSet, TCargo, TSpec> > > {
+	typedef TStringSet Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+struct Host<Graph<Alignment<TStringSet, TCargo, TSpec> > const> {
+	typedef TStringSet const Type;
+};
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Actual Alignment Graph Class
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TId = unsigned int, typename TSize = unsigned int>
+class FragmentInfo {
+public:
+	TId data_seq_id;
+	TSize data_begin;
+	TSize data_length;
+
+	FragmentInfo() :
+		data_seq_id(0),
+		data_begin(0),
+		data_length(0)
+	{
+	}
+
+	FragmentInfo(TId id, TSize beg, TSize len) :
+		data_seq_id(id),
+		data_begin(beg),
+		data_length(len)
+	{
+	}
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.Alignment Graph:
+..cat:Graph
+..general:Class.Graph
+..summary:An alignment graph.
+..description:
+...image:alignmentGraph|An alignment graph with 3 sequences.
+..signature:Graph<Alignment<TStringSet, TCargo, TSpec> > 
+..param.TStringSet:The type of the string set containing the sequence information.
+...default:$Class.StringSet$
+..param.TCargo:The cargo type that can be attached to the edges.
+...metafunction:Metafunction.Cargo
+...remarks:Use @Metafunction.Cargo@ to get the cargo type of an undirected graph.
+...default:$void$
+..param.TSpec:The specializing type for the graph.
+...metafunction:Metafunction.Spec
+...remarks:Use WithoutEdgeId here to omit edge ids.
+Note: If edges do not store ids external property maps do not work.
+...default:$Default$, see @Tag.Default at .
+..include:seqan/refinement.h
+*/
+template<typename TString, typename TSpecial, typename TCargo, typename TSpec>
+class Graph<Alignment<StringSet<TString, Dependent<TSpecial> >, TCargo, TSpec> > 
+{
+	public:
+		typedef typename Id<Graph>::Type TIdType_;
+		typedef typename VertexDescriptor<Graph>::Type TVertexDescriptor_;
+		typedef typename Size<Graph>::Type TSize_;
+		typedef std::pair<TIdType_, TSize_> TKey_;
+		typedef std::map<TKey_, TVertexDescriptor_> TPosToVertexMap_;
+		typedef FragmentInfo<TIdType_, TSize_> TFragmentInfo_;
+
+		// Alignment graph
+		Graph<Undirected<TCargo, TSpec> > data_align;
+
+		// Sequences
+		Holder<StringSet<TString, Dependent<TSpecial> > > data_sequence;
+		
+		// Alignment specific members
+		String<TFragmentInfo_> data_fragment;
+
+		// STL Map to retrieve a vertex given SeqId, Position
+		TPosToVertexMap_ data_pvMap;
+
+
+		Graph() {
+		}
+
+
+		template <typename TDefault>
+		Graph(StringSet<TString, Dependent<TDefault> > const& sSet) {
+			SEQAN_CHECKPOINT
+			data_sequence = sSet;
+
+			// Cover all sequences with nil vertices
+			TVertexDescriptor_ nilVertex = getNil<TVertexDescriptor_>();
+			TSize_ lenSet = length(sSet);
+			for(TSize_ k=0; k<lenSet;++k) 
+				data_pvMap.insert(std::make_pair(TKey_(positionToId(sSet,k), length(sSet[k])), nilVertex));
+		}
+
+		template <typename TDefault>
+		Graph(StringSet<TString, Owner<TDefault> > const& sSet) {
+			SEQAN_CHECKPOINT
+			StringSet<TString, Dependent<> > depStr(sSet);
+			data_sequence = depStr;
+
+			// Cover all sequences with nil vertices
+			TVertexDescriptor_ nilVertex = getNil<TVertexDescriptor_>();
+			TSize_ lenSet = length(sSet);
+			for(TSize_ k=0; k<lenSet;++k) 
+				data_pvMap.insert(std::make_pair(TKey_(positionToId(const_cast<StringSet<TString, Owner<TDefault> >&>(sSet),k), length(sSet[k])), nilVertex));
+		}
+
+
+		~Graph() {
+			SEQAN_CHECKPOINT
+			clear(*this);
+		}
+
+		Graph(Graph const & _other) 
+		{
+			SEQAN_CHECKPOINT
+			_copyGraph(_other, *this);	
+		}
+	
+		Graph const& operator = (Graph const & _other) {
+			SEQAN_CHECKPOINT
+			if (this == &_other) return *this;
+			clear(*this);
+			_copyGraph(_other, *this);
+			return *this;
+		}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// INTERNAL FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline String<typename EdgeType<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type*>&
+_getVertexString(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	return const_cast<String<TEdgeStump*>&>(g.data_align.data_vertex);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline typename VertexIdHandler<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type&
+_getVertexIdManager(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexIdHandler<TGraph>::Type TVertexIdManager;
+	return const_cast<TVertexIdManager&>(g.data_align.data_id_managerV);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline typename EdgeIdHandler<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type&
+_getEdgeIdManager(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g) {
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename EdgeIdHandler<TGraph>::Type TEdgeIdManager;
+	return const_cast<TEdgeIdManager&>(g.data_align.data_id_managerE);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Alignment<TStringSet, TCargo, TSpec> > const& source,
+		   Graph<Alignment<TStringSet, TCargo, TSpec> >& dest,
+		   bool) 
+{
+	SEQAN_CHECKPOINT
+	clear(dest);
+	dest.data_align = source.data_align;
+	dest.data_sequence = source.data_sequence;
+	dest.data_fragment = source.data_fragment;
+	dest.data_pvMap = source.data_pvMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void
+_copyGraph(Graph<Alignment<TStringSet, TCargo, TSpec> > const& source,
+		   Graph<Alignment<TStringSet, TCargo, TSpec> >& dest) 
+{
+	_copyGraph(source, dest, false); // Never transpose, underlying graph is undirected
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void 
+transpose(Graph<Alignment<TStringSet, TCargo, TSpec> > const& source,
+		  Graph<Alignment<TStringSet, TCargo, TSpec> >& dest)
+{
+	SEQAN_CHECKPOINT
+	// Alignment graph, no transpose just copy
+	_copyGraph(source, dest, false);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void 
+transpose(Graph<Alignment<TStringSet, TCargo, TSpec> >&)
+{
+	SEQAN_CHECKPOINT
+	// Nothing to do in an alignment graph
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+numEdges(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return numEdges(g.data_align);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+numVertices(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return numVertices(g.data_align);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline bool 
+empty(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g) 
+{
+	SEQAN_CHECKPOINT
+	return empty(g.data_align);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void
+clearEdges(Graph<Alignment<TStringSet, TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	clearEdges(g.data_align);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void
+clearVertices(Graph<Alignment<TStringSet, TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TStringSet>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename TGraph::TKey_ TKey;
+
+	clear(g.data_fragment);
+	g.data_pvMap.clear();
+	clearVertices(g.data_align);
+
+
+	// Don't forget to cover the sequences with nil vertices again
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	if(!empty(value(g.data_sequence))) {
+		TSize lenSet = length(stringSet(g));
+		for(TSize k=0; k<lenSet;++k) 
+			g.data_pvMap.insert(std::make_pair(TKey(positionToId(stringSet(g),k), length(stringSet(g)[k])), nilVertex));
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void 
+clear(Graph<Alignment<TStringSet, TCargo, TSpec> >& g) 
+{
+	SEQAN_CHECKPOINT
+	// Only clear also removes the sequences
+	clear(value(g.data_sequence));
+	clearVertices(g);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+outDegree(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, 
+		  TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	return outDegree(g.data_align, vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+inDegree(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, 
+		 TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	return inDegree(g.data_align, vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+degree(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+	   TVertexDescriptor const vertex) 
+{
+	SEQAN_CHECKPOINT
+	return degree(g.data_align, vertex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TId, typename TPos, typename TLength> 
+inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+addVertex(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+		  TId id,
+		  TPos begin,
+		  TLength len)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Id<TGraph>::Type TIdType;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename TGraph::TFragmentInfo_ TFragmentInfo;
+	typedef typename TGraph::TKey_ TKey;
+	typedef typename TGraph::TPosToVertexMap_ TPosToVertexMap;
+	//typedef typename TPosToVertexMap::key_type TKey;
+
+	//for(TPosToVertexMap::const_iterator p = g.data_pvMap.begin(); p != g.data_pvMap.end(); ++p) {
+	//	std::cout << p->first.first << ',' << p->first.second << ':' << p->second << std::endl;
+	//}
+
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+
+	// Store the new fragment
+	typename TPosToVertexMap::iterator interval = g.data_pvMap.lower_bound(TKey((TIdType)id, (TSize)begin + (TSize)len));
+	// Segment does not belong to Sequence anymore
+	SEQAN_ASSERT_TRUE(interval != g.data_pvMap.end());
+	// Segment end must be assigned to nil so far
+	SEQAN_ASSERT_TRUE(interval->second == nilVertex);
+	// Segment must belong to the whole old interval
+	SEQAN_ASSERT_TRUE(*interval == *g.data_pvMap.upper_bound(TKey((TIdType)id, (TSize)begin)));
+
+	// Insert new vertex
+	TVertexDescriptor vd = addVertex(g.data_align);
+	if (length(g.data_fragment) <= vd) resize(g.data_fragment, vd + 1, Generous());
+	assignProperty(g.data_fragment, vd, TFragmentInfo(id, begin, len));
+
+	// Update position to vertex map
+	// Does the end of the new fragment coincides with the end of the interval?
+	if ( (TSize) begin + len == (TSize) interval->first.second) {
+		// Does the beginning of the new fragment coincides with the beginning of the interval?
+		if ((begin == 0) ||
+			(g.data_pvMap.find(TKey((TIdType)id, (TSize)begin)) != g.data_pvMap.end())) {
+			// Replace interval
+			interval->second = vd;
+		} else {
+			// Split interval once
+			g.data_pvMap.insert(std::make_pair(TKey(interval->first.first,(TSize)begin), interval->second));
+			g.data_pvMap.erase(interval);
+			g.data_pvMap.insert(std::make_pair(TKey((TIdType)id,(TSize)begin+len), vd));
+		}
+	} else {
+		// Does the beginning of the new fragment coincides with the beginning of the interval?
+		if ((begin == 0) ||
+			(g.data_pvMap.find(TKey((TIdType)id, (TSize)begin)) != g.data_pvMap.end())) {
+			// Split interval once
+			// Just insert here because we store interval ends
+			g.data_pvMap.insert(std::make_pair(TKey((TIdType)id,(TSize)begin+len), vd));
+		} else {
+			// Split interval twice
+			TSize tmp = interval->first.second;
+			g.data_pvMap.insert(std::make_pair(TKey(interval->first.first,begin), interval->second));
+			g.data_pvMap.erase(interval);
+			g.data_pvMap.insert(std::make_pair(TKey((TIdType)id,(TSize)begin+len), vd));
+			g.data_pvMap.insert(std::make_pair(TKey((TIdType)id,tmp), nilVertex));
+		}
+	}
+	return vd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVD>
+inline void 
+removeVertex(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, 
+			 TVD const v) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Id<TGraph>::Type TIdType;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename TGraph::TKey_ TKey;
+	typedef typename TGraph::TPosToVertexMap_ TPosToVertexMap;
+	typename TPosToVertexMap::iterator interval = (g.data_pvMap.lower_bound(TKey(sequenceId(g,v), fragmentBegin(g,v) + fragmentLength(g,v))));
+
+	// Clear the interval
+	interval->second = getNil<TVertexDescriptor>();
+	typename TPosToVertexMap::iterator interval_iter = interval;
+	if (interval_iter != g.data_pvMap.begin()) {
+		--interval_iter;
+		if ((interval_iter->second == getNil<TVertexDescriptor>()) &&
+			(interval_iter->first.first == interval->first.first)) {
+			g.data_pvMap.erase(interval_iter);
+		}
+	}
+	interval_iter = interval;
+	++interval_iter;
+	if (interval_iter != g.data_pvMap.end()) {
+		if ((interval_iter->second == getNil<TVertexDescriptor>()) &&
+			(interval_iter->first.first == interval->first.first)) {
+			g.data_pvMap.erase(interval);
+		}
+	}
+
+	// Remove the vertex
+	removeVertex(g.data_align,v);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline typename EdgeDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+addEdge(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target) 
+{
+	SEQAN_CHECKPOINT
+	return addEdge(g.data_align, source, target);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCargo2> 
+inline typename EdgeDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+addEdge(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, 
+		TVertexDescriptor const source, 
+		TVertexDescriptor const target,
+		TCargo2 const cargo) 
+{
+	SEQAN_CHECKPOINT
+	return addEdge(g.data_align, source, target, cargo);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline void 
+removeEdge(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, 
+		   TVertexDescriptor const source, 
+		   TVertexDescriptor const target) 
+{
+	SEQAN_CHECKPOINT
+	removeEdge(g.data_align, source, target);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline void 
+removeEdge(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+		   TEdgeDescriptor const edge)
+{
+	SEQAN_CHECKPOINT
+	removeEdge(g.data_align, sourceVertex(g.data_align,edge), targetVertex(g.data_align,edge));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeOutEdges(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, 
+			   TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	removeOutEdges(g.data_align, v);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> 
+inline void 
+removeInEdges(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+			  TVertexDescriptor const v) 
+{
+	SEQAN_CHECKPOINT
+	removeInEdges(g.data_align,v);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TEdgeDescriptor> 
+inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+targetVertex(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return targetVertex(g.data_align, edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TEdgeDescriptor>
+inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+sourceVertex(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+			 TEdgeDescriptor const edge) 
+{
+	SEQAN_CHECKPOINT
+	return sourceVertex(g.data_align, edge);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TMatrix>
+inline void
+getAdjacencyMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, 
+				   TMatrix& mat) 
+{
+	SEQAN_CHECKPOINT
+	getAdjacencyMatrix(g.data_align, mat);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename EdgeDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+findEdge(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+		 TVertexDescriptor const v,
+		 TVertexDescriptor const w)
+{
+	SEQAN_CHECKPOINT
+	return findEdge(g.data_align, v, w);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TIDString>
+inline void
+write(TFile & target,
+	  Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+	  TIDString const &,
+	  Raw)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Id<TGraph>::Type TIdType;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename TGraph::TFragmentInfo_ TSegment;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst;
+
+	String<char> align;
+	if (!convertAlignment(g, align)) {
+		_streamWrite(target,"Adjacency list:\n");
+		TIterConst it = begin(g.data_align.data_vertex, Standard());
+		TIterConst itEnd = end(g.data_align.data_vertex, Standard());
+		TVertexDescriptor pos = 0;
+		for(;it!=itEnd; ++it, ++pos) {
+			if (!idInUse(g.data_align.data_id_managerV, pos)) continue;
+			TVertexDescriptor sourceV = pos;
+			_streamPutInt(target, sourceV);
+			TSegment seg = getProperty(g.data_fragment, sourceV);
+			_streamWrite(target," (SeqId:");
+			_streamPutInt(target, seg.data_seq_id);
+			_streamWrite(target," ,Begin:");
+			_streamPutInt(target, seg.data_begin);
+			_streamWrite(target," ,Length:");
+			_streamPutInt(target, seg.data_length);
+			_streamWrite(target,") -> ");
+			TEdgeStump* current = *it;
+			while(current!=0) {
+				TVertexDescriptor adjV = getTarget(current);
+				if (adjV != sourceV) {
+					_streamPutInt(target, adjV);
+					_streamPut(target, ',');
+					current=getNextS(current);
+				} else {
+					adjV = getSource(current);
+					_streamPutInt(target, adjV);
+					_streamPut(target, ',');
+					current=getNextT(current);
+				}
+			}
+			_streamPut(target, '\n');
+		}
+		_streamWrite(target,"Edge list:\n");
+		it = begin(g.data_align.data_vertex, Standard());
+		pos = 0;
+		for(;it!=itEnd; ++it, ++pos) {
+			TVertexDescriptor sourceV = pos;
+			TEdgeStump* current = *it;
+			while(current!=0) {
+				TVertexDescriptor targetV = getTarget(current);
+				if (sourceV != targetV) {
+					_streamWrite(target,"Source: ");
+					_streamPutInt(target, sourceV);		
+					_streamPut(target, ',');
+					_streamWrite(target,"Target: ");
+					_streamPutInt(target, targetV);
+					_streamPut(target, ' ');
+					_streamWrite(target,"(Id: ");
+					_streamPutInt(target, _getId(current));
+					_streamPut(target, ')');
+					_streamPut(target, '\n');
+					current=getNextS(current);
+				} else {
+					current=getNextT(current);
+				}
+			}
+		}
+	} else {
+		TSize nseq = length(stringSet(g));
+		TSize colLen = length(align) / nseq;
+		
+		TSize baseCount=0;
+		TSize leftSpace=6;
+		TSize xPos = 0;
+		_streamWrite(target,"Alignment matrix:\n");
+		while (xPos < colLen) {
+			TSize windowSize = 50;
+			if ((xPos + windowSize)>colLen) windowSize = colLen - xPos;
+			
+			// Print header line
+			TSize offset=0;
+			// Larger numbers need to be further left
+			if (baseCount != 0) offset = (unsigned int) floor(log((double)baseCount) / log((double)10));
+			for(TSize j = 0;j<leftSpace-offset;++j) _streamPut(target, ' ');
+			_streamPutInt(target, baseCount);
+			baseCount+=windowSize;
+			_streamPut(target, ' ');
+			for(TSize col = 1;col<=windowSize;++col) {
+				if ((col % 10)==0) _streamPut(target, ':');
+				else if ((col % 5)==0) _streamPut(target, '.');
+				else _streamPut(target, ' ');
+			}
+			_streamPut(target, ' ');
+			_streamPut(target, '\n');
+
+			// Print sequences
+			for(TSize row=0;row<2*nseq-1;++row) {
+				for(TSize col = 0;col<leftSpace+2;++col) _streamPut(target, ' ');
+				if ((row % 2)==0) {
+					for(TSize col = xPos;col<xPos+windowSize;++col) 
+						_streamPut(target, align[(row/2)*colLen+col]);
+				} else {
+					for(TSize col = xPos;col<xPos+windowSize;++col) {
+						if ((align[((row-1)/2)*colLen + col] != gapValue<char>()) &&
+							(align[((row+1)/2)*colLen + col] != gapValue<char>()) &&
+							(align[((row-1)/2)*colLen + col] == align[((row+1)/2)*colLen + col])) 
+							_streamPut(target, '|');
+						else _streamPut(target, ' ');
+					}
+				}
+				_streamPut(target, '\n');
+			}
+			_streamPut(target, '\n');
+			xPos+=windowSize;
+		}
+		_streamPut(target, '\n');
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TSpec, typename TNames>
+inline void
+write(TFile & file,
+	  Graph<TSpec> const& g,
+	  TNames const& names,
+	  FastaFormat) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+
+	String<char> align;
+	if (convertAlignment(g, align)) {	
+		TSize nseq = length(stringSet(g));
+		TSize colLen = length(align) / nseq;
+		typedef typename Iterator<String<char>, Standard>::Type TIter;
+		TIter it = begin(align, Standard());
+		for(TSize i = 0; i<nseq; ++i) {
+			_streamPut(file, '>');
+			_streamWrite(file,names[i]);
+			_streamPut(file, '\n');
+			TSize col = 0;
+			while(col < colLen) {
+				TSize max = ((colLen - col) < 60) ? colLen - col : 60;
+				for(TSize finger = 0; finger<max; ++finger, ++col, ++it) 
+					_streamPut(file, *it);
+				_streamPut(file, '\n');
+			}
+		}
+	}
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TSpec, typename TNames>
+inline void
+write(TFile & file,
+	  Graph<TSpec> const& g,
+	  TNames const& names,
+	  MsfFormat) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<TSpec> TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+
+	String<char> align;
+	if (convertAlignment(g, align)) {	
+		TSize nseq = length(stringSet(g));
+		TSize colLen = length(align) / nseq;
+	
+		_streamWrite(file,"PileUp\n");
+		_streamPut(file, '\n');
+		_streamWrite(file," MSF: ");
+		_streamPutInt(file, colLen);
+		_streamWrite(file," Type: P");
+		_streamWrite(file," Check: 0 ..");
+		_streamPut(file, '\n');
+		_streamPut(file, '\n');
+		TSize offset = 0;
+		for(TSize i = 0; i<nseq; ++i) {
+			_streamWrite(file," Name: ");
+			_streamWrite(file,names[i]);
+			_streamWrite(file," oo  Len:  ");
+			TSize len = length(names[i]);
+			if (len > offset) offset = len;
+			_streamPutInt(file, colLen);
+			_streamWrite(file," Check: 0");
+			_streamWrite(file," Weight: 1.00");
+			_streamPut(file, '\n');
+		}
+		offset += 5;
+		_streamPut(file, '\n');
+		_streamWrite(file,"//\n");
+		_streamPut(file, '\n');
+		_streamPut(file, '\n');
+		TSize col = 0;
+		while(col < colLen) {
+			TSize max = 0;
+			for(TSize i = 0; i<nseq; ++i) {
+				max = ((colLen - col) < 50) ? colLen - col : 50;
+				_streamWrite(file,names[i]);
+				for(TSize j = 0; j<offset - length(names[i]); ++j) 
+					_streamPut(file, ' ');
+				for(TSize finger = col; finger<col+max; ++finger) {
+					if ((finger - col) % 10 == 0) _streamPut(file, ' ');
+					if (align[i*colLen + finger] == '-') _streamPut(file, '.');
+					else _streamPut(file, align[i*colLen + finger]);
+				}
+				_streamPut(file, '\n');
+			}
+			col += max;
+			_streamPut(file, '\n');
+			_streamPut(file, '\n');
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+template <typename TFile, typename TStringSet, typename TSpec, typename TEdge>
+inline void
+_writeCargo(TFile & file,
+			 Graph<Alignment<TStringSet, void, TSpec> > const&,
+			 TEdge const&)
+{
+	_streamPutInt(file, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TEdge>
+inline void
+_writeCargo(TFile & file,
+			 Graph<Alignment<TStringSet, TCargo, TSpec> > const&,
+			 TEdge const& edge)
+{
+	_streamPutInt(file, getCargo(edge));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TNames>
+inline void
+write(TFile & file,
+	  Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+	  TNames const& names,
+	  CgVizFormat) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TId;
+	typedef FragmentInfo<TId, TSize> TSegment;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename Iterator<String<TEdgeStump*> const, Rooted>::Type TIterConst;
+	
+	TStringSet& str = stringSet(g);
+	TSize nseq = length(str);
+
+	_streamWrite(file,"{DATA Data\n");
+	_streamWrite(file,"\t[__GLOBAL__] tracks=");
+	_streamPutInt(file, nseq);
+	_streamPut(file, '\n');
+	for(TSize i = 0; i<nseq; ++i) {
+		_streamWrite(file,"\tfasta_id=\"");
+		_streamWrite(file,names[i]);
+		_streamWrite(file,"\" sequence=\"");
+		_streamWrite(file,str[i]);
+		_streamWrite(file,"\" track=");
+		_streamPutInt(file, i);
+		_streamWrite(file," type=\"");
+		_streamWrite(file,"DNA");
+		_streamWrite(file,"\": ");
+		_streamPutInt(file, 0);
+		_streamPut(file, ' ');
+		_streamPutInt(file, length(str[i])- 1);
+		_streamPut(file, '\n');
+	}
+	_streamWrite(file,"}\n");
+	for(TSize i = 0; i<nseq; ++i) {
+		_streamWrite(file,"{DATA ");
+		_streamPutInt(file, i);
+		//_streamWrite(file,names[i]);
+		_streamWrite(file,"-seqlen\n");
+		_streamWrite(file,"\t[__GLOBAL__]\n");
+		_streamWrite(file,"\tlength=");
+		_streamPutInt(file, length(str[i]));
+		_streamWrite(file,":\t");
+		_streamPutInt(file, 0);
+		_streamPut(file, ' ');
+		_streamPutInt(file, length(str[i])- 1);
+		_streamPut(file, '\n');
+		_streamWrite(file,"}\n");
+	}
+	for(TSize i=0; i<nseq; ++i) {
+		for(TSize j=i+1; j<nseq; ++j) {
+			_streamWrite(file,"{DATA ");
+			_streamPutInt(file, i);
+			//_streamWrite(file,names[i]);
+			_streamWrite(file,"-vs-");
+			_streamPutInt(file, j);
+			//_streamWrite(file,names[j]);
+			_streamPut(file, '\n');
+			_streamWrite(file,"\t[__GLOBAL__]\n");
+			for(TIterConst it = begin(g.data_align.data_vertex);!atEnd(it);goNext(it)) {
+				TVertexDescriptor sourceV = position(it);
+				TId id1 = sequenceId(g, sourceV);
+				if ((positionToId(str, id1) != i) &&
+					(positionToId(str, id1) != j)) continue;
+				TEdgeStump* current = getValue(it);
+				while(current!=0) {
+					TVertexDescriptor targetV = getTarget(current);
+					TId id2 = sequenceId(g, targetV);
+					if (sourceV != targetV) {
+						if ((positionToId(str, id2) != i) &&
+							(positionToId(str, id2) != j)) {
+								current=getNextS(current);
+								continue;
+						}
+						_streamWrite(file,"\t");
+						_streamWrite(file,"source=");
+						_streamPutInt(file, sourceV);		
+						_streamPut(file, ' ');
+						_streamWrite(file,"target=");
+						_streamPutInt(file, targetV);
+						_streamPut(file, ' ');
+						_streamWrite(file,"edgeId=");
+						_streamPutInt(file, _getId(current));
+						_streamPut(file, ' ');
+						_streamWrite(file,"cargo=");
+						_writeCargo(file,g,current);
+						_streamPut(file, ' ');
+						_streamWrite(file,"label=");
+						_streamWrite(file,label(g,sourceV));
+						_streamPut(file, ' ');
+						_streamWrite(file,"labelOpp=");
+						_streamWrite(file,label(g,targetV));
+						_streamPut(file, ':');
+						_streamPut(file, '\t');
+						_streamPutInt(file, fragmentBegin(g, sourceV));
+						_streamPut(file, ' ');
+						_streamPutInt(file, fragmentBegin(g, targetV));
+						_streamPut(file, ' ');
+						_streamPutInt(file, fragmentBegin(g, sourceV) + fragmentLength(g, sourceV));
+						_streamPut(file, ' ');
+						_streamPutInt(file, fragmentBegin(g, targetV) + fragmentLength(g, targetV));
+						_streamPut(file, '\n');
+						current=getNextS(current);
+					} else {
+						current=getNextT(current);
+					}
+				}
+			}
+			_streamWrite(file,"}\n");	
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assignStringSet:
+..cat:Graph
+..summary:Assigns a new string set to an alignment graph.
+..signature:assignStringSet(g, str)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..param.str:A string set.
+..see:Function.getStringSet
+..see:Function.stringSet
+..include:seqan/refinement.h
+*/
+template<typename TString, typename TDefault, typename TCargo, typename TSpec, typename TDefault2>
+inline void
+assignStringSet(Graph<Alignment<StringSet<TString, Dependent<TDefault> >, TCargo, TSpec> >& g,
+				StringSet<TString, Dependent<TDefault2> > const& sStr)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<StringSet<TString, Dependent<TDefault> >, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename TGraph::TKey_ TKey;
+	typedef typename Size<TGraph>::Type TSize;
+
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	clear(g);
+	g.data_sequence = (StringSet<TString, Dependent<TDefault> >) sStr;
+	TSize lenSet = length(sStr);
+	for(TSize k=0; k<lenSet;++k) 
+		g.data_pvMap.insert(std::make_pair(TKey(positionToId(sStr,k), length(sStr[k])), nilVertex));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TString, typename TDefault, typename TCargo, typename TSpec, typename TDefault2>
+inline void
+assignStringSet(Graph<Alignment<StringSet<TString, Dependent<TDefault> >, TCargo, TSpec> >& g,
+				StringSet<TString, Owner<TDefault2> > const& sStr)
+{
+	SEQAN_CHECKPOINT
+	StringSet<TString, Dependent<> > depStr(sStr);
+	assignStringSet(g, depStr);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getStringSet:
+..cat:Graph
+..summary:Gets the string set of an alignment graph.
+..signature:getStringSet(g)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..returns:A string set.
+..see:Function.assignStringSet
+..see:Function.stringSet
+..include:seqan/refinement.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline typename Host<Graph<Alignment<TStringSet, TCargo, TSpec> > const>::Type&
+getStringSet(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g)
+{
+	SEQAN_CHECKPOINT
+	return value(g.data_sequence);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.stringSet:
+..cat:Graph
+..summary:Gets the string set of an alignment graph.
+..signature:stringSet(g)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..returns:A reference or temporary of @Class.StringSet.string set@ type.
+..see:Function.assignStringSet
+..see:Function.getStringSet
+..include:seqan/refinement.h
+*/
+
+template <typename T>
+struct StringSetType;
+
+template <typename TStringSet, typename TCargo, typename TSpec>
+struct StringSetType<Graph<Alignment<TStringSet, TCargo, TSpec> > >
+{
+	typedef typename Host<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type & Type;
+};
+
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline typename StringSetType<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type
+stringSet(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g)
+{
+	SEQAN_CHECKPOINT
+	return const_cast<TStringSet&>(value(g.data_sequence));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.label:
+..cat:Graph
+..summary:Gets the label that is associated with this vertex descriptor or the sequence that is associated with a fragment.
+..signature:label(g, v)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:An infix representing the sequence label.
+..include:seqan/refinement.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename Infix<typename Value<TStringSet>::Type>::Type
+label(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+	  TVertexDescriptor const v)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Id<TGraph>::Type TIdType;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename TGraph::TFragmentInfo_ TSegment;
+	TSegment seg = getProperty(g.data_fragment, v);
+	//std::cout << seg.data_seq_id << ",";
+	//std::cout << seg.data_begin << ",";
+	//std::cout << seg.data_length << ",";
+	//std::cout << getValueById(value(g.data_sequence), seg.data_seq_id) << std::endl;
+	//std::cout << infix(getValueById(value(g.data_sequence), seg.data_seq_id), seg.data_begin, seg.data_begin + seg.data_length) << std::endl;
+	return infix(getValueById(value(g.data_sequence), seg.data_seq_id), seg.data_begin, seg.data_begin + seg.data_length);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.sequenceId:
+..cat:Graph
+..summary:Gets the sequence id that is associated with this vertex descriptor or with a sequence of a fragment.
+..signature:sequenceId(g, v)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:The sequence id.
+..include:seqan/refinement.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename Id<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type&
+sequenceId(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+		   TVertexDescriptor const v)
+{
+	SEQAN_CHECKPOINT
+	return const_cast<typename Id<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type&>(g.data_fragment[v].data_seq_id);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.fragmentBegin:
+..cat:Graph
+..summary:Gets the begin position for this fragment or this vertex descriptor in the sequence.
+..signature:fragmentBegin(g, v)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:The begin position.
+..include:seqan/refinement.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename Position<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type&
+fragmentBegin(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+			  TVertexDescriptor const v)
+{
+	SEQAN_CHECKPOINT
+	return const_cast<typename Position<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type&>(g.data_fragment[v].data_begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.fragmentLength:
+..cat:Graph
+..summary:Gets the length of the label of a given vertex descriptor in the sequence.
+..signature:fragmentLength(g, v)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..param.v:A vertex descriptor.
+...type:Metafunction.VertexDescriptor
+..returns:The length of the fragment represented by this vertex descriptor.
+..include:seqan/refinement.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor>
+inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type&
+fragmentLength(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+			   TVertexDescriptor const v)
+{
+	SEQAN_CHECKPOINT
+	return const_cast<typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type&>(g.data_fragment[v].data_length);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.findVertex:
+..cat:Graph
+..summary:Finds a vertex given a sequence id and a position.
+..signature:findVertex(g, id, pos)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..param.id:A sequence id.
+..param.pos:A position.
+..returns:The vertex covering the given position on the specified sequence.
+..include:seqan/refinement.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSeqId, typename TPos> 
+inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+findVertex(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+		   TSeqId id,
+		   TPos pos)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename TGraph::TKey_ TKey;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TIdType;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	
+	return (pos >= (TPos) length(getValueById(stringSet(g),id))) ? getNil<TVertexDescriptor>() : g.data_pvMap.upper_bound(TKey((TIdType)id, (TSize)pos))->second;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSeqId, typename TPosition, typename TSeqId2, typename TPosition2> 
+inline void
+getProjectedPosition(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+					 TSeqId const id1,
+					 TPosition const pos1,
+					 TSeqId2& id2,
+					 TPosition2& pos2)
+{
+	SEQAN_ASSERT_TRUE(length(stringSet(g)) == 2);
+
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	TStringSet& str = stringSet(g);
+	TVertexDescriptor sV = findVertex(g, id1, pos1);
+
+	// Case 1: No projection possible
+	if (sV == getNil<TVertexDescriptor>()) {
+		if ( (TSeqId) positionToId(str, 0) == id1) id2 = (TSeqId2) positionToId(str,1);
+		else id2 = (TSeqId2) positionToId(str,0);
+		pos2 = 0;
+		return;
+	}
+
+	// Case 2: Projection is possible
+	TEdgeStump* current = getValue(g.data_align.data_vertex, sV);
+	if(current != (TEdgeStump*) 0) {
+		TVertexDescriptor tV = target(current);
+		if (tV == sV) tV = source(current);
+		pos2 = (TPosition2) (fragmentBegin(g,tV) + (pos1 - fragmentBegin(g, sV)));
+		id2 = (TSeqId2) sequenceId(g, tV);
+		return;
+	} else {
+		// If no out-going edge, get the preceding or following vertex
+		if (fragmentBegin(g, sV) == 0) {
+			getProjectedPosition(g, id1, fragmentBegin(g,sV) + fragmentLength(g, sV), id2, pos2);
+			return;
+		} else {
+			getProjectedPosition(g, id1, fragmentBegin(g,sV) - 1, id2, pos2);
+			return;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TValue, typename TCargo, typename TSpec, typename TSeqId, typename TPosition, typename TSeqId2, typename TPosition2> 
+inline void
+getProjectedPosition(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+					 TValue seg_num,
+					 TSeqId const id1,
+					 TPosition const pos1,
+					 TSeqId2& id2,
+					 TPosition2& pos2)
+{
+	SEQAN_ASSERT_TRUE(length(stringSet(g)) == 2);
+
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	TStringSet& str = stringSet(g);
+	TVertexDescriptor sV = findVertex(g, id1, pos1);
+
+	// Case 1: No projection possible
+	if (sV == getNil<TVertexDescriptor>()) {
+		if ( (TSeqId) positionToId(str, 0) == id1) id2 = (TSeqId2) positionToId(str,1);
+		else id2 = (TSeqId2) positionToId(str,0);
+		pos2 = 0;
+		return;
+	}
+
+	// Case 2: Projection is possible
+	TEdgeStump* current = getValue(g.data_align.data_vertex, sV);
+	if(current != (TEdgeStump*) 0) {
+		TVertexDescriptor tV = target(current);
+		if (seg_num == 0) tV = source(current); // segnum 0 is defined as the sourceVertex, segnum 1 is targetVertex
+		pos2 = (TPosition2) (fragmentBegin(g,tV) + (pos1 - fragmentBegin(g, sV)));
+		id2 = (TSeqId2) sequenceId(g, tV);
+		return;
+	} else {
+		// If no out-going edge, get the preceding or following vertex
+		if (fragmentBegin(g, sV) == 0) {
+			getProjectedPosition(g, seg_num, id1, fragmentBegin(g,sV) + fragmentLength(g, sV), id2, pos2);
+			return;
+		} else {
+			getProjectedPosition(g, seg_num, id1, fragmentBegin(g,sV) - 1, id2, pos2);
+			return;
+		}
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getFirstCoveredPosition:
+..cat:Graph
+..summary:Finds the first position in a sequence that is not assigned to a nil vertex.
+..signature:getFirstCoveredPosition(g, id)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..param.id:A sequence id.
+..returns:A sequence position
+..see:Function.getLastCoveredPosition
+..include:seqan/refinement.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSeqId> 
+inline typename Position<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+getFirstCoveredPosition(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+						TSeqId const id)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Id<TGraph>::Type TIdType;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename TGraph::TPosToVertexMap_ TPosToVertexMap;
+
+
+	typename TPosToVertexMap::const_iterator it = g.data_pvMap.upper_bound(std::make_pair(id, 0));
+
+	// Case 1: id is not covered
+	if (it == g.data_pvMap.end()) return length(getValueById(stringSet(g), id));
+
+	// Case 2: We found a nil vertex, go one forward
+	if (it->second == getNil<TVertexDescriptor>()) {
+		++it;
+		if (it == g.data_pvMap.end()) return length(getValueById(stringSet(g), id));
+	}
+
+	// Now we have the right vertex, return the beginning if the sequence id still fits
+	if (it->first.first != id) return length(getValueById(stringSet(g), id));
+	else return fragmentBegin(g, it->second);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.getLastCoveredPosition:
+..cat:Graph
+..summary:Finds the last position in a sequence that is not assigned to a nil vertex.
+..signature:getLastCoveredPosition(g, id)
+..param.g:An alignment graph.
+...type:Spec.Alignment Graph
+..param.id:A sequence id.
+..returns:A sequence position
+..see:Function.getFirstCoveredPosition
+..include:seqan/refinement.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSeqId> 
+inline typename Position<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type 
+getLastCoveredPosition(Graph<Alignment<TStringSet, TCargo, TSpec> >& g,
+					   TSeqId id)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Id<TGraph>::Type TIdType;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename EdgeType<TGraph>::Type TEdgeStump;
+	typedef typename TGraph::TPosToVertexMap_ TPosToVertexMap;
+
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+	typename TPosToVertexMap::const_iterator it = g.data_pvMap.lower_bound(std::make_pair(id, length(getValueById(stringSet(g), id))));
+
+	// Case 1: No last position (all nil)
+	if ((it == g.data_pvMap.begin()) && (it->second == nilVertex)) return 0;
+
+	// Case 2: Found a nil position but there is a vertex before
+	if (it->second == nilVertex) {
+		--it;
+	}
+
+	// If the sequence id still matches return the position behind the last position belonging to this vertex
+	if (it->first.first != id) return 0;
+	return fragmentBegin(g, it->second) + fragmentLength(g, it->second);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TComponentMap, typename TOrderMap, typename TComponentLength> 
+inline bool
+convertAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+				 TComponentMap& component,
+				 TOrderMap& order,
+				 TComponentLength& compLength)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Id<TGraph>::Type TIdType;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TComponentMap>::Type TComponent;
+	typedef typename TGraph::TPosToVertexMap_ TPosToVertexMap;
+	typedef typename TComponentLength::mapped_type TMappedType;
+	typedef typename TComponentLength::key_type TKeyType;
+	TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();
+
+	// Check for empty graph
+	if (empty(g)) return false;
+
+	// Connected Components
+	TSize numComponents = connectedComponents(g, component);
+
+	// Make a directed graph to represent the ordering of the components
+	// Note: Multiple vertices might have the same component
+	Graph<Directed<void, WithoutEdgeId> > componentGraph;
+	reserve(_getVertexString(componentGraph), numComponents);
+	for(TSize i = 0; i<numComponents;++i) addVertex(componentGraph);
+	
+	TSize nseq = length(value(g.data_sequence));
+	String<std::set<TComponent> > componentsPerSeq;
+	typedef String<String<TComponent> > TOrderedComponents;
+	TOrderedComponents orderedComponentsPerSeq;
+	resize(componentsPerSeq, nseq);
+	resize(orderedComponentsPerSeq, nseq);
+	typename TPosToVertexMap::const_iterator it1 = g.data_pvMap.begin();
+	typename TPosToVertexMap::const_iterator it1End = g.data_pvMap.end();
+	for(;it1!=it1End;++it1) {
+		// If sections are not assigned to a vertex -> no alignment
+		if (it1->second == nilVertex) return false;
+		
+		// Remember the sequence that component belongs to 
+		TSize currentSeq = idToPosition(value(g.data_sequence), it1->first.first);
+
+		// Append component
+		TComponent c = getProperty(component, it1->second);
+		if ((value(componentsPerSeq,currentSeq)).empty()) {
+			String<TComponent> tmp;
+			value(orderedComponentsPerSeq, currentSeq) = tmp;
+		}
+		appendValue(value(orderedComponentsPerSeq, currentSeq), c, Generous());
+		// If two components appear twice in the same sequence -> no alignment
+		if (!((value(componentsPerSeq,currentSeq)).insert(c)).second) return false;	
+	}
+	clear(componentsPerSeq);
+
+	// Draw edges for the components within a sequence
+	typedef typename Iterator<TOrderedComponents>::Type TIterTOrderedComponents;
+	TIterTOrderedComponents itBegin = begin(orderedComponentsPerSeq);
+	TIterTOrderedComponents itEnd = end(orderedComponentsPerSeq);
+	for(;itBegin != itEnd; ++itBegin) {
+		TSize n = length(*itBegin);
+		for(TSize i = 0; i<n-1; ++i) {
+			addEdge(componentGraph, value((*itBegin), i), value((*itBegin), i+1));
+		}
+	}
+	
+	// Make a topological sort of the component graph
+	topologicalSort(componentGraph, order);
+
+	//// Debug code
+	//std::cout << "Topological sort: " << std::endl;
+	//for(TSize i = 0; i<length(order);++i) {
+	//	std::cout << order[i] << ',';
+	//}
+	//std::cout << std::endl;
+
+	// Walk through all sequences and check the component order
+	unsigned int compIndex = 0;
+	unsigned int compIndexLen = length(order);
+	typename TPosToVertexMap::const_iterator it = g.data_pvMap.begin();
+	TIdType currentSeq = it->first.first;
+	for(; it != g.data_pvMap.end(); ++it) {
+		if (it->first.first != currentSeq) {
+			compIndex = 0;
+			currentSeq = it->first.first;
+		}
+		TKeyType c = (TKeyType) getProperty(component, it->second);
+		compLength.insert(std::make_pair(c, (TMappedType) fragmentLength(g, it->second)));
+		while ((compIndex < compIndexLen) && (order[compIndex] != c)) ++compIndex;
+		// Crossing components -> no alignment
+		if (compIndex >= compIndexLen) return false;
+		// Next component
+		++compIndex;
+	}
+
+	return true;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.convertAlignment:
+..cat:Graph
+..summary:Converts an alignment graph into an alignment matrix.
+..signature:convertAlignment(g, matrix)
+..param.g:In-parameter: An alignment graph.
+...type:Spec.Alignment Graph
+..param.matrix:Out-parameter: A string that represents an alignment matrix.
+..returns: A bool that is true iff the alignment graph is a valid alignment
+..include:seqan/refinement.h
+*/
+template<typename TStringSet, typename TCargo, typename TSpec, typename TMatrix> 
+inline bool
+convertAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+				 TMatrix& mat)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Value<TMatrix>::Type TValue;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TIdType;
+	typedef typename TGraph::TPosToVertexMap_ TPosToVertexMap;
+	typedef std::map<unsigned int, unsigned int> TComponentLength;
+	
+	// Strongly Connected Components, topological sort, and length of each component
+	String<unsigned int> component;
+	String<unsigned int> order;
+	TComponentLength compLength;
+
+	if (!convertAlignment(g, component, order, compLength)) return false;
+
+	// Create the matrix
+	TSize len = 0;
+	TSize nseq = length(stringSet(g));
+	for(TComponentLength::iterator cIt=compLength.begin(); cIt != compLength.end(); ++cIt) len+=cIt->second;
+	char gapChar = gapValue<char>();
+	resize(mat, len * nseq, gapChar);
+
+	// Fill the matrix
+	TSize row = 0;
+	TSize col = 0;
+	typename TPosToVertexMap::const_iterator it = g.data_pvMap.begin();
+	unsigned int compIndex = 0;
+	unsigned int compIndexLen = length(order);
+	TIdType currentSeq = it->first.first;
+	for(; it != g.data_pvMap.end(); ++it) {
+		if (it->first.first != currentSeq) {
+			SEQAN_ASSERT_TRUE(col <= len);
+			//std::cout << std::endl;
+			++row;col=0;
+			compIndex = 0;
+			currentSeq = it->first.first;
+		}
+		unsigned int c = getProperty(component, it->second);
+		while ((compIndex < compIndexLen) && (order[compIndex] != c)) {
+			for(TSize i=0;i<compLength[order[compIndex]];++i, ++col) 
+				mat[row*len + col] = gapValue<char>();
+			++compIndex;
+		}
+		typedef typename Value<TStringSet>::Type TStringSetStr;
+		TStringSetStr str = label(g,it->second);
+		typedef typename Iterator<TStringSetStr, Standard>::Type TStringSetStrIter;
+		TStringSetStrIter itStr = begin(str, Standard());
+		TStringSetStrIter itStrEnd = end(str, Standard());
+		for(;itStr != itStrEnd; goNext(itStr), ++col) 
+			mat[row*len + col] = (TValue) (*itStr);
+		++compIndex;
+	}
+	SEQAN_ASSERT_TRUE(row + 1 == nseq);
+	//std::cout << std::endl;
+
+	return true;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSpec1, typename TStringSet, typename TCargo, typename TSpec2> 
+inline bool
+convertAlignment(String<TValue, TSpec1> const& mat,
+				 Graph<Alignment<TStringSet, TCargo, TSpec2> >& g)
+{
+	typedef String<TValue, TSpec1> TMatrix;
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec2> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Value<TStringSet>::Type TSequence;
+	typedef typename Value<TSequence>::Type TAlphabet;
+	typedef typename Iterator<TMatrix, Standard>::Type TMatIter;
+	clearVertices(g);
+	TValue gapChar = gapValue<TValue>();
+	TSize nseq = length(stringSet(g));
+	TSize alignLen = length(mat) / nseq;
+	String<Fragment<> > matches;
+	for(TSize seq1 = 0; seq1<nseq; ++seq1) {
+		for(TSize seq2 = seq1 + 1; seq2<nseq; ++seq2) {
+			TMatIter seq1It = begin(mat);
+			seq1It += seq1 * alignLen;
+			TMatIter seq2It = begin(mat);
+			seq2It += seq2 * alignLen;
+			TSize alignPos = 0;
+			TSize length = 0;
+			TSize offset1 = 0;
+			TSize offset2 = 0;
+			for(TSize col = 0; col<alignLen; ++col, ++seq1It, ++seq2It, ++alignPos) {
+				if ((*seq1It == gapChar) || (*seq2It == gapChar)) {
+					if (length) {
+						appendValue(matches, Fragment<>(seq1, alignPos - offset1 - length, seq2, alignPos - offset2 - length, length));
+						length = 0;
+					}
+					if (*seq1It == gapChar) ++offset1;
+					if (*seq2It == gapChar) ++offset2;
+				} else ++length;
+			}
+			if (length) appendValue(matches, Fragment<>(seq1, alignPos - offset1 - length, seq2, alignPos - offset2 - length, length));
+		}
+	}
+	//_debugMatches(stringSet(g), matches);
+	matchRefinement(matches,stringSet(g),g);
+	return true;
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TStringSet, typename TCargo, typename TSpec>
+inline void
+rebuildGraph(Graph<Alignment<TStringSet, TCargo, TSpec> >& g)
+{
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TEdgeIterator;
+	typedef typename Size<TGraph>::Type TSize;
+
+	// Initialization
+	typedef Fragment<> TFragment;
+	typedef String<TFragment> TFragmentString;
+	typedef typename Iterator<TFragmentString>::Type TFragmentStringIter;
+	TFragmentString matches;
+	TSize nseq = length(stringSet(g));
+
+	// Collect all character pairs
+	typedef std::pair<TSize, TSize> TResiduePair;
+	typedef std::set<TResiduePair> TResiduePairSet;
+	String<TResiduePairSet> resPair;
+	resize(resPair, nseq * nseq);	
+	TEdgeIterator itE(g);
+	for(;!atEnd(itE);++itE) {
+		TVertexDescriptor sV = sourceVertex(itE);
+		TVertexDescriptor tV = targetVertex(itE);
+		TSize seq1 = idToPosition(stringSet(g), sequenceId(g, sV));
+		TSize seq2 = idToPosition(stringSet(g), sequenceId(g, tV));
+		TSize index = 0;
+		TSize pos1 = 0;
+		TSize pos2 = 0;
+		if (seq1 < seq2) {
+			index = seq1 * nseq + seq2;
+			pos1 = fragmentBegin(g, sV);
+			pos2 = fragmentBegin(g, tV);
+		} else {
+			index = seq2 * nseq + seq1;
+			pos1 = fragmentBegin(g, tV);
+			pos2 = fragmentBegin(g, sV);
+		}
+		for(TSize i = 0; i<fragmentLength(g, sV); ++i) {
+			resPair[index].insert(std::make_pair(pos1 + i, pos2 + i));
+		}
+	}
+
+	// Rebuild the graph with maximal segments
+	for(TSize i = 0; i<length(resPair); ++i) {
+		if (resPair[i].empty()) continue;
+		TSize seq1 = i / nseq;
+		TSize seq2 = i % nseq;
+		typename TResiduePairSet::const_iterator pos = resPair[i].begin();
+		typename TResiduePairSet::const_iterator posEnd = resPair[i].end();
+		TSize startMatch1 = pos->first;
+		TSize startMatch2 = pos->second;
+		TSize len = 1;
+		++pos;
+		while(pos != posEnd) {
+			if ((startMatch1 + len == pos->first) && (startMatch2 + len == pos->second)) ++len;
+			else {
+				appendValue(matches, TFragment(seq1, startMatch1, seq2, startMatch2, len), Generous());
+				startMatch1 = pos->first;
+				startMatch2 = pos->second;
+				len = 1;
+			}
+			++pos;
+		}
+		appendValue(matches, TFragment(seq1, startMatch1, seq2, startMatch2, len), Generous());
+	}
+	clearVertices(g);
+	matchRefinement(matches,stringSet(g),g);
+}
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Heaviest Common Subsequence adaptation
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSize2, typename TSpec2, typename TPositions, typename TSize, typename TVertexDescriptor, typename TString>
+inline void
+_heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const&,
+							String<TSize2, TSpec2> const& /*slotToPos*/,
+							TPositions const&,
+							TSize const,
+							TSize const,
+							TVertexDescriptor const,
+							TString const&, 
+							TString const&,
+							Nothing&) 
+{
+	SEQAN_CHECKPOINT
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TSize2, typename TSpec2, typename TPositions, typename TSize, typename TString, typename TOutString>
+inline void
+_heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+							String<TSize2, TSpec2> const& slotToPos,
+							TPositions const& positions,
+							TSize const m,
+							TSize const n,
+							TString const& str1, 
+							TString const& str2,
+							TOutString& align) 
+{
+	SEQAN_CHECKPOINT
+	typedef typename Value<TString>::Type TVertexSet;
+	typedef typename Iterator<TString const, Standard>::Type TStringIter;
+	typedef typename Iterator<TString, Standard>::Type TSIter;
+	typedef typename Iterator<TVertexSet const, Standard>::Type TVertexSetIter;
+	typedef typename Iterator<TVertexSet, Standard>::Type TIter;	
+
+	// Create the alignment sequence
+	TSize numMatches = length(positions);
+	TSize alignLength = numMatches + (n - numMatches) + (m - numMatches);
+	clear(align);
+	resize(align, alignLength, TVertexSet(), Exact() );
+	TSIter pointerAlign = begin(align, Standard());
+	TSIter pointerAlignEnd = end(align, Standard());
+	TStringIter pointerStr1 = begin(str1, Standard());
+	TSize posStr1 = 0;
+	TSize posStr2 = 0;
+	TStringIter pointerStr2 = begin(str2, Standard());
+	int p = length(positions) - 1;
+	while(pointerAlign != pointerAlignEnd) {
+		TSize i = m;
+		TSize j = n;
+		if (p>=0) {
+			i = (TSize) (slotToPos[positions[p]] / (TSize) n);   // Get the index in str1
+			j = n - 1 - (TSize) (slotToPos[positions[p]] % (TSize) n); // Get the index in str2
+		};
+
+		// In what order do we insert gaps? -> Only important at the beginning and at the end, not between matches
+		bool firstI = true;
+		if ((i != posStr1) && (j != posStr2)) 
+		{
+			if ((posStr1 == 0) && (posStr2 == 0)) {
+				TStringIter tmpPointerStr1 = pointerStr1;
+				TStringIter tmpPointerStr2 = pointerStr2;
+				TSize tmpPosStr1 = posStr1;
+				TSize tmpPosStr2 = posStr2;
+				TSize len1 = 0;
+				TSize len2 = 0;
+				for(;i != tmpPosStr1; ++tmpPosStr1, ++tmpPointerStr1) len1 += fragmentLength(g, value(*tmpPointerStr1, 0));
+				for(;j != tmpPosStr2; ++tmpPosStr2, ++tmpPointerStr2) len2 += fragmentLength(g, value(*tmpPointerStr2, 0));
+				if (len1 > len2) firstI = false;
+			} else if ((i == m) && (i == n)) {
+				TStringIter tmpPointerStr1 = pointerStr1;
+				TStringIter tmpPointerStr2 = pointerStr2;
+				TSize tmpPosStr1 = posStr1;
+				TSize tmpPosStr2 = posStr2;
+				TSize len1 = 0;
+				TSize len2 = 0;
+				for(;i != tmpPosStr1; ++tmpPosStr1, ++tmpPointerStr1) len1 += fragmentLength(g, value(*tmpPointerStr1, 0));
+				for(;j != tmpPosStr2; ++tmpPosStr2, ++tmpPointerStr2) len2 += fragmentLength(g, value(*tmpPointerStr2, 0));
+				if (len1 < len2) firstI = false;
+			}
+		}
+		if (firstI) {
+			// Gaps in seq 2
+			while (i != posStr1) {
+				TVertexSetIter itV = begin(*pointerStr1, Standard());
+				TVertexSetIter itVEnd = end(*pointerStr1, Standard());
+				for(;itV != itVEnd;++itV) appendValue(*pointerAlign, *itV, Generous());
+				++pointerAlign;
+				++pointerStr1; ++posStr1;
+			}
+			// Gaps in seq 1
+			while (j != posStr2) {
+				TVertexSetIter itV = begin(*pointerStr2, Standard());
+				TVertexSetIter itVEnd = end(*pointerStr2, Standard());
+				for(;itV != itVEnd;++itV) appendValue(*pointerAlign, *itV, Generous());
+				++pointerAlign;
+				++pointerStr2; ++posStr2;
+			}
+		} else {
+			// Gaps in seq 1
+			while (j != posStr2) {
+				TVertexSetIter itV = begin(*pointerStr2, Standard());
+				TVertexSetIter itVEnd = end(*pointerStr2, Standard());
+				for(;itV != itVEnd;++itV) appendValue(*pointerAlign, *itV, Generous());
+				++pointerAlign;
+				++pointerStr2; ++posStr2;
+			}
+			// Gaps in seq 2
+			while (i != posStr1) {
+				TVertexSetIter itV = begin(*pointerStr1, Standard());
+				TVertexSetIter itVEnd = end(*pointerStr1, Standard());
+				for(;itV != itVEnd;++itV) appendValue(*pointerAlign, *itV, Generous());
+				++pointerAlign;
+				++pointerStr1; ++posStr1;
+			}
+		}
+
+		// Matches
+		if (p>=0) {
+			TVertexSetIter itV = begin(*pointerStr1, Standard());
+			TVertexSetIter itVEnd = end(*pointerStr1, Standard());
+			for(;itV != itVEnd;++itV) appendValue(*pointerAlign, *itV, Generous());
+			TVertexSetIter itV2 = begin(*pointerStr2, Standard());
+			TVertexSetIter itVEnd2 = end(*pointerStr2, Standard());
+			for(;itV2 != itVEnd2;++itV2) appendValue(*pointerAlign, *itV2, Generous());
+			++pointerAlign;
+			++pointerStr1; ++posStr1;
+			++pointerStr2; ++posStr2;
+			--p;
+		}
+	}
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TString, typename TOutString>
+inline TCargo
+heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+						  TString const& str1, 
+						  TString const& str2,
+						  TOutString& align) 
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	typedef typename Iterator<TGraph, OutEdgeIterator>::Type TOutEdgeIterator;
+	typedef typename Value<TString>::Type TVertexSet;
+
+	TSize m = length(str1);  // How many sets of vertex descriptors in seq1
+	TSize n = length(str2);  // How many sets of vertex descriptors in seq2
+
+	// Size of the sequences
+	// Note for profile alignments every member of the sequence is a String!!! of vertex descriptors
+	
+	// Fill the vertex to position map for str1
+	// Remember for each vertex descriptor the position in the sequence
+	typedef String<TSize> TMapVertexPos;
+	TMapVertexPos map;
+	resize(map, getIdUpperBound(_getVertexIdManager(g)), MaxValue<TSize>::VALUE);
+	typedef typename Iterator<TString const, Standard>::Type TStringIterConst;
+	typedef typename Iterator<TVertexSet const, Standard>::Type TVertexSetIterConst;
+	TStringIterConst itStr1 = begin(str1, Standard());
+	TStringIterConst itStrEnd1 = end(str1, Standard());
+	TSize pos = 0;
+	TVertexSetIterConst itV;
+	TVertexSetIterConst itVEnd;
+	for(;itStr1 != itStrEnd1;++itStr1, ++pos) {
+		itV = begin(*itStr1, Standard());
+		itVEnd = end(*itStr1, Standard());	
+		for(;itV != itVEnd;++itV) map[*itV] = pos;
+	}
+
+	// We could create the full graph -> too expensive
+	// Remember which edges are actually present
+	typedef String<TSize> TOccupiedPositions;
+	typedef typename Iterator<TOccupiedPositions, Standard>::Type TOccIter;
+	TOccupiedPositions occupiedPositions;
+	TStringIterConst itStr2 = begin(str2, Standard());
+	TStringIterConst itStrEnd2 = end(str2, Standard());
+	TSize posItStr2 = 0;
+	TSize pPos = 0;
+	for(;itStr2 != itStrEnd2;++itStr2, ++posItStr2) {
+		itV = begin(*itStr2, Standard());
+		itVEnd = end(*itStr2, Standard());
+		for(;itV != itVEnd;++itV) {
+			TOutEdgeIterator itOut(g, *itV);
+			for(;!atEnd(itOut); ++itOut) {
+				// Target vertex must be in the map
+				pPos = map[targetVertex(itOut)];
+				if (pPos != MaxValue<TSize>::VALUE) 
+					appendValue(occupiedPositions, pPos * n + (TSize) (n - posItStr2 - 1), Generous());
+			}
+		}
+	}
+	::std::sort(begin(occupiedPositions, Standard()), end(occupiedPositions, Standard()));
+	// Get all occupied positions
+	typedef String<TSize> TSlotToPos;
+	typedef typename Iterator<TSlotToPos, Standard>::Type TSlotToPosIter;
+	TSlotToPos slotToPos;
+	TSize counter = 0;
+	TSize oldVal = MaxValue<TSize>::VALUE;
+	TOccIter occIt = begin(occupiedPositions, Standard());
+	TOccIter occItEnd = end(occupiedPositions, Standard());
+	for(;occIt != occItEnd; ++occIt) {
+		if (oldVal != *occIt) {
+			appendValue(slotToPos, *occIt, Generous());
+			oldVal = *occIt;
+			++counter;
+		}
+	}
+	clear(occupiedPositions);
+
+	// Walk through str2 and fill in the weights of the actual edges
+	typedef String<TCargo> TWeights;
+	typedef typename Iterator<TWeights>::Type TWeightsIter;
+	TWeights weights;
+	resize(weights, length(slotToPos), 0);
+	itStr2 = begin(str2, Standard());
+	posItStr2 = 0;
+	for(;itStr2 != itStrEnd2;++itStr2, ++posItStr2) {
+		itV = begin(*itStr2, Standard());
+		itVEnd = end(*itStr2, Standard());
+		for(;itV != itVEnd;++itV) {
+			TOutEdgeIterator itOut(g, *itV);
+			for(;!atEnd(itOut); ++itOut) {
+				// Target vertex must be in the map
+				pPos = map[targetVertex(itOut)];
+				if ( pPos != MaxValue<TSize>::VALUE) 
+					weights[::std::distance(begin(slotToPos, Standard()), ::std::lower_bound(begin(slotToPos, Standard()), end(slotToPos, Standard()), pPos * n + (TSize) (n - posItStr2 - 1)))] += (TCargo) cargo(*itOut);
+			}
+		}
+	}
+	clear(map);
+
+	// Now the tough part: Find the right number for a given position
+	typedef String<TSize> TSequenceString;
+	typedef typename Iterator<TSequenceString, Standard>::Type TSeqIter;
+	TSequenceString seq;
+	resize(seq, length(slotToPos));
+	TSeqIter itSeq = begin(seq, Standard());
+	TSlotToPosIter itSlotPos = begin(slotToPos, Standard());
+	TSlotToPosIter itSlotPosEnd = end(slotToPos, Standard());
+	for(;itSlotPos != itSlotPosEnd; ++itSlotPos, ++itSeq) 
+		*itSeq = n - 1 - (*itSlotPos % n); 
+
+	// Calculate the heaviest increasing subsequence
+	String<TSize> positions;
+	TCargo score = (TCargo) heaviestIncreasingSubsequence(seq, weights, positions);
+
+	// Retrieve the alignment sequence
+	_heaviestCommonSubsequence(g, slotToPos, positions, m, n, str1, str2, align);
+
+	return score;
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TSpec, typename TString>
+inline TCargo
+heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+						  TString const& str1, 
+						  TString const& str2) 
+{
+	SEQAN_CHECKPOINT
+	Nothing noth;
+	return heaviestCommonSubsequence(g, str1, str2, noth);
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/graph_impl_align_adapt.h b/src/SeqAn-1.3/seqan/refinement/graph_impl_align_adapt.h
new file mode 100644
index 0000000..ce5beba
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/graph_impl_align_adapt.h
@@ -0,0 +1,425 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_IMPL_ALIGN_ADAPT_H
+#define SEQAN_HEADER_GRAPH_IMPL_ALIGN_ADAPT_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Adaptations so that the alignment graph works like any other graph
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Alignment Graph OutEdgeIterator
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator for Alignment
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TIteratorSpec>
+class Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TIteratorSpec> > > 
+{
+public:
+	typedef Graph<Alignment<TStringSet, TCargo, TGraphSpec> > TGraph_;
+	typedef typename EdgeDescriptor<TGraph_>::Type TEdgeDescriptor_;
+	typedef typename VertexDescriptor<TGraph_>::Type TVertexDescriptor_;
+	
+	TGraph_ const* data_host;
+	TVertexDescriptor_ data_source;
+	TEdgeDescriptor_ data_edge;
+
+	Iter()	
+	{
+		SEQAN_CHECKPOINT
+	}
+	
+	Iter(TGraph_ const& _graph, TVertexDescriptor_ const v) : 
+		data_host(&_graph),
+		data_source(v)
+	{
+		SEQAN_CHECKPOINT
+		if (empty(_graph)) data_edge = 0;
+		else data_edge = getValue(_graph.data_align.data_vertex,v);
+	}
+	
+	Iter(Iter const& _iter) : 
+		data_host(_iter.data_host),
+		data_source(_iter.data_source),
+		data_edge(_iter.data_edge)
+	{
+	}
+
+	~Iter() {
+	}
+
+	Iter const&	operator = (Iter const & _other) {
+		SEQAN_CHECKPOINT
+		if (this == &_other) return *this;
+		data_host = _other.data_host;
+		data_source = _other.data_source;
+		data_edge = _other.data_edge;
+		return *this;
+	}
+//____________________________________________________________________________
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator - Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec>
+struct Iterator<Graph<Alignment<TStringSet, TCargo, TGraphSpec> > const, OutEdgeIterator>
+{	
+	typedef Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> > const, GraphIterator<InternalOutEdgeIterator<OutEdgeIterator> > > Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph InternalOutEdgeIterator - Functions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename GetValue<Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+getValue(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename Reference<Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type
+value(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return it.data_edge;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atBegin(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == getValue(_getVertexString(*it.data_host), it.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goBegin(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = getValue(_getVertexString(*it.data_host),it.data_source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+atEnd(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	return (it.data_edge == 0);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goEnd(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	it.data_edge = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goNext(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	if (!atEnd(it)) {
+		if (it.data_source == getSource(it.data_edge)) it.data_edge = getNextS(it.data_edge);
+		else it.data_edge = getNextT(it.data_edge);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goPrevious(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Undirected<TCargo, TGraphSpec> > TGraph;
+	typedef typename EdgeType<TGraph>::Type TEdge;
+	TEdge* current = getValue(_getVertexString(*it.data_host), it.data_source);
+	if (current == it.data_edge) return;
+	while (current != 0) {
+		if (it.data_source == getSource(current)) {
+			if (it.data_edge == getNextS(current)) break;
+			else current = getNextS(current);
+		} else {
+			if (it.data_edge == getNextT(current)) break;
+			else current = getNextT(current);
+		}
+	}
+	it.data_edge = current;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator ==(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge==it2.data_edge) && 
+			(it1.data_source==it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline bool
+operator !=(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1,
+			Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2)
+{
+	SEQAN_CHECKPOINT
+	return ((it1.data_edge!=it2.data_edge) || 
+			(it1.data_source!=it2.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TGraphSpec> > >::Type
+targetVertex(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TGraphSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	TVertexDescriptor target = targetVertex(*it.data_host, it.data_edge);
+	if (target != it.data_source) return target;
+	else return sourceVertex(*it.data_host, it.data_edge);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Go Next function for EdgeIterator
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec>
+inline void
+goNext(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalEdgeIterator<TSpec> > >& it)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TGraphSpec> > TGraph;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+	_goNextInternal(it);
+	TVertexDescriptor sourceV = sourceVertex(it.data_edge_it);
+	while((!atEnd(it)) && (targetVertex(hostGraph(it), getValue(it.data_edge_it)) == sourceV)) {
+		_goNextInternal(it);
+		sourceV = sourceVertex(it.data_edge_it);
+	}
+}
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Graph drawing adaptations
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TNodeAttributes>
+inline void
+_createNodeAttributes(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+					  TNodeAttributes& nodeMap)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Id<TGraph>::Type TIdType;
+	resizeVertexMap(g, nodeMap);
+
+	unsigned int scaling = 20 / length(value(g.data_sequence));
+	if (scaling == 0) scaling = 1;
+
+	typedef typename Iterator<TGraph, VertexIterator>::Type TConstIter;
+	TConstIter it(g);
+	for(;!atEnd(it);++it) {
+		TIdType id = sequenceId(g, *it);
+		std::ostringstream outs; 
+		outs << "label = \"";
+		outs << label(g, *it);
+		outs << "\", group = ";
+		outs << id;
+		append(property(nodeMap, *it), outs.str().c_str());		
+		//std::cout << property(nodeMap, *it) << std::endl;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStringSet, typename TSpec, typename TEdgeAttributes>
+inline void
+_createEdgeAttributes(Graph<Alignment<TStringSet, void, TSpec> > const& g,
+					  TEdgeAttributes& edgeMap)
+{
+	SEQAN_CHECKPOINT
+	_createEmptyEdgeAttributes(g.data_align,edgeMap);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TEdgeAttributes>
+inline void
+_createEdgeAttributes(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+					  TEdgeAttributes& edgeMap)
+{
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	resizeEdgeMap(g, edgeMap);
+
+	typedef typename Iterator<TGraph, EdgeIterator>::Type TConstEdIter;
+	TConstEdIter itEd(g);
+	for(;!atEnd(itEd);++itEd) {
+		TCargo c = getCargo(*itEd);
+		std::ostringstream outs; 
+		outs << "label = \"";
+		outs << (TCargo) c;
+		outs << "\",";
+		outs << "len = 10.0";
+		append(property(edgeMap, *itEd), outs.str().c_str());
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec>
+inline void
+_writeGraphFooter(TFile & file,
+				  Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
+				  DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	typedef Graph<Alignment<TStringSet, TCargo, TSpec> > TGraph;
+	typedef typename Size<TGraph>::Type TSize;
+	typedef typename Id<TGraph>::Type TId;
+	typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor;
+
+	TStringSet& str = stringSet(g);
+	TSize len = length(str);
+	for(TSize i = 0; i<len; ++i) {
+		TId seqId = positionToId(str, i);
+		TSize j = 0;
+		TVertexDescriptor nilVertex = getNil<TVertexDescriptor>();	
+		TVertexDescriptor previousVertex = nilVertex;
+		while(j<length(str[i])) {
+			TVertexDescriptor nextVertex = findVertex(const_cast<TGraph&>(g), seqId, j);
+			if (nextVertex == nilVertex) {
+				++j;
+				continue;
+			}
+			if (previousVertex != nilVertex) {
+				_streamPutInt(file, previousVertex);
+				_streamWrite(file, " -- ");
+				_streamPutInt(file, nextVertex);
+				_streamWrite(file, " [");
+				_streamWrite(file, "len=3.0, arrowhead=vee");
+				_streamWrite(file, "];\n");
+			}
+			previousVertex = nextVertex;
+			j += fragmentLength(g, nextVertex);
+		}
+	}
+	_streamPut(file, '\n');
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec>
+inline void
+_writeGraphType(TFile & file,
+				Graph<Alignment<TStringSet, TCargo, TSpec> > const&,
+				DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, "graph");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec>
+inline void
+_writeEdgeType(TFile & file,
+			   Graph<Alignment<TStringSet, TCargo, TSpec> > const&,
+			   DotDrawing)
+{
+	SEQAN_CHECKPOINT
+	_streamWrite(file, " -- ");
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/refinement/refinement_generated_forwards.h b/src/SeqAn-1.3/seqan/refinement/refinement_generated_forwards.h
new file mode 100644
index 0000000..26b4dc7
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/refinement/refinement_generated_forwards.h
@@ -0,0 +1,568 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_REFINEMENT_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_REFINEMENT_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Alignment
+
+template <typename TStringSet, typename TCargo , typename TSpec > struct Alignment;       	// "projects/library/seqan/refinement/graph_impl_align.h"(102)
+
+//____________________________________________________________________________
+// Annotation
+
+template <typename TSequence, typename TValue, typename TSpec > class Annotation;       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(45)
+
+//____________________________________________________________________________
+// CgVizFormat_
+
+struct CgVizFormat_;       	// "projects/library/seqan/refinement/graph_impl_align.h"(92)
+
+//____________________________________________________________________________
+// FastaFormat_
+
+struct FastaFormat_;       	// "projects/library/seqan/refinement/graph_impl_align.h"(81)
+
+//____________________________________________________________________________
+// FragmentInfo
+
+template <typename TId , typename TSize > class FragmentInfo;       	// "projects/library/seqan/refinement/graph_impl_align.h"(154)
+
+//____________________________________________________________________________
+// MsfFormat_
+
+struct MsfFormat_;       	// "projects/library/seqan/refinement/graph_impl_align.h"(70)
+
+//____________________________________________________________________________
+// StringSetType
+
+template <typename T> struct StringSetType;       	// "projects/library/seqan/refinement/graph_impl_align.h"(1158)
+
+//____________________________________________________________________________
+// TagExactRefinement_
+
+struct TagExactRefinement_;       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(42)
+struct TagExactRefinement_;       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(42)
+
+//____________________________________________________________________________
+// TagInexactRefinement_
+
+struct TagInexactRefinement_;       	// "projects/library/seqan/refinement/graph_algorithm_refine_inexact.h"(43)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// CgVizFormat
+
+typedef Tag<CgVizFormat_> const CgVizFormat;       	// "projects/library/seqan/refinement/graph_impl_align.h"(93)
+
+//____________________________________________________________________________
+// ExactRefinement
+
+typedef Tag<TagExactRefinement_> const ExactRefinement;       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(43)
+typedef Tag<TagExactRefinement_> const ExactRefinement;       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(43)
+
+//____________________________________________________________________________
+// FastaFormat
+
+typedef Tag<FastaFormat_> const FastaFormat;       	// "projects/library/seqan/refinement/graph_impl_align.h"(82)
+
+//____________________________________________________________________________
+// InexactRefinement
+
+typedef Tag<TagInexactRefinement_> const InexactRefinement;       	// "projects/library/seqan/refinement/graph_algorithm_refine_inexact.h"(44)
+
+//____________________________________________________________________________
+// MsfFormat
+
+typedef Tag<MsfFormat_> const MsfFormat;       	// "projects/library/seqan/refinement/graph_impl_align.h"(71)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _addAnnotationCuts
+
+template <typename TValue, typename TAliString, typename TGraph, typename TPropertyMap, typename TStringSet, typename TMap, typename TTagSpec> inline void _addAnnotationCuts(String<std::set<TValue> > &, TAliString &, String<TGraph> &, String<TPropertyMap> &, TStringSet &, TMap &, bool, TValue, Tag<TTagSpec>);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(145)
+template <typename TValue, typename TAliString, typename TGraph, typename TPropertyMap, typename TStringSet, typename TMap, typename TAnnoString, typename TTagSpec> inline void _addAnnotationCuts(String<std::set<TValue> > & all_nodes, TAliString & alis, String<TGraph> & gs, String<TPropertyMap> & pms, TStringSet & seq, TMap & seq_map, TAnnoString & annotation, TValue min_fragment_len, Tag<TTagSpec> tag);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(165)
+
+//____________________________________________________________________________
+// _addNodeAnnotation
+
+template <typename TPropertyMap, typename TStringSet, typename TMap, typename TAnnoString, typename TAliGraph,typename TTagSpec> inline void _addNodeAnnotation(TStringSet &, TMap &, TAnnoString & annotation, TPropertyMap & pm, TAliGraph & ali_g, Tag<TTagSpec>);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(212)
+
+//____________________________________________________________________________
+// _buildIntervalsForAllSequences
+
+template <typename TInterval, typename TStringSet, typename TAlignmentString, typename TSeqMap> void _buildIntervalsForAllSequences(TAlignmentString & alis, String<String<TInterval> > & intervals, TStringSet & seqs, TSeqMap & seq_map);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(153)
+template <typename TInterval, typename TStringSet, typename TAlignmentString, typename TSeqMap> void _buildIntervalsForAllSequences(TAlignmentString & alis, String<String<TInterval> > & intervals, TStringSet & seqs, TSeqMap & seq_map);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(168)
+
+//____________________________________________________________________________
+// _copyGraph
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline void _copyGraph(Graph<Alignment<TStringSet, TCargo, TSpec> > const& source, Graph<Alignment<TStringSet, TCargo, TSpec> >& dest, bool);       	// "projects/library/seqan/refinement/graph_impl_align.h"(317)
+template <typename TStringSet, typename TCargo, typename TSpec> inline void _copyGraph(Graph<Alignment<TStringSet, TCargo, TSpec> > const& source, Graph<Alignment<TStringSet, TCargo, TSpec> >& dest);       	// "projects/library/seqan/refinement/graph_impl_align.h"(332)
+
+//____________________________________________________________________________
+// _createEdgeAttributes
+
+template <typename TStringSet, typename TSpec, typename TEdgeAttributes> inline void _createEdgeAttributes(Graph<Alignment<TStringSet, void, TSpec> > const& g, TEdgeAttributes& edgeMap);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(329)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TEdgeAttributes> inline void _createEdgeAttributes(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TEdgeAttributes& edgeMap);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(340)
+
+//____________________________________________________________________________
+// _createNodeAttributes
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TNodeAttributes> inline void _createNodeAttributes(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TNodeAttributes& nodeMap);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(300)
+
+//____________________________________________________________________________
+// _createTreesForAllSequences
+
+template <typename TGraph, typename TPropertyMap, typename TAlignmentString, typename TSequence, typename TSetSpec, typename TValue, typename TSeqMap> void _createTreesForAllSequences(String<TGraph> & gs, String<TPropertyMap> & pms, TAlignmentString & alis, StringSet<TSequence,TSetSpec> & seqs, TSeqMap & seq_map, TValue numSequences);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(194)
+template <typename TGraph, typename TPropertyMap, typename TAlignmentString, typename TSequence, typename TSetSpec, typename TValue, typename TSeqMap> void _createTreesForAllSequences(String<TGraph> & gs, String<TPropertyMap> & pms, TAlignmentString & alis, StringSet<TSequence,TSetSpec> & seqs, TSeqMap & seq_map, TValue numSequences);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(210)
+
+//____________________________________________________________________________
+// _cutIsValid
+
+template <typename TValue> inline bool _cutIsValid(String<std::set<TValue> > & all_nodes, TValue seq_i_pos, TValue pos_i, typename std::set<TValue>::iterator iter, TValue min_len, Tag<TagInexactRefinement_> const);       	// "projects/library/seqan/refinement/graph_algorithm_refine_inexact.h"(56)
+template <typename TValue> inline bool _cutIsValid(String<std::set<TValue> > & all_nodes, TValue seq_i_pos, TValue, typename std::set<TValue>::iterator iter, TValue, Tag<TagExactRefinement_> const);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(54)
+template <typename TValue> inline bool _cutIsValid(String<std::set<TValue> > & all_nodes, TValue seq_i_pos, TValue, typename std::set<TValue>::iterator iter, TValue, Tag<TagExactRefinement_> const);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(54)
+
+//____________________________________________________________________________
+// _getClosestRefinedNeighbor
+
+template <typename TAliGraph, typename TVertexDescriptor,typename TValue> TValue _getClosestRefinedNeighbor(TAliGraph & ali_g, TVertexDescriptor & vd, TValue , TValue pos);       	// "projects/library/seqan/refinement/graph_algorithm_refine_inexact.h"(89)
+
+//____________________________________________________________________________
+// _getCutBeginPos
+
+template <typename TAliGraph,typename TValue> void _getCutBeginPos(TAliGraph & ali_g, typename VertexDescriptor<TAliGraph>::Type & act_knot, TValue seq, TValue act_pos, TValue & cut_act_pos);       	// "projects/library/seqan/refinement/graph_algorithm_refine_inexact.h"(128)
+
+//____________________________________________________________________________
+// _getCutEndPos
+
+template <typename TAliGraph,typename TValue> void _getCutEndPos(TAliGraph & ali_g, typename VertexDescriptor<TAliGraph>::Type & end_knot, TValue seq, TValue end_pos, TValue & cut_end_pos);       	// "projects/library/seqan/refinement/graph_algorithm_refine_inexact.h"(106)
+
+//____________________________________________________________________________
+// _getEdgeIdManager
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline typename EdgeIdHandler<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type& _getEdgeIdManager(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(303)
+
+//____________________________________________________________________________
+// _getOtherSequenceAndProject
+
+template <typename TFragSize, typename TFragSpec,typename TValue, typename TMap> void _getOtherSequenceAndProject(Fragment<TFragSize,TFragSpec> & segment, TValue seg_num, TMap &, TValue seq_i_id, TValue pos_i, TValue & seq_j_id, TValue & pos_j);       	// "projects/library/seqan/refinement/graph_algorithm_refine_fragment.h"(56)
+template <typename TSource,typename TSpec,typename TValue,typename TMap> void _getOtherSequenceAndProject(Align<TSource,TSpec> & segment, TValue seg_num, TMap & seq_map, TValue , TValue node_i, TValue & seq_j_id, TValue & node_j);       	// "projects/library/seqan/refinement/graph_algorithm_refine_align.h"(54)
+template <typename TAlignment,typename TValue, typename TMap> void _getOtherSequenceAndProject(Graph<TAlignment> & segment, TValue seg_num, TMap &, TValue seq_i_id, TValue pos_i, TValue & seq_j_id, TValue & pos_j);       	// "projects/library/seqan/refinement/graph_algorithm_refine_aligngraph.h"(56)
+
+//____________________________________________________________________________
+// _getRefinedAnnoScore
+
+template <typename TAliGraph,typename TScore, typename TPropertyMap> typename Value<TScore>::Type _getRefinedAnnoScore(TAliGraph &, TPropertyMap & pm, typename VertexDescriptor<TAliGraph>::Type vd1, typename VertexDescriptor<TAliGraph>::Type vd2, TScore &);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(264)
+template <typename TAliGraph,typename TScore> typename Value<TScore>::Type _getRefinedAnnoScore(TAliGraph &, bool, typename VertexDescriptor<TAliGraph>::Type, typename VertexDescriptor<TAliGraph>::Type, TScore &);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(296)
+
+//____________________________________________________________________________
+// _getRefinedMatchScore
+
+template <typename TScoreValue,typename TScoreSpec,typename TStringSet,typename TFragment,typename TFragPos,typename TFragSize> TScoreValue _getRefinedMatchScore(Score<TScoreValue,TScoreSpec> & score_type, TStringSet & seqs, TFragment& segment, TFragPos pos_i, TFragPos pos_j, TFragSize len, TFragSize);       	// "projects/library/seqan/refinement/graph_algorithm_refine_fragment.h"(170)
+template <typename TScoreValue,typename TStringSet,typename TFragPos,typename TFragSize, typename TSpec> TScoreValue _getRefinedMatchScore(Score<TScoreValue, Simple> & score_type, TStringSet &, Fragment<TFragSize,ExactFragment<TSpec> > &, TFragPos, TFragPos, TFragSize len, TFragSize);       	// "projects/library/seqan/refinement/graph_algorithm_refine_fragment.h"(201)
+template <typename TScoreValue,typename TScoreSpec,typename TStringSet,typename TAliSource,typename TAliSpec,typename TValue> TScoreValue _getRefinedMatchScore(Score<TScoreValue,TScoreSpec> & score_type, TStringSet &, Align<TAliSource,TAliSpec> & segment, TValue pos_i, TValue pos_j, TValue len, TValue);       	// "projects/library/seqan/refinement/graph_algorithm_refine_align.h"(116)
+template <typename TScoreValue,typename TStringSet,typename TAlign,typename TValue, typename TSize> TScoreValue _getRefinedMatchScore(TScoreValue &, TStringSet &, TAlign &, TValue, TValue, TSize, TSize);       	// "projects/library/seqan/refinement/graph_algorithm_refine_scoring.h"(54)
+template <typename TScoreValue,typename TScoreSpec,typename TStringSet,typename TAlignment,typename TValue> TScoreValue _getRefinedMatchScore(Score<TScoreValue,TScoreSpec> & score_type, TStringSet & seqs, Graph<TAlignment> & segment, TValue pos_i, TValue pos_j, TValue len, TValue len_j);       	// "projects/library/seqan/refinement/graph_algorithm_refine_aligngraph.h"(189)
+
+//____________________________________________________________________________
+// _getSeqBeginAndEnd
+
+template <typename TFragSize, typename TFragSpec, typename TValue> void _getSeqBeginAndEnd(Fragment<TFragSize,TFragSpec> & segment, std::map<const void * ,int> &, TValue & seq_i_id, TValue & begin_i, TValue & end_i, TValue seq);       	// "projects/library/seqan/refinement/graph_algorithm_refine_fragment.h"(78)
+template <typename TAliSource,typename TAliSpec, typename TValue> void _getSeqBeginAndEnd(Align<TAliSource,TAliSpec> & segment, std::map<const void * ,int> & seq_map, TValue & seq_i_id, TValue & begin_i, TValue & end_i, TValue seq);       	// "projects/library/seqan/refinement/graph_algorithm_refine_align.h"(92)
+template <typename TValue,typename TAlign,typename TId> void _getSeqBeginAndEnd(Graph<TAlign> & segment, std::map<const void * ,int> &, TId & seq_i_id, TValue & begin_i, TValue & end_i, TValue seq);       	// "projects/library/seqan/refinement/graph_algorithm_refine_aligngraph.h"(75)
+
+//____________________________________________________________________________
+// _getVertexIdManager
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline typename VertexIdHandler<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type& _getVertexIdManager(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(292)
+
+//____________________________________________________________________________
+// _getVertexString
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline String<typename EdgeType<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type*>& _getVertexString(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(281)
+
+//____________________________________________________________________________
+// _heaviestCommonSubsequence
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSize2, typename TSpec2, typename TPositions, typename TSize, typename TVertexDescriptor, typename TString> inline void _heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const&, String<TSize2, TSpec2> const& , TPositions const&, TSize const, TSize const, TVertexDescriptor const, TString const&, TString const&, Nothing&);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1815)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSize2, typename TSpec2, typename TPositions, typename TSize, typename TString, typename TOutString> inline void _heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, String<TSize2, TSpec2> const& slotToPos, TPositions const& positions, TSize const m, TSize const n, TString const& str1, TString const& str2, TOutString& align);       	// "projects/library/seqan/refinement/graph_impl_align. [...]
+
+//____________________________________________________________________________
+// _makeAlignmentGraphFromRefinedSegments
+
+template <typename TValue,typename TAlignmentString,typename TScore,typename TSequence, typename TSetSpec,typename TAliGraph,typename TSeqMap,typename TTagSpec> void _makeAlignmentGraphFromRefinedSegments(String<std::set<TValue> > & all_nodes, TAlignmentString & alis, TScore & score_type, StringSet<TSequence, TSetSpec> & seqs, TSeqMap & seq_map, TAliGraph & ali_g, Tag<TTagSpec> const tag, bool);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(365)
+template <typename TValue,typename TAlignmentString,typename TScore,typename TSequence, typename TSetSpec,typename TAliGraph,typename TSeqMap,typename TAnnoString,typename TTagSpec> void _makeAlignmentGraphFromRefinedSegments(String<std::set<TValue> > & all_nodes, TAlignmentString & alis, TScore & score_type, StringSet<TSequence, TSetSpec> & seqs, TSeqMap & seq_map, TAliGraph & ali_g, Tag<TTagSpec> const tag, TAnnoString & annotation);       	// "projects/library/seqan/refinement/graph_a [...]
+template <typename TValue,typename TAlignmentString,typename TScore,typename TSequence, typename TSetSpec,typename TAliGraph,typename TSeqMap,typename TTagSpec> void _makeAlignmentGraphFromRefinedSegments(String<std::set<TValue> > & all_nodes, TAlignmentString & alis, TScore & score_type, StringSet<TSequence, TSetSpec> & seqs, TSeqMap & seq_map, TAliGraph & ali_g, Tag<TTagSpec> const tag, bool);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(381)
+template <typename TValue,typename TAlignmentString,typename TScore,typename TSequence, typename TSetSpec,typename TAliGraph,typename TSeqMap,typename TAnnoString,typename TTagSpec> void _makeAlignmentGraphFromRefinedSegments(String<std::set<TValue> > & all_nodes, TAlignmentString & alis, TScore & score_type, StringSet<TSequence, TSetSpec> & seqs, TSeqMap & seq_map, TAliGraph & ali_g, Tag<TTagSpec> const tag, TAnnoString & annotation);       	// "projects/library/seqan/refinement/graph_a [...]
+
+//____________________________________________________________________________
+// _makeRefinedGraphEdges
+
+template <typename TAlignmentString,typename TPropertyMap,typename TStringSet,typename TSeqMap, typename TScore,typename TAliGraph> void _makeRefinedGraphEdges(TAlignmentString & alis, TPropertyMap & , TStringSet & seqs, TSeqMap & seq_map, TScore & score_type, TAliGraph & ali_g, Tag<TagInexactRefinement_> const);       	// "projects/library/seqan/refinement/graph_algorithm_refine_inexact.h"(155)
+template <typename TAlignmentString,typename TStringSet,typename TSeqMap, typename TPropertyMap,typename TScore,typename TAliGraph> void _makeRefinedGraphEdges(TAlignmentString & alis, TPropertyMap & pm, TStringSet & seqs, TSeqMap & seq_map, TScore & score_type, TAliGraph & ali_g, Tag<TagExactRefinement_> const);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(288)
+template <typename TAlignmentString,typename TStringSet,typename TSeqMap, typename TPropertyMap,typename TScore,typename TAliGraph> void _makeRefinedGraphEdges(TAlignmentString & alis, TPropertyMap & pm, TStringSet & seqs, TSeqMap & seq_map, TScore & score_type, TAliGraph & ali_g, Tag<TagExactRefinement_> const);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(304)
+
+//____________________________________________________________________________
+// _makeRefinedGraphNodes
+
+template <typename TStringSet,typename TValue,typename TAliGraph> void _makeRefinedGraphNodes(String<std::set<TValue> > & all_nodes, TStringSet & seqs, TAliGraph & ali_g);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(243)
+template <typename TStringSet,typename TValue,typename TAliGraph> void _makeRefinedGraphNodes(String<std::set<TValue> > & all_nodes, TStringSet & seqs, TAliGraph & ali_g);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(259)
+
+//____________________________________________________________________________
+// _refine
+
+template <typename TValue, typename TAlignmentString, typename TStringSet,typename TGraph, typename TPropertyMap,typename TSeqMap, typename TTagSpec> inline void _refine(TValue node_i, TValue seq_i_id, TStringSet & seqs, TSeqMap & seq_map, TAlignmentString & alis, String<TGraph> & gs, String<TPropertyMap> & pms, String<std::set<TValue> > & all_nodes, TValue min_len, Tag<TTagSpec> tag);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(101)
+template <typename TValue, typename TAlignmentString, typename TStringSet,typename TGraph, typename TPropertyMap,typename TSeqMap, typename TTagSpec> inline void _refine(TValue node_i, TValue seq_i_id, TStringSet & seqs, TSeqMap & seq_map, TAlignmentString & alis, String<TGraph> & gs, String<TPropertyMap> & pms, String<std::set<TValue> > & all_nodes, TValue min_len, Tag<TTagSpec> tag);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(101)
+
+//____________________________________________________________________________
+// _updateCutPosition
+
+template <typename TSize, typename TSpec,typename TPos> inline void _updateCutPosition(Fragment<TSize, ExactReversableFragment<TSpec> > & f, TPos & pos_j);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(66)
+template <typename TFrag,typename TPos> inline void _updateCutPosition(TFrag &, TPos &);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(82)
+template <typename TSize, typename TSpec,typename TPos> inline void _updateCutPosition(Fragment<TSize, ExactReversableFragment<TSpec> > & f, TPos & pos_j);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(66)
+template <typename TFrag,typename TPos> inline void _updateCutPosition(TFrag &, TPos &);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(82)
+
+//____________________________________________________________________________
+// _writeCargo
+
+template <typename TFile, typename TStringSet, typename TSpec, typename TEdge> inline void _writeCargo(TFile & file, Graph<Alignment<TStringSet, void, TSpec> > const&, TEdge const&);       	// "projects/library/seqan/refinement/graph_impl_align.h"(937)
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TEdge> inline void _writeCargo(TFile & file, Graph<Alignment<TStringSet, TCargo, TSpec> > const&, TEdge const& edge);       	// "projects/library/seqan/refinement/graph_impl_align.h"(947)
+
+//____________________________________________________________________________
+// _writeEdgeType
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec> inline void _writeEdgeType(TFile & file, Graph<Alignment<TStringSet, TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(418)
+
+//____________________________________________________________________________
+// _writeGraphFooter
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec> inline void _writeGraphFooter(TFile & file, Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, DotDrawing);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(364)
+
+//____________________________________________________________________________
+// _writeGraphType
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec> inline void _writeGraphType(TFile & file, Graph<Alignment<TStringSet, TCargo, TSpec> > const&, DotDrawing);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(406)
+
+//____________________________________________________________________________
+// addEdge
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type addEdge(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target);       	// "projects/library/seqan/refinement/graph_impl_align.h"(592)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TCargo2> inline typename EdgeDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type addEdge(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target, TCargo2 const cargo);       	// "projects/library/seqan/refinement/graph_impl_align.h"(605)
+
+//____________________________________________________________________________
+// addVertex
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TId, typename TPos, typename TLength> inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type addVertex(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TId id, TPos begin, TLength len);       	// "projects/library/seqan/refinement/graph_impl_align.h"(483)
+
+//____________________________________________________________________________
+// assignStringSet
+
+template <typename TString, typename TDefault, typename TCargo, typename TSpec, typename TDefault2> inline void assignStringSet(Graph<Alignment<StringSet<TString, Dependent<TDefault> >, TCargo, TSpec> >& g, StringSet<TString, Dependent<TDefault2> > const& sStr);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1091)
+template <typename TString, typename TDefault, typename TCargo, typename TSpec, typename TDefault2> inline void assignStringSet(Graph<Alignment<StringSet<TString, Dependent<TDefault> >, TCargo, TSpec> >& g, StringSet<TString, Owner<TDefault2> > const& sStr);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1112)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool atBegin(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(151)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool atEnd(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(171)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline void clear(Graph<Alignment<TStringSet, TCargo, TSpec> >& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(435)
+
+//____________________________________________________________________________
+// clearEdges
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline void clearEdges(Graph<Alignment<TStringSet, TCargo, TSpec> >& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(399)
+
+//____________________________________________________________________________
+// clearVertices
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline void clearVertices(Graph<Alignment<TStringSet, TCargo, TSpec> >& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(409)
+
+//____________________________________________________________________________
+// convertAlignment
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TComponentMap, typename TOrderMap, typename TComponentLength> inline bool convertAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TComponentMap& component, TOrderMap& order, TComponentLength& compLength);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1498)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TMatrix> inline bool convertAlignment(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TMatrix& mat);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1610)
+template <typename TValue, typename TSpec1, typename TStringSet, typename TCargo, typename TSpec2> inline bool convertAlignment(String<TValue, TSpec1> const& mat, Graph<Alignment<TStringSet, TCargo, TSpec2> >& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1678)
+
+//____________________________________________________________________________
+// degree
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type degree(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/refinement/graph_impl_align.h"(470)
+
+//____________________________________________________________________________
+// empty
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline bool empty(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(389)
+
+//____________________________________________________________________________
+// findEdge
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type findEdge(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TVertexDescriptor const v, TVertexDescriptor const w);       	// "projects/library/seqan/refinement/graph_impl_align.h"(695)
+
+//____________________________________________________________________________
+// findVertex
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSeqId, typename TPos> inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type findVertex(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TSeqId id, TPos pos);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1297)
+
+//____________________________________________________________________________
+// fragmentBegin
+
+template <typename TSequence,typename TValue,typename TSpec> typename Position<TSequence>::Type& fragmentBegin(Annotation<TSequence,TValue,TSpec> & me);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(105)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Position<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type& fragmentBegin(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TVertexDescriptor const v);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1250)
+
+//____________________________________________________________________________
+// fragmentLength
+
+template <typename TSequence,typename TValue,typename TSpec> typename Size<TSequence>::Type& fragmentLength(Annotation<TSequence,TValue,TSpec> & me);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(113)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type& fragmentLength(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TVertexDescriptor const v);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1273)
+
+//____________________________________________________________________________
+// getAdjacencyMatrix
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TMatrix> inline void getAdjacencyMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TMatrix& mat);       	// "projects/library/seqan/refinement/graph_impl_align.h"(683)
+
+//____________________________________________________________________________
+// getFirstCoveredPosition
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSeqId> inline typename Position<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type getFirstCoveredPosition(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TSeqId const id);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1419)
+
+//____________________________________________________________________________
+// getLastCoveredPosition
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSeqId> inline typename Position<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type getLastCoveredPosition(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TSeqId id);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1463)
+
+//____________________________________________________________________________
+// getProjectedPosition
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TSeqId, typename TPosition, typename TSeqId2, typename TPosition2> inline void getProjectedPosition(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TSeqId const id1, TPosition const pos1, TSeqId2& id2, TPosition2& pos2);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1317)
+template <typename TStringSet, typename TValue, typename TCargo, typename TSpec, typename TSeqId, typename TPosition, typename TSeqId2, typename TPosition2> inline void getProjectedPosition(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TValue seg_num, TSeqId const id1, TPosition const pos1, TSeqId2& id2, TPosition2& pos2);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1364)
+
+//____________________________________________________________________________
+// getStringSet
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline typename Host<Graph<Alignment<TStringSet, TCargo, TSpec> > const>::Type& getStringSet(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1136)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename GetValue<Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type getValue(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(131)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goBegin(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(161)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goEnd(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(182)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goNext(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(192)
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goNext(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(273)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline void goPrevious(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(206)
+
+//____________________________________________________________________________
+// heaviestCommonSubsequence
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TString, typename TOutString> inline TCargo heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TString const& str1, TString const& str2, TOutString& align);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1948)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TString> inline TCargo heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TString const& str1, TString const& str2);       	// "projects/library/seqan/refinement/graph_impl_align.h"(2071)
+
+//____________________________________________________________________________
+// inDegree
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type inDegree(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/refinement/graph_impl_align.h"(459)
+
+//____________________________________________________________________________
+// label
+
+template <typename TSequence,typename TValue,typename TSpec> TValue label(Annotation<TSequence,TValue,TSpec> & me);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(121)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Infix<typename Value<TStringSet>::Type>::Type label(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TVertexDescriptor const v);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1193)
+
+//____________________________________________________________________________
+// matchRefinement
+
+template <typename TAlignmentString, typename TScoreValue,typename TScoreSpec, typename TOutGraph, typename TSequence, typename TSetSpec> void matchRefinement(TAlignmentString & alis, StringSet<TSequence, TSetSpec> & seq, Score<TScoreValue,TScoreSpec> & score_type, TOutGraph & ali_graph, unsigned int min_frag_len);       	// "projects/library/seqan/refinement/graph_algorithm_refine_inexact.h"(266)
+template <typename TAlignmentString, typename TOutGraph, typename TSequence, typename TSetSpec> void matchRefinement(TAlignmentString & alis, StringSet<TSequence, TSetSpec> & seq, TOutGraph & ali_graph, unsigned int min_frag_len);       	// "projects/library/seqan/refinement/graph_algorithm_refine_inexact.h"(288)
+template <typename TAlignmentString, typename TScoreValue,typename TScoreSpec,typename TAnnoString,typename TOutGraph, typename TSequence, typename TSetSpec> void matchRefinement(TAlignmentString & alis, TAnnoString & anno, StringSet<TSequence, TSetSpec> & seq, Score<TScoreValue,TScoreSpec> & score_type, TOutGraph & ali_graph);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(320)
+template <typename TAlignmentString, typename TScoreValue,typename TScoreSpec,typename TAnnoString, typename TOutGraph, typename TSequence, typename TSetSpec> void matchRefinement(TAlignmentString & alis, TAnnoString & anno, StringSet<TSequence, TSetSpec> & seq, Score<TScoreValue,TScoreSpec> & score_type, TOutGraph & ali_graph, unsigned int min_frag_len);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(341)
+template <typename TAlignmentString, typename TOutGraph, typename TAnnoString, typename TSequence, typename TSetSpec> void matchRefinement(TAlignmentString & alis, TAnnoString & anno, StringSet<TSequence, TSetSpec> & seq, TOutGraph & ali_graph, unsigned int min_frag_len);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(364)
+template <typename TAlignmentString,typename TAnnoString, typename TOutGraph, typename TSequence, typename TSetSpec> void matchRefinement(TAlignmentString & alis, TAnnoString & anno, StringSet<TSequence, TSetSpec> & seq, TOutGraph & ali_graph);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(388)
+template <typename TAlignmentString, typename TAnnotation, typename TOutGraph, typename TSequence, typename TSetSpec, typename TScore,typename TTagSpec> void matchRefinement(TAlignmentString & alis, StringSet<TSequence, TSetSpec> & seq, TScore & score_type, TOutGraph & ali_graph, typename Size<typename Value<TAlignmentString>::Type>::Type min_fragment_len, TAnnotation & annotation, Tag<TTagSpec> const tag);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(440)
+template <typename TAlignmentString, typename TScoreValue,typename TScoreSpec,typename TOutGraph, typename TSequence, typename TSetSpec> void matchRefinement(TAlignmentString & alis, StringSet<TSequence, TSetSpec> & seq, Score<TScoreValue,TScoreSpec> & score_type, TOutGraph & ali_graph);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(544)
+template <typename TFragmentString, typename TOutGraph, typename TSequence, typename TSetSpec> void matchRefinement(TFragmentString & matches, StringSet<TSequence, TSetSpec> & strSet, TOutGraph & ali_graph);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact.h"(558)
+template <typename TAlignmentString, typename TAnnotation, typename TOutGraph, typename TSequence, typename TSetSpec, typename TScore,typename TTagSpec> void matchRefinement(TAlignmentString & alis, StringSet<TSequence, TSetSpec> & seq, TScore & score_type, TOutGraph & ali_graph, typename Size<typename Value<TAlignmentString>::Type>::Type min_fragment_len, TAnnotation & annotation, Tag<TTagSpec> const tag);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterati [...]
+template <typename TAlignmentString, typename TScoreValue,typename TScoreSpec,typename TOutGraph, typename TSequence, typename TSetSpec> void matchRefinement(TAlignmentString & alis, StringSet<TSequence, TSetSpec> & seq, Score<TScoreValue,TScoreSpec> & score_type, TOutGraph & ali_graph);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(629)
+template <typename TFragmentString, typename TOutGraph, typename TSequence, typename TSetSpec> void matchRefinement(TFragmentString & matches, StringSet<TSequence, TSetSpec> & strSet, TOutGraph & ali_graph);       	// "projects/library/seqan/refinement/graph_algorithm_refine_exact_iterative.h"(657)
+
+//____________________________________________________________________________
+// numEdges
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type numEdges(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(369)
+
+//____________________________________________________________________________
+// numVertices
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type numVertices(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(379)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator!=(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(242)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline bool operator==(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it1, Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it2);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(230)
+
+//____________________________________________________________________________
+// outDegree
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Size<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type outDegree(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TVertexDescriptor const vertex);       	// "projects/library/seqan/refinement/graph_impl_align.h"(448)
+
+//____________________________________________________________________________
+// rebuildGraph
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline void rebuildGraph(Graph<Alignment<TStringSet, TCargo, TSpec> >& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1726)
+
+//____________________________________________________________________________
+// removeEdge
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeEdge(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TVertexDescriptor const source, TVertexDescriptor const target);       	// "projects/library/seqan/refinement/graph_impl_align.h"(617)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline void removeEdge(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/refinement/graph_impl_align.h"(628)
+
+//____________________________________________________________________________
+// removeInEdges
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeInEdges(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/refinement/graph_impl_align.h"(650)
+
+//____________________________________________________________________________
+// removeOutEdges
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline void removeOutEdges(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TVertexDescriptor const v);       	// "projects/library/seqan/refinement/graph_impl_align.h"(639)
+
+//____________________________________________________________________________
+// removeVertex
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVD> inline void removeVertex(Graph<Alignment<TStringSet, TCargo, TSpec> >& g, TVD const v);       	// "projects/library/seqan/refinement/graph_impl_align.h"(553)
+
+//____________________________________________________________________________
+// sequenceId
+
+template <typename TSequence,typename TValue,typename TSpec> typename Id<TSequence>::Type& sequenceId(Annotation<TSequence,TValue,TSpec> & me);       	// "projects/library/seqan/refinement/graph_algorithm_refine_annotation.h"(97)
+template <typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename Id<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type& sequenceId(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TVertexDescriptor const v);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1226)
+
+//____________________________________________________________________________
+// sourceVertex
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type sourceVertex(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/refinement/graph_impl_align.h"(672)
+
+//____________________________________________________________________________
+// stringSet
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline typename StringSetType<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type stringSet(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g);       	// "projects/library/seqan/refinement/graph_impl_align.h"(1170)
+
+//____________________________________________________________________________
+// targetVertex
+
+template <typename TStringSet, typename TCargo, typename TSpec, typename TEdgeDescriptor> inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type targetVertex(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TEdgeDescriptor const edge);       	// "projects/library/seqan/refinement/graph_impl_align.h"(661)
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename VertexDescriptor<Graph<Alignment<TStringSet, TCargo, TGraphSpec> > >::Type targetVertex(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(253)
+
+//____________________________________________________________________________
+// transpose
+
+template <typename TStringSet, typename TCargo, typename TSpec> inline void transpose(Graph<Alignment<TStringSet, TCargo, TSpec> > const& source, Graph<Alignment<TStringSet, TCargo, TSpec> >& dest);       	// "projects/library/seqan/refinement/graph_impl_align.h"(348)
+template <typename TStringSet, typename TCargo, typename TSpec> inline void transpose(Graph<Alignment<TStringSet, TCargo, TSpec> >&);       	// "projects/library/seqan/refinement/graph_impl_align.h"(359)
+
+//____________________________________________________________________________
+// value
+
+template <typename TStringSet, typename TCargo, typename TGraphSpec, typename TSpec> inline typename Reference<Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > > >::Type value(Iter<Graph<Alignment<TStringSet, TCargo, TGraphSpec> >, GraphIterator<InternalOutEdgeIterator<TSpec> > >& it);       	// "projects/library/seqan/refinement/graph_impl_align_adapt.h"(141)
+
+//____________________________________________________________________________
+// write
+
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TIDString> inline void write(TFile & target, Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TIDString const &, Raw);       	// "projects/library/seqan/refinement/graph_impl_align.h"(708)
+template <typename TFile, typename TSpec, typename TNames> inline void write(TFile & file, Graph<TSpec> const& g, TNames const& names, FastaFormat);       	// "projects/library/seqan/refinement/graph_impl_align.h"(837)
+template <typename TFile, typename TSpec, typename TNames> inline void write(TFile & file, Graph<TSpec> const& g, TNames const& names, MsfFormat);       	// "projects/library/seqan/refinement/graph_impl_align.h"(873)
+template <typename TFile, typename TStringSet, typename TCargo, typename TSpec, typename TNames> inline void write(TFile & file, Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, TNames const& names, CgVizFormat);       	// "projects/library/seqan/refinement/graph_impl_align.h"(960)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/score.h b/src/SeqAn-1.3/seqan/score.h
new file mode 100644
index 0000000..902714c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/score.h
@@ -0,0 +1,52 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// This is the facade header for the score module.
+// ==========================================================================
+
+#ifndef SEQAN_SCORE_H_
+#define SEQAN_SCORE_H_
+
+#include <seqan/basic.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/score/score_generated_forwards.h>
+#endif
+
+#include <seqan/score/score_base.h>
+#include <seqan/score/score_edit.h>
+#include <seqan/score/score_matrix.h>
+#include <seqan/score/score_matrix_data.h>
+#include <seqan/score/score_simple.h>
+
+#endif  // SEQAN_SCORE_H_
diff --git a/src/SeqAn-1.3/seqan/score/score_base.h b/src/SeqAn-1.3/seqan/score/score_base.h
new file mode 100644
index 0000000..46ad9c4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/score/score_base.h
@@ -0,0 +1,211 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+
+// TODO(holtgrew): Should the public interface for the class Score not be defined here?
+
+#ifndef SEQAN_SCORE_SCORE_BASE_H_
+#define SEQAN_SCORE_SCORE_BASE_H_
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+/**
+.Class.Score:
+..cat:Miscellaneous
+..summary:A scoring scheme.
+..signature:Score<TValue, TSpec>
+..param.TValue:The value type.
+...default:int
+..param.TSpec:The specializing type.
+...default:@Tag.Simple@
+..include:seqan/score.h
+*/
+template <typename TValue = int, typename TSpec = Simple>
+class Score;
+
+
+///.Metafunction.Value.param.T.type:Class.Score
+template <typename TValue, typename TSpec>
+struct Value<Score<TValue, TSpec> > {
+    typedef TValue Type;
+};
+
+
+/**
+.Function.scoreGapOpenHorizontal
+..cat:Scoring
+..signature:scoreGapOpenHorizontal(score, pos1, pos2, seq1, seq2)
+..summary:Returns the score for opening a horizontal gap after $pos1$ in $seq1$.
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenHorizontal(
+    Score<TValue, TSpec> const & me,
+    TPos1,
+    TPos2,
+    TSeq1 const &,
+    TSeq2 const &) {
+    SEQAN_CHECKPOINT;
+    return scoreGapOpen(me);
+}
+
+
+/**
+.Function.scoreGapOpenVertical
+..cat:Scoring
+..signature:scoreGapOpenVertical(score, pos1, pos2, seq1, seq2)
+..summary:Returns the score for opening a vertical gap after $pos2$ in $seq2$.
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapOpenVertical(
+    Score<TValue, TSpec> const & me,
+    TPos1,
+    TPos2,
+    TSeq1 const &,
+    TSeq2 const &) {
+    SEQAN_CHECKPOINT;
+    return scoreGapOpen(me);
+}
+
+
+/**
+.Function.scoreGapExtendHorizontal
+..cat:Scoring
+..signature:scoreGapExtendHorizontal(score, pos1, pos2, seq1, seq2)
+..summary:Returns the score for extending a horizontal gap after $pos1$ in $seq1$.
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendHorizontal(
+    Score<TValue, TSpec> const & me,
+    TPos1,
+    TPos2,
+    TSeq1 const &,
+    TSeq2 const &) {
+    SEQAN_CHECKPOINT;
+    return scoreGapExtend(me);
+}
+
+
+/**
+.Function.scoreGapExtendVertical
+..cat:Scoring
+..signature:scoreGapExtendVertical(score, pos1, pos2, seq1, seq2)
+..summary:Returns the score for extending a vertical gap after $pos2$ in $seq2$.
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapExtendVertical(
+    Score<TValue, TSpec> const & me,
+    TPos1,
+    TPos2,
+    TSeq1 const &,
+    TSeq2 const &) {
+    SEQAN_CHECKPOINT;
+    return scoreGapExtend(me);
+}
+
+
+/**
+.Function.scoreGapHorizontal
+..cat:Scoring
+..signature:scoreGapHorizontal(score, pos1, pos2, seq1, seq2)
+..summary:Returns the score for a horizontal gap after $pos1$ in $seq1$.
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapHorizontal(
+    Score<TValue, TSpec> const & me,
+    TPos1,
+    TPos2,
+    TSeq1 const &,
+    TSeq2 const &) {
+    SEQAN_CHECKPOINT;
+    return scoreGap(me);
+}
+
+
+/**
+.Function.scoreGapVertical
+..cat:Scoring
+..signature:scoreGapVertical(score, pos1, pos2, seq1, seq2)
+..summary:Returns the score for a vertical gap after $pos2$ in $seq2$.
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+scoreGapVertical(
+    Score<TValue, TSpec> const & me,
+    TPos1,
+    TPos2,
+    TSeq1 const &,
+    TSeq2 const &) {
+    SEQAN_CHECKPOINT;
+    return scoreGap(me);
+}
+
+
+/**
+.Function.score:
+..cat:Scoring
+..signature:score(score, pos1, pos2, seq1, seq2)
+..param.score:The scoring scheme to use.
+...type:Class.Score
+..param.pos1:Position of the aligned character in $seq1$.
+..param.pos2:Position of the aligned character in $seq2$.
+..param.seq1:First sequence.
+..param.seq2:Second sequence.
+..summary:Returns the score for aligning the characters $seq1[pos1]$ and $seq2[pos2]$.
+This function allows to define a position-dependent scoring scheme.
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2>
+inline TValue
+score(Score<TValue, TSpec> const & me,
+      TPos1 pos1,
+      TPos2 pos2,
+      TSeq1 const &seq1,
+      TSeq2 const &seq2) {
+    SEQAN_CHECKPOINT;
+    return score(me, seq1[pos1], seq2[pos2]);
+}
+
+}  // namespace SEQAN_NAMESPACE_MAIN
+
+#endif  // SEQAN_SCORE_SCORE_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/score/score_edit.h b/src/SeqAn-1.3/seqan/score/score_edit.h
new file mode 100644
index 0000000..09818fb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/score/score_edit.h
@@ -0,0 +1,142 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Edit distance score class and supporting code.
+// ==========================================================================
+
+#ifndef SEQAN_SCORE_SCORE_EDIT_H_
+#define SEQAN_SCORE_SCORE_EDIT_H_
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+/**
+.Spec.EditDistance
+..cat:Scoring
+..summary:Edit distance scoring scheme.
+..signature:Score<TValue, EditDistance>
+..param.TValue:The value type.
+...default:int
+..general:Class.Score
+..remarks:Semantically equivalent to a default contructed @Spec.Simple Score.Score<int, Simple>@.
+..remarks:$EditDistance$ is a synonym for @Tag.LevenshteinDistance at .
+..include:seqan/score.h
+*/
+
+// TODO(holtgrew): Should EditDistance better live here instead of basic_tag.h?
+// EditDistance is defined in basic_tag.h
+template <typename TValue>
+class Score<TValue, EditDistance> {
+public:
+    Score() {}
+};
+
+
+/**
+.Shortcut.EditDistanceScore:
+..cat:Scoring
+..summary:Edit distance scoring scheme.
+..signature:EditDistanceScore
+..shortcutfor:Spec.EditDistance
+...signature:Score<int, EditDistance>
+..see:Spec.EditDistance
+..include:seqan/score.h
+*/
+
+typedef Score<int, EditDistance> EditDistanceScore;
+
+template <typename TValue>
+inline TValue
+scoreMatch(Score<TValue, EditDistance> &) {
+    SEQAN_CHECKPOINT;
+    return 0;
+}
+
+
+template <typename TValue>
+inline TValue
+scoreMatch(Score<TValue, EditDistance> const &) {
+    SEQAN_CHECKPOINT;
+    return 0;
+}
+
+
+template <typename TValue>
+inline TValue
+scoreMismatch(Score<TValue, EditDistance> &) {
+    SEQAN_CHECKPOINT;
+    return -1;
+}
+
+
+template <typename TValue>
+inline TValue
+scoreMismatch(Score<TValue, EditDistance> const &) {
+    SEQAN_CHECKPOINT;
+    return -1;
+}
+
+
+template <typename TValue>
+inline TValue
+scoreGapExtend(Score<TValue, EditDistance> &) {
+    SEQAN_CHECKPOINT;
+    return -1;
+}
+
+
+template <typename TValue>
+inline TValue
+scoreGapExtend(Score<TValue, EditDistance> const &) {
+    SEQAN_CHECKPOINT;
+    return -1;
+}
+
+
+template <typename TValue>
+inline TValue
+scoreGapOpen(Score<TValue, EditDistance> &) {
+    SEQAN_CHECKPOINT;
+    return -1;
+}
+
+
+template <typename TValue>
+inline TValue
+scoreGapOpen(Score<TValue, EditDistance> const &) {
+    SEQAN_CHECKPOINT;
+    return -1;
+}
+
+}  // namespace SEQAN_NAMESPACE_MAIN
+
+#endif  // SEQAN_SCORE_SCORE_EDIT_H_
diff --git a/src/SeqAn-1.3/seqan/score/score_generated_forwards.h b/src/SeqAn-1.3/seqan/score/score_generated_forwards.h
new file mode 100644
index 0000000..50eb896
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/score/score_generated_forwards.h
@@ -0,0 +1,350 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SCORE_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_SCORE_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Blosum30_
+
+struct Blosum30_;       	// "projects/library/seqan/score/score_matrix_data.h"(65)
+
+//____________________________________________________________________________
+// Blosum45_
+
+struct Blosum45_;       	// "projects/library/seqan/score/score_matrix_data.h"(133)
+
+//____________________________________________________________________________
+// Blosum62_
+
+struct Blosum62_;       	// "projects/library/seqan/score/score_matrix_data.h"(200)
+
+//____________________________________________________________________________
+// Blosum80_
+
+struct Blosum80_;       	// "projects/library/seqan/score/score_matrix_data.h"(267)
+
+//____________________________________________________________________________
+// Pam120_
+
+struct Pam120_;       	// "projects/library/seqan/score/score_matrix_data.h"(404)
+
+//____________________________________________________________________________
+// Pam200_
+
+struct Pam200_;       	// "projects/library/seqan/score/score_matrix_data.h"(473)
+
+//____________________________________________________________________________
+// Pam250_
+
+struct Pam250_;       	// "projects/library/seqan/score/score_matrix_data.h"(542)
+
+//____________________________________________________________________________
+// Pam40_
+
+struct Pam40_;       	// "projects/library/seqan/score/score_matrix_data.h"(334)
+
+//____________________________________________________________________________
+// Score
+
+template <typename TValue , typename TSpec > class Score;       	// "projects/library/seqan/score/score_base.h"(54)
+
+//____________________________________________________________________________
+// ScoreMatrix
+
+template <typename TSequenceValue , typename TSpec > struct ScoreMatrix;       	// "projects/library/seqan/score/score_matrix.h"(52)
+
+//____________________________________________________________________________
+// ScoringMatrixData_
+
+template <typename TValue, typename TSequenceValue, typename TSpec> struct ScoringMatrixData_;       	// "projects/library/seqan/score/score_matrix.h"(48)
+
+//____________________________________________________________________________
+// Simple
+
+struct Simple;       	// "projects/library/seqan/score/score_simple.h"(48)
+
+//____________________________________________________________________________
+// TagScoreMatrixFile_
+
+struct TagScoreMatrixFile_;       	// "projects/library/seqan/score/score_matrix.h"(59)
+
+//____________________________________________________________________________
+// Vtml200_
+
+struct Vtml200_;       	// "projects/library/seqan/score/score_matrix_data.h"(611)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Blosum30
+
+typedef Score<int, ScoreMatrix<AminoAcid, Blosum30_> > Blosum30;       	// "projects/library/seqan/score/score_matrix_data.h"(77)
+
+//____________________________________________________________________________
+// Blosum45
+
+typedef Score<int, ScoreMatrix<AminoAcid, Blosum45_> > Blosum45;       	// "projects/library/seqan/score/score_matrix_data.h"(145)
+
+//____________________________________________________________________________
+// Blosum62
+
+typedef Score<int, ScoreMatrix<AminoAcid, Blosum62_> > Blosum62;       	// "projects/library/seqan/score/score_matrix_data.h"(212)
+
+//____________________________________________________________________________
+// Blosum80
+
+typedef Score<int, ScoreMatrix<AminoAcid, Blosum80_> > Blosum80;       	// "projects/library/seqan/score/score_matrix_data.h"(279)
+
+//____________________________________________________________________________
+// EditDistanceScore
+
+typedef Score<int, EditDistance> EditDistanceScore;       	// "projects/library/seqan/score/score_edit.h"(75)
+
+//____________________________________________________________________________
+// Pam120
+
+typedef Score<int, ScoreMatrix<AminoAcid, Pam120_> > Pam120;       	// "projects/library/seqan/score/score_matrix_data.h"(416)
+
+//____________________________________________________________________________
+// Pam200
+
+typedef Score<int, ScoreMatrix<AminoAcid, Pam200_> > Pam200;       	// "projects/library/seqan/score/score_matrix_data.h"(485)
+
+//____________________________________________________________________________
+// Pam250
+
+typedef Score<int, ScoreMatrix<AminoAcid, Pam250_> > Pam250;       	// "projects/library/seqan/score/score_matrix_data.h"(554)
+
+//____________________________________________________________________________
+// Pam40
+
+typedef Score<int, ScoreMatrix<AminoAcid, Pam40_> > Pam40;       	// "projects/library/seqan/score/score_matrix_data.h"(346)
+
+//____________________________________________________________________________
+// ScoreMatrixFile
+
+typedef Tag<TagScoreMatrixFile_> const ScoreMatrixFile;       	// "projects/library/seqan/score/score_matrix.h"(60)
+
+//____________________________________________________________________________
+// SimpleScore
+
+typedef Score<int, Simple> SimpleScore;       	// "projects/library/seqan/score/score_simple.h"(127)
+
+//____________________________________________________________________________
+// Vtml200
+
+typedef Score<int, ScoreMatrix<AminoAcid, Vtml200_> > Vtml200;       	// "projects/library/seqan/score/score_matrix_data.h"(623)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _sprintfValue
+
+inline void _sprintfValue(char * buf, unsigned int val);       	// "projects/library/seqan/score/score_matrix.h"(443)
+inline void _sprintfValue(char * buf, int val);       	// "projects/library/seqan/score/score_matrix.h"(455)
+inline void _sprintfValue(char * buf, float val);       	// "projects/library/seqan/score/score_matrix.h"(467)
+inline void _sprintfValue(char * buf, double val);       	// "projects/library/seqan/score/score_matrix.h"(480)
+
+//____________________________________________________________________________
+// _sscanfValue
+
+inline void _sscanfValue(const char * buf, unsigned int & val);       	// "projects/library/seqan/score/score_matrix.h"(236)
+inline void _sscanfValue(const char * buf, int & val);       	// "projects/library/seqan/score/score_matrix.h"(247)
+inline void _sscanfValue(const char * buf, float & val);       	// "projects/library/seqan/score/score_matrix.h"(258)
+inline void _sscanfValue(const char * buf, double & val);       	// "projects/library/seqan/score/score_matrix.h"(269)
+
+//____________________________________________________________________________
+// _writeScoringMatrix
+
+template <typename TSequenceValue, typename TFile, typename TValue, typename TMeta> void _writeScoringMatrix(TFile & fl, TValue * tab, TMeta & meta);       	// "projects/library/seqan/score/score_matrix.h"(497)
+
+//____________________________________________________________________________
+// loadScoreMatrix
+
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TString> inline void loadScoreMatrix(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, TString & filename);       	// "projects/library/seqan/score/score_matrix.h"(401)
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TString, typename TMeta> inline void loadScoreMatrix(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, TString & filename, TMeta & meta);       	// "projects/library/seqan/score/score_matrix.h"(419)
+
+//____________________________________________________________________________
+// read
+
+template <typename TFile, typename TValue, typename TSequenceValue, typename TSpec> void read(TFile & fl, Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, ScoreMatrixFile);       	// "projects/library/seqan/score/score_matrix.h"(296)
+template <typename TFile, typename TValue, typename TSequenceValue, typename TSpec> inline void read(TFile & fl, Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc);       	// "projects/library/seqan/score/score_matrix.h"(383)
+
+//____________________________________________________________________________
+// readMeta
+
+template <typename TFile, typename TMeta> void readMeta(TFile & fl, TMeta & meta, ScoreMatrixFile);       	// "projects/library/seqan/score/score_matrix.h"(277)
+
+//____________________________________________________________________________
+// score
+
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TVal1, typename TVal2> inline TValue score(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > const & sc, TVal1 val1, TVal2 val2);       	// "projects/library/seqan/score/score_matrix.h"(151)
+template <typename TValue, typename TSpec, typename TVal1, typename TVal2> inline TValue score(Score<TValue, TSpec> const & me, TVal1 left, TVal2 right);       	// "projects/library/seqan/score/score_simple.h"(362)
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue score(Score<TValue, TSpec> const & me, TPos1 pos1, TPos2 pos2, TSeq1 const &seq1, TSeq2 const &seq2);       	// "projects/library/seqan/score/score_base.h"(204)
+
+//____________________________________________________________________________
+// scoreGap
+
+template <typename TValue, typename TSpec> inline TValue scoreGap(Score<TValue, TSpec> const & me);       	// "projects/library/seqan/score/score_simple.h"(318)
+
+//____________________________________________________________________________
+// scoreGapExtend
+
+template <typename TValue, typename TSpec> inline TValue scoreGapExtend(Score<TValue, TSpec> const & me);       	// "projects/library/seqan/score/score_simple.h"(229)
+template <typename TValue> inline TValue scoreGapExtend(Score<TValue, EditDistance> &);       	// "projects/library/seqan/score/score_edit.h"(111)
+template <typename TValue> inline TValue scoreGapExtend(Score<TValue, EditDistance> const &);       	// "projects/library/seqan/score/score_edit.h"(119)
+
+//____________________________________________________________________________
+// scoreGapExtendHorizontal
+
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendHorizontal( Score<TValue, TSpec> const & me, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/score/score_base.h"(118)
+
+//____________________________________________________________________________
+// scoreGapExtendVertical
+
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapExtendVertical( Score<TValue, TSpec> const & me, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/score/score_base.h"(138)
+
+//____________________________________________________________________________
+// scoreGapHorizontal
+
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapHorizontal( Score<TValue, TSpec> const & me, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/score/score_base.h"(158)
+
+//____________________________________________________________________________
+// scoreGapOpen
+
+template <typename TValue, typename TSpec> inline TValue scoreGapOpen(Score<TValue, TSpec> const & me);       	// "projects/library/seqan/score/score_simple.h"(272)
+template <typename TValue> inline TValue scoreGapOpen(Score<TValue, EditDistance> &);       	// "projects/library/seqan/score/score_edit.h"(127)
+template <typename TValue> inline TValue scoreGapOpen(Score<TValue, EditDistance> const &);       	// "projects/library/seqan/score/score_edit.h"(135)
+
+//____________________________________________________________________________
+// scoreGapOpenHorizontal
+
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenHorizontal( Score<TValue, TSpec> const & me, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/score/score_base.h"(78)
+
+//____________________________________________________________________________
+// scoreGapOpenVertical
+
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapOpenVertical( Score<TValue, TSpec> const & me, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/score/score_base.h"(98)
+
+//____________________________________________________________________________
+// scoreGapVertical
+
+template <typename TValue, typename TSpec, typename TPos1, typename TPos2, typename TSeq1, typename TSeq2> inline TValue scoreGapVertical( Score<TValue, TSpec> const & me, TPos1, TPos2, TSeq1 const &, TSeq2 const &);       	// "projects/library/seqan/score/score_base.h"(178)
+
+//____________________________________________________________________________
+// scoreMatch
+
+template <typename TValue, typename TSpec> inline TValue scoreMatch(Score<TValue, TSpec> const & me);       	// "projects/library/seqan/score/score_simple.h"(145)
+template <typename TValue> inline TValue scoreMatch(Score<TValue, EditDistance> &);       	// "projects/library/seqan/score/score_edit.h"(79)
+template <typename TValue> inline TValue scoreMatch(Score<TValue, EditDistance> const &);       	// "projects/library/seqan/score/score_edit.h"(87)
+
+//____________________________________________________________________________
+// scoreMismatch
+
+template <typename TValue, typename TSpec> inline TValue scoreMismatch(Score<TValue, TSpec> const & me);       	// "projects/library/seqan/score/score_simple.h"(186)
+template <typename TValue> inline TValue scoreMismatch(Score<TValue, EditDistance> &);       	// "projects/library/seqan/score/score_edit.h"(95)
+template <typename TValue> inline TValue scoreMismatch(Score<TValue, EditDistance> const &);       	// "projects/library/seqan/score/score_edit.h"(103)
+
+//____________________________________________________________________________
+// setDefaultScoreMatrix
+
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TTag> inline void setDefaultScoreMatrix(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, TTag);       	// "projects/library/seqan/score/score_matrix.h"(200)
+template <typename TValue, typename TSequenceValue, typename TSpec> inline void setDefaultScoreMatrix(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, Default);       	// "projects/library/seqan/score/score_matrix.h"(217)
+
+//____________________________________________________________________________
+// setScore
+
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TVal1, typename TVal2, typename T> inline void setScore(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, TVal1 val1, TVal2 val2, T score);       	// "projects/library/seqan/score/score_matrix.h"(175)
+
+//____________________________________________________________________________
+// setScoreGap
+
+template <typename TValue, typename TSpec> inline void setScoreGap(Score<TValue, TSpec> & me, TValue const & value);       	// "projects/library/seqan/score/score_simple.h"(339)
+
+//____________________________________________________________________________
+// setScoreGapExtend
+
+template <typename TValue, typename TSpec> inline void setScoreGapExtend(Score<TValue, TSpec> & me, TValue const & value);       	// "projects/library/seqan/score/score_simple.h"(250)
+
+//____________________________________________________________________________
+// setScoreGapOpen
+
+template <typename TValue, typename TSpec> inline void setScoreGapOpen(Score<TValue, TSpec> & me, TValue const & value);       	// "projects/library/seqan/score/score_simple.h"(293)
+
+//____________________________________________________________________________
+// setScoreMatch
+
+template <typename TValue, typename TSpec> inline void setScoreMatch(Score<TValue, TSpec> & me, TValue const & value);       	// "projects/library/seqan/score/score_simple.h"(165)
+
+//____________________________________________________________________________
+// setScoreMismatch
+
+template <typename TValue, typename TSpec> inline void setScoreMismatch(Score<TValue, TSpec> & me, TValue const & value);       	// "projects/library/seqan/score/score_simple.h"(207)
+
+//____________________________________________________________________________
+// write
+
+template <typename TFile, typename TValue, typename TSequenceValue, typename TSpec, typename TMeta> inline void write(TFile & fl, Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > const & sc, TMeta & meta);       	// "projects/library/seqan/score/score_matrix.h"(579)
+template <typename TFile, typename TValue, typename TSequenceValue, typename TSpec> inline void write(TFile & fl, Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > const & sc);       	// "projects/library/seqan/score/score_matrix.h"(595)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/score/score_matrix.h b/src/SeqAn-1.3/seqan/score/score_matrix.h
new file mode 100644
index 0000000..60ab472
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/score/score_matrix.h
@@ -0,0 +1,602 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Code for score matrices with data from files or built-in data.
+// ==========================================================================
+
+#ifndef SEQAN_SCORE_SCORE_MATRIX_H_
+#define SEQAN_SCORE_SCORE_MATRIX_H_
+
+#include <seqan/file.h>
+
+// TODO(holtgrew): If the complex type conversions are necessary, a static_cast<> is more C++ and explicit.
+
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+template <typename TValue, typename TSequenceValue, typename TSpec>
+struct ScoringMatrixData_;
+
+
+template <typename TSequenceValue = AminoAcid, typename TSpec = Default>
+struct ScoreMatrix;
+
+
+/**
+.Tag.File Format.tag.ScoreMatrixFile:Score matrix file.
+..include:seqan/score.h
+*/
+struct TagScoreMatrixFile_;
+typedef Tag<TagScoreMatrixFile_> const ScoreMatrixFile;
+
+
+/**
+.Spec.Score Matrix:
+..cat:Scoring
+..summary:A general scoring matrix.
+..general:Class.Score
+..signature:Score<TValue, ScoreMatrix<TSequenceValue, TSpec> >
+..param.TValue:Type of the score values.
+...default:$int$
+..param.TSequenceValue:Type of alphabet underlying the matrix.
+...default:$AminoAcid$
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSequenceValue, typename TSpec>
+class Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > {
+public:
+    // Static computation of the required array size.
+    enum {
+        VALUE_SIZE = ValueSize<TSequenceValue>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    // The data table.
+    TValue data_tab[TAB_SIZE];
+
+    // The gap extension score.
+    TValue data_gap_extend;
+
+    // The gap open score.
+    TValue data_gap_open;
+
+    /**
+.Memfunc.Score Matrix#Score
+..cat:Scoring
+..summary:Constructor.
+..class:Spec.Score Matrix
+..signature:Score(gapExtend)
+..param.gapExtend:The gap extension penalty.
+...remark:TValue
+     */
+    explicit Score(TValue _gap_extend = -1)
+        : data_gap_extend(_gap_extend),
+          data_gap_open(_gap_extend) {
+        SEQAN_CHECKPOINT;
+        setDefaultScoreMatrix(*this, TSpec());
+    }
+
+    /**
+.Memfunc.Score Matrix#Score
+..signature:Score(gapExtend, gapOpen)
+..param.gapOpen:The gap open penalty.
+...remark:TValue
+     */
+    Score(TValue _gap_extend, TValue _gap_open)
+        : data_gap_extend(_gap_extend), data_gap_open(_gap_open) {
+        SEQAN_CHECKPOINT;
+        setDefaultScoreMatrix(*this, TSpec());
+    }
+
+    /**
+.Memfunc.Score Matrix#Score
+..signature:Score(filename, gapExtend)
+..param.filename:The path to the file to load.
+...type:Class.String
+..see:Function.loadScoreMatrix
+     */
+    template <typename TString>
+    Score(TString const & filename, TValue _gap_extend = -1)
+        : data_gap_extend(_gap_extend), data_gap_open(_gap_extend) {
+        SEQAN_CHECKPOINT;
+        loadScoreMatrix(*this, filename);
+    }
+
+    /**
+.Memfunc.Score Matrix#Score
+..signature:Score(filename, gapExtend, gapOpen)
+     */
+    template <typename TString>
+    Score(TString const & filename, TValue _gap_extend, TValue _gap_open)
+        : data_gap_extend(_gap_extend), data_gap_open(_gap_open) {
+        SEQAN_CHECKPOINT;
+        loadScoreMatrix(*this, filename);
+    }
+};
+
+
+// TODO(holtgrew): Does it make sense to document each Score specialization?  Should dddoc show a list of all specializations of a class?
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TVal1, typename TVal2>
+inline TValue
+score(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > const & sc, TVal1 val1, TVal2 val2) {
+    SEQAN_CHECKPOINT;
+    typedef Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > TScore;
+    // TODO(holtgrew): Why not implicit cast?
+    unsigned int i = (TSequenceValue) val1;  // conversion TVal1 => TSequenceValue => integral
+    unsigned int j = (TSequenceValue) val2;  // conversion TVal2 => TSequenceValue => integral
+    return sc.data_tab[i * TScore::VALUE_SIZE + j];
+}
+
+
+/**
+.Function.setScore:
+..cat:Scoring
+..summary:Set the substitution score between two values.
+..signature:setScore(scoreMatrix, val1, val2, score)
+..param.scoreMatrix:
+...type:Spec.Score Matrix
+..param.val1:First value.
+..param.val2:Second value.
+..param.score:The value to set the score to.
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TVal1, typename TVal2, typename T>
+inline void
+setScore(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, TVal1 val1, TVal2 val2, T score) {
+    SEQAN_CHECKPOINT;
+    typedef Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > TScore;
+    // TODO(holtgrew): Why not implicit cast?
+    unsigned int i = (TSequenceValue) val1;  // conversion TVal1 => TSequenceValue => integral
+    unsigned int j = (TSequenceValue) val2;  // conversion TVal2 => TSequenceValue => integral
+    sc.data_tab[i * TScore::VALUE_SIZE + j] = score;
+}
+
+
+/**
+.Function.setDefaultScoreMatrix:
+..cat:Scoring
+..summary:Set the value of the given matrix to the default value.
+..signature:setDefaultScoreMatrix(scoreMatrix, tag)
+..param.scoreMatrix:The @Spec.Score Matrix@ to set.
+...type:Spec.Score Matrix
+..param.tag:The tag to specify the matrix.
+...type:Shortcut.Blosum30
+...type:Shortcut.Blosum62
+...type:Shortcut.Blosum80
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TTag>
+inline void
+setDefaultScoreMatrix(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, TTag) {
+    SEQAN_CHECKPOINT;
+    typedef Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > TScore;
+    TValue const * tab = ScoringMatrixData_<TValue, TSequenceValue, TTag>::getData();
+    arrayCopy(tab, tab + TScore::TAB_SIZE, sc.data_tab);
+}
+
+
+/**
+.Function.setDefaultScoreMatrix
+..param.tag:
+...type:Tag.Default
+...remark:If @Tag.Default@, then the matrix will be filled with default constructed $TValue$ values.
+..include:seqan/score.h
+ */
+template <typename TValue, typename TSequenceValue, typename TSpec>
+inline void
+setDefaultScoreMatrix(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, Default) {
+    SEQAN_CHECKPOINT;
+    typedef Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > TScore;
+    arrayFill(sc.data_tab, sc.data_tab + TScore::TAB_SIZE, TValue());
+}
+
+
+/*
+.Function._sscanfValue:
+..cat:Input/Output
+..summary:Use sscanf to parse a value from a $char *$ buffer.
+..signature:_sscanfValue(buffer, value)
+..param.buffer:Buffer to parse into.
+...type:const char *
+..param.value:Variable to parse the value from $buffer$ to.
+...type:unsigned int
+..include:seqan/score.h
+ */
+inline void
+_sscanfValue(const char * buf, unsigned int & val) {
+    SEQAN_CHECKPOINT;
+    std::sscanf(buf, "%u", & val);
+}
+
+
+/*
+.Function._sscanfValue.param.value.type:int
+..include:seqan/score.h
+ */
+inline void
+_sscanfValue(const char * buf, int & val) {
+    SEQAN_CHECKPOINT;
+    std::sscanf(buf, "%i", & val);
+}
+
+
+/*
+.Function._sscanfValue.param.value.type:float
+..include:seqan/score.h
+ */
+inline void
+_sscanfValue(const char * buf, float & val) {
+    SEQAN_CHECKPOINT;
+    std::sscanf(buf, "%f", & val);
+}
+
+
+/*
+.Function._sscanfValue.param.value.type:double
+..include:seqan/score.h
+ */
+inline void
+_sscanfValue(const char * buf, double & val) {
+    SEQAN_CHECKPOINT;
+    std::sscanf(buf, "%lf", & val);
+}
+
+
+template <typename TFile, typename TMeta>
+void
+readMeta(TFile & fl, TMeta & meta, ScoreMatrixFile) {
+    SEQAN_CHECKPOINT;
+    clear(meta);
+    if (_streamEOF(fl)) return;
+
+    typedef typename Value<TMeta>::Type TValue;
+    TValue c = _streamGet(fl);
+
+    while (!_streamEOF(fl) && (c == '#')) {
+        c = _streamGet(fl);
+        _streamAppendLine(fl, meta, c);
+        appendValue(meta, '\n');
+    }
+    _streamUnget(fl);
+}
+
+
+template <typename TFile, typename TValue, typename TSequenceValue, typename TSpec>
+void
+read(TFile & fl, Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, ScoreMatrixFile) {
+    // TODO(holtgrew): The following is not very stable, does not interpret lines as whitespace separated numbers but infers column widths from the labels.  Should be fixed.
+    SEQAN_CHECKPOINT;
+    typedef Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > TScore;
+    typedef typename Value<TFile>::Type TFileValue;
+
+    // Clear the matrix.
+    arrayFill(sc.data_tab, sc.data_tab + TScore::TAB_SIZE, TValue());
+
+    // Start reading.
+    if (_streamEOF(fl)) return;
+
+    TFileValue c = _streamGet(fl);
+    String<TFileValue> s;
+
+    // Search for alphabet line, the first line that does not start
+    // with '#', e.g.
+    // " A R N D C Q E G H I L K M F P S T W Y V B Z X *"
+    do {
+        clear(s);
+        _streamAppendLine(fl, s, c);
+    } while (!_streamEOF(fl) && (empty(s) || (s[0] == '#')));
+
+    if (_streamEOF(fl)) return;
+
+    // Build table to map the alphabet line to the TSequenceValue values.
+    typedef typename Iterator<String<TFileValue>, Standard>::Type TIterator;
+    TIterator it = begin(s);
+    TIterator it_end = end(s);
+    String<unsigned int> mapping_;
+    String<unsigned int> column_;
+    for (unsigned int i = 0; it != it_end; ++i) {
+        if ((*it) != ' ') {
+        // TODO(holtgrew): This kind of type conversion really necessary?
+            unsigned int pos = (TSequenceValue) *it;  // Conversion TFileValue => TSequenceValue => integral
+            appendValue(mapping_, pos);
+            appendValue(column_, i);  // This marks the end of the column
+        }
+        ++it;
+    }
+
+    // Read the matrix itself.
+    while (!_streamEOF(fl)) {
+        clear(s);
+        _streamAppendLine(fl, s, c);
+
+        if (empty(s) || (s[0] == '#')) continue;  // Skip empty lines and comments.
+
+        // Read first character = alphabet column.
+        // TODO(holtgrew): This kind of type conversion really necessary?
+        unsigned int row = (TSequenceValue) s[0];  // Conversion TFileValue => TSequenceValue => integral
+        unsigned int offset = row * TScore::VALUE_SIZE;
+
+        // Read rest of the line.
+        unsigned int right;
+        unsigned int left = 0;
+
+        TFileValue buf[100];  // 100 is enough, believe me!
+        buf[99] = 0;
+
+        for (unsigned int ii = 0; ii < length(column_); ++ii) {
+            // Read column ii.
+            //
+            // Scan cell into buffer.
+            right = column_[ii];
+            TFileValue * it;
+            for (it = buf + 99; it >= buf; --right) {
+                if (right <= left) break;
+                if (s[right] == ' ') break;
+                --it;
+                *it = s[right];
+            }
+
+            // Parse buffer.
+            TValue val;
+            _sscanfValue(it, val);
+
+            sc.data_tab[offset + mapping_[ii]] = val;
+
+            left = column_[ii];
+        }
+    }
+}
+
+
+template <typename TFile, typename TValue, typename TSequenceValue, typename TSpec>
+inline void
+read(TFile & fl, Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc) {
+    SEQAN_CHECKPOINT;
+    read(fl, sc, ScoreMatrixFile());
+}
+
+
+/**
+.Function.loadScoreMatrix
+..cat:Input/Output
+..summary:Load a score matrix from a file.
+..signature:loadScoreMatrix(score, filename)
+..param.score:Score matrix object to load into.
+...type:Spec.Score Matrix
+..param.filename:Path to the file to load.
+..include:seqan/score.h
+**/
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TString>
+inline void
+loadScoreMatrix(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, TString & filename) {
+    SEQAN_CHECKPOINT;
+    FILE * fl;
+    _streamOpen(fl, filename);
+    read(fl, sc);
+    _streamClose(fl);
+}
+
+
+/**
+.Function.loadScoreMatrix
+..signature:loadScoreMatrix(score, filename, meta)
+..param.meta:Meta information read from the file.
+..status:The order of the parameters filename and meta will switch.
+..include:seqan/score.h
+**/
+template <typename TValue, typename TSequenceValue, typename TSpec, typename TString, typename TMeta>
+inline void
+loadScoreMatrix(Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > & sc, TString & filename, TMeta & meta) {
+    SEQAN_CHECKPOINT;
+    FILE * fl;
+    _streamOpen(fl, filename);
+    readMeta(fl, meta, ScoreMatrixFile());
+    read(fl, sc, ScoreMatrixFile());
+    _streamClose(fl);
+}
+
+
+/*
+.Function._sprintfValue:
+..cat:Input/Output
+..summary:Use sprintf to print a value into a $const char *$ buffer.
+..signature:_sprintf(buffer, value)
+..param.buffer:Buffer to write to.
+...type:char *
+...remark:Must be of sufficient size.
+..param.value:Variable for which to write the string value to $buffer$.
+...type:unsigned int
+..includes:seqan/score.h
+..include:seqan/score.h
+ */
+inline void
+_sprintfValue(char * buf, unsigned int val) {
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): sprintf is unsafe, the C++ idiom is to use a std::string, we should probably use String.
+    std::sprintf(buf, "%u", val);
+}
+
+
+/*
+.Function._sprintfValue.param.value.type:int
+..include:seqan/score.h
+ */
+inline void
+_sprintfValue(char * buf, int val) {
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): sprintf is unsafe, the C++ idiom is to use a std::string, we should probably use String.
+    std::sprintf(buf, "%d", val);
+}
+
+
+/*
+.Function._sprintfValue.param.value.type:float
+..include:seqan/score.h
+ */
+inline void
+_sprintfValue(char * buf, float val) {
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): sprintf is unsafe, the C++ idiom is to use a std::string, we should probably use String.
+    double d = val;
+    std::sprintf(buf, "%G", d);
+}
+
+
+/*
+.Function._sprintfValue.param.value.type:float
+..include:seqan/score.h
+ */
+inline void
+_sprintfValue(char * buf, double val) {
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): sprintf is unsafe, the C++ idiom is to use a std::string, we should probably use String.
+    std::sprintf(buf, "%G", val);
+}
+
+
+/*
+.Function._writeScoringMatrix:
+..cat:Input/Output
+..summary:Write the data of a scoring matrix to a file.
+..signature:_writeScoringMatrix(file, table, meta)
+..remark:TODO(holtgrew):More documentation.
+..include:seqan/score.h
+*/
+template <typename TSequenceValue, typename TFile, typename TValue, typename TMeta>
+void
+_writeScoringMatrix(TFile & fl, TValue * tab, TMeta & meta) {
+    SEQAN_CHECKPOINT;
+    typedef typename Value<TFile>::Type TFileValue;
+
+    enum {
+        VALUE_SIZE = ValueSize<TSequenceValue>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    typedef typename Value<TFile>::Type TFileValue;
+
+    // Write meta data.
+    if (!empty(meta)) {
+        bool line_begin = true;
+        for (unsigned int i = 0; i < length(meta); ++i) {
+            if (line_begin) {
+                // Escape each line with a starting '#'.
+                _streamPut(fl, '#');
+                line_begin = false;
+            }
+            if (meta[i] == '\r') continue;
+            if (meta[i] == '\n') line_begin = true;
+            _streamPut(fl, meta[i]);
+        }
+        if (!line_begin) _streamPut(fl, '\n');
+    }
+
+    // Determine column width.
+    unsigned int col_width = 1;
+    char buf[100];  // 100 is enough, believe me!
+    for (unsigned int i = 0; i < TAB_SIZE; ++i) {
+        _sprintfValue(buf, tab[i]);
+        unsigned int cell_width = std::strlen(buf);
+        if (cell_width > col_width)
+            col_width = cell_width;  // Compute maximum.
+    }
+
+    ++col_width;  // Increase col_width for an additional blank.
+
+    // Write alphabet line.
+    _streamPut(fl, ' ');  // A blank for alphabet column.
+    for (unsigned int j = 0; j < VALUE_SIZE; ++j) {
+        TFileValue val = (TSequenceValue) j;  // Conversion integral => TSequenceValue => TFileValue.
+        // Leading blanks for column j.
+        for (unsigned int k = 1; k < col_width; ++k) _streamPut(fl, ' ');
+        _streamPut(fl, val);
+    }
+    _streamPut(fl, '\n');
+
+    // Write rest of matrix.
+    for (unsigned int i = 0; i < VALUE_SIZE; ++i) {
+        // Write alphabet column cell.
+        TFileValue val = (TSequenceValue) i;  // Conversion integral => TSequenceValue => TFileValue
+        _streamPut(fl, val);
+
+        // Write rest of line i.
+        unsigned int offset = i * VALUE_SIZE;
+        for (unsigned int j = 0; j < VALUE_SIZE; ++j) {
+            _sprintfValue(buf, tab[offset + j]);
+            unsigned int len = strlen(buf);
+
+            // Leading blanks.
+            for (unsigned int k = 0; k < col_width - len; ++k) _streamPut(fl, ' ');
+
+            // Write cell.
+            for (unsigned int k = 0; k < len; ++k) _streamPut(fl, buf[k]);
+        }
+        _streamPut(fl, '\n');
+    }
+}
+
+
+/**
+.Function.write:
+..cat:Input/Output
+..signature:write(file, scoreMatrix, meta)
+..remark:TODO, comment better/at all.
+..includes:seqan/score.h
+..include:seqan/score.h
+ */
+template <typename TFile, typename TValue, typename TSequenceValue, typename TSpec, typename TMeta>
+inline void
+write(TFile & fl, Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > const & sc, TMeta & meta) {
+    SEQAN_CHECKPOINT;
+    _writeScoringMatrix<TSequenceValue>(fl, sc.data_tab, meta);
+}
+
+
+/**
+.Function.write:
+..cat:Input/Output
+..signature:write(file, scoreMatrix)
+..remark:TODO, comment better/at all.
+..includes:seqan/score.h
+..include:seqan/score.h
+ */
+template <typename TFile, typename TValue, typename TSequenceValue, typename TSpec>
+inline void
+write(TFile & fl, Score<TValue, ScoreMatrix<TSequenceValue, TSpec> > const & sc) {
+    SEQAN_CHECKPOINT;
+    write(fl, sc, "");
+}
+
+}  // namespace SEQAN_NAMESPACE_MAIN
+
+#endif  // SEQAN_SCORE_SCORE_MATRIX_H_
diff --git a/src/SeqAn-1.3/seqan/score/score_matrix_data.h b/src/SeqAn-1.3/seqan/score/score_matrix_data.h
new file mode 100644
index 0000000..392fc04
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/score/score_matrix_data.h
@@ -0,0 +1,692 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Static data definitions of the following matrices:
+//
+//  - BLOSUM30, BLOSUM45, BLOSUM62 and BLOSUM80
+//  - PAM40, PAM120, PAM200, PAM250; choice following [Altschul, 1991].
+//  - VTML200; choice following [Edgar, 2009].
+//
+// [Altschul, 1991]  Altschul SF.  Amino acid substitution matrices from an
+// information theoretic perspective.  Journal of molecular biology.
+// 1991;219(3):555-65.
+//
+// [Edgar, 2009]  Edgar RC.  Optimizing substitution matrix choice and gap
+// parameters for sequence alignment.  BMC bioinformatics.  2009;10:396.
+//
+// Note that there is a script mat2cpp.py that allows the easy conversion of
+// scoring matrices into C++ fragments.
+// ==========================================================================
+
+// TODO(holtgrew): Maybe also set gap penalties when setting matrices?
+
+#ifndef SEQAN_SCORE_SCORE_MATRIX_DATA_H_
+#define SEQAN_SCORE_SCORE_MATRIX_DATA_H_
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+/*
+.Tag.Blosum30_:
+..cat:Scoring
+..summary:Tag for Retrieving a BLOSUM30 matrix.
+..include:seqan/score.h
+ */
+struct Blosum30_ {};
+
+
+/**
+.Shortcut.Blosum30:
+..cat:Scoring
+..summary:Blosum30 scoring matrix.
+..signature:Blosum30
+..shortcutfor:Spec.Score Matrix
+...signature:Score<int, ScoreMatrix<AminoAcid, Blosum30_> >
+..include:seqan/score.h
+*/
+typedef Score<int, ScoreMatrix<AminoAcid, Blosum30_> > Blosum30;
+
+
+template <>
+struct ScoringMatrixData_<int, AminoAcid, Blosum30_> {
+    enum {
+        VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    static inline int const * getData() {
+        SEQAN_CHECKPOINT;
+        // The matrix data, ordered by amino acid alphabet.
+        // Matrix made by matblas from blosum30.iij
+        // * column uses minimum score
+        // BLOSUM Clustered Scoring Matrix in 1/5 Bit Units
+        // Blocks Database = /data/blocks_5.0/blocks.dat
+        // Cluster Percentage: >= 30
+        // Entropy =   0.1424, Expected =  -0.1074
+        static int const _data[TAB_SIZE] = {
+             4, -1,  0,  0, -3,  1,  0,  0, -2,  0, -1,  0,  1, -2, -1,  1,  1, -5, -4,  1,  0,  0,  0, -7,
+            -1,  8, -2, -1, -2,  3, -1, -2, -1, -3, -2,  1,  0, -1, -1, -1, -3,  0,  0, -1, -2,  0, -1, -7,
+             0, -2,  8,  1, -1, -1, -1,  0, -1,  0, -2,  0,  0, -1, -3,  0,  1, -7, -4, -2,  4, -1,  0, -7,
+             0, -1,  1,  9, -3, -1,  1, -1, -2, -4, -1,  0, -3, -5, -1,  0, -1, -4, -1, -2,  5,  0, -1, -7,
+            -3, -2, -1, -3, 17, -2,  1, -4, -5, -2,  0, -3, -2, -3, -3, -2, -2, -2, -6, -2, -2,  0, -2, -7,
+             1,  3, -1, -1, -2,  8,  2, -2,  0, -2, -2,  0, -1, -3,  0, -1,  0, -1, -1, -3, -1,  4,  0, -7,
+             0, -1, -1,  1,  1,  2,  6, -2,  0, -3, -1,  2, -1, -4,  1,  0, -2, -1, -2, -3,  0,  5, -1, -7,
+             0, -2,  0, -1, -4, -2, -2,  8, -3, -1, -2, -1, -2, -3, -1,  0, -2,  1, -3, -3,  0, -2, -1, -7,
+            -2, -1, -1, -2, -5,  0,  0, -3, 14, -2, -1, -2,  2, -3,  1, -1, -2, -5,  0, -3, -2,  0, -1, -7,
+             0, -3,  0, -4, -2, -2, -3, -1, -2,  6,  2, -2,  1,  0, -3, -1,  0, -3, -1,  4, -2, -3,  0, -7,
+            -1, -2, -2, -1,  0, -2, -1, -2, -1,  2,  4, -2,  2,  2, -3, -2,  0, -2,  3,  1, -1, -1,  0, -7,
+             0,  1,  0,  0, -3,  0,  2, -1, -2, -2, -2,  4,  2, -1,  1,  0, -1, -2, -1, -2,  0,  1,  0, -7,
+             1,  0,  0, -3, -2, -1, -1, -2,  2,  1,  2,  2,  6, -2, -4, -2,  0, -3, -1,  0, -2, -1,  0, -7,
+            -2, -1, -1, -5, -3, -3, -4, -3, -3,  0,  2, -1, -2, 10, -4, -1, -2,  1,  3,  1, -3, -4, -1, -7,
+            -1, -1, -3, -1, -3,  0,  1, -1,  1, -3, -3,  1, -4, -4, 11, -1,  0, -3, -2, -4, -2,  0, -1, -7,
+             1, -1,  0,  0, -2, -1,  0,  0, -1, -1, -2,  0, -2, -1, -1,  4,  2, -3, -2, -1,  0, -1,  0, -7,
+             1, -3,  1, -1, -2,  0, -2, -2, -2,  0,  0, -1,  0, -2,  0,  2,  5, -5, -1,  1,  0, -1,  0, -7,
+            -5,  0, -7, -4, -2, -1, -1,  1, -5, -3, -2, -2, -3,  1, -3, -3, -5, 20,  5, -3, -5, -1, -2, -7,
+            -4,  0, -4, -1, -6, -1, -2, -3,  0, -1,  3, -1, -1,  3, -2, -2, -1,  5,  9,  1, -3, -2, -1, -7,
+             1, -1, -2, -2, -2, -3, -3, -3, -3,  4,  1, -2,  0,  1, -4, -1,  1, -3,  1,  5, -2, -3,  0, -7,
+             0, -2,  4,  5, -2, -1,  0,  0, -2, -2, -1,  0, -2, -3, -2,  0,  0, -5, -3, -2,  5,  0, -1, -7,
+             0,  0, -1,  0,  0,  4,  5, -2,  0, -3, -1,  1, -1, -4,  0, -1, -1, -1, -2, -3,  0,  4,  0, -7,
+             0, -1,  0, -1, -2,  0, -1, -1, -1,  0,  0,  0,  0, -1, -1,  0,  0, -2, -1,  0, -1,  0, -1, -7,
+            -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,  1,
+        };
+        return _data;
+    }
+};
+
+
+/*
+.Tag.Blosum45_:
+..cat:Scoring
+..summary:Tag for Retrieving a BLOSUM45 matrix.
+..include:seqan/score.h
+ */
+struct Blosum45_ {};
+
+
+/**
+.Shortcut.Blosum45:
+..cat:Scoring
+..summary:Blosum45 scoring matrix.
+..signature:Blosum45
+..shortcutfor:Spec.Score Matrix
+...signature:Score<int, ScoreMatrix<AminoAcid, Blosum45_> >
+..include:seqan/score.h
+*/
+typedef Score<int, ScoreMatrix<AminoAcid, Blosum45_> > Blosum45;
+
+
+template <>
+struct ScoringMatrixData_<int, AminoAcid, Blosum45_> {
+    enum {
+        VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    static inline int const * getData() {
+        SEQAN_CHECKPOINT;
+        // Matrix made by matblas from blosum45.iij
+        // * column uses minimum score
+        // BLOSUM Clustered Scoring Matrix in 1/3 Bit Units
+        // Blocks Database = /data/blocks_5.0/blocks.dat
+        // Cluster Percentage: >= 45
+        // Entropy =   0.3795, Expected =  -0.2789
+        static int const _data[TAB_SIZE] = {
+             5, -2, -1, -2, -1, -1, -1,  0, -2, -1, -1, -1, -1, -2, -1,  1,  0, -2, -2,  0, -1, -1,  0, -5,
+            -2,  7,  0, -1, -3,  1,  0, -2,  0, -3, -2,  3, -1, -2, -2, -1, -1, -2, -1, -2, -1,  0, -1, -5,
+            -1,  0,  6,  2, -2,  0,  0,  0,  1, -2, -3,  0, -2, -2, -2,  1,  0, -4, -2, -3,  4,  0, -1, -5,
+            -2, -1,  2,  7, -3,  0,  2, -1,  0, -4, -3,  0, -3, -4, -1,  0, -1, -4, -2, -3,  5,  1, -1, -5,
+            -1, -3, -2, -3, 12, -3, -3, -3, -3, -3, -2, -3, -2, -2, -4, -1, -1, -5, -3, -1, -2, -3, -2, -5,
+            -1,  1,  0,  0, -3,  6,  2, -2,  1, -2, -2,  1,  0, -4, -1,  0, -1, -2, -1, -3,  0,  4, -1, -5,
+            -1,  0,  0,  2, -3,  2,  6, -2,  0, -3, -2,  1, -2, -3,  0,  0, -1, -3, -2, -3,  1,  4, -1, -5,
+             0, -2,  0, -1, -3, -2, -2,  7, -2, -4, -3, -2, -2, -3, -2,  0, -2, -2, -3, -3, -1, -2, -1, -5,
+            -2,  0,  1,  0, -3,  1,  0, -2, 10, -3, -2, -1,  0, -2, -2, -1, -2, -3,  2, -3,  0,  0, -1, -5,
+            -1, -3, -2, -4, -3, -2, -3, -4, -3,  5,  2, -3,  2,  0, -2, -2, -1, -2,  0,  3, -3, -3, -1, -5,
+            -1, -2, -3, -3, -2, -2, -2, -3, -2,  2,  5, -3,  2,  1, -3, -3, -1, -2,  0,  1, -3, -2, -1, -5,
+            -1,  3,  0,  0, -3,  1,  1, -2, -1, -3, -3,  5, -1, -3, -1, -1, -1, -2, -1, -2,  0,  1, -1, -5,
+            -1, -1, -2, -3, -2,  0, -2, -2,  0,  2,  2, -1,  6,  0, -2, -2, -1, -2,  0,  1, -2, -1, -1, -5,
+            -2, -2, -2, -4, -2, -4, -3, -3, -2,  0,  1, -3,  0,  8, -3, -2, -1,  1,  3,  0, -3, -3, -1, -5,
+            -1, -2, -2, -1, -4, -1,  0, -2, -2, -2, -3, -1, -2, -3,  9, -1, -1, -3, -3, -3, -2, -1, -1, -5,
+             1, -1,  1,  0, -1,  0,  0,  0, -1, -2, -3, -1, -2, -2, -1,  4,  2, -4, -2, -1,  0,  0,  0, -5,
+             0, -1,  0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -1, -1,  2,  5, -3, -1,  0,  0, -1,  0, -5,
+            -2, -2, -4, -4, -5, -2, -3, -2, -3, -2, -2, -2, -2,  1, -3, -4, -3, 15,  3, -3, -4, -2, -2, -5,
+            -2, -1, -2, -2, -3, -1, -2, -3,  2,  0,  0, -1,  0,  3, -3, -2, -1,  3,  8, -1, -2, -2, -1, -5,
+             0, -2, -3, -3, -1, -3, -3, -3, -3,  3,  1, -2,  1,  0, -3, -1,  0, -3, -1,  5, -3, -3, -1, -5,
+            -1, -1,  4,  5, -2,  0,  1, -1,  0, -3, -3,  0, -2, -3, -2,  0,  0, -4, -2, -3,  4,  2, -1, -5,
+            -1,  0,  0,  1, -3,  4,  4, -2,  0, -3, -2,  1, -1, -3, -1,  0, -1, -2, -2, -3,  2,  4, -1, -5,
+             0, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0, -2, -1, -1, -1, -1, -1, -5,
+            -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5,  1,
+        };
+        return _data;
+    }
+};
+
+
+/*
+.Tag.Blosum62_:
+..cat:Scoring
+..summary:Tag for Retrieving a BLOSUM62 matrix.
+..include:seqan/score.h
+ */
+struct Blosum62_ {};
+
+
+/**
+.Shortcut.Blosum62:
+..cat:Scoring
+..summary:Blosum62 scoring matrix.
+..signature:Blosum62
+..shortcutfor:Spec.Score Matrix
+...signature:Score<int, ScoreMatrix<AminoAcid, Blosum62_> >
+..include:seqan/score.h
+ */
+typedef Score<int, ScoreMatrix<AminoAcid, Blosum62_> > Blosum62;
+
+
+template <>
+struct ScoringMatrixData_<int, AminoAcid, Blosum62_> {
+    enum {
+        VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    static inline int const * getData() {
+        SEQAN_CHECKPOINT;
+        // Matrix made by matblas from blosum62.iij
+        // * column uses minimum score
+        // BLOSUM Clustered Scoring Matrix in 1/2 Bit Units
+        // Blocks Database = /data/blocks_5.0/blocks.dat
+        // Cluster Percentage: >= 62
+        // Entropy =   0.6979, Expected =  -0.5209
+        static int const _data[TAB_SIZE] = {
+             4, -1, -2, -2,  0, -1, -1,  0, -2, -1, -1, -1, -1, -2, -1,  1,  0, -3, -2,  0, -2, -1,  0, -4,
+            -1,  5,  0, -2, -3,  1,  0, -2,  0, -3, -2,  2, -1, -3, -2, -1, -1, -3, -2, -3, -1,  0, -1, -4,
+            -2,  0,  6,  1, -3,  0,  0,  0,  1, -3, -3,  0, -2, -3, -2,  1,  0, -4, -2, -3,  3,  0, -1, -4,
+            -2, -2,  1,  6, -3,  0,  2, -1, -1, -3, -4, -1, -3, -3, -1,  0, -1, -4, -3, -3,  4,  1, -1, -4,
+             0, -3, -3, -3,  9, -3, -4, -3, -3, -1, -1, -3, -1, -2, -3, -1, -1, -2, -2, -1, -3, -3, -2, -4,
+            -1,  1,  0,  0, -3,  5,  2, -2,  0, -3, -2,  1,  0, -3, -1,  0, -1, -2, -1, -2,  0,  3, -1, -4,
+            -1,  0,  0,  2, -4,  2,  5, -2,  0, -3, -3,  1, -2, -3, -1,  0, -1, -3, -2, -2,  1,  4, -1, -4,
+             0, -2,  0, -1, -3, -2, -2,  6, -2, -4, -4, -2, -3, -3, -2,  0, -2, -2, -3, -3, -1, -2, -1, -4,
+            -2,  0,  1, -1, -3,  0,  0, -2,  8, -3, -3, -1, -2, -1, -2, -1, -2, -2,  2, -3,  0,  0, -1, -4,
+            -1, -3, -3, -3, -1, -3, -3, -4, -3,  4,  2, -3,  1,  0, -3, -2, -1, -3, -1,  3, -3, -3, -1, -4,
+            -1, -2, -3, -4, -1, -2, -3, -4, -3,  2,  4, -2,  2,  0, -3, -2, -1, -2, -1,  1, -4, -3, -1, -4,
+            -1,  2,  0, -1, -3,  1,  1, -2, -1, -3, -2,  5, -1, -3, -1,  0, -1, -3, -2, -2,  0,  1, -1, -4,
+            -1, -1, -2, -3, -1,  0, -2, -3, -2,  1,  2, -1,  5,  0, -2, -1, -1, -1, -1,  1, -3, -1, -1, -4,
+            -2, -3, -3, -3, -2, -3, -3, -3, -1,  0,  0, -3,  0,  6, -4, -2, -2,  1,  3, -1, -3, -3, -1, -4,
+            -1, -2, -2, -1, -3, -1, -1, -2, -2, -3, -3, -1, -2, -4,  7, -1, -1, -4, -3, -2, -2, -1, -2, -4,
+             1, -1,  1,  0, -1,  0,  0,  0, -1, -2, -2,  0, -1, -2, -1,  4,  1, -3, -2, -2,  0,  0,  0, -4,
+             0, -1,  0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -2, -1,  1,  5, -2, -2,  0, -1, -1,  0, -4,
+            -3, -3, -4, -4, -2, -2, -3, -2, -2, -3, -2, -3, -1,  1, -4, -3, -2, 11,  2, -3, -4, -3, -2, -4,
+            -2, -2, -2, -3, -2, -1, -2, -3,  2, -1, -1, -2, -1,  3, -3, -2, -2,  2,  7, -1, -3, -2, -1, -4,
+             0, -3, -3, -3, -1, -2, -2, -3, -3,  3,  1, -2,  1, -1, -2, -2,  0, -3, -1,  4, -3, -2, -1, -4,
+            -2, -1,  3,  4, -3,  0,  1, -1,  0, -3, -4,  0, -3, -3, -2,  0, -1, -4, -3, -3,  4,  1, -1, -4,
+            -1,  0,  0,  1, -3,  3,  4, -2,  0, -3, -3,  1, -1, -3, -1,  0, -1, -3, -2, -2,  1,  4, -1, -4,
+             0, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2,  0,  0, -2, -1, -1, -1, -1, -1, -4,
+            -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,  1,
+        };
+        return _data;
+    }
+};
+
+
+/*
+.Tag.Blosum80_:
+..cat:Scoring
+..summary:Tag for Retrieving a BLOSUM80 matrix.
+..include:seqan/score.h
+ */
+struct Blosum80_ {};
+
+
+/**
+.Shortcut.Blosum80:
+..cat:Scoring
+..summary:Blosum80 scoring matrix.
+..signature:Blosum80
+..shortcutfor:Spec.Score Matrix
+...signature:Score<int, ScoreMatrix<AminoAcid, Blosum80_> >
+..include:seqan/score.h
+*/
+typedef Score<int, ScoreMatrix<AminoAcid, Blosum80_> > Blosum80;
+
+
+template <>
+struct ScoringMatrixData_<int, AminoAcid, Blosum80_> {
+    enum {
+        VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    static inline int const * getData() {
+        SEQAN_CHECKPOINT;
+        // Matrix made by matblas from blosum80_3.iij
+        // * column uses minimum score
+        // BLOSUM Clustered Scoring Matrix in 1/3 Bit Units
+        // Blocks Database = /data/blocks_5.0/blocks.dat
+        // Cluster Percentage: >= 80
+        // Entropy =   0.9868, Expected =  -0.7442
+        static int const _data[TAB_SIZE] = {
+             7, -3, -3, -3, -1, -2, -2,  0, -3, -3, -3, -1, -2, -4, -1,  2,  0, -5, -4, -1, -3, -2, -1, -8,
+            -3,  9, -1, -3, -6,  1, -1, -4,  0, -5, -4,  3, -3, -5, -3, -2, -2, -5, -4, -4, -2,  0, -2, -8,
+            -3, -1,  9,  2, -5,  0, -1, -1,  1, -6, -6,  0, -4, -6, -4,  1,  0, -7, -4, -5,  5, -1, -2, -8,
+            -3, -3,  2, 10, -7, -1,  2, -3, -2, -7, -7, -2, -6, -6, -3, -1, -2, -8, -6, -6,  6,  1, -3, -8,
+            -1, -6, -5, -7, 13, -5, -7, -6, -7, -2, -3, -6, -3, -4, -6, -2, -2, -5, -5, -2, -6, -7, -4, -8,
+            -2,  1,  0, -1, -5,  9,  3, -4,  1, -5, -4,  2, -1, -5, -3, -1, -1, -4, -3, -4, -1,  5, -2, -8,
+            -2, -1, -1,  2, -7,  3,  8, -4,  0, -6, -6,  1, -4, -6, -2, -1, -2, -6, -5, -4,  1,  6, -2, -8,
+             0, -4, -1, -3, -6, -4, -4,  9, -4, -7, -7, -3, -5, -6, -5, -1, -3, -6, -6, -6, -2, -4, -3, -8,
+            -3,  0,  1, -2, -7,  1,  0, -4, 12, -6, -5, -1, -4, -2, -4, -2, -3, -4,  3, -5, -1,  0, -2, -8,
+            -3, -5, -6, -7, -2, -5, -6, -7, -6,  7,  2, -5,  2, -1, -5, -4, -2, -5, -3,  4, -6, -6, -2, -8,
+            -3, -4, -6, -7, -3, -4, -6, -7, -5,  2,  6, -4,  3,  0, -5, -4, -3, -4, -2,  1, -7, -5, -2, -8,
+            -1,  3,  0, -2, -6,  2,  1, -3, -1, -5, -4,  8, -3, -5, -2, -1, -1, -6, -4, -4, -1,  1, -2, -8,
+            -2, -3, -4, -6, -3, -1, -4, -5, -4,  2,  3, -3,  9,  0, -4, -3, -1, -3, -3,  1, -5, -3, -2, -8,
+            -4, -5, -6, -6, -4, -5, -6, -6, -2, -1,  0, -5,  0, 10, -6, -4, -4,  0,  4, -2, -6, -6, -3, -8,
+            -1, -3, -4, -3, -6, -3, -2, -5, -4, -5, -5, -2, -4, -6, 12, -2, -3, -7, -6, -4, -4, -2, -3, -8,
+             2, -2,  1, -1, -2, -1, -1, -1, -2, -4, -4, -1, -3, -4, -2,  7,  2, -6, -3, -3,  0, -1, -1, -8,
+             0, -2,  0, -2, -2, -1, -2, -3, -3, -2, -3, -1, -1, -4, -3,  2,  8, -5, -3,  0, -1, -2, -1, -8,
+            -5, -5, -7, -8, -5, -4, -6, -6, -4, -5, -4, -6, -3,  0, -7, -6, -5, 16,  3, -5, -8, -5, -5, -8,
+            -4, -4, -4, -6, -5, -3, -5, -6,  3, -3, -2, -4, -3,  4, -6, -3, -3,  3, 11, -3, -5, -4, -3, -8,
+            -1, -4, -5, -6, -2, -4, -4, -6, -5,  4,  1, -4,  1, -2, -4, -3,  0, -5, -3,  7, -6, -4, -2, -8,
+            -3, -2,  5,  6, -6, -1,  1, -2, -1, -6, -7, -1, -5, -6, -4,  0, -1, -8, -5, -6,  6,  0, -3, -8,
+            -2,  0, -1,  1, -7,  5,  6, -4,  0, -6, -5,  1, -3, -6, -2, -1, -2, -5, -4, -4,  0,  6, -1, -8,
+            -1, -2, -2, -3, -4, -2, -2, -3, -2, -2, -2, -2, -2, -3, -3, -1, -1, -5, -3, -2, -3, -1, -2, -8,
+            -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,  1,
+        };
+        return _data;
+    }
+};
+
+
+/*
+.Tag.Pam40_:
+..cat:Scoring
+..summary:Tag for Retrieving a PAM40 matrix.
+..include:seqan/score.h
+ */
+struct Pam40_ {};
+
+
+/**
+.Shortcut.Pam40:
+..cat:Scoring
+..summary:Pam40 scoring matrix.
+..signature:Pam40
+..shortcutfor:Spec.Score Matrix
+...signature:Score<int, ScoreMatrix<AminoAcid, Pam40_> >
+..include:seqan/score.h
+*/
+typedef Score<int, ScoreMatrix<AminoAcid, Pam40_> > Pam40;
+
+
+template <>
+struct ScoringMatrixData_<int, AminoAcid, Pam40_> {
+    enum {
+        VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    static inline int const * getData() {
+        SEQAN_CHECKPOINT;
+        // 
+        // This matrix was produced by "pam" Version 1.0.6 [28-Jul-93]
+        // 
+        // PAM 40 substitution matrix, scale = ln(2)/2 = 0.346574
+        // 
+        // Expected score = -4.27, Entropy = 2.26 bits
+        // 
+        // Lowest score = -15, Highest score = 13
+        // 
+        static int const _data[TAB_SIZE] = {
+              6,  -6,  -3,  -3,  -6,  -3,  -2,  -1,  -6,  -4,  -5,  -6,  -4,  -7,  -1,   0,   0, -12,  -7,  -2,  -3,  -2,  -3, -15,
+             -6,   8,  -5,  -9,  -7,  -1,  -8,  -8,  -1,  -5,  -8,   1,  -3,  -8,  -3,  -2,  -5,  -1,  -9,  -7,  -6,  -3,  -5, -15,
+             -3,  -5,   7,   2,  -9,  -3,  -1,  -2,   1,  -4,  -6,   0,  -7,  -8,  -5,   0,  -1,  -7,  -4,  -7,   6,  -2,  -3, -15,
+             -3,  -9,   2,   7, -12,  -2,   3,  -3,  -3,  -6, -11,  -4,  -9, -13,  -7,  -3,  -4, -13, -10,  -7,   6,   2,  -5, -15,
+             -6,  -7,  -9, -12,   9, -12, -12,  -8,  -7,  -5, -13, -12, -12, -11,  -7,  -2,  -7, -14,  -3,  -5, -11, -12,  -8, -15,
+             -3,  -1,  -3,  -2, -12,   8,   2,  -6,   1,  -7,  -4,  -2,  -3, -11,  -2,  -4,  -5, -11, -10,  -6,  -2,   6,  -4, -15,
+             -2,  -8,  -1,   3, -12,   2,   7,  -3,  -4,  -5,  -8,  -4,  -6, -12,  -5,  -4,  -5, -15,  -8,  -6,   2,   6,  -4, -15,
+             -1,  -8,  -2,  -3,  -8,  -6,  -3,   6,  -8,  -9,  -9,  -6,  -7,  -8,  -5,  -1,  -5, -13, -12,  -5,  -2,  -4,  -4, -15,
+             -6,  -1,   1,  -3,  -7,   1,  -4,  -8,   9,  -8,  -5,  -5,  -9,  -5,  -3,  -5,  -6,  -6,  -3,  -6,  -1,   0,  -4, -15,
+             -4,  -5,  -4,  -6,  -5,  -7,  -5,  -9,  -8,   8,  -1,  -5,   0,  -2,  -7,  -6,  -2, -12,  -5,   2,  -5,  -5,  -4, -15,
+             -5,  -8,  -6, -11, -13,  -4,  -8,  -9,  -5,  -1,   7,  -7,   1,  -2,  -6,  -7,  -6,  -5,  -6,  -2,  -8,  -6,  -5, -15,
+             -6,   1,   0,  -4, -12,  -2,  -4,  -6,  -5,  -5,  -7,   6,  -1, -12,  -6,  -3,  -2, -10,  -8,  -8,  -2,  -3,  -4, -15,
+             -4,  -3,  -7,  -9, -12,  -3,  -6,  -7,  -9,   0,   1,  -1,  11,  -3,  -7,  -5,  -3, -11, -10,  -1,  -8,  -4,  -4, -15,
+             -7,  -8,  -8, -13, -11, -11, -12,  -8,  -5,  -2,  -2, -12,  -3,   9,  -9,  -6,  -8,  -4,   2,  -7,  -9, -12,  -7, -15,
+             -1,  -3,  -5,  -7,  -7,  -2,  -5,  -5,  -3,  -7,  -6,  -6,  -7,  -9,   8,  -1,  -3, -12, -12,  -5,  -6,  -3,  -4, -15,
+              0,  -2,   0,  -3,  -2,  -4,  -4,  -1,  -5,  -6,  -7,  -3,  -5,  -6,  -1,   6,   1,  -4,  -6,  -5,  -1,  -4,  -2, -15,
+              0,  -5,  -1,  -4,  -7,  -5,  -5,  -5,  -6,  -2,  -6,  -2,  -3,  -8,  -3,   1,   7, -11,  -6,  -2,  -2,  -5,  -3, -15,
+            -12,  -1,  -7, -13, -14, -11, -15, -13,  -6, -12,  -5, -10, -11,  -4, -12,  -4, -11,  13,  -4, -14,  -9, -13,  -9, -15,
+             -7,  -9,  -4, -10,  -3, -10,  -8, -12,  -3,  -5,  -6,  -8, -10,   2, -12,  -6,  -6,  -4,  10,  -6,  -6,  -8,  -7, -15,
+             -2,  -7,  -7,  -7,  -5,  -6,  -6,  -5,  -6,   2,  -2,  -8,  -1,  -7,  -5,  -5,  -2, -14,  -6,   7,  -7,  -6,  -4, -15,
+             -3,  -6,   6,   6, -11,  -2,   2,  -2,  -1,  -5,  -8,  -2,  -8,  -9,  -6,  -1,  -2,  -9,  -6,  -7,   6,   1,  -4, -15,
+             -2,  -3,  -2,   2, -12,   6,   6,  -4,   0,  -5,  -6,  -3,  -4, -12,  -3,  -4,  -5, -13,  -8,  -6,   1,   6,  -4, -15,
+             -3,  -5,  -3,  -5,  -8,  -4,  -4,  -4,  -4,  -4,  -5,  -4,  -4,  -7,  -4,  -2,  -3,  -9,  -7,  -4,  -4,  -4,  -4, -15,
+            -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,   1,
+        };
+        return _data;
+    }
+};
+
+
+/*
+.Tag.Pam120_:
+..cat:Scoring
+..summary:Tag for Retrieving a PAM120 matrix.
+..include:seqan/score.h
+ */
+struct Pam120_ {};
+
+
+/**
+.Shortcut.Pam120:
+..cat:Scoring
+..summary:Pam120 scoring matrix.
+..signature:Pam120
+..shortcutfor:Spec.Score Matrix
+...signature:Score<int, ScoreMatrix<AminoAcid, Pam120_> >
+..include:seqan/score.h
+*/
+typedef Score<int, ScoreMatrix<AminoAcid, Pam120_> > Pam120;
+
+
+template <>
+struct ScoringMatrixData_<int, AminoAcid, Pam120_> {
+    enum {
+        VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    static inline int const * getData() {
+        SEQAN_CHECKPOINT;
+        // This matrix was produced by "pam" Version 1.0.6 [28-Jul-93]
+        // 
+        // PAM 120 substitution matrix, scale = ln(2)/2 = 0.346574
+        // 
+        // Expected score = -1.64, Entropy = 0.979 bits
+        // 
+        // Lowest score = -8, Highest score = 12
+        // 
+        static int const _data[TAB_SIZE] = {
+              3,  -3,  -1,   0,  -3,  -1,   0,   1,  -3,  -1,  -3,  -2,  -2,  -4,   1,   1,   1,  -7,  -4,   0,   0,  -1,  -1,  -8,
+             -3,   6,  -1,  -3,  -4,   1,  -3,  -4,   1,  -2,  -4,   2,  -1,  -5,  -1,  -1,  -2,   1,  -5,  -3,  -2,  -1,  -2,  -8,
+             -1,  -1,   4,   2,  -5,   0,   1,   0,   2,  -2,  -4,   1,  -3,  -4,  -2,   1,   0,  -4,  -2,  -3,   3,   0,  -1,  -8,
+              0,  -3,   2,   5,  -7,   1,   3,   0,   0,  -3,  -5,  -1,  -4,  -7,  -3,   0,  -1,  -8,  -5,  -3,   4,   3,  -2,  -8,
+             -3,  -4,  -5,  -7,   9,  -7,  -7,  -4,  -4,  -3,  -7,  -7,  -6,  -6,  -4,   0,  -3,  -8,  -1,  -3,  -6,  -7,  -4,  -8,
+             -1,   1,   0,   1,  -7,   6,   2,  -3,   3,  -3,  -2,   0,  -1,  -6,   0,  -2,  -2,  -6,  -5,  -3,   0,   4,  -1,  -8,
+              0,  -3,   1,   3,  -7,   2,   5,  -1,  -1,  -3,  -4,  -1,  -3,  -7,  -2,  -1,  -2,  -8,  -5,  -3,   3,   4,  -1,  -8,
+              1,  -4,   0,   0,  -4,  -3,  -1,   5,  -4,  -4,  -5,  -3,  -4,  -5,  -2,   1,  -1,  -8,  -6,  -2,   0,  -2,  -2,  -8,
+             -3,   1,   2,   0,  -4,   3,  -1,  -4,   7,  -4,  -3,  -2,  -4,  -3,  -1,  -2,  -3,  -3,  -1,  -3,   1,   1,  -2,  -8,
+             -1,  -2,  -2,  -3,  -3,  -3,  -3,  -4,  -4,   6,   1,  -3,   1,   0,  -3,  -2,   0,  -6,  -2,   3,  -3,  -3,  -1,  -8,
+             -3,  -4,  -4,  -5,  -7,  -2,  -4,  -5,  -3,   1,   5,  -4,   3,   0,  -3,  -4,  -3,  -3,  -2,   1,  -4,  -3,  -2,  -8,
+             -2,   2,   1,  -1,  -7,   0,  -1,  -3,  -2,  -3,  -4,   5,   0,  -7,  -2,  -1,  -1,  -5,  -5,  -4,   0,  -1,  -2,  -8,
+             -2,  -1,  -3,  -4,  -6,  -1,  -3,  -4,  -4,   1,   3,   0,   8,  -1,  -3,  -2,  -1,  -6,  -4,   1,  -4,  -2,  -2,  -8,
+             -4,  -5,  -4,  -7,  -6,  -6,  -7,  -5,  -3,   0,   0,  -7,  -1,   8,  -5,  -3,  -4,  -1,   4,  -3,  -5,  -6,  -3,  -8,
+              1,  -1,  -2,  -3,  -4,   0,  -2,  -2,  -1,  -3,  -3,  -2,  -3,  -5,   6,   1,  -1,  -7,  -6,  -2,  -2,  -1,  -2,  -8,
+              1,  -1,   1,   0,   0,  -2,  -1,   1,  -2,  -2,  -4,  -1,  -2,  -3,   1,   3,   2,  -2,  -3,  -2,   0,  -1,  -1,  -8,
+              1,  -2,   0,  -1,  -3,  -2,  -2,  -1,  -3,   0,  -3,  -1,  -1,  -4,  -1,   2,   4,  -6,  -3,   0,   0,  -2,  -1,  -8,
+             -7,   1,  -4,  -8,  -8,  -6,  -8,  -8,  -3,  -6,  -3,  -5,  -6,  -1,  -7,  -2,  -6,  12,  -2,  -8,  -6,  -7,  -5,  -8,
+             -4,  -5,  -2,  -5,  -1,  -5,  -5,  -6,  -1,  -2,  -2,  -5,  -4,   4,  -6,  -3,  -3,  -2,   8,  -3,  -3,  -5,  -3,  -8,
+              0,  -3,  -3,  -3,  -3,  -3,  -3,  -2,  -3,   3,   1,  -4,   1,  -3,  -2,  -2,   0,  -8,  -3,   5,  -3,  -3,  -1,  -8,
+              0,  -2,   3,   4,  -6,   0,   3,   0,   1,  -3,  -4,   0,  -4,  -5,  -2,   0,   0,  -6,  -3,  -3,   4,   2,  -1,  -8,
+             -1,  -1,   0,   3,  -7,   4,   4,  -2,   1,  -3,  -3,  -1,  -2,  -6,  -1,  -1,  -2,  -7,  -5,  -3,   2,   4,  -1,  -8,
+             -1,  -2,  -1,  -2,  -4,  -1,  -1,  -2,  -2,  -1,  -2,  -2,  -2,  -3,  -2,  -1,  -1,  -5,  -3,  -1,  -1,  -1,  -2,  -8,
+             -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,   1,
+        };
+        return _data;
+    }
+};
+
+
+/*
+.Tag.Pam200_:
+..cat:Scoring
+..summary:Tag for Retrieving a PAM200 matrix.
+..include:seqan/score.h
+ */
+struct Pam200_ {};
+
+
+/**
+.Shortcut.Pam200:
+..cat:Scoring
+..summary:Pam200 scoring matrix.
+..signature:Pam200
+..shortcutfor:Spec.Score Matrix
+...signature:Score<int, ScoreMatrix<AminoAcid, Pam200_> >
+..include:seqan/score.h
+*/
+typedef Score<int, ScoreMatrix<AminoAcid, Pam200_> > Pam200;
+
+
+template <>
+struct ScoringMatrixData_<int, AminoAcid, Pam200_> {
+    enum {
+        VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    static inline int const * getData() {
+        SEQAN_CHECKPOINT;
+        // This matrix was produced by "pam" Version 1.0.6 [28-Jul-93]
+        // 
+        // PAM 200 substitution matrix, scale = ln(2)/3 = 0.231049
+        // 
+        // Expected score = -1.23, Entropy = 0.507 bits
+        // 
+        // Lowest score = -9, Highest score = 18
+        // 
+        static int const _data[TAB_SIZE] = {
+              3,  -2,   0,   0,  -3,  -1,   0,   1,  -2,  -1,  -2,  -2,  -2,  -4,   1,   1,   1,  -7,  -4,   0,   0,   0,   0,  -9,
+             -2,   7,   0,  -2,  -4,   1,  -2,  -4,   2,  -2,  -4,   4,  -1,  -5,   0,  -1,  -1,   2,  -5,  -3,  -1,   0,  -1,  -9,
+              0,   0,   3,   3,  -5,   1,   2,   0,   2,  -2,  -4,   1,  -2,  -4,  -1,   1,   0,  -5,  -2,  -2,   3,   1,   0,  -9,
+              0,  -2,   3,   5,  -6,   2,   4,   0,   0,  -3,  -5,   0,  -4,  -7,  -2,   0,   0,  -8,  -5,  -3,   4,   3,  -1,  -9,
+             -3,  -4,  -5,  -6,  12,  -7,  -7,  -4,  -4,  -3,  -7,  -7,  -6,  -6,  -4,   0,  -3,  -9,   0,  -2,  -5,  -7,  -4,  -9,
+             -1,   1,   1,   2,  -7,   5,   3,  -2,   3,  -3,  -2,   1,  -1,  -6,   0,  -1,  -1,  -6,  -5,  -3,   1,   4,  -1,  -9,
+              0,  -2,   2,   4,  -7,   3,   5,   0,   0,  -3,  -4,   0,  -3,  -7,  -1,   0,  -1,  -9,  -5,  -2,   3,   4,  -1,  -9,
+              1,  -4,   0,   0,  -4,  -2,   0,   6,  -3,  -3,  -5,  -2,  -4,  -6,  -1,   1,   0,  -8,  -6,  -2,   0,  -1,  -1,  -9,
+             -2,   2,   2,   0,  -4,   3,   0,  -3,   8,  -3,  -3,  -1,  -3,  -2,  -1,  -1,  -2,  -3,   0,  -3,   1,   2,  -1,  -9,
+             -1,  -2,  -2,  -3,  -3,  -3,  -3,  -3,  -3,   6,   2,  -2,   2,   1,  -3,  -2,   0,  -6,  -2,   4,  -3,  -3,  -1,  -9,
+             -2,  -4,  -4,  -5,  -7,  -2,  -4,  -5,  -3,   2,   7,  -4,   4,   2,  -3,  -4,  -2,  -2,  -2,   2,  -4,  -3,  -2,  -9,
+             -2,   4,   1,   0,  -7,   1,   0,  -2,  -1,  -2,  -4,   6,   1,  -7,  -2,   0,   0,  -4,  -5,  -3,   0,   0,  -1,  -9,
+             -2,  -1,  -2,  -4,  -6,  -1,  -3,  -4,  -3,   2,   4,   1,   8,   0,  -3,  -2,  -1,  -5,  -3,   2,  -3,  -2,  -1,  -9,
+             -4,  -5,  -4,  -7,  -6,  -6,  -7,  -6,  -2,   1,   2,  -7,   0,  10,  -6,  -4,  -4,   0,   7,  -2,  -6,  -6,  -3,  -9,
+              1,   0,  -1,  -2,  -4,   0,  -1,  -1,  -1,  -3,  -3,  -2,  -3,  -6,   7,   1,   0,  -7,  -6,  -2,  -1,  -1,  -1,  -9,
+              1,  -1,   1,   0,   0,  -1,   0,   1,  -1,  -2,  -4,   0,  -2,  -4,   1,   2,   2,  -3,  -3,  -1,   1,  -1,   0,  -9,
+              1,  -1,   0,   0,  -3,  -1,  -1,   0,  -2,   0,  -2,   0,  -1,  -4,   0,   2,   4,  -6,  -3,   0,   0,  -1,   0,  -9,
+             -7,   2,  -5,  -8,  -9,  -6,  -9,  -8,  -3,  -6,  -2,  -4,  -5,   0,  -7,  -3,  -6,  18,  -1,  -8,  -6,  -7,  -5,  -9,
+             -4,  -5,  -2,  -5,   0,  -5,  -5,  -6,   0,  -2,  -2,  -5,  -3,   7,  -6,  -3,  -3,  -1,  11,  -3,  -4,  -5,  -3,  -9,
+              0,  -3,  -2,  -3,  -2,  -3,  -2,  -2,  -3,   4,   2,  -3,   2,  -2,  -2,  -1,   0,  -8,  -3,   5,  -3,  -2,  -1,  -9,
+              0,  -1,   3,   4,  -5,   1,   3,   0,   1,  -3,  -4,   0,  -3,  -6,  -1,   1,   0,  -6,  -4,  -3,   3,   2,  -1,  -9,
+              0,   0,   1,   3,  -7,   4,   4,  -1,   2,  -3,  -3,   0,  -2,  -6,  -1,  -1,  -1,  -7,  -5,  -2,   2,   4,  -1,  -9,
+              0,  -1,   0,  -1,  -4,  -1,  -1,  -1,  -1,  -1,  -2,  -1,  -1,  -3,  -1,   0,   0,  -5,  -3,  -1,  -1,  -1,  -1,  -9,
+             -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,  -9,   1,
+        };
+        return _data;
+    }
+};
+
+
+/*
+.Tag.Pam250_:
+..cat:Scoring
+..summary:Tag for Retrieving a PAM250 matrix.
+..include:seqan/score.h
+ */
+struct Pam250_ {};
+
+
+/**
+.Shortcut.Pam250:
+..cat:Scoring
+..summary:Pam250 scoring matrix.
+..signature:Pam250
+..shortcutfor:Spec.Score Matrix
+...signature:Score<int, ScoreMatrix<AminoAcid, Pam250_> >
+..include:seqan/score.h
+*/
+typedef Score<int, ScoreMatrix<AminoAcid, Pam250_> > Pam250;
+
+
+template <>
+struct ScoringMatrixData_<int, AminoAcid, Pam250_> {
+    enum {
+        VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    static inline int const * getData() {
+        SEQAN_CHECKPOINT;
+        // This matrix was produced by "pam" Version 1.0.6 [28-Jul-93]
+        // 
+        // PAM 250 substitution matrix, scale = ln(2)/3 = 0.231049
+        // 
+        // Expected score = -0.844, Entropy = 0.354 bits
+        // 
+        // Lowest score = -8, Highest score = 17
+        // 
+        static int const _data[TAB_SIZE] = {
+              2,  -2,   0,   0,  -2,   0,   0,   1,  -1,  -1,  -2,  -1,  -1,  -3,   1,   1,   1,  -6,  -3,   0,   0,   0,   0,  -8,
+             -2,   6,   0,  -1,  -4,   1,  -1,  -3,   2,  -2,  -3,   3,   0,  -4,   0,   0,  -1,   2,  -4,  -2,  -1,   0,  -1,  -8,
+              0,   0,   2,   2,  -4,   1,   1,   0,   2,  -2,  -3,   1,  -2,  -3,   0,   1,   0,  -4,  -2,  -2,   2,   1,   0,  -8,
+              0,  -1,   2,   4,  -5,   2,   3,   1,   1,  -2,  -4,   0,  -3,  -6,  -1,   0,   0,  -7,  -4,  -2,   3,   3,  -1,  -8,
+             -2,  -4,  -4,  -5,  12,  -5,  -5,  -3,  -3,  -2,  -6,  -5,  -5,  -4,  -3,   0,  -2,  -8,   0,  -2,  -4,  -5,  -3,  -8,
+              0,   1,   1,   2,  -5,   4,   2,  -1,   3,  -2,  -2,   1,  -1,  -5,   0,  -1,  -1,  -5,  -4,  -2,   1,   3,  -1,  -8,
+              0,  -1,   1,   3,  -5,   2,   4,   0,   1,  -2,  -3,   0,  -2,  -5,  -1,   0,   0,  -7,  -4,  -2,   3,   3,  -1,  -8,
+              1,  -3,   0,   1,  -3,  -1,   0,   5,  -2,  -3,  -4,  -2,  -3,  -5,   0,   1,   0,  -7,  -5,  -1,   0,   0,  -1,  -8,
+             -1,   2,   2,   1,  -3,   3,   1,  -2,   6,  -2,  -2,   0,  -2,  -2,   0,  -1,  -1,  -3,   0,  -2,   1,   2,  -1,  -8,
+             -1,  -2,  -2,  -2,  -2,  -2,  -2,  -3,  -2,   5,   2,  -2,   2,   1,  -2,  -1,   0,  -5,  -1,   4,  -2,  -2,  -1,  -8,
+             -2,  -3,  -3,  -4,  -6,  -2,  -3,  -4,  -2,   2,   6,  -3,   4,   2,  -3,  -3,  -2,  -2,  -1,   2,  -3,  -3,  -1,  -8,
+             -1,   3,   1,   0,  -5,   1,   0,  -2,   0,  -2,  -3,   5,   0,  -5,  -1,   0,   0,  -3,  -4,  -2,   1,   0,  -1,  -8,
+             -1,   0,  -2,  -3,  -5,  -1,  -2,  -3,  -2,   2,   4,   0,   6,   0,  -2,  -2,  -1,  -4,  -2,   2,  -2,  -2,  -1,  -8,
+             -3,  -4,  -3,  -6,  -4,  -5,  -5,  -5,  -2,   1,   2,  -5,   0,   9,  -5,  -3,  -3,   0,   7,  -1,  -4,  -5,  -2,  -8,
+              1,   0,   0,  -1,  -3,   0,  -1,   0,   0,  -2,  -3,  -1,  -2,  -5,   6,   1,   0,  -6,  -5,  -1,  -1,   0,  -1,  -8,
+              1,   0,   1,   0,   0,  -1,   0,   1,  -1,  -1,  -3,   0,  -2,  -3,   1,   2,   1,  -2,  -3,  -1,   0,   0,   0,  -8,
+              1,  -1,   0,   0,  -2,  -1,   0,   0,  -1,   0,  -2,   0,  -1,  -3,   0,   1,   3,  -5,  -3,   0,   0,  -1,   0,  -8,
+             -6,   2,  -4,  -7,  -8,  -5,  -7,  -7,  -3,  -5,  -2,  -3,  -4,   0,  -6,  -2,  -5,  17,   0,  -6,  -5,  -6,  -4,  -8,
+             -3,  -4,  -2,  -4,   0,  -4,  -4,  -5,   0,  -1,  -1,  -4,  -2,   7,  -5,  -3,  -3,   0,  10,  -2,  -3,  -4,  -2,  -8,
+              0,  -2,  -2,  -2,  -2,  -2,  -2,  -1,  -2,   4,   2,  -2,   2,  -1,  -1,  -1,   0,  -6,  -2,   4,  -2,  -2,  -1,  -8,
+              0,  -1,   2,   3,  -4,   1,   3,   0,   1,  -2,  -3,   1,  -2,  -4,  -1,   0,   0,  -5,  -3,  -2,   3,   2,  -1,  -8,
+              0,   0,   1,   3,  -5,   3,   3,   0,   2,  -2,  -3,   0,  -2,  -5,   0,   0,  -1,  -6,  -4,  -2,   2,   3,  -1,  -8,
+              0,  -1,   0,  -1,  -3,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -2,  -1,   0,   0,  -4,  -2,  -1,  -1,  -1,  -1,  -8,
+             -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,  -8,   1,
+        };
+        return _data;
+    }
+};
+
+
+/*
+.Tag.Vtml200_:
+..cat:Scoring
+..summary:Tag for Retrieving a PAM200 matrix.
+..include:seqan/score.h
+ */
+struct Vtml200_ {};
+
+
+/**
+.Shortcut.Vtml200:
+..cat:Scoring
+..summary:Vtml200 scoring matrix.
+..signature:Vtml200
+..shortcutfor:Spec.Score Matrix
+...signature:Score<int, ScoreMatrix<AminoAcid, Vtml200_> >
+..include:seqan/score.h
+*/
+typedef Score<int, ScoreMatrix<AminoAcid, Vtml200_> > Vtml200;
+
+
+template <>
+struct ScoringMatrixData_<int, AminoAcid, Vtml200_> {
+    enum {
+        VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
+        TAB_SIZE = VALUE_SIZE * VALUE_SIZE
+    };
+
+    static inline int const * getData() {
+        SEQAN_CHECKPOINT;
+        // VTML200
+        // 
+        // This matrix was produced by scripts written by
+        // Kai Kneutgen and Tobias Mueller [Mai-2002]
+        // 
+        // VTML200  substitution matrix, Units = Third-Bits
+        // 
+        // Expected Score = -1.038 Third-Bits
+        // Lowest Score   = -6.432
+        // Highest Score  = 15.127
+        // Entropy H      = 0.420 Bits
+        // 
+        // 
+        // For further information on the VTML substitution model, see
+        // 
+        // Estimating Amino Acid Substitution Models:
+        // A Comparison of Dayhoff's Estimator, the Resolvent Approach and a Maximum Likelihood Method.
+        // T. Mueller, R. Spang and M. Vingron
+        // Mol Biol Evol 19(1): 8-13. 2002.
+        // 
+        // or mail to
+        // Tobias.Mueller at molgen.mpg.de
+        // 
+        // The latest version of this perl script can be downloaded at
+        // http://www.molgen.mpg.de/~muelle_t
+        static int const _data[TAB_SIZE] = {
+              4,  -2,  -1,  -1,   1,  -1,  -1,   0,  -2,  -1,  -2,  -1,  -1,  -3,   0,   1,   1,  -4,  -3,   0,  -1,  -1,  -1,  -6,
+             -2,   7,   0,  -2,  -3,   2,  -1,  -2,   1,  -3,  -3,   4,  -2,  -4,  -1,  -1,  -1,  -3,  -2,  -3,  -1,   0,  -1,  -6,
+             -1,   0,   6,   3,  -2,   1,   1,   0,   1,  -4,  -4,   1,  -3,  -4,  -2,   1,   0,  -5,  -2,  -3,   4,   1,  -1,  -6,
+             -1,  -2,   3,   6,  -4,   1,   3,  -1,   0,  -5,  -5,   0,  -4,  -6,  -1,   0,  -1,  -6,  -4,  -4,   5,   2,  -2,  -6,
+              1,  -3,  -2,  -4,  12,  -3,  -4,  -2,  -2,   0,  -3,  -4,  -1,  -3,  -3,   1,   0,  -6,   0,   1,  -3,  -4,  -1,  -6,
+             -1,   2,   1,   1,  -3,   5,   2,  -2,   2,  -3,  -2,   2,  -1,  -3,  -1,   0,   0,  -6,  -3,  -2,   1,   4,  -1,  -6,
+             -1,  -1,   1,   3,  -4,   2,   5,  -1,   0,  -4,  -4,   1,  -3,  -5,  -1,   0,  -1,  -6,  -3,  -3,   2,   4,  -1,  -6,
+              0,  -2,   0,  -1,  -2,  -2,  -1,   8,  -2,  -6,  -5,  -2,  -4,  -5,  -2,   0,  -2,  -5,  -5,  -4,   0,  -2,  -2,  -6,
+             -2,   1,   1,   0,  -2,   2,   0,  -2,   8,  -3,  -2,   0,  -3,   0,  -2,   0,  -1,  -1,   3,  -3,   1,   1,   0,  -6,
+             -1,  -3,  -4,  -5,   0,  -3,  -4,  -6,  -3,   5,   3,  -3,   2,   0,  -4,  -3,  -1,  -2,  -2,   4,  -4,  -3,  -1,  -6,
+             -2,  -3,  -4,  -5,  -3,  -2,  -4,  -5,  -2,   3,   5,  -3,   3,   2,  -3,  -3,  -2,  -1,  -1,   2,  -5,  -3,  -1,  -6,
+             -1,   4,   1,   0,  -4,   2,   1,  -2,   0,  -3,  -3,   5,  -2,  -5,  -1,   0,   0,  -4,  -3,  -3,   0,   2,  -1,  -6,
+             -1,  -2,  -3,  -4,  -1,  -1,  -3,  -4,  -3,   2,   3,  -2,   6,   1,  -3,  -2,  -1,  -3,  -2,   2,  -3,  -2,  -1,  -6,
+             -3,  -4,  -4,  -6,  -3,  -3,  -5,  -5,   0,   0,   2,  -5,   1,   8,  -4,  -3,  -3,   3,   5,  -1,  -5,  -4,  -1,  -6,
+              0,  -1,  -2,  -1,  -3,  -1,  -1,  -2,  -2,  -4,  -3,  -1,  -3,  -4,   9,   0,  -1,  -4,  -5,  -3,  -1,  -1,  -2,  -6,
+              1,  -1,   1,   0,   1,   0,   0,   0,   0,  -3,  -3,   0,  -2,  -3,   0,   4,   2,  -4,  -2,  -2,   1,   0,  -1,  -6,
+              1,  -1,   0,  -1,   0,   0,  -1,  -2,  -1,  -1,  -2,   0,  -1,  -3,  -1,   2,   4,  -5,  -3,   0,   0,  -1,  -1,  -6,
+             -4,  -3,  -5,  -6,  -6,  -6,  -6,  -5,  -1,  -2,  -1,  -4,  -3,   3,  -4,  -4,  -5,  15,   4,  -4,  -5,  -6,  -2,  -6,
+             -3,  -2,  -2,  -4,   0,  -3,  -3,  -5,   3,  -2,  -1,  -3,  -2,   5,  -5,  -2,  -3,   4,   9,  -2,  -3,  -3,  -1,  -6,
+              0,  -3,  -3,  -4,   1,  -2,  -3,  -4,  -3,   4,   2,  -3,   2,  -1,  -3,  -2,   0,  -4,  -2,   4,  -3,  -3,  -1,  -6,
+             -1,  -1,   4,   5,  -3,   1,   2,   0,   1,  -4,  -5,   0,  -3,  -5,  -1,   1,   0,  -5,  -3,  -3,   4,   1,  -1,  -6,
+             -1,   0,   1,   2,  -4,   4,   4,  -2,   1,  -3,  -3,   2,  -2,  -4,  -1,   0,  -1,  -6,  -3,  -3,   1,   4,  -1,  -6,
+             -1,  -1,  -1,  -2,  -1,  -1,  -1,  -2,   0,  -1,  -1,  -1,  -1,  -1,  -2,  -1,  -1,  -2,  -1,  -1,  -1,  -1,  -1,  -6,
+             -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,  -6,   1,
+        };
+        return _data;
+    }
+};
+
+}  // namespace SEQAN_NAMESPACE_MAIN
+
+#endif  // SEQAN_SCORE_SCORE_MATRIX_DATA_H_
diff --git a/src/SeqAn-1.3/seqan/score/score_simple.h b/src/SeqAn-1.3/seqan/score/score_simple.h
new file mode 100644
index 0000000..f806ea5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/score/score_simple.h
@@ -0,0 +1,372 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Code for the Simple Scoring Schema.
+// ==========================================================================
+
+#ifndef SEQAN_SCORE_SCORE_SIMPLE_H_
+#define SEQAN_SCORE_SCORE_SIMPLE_H_
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+/**
+.Tag.Simple:
+..cat:Scoring
+..summary:Tag for the @Class.Score@ to mark it as a simple score.
+..include:seqan/score.h
+ */
+struct Simple;
+
+
+/**
+.Spec.Simple Score
+..cat:Scoring
+..signature:Score<TValue, Simple>
+..param.TValue:The value type.
+...default:int
+..general:Class.Score
+..summary:Simple scoring scheme that has scores for matches, mismatches, opening gaps and extending gaps.
+..include:seqan/score.h
+*/
+template <typename TValue>
+class Score<TValue, Simple> {
+public:
+    // The score for a match.
+    TValue data_match;
+
+    // The score for a mismatch.
+    TValue data_mismatch;
+
+    // The gap extension score.
+    TValue data_gap_extend;
+
+    // The gap open score.
+    TValue data_gap_open;
+
+    Score()
+        : data_match(0), data_mismatch(-1), data_gap_extend(-1),
+          data_gap_open(-1) {
+        SEQAN_CHECKPOINT;
+    }
+
+    Score(TValue _match, TValue _mismatch, TValue _gap)
+        : data_match(_match), data_mismatch(_mismatch),
+          data_gap_extend(_gap), data_gap_open(_gap) {
+        SEQAN_CHECKPOINT;
+    }
+
+/**
+.Memfunc.Score#Score:
+..class:Class.Score
+..summary:Constructor
+..signature:Score<TValue, Simple>()
+..signature:Score<TValue, Simple>(score)
+..signature:Score<TValue, Simple>(match, mismatch, gap [, gap_open])
+..param.score:Other Score object. (copy constructor)
+..param.match:TValue object.
+...default:0
+..param.mismatch:TValue object.
+...default:-1
+..param.gap:TValue object.
+...remarks:The score for a single blank in a gap (linear gap costs).
+...default:-1
+..param.gap_open:TValue object.
+...remarks:The score for the first blank in a gap (affine gap costs).
+...default:$gap$
+..remarks:
+...text:If both gap and gap_open are specified, the total score of a length $n$ gap is $gap_open (n-1)*gap$.
+...note:Usually $mismatch$, $gap$, and $gap_open$ are negative values.
+ */
+    Score(TValue _match, TValue _mismatch, TValue _gap_extend, TValue _gap_open)
+        : data_match(_match), data_mismatch(_mismatch),
+          data_gap_extend(_gap_extend), data_gap_open(_gap_open) {
+        SEQAN_CHECKPOINT;
+    }
+};
+
+
+/**
+.Shortcut.SimpleScore:
+..cat:Scoring
+..summary:Simple scoring scheme.
+..signature:SimpleScore
+..shortcutfor:Spec.Simple Score
+...signature:Score<int, Simple>
+..see:Spec.Simple Score
+*/
+typedef Score<int, Simple> SimpleScore;
+
+
+/**
+.Function.scoreMatch:
+..class:Class.Score
+..cat:Alignments
+..summary:Match score.
+..signature:scoreMatch(object)
+..param.object.type:Spec.Simple Score
+..returns:Match score.
+..see:Function.scoreMismatch
+..see:Function.scoreGapExtend
+..see:Function.scoreGapOpen
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec>
+inline TValue
+scoreMatch(Score<TValue, TSpec> const & me) {
+    SEQAN_CHECKPOINT;
+    return me.data_match;
+}
+
+/**
+.Function.setScoreMatch:
+..class:Class.Score
+..cat:Alignments
+..summary:Set match score.
+..signature:setScoreMatch(object, value)
+..param.object.type:Spec.Simple Score
+..param.value.type:nolink:TValue
+..see:Function.scoreMismatch
+..see:Function.scoreGapExtend
+..see:Function.scoreGapOpen
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec>
+inline void
+setScoreMatch(Score<TValue, TSpec> & me, TValue const & value) {
+    SEQAN_CHECKPOINT;
+    me.data_match = value;
+}
+
+/**
+.Function.scoreMismatch:
+..class:Class.Score
+..cat:Alignments
+..summary:Mismatch score.
+..signature:scoreMismatch(object)
+..param.object.type:Spec.Simple Score
+..returns:Mismatch score.
+...note:Usually, mismatches have negative scores.
+..see:Function.scoreMatch
+..see:Function.scoreGapExtend
+..see:Function.scoreGapOpen
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec>
+inline TValue
+scoreMismatch(Score<TValue, TSpec> const & me) {
+    SEQAN_CHECKPOINT;
+    return me.data_mismatch;
+}
+
+
+/**
+.Function.setScoreMismatch:
+..class:Class.Score
+..cat:Alignments
+..summary:Set mismatch score.
+..signature:setScoreMismatch(object, value)
+..param.object.type:Spec.Simple Score
+..param.value.type:nolink:TValue
+..see:Function.scoreMismatch
+..see:Function.scoreGapExtend
+..see:Function.scoreGapOpen
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec>
+inline void
+setScoreMismatch(Score<TValue, TSpec> & me, TValue const & value) {
+    SEQAN_CHECKPOINT;
+    me.data_mismatch = value;
+}
+
+
+/**
+.Function.scoreGapExtend:
+..class:Class.Score
+..cat:Alignments
+..summary:Score for extending gaps.
+..signature:scoreGapExtend(object)
+..param.object.type:Spec.Simple Score
+..returns:Score for extending gaps.
+...note:Usually, gaps have negative scores.
+..see:Function.scoreMismatch
+..see:Function.scoreMatch
+..see:Function.scoreGapOpen
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec>
+inline TValue
+scoreGapExtend(Score<TValue, TSpec> const & me) {
+    SEQAN_CHECKPOINT;
+    return me.data_gap_extend;
+}
+
+
+/**
+.Function.setScoreGapExtend:
+..class:Class.Score
+..cat:Alignments
+..summary:Set gap extension score.
+..signature:setScoreGapExtend(object, value)
+..param.object.type:Spec.Simple Score
+..param.value.type:nolink:TValue
+..see:Function.scoreMismatch
+..see:Function.scoreGapExtend
+..see:Function.scoreGapOpen
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec>
+inline void
+setScoreGapExtend(Score<TValue, TSpec> & me, TValue const & value) {
+    SEQAN_CHECKPOINT;
+    me.data_gap_extend = value;
+}
+
+
+/**
+.Function.scoreGapOpen:
+..class:Class.Score
+..cat:Alignments
+..summary:Score for opening a gap.
+..signature:scoreGapOpen(object)
+..param.object.type:Spec.Simple Score
+..returns:Score for opening a gap.
+...note:Usually, gaps have negative scores.
+..see:Function.scoreMismatch
+..see:Function.scoreGapExtend
+..see:Function.scoreMatch
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec>
+inline TValue
+scoreGapOpen(Score<TValue, TSpec> const & me) {
+    SEQAN_CHECKPOINT;
+    return me.data_gap_open;
+}
+
+
+/**
+.Function.setScoreGapOpen:
+..class:Class.Score
+..cat:Alignments
+..summary:Set gap opening score.
+..signature:setScoreGapOpen(object, value)
+..param.object.type:Spec.Simple Score
+..param.value.type:nolink:TValue
+..see:Function.scoreMismatch
+..see:Function.scoreGapExtend
+..see:Function.scoreGapOpen
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec>
+inline void
+setScoreGapOpen(Score<TValue, TSpec> & me, TValue const & value) {
+    SEQAN_CHECKPOINT;
+    me.data_gap_open = value;
+}
+
+
+/**
+.Function.scoreGap:
+..class:Class.Score
+..cat:Alignments
+..summary:Score for gaps.
+..signature:scoreGapExtend(object)
+..param.object.type:Spec.Simple Score
+..returns:Score for extending gaps.
+...note:Usually, gaps have negative scores.
+..remarks:This score is used for linear gap costs. For affine gap costs use @Function.scoreGapExtend@ and @Function.scoreGapOpen@ instead.
+..see:Function.scoreMismatch
+..see:Function.scoreMatch
+..see:Function.scoreGapOpen
+..see:Function.scoreGapExtend
+..include:seqan/score.h
+*/
+// TODO(holtgrew): This shortcut/forward should live in score_base.h.
+template <typename TValue, typename TSpec>
+inline TValue
+scoreGap(Score<TValue, TSpec> const & me) {
+    SEQAN_CHECKPOINT;
+    return scoreGapExtend(me);
+}
+
+
+/**
+.Function.setScoreGap:
+..class:Class.Score
+..cat:Alignments
+..summary:Set gap opening and extension score.
+..signature:setScoreGap(object, value)
+..param.object.type:Spec.Simple Score
+..param.value.type:nolink:TValue
+..see:Function.scoreMismatch
+..see:Function.scoreGapExtend
+..see:Function.scoreGapOpen
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec>
+inline void
+setScoreGap(Score<TValue, TSpec> & me, TValue const & value) {
+    SEQAN_CHECKPOINT;
+    me.data_gap_open = value;
+    me.data_gap_extend = value;
+}
+
+
+/**
+.Function.score:
+..cat:Scoring
+..class:Class.Score
+..signature:score(score, value1, value2) [deprecated]
+..param.score:A scoring scheme.
+...type:Class.Score
+..param.value1:Aligned character in the first sequence.
+..param.value2:Aligned character in the second sequence.
+..status:The version that explicitely requires two characters is deprecated. For using (or defining) custom scoring schemes better use the functions
+ at Function.score@, @Function.scoreGapOpenVertical@, @Function.scoreGapExtendVertical@, @Function.scoreGapOpenHorizontal@ and @Function.scoreGapExtendHorizontal@ 
+as they require character positions and sequences and allow for position-dependent scoring schemes.
+..include:seqan/score.h
+*/
+template <typename TValue, typename TSpec, typename TVal1, typename TVal2>
+inline TValue
+score(Score<TValue, TSpec> const & me, TVal1 left, TVal2 right) {
+    SEQAN_CHECKPOINT;
+    if (left == right)
+        return scoreMatch(me);
+    else
+        return scoreMismatch(me);
+}
+
+}  // namespace SEQAN_NAMESPACE_MAIN
+
+#endif  // SEQAN_SCORE_SCORE_SIMPLE_H_
diff --git a/src/SeqAn-1.3/seqan/seeds.h b/src/SeqAn-1.3/seqan/seeds.h
new file mode 100644
index 0000000..eeb5e4e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds.h
@@ -0,0 +1,64 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEEDS_H
+#define SEQAN_HEADER_SEEDS_H
+
+#include <seqan/sequence.h>
+#include <seqan/index.h>
+#include <seqan/score.h>
+#include <seqan/align.h>
+#include <seqan/map.h>
+#include <seqan/modifier.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+//#include <seqan/score/score_generated_forwards.h>
+#endif
+
+#include <seqan/seeds/propertyMap.h>
+#include <seqan/seeds/memoryManager_base.h>
+#include <seqan/seeds/memoryManager_int.h>
+#include <seqan/seeds/seed_base.h>
+#include <seqan/seeds/seed_multi.h>
+#include <seqan/seeds/seedHandlingTags.h>
+#include <seqan/seeds/seedSet_base.h>
+#include <seqan/seeds/seedSet_iterator.h>
+#include <seqan/seeds/seedSet_score.h>
+#include <seqan/seeds/banded_align.h>
+#include <seqan/seeds/global_seed_chain.h>
+#include <seqan/seeds/banded_chain_align_affine.h>
+#include <seqan/seeds/banded_chain_align.h>
+
+#include <seqan/chaining.h>
+
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/seeds/banded_align.h b/src/SeqAn-1.3/seqan/seeds/banded_align.h
new file mode 100644
index 0000000..d72867d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/banded_align.h
@@ -0,0 +1,711 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BANDED_ALIGN_H
+#define SEQAN_HEADER_BANDED_ALIGN_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+//needleman wunsch alignment
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TSpecSeed>
+TScoreValue
+_bandedNeedlemanWunsch(Matrix<TScoreValue, DIMENSION> & matrix_,
+						 Seed<TValue, TSpecSeed> const &seed,
+						 TValue k,
+						 TString const & str1_,
+						 TString const & str2_,
+						 Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, Standard>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TAlphabet;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+	TSize height = leftDiagonal(seed) - rightDiagonal(seed)+1;
+	TSize str1_length = height+2*k;
+	TSize str2_length = length(str2_);
+
+	TStringIterator x_begin = begin(str1_);
+	TStringIterator x_end = end(str1_) -1;
+	TStringIterator y_begin = begin(str2_);
+	--y_begin;
+	TStringIterator y_end = end(str2_)-1;
+	
+	TValue up_height = leftDiagonal(seed) - startDiagonal(seed) + k; //equals length of empty lower triangle
+	//TValue up_width = str1_length - up_height;
+	TValue down_height = endDiagonal(seed) - rightDiagonal(seed) + k; //equals length of empty lower triangle
+	TValue down_width = str1_length - down_height;
+	TSize length_right_diag = str2_length - down_height;
+	TSize length_left_diag = str2_length - up_height;
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap = scoreGapExtend(score_);
+
+	TScoreValue horizontalValue = 0;
+	TScoreValue border_ = score_gap;
+	TScoreValue verticalValue = border_;
+
+	setDimension(matrix_, 2);
+	setLength(matrix_, 0, str1_length + 2);
+	setLength(matrix_, 1, str2_length + 1);
+	resize(matrix_);
+	
+	TMatrixIterator col_ = begin(matrix_);
+	TMatrixIterator finger1;
+	TMatrixIterator finger2;
+	TMatrixIterator finger3;
+
+	TStringIterator x = x_begin;
+	TStringIterator y = y_begin;
+
+	//-------------------------------------------------------------------------
+	// init
+
+	TValue inf = -100000;
+	finger2 = col_;
+
+	setPosition(finger2, length(matrix_, 0)-1);
+	for (unsigned int i = 1; i != length_right_diag; ++i){
+		*finger2 = inf;
+		goNext(finger2, 1);
+	}
+
+	border_ = down_height * score_gap;
+
+	*finger2 = inf;
+	for (int i = -1; i != down_height; ++i){
+		goPrevious(finger2, 0);
+		goNext(finger2,1);
+		*finger2 = border_;
+		border_ -= score_gap;
+	}
+		
+	border_ = score_gap;
+	finger3 = finger2;
+
+	for (int i = 0; i != down_width; ++i){
+		goPrevious(finger2, 0);
+		*finger2 = border_;
+		border_ += score_gap;
+	}
+
+	*finger2 = inf;
+	TScoreValue tmp;
+	//-------------------------------------------------------------------------
+	//first section
+	
+	y=y_end;
+	TSize run_length = down_width;
+	TSize measure = 0;
+
+	for (int i = -1; i != down_height; ++i){	
+		verticalValue = *finger3;
+		finger1 = finger3;
+		goPrevious(finger1,0);
+		goPrevious(finger3,1);
+		finger2 = finger3;
+		goNext(finger3,0);
+		horizontalValue = *finger3;
+		x = x_end;
+		for (unsigned int j = 0; j != run_length; ++j){
+			if (*x==*y){
+				*finger2 = verticalValue + score_match;
+			} else {
+				tmp = *finger1;
+				TScoreValue s1 = verticalValue + score_mismatch;
+				TScoreValue s2 = score_gap + ((horizontalValue > tmp) ? horizontalValue : tmp);
+				*finger2 = (s1 > s2) ? s1 : s2;
+			}
+			horizontalValue = *finger2;
+			goPrevious(finger2);
+			verticalValue = *finger1;
+			goPrevious(finger1);
+			--x;
+		}
+		*finger2 = inf;
+		++measure;
+		if (measure < length_left_diag)
+			++run_length;
+		--y;
+	}
+	--run_length;
+
+	goPrevious(finger3);
+
+	while (y!= y_begin)
+	{	
+		verticalValue = *finger3;
+		finger1 = finger3;
+		goPrevious(finger1,0);
+		goPrevious(finger3,1);
+		finger2 = finger3;
+		x = --x_end;
+		horizontalValue = inf;
+		for (unsigned int j = 0; j != run_length; ++j){
+			if (*x==*y){
+				*finger2 = verticalValue + score_match;
+			} else {
+				tmp = *finger1;
+				TScoreValue s1 = verticalValue + score_mismatch;
+				TScoreValue s2 = score_gap + ((horizontalValue > tmp) ? horizontalValue : tmp);
+				*finger2 = (s1 > s2) ? s1 : s2;
+			}
+			horizontalValue = *finger2;
+			goPrevious(finger2);
+			verticalValue = *finger1;
+			goPrevious(finger1);
+			--x;
+		}
+		*finger2 = inf;
+		++measure;
+		if (measure >= length_left_diag)
+			--run_length;
+		--y;
+	}
+	return *(++finger2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//traceback through needleman wunsch matrix
+
+
+//Position berechnen!
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION>
+void
+_bandedNeedlemanWunschTrace(Align<TTargetSource, TTargetSpec> & target_,
+						Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_,
+						Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+
+	typedef Iter<Matrix<TScoreValue, DIMENSION>, PositionIterator > TMatrixIterator;
+    typedef typename Infix<TTargetSource>::Type TTargetSourceSegment;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+	TTargetIterator target_0 = iter(row(target_, 0), 0);
+	TTargetIterator target_1 = iter(row(target_, 1), 0);
+
+	typedef typename Iterator<TTargetSourceSegment, Standard>::Type TStringIterator;
+	TStringIterator it_0 = begin(str_0);
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = begin(str_1);
+	TStringIterator it_1_end = end(str_1);
+
+	TScoreValue score_diff = scoreMismatch(score_) - scoreGapExtend(score_);
+
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		bool gv;
+		bool gh;
+		if (*it_0 == *it_1)
+		{
+			gv = gh = true;
+		}
+		else
+		{
+			TMatrixIterator it_ = source_;
+
+			goNext(it_, 0);
+			TScoreValue h = *it_;
+
+			it_ = source_;
+			goNext(it_, 1);
+			TScoreValue d = *it_;
+		
+			goPrevious(it_, 0);
+			TScoreValue v = *it_;
+			
+			gv = (v >= h) | (d + score_diff >= h);
+			gh = (h >  v) | (d + score_diff >= v);
+		}
+		if (gv){
+			++it_1;
+			goNext(source_, 1);
+			goPrevious(source_, 0);
+		}else{
+			insertGap(target_1);
+		}
+
+		if (gh) {
+			++it_0;
+			goNext(source_, 0);
+		}else{
+			insertGap(target_0);
+		}
+		++target_0;
+		++target_1;
+	}
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Gotoh
+//Banded alignment with affine gap costs
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TSpecSeed>
+TScoreValue
+_bandedGotoh(Matrix<TScoreValue, DIMENSION> & diag_matrix_,
+	   Matrix<TScoreValue, DIMENSION> & vert_matrix_,
+	   Matrix<TScoreValue, DIMENSION> & hori_matrix_,
+	   Seed<TValue, TSpecSeed> const &seed,
+	   TValue k,
+	   TString const & str1_,
+	   TString const & str2_,
+	   Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+
+
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, Rooted>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TAlphabet;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+
+	TSize height = leftDiagonal(seed) - rightDiagonal(seed)+1;
+	TSize str1_length = height+2*k;
+	TSize str2_length = length(str2_);
+
+	TValue up_height = leftDiagonal(seed) - startDiagonal(seed) + k; //equals length of empty lower triangle
+	//TValue up_width = str1_length - up_height;
+	TValue down_height = endDiagonal(seed) - rightDiagonal(seed) + k; //equals length of empty lower triangle
+	TValue down_width = str1_length - down_height;
+	TValue length_right_diag = str2_length - down_height;
+	TValue length_left_diag = str2_length - up_height;
+
+
+	TStringIterator x_begin = begin(str1_) - 1;
+	TStringIterator x_end = end(str1_) - 1;
+	TStringIterator y_begin = begin(str2_) - 1;
+	TStringIterator y_end = end(str2_) - 1;
+
+	TStringIterator x = x_end;
+	TStringIterator y;
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap_open = scoreGapOpen(score_);
+	TScoreValue score_gap_extend = scoreGapExtend(score_);
+
+	//TScoreValue v;
+
+	setDimension(diag_matrix_, 2);
+	setLength(diag_matrix_, 0, str1_length + 2);
+	setLength(diag_matrix_, 1, str2_length + 1);
+	resize(diag_matrix_);
+	setDimension(vert_matrix_, 2);
+	setLength(vert_matrix_, 0, str1_length + 2);
+	setLength(vert_matrix_, 1, str2_length + 1);
+	resize(vert_matrix_);
+	setDimension(hori_matrix_, 2);
+	setLength(hori_matrix_, 0, str1_length + 2);
+	setLength(hori_matrix_, 1, str2_length + 1);
+	resize(hori_matrix_);
+
+	TSize pos = length(diag_matrix_, 0)-1;
+	TMatrixIterator diag_col_ = begin(diag_matrix_);
+	TMatrixIterator diag_finger1(diag_matrix_,pos);
+	TMatrixIterator diag_finger2;
+	TMatrixIterator diag_finger3;
+
+	TMatrixIterator vert_col_ = begin(vert_matrix_);
+	TMatrixIterator vert_finger1(vert_matrix_,pos);
+	TMatrixIterator vert_finger2;
+	TMatrixIterator vert_finger3;
+	TMatrixIterator hori_col_ = begin(hori_matrix_);
+	TMatrixIterator hori_finger1(hori_matrix_,pos);
+	TMatrixIterator hori_finger2;
+	TMatrixIterator hori_finger3;
+
+	
+	//-------------------------------------------------------------------------
+	// init
+	
+	TScoreValue inf = -1000000;
+	for (int i = 1; i != length_right_diag; ++i){
+		*diag_finger1 = inf;
+		*hori_finger1 = inf;
+		*vert_finger1 = inf;
+		goNext(diag_finger1, 1);
+		goNext(hori_finger1, 1);
+		goNext(vert_finger1, 1);
+	}
+
+	*diag_finger1 = inf;
+	*hori_finger1 = inf;
+	*vert_finger1 = inf;
+
+	TScoreValue border_ = score_gap_open + (down_height-1) * score_gap_extend;
+
+	for (int i = -1; i != down_height; ++i){
+		goPrevious(diag_finger1, 0);
+		goNext(diag_finger1,1);
+		goPrevious(vert_finger1, 0);
+		goNext(vert_finger1,1);
+		goPrevious(hori_finger1, 0);
+		goNext(hori_finger1,1);
+		*diag_finger1 = border_;
+		*vert_finger1 = border_;
+		*hori_finger1 = inf;
+		border_ -= score_gap_extend;
+	}
+
+	*diag_finger1 = 0;
+	*vert_finger1 = inf;
+	*hori_finger1 = inf;
+	
+	diag_finger3 = diag_finger1;
+	hori_finger3 = hori_finger1;
+	vert_finger3 = vert_finger1;
+
+	for (int i = 0; i < down_width; ++i){
+		goPrevious(diag_finger1, 0);
+		goPrevious(hori_finger1, 0);
+		goPrevious(vert_finger1, 0);
+		border_ += score_gap_extend;
+		*diag_finger1 = border_;
+		*hori_finger1 = border_;
+		*vert_finger1 = inf;
+	}
+
+	*diag_finger1 = inf;
+	*hori_finger1 = inf;
+	
+	//-------------------------------------------------------------------------
+	//first section
+	TScoreValue hori_value, vert_value, diag_value, tmp_diag, tmp_vert, diag_front, diag_match, diag_back;
+	y=y_end;
+	TSize run_length = down_width;
+	TSize measure = 0;
+
+	for (int i = -1; i != down_height; ++i){	
+		goPrevious(hori_finger3,1);
+		hori_finger1 = hori_finger3;
+		goNext(hori_finger3);
+		hori_value = *hori_finger3;
+
+		vert_finger2 = vert_finger3;
+		goPrevious(vert_finger2);
+		goPrevious(vert_finger3,1);
+		vert_finger1 = vert_finger3;
+		goNext(vert_finger3);
+
+		diag_finger2 = diag_finger3;
+		diag_match=*diag_finger2;
+		goPrevious(diag_finger2);
+		goPrevious(diag_finger3,1);
+		diag_finger1 = diag_finger3;
+		goNext(diag_finger3);
+		diag_back=*diag_finger3;
+
+		x = x_end;
+		for (unsigned int j = 0; j != run_length; ++j){
+			diag_front= *diag_finger2;
+			hori_value = (hori_value+score_gap_extend > diag_back+score_gap_open) ? hori_value+score_gap_extend : diag_back+score_gap_open;
+			*hori_finger1 = hori_value;
+			goPrevious(hori_finger1);
+
+			tmp_vert = *vert_finger2;
+			vert_value = (tmp_vert+score_gap_extend > diag_front+score_gap_open) ? tmp_vert+score_gap_extend : diag_front+score_gap_open;
+			*vert_finger1 = vert_value;
+			goPrevious(vert_finger1);
+			goPrevious(vert_finger2);
+
+			
+			tmp_diag = (vert_value > hori_value) ? vert_value  : hori_value;
+			diag_value = diag_match + ((*x == *y) ? score_match : score_mismatch);
+			if (diag_value < tmp_diag)
+				diag_value = tmp_diag;
+			diag_back = diag_value;
+			*diag_finger1 = diag_value;
+			goPrevious(diag_finger1);
+			diag_match = *diag_finger2;
+			goPrevious(diag_finger2);
+			--x;
+		}
+		*diag_finger1 = inf;
+		*vert_finger1 = inf;
+		++measure;
+		if (static_cast<TValue>(measure) < length_left_diag)
+			++run_length;
+		--y;
+	}
+	--run_length;
+
+	while(y!= y_begin)//for (int i = 0; i != main; ++i){
+	{
+		goPrevious(diag_finger3);
+		goPrevious(hori_finger3);
+		goPrevious(vert_finger3);
+
+		goPrevious(hori_finger3,1);
+		hori_finger1 = hori_finger3;
+		goNext(hori_finger3);
+		hori_value = inf;
+
+		vert_finger2 = vert_finger3;
+		goPrevious(vert_finger2);
+		goPrevious(vert_finger3,1);
+		vert_finger1 = vert_finger3;
+		goNext(vert_finger3);
+
+		diag_finger2 = diag_finger3;
+		diag_match=*diag_finger2;
+		goPrevious(diag_finger2);
+		goPrevious(diag_finger3,1);
+		diag_finger1 = diag_finger3;
+		goNext(diag_finger3);
+		diag_back= inf;
+		x = --x_end;
+		for (unsigned int j = 0; j != run_length; ++j){
+			diag_front= *diag_finger2;
+			hori_value = (hori_value+score_gap_extend > diag_back+score_gap_open) ? hori_value+score_gap_extend : diag_back+score_gap_open;
+			*hori_finger1 = hori_value;
+			goPrevious(hori_finger1);
+
+			tmp_vert = *vert_finger2;
+			vert_value = (tmp_vert+score_gap_extend > diag_front+score_gap_open) ? tmp_vert+score_gap_extend : diag_front+score_gap_open;
+			*vert_finger1 = vert_value;
+			goPrevious(vert_finger1);
+			goPrevious(vert_finger2);
+
+			tmp_diag = (vert_value > hori_value) ? vert_value  : hori_value;
+			diag_value = diag_match + ((*x == *y) ? score_match : score_mismatch);
+			if (diag_value < tmp_diag)
+				diag_value = tmp_diag;
+			diag_back = diag_value;
+			*diag_finger1 = diag_value;
+			goPrevious(diag_finger1);
+			diag_match = *diag_finger2;
+			goPrevious(diag_finger2);
+			--x;
+		}
+		*vert_finger1 = inf;
+		*diag_finger1 = inf;
+		++measure;
+		if (static_cast<TValue>(measure) >= length_left_diag)
+			--run_length;
+		--y;
+	}
+	--run_length;
+	++diag_finger1;
+
+	return *diag_finger1;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//gotoh trace
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION, typename TValue>
+void
+_bandedGotohTrace(Align<TTargetSource, TTargetSpec> & target_,
+					Matrix<TScoreValue, DIMENSION> & diag_matrix_,
+					Matrix<TScoreValue, DIMENSION> & vert_matrix_,
+					Matrix<TScoreValue, DIMENSION> & hori_matrix_,
+					TValue position_)
+{
+SEQAN_CHECKPOINT
+	typedef typename Position<Matrix<TScoreValue, DIMENSION> >::Type TPosition;
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+    typedef typename Infix<TTargetSource>::Type TTargetSourceSegment;
+	typedef typename Iterator<TTargetSource, Standard>::Type TStringIterator;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+	typename Size<TTargetSourceSegment>::Type dim_0_len = length(hori_matrix_,0);
+
+	TPosition pos = position_;
+
+	TTargetIterator target_0 = iter(row(target_, 0), 0, Standard());
+	TTargetIterator target_1 = iter(row(target_, 1), 0, Standard());
+
+	TStringIterator it_0 = iter(str_0, 0, Standard());
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = iter(str_1, 0, Standard());
+	TStringIterator it_1_end = end(str_1);
+	
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		if (getValue(diag_matrix_,pos) > getValue(hori_matrix_,pos))
+		{
+			if (getValue(diag_matrix_,pos) > getValue(vert_matrix_,pos))
+			{
+				++it_0;
+				++it_1;
+				pos += dim_0_len;
+			} else{
+				++it_1;
+				insertGap(target_0);
+				pos += dim_0_len-1;
+			}
+		}
+		else
+		{
+			if (getValue(hori_matrix_,pos) > getValue(vert_matrix_,pos)) 
+			{					
+				++it_0;
+				insertGap(target_1);
+				++pos;
+			} 
+			else
+			{
+				++it_1;
+				insertGap(target_0);
+				pos += dim_0_len-1;
+			}
+		}
+		++target_0;
+		++target_1;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//needleman wunsch alignment
+
+
+template <typename TSource, typename TSpec, typename TScoreValue, typename TValue, typename TSpecSeed>
+TScoreValue
+bandedAlignment(Align<TSource, TSpec> & align_,
+				Seed<TValue, TSpecSeed> const & seed,
+				TValue k,
+				Score<TScoreValue, Simple> const & score_,
+				NeedlemanWunsch)
+{
+SEQAN_CHECKPOINT
+
+	clearGaps(row(align_,0));
+	clearGaps(row(align_,1));
+
+	TScoreValue ret;
+	Matrix<TScoreValue> matr;
+	ret = _bandedNeedlemanWunsch(matr, seed, k, sourceSegment(row(align_, 0)), sourceSegment(row(align_, 1)), score_);
+	Iter< Matrix<TScoreValue>, PositionIterator > iter_ = begin(matr);
+	setPosition(iter_, 1+k + leftDiagonal(seed) - startDiagonal(seed));
+	_bandedNeedlemanWunschTrace(align_, iter_, score_);
+	return ret;
+}
+
+template <typename TSource, typename TSpec, typename TScoreValue, typename TValue, typename TSpecSeed>
+TScoreValue
+bandedAlignment(Align<TSource, TSpec> & align_,
+				Seed<TValue, TSpecSeed> const & seed,
+				TValue k,
+				Score<TScoreValue, Simple> const & score_,
+				Gotoh)
+{
+SEQAN_CHECKPOINT
+	clearGaps(row(align_,0));
+	clearGaps(row(align_,1));
+
+	TScoreValue ret;
+
+	Matrix<TScoreValue> d_matr;
+	Matrix<TScoreValue> v_matr;
+	Matrix<TScoreValue> h_matr;
+	ret = _bandedGotoh(d_matr, v_matr, h_matr, seed, k, sourceSegment(row(align_, 0)), sourceSegment(row(align_, 1)), score_);
+	_bandedGotohTrace(align_, d_matr, v_matr, h_matr, 1+k + leftDiagonal(seed) - startDiagonal(seed));	
+	return ret;
+}
+
+
+/**
+.Function.bandedAlignment:
+..summary:Calculates a banded alignment around a Seed.
+..cat:Seed Handling
+..signature:bandedAlignmnet(align, seed, k, score)
+..param.align:An alignment dataStructure containing two sequences (sections). The sequence (parts) must be equal to the part which is covered by the seed.
+...type:Class.Align
+..param.seed: The seed for wich the banded alignmnent shall be constructed.
+...type:Class.Seed
+..param.k: A value describing the additional extension of the diagonal band.
+..param.score: The score matrix used.
+...type:Spec.Simple Score
+..returns:The score of the optimal banded alignment given in align.
+..remarks:Use the function @Function.globalAlignment@ with the tag $BandedNeedlemanWunsch$ or $BandedGotoh$ for more general banded alignment without a seed.
+..see:Function.globalAlignment
+..see:Tag.Global Alignment Algorithms
+..include:seqan/seeds.h
+*/
+template <typename TSource, typename TSpec, typename TScoreValue, typename TValue, typename TSpecSeed>
+TScoreValue
+bandedAlignment(Align<TSource, TSpec> & align_,
+				Seed<TValue, TSpecSeed> const & seed,
+				TValue k,
+				Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+
+	if(scoreGapOpen(score_)==scoreGapExtend(score_))
+	{//linear gap costs
+		return bandedAlignment(align_, seed, k, score_, NeedlemanWunsch());
+	}
+	else
+	{//affine gap costs
+		return bandedAlignment(align_, seed, k, score_, Gotoh());
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
+
diff --git a/src/SeqAn-1.3/seqan/seeds/banded_chain_align.h b/src/SeqAn-1.3/seqan/seeds/banded_chain_align.h
new file mode 100644
index 0000000..b3ee014
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/banded_chain_align.h
@@ -0,0 +1,1310 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BANDED_CHAIN_ALIGN_H
+#define SEQAN_HEADER_BANDED_CHAIN_ALIGN_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Function.bandedChainAlignment:
+..summary: Calculates a banded alignment around a chain of seeds. 
+..cat:Seed Handling
+..signature:bandedChainAlignment(seedChain, k, alignment, scoreMatrix);
+..param.seedChain:A chain of seeds.
+..param.k:Half of the width of the band.
+..param.alignment:The alignment where the result is stored.
+...type:Class.Align
+..param.scoreMatrix: The score matrix.
+...type:Spec.Simple Score
+...remarks: Depending on the score matrix the Needleman-Wunsch or the Gotoh algorithm is used. For a description of the algorithm see the masters thesis of C. Kemena, Section 5.3.3 LAGAN Alignment.
+..returns: The score of the alignment.
+..include:seqan/seeds.h
+*/
+
+template<typename TContainer, typename TValue, typename TScore, typename TAlign>
+TScore
+bandedChainAlignment(TContainer const &seedChain, 
+					 TValue k,
+					 TAlign &whole_alignment, 
+					 Score< TScore, Simple> const &scoreMatrix)
+{
+
+	//teste die Reihenfolge der seeds und erstelle gegebenenfalls eine die rueckwaerts laeuft
+	typedef typename Iterator<const TContainer, Standard>::Type TIterator;	//Iterator for the seed chain
+	TIterator it = begin(seedChain, Standard());
+	if (it != end(seedChain, Standard()))
+	{
+		TIterator it2 = it; ++it2;
+		if (it2 != end(seedChain, Standard()))
+		{
+			if (leftDim0(*it) < leftDim0(*it2))
+			{
+				TContainer copyChain(seedChain);
+				reverse(copyChain);
+
+				if(scoreGapOpen(scoreMatrix)==scoreGapExtend(scoreMatrix))
+					return _chainToAlignmentNeedlemanWunsch(copyChain, k, whole_alignment, scoreMatrix);
+				else
+					return _chainToAlignmentGotoh(copyChain, k, whole_alignment, scoreMatrix);
+			}
+		}
+	}
+
+	if(scoreGapOpen(scoreMatrix)==scoreGapExtend(scoreMatrix))
+		return _chainToAlignmentNeedlemanWunsch(seedChain, k, whole_alignment, scoreMatrix);
+	else
+		return _chainToAlignmentGotoh(seedChain, k, whole_alignment, scoreMatrix);
+}
+
+template<typename TContainer, typename TValue, typename TScore, typename TAlign>
+TScore
+_chainToAlignmentNeedlemanWunsch(TContainer const &seedChain, 
+						TValue k,
+						TAlign & whole_alignment, 
+						Score< TScore, Simple> const &scoreMatrix)
+{
+    typedef typename Infix<typename Source<TAlign>::Type>::Type TString;    //Sequence in an align object
+	typedef typename Size<TString>::Type TSize;								//Size of the string
+	typedef typename Iterator<const TContainer, Standard>::Type TIterator;	//Iterator for the seed chain
+	typedef typename Value<TContainer>::Type TSeed;							//Type of Seed
+	typedef typename Value<TSeed>::Type TPosition;
+	typedef String<TScore> TScoreString;
+	typedef Matrix<TScore> TMatrix;
+	typedef Iter<TMatrix, PositionIterator > TMatrixIterator;
+	typedef ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > TAlignVector;
+	typedef typename ::std::map<TValue, Pair<TValue, TAlign> >::iterator TMapIterator;
+	
+	TScoreString score_str;
+	TAlignVector alignmentVector;
+
+	TString seq1 = sourceSegment(row(whole_alignment,0));
+	TString seq2 = sourceSegment(row(whole_alignment,1));
+    TString *p_seq1 = &seq1;
+	TString *p_seq2 = &seq2;
+	
+	TValue score_length = 0;
+	TMatrix matrix_;
+	TIterator it = begin(seedChain, Standard());
+
+	//calculation begins at the end
+	//rectangle between last seed and end
+	TValue k_begin = k;
+	TValue k_end = k;
+	if ((length(*it) <= k) ||((rightDim1(*it)-leftDim1(*it)) <=k))
+ 		k_end = length(*it) -1;
+
+	_calculateLastRectangle(*it, k_end, matrix_, p_seq1, p_seq2, score_str, score_length, alignmentVector, scoreMatrix);
+	_calculateBandedSeed(*it, k_end, matrix_, p_seq1, p_seq2, score_str, score_length, alignmentVector, scoreMatrix);
+
+	TIterator it_begin = end(seedChain, Standard());
+	TIterator it2 = it;
+	++it2;
+	while (it2 != it_begin)
+	{
+		k_begin = k_end;
+		if ((length(*it2) <= k) || ((rightDim1(*it2)-leftDim1(*it2)) <=k))
+			k_end = length(*it2) -2;
+		else 
+			k_end = k;
+		
+		_calculateRectangle(*it, *it2, k_begin, k_end, matrix_, p_seq1, p_seq2, score_str, score_length, alignmentVector, scoreMatrix);	
+		_calculateBandedSeed(*it2, k_end, matrix_, p_seq1, p_seq2, score_str, score_length, alignmentVector, scoreMatrix);
+		++it;
+		++it2;
+	}
+	_calculateFirstRectangle(*it, k_end, matrix_, p_seq1, p_seq2, score_str, score_length, alignmentVector, scoreMatrix);
+
+	_constructAlignment(alignmentVector, whole_alignment);
+	return score_str[0];
+}
+
+//"Glues" single alignments together
+template<typename TValue, typename TAlign, typename TAlign2>
+void
+_constructAlignment(::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > >const &me,
+					TAlign2 &wholeAlignment)
+{
+	typedef typename ::std::map<TValue,Pair<TValue, TAlign> >::const_iterator TIterator;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+	typedef typename Row<TAlign2>::Type TRow2;
+	typedef typename Iterator<TRow2, Standard>::Type TTargetIterator2;
+
+	TTargetIterator2 align_it0 = iter(row(wholeAlignment, 0), 0);
+	TTargetIterator2 align_it1 = iter(row(wholeAlignment, 1), 0);
+	//TValue position = 0;
+	int length_ = me.size()-1;
+	TIterator it;
+
+	typedef typename Position<TAlign>::Type TPosition;
+	for (int i = length_; i != -1; --i)
+	{
+		//cout << "LENGHT: " << me[i].size() << endl;
+		it = me[i].begin();//find(position);
+		//position = it->second.i1;
+		TRow tmp_row0 = row(it->second.i2, 0);
+		TRow tmp_row1 = row(it->second.i2, 1);
+		TPosition end_ = endPosition(cols(it->second.i2));
+		unsigned int j = 0;
+		for (TPosition it_ = beginPosition(cols(it->second.i2)); it_ != end_; ++it_)
+		{
+			if(isGap(tmp_row0, j))
+				insertGap(align_it0);
+			if(isGap(tmp_row1, j))
+				insertGap(align_it1);
+			++align_it0;
+			++align_it1;
+			++j;
+		}
+	}
+}
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed>
+TScoreValue
+_bandedNeedlemanWunsch(Matrix<TScoreValue, DIMENSION> & matrix_,
+						 Seed<TValue, TSpecSeed> const &seed,
+						 TValue2 k,
+						 TString const & str1_,
+						 TString const & str2_,
+						 Score<TScoreValue, Simple> const & score_,
+						 String<TScoreValue> init)
+{
+	SEQAN_CHECKPOINT
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, Standard>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TAlphabet;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+	TSize height = leftDiagonal(seed) - rightDiagonal(seed)+1;
+	TSize str1_length = height+2*k;
+	TSize str2_length = length(str2_);
+
+	TStringIterator x_begin = begin(str1_);
+	TStringIterator x_end = end(str1_) -1;
+	TStringIterator y_begin = begin(str2_);
+	--y_begin;
+	TStringIterator y_end = end(str2_)-1;
+	
+	TValue up_height = leftDiagonal(seed) - startDiagonal(seed) + k; //equals length of empty lower triangle
+	//TValue up_width = str1_length - up_height;
+	TValue down_height = endDiagonal(seed) - rightDiagonal(seed) + k; //equals length of empty lower triangle
+	TValue down_width = str1_length - down_height;
+	TSize length_right_diag = str2_length - down_height;
+	TSize length_left_diag = str2_length - up_height;
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap = scoreGapExtend(score_);
+
+	TScoreValue horizontalValue = 0;
+	TScoreValue border_ = score_gap;
+	TScoreValue verticalValue = border_;
+
+	setDimension(matrix_, 2);
+	setLength(matrix_, 0, str1_length + 2);
+	setLength(matrix_, 1, str2_length + 1);
+	resize(matrix_);
+	
+	TMatrixIterator col_ = begin(matrix_, Standard());
+	TMatrixIterator finger1;
+	TMatrixIterator finger2;
+	TMatrixIterator finger3;
+
+	TStringIterator x = x_begin;
+	TStringIterator y = y_begin;
+
+	//-------------------------------------------------------------------------
+	// init
+
+	TValue inf = -1000000;
+	finger2 = col_;
+
+	setPosition(finger2, length(matrix_, 0)-1);
+	for (unsigned int i = 1; i != length_right_diag; ++i){
+		*finger2 = inf;
+		goNext(finger2, 1);
+	}
+
+	TValue pos = -1;
+
+	*finger2 = inf;
+	for (int i = -1; i != down_height; ++i){
+		goPrevious(finger2, 0);
+		goNext(finger2,1);
+		*finger2 = init[++pos];
+	}
+		
+	finger3 = finger2;
+
+	for (int i = 0; i != down_width; ++i){
+		goPrevious(finger2, 0);
+		*finger2 = init[++pos];
+	}
+
+	*finger2 = inf;
+	TScoreValue tmp;
+	//-------------------------------------------------------------------------
+	//first section
+	
+	y=y_end;
+	TSize run_length = down_width;
+	TSize measure = 0;
+
+	for (int i = -1; i != down_height; ++i){	
+		verticalValue = *finger3;
+		finger1 = finger3;
+		goPrevious(finger1,0);
+		goPrevious(finger3,1);
+		finger2 = finger3;
+		goNext(finger3,0);
+		horizontalValue = *finger3;
+		x = x_end;
+		for (unsigned int j = 0; j != run_length; ++j){
+			if (*x==*y){
+				*finger2 = verticalValue + score_match;
+			} else {
+				tmp = *finger1;
+				TScoreValue s1 = verticalValue + score_mismatch;
+				TScoreValue s2 = score_gap + ((horizontalValue > tmp) ? horizontalValue : tmp);
+				*finger2 = (s1 > s2) ? s1 : s2;
+			}
+			horizontalValue = *finger2;
+			goPrevious(finger2);
+			verticalValue = *finger1;
+			goPrevious(finger1);
+			--x;
+		}
+		*finger2 = inf;
+		++measure;
+		if (measure < length_left_diag)
+			++run_length;
+		--y;
+	}
+	--run_length;
+
+	goPrevious(finger3);
+
+	while (y!= y_begin)
+	{	
+		verticalValue = *finger3;
+		finger1 = finger3;
+		goPrevious(finger1,0);
+		goPrevious(finger3,1);
+		finger2 = finger3;
+		x = --x_end;
+		horizontalValue = inf;
+		for (unsigned int j = 0; j != run_length; ++j){
+			if (*x==*y){
+				*finger2 = verticalValue + score_match;
+			} else {
+				tmp = *finger1;
+				TScoreValue s1 = verticalValue + score_mismatch;
+				TScoreValue s2 = score_gap + ((horizontalValue > tmp) ? horizontalValue : tmp);
+				*finger2 = (s1 > s2) ? s1 : s2;
+			}
+			horizontalValue = *finger2;
+			goPrevious(finger2);
+			verticalValue = *finger1;
+			goPrevious(finger1);
+			--x;
+		}
+		*finger2 = inf;
+		++measure;
+		if (measure >= length_left_diag)
+			--run_length;
+		--y;
+	}
+	return *(++finger2);
+
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//traceback through needleman wunsch matrix
+
+
+//Position berechnen!
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION>
+typename Size<Matrix<TScoreValue, DIMENSION> >::Type
+_bandedNeedlemanWunschTrace2(Align<TTargetSource, TTargetSpec> & target_,
+								Matrix<TScoreValue, DIMENSION> & matrix,
+								Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_,
+								Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+	typedef Iter<Matrix<TScoreValue, DIMENSION>, PositionIterator > TMatrixIterator;
+    typedef typename Infix<TTargetSource>::Type TTargetSourceSegment;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+	TTargetIterator target_0 = iter(row(target_, 0), 0);
+	TTargetIterator target_1 = iter(row(target_, 1), 0);
+
+
+
+	typedef typename Iterator<TTargetSourceSegment, Rooted>::Type TStringIterator;
+	TStringIterator it_0 = begin(str_0);
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = begin(str_1);
+	TStringIterator it_1_end = end(str_1);
+
+	TScoreValue score_diff = scoreMismatch(score_) - scoreGapExtend(score_);
+
+
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		bool gv;
+		bool gh;
+
+		if (*it_0 == *it_1)
+		{
+			gv = gh = true;
+		}
+		else
+		{
+			TMatrixIterator it_ = source_;
+
+			goNext(it_, 0);
+			TScoreValue h = *it_;
+
+			it_ = source_;
+			goNext(it_, 1);
+			TScoreValue d = *it_;
+		
+			goPrevious(it_, 0);
+			TScoreValue v = *it_;
+
+			gv = (v >= h) | (d + score_diff >= h);
+			gh = (h >  v) | (d + score_diff >= v);
+
+		}
+
+	
+		if (gv){
+			++it_1;
+			goNext(source_, 1);
+			goPrevious(source_, 0);
+		}else{
+			insertGap(target_1);
+		}
+
+		if (gh) {
+			++it_0;
+			goNext(source_, 0);
+	
+		}else{
+			insertGap(target_0);
+		}
+		++target_0;
+		++target_1;
+	}
+
+	setClippedEndPosition(row(target_,1),position(it_1));
+	setClippedEndPosition(row(target_,0),position(it_0));
+
+	return length(matrix,0) - coordinate(source_,0) -2;
+}
+
+
+//changed version of usual trace-back
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION>
+int
+_needlemanWunschTraceLastRectangle(Align<TTargetSource, TTargetSpec> & target_,
+						Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_,
+						Score<TScoreValue, Simple> const & score_)
+{
+SEQAN_CHECKPOINT
+	typedef Iter<Matrix<TScoreValue, DIMENSION>, PositionIterator > TMatrixIterator;
+    typedef typename Infix<TTargetSource>::Type TTargetSourceSegment;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+	TTargetIterator target_0 = iter(row(target_, 0), 0);
+	TTargetIterator target_1 = iter(row(target_, 1), 0);
+
+	typedef typename Iterator<TTargetSourceSegment, Standard>::Type TStringIterator;
+	TStringIterator it_0 = iter(str_0, 0);
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = iter(str_1, 0);
+	TStringIterator it_1_end = end(str_1);
+
+	TScoreValue score_diff = scoreMismatch(score_) - scoreGapExtend(score_);
+
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		bool gv;
+		bool gh;
+
+		if (*it_0 == *it_1)
+		{
+			gv = gh = true;
+		}
+		else
+		{
+
+			TMatrixIterator it_ = source_;
+
+			goNext(it_, 0);
+			TScoreValue v = *it_;
+
+			goNext(it_, 1);
+			TScoreValue d = *it_;
+
+			it_ = source_;
+			goNext(it_, 1);
+			TScoreValue h = *it_;
+
+			gv = (v >= h) | (d + score_diff >= h);
+			gh = (h >  v) | (d + score_diff >= v);
+
+		}
+
+		if (gv)
+		{
+			++it_0;
+			goNext(source_, 0);
+		}
+		else
+		{
+			insertGap(target_0);
+		}
+
+		if (gh) 
+		{
+			++it_1;
+			goNext(source_, 1);
+		}
+		else
+		{
+			insertGap(target_1);
+		}
+
+		++target_0;
+		++target_1;
+	}
+	return 0;
+}
+
+template<typename TAlign, typename TValue>
+void
+_recDelete(::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &vec,	//alignment vector
+		   TValue index,										//position im vector
+		   TValue position)										//alignment to delete
+{
+	if (position != -1)
+	{
+		typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator it, it1, it2;
+		it = vec[index].find(position);
+		bool x = true; //true = successor of it can be deleted
+		if (it != vec[index].begin())
+		{
+			it1 = it;
+			--it1;
+			x = (it1->second.i1 != it->second.i1);
+		}
+		it2 = it;
+		++it2;
+		if (x && (it2 != vec[index].end()))
+		{
+			x = (it2->second.i1 != it->second.i1);
+		}
+		if (x)
+			_recDelete(vec, index-1, it->second.i1);
+		vec[index].erase(position);
+	}
+}
+
+template<typename TValue, typename TAlign, typename TSize>
+void
+_deleteAlignment(::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &me,
+				TSize old_end,
+				TSize new_end)
+{
+	//cout << "me: " << me[0].size() << endl;
+	int length = me.size()-2;
+	typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator it, it1, it2;
+	for(TSize i = old_end+1; i < new_end; ++i)
+	{
+	
+		it = me[length].find(i);
+		bool x = true; //true = successor of it can be deleted
+		if (it != me[length].begin())
+		{
+			it1 = it;
+			--it1;
+			x = (it1->second.i1 != it->second.i1);
+		}
+		it2 = it;
+		++it2;
+		if (x && (it2 != me[length].end()))
+		{
+			x = (it2->second.i1 != it->second.i1);
+		}
+		if (x)
+			_recDelete(me, length-1, it->second.i1);
+		me[length].erase(i);
+		//cout << "me2: " << me[0].size() << endl;
+	}
+	
+}
+
+//calculation and backtracking of the banded alignment of a seed
+template<typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix>
+void
+_calculateBandedSeed(TSeed const &seed,
+					 TDiff k,
+					 TMatrix &matrix_,
+					 TString *p_seq1,
+					 TString *p_seq2,
+					 TScoreString &score_str,
+					 TValue &score_length,
+					 ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector,
+					 TScoreMatrix const &scoreMatrix)
+{
+	typedef typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator TMapIterator;
+	typedef Iter<TMatrix, PositionIterator> TMatrixIterator;
+    typedef typename Infix<TString>::Type TSegment;
+	TSegment seg1_align = infix(host(*p_seq1), leftDim0(seed), rightDim0(seed)+1);
+	TSegment seg2_align = infix(host(*p_seq2), leftDim1(seed), rightDim1(seed)+1);
+	_bandedNeedlemanWunsch(matrix_, seed, k, seg1_align, seg2_align, scoreMatrix, score_str);
+
+	TValue height_diag = leftDiagonal(seed)-startDiagonal(seed)+k;
+	TValue width_diag = startDiagonal(seed)-rightDiagonal(seed)+k;
+	TValue overall = height_diag + width_diag + 1;
+	
+	resize(score_str,overall);
+	TMatrixIterator matr_it = begin(matrix_);
+	setPosition(matr_it, length(matrix_,0)-2);
+
+	alignmentVector.push_back(::std::map<TValue,Pair<TValue, TAlign> >());
+	TValue width_align = leftDim0(seed) + width_diag;
+	TValue height_align = leftDim1(seed);
+
+	//diagonal back_track
+	TValue new_connect;
+	TValue old_connect = -1;
+	for(TValue j = 0; j<=width_diag; ++j)
+	{
+		alignmentVector.back().insert(std::make_pair(j,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --(alignmentVector.back().end());
+		TSegment seg1_align = infix(host(*p_seq1), width_align, rightDim0(seed)+1);
+		TSegment seg2_align = infix(host(*p_seq2), height_align,rightDim1(seed)+1);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0), seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		new_connect = _bandedNeedlemanWunschTrace2(mapIt->second.i2, matrix_,  matr_it, scoreMatrix);
+		score_str[j] = *matr_it;
+		mapIt->second.i1 = new_connect;
+		goPrevious(matr_it,0);
+		--width_align;
+		if (old_connect != new_connect)
+		_deleteAlignment(alignmentVector, old_connect, new_connect);
+		old_connect = new_connect;
+	}
+			
+	++width_align;
+	++height_align;
+
+	for(TValue j = width_diag+1; j < overall; ++j)
+	{
+		goNext(matr_it,1);
+		alignmentVector.back().insert(std::make_pair(j,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --(alignmentVector.back().end());
+		TSegment seg1_align = infix(host(*p_seq1), width_align, rightDim0(seed)+1);
+		TSegment seg2_align = infix(host(*p_seq2), height_align,rightDim1(seed)+1);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0), seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		
+		new_connect = _bandedNeedlemanWunschTrace2(mapIt->second.i2, matrix_,  matr_it, scoreMatrix);
+		score_str[j] = *matr_it;
+		mapIt->second.i1 = new_connect;
+		goPrevious(matr_it,0);
+		++height_align;
+		if (old_connect != new_connect)
+			_deleteAlignment(alignmentVector, old_connect, new_connect);
+		old_connect = new_connect;
+	}
+	_deleteAlignment(alignmentVector, old_connect, score_length);
+	score_length = length(score_str);
+}
+
+template<typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix>
+void
+_calculateFirstRectangle(TSeed const &seed,
+						 TDiff k,
+						 TMatrix &matrix_,
+						 TString *p_seq1,
+						 TString *p_seq2,
+						 TScoreString &score_str,
+						 TValue &score_length,
+						 ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector,
+						 TScoreMatrix const &scoreMatrix)
+{
+	typedef typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator TMapIterator;
+	typedef Iter<TMatrix, PositionIterator> TMatrixIterator;
+	TValue new_connect;
+    typedef typename Infix<TString>::Type TSegment;
+	TSegment seg1b_align = infix(host(*p_seq1), beginPosition(*p_seq1), leftDim0(seed) + startDiagonal(seed) - rightDiagonal(seed) + k);
+	TSegment seg2b_align = infix(host(*p_seq2), beginPosition(*p_seq2), leftDim1(seed) + leftDiagonal(seed)  - startDiagonal(seed) + k);
+
+	_bandedNeedlemanWunschRectangleFirst(matrix_, seed, k, seg1b_align, seg2b_align, scoreMatrix,score_str);
+
+	TValue w_d2 = startDiagonal(seed) - rightDiagonal(seed) + k;
+	TValue h_d2 = leftDiagonal(seed) - startDiagonal(seed) + k;
+
+	resize(score_str,1);
+
+	TMatrixIterator matr_it = begin(matrix_);
+
+	alignmentVector.push_back(::std::map<TValue,Pair<TValue, TAlign> >());
+
+	TValue width_stop = leftDim0(seed) - beginPosition(*p_seq1);
+	TValue height_stop = leftDim1(seed) - beginPosition(*p_seq2);
+
+	alignmentVector.back().insert(std::make_pair(0,Pair<TValue, TAlign> ()));
+	TMapIterator mapIt = --(alignmentVector.back().end());
+	TSegment seg1_align = infix(host(*p_seq1), beginPosition(*p_seq1), leftDim0(seed) + w_d2);
+	TSegment seg2_align = infix(host(*p_seq2), beginPosition(*p_seq2), leftDim1(seed)+ h_d2);
+	
+	resize(rows(mapIt->second.i2),2);
+	assignSource(row(mapIt->second.i2,0), seg1_align);
+	assignSource(row(mapIt->second.i2,1), seg2_align);
+
+	new_connect = _needlemanWunschTraceRectangle(mapIt->second.i2,  matr_it, scoreMatrix, matrix_, width_stop, height_stop);
+	score_str[0] = *matr_it;
+	mapIt->second.i1 = new_connect;
+	_deleteAlignment(alignmentVector, -1, new_connect);
+	_deleteAlignment(alignmentVector, new_connect, score_length);
+}
+
+template<typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix>
+void
+_calculateLastRectangle(TSeed const &seed,
+						TDiff k,
+						TMatrix &matrix_,
+						TString *p_seq1,
+						TString *p_seq2,
+						TScoreString &score_str,
+						TValue &score_length,
+						::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector,
+						TScoreMatrix const &scoreMatrix)
+{
+	typedef typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator TMapIterator;
+	typedef Iter<TMatrix, PositionIterator> TMatrixIterator;
+
+    TValue seq1_end = endPosition(*p_seq1);
+	TValue seq2_end = endPosition(*p_seq2);
+	TValue width_diag=leftDiagonal(seed) - endDiagonal(seed)+k;
+	TValue width =  width_diag + seq1_end - rightDim0(seed);
+	TValue height_diag = endDiagonal(seed) - rightDiagonal(seed)+k;
+	TValue height = height_diag + seq2_end - rightDim1(seed);
+	
+	resize(score_str, width_diag+height_diag+1);
+	
+    typedef typename Infix<TString>::Type TSegment;
+	TSegment seg1 = infix(host(*p_seq1),seq1_end-width+1,seq1_end);
+	TSegment seg2 = infix(host(*p_seq2),seq2_end-height+1,seq2_end);
+
+	_needlemanWunsch(matrix_, seg1, seg2, scoreMatrix);
+
+	TValue width_align = seq1_end - width  + width_diag +1;
+	TValue height_align = seq2_end - height+1;
+
+	TMatrixIterator iter_ = begin(matrix_);
+
+	TValue x = width_diag;
+	alignmentVector.push_back(::std::map<TValue,Pair<TValue, TAlign> >());
+	
+	//last rectangle
+	for(TValue i = 0; i<height_diag; ++i)
+	{
+		alignmentVector[0].insert(std::make_pair(i,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --alignmentVector[0].end();
+		TSegment seg1_align = infix(host(*p_seq1), width_align, seq1_end);
+		TSegment seg2_align = infix(host(*p_seq2), height_align, seq2_end);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0),seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		setPosition(iter_, x);
+		score_str[i] = *iter_;
+		mapIt->second.i1 = -1;
+		_needlemanWunschTraceLastRectangle(mapIt->second.i2, iter_, scoreMatrix);
+		x+=width;
+		++height_align;
+	}
+	TValue a = height_diag + width_diag+1;
+	
+	for(TValue i = height_diag; i<a; ++i)
+	{
+		alignmentVector[0].insert(std::make_pair(i,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --alignmentVector[0].end();
+		TSegment seg1_align = infix(host(*p_seq1), width_align, seq1_end);
+		TSegment seg2_align = infix(host(*p_seq2), height_align, seq2_end);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0),seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		setPosition(iter_, x);
+		score_str[i] = *iter_;
+		mapIt->second.i1 = -1;
+		_needlemanWunschTraceLastRectangle(mapIt->second.i2, iter_, scoreMatrix);
+		--x;
+		--width_align;
+	}
+	score_length = length(score_str);
+}
+
+//calculation and backtracking of the edit matrix between two seeds
+template<typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix>
+void
+_calculateRectangle(TSeed const &seed,
+					TSeed const &seed2,
+					TDiff k_begin,
+					TDiff k_end,
+					TMatrix &matrix_,
+					TString *p_seq1,
+					TString *p_seq2,
+					TScoreString &score_str,
+					TValue &score_length,
+					::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector,
+					TScoreMatrix const &scoreMatrix)
+{
+	typedef typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator TMapIterator;
+	typedef Iter<TMatrix, PositionIterator> TMatrixIterator;
+    typedef typename Infix<TString>::Type TSegment;
+	TSegment seg1b_align = infix(host(*p_seq1), rightDim0(seed2)-(leftDiagonal(seed2) - endDiagonal(seed2)   + k_end) + 1, leftDim0(seed) + startDiagonal(seed) - rightDiagonal(seed) + k_begin);
+	TSegment seg2b_align = infix(host(*p_seq2), rightDim1(seed2)-(endDiagonal(seed2) -  rightDiagonal(seed2) + k_end) + 1, leftDim1(seed) + leftDiagonal(seed)  - startDiagonal(seed) + k_begin);
+
+	_needlemanWunschRectangle(matrix_, seed, seed2, k_begin, k_end, seg1b_align, seg2b_align, scoreMatrix,score_str);
+
+	TValue width_diag = leftDiagonal(seed2) - endDiagonal(seed2)+k_end;
+	TValue height_diag = endDiagonal(seed2) - rightDiagonal(seed2)+k_end;
+	
+	TValue w_d2 = startDiagonal(seed) - rightDiagonal(seed) + k_begin;
+	TValue h_d2 = leftDiagonal(seed) - startDiagonal(seed) + k_begin;
+
+	TValue overall = height_diag + width_diag + 1;
+
+	resize(score_str, overall);
+	TMatrixIterator matr_it = begin(matrix_);
+	setPosition(matr_it, width_diag);
+
+	alignmentVector.push_back(::std::map<TValue,Pair<TValue, TAlign> >());
+	TValue width_align = rightDim0(seed2)+1;
+	TValue height_align = rightDim1(seed2) - height_diag + 1;
+
+	TValue width_stop = leftDim0(seed) - rightDim0(seed2)-1;
+	TValue height_stop = leftDim1(seed) - (rightDim1(seed2) - height_diag)-1;
+
+	TValue old_connect = -1;
+	TValue new_connect;
+	for(TValue j = 0; j<height_diag; ++j)
+	{
+		alignmentVector.back().insert(std::make_pair(j,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --(alignmentVector.back().end());
+		TSegment seg1_align = infix(host(*p_seq1), width_align, leftDim0(seed) + w_d2);
+		TSegment seg2_align = infix(host(*p_seq2), height_align, leftDim1(seed)+ h_d2);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0), seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+
+		//cout << "ALL: " << length(seg1_align) << " " << length(seg2_align) << " " << width_stop << " " <<height_stop << endl;
+		new_connect = _needlemanWunschTraceRectangle(mapIt->second.i2,  matr_it, scoreMatrix, matrix_, width_stop, height_stop);
+		score_str[j] = *matr_it;
+		mapIt->second.i1 = new_connect;
+		goNext(matr_it, 1);
+		++height_align;
+		--height_stop;
+		if (old_connect != new_connect){
+			//cout << "ups "<< old_connect << " " << new_connect << endl;
+			_deleteAlignment(alignmentVector, old_connect, new_connect);
+			//cout << "ups_ENDE" << endl;
+		}
+		old_connect = new_connect;
+	}
+	for(TValue j = height_diag; j < overall; ++j)
+	{
+		alignmentVector.back().insert(std::make_pair(j,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --(alignmentVector.back().end());
+		TSegment seg1_align = infix(host(*p_seq1), width_align, leftDim0(seed) + w_d2);
+		TSegment seg2_align = infix(host(*p_seq2), height_align, leftDim1(seed)+ h_d2);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0), seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		new_connect = _needlemanWunschTraceRectangle(mapIt->second.i2,  matr_it, scoreMatrix, matrix_, width_stop, height_stop);
+		score_str[j] = *matr_it;
+		mapIt->second.i1 = new_connect;
+		goPrevious(matr_it,0);
+		--width_align;
+		++width_stop;
+		if (old_connect != new_connect)
+			_deleteAlignment(alignmentVector, old_connect, new_connect);
+		old_connect = new_connect;
+	}
+	_deleteAlignment(alignmentVector, old_connect, score_length);
+	score_length = length(score_str);
+}
+
+
+
+//Rectangle calculation between two seeds
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed>
+void
+_needlemanWunschRectangle(Matrix<TScoreValue, DIMENSION> & matrix_,			//edit matrix
+							Seed<TValue, TSpecSeed> const &seed1,		//Seed nearer to the end
+							Seed<TValue, TSpecSeed> const &seed2,		//Seed nearer to the start
+							TValue2 k_begin,							//upper diagonal extension
+							TValue2 k_end,								//lower diagonal extension
+							TString const & str1_,						//first sequence
+							TString const & str2_,						//secondSequence
+							Score<TScoreValue, Simple> const & score_,	//score matrix
+							String<TScoreValue> init)//Values for initialisation
+{
+SEQAN_CHECKPOINT
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, PositionIterator>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TAlphabet;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+
+	TValue inf = -1000000;
+
+	TValue diag_height1 = leftDiagonal(seed1) - startDiagonal(seed1) + k_begin;
+	TValue diag_width1 = startDiagonal(seed1) - rightDiagonal(seed1) + k_begin;
+
+	TValue diag_height2 = endDiagonal(seed2) - rightDiagonal(seed2) + k_end;
+	TValue diag_width2 = leftDiagonal(seed2) - endDiagonal(seed2) + k_end;
+
+
+	TValue rectangle_height = leftDim1(seed1) - rightDim1(seed2) -1;
+	TValue rectangle_width = length(str1_);
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap = scoreGapExtend(score_);
+
+	TValue str1_length = length(str1_);
+	TValue str2_length = length(str2_);
+	setLength(matrix_, 0, str1_length + 1);
+	setLength(matrix_, 1, str2_length + 1);
+	
+	resize(matrix_);
+
+	TMatrixIterator col_ = begin(matrix_);
+	//Initialisierung
+
+	setPosition(col_, (diag_height2 + rectangle_height+1)*(str1_length+1)-1);
+
+	for (int i = 0; i != diag_width1; ++i)
+	{
+		
+		*col_ = init[i];
+		--col_;
+	}
+
+	TValue len = length(init);
+	for (int i = diag_width1; i != len; ++i)
+	{
+		*col_=init[i];
+		goNext(col_,1);
+	}
+
+	goPrevious(col_,1);
+	TMatrixIterator finger2 =col_;
+	
+	--col_;
+
+
+
+	TValue width_align = str1_length - diag_width1;
+	for (int i = 0; i!= width_align; ++i)
+	{
+		*col_ = inf;
+		--col_;
+	}
+
+
+	TStringIterator x_begin = begin(str1_);
+	--x_begin;
+	TStringIterator x_end = end(str1_) -1;
+	setPosition(x_end,width_align-1);
+	TStringIterator y_begin = begin(str2_);
+	TStringIterator y_end = end(str2_)-1;
+	TStringIterator x,y;
+
+	col_ = finger2;
+	TMatrixIterator finger1;
+	
+	TScoreValue h, v;
+	TScoreValue s1;
+	for (int i = 0; i < diag_height1; ++i)
+	{
+		finger2 = col_;		//points to last column
+		goPrevious(col_, 1);	//points to this column
+		finger1 = col_;
+		v = *finger1;
+		h = *finger2;
+		for (x = x_end; x != x_begin; --x)
+		{
+			goPrevious(finger1, 0);
+			goPrevious(finger2, 0);
+			s1 = h + ((*x == *y_end) ? score_match : score_mismatch);
+			h = *finger2;
+			TScoreValue s2 = score_gap + ((h > v) ? h : v);
+			v = (s1 > s2) ? s1 : s2;
+			*finger1 = v;
+		}
+		--y_end;
+	}
+
+	setPosition(col_,(diag_height2 + rectangle_height+1)*(rectangle_width+1)-1);
+
+	h =*col_;
+	x_end = end(str1_) -1;
+	for (int i = 0; i < rectangle_height; ++i)
+	{
+		v = inf;
+		finger2 = col_;		//points to last column
+		goPrevious(col_, 1);	//points to this column
+		finger1 = col_;
+
+		*finger1 = v;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			goPrevious(finger1, 0);
+			goPrevious(finger2, 0);
+			s1 = h + ((*x == *y_end) ? score_match : score_mismatch);
+			h = *finger2;
+			TScoreValue s2 = score_gap + ((h > v) ? h : v);
+			v = (s1 > s2) ? s1 : s2;
+			//cout << position(finger1,0) << endl;
+			*finger1 = v;
+		}
+		h = inf;
+		--y_end;
+	}
+
+	setPosition(x_begin,diag_width2-1);
+
+	for (int i = 0; i < diag_height2; ++i)
+	{
+		v = inf;
+		finger2 = col_;		//points to last column
+		goPrevious(col_, 1);	//points to this column
+		finger1 = col_;
+
+		*finger1 = v;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			goPrevious(finger1, 0);
+			goPrevious(finger2, 0);
+			s1 = h + ((*x == *y_end) ? score_match : score_mismatch);
+			h = *finger2;
+			TScoreValue s2 = score_gap + ((h > v) ? h : v);
+			v = (s1 > s2) ? s1 : s2;
+			*finger1 = v;
+			
+		}
+		h = inf;
+		--y_end;
+	}
+}
+
+//changed version of usual trace-back
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION, typename TValue, typename TMatrix>
+TValue
+_needlemanWunschTraceRectangle(Align<TTargetSource, TTargetSpec> & target_,
+						Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_,
+						Score<TScoreValue, Simple> const & score_,
+						TMatrix matrix, 
+						TValue width_stop, 
+						TValue height_stop)
+{
+SEQAN_CHECKPOINT
+	typedef Iter<Matrix<TScoreValue, DIMENSION>, PositionIterator > TMatrixIterator;
+    typedef typename Infix<TTargetSource>::Type TTargetSourceSegment;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+	TTargetIterator target_0 = iter(row(target_, 0), 0);
+	TTargetIterator target_1 = iter(row(target_, 1), 0);
+
+	typedef typename Iterator<TTargetSourceSegment, Rooted>::Type TStringIterator;
+	TStringIterator it_0 = iter(str_0, 0);
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = iter(str_1, 0);
+	TStringIterator it_1_end = end(str_1);
+
+	TScoreValue score_diff = scoreMismatch(score_) - scoreGapExtend(score_);
+	//TScoreValue score_match = scoreMatch(score_);
+
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+
+	while ((static_cast<TValue>(position(it_0)) < width_stop) || (static_cast<TValue>(position(it_1)) < height_stop))
+	{
+		
+		bool gv;
+		bool gh;
+		TMatrixIterator it3_ = source_;
+		goNext(it3_,1);
+		goNext(it3_,0);
+		if ((*it_0 == *it_1)&&(*it3_ != -1000000))
+		{
+			gv = gh = true;
+		}
+		else
+		{
+
+			TMatrixIterator it_ = source_;
+
+			goNext(it_, 0);
+			TScoreValue v = *it_;
+
+			goNext(it_, 1);
+			TScoreValue d = *it_;
+
+			it_ = source_;
+			goNext(it_, 1);
+			TScoreValue h = *it_;
+
+			gv = (v >= h) | (d + score_diff >= h);
+			gh = (h >  v) | (d + score_diff >= v);
+
+		}
+	
+		if (gv)
+		{
+			++it_0;
+			goNext(source_, 0);
+		}
+		else
+		{
+			insertGap(target_0);
+		}
+
+		if (gh) 
+		{
+			++it_1;
+			goNext(source_, 1);
+		}
+		else
+		{
+			insertGap(target_1);
+		}
+		++target_0;
+		++target_1;
+	}
+
+	setClippedEndPosition(row(target_,1),position(it_1));
+	setClippedEndPosition(row(target_,0),position(it_0));
+
+	return length(matrix,0) - coordinate(source_,0) + position(it_1) - height_stop -1;
+}
+
+
+//Rectangle calculation between two seeds
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed>
+void
+_bandedNeedlemanWunschRectangleFirst(Matrix<TScoreValue, DIMENSION> & matrix_,	//edit matrix
+								   Seed<TValue, TSpecSeed> const &seed,		//Seed
+								   TValue2 k,									//diagonal extension
+								   TString const & str1_,						//first sequence
+								   TString const & str2_,						//secondSequence
+								   Score<TScoreValue, Simple> const & score_,	//score matrix
+								   String<TScoreValue> init)					//Values for initialisation
+{
+SEQAN_CHECKPOINT
+
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, Standard>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TAlphabet;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+
+	TValue inf = -1000000;
+
+	TValue diag_height1 = leftDiagonal(seed) - startDiagonal(seed) + k;
+	TValue diag_width1 = startDiagonal(seed) - rightDiagonal(seed) + k;
+
+	TValue rectangle_height = leftDim1(seed) - beginPosition(str2_);
+	TValue rectangle_width = length(str1_);
+	
+
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap = scoreGapExtend(score_);
+
+	TValue str1_length = length(str1_);
+	TValue str2_length = length(str2_);
+	setLength(matrix_, 0, str1_length + 1);
+	setLength(matrix_, 1, str2_length + 1);
+	
+	resize(matrix_);
+	TMatrixIterator col_ = begin(matrix_);
+
+	//Initialisierung
+	setPosition(col_, (rectangle_height+1)*(rectangle_width+1)-1);
+
+	for (int i = 0; i != diag_width1; ++i)
+	{
+		*col_ = init[i];
+		--col_;
+	}
+
+	TValue len = length(init);
+	for (int i = diag_width1; i != len; ++i)
+	{
+		*col_=init[i];
+		goNext(col_,1);
+	}
+
+	goPrevious(col_,1);
+	TMatrixIterator finger2 =col_;
+	--col_;
+
+	TValue width_align = str1_length - diag_width1;
+	for (int i = 0; i!= width_align; ++i)
+	{
+		*col_ = inf;
+		--col_;
+	}
+
+	//calculation of matrix
+
+	TStringIterator x_begin = begin(str1_);
+	--x_begin;
+	TStringIterator x_end = end(str1_) -1;
+	
+	setPosition(x_end, width_align-1);
+	TStringIterator y_begin = begin(str2_);
+	TStringIterator y_end = end(str2_)-1;
+	TStringIterator x,y;
+	col_ = finger2;
+	TMatrixIterator finger1;
+	
+	TScoreValue h, v;
+	TScoreValue s1;
+	for (int i = 0; i < diag_height1; ++i)
+	{
+		finger2 = col_;		//points to last column
+		goPrevious(col_, 1);	//points to this column
+		finger1 = col_;
+		v = *finger1;
+		h = *finger2;
+		for (x = x_end; x != x_begin; --x)
+		{
+			goPrevious(finger1, 0);
+			goPrevious(finger2, 0);
+			s1 = h + ((*x == *y_end) ? score_match : score_mismatch);
+			h = *finger2;
+			TScoreValue s2 = score_gap + ((h > v) ? h : v);
+			v = (s1 > s2) ? s1 : s2;
+			*finger1 = v;
+		}
+		--y_end;
+	}
+
+	setPosition(col_, (rectangle_height+1)*(rectangle_width+1)-1);
+
+
+	h =*col_;
+	x_end = end(str1_) -1;
+	for (int i = 0; i < rectangle_height; ++i)
+	{
+		v = inf;
+		finger2 = col_;		//points to last column
+		goPrevious(col_, 1);	//points to this column
+		finger1 = col_;
+
+		*finger1 = v;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			goPrevious(finger1, 0);
+			goPrevious(finger2, 0);
+			s1 = h + ((*x == *y_end) ? score_match : score_mismatch);
+			h = *finger2;
+			TScoreValue s2 = score_gap + ((h > v) ? h : v);
+			v = (s1 > s2) ? s1 : s2;
+			*finger1 = v;
+			
+		}
+		h = inf;
+		--y_end;
+	}	
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/seeds/banded_chain_align_affine.h b/src/SeqAn-1.3/seqan/seeds/banded_chain_align_affine.h
new file mode 100644
index 0000000..2f080aa
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/banded_chain_align_affine.h
@@ -0,0 +1,1680 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_BANDED_CHAIN_ALIGN_AFFINE_H
+#define SEQAN_HEADER_BANDED_CHAIN_ALIGN_AFFINE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+    
+// TODO(bkehr): large parts of this file are identical to banded_chain_align.h
+
+template<typename TContainer, typename TValue, typename TScore, typename TAlign>
+TScore
+_chainToAlignmentGotoh(TContainer const &seedChain, 
+						TValue k,
+						TAlign & whole_alignment, 
+						Score< TScore, Simple> const &scoreMatrix)
+{
+    typedef typename Infix<typename Source<TAlign>::Type>::Type TString;    //Sequence in an align object
+	typedef typename Size<TString>::Type TSize;								//Size of the string
+	typedef typename Iterator<const TContainer, Standard>::Type TIterator;	//Iterator for the seed chain
+	typedef typename Value<TContainer>::Type TSeed;							//Type of Seed
+	typedef typename Value<TSeed>::Type TPosition;
+	typedef String<TScore> TScoreString;
+	typedef Matrix<TScore> TMatrix;
+	typedef Iter<TMatrix, PositionIterator > TMatrixIterator;
+	typedef ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > TAlignVector;
+	typedef typename ::std::map<TValue, Pair<TValue, TAlign> >::iterator TMapIterator;
+	
+	TScoreString score_str_diag;
+	TScoreString score_str_vert;
+	TScoreString score_str_hori;
+	TAlignVector alignmentVector;
+	TString seq1 = sourceSegment(row(whole_alignment,0));
+	TString seq2 = sourceSegment(row(whole_alignment,1));
+	TString *p_seq1 = &seq1;
+	TString *p_seq2 = &seq2;
+	
+	TValue score_length = 0;
+	TMatrix matrix_diag;
+	TMatrix matrix_vert;
+	TMatrix matrix_hori;
+	setDimension(matrix_vert, 2);
+	setDimension(matrix_hori, 2);
+	setDimension(matrix_diag, 2);
+	TIterator it = begin(seedChain, Standard());
+
+	//calculation begins at the end
+	//rectangle between last seed and end
+	TValue k_begin = k;
+	TValue k_end = k;
+	if ((length(*it) <= k) ||((rightDim1(*it)-leftDim1(*it)) <=k))
+ 		k_end = length(*it) -1;
+
+	
+	_calculateLastRectangleGotoh(*it, k_end, matrix_diag, matrix_vert, matrix_hori, p_seq1, p_seq2, score_str_diag, score_str_vert, score_str_hori, score_length, alignmentVector, scoreMatrix);
+	/*
+	cout <<"INIT: " << endl;
+	cout << length(score_str_diag) << endl;
+	for ( int i = 0; i < length(score_str_diag); ++i)
+		cout << score_str_diag[i] << " ";
+	cout << endl;*/
+
+
+	_calculateBandedSeedGotoh(*it, k_end, matrix_diag, matrix_vert, matrix_hori, p_seq1, p_seq2, score_str_diag, score_str_vert, score_str_hori, score_length, alignmentVector, scoreMatrix);
+	
+	TIterator it_begin = end(seedChain, Standard());
+	TIterator it2 = it;
+	++it2;
+	while (it2 != it_begin)
+	{
+		k_begin = k_end;
+		if ((length(*it2) <= k) || ((rightDim1(*it2)-leftDim1(*it2)) <=k))
+			k_end = length(*it2) -2;
+		else 
+			k_end = k;
+		_calculateRectangleGotoh(*it, *it2, k_begin, k_end, matrix_diag, matrix_vert, matrix_hori, p_seq1, p_seq2, score_str_diag, score_str_vert, score_str_hori, score_length, alignmentVector, scoreMatrix);	
+		
+		_calculateBandedSeedGotoh(*it2, k_end, matrix_diag, matrix_vert, matrix_hori, p_seq1, p_seq2, score_str_diag, score_str_vert, score_str_hori, score_length, alignmentVector, scoreMatrix);
+		
+		++it;
+		++it2;
+	}
+	//cout << "last" << endl;
+	_calculateFirstRectangleGotoh(*it, k_end, matrix_diag, matrix_vert, matrix_hori, p_seq1, p_seq2, score_str_diag, score_str_vert, score_str_hori, score_length, alignmentVector, scoreMatrix);
+	//cout << "last" << endl;
+	_constructAlignment(alignmentVector, whole_alignment);
+	//cout << "last" << endl;
+	return score_str_diag[0];
+}
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed>
+TScoreValue
+_bandedGotoh(Matrix<TScoreValue, DIMENSION> & matrix_diag,
+			  Matrix<TScoreValue, DIMENSION> & matrix_vert,
+			  Matrix<TScoreValue, DIMENSION> & matrix_hori,
+			  Seed<TValue, TSpecSeed> const &seed,
+			  TValue2 k,
+			  TString const & str1_,
+			  TString const & str2_,
+			  Score<TScoreValue, Simple> const & score_,
+			  String<TScoreValue> & init_diag,
+			  String<TScoreValue> & init_vert,
+			  String<TScoreValue> & init_hori)
+{
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, Rooted>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TAlphabet;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+
+	TSize height = leftDiagonal(seed) - rightDiagonal(seed)+1;
+	TSize str1_length = height+2*k;
+	TSize str2_length = length(str2_);
+
+	TValue up_height = leftDiagonal(seed) - startDiagonal(seed) + k; //equals length of empty lower triangle
+	//TValue up_width = str1_length - up_height;
+	TValue down_height = endDiagonal(seed) - rightDiagonal(seed) + k; //equals length of empty lower triangle
+	TValue down_width = str1_length - down_height;
+	TSize length_right_diag = str2_length - down_height;
+	TSize length_left_diag = str2_length - up_height;
+
+
+	TStringIterator x_begin = begin(str1_) - 1;
+	TStringIterator x_end = end(str1_) - 1;
+	TStringIterator y_begin = begin(str2_) - 1;
+	TStringIterator y_end = end(str2_) - 1;
+
+	TStringIterator x = x_end;
+	TStringIterator y;
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap_open = scoreGapOpen(score_);
+	TScoreValue score_gap_extend = scoreGapExtend(score_);
+
+	setLength(matrix_diag, 0, str1_length + 2);
+	setLength(matrix_diag, 1, str2_length + 1);
+	resize(matrix_diag);
+	setLength(matrix_vert, 0, str1_length + 2);
+	setLength(matrix_vert, 1, str2_length + 1);
+	resize(matrix_vert);
+	setLength(matrix_hori, 0, str1_length + 2);
+	setLength(matrix_hori, 1, str2_length + 1);
+	resize(matrix_hori);
+
+	TSize pos = length(matrix_diag, 0)-1;
+	TMatrixIterator diag_col_ = begin(matrix_diag);
+	TMatrixIterator diag_finger1(matrix_diag,pos);
+	TMatrixIterator diag_finger2;
+	TMatrixIterator diag_finger3;
+	TMatrixIterator vert_col_ = begin(matrix_vert);
+	TMatrixIterator vert_finger1(matrix_vert,pos);
+	TMatrixIterator vert_finger2;
+	TMatrixIterator vert_finger3;
+	TMatrixIterator hori_col_ = begin(matrix_hori);
+	TMatrixIterator hori_finger1(matrix_hori,pos);
+	TMatrixIterator hori_finger2;
+	TMatrixIterator hori_finger3;
+	
+
+	//-------------------------------------------------------------------------
+	// init
+	
+
+	TScoreValue inf = -1000000;
+	for (TSize i = 1; i != length_right_diag; ++i){
+		*diag_finger1 = inf;
+		*hori_finger1 = inf;
+		*vert_finger1 = inf;
+		goNext(diag_finger1, 1);
+		goNext(hori_finger1, 1);
+		goNext(vert_finger1, 1);
+	}
+
+	*diag_finger1 = inf;
+	*hori_finger1 = inf;
+	*vert_finger1 = inf;
+
+	int z = -1;
+
+	for (int i = -1; i != down_height; ++i){
+		goPrevious(diag_finger1, 0);
+		goNext(diag_finger1,1);
+		goPrevious(vert_finger1, 0);
+		goNext(vert_finger1,1);
+		goPrevious(hori_finger1, 0);
+		goNext(hori_finger1,1);
+		*diag_finger1 = init_diag[++z];
+		*vert_finger1 = init_vert[z];
+		*hori_finger1 = init_hori[z];
+	}
+
+	//*diag_finger1 = init_diag[++z];
+	//*vert_finger1 = init_vert[z];
+	//*hori_finger1 = init_hori[z];
+	
+	diag_finger3 = diag_finger1;
+	hori_finger3 = hori_finger1;
+	vert_finger3 = vert_finger1;
+
+	while (z < static_cast<int>(length(init_diag))-1)
+	{
+		goPrevious(diag_finger1, 0);
+		goPrevious(hori_finger1, 0);
+		goPrevious(vert_finger1, 0);
+		*diag_finger1 = init_diag[++z];
+		*hori_finger1 = init_hori[z];
+		*vert_finger1 = init_vert[z];
+	}
+
+	TValue arg = length(matrix_diag,0)-2;
+	while ( z < arg)
+	{
+	goPrevious(diag_finger1, 0);
+	goPrevious(hori_finger1, 0);
+	goPrevious(vert_finger1, 0);
+	*diag_finger1 = inf;
+	*vert_finger1 = inf;
+	*hori_finger1 = inf;
+	++z;
+	}
+
+
+	//printMatrix(matrix_diag);
+	//printMatrix(matrix_vert);
+	//printMatrix(matrix_hori);
+
+	//-------------------------------------------------------------------------
+	//first section
+	TScoreValue hori_value, vert_value, diag_value, tmp_diag, tmp_vert, diag_front, diag_match, diag_back;
+	y=y_end;
+	TSize run_length = down_width;
+	TSize measure = 0;
+
+	for (int i = -1; i != down_height; ++i){	
+		goPrevious(hori_finger3,1);
+		hori_finger1 = hori_finger3;
+		goNext(hori_finger3);
+		hori_value = *hori_finger3;
+
+		vert_finger2 = vert_finger3;
+		goPrevious(vert_finger2);
+		goPrevious(vert_finger3,1);
+		vert_finger1 = vert_finger3;
+		goNext(vert_finger3);
+
+		diag_finger2 = diag_finger3;
+		diag_match=*diag_finger2;
+		goPrevious(diag_finger2);
+		goPrevious(diag_finger3,1);
+		diag_finger1 = diag_finger3;
+		goNext(diag_finger3);
+		diag_back=*diag_finger3;
+
+		x = x_end;
+		for (unsigned int j = 0; j != run_length; ++j){
+			diag_front= *diag_finger2;
+			hori_value = (hori_value+score_gap_extend > diag_back+score_gap_open) ? hori_value+score_gap_extend : diag_back+score_gap_open;
+			*hori_finger1 = hori_value;
+			goPrevious(hori_finger1);
+
+			tmp_vert = *vert_finger2;
+			vert_value = (tmp_vert+score_gap_extend > diag_front+score_gap_open) ? tmp_vert+score_gap_extend : diag_front+score_gap_open;
+			*vert_finger1 = vert_value;
+			goPrevious(vert_finger1);
+			goPrevious(vert_finger2);
+
+			
+			tmp_diag = (vert_value > hori_value) ? vert_value  : hori_value;
+			diag_value = diag_match + ((*x == *y) ? score_match : score_mismatch);
+			if (diag_value < tmp_diag)
+				diag_value = tmp_diag;
+			diag_back = diag_value;
+			*diag_finger1 = diag_value;
+			goPrevious(diag_finger1);
+			diag_match = *diag_finger2;
+			goPrevious(diag_finger2);
+			--x;
+		}
+		*diag_finger1 = inf;
+		*vert_finger1 = inf;
+		++measure;
+		if (measure < length_left_diag)
+			++run_length;
+		--y;
+	}
+	--run_length;
+
+	while(y!= y_begin)//for (int i = 0; i != main; ++i){
+	{
+		goPrevious(diag_finger3);
+		goPrevious(hori_finger3);
+		goPrevious(vert_finger3);
+
+		goPrevious(hori_finger3,1);
+		hori_finger1 = hori_finger3;
+		goNext(hori_finger3);
+		hori_value = inf;
+
+		vert_finger2 = vert_finger3;
+		goPrevious(vert_finger2);
+		goPrevious(vert_finger3,1);
+		vert_finger1 = vert_finger3;
+		goNext(vert_finger3);
+
+		diag_finger2 = diag_finger3;
+		diag_match=*diag_finger2;
+		goPrevious(diag_finger2);
+		goPrevious(diag_finger3,1);
+		diag_finger1 = diag_finger3;
+		goNext(diag_finger3);
+		diag_back= inf;
+		x = --x_end;
+		for (unsigned int j = 0; j != run_length; ++j){
+			diag_front= *diag_finger2;
+			hori_value = (hori_value+score_gap_extend > diag_back+score_gap_open) ? hori_value+score_gap_extend : diag_back+score_gap_open;
+			*hori_finger1 = hori_value;
+			goPrevious(hori_finger1);
+
+			tmp_vert = *vert_finger2;
+			vert_value = (tmp_vert+score_gap_extend > diag_front+score_gap_open) ? tmp_vert+score_gap_extend : diag_front+score_gap_open;
+			*vert_finger1 = vert_value;
+			goPrevious(vert_finger1);
+			goPrevious(vert_finger2);
+
+			tmp_diag = (vert_value > hori_value) ? vert_value  : hori_value;
+			diag_value = diag_match + ((*x == *y) ? score_match : score_mismatch);
+			if (diag_value < tmp_diag)
+				diag_value = tmp_diag;
+			diag_back = diag_value;
+			*diag_finger1 = diag_value;
+			goPrevious(diag_finger1);
+			diag_match = *diag_finger2;
+			goPrevious(diag_finger2);
+			--x;
+		}
+		*vert_finger1 = inf;
+		*diag_finger1 = inf;
+		++measure;
+		if (measure >= length_left_diag)
+			--run_length;
+		--y;
+	}
+	--run_length;
+	++diag_finger1;
+	//cout << "ENDE" << endl << endl << endl;
+	return *diag_finger1;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//traceback through needleman wunsch matrix
+
+
+//Position berechnen!
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION>
+typename Size<Matrix<TScoreValue, DIMENSION> >::Type
+_bandedGotohTrace2(Align<TTargetSource, TTargetSpec> & target_,
+					 Matrix<TScoreValue, DIMENSION> & diag_matrix_,
+					 Matrix<TScoreValue, DIMENSION> & vert_matrix_,
+					 Matrix<TScoreValue, DIMENSION> & hori_matrix_,
+					 Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_
+					)
+{
+	SEQAN_CHECKPOINT
+	
+	typedef typename Position<Matrix<TScoreValue, DIMENSION> >::Type TPosition;
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+    typedef typename Infix<TTargetSource>::Type TTargetSourceSegment;
+	typedef typename Iterator<TTargetSourceSegment, Rooted>::Type TStringIterator;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+	typename Size<TTargetSourceSegment>::Type dim_0_len = length(diag_matrix_,0);
+
+	TPosition pos = position(source_);
+
+	TTargetIterator target_0 = iter(row(target_, 0), 0, Standard());
+	TTargetIterator target_1 = iter(row(target_, 1), 0, Standard());
+
+	TStringIterator it_0 = iter(str_0, 0);
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = iter(str_1, 0);
+	TStringIterator it_1_end = end(str_1);
+	
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		if (getValue(diag_matrix_,pos) == getValue(vert_matrix_,pos))
+		{
+			++it_1;
+			insertGap(target_0);
+			pos += dim_0_len-1;
+		}
+		else
+		{
+			if (getValue(hori_matrix_,pos) == getValue(diag_matrix_,pos)) 
+			{					
+				++it_0;
+				insertGap(target_1);
+				++pos;
+			} 
+			else
+			{
+				++it_0;
+				++it_1;
+				pos += dim_0_len;
+			}
+		}
+		++target_0;
+		++target_1;
+	}
+
+	setClippedEndPosition(row(target_,1),position(it_1));
+	setClippedEndPosition(row(target_,0),position(it_0));
+	
+	return length(diag_matrix_,0) - (pos % dim_0_len)-2;
+}
+
+
+//changed version of usual trace-back
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION>
+TScoreValue
+_gotohTraceLastRectangle(Align<TTargetSource, TTargetSpec> & target_,
+						Matrix<TScoreValue, DIMENSION> & diag_matrix_,
+						Matrix<TScoreValue, DIMENSION> & vert_matrix_,
+						Matrix<TScoreValue, DIMENSION> & hori_matrix_,
+						Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Position<Matrix<TScoreValue, DIMENSION> >::Type TPosition;
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+    typedef typename Infix<TTargetSource>::Type TTargetSourceSegment;
+	typedef typename Iterator<TTargetSourceSegment, Rooted>::Type TStringIterator;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+	typename Size<TTargetSourceSegment>::Type dim_0_len = length(hori_matrix_,0);
+
+	TPosition pos = position(source_);
+
+	TTargetIterator target_0 = iter(row(target_, 0), 0, Standard());
+	TTargetIterator target_1 = iter(row(target_, 1), 0, Standard());
+
+	TStringIterator it_0 = iter(str_0, 0);
+	TStringIterator it_0_end = end(str_0);
+
+	TStringIterator it_1 = iter(str_1, 0);
+	TStringIterator it_1_end = end(str_1);
+	
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+	while ((it_0 != it_0_end) && (it_1 != it_1_end))
+	{
+		if (getValue(diag_matrix_,pos) == getValue(hori_matrix_,pos))
+		{
+			++it_0;
+			insertGap(target_1);
+			++pos;
+		} 
+		else
+		{
+			if (getValue(diag_matrix_,pos) == getValue(vert_matrix_,pos))
+			{
+				++it_1;
+				insertGap(target_0);
+				pos += dim_0_len;
+			} else{
+				++it_0;
+				++it_1;
+				pos += dim_0_len+1;
+			}
+		}
+		++target_0;
+		++target_1;
+	}
+	return 0;
+}
+
+//calculation and backtracking of the banded alignment of a seed
+template<typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix>
+void
+_calculateBandedSeedGotoh(TSeed const &seed,
+					 TDiff k,
+					 TMatrix &matrix_diag,
+					 TMatrix &matrix_vert,
+					 TMatrix &matrix_hori,
+					 TString *p_seq1,
+					 TString *p_seq2,
+					 TScoreString &score_str_diag,
+					 TScoreString &score_str_vert,
+					 TScoreString &score_str_hori,
+					 TValue &score_length,
+					 ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector,
+					 TScoreMatrix const &scoreMatrix)
+{
+	typedef typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator TMapIterator;
+	typedef Iter<TMatrix, PositionIterator> TMatrixIterator;
+    typedef typename Infix<TString>::Type TSegment;
+	TSegment seg1_align = infix(host(*p_seq1), leftDim0(seed), rightDim0(seed)+1);
+	TSegment seg2_align = infix(host(*p_seq2), leftDim1(seed), rightDim1(seed)+1);
+	_bandedGotoh(matrix_diag, matrix_vert, matrix_hori, seed, k, seg1_align, seg2_align, scoreMatrix, score_str_diag, score_str_vert, score_str_hori);
+
+	//printMatrix(matrix_diag);
+	TValue height_diag = leftDiagonal(seed)-startDiagonal(seed)+k;
+	TValue width_diag = startDiagonal(seed)-rightDiagonal(seed)+k;
+	TValue overall = height_diag + width_diag + 1;
+	
+	resize(score_str_diag,overall);
+	resize(score_str_vert,overall);
+	resize(score_str_hori,overall);
+
+	TMatrixIterator matr_it = begin(matrix_diag);
+	setPosition(matr_it, length(matrix_diag,0)-2);
+
+	alignmentVector.push_back(::std::map<TValue,Pair<TValue, TAlign> >());
+	TValue width_align = leftDim0(seed) + width_diag;
+	TValue height_align = leftDim1(seed);
+
+	//diagonal back_track
+	TValue new_connect;
+	TValue old_connect = -1;
+
+	for(TValue j = 0; j<=width_diag; ++j)
+	{
+		alignmentVector.back().insert(std::make_pair(j,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --(alignmentVector.back().end());
+		TSegment seg1_align = infix(host(*p_seq1), width_align, rightDim0(seed)+1);
+		TSegment seg2_align = infix(host(*p_seq2), height_align,rightDim1(seed)+1);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0), seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		new_connect = _bandedGotohTrace2(mapIt->second.i2, matrix_diag, matrix_vert, matrix_hori, matr_it);
+		score_str_diag[j] = *matr_it;
+		score_str_vert[j] = getValue(matrix_vert, position(matr_it));
+		score_str_hori[j] = getValue(matrix_hori, position(matr_it));
+		mapIt->second.i1 = new_connect;
+		goPrevious(matr_it,0);
+		--width_align;
+		if (old_connect != new_connect)
+			_deleteAlignment(alignmentVector, old_connect, new_connect);
+		old_connect = new_connect;
+	}
+			
+	++width_align;
+	++height_align;
+
+	for(TValue j = width_diag+1; j < overall; ++j)
+	{
+		goNext(matr_it,1);
+		alignmentVector.back().insert(std::make_pair(j,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --(alignmentVector.back().end());
+		TSegment seg1_align = infix(host(*p_seq1), width_align, rightDim0(seed)+1);
+		TSegment seg2_align = infix(host(*p_seq2), height_align,rightDim1(seed)+1);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0), seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		
+		new_connect = _bandedGotohTrace2(mapIt->second.i2, matrix_diag, matrix_vert, matrix_hori,  matr_it);
+		
+		score_str_diag[j] = *matr_it;
+		score_str_vert[j] = getValue(matrix_vert, position(matr_it));
+		score_str_hori[j] = getValue(matrix_hori, position(matr_it));
+
+
+		mapIt->second.i1 = new_connect;
+		goPrevious(matr_it,0);
+		++height_align;
+		if (old_connect != new_connect)
+			_deleteAlignment(alignmentVector, old_connect, new_connect);
+		old_connect = new_connect;
+	}
+	_deleteAlignment(alignmentVector, old_connect, score_length);
+	score_length = length(score_str_diag);
+}
+
+template<typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix>
+void
+_calculateFirstRectangleGotoh(TSeed const &seed,
+						 TDiff k,
+						 TMatrix &matrix_diag,
+						 TMatrix &matrix_vert,
+						 TMatrix &matrix_hori,
+						 TString *p_seq1,
+						 TString *p_seq2,
+						 TScoreString &score_str_diag,
+						 TScoreString &score_str_vert,
+						 TScoreString &score_str_hori,
+						 TValue &score_length,
+						 ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector,
+						 TScoreMatrix const &scoreMatrix)
+{
+	typedef typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator TMapIterator;
+	typedef Iter<TMatrix, PositionIterator> TMatrixIterator;
+	TValue new_connect;
+    typedef typename Infix<TString>::Type TSegment;
+	TSegment seg1b_align = infix(host(*p_seq1), beginPosition(*p_seq1), leftDim0(seed) + startDiagonal(seed) - rightDiagonal(seed) + k);
+	TSegment seg2b_align = infix(host(*p_seq2), beginPosition(*p_seq2), leftDim1(seed) + leftDiagonal(seed)  - startDiagonal(seed) + k);
+
+	_bandedGotohRectangleFirst(matrix_diag, matrix_vert, matrix_hori, seed, k, seg1b_align, seg2b_align, scoreMatrix, score_str_diag, score_str_vert, score_str_hori);
+
+	TValue w_d2 = startDiagonal(seed) - rightDiagonal(seed) + k;
+	TValue h_d2 = leftDiagonal(seed) - startDiagonal(seed) + k;
+
+	resize(score_str_diag,1);
+	resize(score_str_vert,1);
+	resize(score_str_hori,1);
+
+	TMatrixIterator matr_it = begin(matrix_diag);
+
+	alignmentVector.push_back(::std::map<TValue,Pair<TValue, TAlign> >());
+
+	TValue width_stop = leftDim0(seed) - beginPosition(*p_seq1);
+	TValue height_stop = leftDim1(seed) - beginPosition(*p_seq2);
+
+	alignmentVector.back().insert(std::make_pair(0,Pair<TValue, TAlign> ()));
+	TMapIterator mapIt = --(alignmentVector.back().end());
+	TSegment seg1_align = infix(host(*p_seq1), beginPosition(*p_seq1), leftDim0(seed) + w_d2);
+	TSegment seg2_align = infix(host(*p_seq2), beginPosition(*p_seq2), leftDim1(seed)+ h_d2);
+	
+	resize(rows(mapIt->second.i2),2);
+	assignSource(row(mapIt->second.i2,0), seg1_align);
+	assignSource(row(mapIt->second.i2,1), seg2_align);
+
+	new_connect = _gotohTraceRectangle(mapIt->second.i2,  matr_it, matrix_diag, matrix_vert, matrix_hori, width_stop, height_stop);
+
+	score_str_diag[0] = *matr_it;
+	mapIt->second.i1 = new_connect;
+	_deleteAlignment(alignmentVector, -1, new_connect);
+	_deleteAlignment(alignmentVector, new_connect, score_length);
+}
+
+template<typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix>
+void
+_calculateLastRectangleGotoh(TSeed const &seed,
+						TDiff k,
+						TMatrix & matrix_diag,
+						TMatrix & matrix_vert,
+						TMatrix & matrix_hori,
+						TString *p_seq1,
+						TString *p_seq2,
+						TScoreString & score_str_diag,
+						TScoreString & score_str_vert,
+						TScoreString & score_str_hori,
+						TValue &score_length,
+						::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector,
+						TScoreMatrix const &scoreMatrix)
+{
+	typedef typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator TMapIterator;
+	typedef Iter<TMatrix, PositionIterator> TMatrixIterator;
+    typedef typename Infix<TString>::Type TSegment;
+
+	TValue seq1_end = endPosition(*p_seq1);
+	TValue seq2_end = endPosition(*p_seq2);
+	TValue width_diag=leftDiagonal(seed) - endDiagonal(seed)+k;
+	TValue width =  width_diag + seq1_end - rightDim0(seed);
+	TValue height_diag = endDiagonal(seed) - rightDiagonal(seed)+k;
+	TValue height = height_diag + seq2_end - rightDim1(seed);
+	
+	resize(score_str_diag, width_diag+height_diag+1);
+	resize(score_str_vert, width_diag+height_diag+1);
+	resize(score_str_hori, width_diag+height_diag+1);
+	
+	TSegment seg1 = infix(host(*p_seq1),seq1_end-width+1,seq1_end);
+	TSegment seg2 = infix(host(*p_seq2),seq2_end-height+1,seq2_end);
+
+	//_gotoh(matrix_diag, matrix_vert, matrix_hori, seg1, seg2, scoreMatrix);
+	_gotoh2(matrix_diag, matrix_vert, matrix_hori, seg1, seg2, scoreMatrix);
+
+
+
+	TValue width_align = seq1_end - width  + width_diag +1;
+	TValue height_align = seq2_end - height+1;
+
+	TMatrixIterator iter_ = begin(matrix_diag);
+
+	TValue x = width_diag;
+	alignmentVector.push_back(::std::map<TValue,Pair<TValue, TAlign> >());
+	
+	//last rectangle
+	for(TValue i = 0; i<height_diag; ++i)
+	{
+		alignmentVector[0].insert(std::make_pair(i,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --alignmentVector[0].end();
+		TSegment seg1_align = infix(host(*p_seq1), width_align, seq1_end);
+		TSegment seg2_align = infix(host(*p_seq2), height_align, seq2_end);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0),seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		setPosition(iter_, x);
+		score_str_diag[i] = *iter_;
+		score_str_vert[i] = getValue(matrix_vert,position(iter_));
+		score_str_hori[i] = getValue(matrix_hori,position(iter_));
+
+		mapIt->second.i1 = -1;
+		_gotohTraceLastRectangle(mapIt->second.i2, matrix_diag, matrix_vert, matrix_hori, iter_);
+		x+=width;
+		++height_align;
+	}
+	TValue a = height_diag + width_diag+1;
+	
+	for(TValue i = height_diag; i<a; ++i)
+	{
+		alignmentVector[0].insert(std::make_pair(i,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --alignmentVector[0].end();
+		TSegment seg1_align = infix(host(*p_seq1), width_align, seq1_end);
+	    TSegment seg2_align = infix(host(*p_seq2), height_align, seq2_end);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0),seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		setPosition(iter_, x);
+		score_str_diag[i] = *iter_;
+		score_str_vert[i] = getValue(matrix_vert,position(iter_));
+		score_str_hori[i] = getValue(matrix_hori,position(iter_));
+		mapIt->second.i1 = -1;
+		_gotohTraceLastRectangle(mapIt->second.i2, matrix_diag, matrix_vert, matrix_hori, iter_);
+		--x;
+		--width_align;
+	}
+	score_length = length(score_str_diag);
+}
+
+//calculation and backtracking of the edit matrix between two seeds
+template<typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix>
+void
+_calculateRectangleGotoh(TSeed const &seed,
+					TSeed const &seed2,
+					TDiff k_begin,
+					TDiff k_end,
+					TMatrix & matrix_diag,
+					TMatrix & matrix_vert,
+					TMatrix & matrix_hori,
+					TString *p_seq1,
+					TString *p_seq2,
+					TScoreString &score_str_diag,
+					TScoreString &score_str_vert,
+					TScoreString &score_str_hori,
+					TValue &score_length,
+					::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > & alignmentVector,
+					TScoreMatrix const &scoreMatrix)
+{
+	typedef typename ::std::map<TValue,Pair<TValue, TAlign> >::iterator TMapIterator;
+	typedef Iter<TMatrix, PositionIterator> TMatrixIterator;
+    typedef typename Infix<TString>::Type TSegment;
+	TSegment seg1b_align = infix(host(*p_seq1), rightDim0(seed2)-(leftDiagonal(seed2) - endDiagonal(seed2)   + k_end) + 1, leftDim0(seed) + startDiagonal(seed) - rightDiagonal(seed) + k_begin);
+	TSegment seg2b_align = infix(host(*p_seq2), rightDim1(seed2)-(endDiagonal(seed2) -  rightDiagonal(seed2) + k_end) + 1, leftDim1(seed) + leftDiagonal(seed)  - startDiagonal(seed) + k_begin);
+
+	_gotohRectangle(matrix_diag, matrix_vert, matrix_hori, seed, seed2, k_begin, k_end, seg1b_align, seg2b_align, scoreMatrix, score_str_diag, score_str_vert, score_str_hori);
+
+
+//	printMatrix(matrix_diag);
+//	cout << endl;
+	TValue width_diag = leftDiagonal(seed2) - endDiagonal(seed2)+k_end;
+	TValue height_diag = endDiagonal(seed2) - rightDiagonal(seed2)+k_end;
+	
+	TValue w_d2 = startDiagonal(seed) - rightDiagonal(seed) + k_begin;
+	TValue h_d2 = leftDiagonal(seed) - startDiagonal(seed) + k_begin;
+
+	TValue overall = height_diag + width_diag + 1;
+
+	resize(score_str_diag, overall);
+	resize(score_str_vert, overall);
+	resize(score_str_hori, overall);
+
+	TMatrixIterator matr_it = begin(matrix_diag);
+	setPosition(matr_it, width_diag);
+
+	alignmentVector.push_back(::std::map<TValue,Pair<TValue, TAlign> >());
+	TValue width_align = rightDim0(seed2)+1;
+	TValue height_align = rightDim1(seed2) - height_diag + 1;
+
+	TValue width_stop = leftDim0(seed) - rightDim0(seed2)-1;
+	TValue height_stop = leftDim1(seed) - (rightDim1(seed2) - height_diag)-1;
+
+	TValue old_connect = -1;
+	TValue new_connect;
+	for(TValue j = 0; j<height_diag; ++j)
+	{
+		alignmentVector.back().insert(std::make_pair(j,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --(alignmentVector.back().end());
+		TSegment seg1_align = infix(host(*p_seq1), width_align, leftDim0(seed) + w_d2);
+		TSegment seg2_align = infix(host(*p_seq2), height_align, leftDim1(seed)+ h_d2);
+
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0), seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+
+		new_connect = _gotohTraceRectangle(mapIt->second.i2,  matr_it, matrix_diag, matrix_vert, matrix_hori, width_stop, height_stop);
+		score_str_diag[j] = *matr_it;
+		score_str_vert[j] = getValue(matrix_vert,position(matr_it));
+		score_str_hori[j] = getValue(matrix_hori,position(matr_it));
+
+		mapIt->second.i1 = new_connect;
+		goNext(matr_it, 1);
+		++height_align;
+		--height_stop;
+		if (old_connect != new_connect){
+			_deleteAlignment(alignmentVector, old_connect, new_connect);
+		}
+		old_connect = new_connect;
+	}
+	for(TValue j = height_diag; j < overall; ++j)
+	{
+		alignmentVector.back().insert(std::make_pair(j,Pair<TValue, TAlign> ()));
+		TMapIterator mapIt = --(alignmentVector.back().end());
+		TSegment seg1_align = infix(host(*p_seq1), width_align, leftDim0(seed) + w_d2);
+		TSegment seg2_align = infix(host(*p_seq2), height_align, leftDim1(seed)+ h_d2);
+		resize(rows(mapIt->second.i2),2);
+		assignSource(row(mapIt->second.i2,0), seg1_align);
+		assignSource(row(mapIt->second.i2,1), seg2_align);
+		new_connect = _gotohTraceRectangle(mapIt->second.i2,  matr_it, matrix_diag, matrix_vert, matrix_hori, width_stop, height_stop);
+		score_str_diag[j] = *matr_it;
+		score_str_vert[j] = getValue(matrix_vert,position(matr_it));
+		score_str_hori[j] = getValue(matrix_hori,position(matr_it));
+		mapIt->second.i1 = new_connect;
+		goPrevious(matr_it,0);
+		--width_align;
+		++width_stop;
+		if (old_connect != new_connect)
+			_deleteAlignment(alignmentVector, old_connect, new_connect);
+		old_connect = new_connect;
+	}
+	_deleteAlignment(alignmentVector, old_connect, score_length);
+	score_length = length(score_str_diag);
+}
+
+
+
+//Rectangle calculation between two seeds
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed>
+void
+_gotohRectangle(Matrix<TScoreValue, DIMENSION> & matrix_diag,
+				 Matrix<TScoreValue, DIMENSION> & matrix_vert,
+				 Matrix<TScoreValue, DIMENSION> & matrix_hori,	//edit matrix
+				 Seed<TValue, TSpecSeed> const &seed1,				//Seed nearer to the end
+				 Seed<TValue, TSpecSeed> const &seed2,				//Seed nearer to the start
+				 TValue2 k_begin,									//upper diagonal extension
+				 TValue2 k_end,										//lower diagonal extension
+				 TString const & str1_,								//first sequence
+				 TString const & str2_,								//secondSequence
+				 Score<TScoreValue, Simple> const & score_,			//score matrix
+				 String<TScoreValue> & init_diag,					//Values for initialisation
+				 String<TScoreValue> & init_vert,					//Values for initialisation
+				 String<TScoreValue> & init_hori)					//Values for initialisation
+{
+SEQAN_CHECKPOINT
+
+
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, PositionIterator>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TAlphabet;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+
+	TValue inf = -1000000;
+
+	TValue diag_height1 = leftDiagonal(seed1) - startDiagonal(seed1) + k_begin;
+	TValue diag_width1 = startDiagonal(seed1) - rightDiagonal(seed1) + k_begin;
+
+	TValue diag_height2 = endDiagonal(seed2) - rightDiagonal(seed2) + k_end;
+	TValue diag_width2 = leftDiagonal(seed2) - endDiagonal(seed2) + k_end;
+
+
+	TValue rectangle_height = leftDim1(seed1) - rightDim1(seed2) -1;
+	TValue rectangle_width = length(str1_);
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap_extend = scoreGapExtend(score_);
+	TScoreValue score_gap_open = scoreGapOpen(score_);
+
+	TValue str1_length = length(str1_);
+	TValue str2_length = length(str2_);
+	setLength(matrix_diag, 0, str1_length + 1);
+	setLength(matrix_diag, 1, str2_length + 1);
+	setLength(matrix_vert, 0, str1_length + 1);
+	setLength(matrix_vert, 1, str2_length + 1);
+	setLength(matrix_hori, 0, str1_length + 1);
+	setLength(matrix_hori, 1, str2_length + 1);
+	
+	//cout << str1_length << " "<<str2_length << endl;
+	resize(matrix_diag);
+	//cout << "ende" << endl;
+	resize(matrix_vert);
+	resize(matrix_hori);
+
+	TMatrixIterator col_diag = begin(matrix_diag);
+	TMatrixIterator col_hori = begin(matrix_hori);
+	TMatrixIterator col_vert = begin(matrix_vert);
+	//Initialisierung
+
+	setPosition(col_diag, str1_length);
+	setPosition(col_hori, str1_length);
+	setPosition(col_vert, str1_length);
+	for (int i = 0; i!= diag_height2+rectangle_height;++i)
+	{
+		*col_diag = inf;
+		goNext(col_diag,1);
+		*col_vert = inf;
+		goNext(col_vert,1);
+		*col_hori = inf;
+		goNext(col_hori,1);
+	}
+
+
+	setPosition(col_diag, (diag_height2 + rectangle_height+1)*(str1_length+1)-1);
+	setPosition(col_hori, (diag_height2 + rectangle_height+1)*(str1_length+1)-1);
+	setPosition(col_vert, (diag_height2 + rectangle_height+1)*(str1_length+1)-1);
+	
+	for (int i = 0; i != diag_width1; ++i)
+	{		
+		*col_diag = init_diag[i];
+		--col_diag;
+		*col_vert = init_vert[i];
+		--col_vert;
+		*col_hori = init_hori[i];
+		--col_hori;
+	}
+
+	TValue len = length(init_diag);
+	for (int i = diag_width1; i != len; ++i)
+	{
+		*col_diag=init_diag[i];
+		goNext(col_diag,1);
+		*col_vert=init_vert[i];
+		goNext(col_vert,1);
+		*col_hori=init_hori[i];
+		goNext(col_hori,1);
+	}
+
+	goPrevious(col_diag,1);
+	TMatrixIterator finger2_diag =col_diag;
+	--col_diag;
+
+	goPrevious(col_vert,1);
+	TMatrixIterator finger2_vert =col_vert;
+	--col_vert;
+	
+	goPrevious(col_hori,1);
+	TMatrixIterator finger2_hori =col_hori;
+	--col_hori;
+
+
+	TValue width_align = str1_length - diag_width1;
+	for (int i = 0; i!= width_align; ++i)
+	{
+		*col_diag = inf;
+		--col_diag;
+		*col_vert = inf;
+		--col_vert;
+		*col_hori = inf;
+		--col_hori;
+	}
+
+	//MAIN
+	TStringIterator x_begin = begin(str1_);
+	--x_begin;
+	TStringIterator x_end = end(str1_) -1;
+	setPosition(x_end,width_align-1);
+	TStringIterator y_begin = begin(str2_);
+	TStringIterator y_end = end(str2_)-1;
+	TStringIterator x,y;
+
+	col_diag = finger2_diag;	
+	col_vert = finger2_vert;
+	col_hori = finger2_hori;
+
+	TMatrixIterator finger1;
+	
+	
+	TScoreValue hori_value, vert_value, diag_value_down, diag_value_right, diag_value_tmp;
+	TMatrixIterator finger_diag_down, finger_vert_down;
+
+	for (int i = 0; i < diag_height1; ++i)
+	{
+		finger2_hori = col_hori;
+		goPrevious(finger2_hori,1);
+		hori_value = *finger2_hori;
+		--finger2_hori;
+		goPrevious(col_hori,1);
+
+		finger2_vert = col_vert;
+		--finger2_vert;
+		finger_vert_down = finger2_vert;
+		goPrevious(finger2_vert,1);
+		goPrevious(col_vert,1);
+
+		finger2_diag = col_diag;
+		diag_value_down = *finger2_diag;
+		--finger2_diag;
+		finger_diag_down = finger2_diag;
+		goPrevious(finger2_diag,1);
+		goPrevious(col_diag,1);
+		diag_value_right = *col_diag;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			diag_value_tmp = *finger_diag_down;
+
+			hori_value = (hori_value+score_gap_extend > diag_value_right+score_gap_open) ? hori_value+score_gap_extend : diag_value_right+score_gap_open;
+			*finger2_hori = hori_value;
+			--finger2_hori;
+			
+			vert_value = *finger_vert_down;
+			vert_value = (vert_value+score_gap_extend > diag_value_tmp+score_gap_open) ? vert_value+score_gap_extend : diag_value_tmp+score_gap_open;
+			*finger2_vert = vert_value;
+			--finger2_vert;
+			--finger_vert_down;
+
+			TScoreValue tmp_diag = hori_value > vert_value ? hori_value : vert_value;
+			diag_value_down = diag_value_down + ((*x == *y_end) ? score_match : score_mismatch);
+			if (diag_value_down < tmp_diag)
+				diag_value_down = tmp_diag;
+			diag_value_right= diag_value_down;
+			*finger2_diag = diag_value_down;
+			
+			
+			diag_value_down = diag_value_tmp;
+			--finger2_diag;
+			--finger_diag_down;
+
+		}
+		--y_end;
+	}
+
+	setPosition(col_diag,(diag_height2 + rectangle_height+1)*(rectangle_width+1)-1);
+	setPosition(col_vert,(diag_height2 + rectangle_height+1)*(rectangle_width+1)-1);
+	setPosition(col_hori,(diag_height2 + rectangle_height+1)*(rectangle_width+1)-1);
+
+	x_end = end(str1_) -1;
+	for (int i = 0; i < rectangle_height; ++i)
+	{
+		finger2_hori = col_hori;
+		goPrevious(finger2_hori,1);
+		hori_value = *finger2_hori;
+		--finger2_hori;
+		goPrevious(col_hori,1);
+
+		finger2_vert = col_vert;
+		--finger2_vert;
+		finger_vert_down = finger2_vert;
+		goPrevious(finger2_vert,1);
+		goPrevious(col_vert,1);
+
+		finger2_diag = col_diag;
+		diag_value_down = *finger2_diag;
+		--finger2_diag;
+		finger_diag_down = finger2_diag;
+		goPrevious(finger2_diag,1);
+		goPrevious(col_diag,1);
+		diag_value_right = *col_diag;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			diag_value_tmp = *finger_diag_down;
+
+			hori_value = (hori_value+score_gap_extend > diag_value_right+score_gap_open) ? hori_value+score_gap_extend : diag_value_right+score_gap_open;
+			*finger2_hori = hori_value;
+			--finger2_hori;
+			
+			vert_value = *finger_vert_down;
+			vert_value = (vert_value+score_gap_extend > diag_value_tmp+score_gap_open) ? vert_value+score_gap_extend : diag_value_tmp+score_gap_open;
+			*finger2_vert = vert_value;
+			--finger2_vert;
+			--finger_vert_down;
+
+			TScoreValue tmp_diag = hori_value > vert_value ? hori_value : vert_value;
+			diag_value_down = diag_value_down + ((*x == *y_end) ? score_match : score_mismatch);
+			if (diag_value_down < tmp_diag)
+				diag_value_down = tmp_diag;
+			diag_value_right= diag_value_down;
+			*finger2_diag = diag_value_down;
+			
+			
+			diag_value_down = diag_value_tmp;
+			--finger2_diag;
+			--finger_diag_down;
+		}
+		--y_end;
+	}
+
+	setPosition(x_begin,diag_width2-1);
+
+	for (int i = 0; i < diag_height2; ++i)
+	{
+		finger2_hori = col_hori;
+		goPrevious(finger2_hori,1);
+		hori_value = *finger2_hori;
+		--finger2_hori;
+		goPrevious(col_hori,1);
+
+		finger2_vert = col_vert;
+		--finger2_vert;
+		finger_vert_down = finger2_vert;
+		goPrevious(finger2_vert,1);
+		goPrevious(col_vert,1);
+
+		finger2_diag = col_diag;
+		diag_value_down = *finger2_diag;
+		--finger2_diag;
+		finger_diag_down = finger2_diag;
+		goPrevious(finger2_diag,1);
+		goPrevious(col_diag,1);
+		diag_value_right = *col_diag;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			diag_value_tmp = *finger_diag_down;
+
+			hori_value = (hori_value+score_gap_extend > diag_value_right+score_gap_open) ? hori_value+score_gap_extend : diag_value_right+score_gap_open;
+			*finger2_hori = hori_value;
+			--finger2_hori;
+			
+			vert_value = *finger_vert_down;
+			vert_value = (vert_value+score_gap_extend > diag_value_tmp+score_gap_open) ? vert_value+score_gap_extend : diag_value_tmp+score_gap_open;
+			*finger2_vert = vert_value;
+			--finger2_vert;
+			--finger_vert_down;
+
+			TScoreValue tmp_diag = hori_value > vert_value ? hori_value : vert_value;
+			diag_value_down = diag_value_down + ((*x == *y_end) ? score_match : score_mismatch);
+			if (diag_value_down < tmp_diag)
+				diag_value_down = tmp_diag;
+			diag_value_right= diag_value_down;
+			*finger2_diag = diag_value_down;
+			
+			
+			diag_value_down = diag_value_tmp;
+			--finger2_diag;
+			--finger_diag_down;
+		}
+		--y_end;
+	}
+}
+
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString>
+void
+_gotoh2(Matrix<TScoreValue, DIMENSION> & matrix_diag,		//edit matrix
+		Matrix<TScoreValue, DIMENSION> & matrix_vert,		//edit matrix
+		Matrix<TScoreValue, DIMENSION> & matrix_hori,		//edit matrix
+		TString const & str1_,								//first sequence
+		TString const & str2_,								//secondSequence
+		Score<TScoreValue, Simple> const & score_)			//score matrix
+{
+	SEQAN_CHECKPOINT
+
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+	typedef typename Size<TMatrix> ::Type TValue;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, PositionIterator>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TAlphabet;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+
+	TScoreValue inf = -1000000;
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap_extend = scoreGapExtend(score_);
+	TScoreValue score_gap_open = scoreGapOpen(score_);
+
+	
+
+	TValue str1_length = length(str1_);
+	TValue str2_length = length(str2_);
+	setLength(matrix_diag, 0, str1_length + 1);
+	setLength(matrix_diag, 1, str2_length + 1);
+	setLength(matrix_vert, 0, str1_length + 1);
+	setLength(matrix_vert, 1, str2_length + 1);
+	setLength(matrix_hori, 0, str1_length + 1);
+	setLength(matrix_hori, 1, str2_length + 1);
+	
+		//cout << str1_length << " "<<str2_length << endl;
+	resize(matrix_diag);
+	//cout << "ende" << endl;
+	resize(matrix_vert);
+	resize(matrix_hori);
+
+	TMatrixIterator col_diag = begin(matrix_diag);
+	TMatrixIterator col_hori = begin(matrix_hori);
+	TMatrixIterator col_vert = begin(matrix_vert);
+	TMatrixIterator finger2_diag, finger2_vert, finger2_hori;
+	//Initialisierung
+
+	setPosition(col_diag, str1_length);
+	setPosition(col_hori, str1_length);
+	setPosition(col_vert, str1_length);
+	
+	TScoreValue border = (str2_length-1) * score_gap_extend + score_gap_open; 
+	
+	for (int i = str2_length; i!= 0 ;--i)
+	{
+		*col_diag = border;
+		goNext(col_diag,1);
+		*col_vert = border;
+		goNext(col_vert,1);
+		*col_hori = inf;
+		goNext(col_hori,1);
+		border -= score_gap_extend;
+	}
+
+
+	*col_diag = 0;
+	*col_hori = inf;
+	*col_hori = inf;
+	border = score_gap_open;
+
+	for (unsigned int i = 0; i!= str1_length; ++i)
+	{
+		--col_diag;
+		*col_diag = border;
+		--col_vert;
+		*col_vert = inf;
+		--*col_hori;
+		*col_hori = border;
+		border += score_gap_extend;
+	}
+
+	col_diag = end(matrix_diag);
+	--col_diag;
+	col_vert = end(matrix_vert);
+	--col_vert;
+	col_hori = end(matrix_hori);
+	--col_hori;
+
+	//MAIN
+	TStringIterator x_begin = begin(str1_);
+	--x_begin;
+	TStringIterator x_end = end(str1_) -1;
+	
+	TStringIterator y_begin = begin(str2_);
+	TStringIterator y_end = end(str2_)-1;
+	TStringIterator x,y;
+
+	finger2_diag = col_diag;	
+	finger2_vert = col_vert;
+	finger2_hori = col_hori;
+
+	TMatrixIterator finger1;
+	
+	
+	TScoreValue hori_value, vert_value, diag_value_down, diag_value_right, diag_value_tmp;
+	TMatrixIterator finger_diag_down, finger_vert_down;
+
+	x_end = end(str1_) -1;
+	for (unsigned int i = 0; i < str2_length; ++i)
+	{
+		finger2_hori = col_hori;
+		goPrevious(finger2_hori,1);
+		hori_value = *finger2_hori;
+		--finger2_hori;
+		goPrevious(col_hori,1);
+
+		finger2_vert = col_vert;
+		--finger2_vert;
+		finger_vert_down = finger2_vert;
+		goPrevious(finger2_vert,1);
+		goPrevious(col_vert,1);
+
+		finger2_diag = col_diag;
+		diag_value_down = *finger2_diag;
+		--finger2_diag;
+		finger_diag_down = finger2_diag;
+		goPrevious(finger2_diag,1);
+		goPrevious(col_diag,1);
+		diag_value_right = *col_diag;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			diag_value_tmp = *finger_diag_down;
+
+			hori_value = (hori_value+score_gap_extend > diag_value_right+score_gap_open) ? hori_value+score_gap_extend : diag_value_right+score_gap_open;
+			*finger2_hori = hori_value;
+			--finger2_hori;
+			
+			vert_value = *finger_vert_down;
+			vert_value = (vert_value+score_gap_extend > diag_value_tmp+score_gap_open) ? vert_value+score_gap_extend : diag_value_tmp+score_gap_open;
+			*finger2_vert = vert_value;
+			--finger2_vert;
+			--finger_vert_down;
+
+			TScoreValue tmp_diag = hori_value > vert_value ? hori_value : vert_value;
+			diag_value_down = diag_value_down + ((*x == *y_end) ? score_match : score_mismatch);
+			if (diag_value_down < tmp_diag)
+				diag_value_down = tmp_diag;
+			diag_value_right= diag_value_down;
+			*finger2_diag = diag_value_down;
+			
+			
+			diag_value_down = diag_value_tmp;
+			--finger2_diag;
+			--finger_diag_down;
+		}
+		--y_end;
+	}
+}
+
+//changed version of usual trace-back
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION, typename TValue, typename TMatrix>
+TValue
+_gotohTraceRectangle(Align<TTargetSource, TTargetSpec> & target_,
+						Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > & diag_source,
+						TMatrix & diag_matrix_, 
+						TMatrix & vert_matrix_, 
+						TMatrix & hori_matrix_, 
+						TValue width_stop, 
+						TValue height_stop)
+{
+	typedef typename Position<Matrix<TScoreValue, DIMENSION> >::Type TPosition;
+
+	typedef Align<TTargetSource, TTargetSpec> TAlign;
+	typedef typename Row<TAlign>::Type TRow;
+	typedef typename Iterator<TRow, Standard>::Type TTargetIterator;
+    typedef typename Infix<TTargetSource>::Type TTargetSourceSegment;
+	typedef typename Iterator<TTargetSourceSegment, Rooted>::Type TStringIterator;
+
+	TTargetSourceSegment str_0 = sourceSegment(row(target_, 0));
+	TTargetSourceSegment str_1 = sourceSegment(row(target_, 1));
+	typename Size<TTargetSourceSegment>::Type dim_0_len = length(hori_matrix_,0);
+
+	TPosition pos = position(diag_source);
+
+	TTargetIterator target_0 = iter(row(target_, 0), 0, Standard());
+	TTargetIterator target_1 = iter(row(target_, 1), 0, Standard());
+
+	TStringIterator it_0 = iter(str_0, 0);
+	TStringIterator it_1 = iter(str_1, 0);
+
+	while ((static_cast<TValue>(position(it_0)) < width_stop) || (static_cast<TValue>(position(it_1)) < height_stop))
+	{
+		//cout << "arg" << endl;
+		if (getValue(diag_matrix_,pos) == getValue(hori_matrix_,pos))
+		{
+			++it_0;
+			insertGap(target_1);
+			++pos;
+		}
+		else
+		{
+			if (getValue(diag_matrix_,pos) != getValue(vert_matrix_,pos)) 
+			{					
+				++it_0;
+				++it_1;
+				pos += dim_0_len+1;
+			} 
+			else
+			{
+				++it_1;
+				insertGap(target_0);
+				pos += dim_0_len;
+			}
+		}
+		++target_0;
+		++target_1;
+	}
+
+	//-------------------------------------------------------------------------
+	//follow the trace until the border is reached
+
+
+
+
+	setClippedEndPosition(row(target_,1),position(it_1));
+	setClippedEndPosition(row(target_,0),position(it_0));
+
+	return length(diag_matrix_,0) - (pos % dim_0_len) + position(it_1) - height_stop -1;
+}
+
+
+//Rectangle calculation between two seeds
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed>
+void
+_bandedGotohRectangleFirst(Matrix<TScoreValue, DIMENSION> & matrix_diag,	//edit matrix
+							  Matrix<TScoreValue, DIMENSION> & matrix_vert,
+							  Matrix<TScoreValue, DIMENSION> & matrix_hori,
+							  Seed<TValue, TSpecSeed> const &seed,				//Seed
+							  TValue2 k,											//diagonal extension
+							  TString const & str1_,							//first sequence
+							  TString const & str2_,							//secondSequence
+							  Score<TScoreValue, Simple> const & score_,		//score matrix
+							  String<TScoreValue> & init_diag,					//Values for initialisation
+							  String<TScoreValue> & init_vert,
+							  String<TScoreValue> & init_hori)					
+{
+SEQAN_CHECKPOINT
+
+
+	typedef Matrix<TScoreValue, DIMENSION> TMatrix;
+
+	typedef typename Size<TMatrix>::Type TSize;
+	typedef typename Iterator<TMatrix, PositionIterator>::Type TMatrixIterator;
+
+	typedef typename Iterator<TString const, Rooted>::Type TStringIterator;
+	typedef typename Value<TString const>::Type TAlphabet;
+
+	//-------------------------------------------------------------------------
+	//define some variables
+	TValue inf = -1000000;
+
+	TValue diag_height1 = leftDiagonal(seed) - startDiagonal(seed) + k;
+	TValue diag_width1 = startDiagonal(seed) - rightDiagonal(seed) + k;
+
+	TValue rectangle_height = leftDim1(seed) - beginPosition(str1_);
+	TValue rectangle_width = length(str1_);
+
+	TScoreValue score_match = scoreMatch(score_);
+	TScoreValue score_mismatch = scoreMismatch(score_);
+	TScoreValue score_gap_extend = scoreGapExtend(score_);
+	TScoreValue score_gap_open = scoreGapOpen(score_);
+
+	TValue str1_length = length(str1_);
+	TValue str2_length = length(str2_);
+	setLength(matrix_diag, 0, str1_length + 1);
+	setLength(matrix_diag, 1, str2_length + 1);
+	setLength(matrix_vert, 0, str1_length + 1);
+	setLength(matrix_vert, 1, str2_length + 1);
+	setLength(matrix_hori, 0, str1_length + 1);
+	setLength(matrix_hori, 1, str2_length + 1);
+
+	resize(matrix_diag);
+	resize(matrix_vert);
+	resize(matrix_hori);
+
+	TMatrixIterator col_diag = begin(matrix_diag);
+	TMatrixIterator col_hori = begin(matrix_hori);
+	TMatrixIterator col_vert = begin(matrix_vert);
+
+	//Initialisierung
+
+	setPosition(col_diag, str1_length);
+	setPosition(col_hori, str1_length);
+	setPosition(col_vert, str1_length);
+	for (int i = 0; i!= rectangle_height+1;++i)
+	{
+		*col_diag = inf;
+		goNext(col_diag,1);
+		*col_vert = inf;
+		goNext(col_vert,1);
+		*col_hori = inf;
+		goNext(col_hori,1);
+	}
+
+	setPosition(col_diag, (rectangle_height+1)*(str1_length+1)-1);
+	setPosition(col_hori, (rectangle_height+1)*(str1_length+1)-1);
+	setPosition(col_vert, (rectangle_height+1)*(str1_length+1)-1);
+	
+	for (int i = 0; i != diag_width1; ++i)
+	{		
+		*col_diag = init_diag[i];
+		--col_diag;
+		*col_vert = init_vert[i];
+		--col_vert;
+		*col_hori = init_hori[i];
+		--col_hori;
+	}
+
+	TValue len = length(init_diag);
+	for (int i = diag_width1; i != len; ++i)
+	{
+		*col_diag=init_diag[i];
+		goNext(col_diag,1);
+		*col_vert=init_vert[i];
+		goNext(col_vert,1);
+		*col_hori=init_hori[i];
+		goNext(col_hori,1);
+	}
+
+	goPrevious(col_diag,1);
+	TMatrixIterator finger2_diag =col_diag;
+	--col_diag;
+
+	goPrevious(col_vert,1);
+	TMatrixIterator finger2_vert =col_vert;
+	--col_vert;
+	
+	goPrevious(col_hori,1);
+	TMatrixIterator finger2_hori =col_hori;
+	--col_hori;
+
+
+	TValue width_align = str1_length - diag_width1;
+	for (int i = 0; i!= width_align; ++i)
+	{
+		*col_diag = inf;
+		--col_diag;
+		*col_vert = inf;
+		--col_vert;
+		*col_hori = inf;
+		--col_hori;
+	}
+
+
+	//MAIN
+	TStringIterator x_begin = begin(str1_);
+	--x_begin;
+	TStringIterator x_end = end(str1_) -1;
+	setPosition(x_end,width_align-1);
+	TStringIterator y_begin = begin(str2_);
+	TStringIterator y_end = end(str2_)-1;
+	TStringIterator x,y;
+
+	col_diag = finger2_diag;	
+	col_vert = finger2_vert;
+	col_hori = finger2_hori;
+
+	TMatrixIterator finger1;
+	
+	
+	TScoreValue hori_value, vert_value, diag_value_down, diag_value_right, diag_value_tmp;
+	TMatrixIterator finger_diag_down, finger_vert_down;
+
+	for (int i = 0; i < diag_height1; ++i)
+	{
+		finger2_hori = col_hori;
+		goPrevious(finger2_hori,1);
+		hori_value = *finger2_hori;
+		--finger2_hori;
+		goPrevious(col_hori,1);
+
+		finger2_vert = col_vert;
+		--finger2_vert;
+		finger_vert_down = finger2_vert;
+		goPrevious(finger2_vert,1);
+		goPrevious(col_vert,1);
+
+		finger2_diag = col_diag;
+		diag_value_down = *finger2_diag;
+		--finger2_diag;
+		finger_diag_down = finger2_diag;
+		goPrevious(finger2_diag,1);
+		goPrevious(col_diag,1);
+		diag_value_right = *col_diag;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			diag_value_tmp = *finger_diag_down;
+
+			hori_value = (hori_value+score_gap_extend > diag_value_right+score_gap_open) ? hori_value+score_gap_extend : diag_value_right+score_gap_open;
+			*finger2_hori = hori_value;
+			--finger2_hori;
+			
+			vert_value = *finger_vert_down;
+			vert_value = (vert_value+score_gap_extend > diag_value_tmp+score_gap_open) ? vert_value+score_gap_extend : diag_value_tmp+score_gap_open;
+			*finger2_vert = vert_value;
+			--finger2_vert;
+			--finger_vert_down;
+
+			TScoreValue tmp_diag = hori_value > vert_value ? hori_value : vert_value;
+			diag_value_down = diag_value_down + ((*x == *y_end) ? score_match : score_mismatch);
+			if (diag_value_down < tmp_diag)
+				diag_value_down = tmp_diag;
+			diag_value_right= diag_value_down;
+			*finger2_diag = diag_value_down;
+			
+			
+			diag_value_down = diag_value_tmp;
+			--finger2_diag;
+			--finger_diag_down;
+
+		}
+		--y_end;
+	}
+
+	setPosition(col_diag,(rectangle_height+1)*(rectangle_width+1)-1);
+	setPosition(col_vert,(rectangle_height+1)*(rectangle_width+1)-1);
+	setPosition(col_hori,(rectangle_height+1)*(rectangle_width+1)-1);
+
+	x_end = end(str1_) -1;
+	for (int i = 0; i < rectangle_height; ++i)
+	{
+		finger2_hori = col_hori;
+		goPrevious(finger2_hori,1);
+		hori_value = *finger2_hori;
+		--finger2_hori;
+		goPrevious(col_hori,1);
+
+		finger2_vert = col_vert;
+		--finger2_vert;
+		finger_vert_down = finger2_vert;
+		goPrevious(finger2_vert,1);
+		goPrevious(col_vert,1);
+
+		finger2_diag = col_diag;
+		diag_value_down = *finger2_diag;
+		--finger2_diag;
+		finger_diag_down = finger2_diag;
+		goPrevious(finger2_diag,1);
+		goPrevious(col_diag,1);
+		diag_value_right = *col_diag;
+
+		for (x = x_end; x != x_begin; --x)
+		{
+			diag_value_tmp = *finger_diag_down;
+
+			hori_value = (hori_value+score_gap_extend > diag_value_right+score_gap_open) ? hori_value+score_gap_extend : diag_value_right+score_gap_open;
+			*finger2_hori = hori_value;
+			--finger2_hori;
+			
+			vert_value = *finger_vert_down;
+			vert_value = (vert_value+score_gap_extend > diag_value_tmp+score_gap_open) ? vert_value+score_gap_extend : diag_value_tmp+score_gap_open;
+			*finger2_vert = vert_value;
+			--finger2_vert;
+			--finger_vert_down;
+
+			TScoreValue tmp_diag = hori_value > vert_value ? hori_value : vert_value;
+			diag_value_down = diag_value_down + ((*x == *y_end) ? score_match : score_mismatch);
+			if (diag_value_down < tmp_diag)
+				diag_value_down = tmp_diag;
+			diag_value_right= diag_value_down;
+			*finger2_diag = diag_value_down;
+			
+			
+			diag_value_down = diag_value_tmp;
+			--finger2_diag;
+			--finger_diag_down;
+		}
+		--y_end;
+	}
+	//printMatrix(matrix_diag);
+
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/seeds/global_seed_chain.h b/src/SeqAn-1.3/seqan/seeds/global_seed_chain.h
new file mode 100644
index 0000000..03fedfe
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/global_seed_chain.h
@@ -0,0 +1,306 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GLOBAL_SEED_CHAIN_H
+#define SEQAN_HEADER_GLOBAL_SEED_CHAIN_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//Changed version of skiplist find so that the biggest element smaller than the searched one is found
+template <typename TValue, typename TSpec, typename TFind>
+inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type
+_findPrev(Map<TValue, Skiplist<TSpec> > & me,
+	 TFind const & _find, //can be a TKey or a SkiplistElement or GoEnd
+	 SkiplistPath<TValue, TSpec> & path) 
+{
+	typedef typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type TIterator;
+
+	_skiplistFind(me, _find, path);
+	return TIterator(path.data_elements[0]);
+}
+
+//Changed version of skiplist find so that the biggest element smaller than the searched one is found
+template <typename TValue, typename TSpec, typename TFind>
+inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type
+_findPrev(Map<TValue, Skiplist<TSpec> > & me,
+	 TFind const & _find) //can be a TKey or a SkiplistElement or GoEnd
+{
+	typedef SkiplistPath<TValue, TSpec> TPath;
+	TPath path;
+	return _findPrev(me, _find, path);
+}
+
+/*DISABLED
+.Function.globalChaining
+..summary:Global chaining of a set of seeds.
+..cat:Seed Handling
+..cat:Chaining
+..signature:globalChaining(source, result)
+..signature:globalChaining(source, result, gapCost, xLength, yLength)
+..param.source: The set of seeds to chain.
+...type:Spec.Scored SeedSet
+..param.result: Container in which the result should be stored. The chain is in reversed order.
+..param.gapCost: Gap cost value.
+..param.xLength: Length of the first sequence.
+..param.yLength: Length of the second sequence.
+..returns: The score of the chain.
+..include:seqan/seeds.h
+*/
+
+/**
+.Function.globalChaining:
+..summary:Computes the chain on a set of fragments.
+..cat:Chaining
+..signature:globalChaining(source, dest [, score] [, algorithm])
+..param.source:The set of fragments.
+...remarks:This could be either a container of seeds or a @Class.SeedSet@ object.
+..param.dest:Container in which the result should be stored.
+..param.score:The gap scoring scheme.
+...default:@Spec.Score Zero@
+...class:Spec.Score Manhattan
+...class:Spec.Score Zero
+...class:Spec.Score ChainSoP
+..param.algorithm:A tag that identifies the algorithm which is used for chaining.
+...default:$Default$
+...value:$Default$: Compiler selects best algorithm.
+...value:$GenericChaining$: A simple generic chaining algorithm.
+...value:$RangetreeChaining$: An elaborated chaining algorithm for @Spec.Score Zero@, @Spec.Score Manhattan@, and @Spec.Score ChainSoP@ scoring schemes.
+..include:seqan/seeds.h
+*/
+template<typename TValue, typename TSeedSpec, typename TScoreSpec, typename TSpec, typename TTargetContainer>
+typename ScoreType<TScoreSpec>::Type
+globalChaining(SeedSet<TValue, TSeedSpec, TScoreSpec, TSpec> const &source,	//Seedset containing the seeds
+			   TTargetContainer &result)									//container for the result chain
+{
+	SEQAN_CHECKPOINT
+	typedef typename ScoreType<TScoreSpec>::Type TScore;
+	typedef SeedSet<TValue, TSeedSpec, TScoreSpec, TSpec> TSeedSet;
+	typedef typename Iterator<TSeedSet const , Standard>::Type TSeedSetIterator;
+	typedef Triple<TSeedSetIterator, TScore, void*> TChainElement;
+	typedef Map<Pair<TValue, TChainElement*> > TSkiplist; //sorted by y-coordinate
+	typedef typename Iterator<TSkiplist, Standard>::Type TSkiplistIterator;
+
+	typedef std::multimap<TValue, Pair<bool, TChainElement*> > TMultiMap;
+	typedef typename TMultiMap::iterator TMapIterator;
+	TSkiplist list;
+	TChainElement* pElement =0;
+	add(list,-1,pElement);
+
+	TMultiMap pointArray, test; //sorted by x-coodinate
+	
+	TSeedSetIterator it_end = end(source);
+	for (TSeedSetIterator it = begin(source); it != it_end; ++it)
+	{
+		pElement = new TChainElement(it, seedScore(it), 0);
+		pointArray.insert(std::make_pair(leftDim0(*it), Pair<bool, TChainElement*>(true, pElement)));
+		test.insert(std::make_pair(rightDim0(*it), Pair<bool, TChainElement*>(false, pElement)));
+	}
+
+	TMapIterator it_map_end2 = test.end();
+	for (TMapIterator it = test.begin(); it != it_map_end2; ++it)
+	{
+		pointArray.insert(std::make_pair(it->first, it->second));
+	}
+
+	TSkiplistIterator it_test = begin(list);
+
+	TMapIterator it_map_end = pointArray.end();
+	for (TMapIterator it = pointArray.begin(); it != it_map_end; ++it)
+	{
+		if (it->second.i1)
+		{
+			TSkiplistIterator it_skip = _findPrev(list, leftDim1(*it->second.i2->i1));
+			if (it_skip != it_test){
+				it->second.i2->i2 += ((*it_skip).i2)->i2;   //score
+				it->second.i2->i3 = (*it_skip).i2;			//predecessor
+			}
+		} 
+		else
+		{
+			insertTriple(list, it->second.i2);
+		}
+
+	}
+	TSkiplistIterator it_skip = _findPrev(list, maxValue<TValue>());
+	pElement = (*it_skip).i2;
+	TScore best = pElement->i2;
+	TChainElement* delete_pointer;
+
+	while (pElement != 0)
+	{
+		appendValue(result, *pElement->i1);
+		delete_pointer = pElement;
+		pElement = (TChainElement*)pElement->i3;
+		delete(delete_pointer);
+	}
+
+	reverse(result);
+	return best;
+}
+
+template<typename TValue, typename TValue2, typename TSeedSpec, typename TScoreSpec, typename TSpec, typename TTargetContainer, typename TScore>
+TScore
+globalChaining(SeedSet<TValue, TSeedSpec, TScoreSpec, TSpec> const &source, //Seedset containing the seeds
+				TTargetContainer &result,	//container for the result chain
+				TScore gapCost,				//Value for gap costs
+				TValue2 xLength,				//length of the first sequence
+				TValue2 yLength)				//length of the second sequence
+{
+	SEQAN_CHECKPOINT
+	gapCost *= -1;
+	typedef SeedSet<TValue, TSeedSpec, TScoreSpec, TSpec> TSeedSet;
+	typedef typename Iterator<TSeedSet const, Standard>::Type TSeedSetIterator;
+	typedef Triple<TSeedSetIterator, TScore, void*> TChainElement;
+	typedef Map<Pair<TValue, TChainElement*> > TSkiplist; //sorted by y-coordinate
+	typedef typename Iterator<TSkiplist, Standard>::Type TSkiplistIterator;
+	typedef std::multimap<TValue, Pair<bool, TChainElement*> > TMultiMap;
+	typedef typename TMultiMap::iterator TMapIterator;
+
+	TValue total = xLength + yLength;
+	
+	TSkiplist list;
+	TChainElement * pElement =0;
+	//insert
+	add(list,-3,pElement);
+	TMultiMap pointArray, test; //sorted by x-coodinate
+
+	TSeedSetIterator it_end = end(source);
+	for (TSeedSetIterator it = begin(source); it != it_end; ++it)
+	{
+		pElement = new TChainElement(it, seedScore(it)+ (rightDim0(*it) + rightDim1(*it) - leftDim0(*it) - leftDim1(*it)+2-total)*gapCost, 0);
+        pointArray.insert(std::make_pair(leftDim0(*it), Pair<bool, TChainElement*>(true, pElement)));
+        test.insert(std::make_pair(rightDim0(*it), Pair<bool, TChainElement*>(false, pElement)));
+	}
+
+	TMapIterator it_map_end2 = test.end();
+	for (TMapIterator it = test.begin(); it != it_map_end2; ++it)
+        pointArray.insert(std::make_pair(it->first, it->second));
+	
+	TSkiplistIterator it_test = begin(list);
+	TMapIterator it_map_end = pointArray.end();
+	for (TMapIterator it = pointArray.begin(); it != it_map_end; ++it)
+	{
+		if (it->second.i1)
+		{
+			TSkiplistIterator it_skip = _findPrev(list, leftDim1(*it->second.i2->i1));
+			if (it_skip != it_test){
+				it->second.i2->i2 += ((*it_skip).i2)->i2 + total*gapCost;	//score
+				it->second.i2->i3 = (*it_skip).i2;					//predecessor
+			}
+		} 
+		else
+		{
+			insertTriple(list, it->second.i2);
+		}
+
+	}
+
+	TSkiplistIterator it_skip = _findPrev(list, total);
+	pElement = (*it_skip).i2;
+	TScore best = pElement->i2;
+	
+	TChainElement* delete_pointer;
+	while (pElement != 0)
+	{
+		appendValue(result, *pElement->i1);
+		delete_pointer = pElement;
+		pElement = (TChainElement*)pElement->i3;
+		delete(delete_pointer);
+	}
+
+	reverse(result);
+	return best;
+}
+
+template<typename TValue, typename TSeedSpec, typename TScoreSpec, typename TSpec, typename TTargetContainer, typename TScore>
+TScore
+globalChaining(SeedSet<TValue, TSeedSpec, TScoreSpec, TSpec> const &source, //Seedset containing the seeds
+				TTargetContainer &result,	//container for the result chain
+				TScore gapCost)				//Value for gap costs
+{
+	typedef SeedSet<TValue, TSeedSpec, TScoreSpec, TSpec> TSeedSet;
+	typedef typename Iterator<TSeedSet const, Standard>::Type TSeedSetIterator;
+	TSeedSetIterator it_end = end(source);
+	TValue x_length = 0;
+	TValue y_length = 0;
+	for (TSeedSetIterator it = begin(source); it != it_end; ++it)
+	{
+		TValue right = rightPosition(*it, 0);
+		if (right > x_length) x_length = right;
+
+		right = rightPosition(*it, 1);
+		if (right > y_length) y_length = right;
+	}
+	return globalChaining(source, result, gapCost, x_length, y_length);
+}
+
+
+template<typename TValue, typename TChainElement>
+void
+insertTriple(Map<Pair<TValue, TChainElement*> > &list, 
+			 TChainElement* pElement)
+{
+	typedef typename Iterator<Map<Pair<TValue, TChainElement*> > >::Type TIterator;
+	TIterator it = _findPrev(list, rightDim1(*pElement->i1)+1);
+	TIterator it_begin = begin(list);
+	if (it != it_begin)
+	{
+		if (pElement->i2 > ((*it).i2)->i2)
+		{
+			insert(list, rightDim1(*pElement->i1), pElement);
+			TIterator it_tmp = find(list, rightDim1(*pElement->i1));
+			TIterator it_end = end(list);
+			TIterator del;
+			while (it_tmp != it_end)
+			{
+				if ((*it_tmp).i2->i2 < pElement->i2)
+				{
+					del = it_tmp;
+					++it_tmp;
+					erase(list, del);
+				} else
+					++it_tmp;
+			}
+		} 
+		else
+			delete(pElement);
+	} else {
+		add(list, rightDim1(*pElement->i1), pElement);
+	}
+}
+
+
+
+}
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/seeds/memoryManager_base.h b/src/SeqAn-1.3/seqan/seeds/memoryManager_base.h
new file mode 100644
index 0000000..9294e92
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/memoryManager_base.h
@@ -0,0 +1,389 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MEMORYMANAGER_H
+#define SEQAN_HEADER_MEMORYMANAGER_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.MemoryManager:
+..cat:Seed Handling
+..summary:Saves and manages data using IDs.
+..signature:MemoryManager<TValue, Block<size> >
+..param.TValue:The value type, that is the type of the items/characters stored in the manager.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.size:A positive integer that specifies the number of values in each allocated block.
+...remarks: Size has to be a power of 2, e.g., 1024.
+..include:seqan/seeds.h
+*/
+struct FreePointer_;
+typedef Tag<FreePointer_> const FreeMemoryPointer;	
+
+template<typename TValue, typename TSPec, typename TFree> 
+class MemoryManager;
+
+
+/**
+.Spec.MemoryManagerPointer:
+..general:Class.MemoryManager
+..cat:Seed Handling
+..summary: Datasize of at least 4 bytes. Not suitable for many blocks.
+..signature:MemoryManager<TValue, Block<size> >
+..param.TValue:The value type, that is the type of the items/characters stored in the manager.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.size:A positive integer that specifies the number of values in each allocated block.
+...remarks: Size has to be a power of 2, e.g., 1024.
+..include:seqan/seeds.h
+*/
+template<typename TValue, unsigned int SPACE, typename TFree>
+class MemoryManager<TValue, Block<SPACE>, TFree> 
+{
+	typedef String<TValue, Array<SPACE> >				TBlock;
+	typedef TBlock*										PBlock;
+	typedef Allocator< SinglePool<sizeof(TBlock)> >		TAllocator;
+
+public:
+
+	typedef typename Iterator<TBlock, Standard>::Type	TBlockIter;
+	typedef String<PBlock>								TBlockTable;
+
+	TBlockTable		blocks;
+	TBlockIter		blockFirst, blockLast;	// current block boundaries
+	TBlockIter		lastValue;				// pointer to top value
+	TAllocator		alloc;
+
+	
+    void *pEmptySpace;
+	unsigned int exponent;
+	//____________________________________________________________________________
+	      
+	public:
+	MemoryManager():
+		blockFirst(TBlockIter()),
+		blockLast(TBlockIter()),
+		lastValue(TBlockIter()) 
+	{
+		SEQAN_CHECKPOINT
+		unsigned int x = SPACE;
+		exponent = 0;
+		while (x != 1){
+			x >>=1;
+			++exponent;
+		}
+		pEmptySpace = 0;
+	}
+
+	template<typename TSource>
+	MemoryManager(TSource const& source):
+		blockFirst(TBlockIter()),
+		blockLast(TBlockIter()),
+		lastValue(TBlockIter())
+	{
+		SEQAN_CHECKPOINT
+		unsigned int x = SPACE;
+		exponent = 0;
+		while (x != 1){
+			x >>=1;
+			++exponent;
+		}
+		assign(*this, source);
+	} 
+
+	MemoryManager(MemoryManager const & source):
+		blockFirst(TBlockIter()),
+		blockLast(TBlockIter()),
+		lastValue(TBlockIter())
+	{
+		SEQAN_CHECKPOINT 
+		unsigned int x = SPACE;
+		exponent = 0;
+		while (x != 1){
+			x >>=1;
+			++exponent;
+		}
+		assign(*this, source);
+	}
+
+	~MemoryManager() 
+	{
+		clear(*this);
+	}
+
+	//____________________________________________________________________________
+
+
+
+	public:
+		template<typename TPos>
+		inline typename Reference<MemoryManager>::Type 
+			operator[] (TPos pos) 
+		{
+		SEQAN_CHECKPOINT	
+			return value(*this, pos);
+		}
+
+		template<typename TPos>
+		inline typename Reference<MemoryManager const>::Type 
+			operator[] (TPos pos) const 
+		{
+		SEQAN_CHECKPOINT
+			return value(*this, pos);
+		}
+	};
+
+
+template<typename TValue, unsigned int SPACE, typename TFree>
+struct DefaultOverflowImplicit< MemoryManager<TValue, Block<SPACE> , TFree> >
+{
+	typedef Generous Type;
+};
+
+
+///.Metafunction.Value.param.T.type:Class.MemoryManager
+template <typename TValue, unsigned int SPACE, typename TFree>
+struct Value<MemoryManager<TValue,Block<SPACE>, TFree > >
+{
+	typedef TValue Type;
+};
+
+
+template<typename TValue, unsigned int SPACE, typename TFree, typename TSource>
+inline void 
+assign(
+	MemoryManager<TValue, Block<SPACE>, TFree>& target, 
+	TSource const& source) 
+{
+	SEQAN_CHECKPOINT
+	clear(target);
+	_raiseMemory(target,length(source));
+	for (unsigned int i = 0; i < length(source);++i){
+		target[i] = source[i];
+	}
+
+	target.lastValue = &target[length(source)-1];
+
+	target.pEmptySpace = 0;
+	const void* pTmpSource = source.pEmptySpace;
+	void* pTmpTarget = &target.pEmptySpace;
+	while (pTmpSource != 0){
+		typename Size<String<TValue, Block<SPACE> > >::Type pos = _getPosition(source,pTmpSource);
+		*((void**)pTmpTarget) = &target[pos];
+		pTmpSource = (TValue *)source[pos];
+		pTmpTarget = &target[pos];
+	}
+}
+
+template<typename TValue, unsigned int SPACE, typename TFree, typename TPos>
+inline typename Reference<String<TValue, Block<SPACE> > >::Type 
+value(
+	MemoryManager<TValue, Block<SPACE>, TFree >& stack, 
+	TPos const pos) 
+{
+	SEQAN_CHECKPOINT
+	return value(*(stack.blocks[pos>>stack.exponent]), pos % SPACE);
+}
+
+
+template<typename TValue, unsigned int SPACE, typename TFree, typename TPos>
+inline typename Reference<String<TValue, Block<SPACE> > >::Type 
+value(MemoryManager<TValue, Block<SPACE>, TFree > const& stack, 
+	  TPos const pos) 
+{
+	SEQAN_CHECKPOINT
+	return value(*(stack.blocks[pos>>stack.exponent]), pos % SPACE);
+}
+
+template<typename TValue, unsigned int SPACE, typename TFree>
+inline void 
+clear(MemoryManager<TValue, Block<SPACE>, TFree >& me)
+{
+SEQAN_CHECKPOINT
+	typedef String<TValue, Block<SPACE>	>			TBlockString;
+	typedef typename TBlockString::TBlockTable		TBlockTable;
+	typedef typename Iterator<TBlockTable, Standard>::Type	TIter;
+	
+	TIter it = begin(me.blocks), itEnd = end(me.blocks);
+	while (it != itEnd) {
+		deallocate(me.alloc, *it, 1);
+		++it;
+	}
+	me.pEmptySpace = 0;
+	clear(me.blocks);
+	me.lastValue = me.blockLast = typename TBlockString::TBlockIter();
+}
+
+
+template<typename TValue, unsigned int SPACE, typename TFree>
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+length(MemoryManager<TValue, Block<SPACE>, TFree > const & me) 
+{
+	SEQAN_CHECKPOINT
+	if (length(me.blocks))
+		return (length(me.blocks) - 1) * SPACE + (me.lastValue - me.blockFirst) + 1;
+	else
+		return 0;
+}
+
+
+template<typename TValue, unsigned int SPACE, typename TFree>
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+capacity(MemoryManager<TValue, Block<SPACE>, TFree > const & me) 
+{
+SEQAN_CHECKPOINT
+	if (length(me.blocks))
+		return length(me.blocks) * SPACE;
+	else
+		return 0;
+}
+
+
+template<typename TValue, unsigned int SPACE, typename TFree> 
+void
+_raiseMemory(MemoryManager<TValue,Block<SPACE>, TFree > &manager, 
+			 typename Size<String<TValue, Block<SPACE> > >::Type leng)
+{
+	SEQAN_CHECKPOINT
+	while (capacity(manager) < leng){
+		typename Size< String<TValue, Block<SPACE> > >::Type last = length(manager.blocks);
+		resize(manager.blocks, last + 1, typename DefaultOverflowImplicit<String<TValue, Block<SPACE> > >::Type());
+		allocate(manager.alloc, manager.blocks[last], 1);
+		manager.lastValue = manager.blockFirst = begin(*manager.blocks[last]);
+		manager.blockLast = (manager.blockFirst + (SPACE - 1));
+	}
+}
+
+
+/**
+.Function.releaseID:
+..summary: Releases a given id so it can be redistributed later on.
+..cat:Seed Handling
+..signature:releaseID(manager,pos)
+..param.manager: The MemoryManager
+...type:Class.MemoryManager
+..param.pos: The ID that should be released.
+..remarks: The value at this position is not deleted.
+..include:seqan/seeds.h
+*/
+template<typename TValue, unsigned int SPACE, typename TFree, typename TPosition> 
+void
+releaseID(MemoryManager<TValue,Block<SPACE>, TFree > &manager, 
+		  TPosition pos)
+{
+	SEQAN_CHECKPOINT
+	void* pTmp = &manager[pos];
+	*((void**)pTmp) = manager.pEmptySpace;
+	manager.pEmptySpace = &manager[pos];
+}
+
+
+/**
+.Function.obtainID:
+..summary: btains a new id from the id manager.
+..cat:Seed Handling
+..signature:obtainID(manager)
+..param.manager: The MemoryManager
+...type:Class.MemoryManager
+..return: A unused ID.
+..include:seqan/seeds.h
+*/
+template<typename TValue, unsigned int SPACE, typename TFree> 
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+obtainID(MemoryManager<TValue,Block<SPACE>,TFree > &manager)
+{
+	SEQAN_CHECKPOINT
+	if (manager.pEmptySpace == 0){
+		if (length(manager) == capacity(manager)){
+			typename Size< String<TValue, Block<SPACE> > >::Type last = length(manager.blocks);
+			resize(manager.blocks, last + 1, typename DefaultOverflowImplicit<String<TValue, Block<SPACE> > >::Type());
+			allocate(manager.alloc, manager.blocks[last], 1);
+			manager.lastValue = manager.blockFirst = begin(*manager.blocks[last]);
+			manager.blockLast = (manager.blockFirst + (SPACE - 1));
+		/*	for (int i = 0; i < manager.maps.size(); ++i){
+				raiseMemory(manager.maps[i]);
+			}*/
+		} else
+			++manager.lastValue;
+		return length(manager)-1;
+		
+	}else{
+		int i = 0;
+		long tmp = (TValue*)manager.pEmptySpace - (TValue*)manager.blocks[i];
+		while ((tmp >= static_cast<long>(SPACE))||( tmp < 0)){
+			++i;
+			tmp = (TValue*)manager.pEmptySpace - (TValue*)manager.blocks[i];
+		}
+		manager.pEmptySpace = *(void**)manager.pEmptySpace;
+		return i * SPACE + tmp;
+	}
+}
+
+template<typename TValue, unsigned int SPACE, typename TFree> 
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+_getPosition(MemoryManager<TValue,Block<SPACE>, TFree > const &manager,
+			 const void* pointer)
+{
+	SEQAN_CHECKPOINT
+	int i = 0;
+	long tmp = (TValue*)pointer - (TValue*)manager.blocks[i];
+	while ((tmp >= static_cast<long>(SPACE))||( tmp < 0)){
+		++i;
+		tmp = (TValue*)pointer - (TValue*)manager.blocks[i];
+	}
+	return i * SPACE + tmp;
+}
+
+
+template<typename TValue, unsigned int SPACE, typename TFree, typename TPosition> 
+void
+assignValue(MemoryManager<TValue,Block<SPACE>, TFree > &manager, 
+			TPosition pos, 
+			TValue value)
+{
+	SEQAN_CHECKPOINT
+	if (manager.pEmptySpace!=0){
+		void* pTmp = &manager[pos];
+		manager.pEmptySpace =*((void**)pTmp);
+	} 
+	manager[pos] = value;
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/seeds/memoryManager_int.h b/src/SeqAn-1.3/seqan/seeds/memoryManager_int.h
new file mode 100644
index 0000000..99788ec
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/memoryManager_int.h
@@ -0,0 +1,337 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MEMORYMANAGER_INT_H
+#define SEQAN_HEADER_MEMORYMANAGER_INT_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+/**
+.Spec.MemoryManagerIndex:
+..general:Class.MemoryManager
+..cat:Seed Handling
+..summary: Faster than the pointer version but needs data size of at least size_t.
+..signature:MemoryManager<TValue, Block<size> >
+..param.TValue:The value type, that is the type of the items/characters stored in the manager.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.size:A positive integer that specifies the number of values in each allocated block.
+...remarks: Size has to be a power of 2, e.g., 1024.
+..include:seqan/seeds.h
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct FreeInt_;
+typedef Tag<FreeInt_> const FreeMemoryInt;	
+
+template<typename TValue, unsigned int SPACE>
+class MemoryManager<TValue, Block<SPACE>, FreeMemoryInt> 
+{
+	typedef String<TValue, Array<SPACE> >				TBlock;
+	typedef TBlock*										PBlock;
+	typedef Allocator< SinglePool<sizeof(TBlock)> >		TAllocator;
+
+public:
+
+	typedef typename Iterator<TBlock, Standard>::Type	TBlockIter;
+	typedef String<PBlock>								TBlockTable;
+
+	TBlockTable		blocks;
+	TBlockIter		blockFirst, blockLast;	// current block boundaries
+	TBlockIter		lastValue;				// pointer to top value
+	TAllocator		alloc;
+	bool			change;
+
+    size_t pEmptySpace;
+	unsigned int exponent;
+	
+	//____________________________________________________________________________
+	      
+	public:
+	MemoryManager():
+		blockFirst(TBlockIter()),
+		blockLast(TBlockIter()),
+		lastValue(TBlockIter()) 
+	{
+		SEQAN_CHECKPOINT
+		unsigned int x = SPACE;
+		exponent = 0;
+		while (x != 1){
+			x >>=1;
+			++exponent;
+		}
+		pEmptySpace = -1;
+		change = false;
+	}
+
+	template<typename TSource>
+	MemoryManager(TSource const& source):
+		blockFirst(TBlockIter()),
+		blockLast(TBlockIter()),
+		lastValue(TBlockIter())
+	{
+		SEQAN_CHECKPOINT
+		unsigned int x = SPACE;
+		exponent = 0;
+		while (x != 1){
+			x >>=1;
+			++exponent;
+		}
+		assign(*this, source);
+		change = false;
+	} 
+
+	MemoryManager(MemoryManager const & source):
+		blockFirst(TBlockIter()),
+		blockLast(TBlockIter()),
+		lastValue(TBlockIter())
+	{
+		SEQAN_CHECKPOINT 
+		unsigned int x = SPACE;
+		exponent = 0;
+		while (x != 1){
+			x >>=1;
+			++exponent;
+		}
+		assign(*this, source);
+	}
+
+	~MemoryManager() 
+	{
+		clear(*this);
+	}
+
+	//____________________________________________________________________________
+
+
+
+	public:
+		template<typename TPos>
+		inline typename Reference<MemoryManager>::Type 
+			operator[] (TPos pos) 
+		{
+		SEQAN_CHECKPOINT	
+			return value(*this, pos);
+		}
+
+		template<typename TPos>
+		inline typename Reference<MemoryManager const>::Type 
+			operator[] (TPos pos) const 
+		{
+		SEQAN_CHECKPOINT
+			return value(*this, pos);
+		}
+	};
+
+
+template<typename TValue, unsigned int SPACE>
+struct DefaultOverflowImplicit< MemoryManager<TValue, Block<SPACE> , FreeMemoryInt> >
+{
+	typedef Generous Type;
+};
+
+
+///.Metafunction.Value.param.T.type:Class.MemoryManager
+template <typename TValue, unsigned int SPACE>
+struct Value<MemoryManager<TValue,Block<SPACE>, FreeMemoryInt > >
+{
+	typedef TValue Type;
+};
+
+
+template<typename TValue, unsigned int SPACE,  typename TSource>
+inline void 
+assign(
+	MemoryManager<TValue, Block<SPACE>, FreeMemoryInt>& target, 
+	TSource const& source) 
+{
+	SEQAN_CHECKPOINT
+	clear(target);
+	_raiseMemory(target,length(source));
+	for (unsigned int i = 0; i < length(source);++i){
+		target[i] = source[i];
+	}
+
+	target.lastValue = &target[length(source)-1];
+
+	target.pEmptySpace = source.pEmptySpace;
+	size_t tmpSource = source.pEmptySpace;
+	size_t tmpTarget = source.pEmptySpace;
+	//hmmmmmmmmmmm
+	size_t x = maxValue<size_t>();
+	while (tmpSource != x){
+		tmpSource = source[tmpSource];
+		target[tmpTarget] = tmpSource;
+		tmpTarget = target[tmpTarget];
+	}
+	target.change = source.change;
+}
+
+template<typename TValue, unsigned int SPACE,  typename TPos>
+inline typename Reference<String<TValue, Block<SPACE> > >::Type 
+value(
+	MemoryManager<TValue, Block<SPACE>, FreeMemoryInt >& stack, 
+	TPos const pos) 
+{
+	SEQAN_CHECKPOINT
+	return value(*(stack.blocks[pos>>stack.exponent]), pos & (SPACE-1));
+}
+
+
+template<typename TValue, unsigned int SPACE,  typename TPos>
+inline typename Reference<String<TValue, Block<SPACE> > >::Type 
+value(
+	MemoryManager<TValue, Block<SPACE>, FreeMemoryInt > const& stack, 
+	TPos const pos) 
+{
+	SEQAN_CHECKPOINT
+	return value(*(stack.blocks[pos>>stack.exponent]), pos & (SPACE-1));
+}
+
+template<typename TValue, unsigned int SPACE>
+inline void 
+clear(MemoryManager<TValue, Block<SPACE>, FreeMemoryInt >& me)
+{
+SEQAN_CHECKPOINT
+	typedef String<TValue, Block<SPACE>	>			TBlockString;
+	typedef typename TBlockString::TBlockTable		TBlockTable;
+	typedef typename Iterator<TBlockTable, Standard>::Type	TIter;
+	
+	TIter it = begin(me.blocks), itEnd = end(me.blocks);
+	while (it != itEnd) {
+		deallocate(me.alloc, *it, 1);
+		++it;
+	}
+	me.pEmptySpace = -1;
+	clear(me.blocks);
+	me.lastValue = me.blockLast = typename TBlockString::TBlockIter();
+}
+
+
+template<typename TValue, unsigned int SPACE>
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+length(MemoryManager<TValue, Block<SPACE>, FreeMemoryInt > const & me) 
+{
+	SEQAN_CHECKPOINT
+	if (length(me.blocks))
+		return (length(me.blocks) - 1) * SPACE + (me.lastValue - me.blockFirst) + 1;
+	else
+		return 0;
+}
+
+
+template<typename TValue, unsigned int SPACE>
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+capacity(MemoryManager<TValue, Block<SPACE>, FreeMemoryInt > const & me) 
+{
+SEQAN_CHECKPOINT
+	if (length(me.blocks))
+		return length(me.blocks) * SPACE;
+	else
+		return 0;
+}
+
+
+template<typename TValue, unsigned int SPACE> 
+void
+_raiseMemory(MemoryManager<TValue,Block<SPACE>, FreeMemoryInt > &manager, 
+			 typename Size<String<TValue, Block<SPACE> > >::Type leng)
+{
+	SEQAN_CHECKPOINT
+	while (capacity(manager) < leng){
+		typename Size< String<TValue, Block<SPACE> > >::Type last = length(manager.blocks);
+		resize(manager.blocks, last + 1, typename DefaultOverflowImplicit<String<TValue, Block<SPACE> > >::Type());
+		allocate(manager.alloc, manager.blocks[last], 1);
+		manager.lastValue = manager.blockFirst = begin(*manager.blocks[last]);
+		manager.blockLast = (manager.blockFirst + (SPACE - 1));
+	}
+}
+
+template<typename TValue, unsigned int SPACE,  typename TPosition> 
+void
+releaseID(MemoryManager<TValue,Block<SPACE>, FreeMemoryInt > &manager, 
+		  TPosition pos)
+{
+	SEQAN_CHECKPOINT
+	void* pTmp = &manager[pos];
+	*(size_t*)pTmp = manager.pEmptySpace;
+	manager.pEmptySpace = pos;
+}
+
+
+template<typename TValue, unsigned int SPACE> 
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+obtainID(MemoryManager<TValue,Block<SPACE>,FreeMemoryInt > &manager)
+{
+	SEQAN_CHECKPOINT
+	manager.change = false;
+	if (manager.pEmptySpace == maxValue<size_t>()){//-1){
+		if (length(manager) == capacity(manager)){
+			typename Size< String<TValue, Block<SPACE> > >::Type last = length(manager.blocks);
+			resize(manager.blocks, last + 1, typename DefaultOverflowImplicit<String<TValue, Block<SPACE> > >::Type());
+			allocate(manager.alloc, manager.blocks[last], 1);
+			manager.lastValue = manager.blockFirst = begin(*manager.blocks[last]);
+			manager.blockLast = (manager.blockFirst + (SPACE - 1));
+			manager.change = true;
+		} else
+			++manager.lastValue;
+		return length(manager)-1;
+		
+	}else{
+		size_t tmp = manager.pEmptySpace;
+		void* pTmp = &manager[tmp];
+		
+		manager.pEmptySpace = *(size_t*) pTmp;
+		return tmp;
+	}
+}
+
+
+template<typename TValue, unsigned int SPACE,  typename TPosition> 
+void
+assignValue(MemoryManager<TValue,Block<SPACE>, FreeMemoryInt > &manager, 
+			TPosition pos, 
+			TValue value)
+{
+	SEQAN_CHECKPOINT
+	manager[pos] = value;
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/seeds/propertyMap.h b/src/SeqAn-1.3/seqan/seeds/propertyMap.h
new file mode 100644
index 0000000..46c2315
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/propertyMap.h
@@ -0,0 +1,239 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_PropertyMap_H
+#define SEQAN_HEADER_PropertyMap_H
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Class.PropertyMap:
+..cat:Seed Handling
+..summary:Class used to save additional data together with a MemoryManager.
+..signature:PropertyMap<TValue, Block<size> >
+..param.TValue:The value type, that is the type of the items/characters stored in the manager.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.size:A positive integer that specifies the number of values in each allocated block.
+...remarks: Size has to be a power of 2, e.g., 1024.
+..include:seqan/seeds.h
+*/
+template<typename TValue, typename TSPec> 
+class PropertyMap;
+
+template<typename TValue, unsigned int SPACE>
+class PropertyMap<TValue, Block<SPACE> > 
+{
+	typedef String<TValue, Array<SPACE> >				TBlock;
+	typedef TBlock*										PBlock;
+	typedef Allocator< SinglePool<sizeof(TBlock)> >	TAllocator;
+
+public:
+
+	typedef typename Iterator<TBlock, Standard>::Type	TBlockIter;
+	typedef String<PBlock>								TBlockTable;
+
+	TBlockTable		blocks;
+	TBlockIter		blockFirst, blockLast;	// current block boundaries
+	TBlockIter		lastValue;				// pointer to top value
+	TAllocator		alloc;
+	unsigned int exponent;
+	//____________________________________________________________________________
+	      
+	public:
+	PropertyMap():
+		blockFirst(TBlockIter()),
+		blockLast(TBlockIter()),
+		lastValue(TBlockIter()) 
+	{
+		SEQAN_CHECKPOINT
+		unsigned int x = SPACE;
+		exponent = 0;
+		while (x != 1){
+			x >>=1;
+			++exponent;
+		}
+	}
+
+	~PropertyMap() 
+	{
+		clear(*this);
+	}
+
+	//____________________________________________________________________________
+
+
+
+	public:
+		template<typename TPos>
+		inline typename Reference<PropertyMap>::Type 
+			operator[] (TPos pos) 
+		{
+		SEQAN_CHECKPOINT	
+			return value(*this, pos);
+		}
+
+		template<typename TPos>
+		inline typename Reference<PropertyMap const>::Type 
+			operator[] (TPos pos) const 
+		{
+		SEQAN_CHECKPOINT
+			return value(*this, pos);
+		}
+	};
+
+
+	template<typename TValue, unsigned int SPACE>
+	struct DefaultOverflowImplicit< PropertyMap<TValue, Block<SPACE> > >
+	{
+		typedef Generous Type;
+	};
+
+
+///.Metafunction.Value.param.T.type:Class.PropertyMap
+template <typename TValue, unsigned int SPACE>
+struct Value<PropertyMap<TValue,Block<SPACE> > >
+{
+	typedef TValue Type;
+};
+
+
+template<typename TValue, unsigned int SPACE, typename TSource>
+inline void 
+assign(
+	PropertyMap<TValue, Block<SPACE> >& target, 
+	TSource const& source) 
+{
+	SEQAN_CHECKPOINT
+	clear(target);
+	raiseMemory(target,length(source));
+	for (int i = 0; i < length(source);++i){
+		target[i] = source[i];
+	}
+
+	target.lastValue = &target[length(source)-1];
+
+	target.pEmptySpace = 0;
+	const void* pTmpSource = source.pEmptySpace;
+	void* pTmpTarget = &target.pEmptySpace;
+	while (pTmpSource != 0){
+		typename Size<String<TValue, Block<SPACE> > >::Type pos = _getPosition(source,pTmpSource);
+		*((void**)pTmpTarget) = &target[pos];
+		pTmpSource = (TValue *)source[pos];
+		pTmpTarget = &target[pos];
+	}
+}
+
+
+template<typename TValue, unsigned int SPACE, typename TPos>
+inline typename Reference<String<TValue, Block<SPACE> > >::Type 
+value(
+	PropertyMap<TValue, Block<SPACE> >& stack, 
+	TPos const pos) 
+{
+	SEQAN_CHECKPOINT
+	return value(*(stack.blocks[pos>>stack.exponent]), pos % SPACE);
+}
+
+
+template<typename TValue, unsigned int SPACE, typename TPos>
+inline typename Reference<String<TValue, Block<SPACE> > >::Type 
+value(
+	PropertyMap<TValue, Block<SPACE> > const& stack, 
+	TPos const pos) 
+{
+	SEQAN_CHECKPOINT
+	return value(*(stack.blocks[pos>>stack.exponent]), pos % SPACE);
+}
+
+
+template<typename TValue, unsigned int SPACE>
+inline void 
+clear(PropertyMap<TValue, Block<SPACE> >& me)
+{
+SEQAN_CHECKPOINT
+	typedef String<TValue, Block<SPACE>	>			TBlockString;
+	typedef typename TBlockString::TBlockTable		TBlockTable;
+	typedef typename Iterator<TBlockTable, Standard>::Type	TIter;
+	
+	TIter it = begin(me.blocks), itEnd = end(me.blocks);
+	while (it != itEnd) {
+		deallocate(me.alloc, *it, 1);
+		++it;
+	}
+	clear(me.blocks);
+	me.lastValue = me.blockLast = typename TBlockString::TBlockIter();
+}
+
+
+template<typename TValue, unsigned int SPACE>
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+length(PropertyMap<TValue, Block<SPACE> > const & me) 
+{
+	SEQAN_CHECKPOINT
+	if (length(me.blocks))
+		return (length(me.blocks) - 1) * SPACE + (me.lastValue - me.blockFirst) + 1;
+	else
+		return 0;
+}
+
+
+template<typename TValue, unsigned int SPACE>
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+capacity(PropertyMap<TValue, Block<SPACE> > const & me) 
+{
+SEQAN_CHECKPOINT
+	if (length(me.blocks))
+		return length(me.blocks) * SPACE;
+	else
+		return 0;
+}
+
+template<typename TValue, unsigned int SPACE> 
+void
+raiseMemory(PropertyMap<TValue,Block<SPACE> > &manager)
+{
+	SEQAN_CHECKPOINT
+	typename Size< String<TValue, Block<SPACE> > >::Type last = length(manager.blocks);
+	resize(manager.blocks, last + 1, typename DefaultOverflowImplicit<String<TValue, Block<SPACE> > >::Type());
+	allocate(manager.alloc, manager.blocks[last], 1);
+	manager.lastValue = manager.blockFirst = begin(*manager.blocks[last]);
+	manager.blockLast = (manager.blockFirst + (SPACE - 1));
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/seeds/seedHandlingTags.h b/src/SeqAn-1.3/seqan/seeds/seedHandlingTags.h
new file mode 100644
index 0000000..544328c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/seedHandlingTags.h
@@ -0,0 +1,168 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+
+#ifndef SEQAN_SEEDHANDLINGTAGS_H
+#define SEQAN_SEEDHANDLINGTAGS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+/**
+.Tag.Seed Adding
+..summary:The algorithm used to add a seed to a SeedSet.
+..see:Function.addSeed
+..see:Function.addSeeds
+..cat:Seed Handling
+..tag.Single:
+	Simple adding of a seed to the set. No chaining or merging.
+..tag.Blat:
+	Chaining of seeds. Gap is filled with smaller matching segments.
+..tag.Chaos:
+	Chaining of seeds. One gap is introduced at the best position.
+..tag.SimpleChain:
+	Chaining of seeds.
+..include:seqan/seeds.h
+*/
+struct _addSeeding_Single;
+typedef Tag<_addSeeding_Single> const Single;
+
+//also defined in blast_base.h (103)
+//moved to basic_tag
+/*
+struct ChainBlat_;
+typedef Tag<ChainBlat_> const Blat;
+*/
+
+struct ChainChaos_;
+typedef Tag<ChainChaos_> const Chaos;
+
+struct ChainSimple_;
+typedef Tag<ChainSimple_> const SimpleChain;
+
+
+template <typename T>
+struct BLOCK_SIZE
+{
+};
+
+/**
+.Tag.SeedSet
+..cat:Seed Handling
+..summary: Tags for the behaviour of a SeedSet
+..tag.DefaultScore: 
+	Enables scoring of seeds in a SeedSet.
+..tag.DefaultNoScore:
+	Disables scoring of seeds in a SeedSet.
+..include:seqan/seeds.h
+*/
+
+
+
+struct GapCostManhatten_;
+typedef Tag<GapCostManhatten_> const Manhattan;
+
+struct GapCostQueryDistance_;
+typedef Tag<GapCostQueryDistance_> const QueryDistance;
+
+struct GapCostDatabaseDistance_;
+typedef Tag<GapCostDatabaseDistance_> const DatabaseDistance;
+
+struct GapCostNoGapCost_;
+typedef Tag<GapCostNoGapCost_> const NoGapCost;
+
+
+struct GoodSeed_;
+typedef Tag<GoodSeed_> const SeedScore;
+
+struct GoodSeed2_;
+typedef Tag<GoodSeed2_> const SeedLength;
+
+
+template<typename T1, typename T2, typename T3>
+struct Scoring_Scheme;
+
+typedef Tag<Scoring_Scheme<SeedScore, Manhattan, int> > const DefaultScore;
+
+
+typedef Tag<Scoring_Scheme<SeedLength, Manhattan, void> > const DefaultNoScore;
+
+
+template<typename T>
+struct GapCosts
+{
+	typedef T Type;
+};
+
+template <typename TGapCosts, typename TQualityFactor, typename TScore>
+struct GapCosts<const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, TScore> > >
+{
+	typedef TGapCosts Type;
+};
+
+template<typename T>
+struct QualityFactor
+{
+	typedef T Type;
+};
+
+template <typename TGapCosts, typename TQualityFactor, typename TScore>
+struct QualityFactor<const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, TScore> > >
+{
+	typedef  TQualityFactor Type;
+};
+
+template<typename T>
+struct ScoreType
+{
+	typedef T Type;
+};
+
+template <typename TGapCosts, typename TQualityFactor, typename TScore>
+struct ScoreType<const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, TScore> > >
+{
+	typedef  TScore Type;
+};
+
+/* see find_pattern_base.h
+template <typename T>
+struct ScoringScheme
+{
+	typedef T Type;
+};
+*/
+
+} //namespace Seqan
+
+#endif //#ifndef SEQAN_HEADER_
diff --git a/src/SeqAn-1.3/seqan/seeds/seedSet_base.h b/src/SeqAn-1.3/seqan/seeds/seedSet_base.h
new file mode 100644
index 0000000..b1b9bdd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/seedSet_base.h
@@ -0,0 +1,1691 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEEDSET_BASE_H
+#define SEQAN_HEADER_SEEDSET_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+// Forward declaration.
+struct SeedIterator;
+
+/*
+.Function:_calculateScoringValue
+..summary: calculates a Value for a gap during chaining.
+..param.seed: The first seed.
+..param.qPos: The leftPosition in dimension 0.
+..param.dPos: The leftPosition in dimension 1.
+..param.length: The length of the seed. ?
+..param.tag: The tags define the distance to use.
+..include:seqan/seeds.h
+*/
+template<typename TValue, typename TSeed>
+inline TValue
+_calculateScoringValue(TSeed const &seed, TValue qPos, TValue dPos, TValue &, Manhattan){
+	return rightDim0(seed) - qPos + rightDim1(seed) - dPos;
+}
+
+template<typename TValue, typename TSeed>
+inline TValue
+_calculateScoringValue(TSeed const &seed, TValue qPos, TValue &, TValue &, QueryDistance){
+	return rightDim0(seed) - qPos;
+}
+
+template<typename TValue, typename TSeed>
+inline TValue
+_calculateScoringValue(TSeed const &seed, TValue &, TValue dPos, TValue &, DatabaseDistance){
+	return rightDim1(seed) - dPos;
+}
+
+template<typename TValue, typename TSeed>
+inline TValue
+_calculateScoringValue(TSeed &, TValue &, TValue &, TValue &, NoGapCost){
+	return 0;
+}
+
+
+/*
+.Function:_qualityReached
+..summary: Checks if a seed has reached a certain quality value.
+..param.seed: The first seed.
+..param.score: The score of the seed. (If no scores are used, the value will be 0.
+..param.qualityValue: The value that shall be reached.
+..param.tag: The tags define the kind of quality check to use.
+..include:seqan/seeds.h
+*/
+
+template<typename TSeed, typename TScore>
+inline bool
+_qualityReached(TSeed &, TScore score, TScore qualityValue, SeedScore){
+	return score >= qualityValue;
+}
+
+template<typename TSeed, typename TScore>
+inline bool
+_qualityReached(TSeed const &seed, TScore , TScore qualityValue, SeedLength){
+	return length(seed) >= qualityValue;
+}
+
+
+
+/**
+.Class.SeedSet:
+..summary:Manages seeds for local chaining and merging algorithms.
+..cat:Seed Handling
+..signature:SeedSet<TPosition, TSeedSpec, TScoringScheme, TSpec>
+..param.TPosition: Type that saves the positions and upper/lower bounds.
+...remarks: Positive and negative values are needed.
+..param.TSeedSpec:The @Class.Seed@ specialization.
+..param.TScoringScheme:The scoring sheme to use.
+..include:seqan/seeds.h
+*/
+
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec = void> 
+class SeedSet;
+
+
+/**
+.Spec.NonScored SeedSet
+..summary:SeedSet that uses seeds without scores.
+..cat:Seed Handling
+..general:Class.SeedSet
+..signature:SeedSet<TPosition, TSeedSpec, TScoringScheme<TQualityFactor, TGapCosts, void>, TSpec>
+..param.TPosition: Type that saves the positions and upper/lower bounds.
+...remarks: Positive and negative values are needed.
+..param.TSeedSpec:The @Class.Seed@ specialization.
+..param.TScoringScheme:The scoring sheme to use.
+..param.TQualityFactor: The quality factor to use.
+..param.TGapCosts: The kind of GapCosts to use.
+..include:seqan/seeds.h
+*/
+
+/**
+.Memfunc.SeedSet#SeedSet:
+..class:Class.SeedSet
+..summary:Constructor
+..signature: SeedSet<TValue, TSeedSpec> ()
+..signature: SeedSet<TValue, TSeedSpec> (maxDistance, qualityValue)
+..param.maxDistance:Maximum distance between two seeds.
+..param.qualityValue:Minimum length of a seeed.
+*/
+template<typename TValue, typename TSeedSpec, typename TQualityFactor, typename TGapCosts> 
+class SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, void>
+{
+
+public:
+	static const unsigned int BLOCKSIZE = BLOCK_SIZE<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, void> >::Value;
+	typedef typename Size<String<TValue, Block<BLOCKSIZE> > >::Type TSize;
+	MemoryManager<Seed<TValue, TSeedSpec>, Block<BLOCKSIZE>, FreeMemoryInt > manager;
+	std::multimap<TValue,  TSize> fragmentMap;
+	std::set<TSize> result;
+	TValue maxDistance;
+	TValue qualityValue;
+	TValue last;
+
+	SeedSet(){
+		last=0;
+		SEQAN_CHECKPOINT
+	}
+
+	SeedSet(TValue maxDistance, TValue qualityValue):maxDistance(maxDistance),qualityValue(qualityValue){
+		SEQAN_CHECKPOINT
+		last=0;
+	}
+	
+	~SeedSet(){
+		SEQAN_CHECKPOINT
+		clear(manager);
+	}
+};
+
+
+// Only difference is the destructor.
+template<typename TValue, typename TQualityFactor, typename TGapCosts> 
+class SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, void>
+{
+
+public:
+	static const unsigned int BLOCKSIZE = BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, void> >::Value;
+	typedef typename Size<String<TValue, Block<BLOCKSIZE> > >::Type TSize;
+	MemoryManager<Seed<TValue, ChainedSeed>, Block<BLOCKSIZE>, FreeMemoryInt > manager;
+	std::multimap<TValue, TSize> fragmentMap;
+	std::set<TSize> result;
+	TValue maxDistance;
+	TValue qualityValue;
+	TValue last;
+
+	SeedSet(){
+	SEQAN_CHECKPOINT
+		last=0;
+	}
+
+	SeedSet(TValue maxDistance, TValue qualityValue):maxDistance(maxDistance),qualityValue(qualityValue){
+	SEQAN_CHECKPOINT
+		last=0;
+	}
+	
+	~SeedSet()
+	{
+    SEQAN_CHECKPOINT
+    typedef typename Size<String<TValue, Block<BLOCKSIZE> > >::Type TSize;
+    std::set<TSize> del;
+
+	typedef typename std::multimap<TValue,  TSize>::iterator TIterator;
+	TIterator it_end = fragmentMap.end();
+	for (TIterator it = fragmentMap.begin(); it != it_end;++it)
+	{
+		TSize id = it->second;
+		manager[id].~Seed<TValue, ChainedSeed>();
+		result.erase(id);
+	}
+
+	typedef typename std::set<TSize>::iterator TIterator2;
+	TIterator2 it_end2 = result.end();
+	for (TIterator2 it = result.begin(); it != it_end2;++it)
+	{
+		manager[*it].~Seed<TValue, ChainedSeed>();
+	}
+	clear(manager);
+	}
+};
+
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//											   Metafunctions	                                                   //
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+struct BLOCK_SIZE<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> >
+{
+	enum {Value = 2048};
+};
+
+///.Metafunction.Spec.param.T.type:Class.SeedSet
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+struct Spec<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec > >
+{
+	typedef TSeedSpec Type;
+};
+
+///.Metafunction.Value.param.T.type:Class.SeedSet
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+struct Value<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> >
+{
+	typedef Seed<TValue, TSeedSpec> Type;
+};
+
+
+///.Metafunction.Iterator.param.T.type:Class.SeedSet
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+struct Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec>, Standard >
+{
+	typedef Iter<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec>, SeedIterator> Type;
+};
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+struct Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const, Standard >
+{
+	typedef Iter<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const, SeedIterator> Type;
+};
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+struct Size<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> >
+{
+	typedef typename Size< String<TValue, Block<BLOCK_SIZE<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> >::Value > > >::Type Type;
+};
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//										   Container Functions	                                                   //
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//.Function.append.param.object.type:Class.SeedSet
+template<typename TValue, typename TSeedSpec, typename TContainer2, typename TSpecScoring, typename TSpec>
+void
+append(SeedSet<TValue, TSeedSpec, 
+	   TSpecScoring, TSpec> &target, 
+	   TContainer2 &source)
+{
+    SEQAN_CHECKPOINT
+    typename Iterator<TContainer2, Standard>::Type it;
+    for (it = begin(source); it != end(source);++it)
+	addSeed(target, *it ,Single());
+}
+
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline void
+appendValue(SeedSet<TValue, 
+			TSeedSpec, TSpecScoring, TSpec> &target, 
+			Seed<TValue, TSeedSpec> &seed)
+{
+	SEQAN_CHECKPOINT
+	addSeed(target,seed,Single());
+}
+
+///.Function.end.param.object.type:Class.SeedSet
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec>, Standard >::Type
+begin(SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> &set)
+{
+	SEQAN_CHECKPOINT
+	return typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec>, Standard >::Type(set, set.result.begin());
+}
+
+///.Function.begin.param.object.type:Class.SeedSet
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec>, Standard >::Type
+end(SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> &set)
+{
+    SEQAN_CHECKPOINT
+    return typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec>, Standard >::Type(set, set.result.end());
+}
+
+
+///.Function.end.param.object.type:Class.SeedSet
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const, Standard>::Type
+begin(SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const &set)
+{
+	SEQAN_CHECKPOINT
+	return typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const, Standard>::Type(set, set.result.begin());
+}
+
+///.Function.begin.param.object.type:Class.SeedSet
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline typename Iterator<SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> const, Standard>::Type
+end(SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const &set)
+{
+	SEQAN_CHECKPOINT
+	return typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const, Standard>::Type(set, set.result.end());
+}
+
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline int
+length(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set)
+{
+	SEQAN_CHECKPOINT
+	return set.result.size();
+}
+
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline int
+length(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> const &set)
+{
+	//SaEQAN_CHECKPOINT
+	return set.result.size();
+}
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+void
+clear(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec,Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> > , TSpec> >::Value> > >::Type TSize;
+	std::set<TSize> del;
+	TSize x = (obtainID(set.manager));
+	while (x < length(set.manager)-1) {
+		del.insert(x);
+		x = obtainID(set.manager);
+	}
+	del.insert(-1);
+	typename std::set<TSize>::iterator it = del.begin();
+	for (TSize i = 0; i < length(set.manager)-1; ++i){
+		if (i != *it)
+			set.manager[i].~Seed<TValue, TSeedSpec>();
+		else
+			++it;
+	}
+	set.fragmentMap.clear();
+	set.result.clear();
+	clear(set.manager);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//									         Standard Methods													   //
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.setMaximumDistance:
+..summary:Sets the maximal distance between two seed during a chaining process.
+..cat:Seed Handling
+..signature:setMaximumDistance(set, distance)
+..param.set: The set of seeds.
+...type:Class.SeedSet
+..param.distance: The maximal distance between to seeds.
+..include:seqan/seeds.h
+*/
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline void
+setMaximumDistance(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set, 
+				   TValue distance)
+{
+	SEQAN_CHECKPOINT
+	set.maxDistance = distance;
+}
+
+
+/**
+.Function.setQualityValue:
+..summary:Sets the minimum length for a seed to be saved permanently.
+..cat:Seed Handling
+..signature:setQualityValue(set, distance)
+..param.set: The set of seeds.
+...type:Class.SeedSet
+..param.distance: The minimum length of a seed.
+..include:seqan/seeds.h
+*/
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline void
+setQualityValue(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set, 
+				TValue value)
+{
+	SEQAN_CHECKPOINT
+	set.qualityValue = value;
+}
+
+/**
+.Function.maximumDistance:
+..summary:Sets the maximal distance between two seed during a chaining process.
+..cat:Seed Handling
+..signature:maximumDistance(set)
+..param.set: The set of seeds.
+...type:Class.SeedSet
+..returns:The maximum distance.
+..include:seqan/seeds.h
+*/
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline TValue
+maximumDistance(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set)
+{
+	SEQAN_CHECKPOINT
+	return set.maxDistance;
+}
+
+/**
+.Function.qualityValue:
+..summary:Sets the minimum length for a seed to be saved permanently.
+..cat:Seed Handling
+..signature:qualityValue(set)
+..param.set: The set of seeds.
+...type:Class.SeedSet
+..resturns: The minimum length.
+..include:seqan/seeds.h
+*/
+template<typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+inline TValue
+qualityValue(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set)
+{
+	SEQAN_CHECKPOINT
+	return set.qualityValue;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                       addition of new Seeds                                                    //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.addSeed:
+..summary:Adds a seed to an existing set.
+..cat:Seed Handling
+..signature:addSeed(set, qPos, dPos, length, tag)
+..signature:addSeed(set, qPos, dPos, qrPos, drPos, tag)
+..signature:addSeed(set, seed, tag)
+..param.set:The set to which the new seed should be added.
+...type:Class.SeedSet
+..param.qPos: Start position in sequence1.
+..param.dPos: Start position in sequence2.
+..param.length: Length of the seed.
+..param.tag: The algorithm that should be used to add the new seed.
+...type:Tag.Seed Adding
+...remark: Note that not every algorithm can be used with each type of @Class.Seed at .
+..param.qrPos: End position in sequence1.
+..param.drPos: End Position in sequence2.
+..param.seed: The new Seed.
+...type:Class.Seed
+...remarks: The seed is copied and then added.
+..returns:Boolean if succesfully added.
+...remarks:Always true for Tag Single.
+..include:seqan/seeds.h
+*/
+
+/**
+.Function.addSeeds:
+..summary:Adds several seeds to an existing set. If a merging or chaining algorithm is used seeds are added if the merging or chaining fails.
+..cat:Seed Handling
+..signature:addSeed(set, container, tag)
+..signature:addSeed(set, begin, end, tag)
+..param.set:The set to which the new seed sould be added.
+...type:Class.SeedSet
+..param.container: Content is copied to set.
+...type:Concept.Container
+..param.begin: Iterator pointing to the first value to add.
+..param.end: Iterator pointing just behind the last value to add.
+..param.tag: The algorithm that should be used to add the new @Class.Seed at .
+...type:Tag.Seed Adding
+...remarks: Note that not every algorithm can be used with each specialization of @Class.Seed at .
+..include:seqan/seeds.h
+*/
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		TValue qPos, 
+		TValue dPos,
+		TValue length, 
+		Single)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	TSize position = obtainID(set.manager);
+	new (&set.manager[position]) Seed<TValue, TSeedSpec>(qPos,dPos,length);
+	if (_qualityReached(set.manager[position],0,qualityValue(set), TQualityFactor()))           
+		set.result.insert(position);
+
+	set.fragmentMap.insert( std::pair<TValue, TSize >(dPos-qPos, position) );
+	return true;
+}
+
+template<typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeed(SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		TValue qBeginPos, 
+		TValue dBeginPos, 
+		TValue qEndPos, 
+		TValue dEndPos, 
+		Single)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	//Seed<TValue, SimpleSeed>* pSeed;
+	TSize position = obtainID(set.manager);
+	new (&set.manager[position]) Seed<TValue, SimpleSeed>(qBeginPos,dBeginPos,qEndPos,dEndPos);
+	if (_qualityReached(set.manager[position],0,qualityValue(set), TQualityFactor()))
+		set.result.insert(position);
+
+	set.fragmentMap.insert( std::pair<TValue, TSize >( dEndPos-qEndPos, position ) );
+	return true;
+}
+
+template<typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeed(SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		Seed<TValue, SimpleSeed> const &seed, 
+		Single)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	TSize position = obtainID(set.manager);
+	new (&set.manager[position]) Seed<TValue, SimpleSeed>(leftDim0(seed), leftDim1(seed), rightDim0(seed), rightDim1(seed));
+	if (_qualityReached(set.manager[position],0,qualityValue(set), TQualityFactor()))
+		set.result.insert(position);
+
+	setLeftDiagonal(set.manager[position], leftDiagonal(seed));
+	setRightDiagonal(set.manager[position], rightDiagonal(seed));
+	set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(seed), position ) );
+	return true;
+}
+
+template<typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		Seed<TValue, ChainedSeed> const &seed, 
+		Single)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::list<Triple<TValue, TValue, TValue> >::const_iterator TIterator;
+	TSize position = obtainID(set.manager);
+	new (&set.manager[position]) Seed<TValue, ChainedSeed>();
+	TIterator it_end = _getDiagSet(seed).end();
+	for (TIterator it = _getDiagSet(seed).begin(); it != it_end; ++it)
+		appendDiag(set.manager[position],*it);
+
+	if (_qualityReached(set.manager[position], 0, qualityValue(set), TQualityFactor()))
+		set.result.insert(position);
+
+	setLeftDiagonal(set.manager[position], leftDiagonal(seed));
+	setRightDiagonal(set.manager[position], rightDiagonal(seed));
+	set.fragmentMap.insert(std::pair<TValue, TSize >( endDiagonal(set.manager[position]), position));
+	return true;
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TIterator, typename TAlgoSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		 TIterator begin, 
+		 TIterator end, 
+		 int gapDistance, 
+		 TAlgoSpec tag)
+{
+	SEQAN_CHECKPOINT
+	std::multimap<TValue, TIterator> tmpMap; //zum sortieren
+	for (TIterator it = begin; it!=end; ++it)
+		tmpMap.insert(std::pair<TValue, TIterator>(leftDim0(*it),it));
+
+	typedef typename std::multimap<TValue, TIterator>::iterator TIterator2;
+	TIterator2 it_end = tmpMap.end();
+	for (TIterator2 it = tmpMap.begin(); it != it_end; ++it)
+		if (!addSeed(set, *it->second, gapDistance, tag))
+			addSeed(set, *it->second, Single());
+	
+	tmpMap.clear();
+	return true;
+}
+
+
+template<typename TSeedSet, typename TIterator>//typename TValue, typename TSeedSpec, typename TIterator, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeedsIt(TSeedSet &set,//SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+	TIterator begin, 
+	TIterator end,  Single)
+{
+	SEQAN_CHECKPOINT
+	for(TIterator it = begin; it != end; ++it)
+		addSeed(set, *it, Single());
+	return true;
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TIterator, typename TText, typename TValue2, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		 TIterator begin, 
+		 TIterator end, 
+		 Score<TValue2, Simple> const &scoreMatrix, 
+		 String<TText> const &query, 
+		 String<TText> const &database, 
+		 int gapDistance, 
+		 Chaos)
+{
+	SEQAN_CHECKPOINT
+	std::multimap<TValue, TIterator> tmpMap; 
+	for(TIterator it = begin; it != end; ++it){
+		tmpMap.insert(std::pair<TValue, TIterator>(leftDim0(*it), it));
+		++begin;
+	}
+	typedef typename std::multimap<TValue, TIterator>::iterator TIterator2;
+	TIterator2 it_end = tmpMap.end();
+	for (TIterator2 it = tmpMap.begin(); it != it_end; ++it)
+		if (!addSeed(set, *it->second, scoreMatrix, query, database, gapDistance, Chaos()))
+			addSeed(set, *it->second, Single());
+
+	tmpMap.clear();
+	return true;
+}
+
+template<typename TValue, typename TSeedSpec, typename TIterator, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		 TIterator begin, 
+		 TIterator end, 
+		 String<TText> const &query, 
+		 String<TText> const &database, 
+		 int gapDistance, 
+		 Blat)
+{
+	SEQAN_CHECKPOINT
+	std::multimap<TValue, TIterator> tmpMap; //zum sortieren
+	for(TIterator it = begin; it != end; ++it){
+		tmpMap.insert(std::pair<TValue, TIterator>(leftDim0(*it), it));
+		++begin;
+	}
+	typedef typename std::multimap<TValue, TIterator>::iterator TIterator2;
+	TIterator2 it_end = tmpMap.end();
+	for (TIterator2 tmpIt = tmpMap.begin(); tmpIt != it_end; ++tmpIt){
+		if (!addSeed(set, *tmpIt->second, query, database, gapDistance, Blat()))
+			addSeed(set, *tmpIt->second, Single());
+	}
+	tmpMap.clear();
+	return true;
+}
+
+template<typename TValue, typename TSeedSpec, typename TContainer, typename TAlgoSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		 TContainer &source, 
+		 int gapDistance, 
+		 TAlgoSpec tag)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TContainer,Standard>::Type TIterator;
+	typedef typename std::multimap<TValue, TIterator>::iterator TIterator2;
+    TIterator it_end = end(source);
+	std::multimap<TValue, TIterator> tmpMap; //zum sortieren
+	for (TIterator it = begin(source); it != it_end; ++it)
+		tmpMap.insert(std::pair<TValue, TIterator>(leftDim0(*it),it));
+	
+	TIterator2 it_end2 = tmpMap.end();
+	for (TIterator2 it = tmpMap.begin(); it != it_end2; ++it)
+		if (!addSeed(set, *it->second, gapDistance, tag))
+			addSeed(set, *it->second, Single());
+	
+	tmpMap.clear();
+	return true;
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TContainer, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		 TContainer const &source, 
+		 Single)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TContainer const,Standard>::Type TIterator;
+	TIterator it_end = end(source);
+	for (TIterator it = begin(source); it != it_end; ++it)
+		addSeed(set, *it, Single());
+	
+	return true;
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TContainer, typename TText, typename TValue2, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		 TContainer const &source, 
+		 Score<TValue2, Simple> const &scoreMatrix, 
+		 String<TText> const &query, 
+		 String<TText> const &database, 
+		 int gapDistance, 
+		 Chaos)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TContainer const,Standard>::Type TIterator;
+    TIterator it1, it2 = end(source);
+	std::multimap<TValue, TIterator> tmpMap; //zum sortieren
+	for (TIterator it1 = begin(source); it1 != it2; ++it1)
+		tmpMap.insert(std::pair<TValue, TIterator>(leftDim0(*it1),it1));
+	
+	typedef typename std::multimap<TValue, TIterator>::iterator TIterator2;
+	TIterator2 it_end = tmpMap.end();
+	for (TIterator2 tmpIt = tmpMap.begin(); tmpIt != it_end; ++tmpIt)
+		if (!addSeed(set, *tmpIt->second, scoreMatrix, query, database, gapDistance, Chaos()))
+			addSeed(set, *tmpIt->second, Single());
+
+	tmpMap.clear();
+	return true;
+}
+
+template<typename TValue, typename TSeedSpec, typename TContainer, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, 
+		 const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		 TContainer const &source, 
+		 String<TText> const &query, 
+		 String<TText> const &database, 
+		 int gapDistance, 
+		 Blat)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TContainer const,Standard>::Type TIterator;
+	TIterator it2 = end(source);
+	std::multimap<TValue, TIterator> tmpMap; //zum sortieren
+	for (TIterator it1 = begin(source); it1 !=it2; ++it1)
+		tmpMap.insert(std::pair<TValue, TIterator>(leftDim0(*it1),it1));
+	
+	typedef typename std::multimap<TValue, TIterator>::iterator TIterator2;
+	TIterator2 it_end = tmpMap.end();
+	for (TIterator2 tmpIt = tmpMap.begin(); tmpIt != it_end; ++tmpIt)
+		if (!addSeed(set, *tmpIt->second, query, database, gapDistance, Blat()))
+			addSeed(set, *tmpIt->second, Single());
+	
+	tmpMap.clear();
+	return true;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//										       Merging												              //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		TValue qPos, 
+		TValue dPos, 
+		TValue length_, 
+		int gapDistance, 
+		Merge)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+    TIterator tmpIt = _findSeedsMerge(set, qPos, dPos, length_, gapDistance);
+	bool change = false;
+	if (tmpIt != set.fragmentMap.end())
+	{
+		TSize position = tmpIt->second;
+		set.fragmentMap.erase(tmpIt);
+		//addSeed(set,set.manager[position],Single());
+		
+		_mergeTwoSeeds(set.manager[position], qPos, dPos, length_, Merge());
+
+	
+		if (_qualityReached(set.manager[position],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(position);
+
+		set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[position]),position));
+		change = true;
+	}
+	return change;
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool
+addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		Seed<TValue, TSeedSpec> const &seed, 
+		int gapDistance, 
+		Merge)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typedef Seed<TValue, TSeedSpec> * pSeed;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	TIterator tmpIt = _findSeedsMerge(set, leftDim0(seed), leftDim1(seed),length(seed), gapDistance);
+	bool change = false;
+	if (tmpIt != set.fragmentMap.end())
+	{
+		TSize position = (*tmpIt).second;
+		set.fragmentMap.erase(tmpIt);
+		//addSeed(set,set.manager[position],Single());
+		
+		_mergeTwoSeeds(set.manager[position], seed, Merge());
+		if (_qualityReached(set.manager[position],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(position);
+		set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[position]),position));
+		change = true;
+	}
+	return change;
+}
+
+
+template<typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		TValue qlPos, 
+		TValue dlPos, 
+		TValue qrPos, 
+		TValue drPos, 
+		int gapDistance, 
+		Merge)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typedef Seed<TValue, SimpleSeed> * pSeed;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	TIterator tmpIt = _findSeedsMerge(set, qlPos, dlPos, qrPos-qlPos+1, gapDistance);
+	bool change = false;
+	if (tmpIt != set.fragmentMap.end())
+	{
+		TSize position = (*tmpIt).second;
+		set.fragmentMap.erase(tmpIt);
+		//addSeed(set,set.manager[position],Single());
+		_mergeTwoSeeds(set.manager[position], qlPos, dlPos, qrPos, drPos, Merge());
+		if (_qualityReached(set.manager[position],0, qualityValue(set), TQualityFactor()))
+			set.result.insert(position);
+
+		set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[position]),position));
+		change = true;
+	}
+	return change;
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                       Chaining Algorithms                                                      //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+								////////////////////////////////////
+								//	     Standard Chaining		  //
+								////////////////////////////////////
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		TValue qPos, 
+		TValue dPos, 
+		TValue length, 
+		int gapDistance, 
+		SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, qPos, dPos, length, gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		_mergeTwoSeeds(set.manager[id], qPos, dPos, length, SimpleChain());
+
+		if (_qualityReached(set.manager[id],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(id);
+
+		//new endDiagonal
+		if(x!= dPos-qPos){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert(std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} else
+		return false;
+}
+
+template<typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		TValue qlPos, 
+		TValue dlPos, 
+		TValue qrPos, 
+		TValue drPos, 
+		int gapDistance, 
+		SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, qlPos, dlPos, qrPos-qlPos+1, gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		_mergeTwoSeeds(set.manager[id], qlPos, dlPos, qrPos, drPos, SimpleChain());
+		if (_qualityReached(set.manager[id],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(id);
+		if(x != drPos-qrPos){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} else
+		return false;
+}
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		Seed<TValue, TSeedSpec> const &seed, 
+		int gapDistance, 
+		SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, leftDim0(seed), leftDim1(seed), length(seed), gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		_mergeTwoSeeds(set.manager[id], leftDim0(seed), leftDim1(seed), rightDim0(seed), rightDim1(seed), SimpleChain());
+		if (_qualityReached(set.manager[id],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(id);
+		if(x != endDiagonal(seed))
+		{
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} else
+		return false;
+}
+
+template<typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		Seed<TValue, ChainedSeed> const &seed, 
+		int gapDistance, 
+		SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, leftDim0(seed), leftDim1(seed), length(seed), gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		_mergeTwoSeeds(set.manager[id], leftDim0(seed), leftDim1(seed), _getFirstDiag(seed).i3, SimpleChain());
+		typedef typename std::list<Triple<TValue,TValue,TValue> >::const_iterator TIterator2; 
+		
+		TIterator2 it2_end = _getDiagSet(seed).end();
+		for (TIterator2 it2 = ++_getDiagSet(seed).begin(); it2 != it2_end; ++it2)
+			appendDiag(set.manager[id],*it2);
+
+		if (_qualityReached(set.manager[id],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(id);
+
+		if(x != endDiagonal(seed))
+		{
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} else
+		return false;
+}
+
+
+template<typename TValue, typename TSeedSpec>
+void
+_mergeTwoSeeds(Seed<TValue, TSeedSpec> &seed, 
+			   TValue qPos, 
+			   TValue dPos, 
+			   TValue length, 
+			   SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	setRightDim0(seed, qPos+length-1);
+	setRightDim1(seed, dPos+length-1);
+	TValue diag = dPos-qPos;
+	if (leftDiagonal(seed) < diag)
+		setLeftDiagonal(seed, diag);
+	if (rightDiagonal(seed) > diag)
+		setRightDiagonal(seed, diag);
+}
+
+
+template<typename TValue>
+void
+_mergeTwoSeeds(Seed<TValue, SimpleSeed> &firstSeed, 
+			   TValue qlPos, 
+			   TValue dlPos, 
+			   TValue qrPos, 
+			   TValue drPos, 
+			   SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	setRightDim0(firstSeed, qrPos);
+	setRightDim1(firstSeed, drPos);
+	TValue diag = dlPos-qlPos;
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+	diag = drPos-qrPos;
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+}
+
+template<typename TValue>
+void
+_mergeTwoSeeds(Seed<TValue, ChainedSeed> &firstSeed, 
+			   TValue qPos, 
+			   TValue dPos, 
+			   TValue length, 
+			   SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	(firstSeed).seedSet.push_back(Triple<TValue, TValue, TValue>(qPos, dPos, length));
+	TValue diag = dPos-qPos;
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+}
+
+
+								////////////////////////////////////
+								//				Chaos			  //
+								////////////////////////////////////
+
+template<typename TValue, typename TSeedSpec, typename TText, typename TValue2, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		TValue qPos, 
+		TValue dPos, 
+		TValue length, 
+		Score<TValue2, Simple> const &scoreMatrix, 
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance, 
+		Chaos)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, qPos, dPos, length, gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		_mergeTwoSeeds(set.manager[id], qPos, dPos, length, query, database, scoreMatrix, Chaos());
+
+		
+		if (_qualityReached(set.manager[id],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(id);
+
+		if(x != dPos-qPos)
+		{
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} else
+		return false;
+}
+
+template<typename TValue, typename TValue2, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		Seed<TValue, ChainedSeed> const &seed, 
+		Score<TValue2, Simple> const &scoreMatrix, 
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance, 
+		Chaos)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, leftDim0(seed), leftDim1(seed),length(seed), gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		typedef typename std::list<Triple<TValue,TValue,TValue> >::const_iterator TIterator;
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		_mergeTwoSeeds(set.manager[id], leftDim0(seed), leftDim1(seed), _getFirstDiag(seed).i3, query, database, scoreMatrix, Chaos());
+ 
+		TIterator it2_end = _getDiagSet(seed).end(); 
+		for (TIterator it2 = ++_getDiagSet(seed).begin(); it2 != it2_end; ++it2)
+			appendDiag(set.manager[id],*it2);
+
+		if (_qualityReached(set.manager[id],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(id);
+
+		if(x != endDiagonal(seed))
+		{
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} else
+		return false;
+}
+
+template<typename TValue, typename TText, typename TValue2>
+void
+_mergeTwoSeeds(Seed<TValue, ChainedSeed>  &firstSeed, 
+			   TValue qPos, 
+			   TValue dPos, 
+			   TValue length, 
+			   String<TText> const &query, 
+			   String<TText> const &database, 
+			   Score<TValue2, Simple> const &scoreMatrix, 
+			   Chaos)
+{
+	SEQAN_CHECKPOINT
+	TValue databaseGap = dPos - rightDim1(firstSeed)-1;
+	TValue queryGap = qPos - rightDim0(firstSeed)-1;
+	TValue gap = abs(databaseGap-queryGap);
+
+	if (gap == 0)
+		setRightDim1(firstSeed,dPos + length-1);
+	else 
+	{
+		TValue tmpLength, tmpScore;
+		TValue currenvoid = 0;
+		TValue lPositionQuery = rightDim0(firstSeed);
+		TValue lPositionDatabase = rightDim1(firstSeed);
+		TValue rPositionQuery = qPos;
+		TValue rPositionDatabase = dPos;
+
+		TValue gap = (databaseGap < queryGap)? databaseGap : queryGap;
+		for (int i = 0; i <gap;++i)
+			currenvoid += score(scoreMatrix,--rPositionQuery,--rPositionDatabase,query,database);
+		tmpScore = currenvoid;
+		tmpLength = 0;
+		for (int i = 0; i < gap ; ++i)
+		{
+			currenvoid += score(scoreMatrix,++lPositionQuery,++lPositionDatabase,query,database) - score(scoreMatrix,rPositionQuery++,rPositionDatabase++,query,database);
+			if (currenvoid > tmpScore)
+			{
+				tmpScore = currenvoid;
+				tmpLength = i+1;
+			}
+		}
+		setRightDim0(firstSeed,rightDim0(firstSeed)+tmpLength);
+		(firstSeed).seedSet.push_back(Triple<TValue,TValue,TValue>(qPos-gap+tmpLength, dPos - gap +tmpLength,gap-tmpLength+length));		
+	}
+	TValue diag = dPos-qPos;
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+}
+
+
+								////////////////////////////////////
+								//				Blat			  //
+								////////////////////////////////////
+
+template<typename TValue, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		TValue qPos, 
+		TValue dPos, 
+		TValue length, 
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance, 
+		Blat)
+{
+	SEQAN_CHECKPOINT
+	typedef  typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, qPos, dPos, length, gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		int dLength = dPos - rightDim1(set.manager[id]);
+		int qLength = qPos - rightDim0(set.manager[id]);
+		int dLog = (int) ceil(log((double)dLength));
+		int qLog = (int) ceil(log((double)qLength));
+		int k;
+		int maxValue = (dLog > qLog) ? dLog : qLog;
+		if ((maxValue < dLength) && (maxValue < qLength))
+			k = maxValue;
+		else 
+			k = (dLog < qLog)? dLog : qLog;
+		_mergeTwoSeeds(set.manager[id], qPos, dPos, length, query, database, k, Blat());
+		if (_qualityReached(set.manager[id],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(id);
+
+		if(x != dPos-qPos)
+		{
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} else
+		return false;
+}
+
+template<typename TValue, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts>
+bool 
+addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+		Seed<TValue, ChainedSeed> const &seed, 
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance, 
+		Blat)
+{
+	SEQAN_CHECKPOINT
+	TValue qPos = leftDim0(seed);
+	TValue dPos = leftDim1(seed);
+	TValue length_ = _getFirstDiag(seed).i3;
+	typedef  typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, qPos, dPos, length(seed),  gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		int dLength = dPos - rightDim1(set.manager[id]);
+		int qLength = qPos - rightDim0(set.manager[id]);
+		int dLog = (int) ceil(log((double)dLength));
+		int qLog = (int) ceil(log((double)qLength));
+		int k;
+		int maxValue = (dLog > qLog) ? dLog : qLog;
+		if ((maxValue < dLength) && (maxValue < qLength))
+			k = maxValue;
+		else 
+			k = (dLog < qLog) ? dLog : qLog;
+		_mergeTwoSeeds(set.manager[id], qPos, dPos, length_, query, database, k, Blat());
+		typedef typename std::list<Triple<TValue,TValue,TValue> >::const_iterator TIterator; 
+		TIterator it2_end = _getDiagSet(seed).end();
+		for (TIterator it2 = ++_getDiagSet(seed).begin(); it2 != it2_end; ++it2)
+			appendDiag(set.manager[id],*it2);
+
+		if (_qualityReached(set.manager[id],0,qualityValue(set), TQualityFactor()))
+			set.result.insert(id);
+		
+		if(x != endDiagonal(seed))
+		{
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} else
+		return false;
+}
+
+template<typename TValue, typename TText>
+void
+_mergeTwoSeeds(Seed<TValue, ChainedSeed>  &firstSeed, 
+			   TValue qPos,
+			   TValue dPos, 
+			   TValue length, 
+			   String<TText> const &query,
+			   String<TText> const &database, 
+			   TValue q, 
+			   Blat)
+{
+	SEQAN_CHECKPOINT
+	std::list<Triple<TValue, TValue, TValue> > tmp;
+	TValue leftDiag = leftDiagonal(firstSeed);
+	TValue rightDiag = rightDiagonal(firstSeed);
+	TValue diag;
+	_gapFill(rightDim0(firstSeed)+1, rightDim1(firstSeed)+1, qPos, dPos, tmp, query, database,q);
+	if (tmp.size() > 0)
+	{
+		Triple<TValue, TValue, TValue> x = *tmp.begin();
+		if ((x.i1 == rightDim0(firstSeed)+1)&& (x.i2 == rightDim1(firstSeed)+1))
+		{
+			tmp.front().i1 = _getDiagSet(firstSeed).back().i1;
+			tmp.front().i2 = _getDiagSet(firstSeed).back().i2;
+			tmp.front().i3 += _getDiagSet(firstSeed).back().i3;
+			_getDiagSet(firstSeed).pop_back();
+		}
+		x = tmp.back();
+		if ((x.i1+x.i3 == qPos)&& (x.i2+x.i3 == dPos))
+		{
+			qPos = x.i1;
+			dPos = x.i2;
+			length += x.i3;
+			tmp.pop_back();
+		}
+	}
+	_getDiagSet(firstSeed).splice(_getDiagSet(firstSeed).end(),tmp); 
+	_getDiagSet(firstSeed).push_back(Triple<TValue,TValue,TValue>(qPos,dPos,length));
+	typedef typename std::list<Triple<TValue, TValue, TValue> >::iterator TIterator;
+	TIterator it_end = _getDiagSet(firstSeed).end();
+	for (TIterator it = _getDiagSet(firstSeed).begin(); it != it_end ; ++it)
+	{
+		diag = it->i2 - it->i1;
+		if (diag >leftDiag) 
+			leftDiag = diag;
+		if (diag < rightDiag)
+			rightDiag = diag;
+	}
+	setRightDiagonal(firstSeed, rightDiag);
+	setLeftDiagonal(firstSeed, leftDiag);
+}
+
+
+template<typename TValue, typename TText>
+void
+_extendSeed(Triple<TValue,TValue,TValue> &position, 
+			Segment<String<TText> const, InfixSegment> qSeg, 
+			Segment<String<TText> const, InfixSegment> dSeg)
+{
+	SEQAN_CHECKPOINT
+	TValue dMax = length(dSeg);
+	TValue qMax = length(qSeg);
+	TValue qlength = position.i3;
+	while ((position.i1+qlength < qMax) && (position.i2+qlength < dMax) && (qSeg[position.i1+qlength] == dSeg[position.i2+qlength]))
+		++qlength;
+
+	position.i3 = qlength;
+}
+
+template<class TTriple>
+struct SortProcess : public std::binary_function<TTriple, TTriple, bool>{
+
+    inline bool 
+	operator()(TTriple left, TTriple right) const {//return true if left is logically less then right for given comparison
+		return (left.i1+left.i2 < right.i1+right.i2);
+	}
+
+};
+
+
+// Recursive function that fills the gap with smaller alignments
+template<typename TValue, typename TText>
+void
+_gapFill(TValue qlPos, //query sequence left
+		 TValue dlPos, //database sequence left
+		 TValue qrPos, //query sequence right
+		 TValue drPos, //database sequence right
+		 std::list<Triple<TValue, TValue, TValue> > &diagList,
+		 String<TText> const &query, 
+		 String<TText> const &database,
+		 TValue q)
+{
+    SEQAN_CHECKPOINT
+    if ( q > 1)
+	{
+	    bool change =false;
+	    Segment<String<TText> const, InfixSegment> qSeg = infix(query ,qlPos, qrPos);
+	    Segment<String<TText> const, InfixSegment> dSeg = infix(database ,dlPos, drPos);
+
+	    typedef Index< String<TText>, IndexQGram<SimpleShape > > TQGramIndex;
+	  //  TValue qLastLeft = qlPos;
+	   // TValue dLastLeft = dlPos;
+	    //TValue t;
+	    TQGramIndex index_qgram(dSeg);
+	    resize(indexShape(index_qgram), q);
+	    Finder<TQGramIndex> finder(index_qgram);
+	    String<Dna> qgram;
+	    std::list<Triple<TValue,TValue,TValue> > listTmp, listTmp2, seeds;
+	    Triple<TValue, TValue, TValue> megaTemp(0,0,q);
+	    TValue maximum;
+	    for (unsigned int i = 0; i <= length(qSeg)-q; ++i)
+		{
+			qgram= infix(qSeg,i,i+q);
+			maximum = 0;
+			megaTemp.i1 = i;
+			while (find(finder,qgram))
+			{
+				megaTemp.i3 = q;
+				megaTemp.i2 = position(finder); 
+				_extendSeed(megaTemp,qSeg,dSeg);
+				if (megaTemp.i3 == maximum)
+					listTmp2.push_back(megaTemp);
+				else
+					if (megaTemp.i3 > maximum)
+					{
+						listTmp2.clear();
+						listTmp2.push_back(megaTemp);
+						maximum = megaTemp.i3;
+					}
+			}
+
+			listTmp.splice(listTmp.end(),listTmp2);
+			listTmp2.clear();
+			clear(finder);
+	    }
+	    listTmp.sort(SortProcess<Triple<TValue, TValue, TValue > >());
+
+	    TValue qValue = -1;
+	    TValue dValue = -1;
+		typedef typename std::list<Triple<TValue,TValue,TValue> >::iterator TIterator;
+		TIterator it_end = listTmp.end();
+	    for (TIterator itInner = listTmp.begin(); itInner != it_end; ++itInner)
+		{
+		    if ((itInner->i1 > qValue) &&(itInner->i2 >dValue))
+			{
+			    seeds.push_back(*itInner);
+			    qValue = itInner->i1 + itInner->i3 -1;
+			    dValue = itInner->i2 + itInner->i3 -1;
+		    }
+	    }
+	    listTmp.clear();
+
+		it_end = seeds.end();
+	    for (TIterator itInner = seeds.begin(); itInner != it_end; ++itInner)
+		{
+		    itInner->i1 += qlPos;
+		    itInner->i2 += dlPos;
+	    }
+
+	    seeds.push_front(Triple<TValue,TValue,TValue>(qlPos, dlPos,0));
+	    seeds.push_back(Triple<TValue,TValue,TValue>(qrPos, drPos,0));
+	    TIterator it2 = ++seeds.begin();
+	    TIterator it = seeds.begin();
+		it_end = seeds.end();
+	    while (it2!= it_end)
+		{
+		    change = true;
+			if ((it2->i1 - it->i1 - it->i3 >5)&&(it2->i2 - it->i2 - it->i3 >5))
+				_gapFill(it->i1+it->i3,it->i2+it->i3,it2->i1,it2->i2, diagList, query,database,q-1);
+
+			diagList.push_back(Triple<TValue, TValue, TValue>(it2->i1,it2->i2,it2->i3));
+		    ++it;
+		    ++it2;
+	    }
+		diagList.pop_back();
+
+		if ((!change) &&(q>2))
+			_gapFill(qlPos, dlPos, qlPos, qrPos, diagList, query, database, q-1);
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//									Delete to far away														  //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+template<typename TValue, typename TSeedSpec, typename TQualityFactor, typename TGapCosts>
+void
+_deleteEverything(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, void> &deletionTarget, 
+				  TValue currentPos)
+{
+	typedef typename Size<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, void> >::Type TSize;
+	typedef std::multimap<TValue, TSize > TMap;
+	typedef typename std::set<TSize>::iterator TSetIterator;
+	TSetIterator set_end = deletionTarget.result.end();
+	typename TMap::iterator it_end = deletionTarget.fragmentMap.end();
+	TSize pos;
+	for (typename TMap::iterator it = deletionTarget.fragmentMap.begin(); it != it_end;)
+	{
+		pos = it->second;
+		if (currentPos - rightDim0(deletionTarget.manager[pos]) > deletionTarget.maxDistance)
+		{
+			deletionTarget.fragmentMap.erase(it++);
+			if (set_end == deletionTarget.result.find(pos))
+			{	
+				valueDestruct(&deletionTarget.manager[pos]);
+				releaseID(deletionTarget.manager,pos);
+			}
+		}
+		else
+			++it;
+	}
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//				Finding seed for merging/chaining															  //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+typename std::multimap<TValue, 	typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type >::iterator
+_findSeedsChain(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+				TValue qPos, 
+				TValue dPos, 
+				TValue length, 
+				int gapDistance)
+{
+
+	if(set.last != qPos){
+		_deleteEverything(set, qPos);
+		set.last = qPos;
+	}
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	TValue diag = dPos-qPos;
+	TIterator itUp=set.fragmentMap.upper_bound(diag+gapDistance);  
+	TIterator tmp = set.fragmentMap.end();
+	TValue tempDistance1 = minValue<TValue>();
+	TValue tmpValue;
+	
+	for (TIterator it=set.fragmentMap.lower_bound(diag-gapDistance); it != itUp; it++ )
+	{
+		TSize id = it->second;
+		if ((qPos > rightDim0(set.manager[id])) && (dPos > rightDim1(set.manager[id])))
+		{
+			tmpValue = _calculateScoringValue(set.manager[id],qPos, dPos, length, TGapCosts());
+			if (tmpValue > tempDistance1)
+			{
+				tmp = it;
+				tempDistance1 = tmpValue;
+			}
+		}
+	}
+	return tmp;
+}
+
+
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts>
+typename std::multimap<TValue, typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type >::iterator
+_findSeedsMerge(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, 
+				TValue qPos, 
+				TValue dPos, 
+				TValue length_, 
+				int gapDistance)
+{	
+	SEQAN_CHECKPOINT
+	if(set.last != qPos){
+		_deleteEverything(set, qPos);
+		set.last = qPos;
+	}
+
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type TSize;
+	TValue maxLength = -1;
+	TValue tmpLength;
+	TValue diag = dPos-qPos;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	TIterator tmpIt = set.fragmentMap.end();
+	
+	//new seed has higher diagonal number
+	TIterator itUp=set.fragmentMap.upper_bound(diag); 
+	for (TIterator it=set.fragmentMap.lower_bound(diag-gapDistance); it != itUp; it++ )
+	{
+		tmpLength = qPos+length_ - leftDim0(set.manager[it->second]) - abs(it->first-diag);
+		if ((dPos <= rightDim1(set.manager[it->second])) && (tmpLength > maxLength) &&(tmpLength > length(set.manager[it->second]))){
+			tmpIt = it;
+			maxLength = tmpLength;
+		}
+	}
+	
+	//new seed has lower diagnoal number
+	itUp=set.fragmentMap.upper_bound(diag+ gapDistance);  
+	for (TIterator it=set.fragmentMap.lower_bound (diag+1); it != itUp; it++ )
+	{
+		tmpLength = qPos+length_ - 1 - leftDim0(set.manager[it->second])- abs(it->first-diag);
+		if ((qPos <= rightDim0(set.manager[it->second])) && (tmpLength > maxLength) &&(tmpLength > length(set.manager[it->second]))){
+			tmpIt = it;
+			maxLength = tmpLength;
+		}
+	}
+
+	return tmpIt;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                       Extension Algorithms                                                      //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.extendSeeds
+..summary: Extension of seeds.
+..cat:Seed Handling
+..signature:extendSeeds(container, query, database, direction, MatchExtend)
+..signature:extendSeeds(begin, end, query, database, direction, MatchExtend)
+..signature:extendSeeds(container, scoreDropOff, scoreMatrix, query, database, direction, tag)
+..signature:extendSeeds(begin, end, scoreDropOff, scoreMatrix, query, database, direction, tag)
+..param.container: The container with the @Class.Seed@ objects to extend.
+...type:Concept.Container
+..param.begin: Iterator pointing to the first value to add.
+..param.end: Iterator pointing just behind the last value to add.
+..param.query: The query sequence.
+...type:Class.String
+..param.query: The database sequence.
+...type:Class.String
+..param.direction: Defines the direction in which the seed should be extended. 0 = left, 1 = right, 2 = both
+..param.scoreDropOff: The score drop after which the extension should stop. The extension stops if this value is exceeded.
+..param.scoreMatrix: The scoring sheme.
+...type:Spec.Simple Score
+..param.tag: The algorithm to use.
+...type:Tag.Seed Extension.MatchExtend
+...type:Tag.Seed Extension.tag.UngappedXDrop
+...type:Tag.Seed Extension.tag.GappedXDrop
+..include:seqan/seeds.h
+*/
+
+template<typename TContainer, typename TQuery, typename TDatabase, typename TDirection>
+void
+extendSeeds(TContainer &seedSet, 
+			String<TQuery> &query, 
+			String<TDatabase> &database, 
+			TDirection direction, 
+			MatchExtend)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TContainer,Standard>::Type TIterator;
+	TIterator it2 = end(seedSet);
+	for (TIterator it1 = begin(seedSet); it1 != it2; ++it1)
+		extendSeed(*it1, query, database, direction, MatchExtend());
+}
+
+template<typename TIterator, typename TQuery, typename TDatabase, typename TDirection>
+void
+extendSeeds(TIterator begin, 
+			TIterator end, 
+			String<TQuery> &query,
+			String<TDatabase> &database, 
+			TDirection direction, 
+			MatchExtend)
+{
+	SEQAN_CHECKPOINT
+	for (TIterator it = begin; it != end; ++it)
+		extendSeed(*it, query, database, direction, MatchExtend());		
+}
+
+template<typename TContainer, typename TQuery, typename TDatabase, typename TextendSeedSpec, typename TValue, typename TValue2, typename TDirection>
+void
+extendSeeds(TContainer &seedSet, 
+			TValue scoreDropOff, 
+			Score<TValue2, Simple> const &scoreMatrix,
+			String<TQuery> const &query, 
+			String<TDatabase> const &database, 
+			TDirection direction, 
+			TextendSeedSpec tag)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TContainer,Standard>::Type TIterator;
+	TIterator it2 = end(seedSet);
+	for (TIterator it1 = begin(seedSet); it1 != it2; ++it1)
+		extendSeed(*it1, scoreDropOff, scoreMatrix, query, database, direction, tag);
+}
+
+
+template<typename TIterator, typename TextendSeedSpec, typename TValue, typename TQuery, typename TDatabase, typename TDirection>
+void
+extendSeeds(TIterator begin, 
+			TIterator end, 
+			TValue scoreDropOff, 
+			Score<TValue, Simple> const &scoreMatrix, 
+			String<TQuery> const &query,
+			String<TDatabase> const &database, 
+			TDirection direction, 
+			TextendSeedSpec tag)
+{
+	SEQAN_CHECKPOINT
+	for (TIterator it = begin; it != end; ++it)
+		extendSeed(*it, scoreDropOff, scoreMatrix, query, database, direction, tag);		
+}
+
+
+} //namespace Seqan
+
+
+#endif //#ifndef SEQAN_HEADER_
diff --git a/src/SeqAn-1.3/seqan/seeds/seedSet_iterator.h b/src/SeqAn-1.3/seqan/seeds/seedSet_iterator.h
new file mode 100644
index 0000000..28e050e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/seedSet_iterator.h
@@ -0,0 +1,316 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEEDSET_ITERATOR_H
+#define SEQAN_HEADER_SEEDSET_ITERATOR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Iter
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+template <typename TSeedSet>
+class Iter<TSeedSet, SeedIterator>
+{
+public:
+	typedef typename Size<TSeedSet>::Type TSize;
+	typename std::set<TSize>::iterator data_ptr;
+    typedef TSize TValue;
+	TSeedSet *set;
+
+	Iter()
+	{
+		this->set = 0;
+	}
+
+	Iter(TSeedSet &set)
+	{
+		this->set = &set;
+	}
+
+	Iter(TSeedSet const &set)
+	{
+		this->set = &set;
+	}
+
+	Iter(TSeedSet &set, Iter & other_):
+		data_ptr(other_.data_ptr)
+	{
+		this->set = &set;
+	}
+		
+	Iter(TSeedSet &set, typename std::set<TSize>::iterator other_)//:data_ptr(other_)
+	{
+		data_ptr = other_;
+		this->set = &set;
+	}
+        
+        
+        
+	Iter(TSeedSet &/*set*/, TSize &other_data_ptr):
+		data_ptr(other_data_ptr)
+	{
+	}
+	template <typename TSeedSet2>
+	Iter(TSeedSet &set, Iter<TSeedSet2, SeedIterator> & other_):
+		data_ptr(other_.data_ptr)
+	{
+		this->set = &set;
+	}
+	~Iter()
+	{
+	}
+
+	Iter const &
+	operator = (Iter const & other_)
+	{
+		this->data_ptr = other_.data_ptr;
+                this->set = other_.set;
+		return *this;
+	}
+	
+        /*
+        Iter const &
+	operator = (TValue * other_data_ptr)
+	{
+		data_ptr = other_data_ptr;
+		return *this;
+	}*/
+        
+	template <typename TContainer2>
+	Iter const &
+	operator = (Iter<TContainer2, SeedIterator> const & other_)
+	{
+		this->data_ptr = other_.data_ptr;
+                this->set = other_.set;
+		return *this;
+	}
+
+	operator TValue * ()
+	{
+		return set->manager[*data_ptr];
+	}
+
+};
+
+
+template <typename TSeedSet>
+class Iter<TSeedSet const, SeedIterator>
+{
+public:
+	typedef typename Size<TSeedSet>::Type TSize;
+	typename std::set<TSize>::const_iterator data_ptr;
+	TSeedSet const *set;
+
+	Iter()
+	{
+		this->set = 0;
+	}
+
+	Iter(TSeedSet const &set)
+	{
+		this->set = &set;
+	}
+
+	Iter(TSeedSet &set, Iter const & other_):
+		data_ptr(other_.data_ptr)
+	{
+		this->set = &set;
+	}
+
+
+	Iter(TSeedSet const &set, typename std::set<TSize>::const_iterator const & other_):
+		data_ptr(other_)
+	{
+		//data_ptr = other_;
+		this->set = &set;
+	}
+
+	Iter(TSeedSet const  &/*set*/, TSize * other_data_ptr):
+		data_ptr(other_data_ptr)
+	{
+	}
+	template <typename TSeedSet2>
+	Iter(TSeedSet const &set, Iter<TSeedSet2 const, SeedIterator> const & other_):
+		data_ptr(other_.data_ptr)
+	{
+		this->set = &set;
+	}
+		
+		
+	~Iter()
+	{
+	}
+
+	Iter const &
+	operator = (Iter const & other_)
+	{
+		this->data_ptr = other_.data_ptr;
+		this->set = other_.set;
+		return *this;
+	}
+	Iter const &
+	operator = (TSize * other_data_ptr)
+	{
+		data_ptr = other_data_ptr;
+		return *this;
+	}
+	template <typename TSeedSet2>
+	Iter const &
+	operator = (Iter<TSeedSet2 const, SeedIterator> const & other_)
+	{
+		this->data_ptr = other_.data_ptr;
+		this->set = other_.set;
+		return *this;
+	}
+
+};
+
+
+template <typename TSeedSet>
+struct Value<Iter<TSeedSet const, SeedIterator> >
+{
+	typedef typename Value<TSeedSet>::Type Type;
+};
+
+
+
+template<typename TSeedSet>
+inline Iter<TSeedSet, SeedIterator >&
+operator ++(Iter<TSeedSet, SeedIterator > &me)
+{
+SEQAN_CHECKPOINT
+	++me.data_ptr;
+	return me;
+}
+
+template<typename TSeedSet>
+inline Iter<TSeedSet, SeedIterator >&
+goNext(Iter<TSeedSet, SeedIterator > &it)
+{
+SEQAN_CHECKPOINT
+	++(it.data_ptr);
+	return it;
+}
+
+template<typename TSeedSet>
+inline Iter<TSeedSet, SeedIterator >&
+operator --(Iter<TSeedSet, SeedIterator > &it)
+{
+SEQAN_CHECKPOINT
+	--(it.data_ptr);
+	return it;
+}
+
+template<typename TSeedSet>
+inline typename Reference<Iter<TSeedSet, SeedIterator> >::Type
+value(Iter<TSeedSet, SeedIterator > &it)
+{
+SEQAN_CHECKPOINT
+	return it.set->manager[*it.data_ptr];
+}
+
+template <typename TSeedSet>
+inline typename Reference<Iter<TSeedSet, SeedIterator> const>::Type 
+ value(Iter<TSeedSet, SeedIterator> const &me)
+{
+SEQAN_CHECKPOINT
+	return me.set->manager[*me.data_ptr];
+}
+
+
+
+template <typename TSeedSet>
+inline typename Reference<Iter<TSeedSet, SeedIterator> const>::Type 
+operator * (Iter<TSeedSet, SeedIterator> & me)
+{
+SEQAN_CHECKPOINT
+	return me.set->manager[*me.data_ptr];
+}
+
+template <typename TSeedSet>
+inline typename Reference<Iter<TSeedSet const, SeedIterator> const>::Type 
+operator * (Iter<TSeedSet const, SeedIterator> & me)
+{
+SEQAN_CHECKPOINT
+	return me.set->manager[*me.data_ptr];
+}
+
+template<typename TSeedSet>
+inline bool
+operator !=(Iter<TSeedSet, SeedIterator > it1, Iter<TSeedSet, SeedIterator > it2)
+{
+	return it1.data_ptr != it2.data_ptr;
+}
+
+/**
+.Function.seedScore:
+..summary:Returns the score of a seed.
+..cat:Seed Handling
+..signature:seedScore(it);
+..param.it: The seedSet iterator.
+..return:Score of the seed.
+..include:seqan/seeds.h
+*/
+template<typename TSeedSet>
+inline typename ScoreType<typename ScoringScheme<TSeedSet>::Type>::Type &
+seedScore(Iter<TSeedSet, SeedIterator > it)
+{
+SEQAN_CHECKPOINT
+    return it.set->scoreMap[*it.data_ptr];
+}
+
+
+
+template<typename TSeedSet>
+inline typename ScoreType<typename ScoringScheme<TSeedSet>::Type>::Type const&
+seedScore(Iter<TSeedSet const, SeedIterator > &it)
+{
+SEQAN_CHECKPOINT
+	return it.set->scoreMap[*it.data_ptr];
+}
+
+template<typename TSeedSet, typename TSize>
+void
+setScore(Iter<TSeedSet, SeedIterator > &it, TSize score)
+{
+SEQAN_CHECKPOINT
+	it.set->scoreMap[*it.data_ptr] = score;
+}
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/seeds/seedSet_score.h b/src/SeqAn-1.3/seqan/seeds/seedSet_score.h
new file mode 100644
index 0000000..c1f0646
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/seedSet_score.h
@@ -0,0 +1,2136 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEEDSET_SCORE_H
+#define SEQAN_HEADER_SEEDSET_SCORE_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template<typename TValue, typename TScore>
+inline TScore
+_calculateScoringValue(TValue qPos1, 
+					   TValue dPos1,
+					   TValue qPos2,
+					   TValue dPos2,
+					   Score<TScore, Simple> const &matrix, 
+					   Manhattan)
+{
+	return (qPos2 - qPos1 + dPos2 - dPos1-2)*scoreGapExtend(matrix)+scoreGapOpen(matrix);
+}
+
+template<typename TValue, typename TScore>
+inline TScore
+_calculateScoringValue(TValue qPos1, 
+					   TValue&,
+					   TValue qPos2, 
+					   TValue &, 
+					   Score<TScore, Simple> const &matrix, 
+					   QueryDistance)
+{
+	return (qPos2 - qPos1 -1)*scoreGapExtend(matrix)+scoreGapOpen(matrix);
+}
+
+template<typename TValue, typename TScore>
+inline TScore
+_calculateScoringValue(TValue &,
+					   TValue dPos1,
+					   TValue &, 
+					   TValue dPos2, 
+					   Score<TScore, Simple> const &matrix, 
+					   DatabaseDistance)
+{
+	return (dPos2 - dPos1-1)*scoreGapExtend(matrix)+scoreGapOpen(matrix);
+}
+
+template<typename TValue, typename TSeed, typename TScore>
+inline TValue
+_calculateScoringValue(TSeed &, 
+					   TValue &, 
+					   TValue &, 
+					   Score<TScore, Simple> &, 
+					   NoGapCost)
+{
+	return 0;
+}
+
+
+template<typename TValue, typename TSeed, typename TScore>
+inline TValue
+_calculateScoringValue(TSeed const &seed, 
+					   TValue qPos, 
+					   TValue dPos, 
+					   TValue &, 
+					   TScore score, 
+					   Manhattan)
+{
+    return score + rightDim0(seed) - qPos + rightDim1(seed) - dPos;
+}
+
+template<typename TValue, typename TSeed, typename TScore>
+inline TValue
+_calculateScoringValue(TSeed const &seed, 
+					   TValue qPos, 
+					   TValue &,
+					   TValue &,
+					   TScore score,
+					   QueryDistance)
+{
+    return score + rightDim0(seed) - qPos;
+}
+
+template<typename TValue, typename TSeed, typename TScore>
+inline TValue
+_calculateScoringValue(TSeed const &seed, 
+					   TValue &, 
+					   TValue dPos, 
+					   TValue &,
+					   TScore score,
+					   DatabaseDistance)
+{
+    return score + rightDim1(seed) - dPos;
+}
+
+template<typename TValue, typename TSeed, typename TScore>
+inline TValue
+_calculateScoringValue(TSeed &, 
+					   TValue &,
+					   TValue &, 
+					   TValue &, 
+					   TScore &, 
+					   NoGapCost)
+{
+    return score;
+}
+
+
+///.Metafunction.Value.param.T.type:Class.SeedSet
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec>
+struct ScoringScheme<SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> >
+{
+	typedef TSpecScoring Type;
+};
+
+
+/**
+.Spec.Scored SeedSet
+..summary:SeedSet that uses scored Seeds.
+..cat:Seed Handling
+..general:Class.SeedSet
+..signature:SeedSet<TPosition, TSeedSpec, TScoringScheme, TSpec>
+..param.TPosition: Type that saves the positions and upper/lower bounds.
+...remarks: Positive and negative values are needed.
+..param.TSeedSpec:The @Class.Seed@ specialization.
+..param.TScoringScheme:The scoring sheme to use.
+..include:seqan/seeds.h
+*/
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec> 
+class SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec>
+{
+
+public:
+    static const unsigned int BLOCKSIZE = BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, void> >::Value;
+    typedef typename Size<String<TValue, Block<BLOCKSIZE> > >::Type TSize;
+    typedef PropertyMap<typename ScoreType<TScoringSpec>::Type, Block<BLOCKSIZE> > PropMap;
+    MemoryManager<Seed<TValue, TSeedSpec>, Block<BLOCKSIZE>,FreeMemoryInt> manager;
+    std::multimap<TValue,  TSize> fragmentMap;
+    std::set<TSize> result;
+    TValue maxDistance;
+    typename ScoreType<TScoringSpec>::Type qualityValue;
+
+    PropMap scoreMap;
+    Score<int, Simple> scoreMatrix;
+	TValue last;
+
+    SeedSet(){
+	SEQAN_CHECKPOINT
+		last=0;
+    }
+
+	SeedSet(TValue maxDistance, TValue qualityValue):maxDistance(maxDistance),qualityValue(qualityValue){
+	//SaEQAN_CHECKPOINT
+		last = 0;
+    }
+
+
+    SeedSet(TValue maxDistance, TValue qualityValue, Score<int,Simple> matrix):maxDistance(maxDistance),qualityValue(qualityValue),scoreMatrix(matrix){
+	SEQAN_CHECKPOINT
+		last=0;
+    }
+
+    ~SeedSet(){
+	SEQAN_CHECKPOINT
+	clear(manager);
+    }
+};
+
+
+//Only difference is the destructor.
+template<typename TValue, typename TSpec, typename TScoringSpec> 
+class SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec>
+{
+
+public:
+	TValue last;
+    static const unsigned int BLOCKSIZE = BLOCK_SIZE<SeedSet<TValue, ChainedSeed, TScoringSpec, void> >::Value;
+    typedef typename Size<String<TValue, Block<BLOCKSIZE> > >::Type TSize;
+    MemoryManager<Seed<TValue, ChainedSeed>, Block<BLOCKSIZE>, FreeMemoryInt > manager;
+    std::multimap<TValue, TSize> fragmentMap;
+    std::set<TSize> result;
+    TValue maxDistance;
+    typename ScoreType<TScoringSpec>::Type qualityValue;
+    PropertyMap<typename ScoreType<TScoringSpec>::Type, Block<BLOCKSIZE> > scoreMap;
+    Score<int, Simple> scoreMatrix;
+
+SeedSet(){
+    SEQAN_CHECKPOINT
+}
+
+SeedSet(TValue maxDistance, TValue qualityValue, Score<int,Simple> matrix):maxDistance(maxDistance),qualityValue(qualityValue),scoreMatrix(matrix){
+    SEQAN_CHECKPOINT
+}
+
+
+~SeedSet()
+{
+	
+    SEQAN_CHECKPOINT
+    typedef typename Size<String<TValue, Block<BLOCKSIZE> > >::Type TSize;
+    std::set<TSize> del;
+
+	typedef typename std::multimap<TValue,  TSize>::iterator TIterator;
+	TIterator it_end = fragmentMap.end();
+	for (TIterator it = fragmentMap.begin(); it != it_end;++it)
+	{
+		TSize id = it->second;
+		manager[id].~Seed<TValue, ChainedSeed>();
+		result.erase(id);
+	}
+
+	typedef typename std::set<TSize>::iterator TIterator2;
+	TIterator2 it_end2 = result.end();
+	for (TIterator2 it = result.begin(); it != it_end2;++it)
+	{
+		manager[*it].~Seed<TValue, ChainedSeed>();
+	}
+	
+	clear(scoreMap);
+	clear(manager);
+}
+
+};
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//										   Container Functions	                                                   //
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//.Function.append.param.object.type:Class.SeedSet
+template<typename TValue, typename TSeedSpec, typename TContainer1, typename TContainer2, typename TSpec, typename TScoringSpec>
+void
+append(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, 
+	   TContainer1 &seedSource, 
+	   TContainer2 &scoreSource)
+{
+    SEQAN_CHECKPOINT
+    typedef typename Iterator<TContainer1>::Type TIterator;
+    typename Iterator<TContainer2>::Type itScore = begin(scoreSource);
+	
+	TIterator it_end = end(seedSource);
+    for (TIterator itSeed = begin(seedSource); itSeed!= it_end; ++itSeed)
+	{
+		addSeed(target, *itSeed, *itScore,Single());
+		++itScore;
+    }
+}
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec, typename TValue2>
+void
+appendValue(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, 
+	    Seed<TValue, TSeedSpec> &seed, 
+	    TValue2 score)
+{
+    SEQAN_CHECKPOINT
+    addSeed(target,seed,score,Single());
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//									         Standard Methods													   //
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec>
+inline void
+setScoreMatrix(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, Score<int,Simple> matrix)
+{
+    SEQAN_CHECKPOINT
+    set.scoreMatrix = matrix;
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec>
+inline Score<int,Simple>
+getScoreMatrix(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set)
+{
+    SEQAN_CHECKPOINT
+    return set.scoreMatrix;
+}
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec>
+void
+clear(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set)
+{
+    SEQAN_CHECKPOINT
+    typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+    std::set<TSize> del;
+    TSize x = (obtainID(set.manager));
+    while (x < length(set.manager)-1) 
+	{
+		del.insert(x);
+		x = obtainID(set.manager);
+    }
+    del.insert(-1);
+    typename std::set<TSize>::iterator it = del.begin();
+    for (TSize i = 0; i < length(set.manager)-1; ++i){
+		if (i != *it)
+			set.manager[i].~Seed<TValue, TSeedSpec>();
+		else
+			++it;
+		}
+    set.fragmentMap.clear();
+    set.result.clear();
+    clear(set.scoreMap);
+    clear(set.manager);
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec>
+inline PropertyMap<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> >*
+_scoreMap(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set)
+{
+    return &set.scoreMap;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                    Addition of a Single new Seed                                               //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSpec, typename TScoringSpec, typename TPosition, typename TSize2, typename TScore, typename TSeedSpec>
+bool
+addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+	TPosition qPos, 
+	TPosition dPos, 
+	TSize2 length, 
+	TScore score, 
+	Single)
+{
+    SEQAN_CHECKPOINT
+	typedef SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> TSeedSet;
+	typedef String<TValue, Block< BLOCK_SIZE<TSeedSet>::Value> > TBlockString;
+    typedef typename Size<TBlockString>::Type TSize;
+    typedef typename QualityFactor<TScoringSpec>::Type TQuality;
+
+	TSize position = obtainID(set.manager);
+    if (set.manager.change)
+		raiseMemory(set.scoreMap);
+
+    new (&set.manager[position]) Seed<TValue, TSeedSpec>(qPos,dPos,length);
+    set.scoreMap[position] = score;
+    if (_qualityReached(set.manager[position],set.scoreMap[position], set.qualityValue, TQuality()))
+		set.result.insert(position);
+
+	set.fragmentMap.insert( std::make_pair(static_cast<int>(dPos-qPos), position));
+    return true;
+}
+
+
+//Score calculation
+template<typename TValue, typename TSpec, typename TScoringSpec, typename TPosition, typename TSize, typename TSeedSpec>
+inline bool
+addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+    TPosition qPos, 
+    TPosition dPos, 
+    TSize length, 
+    Single)
+{
+	SEQAN_CHECKPOINT
+	return addSeed(set, qPos, dPos, length, scoreMatch(set.scoreMatrix)*length, Single());
+}
+
+
+template<typename TValue, typename TSpec, typename TScoringSpec, typename TPosition, typename TScore>
+bool
+addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, 
+	TPosition qBeginPos, 
+	TPosition dBeginPos, 
+	TPosition qEndPos, 
+	TPosition dEndPos, 
+	TScore score, 
+	Single)
+{
+    SEQAN_CHECKPOINT
+    typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+    typedef typename QualityFactor<TScoringSpec>::Type TQuality;
+   
+	//Seed<TValue, SimpleSeed>* pSeed;
+    TSize position = obtainID(set.manager);
+    if (set.manager.change)
+		raiseMemory(set.scoreMap);
+
+    new (&set.manager[position]) Seed<TValue, SimpleSeed>(qBeginPos,dBeginPos,qEndPos,dEndPos);
+    set.scoreMap[position] = score;
+    if (_qualityReached(set.manager[position],set.scoreMap[position], set.qualityValue ,TQuality()))
+		set.result.insert(position);
+
+    set.fragmentMap.insert( std::pair<TValue, TSize >( dEndPos-qEndPos, position ) );
+    return true;
+}
+
+
+template<typename TValue, typename TSpec, typename TScoringSpec, typename TScore>
+bool
+addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, 
+	Seed<TValue, SimpleSeed> const &seed, 
+	TScore score, 
+	Single)
+{
+    SEQAN_CHECKPOINT
+    typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+    typedef typename QualityFactor<TScoringSpec>::Type TQuality;
+   
+	TSize position = obtainID(set.manager);
+    if (set.manager.change)
+		raiseMemory(set.scoreMap);
+
+    new (&set.manager[position]) Seed<TValue, SimpleSeed>(leftDim0(seed), leftDim1(seed), rightDim0(seed), rightDim1(seed));
+    set.scoreMap[position] = score;
+    if (_qualityReached(set.manager[position],set.scoreMap[position], set.qualityValue ,TQuality()))
+		set.result.insert(position);
+
+    setLeftDiagonal(set.manager[position], leftDiagonal(seed));
+    setRightDiagonal(set.manager[position], rightDiagonal(seed));
+    set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(seed), position ) );
+    return true;
+}
+
+
+template<typename TValue, typename TSpec, typename TScoringSpec, typename TScore>
+bool
+addSeed(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &set, 
+	Seed<TValue, ChainedSeed> const &seed, 
+	TScore score, 
+	Single)
+{
+    SEQAN_CHECKPOINT
+    typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+    typedef typename QualityFactor<TScoringSpec>::Type TQuality;
+    typedef typename std::list<Triple<TValue, TValue, TValue> >::const_iterator TIterator;
+	
+	TSize position = obtainID(set.manager);
+    if (set.manager.change)
+		raiseMemory(set.scoreMap);
+
+    new (&set.manager[position]) Seed<TValue, ChainedSeed>();
+    set.scoreMap[position] = score;
+	TIterator it_end = _getDiagSet(seed).end();
+    for (TIterator it = _getDiagSet(seed).begin(); it != it_end ; ++it)
+		appendDiag(set.manager[position],*it);
+
+    if (_qualityReached(set.manager[position],set.scoreMap[position], set.qualityValue ,TQuality()))
+		set.result.insert(position);
+
+    setLeftDiagonal(set.manager[position], leftDiagonal(seed));
+    setRightDiagonal(set.manager[position], rightDiagonal(seed));
+    set.fragmentMap.insert( std::pair<TValue, TSize >( endDiagonal(set.manager[position]), position));
+    return true;
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//										       Merging												              //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TPosition, typename TSize2, typename TScoringSpec>
+bool 
+addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set,
+	TPosition qPos,
+	TPosition dPos,
+	TSize2 length,
+	typename ScoreType<TScoringSpec>::Type score,
+	int gapDistance,
+	Merge)
+{
+
+    SEQAN_CHECKPOINT
+    typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+    typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+    typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+    typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+	TIterator tmpIt = _findSeedsMerge(set, (TValue) qPos, (TValue) dPos, (TValue) length, score, gapDistance);
+    if (tmpIt != set.fragmentMap.end())
+	{
+		TSize position = tmpIt->second;
+		set.fragmentMap.erase(tmpIt);
+
+		_mergeTwoSeedsScore(set.manager[position], set.scoreMap[position], (TValue)qPos, (TValue)dPos, (TValue)length, score, getScoreMatrix(set), TGapCosts(), Merge());
+		if (_qualityReached(set.manager[position],set.scoreMap[position], set.qualityValue, TQualityFactor()))
+			set.result.insert(position);
+
+		set.fragmentMap.insert(std::pair<TValue, TSize>( endDiagonal(set.manager[position]),position));
+		return true;
+    }
+    return false;
+}
+
+//Score calculation
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TPosition, typename TSize, typename TScoringSpec>
+inline bool 
+addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+	TPosition qPos, 
+	TPosition dPos, 
+	TSize length, 
+	int gapDistance, 
+	Merge)
+{
+	SEQAN_CHECKPOINT
+	return addSeed(set, qPos, dPos, length, length*scoreMatch(set.scoreMatrix), gapDistance, Merge());
+}
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec>
+bool
+addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+	    Seed<TValue, TSeedSpec> const &seed, 
+	    typename ScoreType<TScoringSpec>::Type score, 
+	    int gapDistance, 
+	    Merge)
+{
+    SEQAN_CHECKPOINT
+    typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+    typedef Seed<TValue, TSeedSpec> * pSeed;
+    typename std::multimap<TValue,TSize >::iterator tmpIt = _findSeedsMerge(set, leftDim0(seed), leftDim1(seed), length(seed), score, gapDistance);
+    typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+    typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+
+    if (tmpIt != set.fragmentMap.end()){
+		TSize position = tmpIt->second;
+		set.fragmentMap.erase(tmpIt);
+		_mergeTwoSeedsScore(set.manager[position], set.scoreMap[position], seed, score, getScoreMatrix(set), TGapCosts(),  Merge());
+		if (_qualityReached(set.manager[position], set.scoreMap[position], set.qualityValue, TQualityFactor()))
+			set.result.insert(position);
+
+		set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[position]),position));
+		return true;
+    }
+    return false;
+}
+
+
+template<typename TValue, typename TSpec, typename TScoringSpec>
+bool 
+addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, 
+	TValue qlPos, 
+	TValue dlPos, 
+	TValue qrPos, 
+	TValue drPos, 
+	typename ScoreType<TScoringSpec>::Type score, 
+	int gapDistance, 
+	Merge)
+{
+    SEQAN_CHECKPOINT
+    typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+    typedef Seed<TValue, SimpleSeed> * pSeed;
+    typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+    typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+    typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+    
+	TIterator tmpIt = _findSeedsMerge(set, qlPos, dlPos, qrPos-qlPos+1, score, gapDistance);
+    if (tmpIt != set.fragmentMap.end()){
+		TSize position = tmpIt->second;
+		TValue x = endDiagonal(set.manager[position]);
+		_mergeTwoSeedsScore(set.manager[position], set.scoreMap[position], qlPos, dlPos, qrPos, drPos, score, getScoreMatrix(set), TGapCosts(), Merge());
+		if (_qualityReached(set.manager[position],set.scoreMap[position], set.qualityValue, TQualityFactor()))
+			set.result.insert(position);
+		
+		if(x != drPos-qrPos)
+		{
+			set.fragmentMap.erase(tmpIt);
+			set.fragmentMap.insert(std::pair<TValue, TSize>( endDiagonal(set.manager[position]),position));
+		}
+		set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[position]),position));
+		return true;
+    }
+    return false;
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                       Chaining Algorithms                                                      //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+								////////////////////////////////////
+								//	     Standard Chaining		  //
+								////////////////////////////////////
+
+
+
+template<typename TValue, typename TSpec, typename TScoringSpec, typename TSeedSpec>
+bool 
+addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+	TValue qPos,
+	TValue dPos,
+	TValue length, 
+	typename ScoreType<TScoringSpec>::Type score, 
+	int gapDistance, 
+	SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, qPos, dPos, length, score, gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		set.scoreMap[id] += score + _calculateScoringValue(rightDim0(set.manager[id]), rightDim1(set.manager[id]),qPos, dPos, getScoreMatrix(set), TGapCosts());
+		_mergeTwoSeedsScore(set.manager[id], qPos, dPos, length, SimpleChain());
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue, TQualityFactor()))
+			set.result.insert(id);
+		
+		//new endDiagonal
+		if(x != dPos-qPos)
+		{
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>(endDiagonal(set.manager[id]),id));		
+		}
+		return true;
+	}
+	return false;
+}
+
+//score calculation
+template<typename TValue, typename TSpec, typename TScoringSpec, typename TSeedSpec>
+inline bool 
+addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+		TValue qPos, 
+		TValue dPos, 
+		TValue length,
+		int gapDistance,
+		SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	return addSeed(set, qPos, dPos, length, length*scoreMatch(set.scoreMatrix), gapDistance, SimpleChain());
+}
+
+
+template<typename TValue, typename TSpec, typename TScoringSpec>
+bool 
+addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set,
+		TValue qlPos,
+		TValue dlPos,
+		TValue qrPos,
+		TValue drPos, 
+		typename ScoreType<TScoringSpec>::Type score,
+		int gapDistance,
+		SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, qlPos, dlPos, qrPos-qlPos+1, score, gapDistance);
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		set.scoreMap[id] += score + _calculateScoringValue(rightDim0(set.manager[id]), rightDim1(set.manager[id]),qlPos, dlPos, getScoreMatrix(set), TGapCosts());
+		_mergeTwoSeedsScore(set.manager[id], qlPos, dlPos, qrPos, drPos, SimpleChain());
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue, TQualityFactor()))
+			set.result.insert(id);
+		if(x != drPos-qrPos){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert(std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	}
+	return false;
+}
+
+template<typename TValue, typename TSpec, typename TScoringSpec, typename TSeedSpec>
+bool 
+addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+		Seed<TValue, TSeedSpec> const &seed, 
+		typename ScoreType<TScoringSpec>::Type score, 
+		int gapDistance, 
+		SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, leftDim0(seed), leftDim1(seed), length(seed), score, gapDistance);
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		set.scoreMap[id] += score + _calculateScoringValue(rightDim0(set.manager[id]), rightDim1(set.manager[id]), leftDim0(seed), leftDim1(seed), getScoreMatrix(set), TGapCosts());
+		_mergeTwoSeedsScore(set.manager[id], leftDim0(seed), leftDim1(seed), rightDim0(seed), rightDim1(seed), SimpleChain());
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue, TQualityFactor()))
+			set.result.insert(id);
+		if(x != endDiagonal(seed)){
+			set.fragmentMap.erase(id);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	}
+	return false;
+}
+
+
+template<typename TValue, typename TSpec, typename TScoringSpec>
+bool 
+addSeed(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &set, 
+		Seed<TValue, ChainedSeed> const &seed, 
+		typename ScoreType<TScoringSpec>::Type score, 
+		int gapDistance, 
+		SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+        TIterator it = _findSeedsChain(set, leftDim0(seed), leftDim1(seed), length(seed), score, gapDistance);
+	if (it != set.fragmentMap.end()){
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		set.scoreMap[id] += score + _calculateScoringValue(rightDim0(set.manager[id]), rightDim1(set.manager[id]),leftDim0(seed), leftDim1(seed), getScoreMatrix(set), TGapCosts());
+		_mergeTwoSeedsScore(set.manager[id], leftDim0(seed), leftDim1(seed), _getFirstDiag(seed).i3, SimpleChain());
+		typedef typename std::list<Triple<TValue,TValue,TValue> >::const_iterator TIterator2;
+		TIterator2 it2_end = _getDiagSet(seed).end();
+		for (TIterator2 it2 = ++_getDiagSet(seed).begin(); it2 != it2_end; ++it2)
+			appendDiag(set.manager[id],*it2);
+
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue ,TQualityFactor()))
+			set.result.insert(id);
+
+		if(x != endDiagonal(seed)){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	}
+	return false;
+}
+
+
+template<typename TValue, typename TSeedSpec>
+void
+_mergeTwoSeedsScore(Seed<TValue, TSeedSpec> &seed, 
+					TValue qPos, 
+					TValue dPos, 
+					TValue length, 
+					SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	setRightDim0(seed, qPos+length-1);
+	setRightDim1(seed, dPos+length-1);
+	TValue diag = dPos-qPos;
+	if (leftDiagonal(seed) < diag)
+		setLeftDiagonal(seed, diag);
+	if (rightDiagonal(seed) > diag)
+		setRightDiagonal(seed, diag);
+}
+
+
+template<typename TValue>
+void
+_mergeTwoSeedsScore(Seed<TValue, SimpleSeed> &firstSeed, 
+					TValue qlPos, 
+					TValue dlPos, 
+					TValue qrPos, 
+					TValue drPos, 
+					SimpleChain)
+{
+	SEQAN_CHECKPOINT
+	setRightDim0(firstSeed, qrPos);
+	setRightDim1(firstSeed, drPos);
+	TValue diag = dlPos-qlPos;
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+	diag = drPos-qrPos;
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+}
+
+
+								////////////////////////////////////
+								//				Chaos			  //
+								////////////////////////////////////
+
+
+template<typename TValue, typename TText, typename TSpec, typename TPosition, typename TSize2, typename TScoringSpec, typename TSpecSeed>
+bool 
+addSeed(SeedSet<TValue, TSpecSeed, TScoringSpec, TSpec> &set, 
+		TPosition qPos, 
+		TPosition dPos, 
+		TSize2 length, 
+		typename ScoreType<TScoringSpec>::Type score, 
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance, 
+		Chaos)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+
+	TIterator it = _findSeedsChain(set, (TValue)qPos, (TValue)dPos, (TValue)length, score, gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		typename ScoreType<TScoringSpec>::Type tmpScore = _mergeTwoSeedsScore(set.manager[id], (TValue)qPos, (TValue)dPos, (TValue)length, query, database, getScoreMatrix(set), TGapCosts(), Chaos());
+		set.scoreMap[id] += score + tmpScore;
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue ,TQualityFactor()))
+			set.result.insert(id);
+
+		if(x+qPos != dPos){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert(std::pair<TValue, TSize>(endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	}
+	return false;
+}
+
+template<typename TValue, typename TText, typename TSpec, typename TPosition, typename TSize, typename TScoringSpec, typename TSpecSeed>
+inline bool 
+addSeed(SeedSet<TValue, TSpecSeed, TScoringSpec, TSpec> &set, 
+		TPosition qPos, 
+		TPosition dPos, 
+		TSize length,
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance, 
+		Chaos)
+{
+	SEQAN_CHECKPOINT
+	return addSeed(set, qPos, dPos, length, length*scoreMatch(set.scoreMatrix), query, database, gapDistance, Chaos());
+}
+
+
+template<typename TValue, typename TText, typename TSpec, typename TScoringSpec>
+bool
+addSeed(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &set, 
+		Seed<TValue, ChainedSeed> const &seed, 
+		typename ScoreType<TScoringSpec>::Type score, 
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance, 
+		Chaos)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+	
+	TIterator it = _findSeedsChain(set, leftDim0(seed), leftDim1(seed), length(seed), score, gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		TValue tmpScore = _mergeTwoSeedsScore(set.manager[id], leftDim0(seed), leftDim1(seed), _getFirstDiag(seed).i3, query, database, getScoreMatrix(set), TGapCosts(), Chaos());
+		set.scoreMap[id] += score + tmpScore;
+		typedef typename std::list<Triple<TValue,TValue,TValue> >::const_iterator TIterator2;
+		TIterator2 it2_end = _getDiagSet(seed).end();
+		for (TIterator2 it2 = ++_getDiagSet(seed).begin(); it2 != it2_end; ++it2)
+			appendDiag(set.manager[id],*it2);
+
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue ,TQualityFactor()))
+			set.result.insert(id);
+
+		if(x != endDiagonal(seed)){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	}
+	return false;
+}
+
+template<typename TValue, typename TText, typename TSpec, typename TScoringSpec>
+bool
+addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, 
+		Seed<TValue, SimpleSeed> const &seed, 
+		typename ScoreType<TScoringSpec>::Type score, 
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance, 
+		Chaos)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+	
+	TIterator it = _findSeedsChain(set, leftDim0(seed), leftDim1(seed), length(seed), score, gapDistance);
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		TValue x = endDiagonal(set.manager[id]);
+		TValue tmpScore = _mergeTwoSeedsScore(set.manager[id], leftDim0(seed), leftDim1(seed), 1, query, database, getScoreMatrix(set), TGapCosts(), Chaos());
+		set.scoreMap[id] += score + tmpScore;
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue ,TQualityFactor()))
+			set.result.insert(id);
+
+		if(x == endDiagonal(seed)){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		setRightDim0(set.manager[id], rightDim0(seed));
+		setRightDim1(set.manager[id], rightDim1(seed));
+		return true;
+	}
+	return false;
+}
+
+//SimpleSeed
+template<typename TValue, typename TScore, typename TText, typename TGapCost>
+TValue
+_mergeTwoSeedsScore(Seed<TValue, SimpleSeed>  &firstSeed, 
+					TValue qPos, 
+					TValue dPos, 
+					TValue length,
+					String<TText> const &query,
+					String<TText> const &database,
+					Score<TScore, Simple> const &scoreMatrix,
+					TGapCost tag, 
+					Chaos)
+{
+	SEQAN_CHECKPOINT
+	typename std::list<Triple <TValue, TValue, TValue> >::iterator begin1, end2, it;
+	TValue databaseGap = dPos - rightDim1(firstSeed)-1;
+	TValue queryGap = qPos - rightDim0(firstSeed)-1;
+
+	TValue gap = abs((TScore)(databaseGap-queryGap));
+	TValue currentScore = 0;
+	if (gap == 0)
+	{
+		TValue de = rightDim1(firstSeed);
+		for (int i = rightDim0(firstSeed)+1; i <qPos;++i){
+			currentScore += score(scoreMatrix,i,++de,query,database);
+		}
+	} else {
+		TValue lPositionQuery = rightDim0(firstSeed);
+		TValue lPositionDatabase = rightDim1(firstSeed);
+		TValue rPositionQuery = qPos;
+		TValue rPositionDatabase = dPos;
+
+		TValue gap = (databaseGap < queryGap) ? databaseGap : queryGap;
+		for (int i = 0; i <gap;++i){
+			currentScore += score(scoreMatrix,--rPositionQuery,--rPositionDatabase,query,database);
+		}
+		TValue tmpScore = currentScore;
+		TValue tmpLength = 0;
+
+		for (int i = 0; i < gap ; ++i){
+			currentScore += score(scoreMatrix,++lPositionQuery,++lPositionDatabase,query,database) - score(scoreMatrix,rPositionQuery++,rPositionDatabase++,query,database);
+			if (currentScore > tmpScore){
+				tmpScore = currentScore;
+
+				tmpLength = i+1;
+			}
+		}
+		setRightDim0(firstSeed,rightDim0(firstSeed)+tmpLength);
+		currentScore += _calculateScoringValue(rightDim0(firstSeed), rightDim1(firstSeed),qPos-gap+tmpLength, dPos-gap+tmpLength, scoreMatrix, tag);
+	}
+	setRightDim0(firstSeed,qPos + length-1);
+	setRightDim1(firstSeed,dPos + length-1);
+
+	TValue diag = dPos-qPos;
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+	return currentScore;
+}
+
+
+//ChainedSeed
+template<typename TValue, typename TScore, typename TText, typename TGapCost>
+TValue
+_mergeTwoSeedsScore(Seed<TValue, ChainedSeed>  &firstSeed, 
+					TValue qPos, 
+					TValue dPos, 
+					TValue length,
+					String<TText> const &query,
+					String<TText> const &database,
+					Score<TScore, Simple> const &scoreMatrix,
+					TGapCost tag, 
+					Chaos)
+{
+	SEQAN_CHECKPOINT
+	TValue databaseGap = dPos - rightDim1(firstSeed)-1;
+	TValue queryGap = qPos - rightDim0(firstSeed)-1;
+
+	TValue gap = abs(databaseGap-queryGap);
+	TValue currentScore = 0;
+	if (gap == 0){
+		//cout << "interessant" << endl;
+		TValue de = rightDim1(firstSeed);
+		for (int i = rightDim0(firstSeed)+1; i <qPos;++i){
+			currentScore += score(scoreMatrix,i,++de,query,database);
+		}
+		setRightDim0(firstSeed,qPos + length-1);
+	} 
+	else 
+	{
+		TValue lPositionQuery = rightDim0(firstSeed);
+		TValue lPositionDatabase = rightDim1(firstSeed);
+		TValue rPositionQuery = qPos;
+		TValue rPositionDatabase = dPos;
+
+		TValue gap = (databaseGap < queryGap)? databaseGap : queryGap;
+		for (int i = 0; i <gap;++i){
+			currentScore += score(scoreMatrix,--rPositionQuery,--rPositionDatabase,query,database);
+		}
+		TValue tmpScore = currentScore;
+		TValue tmpLength = 0;
+
+		for (int i = 0; i < gap; ++i){
+			currentScore += score(scoreMatrix,++lPositionQuery,++lPositionDatabase,query,database) - score(scoreMatrix,rPositionQuery++,rPositionDatabase++,query,database);
+			if (currentScore > tmpScore){
+				tmpScore = currentScore;
+				tmpLength = i+1;
+			}
+		}
+		setRightDim0(firstSeed,rightDim0(firstSeed)+tmpLength);
+		currentScore += _calculateScoringValue(rightDim0(firstSeed), rightDim1(firstSeed),qPos-gap+tmpLength, dPos-gap+tmpLength, scoreMatrix, tag);//abs(databaseGap-queryGap)*scoreGap(scoreMatrix);
+
+		firstSeed.seedSet.push_back(Triple<TValue,TValue,TValue>(qPos-gap+tmpLength, dPos - gap +tmpLength,gap-tmpLength+length));
+	}
+
+	TValue diag = dPos-qPos;
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+
+
+	return currentScore;
+}
+
+
+
+
+
+								////////////////////////////////////
+								//				Blat			  //
+								////////////////////////////////////
+
+template<typename TValue, typename TText, typename TSpec, typename TScoringSpec, typename TSpecSeed>
+bool 
+addSeed(SeedSet<TValue, TSpecSeed, TScoringSpec, TSpec> &set, 
+		TValue qPos, 
+		TValue dPos, 
+		TValue length, 
+		typename ScoreType<TScoringSpec>::Type score, 
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance, 
+		Blat)
+{
+	SEQAN_CHECKPOINT
+	typedef typename  Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typename std::multimap<TValue,TSize >::iterator it = _findSeedsChain(set, qPos, dPos, score, length, gapDistance);
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+	if (it != set.fragmentMap.end())
+	{
+		TSize id = it->second;
+		int dLength = dPos - rightDim1(set.manager[id]);
+		int qLength = qPos - rightDim0(set.manager[id]);
+		int dLog = (int) ceil(log((double)dLength));
+		int qLog = (int) ceil(log((double)qLength));
+		int k;
+		int maxValue = (dLog > qLog) ? dLog : qLog;
+		if ((maxValue < dLength) && (maxValue < qLength))
+			k = maxValue;
+		else 
+		    k = (dLog < qLog) ? dLog : qLog;
+		typename ScoreType<TScoringSpec>::Type tmpScore = _mergeTwoSeedsScore(set.manager[id], qPos, dPos, length, getScoreMatrix(set), query, database, k, TGapCosts(), Blat());
+		set.scoreMap[id] += score + tmpScore;
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue ,TQualityFactor()))
+			set.result.insert(id);
+
+		if(endDiagonal(set.manager[id]) != dPos-qPos){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	}
+	return false;
+}
+
+//same as above but score is calculated
+template<typename TValue, typename TText, typename TSpec, typename TScoringSpec, typename TSpecSeed>
+inline bool 
+addSeed(SeedSet<TValue, TSpecSeed, TScoringSpec, TSpec> &set,
+		TValue qPos, 
+		TValue dPos, 
+		TValue length, 
+		String<TText> const &query, 
+		String<TText> const &database, 
+		int gapDistance,
+		Blat)
+{
+	SEQAN_CHECKPOINT
+	return addSeed(set, qPos, dPos, length, length*scoreMatch(set.scoreMatrix), query, database, gapDistance, Blat());
+}
+
+
+template<typename TValue, typename TText, typename TSpec, typename TScoringSpec>
+bool 
+addSeed(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &set,
+		Seed<TValue, ChainedSeed> const &seed,
+		typename ScoreType<TScoringSpec>::Type score,
+		String<TText> const &query, 
+		String<TText> const &database,
+		int gapDistance, 
+		Blat)
+{
+	SEQAN_CHECKPOINT
+	typedef typename  Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	typedef typename ScoreType<TScoringSpec>::Type TScore;
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+	TValue qPos = leftDim0(seed);
+	TValue dPos = leftDim1(seed);
+	TValue length_ = _getFirstDiag(seed).i3;
+        TIterator it = _findSeedsChain(set, qPos, dPos, score, length(seed), gapDistance);
+	if (it != set.fragmentMap.end()){
+		TSize id = it->second;
+		int dLength = dPos - rightDim1(set.manager[id]);
+		int qLength = qPos - rightDim0(set.manager[id]);
+		int dLog = (int) ceil(log((double)dLength));
+		int qLog = (int) ceil(log((double)qLength));
+		int k;
+		int maxValue = (dLog > qLog) ? dLog : qLog;
+		if ((maxValue < dLength) && (maxValue < qLength))
+			k = maxValue;
+		else 
+			k = (dLog < qLog) ? dLog : qLog;
+		TScore tmpScore = _mergeTwoSeedsScore(set.manager[id], qPos, dPos, length_, getScoreMatrix(set), query, database, k, TGapCosts(), Blat());
+		set.scoreMap[id] += score + tmpScore;
+		typename std::list<Triple<TValue,TValue,TValue> >::const_iterator seedIt = _getDiagSet(seed).begin();
+		++seedIt;
+		while (seedIt !=_getDiagSet(seed).end()){
+			appendDiag(set.manager[id],*seedIt);
+			++seedIt;
+		}
+		if (rightDiagonal(seed) < rightDiagonal(set.manager[id]))
+			setRightDiagonal(set.manager[id], rightDiagonal(seed));
+
+		if (leftDiagonal(seed) < leftDiagonal(set.manager[id]))
+			setLeftDiagonal(set.manager[id], leftDiagonal(seed));
+
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue ,TQualityFactor()))
+			set.result.insert(id);
+
+		if(endDiagonal(set.manager[id]) != endDiagonal(seed)){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} 
+	return false;
+}
+
+template<typename TValue, typename TText, typename TSpec, typename TScoringSpec>
+bool 
+addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set,
+		Seed<TValue, SimpleSeed> const &seed,
+		typename ScoreType<TScoringSpec>::Type score,
+		String<TText> const &query, 
+		String<TText> const &database,
+		int gapDistance, 
+		Blat)
+{
+	SEQAN_CHECKPOINT
+	typedef typename  Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	typedef typename ScoreType<TScoringSpec>::Type TScore;
+	typedef typename GapCosts<TScoringSpec>::Type TGapCosts;
+	typedef typename QualityFactor<TScoringSpec>::Type TQualityFactor;
+	TValue qPos = leftDim0(seed);
+	TValue dPos = leftDim1(seed);
+        TIterator it = _findSeedsChain(set, qPos, dPos, score, length(seed), gapDistance);
+	if (it != set.fragmentMap.end()){
+		TSize id = it->second;
+		int dLength = dPos - rightDim1(set.manager[id]);
+		int qLength = qPos - rightDim0(set.manager[id]);
+		int dLog = (int) ceil(log((double)dLength));
+		int qLog = (int) ceil(log((double)qLength));
+		int k;
+		int maxValue = (dLog > qLog) ? dLog : qLog;
+		if ((maxValue < dLength) && (maxValue < qLength))
+			k = maxValue;
+		else 
+			k = (dLog < qLog) ? dLog : qLog;
+		TScore tmpScore = _mergeTwoSeedsScore(set.manager[id], qPos, dPos, 1, getScoreMatrix(set), query, database, k, TGapCosts(), Blat());
+		set.scoreMap[id] += score + tmpScore;
+	
+		setRightDim0(set.manager[id],rightDim0(seed));
+		setRightDim1(set.manager[id],rightDim1(seed));
+
+		if (rightDiagonal(seed) < rightDiagonal(set.manager[id]))
+			setRightDiagonal(set.manager[id], rightDiagonal(seed));
+
+		if (leftDiagonal(seed) < leftDiagonal(set.manager[id]))
+			setLeftDiagonal(set.manager[id], leftDiagonal(seed));
+
+		if (_qualityReached(set.manager[id],set.scoreMap[id], set.qualityValue ,TQualityFactor()))
+			set.result.insert(id);
+
+		if(endDiagonal(set.manager[id]) != endDiagonal(seed)){
+			set.fragmentMap.erase(it);
+			set.fragmentMap.insert( std::pair<TValue, TSize>( endDiagonal(set.manager[id]),id));
+		}
+		return true;
+	} 
+	return false;
+}
+
+
+template<typename TValue, typename TText, typename TScore, typename TGapCosts>
+TScore
+_mergeTwoSeedsScore(Seed<TValue, SimpleSeed>  &firstSeed, 
+					TValue qPos, 
+					TValue dPos, 
+					TValue length, 
+					Score<TScore, Simple> const &scoreMatrix, 
+					String<TText> const &query, 
+					String<TText> const &database, 
+					TValue q, 
+					TGapCosts tag,
+					Blat)
+{
+	SEQAN_CHECKPOINT
+	typedef typename std::list<Triple<TValue, TValue, TValue> > TPieceList;
+	typedef typename TPieceList::iterator TIterator;
+	Triple<TValue, TValue, TValue> r(qPos,dPos,length);
+	TValue leftDiag = leftDiagonal(firstSeed);
+	TValue rightDiag = rightDiagonal(firstSeed);
+	TValue diag;
+	TPieceList tmp;
+	_gapFill(rightDim0(firstSeed)+1, rightDim1(firstSeed)+1, qPos, dPos, tmp, query, database,q);
+	TScore tmpScore = 0;
+
+	if (tmp.size() > 0){
+		TIterator it1 = tmp.begin();
+		TIterator it2 = ++tmp.begin();
+		diag = it1->i2 - it1->i1;
+		if (diag >leftDiag) 
+			leftDiag = diag;
+		if (diag < rightDiag)
+			rightDiag = diag;
+		tmpScore += _calculateScoringValue(rightDim0(firstSeed), rightDim1(firstSeed), it1->i1, it1->i2, scoreMatrix, tag);
+		for (int i = 0; i < it1->i3; ++i){
+			tmpScore += score(scoreMatrix,it1->i1+i,it1->i2+i,query,database);
+		}
+		while (it2 != tmp.end()){
+			diag = it2->i2-it2->i1;
+			if (diag >leftDiag) 
+				leftDiag = diag;
+			if (diag < rightDiag)
+				rightDiag = diag;
+			tmpScore += _calculateScoringValue(it1->i1 + it1->i3 - 1, it1->i2 + it1->i3 - 1, it2->i1, it2->i2, scoreMatrix, tag);
+			tmpScore += it2->i3*scoreMatch(scoreMatrix);
+			it1++;
+			it2++;
+		}	
+		tmpScore += _calculateScoringValue(it1->i1 + it1->i3 - 1, it1->i2 + it1->i3 - 1, qPos, dPos, scoreMatrix, tag);
+	}else {
+		tmpScore += _calculateScoringValue(rightDim0(firstSeed), rightDim1(firstSeed), qPos, dPos, scoreMatrix, tag);
+	}
+	
+	setRightDim0(firstSeed, qPos + length - 1);
+	setRightDim1(firstSeed, dPos + length - 1);
+	setRightDiagonal(firstSeed, rightDiag);
+	setLeftDiagonal(firstSeed, leftDiag);
+	return tmpScore;
+}
+
+
+template<typename TValue, typename TText, typename TScore, typename TGapCosts>
+TScore
+_mergeTwoSeedsScore(Seed<TValue, ChainedSeed>  &firstSeed, 
+					TValue qPos, 
+					TValue dPos, 
+					TValue length, 
+					Score<TScore, Simple> const &scoreMatrix, 
+					String<TText> const &query, 
+					String<TText> const &database, 
+					TValue q, 
+					TGapCosts tag,
+					Blat)
+{
+	SEQAN_CHECKPOINT
+	std::list<Triple<TValue, TValue, TValue> > tmp;
+	Triple<TValue, TValue, TValue> r(qPos,dPos,length);
+	TValue leftDiag = leftDiagonal(firstSeed);
+	TValue rightDiag = rightDiagonal(firstSeed);
+	TValue diag;
+	_gapFill(rightDim0(firstSeed)+1, rightDim1(firstSeed)+1, qPos, dPos, tmp, query, database,q);
+	TScore tmpScore = 0;
+
+	typedef typename std::list<Triple<TValue, TValue, TValue> >::iterator TIterator;
+	if (tmp.size() > 0){
+		TIterator it1 = tmp.begin();
+		TIterator it2 = ++tmp.begin();
+		tmpScore += _calculateScoringValue(rightDim0(firstSeed), rightDim1(firstSeed), it1->i1, it1->i2, scoreMatrix, tag);
+		for (int i = 0; i < it1->i3; ++i){
+			tmpScore += score(scoreMatrix,it1->i1+i,it1->i2+i,query,database);
+		}
+		while (it2 != tmp.end()){
+			tmpScore += _calculateScoringValue(it1->i1+it1->i3-1,it1->i2+it1->i3-1,it2->i1,it2->i2, scoreMatrix, tag);
+			tmpScore += it2->i3*scoreMatch(scoreMatrix);
+			it1++;
+			it2++;
+		}	
+		tmpScore += _calculateScoringValue(it1->i1+it1->i3-1,it1->i2+it1->i3-1,qPos,dPos,scoreMatrix,tag);
+	}else {
+		tmpScore += _calculateScoringValue(rightDim0(firstSeed), rightDim1(firstSeed), qPos, dPos, scoreMatrix,tag);
+	}
+
+	if (tmp.size() > 0){
+		Triple<TValue, TValue, TValue> x = *tmp.begin();
+		if ((x.i1 == rightDim0(firstSeed)+1)&& (x.i2 == rightDim1(firstSeed)+1)){
+			tmp.front().i1 = _getDiagSet(firstSeed).back().i1;
+			tmp.front().i2 = _getDiagSet(firstSeed).back().i2;
+			tmp.front().i3 += _getDiagSet(firstSeed).back().i3;
+			_getDiagSet(firstSeed).pop_back();
+		}
+		x = tmp.back();
+		if ((x.i1+x.i3 == qPos)&& (x.i2+x.i3 == dPos)){
+			qPos = x.i1;
+			dPos = x.i2;
+			length += x.i3;
+			tmp.pop_back();
+		}
+	}
+	_getDiagSet(firstSeed).splice(_getDiagSet(firstSeed).end(),tmp); 
+	_getDiagSet(firstSeed).push_back(Triple<TValue,TValue,TValue>(qPos,dPos,length));
+	typedef typename std::list<Triple<TValue, TValue, TValue> >::iterator TIterator;
+	TIterator it_end = _getDiagSet(firstSeed).end();
+	for (TIterator it = _getDiagSet(firstSeed).begin(); it != it_end; ++it){
+		diag = it->i2-it->i1;
+		if (diag >leftDiag) 
+			leftDiag = diag;
+		if (diag < rightDiag)
+			rightDiag = diag;
+	}
+	setRightDiagonal(firstSeed, rightDiag);
+	setLeftDiagonal(firstSeed, leftDiag);
+	return tmpScore;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                    Addition of several new Seeds                                               //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TValue, typename TSeedSpec, typename TIterator, typename TIterator2, typename TAlgoSpec, typename TSpec, typename TScoringSpec>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+		 TIterator begin, 
+		 TIterator end, 
+		 TIterator2 scoreBegin, 
+		 int gapDistance, 
+		 TAlgoSpec tag)
+{
+	SEQAN_CHECKPOINT
+	std::multimap<TValue, std::pair<TIterator, TIterator2> > tmpMap; //zum sortieren
+	for(TIterator it = begin; it !=end; ++it)
+	{
+		tmpMap.insert(std::pair<TValue, std::pair<TIterator, TIterator2> >(leftDim0(*it),std::pair<TIterator, TIterator2>(it,scoreBegin)));
+		++scoreBegin;
+	}
+	
+	typedef typename std::multimap<TValue, std::pair<TIterator, TIterator2> >::iterator TIterator3;
+	TIterator3 it_end = tmpMap.end();
+	for (TIterator3 it = tmpMap.begin(); it != it_end; ++it)
+		if (!addSeed(set, *it->second.first, *it->second.second, gapDistance, tag))
+			addSeed(set, *it->second.first, *it->second.second, Single());
+	
+	tmpMap.clear();
+	return true;
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TIterator, typename TIterator2, typename TSpec, typename TScoringSpec>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+		 TIterator begin, 
+		 TIterator end,
+		 TIterator2 scoreBegin, 
+		 Single)
+{
+	SEQAN_CHECKPOINT
+	for(TIterator it = begin; it !=end; ++it){
+		addSeed(set, *it, *scoreBegin, Single());
+		++scoreBegin;
+	}
+	return true;
+}
+
+template<typename TValue, typename TSeedSpec, typename TIterator, typename TIterator2, typename TText, typename TSpec, typename TScoringSpec>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+		 TIterator begin, 
+		 TIterator end, 
+		 TIterator2 scoreBegin, 
+		 String<TText> const &query, 
+		 String<TText> const &database, 
+		 int gapDistance, 
+		 Chaos)
+{
+	SEQAN_CHECKPOINT
+	std::multimap<TValue, std::pair<TIterator, TIterator2> > tmpMap;
+	while(begin!= end){
+		tmpMap.insert(std::pair<TValue, std::pair<TIterator, TIterator2> >(leftDim0(*begin),std::pair<TIterator, TIterator2>(begin,scoreBegin)));
+		++begin;
+	}
+	typedef typename std::multimap<TValue, std::pair<TIterator, TIterator2> >::iterator TIterator3;
+	TIterator3 it_end = tmpMap.end();
+	for (TIterator3 it = tmpMap.begin(); it != it_end; ++it)
+		if (!addSeed(set, *it->second.first, *it->second.second, query, database, gapDistance, Chaos()))
+			addSeed(set, *it->second.first, *it->second.second, Single());
+
+	tmpMap.clear();
+	return true;
+}
+
+template<typename TValue, typename TSeedSpec, typename TIterator, typename TIterator2, typename TText, typename TSpec, typename TScoringSpec>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+		 TIterator begin, 
+		 TIterator end, 
+		 TIterator2 scoreBegin, 
+		 String<TText> const &query, 
+		 String<TText> const &database, 
+		 int gapDistance, 
+		 Blat)
+{
+	SEQAN_CHECKPOINT
+	typename std::multimap<TValue, std::pair<TIterator, TIterator2 > > tmpMap; //zum sortieren
+	while(begin!=end){
+		tmpMap.insert(std::pair<TValue, std::pair<TIterator, TIterator2> >(leftDim0(*begin),std::pair<TIterator, TIterator2>(begin,scoreBegin)));
+		++begin;
+	}
+	typename std::multimap<TValue, std::pair<TIterator, TIterator2> >::iterator tmpIt;
+	for (tmpIt = tmpMap.begin(); tmpIt != tmpMap.end(); ++tmpIt){
+		if (!addSeed(set, *tmpIt->second.first, *tmpIt->second.second, query, database, gapDistance, Blat()))
+			addSeed(set, *tmpIt->second.first, *tmpIt->second.second, Single());
+	}
+	tmpMap.clear();
+	return true;
+}
+
+template<typename TValue, typename TSeedSpec, typename TContainer, typename TContainer2, typename TAlgoSpec, typename TSpec, typename TScoringSpec>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+		 TContainer const &source, 
+		 TContainer2 const &scoreSource, 
+		 int gapDistance, 
+		 TAlgoSpec tag)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TContainer2,Standard>::Type TIterator2;
+    typedef typename Iterator<TContainer const,Standard>::Type TIterator;
+    TIterator it2 = end(source);
+	TIterator2 scoreBegin = begin(scoreSource);
+
+	typename std::multimap<TValue, std::pair<TIterator, TIterator2> > tmpMap; //zum sortieren
+	for (typename Iterator<TContainer const,Standard>::Type it1 = begin(source); it1 != it2; ++it1)
+		tmpMap.insert(std::pair<TValue, std::pair<TIterator, TIterator2> >(leftDim0(*it1),std::pair<TIterator, TIterator2>(it1,scoreBegin)));
+	
+	typedef typename std::multimap<TValue, std::pair<TIterator, TIterator2> >::iterator TIterator3;
+	TIterator3 it_end = tmpMap.end();
+	for (TIterator3 it = tmpMap.begin(); it != it_end; ++it)
+		if (!addSeed(set, *it->second.first, *it->second.second, gapDistance, tag))
+			addSeed(set, *it->second.first, *it->second.second, Single());
+	
+	tmpMap.clear();
+	return true;
+}
+
+template<typename TValue, typename TSeedSpec, typename TContainer, typename TContainer2, typename TSpec, typename TScoringSpec>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+	TContainer const &source, 
+	TContainer2 &scoreSource, 
+	Single){
+    SEQAN_CHECKPOINT
+    typedef typename Iterator<TContainer const,Standard>::Type TIterator;
+    typename Iterator<TContainer2,Standard>::Type itScore = begin(scoreSource);
+    for (TIterator it = begin(source); it != end(source); ++it){
+		addSeed(set, *it, *itScore, Single());
+		++itScore;
+    }
+    return true;
+}
+
+template<typename TValue, typename TSeedSpec, typename TContainer, typename TContainer2, typename TText, typename TSpec, typename TScoringSpec, typename TAlgoSpec>
+bool
+addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+		 TContainer const &source, 
+		 TContainer2 const &scoreSource, 
+		 String<TText> const &query, 
+		 String<TText> const &database, 
+		 int gapDistance,
+		 TAlgoSpec algoSpec)
+{
+	SEQAN_CHECKPOINT
+	typedef typename Iterator<TContainer const,Standard>::Type TIterator;
+        typedef typename Iterator<TContainer2 const, Standard>::Type TIterator2;
+	TIterator it2 =end(source);
+	TIterator2 itScore = begin(scoreSource);
+	typename std::multimap<TValue, std::pair<TIterator, TIterator2> > tmpMap; //zum sortieren
+	for (TIterator it1 = begin(source); it1 !=it2; ++it1)
+		tmpMap.insert(std::pair<TValue, std::pair<TIterator, TIterator2> >(leftDim0(*it1),std::pair<TIterator, TIterator2>(it1,itScore)));
+	
+	typedef typename std::multimap<TValue, std::pair<TIterator, TIterator2> >::iterator TIterator3;
+	TIterator3 it_end = tmpMap.end();
+	for (TIterator3 it = tmpMap.begin(); it != it_end; ++it)
+		if (!addSeed(set, *it->second.first, *it->second.second, query, database, gapDistance, algoSpec))
+			addSeed(set, *it->second.first, *it->second.second, Single());
+	
+	tmpMap.clear();
+	return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//		                                    Addition of a SeedSet	                                              //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec>
+bool
+addSeedSet(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, 
+		   SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> const &source, 
+		   Single)
+{
+	SEQAN_CHECKPOINT
+	typedef SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> TSeedSet;
+	typedef typename Iterator<TSeedSet const,Standard>::Type TIterator;
+	for (TIterator it = begin(source); it != end(source); ++it)
+		addSeed(target, *it, seedScore(it), Single());
+	
+	return true;
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TAlgoSpec, typename TSpec, typename TScoringSpec>
+bool
+addSeedSet(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, 
+		   SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> const &source, 
+		   int gapDistance, 
+		   TAlgoSpec tag)
+{
+	SEQAN_CHECKPOINT
+	typedef SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> TSeedSet;
+	typedef typename Iterator<TSeedSet const,Standard>::Type TIterator;
+	typedef typename std::multimap<TValue, TIterator>::iterator TIterator2;
+
+	std::multimap<TValue,TIterator> tmpMap;
+	TIterator it1_end = end(source);
+	for (TIterator it1 = begin(source); it1 != it1_end; ++it1)
+		tmpMap.insert(std::pair<TValue, TIterator>(leftDim0(*it1),it1));
+
+	TIterator2 it2_end = tmpMap.end();
+	for (TIterator2 it2 = tmpMap.begin(); it2 != it2_end; ++it2)
+		if (!addSeed(target, *it2->second, seedScore(it2->second), gapDistance, tag))
+			addSeed(target, *it2->second, seedScore(it2->second), Single());
+
+	tmpMap.clear();
+	return true;
+}
+
+template<typename TValue, typename TSeedSpec, typename TText, typename TSpec, typename TScoringSpec, typename TAlgoSpec>
+bool
+addSeedSet(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, 
+		   SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> const &source, 
+		   String<TText> const &query, 
+		   String<TText> const &database, 
+		   int gapDistance, 
+		   TAlgoSpec tag)
+{
+	SEQAN_CHECKPOINT
+	typedef SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> TSeedSet;
+	typedef typename Iterator<TSeedSet const,Standard>::Type TIterator;
+	typedef typename std::multimap<TValue, TIterator>::iterator TIterator2;
+
+	std::multimap<TValue, TIterator > tmpMap; //zum sortieren
+	TIterator it1_end = end(source);
+	for (TIterator it1 = begin(source); it1 !=it1_end; ++it1)
+		tmpMap.insert(std::pair<TValue, TIterator>(leftDim0(*it1),it1));
+	
+	TIterator2 it2_end = tmpMap.end();
+	for (TIterator2 it2 = tmpMap.begin(); it2 != it2_end; ++it2)
+		if (!addSeed(target, *it2->second, seedScore(it2->second), query, database, gapDistance, tag))
+			addSeed(target, *it2->second, seedScore(it2->second), Single());
+	
+	tmpMap.clear();
+	return true;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//									Delete to far away														  //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+template<typename TValue, typename TSeedSpec, typename TQualityFactor, typename TGapCosts, typename TScore>
+void
+_deleteEverything(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, TScore> >, void> &deletionTarget, 
+				  TValue currentPos)
+{
+	typedef typename Size<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, TScore> >, void> >::Type TSize;
+	typedef std::multimap<TValue, TSize > TMap;
+	typename TMap::iterator it_end = deletionTarget.fragmentMap.end();
+	TSize pos;
+	typedef typename std::set<TSize>::iterator TSetIterator;
+	TSetIterator set_end = deletionTarget.result.end();
+	for (typename TMap::iterator it = deletionTarget.fragmentMap.begin(); it != it_end;)
+	{
+		pos = it->second;
+		if (currentPos > (deletionTarget.maxDistance + rightDim0(deletionTarget.manager[pos])))
+		{
+			deletionTarget.fragmentMap.erase(it++);
+			if (set_end == deletionTarget.result.find(pos))
+			{
+				valueDestruct(&deletionTarget.manager[pos]);
+				releaseID(deletionTarget.manager,pos);
+			}
+		}
+		else
+			++it;
+	}
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//								Finding seed for merging/chaining											  //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec>
+typename std::multimap<TValue, 	typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type >::iterator
+_findSeedsChain(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, 
+				TValue qPos, 
+				TValue dPos, 
+				TValue length, 
+				typename ScoreType<TScoringSpec>::Type score, 
+				int gapDistance)
+{
+//	if(set.last != qPos){
+//		_deleteEverything(set, qPos);
+//		set.last = qPos;
+//	}
+	SEQAN_CHECKPOINT
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	TIterator itUp=set.fragmentMap.upper_bound(dPos-qPos+gapDistance);
+	TIterator tmp = set.fragmentMap.end();
+	typename ScoreType<TScoringSpec>::Type maxScore = minValue<TValue>();
+	typename ScoreType<TScoringSpec>::Type tmpScore;
+	for (TIterator it = set.fragmentMap.lower_bound(dPos-qPos-gapDistance); it != itUp; )
+	{
+		TSize id = it-> second;
+		if (qPos > set.maxDistance + rightDim0(set.manager[id]))
+		{//delete it
+			TIterator itdelete = it;
+			++it;
+			set.fragmentMap.erase(itdelete);
+			if (set.result.end() == set.result.find(id))
+			{
+				valueDestruct(&set.manager[id]);
+				releaseID(set.manager,id);
+			}
+		}
+		else
+		{
+			if ((qPos > rightDim0(set.manager[id])) && (dPos > rightDim1(set.manager[id])))
+			{
+				tmpScore = _calculateScoringValue(set.manager[id], qPos, dPos, length, score, typename GapCosts<TScoringSpec>::Type());
+				if (tmpScore > maxScore)
+				{
+					maxScore = tmpScore;
+					tmp = it;
+				}
+			}
+			++it;
+		}
+	}
+	return tmp;
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec>
+typename std::multimap<TValue, typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type >::iterator
+_findSeedsMerge(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set,
+				TValue qPos, 
+				TValue dPos, 
+				TValue ,
+				typename ScoreType<TScoringSpec>::Type score, 
+				int gapDistance)
+{
+	SEQAN_CHECKPOINT
+	if(set.last != qPos){
+		_deleteEverything(set, qPos);
+		set.last = qPos;
+	}
+	typedef typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type TSize;
+	typedef typename ScoreType<TScoringSpec>::Type TScore;
+	typedef typename std::multimap<TValue,TSize >::iterator TIterator;
+	
+	TScore maxScore = minValue<TScore>();
+	TScore tmpScore;
+	TValue diag = dPos-qPos;
+
+	TIterator tmpIt = set.fragmentMap.end();
+	
+	//new seed has higher diagonal number
+	TIterator itUp=set.fragmentMap.upper_bound(diag); 
+	for (TIterator it=set.fragmentMap.lower_bound(diag-gapDistance); it != itUp; ++it)
+	{
+		if (dPos <= rightDim1(set.manager[it->second]))
+		{
+			tmpScore = set.scoreMap[it->second] + score - (rightDim1(set.manager[it->second]) - dPos) * scoreMatch(set.scoreMatrix) +abs((TScore)(endDiagonal(set.manager[it->second])-diag))*scoreGap(set.scoreMatrix);
+			if (tmpScore > maxScore)// &&(tmpScore > set.scoreMap[it->second]))
+			{
+				tmpIt = it;
+				maxScore = tmpScore;
+			}
+		}
+	}
+	
+	//new seed has lower diagnoal number
+	itUp=set.fragmentMap.upper_bound(diag+ gapDistance);  
+	for (TIterator it=set.fragmentMap.lower_bound (diag+1); it != itUp; ++it)
+	{
+		if (qPos <= rightDim0(set.manager[it->second]))
+		{
+			tmpScore = set.scoreMap[it->second] + score- (rightDim0(set.manager[it->second]) - qPos) * scoreMatch(set.scoreMatrix) +abs((TScore)(endDiagonal(set.manager[it->second])-diag))*scoreGapExtend(set.scoreMatrix);
+			if (tmpScore > maxScore)//&&(tmpScore > set.scoreMap[it->second]))
+			{
+				tmpIt = it;
+				maxScore = tmpScore;
+			}
+		}
+	}
+
+	return tmpIt;
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//										Extension Algorithms														//
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.extendSeedScore
+..summary:Extends a seed and increases the score.
+..cat:Seed Handling
+..signature:extendSeedScore(seed, score, query, database, direction, tag)
+..signature:extendSeedScore(seed, score, scoreDropOff, scoreMatrix, query, database, direction, tag)
+..param.seed: The seed to extend.
+...type:Class.Seed
+..param.score: A reference to the score of the seed. This will be increased by the score of the extension.
+..param.query: The query sequence.
+...type:Class.String
+..param.query: The database sequence.
+...type:Class.String
+..param.direction: Defines the direction in which the seed should be extended. 0 = left, 1 = right, 2 = both
+..param.scoreDropOff: The score drop after which the extension should stop. The extension stops if this value is exceeded.
+...remarks:Only used for the algorithms @Tag.Seed Extension.UngappedXDrop@ and @Tag.Seed Extension.GappedXDrop@
+..param.scoreMatrix: The scoring scheme.
+...type:Spec.Simple Score
+...remarks:Only used for the algorithms @Tag.Seed Extension.UngappedXDrop@ and @Tag.Seed Extension.GappedXDrop@
+..param.tag: The algorithm to use.
+...type:Tag.Seed Extension.MatchExtend
+...type:Tag.Seed Extension.UngappedXDrop
+...type:Tag.Seed Extension.GappedXDrop
+..include:seqan/seeds.h
+*/
+
+/**
+.Function.extendSeedsScore
+..summary: Extension of seeds with score calculation.
+..cat:Seed Handling
+..signature:extendSeedsScore(container, scores, query, database, direction, MatchExtend)
+..signature:extendSeedsScore(begin, end, itScore query, database, direction, MatchExtend)
+..signature:extendSeedsScore(container, scores, scoreDropOff, scoreMatrix, query, database, direction, tag)
+..signature:extendSeedsScore(begin, end, itScores, scoreDropOff, scoreMatrix, query, database, direction, tag)
+..param.container: The container with the @Class.Seed@ objects to extend.
+...type:Concept.Container
+..param.scores: A container with the scores of the seeds. The scores will be increased by the score of the extension. It can be omitted if the seeds container is a @Class.SeedSet@ with scores.
+...type:Concept.Container
+..param.itScore: Iterator pointing to the first seeds score. The scores will be increased by the score of the extension.
+..param.begin: Iterator pointing to the first value to add.
+..param.end: Iterator pointing just behind the last value to add.
+..param.query: The query sequence.
+...type:Class.String
+..param.query: The database sequence.
+...type:Class.String
+..param.direction: Defines the direction in which the seed should be extended. 0 = left, 1 = right, 2 = both
+..param.scoreDropOff: The score drop after which the extension should stop. The extension stops if this value is exceeded.
+..param.scoreMatrix: The scoring sheme.
+...type:Spec.Simple Score
+..param.tag: The algorithm to use.
+...type:Tag.Seed Extension.MatchExtend
+...type:Tag.Seed Extension.tag.UngappedXDrop
+...type:Tag.Seed Extension.tag.GappedXDrop
+..include:seqan/seeds.h
+*/
+
+template<typename TContainer, typename TContainer2, typename TText, typename TValue, typename TDirection>
+void
+extendSeedsScore(TContainer &seedSet, 
+				 TContainer2 &scores, 
+				 Score<TValue, Simple> const &matrix,
+				 String<TText> const &query, 
+				 String<TText> const &database, 
+				 TDirection direction, MatchExtend)
+{
+	SEQAN_CHECKPOINT
+
+	typedef typename Iterator<TContainer,Standard>::Type TIterator;
+	
+	typename Iterator<TContainer2,Standard>::Type itScore = begin(scores);
+	TIterator it_end = end(seedSet);
+	for (TIterator it = begin(seedSet); it != it_end; ++it)
+	{
+		extendSeedScore(*it, *itScore, matrix, query, database, direction, MatchExtend());
+		++itScore;
+	}
+}
+
+template<typename TValue, typename TSeedSpec, typename TSpec, typename TText, typename TScoringSpec, typename TDirection>
+void
+extendSeedsScore(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &seedSet,
+				 String<TText> const &query,
+				 String<TText> const &database, 
+				 TDirection direction, 
+				 MatchExtend)
+{
+	SEQAN_CHECKPOINT
+	typedef SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> TSeedSet;
+	typedef typename Iterator<TSeedSet,Standard>::Type TIterator;
+	TIterator it_end = end(seedSet);
+	for (TIterator it = begin(seedSet); it != it_end; ++it)
+		extendSeedScore(*it, seedScore(it), getScoreMatrix(seedSet), query, database, direction, MatchExtend());
+	
+}
+
+template<typename TIterator, typename TIterator2, typename TText, typename TValue, typename TDirection>
+void
+extendSeedsScore(TIterator begin, 
+				 TIterator end, 
+				 TIterator2 itScore,
+				 Score<TValue, Simple> const &matrix,
+				 String<TText> const &query, 
+				 String<TText> const &database, 
+				 TDirection direction,
+				 MatchExtend)
+{
+	SEQAN_CHECKPOINT
+	for (TIterator it = begin; it != end; ++it)
+		extendSeedScore(*it, *itScore, matrix, query, database, direction, MatchExtend());	
+
+}
+
+template<typename TContainer, typename TText, typename TContainer2, typename TextendSeedSpec, typename TValue, typename TValue2, typename TDirection>
+void
+extendSeedsScore(TContainer &seedSet, 
+				 TContainer2 &scores, 
+				 TValue scoreDropOff, 
+				 Score<TValue2, Simple> const &scoreMatrix,
+				 String<TText> const &query, 
+				 String<TText> const &database,
+				 TDirection direction, 
+				 TextendSeedSpec tag)
+{
+	SEQAN_CHECKPOINT
+	typename Iterator<TContainer2,Standard>::Type itScore = begin(scores);
+	typedef typename Iterator<TContainer,Standard>::Type TIterator;
+	
+	TIterator it_end = end(seedSet);
+	for (TIterator it = begin(seedSet); it != it_end; ++it)
+	{
+		extendSeedScore(*it, *itScore, scoreDropOff, scoreMatrix, query, database, direction, tag);
+		++itScore;
+	}
+}
+
+template<typename TText, typename TExtendSeedSpec, typename TValue, typename TSpec, typename TScoringSpec, typename TDirection>
+void
+extendSeedsScore(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &seedSet,
+				 TValue scoreDropOff, 
+				 String<TText> const &query,
+				 String<TText> const &database,
+				 TDirection direction,
+				 TExtendSeedSpec tag)
+{
+	SEQAN_CHECKPOINT
+	typedef SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> TSeedSet;
+	typedef typename Iterator<TSeedSet,Standard>::Type TIterator;
+	
+	TIterator it_end = end(seedSet);
+	for (TIterator it = begin(seedSet); it != it_end; ++it)
+		extendSeedScore(*it, seedScore(it), scoreDropOff, getScoreMatrix(seedSet), query, database, direction, tag);
+
+}
+
+template<typename TText, typename TExtendSeedSpec, typename TValue, typename TSpec, typename TScoringSpec, typename TDirection>
+void
+extendSeedsScore(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &seedSet,
+				 TValue scoreDropOff, 
+				 String<TText> const &query,
+				 String<TText> const &database,
+				 TDirection direction, 
+				 TExtendSeedSpec tag)
+{
+	SEQAN_CHECKPOINT
+	typedef SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> TSeedSet;
+	typedef typename Iterator<TSeedSet,Standard>::Type TIterator;
+	
+	TIterator it_end = end(seedSet);
+	for (TIterator it = begin(seedSet); it != it_end; ++it)
+		extendSeedScore(*it, seedScore(it), scoreDropOff, getScoreMatrix(seedSet), query, database, direction, tag);
+
+}
+
+template<typename TIterator, typename TIterator2, typename TExtendSeedSpec, typename TValue, typename TText, typename TDirection>
+void
+extendSeedsScore(TIterator begin,
+				 TIterator end, 
+				 TIterator2 itScore,
+				 TValue scoreDropOff,
+				 Score<TValue, Simple> const &scoreMatrix,
+				 String<TText> const &query, 
+				 String<TText> const &database,
+				 TDirection direction, 
+				 TExtendSeedSpec tag)
+{
+	SEQAN_CHECKPOINT
+	for (TIterator it = begin; it != end; ++it)
+	{
+		extendSeedScore(*it, *itScore, scoreDropOff, scoreMatrix, query, database, direction, tag);		
+		++itScore;
+	}
+
+}
+
+template<typename TValue, typename TSeedSpec, typename TText, typename TValue2, typename TValue3, typename TDirection>
+void
+extendSeedScore(Seed<TValue, TSeedSpec> &seed, 
+				TValue3 &currentScore, 
+				Score<TValue2, Simple> const &matrix, 
+				String<TText> const &query,
+				String<TText> const &database, 
+				TDirection direction, 
+				MatchExtend)
+{
+	SEQAN_CHECKPOINT
+
+	//left extension
+	if (direction != 1){
+		int tmpLength = 0;
+		TValue queryPos =leftDim0(seed) ;
+		TValue dataPos = leftDim1(seed);
+		while ((queryPos-1>=0) && (dataPos-1>=0) && (query[queryPos-1] == database[dataPos-1])){
+			--queryPos;
+			--dataPos;
+			++tmpLength;
+		}
+		setLeftDim0(seed,queryPos);
+		setLeftDim1(seed,dataPos);
+		currentScore += tmpLength * scoreMatch(matrix);
+	}
+
+	//right extension
+	if (direction != 0){
+		int tmpLength = 0;
+		int queryLength = length(query);
+		int databaseLength = length(database);
+		TValue queryPos =rightDim0(seed) ;
+		TValue dataPos = rightDim1(seed);
+		while ((queryPos+1 < queryLength) && (dataPos+1 < databaseLength) && (query[queryPos+1] == database[dataPos+1])){
+			++queryPos;
+			++dataPos;
+			++tmpLength;
+		}
+		setRightDim0(seed,queryPos);
+		setRightDim1(seed,dataPos);
+		currentScore += tmpLength * scoreMatch(matrix);
+	}
+}
+
+
+template<typename TValue, typename TSeedSpec, typename TText, typename TScore, typename TDirection>
+void  
+extendSeedScore(Seed<TValue,TSeedSpec> &seed, 
+				TScore &currentScore, 
+				TScore scoreDropOff,
+				Score<TScore, Simple> const &scoreMatrix, 
+				String<TText> const &query, 
+				String<TText> const &database,
+				TDirection direction, 
+				UngappedXDrop)
+{
+	SEQAN_CHECKPOINT
+	scoreDropOff *=-1;
+	TValue tmpScore = 0;
+	TValue tmp;
+	//left extension
+	if (direction != 1){
+		TValue xPos = leftDim0(seed)-1;
+		TValue yPos = leftDim1(seed)-1;
+		TValue last = 0;
+	
+		while ((tmpScore > scoreDropOff) && (xPos >= 0) && (yPos>=0)){
+			if (query[xPos] == database[yPos]){
+				last = 0;
+				tmp = score(scoreMatrix, xPos, yPos, query, database);
+				tmpScore += tmp;
+				currentScore += tmp;
+				if (tmpScore > 0)
+					tmpScore = 0;
+			} else{
+				tmp = score(scoreMatrix, xPos, yPos, query, database);
+				tmpScore += tmp;
+				currentScore += tmp;
+				++last;
+			}
+			--xPos;
+			--yPos;
+		}
+		currentScore -= last*scoreMismatch(scoreMatrix);
+		setLeftDim0(seed,xPos+last+1);
+		setLeftDim1(seed,yPos+last+1);
+	}
+
+	//right extension
+	if (direction != 0){
+		TValue xLength = length(query);
+		TValue yLength = length(database);
+		TValue xPos = rightDim0(seed)+1;
+		TValue yPos = rightDim1(seed)+1;
+
+		TValue last = 0;
+		tmpScore= 0;
+		while ((tmpScore > scoreDropOff) && (xPos < xLength) && (yPos < yLength)){
+			if (query[xPos] == database[yPos]){
+				last = 0;
+				tmp = score(scoreMatrix, xPos, yPos, query, database);
+				tmpScore += tmp;
+				currentScore += tmp;
+				if (tmpScore > 0)
+					tmpScore = 0;
+			}else{
+				tmp = score(scoreMatrix, xPos, yPos, query, database);
+				tmpScore += tmp;
+				currentScore += tmp;
+				++last;
+			}
+			++xPos;
+			++yPos;
+		}
+		currentScore -= last*scoreMismatch(scoreMatrix);
+		setRightDim0(seed,xPos-last-1);
+		setRightDim1(seed,yPos-last-1);
+	}
+}
+
+template<typename TSeedSpec, typename TPosition, typename TQuery, typename TDatabase, typename TScore, typename TSize>
+void 
+extendSeedScore(Seed<TPosition, TSeedSpec> &seed, 
+           TScore &currentScore, 
+		   TScore scoreDropOff, 
+		   Score<TScore, Simple> const &scoreMatrix, 
+		   TQuery const &query, 
+		   TDatabase const &database, 
+		   TSize direction, 
+		   GappedXDrop)
+{
+	SEQAN_CHECKPOINT
+	//left extension
+	if ((direction != 1) && (leftDim0(seed)!= (TPosition)beginPosition(query)) && (leftDim1(seed) != (TPosition)beginPosition(database)))
+    {
+        typename Prefix<TDatabase const>::Type dataSeg = prefix(database, leftDim1(seed));
+        typename Prefix<TQuery const>::Type querySeg = prefix(query, leftDim0(seed));
+		
+        currentScore += _extendSeedOneDirection(seed, dataSeg, querySeg, scoreDropOff, scoreMatrix, 0 /*left*/);
+	}
+
+	//right extension
+	if ((direction != 0) && (rightDim0(seed)+1 < (TPosition)endPosition(query)) && (rightDim1(seed)+1 < (TPosition)endPosition(database)))
+    {
+        typename Suffix<TDatabase const>::Type dataSeg = suffix(database, rightDim1(seed)+1);
+        typename Suffix<TQuery const>::Type querySeg = suffix(query, rightDim0(seed)+1);
+
+        currentScore += _extendSeedOneDirection(seed, dataSeg, querySeg, scoreDropOff, scoreMatrix, 1 /*right*/);
+	}
+}
+
+} //namespace Seqan
+
+
+#endif //#ifndef SEQAN_HEADER_
diff --git a/src/SeqAn-1.3/seqan/seeds/seed_base.h b/src/SeqAn-1.3/seqan/seeds/seed_base.h
new file mode 100644
index 0000000..70f04cd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/seed_base.h
@@ -0,0 +1,1089 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SEED_H
+#define SEQAN_HEADER_SEED_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+struct SeedSimple_;
+typedef Tag<SeedSimple_> const SimpleSeed;
+
+
+
+/**
+.Tag.Seed Extension
+..cat:Seed Handling
+..summary:The algorithms used to extend a seed.
+..see:Function.extendSeed
+..see:Function.extendSeeds
+..see:Function.extendSeedScore
+..see:Function.extendSeedsScore
+..tag.MatchExtend:
+	Extends a seed until a mismatch occurs.
+..tag.UngappedXDrop:
+	Ungapped extension of a seed until score drops below a Value.
+..tag.GappedXDrop:
+	Gapped extension of a seed until score drops below a Value. Only @Spec.SimpleSeed at s.
+..include:seqan/seeds.h
+*/
+
+
+/**
+.Tag.Seed Adding.tag.Merge:
+	Merging of Seeds.
+..include:seqan/seeds.h
+*/
+struct ChainMerge_;
+typedef Tag<ChainMerge_> const Merge;
+
+
+
+struct _extendSeed_Match;
+typedef Tag<_extendSeed_Match> const MatchExtend;
+
+
+struct _extendSeed_UnGappedXDrop;
+typedef Tag<_extendSeed_UnGappedXDrop> const UngappedXDrop;
+
+struct ExtendSeedGappedXDrop_;
+typedef Tag<ExtendSeedGappedXDrop_> const GappedXDrop;
+
+//template<typename TPosition = int, typename TSpecSeed = SimpleSeed>class Seed;
+
+
+
+/**
+.Class.Seed:
+..summary:Describes a seed.
+..cat:Seed Handling
+..signature:Seed<TPosition, TSpecSeed>
+..param.TPosition:The type number that schuld be used. Must have negative numbers (e.g. int/long).
+..param.TSpec:The seed type used.
+..include:seqan/seeds.h
+*/
+
+/**
+.Spec.SimpleSeed:
+..summary:Describes a seed with start and end position and diagonal upper and lower bounds.
+..cat:Seed Handling
+..general:Class.Seed
+..signature:Seed<TPosition, SimpleSeed>
+..param.TPosition:The type number that schuld be used. Must have negative numbers (e.g. int/long).
+.Memfunc.SimpleSeed#Seed:
+..class:Spec.SimpleSeed
+..summary:Constructor
+..signature: Seed<TPosition, SimpleSeed> ()
+..signature: Seed<TPosition, SimpleSeed> (qStartPos, dStartPos, length)
+..signature: Seed<TPosition, SimpleSeed> (qStartPos, dStartPos, qEndPos, dEndPos)
+..param.qStartPos: Start in query sequence.
+..param.dStartPos: Start in database sequence.
+..param.qEndPos: End in query sequence.
+..param.dEndPos: End in database sequence.
+..param.length: Length of the seed.
+..include:seqan/seeds.h
+*/
+template<typename TPosition = int, typename TSpecSeed = SimpleSeed> 
+class Seed{
+public:
+	TPosition leftDim0;
+	TPosition leftDim1;
+	TPosition rightDim0;
+	TPosition rightDim1;
+	TPosition leftDiagonal;
+	TPosition rightDiagonal;
+
+	Seed(){
+		SEQAN_CHECKPOINT
+	}
+
+	Seed(TPosition leftDim0, TPosition leftDim1, TPosition length):leftDim0(leftDim0),leftDim1(leftDim1){
+		SEQAN_CHECKPOINT
+		rightDim0 = leftDim0 + length-1;
+		rightDim1 = leftDim1 + length-1;
+		rightDiagonal = leftDiagonal = leftDim1-leftDim0;
+	}
+
+	Seed(TPosition leftDim0, TPosition leftDim1, TPosition rightDim0, TPosition rightDim1):leftDim0(leftDim0),leftDim1(leftDim1),rightDim0(rightDim0), rightDim1(rightDim1){
+		SEQAN_CHECKPOINT
+		leftDiagonal = _max(leftDim1 - leftDim0, rightDim1-rightDim0);
+		rightDiagonal = _min(leftDim1 - leftDim0, rightDim1-rightDim0);
+	}
+
+
+	~Seed(){
+	}
+
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//											Meta Functions		                                                  //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///.Metafunction.Spec.param.T.type:Class.Seed
+
+template <typename TPosition, typename TSpecSeed>
+struct Spec<Seed<TPosition,TSpecSeed> >
+{
+	typedef TSpecSeed Type;
+};
+
+///.Metafunction.Value.param.T.type:Class.Seed
+template <typename TPosition, typename TSpecSeed>
+struct Value<Seed<TPosition,TSpecSeed> >
+{
+	typedef TPosition Type;
+};
+
+
+
+template< typename TBorder, typename TSpec >
+struct Size< Seed< TBorder, TSpec > >
+{
+	typedef size_t Type;
+};
+
+template< typename TPosition, typename TSpec >
+struct Key< Seed< TPosition, TSpec > >
+{
+	typedef TPosition Type;
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                       Standard Functions                                                       //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.startDiagonal:
+..summary: Returns the diagonal of the start point.
+..cat:Seed Handling
+..signature:startDiagonal(seed)
+..param.seed: The seed whose start diagonal should be returned.
+...type:Class.Seed
+..returns: The diagonal of the start point.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline TPosition 
+startDiagonal(Seed<TPosition, TSpecSeed> const &me)
+{
+	SEQAN_CHECKPOINT
+	return me.leftDim1-me.leftDim0;
+}
+
+/**
+.Function.endDiagonal:
+..summary: Returns the diagonal of the end point.
+..cat:Seed Handling
+..signature:endDiagonal(seed)
+..param.seed: The seed whose end diagonal should be returned.
+...type:Class.Seed
+..returns: The diagonal of the end point.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline TPosition 
+endDiagonal(Seed<TPosition, TSpecSeed> const &me)
+{
+	SEQAN_CHECKPOINT
+	return me.rightDim1-me.rightDim0;
+}
+
+
+
+/**.Function.leftPosition:
+..summary:The begin position of segment in a seed.
+..cat:Seed Handling
+..signature:leftPosition(seed, dim)
+..param.seed:A seed.
+...type:Class.Seed
+..param.dim:Number of segment.
+...remarks:$dim <$ @Function.dimension.dimension(seed)@
+..returns:Begin position of the $dim$-th segment in $seed$.
+*/
+template< typename TPosition, typename TSpecSeed, typename TSize> 
+inline TPosition 
+leftPosition(Seed<TPosition, TSpecSeed>  & me, 
+			 TSize dim)
+{
+	SEQAN_CHECKPOINT
+	return (dim)? me.leftDim1 : me.leftDim0;
+}
+
+/**.Function.setLeftPosition:
+..summary:Sets begin position of segment in a seed.
+..cat:Seed Handling
+..signature:setLeftPosition(seed, dim, new_pos)
+..param.seed:A seed.
+...type:Class.Seed
+..param.dim:Number of segment.
+...remarks:$dim <$ @Function.dimension.dimension(seed)@
+..param.new_pos:The new begin position of the $dim$-th segment in $seed$.
+..see:Function.leftPosition
+*/
+template< typename TPosition, typename TSpecSeed, typename TSize, typename TPosition2> 
+inline TPosition 
+setLeftPosition(Seed<TPosition, TSpecSeed>  & me, 
+				TSize dim,
+				TPosition2 new_pos)
+{
+	SEQAN_CHECKPOINT
+	if (dim) me.leftDim1 = new_pos;
+	else me.leftDim0 = new_pos;
+}
+
+/**.Function.rightPosition:
+..summary:The end position of segment in a seed.
+..cat:Seed Handling
+..signature:rightPosition(seed, dim)
+..param.seed:A seed.
+...type:Class.Seed
+..param.dim:Number of segment.
+...remarks:$dim <$ @Function.dimension.dimension(seed)@
+..returns:End position of the $dim$-th segment in $seed$.
+..see:Function.leftPosition
+*/
+
+template< typename TPosition, typename TSpecSeed, typename TSize> 
+inline TPosition 
+rightPosition(Seed<TPosition, TSpecSeed>  & me, 
+			  TSize dim)
+{
+	SEQAN_CHECKPOINT
+	return (dim)? me.rightDim1 : me.rightDim0;
+}
+
+/**.Function.setRightPosition:
+..summary:Sets end position of segment in a seed.
+..cat:Seed Handling
+..signature:setRightPosition(seed, dim, new_pos)
+..param.seed:A seed.
+...type:Class.Seed
+..param.dim:Number of segment.
+...remarks:$dim <$ @Function.dimension.dimension(seed)@
+..param.new_pos:The new end position of the $dim$-th segment in $seed$.
+..see:Function.rightPosition
+..see:Function.setLeftPosition
+*/
+template< typename TPosition, typename TSpecSeed, typename TSize, typename TPosition2> 
+inline TPosition 
+setRightPosition(Seed<TPosition, TSpecSeed>  & me, 
+				TSize dim,
+				TPosition2 new_pos)
+{
+	SEQAN_CHECKPOINT
+	if (dim) me.rightDim1 = new_pos;
+	else me.rightDim0 = new_pos;
+}
+
+/**.Function.dimension:
+..summary:Dimension of a seed.
+..cat:Seed Handling
+..signature:dimension(seed)
+..param.seed:A seed.
+...type:Class.Seed
+..returns:The number of segments in $seed$.
+*/
+template< typename TPosition, typename TSpec > inline
+typename Size< Seed< TPosition, TSpec > >::Type
+dimension( Seed< TPosition, TSpec > & /*me*/ )
+{
+	return 2;
+}
+
+/**
+.Function.leftDim0:
+..summary: Returns the first position of the seed in the query.
+..cat:Seed Handling
+..signature:leftDim0(seed)
+..param.seed: The seed whose query position should be returned.
+...type:Class.Seed
+..returns: Begin of the seed.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline TPosition 
+leftDim0(Seed<TPosition, TSpecSeed> const &seed)
+{
+	SEQAN_CHECKPOINT
+	return seed.leftDim0;
+}
+
+/**
+.Function.rightDim0:
+..summary: Returns the last position of the seed in the query.
+..cat:Seed Handling
+..signature:rightDim0(seed)
+..param.seed: The seed whose last in the query position should be returned.
+...type:Class.Seed
+..returns: End of the seed.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline TPosition 
+rightDim0(Seed<TPosition,TSpecSeed> const & seed)
+{
+	SEQAN_CHECKPOINT
+	return seed.rightDim0;
+}
+
+/**
+.Function.leftDim1:
+..summary: Returns the first position of the seed in the database.
+..cat:Seed Handling
+..signature:leftDim1(seed)
+..param.seed: The seed whose database position should be returned.
+...type:Class.Seed
+..returns: Begin of the seed.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline TPosition 
+leftDim1(Seed<TPosition, TSpecSeed> const &seed)
+{
+	SEQAN_CHECKPOINT
+	return seed.leftDim1;
+}
+
+/**
+.Function.rightDim1:
+..summary: Returns the last position of the seed in the database.
+..cat:Seed Handling
+..signature:rightDim1(seed)
+..param.seed: The seed whose last in the database position should be returned.
+...type:Class.Seed
+..returns: End of the seed.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline TPosition 
+rightDim1(Seed<TPosition,TSpecSeed> const & seed)
+{
+	SEQAN_CHECKPOINT
+	return seed.rightDim1;
+}
+
+/**
+.Function.leftDiagonal:
+..summary: Returns the most left diagonal of the seed (maximum diagonal value).
+..cat:Seed Handling
+..signature:leftDiagonal(seed)
+..param.seed: The seed whose database position should be returned.
+...type:Class.Seed
+..returns: The most left diagonal.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline TPosition 
+leftDiagonal(Seed<TPosition, TSpecSeed> const &seed)
+{
+	SEQAN_CHECKPOINT
+	return seed.leftDiagonal;
+}
+
+/**
+.Function.rightDiagonal:
+..summary: Returns the most right diagonal of the seed (minimum diagonal value).
+..cat:Seed Handling
+..signature:rightDiagonal(seed)
+..param.seed: The seed whose database position should be returned.
+...type:Class.Seed
+..returns: The most right diagonal.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline TPosition 
+rightDiagonal(Seed<TPosition,TSpecSeed> const & seed)
+{
+	SEQAN_CHECKPOINT
+	return seed.rightDiagonal;
+}
+
+///.Function.length.param.object.type:Class.Gaps
+template<typename TPosition, typename TSpecSeed>
+inline TPosition 
+length(Seed<TPosition, TSpecSeed> const & seed)
+{
+	SEQAN_CHECKPOINT
+	return seed.rightDim0-seed.leftDim0+1;
+}
+
+
+/**
+.Function.setLeftDim0:
+..summary: Updates the start point of the seed.
+..cat:Seed Handling
+..signature:setLeftDim0(seed, start)
+..param.seed: The seed whose start position should be updated.
+...type:Class.Seed
+..param.start: The query position where the seed should start.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline void 
+setLeftDim0(Seed<TPosition, TSpecSeed> &me, 
+			  TPosition start)
+{
+	SEQAN_CHECKPOINT
+	me.leftDim0 = start;
+}
+
+/**
+.Function.setRightDim0:
+..summary: Updates the end point of the seed.
+..cat:Seed Handling
+..signature:setRightDim0(seed, end)
+..param.seed: The seed whose end position should be updated.
+...type:Class.Seed
+..param.end: The query position where the seed should end.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline void 
+setRightDim0(Seed<TPosition,TSpecSeed> & me, 
+			TPosition end)
+{
+	SEQAN_CHECKPOINT
+	me.rightDim0 = end;
+}
+
+/**
+.Function.setLeftDim1:
+..summary: Updates the start point of the seed.
+..cat:Seed Handling
+..signature:setLeftDim1(seed, start)
+..param.seed: The seed whose start position should be updated.
+...type:Class.Seed
+..param.start: The database position where the seed should start.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline void 
+setLeftDim1(Seed<TPosition, TSpecSeed> &me, 
+				 TPosition start)
+{
+	SEQAN_CHECKPOINT
+	me.leftDim1 = start;
+}
+
+/**
+.Function.setRightDim1:
+..summary: Updates the end point of the seed.
+..cat:Seed Handling
+..signature:setRightDim1(seed, end)
+..param.seed: The seed whose end position should be updated.
+...type:Class.Seed
+..param.end: The database position where the seed should end.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline void 
+setRightDim1(Seed<TPosition,TSpecSeed> & me, 
+			   TPosition end)
+{
+	SEQAN_CHECKPOINT
+	me.rightDim1 = end;
+}
+
+/**
+.Function.setLeftDiagonal:
+..summary: Sets a new value for the most left diagonal.
+..cat:Seed Handling
+..signature:setLeftDiagonal(seed, diag)
+..param.seed: The seed whose left diagonal value should be updated.
+...type:Class.Seed
+..param.diag: The new value for the most left diagonal.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline void 
+setLeftDiagonal(Seed<TPosition, TSpecSeed> &me,
+				TPosition diag)
+{
+	SEQAN_CHECKPOINT
+	me.leftDiagonal = diag;
+}
+
+/**
+.Function.setRightDiagonal:
+..summary: Sets a new value for the most right diagonal.
+..cat:Seed Handling
+..signature:setRightDiagonal(seed, diag)
+..param.seed: The seed whose right diagonal value should be updated.
+...type:Class.Seed
+..param.diag: The new value for the most right diagonal.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TSpecSeed>
+inline void 
+setRightDiagonal(Seed<TPosition,TSpecSeed> & seed, 
+				 TPosition diag)
+{
+	SEQAN_CHECKPOINT
+	seed.rightDiagonal = diag;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                      Merge Alogrithms                                                          //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+template<typename TPosition, typename TSpecSeed>
+void 
+_mergeTwoSeeds(Seed<TPosition, TSpecSeed> &firstSeed, 
+			   Seed<TPosition, TSpecSeed> const &secondSeed, 
+			   Merge)
+{
+	SEQAN_CHECKPOINT
+	if (rightDim0(secondSeed) > rightDim0(firstSeed)){
+		setRightDim0(firstSeed,rightDim0(secondSeed));
+		setRightDim1(firstSeed,rightDim1(secondSeed));
+		if (leftDiagonal(firstSeed) < leftDiagonal(secondSeed))
+			setLeftDiagonal(firstSeed, leftDiagonal(secondSeed));
+		if (rightDiagonal(firstSeed) > rightDiagonal(secondSeed))
+			setRightDiagonal(firstSeed, rightDiagonal(secondSeed));
+	}
+}
+
+
+template<typename TPosition, typename TSpecSeed>
+void 
+_mergeTwoSeeds(Seed<TPosition, TSpecSeed> &firstSeed, 
+			   TPosition q,
+			   TPosition d, 
+			   TPosition l, 
+			   Merge)
+{
+	SEQAN_CHECKPOINT
+	setRightDim0(firstSeed,q+l-1);
+	setRightDim1(firstSeed,d+l-1);
+	if (leftDiagonal(firstSeed) < d-q)
+		setLeftDiagonal(firstSeed, d-q);
+	if (rightDiagonal(firstSeed) > d-q)
+		setRightDiagonal(firstSeed, d-q);
+}
+
+
+template<typename TPosition>
+void
+_mergeTwoSeeds(Seed<TPosition, SimpleSeed> &firstSeed, 
+			   TPosition qlPos, 
+			   TPosition dlPos, 
+			   TPosition qrPos, 
+			   TPosition drPos, 
+			   Merge)
+{
+	SEQAN_CHECKPOINT
+	if (qrPos > rightDim0(firstSeed)){
+		typename std::list<Triple <TPosition, TPosition, TPosition> >::iterator begin1, end2, it;
+	
+		setRightDim0(firstSeed,qrPos);
+		setRightDim1(firstSeed,drPos);
+	
+		TPosition diag = dlPos -qlPos;
+		if (leftDiagonal(firstSeed) < diag)
+			setLeftDiagonal(firstSeed, diag);
+		if (rightDiagonal(firstSeed) > diag)
+			setRightDiagonal(firstSeed, diag);
+		diag = drPos - qrPos;
+		if (leftDiagonal(firstSeed) < diag)
+			setLeftDiagonal(firstSeed, diag);
+		if (rightDiagonal(firstSeed) > diag)
+			setRightDiagonal(firstSeed, diag);
+	}
+}
+
+
+template<typename TPosition, typename TSpecSeed, typename TPosition2, typename TPosition3, typename TGapCost>
+void 
+_mergeTwoSeedsScore(Seed<TPosition, TSpecSeed> &firstSeed, 
+					TPosition3 &score1, 
+					Seed<TPosition, TSpecSeed> const &secondSeed, 
+					TPosition3 score2, 
+					Score<TPosition2,Simple> const &scoreMatrix, 
+					TGapCost &, 
+					Merge)
+{
+	SEQAN_CHECKPOINT
+	score1 += score2;
+	score1 += abs(endDiagonal(firstSeed)-startDiagonal(secondSeed))*scoreGap(scoreMatrix);
+	score1 -= (_max(abs(rightDim0(firstSeed)-leftDim0(secondSeed)),abs(rightDim1(firstSeed)-leftDim1(secondSeed)))+1)*scoreMatch(scoreMatrix);
+	if (rightDim0(secondSeed) > rightDim0(firstSeed)){
+		setRightDim0(firstSeed,rightDim0(secondSeed));
+		setRightDim1(firstSeed,rightDim1(secondSeed));
+		if (leftDiagonal(firstSeed) < leftDiagonal(secondSeed))
+			setLeftDiagonal(firstSeed, leftDiagonal(secondSeed));
+		if (rightDiagonal(firstSeed) > rightDiagonal(secondSeed))
+			setRightDiagonal(firstSeed, rightDiagonal(secondSeed));
+	}
+}
+
+
+template<typename TPosition, typename TPosition2, typename TSpecSeed, typename TPosition3, typename TGapCost>
+void 
+_mergeTwoSeedsScore(Seed<TPosition, TSpecSeed> &firstSeed, 
+					TPosition3 &score1, 
+					TPosition q, 
+					TPosition d, 
+					TPosition l, 
+					TPosition3 score2, 
+					Score<TPosition2, Simple> const &scoreMatrix, 
+					TGapCost &, 
+					Merge)
+{
+	SEQAN_CHECKPOINT
+	score1 += score2;
+	score1 += abs((TPosition2)(endDiagonal(firstSeed) - d + q))*scoreGap(scoreMatrix);
+	score1 -= (::std::max<TPosition>(abs((TPosition2)(rightDim0(firstSeed)- q)),abs((TPosition2)(rightDim1(firstSeed)-d)))+1)*scoreMatch(scoreMatrix);
+	setRightDim0(firstSeed,q+l-1);
+	setRightDim1(firstSeed,d+l-1);
+	if (leftDiagonal(firstSeed) < d-q)
+		setLeftDiagonal(firstSeed, d-q);
+	if (rightDiagonal(firstSeed) > d-q)
+		setRightDiagonal(firstSeed, d-q);
+}
+
+
+template<typename TPosition, typename TPosition2, typename TPosition3, typename TGapCost>
+void           
+_mergeTwoSeedsScore(Seed<TPosition, SimpleSeed> &firstSeed, 
+					TPosition3 &score1, 
+					TPosition qlPos, 
+					TPosition dlPos, 
+					TPosition qrPos, 
+					TPosition drPos, 
+					TPosition3 score2, 
+					Score<TPosition2,Simple> const &scoreMatrix, 
+					TGapCost &, 
+					Merge)
+{
+	SEQAN_CHECKPOINT
+	if (qrPos > rightDim0(firstSeed)){
+		
+		score1 += score2;
+		score1 += abs(endDiagonal(firstSeed) - dlPos + qlPos)*scoreGap(scoreMatrix);
+		score1 -= (_max(abs(rightDim0(firstSeed)- qlPos),abs(rightDim1(firstSeed)-dlPos))+1)*scoreMatch(scoreMatrix);
+
+		setRightDim0(firstSeed,qrPos);
+		setRightDim1(firstSeed,drPos);
+		TPosition diag = dlPos -qlPos;
+		if (leftDiagonal(firstSeed) < diag)
+			setLeftDiagonal(firstSeed, diag);
+		if (rightDiagonal(firstSeed) > diag)
+			setRightDiagonal(firstSeed, diag);
+		diag = drPos - qrPos;
+		if (leftDiagonal(firstSeed) < diag)
+			setLeftDiagonal(firstSeed, diag);
+		if (rightDiagonal(firstSeed) > diag)
+			setRightDiagonal(firstSeed, diag);
+	}
+}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                       Extension Algorithms                                                     //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.extendSeed
+..summary:Extends a seed.
+..cat:Seed Handling
+..signature:extendSeed(seed, query, database, direction, tag)
+..signature:extendSeed(seed, scoreDropOff, scoreMatrix, query, database, direction, tag)
+..param.seed: The seed to extend.
+...type:Class.Seed
+..param.query: The query sequence.
+...type:Class.String
+..param.query: The database sequence.
+...type:Class.String
+..param.direction: Defines the direction in which the seed should be extended. 0 = left, 1 = right, 2 = both
+..param.scoreDropOff: The score drop after which the extension should stop. The extension stops if this value is exceeded.
+...remarks:Only used for the algorithms @Tag.Seed Extension.UngappedXDrop@ and @Tag.Seed Extension.GappedXDrop@
+..param.scoreMatrix: The scoring scheme.
+...type:Spec.Simple Score
+...remarks:Only used for the algorithms @Tag.Seed Extension.UngappedXDrop@ and @Tag.Seed Extension.GappedXDrop@
+..param.tag: The algorithm to use.
+...type:Tag.Seed Extension.MatchExtend
+...type:Tag.Seed Extension.UngappedXDrop
+...type:Tag.Seed Extension.GappedXDrop
+..include:seqan/seeds.h
+*/
+
+
+template<typename TPosition, typename TSpecSeed, typename TQuery, typename TDatabase, typename TDirection>
+void 
+extendSeed(Seed<TPosition, TSpecSeed> &seed, 
+		   TQuery const &query, 
+		   TDatabase const &database, 
+		   TDirection direction, 
+		   MatchExtend)
+{
+	SEQAN_CHECKPOINT
+	//left extension
+	if (direction != 1){
+		TPosition queryPos =leftDim0(seed) ;
+		TPosition dataPos = leftDim1(seed);
+		while ((queryPos-1>=0) && (dataPos-1>=0) && (query[queryPos-1] == database[dataPos-1])){
+			--queryPos;
+			--dataPos;
+		}
+		setLeftDim0(seed,queryPos);
+		setLeftDim1(seed,dataPos);
+
+	}
+
+	//right extension
+	if (direction != 0){
+		int queryLength = length(query);
+		int databaseLength = length(database);
+		TPosition queryPos =rightDim0(seed) ;
+		TPosition dataPos = rightDim1(seed);
+		while ((queryPos+1 < queryLength) && (dataPos+1 < databaseLength) && (query[queryPos+1] == database[dataPos+1])){
+			++queryPos;
+			++dataPos;
+		}
+
+		setRightDim0(seed,queryPos);
+		setRightDim1(seed,dataPos);
+	}
+}
+
+
+template<typename TPosition, typename TSpecSeed, typename TQuery, typename TDatabase, typename TScore, typename TDirection>
+void 
+extendSeed(Seed<TPosition,TSpecSeed> &seed, 
+		   TScore scoreDropOff, 
+		   Score<TScore, Simple> const &scoreMatrix,
+		   TQuery const &query,
+		   TDatabase const &database,
+		   TDirection direction, 
+		   UngappedXDrop)
+{
+	SEQAN_CHECKPOINT
+	scoreDropOff *=-1;
+	TScore tmpScore = 0;
+
+	//left extension
+	if (direction != 1){
+		TPosition xPos = leftDim0(seed)-1;
+		TPosition yPos = leftDim1(seed)-1;
+		TPosition last = 0;
+
+		while ((tmpScore > scoreDropOff) && (xPos >= 0) && (yPos>=0)){
+			if (query[xPos] == database[yPos]){
+				last = 0;
+				tmpScore += score(scoreMatrix, xPos, yPos, query, database);
+				if (tmpScore > 0)
+					tmpScore = 0;
+			} else{
+				tmpScore += score(scoreMatrix, xPos, yPos, query, database);
+				++last;
+			}
+		--xPos;
+		--yPos;
+		}
+
+		setLeftDim0(seed,xPos+last+1);
+		setLeftDim1(seed,yPos+last+1);
+	}
+
+	//right extension
+	if (direction != 0){
+		TPosition xLength = length(query);
+		TPosition yLength = length(database);
+		TPosition xPos = rightDim0(seed)+1;
+		TPosition yPos = rightDim1(seed)+1;
+
+		TPosition last = 0;
+		tmpScore= 0;
+		while ((tmpScore > scoreDropOff) && (xPos < xLength) && (yPos < yLength)){
+			if (query[xPos] == database[yPos]){
+				last = 0;
+				tmpScore += score(scoreMatrix, xPos, yPos, query, database);
+				if (tmpScore > 0)
+					tmpScore = 0;
+			}else{
+				tmpScore += score(scoreMatrix, xPos, yPos, query, database);
+				++last;
+			}
+			++xPos;
+			++yPos;
+		}
+		setRightDim0(seed,xPos-last-1);
+		setRightDim1(seed,yPos-last-1);
+	}
+}
+
+// Sets the begin and end position as well as the left and right diagonal of a SimpleSeed after seed extension
+template<typename TPosition, typename TBound, typename TExtension, typename TSize>
+void
+_setExtendedSeedDimensions(Seed<TPosition, SimpleSeed> & seed,
+                           TBound lowerBound,
+                           TBound upperBound,
+                           TExtension extLengthQuery,
+                           TExtension extLengthDatabase,
+                           TSize direction) {
+    if(direction == 0) {
+	    // set left and right diagonals
+        if (leftDiagonal(seed) < startDiagonal(seed)+upperBound)
+	        setLeftDiagonal(seed, startDiagonal(seed)+upperBound);
+	    if (rightDiagonal(seed) > startDiagonal(seed)-lowerBound)
+	       	setRightDiagonal(seed, startDiagonal(seed)-lowerBound);
+
+        // set new start position of seed
+        setLeftDim0(seed, leftDim0(seed)-extLengthQuery);
+        setLeftDim1(seed, leftDim1(seed)-extLengthDatabase);
+    } else {
+	    // set left and right diagonals
+	    if (rightDiagonal(seed) > endDiagonal(seed)-upperBound)
+	        setRightDiagonal(seed, endDiagonal(seed)-upperBound);
+        if (leftDiagonal(seed) < endDiagonal(seed)+lowerBound)
+            setLeftDiagonal(seed, endDiagonal(seed)+lowerBound);
+
+        // set new end position of seed
+        setRightDim0(seed, rightDim0(seed)+extLengthQuery);
+        setRightDim1(seed, rightDim1(seed)+extLengthDatabase);
+    }
+}
+
+template<typename TSeedSpec, typename TPosition, typename DatabaseInfix, typename QueryInfix, typename TScore, typename TSize>
+TScore
+_extendSeedOneDirection(Seed<TPosition, TSeedSpec/*SimpleSeed*/> & seed,
+                       DatabaseInfix const & dataSeg,
+                       QueryInfix const & querySeg, 
+                       TScore scoreDropOff,
+                       Score<TScore, Simple> const & scoreMatrix,
+                       TSize direction) {
+    TScore gapCost = scoreGap(scoreMatrix);
+    TScore infimum = minValue<TScore>()+1-gapCost;
+
+    TPosition upperBound = 0;
+    TPosition lowerBound = 0;
+
+    TPosition xLength = length(querySeg);
+    TPosition yLength = length(dataSeg);
+
+    // set variables for calculating the sequence positions
+    int factor, xSummand, ySummand;
+    if(direction == 0) {
+        factor = -1;
+        xSummand = xLength;
+        ySummand = yLength;
+    } else {
+        factor = 1;
+        xSummand = -1;
+        ySummand = -1;
+    }
+
+    // antidiagonals of DP matrix
+    String<TScore> antiDiagonal1;
+    String<TScore> antiDiagonal2;
+    String<TScore> antiDiagonal3;
+
+    resize(antiDiagonal1, 1, 0);
+    resize(antiDiagonal2, 2, infimum);
+    resize(antiDiagonal3, _min(3, xLength+1), infimum);
+
+    String<TScore> *antiDiag1 = &antiDiagonal1;	//smallest diagonal
+	String<TScore> *antiDiag2 = &antiDiagonal2;
+	String<TScore> *antiDiag3 = &antiDiagonal3;	//current diagonal
+	String<TScore> *tmpDiag;
+
+	//Matrix initialization
+	if (gapCost >= (-1)*scoreDropOff) {
+		(*antiDiag2)[0] = gapCost;
+		(*antiDiag2)[1] = gapCost;
+	}
+	if (2*gapCost >= (-1)*scoreDropOff) {
+		(*antiDiag3)[0] = 2*gapCost;
+		(*antiDiag3)[2] = 2*gapCost;
+	}
+		
+	TPosition b = 1; // lower bound for i
+	TPosition u = 0; // upper bound for i
+	TPosition k = 1; // current antidiagonal
+	TScore tmp;   // for calculating the maximum for a single matrix entry
+	TScore tmpMax1 = 0; // maximum score without the current diagonal
+	TScore tmpMax2 = 0; // maximum score including the current diagonal
+
+	//Extension as proposed by Zhang et al
+	while(true) {
+		++k;
+		for (TPosition i = b; i <= u+1; ++i) {
+            // calculate matrix entry
+			tmp = infimum;
+			tmp = _max((*antiDiag2)[i-1], (*antiDiag2)[i]) + gapCost;
+			tmp = _max(tmp, (*antiDiag1)[i-1] + score(scoreMatrix, xSummand + factor*i, ySummand + factor*(k-i), querySeg, dataSeg));
+
+			tmpMax2 = _max(tmpMax2, tmp);
+			if (tmp < tmpMax1-scoreDropOff)
+				(*antiDiag3)[i] = infimum;
+			else
+				(*antiDiag3)[i] = tmp;
+		}
+        
+        // narrow the relevant matrix region
+		while ((b < (TPosition)length(*antiDiag3)-1) && ((*antiDiag3)[b] == infimum) && (*antiDiag2)[b-1] == infimum) {
+			++b;
+		}
+		++u;
+		while ((u >= 0) && ((*antiDiag3)[u] == infimum) && (*antiDiag2)[u] == infimum) {
+			--u;
+        }
+			
+		//borders for lower triangle of edit matrix
+		b = _max(b, k+1-yLength);
+		u = _min(u, xLength-1);
+
+        if (b > u+1) break;
+
+	    //calculate upper/lower bound for diagonals
+        if (2*((k+1)/2 - b) - (k%2) > lowerBound) {
+			lowerBound = 2*((k+1)/2 - b) - (k%2);
+        }
+        if (2*(u - k/2) - (k%2) > upperBound) {
+            upperBound = 2*(u - k/2) - (k%2);
+        }
+
+        // swap diagonals
+		tmpDiag = antiDiag1;
+		antiDiag1 = antiDiag2;
+		antiDiag2 = antiDiag3;
+		antiDiag3 = tmpDiag;
+
+        // extend last diagonal diagonal to be the new longest and initialize
+		int d = 0;
+		while ((d < 3) && ((TPosition)length(*antiDiag3) <= xLength)) {
+			appendValue(*antiDiag3, 0);
+			++d;
+		}
+		for (unsigned int eu = 0; eu < length(*antiDiag3); ++eu)
+			(*antiDiag3)[eu] = infimum;
+
+		if ((*antiDiag2)[0]+ gapCost >= tmpMax1-scoreDropOff)
+			(*antiDiag3)[0] = (*antiDiag2)[0] + gapCost;
+		if ((*antiDiag2)[length(*antiDiag2)-1] + gapCost >= tmpMax1-scoreDropOff)
+			(*antiDiag3)[length(*antiDiag3)-1] = (*antiDiag2)[length(*antiDiag2)-1] + gapCost;
+
+		tmpMax1 = tmpMax2;
+	}
+
+  //  // print anti diagonals
+  //  for(int ii = length(*antiDiag1)-1; ii >= 0 ; --ii) {
+  //      for(int jj = ii; jj > 0 ; --jj) std::cout << "  ";
+  //      std::cout << " ";
+  //      if ((*antiDiag1)[ii] == infimum ) std::cout << "i" << " ";
+  //      else std::cout << (*antiDiag1)[ii] << " ";
+  //      if (length(*antiDiag2) <= ii+1 ) std::cout << " ";
+  //      else if ((*antiDiag2)[ii+1] == infimum ) std::cout << "i" << " ";
+  //      else std::cout << (*antiDiag2)[ii+1] << " ";
+		//if (length(*antiDiag3) <= ii+2 ) std::cout << std::endl;
+  //      else if ((*antiDiag3)[ii+2] == infimum ) std::cout << "i" << std::endl;
+  //      else std::cout << (*antiDiag3)[ii+2] << std::endl;
+  //  }
+
+	//Find seed start/end
+	TPosition extLengthQuery = 0; // length of extension in query
+    TPosition extLengthDatabase = 0; // length of extension in database
+	TScore tmpMax = infimum;
+	if ((k >= xLength+yLength) && ((*antiDiag2)[u+1] >= tmpMax1-scoreDropOff)) {
+        // extension ends at end of both sequences
+		extLengthQuery = xLength;
+        extLengthDatabase = yLength;
+		tmpMax = (*antiDiag2)[u+1];
+    } else if ((b >= xLength) && b < (TPosition)length(*antiDiag2) && ((*antiDiag2)[b] >= tmpMax1-scoreDropOff)) {
+        // extension ends at end of query
+        tmpMax = (*antiDiag2)[b];
+        extLengthQuery = xLength;
+        extLengthDatabase = k-(xLength+1);
+    } else if ((k-u-1 >= yLength) && u >= 0 && ((*antiDiag2)[u] >= tmpMax1-scoreDropOff)) {
+        // extension ends at end of database
+        tmpMax = (*antiDiag2)[u];
+        extLengthQuery = u;
+        extLengthDatabase = yLength;
+    } else {
+        for (unsigned int eu = 0; eu < length(*antiDiag1); ++eu) {
+            if ((*antiDiag1)[eu] > tmpMax) {
+                // extension ends with mismatch
+		        tmpMax = (*antiDiag1)[eu];
+		        extLengthQuery = _min(xLength, (TPosition)eu);
+                extLengthDatabase = _min(yLength, (TPosition)(k - (eu+2)));
+		    }
+        }
+	}
+
+    if(tmpMax != infimum) {
+        _setExtendedSeedDimensions(seed, lowerBound, upperBound, extLengthQuery, extLengthDatabase, direction);
+        return tmpMax;
+    } else {
+        return 0;
+    }
+}
+
+
+template<typename TSeedSpec, typename TPosition, typename TQuery, typename TDatabase, typename TScore, typename TSize>
+void 
+extendSeed(Seed<TPosition, TSeedSpec> &seed, 
+		   TScore scoreDropOff, 
+		   Score<TScore, Simple> const &scoreMatrix, 
+		   TQuery const &query, 
+		   TDatabase const &database, 
+		   TSize direction, 
+		   GappedXDrop)
+{
+	SEQAN_CHECKPOINT
+	//left extension
+	if ((direction != 1) && (leftDim0(seed)!= (TPosition)beginPosition(query)) && (leftDim1(seed) != (TPosition)beginPosition(database)))
+    {
+        typename Prefix<TDatabase const>::Type dataSeg = prefix(database, leftDim1(seed));
+        typename Prefix<TQuery const>::Type querySeg = prefix(query, leftDim0(seed));
+		
+        _extendSeedOneDirection(seed, dataSeg, querySeg, scoreDropOff, scoreMatrix, 0 /*left*/);
+	}
+
+	//right extension
+	if ((direction != 0) && (rightDim0(seed)+1 < (TPosition)endPosition(query)) && (rightDim1(seed)+1 < (TPosition)endPosition(database)))
+    {
+        typename Suffix<TDatabase const>::Type dataSeg = suffix(database, rightDim1(seed)+1);
+        typename Suffix<TQuery const>::Type querySeg = suffix(query, rightDim0(seed)+1);
+
+        _extendSeedOneDirection(seed, dataSeg, querySeg, scoreDropOff, scoreMatrix, 1 /*right*/);
+	}
+}
+
+} //end of Seqan namespace
+
+#endif //#ifndef SEQAN_HEADER_
+
diff --git a/src/SeqAn-1.3/seqan/seeds/seed_multi.h b/src/SeqAn-1.3/seqan/seeds/seed_multi.h
new file mode 100644
index 0000000..41c799a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/seed_multi.h
@@ -0,0 +1,755 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_MultiSeed_H
+#define SEQAN_HEADER_MultiSeed_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+struct SeedMulti_;
+typedef Tag<SeedMulti_> const ChainedSeed;
+
+/**
+..Spec.ChainedSeed
+..summary:Describes a seed with start and end position2 and diagonal upper and lower bounds. Additionaly diagonal segments
+between start and end position2 are stored.
+..cat:Seed Handling
+..general:Class.Seed
+..signature:Seed<TPosition, ChainedSeed>
+..param.TPosition:The type of number that schuld be used. Must have negative numbers (e.g. int/long).
+.Memfunc.ChainedSeed#Seed:
+..class:Spec.ChainedSeed
+..summary:Constructor
+..signature: Seed<TPosition, SimpleSeed> ()
+..signature: Seed<TPosition, SimpleSeed> (qStartPos, dStartPos, length)
+..param.qStartPos: Start in query sequence.
+..param.dStartPos: Start in database sequence.
+..param.length: Length of the seed.
+*/
+
+template<typename TPosition> 
+class Seed<TPosition, ChainedSeed> {
+	
+public:
+	std::list<Triple<TPosition, TPosition, TPosition> > seedSet;
+	TPosition leftDiagonal;
+	TPosition rightDiagonal;
+ 
+	Seed(){
+		SEQAN_CHECKPOINT
+	}
+	
+	Seed(TPosition leftDim0,
+		 TPosition leftDim1,
+		 TPosition length)
+	{
+		SEQAN_CHECKPOINT
+		seedSet.push_back(Triple<TPosition, TPosition, TPosition> (leftDim0, leftDim1, length));
+		rightDiagonal = leftDiagonal = leftDim1 - leftDim0;
+	}
+	
+	~Seed(){
+	}
+
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                       Standard Functions                                                       //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TPosition>
+inline TPosition 
+startDiagonal(Seed<TPosition, ChainedSeed> const &seed)
+{
+	return seed.seedSet.front().i2-seed.seedSet.front().i1;
+}
+
+template<typename TPosition>
+inline TPosition 
+endDiagonal(Seed<TPosition, ChainedSeed> const &seed)
+{
+	return seed.seedSet.back().i2-seed.seedSet.back().i1;
+}
+
+
+template<typename TPosition>
+inline TPosition 
+leftDim0(Seed<TPosition, ChainedSeed> const &seed)
+{
+	return seed.seedSet.front().i1;
+}
+
+
+template<typename TPosition>
+inline TPosition 
+rightDim0(Seed<TPosition, ChainedSeed> const & seed)
+{
+	return seed.seedSet.back().i1+seed.seedSet.back().i3-1;
+}
+
+
+template<typename TPosition>
+inline TPosition 
+leftDim1(Seed<TPosition, ChainedSeed> const &seed)
+{
+	return seed.seedSet.front().i2;
+}
+
+template<typename TPosition>
+inline TPosition 
+rightDim1(Seed<TPosition, ChainedSeed> const & seed)
+{
+	return seed.seedSet.back().i2+seed.seedSet.back().i3-1;
+}
+
+
+template<typename TPosition>
+inline TPosition 
+length(Seed<TPosition, ChainedSeed> const & seed)
+{
+	SEQAN_CHECKPOINT
+	return seed.seedSet.back().i1 + seed.seedSet.back().i3 - seed.seedSet.front().i1;	
+}
+
+
+
+template<typename TPosition>
+inline void 
+setLeftDim0(Seed<TPosition, ChainedSeed> &seed, 
+			  TPosition start)
+{
+	SEQAN_CHECKPOINT
+	TPosition lengthDiff = seed.seedSet.front().i1 - start;
+	seed.seedSet.front().i3 += lengthDiff;
+	seed.seedSet.front().i2 -= lengthDiff;
+	seed.seedSet.front().i1 = start;
+}
+
+
+template<typename TPosition>
+inline void 
+setRightDim0(Seed<TPosition,ChainedSeed> & seed, 
+			TPosition end)
+{
+	SEQAN_CHECKPOINT
+	seed.seedSet.back().i3 = end - seed.seedSet.back().i1+1;
+}
+
+
+template<typename TPosition>
+inline void 
+setLeftDim1(Seed<TPosition, ChainedSeed> &seed, 
+				 TPosition start)
+{
+	SEQAN_CHECKPOINT
+	TPosition lengthDiff = seed.seedSet.front().i2 - start;
+	seed.seedSet.front().i3 += lengthDiff;
+	seed.seedSet.front().i1 -= lengthDiff;
+	seed.seedSet.front().i2 = start;
+}
+
+
+template<typename TPosition>
+inline void 
+setRightDim1(Seed<TPosition,ChainedSeed> & seed, 
+			   TPosition end)
+{
+	SEQAN_CHECKPOINT
+	seed.seedSet.back().i3 = end - seed.seedSet.back().i2+1;
+}
+
+/*
+.Function._getDiagSet:
+..summary: Returns the set of matching diagonals.
+..cat:Seed Handling
+..signature:setRightDim1(seed)
+..param.seed: The seed whose end position2 should be updated.
+...type:Spec.ChainedSeed
+..returns: A reference to the list of seed diagonals.
+..include:seqan/seeds.h
+*/
+template<typename TPosition>
+inline const std::list<Triple<TPosition, TPosition, TPosition> >&
+_getDiagSet(Seed<TPosition,ChainedSeed> const & seed){
+	SEQAN_CHECKPOINT
+	return seed.seedSet;
+}
+
+template<typename TPosition>
+inline std::list<Triple<TPosition, TPosition, TPosition> >&
+_getDiagSet(Seed<TPosition,ChainedSeed> & seed){
+	SEQAN_CHECKPOINT
+	return seed.seedSet;
+}
+
+/**
+.Function.appendDiag
+..summary: Adds diagonal to the seed.
+..cat:Seed Handling
+..signature:appendDiag(seed, diagonal)
+..param.seed: The seed to which the diagonal should be added.
+...type:Spec.ChainedSeed
+..param.diag: The diagonal to add.
+...type:Class.Triple
+...remarks: A diagonal consists of three values: 1: start in 1. sequence, 2: start in 2. sequence, 3: length of match
+..include:seqan/seeds.h
+*/
+template<typename TPosition>
+void
+appendDiag(Seed<TPosition,ChainedSeed> & seed, 
+		   Triple<TPosition, TPosition, TPosition> diag)
+{
+	SEQAN_CHECKPOINT
+	seed.seedSet.push_back(diag);
+}
+
+template<typename TPosition>
+Triple<TPosition, TPosition, TPosition>&
+_getFirstDiag(Seed<TPosition,ChainedSeed> & seed){
+	SEQAN_CHECKPOINT
+	return seed.seedSet.front();
+}
+
+template<typename TPosition>
+const Triple<TPosition, TPosition, TPosition>&
+_getFirstDiag(Seed<TPosition,ChainedSeed> const & seed){
+	SEQAN_CHECKPOINT
+	return seed.seedSet.front();
+}
+
+template<typename TPosition>
+Triple<TPosition, TPosition, TPosition>&
+_getLastDiag(Seed<TPosition,ChainedSeed> & seed){
+	SEQAN_CHECKPOINT
+	return seed.seedSet.back();
+}
+
+template<typename TPosition>
+const Triple<TPosition, TPosition, TPosition>&
+_getLastDiag(Seed<TPosition,ChainedSeed> const & seed){
+	SEQAN_CHECKPOINT
+	return seed.seedSet.back();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                      Merge Alogrithms                                                          //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TPosition>
+void
+_mergeTwoSeeds(Seed<TPosition, ChainedSeed> &firstSeed,
+			   TPosition qPos,
+			   TPosition dPos,
+			   TPosition length,
+			   Merge)
+{
+	SEQAN_CHECKPOINT
+	typedef typename std::list<Triple <TPosition, TPosition, TPosition> >::iterator TIterator;
+    TIterator begin1, end2, it;
+	TPosition diag = dPos -qPos;
+	//new seed would be longer?
+	if (qPos+length-1 > rightDim0(firstSeed)){
+		while ((_getLastDiag(firstSeed)).i1 > qPos)// || ((_getLastDiag(firstSeed)).i2 > dPos))
+		{
+			(firstSeed).seedSet.pop_back();
+		}
+		if ((rightDim0(firstSeed) < qPos) && (rightDim1(firstSeed) < dPos)) {
+			appendDiag(firstSeed,Triple<TPosition, TPosition, TPosition>(qPos, dPos, length));
+		} else {
+			if (diag == endDiagonal(firstSeed)){
+				setRightDim1(firstSeed,dPos+length-1);
+			} else {
+				TPosition tmp = diag - endDiagonal(firstSeed);
+				if (tmp < 0){
+					Triple <TPosition, TPosition, TPosition> tmpSeed = _getLastDiag(firstSeed);
+					TPosition tmp2  = tmpSeed.i3 - ((tmpSeed.i2+tmpSeed.i3-1)- dPos+1);
+					if (tmp2 > 0){
+						_getLastDiag(firstSeed).i3 = tmp2;
+						appendDiag(firstSeed,Triple<TPosition, TPosition, TPosition>(qPos, dPos, length));
+					}
+				} else {
+					Triple <TPosition, TPosition, TPosition> tmpSeed = _getLastDiag(firstSeed);
+					TPosition tmp2 = tmpSeed.i3 -(tmpSeed.i1 +tmpSeed.i3-1 - qPos+1);
+					if (tmp2 > 0){
+						_getLastDiag(firstSeed).i3 = tmp2;
+						appendDiag(firstSeed,Triple<TPosition, TPosition, TPosition>(qPos, dPos, length));
+				}
+			}
+		}
+	}
+
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+	}
+}
+
+
+template<typename TPosition>
+void
+_mergeTwoSeeds(Seed<TPosition, ChainedSeed> &firstSeed, 
+			   Seed<TPosition, ChainedSeed> const &secondSeed, 
+			   Merge)
+{
+	SEQAN_CHECKPOINT
+	typedef typename std::list<Triple <TPosition, TPosition, TPosition> >::const_iterator TIterator;
+        TIterator begin1, end2, it;
+	begin1 = _getDiagSet(secondSeed).begin();
+	end2 = _getDiagSet(secondSeed).end();
+	if (rightDim0(secondSeed) > rightDim0(firstSeed)){
+		while (_getLastDiag(firstSeed).i1 > _getFirstDiag(secondSeed).i1) //|| ((_getLastDiag(firstSeed).i2 > _getFirstDiag(secondSeed).i2)))
+		{
+			(firstSeed).seedSet.pop_back();
+		}
+
+		if ((rightDim0(firstSeed) < leftDim0(secondSeed)) && (rightDim1(firstSeed) < leftDim1(secondSeed))) {
+			for (it = begin1; it != end2; it++){
+				appendDiag(firstSeed,*it);
+			}
+		} else {
+		if (startDiagonal(secondSeed) == endDiagonal(firstSeed)){
+			setRightDim1(firstSeed,(*begin1).i2+(*begin1).i3-1);
+			++begin1;
+			for (it = begin1; it != end2; it++){
+				appendDiag(firstSeed,*it);
+			}
+		}
+		else {
+			
+			TPosition tmp = startDiagonal(secondSeed) - endDiagonal(firstSeed);
+			if (tmp < 0){
+				Triple <TPosition, TPosition, TPosition> tmpSeed = _getLastDiag(firstSeed);
+				TPosition tmp2  = tmpSeed.i3 - ((tmpSeed.i2+tmpSeed.i3-1)- leftDim1(secondSeed)+1);
+				if (tmp2 > 0){
+					_getLastDiag(firstSeed).i3 = tmp2;
+					for (it = begin1; it != end2; it++){
+						appendDiag(firstSeed,*it);
+					}
+				}
+			} else {
+				Triple <TPosition, TPosition, TPosition> tmpSeed = _getLastDiag(firstSeed);
+				TPosition tmp2 = tmpSeed.i3 -(tmpSeed.i1 +tmpSeed.i3-1 - leftDim0(secondSeed)+1);
+				if (tmp2 > 0){
+					_getLastDiag(firstSeed).i3 = tmp2;
+					for (it = begin1; it != end2; it++){
+						appendDiag(firstSeed,*it);
+					}
+				}
+			}
+		}	
+		}
+		
+		if (leftDiagonal(firstSeed) < leftDiagonal(secondSeed))
+			setLeftDiagonal(firstSeed, leftDiagonal(secondSeed));
+		if (rightDiagonal(firstSeed) > rightDiagonal(secondSeed))
+			setRightDiagonal(firstSeed, rightDiagonal(secondSeed));
+	}
+}
+
+template<typename TPosition, typename TPosition2, typename TPosition3, typename TGapCost>
+void
+_mergeTwoSeedsScore(Seed<TPosition, ChainedSeed> &firstSeed,
+					TPosition3 &score1,
+					TPosition qPos,
+					TPosition dPos,
+					TPosition length,
+					TPosition3 score2,
+					Score<TPosition2,Simple> const &scoreMatrix,
+					TGapCost &,
+				    Merge)
+{
+	SEQAN_CHECKPOINT
+	typedef typename std::list<Triple <TPosition, TPosition, TPosition> >::iterator TIterator;
+    TIterator begin1, end2, it;
+	TPosition diag = dPos - qPos;
+	score1 += score2;
+
+	
+	if (qPos+length-1 > rightDim0(firstSeed)){
+		while (_getLastDiag(firstSeed).i1 > qPos)// || (_getLastDiag(firstSeed).i2 > dPos))
+		{
+			score1 -= firstSeed.seedSet.back().i3*scoreMatch(scoreMatrix);
+			TPosition x1 = firstSeed.seedSet.back().i1;
+			TPosition x2 = firstSeed.seedSet.back().i2;
+			firstSeed.seedSet.pop_back();
+			score1 -=(abs(rightDim0(firstSeed)-x1)+abs(rightDim1(firstSeed)-x2))*scoreGap(scoreMatrix); 
+		}
+		score1 += abs(endDiagonal(firstSeed) - dPos + qPos)*scoreGap(scoreMatrix);
+		score1 -=(_max(abs(rightDim0(firstSeed)- qPos),abs(rightDim1(firstSeed)-dPos))+1)*scoreMatch(scoreMatrix);
+
+		if ((rightDim0(firstSeed) < qPos) && (rightDim1(firstSeed) < dPos)) {
+			appendDiag(firstSeed,Triple<TPosition, TPosition, TPosition>(qPos, dPos, length));
+		} else {
+			if (diag == endDiagonal(firstSeed))
+			{
+				setRightDim1(firstSeed,dPos+length-1);
+			} 
+			else 
+			{
+				TPosition tmp = diag - endDiagonal(firstSeed);
+				if (tmp < 0)
+				{
+					Triple <TPosition, TPosition, TPosition> tmpSeed = _getLastDiag(firstSeed);
+					TPosition tmp2  = tmpSeed.i3 - ((tmpSeed.i2+tmpSeed.i3-1)- dPos+1);
+					if (tmp2 > 0)
+					{
+						_getLastDiag(firstSeed).i3 = tmp2;
+						appendDiag(firstSeed,Triple<TPosition, TPosition, TPosition>(qPos, dPos, length));
+					}
+				} 
+				else 
+				{
+					Triple <TPosition, TPosition, TPosition> tmpSeed = _getLastDiag(firstSeed);
+					TPosition tmp2 = tmpSeed.i3 -(tmpSeed.i1 +tmpSeed.i3-1 - qPos+1);
+					if (tmp2 > 0)
+					{
+						_getLastDiag(firstSeed).i3 = tmp2;
+						appendDiag(firstSeed,Triple<TPosition, TPosition, TPosition>(qPos, dPos, length));
+					}
+				}
+			}
+		}
+	if (leftDiagonal(firstSeed) < diag)
+		setLeftDiagonal(firstSeed, diag);
+	if (rightDiagonal(firstSeed) > diag)
+		setRightDiagonal(firstSeed, diag);
+	}
+}
+
+
+template<typename TPosition, typename TPosition2, typename TPosition3, typename TGapCost>
+void
+_mergeTwoSeedsScore(Seed<TPosition, ChainedSeed> &firstSeed,
+					TPosition3 &score1,
+					Seed<TPosition, ChainedSeed> const &secondSeed,
+					TPosition3 score2,
+					Score<TPosition2,Simple> const &scoreMatrix,
+					TGapCost &,
+					Merge)
+{
+	SEQAN_CHECKPOINT
+	score1 += score2;
+	typedef typename std::list<Triple <TPosition, TPosition, TPosition> >::const_iterator TIterator;
+        TIterator begin1, end2, it;
+	begin1 = _getDiagSet(secondSeed).begin();
+	end2 = _getDiagSet(secondSeed).end();
+	if (rightDim0(secondSeed) > rightDim0(firstSeed)){
+		while (_getLastDiag(firstSeed).i1 > _getFirstDiag(secondSeed).i1)// || (_getLastDiag(firstSeed).i2 > _getFirstDiag(secondSeed).i2))
+		{
+			score1 -= firstSeed.seedSet.back().i3*scoreMatch(scoreMatrix);
+			TPosition x1 = firstSeed.seedSet.back().i1;
+			TPosition x2 = firstSeed.seedSet.back().i2;
+			firstSeed.seedSet.pop_back();
+			score1 -= (abs(rightDim0(firstSeed)-x1)+abs(rightDim1(firstSeed)-x2))*scoreGap(scoreMatrix); 
+		}
+		score1 += abs(endDiagonal(firstSeed) - startDiagonal(secondSeed))*scoreGap(scoreMatrix);
+		score1 -= (_max(abs(rightDim0(firstSeed)- leftDim0(secondSeed)),abs(rightDim1(firstSeed)-leftDim1(secondSeed)))+1)*scoreMatch(scoreMatrix);
+
+		if ((rightDim0(firstSeed) < leftDim0(secondSeed)) && (rightDim1(firstSeed) < leftDim1(secondSeed))) {
+			for (it = begin1; it != end2; it++){
+				appendDiag(firstSeed,*it);
+			}
+		} else {
+		if (startDiagonal(secondSeed) == endDiagonal(firstSeed)){
+			setRightDim1(firstSeed,(*begin1).i2+(*begin1).i3-1);
+			++begin1;
+			for (it = begin1; it != end2; it++){
+				appendDiag(firstSeed,*it);
+			}
+		}
+		else {
+			
+			TPosition tmp = startDiagonal(secondSeed) - endDiagonal(firstSeed);
+			if (tmp < 0){
+				Triple <TPosition, TPosition, TPosition> tmpSeed = _getLastDiag(firstSeed);
+				TPosition tmp2  = tmpSeed.i3 - ((tmpSeed.i2+tmpSeed.i3-1)- leftDim1(secondSeed)+1);
+				if (tmp2 > 0){
+					_getLastDiag(firstSeed).i3 = tmp2;
+					for (it = begin1; it != end2; it++){
+						appendDiag(firstSeed,*it);
+					}
+				}
+			} else {
+				Triple <TPosition, TPosition, TPosition> tmpSeed = _getLastDiag(firstSeed);
+				TPosition tmp2 = tmpSeed.i3 -(tmpSeed.i1 +tmpSeed.i3-1 - leftDim0(secondSeed)+1);
+				if (tmp2 > 0){
+					_getLastDiag(firstSeed).i3 = tmp2;
+					for (it = begin1; it != end2; it++){
+						appendDiag(firstSeed,*it);
+					}
+				}
+			}
+		}	
+		}
+		
+		if (leftDiagonal(firstSeed) < leftDiagonal(secondSeed))
+			setLeftDiagonal(firstSeed, leftDiagonal(secondSeed));
+		if (rightDiagonal(firstSeed) > rightDiagonal(secondSeed))
+			setRightDiagonal(firstSeed, rightDiagonal(secondSeed));
+	}
+}
+
+// Sets the begin and end position as well as the left and right diagonal of a ChainedSeed after seed extension
+template<typename TPosition, typename TBound, typename TExtension, typename TSize>
+void
+_setExtendedSeedDimensions(Seed<TPosition, ChainedSeed> & seed,
+                           TBound lowerBound,
+                           TBound upperBound,
+                           TExtension extLengthQuery,
+                           TExtension extLengthDatabase,
+                           TSize direction) {
+    if(direction == 0) {
+	    // set left and right diagonals
+        if (leftDiagonal(seed) < startDiagonal(seed)+upperBound)
+	        setLeftDiagonal(seed, startDiagonal(seed)+upperBound);
+	    if (rightDiagonal(seed) > startDiagonal(seed)-lowerBound)
+	       	setRightDiagonal(seed, startDiagonal(seed)-lowerBound);
+
+        // set new start position of seed
+        seed.seedSet.push_front(Triple<TPosition, TPosition, TPosition>
+                                       (leftDim0(seed)-extLengthQuery, leftDim1(seed)-extLengthDatabase, 1));
+    } else {
+	    // set left and right diagonals
+	    if (rightDiagonal(seed) > endDiagonal(seed)-upperBound)
+	        setRightDiagonal(seed, endDiagonal(seed)-upperBound);
+        if (leftDiagonal(seed) < endDiagonal(seed)+lowerBound)
+            setLeftDiagonal(seed, endDiagonal(seed)+lowerBound);
+
+        // set new end position of seed
+        seed.seedSet.push_back(Triple<TPosition, TPosition, TPosition>
+                                      (rightDim0(seed)+extLengthQuery, rightDim1(seed)+extLengthDatabase, 1));
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//                                      Alignment Construction Alogrithm										  //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Function.getAlignment:
+..summary: Constructs a alignment from a @Spec.ChainedSeed at .
+..cat:Seed Handling
+..signature:getAlignment(seed, align, query, database, scoreMatrix)
+..param.seed: The alignment foundation.
+...type:Spec.ChainedSeed
+..param.align: An emtpy alignment object, that stores the constructed alignment.
+...type:Class.Align
+..param.query:The Query sequence.
+...type:Class.String
+..param.database:The database sequence.
+...type:Class.String
+..param.scoreMatrix:The scoring matrix.
+...type:Spec.Simple Score
+..returns: Score of the alignment.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TText, typename TPosition2>
+int
+getAlignment(Seed<TPosition,ChainedSeed> &seed,
+			 Align<String<TText>, ArrayGaps> &aligned, 
+			 String<TText> &query, 
+			 String<TText> &database, 
+			 Score<TPosition2, Simple> &scoreMatrix)
+{
+	SEQAN_CHECKPOINT
+	int seedScore = 0;
+	typename std::list<Triple< TPosition, TPosition, TPosition> > seedList = _getDiagSet(seed);
+	typedef typename std::list<Triple< TPosition, TPosition, TPosition> >::iterator TIterator;
+
+	resize(rows(aligned), 2);
+	assignSource(row(aligned, 0), query);
+	assignSource(row(aligned, 1), database);
+
+	setClippedBeginPosition(row(aligned, 0), leftDim0(seed));
+	setClippedBeginPosition(row(aligned, 1), leftDim1(seed));
+	setBeginPosition(row(aligned, 0), 0);
+	setBeginPosition(row(aligned, 1), 0);
+	setClippedEndPosition(row(aligned, 0), rightDim0(seed)+1);
+	setClippedEndPosition(row(aligned, 1), rightDim1(seed)+1);
+
+	TIterator it1 = seedList.begin();
+	TIterator it2 = ++seedList.begin();
+	
+	for (int i =0; i<(*it1).i3;++i){
+		seedScore += score(scoreMatrix,(*it1).i1+i, (*it1).i2+i, query, database); 
+	}
+	
+	if (seedList.size()>=2){
+		TPosition gapLength;
+		TPosition position1 =	it1->i1 - leftDim0(seed) + it1->i3;
+		TPosition position2 =	it1->i2 - leftDim1(seed) + it1->i3;
+		while (it2 != seedList.end()){
+			if (it2->i1 == it1->i1 + it1->i3){ //query teile zusammen
+				gapLength = it2->i2 - it1->i2 - it1->i3;
+				insertGaps(row(aligned,0),position1, gapLength);
+				seedScore += gapLength*scoreGap(scoreMatrix);
+				position1 += gapLength;
+			}
+			else
+				if ((*it2).i2 == it1->i2+it1->i3)
+				{
+					gapLength = it2->i1 - it1->i1 - it1->i3;
+					insertGaps(row(aligned,1),position2,gapLength);
+					position2 += gapLength;
+					seedScore += gapLength*scoreGap(scoreMatrix);
+				} 
+				else 
+				{
+					Align<String<TText>, ArrayGaps> alignSeg;
+					resize(rows(alignSeg), 2);
+					assignSource(row(alignSeg, 0), query);
+					assignSource(row(alignSeg, 1), database);
+					
+					setClippedBeginPosition(row(alignSeg, 0), (*it1).i1+(*it1).i3);
+					setClippedBeginPosition(row(alignSeg, 1), (*it1).i2+(*it1).i3);
+					setBeginPosition(row(alignSeg, 0), 0);
+					setBeginPosition(row(alignSeg, 1), 0);
+					setClippedEndPosition(row(alignSeg, 0), (*it2).i1);
+					setClippedEndPosition(row(alignSeg, 1), (*it2).i2);
+
+					seedScore += globalAlignment(alignSeg,scoreMatrix,NeedlemanWunsch());//needlemanWunsch(alignSeg,scoreMatrix);
+			
+					unsigned int j;
+					bool gap;
+					if (row(alignSeg,1).data_arr[0] == 0){
+						j=1;
+						gap=false;
+					} else {
+						j=0;
+						gap=true;
+					}
+					while (j < length(row(alignSeg,1).data_arr)){
+						if (gap){
+							insertGaps(row(aligned,1),position2,row(alignSeg,1).data_arr[j]);
+					
+							gap = false;
+							position2 += row(alignSeg,1).data_arr[j];
+						} else {
+							gap = true;
+							position2 += row(alignSeg,1).data_arr[j];							
+						}
+						++j;
+					}
+					if (row(alignSeg,0).data_arr[0] == 0){
+						j=1;
+						gap=false;
+					} else {
+						j=0;
+						gap=true;
+					}
+					 while (j < length(row(alignSeg,0).data_arr)){
+						if (gap){
+							insertGaps(row(aligned,0),position1,row(alignSeg,0).data_arr[j]);
+							gap = false;
+							position1+= row(alignSeg,0).data_arr[j];
+						} else {
+							gap = true;
+							position1+= row(alignSeg,0).data_arr[j];							
+						}
+						++j;
+					}
+					TPosition tmp1, tmp2;
+					tmp1 = position1;
+					tmp2 = position2;
+					if (tmp1 > tmp2){
+						insertGaps(row(aligned,1),position2,tmp1-tmp2);
+						position2 += tmp1-tmp2;
+					} else 
+						if (tmp2 > tmp1){
+							insertGaps(row(aligned,0),position1,tmp2-tmp1);
+							position1 += tmp2-tmp1;
+						}
+				}
+				position1+= it2->i3;
+				position2 += it2->i3;
+				for (int i =0; i<it2->i3;++i)
+					seedScore += score(scoreMatrix, it2->i1+i, it2->i2+i, query, database);
+
+				++it1;
+				++it2;
+		}
+	}
+	return seedScore;
+}
+
+
+/**
+.Function.scoreSeed:
+..summary: Calculates the score of a seed. 
+..cat:Seed Handling
+..signature:scoreSeed(seed, query, database, scoreMatrix)
+..param.seed: A seed.
+...type:Spec.ChainedSeed
+..param.query:The Query sequence.
+...type:Class.String
+..param.database:The database sequence.
+...type:Class.String
+..param.scoreMatrix:The scoring sheme.
+...type:Spec.Simple Score
+..returns: Score of the seed.
+..remarks: Score has not the same value as the resulting alignment. Gaps between diagonals matches are scored as full length gaps.
+..include:seqan/seeds.h
+*/
+template<typename TPosition, typename TText, typename TScore>
+TScore
+scoreSeed(Seed<TPosition, ChainedSeed> &seed, String<TText> &query, String<TText> &database, Score<TScore, Simple> &matrix){
+	SEQAN_CHECKPOINT
+	typedef typename std::list<Triple< TPosition, TPosition, TPosition> >::iterator TIterator;
+	int tmpScore =0;
+	TIterator it = _getDiagSet(seed).begin();
+	for (int i = 0; i < it->i3; ++i){
+		tmpScore+=score(matrix, it->i1+i, it->i2+i, query, database);
+	}
+
+	if (_getDiagSet(seed).size()>=2){
+		TIterator it_end = _getDiagSet(seed).end();
+		for (TIterator it2 = ++_getDiagSet(seed).begin(); it2!= it_end; it2++){
+			for (int i = 0; i < it2->i3; ++i){
+				tmpScore+=score(matrix, it2->i1+i, it2->i2+i, query, database);
+			}
+			tmpScore += scoreGap(matrix)*(it2->i2-(it->i2+it->i3)+it2->i1-(it->i1+it->i3));
+			++it;
+		}
+	}
+	return tmpScore;
+}
+
+
+} //namespace Seqan
+
+#endif //#ifndef SEQAN_HEADER_
diff --git a/src/SeqAn-1.3/seqan/seeds/seeds_generated_forwards.h b/src/SeqAn-1.3/seqan/seeds/seeds_generated_forwards.h
new file mode 100644
index 0000000..363c3ef
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds/seeds_generated_forwards.h
@@ -0,0 +1,860 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SEEDS_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_SEEDS_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// ChainMerge_
+
+struct ChainMerge_;       	// "projects/library/seqan/seeds/seed_base.h"(69)
+
+//____________________________________________________________________________
+// ExtendSeedGappedXDrop_
+
+struct ExtendSeedGappedXDrop_;       	// "projects/library/seqan/seeds/seed_base.h"(81)
+
+//____________________________________________________________________________
+// FreeInt_
+
+struct FreeInt_;       	// "projects/library/seqan/seeds/memoryManager_int.h"(58)
+
+//____________________________________________________________________________
+// FreePointer_
+
+struct FreePointer_;       	// "projects/library/seqan/seeds/memoryManager_base.h"(55)
+
+//____________________________________________________________________________
+// MemoryManager
+
+template <typename TValue, typename TSPec, typename TFree> class MemoryManager;       	// "projects/library/seqan/seeds/memoryManager_base.h"(59)
+
+//____________________________________________________________________________
+// PropertyMap
+
+template <typename TValue, typename TSPec> class PropertyMap;       	// "projects/library/seqan/seeds/propertyMap.h"(54)
+
+//____________________________________________________________________________
+// Seed
+
+template <typename TPosition , typename TSpecSeed > class Seed;       	// "projects/library/seqan/seeds/seed_base.h"(119)
+
+//____________________________________________________________________________
+// SeedIterator
+
+struct SeedIterator;       	// "projects/library/seqan/seeds/seedSet_base.h"(40)
+
+//____________________________________________________________________________
+// SeedMulti_
+
+struct SeedMulti_;       	// "projects/library/seqan/seeds/seed_multi.h"(39)
+
+//____________________________________________________________________________
+// SeedSet
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec > class SeedSet;       	// "projects/library/seqan/seeds/seedSet_base.h"(114)
+
+//____________________________________________________________________________
+// SeedSimple_
+
+struct SeedSimple_;       	// "projects/library/seqan/seeds/seed_base.h"(41)
+
+//____________________________________________________________________________
+// SortProcess
+
+template <class TTriple> struct SortProcess;       	// "projects/library/seqan/seeds/seedSet_base.h"(1356)
+
+//____________________________________________________________________________
+// _extendSeed_Match
+
+struct _extendSeed_Match;       	// "projects/library/seqan/seeds/seed_base.h"(74)
+
+//____________________________________________________________________________
+// _extendSeed_UnGappedXDrop
+
+struct _extendSeed_UnGappedXDrop;       	// "projects/library/seqan/seeds/seed_base.h"(78)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// ChainedSeed
+
+typedef Tag<SeedMulti_> const ChainedSeed;       	// "projects/library/seqan/seeds/seed_multi.h"(40)
+
+//____________________________________________________________________________
+// FreeMemoryInt
+
+typedef Tag<FreeInt_> const FreeMemoryInt;       	// "projects/library/seqan/seeds/memoryManager_int.h"(59)
+
+//____________________________________________________________________________
+// FreeMemoryPointer
+
+typedef Tag<FreePointer_> const FreeMemoryPointer;       	// "projects/library/seqan/seeds/memoryManager_base.h"(56)
+
+//____________________________________________________________________________
+// GappedXDrop
+
+typedef Tag<ExtendSeedGappedXDrop_> const GappedXDrop;       	// "projects/library/seqan/seeds/seed_base.h"(82)
+
+//____________________________________________________________________________
+// MatchExtend
+
+typedef Tag<_extendSeed_Match> const MatchExtend;       	// "projects/library/seqan/seeds/seed_base.h"(75)
+
+//____________________________________________________________________________
+// Merge
+
+typedef Tag<ChainMerge_> const Merge;       	// "projects/library/seqan/seeds/seed_base.h"(70)
+
+//____________________________________________________________________________
+// SimpleSeed
+
+typedef Tag<SeedSimple_> const SimpleSeed;       	// "projects/library/seqan/seeds/seed_base.h"(42)
+
+//____________________________________________________________________________
+// UngappedXDrop
+
+typedef Tag<_extendSeed_UnGappedXDrop> const UngappedXDrop;       	// "projects/library/seqan/seeds/seed_base.h"(79)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _bandedGotoh
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed> TScoreValue _bandedGotoh(Matrix<TScoreValue, DIMENSION> & matrix_diag, Matrix<TScoreValue, DIMENSION> & matrix_vert, Matrix<TScoreValue, DIMENSION> & matrix_hori, Seed<TValue, TSpecSeed> const &seed, TValue2 k, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_, String<TScoreValue> & init_diag, String<TScoreValue> & init_vert, S [...]
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TSpecSeed> TScoreValue _bandedGotoh(Matrix<TScoreValue, DIMENSION> & diag_matrix_, Matrix<TScoreValue, DIMENSION> & vert_matrix_, Matrix<TScoreValue, DIMENSION> & hori_matrix_, Seed<TValue, TSpecSeed> const &seed, TValue k, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/seeds/banded_align.h"(302)
+
+//____________________________________________________________________________
+// _bandedGotohRectangleFirst
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed> void _bandedGotohRectangleFirst(Matrix<TScoreValue, DIMENSION> & matrix_diag, Matrix<TScoreValue, DIMENSION> & matrix_vert, Matrix<TScoreValue, DIMENSION> & matrix_hori, Seed<TValue, TSpecSeed> const &seed, TValue2 k, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_, String<TScoreValue> & init_diag, String<TScoreValue> & init_ [...]
+
+//____________________________________________________________________________
+// _bandedGotohTrace
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION, typename TValue> void _bandedGotohTrace(Align<TTargetSource, TTargetSpec> & target_, Matrix<TScoreValue, DIMENSION> & diag_matrix_, Matrix<TScoreValue, DIMENSION> & vert_matrix_, Matrix<TScoreValue, DIMENSION> & hori_matrix_, TValue position_);       	// "projects/library/seqan/seeds/banded_align.h"(558)
+
+//____________________________________________________________________________
+// _bandedGotohTrace2
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION> typename Size<Matrix<TScoreValue, DIMENSION> >::Type _bandedGotohTrace2(Align<TTargetSource, TTargetSpec> & target_, Matrix<TScoreValue, DIMENSION> & diag_matrix_, Matrix<TScoreValue, DIMENSION> & vert_matrix_, Matrix<TScoreValue, DIMENSION> & hori_matrix_, Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_ );       	// "projects/library/seqan/seeds/banded_chain_align_affine.h"(399)
+
+//____________________________________________________________________________
+// _bandedNeedlemanWunsch
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TSpecSeed> TScoreValue _bandedNeedlemanWunsch(Matrix<TScoreValue, DIMENSION> & matrix_, Seed<TValue, TSpecSeed> const &seed, TValue k, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/seeds/banded_align.h"(50)
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed> TScoreValue _bandedNeedlemanWunsch(Matrix<TScoreValue, DIMENSION> & matrix_, Seed<TValue, TSpecSeed> const &seed, TValue2 k, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_, String<TScoreValue> init);       	// "projects/library/seqan/seeds/banded_chain_align.h"(202)
+
+//____________________________________________________________________________
+// _bandedNeedlemanWunschRectangleFirst
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed> void _bandedNeedlemanWunschRectangleFirst(Matrix<TScoreValue, DIMENSION> & matrix_, Seed<TValue, TSpecSeed> const &seed, TValue2 k, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_, String<TScoreValue> init);       	// "projects/library/seqan/seeds/banded_chain_align.h"(1179)
+
+//____________________________________________________________________________
+// _bandedNeedlemanWunschTrace
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION> void _bandedNeedlemanWunschTrace(Align<TTargetSource, TTargetSpec> & target_, Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/seeds/banded_align.h"(217)
+
+//____________________________________________________________________________
+// _bandedNeedlemanWunschTrace2
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION> typename Size<Matrix<TScoreValue, DIMENSION> >::Type _bandedNeedlemanWunschTrace2(Align<TTargetSource, TTargetSpec> & target_, Matrix<TScoreValue, DIMENSION> & matrix, Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/seeds/banded_chain_align.h"(369)
+
+//____________________________________________________________________________
+// _calculateBandedSeed
+
+template <typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix> void _calculateBandedSeed(TSeed const &seed, TDiff k, TMatrix &matrix_, TString *p_seq1, TString *p_seq2, TScoreString &score_str, TValue &score_length, ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector, TScoreMatrix const &scoreMatrix);       	// "projects/library/seqan/seeds/banded_chain_align.h"(615)
+
+//____________________________________________________________________________
+// _calculateBandedSeedGotoh
+
+template <typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix> void _calculateBandedSeedGotoh(TSeed const &seed, TDiff k, TMatrix &matrix_diag, TMatrix &matrix_vert, TMatrix &matrix_hori, TString *p_seq1, TString *p_seq2, TScoreString &score_str_diag, TScoreString &score_str_vert, TScoreString &score_str_hori, TValue &score_length, ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alig [...]
+
+//____________________________________________________________________________
+// _calculateFirstRectangle
+
+template <typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix> void _calculateFirstRectangle(TSeed const &seed, TDiff k, TMatrix &matrix_, TString *p_seq1, TString *p_seq2, TScoreString &score_str, TValue &score_length, ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector, TScoreMatrix const &scoreMatrix);       	// "projects/library/seqan/seeds/banded_chain_align.h"(695)
+
+//____________________________________________________________________________
+// _calculateFirstRectangleGotoh
+
+template <typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix> void _calculateFirstRectangleGotoh(TSeed const &seed, TDiff k, TMatrix &matrix_diag, TMatrix &matrix_vert, TMatrix &matrix_hori, TString *p_seq1, TString *p_seq2, TScoreString &score_str_diag, TScoreString &score_str_vert, TScoreString &score_str_hori, TValue &score_length, ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > & [...]
+
+//____________________________________________________________________________
+// _calculateLastRectangle
+
+template <typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix> void _calculateLastRectangle(TSeed const &seed, TDiff k, TMatrix &matrix_, TString *p_seq1, TString *p_seq2, TScoreString &score_str, TValue &score_length, ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector, TScoreMatrix const &scoreMatrix);       	// "projects/library/seqan/seeds/banded_chain_align.h"(744)
+
+//____________________________________________________________________________
+// _calculateLastRectangleGotoh
+
+template <typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix> void _calculateLastRectangleGotoh(TSeed const &seed, TDiff k, TMatrix & matrix_diag, TMatrix & matrix_vert, TMatrix & matrix_hori, TString *p_seq1, TString *p_seq2, TScoreString & score_str_diag, TScoreString & score_str_vert, TScoreString & score_str_hori, TValue &score_length, ::std::vector< ::std::map<TValue,Pair<TValue, TAlign>  [...]
+
+//____________________________________________________________________________
+// _calculateRectangle
+
+template <typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix> void _calculateRectangle(TSeed const &seed, TSeed const &seed2, TDiff k_begin, TDiff k_end, TMatrix &matrix_, TString *p_seq1, TString *p_seq2, TScoreString &score_str, TValue &score_length, ::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &alignmentVector, TScoreMatrix const &scoreMatrix);       	// "projects/library/seqan [...]
+
+//____________________________________________________________________________
+// _calculateRectangleGotoh
+
+template <typename TSeed, typename TString, typename TDiff, typename TMatrix, typename TScoreString, typename TValue, typename TAlign, typename TScoreMatrix> void _calculateRectangleGotoh(TSeed const &seed, TSeed const &seed2, TDiff k_begin, TDiff k_end, TMatrix & matrix_diag, TMatrix & matrix_vert, TMatrix & matrix_hori, TString *p_seq1, TString *p_seq2, TScoreString &score_str_diag, TScoreString &score_str_vert, TScoreString &score_str_hori, TValue &score_length, ::std::vector< ::std:: [...]
+
+//____________________________________________________________________________
+// _calculateScoringValue
+
+template <typename TValue, typename TScore> inline TScore _calculateScoringValue(TValue qPos1, TValue dPos1, TValue qPos2, TValue dPos2, Score<TScore, Simple> const &matrix, Manhattan);       	// "projects/library/seqan/seeds/seedSet_score.h"(48)
+template <typename TValue, typename TScore> inline TScore _calculateScoringValue(TValue qPos1, TValue&, TValue qPos2, TValue &, Score<TScore, Simple> const &matrix, QueryDistance);       	// "projects/library/seqan/seeds/seedSet_score.h"(60)
+template <typename TValue, typename TScore> inline TScore _calculateScoringValue(TValue &, TValue dPos1, TValue &, TValue dPos2, Score<TScore, Simple> const &matrix, DatabaseDistance);       	// "projects/library/seqan/seeds/seedSet_score.h"(72)
+template <typename TValue, typename TSeed, typename TScore> inline TValue _calculateScoringValue(TSeed &, TValue &, TValue &, Score<TScore, Simple> &, NoGapCost);       	// "projects/library/seqan/seeds/seedSet_score.h"(83)
+template <typename TValue, typename TSeed, typename TScore> inline TValue _calculateScoringValue(TSeed const &seed, TValue qPos, TValue dPos, TValue &, TScore score, Manhattan);       	// "projects/library/seqan/seeds/seedSet_score.h"(96)
+template <typename TValue, typename TSeed, typename TScore> inline TValue _calculateScoringValue(TSeed const &seed, TValue qPos, TValue &, TValue &, TScore score, QueryDistance);       	// "projects/library/seqan/seeds/seedSet_score.h"(108)
+template <typename TValue, typename TSeed, typename TScore> inline TValue _calculateScoringValue(TSeed const &seed, TValue &, TValue dPos, TValue &, TScore score, DatabaseDistance);       	// "projects/library/seqan/seeds/seedSet_score.h"(120)
+template <typename TValue, typename TSeed, typename TScore> inline TValue _calculateScoringValue(TSeed &, TValue &, TValue &, TValue &, TScore &, NoGapCost);       	// "projects/library/seqan/seeds/seedSet_score.h"(132)
+template <typename TValue, typename TSeed> inline TValue _calculateScoringValue(TSeed const &seed, TValue qPos, TValue dPos, TValue &, Manhattan);       	// "projects/library/seqan/seeds/seedSet_base.h"(54)
+template <typename TValue, typename TSeed> inline TValue _calculateScoringValue(TSeed const &seed, TValue qPos, TValue &, TValue &, QueryDistance);       	// "projects/library/seqan/seeds/seedSet_base.h"(60)
+template <typename TValue, typename TSeed> inline TValue _calculateScoringValue(TSeed const &seed, TValue &, TValue dPos, TValue &, DatabaseDistance);       	// "projects/library/seqan/seeds/seedSet_base.h"(66)
+template <typename TValue, typename TSeed> inline TValue _calculateScoringValue(TSeed &, TValue &, TValue &, TValue &, NoGapCost);       	// "projects/library/seqan/seeds/seedSet_base.h"(72)
+
+//____________________________________________________________________________
+// _chainToAlignmentGotoh
+
+template <typename TContainer, typename TValue, typename TScore, typename TAlign> TScore _chainToAlignmentGotoh(TContainer const &seedChain, TValue k, TAlign & whole_alignment, Score< TScore, Simple> const &scoreMatrix);       	// "projects/library/seqan/seeds/banded_chain_align_affine.h"(47)
+
+//____________________________________________________________________________
+// _chainToAlignmentNeedlemanWunsch
+
+template <typename TContainer, typename TValue, typename TScore, typename TAlign> TScore _chainToAlignmentNeedlemanWunsch(TContainer const &seedChain, TValue k, TAlign & whole_alignment, Score< TScore, Simple> const &scoreMatrix);       	// "projects/library/seqan/seeds/banded_chain_align.h"(96)
+
+//____________________________________________________________________________
+// _constructAlignment
+
+template <typename TValue, typename TAlign, typename TAlign2> void _constructAlignment(::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > >const &me, TAlign2 &wholeAlignment);       	// "projects/library/seqan/seeds/banded_chain_align.h"(157)
+
+//____________________________________________________________________________
+// _deleteAlignment
+
+template <typename TValue, typename TAlign, typename TSize> void _deleteAlignment(::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &me, TSize old_end, TSize new_end);       	// "projects/library/seqan/seeds/banded_chain_align.h"(574)
+
+//____________________________________________________________________________
+// _deleteEverything
+
+template <typename TValue, typename TSeedSpec, typename TQualityFactor, typename TGapCosts, typename TScore> void _deleteEverything(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, TScore> >, void> &deletionTarget, TValue currentPos);       	// "projects/library/seqan/seeds/seedSet_score.h"(1643)
+template <typename TValue, typename TSeedSpec, typename TQualityFactor, typename TGapCosts> void _deleteEverything(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, void> &deletionTarget, TValue currentPos);       	// "projects/library/seqan/seeds/seedSet_base.h"(1477)
+
+//____________________________________________________________________________
+// _extendSeed
+
+template <typename TValue, typename TText> void _extendSeed(Triple<TValue,TValue,TValue> &position, Segment<String<TText> const, InfixSegment> qSeg, Segment<String<TText> const, InfixSegment> dSeg);       	// "projects/library/seqan/seeds/seedSet_base.h"(1344)
+
+//____________________________________________________________________________
+// _extendSeedOneDirection
+
+template <typename TSeedSpec, typename TPosition, typename DatabaseInfix, typename QueryInfix, typename TScore, typename TSize> TScore _extendSeedOneDirection(Seed<TPosition, TSeedSpec > & seed, DatabaseInfix const & dataSeg, QueryInfix const & querySeg, TScore scoreDropOff, Score<TScore, Simple> const & scoreMatrix, TSize direction);       	// "projects/library/seqan/seeds/seed_base.h"(888)
+
+//____________________________________________________________________________
+// _findPrev
+
+template <typename TValue, typename TSpec, typename TFind> inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type _findPrev(Map<TValue, Skiplist<TSpec> > & me, TFind const & _find, SkiplistPath<TValue, TSpec> & path);       	// "projects/library/seqan/seeds/global_seed_chain.h"(45)
+template <typename TValue, typename TSpec, typename TFind> inline typename Iterator< Map<TValue, Skiplist<TSpec> > >::Type _findPrev(Map<TValue, Skiplist<TSpec> > & me, TFind const & _find);       	// "projects/library/seqan/seeds/global_seed_chain.h"(57)
+
+//____________________________________________________________________________
+// _findSeedsChain
+
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec> typename std::multimap<TValue, typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type >::iterator _findSeedsChain(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TValue qPos, TValue dPos, TValue length, typename ScoreType<TScoringSpec>::Type score, int gapDistance);       	// "projects/library/seqan/seeds/seedSet_score.h"(1681)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> typename std::multimap<TValue, typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type >::iterator _findSeedsChain(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qPos, TValue dPos, TValue length, int gapDistance);    [...]
+
+//____________________________________________________________________________
+// _findSeedsMerge
+
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec> typename std::multimap<TValue, typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> > >::Type >::iterator _findSeedsMerge(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TValue qPos, TValue dPos, TValue , typename ScoreType<TScoringSpec>::Type score, int gapDistance);       	// "projects/library/seqan/seeds/seedSet_score.h"(1733)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> typename std::multimap<TValue, typename Size<String<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> >::Value> > >::Type >::iterator _findSeedsMerge(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qPos, TValue dPos, TValue length_, int gapDistance);     [...]
+
+//____________________________________________________________________________
+// _gapFill
+
+template <typename TValue, typename TText> void _gapFill(TValue qlPos, TValue dlPos, TValue qrPos, TValue drPos, std::list<Triple<TValue, TValue, TValue> > &diagList, String<TText> const &query, String<TText> const &database, TValue q);       	// "projects/library/seqan/seeds/seedSet_base.h"(1377)
+
+//____________________________________________________________________________
+// _getDiagSet
+
+template <typename TPosition> inline const std::list<Triple<TPosition, TPosition, TPosition> >& _getDiagSet(Seed<TPosition,ChainedSeed> const & seed);       	// "projects/library/seqan/seeds/seed_multi.h"(204)
+template <typename TPosition> inline std::list<Triple<TPosition, TPosition, TPosition> >& _getDiagSet(Seed<TPosition,ChainedSeed> & seed);       	// "projects/library/seqan/seeds/seed_multi.h"(211)
+
+//____________________________________________________________________________
+// _getFirstDiag
+
+template <typename TPosition> Triple<TPosition, TPosition, TPosition>& _getFirstDiag(Seed<TPosition,ChainedSeed> & seed);       	// "projects/library/seqan/seeds/seed_multi.h"(239)
+template <typename TPosition> const Triple<TPosition, TPosition, TPosition>& _getFirstDiag(Seed<TPosition,ChainedSeed> const & seed);       	// "projects/library/seqan/seeds/seed_multi.h"(246)
+
+//____________________________________________________________________________
+// _getLastDiag
+
+template <typename TPosition> Triple<TPosition, TPosition, TPosition>& _getLastDiag(Seed<TPosition,ChainedSeed> & seed);       	// "projects/library/seqan/seeds/seed_multi.h"(253)
+template <typename TPosition> const Triple<TPosition, TPosition, TPosition>& _getLastDiag(Seed<TPosition,ChainedSeed> const & seed);       	// "projects/library/seqan/seeds/seed_multi.h"(260)
+
+//____________________________________________________________________________
+// _getPosition
+
+template <typename TValue, unsigned int SPACE, typename TFree> inline typename Size<String<TValue, Block<SPACE> > >::Type _getPosition(MemoryManager<TValue,Block<SPACE>, TFree > const &manager, const void* pointer);       	// "projects/library/seqan/seeds/memoryManager_base.h"(360)
+
+//____________________________________________________________________________
+// _gotoh2
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString> void _gotoh2(Matrix<TScoreValue, DIMENSION> & matrix_diag, Matrix<TScoreValue, DIMENSION> & matrix_vert, Matrix<TScoreValue, DIMENSION> & matrix_hori, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/seeds/banded_chain_align_affine.h"(1194)
+
+//____________________________________________________________________________
+// _gotohRectangle
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed> void _gotohRectangle(Matrix<TScoreValue, DIMENSION> & matrix_diag, Matrix<TScoreValue, DIMENSION> & matrix_vert, Matrix<TScoreValue, DIMENSION> & matrix_hori, Seed<TValue, TSpecSeed> const &seed1, Seed<TValue, TSpecSeed> const &seed2, TValue2 k_begin, TValue2 k_end, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_, String<TSco [...]
+
+//____________________________________________________________________________
+// _gotohTraceLastRectangle
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION> TScoreValue _gotohTraceLastRectangle(Align<TTargetSource, TTargetSpec> & target_, Matrix<TScoreValue, DIMENSION> & diag_matrix_, Matrix<TScoreValue, DIMENSION> & vert_matrix_, Matrix<TScoreValue, DIMENSION> & hori_matrix_, Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_);       	// "projects/library/seqan/seeds/banded_chain_align_affine.h"(470)
+
+//____________________________________________________________________________
+// _gotohTraceRectangle
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION, typename TValue, typename TMatrix> TValue _gotohTraceRectangle(Align<TTargetSource, TTargetSpec> & target_, Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > & diag_source, TMatrix & diag_matrix_, TMatrix & vert_matrix_, TMatrix & hori_matrix_, TValue width_stop, TValue height_stop);       	// "projects/library/seqan/seeds/banded_chain_align_affine.h"(1362)
+
+//____________________________________________________________________________
+// _mergeTwoSeeds
+
+template <typename TPosition> void _mergeTwoSeeds(Seed<TPosition, ChainedSeed> &firstSeed, TPosition qPos, TPosition dPos, TPosition length, Merge);       	// "projects/library/seqan/seeds/seed_multi.h"(278)
+template <typename TPosition> void _mergeTwoSeeds(Seed<TPosition, ChainedSeed> &firstSeed, Seed<TPosition, ChainedSeed> const &secondSeed, Merge);       	// "projects/library/seqan/seeds/seed_multi.h"(327)
+template <typename TValue, typename TSeedSpec> void _mergeTwoSeeds(Seed<TValue, TSeedSpec> &seed, TValue qPos, TValue dPos, TValue length, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_base.h"(1010)
+template <typename TValue> void _mergeTwoSeeds(Seed<TValue, SimpleSeed> &firstSeed, TValue qlPos, TValue dlPos, TValue qrPos, TValue drPos, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_base.h"(1030)
+template <typename TValue> void _mergeTwoSeeds(Seed<TValue, ChainedSeed> &firstSeed, TValue qPos, TValue dPos, TValue length, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_base.h"(1053)
+template <typename TValue, typename TText, typename TValue2> void _mergeTwoSeeds(Seed<TValue, ChainedSeed> &firstSeed, TValue qPos, TValue dPos, TValue length, String<TText> const &query, String<TText> const &database, Score<TValue2, Simple> const &scoreMatrix, Chaos);       	// "projects/library/seqan/seeds/seedSet_base.h"(1150)
+template <typename TValue, typename TText> void _mergeTwoSeeds(Seed<TValue, ChainedSeed> &firstSeed, TValue qPos, TValue dPos, TValue length, String<TText> const &query, String<TText> const &database, TValue q, Blat);       	// "projects/library/seqan/seeds/seedSet_base.h"(1296)
+template <typename TPosition, typename TSpecSeed> void _mergeTwoSeeds(Seed<TPosition, TSpecSeed> &firstSeed, Seed<TPosition, TSpecSeed> const &secondSeed, Merge);       	// "projects/library/seqan/seeds/seed_base.h"(569)
+template <typename TPosition, typename TSpecSeed> void _mergeTwoSeeds(Seed<TPosition, TSpecSeed> &firstSeed, TPosition q, TPosition d, TPosition l, Merge);       	// "projects/library/seqan/seeds/seed_base.h"(589)
+template <typename TPosition> void _mergeTwoSeeds(Seed<TPosition, SimpleSeed> &firstSeed, TPosition qlPos, TPosition dlPos, TPosition qrPos, TPosition drPos, Merge);       	// "projects/library/seqan/seeds/seed_base.h"(608)
+
+//____________________________________________________________________________
+// _mergeTwoSeedsScore
+
+template <typename TValue, typename TSeedSpec> void _mergeTwoSeedsScore(Seed<TValue, TSeedSpec> &seed, TValue qPos, TValue dPos, TValue length, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_score.h"(768)
+template <typename TValue> void _mergeTwoSeedsScore(Seed<TValue, SimpleSeed> &firstSeed, TValue qlPos, TValue dlPos, TValue qrPos, TValue drPos, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_score.h"(788)
+template <typename TValue, typename TScore, typename TText, typename TGapCost> TValue _mergeTwoSeedsScore(Seed<TValue, SimpleSeed> &firstSeed, TValue qPos, TValue dPos, TValue length, String<TText> const &query, String<TText> const &database, Score<TScore, Simple> const &scoreMatrix, TGapCost tag, Chaos);       	// "projects/library/seqan/seeds/seedSet_score.h"(952)
+template <typename TValue, typename TScore, typename TText, typename TGapCost> TValue _mergeTwoSeedsScore(Seed<TValue, ChainedSeed> &firstSeed, TValue qPos, TValue dPos, TValue length, String<TText> const &query, String<TText> const &database, Score<TScore, Simple> const &scoreMatrix, TGapCost tag, Chaos);       	// "projects/library/seqan/seeds/seedSet_score.h"(1014)
+template <typename TValue, typename TText, typename TScore, typename TGapCosts> TScore _mergeTwoSeedsScore(Seed<TValue, SimpleSeed> &firstSeed, TValue qPos, TValue dPos, TValue length, Score<TScore, Simple> const &scoreMatrix, String<TText> const &query, String<TText> const &database, TValue q, TGapCosts tag, Blat);       	// "projects/library/seqan/seeds/seedSet_score.h"(1261)
+template <typename TValue, typename TText, typename TScore, typename TGapCosts> TScore _mergeTwoSeedsScore(Seed<TValue, ChainedSeed> &firstSeed, TValue qPos, TValue dPos, TValue length, Score<TScore, Simple> const &scoreMatrix, String<TText> const &query, String<TText> const &database, TValue q, TGapCosts tag, Blat);       	// "projects/library/seqan/seeds/seedSet_score.h"(1321)
+template <typename TPosition, typename TPosition2, typename TPosition3, typename TGapCost> void _mergeTwoSeedsScore(Seed<TPosition, ChainedSeed> &firstSeed, TPosition3 &score1, TPosition qPos, TPosition dPos, TPosition length, TPosition3 score2, Score<TPosition2,Simple> const &scoreMatrix, TGapCost &, Merge);       	// "projects/library/seqan/seeds/seed_multi.h"(394)
+template <typename TPosition, typename TPosition2, typename TPosition3, typename TGapCost> void _mergeTwoSeedsScore(Seed<TPosition, ChainedSeed> &firstSeed, TPosition3 &score1, Seed<TPosition, ChainedSeed> const &secondSeed, TPosition3 score2, Score<TPosition2,Simple> const &scoreMatrix, TGapCost &, Merge);       	// "projects/library/seqan/seeds/seed_multi.h"(463)
+template <typename TPosition, typename TSpecSeed, typename TPosition2, typename TPosition3, typename TGapCost> void _mergeTwoSeedsScore(Seed<TPosition, TSpecSeed> &firstSeed, TPosition3 &score1, Seed<TPosition, TSpecSeed> const &secondSeed, TPosition3 score2, Score<TPosition2,Simple> const &scoreMatrix, TGapCost &, Merge);       	// "projects/library/seqan/seeds/seed_base.h"(639)
+template <typename TPosition, typename TPosition2, typename TSpecSeed, typename TPosition3, typename TGapCost> void _mergeTwoSeedsScore(Seed<TPosition, TSpecSeed> &firstSeed, TPosition3 &score1, TPosition q, TPosition d, TPosition l, TPosition3 score2, Score<TPosition2, Simple> const &scoreMatrix, TGapCost &, Merge);       	// "projects/library/seqan/seeds/seed_base.h"(666)
+template <typename TPosition, typename TPosition2, typename TPosition3, typename TGapCost> void _mergeTwoSeedsScore(Seed<TPosition, SimpleSeed> &firstSeed, TPosition3 &score1, TPosition qlPos, TPosition dlPos, TPosition qrPos, TPosition drPos, TPosition3 score2, Score<TPosition2,Simple> const &scoreMatrix, TGapCost &, Merge);       	// "projects/library/seqan/seeds/seed_base.h"(692)
+
+//____________________________________________________________________________
+// _needlemanWunschRectangle
+
+template <typename TScoreValue, unsigned DIMENSION, typename TString, typename TValue, typename TValue2, typename TSpecSeed> void _needlemanWunschRectangle(Matrix<TScoreValue, DIMENSION> & matrix_, Seed<TValue, TSpecSeed> const &seed1, Seed<TValue, TSpecSeed> const &seed2, TValue2 k_begin, TValue2 k_end, TString const & str1_, TString const & str2_, Score<TScoreValue, Simple> const & score_, String<TScoreValue> init);       	// "projects/library/seqan/seeds/banded_chain_align.h"(914)
+
+//____________________________________________________________________________
+// _needlemanWunschTraceLastRectangle
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION> int _needlemanWunschTraceLastRectangle(Align<TTargetSource, TTargetSpec> & target_, Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/seeds/banded_chain_align.h"(459)
+
+//____________________________________________________________________________
+// _needlemanWunschTraceRectangle
+
+template <typename TTargetSource, typename TTargetSpec, typename TScoreValue, unsigned DIMENSION, typename TValue, typename TMatrix> TValue _needlemanWunschTraceRectangle(Align<TTargetSource, TTargetSpec> & target_, Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_, Score<TScoreValue, Simple> const & score_, TMatrix matrix, TValue width_stop, TValue height_stop);       	// "projects/library/seqan/seeds/banded_chain_align.h"(1081)
+
+//____________________________________________________________________________
+// _qualityReached
+
+template <typename TSeed, typename TScore> inline bool _qualityReached(TSeed &, TScore score, TScore qualityValue, SeedScore);       	// "projects/library/seqan/seeds/seedSet_base.h"(89)
+template <typename TSeed, typename TScore> inline bool _qualityReached(TSeed const &seed, TScore , TScore qualityValue, SeedLength);       	// "projects/library/seqan/seeds/seedSet_base.h"(95)
+
+//____________________________________________________________________________
+// _raiseMemory
+
+template <typename TValue, unsigned int SPACE> void _raiseMemory(MemoryManager<TValue,Block<SPACE>, FreeMemoryInt > &manager, typename Size<String<TValue, Block<SPACE> > >::Type leng);       	// "projects/library/seqan/seeds/memoryManager_int.h"(273)
+template <typename TValue, unsigned int SPACE, typename TFree> void _raiseMemory(MemoryManager<TValue,Block<SPACE>, TFree > &manager, typename Size<String<TValue, Block<SPACE> > >::Type leng);       	// "projects/library/seqan/seeds/memoryManager_base.h"(280)
+
+//____________________________________________________________________________
+// _recDelete
+
+template <typename TAlign, typename TValue> void _recDelete(::std::vector< ::std::map<TValue,Pair<TValue, TAlign> > > &vec, TValue index, TValue position);       	// "projects/library/seqan/seeds/banded_chain_align.h"(545)
+
+//____________________________________________________________________________
+// _scoreMap
+
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec> inline PropertyMap<TValue, Block<BLOCK_SIZE<SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> >::Value> >* _scoreMap(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set);       	// "projects/library/seqan/seeds/seedSet_score.h"(340)
+
+//____________________________________________________________________________
+// _setExtendedSeedDimensions
+
+template <typename TPosition, typename TBound, typename TExtension, typename TSize> void _setExtendedSeedDimensions(Seed<TPosition, ChainedSeed> & seed, TBound lowerBound, TBound upperBound, TExtension extLengthQuery, TExtension extLengthDatabase, TSize direction);       	// "projects/library/seqan/seeds/seed_multi.h"(534)
+template <typename TPosition, typename TBound, typename TExtension, typename TSize> void _setExtendedSeedDimensions(Seed<TPosition, SimpleSeed> & seed, TBound lowerBound, TBound upperBound, TExtension extLengthQuery, TExtension extLengthDatabase, TSize direction);       	// "projects/library/seqan/seeds/seed_base.h"(857)
+
+//____________________________________________________________________________
+// addSeed
+
+template <typename TValue, typename TSpec, typename TScoringSpec, typename TPosition, typename TSize2, typename TScore, typename TSeedSpec> bool addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TPosition qPos, TPosition dPos, TSize2 length, TScore score, Single);       	// "projects/library/seqan/seeds/seedSet_score.h"(356)
+template <typename TValue, typename TSpec, typename TScoringSpec, typename TPosition, typename TSize, typename TSeedSpec> inline bool addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TPosition qPos, TPosition dPos, TSize length, Single);       	// "projects/library/seqan/seeds/seedSet_score.h"(385)
+template <typename TValue, typename TSpec, typename TScoringSpec, typename TPosition, typename TScore> bool addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, TPosition qBeginPos, TPosition dBeginPos, TPosition qEndPos, TPosition dEndPos, TScore score, Single);       	// "projects/library/seqan/seeds/seedSet_score.h"(400)
+template <typename TValue, typename TSpec, typename TScoringSpec, typename TScore> bool addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, Seed<TValue, SimpleSeed> const &seed, TScore score, Single);       	// "projects/library/seqan/seeds/seedSet_score.h"(426)
+template <typename TValue, typename TSpec, typename TScoringSpec, typename TScore> bool addSeed(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &set, Seed<TValue, ChainedSeed> const &seed, TScore score, Single);       	// "projects/library/seqan/seeds/seedSet_score.h"(453)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TPosition, typename TSize2, typename TScoringSpec> bool addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TPosition qPos, TPosition dPos, TSize2 length, typename ScoreType<TScoringSpec>::Type score, int gapDistance, Merge);       	// "projects/library/seqan/seeds/seedSet_score.h"(493)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TPosition, typename TSize, typename TScoringSpec> inline bool addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TPosition qPos, TPosition dPos, TSize length, int gapDistance, Merge);       	// "projects/library/seqan/seeds/seedSet_score.h"(525)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec> bool addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, Seed<TValue, TSeedSpec> const &seed, typename ScoreType<TScoringSpec>::Type score, int gapDistance, Merge);       	// "projects/library/seqan/seeds/seedSet_score.h"(537)
+template <typename TValue, typename TSpec, typename TScoringSpec> bool addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, TValue qlPos, TValue dlPos, TValue qrPos, TValue drPos, typename ScoreType<TScoringSpec>::Type score, int gapDistance, Merge);       	// "projects/library/seqan/seeds/seedSet_score.h"(569)
+template <typename TValue, typename TSpec, typename TScoringSpec, typename TSeedSpec> bool addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TValue qPos, TValue dPos, TValue length, typename ScoreType<TScoringSpec>::Type score, int gapDistance, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_score.h"(618)
+template <typename TValue, typename TSpec, typename TScoringSpec, typename TSeedSpec> inline bool addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TValue qPos, TValue dPos, TValue length, int gapDistance, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_score.h"(654)
+template <typename TValue, typename TSpec, typename TScoringSpec> bool addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, TValue qlPos, TValue dlPos, TValue qrPos, TValue drPos, typename ScoreType<TScoringSpec>::Type score, int gapDistance, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_score.h"(670)
+template <typename TValue, typename TSpec, typename TScoringSpec, typename TSeedSpec> bool addSeed(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, Seed<TValue, TSeedSpec> const &seed, typename ScoreType<TScoringSpec>::Type score, int gapDistance, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_score.h"(700)
+template <typename TValue, typename TSpec, typename TScoringSpec> bool addSeed(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &set, Seed<TValue, ChainedSeed> const &seed, typename ScoreType<TScoringSpec>::Type score, int gapDistance, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_score.h"(731)
+template <typename TValue, typename TText, typename TSpec, typename TPosition, typename TSize2, typename TScoringSpec, typename TSpecSeed> bool addSeed(SeedSet<TValue, TSpecSeed, TScoringSpec, TSpec> &set, TPosition qPos, TPosition dPos, TSize2 length, typename ScoreType<TScoringSpec>::Type score, String<TText> const &query, String<TText> const &database, int gapDistance, Chaos);       	// "projects/library/seqan/seeds/seedSet_score.h"(821)
+template <typename TValue, typename TText, typename TSpec, typename TPosition, typename TSize, typename TScoringSpec, typename TSpecSeed> inline bool addSeed(SeedSet<TValue, TSpecSeed, TScoringSpec, TSpec> &set, TPosition qPos, TPosition dPos, TSize length, String<TText> const &query, String<TText> const &database, int gapDistance, Chaos);       	// "projects/library/seqan/seeds/seedSet_score.h"(857)
+template <typename TValue, typename TText, typename TSpec, typename TScoringSpec> bool addSeed(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &set, Seed<TValue, ChainedSeed> const &seed, typename ScoreType<TScoringSpec>::Type score, String<TText> const &query, String<TText> const &database, int gapDistance, Chaos);       	// "projects/library/seqan/seeds/seedSet_score.h"(872)
+template <typename TValue, typename TText, typename TSpec, typename TScoringSpec> bool addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, Seed<TValue, SimpleSeed> const &seed, typename ScoreType<TScoringSpec>::Type score, String<TText> const &query, String<TText> const &database, int gapDistance, Chaos);       	// "projects/library/seqan/seeds/seedSet_score.h"(912)
+template <typename TValue, typename TText, typename TSpec, typename TScoringSpec, typename TSpecSeed> bool addSeed(SeedSet<TValue, TSpecSeed, TScoringSpec, TSpec> &set, TValue qPos, TValue dPos, TValue length, typename ScoreType<TScoringSpec>::Type score, String<TText> const &query, String<TText> const &database, int gapDistance, Blat);       	// "projects/library/seqan/seeds/seedSet_score.h"(1085)
+template <typename TValue, typename TText, typename TSpec, typename TScoringSpec, typename TSpecSeed> inline bool addSeed(SeedSet<TValue, TSpecSeed, TScoringSpec, TSpec> &set, TValue qPos, TValue dPos, TValue length, String<TText> const &query, String<TText> const &database, int gapDistance, Blat);       	// "projects/library/seqan/seeds/seedSet_score.h"(1129)
+template <typename TValue, typename TText, typename TSpec, typename TScoringSpec> bool addSeed(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &set, Seed<TValue, ChainedSeed> const &seed, typename ScoreType<TScoringSpec>::Type score, String<TText> const &query, String<TText> const &database, int gapDistance, Blat);       	// "projects/library/seqan/seeds/seedSet_score.h"(1144)
+template <typename TValue, typename TText, typename TSpec, typename TScoringSpec> bool addSeed(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &set, Seed<TValue, SimpleSeed> const &seed, typename ScoreType<TScoringSpec>::Type score, String<TText> const &query, String<TText> const &database, int gapDistance, Blat);       	// "projects/library/seqan/seeds/seedSet_score.h"(1202)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qPos, TValue dPos, TValue length, Single);       	// "projects/library/seqan/seeds/seedSet_base.h"(510)
+template <typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qBeginPos, TValue dBeginPos, TValue qEndPos, TValue dEndPos, Single);       	// "projects/library/seqan/seeds/seedSet_base.h"(530)
+template <typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, Seed<TValue, SimpleSeed> const &seed, Single);       	// "projects/library/seqan/seeds/seedSet_base.h"(548)
+template <typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, Seed<TValue, ChainedSeed> const &seed, Single);       	// "projects/library/seqan/seeds/seedSet_base.h"(567)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qPos, TValue dPos, TValue length_, int gapDistance, Merge);       	// "projects/library/seqan/seeds/seedSet_base.h"(785)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, Seed<TValue, TSeedSpec> const &seed, int gapDistance, Merge);       	// "projects/library/seqan/seeds/seedSet_base.h"(816)
+template <typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qlPos, TValue dlPos, TValue qrPos, TValue drPos, int gapDistance, Merge);       	// "projects/library/seqan/seeds/seedSet_base.h"(848)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qPos, TValue dPos, TValue length, int gapDistance, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_base.h"(889)
+template <typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, SimpleSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qlPos, TValue dlPos, TValue qrPos, TValue drPos, int gapDistance, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_base.h"(921)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, Seed<TValue, TSeedSpec> const &seed, int gapDistance, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_base.h"(947)
+template <typename TValue, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, Seed<TValue, ChainedSeed> const &seed, int gapDistance, SimpleChain);       	// "projects/library/seqan/seeds/seedSet_base.h"(974)
+template <typename TValue, typename TSeedSpec, typename TText, typename TValue2, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qPos, TValue dPos, TValue length, Score<TValue2, Simple> const &scoreMatrix, String<TText> const &query, String<TText> const &database, int gapDistance, Chaos);       	// "projects/library/seqan/seeds/seedSet_base.h"(1079)
+template <typename TValue, typename TValue2, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, Seed<TValue, ChainedSeed> const &seed, Score<TValue2, Simple> const &scoreMatrix, String<TText> const &query, String<TText> const &database, int gapDistance, Chaos);       	// "projects/library/seqan/seeds/seedSet_base.h"(1112)
+template <typename TValue, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TValue qPos, TValue dPos, TValue length, String<TText> const &query, String<TText> const &database, int gapDistance, Blat);       	// "projects/library/seqan/seeds/seedSet_base.h"(1206)
+template <typename TValue, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeed(SeedSet<TValue, ChainedSeed, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, Seed<TValue, ChainedSeed> const &seed, String<TText> const &query, String<TText> const &database, int gapDistance, Blat);       	// "projects/library/seqan/seeds/seedSet_base.h"(1246)
+
+//____________________________________________________________________________
+// addSeedSet
+
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec> bool addSeedSet(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> const &source, Single);       	// "projects/library/seqan/seeds/seedSet_score.h"(1567)
+template <typename TValue, typename TSeedSpec, typename TAlgoSpec, typename TSpec, typename TScoringSpec> bool addSeedSet(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> const &source, int gapDistance, TAlgoSpec tag);       	// "projects/library/seqan/seeds/seedSet_score.h"(1584)
+template <typename TValue, typename TSeedSpec, typename TText, typename TSpec, typename TScoringSpec, typename TAlgoSpec> bool addSeedSet(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> const &source, String<TText> const &query, String<TText> const &database, int gapDistance, TAlgoSpec tag);       	// "projects/library/seqan/seeds/seedSet_score.h"(1612)
+
+//____________________________________________________________________________
+// addSeeds
+
+template <typename TValue, typename TSeedSpec, typename TIterator, typename TIterator2, typename TAlgoSpec, typename TSpec, typename TScoringSpec> bool addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TIterator begin, TIterator end, TIterator2 scoreBegin, int gapDistance, TAlgoSpec tag);       	// "projects/library/seqan/seeds/seedSet_score.h"(1395)
+template <typename TValue, typename TSeedSpec, typename TIterator, typename TIterator2, typename TSpec, typename TScoringSpec> bool addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TIterator begin, TIterator end, TIterator2 scoreBegin, Single);       	// "projects/library/seqan/seeds/seedSet_score.h"(1422)
+template <typename TValue, typename TSeedSpec, typename TIterator, typename TIterator2, typename TText, typename TSpec, typename TScoringSpec> bool addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TIterator begin, TIterator end, TIterator2 scoreBegin, String<TText> const &query, String<TText> const &database, int gapDistance, Chaos);       	// "projects/library/seqan/seeds/seedSet_score.h"(1441)
+template <typename TValue, typename TSeedSpec, typename TIterator, typename TIterator2, typename TText, typename TSpec, typename TScoringSpec> bool addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TIterator begin, TIterator end, TIterator2 scoreBegin, String<TText> const &query, String<TText> const &database, int gapDistance, Blat);       	// "projects/library/seqan/seeds/seedSet_score.h"(1468)
+template <typename TValue, typename TSeedSpec, typename TContainer, typename TContainer2, typename TAlgoSpec, typename TSpec, typename TScoringSpec> bool addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TContainer const &source, TContainer2 const &scoreSource, int gapDistance, TAlgoSpec tag);       	// "projects/library/seqan/seeds/seedSet_score.h"(1491)
+template <typename TValue, typename TSeedSpec, typename TContainer, typename TContainer2, typename TSpec, typename TScoringSpec> bool addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TContainer const &source, TContainer2 &scoreSource, Single);       	// "projects/library/seqan/seeds/seedSet_score.h"(1517)
+template <typename TValue, typename TSeedSpec, typename TContainer, typename TContainer2, typename TText, typename TSpec, typename TScoringSpec, typename TAlgoSpec> bool addSeeds(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, TContainer const &source, TContainer2 const &scoreSource, String<TText> const &query, String<TText> const &database, int gapDistance, TAlgoSpec algoSpec);       	// "projects/library/seqan/seeds/seedSet_score.h"(1537)
+template <typename TValue, typename TSeedSpec, typename TIterator, typename TAlgoSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TIterator begin, TIterator end, int gapDistance, TAlgoSpec tag);       	// "projects/library/seqan/seeds/seedSet_base.h"(594)
+template <typename TValue, typename TSeedSpec, typename TIterator, typename TText, typename TValue2, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TIterator begin, TIterator end, Score<TValue2, Simple> const &scoreMatrix, String<TText> const &query, String<TText> const &database, int gapDistance, Chaos);       	// "projects/library/seqan/seeds/seedSet_base.h"(634)
+template <typename TValue, typename TSeedSpec, typename TIterator, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TIterator begin, TIterator end, String<TText> const &query, String<TText> const &database, int gapDistance, Blat);       	// "projects/library/seqan/seeds/seedSet_base.h"(660)
+template <typename TValue, typename TSeedSpec, typename TContainer, typename TAlgoSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TContainer &source, int gapDistance, TAlgoSpec tag);       	// "projects/library/seqan/seeds/seedSet_base.h"(683)
+template <typename TValue, typename TSeedSpec, typename TContainer, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TContainer const &source, Single);       	// "projects/library/seqan/seeds/seedSet_base.h"(707)
+template <typename TValue, typename TSeedSpec, typename TContainer, typename TText, typename TValue2, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TContainer const &source, Score<TValue2, Simple> const &scoreMatrix, String<TText> const &query, String<TText> const &database, int gapDistance, Chaos);       	// "projects/library/seqan/seeds/seedSet_base.h"(727)
+template <typename TValue, typename TSeedSpec, typename TContainer, typename TText, typename TSpec, typename TQualityFactor, typename TGapCosts> bool addSeeds(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set, TContainer const &source, String<TText> const &query, String<TText> const &database, int gapDistance, Blat);       	// "projects/library/seqan/seeds/seedSet_base.h"(754)
+
+//____________________________________________________________________________
+// addSeedsIt
+
+template <typename TSeedSet, typename TIterator> bool addSeedsIt(TSeedSet &set, TIterator begin, TIterator end, Single);       	// "projects/library/seqan/seeds/seedSet_base.h"(616)
+
+//____________________________________________________________________________
+// append
+
+template <typename TValue, typename TSeedSpec, typename TContainer1, typename TContainer2, typename TSpec, typename TScoringSpec> void append(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, TContainer1 &seedSource, TContainer2 &scoreSource);       	// "projects/library/seqan/seeds/seedSet_score.h"(264)
+template <typename TValue, typename TSeedSpec, typename TContainer2, typename TSpecScoring, typename TSpec> void append(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &target, TContainer2 &source);       	// "projects/library/seqan/seeds/seedSet_base.h"(282)
+
+//____________________________________________________________________________
+// appendDiag
+
+template <typename TPosition> void appendDiag(Seed<TPosition,ChainedSeed> & seed, Triple<TPosition, TPosition, TPosition> diag);       	// "projects/library/seqan/seeds/seed_multi.h"(232)
+
+//____________________________________________________________________________
+// appendValue
+
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec, typename TValue2> void appendValue(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &target, Seed<TValue, TSeedSpec> &seed, TValue2 score);       	// "projects/library/seqan/seeds/seedSet_score.h"(282)
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline void appendValue(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &target, Seed<TValue, TSeedSpec> &seed);       	// "projects/library/seqan/seeds/seedSet_base.h"(294)
+
+//____________________________________________________________________________
+// assign
+
+template <typename TValue, unsigned int SPACE, typename TSource> inline void assign( MemoryManager<TValue, Block<SPACE>, FreeMemoryInt>& target, TSource const& source);       	// "projects/library/seqan/seeds/memoryManager_int.h"(181)
+template <typename TValue, unsigned int SPACE, typename TSource> inline void assign( PropertyMap<TValue, Block<SPACE> >& target, TSource const& source);       	// "projects/library/seqan/seeds/propertyMap.h"(138)
+template <typename TValue, unsigned int SPACE, typename TFree, typename TSource> inline void assign( MemoryManager<TValue, Block<SPACE>, TFree>& target, TSource const& source);       	// "projects/library/seqan/seeds/memoryManager_base.h"(191)
+
+//____________________________________________________________________________
+// assignValue
+
+template <typename TValue, unsigned int SPACE, typename TPosition> void assignValue(MemoryManager<TValue,Block<SPACE>, FreeMemoryInt > &manager, TPosition pos, TValue value);       	// "projects/library/seqan/seeds/memoryManager_int.h"(329)
+template <typename TValue, unsigned int SPACE, typename TFree, typename TPosition> void assignValue(MemoryManager<TValue,Block<SPACE>, TFree > &manager, TPosition pos, TValue value);       	// "projects/library/seqan/seeds/memoryManager_base.h"(377)
+
+//____________________________________________________________________________
+// bandedAlignment
+
+template <typename TSource, typename TSpec, typename TScoreValue, typename TValue, typename TSpecSeed> TScoreValue bandedAlignment(Align<TSource, TSpec> & align_, Seed<TValue, TSpecSeed> const & seed, TValue k, Score<TScoreValue, Simple> const & score_, NeedlemanWunsch);       	// "projects/library/seqan/seeds/banded_align.h"(631)
+template <typename TSource, typename TSpec, typename TScoreValue, typename TValue, typename TSpecSeed> TScoreValue bandedAlignment(Align<TSource, TSpec> & align_, Seed<TValue, TSpecSeed> const & seed, TValue k, Score<TScoreValue, Simple> const & score_, Gotoh);       	// "projects/library/seqan/seeds/banded_align.h"(653)
+template <typename TSource, typename TSpec, typename TScoreValue, typename TValue, typename TSpecSeed> TScoreValue bandedAlignment(Align<TSource, TSpec> & align_, Seed<TValue, TSpecSeed> const & seed, TValue k, Score<TScoreValue, Simple> const & score_);       	// "projects/library/seqan/seeds/banded_align.h"(693)
+
+//____________________________________________________________________________
+// bandedChainAlignment
+
+template <typename TContainer, typename TValue, typename TScore, typename TAlign> TScore bandedChainAlignment(TContainer const &seedChain, TValue k, TAlign &whole_alignment, Score< TScore, Simple> const &scoreMatrix);       	// "projects/library/seqan/seeds/banded_chain_align.h"(61)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec>, Standard >::Type begin(SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> &set);       	// "projects/library/seqan/seeds/seedSet_base.h"(303)
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const, Standard>::Type begin(SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const &set);       	// "projects/library/seqan/seeds/seedSet_base.h"(322)
+
+//____________________________________________________________________________
+// capacity
+
+template <typename TValue, unsigned int SPACE> inline typename Size<String<TValue, Block<SPACE> > >::Type capacity(MemoryManager<TValue, Block<SPACE>, FreeMemoryInt > const & me);       	// "projects/library/seqan/seeds/memoryManager_int.h"(260)
+template <typename TValue, unsigned int SPACE> inline typename Size<String<TValue, Block<SPACE> > >::Type capacity(PropertyMap<TValue, Block<SPACE> > const & me);       	// "projects/library/seqan/seeds/propertyMap.h"(216)
+template <typename TValue, unsigned int SPACE, typename TFree> inline typename Size<String<TValue, Block<SPACE> > >::Type capacity(MemoryManager<TValue, Block<SPACE>, TFree > const & me);       	// "projects/library/seqan/seeds/memoryManager_base.h"(267)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec> void clear(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set);       	// "projects/library/seqan/seeds/seedSet_score.h"(312)
+template <typename TValue, unsigned int SPACE> inline void clear(MemoryManager<TValue, Block<SPACE>, FreeMemoryInt >& me);       	// "projects/library/seqan/seeds/memoryManager_int.h"(228)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TQualityFactor, typename TGapCosts> void clear(SeedSet<TValue, TSeedSpec, const Tag<Scoring_Scheme<TQualityFactor, TGapCosts, void> >, TSpec> &set);       	// "projects/library/seqan/seeds/seedSet_base.h"(355)
+template <typename TValue, unsigned int SPACE> inline void clear(PropertyMap<TValue, Block<SPACE> >& me);       	// "projects/library/seqan/seeds/propertyMap.h"(185)
+template <typename TValue, unsigned int SPACE, typename TFree> inline void clear(MemoryManager<TValue, Block<SPACE>, TFree >& me);       	// "projects/library/seqan/seeds/memoryManager_base.h"(235)
+
+//____________________________________________________________________________
+// dimension
+
+template <typename TPosition, typename TSpec > inline typename Size< Seed< TPosition, TSpec > >::Type dimension( Seed< TPosition, TSpec > & );       	// "projects/library/seqan/seeds/seed_base.h"(321)
+
+//____________________________________________________________________________
+// end
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline typename Iterator<SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec>, Standard >::Type end(SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> &set);       	// "projects/library/seqan/seeds/seedSet_base.h"(312)
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline typename Iterator<SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> const, Standard>::Type end(SeedSet<TValue,TSeedSpec, TSpecScoring, TSpec> const &set);       	// "projects/library/seqan/seeds/seedSet_base.h"(331)
+
+//____________________________________________________________________________
+// endDiagonal
+
+template <typename TPosition> inline TPosition endDiagonal(Seed<TPosition, ChainedSeed> const &seed);       	// "projects/library/seqan/seeds/seed_multi.h"(101)
+template <typename TPosition, typename TSpecSeed> inline TPosition endDiagonal(Seed<TPosition, TSpecSeed> const &me);       	// "projects/library/seqan/seeds/seed_base.h"(218)
+
+//____________________________________________________________________________
+// extendSeed
+
+template <typename TPosition, typename TSpecSeed, typename TQuery, typename TDatabase, typename TDirection> void extendSeed(Seed<TPosition, TSpecSeed> &seed, TQuery const &query, TDatabase const &database, TDirection direction, MatchExtend);       	// "projects/library/seqan/seeds/seed_base.h"(752)
+template <typename TPosition, typename TSpecSeed, typename TQuery, typename TDatabase, typename TScore, typename TDirection> void extendSeed(Seed<TPosition,TSpecSeed> &seed, TScore scoreDropOff, Score<TScore, Simple> const &scoreMatrix, TQuery const &query, TDatabase const &database, TDirection direction, UngappedXDrop);       	// "projects/library/seqan/seeds/seed_base.h"(793)
+template <typename TSeedSpec, typename TPosition, typename TQuery, typename TDatabase, typename TScore, typename TSize> void extendSeed(Seed<TPosition, TSeedSpec> &seed, TScore scoreDropOff, Score<TScore, Simple> const &scoreMatrix, TQuery const &query, TDatabase const &database, TSize direction, GappedXDrop);       	// "projects/library/seqan/seeds/seed_base.h"(1065)
+
+//____________________________________________________________________________
+// extendSeedScore
+
+template <typename TValue, typename TSeedSpec, typename TText, typename TValue2, typename TValue3, typename TDirection> void extendSeedScore(Seed<TValue, TSeedSpec> &seed, TValue3 &currentScore, Score<TValue2, Simple> const &matrix, String<TText> const &query, String<TText> const &database, TDirection direction, MatchExtend);       	// "projects/library/seqan/seeds/seedSet_score.h"(1990)
+template <typename TValue, typename TSeedSpec, typename TText, typename TScore, typename TDirection> void extendSeedScore(Seed<TValue,TSeedSpec> &seed, TScore &currentScore, TScore scoreDropOff, Score<TScore, Simple> const &scoreMatrix, String<TText> const &query, String<TText> const &database, TDirection direction, UngappedXDrop);       	// "projects/library/seqan/seeds/seedSet_score.h"(2037)
+template <typename TSeedSpec, typename TPosition, typename TQuery, typename TDatabase, typename TScore, typename TSize> void extendSeedScore(Seed<TPosition, TSeedSpec> &seed, TScore &currentScore, TScore scoreDropOff, Score<TScore, Simple> const &scoreMatrix, TQuery const &query, TDatabase const &database, TSize direction, GappedXDrop);       	// "projects/library/seqan/seeds/seedSet_score.h"(2112)
+
+//____________________________________________________________________________
+// extendSeeds
+
+template <typename TContainer, typename TQuery, typename TDatabase, typename TDirection> void extendSeeds(TContainer &seedSet, String<TQuery> &query, String<TDatabase> &database, TDirection direction, MatchExtend);       	// "projects/library/seqan/seeds/seedSet_base.h"(1631)
+template <typename TIterator, typename TQuery, typename TDatabase, typename TDirection> void extendSeeds(TIterator begin, TIterator end, String<TQuery> &query, String<TDatabase> &database, TDirection direction, MatchExtend);       	// "projects/library/seqan/seeds/seedSet_base.h"(1647)
+template <typename TContainer, typename TQuery, typename TDatabase, typename TextendSeedSpec, typename TValue, typename TValue2, typename TDirection> void extendSeeds(TContainer &seedSet, TValue scoreDropOff, Score<TValue2, Simple> const &scoreMatrix, String<TQuery> const &query, String<TDatabase> const &database, TDirection direction, TextendSeedSpec tag);       	// "projects/library/seqan/seeds/seedSet_base.h"(1662)
+template <typename TIterator, typename TextendSeedSpec, typename TValue, typename TQuery, typename TDatabase, typename TDirection> void extendSeeds(TIterator begin, TIterator end, TValue scoreDropOff, Score<TValue, Simple> const &scoreMatrix, String<TQuery> const &query, String<TDatabase> const &database, TDirection direction, TextendSeedSpec tag);       	// "projects/library/seqan/seeds/seedSet_base.h"(1681)
+
+//____________________________________________________________________________
+// extendSeedsScore
+
+template <typename TContainer, typename TContainer2, typename TText, typename TValue, typename TDirection> void extendSeedsScore(TContainer &seedSet, TContainer2 &scores, Score<TValue, Simple> const &matrix, String<TText> const &query, String<TText> const &database, TDirection direction, MatchExtend);       	// "projects/library/seqan/seeds/seedSet_score.h"(1851)
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TText, typename TScoringSpec, typename TDirection> void extendSeedsScore(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &seedSet, String<TText> const &query, String<TText> const &database, TDirection direction, MatchExtend);       	// "projects/library/seqan/seeds/seedSet_score.h"(1872)
+template <typename TIterator, typename TIterator2, typename TText, typename TValue, typename TDirection> void extendSeedsScore(TIterator begin, TIterator end, TIterator2 itScore, Score<TValue, Simple> const &matrix, String<TText> const &query, String<TText> const &database, TDirection direction, MatchExtend);       	// "projects/library/seqan/seeds/seedSet_score.h"(1892)
+template <typename TContainer, typename TText, typename TContainer2, typename TextendSeedSpec, typename TValue, typename TValue2, typename TDirection> void extendSeedsScore(TContainer &seedSet, TContainer2 &scores, TValue scoreDropOff, Score<TValue2, Simple> const &scoreMatrix, String<TText> const &query, String<TText> const &database, TDirection direction, TextendSeedSpec tag);       	// "projects/library/seqan/seeds/seedSet_score.h"(1909)
+template <typename TText, typename TExtendSeedSpec, typename TValue, typename TSpec, typename TScoringSpec, typename TDirection> void extendSeedsScore(SeedSet<TValue, SimpleSeed, TScoringSpec, TSpec> &seedSet, TValue scoreDropOff, String<TText> const &query, String<TText> const &database, TDirection direction, TExtendSeedSpec tag);       	// "projects/library/seqan/seeds/seedSet_score.h"(1930)
+template <typename TText, typename TExtendSeedSpec, typename TValue, typename TSpec, typename TScoringSpec, typename TDirection> void extendSeedsScore(SeedSet<TValue, ChainedSeed, TScoringSpec, TSpec> &seedSet, TValue scoreDropOff, String<TText> const &query, String<TText> const &database, TDirection direction, TExtendSeedSpec tag);       	// "projects/library/seqan/seeds/seedSet_score.h"(1949)
+template <typename TIterator, typename TIterator2, typename TExtendSeedSpec, typename TValue, typename TText, typename TDirection> void extendSeedsScore(TIterator begin, TIterator end, TIterator2 itScore, TValue scoreDropOff, Score<TValue, Simple> const &scoreMatrix, String<TText> const &query, String<TText> const &database, TDirection direction, TExtendSeedSpec tag);       	// "projects/library/seqan/seeds/seedSet_score.h"(1971)
+
+//____________________________________________________________________________
+// getAlignment
+
+template <typename TPosition, typename TText, typename TPosition2> int getAlignment(Seed<TPosition,ChainedSeed> &seed, Align<String<TText>, ArrayGaps> &aligned, String<TText> &query, String<TText> &database, Score<TPosition2, Simple> &scoreMatrix);       	// "projects/library/seqan/seeds/seed_multi.h"(588)
+
+//____________________________________________________________________________
+// getScoreMatrix
+
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec> inline Score<int,Simple> getScoreMatrix(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set);       	// "projects/library/seqan/seeds/seedSet_score.h"(304)
+
+//____________________________________________________________________________
+// globalChaining
+
+template <typename TValue, typename TSeedSpec, typename TScoreSpec, typename TSpec, typename TTargetContainer> typename ScoreType<TScoreSpec>::Type globalChaining(SeedSet<TValue, TSeedSpec, TScoreSpec, TSpec> const &source, TTargetContainer &result);       	// "projects/library/seqan/seeds/global_seed_chain.h"(104)
+template <typename TValue, typename TValue2, typename TSeedSpec, typename TScoreSpec, typename TSpec, typename TTargetContainer, typename TScore> TScore globalChaining(SeedSet<TValue, TSeedSpec, TScoreSpec, TSpec> const &source, TTargetContainer &result, TScore gapCost, TValue2 xLength, TValue2 yLength);       	// "projects/library/seqan/seeds/global_seed_chain.h"(178)
+template <typename TValue, typename TSeedSpec, typename TScoreSpec, typename TSpec, typename TTargetContainer, typename TScore> TScore globalChaining(SeedSet<TValue, TSeedSpec, TScoreSpec, TSpec> const &source, TTargetContainer &result, TScore gapCost);       	// "projects/library/seqan/seeds/global_seed_chain.h"(250)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TSeedSet> inline Iter<TSeedSet, SeedIterator >& goNext(Iter<TSeedSet, SeedIterator > &it);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(222)
+
+//____________________________________________________________________________
+// insertTriple
+
+template <typename TValue, typename TChainElement> void insertTriple(Map<Pair<TValue, TChainElement*> > &list, TChainElement* pElement);       	// "projects/library/seqan/seeds/global_seed_chain.h"(272)
+
+//____________________________________________________________________________
+// leftDiagonal
+
+template <typename TPosition, typename TSpecSeed> inline TPosition leftDiagonal(Seed<TPosition, TSpecSeed> const &seed);       	// "projects/library/seqan/seeds/seed_base.h"(410)
+
+//____________________________________________________________________________
+// leftDim0
+
+template <typename TPosition> inline TPosition leftDim0(Seed<TPosition, ChainedSeed> const &seed);       	// "projects/library/seqan/seeds/seed_multi.h"(109)
+template <typename TPosition, typename TSpecSeed> inline TPosition leftDim0(Seed<TPosition, TSpecSeed> const &seed);       	// "projects/library/seqan/seeds/seed_base.h"(338)
+
+//____________________________________________________________________________
+// leftDim1
+
+template <typename TPosition> inline TPosition leftDim1(Seed<TPosition, ChainedSeed> const &seed);       	// "projects/library/seqan/seeds/seed_multi.h"(125)
+template <typename TPosition, typename TSpecSeed> inline TPosition leftDim1(Seed<TPosition, TSpecSeed> const &seed);       	// "projects/library/seqan/seeds/seed_base.h"(374)
+
+//____________________________________________________________________________
+// leftPosition
+
+template <typename TPosition, typename TSpecSeed, typename TSize> inline TPosition leftPosition(Seed<TPosition, TSpecSeed> & me, TSize dim);       	// "projects/library/seqan/seeds/seed_base.h"(239)
+
+//____________________________________________________________________________
+// length
+
+template <typename TValue, unsigned int SPACE> inline typename Size<String<TValue, Block<SPACE> > >::Type length(MemoryManager<TValue, Block<SPACE>, FreeMemoryInt > const & me);       	// "projects/library/seqan/seeds/memoryManager_int.h"(248)
+template <typename TPosition> inline TPosition length(Seed<TPosition, ChainedSeed> const & seed);       	// "projects/library/seqan/seeds/seed_multi.h"(140)
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline int length(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set);       	// "projects/library/seqan/seeds/seedSet_base.h"(339)
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline int length(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> const &set);       	// "projects/library/seqan/seeds/seedSet_base.h"(347)
+template <typename TValue, unsigned int SPACE> inline typename Size<String<TValue, Block<SPACE> > >::Type length(PropertyMap<TValue, Block<SPACE> > const & me);       	// "projects/library/seqan/seeds/propertyMap.h"(204)
+template <typename TValue, unsigned int SPACE, typename TFree> inline typename Size<String<TValue, Block<SPACE> > >::Type length(MemoryManager<TValue, Block<SPACE>, TFree > const & me);       	// "projects/library/seqan/seeds/memoryManager_base.h"(255)
+template <typename TPosition, typename TSpecSeed> inline TPosition length(Seed<TPosition, TSpecSeed> const & seed);       	// "projects/library/seqan/seeds/seed_base.h"(437)
+
+//____________________________________________________________________________
+// maximumDistance
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline TValue maximumDistance(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set);       	// "projects/library/seqan/seeds/seedSet_base.h"(433)
+
+//____________________________________________________________________________
+// obtainID
+
+template <typename TValue, unsigned int SPACE> inline typename Size<String<TValue, Block<SPACE> > >::Type obtainID(MemoryManager<TValue,Block<SPACE>,FreeMemoryInt > &manager);       	// "projects/library/seqan/seeds/memoryManager_int.h"(299)
+template <typename TValue, unsigned int SPACE, typename TFree> inline typename Size<String<TValue, Block<SPACE> > >::Type obtainID(MemoryManager<TValue,Block<SPACE>,TFree > &manager);       	// "projects/library/seqan/seeds/memoryManager_base.h"(328)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TSeedSet> inline bool operator!=(Iter<TSeedSet, SeedIterator > it1, Iter<TSeedSet, SeedIterator > it2);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(274)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TSeedSet> inline typename Reference<Iter<TSeedSet, SeedIterator> const>::Type operator* (Iter<TSeedSet, SeedIterator> & me);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(258)
+template <typename TSeedSet> inline typename Reference<Iter<TSeedSet const, SeedIterator> const>::Type operator* (Iter<TSeedSet const, SeedIterator> & me);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(266)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename TSeedSet> inline Iter<TSeedSet, SeedIterator >& operator++(Iter<TSeedSet, SeedIterator > &me);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(213)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename TSeedSet> inline Iter<TSeedSet, SeedIterator >& operator--(Iter<TSeedSet, SeedIterator > &it);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(231)
+
+//____________________________________________________________________________
+// qualityValue
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline TValue qualityValue(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set);       	// "projects/library/seqan/seeds/seedSet_base.h"(451)
+
+//____________________________________________________________________________
+// raiseMemory
+
+template <typename TValue, unsigned int SPACE> void raiseMemory(PropertyMap<TValue,Block<SPACE> > &manager);       	// "projects/library/seqan/seeds/propertyMap.h"(227)
+
+//____________________________________________________________________________
+// releaseID
+
+template <typename TValue, unsigned int SPACE, typename TPosition> void releaseID(MemoryManager<TValue,Block<SPACE>, FreeMemoryInt > &manager, TPosition pos);       	// "projects/library/seqan/seeds/memoryManager_int.h"(288)
+template <typename TValue, unsigned int SPACE, typename TFree, typename TPosition> void releaseID(MemoryManager<TValue,Block<SPACE>, TFree > &manager, TPosition pos);       	// "projects/library/seqan/seeds/memoryManager_base.h"(307)
+
+//____________________________________________________________________________
+// rightDiagonal
+
+template <typename TPosition, typename TSpecSeed> inline TPosition rightDiagonal(Seed<TPosition,TSpecSeed> const & seed);       	// "projects/library/seqan/seeds/seed_base.h"(428)
+
+//____________________________________________________________________________
+// rightDim0
+
+template <typename TPosition> inline TPosition rightDim0(Seed<TPosition, ChainedSeed> const & seed);       	// "projects/library/seqan/seeds/seed_multi.h"(117)
+template <typename TPosition, typename TSpecSeed> inline TPosition rightDim0(Seed<TPosition,TSpecSeed> const & seed);       	// "projects/library/seqan/seeds/seed_base.h"(356)
+
+//____________________________________________________________________________
+// rightDim1
+
+template <typename TPosition> inline TPosition rightDim1(Seed<TPosition, ChainedSeed> const & seed);       	// "projects/library/seqan/seeds/seed_multi.h"(132)
+template <typename TPosition, typename TSpecSeed> inline TPosition rightDim1(Seed<TPosition,TSpecSeed> const & seed);       	// "projects/library/seqan/seeds/seed_base.h"(392)
+
+//____________________________________________________________________________
+// rightPosition
+
+template <typename TPosition, typename TSpecSeed, typename TSize> inline TPosition rightPosition(Seed<TPosition, TSpecSeed> & me, TSize dim);       	// "projects/library/seqan/seeds/seed_base.h"(282)
+
+//____________________________________________________________________________
+// scoreSeed
+
+template <typename TPosition, typename TText, typename TScore> TScore scoreSeed(Seed<TPosition, ChainedSeed> &seed, String<TText> &query, String<TText> &database, Score<TScore, Simple> &matrix);       	// "projects/library/seqan/seeds/seed_multi.h"(730)
+
+//____________________________________________________________________________
+// seedScore
+
+template <typename TSeedSet> inline typename ScoreType<typename ScoringScheme<TSeedSet>::Type>::Type & seedScore(Iter<TSeedSet, SeedIterator > it);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(290)
+template <typename TSeedSet> inline typename ScoreType<typename ScoringScheme<TSeedSet>::Type>::Type const& seedScore(Iter<TSeedSet const, SeedIterator > &it);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(300)
+
+//____________________________________________________________________________
+// setLeftDiagonal
+
+template <typename TPosition, typename TSpecSeed> inline void setLeftDiagonal(Seed<TPosition, TSpecSeed> &me, TPosition diag);       	// "projects/library/seqan/seeds/seed_base.h"(533)
+
+//____________________________________________________________________________
+// setLeftDim0
+
+template <typename TPosition> inline void setLeftDim0(Seed<TPosition, ChainedSeed> &seed, TPosition start);       	// "projects/library/seqan/seeds/seed_multi.h"(151)
+template <typename TPosition, typename TSpecSeed> inline void setLeftDim0(Seed<TPosition, TSpecSeed> &me, TPosition start);       	// "projects/library/seqan/seeds/seed_base.h"(457)
+
+//____________________________________________________________________________
+// setLeftDim1
+
+template <typename TPosition> inline void setLeftDim1(Seed<TPosition, ChainedSeed> &seed, TPosition start);       	// "projects/library/seqan/seeds/seed_multi.h"(174)
+template <typename TPosition, typename TSpecSeed> inline void setLeftDim1(Seed<TPosition, TSpecSeed> &me, TPosition start);       	// "projects/library/seqan/seeds/seed_base.h"(495)
+
+//____________________________________________________________________________
+// setLeftPosition
+
+template <typename TPosition, typename TSpecSeed, typename TSize, typename TPosition2> inline TPosition setLeftPosition(Seed<TPosition, TSpecSeed> & me, TSize dim, TPosition2 new_pos);       	// "projects/library/seqan/seeds/seed_base.h"(260)
+
+//____________________________________________________________________________
+// setMaximumDistance
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline void setMaximumDistance(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set, TValue distance);       	// "projects/library/seqan/seeds/seedSet_base.h"(395)
+
+//____________________________________________________________________________
+// setQualityValue
+
+template <typename TValue, typename TSeedSpec, typename TSpecScoring, typename TSpec> inline void setQualityValue(SeedSet<TValue, TSeedSpec, TSpecScoring, TSpec> &set, TValue value);       	// "projects/library/seqan/seeds/seedSet_base.h"(415)
+
+//____________________________________________________________________________
+// setRightDiagonal
+
+template <typename TPosition, typename TSpecSeed> inline void setRightDiagonal(Seed<TPosition,TSpecSeed> & seed, TPosition diag);       	// "projects/library/seqan/seeds/seed_base.h"(552)
+
+//____________________________________________________________________________
+// setRightDim0
+
+template <typename TPosition> inline void setRightDim0(Seed<TPosition,ChainedSeed> & seed, TPosition end);       	// "projects/library/seqan/seeds/seed_multi.h"(164)
+template <typename TPosition, typename TSpecSeed> inline void setRightDim0(Seed<TPosition,TSpecSeed> & me, TPosition end);       	// "projects/library/seqan/seeds/seed_base.h"(476)
+
+//____________________________________________________________________________
+// setRightDim1
+
+template <typename TPosition> inline void setRightDim1(Seed<TPosition,ChainedSeed> & seed, TPosition end);       	// "projects/library/seqan/seeds/seed_multi.h"(187)
+template <typename TPosition, typename TSpecSeed> inline void setRightDim1(Seed<TPosition,TSpecSeed> & me, TPosition end);       	// "projects/library/seqan/seeds/seed_base.h"(514)
+
+//____________________________________________________________________________
+// setRightPosition
+
+template <typename TPosition, typename TSpecSeed, typename TSize, typename TPosition2> inline TPosition setRightPosition(Seed<TPosition, TSpecSeed> & me, TSize dim, TPosition2 new_pos);       	// "projects/library/seqan/seeds/seed_base.h"(304)
+
+//____________________________________________________________________________
+// setScore
+
+template <typename TSeedSet, typename TSize> void setScore(Iter<TSeedSet, SeedIterator > &it, TSize score);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(308)
+
+//____________________________________________________________________________
+// setScoreMatrix
+
+template <typename TValue, typename TSeedSpec, typename TSpec, typename TScoringSpec> inline void setScoreMatrix(SeedSet<TValue, TSeedSpec, TScoringSpec, TSpec> &set, Score<int,Simple> matrix);       	// "projects/library/seqan/seeds/seedSet_score.h"(295)
+
+//____________________________________________________________________________
+// startDiagonal
+
+template <typename TPosition> inline TPosition startDiagonal(Seed<TPosition, ChainedSeed> const &seed);       	// "projects/library/seqan/seeds/seed_multi.h"(94)
+template <typename TPosition, typename TSpecSeed> inline TPosition startDiagonal(Seed<TPosition, TSpecSeed> const &me);       	// "projects/library/seqan/seeds/seed_base.h"(200)
+
+//____________________________________________________________________________
+// value
+
+template <typename TValue, unsigned int SPACE, typename TPos> inline typename Reference<String<TValue, Block<SPACE> > >::Type value( MemoryManager<TValue, Block<SPACE>, FreeMemoryInt >& stack, TPos const pos);       	// "projects/library/seqan/seeds/memoryManager_int.h"(209)
+template <typename TValue, unsigned int SPACE, typename TPos> inline typename Reference<String<TValue, Block<SPACE> > >::Type value( MemoryManager<TValue, Block<SPACE>, FreeMemoryInt > const& stack, TPos const pos);       	// "projects/library/seqan/seeds/memoryManager_int.h"(220)
+template <typename TSeedSet> inline typename Reference<Iter<TSeedSet, SeedIterator> >::Type value(Iter<TSeedSet, SeedIterator > &it);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(240)
+template <typename TSeedSet> inline typename Reference<Iter<TSeedSet, SeedIterator> const>::Type value(Iter<TSeedSet, SeedIterator> const &me);       	// "projects/library/seqan/seeds/seedSet_iterator.h"(248)
+template <typename TValue, unsigned int SPACE, typename TPos> inline typename Reference<String<TValue, Block<SPACE> > >::Type value( PropertyMap<TValue, Block<SPACE> >& stack, TPos const pos);       	// "projects/library/seqan/seeds/propertyMap.h"(165)
+template <typename TValue, unsigned int SPACE, typename TPos> inline typename Reference<String<TValue, Block<SPACE> > >::Type value( PropertyMap<TValue, Block<SPACE> > const& stack, TPos const pos);       	// "projects/library/seqan/seeds/propertyMap.h"(176)
+template <typename TValue, unsigned int SPACE, typename TFree, typename TPos> inline typename Reference<String<TValue, Block<SPACE> > >::Type value( MemoryManager<TValue, Block<SPACE>, TFree >& stack, TPos const pos);       	// "projects/library/seqan/seeds/memoryManager_base.h"(217)
+template <typename TValue, unsigned int SPACE, typename TFree, typename TPos> inline typename Reference<String<TValue, Block<SPACE> > >::Type value(MemoryManager<TValue, Block<SPACE>, TFree > const& stack, TPos const pos);       	// "projects/library/seqan/seeds/memoryManager_base.h"(227)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/seeds2.h b/src/SeqAn-1.3/seqan/seeds2.h
new file mode 100644
index 0000000..13227d6
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2.h
@@ -0,0 +1,96 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Module for two-dimensional seeding and chaining.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEEDS_H
+#define SEQAN_HEADER_SEEDS_H
+
+// ===========================================================================
+// Preliminaries
+// ===========================================================================
+
+#include <algorithm>
+#include <cmath>
+#include <list>
+#include <new>
+
+#include <seqan/sequence.h>
+#include <seqan/index.h>
+#include <seqan/score.h>
+#include <seqan/align.h>
+#include <seqan/map.h>
+#include <seqan/modifier.h>
+
+// #ifdef SEQAN_SWITCH_USE_FORWARDS
+// #include <seqan/seeds2/seeds2_generated_forwards.h>
+// #endif
+
+// ===========================================================================
+// Seeds Module
+// ===========================================================================
+
+// Basic definitions
+// #include <seqan/seeds2/seeds_base.h>
+
+// Class Seed and specializations
+#include <seqan/seeds2/seeds_seed_base.h>
+#include <seqan/seeds2/seeds_seed_simple.h>
+#include <seqan/seeds2/seeds_seed_diagonal.h>
+#include <seqan/seeds2/seeds_seed_chained.h>
+
+// Seed extension algorithms.
+#include <seqan/seeds2/seeds_extension.h>
+
+// Algorithms for chaining and merging seeds.
+#include <seqan/seeds2/seeds_combination.h>
+
+// Class SeedSet, specializations, iterators.
+#include <seqan/seeds2/basic_iter_indirect.h>
+#include <seqan/seeds2/seeds_seed_set_base.h>
+#include <seqan/seeds2/seeds_seed_set_unordered.h>
+
+// Banded and unbanded DP algorithms.
+#include <seqan/seeds2/align_dynprog_linear.h>
+#include <seqan/seeds2/align_dynprog_banded_linear.h>
+#include <seqan/seeds2/align_dynprog_affine.h>
+#include <seqan/seeds2/align_dynprog_banded_affine.h>
+
+// Banded chain alignment.
+#include <seqan/seeds2/align_chain_banded.h>
+
+// Global chaining algorithms
+#include <seqan/seeds2/seeds_global_chaining.h>
+
+#endif  // #ifndef SEQAN_HEADER_SEEDS_H
diff --git a/src/SeqAn-1.3/seqan/seeds2/align_chain_banded.h b/src/SeqAn-1.3/seqan/seeds2/align_chain_banded.h
new file mode 100644
index 0000000..1822e01
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/align_chain_banded.h
@@ -0,0 +1,828 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// This header defines the data structure AlignmentChain which supports
+// the banded chain alignment algorithm.  It allows to store multiple
+// alignments for each seed in the chain and each gap as well as the leading
+// and trailing gap.
+// 
+// The data structure supports the consecutive alignment of seeds and
+// the rectangles between them.  The functions encapsulate the
+// computation of dimensions for the rectangles and seeds.  They also
+// encapsulate the dimension computation for parts to be copied.
+// 
+// The alignment and especially the copying of the data itself is
+// delegated to the alignment algorithms in
+// align_dynprog[_banded]_{linear,affine}.h.
+// 
+// The functions should not have to be adapted to accomodate less
+// copying since they are not concerned with the copying themselves.
+// 
+// bandedChainAlignment() is the public interface to the banded chain
+// alignment which calls _bandedChainAlignment() with the appropriate
+// alignment algorithm tag (i.e. Needleman-Wunsch or Gotoh).
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_ALIGN_CHAIN_BANDED_LINEAR_H_
+#define SEQAN_SEEDS_ALIGN_CHAIN_BANDED_LINEAR_H_
+
+// TODO(holtgrew): Remove includes here, for debug only.
+#include <iostream>
+#include <fstream>
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+template <typename AlignmentAlgorithm>
+struct AlignmentMatrixDimension_;
+
+template <>
+struct AlignmentMatrixDimension_<NeedlemanWunsch>
+{
+    enum { VALUE = 2 };
+};
+
+template <>
+struct AlignmentMatrixDimension_<Gotoh>
+{
+    enum { VALUE = 3 };
+};
+
+template <typename TSegment, typename TScoringScheme, typename TAlignmentTag>
+class AlignmentChain_
+{
+public:
+    // TODO(holtgrew): Underscores should be in front of variable names, right?
+    typedef typename Value<TScoringScheme>::Type TScoreValue;
+    typedef typename Position<TSegment>::Type TPosition;
+
+    // The bandwidth for the banded alignment.  Actually, this is the
+    // delta to the upper and lower diagonals of the seeds.
+    // TODO(holtgrew): Rename to reflect this.
+    TPosition bandwidth_;
+
+    // The scoring scheme used for the alignment.
+    TScoringScheme scoringScheme_;
+
+    // The first sequence / dimension 0 / query sequence, vertical down
+    Holder<TSegment> sequence0_;
+
+    // The second sequence / dimension 1 / database sequence, horizontal ltr
+    Holder<TSegment> sequence1_;
+
+    // The alignment matrices for the different part.  The first
+    // element is the alignment matrix for the rectangle to the upper
+    // left right, followed by the one for the first seed in the chain
+    // (left-uppermost one), the next rectangle and so on.
+    String<Matrix<TScoreValue, AlignmentMatrixDimension_<TAlignmentTag>::VALUE> > alignmentMatrices_;
+
+    // TODO(holtgrew): Default constructor + setSequence{0,1} missing for now.
+
+    AlignmentChain_(TPosition bandwidth, TScoringScheme const & scoringScheme, TSegment /*const*/ & sequence0, TSegment /*const*/ & sequence1)
+            : bandwidth_(bandwidth), scoringScheme_(scoringScheme), sequence0_(sequence0), sequence1_(sequence1)
+    { SEQAN_CHECKPOINT; }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <typename TSegment, typename TScoringScheme, typename TAlignmentTag>
+struct ScoringScheme<AlignmentChain_<TSegment, TScoringScheme, TAlignmentTag> >
+{
+    typedef TScoringScheme Type;
+};
+
+
+template <typename TSegment, typename TScoringScheme, typename TAlignmentTag>
+struct ScoringScheme<AlignmentChain_<TSegment, TScoringScheme, TAlignmentTag> const>
+        : ScoringScheme<AlignmentChain_<TSegment, TScoringScheme, TAlignmentTag> > {};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+// Given a seed and an alignment chain, the overlap of the seed with
+// the rectangle to the lower right is written to overlap0 and
+// overlap1.
+template <typename TSize, typename TSequence, typename TScoringScheme, typename TSeedSpec, typename TSeedConfig, typename TAlignmentTag>
+inline void
+_computeLowerRightOverlap(TSize & overlap0,
+                          TSize & overlap1,
+                          Seed<TSeedSpec, TSeedConfig> const & seed,
+                          AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> const & alignmentChain)
+{
+    SEQAN_CHECKPOINT;
+    overlap0 = getUpperDiagonal(seed) - getEndDiagonal(seed) + alignmentChain.bandwidth_ + 1;
+    overlap1 = getEndDiagonal(seed) - getLowerDiagonal(seed) + alignmentChain.bandwidth_ + 1;
+    // Don't overlap more than the seed...
+    overlap0 = _min(overlap0, getEndDim0(seed) - getBeginDim0(seed));
+    overlap1 = _min(overlap1, getEndDim1(seed) - getBeginDim1(seed));
+}
+
+
+// Given a seed and an alignment chain, the overlap of the seed with
+// the rectangle to the upper left is written to overlap0 and
+// overlap1.
+template <typename TSize, typename TSequence, typename TScoringScheme, typename TSeedSpec, typename TSeedConfig, typename TAlignmentTag>
+inline void
+_computeUpperLeftOverlap(TSize & overlap0,
+                         TSize & overlap1,
+                         Seed<TSeedSpec, TSeedConfig> const & seed,
+                         AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> const & alignmentChain)
+{
+    SEQAN_CHECKPOINT;
+    overlap0 = getStartDiagonal(seed) - getLowerDiagonal(seed) + alignmentChain.bandwidth_ + 1;
+    overlap1 = getUpperDiagonal(seed) - getStartDiagonal(seed) + alignmentChain.bandwidth_ + 1;
+    // Don't overlap more than the seed...
+    overlap0 = _min(overlap0, getEndDim0(seed) - getBeginDim0(seed));
+    overlap1 = _min(overlap1, getEndDim1(seed) - getBeginDim1(seed));
+}
+
+
+// Performs the alignment matrix filling step for the leading
+// rectangle in the alignment chain.
+template <typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedSpec, typename TSeedConfig, bool START1_FREE, bool START0_FREE, bool END1_FREE, bool END0_FREE>
+void
+_alignLeadingRectangle(
+        AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> & alignmentChain,
+        Seed<TSeedSpec, TSeedConfig> const & rightSeed,
+        AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const & alignConfig)
+{
+    SEQAN_CHECKPOINT;
+    // std::cout << "_alignLeadingRectangle ---------------------------------------------" << std::endl;
+
+    typedef typename Value<TScoringScheme>::Type TScoreValue;
+    typedef Matrix<TScoreValue, AlignmentMatrixDimension_<TAlignmentTag>::VALUE> TMatrix;
+    typedef typename Infix<TSequence>::Type TInfix;
+    typedef typename Size<TSequence>::Type TSize;
+
+    // Compute overlap of the rectangle with the seed to the lower right.
+    TSize rightOverlap0, rightOverlap1;
+    _computeUpperLeftOverlap(rightOverlap0, rightOverlap1, rightSeed, alignmentChain);
+    // std::cout << "rightSeed == " << rightSeed << std::endl;
+    // std::cout << "rightOverlap0 == " << rightOverlap0 << "rightOverlap1 == " << rightOverlap1 << std::endl;
+
+    // Get infixes of the sequences that correspond to this rectangle.
+    TInfix prefix0 = prefix(value(alignmentChain.sequence0_), getBeginDim0(rightSeed) + rightOverlap0);
+    TInfix prefix1 = prefix(value(alignmentChain.sequence1_), getBeginDim1(rightSeed) + rightOverlap1);
+
+    // TODO(holtgrew): Temporary debug code.
+    std::cerr << ",-- _alignLeadingRectangle" << std::endl;
+    std::cerr << "| prefix0: '" << prefix0 << "'" << std::endl;
+    std::cerr << "| prefix1: '" << prefix1 << "'" << std::endl;
+    std::cerr << "`--" << std::endl;
+
+    // Append a new alignment matrix to the chain.
+    appendValue(alignmentChain.alignmentMatrices_, TMatrix());
+    // Resize the alignment matrix to the appropriate size.
+    _alignResizeMatrix(back(alignmentChain.alignmentMatrices_), prefix0, prefix1, TAlignmentTag());
+    // Initialize the matrix gutter.
+    _alignInitGutter(back(alignmentChain.alignmentMatrices_), alignmentChain.scoringScheme_, alignConfig, TAlignmentTag());
+    // Fill the Matrix using standard dynamic programming.
+    _alignFillMatrix(back(alignmentChain.alignmentMatrices_), prefix0, prefix1, alignmentChain.scoringScheme_, TAlignmentTag());
+
+    // TODO(holtgrew): Temporary debug code.
+    // {
+    //     TMatrix & matrix = back(alignmentChain.alignmentMatrices_);
+    //     std::cout << ",-- First rectangle, NW Matrix " << length(matrix, 0) << " x " << length(matrix, 1) << std::endl;
+    //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //         std::cout << "|";
+    //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+    //                 std::cout << "\tinf";
+    //             else 
+    //                 std::cout << "\t" <<value(matrix, i, j);
+    //         }
+    //         std::cout << std::endl;
+    //     }
+    //     std::cout << "`--" << std::endl;
+    // }
+}
+
+
+template <typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedSpec, typename TSeedConfig>
+void
+_alignTrailingRectangle(
+        AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> & alignmentChain,
+        Seed<TSeedSpec, TSeedConfig> const & leftSeed)
+{
+    SEQAN_CHECKPOINT;
+    // std::cout << "_alignTrailingRectangle ---------------------------------------------" << std::endl;
+
+    typedef typename Value<TScoringScheme>::Type TScoreValue;
+    typedef Matrix<TScoreValue, AlignmentMatrixDimension_<TAlignmentTag>::VALUE> TMatrix;
+    typedef typename Suffix<TSequence>::Type TSuffix;
+    typedef typename Size<TSequence>::Type TSize;
+    typedef Seed<TSeedSpec, TSeedConfig> TSeed;
+    typedef typename Diagonal<TSeed>::Type TDiagonal;
+
+    // Compute overlap of the rectangle with the seed to the upper left.
+    TSize leftOverlap0, leftOverlap1;
+    _computeLowerRightOverlap(leftOverlap0, leftOverlap1, leftSeed, alignmentChain);
+
+    // Get infixes of the sequences that correspond to this rectangle.
+    TSuffix suffix0 = suffix(value(alignmentChain.sequence0_), getEndDim0(leftSeed) - leftOverlap0);
+    TSuffix suffix1 = suffix(value(alignmentChain.sequence1_), getEndDim1(leftSeed) - leftOverlap1);
+
+    // Compute lower and upper diagonal for the alignment.
+    TDiagonal lowerDiagonal = getStartDiagonal(leftSeed) - getLowerDiagonal(leftSeed) - alignmentChain.bandwidth_;
+    TDiagonal upperDiagonal = getUpperDiagonal(leftSeed) - getStartDiagonal(leftSeed) + alignmentChain.bandwidth_;
+
+    // // TODO(holtgrew): Temporary debug code.
+    std::cerr << ",-- _alignTrailingRectangle" << std::endl;
+    std::cerr << "| suffix0: '" << suffix0 << "'" << std::endl;
+    std::cerr << "| suffix1: '" << suffix1 << "'" << std::endl;
+    std::cerr << "`--" << std::endl;
+    std::cerr << "leftOverlap0 = " << leftOverlap0 << std::endl;
+    std::cerr << "leftOverlap1 = " << leftOverlap1 << std::endl;
+
+    // Append a new alignment matrix to the chain.
+    appendValue(alignmentChain.alignmentMatrices_, TMatrix());
+    // Resize the alignment matrix to the appropriate size.
+    _alignResizeMatrix(back(alignmentChain.alignmentMatrices_), suffix0, suffix1, TAlignmentTag());
+    // Copy over the data from the banded seed alignment matrix into
+    // the gutter and initialize the rest of it according to the
+    // alignment config object.
+    _alignInitGutterFromBanded(back(alignmentChain.alignmentMatrices_), alignmentChain.scoringScheme_, lowerDiagonal, upperDiagonal, value(end(alignmentChain.alignmentMatrices_) - 2), leftOverlap0, leftOverlap1, TAlignmentTag());
+    // // TODO(holtgrew): Temporary debug code.
+    // {
+    //     TMatrix & matrix = back(alignmentChain.alignmentMatrices_);
+    //     std::cout << ",-- Trailing rectangle after init from banded " << length(matrix, 0) << " x " << length(matrix, 1) << std::endl;
+    //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //         std::cout << "|";
+    //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+    //                 std::cout << "\tinf";
+    //             else 
+    //                 std::cout << "\t" <<value(matrix, i, j);
+    //         }
+    //         std::cout << std::endl;
+    //     }
+    //     std::cout << "`--" << std::endl;
+    // }
+    // Fill the Matrix using standard dynamic programming.
+    _alignFillMatrix(back(alignmentChain.alignmentMatrices_), suffix0, suffix1, alignmentChain.scoringScheme_, TAlignmentTag());
+
+    // // TODO(holtgrew): Temporary debug code.
+    // {
+    //     TMatrix & matrix = back(alignmentChain.alignmentMatrices_);
+    //     std::cout << ",-- Last rectangle, NW Matrix " << length(matrix, 0) << " x " << length(matrix, 1) << std::endl;
+    //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //         std::cout << "|";
+    //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+    //                 std::cout << "\tinf";
+    //             else 
+    //                 std::cout << "\t" <<value(matrix, i, j);
+    //         }
+    //         std::cout << std::endl;
+    //     }
+    //     std::cout << "`--" << std::endl;
+    // }
+}
+
+
+template <typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedSpec, typename TSeedConfig>
+void
+_alignRectangle(
+        AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> & alignmentChain,
+        Seed<TSeedSpec, TSeedConfig> const & leftSeed,
+        Seed<TSeedSpec, TSeedConfig> const & rightSeed)
+{
+    SEQAN_CHECKPOINT;
+    // std::cout << "_alignRectangle ---------------------------------------------" << std::endl;
+
+    typedef typename Value<TScoringScheme>::Type TScoreValue;
+    typedef Matrix<TScoreValue, AlignmentMatrixDimension_<TAlignmentTag>::VALUE> TMatrix;
+    typedef typename Infix<TSequence>::Type TInfix;
+    typedef typename Size<TSequence>::Type TSize;
+    typedef Seed<TSeedSpec, TSeedConfig> TSeed;
+    typedef typename Diagonal<TSeed>::Type TDiagonal;
+
+    // Compute overlap of the rectangle with the seed to the upper left and to the lower right.
+    TSize leftOverlap0, leftOverlap1, rightOverlap0, rightOverlap1;
+    _computeLowerRightOverlap(leftOverlap0, leftOverlap1, leftSeed, alignmentChain);
+    _computeUpperLeftOverlap(rightOverlap0, rightOverlap1, rightSeed, alignmentChain);
+
+    // Get infixes of the sequences that correspond to this rectangle.
+    TInfix infix0 = infix(value(alignmentChain.sequence0_), getEndDim0(leftSeed) - leftOverlap0, getBeginDim0(rightSeed) + rightOverlap0);
+    TInfix infix1 = infix(value(alignmentChain.sequence1_), getEndDim1(leftSeed) - leftOverlap1, getBeginDim1(rightSeed) + rightOverlap1);
+
+    // Compute lower and upper diagonal for the alignment.
+    TDiagonal lowerDiagonal = getStartDiagonal(leftSeed) - getLowerDiagonal(leftSeed) - alignmentChain.bandwidth_;
+    TDiagonal upperDiagonal = getUpperDiagonal(leftSeed) - getStartDiagonal(leftSeed) + alignmentChain.bandwidth_;
+
+    // // TODO(holtgrew): Temporary debug code.
+    std::cout << ",-- _alignRectangle" << std::endl;
+    std::cout << "| infix0: '" << infix0 << "'" << std::endl;
+    std::cout << "| infix1: '" << infix1 << "'" << std::endl;
+    std::cout << "`--" << std::endl;
+    std::cout << "left seed = " << leftSeed << std::endl;
+    std::cout << "right seed = " << rightSeed << std::endl;
+
+    // Append a new alignment matrix to the chain.
+    appendValue(alignmentChain.alignmentMatrices_, TMatrix());
+    // Resize the alignment matrix to the appropriate size.
+    _alignResizeMatrix(back(alignmentChain.alignmentMatrices_), infix0, infix1, TAlignmentTag());
+    // Copy over the data from the banded seed alignment matrix into
+    // the gutter and initialize the rest of it according to the
+    // alignment config object.
+    _alignInitGutterFromBanded(back(alignmentChain.alignmentMatrices_), alignmentChain.scoringScheme_, lowerDiagonal, upperDiagonal, value(end(alignmentChain.alignmentMatrices_) - 2), leftOverlap0, leftOverlap1, TAlignmentTag());
+    // // TODO(holtgrew): Temporary debug code.
+    // {
+    //     TMatrix & matrix = back(alignmentChain.alignmentMatrices_);
+    //     std::cout << ",-- Rectangle after init from banded " << length(matrix, 0) << " x " << length(matrix, 1) << std::endl;
+    //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //         std::cout << "|";
+    //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+    //                 std::cout << "\tinf";
+    //             else 
+    //                 std::cout << "\t" <<value(matrix, i, j);
+    //         }
+    //         std::cout << std::endl;
+    //     }
+    //     std::cout << "`--" << std::endl;
+    // }
+    // Fill the Matrix using standard dynamic programming.
+    _alignFillMatrix(back(alignmentChain.alignmentMatrices_), infix0, infix1, alignmentChain.scoringScheme_, TAlignmentTag());
+
+    // // TODO(holtgrew): Temporary debug code.
+    // {
+    //     TMatrix & matrix = back(alignmentChain.alignmentMatrices_);
+    //     std::cout << ",-- Middle rectangle, NW Matrix " << length(matrix, 0) << " x " << length(matrix, 1) << std::endl;
+    //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //         std::cout << "|";
+    //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+    //                 std::cout << "\tinf";
+    //             else 
+    //                 std::cout << "\t" <<value(matrix, i, j);
+    //         }
+    //         std::cout << std::endl;
+    //     }
+    //     std::cout << "`--" << std::endl;
+    // }
+}
+
+
+template <typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedSpec, typename TSeedConfig>
+void
+_alignSeed(
+        AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> & alignmentChain,
+        Seed<TSeedSpec, TSeedConfig> const & seed)
+{
+    SEQAN_CHECKPOINT;
+    // std::cout << "_alignSeed ---------------------------------------------" << std::endl;
+
+    typedef typename Value<TScoringScheme>::Type TScoreValue;
+    typedef Matrix<TScoreValue, AlignmentMatrixDimension_<TAlignmentTag>::VALUE> TMatrix;
+    typedef typename Infix<TSequence>::Type TInfix;
+    typedef typename Size<TSequence>::Type TSize;
+    typedef Seed<TSeedSpec, TSeedConfig> TSeed;
+    typedef typename Diagonal<TSeed>::Type TDiagonal;
+
+    // Compute overlap with the rectangle to the upper left.
+    TSize leftOverlap0, leftOverlap1;
+    _computeUpperLeftOverlap(leftOverlap0, leftOverlap1, seed, alignmentChain);
+
+    // Get the infixes corresponding to the seed.
+    TInfix infix0 = infix(value(alignmentChain.sequence0_), getBeginDim0(seed), getEndDim0(seed));
+    TInfix infix1 = infix(value(alignmentChain.sequence1_), getBeginDim1(seed), getEndDim1(seed));
+
+    // Compute lower and upper diagonal for the alignment.
+    TDiagonal lowerDiagonal = getLowerDiagonal(seed) - getStartDiagonal(seed) - alignmentChain.bandwidth_;
+    TDiagonal upperDiagonal = getUpperDiagonal(seed) - getStartDiagonal(seed) + alignmentChain.bandwidth_;
+    // Limit lower and upper diagonal so no more than a whole rectangle is computed.
+    TDiagonal maxBandwidth = getEndDim0(seed) - getBeginDim0(seed) - 1;
+    // std::cout << "lowerDiagonal = _max(" << lowerDiagonal << ", - " << maxBandwidth << ");" << std::endl;
+    // std::cout << "upperDiagonal = _min(" << upperDiagonal << ", " << getEndDiagonal(seed) << " - " << getStartDiagonal(seed) << " + " << maxBandwidth << ");" << std::endl;
+    lowerDiagonal = _max(lowerDiagonal, - maxBandwidth);
+    upperDiagonal = _min(upperDiagonal, getEndDiagonal(seed) - getStartDiagonal(seed) + maxBandwidth);
+    // std::cout << "seed == " << seed << std::endl;
+    // std::cout << "leftOverlap0 == " << leftOverlap0 << "leftOverlap1 == " << leftOverlap1 << std::endl;
+
+    // // TODO(holtgrew): Temporary debug code.
+    std::cerr << ",-- _alignSeed" << std::endl;
+    std::cerr << "| infix0: '" << infix0 << "'" << std::endl;
+    std::cerr << "| infix1: '" << infix1 << "'" << std::endl;
+    std::cerr << "`--" << std::endl;
+
+    // Append a new alignment matrix to the chain.
+    appendValue(alignmentChain.alignmentMatrices_, TMatrix());
+
+    // Resize the alignment matrix to the appropriate size.
+    _alignBandedResizeMatrix(back(alignmentChain.alignmentMatrices_), infix0, infix1, lowerDiagonal, upperDiagonal, TAlignmentTag());
+    // Initialize the banded DP matrix' gutter.  Some data is copied
+    // in from the previous non-banded DP matrix.
+    // _alignBandedInitGutter(back(alignmentChain.alignmentMatrices_), alignmentChain.scoringScheme_, lowerDiagonal, upperDiagonal, AlignConfig<false, false, false, false>(), TAlignmentTag());
+    _alignBandedInitGutterFromUnbanded(back(alignmentChain.alignmentMatrices_), alignmentChain.scoringScheme_, lowerDiagonal, upperDiagonal, value(end(alignmentChain.alignmentMatrices_) - 2), leftOverlap0, leftOverlap1, TAlignmentTag());
+    // // TODO(holtgrew): Debug output, remove when not needed any more.
+    // {
+    //     TMatrix & matrix = back(alignmentChain.alignmentMatrices_);
+    //     std::cout << ",-- matrix after init gutter from unbanded" << std::endl;
+    //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //         std::cout << "| ";
+    //         for (unsigned j = 0; j < i; ++j)
+    //             std::cout << "\t";
+    //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+    //                 std::cout << "\tinf";
+    //             else
+    //                 std::cout << "\t" << value(matrix, i, j);
+    //         }
+    //         std::cout << std::endl;
+    //     }
+    //     std::cout << "`--" << std::endl;
+    // }
+    // Fill the Matrix using banded dynamic programming.
+    _alignBandedFillMatrix(back(alignmentChain.alignmentMatrices_), infix0, infix1, alignmentChain.scoringScheme_, lowerDiagonal, upperDiagonal, TAlignmentTag());
+
+    // // TODO(holtgrew): Debug output, remove when not needed any more.
+    // {
+    //     TMatrix & matrix = back(alignmentChain.alignmentMatrices_);
+    //     std::cout << ",-- matrix after DP filling" << std::endl;
+    //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //         std::cout << "| ";
+    //         for (unsigned j = 0; j < i; ++j)
+    //             std::cout << "\t";
+    //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+    //                 std::cout << "\tinf";
+    //             else
+    //                 std::cout << "\t" << value(matrix, i, j);
+    //         }
+    //         std::cout << std::endl;
+    //     }
+    //     std::cout << "`--" << std::endl;
+    // }
+}
+
+
+template <typename TAlignment, typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedChain, bool START1_FREE, bool START0_FREE, bool END1_FREE, bool END0_FREE>
+typename Value<typename ScoringScheme<Alignment<TSequence, TScoringScheme, TAlignmentTag> >::Type >::Type
+_glueAlignmentChain(
+        TAlignment & alignment,
+        AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> const & alignmentChain,
+        TSeedChain const & seedChain,
+        AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const & alignConfig)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef typename Value<TScoringScheme>::Type TScoreValue;
+    typedef String<Matrix<TScoreValue, AlignmentMatrixDimension_<TAlignmentTag>::VALUE> > const TMatrixString;
+    typedef typename Iterator<TMatrixString, Standard>::Type TMatrixStringIterator;
+    typedef typename Position<TMatrixString>::Type TPosition;
+
+    typedef typename Value<TSeedChain const>::Type TSeed;
+    typedef typename Iterator<TSeedChain const, Standard>::Type TSeedChainIterator;
+
+    // Define type for iterator over alignment rows.
+	typedef typename Row<TAlignment>::Type TAlignmentRow;
+	typedef typename Iterator<TAlignmentRow, Standard>::Type TTargetIterator;
+    typedef typename Infix<TSequence>::Type TSourceInfix;
+    typedef typename Iterator<TSourceInfix, Standard>::Type TSourceInfixIterator;
+
+	TSourceInfixIterator sequenceIt0 = end(sourceSegment(row(alignment, 0))) - 1;
+	TSourceInfixIterator sequenceIt1 = end(sourceSegment(row(alignment, 1))) - 1;
+    TTargetIterator alignmentIt0 = end(row(alignment, 0));
+    TTargetIterator alignmentIt1 = end(row(alignment, 1));
+    TMatrixStringIterator matricesIt = end(alignmentChain.alignmentMatrices_) - 1;
+    TSeedChainIterator seedChainIt = end(seedChain, Standard());
+    --seedChainIt;
+
+    // Traceback through trailing rectangle and seed.
+    TPosition finalPos0 = 1;
+    TPosition finalPos1 = 1;
+    std::cout << "trace back through trailing rectangle..." << std::endl;
+    TPosition upperLeftOverlap0, upperLeftOverlap1;
+    _computeLowerRightOverlap(upperLeftOverlap0, upperLeftOverlap1, value(seedChainIt), alignmentChain);
+    std::cerr << "upperLeftOverlap0 = " << upperLeftOverlap0 << " upperLeftOverlap1 = " << upperLeftOverlap1 << std::endl;
+    TPosition lowerRightOverlap0 = 1;
+    TPosition lowerRightOverlap1 = 1;
+    TScoreValue result = _alignTraceback(alignmentIt0, alignmentIt1, sequenceIt0, sequenceIt1, finalPos0, finalPos1, value(matricesIt), alignmentChain.scoringScheme_, lowerRightOverlap0, lowerRightOverlap1, upperLeftOverlap0, upperLeftOverlap1, false, alignConfig, TAlignmentTag());
+    // std::cout << "Alignment so far:" << std::endl;
+    // std::cout << alignment;
+    // std::cout << result << std::endl;
+    // std::cout << "finalPos0 = " << finalPos0 << ", finalPos1 = " << finalPos1 << std::endl;
+    goPrevious(matricesIt);
+    _computeLowerRightOverlap(lowerRightOverlap0, lowerRightOverlap1, value(seedChainIt), alignmentChain);
+    TPosition upperTriangleEdgeLength = getStartDiagonal(value(seedChainIt)) - getLowerDiagonal(value(seedChainIt)) + alignmentChain.bandwidth_;
+    TPosition lowerTriangleEdgeLength = getUpperDiagonal(value(seedChainIt)) - getEndDiagonal(value(seedChainIt)) + alignmentChain.bandwidth_;
+    TPosition maxTriangleEdgeLength = getEndDim0(value(seedChainIt)) - getBeginDim0(value(seedChainIt)) - 1;
+    // std::cout << "lowerTriangleEdgeLength == " << lowerTriangleEdgeLength << std::endl;
+    // std::cout << "upperTriangleEdgeLength == " << upperTriangleEdgeLength << std::endl;
+    // std::cout << "maxTriangleEdgeLength == " << maxTriangleEdgeLength << std::endl;
+    lowerTriangleEdgeLength = _min(lowerTriangleEdgeLength, maxTriangleEdgeLength);
+    upperTriangleEdgeLength = _min(upperTriangleEdgeLength, maxTriangleEdgeLength);
+    std::cout << "trace back through last seed..." << std::endl;
+    std::cout << "finalPos0 == " << finalPos0 << ", finalPos1 == " << finalPos1 << std::endl;
+    {
+        if (length(seedChain) > 1u) {
+            TSeedChainIterator seedChainItPrevious = seedChainIt;
+            goPrevious(seedChainItPrevious);
+            _computeLowerRightOverlap(upperLeftOverlap0, upperLeftOverlap1, value(seedChainItPrevious), alignmentChain);
+        } else {
+            upperLeftOverlap0 = 0;
+            upperLeftOverlap1 = 0;
+        }
+    }
+    _alignBandedTraceback(alignmentIt0, alignmentIt1, sequenceIt0, sequenceIt1, finalPos0, finalPos1, value(matricesIt), alignmentChain.scoringScheme_, lowerRightOverlap0, lowerRightOverlap1, upperTriangleEdgeLength, lowerTriangleEdgeLength, false, AlignConfig<false, false, false, false>(), TAlignmentTag());
+    goPrevious(matricesIt);
+
+    // std::cout << "Alignment so far:" << std::endl << alignment;
+    
+    // Traceback through matrices in reverse order.
+    for (TPosition i = 0, iend = length(seedChain) - 1; i < iend; ++i) {
+        std::cout << "trace back through rectangle..." << std::endl;
+        // std::cout << "finalPos0 == " << finalPos0 << ", finalPos1 == " << finalPos1 << std::endl;
+        _computeUpperLeftOverlap(lowerRightOverlap0, lowerRightOverlap1, value(seedChainIt), alignmentChain);
+        {
+            TSeedChainIterator seedChainItPrevious = seedChainIt;
+            goPrevious(seedChainItPrevious);
+            _computeLowerRightOverlap(upperLeftOverlap0, upperLeftOverlap1, value(seedChainItPrevious), alignmentChain);
+        }
+        _alignTraceback(alignmentIt0, alignmentIt1, sequenceIt0, sequenceIt1, finalPos0, finalPos1, value(matricesIt), alignmentChain.scoringScheme_, lowerRightOverlap0, lowerRightOverlap1, upperLeftOverlap0, upperLeftOverlap1, false, AlignConfig<false, false, false, false>(), TAlignmentTag());
+        goPrevious(matricesIt);
+        goPrevious(seedChainIt);
+        // std::cout << "Alignment so far:" << std::endl << alignment;
+
+        std::cout << "trace back through seed..." << std::endl;
+        // std::cout << "finalPos0 == " << finalPos0 << ", finalPos1 == " << finalPos1 << std::endl;
+        _computeLowerRightOverlap(lowerRightOverlap0, lowerRightOverlap1, value(seedChainIt), alignmentChain);
+        upperTriangleEdgeLength = getStartDiagonal(value(seedChainIt)) - getLowerDiagonal(value(seedChainIt)) + alignmentChain.bandwidth_;
+        lowerTriangleEdgeLength = getUpperDiagonal(value(seedChainIt)) - getEndDiagonal(value(seedChainIt)) + alignmentChain.bandwidth_;
+        maxTriangleEdgeLength = getEndDim0(value(seedChainIt)) - getBeginDim0(value(seedChainIt)) - 1;
+        // std::cout << "lowerTriangleEdgeLength == " << lowerTriangleEdgeLength << std::endl;
+        // std::cout << "upperTriangleEdgeLength == " << upperTriangleEdgeLength << std::endl;
+        // std::cout << "maxTriangleEdgeLength == " << maxTriangleEdgeLength << std::endl;
+        lowerTriangleEdgeLength = _min(lowerTriangleEdgeLength, maxTriangleEdgeLength);
+        upperTriangleEdgeLength = _min(upperTriangleEdgeLength, maxTriangleEdgeLength);
+        _alignBandedTraceback(alignmentIt0, alignmentIt1, sequenceIt0, sequenceIt1, finalPos0, finalPos1, value(matricesIt), alignmentChain.scoringScheme_, lowerRightOverlap0, lowerRightOverlap1, upperTriangleEdgeLength, lowerTriangleEdgeLength, false, AlignConfig<false, false, false, false>(), TAlignmentTag());
+        goPrevious(matricesIt);
+        // std::cout << "Alignment so far:" << std::endl << alignment;
+    }
+
+    std::cout << "trace back through leading..." << std::endl;
+    // std::cout << "finalPos0 == " << finalPos0 << ", finalPos1 == " << finalPos1 << std::endl;
+    // Traceback through leading rectangle.
+    upperLeftOverlap0 = 0;
+    upperLeftOverlap1 = 0;
+    _computeUpperLeftOverlap(lowerRightOverlap0, lowerRightOverlap1, value(seedChainIt), alignmentChain);
+    _alignTraceback(alignmentIt0, alignmentIt1, sequenceIt0, sequenceIt1, finalPos0, finalPos1, value(matricesIt), alignmentChain.scoringScheme_, lowerRightOverlap0, lowerRightOverlap1, upperLeftOverlap0, upperLeftOverlap1, true, alignConfig, TAlignmentTag());
+    // std::cout << "Alignment so far:" << std::endl << alignment;
+    return result;
+}
+
+
+template <typename TStream, typename TAlignment, typename TAlignmentChain, typename TSeedChain>
+void
+write(TStream & stream, TAlignment const & alignment, TAlignmentChain const & alignmentChain, TSeedChain const & seedChain, Tikz_ const &)
+{
+    typedef typename Row<TAlignment const>::Type TRow;
+    typedef typename Position<TAlignment>::Type TPosition;
+    typedef typename Iterator<TRow, Standard>::Type TRowIterator;
+    typedef typename Iterator<TSeedChain, Standard>::Type TSeedIterator;
+  
+    stream << "\\documentclass{article}" << std::endl
+           << "\\usepackage{tikz,nicefrac,amsmath,pifont}" << std::endl
+           << "\\usetikzlibrary{arrows,snakes,backgrounds,patterns,matrix,shapes,fit,calc,shadows,plotmarks}" << std::endl
+           << "\\begin{document}" << std::endl
+           // << "\\begin{tikzpicture}[scale=.5,core/.style={fill=blue!20, fill opacity=.8},band/.style={fill=blue!10, fill opacity=.8}]" << std::endl;
+           << "\\begin{tikzpicture}[scale=.5,core/.style={},band/.style={},rectangle/.style={fill=green!10, fill opacity=.1}]" << std::endl;
+
+    // Grid.
+    stream << "\\draw[help lines] (0, -" << length(row(alignment, 0)) << ") grid (" << length(row(alignment, 1)) << ", 0);" << std::endl;
+    // Top row of characters.
+    stream << "\\draw";
+    int i = 0;
+    for (TRowIterator it = begin(row(alignment, 0)); it != end(row(alignment, 0)); ++it, ++i) {
+        stream << " (-1," << -0.5-i << ") node {" << *it << "}";
+    }
+    stream << ";" << std::endl;
+    // Left row of characters.
+    stream << "\\draw";
+    i = 0;
+    for (TRowIterator it = begin(row(alignment, 1)); it != end(row(alignment, 1)); ++it, ++i) {
+        stream << " (" << 0.5+i << ", 1) node {" << *it << "}";
+    }
+    stream << ";" << std::endl;
+    // Draw seeds.
+    for (TSeedIterator it = begin(seedChain); it != end(seedChain); ++it) {
+        int height = getEndDim0(*it) - getBeginDim0(*it);
+        int width = getEndDim1(*it) - getBeginDim1(*it);
+        int ext = _min(height, width);
+        int s0 = getBeginDim0(*it);
+        int s1 = getBeginDim1(*it);
+        int e0 = getEndDim0(*it);
+        int e1 = getEndDim1(*it);
+        int ld = getLowerDiagonal(*it);
+        int ud = getUpperDiagonal(*it);
+        int sd = getStartDiagonal(*it);
+        int ed = getEndDiagonal(*it);
+        int b = alignmentChain.bandwidth_;
+        // Draw seed "core."
+        stream << "\\draw[core] (" << s1 << ", -" << s0 << ") -- (" << s1 + ext << ", -" << s0 + ext << ") -- (" << e1 << ", -" << e0 << ") -- (" << e1 - ext << ", -" << e0 - ext << ") -- cycle;" << std::endl;
+        // Draw left band.
+        stream << "\\draw[band] (" << s1 - ((ld - sd) + b) << ", -" << s0 << ") -- (" << s1 - ((ld - sd) + b) + ext << ", -" << s0 + ext << ") -- (" << s1 + ext << ", -" << s0 + ext << ") -- (" << s1 << ", -" << s0 << ") -- cycle;" << std::endl;
+        // Draw right band.
+        stream << "\\draw[band] (" << e1 << ", -" << e0 << ") -- (" << e1 + ((ud - ed) + b) << ", -" << e0 << ") -- (" << e1 + ((ud - ed) + b) - ext << ", -" << e0 - ext << ") -- (" << e1 - ext << ", -" << e0 - ext << ") -- cycle;" << std::endl;
+    }
+
+    // Draw rectangles.
+    // First rectangle.
+    {
+        int s0 = getBeginDim0(front(seedChain));
+        int s1 = getBeginDim1(front(seedChain));
+        int o0, o1;
+        _computeLowerRightOverlap(o0, o1, front(seedChain), alignmentChain);
+        stream << "\\draw[rectangle] (0, 0) rectangle (" << s1 + o1 << ", -" << s0 + o0 << ");" << std::endl;
+    }
+    // Middle rectangles.
+    if (length(seedChain) > 1u) {
+        for (TSeedIterator it = begin(seedChain) + 1; it != end(seedChain); ++it) {
+            int e0 = getEndDim0(value(it - 1));
+            int e1 = getEndDim1(value(it - 1));
+            int s0 = getBeginDim0(value(it));
+            int s1 = getBeginDim1(value(it));
+            int ou0, ou1, ol0, ol1;
+            _computeLowerRightOverlap(ou0, ou1, value(it-1), alignmentChain);
+            _computeUpperLeftOverlap(ol0, ol1, value(it), alignmentChain);
+            printf("... e0=%d e1=%d s0=%d s1=%d ou0=%d ou1=%d ol0=%d ol1=%d\n", e0, e1, s0, s1, ou0, ou1, ol0, ol1);
+            stream << "\\draw[rectangle] (" << e1 - ou1 << ", -" << e0 - ou0 << ") rectangle (" << s1 + ol1 << ", -" << s0 + ol0 << ");" << std::endl;
+        }
+    }
+    // Last rectangle.
+    {
+        int e0 = getEndDim0(back(seedChain));
+        int e1 = getEndDim1(back(seedChain));
+        int o0, o1;
+        _computeLowerRightOverlap(o0, o1, back(seedChain), alignmentChain);
+        stream << "\\draw[rectangle] (" << e1 - o1 << ", -" << e0 - o0 << ") rectangle (" << length(row(alignment, 1)) << ", -" << length(row(alignment, 0)) << ");" << std::endl;
+    }
+
+    stream << "\\end{tikzpicture}" << std::endl
+           << "\\end{document}" << std::endl;
+}
+
+template <typename TContainer, typename TBandwidth, typename TScoreValue, typename TAlign, bool START1_FREE, bool START0_FREE, bool END1_FREE, bool END0_FREE, typename TGlobalAlignmentTag>
+TScoreValue
+_bandedChainAlignment(
+        TAlign & alignment,
+        TContainer const & seedChain,
+        TBandwidth k,
+        Score<TScoreValue, Simple> const & scoringScheme,
+        AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const & alignConfig,
+        TGlobalAlignmentTag const &)
+{
+    SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_GT(length(seedChain), 0u);
+    #if SEQAN_ENABLE_DEBUG
+    {
+        // Assert that the chain is non-overlapping.
+        typedef typename Iterator<TContainer const, Standard>::Type TIterator;
+        // std::cout << ".-- Chain (" << __FILE__ << ":" << __LINE__ << "):" << std::endl;
+        // for (TIterator it = begin(seedChain, Standard()); it != end(seedChain, Standard()); ++it)
+        //     std::cout << "| " << *it << std::endl;
+        // std::cout << "`--" << std::endl;
+        TIterator itPrevious = begin(seedChain, Standard());
+        TIterator it = itPrevious;
+        // std::cout << *it << std::endl;
+        ++it;
+        for (; it != end(seedChain, Standard()); ++it) {
+            // std::cout << *it << std::endl;
+            SEQAN_ASSERT_LEQ(getEndDim0(*itPrevious), getBeginDim0(*it));
+            SEQAN_ASSERT_LEQ(getEndDim1(*itPrevious), getBeginDim1(*it));
+            itPrevious = it;
+        }
+    }
+    #endif  // #if SEQAN_ENABLE_DEBUG
+
+    //
+    // Function-Wide Typedefs
+    //
+    typedef typename Source<TAlign>::Type TSequence;
+    typedef typename Infix<TSequence>::Type TSegment;
+    typedef typename Value<TContainer const>::Type TSeed;
+    typedef typename Iterator<TContainer const, Standard>::Type TIterator;
+    typedef Score<TScoreValue, Simple> TScoringScheme;
+    typedef AlignmentChain_<TSegment, TScoringScheme, TGlobalAlignmentTag> TAlignmentChain;
+
+    //
+    // Initialization
+    //
+	TSegment seq1 = sourceSegment(row(alignment, 0));
+	TSegment seq2 = sourceSegment(row(alignment, 1));
+    TAlignmentChain alignmentChain(k, scoringScheme, seq1, seq2);
+
+    // std::cerr << "length(seedChain) == " << length(seedChain) << std::endl;
+
+    // // TODO(holtgrew): Temporary debug code.
+    // std::cout << ",-- _bandedChainAlignment" << std::endl;
+    // std::cout << "| seq1:" << seq1 << std::endl;
+    // std::cout << "| seq2:" << seq2 << std::endl;
+    // std::cout << "`--" << std::endl;
+
+    //
+    // Compute Alignment using Alignment Chain
+    //
+    // Compute alignment for leading rectangle and the first seed.
+    // std::cout << "first seed: " << front(seedChain) << std::endl;
+    _alignLeadingRectangle(alignmentChain, front(seedChain), alignConfig);
+    _alignSeed(alignmentChain, front(seedChain));
+
+    // For all seeds from the second one from the left to the
+    // rightmost one: Align rectangle left of it and then the seed.
+    TIterator itPrevious = begin(seedChain, Standard());
+    TIterator it = itPrevious;
+    ++it;
+    for (; it != end(seedChain, Standard()); ++it) {
+        _alignRectangle(alignmentChain, value(itPrevious), value(it));
+        _alignSeed(alignmentChain, value(it));
+        itPrevious = it;
+    }
+
+    // Compute alignment for the trailing rectangle.
+    _alignTrailingRectangle(alignmentChain, back(seedChain));
+
+    // // Write alignment to file.
+    // {
+    //     std::ofstream file;
+    //     file.open("/tmp/example.tex", std::ios::out);
+    //     write(file, alignment, alignmentChain, seedChain, Tikz_());
+    // }
+
+    // Glue all alignments together.
+    return _glueAlignmentChain(alignment, alignmentChain, seedChain, alignConfig);
+}
+
+
+/**
+.Function.bandedChainAlignment:
+..summary:Calculates a banded alignment around a chain of seeds. 
+..cat:Seed Handling
+..signature:bandedChainAlignment(seedChain, k, alignment, scoreMatrix);
+..param.seedChain:A chain of seeds, must be ascendingly sorted in both dimensions.
+..param.k:Half of the width of the band.
+..param.alignment:The alignment where the result is stored.
+...type:Class.Align
+..param.scoreMatrix: The score matrix.
+...type:Spec.Simple Score
+...remarks: Depending on the score matrix the Needleman-Wunsch or the Gotoh algorithm is used. For a description of the algorithm see the masters thesis of C. Kemena, Section 5.3.3 LAGAN Alignment.
+..returns: The score of the alignment.
+..include:seqan/seeds2.h
+*/
+// TODO(holtgrew): wholeAlignment is the result and should be the first parameter.
+// TODO(holtgrew): Adjust the documentation to the parameter names.
+template<typename TContainer, typename TValue, typename TScoreValue, typename TAlign, bool START1_FREE, bool START0_FREE, bool END1_FREE, bool END0_FREE>
+TScoreValue
+bandedChainAlignment(TAlign & alignment,
+                     TContainer const & seedChain, 
+					 TValue k,
+					 Score<TScoreValue, Simple> const & scoringScheme,
+                     AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const & alignConfig)
+{
+    SEQAN_CHECKPOINT;
+
+	if (scoreGapOpen(scoringScheme) == scoreGapExtend(scoringScheme))
+		return _bandedChainAlignment(alignment, seedChain, k, scoringScheme, alignConfig, NeedlemanWunsch());
+	else
+		return _bandedChainAlignment(alignment, seedChain, k, scoringScheme, alignConfig, Gotoh());
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEEDS_ALIGN_CHAIN_BANDED_LINEAR_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/align_dynprog_affine.h b/src/SeqAn-1.3/seqan/seeds2/align_dynprog_affine.h
new file mode 100644
index 0000000..7fe4806
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/align_dynprog_affine.h
@@ -0,0 +1,516 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Classic Gotoh DP algorithm for affine gap costs.  The algorithm is
+// split into matrix resizing, filling the gutter, filling the rest of
+// the matrix and doing the traceback.  Otherwise, it is a text book
+// implementation without any tricks.
+// ==========================================================================
+// We implement the three matrices as one 3-dimensional matrix.  The
+// first two dimensions are for positions in sequences 0 and 1.  The
+// third dimension differentiates between the three matrices.  They are
+// -- in order -- M, I^a, I^b.
+// ==========================================================================
+
+// TODO(holtgrew): Maybe adjust rausch's code so things can be copied in and use it instead since it is heavily tuned?
+
+#ifndef SEQAN_SEEDS_ALIGN_DYNPROG_AFFINE_H_
+#define SEQAN_SEEDS_ALIGN_DYNPROG_AFFINE_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TScoreValue, typename TSequence>
+inline void
+_alignResizeMatrix(Matrix<TScoreValue, 3> & matrix, TSequence const & sequence0, TSequence const & sequence1, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+
+    setLength(matrix, 0, length(sequence0) + 1);
+    setLength(matrix, 1, length(sequence1) + 1);
+    setLength(matrix, 2, 3);
+    resize(matrix);
+}
+
+
+template <typename TScoreValue, bool BEGIN1_FREE, bool BEGIN0_FREE, bool END1_FREE, bool END0_FREE>
+inline void
+_alignInitGutter(Matrix<TScoreValue, 3> & matrix, Score<TScoreValue, Simple> const scoringScheme, AlignConfig<BEGIN1_FREE, BEGIN0_FREE, END1_FREE, END0_FREE> const &, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_EQ(length(matrix, 2), 3u);
+
+    typedef Matrix<TScoreValue, 3> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TIterator;
+    typedef typename Position<TMatrix>::Type TPosition;
+
+    // TODO(holtgrew): Support free begin gaps.
+    SEQAN_ASSERT_NOT_MSG(BEGIN0_FREE, "Free begin gaps are not supported in seeds align module yet.");
+    SEQAN_ASSERT_NOT_MSG(BEGIN1_FREE, "Free begin gaps are not supported in seeds align module yet.");
+
+    // We do not take the real minimum here because of overflows.
+    TScoreValue inf = MinValue<TScoreValue>::VALUE / 2;
+    // Get shortcuts to gap related scores.
+    TScoreValue gapOpenScore = scoreGapOpen(scoringScheme);
+    TScoreValue gapExtendScore = scoreGapExtend(scoringScheme);
+
+    // Get iterators to the top left corners of the matrices.
+    TIterator itMBegin = begin(matrix);
+    TIterator itIABegin = itMBegin;
+    goNext(itIABegin, 2);
+    TIterator itIBBegin = itIABegin;
+    goNext(itIBBegin, 2);
+
+    // Init top and left gutters.
+    //
+    // Left gutters...
+    TIterator itM = itMBegin;
+    *itM = 0;
+    goNext(itM, 0);
+    TIterator itIA = itIABegin;
+    *itIA = inf;
+    goNext(itIA, 0);
+    TIterator itIB = itIBBegin;
+    *itIB = inf;
+    goNext(itIB, 0);
+    for (TPosition pos = 1, posEnd = length(matrix, 0); pos < posEnd; ++pos) {
+        *itM = gapOpenScore + (pos - 1) * gapExtendScore;
+        *itIA = inf;
+        *itIB = gapOpenScore + (pos - 1) * gapExtendScore;
+        goNext(itM, 0);
+        goNext(itIA, 0);
+        goNext(itIB, 0);
+    }
+    // Top gutters...
+    itM = itMBegin;
+    itIA = itIABegin;
+    itIB = itIBBegin;
+    goNext(itM, 1);
+    goNext(itIA, 1);
+    goNext(itIB, 1);
+    for (TPosition pos = 1, posEnd = length(matrix, 1); pos < posEnd; ++pos) {
+        *itM = gapOpenScore + (pos - 1) * gapExtendScore;
+        *itIA = gapOpenScore + (pos - 1) * gapExtendScore;
+        *itIB = inf;
+        goNext(itM, 1);
+        goNext(itIA, 1);
+        goNext(itIB, 1);
+    }
+}
+
+
+template <typename TScoreValue, typename TDiagonal, typename TOverlap>
+inline void
+_alignInitGutterFromBanded(Matrix<TScoreValue, 3> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Matrix<TScoreValue, 3> /*const*/ & otherMatrix, TOverlap overlap0, TOverlap overlap1, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+
+    // TODO(holtgrew): Really unnecessary? Remove along with all other unused parameters in all align_*.h files.
+    (void) scoringScheme;
+    (void) lowerDiagonal;
+    (void) upperDiagonal;
+
+    SEQAN_ASSERT_EQ(length(matrix, 2), 3u);
+
+    typedef Matrix<TScoreValue, 3> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TIterator;
+    typedef typename Position<TMatrix>::Type TPosition;
+
+    // Get iterators to the top left corners of the matrices.
+    TIterator itMBegin = begin(matrix);
+    TIterator itIABegin = itMBegin;
+    goNext(itIABegin, 2);
+    TIterator itIBBegin = itIABegin;
+    goNext(itIBBegin, 2);
+    TIterator otherItMBegin = begin(otherMatrix);
+    goTo(otherItMBegin, length(otherMatrix, 0) - (overlap0 + 1), overlap0);
+    TIterator otherItIABegin = otherItMBegin;
+    goNext(otherItIABegin, 2);
+    TIterator otherItIBBegin = otherItIABegin;
+    goNext(otherItIBBegin, 2);
+
+    // Copy over data for left gutter.
+    {
+        TIterator itM = itMBegin;
+        TIterator otherItM = otherItMBegin;
+        TIterator itIB = itIBBegin;
+        TIterator otherItIB = otherItIBBegin;
+        for (TOverlap i = 0; i < overlap0 + 1; ++i) {
+            *itM = *otherItM;
+            *itIB = *otherItIB;
+            goNext(itM, 0);
+            goNext(otherItM, 0);
+            goPrevious(otherItM, 1);
+            goNext(itIB, 0);
+            goNext(otherItIB, 0);
+            goPrevious(otherItIB, 1);
+        }
+        // Init the rest of the left gutter with infima.
+        for (TPosition i = overlap0 + 1, iend = length(matrix, 0); i < iend; ++i, goNext(itM, 0), goNext(itIB, 0)) {
+            *itM = MinValue<TScoreValue>::VALUE / 2;
+            *itIB = MinValue<TScoreValue>::VALUE / 2;
+        }
+    }
+
+    // Copy over data for top gutter.
+    {
+        TIterator itM = itMBegin;
+        TIterator otherItM = otherItMBegin;
+        TIterator itIA = itIABegin;
+        TIterator otherItIA = otherItIABegin;
+        for (TOverlap i = 0; i < overlap1 + 1; ++i) {
+            *itM = *otherItM;
+            *itIA = *otherItIA;
+            goNext(itM, 1);
+            goNext(otherItM, 1);
+            goNext(itIA, 1);
+            goNext(otherItIA, 1);
+        }
+        // Init the rest of the top gutter with infima.
+        for (TPosition i = overlap1 + 1, iend = length(matrix, 1); i < iend; ++i, goNext(itM, 1), goNext(itIA, 1)) {
+            *itM = MinValue<TScoreValue>::VALUE / 2;
+            *itIA = MinValue<TScoreValue>::VALUE / 2;
+        }
+    }
+}
+
+
+template <typename TScoreValue, typename TSequence>
+inline void
+_alignFillMatrix(Matrix<TScoreValue, 3> & matrix, TSequence const & sequence0, TSequence const & sequence1, Score<TScoreValue, Simple> const & scoringScheme, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_EQ(length(matrix, 2), 3u);
+
+    typedef Matrix<TScoreValue, 3> TMatrix;
+    typedef typename Position<TMatrix>::Type TPosition;
+    typedef typename Iterator<TMatrix>::Type TMatrixIterator;
+    typedef typename Iterator<TSequence, Standard>::Type TSequenceIterator;
+
+    // We need three iterators in each alignment matrix to fill it.
+    // it*Top point to the cell in the top row of the current column.
+    // it*Left points to the column to the top left of the current
+    // cell.  it*Above points to the cell above the current cell.  We
+    // can use it*Above for value assignment.
+    TMatrixIterator itMTop = begin(matrix);
+    TMatrixIterator itMAbove;
+    TMatrixIterator itMLeft;
+    TMatrixIterator itIATop = itMTop;
+    goNext(itIATop, 2);
+    TMatrixIterator itIAAbove;
+    TMatrixIterator itIALeft;
+    TMatrixIterator itIBTop = itIATop;
+    goNext(itIBTop, 2);
+    TMatrixIterator itIBAbove;
+    TMatrixIterator itIBLeft;
+
+    // Compute score values so they are available locally and it maybe
+    // is easier to the compiler to save some indirect adressing.
+    TScoreValue matchScore = scoreMatch(scoringScheme);
+    TScoreValue mismatchScore = scoreMismatch(scoringScheme);
+    TScoreValue gapOpenScore = scoreGapOpen(scoringScheme);
+    TScoreValue gapExtendScore = scoreGapExtend(scoringScheme);
+
+    // Perform the matrix filling, column-wise for cache efficiency.
+    for (TSequenceIterator it1 = begin(sequence1), it1End = end(sequence1); it1 != it1End; ++it1) {
+        // std::cout << "iteration it1" << std::endl;
+        itMLeft = itMTop;
+        itIALeft = itIATop;
+        itIBLeft = itIBTop;
+        goNext(itMTop, 1);
+        goNext(itIATop, 1);
+        goNext(itIBTop, 1);
+        itMAbove = itMTop;
+        itIAAbove = itIATop;
+        itIBAbove = itIBTop;
+        for (TSequenceIterator it0 = begin(sequence0), it0End = end(sequence0); it0 != it0End; ++it0) {
+            // std::cout << "  iteration it0" << std::endl;
+            // Compute M_{i-1,j-1} + match/mismatch
+            TScoreValue scoreMoveDiagonal = *itMLeft + ((*it0 == *it1) ? matchScore : mismatchScore);
+            goNext(itMLeft, 0);
+            // Compute I^a_{i,j}
+            TScoreValue scoreIA = _max(*itMAbove + gapOpenScore, *itIAAbove + gapExtendScore);
+            goNext(itIALeft, 0);  // TODO(holtgrew): Remove IALeft? Not necessary!
+            goNext(itIAAbove, 0);
+            *itIAAbove = scoreIA;
+            // Compute I^b_{i,j}
+            goNext(itIBLeft, 0);
+            TScoreValue scoreIB = _max(*itMLeft + gapOpenScore, *itIBLeft + gapExtendScore);
+            goNext(itIBAbove, 0);
+            *itIBAbove = scoreIB;
+            // Assign M_{i,j}
+            goNext(itMAbove, 0);
+            *itMAbove = _max(scoreMoveDiagonal, _max(*itIAAbove, *itIBAbove));
+        }
+    }
+
+    // TODO(holtgrew): Debug code, remove when working.
+    {
+        for (int k = 0; k < 3; ++k) {
+            std::cerr << ",-- *** filled alignment matrix " << k << std::endl;
+            for (unsigned i = 0; i < length(matrix, 0); ++i) {
+                for (unsigned j = 0; j < length(matrix, 1); ++j) {
+                    if (value(matrix, i, j, k) <= MinValue<int>::VALUE / 4)
+                        std::cerr << "\tinf";
+                    else
+                        std::cerr << "\t" << value(matrix, i, j, k);
+                }
+                std::cerr << std::endl;
+            }
+            std::cerr << "`--" << std::endl;
+        }
+    }
+}
+
+// Compute traceback in the given normal DP alignment matrix, starting
+// at the lower right, shifted by the given overlap to the upper left.
+// The matrix was filled with the Needleman-Wunschla lgorithm, end
+// gaps are free as configured by the AlignConfig object.  Returns the
+// best score.
+template <typename TAlignmentIterator, typename TSequenceIterator, typename TPosition, typename TScoreValue, typename TScoringScheme, typename TOverlap, bool START0_FREE, bool START1_FREE, bool END0_FREE, bool END1_FREE>
+TScoreValue
+_alignTraceback(TAlignmentIterator & alignmentIt0, TAlignmentIterator & alignmentIt1, TSequenceIterator & sourceIt0, TSequenceIterator & sourceIt1, TPosition & finalPos0, TPosition & finalPos1, Matrix<TScoreValue, 3> /*const*/ & matrix, TScoringScheme const & scoringScheme, TOverlap lowerRightOverlap0, TOverlap lowerRightOverlap1, TOverlap upperLeftOverlap0, TOverlap upperLeftOverlap1, bool goToTopLeft, AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const &, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+
+    std::cout << "unbanded traceback" << std::endl;
+
+    // Suppress warnings about unused parameters.
+    (void) scoringScheme;
+
+    typedef Matrix<TScoreValue, 3> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TMatrixIterator;
+
+    // Initialization
+    //
+    // Current position in the matrix.  Note that this is the position
+    // in the matrix including the gutter.  When writing this out, we
+    // want to have the position in the matrix, excluding the gutter,
+    // i.e. everything is shifted to the upper left.
+    TPosition pos0 = length(matrix, 0) - lowerRightOverlap0 + (finalPos0 - 1);
+    TPosition pos1 = length(matrix, 1) - lowerRightOverlap1 + (finalPos1 - 1);
+    // Iterators to current entries in the matrices.
+    TMatrixIterator diagonalIt = begin(matrix);
+    goTo(diagonalIt, pos0, pos1);
+    std::cout << "STARTING AT (" << pos0 << ", " << pos1 << ")" << std::endl;
+    TMatrixIterator verticalIt = diagonalIt;
+    goNext(verticalIt, 2);
+    TMatrixIterator horizontalIt = verticalIt;
+    goNext(horizontalIt, 2);
+
+    // TODO(holtgrew): At this point, we could search for the starting point of the backtrace if free end gaps were suppported.
+    //
+    SEQAN_ASSERT_NOT_MSG(END0_FREE, "Free end gaps are not supported yet.");
+    SEQAN_ASSERT_NOT_MSG(END1_FREE, "Free end gaps are not supported yet.");
+
+    // Flags for movement, also determines which matrix we are in.
+    // TODO(holtgrew): Maybe better use an enum here?
+    bool horizontal = false;
+    bool vertical = false;
+    bool diagonal = false;
+    TScoreValue result = *diagonalIt;
+    if (*diagonalIt > *horizontalIt) {
+        if (*diagonalIt > *verticalIt)
+            diagonal = true;
+        else
+            vertical = true;
+    } else {
+        if (*horizontalIt > *verticalIt)
+            horizontal = true;
+        else
+            vertical = true;
+    }
+
+    // Now, perform the traceback.
+    while (true) {
+        // Break condition depends on whether this is the leading
+        // rectangle, i.e. we want to go to the upper left corner.
+        if (goToTopLeft) {
+            if (pos0 == static_cast<TPosition>(0) || pos1 == static_cast<TPosition>(0))
+                break;
+        } else {
+            // If we do not walk up to the upper left corner, we at
+            // least have to move into the overlapping area.
+            std::cerr << "pos0 == " << pos0 << " pos1 == " << pos1 << std::endl;
+            if ((pos0 <= static_cast<TPosition>(1) || pos1 <= static_cast<TPosition>(1)) || (pos0 < static_cast<TPosition>(upperLeftOverlap0) && pos1 < static_cast<TPosition>(upperLeftOverlap1)))
+                break;
+        }
+
+        if (diagonal) {
+            std::cout << "DIAGONAL" << std::endl;
+            // Move iterators in sequences, alignment rows and matrices.
+            goPrevious(sourceIt0);
+            goPrevious(sourceIt1);
+            goPrevious(alignmentIt0);
+            goPrevious(alignmentIt1);
+            goPrevious(diagonalIt, 0);
+            goPrevious(diagonalIt, 1);
+            goPrevious(horizontalIt, 0);
+            goPrevious(horizontalIt, 1);
+            goPrevious(verticalIt, 0);
+            goPrevious(verticalIt, 1);
+            SEQAN_ASSERT_GEQ(pos0, 1u);
+            SEQAN_ASSERT_GEQ(pos1, 1u);
+            pos0 -= 1;
+            pos1 -= 1;
+
+            // Update the movement/matrix indicators.
+            // TODO(holtgrew): This code will prefer gaps over matches, should be changed.
+            if (*diagonalIt > *horizontalIt) {
+                if (*diagonalIt <= *verticalIt) {
+                    vertical = true;
+                    diagonal = false;
+                }
+            } else {
+                diagonal = false;
+                if (*horizontalIt > *verticalIt)
+                    horizontal = true;
+                else
+                    vertical = true;
+            }
+        } else if (vertical) {
+            std::cout << "VERTICAL" << std::endl;
+            // Insert gap.
+            insertGap(alignmentIt1);
+
+            // Move iterators in sequence, alignment rows and matrices.,
+            goPrevious(sourceIt0);
+            goPrevious(alignmentIt0);
+            goPrevious(diagonalIt, 0);
+            goPrevious(verticalIt, 0);
+            goPrevious(horizontalIt, 0);
+            pos0 -= 1;
+
+            // std::cout << "  *verticalIt == " << *verticalIt << ", *horizontalIt == " << *horizontalIt << ", *diagonalIt == " << *diagonalIt << std::endl;
+
+            // Update the movement/matrix indicators.
+            if (*verticalIt >= *horizontalIt) {
+                if (*diagonalIt > *verticalIt) {
+                    diagonal = true;
+                    vertical = false;
+                }
+            } else {
+                vertical = false;
+                if (*diagonalIt > *horizontalIt)
+                    diagonal = true;
+                else
+                    horizontal = true;
+            }
+        } else {
+            SEQAN_ASSERT_TRUE(horizontal);
+            std::cout << "HORIZONTAL" << std::endl;
+            // Insert gap.
+            insertGap(alignmentIt0);
+                    
+            // Move iterators in sequence, alignment rows and matrices.,
+            goPrevious(sourceIt1);
+            goPrevious(alignmentIt1);
+            goPrevious(diagonalIt, 1);
+            goPrevious(verticalIt, 1);
+            goPrevious(horizontalIt, 1);
+            pos1 -= 1;
+
+            // std::cout << "  *verticalIt == " << *verticalIt << ", *horizontalIt == " << *horizontalIt << ", *diagonalIt == " << *diagonalIt << std::endl;
+                    
+            // Move iterators in sequence, alignment rows and matrices.,
+            // Update the movement/matrix indicators.
+            if (*horizontalIt >= *verticalIt) {
+                if (*diagonalIt > *horizontalIt) {
+                    diagonal = true;
+                    horizontal = false;
+                }
+            } else {
+                horizontal = false;
+                if (*diagonalIt > *verticalIt)
+                    diagonal = true;
+                else
+                    vertical = true;
+            }
+        }
+    }
+    // std::cout << "pos0 == " << pos0 << ", pos1 == " << pos1 << std::endl;
+
+    // Go to the top left of the matrix if configured to do so.
+    if (goToTopLeft) {
+        if (pos0 > 0) {
+            goPrevious(alignmentIt1);
+            for (TPosition i = 0; i < pos0; ++i) {
+                // std::cout << "Inserting " << pos0 << " gaps into alignment row 1" << std::endl;
+                goPrevious(sourceIt0);
+                goPrevious(alignmentIt0);
+                // std::cout << "  *alignmentIt0 == " << convert<char>(*alignmentIt0) << std::endl;
+                // std::cout << __FILE__ << ":" << __LINE__ << "-- gap in dimension 1" << std::endl;
+                insertGap(alignmentIt1);
+            }
+            pos0 = 0;
+        }
+        if (pos1 > 0) {
+            goPrevious(alignmentIt0);
+            for (TPosition i = 0; i< pos1; ++i) {
+                // std::cout << "Inserting " << pos0 << " gaps into alignment row 0" << std::endl;
+                goPrevious(sourceIt1);
+                goPrevious(alignmentIt1);
+                // std::cout << "  *alignmentIt1 == " << convert<char>(*alignmentIt1) << std::endl;
+                // std::cout << __FILE__ << ":" << __LINE__ << "-- gap in dimension 0" << std::endl;
+                insertGap(alignmentIt0);
+            }
+            pos1 = 0;
+        }
+    }
+
+    // Write out the final positions in the alignment matrix.  Convert
+    // from position in the current alignment matrix with gutter to
+    // positioin without gutter by shifting the position to the upper
+    // left.
+    finalPos0 = pos0;
+    finalPos1 = pos1;
+    std::cout << "finalPos0 = " << finalPos0 << ", finalPos1 = " << finalPos1 << std::endl;
+
+    return result;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEEDS_ALIGN_DYNPROG_AFFINE_H_
+
diff --git a/src/SeqAn-1.3/seqan/seeds2/align_dynprog_banded_affine.h b/src/SeqAn-1.3/seqan/seeds2/align_dynprog_banded_affine.h
new file mode 100644
index 0000000..8081643
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/align_dynprog_banded_affine.h
@@ -0,0 +1,563 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+
+// TODO(holtgrew): Maybe adjust rausch's code so things can be copied in and use it instead since it is heavily tuned?
+
+#ifndef SEQAN_SEEDS_ALIGN_DYNPROG_BANDED_AFFINE_H_
+#define SEQAN_SEEDS_ALIGN_DYNPROG_BANDED_AFFINE_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TScoreValue, typename TSequence, typename TDiagonal>
+inline void
+_alignBandedResizeMatrix(Matrix<TScoreValue, 3> & matrix, TSequence const & sequence0, TSequence const & sequence1, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+
+    (void) sequence1;  // In case we do not run in debug mode.
+
+    SEQAN_ASSERT_GEQ(upperDiagonal, 0);
+    SEQAN_ASSERT_LEQ(lowerDiagonal, 0);
+    SEQAN_ASSERT_GEQ_MSG(length(sequence1) - lowerDiagonal, length(sequence0), "Lower diagonal is not low enough.");
+    SEQAN_ASSERT_GEQ_MSG(length(sequence0) + upperDiagonal, length(sequence1), "Upper diagonal is not high enough.");
+
+    // We need space length(sequence0) x bandwidth for the alignment,
+    // the top gutter and the left and right gutters.
+    setLength(matrix, 0, length(sequence0) + 1);
+    setLength(matrix, 1, upperDiagonal - lowerDiagonal + 3);
+    setLength(matrix, 2, 3);
+    resize(matrix);
+}
+
+
+template <typename TScoreValue, typename TDiagonal, bool BEGIN1_FREE, bool BEGIN0_FREE, bool END1_FREE, bool END0_FREE>
+inline void
+_alignBandedInitGutter(Matrix<TScoreValue, 3> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, AlignConfig<BEGIN1_FREE, BEGIN0_FREE, END1_FREE, END0_FREE> const &, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef Matrix<TScoreValue, 3> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TIterator;
+    typedef typename Position<TMatrix>::Type TPosition;
+    
+    // Initialize the diagonal below the lower one with infimas.
+    TIterator diagonalIt = begin(matrix);
+    TIterator verticalIt = diagonalIt;
+    goNext(verticalIt, 2);
+    TIterator horizontalIt = verticalIt;
+    goNext(horizontalIt, 2);
+    for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i, goNext(diagonalIt, 0), goNext(horizontalIt, 0)) {
+        *diagonalIt = MinValue<TScoreValue>::VALUE / 2;
+        *horizontalIt = MinValue<TScoreValue>::VALUE / 2;
+    }
+    // Initialize the left gutter according to the AlignConfig.
+    setPosition(diagonalIt, (1 - lowerDiagonal) * _dataFactors(matrix)[1]); // TODO(holtgrew): There should be a function that accepts two coordinates for the Matrix class.
+    verticalIt = diagonalIt;
+    goNext(verticalIt, 2);
+    horizontalIt = verticalIt;
+    goNext(horizontalIt, 2);
+    if (BEGIN0_FREE) {
+        for (TPosition i = 0, iend = -lowerDiagonal; i <= iend; ++i, goNext(diagonalIt, 0), goPrevious(diagonalIt, 1)) {
+            *diagonalIt = 0;
+        }
+    } else {
+        TScoreValue gapScore = scoreGap(scoringScheme);
+        TScoreValue x = 0;
+        for (TPosition i = 0, iend = -lowerDiagonal; i <= iend; ++i, goNext(diagonalIt, 0), goPrevious(diagonalIt, 1)) {
+            *diagonalIt = x;
+            x += gapScore;
+        }
+    }
+    for (TPosition i = 0, iend = -lowerDiagonal; i <= iend; ++i, goNext(verticalIt, 0), goPrevious(verticalIt, 1), goNext(horizontalIt, 0), goPrevious(horizontalIt, 1)) {
+        *verticalIt = MinValue<TScoreValue>::VALUE / 2;
+        *horizontalIt = MinValue<TScoreValue>::VALUE / 2;
+    }
+    // Initialize the top gutter according to the AlignConfig.
+    setPosition(diagonalIt, (1 - lowerDiagonal) * _dataFactors(matrix)[1]); // TODO(holtgrew): There should be a function that accepts two coordinates for the Matrix class.
+    verticalIt = diagonalIt;
+    goNext(verticalIt, 2);
+    horizontalIt = verticalIt;
+    goNext(horizontalIt, 2);
+    if (BEGIN1_FREE) {
+        for (TPosition i = 0, iend = upperDiagonal; i <= iend; ++i, goNext(diagonalIt, 1))
+            *diagonalIt = 0;
+    } else {
+        TScoreValue gapScore = scoreGap(scoringScheme);
+        TScoreValue x = 0;
+        for (TPosition i = 0, iend = upperDiagonal; i <= iend; ++i, goNext(diagonalIt, 1)) {
+            *diagonalIt = x;
+            x += gapScore;
+        }
+    }
+    for (TPosition i = 0, iend = upperDiagonal; i <= iend; ++i, goNext(verticalIt, 1), goNext(horizontalIt, 1)) {
+        *verticalIt = MinValue<TScoreValue>::VALUE / 2;
+        *horizontalIt = MinValue<TScoreValue>::VALUE / 2;
+    }
+    // Initialize the diagonal above the upper one with infimas.
+    for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i, goNext(diagonalIt, 0), goNext(verticalIt, 0)) {
+        *diagonalIt = MinValue<TScoreValue>::VALUE / 2;
+        *verticalIt = MinValue<TScoreValue>::VALUE / 2;
+    }
+}
+
+
+template <typename TScoreValue, typename TDiagonal, typename TOverlap>
+inline void
+_alignBandedInitGutterFromUnbanded(Matrix<TScoreValue, 3> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Matrix<TScoreValue, 3> /*const*/ & otherMatrix, TOverlap overlap0, TOverlap overlap1, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+
+    // TODO(holtgrew): Really unnecessary? Remove along with all other unused parameters in all align_*.h files.
+    (void) scoringScheme;
+    (void) upperDiagonal;
+
+    typedef Matrix<TScoreValue, 3> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TIterator;
+    typedef typename Position<TMatrix>::Type TPosition;
+
+    // Copy over left gutter column.
+    TIterator diagonalIt = begin(matrix);
+    goTo(diagonalIt, 0, 1 - lowerDiagonal);
+    TIterator verticalIt = diagonalIt;
+    goNext(verticalIt, 2);
+    TIterator horizontalIt = verticalIt;
+    goNext(horizontalIt, 2);
+    TIterator srcDiagonalIt = begin(otherMatrix);
+    goTo(srcDiagonalIt, length(otherMatrix, 0) - overlap0 - 1, length(otherMatrix, 1) - overlap1 - 1);
+    TIterator srcVerticalIt = srcDiagonalIt;
+    goNext(srcVerticalIt, 2);
+    TIterator srcHorizontalIt = srcVerticalIt;
+    goNext(srcHorizontalIt, 2);
+    for (TOverlap i = 0; i < overlap0 + 1; ++i) {
+        *diagonalIt = *srcDiagonalIt;
+        // *verticalIt = *srcVerticalIt;
+        *horizontalIt = *srcHorizontalIt;
+        goNext(srcDiagonalIt, 0);
+        // goNext(srcVerticalIt, 0);
+        goNext(srcHorizontalIt, 0);
+        goNext(diagonalIt, 0);
+        goPrevious(diagonalIt, 1);
+        // goNext(verticalIt, 0);
+        // goPrevious(verticalIt, 1);
+        goNext(horizontalIt, 0);
+        goPrevious(horizontalIt, 1);
+    }
+    // Initialize the diagonal below the lower one with infimas.
+    diagonalIt = begin(matrix);
+    verticalIt = diagonalIt;
+    goNext(verticalIt, 2);
+    horizontalIt = verticalIt;
+    goNext(horizontalIt, 2);
+    for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i, goNext(diagonalIt, 0), goNext(horizontalIt, 0)) {
+        *diagonalIt = MinValue<TScoreValue>::VALUE / 2;
+        *horizontalIt = MinValue<TScoreValue>::VALUE / 2;
+    }
+
+    // Copy over a row from the other matrix into the top gutter.
+    goTo(diagonalIt, 0, 1 - lowerDiagonal);
+    verticalIt = diagonalIt;
+    goNext(verticalIt, 2);
+    horizontalIt = verticalIt;
+    goNext(horizontalIt, 2);
+    srcDiagonalIt = begin(otherMatrix);
+    goTo(srcDiagonalIt, length(otherMatrix, 0) - overlap0 - 1, length(otherMatrix, 1) - overlap1 - 1);
+    srcVerticalIt = srcDiagonalIt;
+    goNext(srcVerticalIt, 2);
+    // srcHorizontalIt = srcVerticalIt;
+    // goNext(srcHorizontalIt, 2);
+    for (TOverlap i = 0; i < overlap1; ++i) {
+        *diagonalIt = *srcDiagonalIt;
+        *verticalIt = *srcVerticalIt;
+        // *horizontalIt = *srcHorizontalIt;
+        goNext(srcDiagonalIt, 1);
+        goNext(srcVerticalIt, 1);
+        // goNext(srcHorizontalIt, 1);
+        goNext(diagonalIt, 1);
+        goNext(verticalIt, 1);
+        // goNext(horizontalIt, 1);
+    }
+
+    // Initialize the diagonal above the upper one with infimas.
+    for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i, goNext(diagonalIt, 0), goNext(verticalIt, 0)) {
+        *diagonalIt = MinValue<TScoreValue>::VALUE / 2;
+        *verticalIt = MinValue<TScoreValue>::VALUE / 2;
+    }
+}
+
+
+template <typename TScoreValue, typename TSequence, typename TDiagonal>
+inline void
+_alignBandedFillMatrix(Matrix<TScoreValue, 3> & matrix, TSequence const & sequence0, TSequence const & sequence1, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_GEQ_MSG(upperDiagonal, 0, "Upper diagonal must not lie below main diagonal.");
+    SEQAN_ASSERT_LEQ_MSG(lowerDiagonal, 0, "Upper diagonal must not lie above main diagonal.");
+
+    typedef Matrix<TScoreValue, 3> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TMatrixIterator;
+    typedef typename Iterator<TSequence, Standard>::Type TSequenceIterator;
+    typedef typename Size<TSequence>::Type TSize;
+    typedef typename Position<TSequence>::Type TPosition;
+
+    // We need three iterators in each alignment matrix to fill it.
+    // it*Top points to the cell in the top row of the current column.
+    // it*Left points to the column to the top left of the current
+    // cell.  it*Above points to the cell above the current cell.  We
+    // can use itAbove for value assignment.
+    TMatrixIterator itMTop = begin(matrix);
+    TMatrixIterator itMAbove;
+    TMatrixIterator itMLeft;
+    TMatrixIterator itIATop;
+    TMatrixIterator itIAAbove;
+    TMatrixIterator itIALeft;
+    TMatrixIterator itIBTop;
+    TMatrixIterator itIBAbove;
+    TMatrixIterator itIBLeft;
+
+    // Compute score values so they are available locally and it maybe
+    // is easier to the compiler to save some indirect adressing.
+    TScoreValue matchScore = scoreMatch(scoringScheme);
+    TScoreValue mismatchScore = scoreMismatch(scoringScheme);
+    TScoreValue gapOpenScore = scoreGapOpen(scoringScheme);
+    TScoreValue gapExtendScore = scoreGapExtend(scoringScheme);
+
+    // Fill matrix column wise for cache efficiency.  For this, we
+    // need the length of the current column in the sheared alignment
+    // matrix which complicates things.
+    setPosition(itMTop, (1 - lowerDiagonal) * _dataFactors(matrix)[1]); // TODO(holtgrew): There should be a function that accepts two coordinates for the Matrix class.
+    itIATop = itMTop;
+    goNext(itIATop, 2);
+    itIBTop = itIATop;
+    goNext(itIBTop, 2);
+    TPosition seq1Pos = 0;
+    TSequenceIterator it0Begin = begin(sequence0);
+    for (TSequenceIterator it1 = begin(sequence1), it1end = end(sequence1); it1 != it1end; ++it1, ++seq1Pos) {
+        if (seq1Pos <= static_cast<TPosition>(upperDiagonal)) {
+            itMLeft = itMTop;
+            goNext(itMTop, 1);
+            itIALeft = itIATop;
+            goNext(itIATop, 1);
+            itIBLeft = itIBTop;
+            goNext(itIBTop, 1);
+        } else {
+            goNext(itMTop, 0);
+            itMLeft = itMTop;
+            goPrevious(itMLeft, 1);
+            goNext(itIATop, 0);
+            itIALeft = itIATop;
+            goPrevious(itIALeft, 1);
+            goNext(itIBTop, 0);
+            itIBLeft = itIBTop;
+            goPrevious(itIBLeft, 1);
+        }
+        itMAbove = itMTop;
+        itIAAbove = itIATop;
+        itIBAbove = itIBTop;
+        TDiagonal from = _max(static_cast<TDiagonal>(seq1Pos) - upperDiagonal, TDiagonal(0));
+        TDiagonal to = _min(seq1Pos - lowerDiagonal, length(sequence0) - 1);
+        TDiagonal tmp = 1 + to - from;
+        TSize runLength = _max(TDiagonal(0), tmp);
+        // std::cout << "RUN LENGTH == " << runLength << std::endl;
+        // std::cout << "from == " << from << std::endl << "to == " << to << std::endl;
+        // std::cout << "seq1Pos = " << seq1Pos << std::endl;
+        // std::cout << "lowerDiagonal = " << lowerDiagonal << std::endl;
+        // std::cout << "length(sequence0) = " << length(sequence0) << std::endl;
+        // std::cout << "seq1Pos = " << seq1Pos << std::endl;
+        // std::cout << "upperDiagonal = " << upperDiagonal << std::endl;
+        TSize i = 0;
+        for (TSequenceIterator it0 = it0Begin; i < runLength; ++it0, ++i) {
+            // Compute M_{i-1,j-1} + match/mismatch
+            TScoreValue scoreMoveDiagonal = *itMLeft + ((*it0 == *it1) ? matchScore : mismatchScore);
+            goNext(itMLeft, 0);
+            goPrevious(itMLeft, 1);
+            // Compute I^a_{i,j}
+            TScoreValue scoreIA = _max(*itMAbove + gapOpenScore, *itIAAbove + gapExtendScore);
+            goNext(itIALeft, 0);  // TODO(holtgrew): Remove IALeft? Not necessary!
+            goPrevious(itIALeft, 1);
+            goNext(itIAAbove, 0);
+            goPrevious(itIAAbove, 1);
+            *itIAAbove = scoreIA;
+            // Compute I^b_{i,j}
+            goNext(itIBLeft, 0);
+            goPrevious(itIBLeft, 1);
+            TScoreValue scoreIB = _max(*itMLeft + gapOpenScore, *itIBLeft + gapExtendScore);
+            goNext(itIBAbove, 0);
+            goPrevious(itIBAbove, 1);
+            *itIBAbove = scoreIB;
+            // Assign M_{i,j}
+            goNext(itMAbove, 0);
+            goPrevious(itMAbove, 1);
+            *itMAbove = _max(scoreMoveDiagonal, _max(*itIAAbove, *itIBAbove));
+        }
+        // std::cout << "++it1" << std::endl;
+        // We only need an offset for it0 when all diagonals up to the
+        // upper one are aligned.
+        if (seq1Pos >= static_cast<TPosition>(upperDiagonal))
+            it0Begin += 1;
+    }
+
+    // // TODO(holtgrew): Debug code, remove when working.
+    {
+        for (int k = 0; k < 3; ++k) {
+            std::cerr << ",-- *** filled banded alignment matrix " << k << std::endl;
+            for (unsigned i = 0; i < length(matrix, 0); ++i) {
+                std::cerr << "| ";
+                for (unsigned j = 0; j < i; ++j)
+                    std::cerr << "\t";
+                for (unsigned j = 0; j < length(matrix, 1); ++j) {
+                    if (value(matrix, i, j, k) <= MinValue<int>::VALUE / 4)
+                        std::cerr << "\tinf";
+                    else
+                        std::cerr << "\t" << value(matrix, i, j, k);
+                }
+                std::cerr << std::endl;
+            }
+            std::cerr << "`--" << std::endl;
+        }
+    }
+}
+
+
+// Compute traceback in the given banded alignment matrix, starting at
+// the lower right, shifted by the given overlap to the upper left.
+// The matrix was filled with the Needleman-Wunschla lgorithm, end
+// gaps are free as configured by the AlignConfig object.  Returns the
+// best score.
+template <typename TAlignmentIterator, typename TSequenceIterator, typename TPosition, typename TScoreValue, typename TScoringScheme, typename TOverlap, bool START0_FREE, bool START1_FREE, bool END0_FREE, bool END1_FREE>
+TScoreValue
+_alignBandedTraceback(TAlignmentIterator & alignmentIt0, TAlignmentIterator & alignmentIt1, TSequenceIterator & sourceIt0, TSequenceIterator & sourceIt1, TPosition & finalPos0, TPosition & finalPos1, Matrix<TScoreValue, 3> /*const*/ & matrix, TScoringScheme const & scoringScheme, TOverlap overlap0, TOverlap overlap1, TOverlap upperTriangleEdgeLength, TOverlap lowerTriangleEdgeLength, bool goToTopLeft, AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const &, Gotoh const &)
+{
+    SEQAN_CHECKPOINT;
+    // std::cout << "banded traceback" << std::endl;
+
+    // Suppress unused parameters warning.
+    (void) scoringScheme;
+
+    typedef Matrix<TScoreValue, 3> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TMatrixIterator;
+
+    // Initialization
+    //
+    // Current position in the matrix.  Note that this is the position
+    // in the matrix including the gutter.  When writing this out, we
+    // want to have the position in the matrix, excluding the gutter,
+    // i.e. everything is shifted to the upper left.
+    TPosition pos0 = length(matrix, 0) - overlap0 + (finalPos0 - 1);
+    TPosition pos1 = length(matrix, 1) - overlap1 - lowerTriangleEdgeLength - 1 + (length(matrix, 0) - pos0 - 1) + (finalPos1 - 1);
+    // Iterators to current entries in the matrices.
+    TMatrixIterator diagonalIt = begin(matrix);
+    setPosition(diagonalIt, pos0 + pos1 * _dataFactors(matrix)[1]);  // TODO(holtgrew): Matrix class should have setPosition with coordinates.
+    std::cout << "STARTING AT (" << pos0 << ", " << pos1 << ")" << std::endl;
+    TMatrixIterator verticalIt = diagonalIt;
+    goNext(verticalIt, 2);
+    TMatrixIterator horizontalIt = verticalIt;
+    goNext(horizontalIt, 2);
+
+    // Search for starting point of the trace.
+    //
+    // Insert free end gaps if any.
+    //
+    // TODO(holtgrew): Currently not supported.
+    SEQAN_ASSERT_NOT_MSG(END0_FREE, "Free end gaps are not supported yet.");
+    SEQAN_ASSERT_NOT_MSG(END1_FREE, "Free end gaps are not supported yet.");
+
+    // Flags for movement, also determines which matrix we are in.
+    // TODO(holtgrew): Maybe better use an enum here?
+    bool horizontal = false;
+    bool vertical = false;
+    bool diagonal = false;
+    TScoreValue result = *diagonalIt;
+    if (*diagonalIt > *horizontalIt) {
+        if (*diagonalIt > *verticalIt)
+            diagonal = true;
+        else
+            vertical = true;
+    } else {
+        if (*horizontalIt > *verticalIt)
+            horizontal = true;
+        else
+            vertical = true;
+    }
+
+    // Now, perform the traceback.
+    // std::cerr << "before loop " << __LINE__ << std::endl;
+    while (true) {
+        // std::cerr << "in loop " << __LINE__ << std::endl;
+        // std::cerr << "pos0 = " << pos0 << " pos1 = " << pos1 << std::endl;
+        // std::cerr << "upperTriangleEdgeLength = " << upperTriangleEdgeLength << std::endl;
+        if (pos0 <= static_cast<TPosition>(1))
+          break;
+        if (pos0 <= static_cast<TPosition>(upperTriangleEdgeLength) && pos1 <= static_cast<TPosition>(upperTriangleEdgeLength + 1 - pos0))
+          break;
+
+        SEQAN_ASSERT_GT(pos1, static_cast<TPosition>(0));
+
+        // Determine
+        if (diagonal) {
+            std::cout << "DIAGONAL" << std::endl;
+            // Move iterators in sequences, alignment rows and matrices.
+            goPrevious(sourceIt0);  // XXX
+            goPrevious(sourceIt1);  // XXX
+            goPrevious(alignmentIt0);  // XXX
+            goPrevious(alignmentIt1);  // XXX
+            goPrevious(diagonalIt, 0);
+            // goPrevious(diagonalIt, 1);
+            goPrevious(horizontalIt, 0);
+            // goPrevious(horizontalIt, 1);
+            goPrevious(verticalIt, 0);
+            // goPrevious(verticalIt, 1);
+            pos0 -= 1;
+            // pos1 -= 1;
+
+            // Update the movement/matrix indicators.
+            // TODO(holtgrew): Do not access {diagonal,horizontal,vertical}It if invalid!
+            // TODO(holtgrew): This code will prefer gaps over matches, should be changed.
+            if (*diagonalIt > *horizontalIt) {
+                if (*diagonalIt <= *verticalIt) {
+                    vertical = true;
+                    diagonal = false;
+                }
+            } else {
+                diagonal = false;
+                if (*horizontalIt > *verticalIt)
+                    horizontal = true;
+                else
+                    vertical = true;
+            }
+        } else if (vertical) {
+            std::cout << "VERTICAL" << std::endl;
+            // Insert gap.
+            insertGap(alignmentIt0);
+
+            // Move iterators in sequence, alignment rows and matrices.,
+            goPrevious(sourceIt0);
+            goPrevious(alignmentIt0);
+            goPrevious(diagonalIt, 0);
+            goNext(diagonalIt, 1);  // XXX added
+            goPrevious(verticalIt, 0);
+            goNext(verticalIt, 1);  // XXX added
+            goPrevious(horizontalIt, 0);
+            goNext(horizontalIt, 1);  // XXX added
+            pos0 -= 1;
+            pos1 += 1;
+
+            // Update the movement/matrix indicators.
+            // TODO(holtgrew): Do not access {diagonal,horizontal,vertical}It if invalid!
+            // TODO(holtgrew): This code will prefer gaps over matches, should be changed.
+            if (*verticalIt >= *horizontalIt) {
+                if (*diagonalIt > *verticalIt) {
+                    diagonal = true;
+                    vertical = false;
+                }
+            } else {
+                vertical = false;
+                if (*diagonalIt > *horizontalIt)
+                    diagonal = true;
+                else
+                    horizontal = true;
+            }
+        } else {
+            SEQAN_ASSERT_TRUE(horizontal);
+            std::cout << "HORIZONTAL" << std::endl;
+            // Insert gap.
+            insertGap(alignmentIt1);
+                    
+            // Move iterators in sequence, alignment rows and matrices.,
+            goPrevious(sourceIt1);
+            goPrevious(alignmentIt1);
+            goPrevious(diagonalIt, 1);
+            goPrevious(verticalIt, 1);
+            goPrevious(horizontalIt, 1);
+            pos1 -= 1;
+                    
+            // Move iterators in sequence, alignment rows and matrices.,
+            // Update the movement/matrix indicators.
+            // TODO(holtgrew): Do not access {diagonal,horizontal,vertical}It if invalid!
+            // TODO(holtgrew): This code will prefer gaps over matches, should be changed.
+            if (*horizontalIt >= *verticalIt) {
+                if (*diagonalIt > *horizontalIt) {
+                    diagonal = true;
+                    horizontal = false;
+                }
+            } else {
+                horizontal = false;
+                if (*diagonalIt > *verticalIt)
+                    diagonal = true;
+                else
+                    vertical = true;
+            }
+        }
+    }
+
+    // Go to the top left of the matrix if configured to do so.
+    //
+    // TODO(holtgrew): Currently not supported.
+    SEQAN_ASSERT_NOT_MSG(goToTopLeft, "goToTopLeft is currently not supported in banded alignment.");
+
+    // Write out the final positions in the alignment matrix.  Convert
+    // from position in the current alignment matrix with gutter to
+    // positioin with gutter.  Adjust for the shear of the matrix.
+    // std::cout << "@and: pos0 = " << pos0 << ", pos1 = " << pos1 << std::endl;
+    finalPos0 = pos0;
+    finalPos1 = pos1 - 1 - (upperTriangleEdgeLength - pos0);
+    //SEQAN_ASSERT_EQ_MSG(finalPos0, 1u, "Must reach top of matrix in banded alignment traceback.");
+#if SEQAN_DEBUGGING
+    if (pos0 > static_cast<TPosition>(1) &&
+        (pos0 > upperTriangleEdgeLength ||
+         pos1 > static_cast<TPosition>(upperTriangleEdgeLength + 1 - pos0)))
+        SEQAN_ASSERT_FAIL("Must reach upper left of matrix in banded alignment traceback.");
+#endif  // #if SEQAN_DEBUGGING
+    std::cout << "upper triangle length = " << upperTriangleEdgeLength << std::endl;
+    std::cout << "finalPos0 = " << finalPos0 << ", finalPos1 = " << finalPos1 << std::endl;
+
+    return result;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEEDS_ALIGN_DYNPROG_BANDED_AFFINE_H_
+
diff --git a/src/SeqAn-1.3/seqan/seeds2/align_dynprog_banded_linear.h b/src/SeqAn-1.3/seqan/seeds2/align_dynprog_banded_linear.h
new file mode 100644
index 0000000..ce3a600
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/align_dynprog_banded_linear.h
@@ -0,0 +1,495 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Banded linear programming for sequence alignment.  Needleman Wunsch
+// implementation, i.e. for linear gap costs only.
+//
+// The alignment code could use some optimization.  However, we cannot
+// use the same optimization as in the graph alignment since we want to
+// compute globally optimal trace through multiple connected alignment
+// matrices.
+//
+// The banding is done in dimension 1, dimension 0 is there completely.
+// ==========================================================================
+
+// TODO(holtgrew): Maybe adjust rausch's code so things can be copied in and use it instead since it is heavily tuned?
+
+#ifndef SEQAN_SEEDS_ALIGN_DYNPROG_BANDED_LINEAR_H_
+#define SEQAN_SEEDS_ALIGN_DYNPROG_BANDED_LINEAR_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TScoreValue, typename TSequence, typename TDiagonal>
+inline void
+_alignBandedResizeMatrix(Matrix<TScoreValue, 2> & matrix, TSequence const & sequence0, TSequence const & sequence1, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, NeedlemanWunsch const &)
+{
+    SEQAN_CHECKPOINT;
+
+    (void) sequence1;  // In case we do not run in debug mode.
+
+    SEQAN_ASSERT_GEQ(upperDiagonal, 0);
+    SEQAN_ASSERT_LEQ(lowerDiagonal, 0);
+    SEQAN_ASSERT_GEQ_MSG(length(sequence1) - lowerDiagonal, length(sequence0), "Lower diagonal is not low enough.");
+    SEQAN_ASSERT_GEQ_MSG(length(sequence0) + upperDiagonal, length(sequence1), "Upper diagonal is not high enough.");
+
+    // We need space length(sequence0) x bandwidth for the alignment,
+    // the top gutter and the left and right gutters.
+    setLength(matrix, 0, length(sequence0) + 1);
+    setLength(matrix, 1, upperDiagonal - lowerDiagonal + 3);
+    resize(matrix);
+    // resize(matrix, -42);
+}
+
+
+template <typename TScoreValue, typename TDiagonal, bool BEGIN1_FREE, bool BEGIN0_FREE, bool END1_FREE, bool END0_FREE>
+inline void
+_alignBandedInitGutter(Matrix<TScoreValue, 2> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, AlignConfig<BEGIN1_FREE, BEGIN0_FREE, END1_FREE, END0_FREE> const &, NeedlemanWunsch const &)
+{
+    SEQAN_CHECKPOINT;
+
+    (void) scoringScheme;
+
+    SEQAN_ASSERT_EQ_MSG(scoreGapOpen(scoringScheme), scoreGapExtend(scoringScheme),
+                        "Only linear gap costs allowed for Needleman-Wunsch.");
+
+    typedef Matrix<TScoreValue, 2> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TIterator;
+    typedef typename Position<TMatrix>::Type TPosition;
+    
+    // Initialize the diagonal below the lower one with infimas.
+    TIterator it = begin(matrix);
+    for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i, goNext(it, 0))
+        *it = MinValue<TScoreValue>::VALUE / 2;
+    // Initialize the left gutter according to the AlignConfig.
+    goTo(it, 0, 1 - lowerDiagonal);
+    if (BEGIN0_FREE) {
+        for (TPosition i = 0, iend = -lowerDiagonal; i <= iend; ++i, goNext(it, 0), goPrevious(it, 1))
+            *it = 0;
+    } else {
+        TScoreValue gapScore = scoreGap(scoringScheme);
+        TScoreValue x = 0;
+        for (TPosition i = 0, iend = -lowerDiagonal; i <= iend; ++i, goNext(it, 0), goPrevious(it, 1)) {
+            *it = x;
+            x += gapScore;
+        }
+    }
+    // Initialize the top gutter according to the AlignConfig.
+    goTo(it, 0, 1 - lowerDiagonal);
+    if (BEGIN1_FREE) {
+        for (TPosition i = 0, iend = upperDiagonal; i <= iend; ++i, goNext(it, 1))
+            *it = 0;
+    } else {
+        TScoreValue gapScore = scoreGap(scoringScheme);
+        TScoreValue x = 0;
+        for (TPosition i = 0, iend = upperDiagonal; i <= iend; ++i, goNext(it, 1)) {
+            *it = x;
+            x += gapScore;
+        }
+    }
+    // Initialize the diagonal above the upper one with infimas.
+    for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i, goNext(it, 0))
+        *it = MinValue<TScoreValue>::VALUE / 2;
+}
+
+
+template <typename TScoreValue, typename TDiagonal, typename TOverlap>
+inline void
+_alignBandedInitGutterFromUnbanded(Matrix<TScoreValue, 2> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Matrix<TScoreValue, 2> /*const*/ & otherMatrix, TOverlap overlap0, TOverlap overlap1, NeedlemanWunsch const &)
+{
+    SEQAN_CHECKPOINT;
+
+    // TODO(holtgrew): Really unnecessary? Remove along with all other unused parameters in all align_*.h files.
+    (void) scoringScheme;
+    (void) upperDiagonal;
+
+    SEQAN_ASSERT_EQ_MSG(scoreGapOpen(scoringScheme), scoreGapExtend(scoringScheme),
+                        "Only linear gap costs allowed for Needleman-Wunsch.");
+
+    typedef Matrix<TScoreValue, 2> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TIterator;
+    typedef typename Position<TMatrix>::Type TPosition;
+    
+    // // TODO(holtgrew): Debug code.
+    // std::cout << ",-- NW Matrix to copy in... " << length(otherMatrix, 0) << " x " << length(otherMatrix, 1) << std::endl;
+    // for (unsigned i = 0; i < length(otherMatrix, 0); ++i) {
+    //     std::cout << "|\t";
+    //     for (unsigned j = 0; j < length(otherMatrix, 1); ++j) {
+    //         std::cout << value(otherMatrix, i, j) << "\t";
+    //     }
+    //     std::cout << std::endl;
+    // }
+    // std::cout << "`--" << std::endl;
+    // Copy over a column from the other matrix into the left gutter.
+    // std::cout << "overlap0 = " << overlap0 << " overlap1 = " << overlap1 << std::endl;
+    // std::cout << "pos = " << (length(otherMatrix, 0) - overlap0 - 1) + (length(otherMatrix, 1) - overlap1 - 1) * _dataFactors(otherMatrix)[1] << std::endl;
+    // Copy over values from the left gutter column of otherMatrix.
+    TIterator srcIt = begin(otherMatrix);
+    TIterator it = begin(matrix);
+    goTo(srcIt, length(otherMatrix, 0) - overlap0 - 1, length(otherMatrix, 1) - overlap1 - 1);
+    goTo(it, 0, 1 - lowerDiagonal);
+    for (TOverlap i = 0; i < overlap0 + 1; ++i) {
+        // std::cout << "*srcIt = " << *srcIt << std::endl;
+        *it = *srcIt;
+        goNext(srcIt, 0);
+        goNext(it, 0);
+        goPrevious(it, 1);
+    }
+    // Initialize the diagonal below the lower one with infimas.
+    it = begin(matrix);
+    for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i, goNext(it, 0))
+        *it = MinValue<TScoreValue>::VALUE / 2;
+    // Copy over a row from the other matrix into the top gutter.
+    goTo(srcIt, length(otherMatrix, 0) - overlap0 - 1, length(otherMatrix, 1) - overlap1 - 1);
+    goTo(it, 0, 1 - lowerDiagonal);
+    for (TOverlap i = 0; i < overlap1; ++i) {
+        // std::cout << "*srcIt = " << *srcIt << std::endl;
+        *it = *srcIt;
+        goNext(srcIt, 1);
+        goNext(it, 1);
+    }
+    // Initialize the diagonal above the upper one with infimas.
+    for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i, goNext(it, 0))
+        *it = MinValue<TScoreValue>::VALUE / 2;
+}
+
+
+template <typename TScoreValue, typename TSequence, typename TDiagonal>
+inline void
+_alignBandedFillMatrix(Matrix<TScoreValue, 2> & matrix, TSequence const & sequence0, TSequence const & sequence1, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, NeedlemanWunsch const &)
+{
+    SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_EQ_MSG(scoreGapOpen(scoringScheme), scoreGapExtend(scoringScheme),
+                        "Only linear gap costs allowed for Needleman-Wunsch.");
+    SEQAN_ASSERT_GEQ_MSG(upperDiagonal, 0, "Upper diagonal must not lie below main diagonal.");
+    SEQAN_ASSERT_LEQ_MSG(lowerDiagonal, 0, "Upper diagonal must not lie above main diagonal.");
+
+    typedef Matrix<TScoreValue, 2> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TMatrixIterator;
+    typedef typename Iterator<TSequence, Standard>::Type TSequenceIterator;
+    typedef typename Size<TSequence>::Type TSize;
+    typedef typename Position<TSequence>::Type TPosition;
+
+    // We need three iterators in the alignment matrix to fill it.
+    // itTop points to the cell in the top row of the current column.
+    // itLeft points to the column to the top left of the current
+    // cell.  itAbove points to the cell above the current cell.  We
+    // can use itAbove for value assignment.
+    TMatrixIterator itTop = begin(matrix);
+    TMatrixIterator itAbove;
+    TMatrixIterator itLeft;
+
+    // Compute score values so they are available locally and it maybe
+    // is easier to the compiler to save some indirect adressing.
+    TScoreValue matchScore = scoreMatch(scoringScheme);
+    TScoreValue mismatchScore = scoreMismatch(scoringScheme);
+    TScoreValue gapScore = scoreGap(scoringScheme);
+
+    // Fill matrix column wise for cache efficiency.  For this, we
+    // need the length of the current column in the sheared alignment
+    // matrix which complicates things.
+    setPosition(itTop, (1 - lowerDiagonal) * _dataFactors(matrix)[1]); // TODO(holtgrew): There should be a function that accepts two coordinates for the Matrix class.
+    TPosition seq1Pos = 0;
+    TSequenceIterator it0Begin = begin(sequence0);
+    for (TSequenceIterator it1 = begin(sequence1), it1end = end(sequence1); it1 != it1end; ++it1, ++seq1Pos) {
+        if (seq1Pos <= static_cast<TPosition>(upperDiagonal)) {
+            itLeft = itTop;
+            goNext(itTop, 1);
+        } else {
+            goNext(itTop, 0);
+            itLeft = itTop;
+            goPrevious(itLeft, 1);
+        }
+        itAbove = itTop;
+        TDiagonal from = _max(static_cast<TDiagonal>(seq1Pos) - upperDiagonal, TDiagonal(0));
+        TDiagonal to = _min(seq1Pos - lowerDiagonal, length(sequence0) - 1);
+        TDiagonal tmp = 1 + to - from;
+        TSize runLength = _max(TDiagonal(0), tmp);
+        // std::cout << "RUN LENGTH == " << runLength << std::endl;
+        // std::cout << "from == " << from << std::endl << "to == " << to << std::endl;
+        // std::cout << "seq1Pos = " << seq1Pos << std::endl;
+        // std::cout << "lowerDiagonal = " << lowerDiagonal << std::endl;
+        // std::cout << "length(sequence0) = " << length(sequence0) << std::endl;
+        // std::cout << "seq1Pos = " << seq1Pos << std::endl;
+        // std::cout << "upperDiagonal = " << upperDiagonal << std::endl;
+        TSize i = 0;
+        for (TSequenceIterator it0 = it0Begin; i < runLength; ++it0, ++i) {
+            // std::cout << "Compare " << *it0 << " and " << *it1 << std::endl;
+            TScoreValue scoreMoveDiagonal = *itLeft + ((*it0 == *it1) ? matchScore : mismatchScore);
+            // std::cout << "*itLeft == " << *itLeft << std::endl;
+            goNext(itLeft, 0);
+            goPrevious(itLeft, 1);
+            TScoreValue scoreMoveRight = *itLeft + gapScore;
+            TScoreValue scoreMoveDown = *itAbove + gapScore;
+            // std::cout << "scoreMoveDiagonal == " << scoreMoveDiagonal << ", scoreMoveRight == " << scoreMoveRight << ", scoreMoveDown == " << scoreMoveDown << std::endl;
+            // std::cout << "*itLeft == " << *itLeft << ", *itAbove == " << *itAbove << std::endl;
+            goNext(itAbove, 0);
+            goPrevious(itAbove, 1);
+            *itAbove = _max(scoreMoveDiagonal, _max(scoreMoveRight, scoreMoveDown));
+            // // TODO(holtgrew): Debug output, remove when not needed any more.
+            // {
+            //     std::cout << ",-- matrix while filling" << std::endl;
+            //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+            //         std::cout << "| ";
+            //         for (unsigned j = 0; j < i; ++j)
+            //             std::cout << "\t";
+            //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+            //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+            //                 std::cout << "\tinf";
+            //             else
+            //                 std::cout << "\t" << value(matrix, i, j);
+            //         }
+            //         std::cout << std::endl;
+            //     }
+            //     std::cout << "`--" << std::endl;
+            // }
+        }
+        // std::cout << "++it1" << std::endl;
+        // We only need an offset for it0 when all diagonals up to the
+        // upper one are aligned.
+        if (seq1Pos >= static_cast<TPosition>(upperDiagonal))
+            it0Begin += 1;
+    }
+
+    // // TODO(holtgrew): Debug code, remove when working.
+    // {
+    //     for (int k = 0; k < 1; ++k) {
+    //         std::cerr << ",-- *** filled banded alignment matrix " << k << std::endl;
+    //         for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //             std::cerr << "| ";
+    //             for (unsigned j = 0; j < i; ++j)
+    //                 std::cerr << "\t";
+    //             for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //                 if (value(matrix, i, j, k) <= MinValue<int>::VALUE / 4)
+    //                     std::cerr << "\tinf";
+    //                 else
+    //                     std::cerr << "\t" << value(matrix, i, j, k);
+    //             }
+    //             std::cerr << std::endl;
+    //         }
+    //         std::cerr << "`--" << std::endl;
+    //     }
+    // }
+}
+
+
+// Compute traceback in the given banded alignment matrix, starting at
+// the lower right, shifted by the given overlap to the upper left.
+// The matrix was filled with the Needleman-Wunschl algorithm, end
+// gaps are free as configured by the AlignConfig object.  Returns the
+// best score.
+template <typename TAlignmentIterator, typename TSequenceIterator, typename TPosition, typename TScoreValue, typename TScoringScheme, typename TOverlap, bool START0_FREE, bool START1_FREE, bool END0_FREE, bool END1_FREE>
+TScoreValue
+_alignBandedTraceback(TAlignmentIterator & alignmentIt0, TAlignmentIterator & alignmentIt1, TSequenceIterator & sourceIt0, TSequenceIterator & sourceIt1, TPosition & finalPos0, TPosition & finalPos1, Matrix<TScoreValue, 2> /*const*/ & matrix, TScoringScheme const & scoringScheme, TOverlap overlap0, TOverlap overlap1, TOverlap upperTriangleEdgeLength, TOverlap lowerTriangleEdgeLength, bool goToTopLeft, AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const &, NeedlemanWunsch const &)
+{
+    SEQAN_CHECKPOINT;
+
+    // std::cout << "trace back banded" << std::endl;
+    // // TODO(holtgrew): Debug output, remove when not needed any more.
+    // {
+    //     std::cout << ",-- filled banded alignment matrix " << length(matrix, 0) << " x " << length(matrix, 1) << std::endl;
+    //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //         std::cout << "| ";
+    //         for (unsigned j = 0; j < i; ++j)
+    //             std::cout << "\t";
+    //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+    //                 std::cout << "\tinf";
+    //             else
+    //                 std::cout << "\t" << value(matrix, i, j);
+    //         }
+    //         std::cout << std::endl;
+    //     }
+    //     std::cout << "`--" << std::endl;
+    // }
+    // std::cout << "length(matrix, 0) = " << length(matrix, 0) << std::endl;
+    // std::cout << "overlap0 = " << overlap0 << std::endl;
+    // std::cout << "finalPos0 = " << finalPos0 << std::endl;
+    // std::cout << "length(matrix, 1) = " << length(matrix, 1) << std::endl;
+    // std::cout << "overlap1 = " << overlap1 << std::endl;
+    // std::cout << "finalPos1 = " << finalPos1 << std::endl;
+    // std::cout << "upperTriangleEdgeLength = " << upperTriangleEdgeLength << std::endl;
+    // std::cout << "lowerTriangleEdgeLength = " << lowerTriangleEdgeLength << std::endl;
+    
+    typedef Matrix<TScoreValue, 2> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TMatrixIterator;
+
+    // Initialization
+    //
+    // Precomputation of the score difference between mismatch and gap.
+	TScoreValue scoreDifference = scoreMismatch(scoringScheme) - scoreGap(scoringScheme);
+    // Current position in the matrix.  Note that this is the position
+    // in the matrix including the gutter.  When writing this out, we
+    // want to have the position in the matrix, excluding the gutter,
+    // i.e. everything is shifted to the upper left.
+    TPosition pos0 = length(matrix, 0) - overlap0 + (finalPos0 - 1);
+    TPosition pos1 = length(matrix, 1) - overlap1 - lowerTriangleEdgeLength - 1 + (length(matrix, 0) - pos0 - 1) + (finalPos1 - 1);
+    // std::cout << "length(matrix, 0) - pos0 - 1 == " << (length(matrix, 0) - pos0 - 1) << std::endl;
+    // std::cout << "length(matrix, 1) == " << length(matrix, 1) << std::endl;
+    // std::cout << "overlap1 == " << overlap1 << std::endl;
+    // std::cout << "lowerTriangleEdgeLength == " << lowerTriangleEdgeLength << std::endl;
+    // std::cout << "length(matrix, 0) == " << length(matrix, 0) << std::endl;
+    // std::cout << "pos0 == " << pos0 << std::endl;
+    // std::cout << "finalPos1 == " << finalPos1 << std::endl;
+    // std::cout << "finalPos0 == " << finalPos0 << std::endl;
+    // std::cout << "begin pos0 = " << pos0 << std::endl;
+    // std::cout << "begin pos1 = " << pos1 << std::endl;
+    TPosition origPos0 = pos0;
+    (void) origPos0;  // In case we run without assertions.
+    // TPosition origPos1 = pos1;
+    // Iterator to current entry in the matrix.
+    TMatrixIterator matrixIt = begin(matrix);
+    setPosition(matrixIt, pos0 + pos1 * _dataFactors(matrix)[1]);  // TODO(holtgrew): Matrix class should have setPosition with coordinates.
+    TMatrixIterator origMatrixIt = matrixIt;
+
+    // std::cout << "STARTING AT " << pos0 << ", " << pos1 << std::endl;
+
+    // Search for starting point of the trace.
+    //
+    // Insert free end gaps if any.
+    //
+    // TODO(holtgrew): Currently not supported.
+    SEQAN_ASSERT_NOT_MSG(END0_FREE, "Free end gaps are not supported yet.");
+    SEQAN_ASSERT_NOT_MSG(END1_FREE, "Free end gaps are not supported yet.");
+
+    // Now, perform the traceback.
+    while (pos0 > static_cast<TPosition>(1)) {
+        SEQAN_ASSERT_GT(pos1, static_cast<TPosition>(0));
+        // Flags for "go horizontal" and "go vertical".
+        bool gh = false;
+        bool gv = false;
+
+        // Determine whether to go vertical/horizontal.
+        // std::cout << "Compare: " << *sourceIt0 << ", " << *sourceIt1 << std::endl;
+        // std::cout << "  Score: " << *matrixIt << std::endl;
+        if (*sourceIt0 == *sourceIt1) {
+            gh = true;
+            gv = true;
+        } else {
+			TMatrixIterator it = matrixIt;
+
+			goPrevious(it, 1);
+			TScoreValue h = *it;
+
+			it = matrixIt;
+			goPrevious(it, 0);
+			TScoreValue d = *it;
+
+			goNext(it, 1);
+			TScoreValue v = *it;
+
+			gv = (v >= h) || (d + scoreDifference >= h);
+			gh = (h > v) || (d + scoreDifference >= v);
+        }
+
+        // if (gv && gh) {
+        //     std::cout << "GO DIAGONAL (" << "*sourceIt0 == " << *sourceIt0 << ", *sourceIt1 == " << *sourceIt1 << ") *matrixIt == " << *matrixIt << std::endl;
+        // } else if (gv) {
+        //     std::cout << "GO VERTICAL (" << "*sourceIt0 == " << *sourceIt0 << ", *sourceIt1 == " << *sourceIt1 << ") *matrixIt == " << *matrixIt << std::endl;
+        // } else if (gh) {
+        //     std::cout << "GO HORIZONTAL (" << "*sourceIt0 == " << *sourceIt0 << ", *sourceIt1 == " << *sourceIt1 << ") *matrixIt == " << *matrixIt << std::endl;
+        // }
+
+        // Move iterators in source sequence, alignment rows, matrix
+        // and possibly insert gaps.
+        if (gv && gh) {
+            pos0 -= 1;
+#if SEQAN_DEBUGGING
+            int prevScore = *matrixIt;
+#endif  // SEQAN_DEBUGGING
+            goPrevious(matrixIt, 0);
+#if SEQAN_DEBUGGING
+            SEQAN_ASSERT_EQ(prevScore + scoreMatch(scoringScheme), *matrixIt);
+#endif  // SEQAN_DEBUGGING
+        } else if (gv) {
+            pos0 -= 1;
+            pos1 += 1;
+            goPrevious(matrixIt, 0);
+            goNext(matrixIt, 1);
+        } else if (gh) {
+            pos1 -= 1;
+            goPrevious(matrixIt, 1);
+        }
+        if (gv) {
+            // std::cout << "  moving in dimension 0" << std::endl;
+            goPrevious(sourceIt0);
+            goPrevious(alignmentIt0);
+            // std::cout << "  *alignmentIt0 == " << convert<char>(*alignmentIt0) << std::endl;
+        } else {
+            // std::cout << __FILE__ << ":" << __LINE__ << "--  gap in dimension 0" << std::endl;
+            insertGap(alignmentIt0);
+        }
+        if (gh) {
+            // std::cout << "  moving in dimension 1" << std::endl;
+            goPrevious(sourceIt1);
+            goPrevious(alignmentIt1);
+            // std::cout << "  *alignmentIt1 == " << convert<char>(*alignmentIt1) << std::endl;
+        } else {
+            // std::cout << __FILE__ << ":" << __LINE__ << "--  gap in dimension 0" << std::endl;
+            insertGap(alignmentIt1);
+        }
+    }
+
+    // Go to the top left of the matrix if configured to do so.
+    //
+    // TODO(holtgrew): Currently not supported.
+    SEQAN_ASSERT_NOT_MSG(goToTopLeft, "goToTopLeft is currently not supported in banded alignment.");
+
+    // Write out the final positions in the alignment matrix.  Convert
+    // from position in the current alignment matrix with gutter to
+    // positioin with gutter.  Adjust for the shear of the matrix.
+    // std::cout << "@and: pos0 = " << pos0 << ", pos1 = " << pos1 << std::endl;
+    finalPos0 = pos0;
+    finalPos1 = pos1 - 1 - (upperTriangleEdgeLength - 1);
+    SEQAN_ASSERT_LEQ_MSG(finalPos0, 1u, "Must reach top of matrix in banded alignment traceback.");
+    // std::cout << "finalPos0 = " << finalPos0 << ", finalPos1 = " << finalPos1 << std::endl;
+
+    return *origMatrixIt;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEEDS_ALIGN_DYNPROG_BANDED_LINEAR_H_
+
diff --git a/src/SeqAn-1.3/seqan/seeds2/align_dynprog_linear.h b/src/SeqAn-1.3/seqan/seeds2/align_dynprog_linear.h
new file mode 100644
index 0000000..5c1221b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/align_dynprog_linear.h
@@ -0,0 +1,461 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Classic linear programming for sequence alignment.  Needleman Wunsch
+// implementation, i.e. for linear gap costs only.
+//
+// The alignment code could use some optimization.  However, we cannot
+// use the same optimization as in the graph alignment since we want to
+// compute globally optimal trace through multiple connected alignment
+// matrices.
+// ==========================================================================
+
+// TODO(holtgrew): Maybe adjust rausch's code so things can be copied in and use it instead since it is heavily tuned?
+
+#ifndef SEQAN_SEEDS_ALIGN_DYNPROG_LINEAR_H_
+#define SEQAN_SEEDS_ALIGN_DYNPROG_LINEAR_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TScoreValue, typename TSequence>
+inline void
+_alignResizeMatrix(Matrix<TScoreValue, 2> & matrix, TSequence const & sequence0, TSequence const & sequence1, NeedlemanWunsch const &)
+{
+    SEQAN_CHECKPOINT;
+
+    setLength(matrix, 0, length(sequence0) + 1);
+    setLength(matrix, 1, length(sequence1) + 1);
+    resize(matrix, -420);
+    // resize(matrix);
+}
+
+
+template <typename TScoreValue, bool BEGIN1_FREE, bool BEGIN0_FREE, bool END1_FREE, bool END0_FREE>
+inline void
+_alignInitGutter(Matrix<TScoreValue, 2> & matrix, Score<TScoreValue, Simple> const & scoringScheme, AlignConfig<BEGIN1_FREE, BEGIN0_FREE, END1_FREE, END0_FREE> const &, NeedlemanWunsch const &)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef Matrix<TScoreValue, 2> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TIterator;
+    typedef typename Position<TMatrix>::Type TPosition;
+
+    SEQAN_ASSERT_EQ_MSG(scoreGapOpen(scoringScheme), scoreGapExtend(scoringScheme),
+                        "Only linear gap costs allowed for Needleman-Wunsch.");
+
+    // Init left gutter with zeroes if begin gaps are in dimension 0
+    // free or with gap scores otherwise.
+    if (BEGIN0_FREE) {
+        TIterator it = begin(matrix);
+        for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i) {
+            *it = 0;
+            goNext(it, 0);
+        }
+    } else {
+        TScoreValue gapScore = scoreGap(scoringScheme);
+        TScoreValue x = 0;
+        TIterator it = begin(matrix);
+        for (TPosition i = 0, iend = length(matrix, 0); i < iend; ++i) {
+            *it = x;
+            x += gapScore;
+            goNext(it, 0);
+        }
+    }
+
+    // Init top gutter with zeroes if begin gaps are in dimension 1
+    // free or with gap scores otherwise.
+    if (BEGIN1_FREE) {
+        TIterator it = begin(matrix);
+        for (TPosition i = 0, iend = length(matrix, 1); i < iend; ++i) {
+            *it = 0;
+            goNext(it, 1);
+        }
+    } else {
+        TScoreValue gapScore = scoreGap(scoringScheme);
+        TScoreValue x = 0;
+        TIterator it = begin(matrix);
+        for (TPosition i = 0, iend = length(matrix, 1); i < iend; ++i) {
+            *it = x;
+            x += gapScore;
+            goNext(it, 1);
+        }
+    }
+}
+
+template <typename TScoreValue, typename TDiagonal, typename TOverlap>
+inline void
+_alignInitGutterFromBanded(Matrix<TScoreValue, 2> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Matrix<TScoreValue, 2> /*const*/ & otherMatrix, TOverlap overlap0, TOverlap overlap1, NeedlemanWunsch const &)
+{
+    SEQAN_CHECKPOINT;
+
+    // TODO(holtgrew): Really unnecessary? Remove along with all other unused parameters in all align_*.h files.
+    (void) lowerDiagonal;
+    (void) upperDiagonal;
+
+    typedef Matrix<TScoreValue, 2> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TIterator;
+    typedef typename Position<TMatrix>::Type TPosition;
+
+    SEQAN_ASSERT_EQ_MSG(scoreGapOpen(scoringScheme), scoreGapExtend(scoringScheme),
+                        "Only linear gap costs allowed for Needleman-Wunsch.");
+
+    // Copy over data for left gutter.
+    // std::cout << "overlap0 = " << overlap0 << ", overlap1 = " << overlap1 << std::endl;
+    TIterator it = begin(matrix);
+    TIterator otherIt(otherMatrix);
+    goTo(otherIt, length(otherMatrix, 0) - (overlap0 + 1), overlap0);
+    TIterator srcIt = otherIt;
+    for (TOverlap i = 0; i < overlap0 + 1; ++i) {
+        *it = *srcIt;
+        goNext(it, 0);
+        goNext(srcIt, 0);
+        goPrevious(srcIt, 1);
+    }
+    // Init the rest of the left gutter with infima.
+    for (TPosition i = overlap0 + 1, iend = length(matrix, 0); i < iend; ++i, goNext(it, 0))
+        *it = MinValue<TScoreValue>::VALUE / 2;
+
+    // Copy over data for top gutter.
+    it = begin(matrix);
+    srcIt = otherIt;
+    for (TOverlap i = 0; i < overlap1 + 1; ++i) {
+        *it = *srcIt;
+        goNext(it, 1);
+        goNext(srcIt, 1);
+    }
+    // Init the rest of the top gutter with infima.
+    for (TPosition i = overlap1 + 1, iend = length(matrix, 1); i < iend; ++i, goNext(it, 1))
+        *it = MinValue<TScoreValue>::VALUE / 2;
+}
+
+
+template <typename TScoreValue, typename TSequence>
+inline void
+_alignFillMatrix(Matrix<TScoreValue, 2> & matrix, TSequence const & sequence0, TSequence const & sequence1, Score<TScoreValue, Simple> const & scoringScheme, NeedlemanWunsch const &)
+{
+    SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_EQ_MSG(scoreGapOpen(scoringScheme), scoreGapExtend(scoringScheme),
+                        "Only linear gap costs allowed for Needleman-Wunsch.");
+
+    // Fill matrix with standard NW DP programming.
+
+    typedef Matrix<TScoreValue, 2> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TMatrixIterator;
+    typedef typename Iterator<TSequence, Standard>::Type TSequenceIterator;
+
+    // We need three iterators in the alignment matrix to fill it.
+    // itTop points to the cell in the top row of the current column.
+    // itLeft points to the column to the top left of the current
+    // cell.  itAbove points to the cell above the current cell.  We
+    // can use itAbove for value assignment.
+    TMatrixIterator itTop = begin(matrix);
+    TMatrixIterator itAbove;
+    TMatrixIterator itLeft;
+
+    // Compute score values so they are available locally and it maybe
+    // is easier to the compiler to save some indirect adressing.
+    TScoreValue matchScore = scoreMatch(scoringScheme);
+    TScoreValue mismatchScore = scoreMismatch(scoringScheme);
+    TScoreValue gapScore = scoreGap(scoringScheme);
+    
+    // Perform the Needleman-Wunsch dynamic programming.
+    // TODO(holtgrew): camelCase for itXend.
+    for (TSequenceIterator it1 = begin(sequence1), it1end = end(sequence1); it1 != it1end; ++it1) {
+        itLeft = itTop;
+        goNext(itTop, 1);
+        itAbove = itTop;
+        for (TSequenceIterator it0 = begin(sequence0), it0end = end(sequence0); it0 != it0end; ++it0) {
+            TScoreValue scoreMoveDiagonal = *itLeft + ((*it0 == *it1) ? matchScore : mismatchScore);
+            goNext(itLeft, 0);
+            TScoreValue scoreMoveRight = *itLeft + gapScore;
+            TScoreValue scoreMoveDown = *itAbove + gapScore;
+            goNext(itAbove, 0);
+            *itAbove = _max(scoreMoveDiagonal, _max(scoreMoveRight, scoreMoveDown));
+        }
+    }
+
+    // // TODO(holtgrew): Debug code, remove when working.
+    // {
+    //     for (int k = 0; k < 1; ++k) {
+    //         std::cerr << ",-- *** filled unbanded alignment matrix " << k << std::endl;
+    //         for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //             for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //                 if (value(matrix, i, j, k) <= MinValue<int>::VALUE / 4)
+    //                     std::cerr << "\tinf";
+    //                 else
+    //                     std::cerr << "\t" << value(matrix, i, j, k);
+    //             }
+    //             std::cerr << std::endl;
+    //         }
+    //         std::cerr << "`--" << std::endl;
+    //     }
+    // }
+}
+
+
+// Compute traceback in the given normal DP alignment matrix, starting
+// at the lower right, shifted by the given overlap to the upper left.
+// The matrix was filled with the Needleman-Wunschla lgorithm, end
+// gaps are free as configured by the AlignConfig object.  Returns the
+// best score.
+template <typename TAlignmentIterator, typename TSequenceIterator, typename TPosition, typename TScoreValue, typename TScoringScheme, typename TOverlap, bool START0_FREE, bool START1_FREE, bool END0_FREE, bool END1_FREE>
+TScoreValue
+_alignTraceback(TAlignmentIterator & alignmentIt0, TAlignmentIterator & alignmentIt1, TSequenceIterator & sourceIt0, TSequenceIterator & sourceIt1, TPosition & finalPos0, TPosition & finalPos1, Matrix<TScoreValue, 2> /*const*/ & matrix, TScoringScheme const & scoringScheme, TOverlap lowerRightOverlap0, TOverlap lowerRightOverlap1, TOverlap upperLeftOverlap0, TOverlap upperLeftOverlap1, bool goToTopLeft, AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const &, NeedlemanWunsch  [...]
+{
+    SEQAN_CHECKPOINT;
+
+    // std::cout << "trace back unbanded" << std::endl;
+    // // TODO(holtgrew): Debug output, remove when not needed any more.
+    // {
+    //     std::cout << ",-- filled unbanded alignment matrix " << length(matrix, 0) << " x " << length(matrix, 1) << std::endl;
+    //     for (unsigned i = 0; i < length(matrix, 0); ++i) {
+    //         std::cout << "| ";
+    //         for (unsigned j = 0; j < length(matrix, 1); ++j) {
+    //             if (value(matrix, i, j) == MinValue<int>::VALUE / 2)
+    //                 std::cout << "\tinf";
+    //             else
+    //                 std::cout << "\t" << value(matrix, i, j);
+    //         }
+    //         std::cout << std::endl;
+    //     }
+    //     std::cout << "`--" << std::endl;
+    // }
+    // std::cout << "length(matrix, 0) = " << length(matrix, 0) << std::endl;
+    // std::cout << "lowerRightOverlap0 = " << lowerRightOverlap0 << std::endl;
+    // std::cout << "finalPos0 = " << finalPos0 << std::endl;
+    // std::cout << "length(matrix, 1) = " << length(matrix, 1) << std::endl;
+    // std::cout << "lowerRightOverlap1 = " << lowerRightOverlap1 << std::endl;
+    // std::cout << "finalPos1 = " << finalPos1 << std::endl;
+    // std::cout << "begin pos0 = " << (length(matrix, 0) - lowerRightOverlap0 + finalPos0) << std::endl;
+    // std::cout << "begin pos1 = " << (length(matrix, 1) - lowerRightOverlap1 + finalPos1) << std::endl;
+
+    typedef Matrix<TScoreValue, 2> TMatrix;
+    typedef typename Iterator<TMatrix>::Type TMatrixIterator;
+
+    // Initialization
+    //
+    // Precomputation of the score difference between mismatch and gap.
+	TScoreValue scoreDifference = scoreMismatch(scoringScheme) - scoreGap(scoringScheme);
+    TScoreValue matchScore = scoreMatch(scoringScheme);
+    // Current position in the matrix.  Note that this is the position
+    // in the matrix including the gutter.  When writing this out, we
+    // want to have the position in the matrix, excluding the gutter,
+    // i.e. everything is shifted to the upper left.
+    TPosition pos0 = length(matrix, 0) - lowerRightOverlap0 + finalPos0 - 1;
+    TPosition pos1 = length(matrix, 1) - lowerRightOverlap1 + finalPos1 - 1;
+    TPosition origPos0 = pos0;
+    (void) origPos0;  // In case we run without assertions.
+    TPosition origPos1 = pos1;
+    // Iterator to current entry in the matrix.
+    TMatrixIterator matrixIt = begin(matrix);
+    goTo(matrixIt, pos0, pos1);
+    TMatrixIterator origMatrixIt = matrixIt;
+
+    // Search for starting point of the trace.
+    //
+    // If end gaps are free in any direction, search for the position
+    // with the highest score on the lower/right edge.  Prefer end
+    // positions closer to the end and shifts in sequence 0 over
+    // those in sequence 1.
+    if (END0_FREE) {
+        TMatrixIterator it = origMatrixIt;
+        TPosition altPos1 = pos1;
+        while (altPos1 > 1) {
+            goPrevious(it, 1);
+            altPos1 -= 1;
+            if (*it > *origMatrixIt) {
+                matrixIt = it;
+                pos1 = altPos1;
+            }
+        }
+    }
+    if (END1_FREE) {
+        TMatrixIterator it = origMatrixIt;
+        TPosition altPos0 = pos0;
+        while (altPos0 > 0) {
+            goPrevious(it, 0);
+            altPos0 -= 1;
+            if (*it > *origMatrixIt) {
+                matrixIt = it;
+                pos1 = origPos1;
+                pos0 = altPos0;
+            }
+        }
+    }
+
+    // Insert free end gaps if any.
+    //
+    // TODO(holtgrew): We could have 3 cases here but I guess it will not matter performance wise in the big picture.
+    if (END0_FREE || END1_FREE) {
+        SEQAN_ASSERT_TRUE(pos0 == origPos0 || pos1 == origPos1);
+        // std::cout << __FILE__ << ":" << __LINE__ << "-- Inserting " << (origPos0 - pos0) << " end gaps into sequence 1" << std::endl;
+        insertGaps(alignmentIt1, origPos0 - pos0);
+        // std::cout << __FILE__ << ":" << __LINE__ << "-- Inserting " << (origPos1 - pos1) << " end gaps into sequence 0" << std::endl;
+        insertGaps(alignmentIt0, origPos1 - pos1);
+    }
+
+    // Now, perform the traceback.
+    while (true) {
+        // Break condition depends on whether this is the leading
+        // rectangle, i.e. we want to go to the upper left corner.
+        if (goToTopLeft) {
+            if (pos0 == static_cast<TPosition>(0) || pos1 == static_cast<TPosition>(0))
+                break;
+        } else {
+            // If we do not walk up to the upper left corner, we at
+            // least have to move into the overlapping area.
+            if ((pos0 <= static_cast<TPosition>(1) || pos1 <= static_cast<TPosition>(1)) || (pos0 < static_cast<TPosition>(upperLeftOverlap0) && pos1 < static_cast<TPosition>(upperLeftOverlap1)))
+                break;
+        }
+        
+        // Flags for "go horizontal" and "go vertical".
+        bool gh = false;
+        bool gv = false;
+
+        // Determine whether to go vertical/horizontal.
+        // std::cout << "Compare: " << *sourceIt0 << ", " << *sourceIt1 << std::endl;
+        // std::cout << "  Score: " << *matrixIt << std::endl
+        TMatrixIterator tmpIt = matrixIt;
+        goPrevious(tmpIt, 0);
+        goPrevious(tmpIt, 1);
+        if ((*sourceIt0 == *sourceIt1) && (*tmpIt + matchScore == *matrixIt)) {
+            gh = true;
+            gv = true;
+        } else {
+			TMatrixIterator it = matrixIt;
+
+			goPrevious(it, 0);
+			TScoreValue v = *it;
+
+			goPrevious(it, 1);
+			TScoreValue d = *it;
+
+			it = matrixIt;
+			goPrevious(it, 1);
+			TScoreValue h = *it;
+
+			gv = (v >= h) || (d + scoreDifference >= h);
+			gh = (h > v) || (d + scoreDifference >= v);
+        }
+
+        // if (gv && gh) {
+        //     std::cout << "GO DIAGONAL (" << "*sourceIt0 == " << *sourceIt0 << ", *sourceIt1 == " << *sourceIt1 << ") *matrixIt == " << *matrixIt << ", pos0 == " << pos0 << ", pos1 == " << pos1 << std::endl;
+        // } else if (gv) {
+        //     std::cout << "GO VERTICAL (" << "*sourceIt0 == " << *sourceIt0 << ", *sourceIt1 == " << *sourceIt1 << ") *matrixIt == " << *matrixIt << ", pos0 == " << pos0 << ", pos1 == " << pos1 << std::endl;
+        // } else if (gh) {
+        //     std::cout << "GO HORIZONTAL (" << "*sourceIt0 == " << *sourceIt0 << ", *sourceIt1 == " << *sourceIt1 << ") *matrixIt == " << *matrixIt << ", pos0 == " << pos0 << ", pos1 == " << pos1 << std::endl;
+        // }
+
+        // Move iterators in source sequence, alignment rows, matrix
+        // and possibly insert gaps.
+        if (gv) {
+            // std::cout << "  moving in dimension 0" << std::endl;
+            goPrevious(sourceIt0);
+            goPrevious(alignmentIt0);
+            // std::cout << "  *alignmentIt0 == " << convert<char>(*alignmentIt0) << std::endl;
+            goPrevious(matrixIt, 0);
+            pos0 -= 1;
+        } else {
+            // std::cout << __FILE__ << ":" << __LINE__ << "-- gap in dimension 0" << std::endl;
+            insertGap(alignmentIt0);
+        }
+        if (gh) {
+            // std::cout << "  moving in dimension 1" << std::endl;
+            goPrevious(sourceIt1);
+            goPrevious(alignmentIt1);
+            // std::cout << "  *alignmentIt1 == " << convert<char>(*alignmentIt1) << std::endl;
+            goPrevious(matrixIt, 1);
+            pos1 -= 1;
+        } else {
+            // std::cout << __FILE__ << ":" << __LINE__ << "-- gap in dimension 0" << std::endl;
+            insertGap(alignmentIt1);
+        }
+    }
+    // std::cout << "pos0 == " << pos0 << ", pos1 == " << pos1 << std::endl;
+
+    // TODO(holtgrew): I guess we have to search for the maximum in the resulting row and column after all...
+    
+    // Go to the top left of the matrix if configured to do so.
+    if (goToTopLeft) {
+        if (pos0 > 0) {
+            goPrevious(alignmentIt1);
+            // std::cout << "Inserting " << pos0 << " gaps into alignment row 1" << std::endl;
+            for (TPosition i = 0; i < pos0; ++i) {
+                goPrevious(sourceIt0);
+                goPrevious(alignmentIt0);
+                // std::cout << "  *alignmentIt0 == " << convert<char>(*alignmentIt0) << std::endl;
+                // std::cout << __FILE__ << ":" << __LINE__ << "-- gap in dimension 1" << std::endl;
+                insertGap(alignmentIt1);
+            }
+            pos0 = 0;
+        }
+        if (pos1 > 0) {
+            goPrevious(alignmentIt0);
+            // std::cout << "Inserting " << pos1 << " gaps into alignment row 0" << std::endl;
+            for (TPosition i = 0; i < pos1; ++i) {
+                goPrevious(sourceIt1);
+                goPrevious(alignmentIt1);
+                // std::cout << "  *alignmentIt1 == " << convert<char>(*alignmentIt1) << std::endl;
+                // std::cout << __FILE__ << ":" << __LINE__ << "-- gap in dimension 0" << std::endl;
+                insertGap(alignmentIt0);
+            }
+            pos1 = 0;
+        }
+    }
+
+    // Write out the final positions in the alignment matrix.
+    // Position is in the current matrix, including gutter since we
+    // can get there.
+    finalPos0 = pos0;
+    finalPos1 = pos1;
+    // std::cout << "finalPos0 = " << finalPos0 << ", finalPos1 = " << finalPos1 << std::endl;
+
+    return *origMatrixIt;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEEDS_ALIGN_DYNPROG_LINEAR_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/basic_iter_indirect.h b/src/SeqAn-1.3/seqan/seeds2/basic_iter_indirect.h
new file mode 100644
index 0000000..0855c51
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/basic_iter_indirect.h
@@ -0,0 +1,171 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// A wrapper for an iterator that dereferences the wrapped iterator twice
+// on dereferentiation.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS2_BASIC_ITER_INDIRECT_H_
+#define SEQAN_SEEDS2_BASIC_ITER_INDIRECT_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+template <typename TWrappedIter>
+struct Indirect {};
+
+// TODO(holtgrew): Make this an Iter specialization?
+//
+// Iterator that dereferences twice on derefentiation.
+template <typename TContainer, typename TWrappedIter>
+class Iter<TContainer, Indirect<TWrappedIter> >
+{
+public:
+    TWrappedIter _wrappedIter;
+    
+    Iter() : _wrappedIter(0)
+    { SEQAN_CHECKPOINT; }
+
+    Iter(Iter const & other)
+            : _wrappedIter(other._wrappedIter)
+    { SEQAN_CHECKPOINT; }
+
+    Iter(TWrappedIter const & wrappedIter)
+            : _wrappedIter(wrappedIter)
+    { SEQAN_CHECKPOINT; }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <typename TContainer, typename TWrappedIter>
+struct Reference<Iter<TContainer, Indirect<TWrappedIter> > >
+{
+    typedef typename Reference<TContainer>::Type Type;
+};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TContainer, typename TWrappedIter>
+inline bool
+operator==(Iter<TContainer, Indirect<TWrappedIter> > const & a, Iter<TContainer, Indirect<TWrappedIter> > const & b)
+{
+    SEQAN_CHECKPOINT;
+    return a._wrappedIter == b._wrappedIter;
+}
+
+
+template <typename TContainer, typename TWrappedIter>
+inline bool
+operator!=(Iter<TContainer, Indirect<TWrappedIter> > const & a, Iter<TContainer, Indirect<TWrappedIter> > const & b)
+{
+    SEQAN_CHECKPOINT;
+    return a._wrappedIter != b._wrappedIter;
+}
+
+template <typename TContainer, typename TWrappedIter, typename TDiff>
+Iter<TContainer, Indirect<TWrappedIter> >
+operator+(Iter<TContainer, Indirect<TWrappedIter> > const & it, TDiff const diff)
+{
+    SEQAN_CHECKPOINT;
+    typedef Iter<TContainer, Indirect<TWrappedIter> > TIter;
+    return TIter(it._wrappedIter + diff);
+}
+
+
+template <typename TContainer, typename TWrappedIter>
+inline Iter<TContainer, Indirect<TWrappedIter> > &
+operator++(Iter<TContainer, Indirect<TWrappedIter> > & iter)
+{
+    SEQAN_CHECKPOINT;
+    ++iter._wrappedIter;
+    return iter;
+}
+
+
+template <typename TContainer, typename TWrappedIter>
+inline Iter<TContainer, Indirect<TWrappedIter> >
+operator++(Iter<TContainer, Indirect<TWrappedIter> > & iter, int /*postfix*/)
+{
+    SEQAN_CHECKPOINT;
+    typedef Iter<TContainer, Indirect<TWrappedIter> > TIter;
+    TIter tmp(iter);
+    ++iter;
+    return tmp;
+}
+
+
+template <typename TContainer, typename TWrappedIter>
+inline typename Value<TWrappedIter>::Type &
+operator*(Iter<TContainer, Indirect<TWrappedIter> > & iter)
+{
+    SEQAN_CHECKPOINT;
+    return **iter._wrappedIter;
+}
+
+
+template <typename TContainer, typename TWrappedIter>
+inline typename Value<TWrappedIter>::Type &
+operator*(Iter<TContainer, Indirect<TWrappedIter> > const & iter)
+{
+    SEQAN_CHECKPOINT;
+    return **iter._wrappedIter;
+}
+
+
+template <typename TContainer, typename TWrappedIter>
+inline typename Reference<Iter<TContainer, Indirect<TWrappedIter> > >::Type
+value(Iter<TContainer, Indirect<TWrappedIter> > & iter)
+{
+    SEQAN_CHECKPOINT;
+    return **iter._wrappedIter;
+}
+
+
+template <typename TContainer, typename TWrappedIter>
+inline typename Reference<Iter<TContainer, Indirect<TWrappedIter> > >::Type
+value(Iter<TContainer, Indirect<TWrappedIter> > const & iter)
+{
+    SEQAN_CHECKPOINT;
+    return **iter._wrappedIter;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEEDS2_BASIC_ITER_INDIRECT_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds2_generated_forwards.h b/src/SeqAn-1.3/seqan/seeds2/seeds2_generated_forwards.h
new file mode 100644
index 0000000..0d6f368
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds2_generated_forwards.h
@@ -0,0 +1,747 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SEEDS2_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_SEEDS2_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// AlignmentChain_
+
+template <typename TSegment, typename TScoringScheme, typename TAlignmentTag> class AlignmentChain_;       	// "projects/library/seqan/seeds2/align_chain_banded.h"(84)
+
+//____________________________________________________________________________
+// AlignmentMatrixDimension_
+
+template <typename AlignmentAlgorithm> struct AlignmentMatrixDimension_;       	// "projects/library/seqan/seeds2/align_chain_banded.h"(68)
+
+//____________________________________________________________________________
+// Chained_
+
+struct Chained_;       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(46)
+
+//____________________________________________________________________________
+// Chaos_
+
+struct Chaos_;       	// "projects/library/seqan/seeds2/seeds_combination.h"(64)
+
+//____________________________________________________________________________
+// DefaultSeedConfig
+
+struct DefaultSeedConfig;       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(66)
+
+//____________________________________________________________________________
+// DefaultSeedConfigScore
+
+struct DefaultSeedConfigScore;       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(77)
+
+//____________________________________________________________________________
+// DefaultSeedSetConfig
+
+struct DefaultSeedSetConfig;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(57)
+
+//____________________________________________________________________________
+// DefaultSeedSetConfigLength
+
+struct DefaultSeedSetConfigLength;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(102)
+
+//____________________________________________________________________________
+// DefaultSeedSetConfigScore
+
+struct DefaultSeedSetConfigScore;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(139)
+
+//____________________________________________________________________________
+// Diagonal
+
+template <typename T> struct Diagonal;       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(134)
+
+//____________________________________________________________________________
+// GappedXDrop_
+
+struct GappedXDrop_;       	// "projects/library/seqan/seeds2/seeds_extension.h"(76)
+
+//____________________________________________________________________________
+// HasScore
+
+template <typename T> struct HasScore;       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(156)
+
+//____________________________________________________________________________
+// Indirect
+
+template <typename TWrappedIter> struct Indirect;       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(48)
+
+//____________________________________________________________________________
+// MatchExtend_
+
+struct MatchExtend_;       	// "projects/library/seqan/seeds2/seeds_extension.h"(70)
+
+//____________________________________________________________________________
+// Merge_
+
+struct Merge_;       	// "projects/library/seqan/seeds2/seeds_combination.h"(61)
+
+//____________________________________________________________________________
+// MinScoreMixin_
+
+template <typename TScore> struct MinScoreMixin_;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(110)
+
+//____________________________________________________________________________
+// MinScore_
+
+struct MinScore_;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(50)
+
+//____________________________________________________________________________
+// MinSeedSizeMixin_
+
+template <typename TSize> struct MinSeedSizeMixin_;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(74)
+
+//____________________________________________________________________________
+// MinSeedSize_
+
+struct MinSeedSize_;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(47)
+
+//____________________________________________________________________________
+// ScoreMixin_
+
+template <typename TScore> struct ScoreMixin_;       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(49)
+
+//____________________________________________________________________________
+// Seed
+
+template <typename TSpec, typename TConfig > class Seed;       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(96)
+
+//____________________________________________________________________________
+// SeedDiagonal
+
+template <typename TPosition, typename TSize> class SeedDiagonal;       	// "projects/library/seqan/seeds2/seeds_seed_diagonal.h"(58)
+
+//____________________________________________________________________________
+// SeedScore
+
+template <typename T> struct SeedScore;       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(178)
+
+//____________________________________________________________________________
+// SeedSet
+
+template <typename TSeedSpec, typename TSpec, typename TSeedSetConfig > class SeedSet;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(158)
+
+//____________________________________________________________________________
+// Simple
+
+struct Simple;       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(49)
+
+//____________________________________________________________________________
+// SimpleChain_
+
+struct SimpleChain_;       	// "projects/library/seqan/seeds2/seeds_combination.h"(67)
+
+//____________________________________________________________________________
+// Single_
+
+struct Single_;       	// "projects/library/seqan/seeds2/seeds_combination.h"(70)
+
+//____________________________________________________________________________
+// SparseChaining_
+
+struct SparseChaining_;       	// "projects/library/seqan/seeds2/seeds_global_chaining.h"(55)
+
+//____________________________________________________________________________
+// Tikz_
+
+struct Tikz_;       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(317)
+
+//____________________________________________________________________________
+// UngappedXDrop_
+
+struct UngappedXDrop_;       	// "projects/library/seqan/seeds2/seeds_extension.h"(73)
+
+//____________________________________________________________________________
+// Unordered_
+
+struct Unordered_;       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(49)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// ChainedSeed
+
+typedef Tag<Chained_> ChainedSeed;       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(47)
+
+//____________________________________________________________________________
+// Chaos
+
+typedef Tag<Chaos_> Chaos;       	// "projects/library/seqan/seeds2/seeds_combination.h"(65)
+
+//____________________________________________________________________________
+// GappedXDrop
+
+typedef Tag<GappedXDrop_> const GappedXDrop;       	// "projects/library/seqan/seeds2/seeds_extension.h"(77)
+
+//____________________________________________________________________________
+// MatchExtend
+
+typedef Tag<MatchExtend_> const MatchExtend;       	// "projects/library/seqan/seeds2/seeds_extension.h"(71)
+
+//____________________________________________________________________________
+// Merge
+
+typedef Tag<Merge_> Merge;       	// "projects/library/seqan/seeds2/seeds_combination.h"(62)
+
+//____________________________________________________________________________
+// MinScore
+
+typedef Tag<MinScore_> MinScore;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(51)
+
+//____________________________________________________________________________
+// MinSeedSize
+
+typedef Tag<MinSeedSize_> MinSeedSize;       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(48)
+
+//____________________________________________________________________________
+// SimpleChain
+
+typedef Tag<SimpleChain_> SimpleChain;       	// "projects/library/seqan/seeds2/seeds_combination.h"(68)
+
+//____________________________________________________________________________
+// Single
+
+typedef Tag<Single_> Single;       	// "projects/library/seqan/seeds2/seeds_combination.h"(71)
+
+//____________________________________________________________________________
+// SparseChaining
+
+typedef Tag<SparseChaining_> SparseChaining;       	// "projects/library/seqan/seeds2/seeds_global_chaining.h"(56)
+
+//____________________________________________________________________________
+// UnGappedXDrop
+
+typedef Tag<UngappedXDrop_> const UnGappedXDrop;       	// "projects/library/seqan/seeds2/seeds_extension.h"(74)
+
+//____________________________________________________________________________
+// Unordered
+
+typedef Tag<Unordered_> Unordered;       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(50)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _alignBandedFillMatrix
+
+template <typename TScoreValue, typename TSequence, typename TDiagonal> inline void _alignBandedFillMatrix(Matrix<TScoreValue, 3> & matrix, TSequence const & sequence0, TSequence const & sequence1, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Gotoh const &);       	// "projects/library/seqan/seeds2/align_dynprog_banded_affine.h"(234)
+template <typename TScoreValue, typename TSequence, typename TDiagonal> inline void _alignBandedFillMatrix(Matrix<TScoreValue, 2> & matrix, TSequence const & sequence0, TSequence const & sequence1, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, NeedlemanWunsch const &);       	// "projects/library/seqan/seeds2/align_dynprog_banded_linear.h"(201)
+
+//____________________________________________________________________________
+// _alignBandedInitGutter
+
+template <typename TScoreValue, typename TDiagonal, bool BEGIN1_FREE, bool BEGIN0_FREE, bool END1_FREE, bool END0_FREE> inline void _alignBandedInitGutter(Matrix<TScoreValue, 3> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, AlignConfig<BEGIN1_FREE, BEGIN0_FREE, END1_FREE, END0_FREE> const &, Gotoh const &);       	// "projects/library/seqan/seeds2/align_dynprog_banded_affine.h"(79)
+template <typename TScoreValue, typename TDiagonal, bool BEGIN1_FREE, bool BEGIN0_FREE, bool END1_FREE, bool END0_FREE> inline void _alignBandedInitGutter(Matrix<TScoreValue, 2> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, AlignConfig<BEGIN1_FREE, BEGIN0_FREE, END1_FREE, END0_FREE> const &, NeedlemanWunsch const &);       	// "projects/library/seqan/seeds2/align_dynprog_banded_linear.h"(89)
+
+//____________________________________________________________________________
+// _alignBandedInitGutterFromUnbanded
+
+template <typename TScoreValue, typename TDiagonal, typename TOverlap> inline void _alignBandedInitGutterFromUnbanded(Matrix<TScoreValue, 3> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Matrix<TScoreValue, 3> & otherMatrix, TOverlap overlap0, TOverlap overlap1, Gotoh const &);       	// "projects/library/seqan/seeds2/align_dynprog_banded_affine.h"(150)
+template <typename TScoreValue, typename TDiagonal, typename TOverlap> inline void _alignBandedInitGutterFromUnbanded(Matrix<TScoreValue, 2> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Matrix<TScoreValue, 2> & otherMatrix, TOverlap overlap0, TOverlap overlap1, NeedlemanWunsch const &);       	// "projects/library/seqan/seeds2/align_dynprog_banded_linear.h"(140)
+
+//____________________________________________________________________________
+// _alignBandedResizeMatrix
+
+template <typename TScoreValue, typename TSequence, typename TDiagonal> inline void _alignBandedResizeMatrix(Matrix<TScoreValue, 3> & matrix, TSequence const & sequence0, TSequence const & sequence1, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Gotoh const &);       	// "projects/library/seqan/seeds2/align_dynprog_banded_affine.h"(57)
+template <typename TScoreValue, typename TSequence, typename TDiagonal> inline void _alignBandedResizeMatrix(Matrix<TScoreValue, 2> & matrix, TSequence const & sequence0, TSequence const & sequence1, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, NeedlemanWunsch const &);       	// "projects/library/seqan/seeds2/align_dynprog_banded_linear.h"(67)
+
+//____________________________________________________________________________
+// _alignBandedTraceback
+
+template <typename TAlignmentIterator, typename TSequenceIterator, typename TPosition, typename TScoreValue, typename TScoringScheme, typename TOverlap, bool START0_FREE, bool START1_FREE, bool END0_FREE, bool END1_FREE> TScoreValue _alignBandedTraceback(TAlignmentIterator & alignmentIt0, TAlignmentIterator & alignmentIt1, TSequenceIterator & sourceIt0, TSequenceIterator & sourceIt1, TPosition & finalPos0, TPosition & finalPos1, Matrix<TScoreValue, 3> & matrix, TScoringScheme const & sco [...]
+template <typename TAlignmentIterator, typename TSequenceIterator, typename TPosition, typename TScoreValue, typename TScoringScheme, typename TOverlap, bool START0_FREE, bool START1_FREE, bool END0_FREE, bool END1_FREE> TScoreValue _alignBandedTraceback(TAlignmentIterator & alignmentIt0, TAlignmentIterator & alignmentIt1, TSequenceIterator & sourceIt0, TSequenceIterator & sourceIt1, TPosition & finalPos0, TPosition & finalPos1, Matrix<TScoreValue, 2> & matrix, TScoringScheme const & sco [...]
+
+//____________________________________________________________________________
+// _alignFillMatrix
+
+template <typename TScoreValue, typename TSequence> inline void _alignFillMatrix(Matrix<TScoreValue, 3> & matrix, TSequence const & sequence0, TSequence const & sequence1, Score<TScoreValue, Simple> const & scoringScheme, Gotoh const &);       	// "projects/library/seqan/seeds2/align_dynprog_affine.h"(221)
+template <typename TScoreValue, typename TSequence> inline void _alignFillMatrix(Matrix<TScoreValue, 2> & matrix, TSequence const & sequence0, TSequence const & sequence1, Score<TScoreValue, Simple> const & scoringScheme, NeedlemanWunsch const &);       	// "projects/library/seqan/seeds2/align_dynprog_linear.h"(177)
+
+//____________________________________________________________________________
+// _alignInitGutter
+
+template <typename TScoreValue, bool BEGIN1_FREE, bool BEGIN0_FREE, bool END1_FREE, bool END0_FREE> inline void _alignInitGutter(Matrix<TScoreValue, 3> & matrix, Score<TScoreValue, Simple> const scoringScheme, AlignConfig<BEGIN1_FREE, BEGIN0_FREE, END1_FREE, END0_FREE> const &, Gotoh const &);       	// "projects/library/seqan/seeds2/align_dynprog_affine.h"(78)
+template <typename TScoreValue, bool BEGIN1_FREE, bool BEGIN0_FREE, bool END1_FREE, bool END0_FREE> inline void _alignInitGutter(Matrix<TScoreValue, 2> & matrix, Score<TScoreValue, Simple> const & scoringScheme, AlignConfig<BEGIN1_FREE, BEGIN0_FREE, END1_FREE, END0_FREE> const &, NeedlemanWunsch const &);       	// "projects/library/seqan/seeds2/align_dynprog_linear.h"(78)
+
+//____________________________________________________________________________
+// _alignInitGutterFromBanded
+
+template <typename TScoreValue, typename TDiagonal, typename TOverlap> inline void _alignInitGutterFromBanded(Matrix<TScoreValue, 3> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Matrix<TScoreValue, 3> & otherMatrix, TOverlap overlap0, TOverlap overlap1, Gotoh const &);       	// "projects/library/seqan/seeds2/align_dynprog_affine.h"(145)
+template <typename TScoreValue, typename TDiagonal, typename TOverlap> inline void _alignInitGutterFromBanded(Matrix<TScoreValue, 2> & matrix, Score<TScoreValue, Simple> const & scoringScheme, TDiagonal lowerDiagonal, TDiagonal upperDiagonal, Matrix<TScoreValue, 2> & otherMatrix, TOverlap overlap0, TOverlap overlap1, NeedlemanWunsch const &);       	// "projects/library/seqan/seeds2/align_dynprog_linear.h"(130)
+
+//____________________________________________________________________________
+// _alignLeadingRectangle
+
+template <typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedSpec, typename TSeedConfig, bool START1_FREE, bool START0_FREE, bool END1_FREE, bool END0_FREE> void _alignLeadingRectangle( AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> & alignmentChain, Seed<TSeedSpec, TSeedConfig> const & rightSeed, AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const & alignConfig);       	// "projects/library/seqan/seeds2/align_chain_banded.h"(182)
+
+//____________________________________________________________________________
+// _alignRectangle
+
+template <typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedSpec, typename TSeedConfig> void _alignRectangle( AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> & alignmentChain, Seed<TSeedSpec, TSeedConfig> const & leftSeed, Seed<TSeedSpec, TSeedConfig> const & rightSeed);       	// "projects/library/seqan/seeds2/align_chain_banded.h"(323)
+
+//____________________________________________________________________________
+// _alignResizeMatrix
+
+template <typename TScoreValue, typename TSequence> inline void _alignResizeMatrix(Matrix<TScoreValue, 3> & matrix, TSequence const & sequence0, TSequence const & sequence1, Gotoh const &);       	// "projects/library/seqan/seeds2/align_dynprog_affine.h"(65)
+template <typename TScoreValue, typename TSequence> inline void _alignResizeMatrix(Matrix<TScoreValue, 2> & matrix, TSequence const & sequence0, TSequence const & sequence1, NeedlemanWunsch const &);       	// "projects/library/seqan/seeds2/align_dynprog_linear.h"(65)
+
+//____________________________________________________________________________
+// _alignSeed
+
+template <typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedSpec, typename TSeedConfig> void _alignSeed( AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> & alignmentChain, Seed<TSeedSpec, TSeedConfig> const & seed);       	// "projects/library/seqan/seeds2/align_chain_banded.h"(406)
+
+//____________________________________________________________________________
+// _alignTraceback
+
+template <typename TAlignmentIterator, typename TSequenceIterator, typename TPosition, typename TScoreValue, typename TScoringScheme, typename TOverlap, bool START0_FREE, bool START1_FREE, bool END0_FREE, bool END1_FREE> TScoreValue _alignTraceback(TAlignmentIterator & alignmentIt0, TAlignmentIterator & alignmentIt1, TSequenceIterator & sourceIt0, TSequenceIterator & sourceIt1, TPosition & finalPos0, TPosition & finalPos1, Matrix<TScoreValue, 3> & matrix, TScoringScheme const & scoringSc [...]
+template <typename TAlignmentIterator, typename TSequenceIterator, typename TPosition, typename TScoreValue, typename TScoringScheme, typename TOverlap, bool START0_FREE, bool START1_FREE, bool END0_FREE, bool END1_FREE> TScoreValue _alignTraceback(TAlignmentIterator & alignmentIt0, TAlignmentIterator & alignmentIt1, TSequenceIterator & sourceIt0, TSequenceIterator & sourceIt1, TPosition & finalPos0, TPosition & finalPos1, Matrix<TScoreValue, 2> & matrix, TScoringScheme const & scoringSc [...]
+
+//____________________________________________________________________________
+// _alignTrailingRectangle
+
+template <typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedSpec, typename TSeedConfig> void _alignTrailingRectangle( AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> & alignmentChain, Seed<TSeedSpec, TSeedConfig> const & leftSeed);       	// "projects/library/seqan/seeds2/align_chain_banded.h"(240)
+
+//____________________________________________________________________________
+// _assignScoreMixin
+
+template <typename TSpec, typename TConfig> inline void _assignScoreMixin(Seed<TSpec, TConfig> & , Seed<TSpec, TConfig> const & , False const &);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(552)
+template <typename TSpec, typename TConfig> inline void _assignScoreMixin(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, True const &);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(562)
+
+//____________________________________________________________________________
+// _bandedChainAlignment
+
+template <typename TContainer, typename TBandwidth, typename TScoreValue, typename TAlign, bool START1_FREE, bool START0_FREE, bool END1_FREE, bool END0_FREE, typename TGlobalAlignmentTag> TScoreValue _bandedChainAlignment( TAlign & alignment, TContainer const & seedChain, TBandwidth k, Score<TScoreValue, Simple> const & scoringScheme, AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const & alignConfig, TGlobalAlignmentTag const &);       	// "projects/library/seqan/seeds2/al [...]
+
+//____________________________________________________________________________
+// _calcExtendedLowerDiag
+
+template <typename TDiagonal, typename TSize> inline void _calcExtendedLowerDiag(TDiagonal & lowerDiag, TSize minCol, TSize antiDiagNo);       	// "projects/library/seqan/seeds2/seeds_extension.h"(437)
+
+//____________________________________________________________________________
+// _calcExtendedUpperDiag
+
+template <typename TDiagonal, typename TSize> inline void _calcExtendedUpperDiag(TDiagonal & upperDiag, TSize maxCol, TSize antiDiagNo);       	// "projects/library/seqan/seeds2/seeds_extension.h"(449)
+
+//____________________________________________________________________________
+// _combineSeeds
+
+template <typename TSeedConfig, typename TScoreValue> inline void _combineSeeds(Seed<Simple, TSeedConfig> & seed, Seed<Simple, TSeedConfig> const & other, Score<TScoreValue, Simple> const & , Nothing const & , Nothing const & , Merge const &);       	// "projects/library/seqan/seeds2/seeds_combination.h"(197)
+template <typename TSeedConfig, typename TScoreValue> inline void _combineSeeds(Seed<Simple, TSeedConfig> & seed, Seed<Simple, TSeedConfig> const & other, Score<TScoreValue, Simple> const & scoringScheme, Nothing const & , Nothing const & , SimpleChain const &);       	// "projects/library/seqan/seeds2/seeds_combination.h"(213)
+template <typename TSeedConfig, typename TScoreValue, typename TSequence0, typename TSequence1> inline void _combineSeeds(Seed<Simple, TSeedConfig> & seed, Seed<Simple, TSeedConfig> const & other, Score<TScoreValue, Simple> const & scoringScheme, TSequence0 const & sequence0, TSequence1 const & sequence1, Chaos const &);       	// "projects/library/seqan/seeds2/seeds_combination.h"(232)
+template <typename TSeedConfig, typename TScoreValue> inline void _combineSeeds(Seed<ChainedSeed, TSeedConfig> & seed, Seed<ChainedSeed, TSeedConfig> const & other, Score<TScoreValue, Simple> const & , Nothing const & , Nothing const & , Merge const &);       	// "projects/library/seqan/seeds2/seeds_combination.h"(304)
+template <typename TSeedConfig, typename TScoreValue> inline void _combineSeeds(Seed<ChainedSeed, TSeedConfig> & seed, Seed<ChainedSeed, TSeedConfig> const & other, Score<TScoreValue, Simple> const & scoringScheme, Nothing const & , Nothing const & , SimpleChain const &);       	// "projects/library/seqan/seeds2/seeds_combination.h"(366)
+template <typename TSeedConfig, typename TScoreValue, typename TSequence0, typename TSequence1> inline void _combineSeeds(Seed<ChainedSeed, TSeedConfig> & seed, Seed<ChainedSeed, TSeedConfig> const & other, Score<TScoreValue, Simple> const & scoringScheme, TSequence0 const & sequence0, TSequence1 const & sequence1, Chaos const &);       	// "projects/library/seqan/seeds2/seeds_combination.h"(389)
+
+//____________________________________________________________________________
+// _computeLowerRightOverlap
+
+template <typename TSize, typename TSequence, typename TScoringScheme, typename TSeedSpec, typename TSeedConfig, typename TAlignmentTag> inline void _computeLowerRightOverlap(TSize & overlap0, TSize & overlap1, Seed<TSeedSpec, TSeedConfig> const & seed, AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> const & alignmentChain);       	// "projects/library/seqan/seeds2/align_chain_banded.h"(145)
+
+//____________________________________________________________________________
+// _computeUpperLeftOverlap
+
+template <typename TSize, typename TSequence, typename TScoringScheme, typename TSeedSpec, typename TSeedConfig, typename TAlignmentTag> inline void _computeUpperLeftOverlap(TSize & overlap0, TSize & overlap1, Seed<TSeedSpec, TSeedConfig> const & seed, AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> const & alignmentChain);       	// "projects/library/seqan/seeds2/align_chain_banded.h"(164)
+
+//____________________________________________________________________________
+// _extendSeedGappedXDropOneDirection
+
+template <typename TConfig, typename TQuerySegment, typename TDatabaseSegment, typename TScoreValue> TScoreValue _extendSeedGappedXDropOneDirection( Seed<Simple, TConfig> & seed, TQuerySegment const & querySeg, TDatabaseSegment const & databaseSeg, ExtensionDirection direction, Score<TScoreValue, Simple> const & scoringScheme, TScoreValue scoreDropOff);       	// "projects/library/seqan/seeds2/seeds_extension.h"(504)
+
+//____________________________________________________________________________
+// _findSeedForCombination
+
+template <typename TSeedSpec, typename TSeedSetConfig, typename TDistanceThreshold, typename TBandwidth, typename TCombination> bool _findSeedForCombination( typename Iterator<typename SeedSet<TSeedSpec, Unordered, TSeedSetConfig>::TAllSeeds, Standard>::Type & mergePartner, bool & seedIsOnTheLeft, SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet, typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type const & seed, TDistanceThreshold const & maxDistance, TBandwidth co [...]
+
+//____________________________________________________________________________
+// _glueAlignmentChain
+
+template <typename TAlignment, typename TSequence, typename TScoringScheme, typename TAlignmentTag, typename TSeedChain, bool START1_FREE, bool START0_FREE, bool END1_FREE, bool END0_FREE> typename Value<typename ScoringScheme<Alignment<TSequence, TScoringScheme, TAlignmentTag> >::Type >::Type _glueAlignmentChain( TAlignment & alignment, AlignmentChain_<TSequence, TScoringScheme, TAlignmentTag> const & alignmentChain, TSeedChain const & seedChain, AlignConfig<START1_FREE, START0_FREE, EN [...]
+
+//____________________________________________________________________________
+// _initAntiDiag3
+
+template <typename TAntiDiag, typename TSize, typename TScoreValue> inline TSize _initAntiDiag3(TAntiDiag & antiDiag3, TSize offset, TSize maxCol, TSize antiDiagNo, TScoreValue minScore, TScoreValue gapCost, TScoreValue undefined);       	// "projects/library/seqan/seeds2/seeds_extension.h"(413)
+
+//____________________________________________________________________________
+// _initAntiDiags
+
+template <typename TAntiDiag, typename TDropOff, typename TScoreValue> inline void _initAntiDiags(TAntiDiag & , TAntiDiag & antiDiag2, TAntiDiag & antiDiag3, TDropOff dropOff, TScoreValue gapCost, TScoreValue undefined);       	// "projects/library/seqan/seeds2/seeds_extension.h"(374)
+
+//____________________________________________________________________________
+// _qualityReached
+
+template <typename TSeed, typename TSeedSet> bool _qualityReached(TSeed const & , TSeedSet const & , Nothing const &);       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(67)
+template <typename TSeed, typename TSeedSet> bool _qualityReached(TSeed const & seed, TSeedSet const & seedSet, MinSeedSize const &);       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(96)
+template <typename TSeed, typename TSeedSet> bool _qualityReached(TSeed const & seed, TSeedSet const & seedSet, MinScore const &);       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(132)
+
+//____________________________________________________________________________
+// _seedsCombineable
+
+template <typename TSeedSpec, typename TSeedConfig, typename TThreshold> inline bool _seedsCombineable(Seed<TSeedSpec, TSeedConfig> const & a, Seed<TSeedSpec, TSeedConfig> const & b, TThreshold const & maxDiagonalDistance, Nothing const & , Merge const &);       	// "projects/library/seqan/seeds2/seeds_combination.h"(90)
+template <typename TSeedSpec, typename TSeedConfig, typename TThreshold> inline bool _seedsCombineable(Seed<TSeedSpec, TSeedConfig> const & a, Seed<TSeedSpec, TSeedConfig> const & b, TThreshold const & maxGapSize, Nothing const & , SimpleChain const &);       	// "projects/library/seqan/seeds2/seeds_combination.h"(119)
+template <typename TSeedSpec, typename TSeedConfig, typename TDistanceThreshold, typename TBandwidthThreshold> inline bool _seedsCombineable(Seed<TSeedSpec, TSeedConfig> const & a, Seed<TSeedSpec, TSeedConfig> const & b, TDistanceThreshold const & maxGapSize, TBandwidthThreshold const & bandwidth, Chaos const &);       	// "projects/library/seqan/seeds2/seeds_combination.h"(148)
+
+//____________________________________________________________________________
+// _swapAntiDiags
+
+template <typename TAntiDiag> inline void _swapAntiDiags(TAntiDiag & antiDiag1, TAntiDiag & antiDiag2, TAntiDiag & antiDiag3);       	// "projects/library/seqan/seeds2/seeds_extension.h"(396)
+
+//____________________________________________________________________________
+// _updateExtendedSeed
+
+template <typename TSeed, typename TSize, typename TDiagonal> inline void _updateExtendedSeed(TSeed & seed, ExtensionDirection direction, TSize cols, TSize rows, TDiagonal lowerDiag, TDiagonal upperDiag);       	// "projects/library/seqan/seeds2/seeds_extension.h"(464)
+
+//____________________________________________________________________________
+// _updateSeedsCoordinatesMergeOrSimpleChain
+
+template <typename TSeedConfig> inline void _updateSeedsCoordinatesMergeOrSimpleChain( Seed<Simple, TSeedConfig> & seed, Seed<Simple, TSeedConfig> const & other);       	// "projects/library/seqan/seeds2/seeds_combination.h"(177)
+
+//____________________________________________________________________________
+// _updateSeedsScoreChaos
+
+template <typename TSpec, typename TConfig, typename TScoreValue> inline void _updateSeedsScoreChaos(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, TScoreValue const & scoreDelta);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(523)
+
+//____________________________________________________________________________
+// _updateSeedsScoreChaosHelper
+
+template <typename TSpec, typename TConfig, typename TScoreValue> inline void _updateSeedsScoreChaosHelper(Seed<TSpec, TConfig> & , Seed<TSpec, TConfig> const & , TScoreValue const & , False const &);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(504)
+template <typename TSpec, typename TConfig, typename TScoreValue> inline void _updateSeedsScoreChaosHelper(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, TScoreValue const & scoreDelta, True const &);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(513)
+
+//____________________________________________________________________________
+// _updateSeedsScoreMerge
+
+template <typename TSpec, typename TConfig> inline void _updateSeedsScoreMerge(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(439)
+
+//____________________________________________________________________________
+// _updateSeedsScoreMergeHelper
+
+template <typename TSpec, typename TConfig> inline void _updateSeedsScoreMergeHelper(Seed<TSpec, TConfig> & , Seed<TSpec, TConfig> const & , False const &);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(394)
+template <typename TSpec, typename TConfig> inline void _updateSeedsScoreMergeHelper(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, True const &);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(405)
+
+//____________________________________________________________________________
+// _updateSeedsScoreSimpleChain
+
+template <typename TSpec, typename TConfig, typename TScoreValue> inline void _updateSeedsScoreSimpleChain(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, Score<TScoreValue, Simple> const & scoringScheme);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(493)
+
+//____________________________________________________________________________
+// _updateSeedsScoreSimpleChainHelper
+
+template <typename TSpec, typename TConfig, typename TScoreValue> inline void _updateSeedsScoreSimpleChainHelper(Seed<TSpec, TConfig> & , Seed<TSpec, TConfig> const & , Score<TScoreValue, Simple> const & , False const &);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(449)
+template <typename TSpec, typename TConfig, typename TScoreValue> inline void _updateSeedsScoreSimpleChainHelper(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, Score<TScoreValue, Simple> const & scoringScheme, True const &);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(458)
+
+//____________________________________________________________________________
+// _write
+
+template <typename TStream, typename TQuerySequence, typename TDatabaseSequence, typename TSeedSetSpec, typename TSeedSpec, typename TSeedConfig> inline void _write(TStream & stream, TQuerySequence & sequence0, TDatabaseSequence & sequence1, SeedSet<TSeedSpec, TSeedSetSpec, TSeedConfig> const & seedSet, Tikz_ const &);       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(255)
+template <typename TStream, typename TConfig> inline void _write(TStream & stream, Seed<Simple, TConfig> const & seed, Tikz_ const &);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(322)
+template <typename TStream, typename TConfig> inline void _write(TStream & stream, Seed<ChainedSeed, TConfig> const & seed, Tikz_ const &);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(407)
+
+//____________________________________________________________________________
+// addSeed
+
+template <typename TSeedSpec, typename TSeedSetConfig, typename TDistanceThreshold, typename TBandwidth, typename TScoreValue, typename TSequence0, typename TSequence1, typename TCombination> inline bool addSeed(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet, typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type const & seed, TDistanceThreshold const & maxDiagDist, TBandwidth const & bandwidth, Score<TScoreValue, Simple> const & scoringScheme, TSequence0 const & s [...]
+template <typename TSeedSpec, typename TSeedSetConfig> inline void addSeed(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet, typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type const & seed, Single const &);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(361)
+
+//____________________________________________________________________________
+// appendDiagonal
+
+template <typename TConfig> inline void appendDiagonal(Seed<ChainedSeed, TConfig> & seed, typename Value<Seed<ChainedSeed, TConfig> >::Type const & diagonal);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(258)
+
+//____________________________________________________________________________
+// assign
+
+template <typename TConfig> void assign(Seed<Simple, TConfig> & target, Seed<Simple, TConfig> const & source);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(295)
+template <typename TConfig> void assign(Seed<Simple, TConfig> & target, Seed<Simple, TConfig> & source);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(309)
+template <typename TConfig> void assign(Seed<ChainedSeed, TConfig> & target, Seed<ChainedSeed, TConfig> const & source);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(385)
+template <typename TConfig> void assign(Seed<ChainedSeed, TConfig> & target, Seed<ChainedSeed, TConfig> & source);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(396)
+
+//____________________________________________________________________________
+// back
+
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type back(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(247)
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type back(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(256)
+template <typename TConfig> inline typename Reference<Seed<ChainedSeed, TConfig> >::Type back(Seed<ChainedSeed, TConfig> & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(336)
+template <typename TConfig> inline typename Reference<Seed<ChainedSeed, TConfig> const>::Type back(Seed<ChainedSeed, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(344)
+
+//____________________________________________________________________________
+// bandedChainAlignment
+
+template <typename TContainer, typename TValue, typename TScoreValue, typename TAlign, bool START1_FREE, bool START0_FREE, bool END1_FREE, bool END0_FREE> TScoreValue bandedChainAlignment(TAlign & alignment, TContainer const & seedChain, TValue k, Score<TScoreValue, Simple> const & scoringScheme, AlignConfig<START1_FREE, START0_FREE, END1_FREE, END0_FREE> const & alignConfig);       	// "projects/library/seqan/seeds2/align_chain_banded.h"(817)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type begin(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet, Standard const &);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(189)
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type begin(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet, Standard const &);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(199)
+template <typename TConfig> inline typename Iterator<Seed<ChainedSeed, TConfig> >::Type begin(Seed<ChainedSeed, TConfig> & seed, Standard const &);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(296)
+template <typename TConfig> inline typename Iterator<Seed<ChainedSeed, TConfig> const>::Type begin(Seed<ChainedSeed, TConfig> const & seed, Standard const &);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(304)
+
+//____________________________________________________________________________
+// chainSeedsGlobally
+
+template <typename TTargetContainer, typename TSeedSpec, typename TSeedSetSpec, typename TSeedConfig> void chainSeedsGlobally( TTargetContainer & target, SeedSet<TSeedSpec, TSeedSetSpec, TSeedConfig> const & seedSet, SparseChaining const &);       	// "projects/library/seqan/seeds2/seeds_global_chaining.h"(79)
+
+//____________________________________________________________________________
+// end
+
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type end(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet, Standard const &);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(209)
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type end(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet, Standard const &);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(219)
+template <typename TConfig> inline typename Iterator<Seed<ChainedSeed, TConfig> >::Type end(Seed<ChainedSeed, TConfig> & seed, Standard const &);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(356)
+template <typename TConfig> inline typename Iterator<Seed<ChainedSeed, TConfig> const>::Type end(Seed<ChainedSeed, TConfig> const & seed, Standard const &);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(364)
+
+//____________________________________________________________________________
+// extendSeed
+
+template <typename TConfig, typename TQuery, typename TDatabase> inline void extendSeed(Seed<Simple, TConfig> & seed, TQuery const & query, TDatabase const & database, ExtensionDirection direction, MatchExtend const &);       	// "projects/library/seqan/seeds2/seeds_extension.h"(131)
+template <typename TConfig, typename TQuery, typename TDatabase> inline void extendSeed(Seed<ChainedSeed, TConfig> & seed, TQuery const & query, TDatabase const & database, ExtensionDirection direction, MatchExtend const &);       	// "projects/library/seqan/seeds2/seeds_extension.h"(175)
+template <typename TConfig, typename TQuery, typename TDatabase, typename TScoreValue, typename TScoreSpec> inline void extendSeed(Seed<Simple, TConfig> & seed, TQuery const & query, TDatabase const & database, ExtensionDirection direction, Score<TScoreValue, TScoreSpec> const & scoringScheme, TScoreValue scoreDropOff, UnGappedXDrop const &);       	// "projects/library/seqan/seeds2/seeds_extension.h"(230)
+template <typename TConfig, typename TQuery, typename TDatabase, typename TScoreValue, typename TScoreSpec> inline void extendSeed(Seed<ChainedSeed, TConfig> & seed, TQuery const & query, TDatabase const & database, ExtensionDirection direction, Score<TScoreValue, TScoreSpec> const & scoringScheme, TScoreValue scoreDropOff, UnGappedXDrop const &);       	// "projects/library/seqan/seeds2/seeds_extension.h"(300)
+template <typename TConfig, typename TQuery, typename TDatabase, typename TScoreValue> inline void extendSeed(Seed<Simple, TConfig> & seed, TQuery const & query, TDatabase const & database, ExtensionDirection direction, Score<TScoreValue, Simple> const & scoringScheme, TScoreValue scoreDropOff, GappedXDrop const &);       	// "projects/library/seqan/seeds2/seeds_extension.h"(649)
+template <typename TConfig, typename TQuery, typename TDatabase, typename TScoreValue> inline void extendSeed(Seed<ChainedSeed, TConfig> & , TQuery const & , TDatabase const & , ExtensionDirection , Score<TScoreValue, Simple> const & , TScoreValue , GappedXDrop const &);       	// "projects/library/seqan/seeds2/seeds_extension.h"(707)
+
+//____________________________________________________________________________
+// front
+
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type front(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(229)
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type front(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(238)
+template <typename TConfig> inline typename Reference<Seed<ChainedSeed, TConfig> >::Type front(Seed<ChainedSeed, TConfig> & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(316)
+template <typename TConfig> inline typename Reference<Seed<ChainedSeed, TConfig> const>::Type front(Seed<ChainedSeed, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(324)
+
+//____________________________________________________________________________
+// getBeginDim0
+
+template <typename TConfig> inline typename Position<Seed<Simple, TConfig> >::Type getBeginDim0(Seed<Simple, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(171)
+template <typename TConfig> inline typename Position<Seed<ChainedSeed, TConfig> >::Type getBeginDim0(Seed<ChainedSeed, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(201)
+
+//____________________________________________________________________________
+// getBeginDim1
+
+template <typename TConfig> inline typename Position<Seed<Simple, TConfig> >::Type getBeginDim1(Seed<Simple, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(206)
+template <typename TConfig> inline typename Position<Seed<ChainedSeed, TConfig> >::Type getBeginDim1(Seed<ChainedSeed, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(217)
+
+//____________________________________________________________________________
+// getEndDiagonal
+
+template <typename TSpec, typename TConfig> inline typename Diagonal<Seed<TSpec, TConfig> >::Type getEndDiagonal(Seed<TSpec, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(383)
+
+//____________________________________________________________________________
+// getEndDim0
+
+template <typename TConfig> inline typename Position<Seed<Simple, TConfig> >::Type getEndDim0(Seed<Simple, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(198)
+template <typename TConfig> inline typename Position<Seed<ChainedSeed, TConfig> >::Type getEndDim0(Seed<ChainedSeed, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(209)
+
+//____________________________________________________________________________
+// getEndDim1
+
+template <typename TConfig> inline typename Position<Seed<Simple, TConfig> >::Type getEndDim1(Seed<Simple, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(233)
+template <typename TConfig> inline typename Position<Seed<ChainedSeed, TConfig> >::Type getEndDim1(Seed<ChainedSeed, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(225)
+
+//____________________________________________________________________________
+// getLowerDiagonal
+
+template <typename TSpec, typename TConfig> inline typename Diagonal<Seed<TSpec, TConfig> >::Type getLowerDiagonal(Seed<TSpec, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(261)
+
+//____________________________________________________________________________
+// getMinScoreThreshold
+
+template <typename TScore> TScore getMinScoreThreshold(MinScoreMixin_<TScore> const & mixin);       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(124)
+
+//____________________________________________________________________________
+// getMinSeedSizeThreshold
+
+template <typename TSize> TSize getMinSeedSizeThreshold(MinSeedSizeMixin_<TSize> const & mixin);       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(89)
+
+//____________________________________________________________________________
+// getScore
+
+template <typename TSeed> inline typename SeedScore<TSeed>::Type getScore(TSeed const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(533)
+
+//____________________________________________________________________________
+// getSeedSize
+
+template <typename TSpec, typename TConfig> inline typename Size<Seed<TSpec, TConfig> >::Type getSeedSize(Seed<TSpec, TConfig> & seed);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(332)
+template <typename TSpec, typename TConfig> inline typename Size<Seed<TSpec, TConfig> >::Type getSeedSize(Seed<TSpec, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(342)
+
+//____________________________________________________________________________
+// getStartDiagonal
+
+template <typename TSpec, typename TConfig> inline typename Diagonal<Seed<TSpec, TConfig> >::Type getStartDiagonal(Seed<TSpec, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(365)
+
+//____________________________________________________________________________
+// getUpperDiagonal
+
+template <typename TSpec, typename TConfig> inline typename Diagonal<Seed<TSpec, TConfig> >::Type getUpperDiagonal(Seed<TSpec, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(298)
+
+//____________________________________________________________________________
+// length
+
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Size<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type length(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(171)
+template <typename TSeedSpec, typename TSeedSetConfig> inline typename Size<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type length(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet);       	// "projects/library/seqan/seeds2/seeds_seed_set_unordered.h"(180)
+template <typename TConfig> inline typename Size<Seed<ChainedSeed, TConfig> >::Type length(Seed<ChainedSeed, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(237)
+
+//____________________________________________________________________________
+// move
+
+template <typename TConfig> void move(Seed<Simple, TConfig> & target, Seed<Simple, TConfig> & source);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(281)
+template <typename TConfig> void move(Seed<ChainedSeed, TConfig> & target, Seed<ChainedSeed, TConfig> & source);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(374)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TContainer, typename TWrappedIter> inline bool operator!=(Iter<TContainer, Indirect<TWrappedIter> > const & a, Iter<TContainer, Indirect<TWrappedIter> > const & b);       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(97)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TContainer, typename TWrappedIter> inline typename Value<TWrappedIter>::Type & operator*(Iter<TContainer, Indirect<TWrappedIter> > & iter);       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(137)
+template <typename TContainer, typename TWrappedIter> inline typename Value<TWrappedIter>::Type & operator*(Iter<TContainer, Indirect<TWrappedIter> > const & iter);       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(146)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename TContainer, typename TWrappedIter, typename TDiff> Iter<TContainer, Indirect<TWrappedIter> > operator+(Iter<TContainer, Indirect<TWrappedIter> > const & it, TDiff const diff);       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(105)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename TContainer, typename TWrappedIter> inline Iter<TContainer, Indirect<TWrappedIter> > & operator++(Iter<TContainer, Indirect<TWrappedIter> > & iter);       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(115)
+template <typename TContainer, typename TWrappedIter> inline Iter<TContainer, Indirect<TWrappedIter> > operator++(Iter<TContainer, Indirect<TWrappedIter> > & iter, int );       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(125)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TStream, typename TPosition, typename TSize> inline TStream & operator<<(TStream & stream, SeedDiagonal<TPosition, TSize> const & seedDiagonal);       	// "projects/library/seqan/seeds2/seeds_seed_diagonal.h"(115)
+template <typename TStream, typename TConfig> inline TStream & operator<<(TStream & stream, Seed<Simple, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(148)
+template <typename TStream, typename TConfig> inline TStream & operator<<(TStream & stream, Seed<ChainedSeed, TConfig> const & seed);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(174)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TPosition, typename TSize> inline bool operator==(SeedDiagonal<TPosition, TSize> const & a, SeedDiagonal<TPosition, TSize> const & b);       	// "projects/library/seqan/seeds2/seeds_seed_diagonal.h"(123)
+template <typename TConfig> inline bool operator==(Seed<Simple, TConfig> const & a, Seed<Simple, TConfig> const & b);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(158)
+template <typename TContainer, typename TWrappedIter> inline bool operator==(Iter<TContainer, Indirect<TWrappedIter> > const & a, Iter<TContainer, Indirect<TWrappedIter> > const & b);       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(88)
+template <typename TConfig> inline bool operator==(Seed<ChainedSeed, TConfig> const & a, Seed<ChainedSeed, TConfig> const & b);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(191)
+
+//____________________________________________________________________________
+// setBeginDim0
+
+template <typename TConfig, typename TPosition> inline void setBeginDim0(Seed<Simple, TConfig> & seed, TPosition newLeftPosition);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(190)
+
+//____________________________________________________________________________
+// setBeginDim1
+
+template <typename TConfig, typename TPosition> inline void setBeginDim1(Seed<Simple, TConfig> & seed, TPosition newLeftPosition);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(225)
+
+//____________________________________________________________________________
+// setEndDim0
+
+template <typename TConfig, typename TPosition> inline void setEndDim0(Seed<Simple, TConfig> & seed, TPosition newRightPosition);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(252)
+
+//____________________________________________________________________________
+// setEndDim1
+
+template <typename TConfig, typename TPosition> inline void setEndDim1(Seed<Simple, TConfig> & seed, TPosition newRightPosition);       	// "projects/library/seqan/seeds2/seeds_seed_simple.h"(271)
+
+//____________________________________________________________________________
+// setLowerDiagonal
+
+template <typename TSpec, typename TConfig, typename TPosition> inline void setLowerDiagonal(Seed<TSpec, TConfig> & seed, TPosition newDiag);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(280)
+
+//____________________________________________________________________________
+// setMinScoreThreshold
+
+template <typename TSeedSet, typename TScore> void setMinScoreThreshold(TSeedSet & seedSet, TScore const & score);       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(117)
+
+//____________________________________________________________________________
+// setMinSeedSizeThreshold
+
+template <typename TSeedSet, typename TSize> void setMinSeedSizeThreshold(TSeedSet & seedSet, TSize const & size);       	// "projects/library/seqan/seeds2/seeds_seed_set_base.h"(82)
+
+//____________________________________________________________________________
+// setScore
+
+template <typename TSeed, typename TScore> inline void setScore(TSeed & seed, TScore const & score);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(542)
+
+//____________________________________________________________________________
+// setUpperDiagonal
+
+template <typename TSpec, typename TConfig, typename TPosition> inline void setUpperDiagonal(Seed<TSpec, TConfig> & seed, TPosition newDiag);       	// "projects/library/seqan/seeds2/seeds_seed_base.h"(317)
+
+//____________________________________________________________________________
+// truncateDiagonals
+
+template <typename TConfig> inline void truncateDiagonals(Seed<ChainedSeed, TConfig> & seed, typename Iterator<Seed<ChainedSeed, TConfig> >::Type const & first);       	// "projects/library/seqan/seeds2/seeds_seed_chained.h"(283)
+
+//____________________________________________________________________________
+// value
+
+template <typename TContainer, typename TWrappedIter> inline typename Reference<Iter<TContainer, Indirect<TWrappedIter> > >::Type value(Iter<TContainer, Indirect<TWrappedIter> > & iter);       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(155)
+template <typename TContainer, typename TWrappedIter> inline typename Reference<Iter<TContainer, Indirect<TWrappedIter> > >::Type value(Iter<TContainer, Indirect<TWrappedIter> > const & iter);       	// "projects/library/seqan/seeds2/basic_iter_indirect.h"(164)
+
+//____________________________________________________________________________
+// write
+
+template <typename TStream, typename TAlignment, typename TAlignmentChain, typename TSeedChain> void write(TStream & stream, TAlignment const & alignment, TAlignmentChain const & alignmentChain, TSeedChain const & seedChain, Tikz_ const &);       	// "projects/library/seqan/seeds2/align_chain_banded.h"(613)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_base.h b/src/SeqAn-1.3/seqan/seeds2/seeds_base.h
new file mode 100644
index 0000000..8bd2b45
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_base.h
@@ -0,0 +1,42 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Basic definitions for the module seeds.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_BASE_H_
+#define SEQAN_SEEDS_SEEDS_BASE_H_
+
+namespace seqan {
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_combination.h b/src/SeqAn-1.3/seqan/seeds2/seeds_combination.h
new file mode 100644
index 0000000..2f008ac
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_combination.h
@@ -0,0 +1,464 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Algorithms for combining (i.e. merging and chaining) seeds.
+// ==========================================================================
+
+// TODO(holtgrew): All the Nothing()'s should not be part of the public interface.
+
+#ifndef SEQAN_SEEDS_SEEDS_COMBINATION_H_
+#define SEQAN_SEEDS_SEEDS_COMBINATION_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+// TODO(holtgrew): Stream-line tags to Merge, ChaosChain, SimpleChain?
+/**
+.Tag.Local Chaining
+..cat:Seed Handling
+..summary:The local chaining algorithms to use when adding a seed to a @Class.SeedSet at .
+..see:Class.SeedSet
+..see:Function.addSeed
+..tag.Merge:Merge with existing seed.
+..tag.Chaos:CHAOS chaining.
+..tag.SimpleChain:Simple chaining.
+..tag.Single:Add single seed without merging and chaining.
+..include:seqan/seeds.h
+*/
+struct Merge_;
+typedef Tag<Merge_> Merge;
+
+struct Chaos_;
+typedef Tag<Chaos_> Chaos;
+
+struct SimpleChain_;
+typedef Tag<SimpleChain_> SimpleChain;
+
+struct Single_;
+typedef Tag<Single_> Single;
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+// Returns true iff b can be merged into a where a is the one to the
+// upper left, b the one to the lower right.
+template <typename TSeedSpec, typename TSeedConfig, typename TThreshold>
+inline bool
+_seedsCombineable(Seed<TSeedSpec, TSeedConfig> const & a,
+                  Seed<TSeedSpec, TSeedConfig> const & b,
+                  TThreshold const & maxDiagonalDistance,
+                  Nothing const & /*maxBandwidth*/,
+                  Merge const &)
+{
+    // TODO(holtgrew): TThreshold could be Position<TSeed>::Type.
+    SEQAN_CHECKPOINT;
+
+    // b has to be right of a for the two seeds to be mergeable.
+    if (getBeginDim0(b) < getBeginDim0(a) || getBeginDim1(b) < getBeginDim1(a))
+        return false;
+    // If the two seeds do not overlap, they cannot be merged.
+    if (getBeginDim0(b) > getEndDim0(a) || getBeginDim1(b) > getEndDim1(a))
+        return false;
+    // If the distance between the diagonals exceeds the threshold
+    // then the seeds cannot be merged.
+    typedef typename MakeUnsigned_<TThreshold>::Type TUnsignedThreshold;
+    if (static_cast<TUnsignedThreshold>(_abs(getEndDiagonal(a) - getStartDiagonal(b))) > static_cast<TUnsignedThreshold>(maxDiagonalDistance))
+        return false;
+    // Otherwise, the seeds can be merged.
+    return true;
+}
+
+
+// Returns true iff b can be simple-chained to a where a is the one to
+// the upper left, b the one to the lower right.
+template <typename TSeedSpec, typename TSeedConfig, typename TThreshold>
+inline bool
+_seedsCombineable(Seed<TSeedSpec, TSeedConfig> const & a,
+                  Seed<TSeedSpec, TSeedConfig> const & b,
+                  TThreshold const & maxGapSize,
+                  Nothing const & /*maxBandwidth*/,
+                  SimpleChain const &)
+{
+    // TODO(holtgrew): We should be able to configure whether we want to have Manhattan, euclidean, minimal edit distance, for seeds.
+    // TODO(holtgrew): TThreshold could be Position<TSeed>::Type.
+    SEQAN_CHECKPOINT;
+
+    // b has to be right of a for the two seeds to be chainable.
+    if (getBeginDim0(b) < getEndDim0(a) || getBeginDim1(b) < getEndDim1(a))
+        return false;
+
+    // Distance is maximal distance, this corresponds to going the
+    // distacen in the smaller distance with matches/mismatches and
+    // the rest with indels.
+    TThreshold distance = _max(getBeginDim0(b) - getEndDim0(a), getBeginDim1(b) - getEndDim1(a));
+    // Compare distance with threshold.
+    return distance <= maxGapSize;
+}
+
+
+// Returns true iff b can be Chaos chained to a where a is the one to
+// the upper left, b the one to the lower right.
+//
+// TODO(holtgrew): Replace bandwidth with diagonalDistance.
+template <typename TSeedSpec, typename TSeedConfig, typename TDistanceThreshold, typename TBandwidthThreshold>
+inline bool
+_seedsCombineable(Seed<TSeedSpec, TSeedConfig> const & a,
+                  Seed<TSeedSpec, TSeedConfig> const & b,
+                  TDistanceThreshold const & maxGapSize,
+                  TBandwidthThreshold const & bandwidth,
+                  Chaos const &)
+{
+    SEQAN_CHECKPOINT;
+
+    // b has to be right of a for the two seeds to be chainable.
+    if (getBeginDim0(b) < getEndDim0(a) || getBeginDim1(b) < getEndDim1(a))
+        return false;
+
+    // The diagonal distance has to be smaller than the bandwidth.
+    // TODO(holtgrew): s/getStartDiagonal/getBeginDiagonal/
+    TBandwidthThreshold diagonalDistance = _abs(getEndDiagonal(b) - getStartDiagonal(a));
+    if (diagonalDistance > bandwidth)
+        return false;
+
+    // Distance is maximal distance, this corresponds to going the
+    // distance in the smaller distance with matches/mismatches and
+    // the rest with indels.
+    TDistanceThreshold distance = _max(getBeginDim0(b) - getEndDim0(a), getBeginDim1(b) - getEndDim1(a));
+    // Compare distance with threshold.
+    return distance <= maxGapSize;
+}
+
+
+// Updating the coordinates of seeds is the same for merging and
+// simple chaining.  Only the score computation differs.
+template <typename TSeedConfig>
+inline void
+_updateSeedsCoordinatesMergeOrSimpleChain(
+        Seed<Simple, TSeedConfig> & seed,
+        Seed<Simple, TSeedConfig> const & other)
+{
+    SEQAN_CHECKPOINT;
+
+    setBeginDim0(seed, _min(getBeginDim0(seed), getBeginDim0(other)));
+    setBeginDim1(seed, _min(getBeginDim1(seed), getBeginDim1(other)));
+    setEndDim0(seed, _max(getEndDim0(seed), getEndDim0(other)));
+    setEndDim1(seed, _max(getEndDim1(seed), getEndDim1(other)));
+    setLowerDiagonal(seed, _min(getLowerDiagonal(seed), getLowerDiagonal(other)));
+    setUpperDiagonal(seed, _max(getUpperDiagonal(seed), getUpperDiagonal(other)));
+}
+
+
+template <typename TSeedConfig, typename TScoreValue>
+inline void
+_combineSeeds(Seed<Simple, TSeedConfig> & seed,
+              Seed<Simple, TSeedConfig> const & other,
+              Score<TScoreValue, Simple> const & /*scoringScheme*/,
+              Nothing const & /*sequence0*/,
+              Nothing const & /*sequence1*/,
+              Merge const &)
+{
+    SEQAN_CHECKPOINT;
+
+    _updateSeedsScoreMerge(seed, other);
+    _updateSeedsCoordinatesMergeOrSimpleChain(seed, other);
+}
+
+
+template <typename TSeedConfig, typename TScoreValue>
+inline void
+_combineSeeds(Seed<Simple, TSeedConfig> & seed,
+              Seed<Simple, TSeedConfig> const & other,
+              Score<TScoreValue, Simple> const & scoringScheme,
+              Nothing const & /*sequence0*/,
+              Nothing const & /*sequence1*/,
+              SimpleChain const &)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef Seed<Simple, TSeedConfig> TSeed;
+    typedef typename Position<TSeed>::Type TPosition;
+
+    _updateSeedsScoreSimpleChain(seed, other, scoringScheme);
+    _updateSeedsCoordinatesMergeOrSimpleChain(seed, other);
+}
+
+
+template <typename TSeedConfig, typename TScoreValue, typename TSequence0, typename TSequence1>
+inline void
+_combineSeeds(Seed<Simple, TSeedConfig> & seed,
+              Seed<Simple, TSeedConfig> const & other,
+              Score<TScoreValue, Simple> const & scoringScheme,
+              TSequence0 const & sequence0,
+              TSequence1 const & sequence1,
+              Chaos const &)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef Seed<Simple, TSeedConfig> TSeed;
+    typedef typename Position<TSeed>::Type TPosition;
+
+    // TODO(holtgrew): Assert seed left of other.
+
+    // Compute gaps in both dimensions, the remaining gap is the
+    // vertical/horizontal distance we will not fill with CHAOS
+    // chaining.
+    //
+    // TODO(holtgrew): We need + 1 here, do we need it anywhere else?
+    TPosition gapDim0 = getBeginDim0(other) - getEndDim0(seed);
+    TPosition gapDim1 = getBeginDim1(other) - getEndDim1(seed);
+    TPosition minGap = _min(gapDim0, gapDim1);
+    TPosition maxGap = _max(gapDim0, gapDim1);
+    TPosition remainingGap = maxGap - minGap;
+
+    // Compute new score using the CHAOS method.
+    //
+    // First, compute the score when force-aligning from seed.
+    TPosition posLeft0 = getEndDim0(seed);
+    TPosition posLeft1 = getEndDim1(seed);
+    TScoreValue tmpScore = 0;
+    // TODO(holtgrew): Probably better use iterators on sequences!
+    for (TPosition i = 0; i < minGap; ++i)
+        tmpScore += score(scoringScheme, sequence0[posLeft0 + i], sequence1[posLeft1 + i]);
+
+    SEQAN_ASSERT_GT(getBeginDim0(other), static_cast<TPosition>(0));
+    SEQAN_ASSERT_GT(getBeginDim1(other), static_cast<TPosition>(0));
+    TPosition posRight0 = getBeginDim0(other);
+    TPosition posRight1 = getBeginDim1(other);
+
+    // Now, try to put the gap at each position and get the position
+    // with the highest score.  If there are two such positions, the
+    // first one found is returned which is the one that is furthest
+    // away from seed.
+    TPosition bestGapPos = 0;  // delta to lowermost position
+    TScoreValue bestScore = tmpScore;
+    for (TPosition i = 1; i < minGap; ++i) {
+        tmpScore -= score(scoringScheme, sequence0[posLeft0 + minGap - i], sequence1[posLeft1 + minGap - i]);
+        tmpScore += score(scoringScheme, sequence0[posRight0 - i], sequence1[posRight1 - i]);
+        if (tmpScore > bestScore) {
+            // Found a better score.
+            bestScore = tmpScore;
+            bestGapPos = i;
+        }
+    }
+
+    // Now, the best gap is when extending the lower right seed
+    // (other) by bestGapPos to the upper right.  However, this is
+    // ignored for simple seeds: We simply update the score and are
+    // done.
+    _updateSeedsScoreChaos(seed, other, bestScore + remainingGap * scoreGap(scoringScheme));
+
+    // For simple seeds, the coordinate computation is the same as for
+    // merge/simple chain.
+    //
+    // TODO(holtgrew): Adjust the name of updateSeedsCoordinatesMergeOrSimpleChain to reflect this.
+    _updateSeedsCoordinatesMergeOrSimpleChain(seed, other);
+}
+
+
+template <typename TSeedConfig, typename TScoreValue>
+inline void
+_combineSeeds(Seed<ChainedSeed, TSeedConfig> & seed,
+              Seed<ChainedSeed, TSeedConfig> const & other,
+              Score<TScoreValue, Simple> const & /*scoringScheme*/,
+              Nothing const & /*sequence0*/,
+              Nothing const & /*sequence1*/,
+              Merge const &)
+{
+    SEQAN_CHECKPOINT;
+    // For chained seeds, we first remove all diagonals from seed
+    // until the last diagonal of seed starts truly before other.
+    // Then, we possibly shorten the last diagonal.  Finally, we copy
+    // over all diagonals from other.
+
+    // std::cout << "Merging chained seeds " << seed << " and " << other << std::endl;
+    SEQAN_ASSERT_LEQ_MSG(getBeginDim0(seed), getBeginDim0(other), "Monotony in both dimensions required for merging.");
+    SEQAN_ASSERT_LEQ_MSG(getBeginDim1(seed), getBeginDim1(other), "Monotony in both dimensions required for merging.");
+    
+    _updateSeedsScoreMerge(seed, other);
+
+    // Remove diagonals.
+    typedef Seed<ChainedSeed, TSeedConfig> TSeed;
+    typedef typename Iterator<TSeed, Standard>::Type TIterator;
+    TIterator it;
+    // TODO(holtgrew): Could use back() instead of lastKept.
+    TIterator lastKept = begin(seed);
+    for (it = begin(seed); it != end(seed); ++it) {
+        if (it->beginDim0 >= getBeginDim0(other) && it->beginDim1 >= getBeginDim1(other))
+            break;
+        lastKept = it;
+    }
+    if (it != end(seed))
+        truncateDiagonals(seed, it);
+    // std::cout << "Seed after truncating diagonals: " << seed << std::endl;
+
+    // Shorten last diagonal if necessary.
+    if (lastKept->beginDim0 + lastKept->length > getBeginDim0(other) && lastKept->beginDim1 + lastKept->length > getBeginDim1(other)) {
+        lastKept->length = _min(getBeginDim0(other) - lastKept->beginDim0, getBeginDim1(other) - lastKept->beginDim1);
+    } else if (lastKept->beginDim0 + lastKept->length > getBeginDim0(other)) {
+        lastKept->length = getBeginDim0(other) - lastKept->beginDim0;
+    } else if (lastKept->beginDim1 + lastKept->length > getBeginDim1(other)) {
+        lastKept->length = getBeginDim1(other) - lastKept->beginDim1;
+    }
+
+    // Maybe remove shortened diagonal if its length is 0.
+    if (back(seed).length == 0) {
+        // TODO(holtgrew): Do not use dot method.
+        seed._seedDiagonals.pop_back();
+    }
+
+    // Copy over other diagonals.
+    typedef typename Iterator<TSeed const, Standard>::Type TConstIterator;
+    for (TConstIterator it = begin(other, Standard()); it != end(other, Standard()); ++it)
+        appendDiagonal(seed, *it);
+
+    // std::cout << "Chained seed after merging: " << seed << std::endl;
+
+    // TODO(holtgrew): Update lower and upper diagonals!
+}
+
+
+template <typename TSeedConfig, typename TScoreValue>
+inline void
+_combineSeeds(Seed<ChainedSeed, TSeedConfig> & seed,
+              Seed<ChainedSeed, TSeedConfig> const & other,
+              Score<TScoreValue, Simple> const & scoringScheme,
+              Nothing const & /*sequence0*/,
+              Nothing const & /*sequence1*/,
+              SimpleChain const &)
+{
+    SEQAN_CHECKPOINT;
+    // Simply copy over the diagonals of the seed (other) into the
+    // left one (seed) after updating the score.
+
+    _updateSeedsScoreSimpleChain(seed, other, scoringScheme);
+
+    // Copy over other diagonals.
+    typedef Seed<ChainedSeed, TSeedConfig> TSeed;
+    typedef typename Iterator<TSeed const, Standard>::Type TConstIterator;
+    for (TConstIterator it = begin(other, Standard()); it != end(other, Standard()); ++it)
+        appendDiagonal(seed, *it);
+}
+
+
+template <typename TSeedConfig, typename TScoreValue, typename TSequence0, typename TSequence1>
+inline void
+_combineSeeds(Seed<ChainedSeed, TSeedConfig> & seed,
+              Seed<ChainedSeed, TSeedConfig> const & other,
+              Score<TScoreValue, Simple> const & scoringScheme,
+              TSequence0 const & sequence0,
+              TSequence1 const & sequence1,
+              Chaos const &)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef Seed<ChainedSeed, TSeedConfig> TSeed;
+    typedef typename Position<TSeed>::Type TPosition;
+    typedef typename Iterator<TSeed const, Standard>::Type TConstIterator;
+
+    // TODO(holtgrew): Assert seed left of other.
+
+    // Compute gaps in both dimensions, the remaining gap is the
+    // vertical/horizontal distance we will not fill with CHAOS
+    // chaining.
+    //
+    // TODO(holtgrew): We need + 1 here, do we need it anywhere else?
+    TPosition gapDim0 = getBeginDim0(other) - getEndDim0(seed);
+    TPosition gapDim1 = getBeginDim1(other) - getEndDim1(seed);
+    TPosition minGap = _min(gapDim0, gapDim1);
+    TPosition maxGap = _max(gapDim0, gapDim1);
+    TPosition remainingGap = maxGap - minGap;
+
+    // Compute new score using the CHAOS method.
+    //
+    // First, compute the score when force-aligning from seed.
+    TPosition posLeft0 = getEndDim0(seed);
+    TPosition posLeft1 = getEndDim1(seed);
+    TScoreValue tmpScore = 0;
+    // TODO(holtgrew): Probably better use iterators on sequences!
+    for (TPosition i = 0; i < minGap; ++i)
+        tmpScore += score(scoringScheme, sequence0[posLeft0 + i], sequence1[posLeft1 + i]);
+
+    SEQAN_ASSERT_GT(getBeginDim0(other), static_cast<TPosition>(0));
+    SEQAN_ASSERT_GT(getBeginDim1(other), static_cast<TPosition>(0));
+    TPosition posRight0 = getBeginDim0(other);
+    TPosition posRight1 = getBeginDim1(other);
+
+    // Now, try to put the gap at each position and get the position
+    // with the highest score.  If there are two such positions, the
+    // first one found is returned which is the one that is furthest
+    // away from seed.
+    TPosition bestGapPos = 0;  // delta to lowermost position
+    TScoreValue bestScore = tmpScore;
+    for (TPosition i = 1; i < minGap; ++i) {
+        tmpScore -= score(scoringScheme, sequence0[posLeft0 + minGap - i], sequence1[posLeft1 + minGap - i]);
+        tmpScore += score(scoringScheme, sequence0[posRight0 - i], sequence1[posRight1 - i]);
+        if (tmpScore > bestScore) {
+            // Found a better score.
+            bestScore = tmpScore;
+            bestGapPos = i;
+        }
+    }
+
+    // Now, the best gap is when extending the lower right seed
+    // (other) by bestGapPos to the upper right.  The upper left seed
+    // is extended by (minGap - bestGapPos).
+    //
+    // Adjust last diagonal of seed.
+    back(seed).length += minGap - bestGapPos;
+    // Copy over the first diagonal of other and adjust diagonal.
+    appendDiagonal(seed, front(other));
+    back(seed).beginDim0 -= bestGapPos;
+    back(seed).beginDim1 -= bestGapPos;
+    back(seed).length += bestGapPos;
+    // Copy over all other diagonals.
+    TConstIterator it = begin(other, Standard());
+    TConstIterator itEnd = end(other, Standard());
+    // TODO(holtgrew): value(it) does not work here, the adaption around std::list needs more work!
+    for (++it; it != itEnd; ++it)
+        appendDiagonal(seed, *it);
+
+    // Finally, we update the score and are done.
+    _updateSeedsScoreChaos(seed, other, bestScore + remainingGap * scoreGap(scoringScheme));
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEEDS_SEEDS_COMBINATION_UNORDERED_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_extension.h b/src/SeqAn-1.3/seqan/seeds2/seeds_extension.h
new file mode 100644
index 0000000..2dcbb0d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_extension.h
@@ -0,0 +1,735 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+//
+// Based on the code by Carsten Kemena <carsten.kemena at crg.es>, debugged
+// by Birte Kehr <birte.kehr at fu-berlin.de>.
+// ==========================================================================
+// Seed extension algorithms.
+//
+// The approach for gapped X-drop extension is based on the algorithm in
+// Figure 2 from (Zhang et al., 2000).
+//
+//  Zhang Z, Schwartz S, Wagner L, Miller W.  A greedy algorithm for aligning
+//  DNA sequences.  Journal of computational biologyA a journal of
+//  computational molecular cell biology.  2000;7(1-2):203-14.
+//  doi:10.1089/10665270050081478
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_EXTENSION_H_
+#define SEQAN_SEEDS_SEEDS_EXTENSION_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+/**
+.Tag.Seed Extension
+..cat:Seed Handling
+..summary:The algorithms used to extend a seed.
+..see:Function.extendSeed
+..see:Function.extendSeeds
+..see:Function.extendSeedScore
+..see:Function.extendSeedsScore
+..tag.MatchExtend:Extends a seed until a mismatch occurs.
+..tag.UngappedXDrop:Ungapped extension of a seed until score drops below a Value.
+..tag.GappedXDrop:Gapped extension of a seed until score drops below a Value. Only @Spec.SimpleSeed at s.
+..include:seqan/seeds.h
+*/
+struct MatchExtend_;
+typedef Tag<MatchExtend_> const MatchExtend;
+
+struct UngappedXDrop_;
+typedef Tag<UngappedXDrop_> const UnGappedXDrop;
+
+struct GappedXDrop_;
+typedef Tag<GappedXDrop_> const GappedXDrop;
+
+enum ExtensionDirection
+{
+    EXTEND_LEFT,
+    EXTEND_RIGHT,
+    EXTEND_BOTH,
+	EXTEND_NONE
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+/**
+.Function.extendSeed
+..summary:Extends a seed.
+..cat:Seed Handling
+..signature:extendSeed(seed, query, database, direction, MatchExtend)
+..signature:extendSeed(seed, query, database, direction, scoreDropOff, scoreMatrix, {UngappedXDrop, GappedXDrop})
+..param.seed: The seed to extend.
+...type:Class.Seed
+..param.query: The query sequence.
+...type:Class.String
+..param.query: The database sequence.
+...type:Class.String
+..param.direction: Defines the direction in which the seed should be extended. 0 = left, 1 = right, 2 = both
+..param.scoreDropOff: The score drop after which the extension should stop. The extension stops if this value is exceeded.
+...remarks:Only used for the algorithms @Tag.Seed Extension.UngappedXDrop@ and @Tag.Seed Extension.GappedXDrop@
+..param.scoreMatrix: The scoring scheme.
+...type:Spec.Simple Score
+...remarks:Only used for the algorithms @Tag.Seed Extension.UngappedXDrop@ and @Tag.Seed Extension.GappedXDrop@
+..param.tag: The algorithm to use.
+...type:Tag.Seed Extension.MatchExtend
+...type:Tag.Seed Extension.UngappedXDrop
+...type:Tag.Seed Extension.GappedXDrop
+..include:seqan/seeds.h
+*/
+
+// We need one specialization for each combination of the extension
+// variants and seeds.  It is not worth to extract the common parts
+// for simple and chained seeds.
+
+template <typename TConfig, typename TQuery, typename TDatabase>
+inline void 
+extendSeed(Seed<Simple, TConfig> & seed, 
+		   TQuery const & query,
+		   TDatabase const & database,
+		   ExtensionDirection direction,
+		   MatchExtend const &)
+{
+    // For match extension of Simple Seeds, we can simply update the
+    // begin and end values in each dimension.
+	SEQAN_CHECKPOINT;
+
+    typedef Seed<Simple, TConfig> TSeed;
+    typedef typename Position<TSeed>::Type TPosition;
+    typedef typename Size<TSeed>::Type TSize;
+    
+	// Extension to the left
+	if (direction == EXTEND_LEFT || direction == EXTEND_BOTH) {
+		TPosition posDim0 = getBeginDim0(seed) ;
+		TPosition posDim1 = getBeginDim1(seed);
+		while (posDim0 >= 1 && posDim1 >= 1 && query[posDim0 - 1] == database[posDim1 - 1]) {
+			--posDim0;
+			--posDim1;
+		}
+		setBeginDim0(seed, posDim0);
+		setBeginDim1(seed, posDim1);
+	}
+
+	// Extension to the right
+	if (direction == EXTEND_RIGHT || direction == EXTEND_BOTH) {
+		TSize lengthDim0 = length(query);
+		TSize lengthDim1 = length(database);
+		TPosition posDim0 = getEndDim0(seed) ;
+		TPosition posDim1 = getEndDim1(seed);
+		while (posDim0 < lengthDim0 && posDim1 < lengthDim1 && query[posDim0] == database[posDim1]) {
+			++posDim0;
+			++posDim1;
+		}
+		setEndDim0(seed, posDim0);
+		setEndDim1(seed, posDim1);
+	}
+}
+
+
+template <typename TConfig, typename TQuery, typename TDatabase>
+inline void 
+extendSeed(Seed<ChainedSeed, TConfig> & seed, 
+		   TQuery const & query,
+		   TDatabase const & database,
+		   ExtensionDirection direction,
+		   MatchExtend const &)
+{
+    // For match extension of Chained Seeds, we extend the first and
+    // the last Seed Diagonal.
+	SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_GT(length(seed), 0u);
+
+    typedef Seed<ChainedSeed, TConfig> TSeed;
+    typedef typename Value<TSeed>::Type TSeedDiagonal;
+    typedef typename Position<TSeedDiagonal>::Type TPosition;
+    typedef typename Size<TSeedDiagonal>::Type TSize;
+    
+	// Extension to the left
+	if (direction == EXTEND_LEFT || direction == EXTEND_BOTH) {
+        TSeedDiagonal & diag = front(seed);
+		TPosition posDim0 = diag.beginDim0;
+		TPosition posDim1 = diag.beginDim1;
+        TSize diagonalLength = diag.length;
+		while (posDim0 >= 1 && posDim1 >= 1 && query[posDim0 - 1] == database[posDim1 - 1]) {
+			--posDim0;
+			--posDim1;
+            ++diagonalLength;
+		}
+        diag.beginDim0 = posDim0;
+        diag.beginDim1 = posDim1;
+        diag.length = diagonalLength;
+	}
+
+	// Extension to the right
+	if (direction == EXTEND_RIGHT || direction == EXTEND_BOTH) {
+		TSize lengthDim0 = length(query);
+		TSize lengthDim1 = length(database);
+        TSeedDiagonal & diag = back(seed);
+		TPosition posDim0 = diag.beginDim0 + diag.length;
+		TPosition posDim1 = diag.beginDim1 + diag.length;
+        TSize diagonalLength = diag.length;
+		while (posDim0 < lengthDim0 && posDim1 < lengthDim1 && query[posDim0] == database[posDim1]) {
+			++posDim0;
+			++posDim1;
+            ++diagonalLength;
+		}
+        diag.length = diagonalLength;
+	}
+}
+
+
+template <typename TConfig, typename TQuery, typename TDatabase, typename TScoreValue, typename TScoreSpec>
+inline void 
+extendSeed(Seed<Simple, TConfig> & seed,
+           TQuery const & query,
+           TDatabase const & database,
+           ExtensionDirection direction,
+           Score<TScoreValue, TScoreSpec> const & scoringScheme,
+           TScoreValue scoreDropOff,
+           UnGappedXDrop const &)
+{
+    // For ungapped X-drop extension of Simple Seeds, we can simply
+    // update the begin and end values in each dimension.
+	SEQAN_CHECKPOINT;
+
+    scoreDropOff = -scoreDropOff;
+
+    typedef Seed<ChainedSeed, TConfig> TSeed;
+    typedef typename Position<TSeed>::Type TPosition;
+    typedef typename Size<TSeed>::Type TSize;
+    
+	// Extension to the left
+	if (direction == EXTEND_LEFT || direction == EXTEND_BOTH) {
+        TScoreValue tmpScore = 0;
+		TPosition posDim0 = getBeginDim0(seed) ;
+		TPosition posDim1 = getBeginDim1(seed);
+        TPosition mismatchingSuffixLength = 0;
+		while (posDim0 >= 1 && posDim1 >= 1 && tmpScore > scoreDropOff) {
+            tmpScore += score(scoringScheme, posDim0, posDim1, query, database);
+            if (query[posDim0 - 1] == database[posDim1 - 1]) {
+                mismatchingSuffixLength = 0;
+                if (tmpScore > static_cast<TScoreValue>(0))
+                    tmpScore = 0;
+            } else {
+                mismatchingSuffixLength += 1;
+            }
+			--posDim0;
+			--posDim1;
+		}
+		setBeginDim0(seed, posDim0 + mismatchingSuffixLength);
+		setBeginDim1(seed, posDim1 + mismatchingSuffixLength);
+	}
+
+	// Extension to the right
+	if (direction == EXTEND_RIGHT || direction == EXTEND_BOTH) {
+        TScoreValue tmpScore = 0;
+		TSize lengthDim0 = length(query);
+		TSize lengthDim1 = length(database);
+		TPosition posDim0 = getEndDim0(seed) ;
+		TPosition posDim1 = getEndDim1(seed);
+        TPosition mismatchingSuffixLength = 0;
+		while (posDim0 < lengthDim0 && posDim1 < lengthDim1 && tmpScore > scoreDropOff) {
+            tmpScore += score(scoringScheme, posDim0, posDim1, query, database);
+            if (query[posDim0] == database[posDim1]) {
+                mismatchingSuffixLength = 0;
+                if (tmpScore > static_cast<TScoreValue>(0))
+                    tmpScore = 0;
+            } else {
+                mismatchingSuffixLength += 1;
+            }
+            ++posDim0;
+            ++posDim1;
+		}
+		setEndDim0(seed, posDim0 - mismatchingSuffixLength);
+		setEndDim1(seed, posDim1 - mismatchingSuffixLength);
+    }
+
+    // TODO(holtgrew): Update score?!
+}
+
+
+template <typename TConfig, typename TQuery, typename TDatabase, typename TScoreValue, typename TScoreSpec>
+inline void 
+extendSeed(Seed<ChainedSeed, TConfig> & seed, 
+		   TQuery const & query,
+		   TDatabase const & database,
+		   ExtensionDirection direction,
+           Score<TScoreValue, TScoreSpec> const & scoringScheme,
+           TScoreValue scoreDropOff,
+		   UnGappedXDrop const &)
+{
+    // For ungapped X-drop extension of Chained Seeds, we extend the
+    // first and the last Seed Diagonal.
+	SEQAN_CHECKPOINT;
+
+    scoreDropOff = -scoreDropOff;
+
+    typedef Seed<ChainedSeed, TConfig> TSeed;
+    typedef typename Value<TSeed>::Type TSeedDiagonal;
+    typedef typename Position<TSeedDiagonal>::Type TPosition;
+    typedef typename Size<TSeedDiagonal>::Type TSize;
+    
+	// Extension to the left
+	if (direction == EXTEND_LEFT || direction == EXTEND_BOTH) {
+        TScoreValue tmpScore = 0;
+        TPosition mismatchingSuffixLength = 0;
+        TSeedDiagonal & diag = front(seed);
+		TPosition posDim0 = getBeginDim0(seed) ;
+		TPosition posDim1 = getBeginDim1(seed);
+        TSize diagonalLength = diag.length;
+		while (posDim0 >= 1 && posDim1 >= 1 && tmpScore > scoreDropOff) {
+            tmpScore += score(scoringScheme, posDim0, posDim1, query, database);
+            if (query[posDim0 - 1] == database[posDim1 - 1]) {
+                mismatchingSuffixLength = 0;
+                if (tmpScore > static_cast<TScoreValue>(0))
+                    tmpScore = 0;
+            } else {
+                mismatchingSuffixLength += 1;
+            }
+			--posDim0;
+			--posDim1;
+            ++diagonalLength;
+		}
+        diag.beginDim0 = posDim0 + mismatchingSuffixLength;
+        diag.beginDim1 = posDim1 + mismatchingSuffixLength;
+        diag.length = diagonalLength - mismatchingSuffixLength;
+	}
+
+	// Extension to the right
+	if (direction == EXTEND_RIGHT || direction == EXTEND_BOTH) {
+        TScoreValue tmpScore = 0;
+        TPosition mismatchingSuffixLength = 0;
+		TSize lengthDim0 = length(query);
+		TSize lengthDim1 = length(database);
+        TSeedDiagonal & diag = back(seed);
+		TPosition posDim0 = diag.beginDim0 + diag.length;
+		TPosition posDim1 = diag.beginDim1 + diag.length;
+        TSize diagonalLength = diag.length;
+		while (posDim0 < lengthDim0 && posDim1 < lengthDim1 && tmpScore > scoreDropOff) {
+            tmpScore += score(scoringScheme, posDim0, posDim1, query, database);
+            if (query[posDim0] == database[posDim1]) {
+                mismatchingSuffixLength = 0;
+                if (tmpScore > static_cast<TScoreValue>(0))
+                    tmpScore = 0;
+            } else {
+                mismatchingSuffixLength += 1;
+            }
+            ++posDim0;
+            ++posDim1;
+            ++diagonalLength;
+		}
+        diag.length = diagonalLength - mismatchingSuffixLength;
+	}
+
+    // TODO(holtgrew): Update score?!
+}
+
+template<typename TAntiDiag, typename TDropOff, typename TScoreValue>
+inline void
+_initAntiDiags(TAntiDiag & ,
+               TAntiDiag & antiDiag2,
+               TAntiDiag & antiDiag3,
+               TDropOff dropOff,
+               TScoreValue gapCost,
+               TScoreValue undefined) {
+SEQAN_CHECKPOINT
+	// antiDiagonals will be swaped in while loop BEFORE computation of antiDiag3 entries
+	//  -> no initialization of antiDiag1 necessary
+
+    resize(antiDiag2, 1);
+    antiDiag2[0] = 0;
+
+    resize(antiDiag3, 2);
+    if (-gapCost > dropOff) {
+        antiDiag3[0] = undefined;
+        antiDiag3[1] = undefined;
+    } else {
+        antiDiag3[0] = gapCost;
+        antiDiag3[1] = gapCost;
+    }
+}
+
+template<typename TAntiDiag>
+inline void
+_swapAntiDiags(TAntiDiag & antiDiag1,
+               TAntiDiag & antiDiag2,
+			   TAntiDiag & antiDiag3) {
+SEQAN_CHECKPOINT
+    TAntiDiag temp;
+    move(temp, antiDiag1);
+    move(antiDiag1, antiDiag2);
+    move(antiDiag2, antiDiag3);
+    move(antiDiag3, temp);
+}
+
+template<typename TAntiDiag, typename TSize, typename TScoreValue>
+inline TSize
+_initAntiDiag3(TAntiDiag & antiDiag3,
+			   TSize offset,
+			   TSize maxCol,
+			   TSize antiDiagNo,
+			   TScoreValue minScore,
+               TScoreValue gapCost,
+               TScoreValue undefined) {
+SEQAN_CHECKPOINT
+	resize(antiDiag3, maxCol + 1 - offset);
+
+    antiDiag3[0] = undefined;
+	antiDiag3[maxCol - offset] = undefined;
+
+	if ((int)antiDiagNo * gapCost > minScore) {
+		if (offset == 0) {
+			// init first column
+			antiDiag3[0] = antiDiagNo * gapCost;
+		}
+		if (antiDiagNo - maxCol == 0) {
+			// init first row
+			antiDiag3[maxCol - offset] = antiDiagNo * gapCost;
+		}
+	}
+	return offset;
+}
+
+template<typename TDiagonal, typename TSize>
+inline void
+_calcExtendedLowerDiag(TDiagonal & lowerDiag,
+					   TSize minCol,
+					   TSize antiDiagNo) {
+SEQAN_CHECKPOINT
+	TSize minRow = antiDiagNo - minCol;
+	if ((TDiagonal)minCol - (TDiagonal)minRow < lowerDiag) {
+		lowerDiag = (TDiagonal)minCol - (TDiagonal)minRow;
+    }
+}
+
+template<typename TDiagonal, typename TSize>
+inline void
+_calcExtendedUpperDiag(TDiagonal & upperDiag,
+					   TSize maxCol,
+					   TSize antiDiagNo) {
+SEQAN_CHECKPOINT
+	TSize maxRow = antiDiagNo + 1 - maxCol;
+	if ((TDiagonal)maxCol - 1 - (TDiagonal)maxRow > upperDiag) {
+		upperDiag = maxCol - 1 - maxRow;
+    }
+}
+
+template<typename TSeed, typename TSize, typename TDiagonal>
+inline void
+_updateExtendedSeed(TSeed & seed,
+					ExtensionDirection direction,
+					TSize cols,
+					TSize rows,
+					TDiagonal lowerDiag,
+					TDiagonal upperDiag) {
+SEQAN_CHECKPOINT
+	if (direction == EXTEND_LEFT) {
+		// Set lower and upper diagonals.
+		TDiagonal startDiag = getStartDiagonal(seed);
+		if (getLowerDiagonal(seed) > startDiag + lowerDiag)
+			setLowerDiagonal(seed, startDiag + lowerDiag);
+		if (getUpperDiagonal(seed) < startDiag + upperDiag)
+			setUpperDiagonal(seed, startDiag + upperDiag);
+
+		// Set new start position of seed.
+		setBeginDim0(seed, getBeginDim0(seed) - cols);
+		setBeginDim1(seed, getBeginDim1(seed) - rows);
+	} else {  // direction == EXTEND_RIGHT
+		// Set new lower and upper diagonals.
+		TDiagonal endDiag = getEndDiagonal(seed);
+		if (getUpperDiagonal(seed) < endDiag - lowerDiag)
+			setUpperDiagonal(seed, endDiag - lowerDiag);
+		if (getLowerDiagonal(seed) > endDiag - upperDiag)
+			setLowerDiagonal(seed, endDiag - upperDiag);
+
+		// Set new end position of seed.
+		setEndDim0(seed, getEndDim0(seed) + cols);
+		setEndDim1(seed, getEndDim1(seed) + rows);
+	}
+    SEQAN_ASSERT_GEQ(getUpperDiagonal(seed), getLowerDiagonal(seed));
+    SEQAN_ASSERT_GEQ(getUpperDiagonal(seed), getStartDiagonal(seed));
+    SEQAN_ASSERT_GEQ(getUpperDiagonal(seed), getEndDiagonal(seed));
+    SEQAN_ASSERT_GEQ(getStartDiagonal(seed), getLowerDiagonal(seed));
+    SEQAN_ASSERT_GEQ(getEndDiagonal(seed), getLowerDiagonal(seed));
+}
+
+template<typename TConfig, typename TQuerySegment, typename TDatabaseSegment, typename TScoreValue>
+TScoreValue
+_extendSeedGappedXDropOneDirection(
+        Seed<Simple, TConfig> & seed,
+        TQuerySegment const & querySeg,
+        TDatabaseSegment const & databaseSeg,
+        ExtensionDirection direction,
+        Score<TScoreValue, Simple> const & scoringScheme,
+		TScoreValue scoreDropOff) {
+SEQAN_CHECKPOINT
+    typedef typename Size<TQuerySegment>::Type TSize;
+	typedef typename Seed<Simple,TConfig>::TDiagonal TDiagonal;
+
+    TSize cols = length(querySeg)+1;
+    TSize rows = length(databaseSeg)+1;
+	if (rows == 1 || cols == 1) return 0;
+
+    TScoreValue gapCost = scoreGap(scoringScheme);
+    TScoreValue undefined = minValue<TScoreValue>() - gapCost;
+
+    // DP matrix is calculated by anti-diagonals
+    String<TScoreValue> antiDiag1;	//smallest anti-diagonal
+	String<TScoreValue> antiDiag2;
+	String<TScoreValue> antiDiag3;	//current anti-diagonal
+
+	// Indices on anti-diagonals include gap column/gap row:
+	//   - decrease indices by 1 for position in query/database segment
+	//   - first calculated entry is on anti-diagonal n� 2
+
+    TSize minCol = 1;
+    TSize maxCol = 2;
+
+	TSize offset1 = 0; // number of leading columns that need not be calculated in antiDiag1
+	TSize offset2 = 0; //                                                       in antiDiag2
+	TSize offset3 = 0; //                                                       in antiDiag3
+
+    _initAntiDiags(antiDiag1, antiDiag2, antiDiag3, scoreDropOff, gapCost, undefined);
+    TSize antiDiagNo = 1; // the currently calculated anti-diagonal
+
+	TScoreValue best = 0; // maximal score value in the DP matrix (for drop-off calculation)
+
+	TDiagonal lowerDiag = 0;
+	TDiagonal upperDiag = 0;
+
+    while (minCol < maxCol) {
+        ++antiDiagNo;
+		_swapAntiDiags(antiDiag1, antiDiag2, antiDiag3);
+		offset1 = offset2;
+		offset2 = offset3;
+		offset3 = minCol-1;
+		_initAntiDiag3(antiDiag3, offset3, maxCol, antiDiagNo, best - scoreDropOff, gapCost, undefined);
+
+		TScoreValue antiDiagBest = antiDiagNo * gapCost;
+        for (TSize col = minCol; col < maxCol; ++col) {
+			// indices on anti-diagonals
+			TSize i3 = col - offset3;
+			TSize i2 = col - offset2;
+			TSize i1 = col - offset1;
+
+			// indices in query and database segments
+			TSize queryPos, dbPos;
+			if (direction == EXTEND_RIGHT) {
+				queryPos = col - 1;
+				dbPos = antiDiagNo - col - 1;
+			} else { // direction == EXTEND_LEFT
+				queryPos = cols - 1 - col;
+				dbPos = rows - 1 + col - antiDiagNo;
+			}
+
+			// Calculate matrix entry (-> antiDiag3[col])
+			TScoreValue tmp = _max(antiDiag2[i2-1], antiDiag2[i2]) + gapCost;
+			tmp = _max(tmp, antiDiag1[i1-1] + score(scoringScheme, queryPos, dbPos, querySeg, databaseSeg));
+			if (tmp < best - scoreDropOff) {
+				antiDiag3[i3] = undefined;
+			} else {
+				antiDiag3[i3] = tmp;
+				antiDiagBest = _max(antiDiagBest, tmp);
+			}
+        }
+		best = _max(best, antiDiagBest);
+
+		// Calculate new minCol and minCol
+		while (minCol - offset3 < length(antiDiag3) && antiDiag3[minCol - offset3] == undefined &&
+			   minCol - offset2 - 1 < length(antiDiag2) && antiDiag2[minCol - offset2 - 1] == undefined) {
+			++minCol;
+		}
+
+		// Calculate new maxCol
+		while (maxCol - offset3 > 0 && (antiDiag3[maxCol - offset3 - 1] == undefined) &&
+			                           (antiDiag2[maxCol - offset2 - 1] == undefined)) {
+			--maxCol;
+		}
+		++maxCol;
+
+        // Calculate new lowerDiag and upperDiag of extended seed
+		_calcExtendedLowerDiag(lowerDiag, minCol, antiDiagNo);
+		_calcExtendedUpperDiag(upperDiag, maxCol - 1, antiDiagNo);
+
+		// end of databaseSeg reached?
+		minCol = _max((int)minCol, (int)antiDiagNo + 2 - (int)rows);
+		// end of querySeg reached?
+		maxCol = _min(maxCol, cols);
+    }
+
+	// find positions of longest extension
+
+	// reached ends of both segments
+	TSize longestExtensionCol = length(antiDiag3) + offset3 - 2;
+	TSize longestExtensionRow = antiDiagNo - longestExtensionCol;
+	TScoreValue longestExtensionScore = antiDiag3[longestExtensionCol - offset3];
+
+	if (longestExtensionScore == undefined) {
+		if (antiDiag2[length(antiDiag2)-2] != undefined) {
+			// reached end of query segment
+			longestExtensionCol = length(antiDiag2) + offset2 - 2;
+			longestExtensionRow = antiDiagNo - 1 - longestExtensionCol;
+			longestExtensionScore = antiDiag2[longestExtensionCol - offset2];
+		}
+		else if (antiDiag2[length(antiDiag2)-3] != undefined) {
+			// reached end of database segment
+			longestExtensionCol = length(antiDiag2) + offset2 - 3;
+			longestExtensionRow = antiDiagNo - 1 - longestExtensionCol;
+			longestExtensionScore = antiDiag2[longestExtensionCol - offset2];
+		}
+	}
+
+	if (longestExtensionScore == undefined) {
+		// general case
+		for (TSize i = 0; i < length(antiDiag1); ++i) {
+			if (antiDiag1[i] > longestExtensionScore) {
+				longestExtensionScore = antiDiag1[i];
+				longestExtensionCol = i + offset1;
+				longestExtensionRow = antiDiagNo - 2 - longestExtensionCol;
+			}
+		}
+	}
+
+	// update seed
+    if (longestExtensionScore != undefined) {
+		_updateExtendedSeed(seed, direction, longestExtensionCol, longestExtensionRow, lowerDiag, upperDiag);
+    }
+	return longestExtensionScore;
+}
+
+template <typename TConfig, typename TQuery, typename TDatabase, typename TScoreValue>
+inline void 
+extendSeed(Seed<Simple, TConfig> & seed, 
+		   TQuery const & query,
+		   TDatabase const & database,
+		   ExtensionDirection direction,
+           Score<TScoreValue, Simple> const & scoringScheme,
+           TScoreValue scoreDropOff,
+		   GappedXDrop const &)
+{
+    // For gapped X-drop extension of Simple Seeds, we can simply
+    // update the begin and end values in each dimension as well as the diagonals.
+	SEQAN_CHECKPOINT;
+
+    typedef Seed<Simple, TConfig> TSeed;
+    typedef typename Position<TSeed>::Type TPosition;
+    typedef typename Size<TSeed>::Type TSize;
+
+    // The algorithm only works for linear gap scores < 0, mismatch scores < 0
+    // and match scores > 0.
+    SEQAN_ASSERT_GT(scoreMatch(scoringScheme), 0);
+    SEQAN_ASSERT_LT(scoreMismatch(scoringScheme), 0);
+    SEQAN_ASSERT_LT(scoreGapOpen(scoringScheme), 0);
+    SEQAN_ASSERT_LT(scoreGapExtend(scoringScheme), 0);
+    SEQAN_ASSERT_EQ(scoreGapExtend(scoringScheme), scoreGapOpen(scoringScheme));
+
+	if (direction == EXTEND_LEFT || direction == EXTEND_BOTH) {
+        // Do not extend to the left if we are already at the beginning of an
+        // infix or the sequence itself.
+
+        typedef typename Prefix<TQuery const>::Type TQueryPrefix;
+        typedef typename Prefix<TDatabase const>::Type TDatabasePrefix;
+
+        TQueryPrefix queryPrefix = prefix(query, getBeginDim0(seed));
+        TDatabasePrefix databasePrefix = prefix(database, getBeginDim1(seed));
+        _extendSeedGappedXDropOneDirection(seed, queryPrefix, databasePrefix, EXTEND_LEFT, scoringScheme, scoreDropOff);
+    }
+
+	if (direction == EXTEND_RIGHT || direction == EXTEND_BOTH) {
+        // Do not extend to the right if we are already at the beginning of an
+        // infix or the sequence itself.
+
+        typedef typename Suffix<TQuery const>::Type TQuerySuffix;
+        typedef typename Suffix<TDatabase const>::Type TDatabaseSuffix;
+        
+        TQuerySuffix querySuffix = suffix(query, getEndDim0(seed));
+        TDatabaseSuffix databaseSuffix = suffix(database, getEndDim1(seed));
+		// std::cout << "database = " << database << std::endl;
+		// std::cout << "database Suffix = " << databaseSuffix << std::endl;
+		// std::cout << "query = " << query << std::endl;
+		// std::cout << "query Suffix = " << querySuffix << std::endl;
+        _extendSeedGappedXDropOneDirection(seed, querySuffix, databaseSuffix, EXTEND_RIGHT, scoringScheme, scoreDropOff);
+    }
+
+    // TODO(holtgrew): Update seed's score?!
+}
+
+
+template <typename TConfig, typename TQuery, typename TDatabase, typename TScoreValue>
+inline void 
+extendSeed(Seed<ChainedSeed, TConfig> & /*seed*/,
+		   TQuery const & /*query*/,
+		   TDatabase const & /*database*/,
+		   ExtensionDirection /*direction*/,
+           Score<TScoreValue, Simple> const & /*scoringScheme*/,
+           TScoreValue /*scoreDropOff*/,
+		   GappedXDrop const &)
+{
+    // For ungapped X-drop extension of Chained Seeds, we have to append
+    // diagonals to the front and end of the list of seed diagonals and modify
+    // the first and last one of the current set of seed diagonals.
+	SEQAN_CHECKPOINT;
+
+    SEQAN_ASSERT_FAIL("Write me! Look into the function where this assertion fails for instructions on how to do this.");
+    // TODO(holtgrew): Implement gapped X-drop extension with Chained seeds. As follows:
+    //
+    // Create a simple seed, copy over from chained seed.  Then,
+    // performed gapped x-drop extension on the simple seed.  Perform
+    // banded alignment on the left and right extended parts.  Use the
+    // internal functions for this instead of the user-level functions
+    // to initialize, fill the matrix, and compute the traceback
+    // object.  Construct the correct SeedDiagonal objects from the
+    // traceback objects and add them to the list of diagonals for the
+    // diagonal seed.
+    //
+    // An alternative implementation with storing the banded extension
+    // matrix would be too much work and it is questionable if this
+    // was faster.  The banded seed alignment code from Tobias Rausch
+    // is very optimized.
+
+    // TODO(holtgrew): Update seed's score?!
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_EXTENSION_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining.h b/src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining.h
new file mode 100644
index 0000000..26aa8cb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining.h
@@ -0,0 +1,258 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Global chaining algorithms.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_GLOBAL_CHAINING_H_
+#define SEQAN_SEEDS_SEEDS_GLOBAL_CHAINING_H_
+
+#include <map>
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+/**
+.Tag.Global Chaining
+..summary:Tags for selecting the global chaining algorithm.
+..cat:Seed Handling
+..see:Function.chainSeedsGlobally
+..tag:SparseChaining:
+    Chaining as described in (Gusfield, 1997) section 13.3.
+..include:seqan/seeds2.h
+ */
+struct SparseChaining_;
+typedef Tag<SparseChaining_> SparseChaining;
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+// TODO(holtgrew): Implement scored!
+/**
+.Function.chainSeedsGlobally
+..summary:Global chaining of seeds.
+..signature:chainSeedsGlobally(target, seedSet, tag)
+..include:seqan/seeds2.h
+*/
+template <typename TTargetContainer, typename TSeedSpec, typename TSeedSetSpec, typename TSeedConfig>
+void
+chainSeedsGlobally(
+        TTargetContainer & target,
+        SeedSet<TSeedSpec, TSeedSetSpec, TSeedConfig> const & seedSet,
+        SparseChaining const &)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef SeedSet<TSeedSpec, TSeedSetSpec, TSeedConfig> TSeedSet;
+    typedef typename Value<TSeedSet>::Type TSeed;
+    typedef typename Position<TSeed>::Type TPosition;
+    typedef typename Size<TSeed>::Type TSize;
+    typedef typename TSeedSet::THighQualitySeeds const THighQualitySeeds;
+    typedef typename THighQualitySeeds::const_iterator THighQualitySeedsIterator;
+
+    // -----------------------------------------------------------------------
+    // Step 1: Generate the sorted list of interval points.
+    // -----------------------------------------------------------------------
+    // This list is I in Gusfield's description.  An interval point is
+    // a triple of (dimension 0 border value, is start point, pointer
+    // to seed it belongs to).
+    typedef Triple<TPosition, bool, TSeed *> TIntervalPoint;
+    typedef String<TIntervalPoint> TIntervalPoints;
+    typedef typename Iterator<TIntervalPoints, Standard>::Type TIntervalPointsIterator;
+
+    TIntervalPoints intervalPoints;
+    // std::cout << ",--- high quality seeds" << std::endl;
+    // TODO(holtgrew): Using something dense here for qualities and predecessors should be faster but requires seeds to be available by consecutive ids.
+    std::map<TSeed *, TSize> qualityOfChainEndingIn;
+    std::map<TSeed *, TSeed *> predecessor;
+    for (THighQualitySeedsIterator it = seedSet._highQualitySeeds.begin(), itEnd = seedSet._highQualitySeeds.end(); it != itEnd; ++it) {
+        // Since we use gap space, we have to use "false" for end
+        // points so the lexical ordering gives us what the sparse
+        // chaining algorithm expects.
+        // std::cout << "| " << **it << std::endl;
+        qualityOfChainEndingIn[*it] = getSeedSize(**it);
+        appendValue(intervalPoints, TIntervalPoint(getBeginDim0(**it), true, *it));
+        appendValue(intervalPoints, TIntervalPoint(getEndDim0(**it), false, *it));
+    }
+    // std::cout << "`--" << std::endl;
+    std::sort(begin(intervalPoints, Standard()), end(intervalPoints, Standard()));
+    // std::cout << ",--- interval points" << std::endl;
+    // for (unsigned i = 0; i < length(intervalPoints); ++i) {
+    //     std::cout << "| (" << intervalPoints[i].i1 << ", " << intervalPoints[i].i2 << ", " << intervalPoints[i].i3 << ")" << std::endl;
+    // }
+    // std::cout << "`---" << std::endl;
+
+    // -----------------------------------------------------------------------
+    // Step 2: Build the chain.
+    // -----------------------------------------------------------------------
+    // We build a list of "intermediate solutions".  Each such
+    // solution is represented by the triple (end position in dim1,
+    // value of best chain so far, last seed of the chain).
+    typedef Triple<TPosition, TSize, TSeed *> TIntermediateSolution;
+    typedef std::multiset<TIntermediateSolution> TIntermediateSolutions;
+    typedef typename TIntermediateSolutions::iterator TIntermediateSolutionsIterator;
+
+    // For all interval points...
+    TIntermediateSolutions intermediateSolutions;
+    for (TIntervalPointsIterator it = begin(intervalPoints), itEnd = end(intervalPoints); it != itEnd; ++it) {
+        // The seed belonging ot the interval point is seed k.
+        TSeed const & seedK = value(value(it).i3);
+
+        // std::cout << "Processing interval point (" << value(it).i1 << ", " << value(it).i2 << ", " << value(it).i3 << ")" << std::endl;
+        if (value(it).i2) {  // Is is begin point.
+            // Find the closest seed (in dimension 1) to seed k with an
+            // entry in intermediateSolutions whose end coordinate in
+            // dimension 1 is <= the begin coordinate in dimension 1
+            // of seedK.
+            //
+            // STL gives us upper_bound which returns a pointer to the
+            // *first* one that compares greater than the reference
+            // one.  Searching for the this one and decrementing the
+            // result iterator gives the desired result.
+            TIntermediateSolution referenceSolution(getBeginDim1(seedK), 0, 0);
+            // std::cout << "    intermediateSolutions.upper_bound(" << getBeginDim1(seedK) << ")" << std::endl;
+            TIntermediateSolutionsIterator itJ = intermediateSolutions.upper_bound(referenceSolution);
+            if (itJ == intermediateSolutions.begin()) {
+                if (intermediateSolutions.size() > 0 &&
+                    intermediateSolutions.rbegin()->i1 <= getBeginDim1(seedK)) {
+                    itJ = intermediateSolutions.end();
+                    --itJ;
+                } else {
+                    continue;
+                }
+            } else {
+                SEQAN_ASSERT_GT(intermediateSolutions.size(), 0u);  // TODO(holtgrew): Remove this assertion?
+                --itJ;
+            }
+            // std::cout << "     --> " << value(itJ->i3) << std::endl;
+            // Now, we have found such a seed j.
+            SEQAN_ASSERT_LEQ(getEndDim1(value(itJ->i3)), getEndDim1(seedK));
+            // Update the intermediate solution value for k and set predecessor.
+            qualityOfChainEndingIn[value(it).i3] += itJ->i2;
+            // std::cout << "  UPDATE qualityOfChainEndingIn[" << value(it).i3 << "] == " << qualityOfChainEndingIn[value(it).i3] << std::endl;
+            predecessor[value(it).i3] = itJ->i3;
+            // std::cout << "         predecessor[" << value(it).i3 << "] == " << itJ->i3 << std::endl;
+        } else {  // Is end point.
+            // Search for the first triple in intermediateSolutions
+            // where the end coordinate in dimension 1 is >= end
+            // coordinate in dimension 1 for seed k.  The corresponding
+            // seed is seed j.
+            //
+            // We work with upper_bound here which gives us the first
+            // value that is > so we have to work around this to get
+            // >= again...
+            SEQAN_ASSERT_GT(getEndDim1(seedK), 0u);
+            TIntermediateSolution referenceSolution(getEndDim1(seedK), 0, 0);
+            TIntermediateSolutionsIterator itSol = intermediateSolutions.upper_bound(referenceSolution);
+            if (itSol == intermediateSolutions.end()) {
+                // None found.  Insert a new triple for seed k.
+                TIntermediateSolution sol(getEndDim1(seedK), qualityOfChainEndingIn[value(it).i3], value(it).i3);
+                // std::cout << "  INSERT (" << sol.i1 << ", " << sol.i2 << ", " << sol.i3 << ") " << __LINE__ << std::endl;
+                intermediateSolutions.insert(sol);
+            } else {
+                // Found this intermediate solution.
+                SEQAN_ASSERT_GEQ(itSol->i1, getEndDim1(seedK));
+                TSeed const & seedJ = value(itSol->i3);
+                // Possibly start a new chain at k if the end1 is
+                // before the end1 of the chain ending in j or they
+                // end at the same coordinate in dim1 but k already
+                // has a higher quality than the whole chaing ending
+                // at j.
+                if (getEndDim1(seedJ) > getEndDim1(seedK) ||
+                    (getEndDim1(seedJ) == getEndDim1(seedK) && qualityOfChainEndingIn[value(it).i3] > itSol->i2)) {
+                    TIntermediateSolution sol(getEndDim1(seedK), qualityOfChainEndingIn[value(it).i3], value(it).i3);
+                    // std::cout << "  INSERT (" << sol.i1 << ", " << sol.i2 << ", " << sol.i3 << ")" << __LINE__  << std::endl;
+                    intermediateSolutions.insert(sol);
+                }
+            }
+            
+            // Delete all intermediate solutions where end1 >= end1 of k and have a lower quality than k.
+            TIntermediateSolutionsIterator itDel = intermediateSolutions.upper_bound(referenceSolution);
+            TIntermediateSolutionsIterator itDelEnd = intermediateSolutions.end();
+            while (itDel != itDelEnd) {
+                TIntermediateSolutionsIterator ptr = itDel;
+                ++itDel;
+                if (qualityOfChainEndingIn[value(it).i3] > ptr->i2) {
+                    // std::cout << "  ERASE (" << ptr->i1 << ", " << ptr->i2 << ", " << ptr->i3 << ")" << std::endl;
+                    intermediateSolutions.erase(ptr);
+                }
+            }
+        }
+    }
+
+    // std::cout << "Maximal quality: " << intermediateSolutions.rbegin()->i2 << std::endl;
+
+    // -----------------------------------------------------------------------
+    // Step 3: Write out the resulting chain.
+    // -----------------------------------------------------------------------
+    // TODO(holtgrew): We could use two different algorithms for target containers that are strings and those that are lists.
+    clear(target);
+    TSeed *next = intermediateSolutions.rbegin()->i3;
+    while (next != static_cast<TSeed *>(0)) {
+        appendValue(target, *next);
+        next = predecessor[next];
+    }
+    reverse(target);
+
+    // Assert that the resulting chain is non-overlapping.
+    #if SEQAN_ENABLE_DEBUG
+    if (length(target) > 0u) {
+        typedef typename Iterator<TTargetContainer, Standard>::Type TIterator;
+        // std::cerr << ".-- Chain (" << __FILE__ << ":" << __LINE__ << "):" << std::endl;
+        // for (TIterator it = begin(target, Standard()); it != end(target, Standard()); ++it)
+        //     std::cerr << "| " << *it << std::endl;
+        // std::cerr << "`--" << std::endl;
+        TIterator itPrevious = begin(target, Standard());
+        TIterator it = itPrevious;
+        TIterator itEnd = end(target, Standard());
+        // std::cout << *it << std::endl;
+        ++it;
+        for (; it != itEnd; ++it) {
+            // std::cout << *it << std::endl;
+            SEQAN_ASSERT_LEQ(getEndDim0(*itPrevious), getBeginDim0(*it));
+            SEQAN_ASSERT_LEQ(getEndDim1(*itPrevious), getBeginDim1(*it));
+            itPrevious = it;
+        }
+    }
+    #endif  // #if SEQAN_ENABLE_DEBUG
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEEDS_SEEDS_GLOBAL_CHAINING_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining_base.h b/src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining_base.h
new file mode 100644
index 0000000..2d57b17
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining_base.h
@@ -0,0 +1,44 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Generic parts of the global chaining algorithms and basic definitions.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_GLOBAL_CHAINING_BASE_H_
+#define SEQAN_SEEDS_SEEDS_GLOBAL_CHAINING_BASE_H_
+
+namespace seqan {
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_GLOBAL_CHAINING_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining_gusfield.h b/src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining_gusfield.h
new file mode 100644
index 0000000..4fc0a08
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_global_chaining_gusfield.h
@@ -0,0 +1,48 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Global chaining after Gusfield [1].
+//
+//  [1] Dan Gusfield. Algorithms on Strings, Trees, and Sequences:
+//  Computer Science and Computational Biology.  Cambridge University
+//  Press, January 1997.
+// ==========================================================================*/
+
+#ifndef SEQAN_SEEDS_SEEDS_GLOBAL_CHAINING_BASE_H_
+#define SEQAN_SEEDS_SEEDS_GLOBAL_CHAINING_BASE_H_
+
+namespace seqan {
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_GLOBAL_CHAINING_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_seed_base.h b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_base.h
new file mode 100644
index 0000000..8415cbc
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_base.h
@@ -0,0 +1,570 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// The class Seed.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_SEED_BASE_H_
+#define SEQAN_SEEDS_SEEDS_SEED_BASE_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+// Mixin member for mixing in scores into seeds.
+template <typename TScore>
+struct ScoreMixin_
+{
+    TScore _score;
+};
+
+/**
+.Tag.Seed Specs
+..summary:Specialization tags for @Class.Seed at .
+..cat:Seed Handling
+..tag.Simple:Simple seed that only stores coordinates of the begin end end point and the diagonals.
+..tag.Chained:Seed that stores the dot-plot diagonals (i.e. matches) that the seed consists of.
+..see:Spec.SimpleSeed
+..see:Spec.ChainedSeed
+..include:seqan/seeds.h
+*/
+
+// Default configuration for seeds without score.
+struct DefaultSeedConfig
+{
+    typedef size_t TPosition;
+    typedef size_t TSize;
+    typedef MakeSigned_<size_t>::Type TDiagonal;
+    typedef False THasScore;
+    typedef Nothing TScoreValue;
+    typedef Nothing TScoreMixin;
+};
+
+// Default configuration for seeds with score.
+struct DefaultSeedConfigScore
+{
+    typedef size_t TPosition;
+    typedef size_t TSize;
+    typedef MakeSigned_<size_t>::Type TDiagonal;
+    typedef True THasScore;
+    typedef int TScoreValue;
+    typedef ScoreMixin_<int> TScoreMixin;
+};
+
+/**
+.Class.Seed:
+..summary:Describe a seed.
+..cat:Seed Handling
+..signature:Seed<TSpec, TConfig>
+..param.TSpec:The seed specialization type.
+..param.TConfig:The configuration object to use for this seed.
+..include:seqan/seeds.h
+ */
+template <typename TSpec, typename TConfig = DefaultSeedConfig>
+class Seed;
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+///.Metafunction.Position.param.T:type:Class.Seed
+template <typename TSpec, typename TConfig>
+struct Position<Seed<TSpec, TConfig> >
+{
+    typedef typename TConfig::TPosition Type;
+};
+
+template <typename TSpec, typename TConfig>
+struct Position<Seed<TSpec, TConfig> const>
+        : Position<Seed<TSpec, TConfig> > {};
+
+///Metafunction.Size.param.T:type:Class.Seed
+template <typename TSpec, typename TConfig>
+struct Size<Seed<TSpec, TConfig> >
+{
+    typedef typename TConfig::TSize Type;
+};
+
+template <typename TSpec, typename TConfig>
+struct Size<Seed<TSpec, TConfig> const>
+        : Size<Seed<TSpec, TConfig> > {};
+
+/**
+.Metafunction.Diagonal:
+..cat:Seed Handling
+..summary:Returns type of the value for the diagonal of a seed.
+..signature:Diagonal<T>::Type
+..param.T:Type of the seed to retrieve the diagonal for.
+...type:Class.Seed
+..include:seqan/seeds2.h
+ */
+template <typename T>
+struct Diagonal;
+
+template <typename TSpec, typename TConfig>
+struct Diagonal<Seed<TSpec, TConfig> >
+{
+    typedef typename TConfig::TDiagonal Type;
+};
+
+template <typename TSpec, typename TConfig>
+struct Diagonal<Seed<TSpec, TConfig> const>
+        : Diagonal<Seed<TSpec, TConfig> > {};
+
+/**
+.Metafunction.HasScore:
+..cat:Seed Handling
+..summary:Returns True if the seed stores a score, False otherwise.
+..signature:HasScore<T>::Type
+..param.T:Type of the seed to retrieve whether it has a score for.
+...type:Class.Seed
+..include:seqan/seeds2.h
+ */
+template <typename T>
+struct HasScore;
+
+template <typename TSpec, typename TConfig>
+struct HasScore<Seed<TSpec, TConfig> >
+{
+    typedef typename TConfig::THasScore Type;
+};
+
+template <typename TSpec, typename TConfig>
+struct HasScore<Seed<TSpec, TConfig> const>
+        : HasScore<Seed<TSpec, TConfig> > {};
+
+/**
+.Metafunction.SeedScore:
+..cat:Seed Handling
+..summary:Returns type of the value for the score of a seed.
+..signature:SeedScore<T>::Type
+..param.T:Type of the seed to retrieve the score for.
+...type:Class.Seed
+..include:seqan/seeds2.h
+ */
+template <typename T>
+struct SeedScore;
+
+template <typename TSpec, typename TConfig>
+struct SeedScore<Seed<TSpec, TConfig> >
+{
+    typedef typename TConfig::TScoreValue Type;
+};
+
+template <typename TSpec, typename TConfig>
+struct SeedScore<Seed<TSpec, TConfig> const>
+        : SeedScore<Seed<TSpec, TConfig> > {};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+// TODO(holtgrew): COULD introduce {get,set}{Begin,End}(dim, value), but probably only necessary to make consistent with multi dimensional chaining interface.
+
+/**
+.Function.assign.param.source.type:Class.Seed
+.Function.assign.param.target.type:Class.Seed
+.Function.move.param.source.type:Class.Seed
+.Function.move.param.target.type:Class.Seed
+..include:seqan/seeds2.h
+*/
+
+/**
+.Function.getBeginDim0:
+..summary: Returns the first position of the seed in the query.
+..cat:Seed Handling
+..signature:beginDim0(seed)
+..param.seed:The seed whose query position should be returned.
+...type:Class.Seed
+..returns: Begin of the seed.
+..include:seqan/seeds.h
+*/
+
+/**
+.Function.getEndDim0:
+..summary: Returns the last position of the seed in the query.
+..cat:Seed Handling
+..signature:endDim0(seed)
+..param.seed:The seed whose last in the query position should be returned.
+...type:Class.Seed
+..returns: End of the seed.
+..include:seqan/seeds.h
+*/
+
+/**
+.Function.getBeginDim1:
+..summary: Returns the first position of the seed in the database.
+..cat:Seed Handling
+..signature:beginDim1(seed)
+..param.seed:The seed whose database position should be returned.
+...type:Class.Seed
+..returns: Begin of the seed.
+..include:seqan/seeds.h
+*/
+
+/**
+.Function.getEndDim1:
+..summary: Returns the last position of the seed in the database.
+..cat:Seed Handling
+..signature:endDim1(seed)
+..param.seed:The seed whose last in the database position should be returned.
+...type:Class.Seed
+..returns: End of the seed.
+..include:seqan/seeds.h
+*/
+
+/**
+.Function.getLowerDiagonal:
+..summary: Returns the most left diagonal of the seed (maximum diagonal value).
+..cat:Seed Handling
+..signature:lowerDiagonal(seed)
+..param.seed:The seed whose database position should be returned.
+...type:Class.Seed
+..returns:The most left diagonal.
+..include:seqan/seeds.h
+*/
+template <typename TSpec, typename TConfig>
+inline typename Diagonal<Seed<TSpec, TConfig> >::Type
+getLowerDiagonal(Seed<TSpec, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+    return seed._lowerDiagonal;
+}
+
+/**
+.Function.setLowerDiagonal:
+..summary: Sets a new value for the most left diagonal.
+..cat:Seed Handling
+..signature:setLeftDiagonal(seed, diag)
+..param.seed:The seed whose left diagonal value should be updated.
+...type:Class.Seed
+..param.diag:The new value for the most left diagonal.
+..include:seqan/seeds.h
+*/
+template <typename TSpec, typename TConfig, typename TPosition>
+inline void 
+setLowerDiagonal(Seed<TSpec, TConfig> & seed, 
+				 TPosition newDiag)
+{
+	SEQAN_CHECKPOINT;
+	seed._lowerDiagonal = newDiag;
+}
+
+/**
+.Function.getUpperDiagonal:
+..summary: Returns the most right diagonal of the seed (minimum diagonal value).
+..cat:Seed Handling
+..signature:upperDiagonal(seed)
+..param.seed:The seed whose database position should be returned.
+...type:Class.Seed
+..returns:The most right diagonal.
+..include:seqan/seeds.h
+*/
+template <typename TSpec, typename TConfig>
+inline typename Diagonal<Seed<TSpec, TConfig> >::Type
+getUpperDiagonal(Seed<TSpec, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+    return seed._upperDiagonal;
+}
+
+/**
+.Function.setUpperDiagonal:
+..summary: Sets a new value for the most right diagonal.
+..cat:Seed Handling
+..signature:setRightDiagonal(seed, diag)
+..param.seed:The seed whose right diagonal value should be updated.
+...type:Class.Seed
+..param.diag:The new value for the most right diagonal.
+..include:seqan/seeds.h
+*/
+template <typename TSpec, typename TConfig, typename TPosition>
+inline void 
+setUpperDiagonal(Seed<TSpec, TConfig> & seed, 
+				 TPosition newDiag)
+{
+	SEQAN_CHECKPOINT;
+	seed._upperDiagonal = newDiag;
+}
+
+
+/**
+.Function.getSeedSize
+..summary:Returns the number of matches and mismatches of the seed.  This is the longest true diagonal fitting into its dimensions.
+..remark:"Seed size" is mostly called "seed length" in the literature.  However, in SeqAn reverse "length" is reserved to be the size of a container.
+..include:seqan/seeds2.h
+*/
+template <typename TSpec, typename TConfig>
+inline typename Size<Seed<TSpec, TConfig> >::Type
+getSeedSize(Seed<TSpec, TConfig> & seed)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): What if reverse seed?
+    return _max(getEndDim0(seed) - getBeginDim0(seed), getEndDim1(seed) - getBeginDim1(seed));
+}
+
+
+template <typename TSpec, typename TConfig>
+inline typename Size<Seed<TSpec, TConfig> >::Type
+getSeedSize(Seed<TSpec, TConfig> const & seed)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): What if reverse seed?
+    return _max(getEndDim0(seed) - getBeginDim0(seed), getEndDim1(seed) - getBeginDim1(seed));
+}
+
+
+// Computed values, based on properties returned by getters.
+
+// TODO(holtgrew): Rename to getBeginDiagonal.
+/**
+.Function.getStartDiagonal:
+..summary: Returns the diagonal of the start point.
+..cat:Seed Handling
+..signature:startDiagonal(seed)
+..param.seed:The seed whose start diagonal should be returned.
+...type:Class.Seed
+..returns:The diagonal of the start point.
+..include:seqan/seeds.h
+*/
+template <typename TSpec, typename TConfig>
+inline typename Diagonal<Seed<TSpec, TConfig> >::Type
+getStartDiagonal(Seed<TSpec, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+    return getBeginDim1(seed) - getBeginDim0(seed);
+}
+
+/**
+.Function.getEndDiagonal:
+..summary: Returns the diagonal of the end point.
+..cat:Seed Handling
+..signature:endDiagonal(seed)
+..param.seed:The seed whose end diagonal should be returned.
+...type:Class.Seed
+..returns:The diagonal of the end point.
+..include:seqan/seeds.h
+*/
+template <typename TSpec, typename TConfig>
+inline typename Diagonal<Seed<TSpec, TConfig> >::Type
+getEndDiagonal(Seed<TSpec, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+    return getEndDim1(seed) - getEndDim0(seed);
+}
+
+// Functions for seeds with the ScoreMixin_.
+
+// Case: No score, do not update anything.
+template <typename TSpec, typename TConfig>
+inline void
+_updateSeedsScoreMergeHelper(Seed<TSpec, TConfig> & /*seed*/, Seed<TSpec, TConfig> const & /*other*/, False const &)
+{
+    SEQAN_CHECKPOINT;
+}
+
+// Case: Seed has score.  The assumption is that the score is
+// proportional to the size of the seed.  Each seed contributes a
+// fraction of its score that is proportional to the fraction of the
+// score it contributes.
+template <typename TSpec, typename TConfig>
+inline void
+_updateSeedsScoreMergeHelper(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, True const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef Seed<TSpec, TConfig> TSeed;
+    typedef typename Size<TSeed>::Type TSize;
+
+    // Compute new size.
+    TSize newBegin0 = _min(getBeginDim0(seed), getBeginDim0(other));
+    TSize newEnd0 = _max(getEndDim0(seed), getEndDim0(other));
+    TSize newBegin1 = _min(getBeginDim1(seed), getBeginDim1(other));
+    TSize newEnd1 = _max(getEndDim1(seed), getEndDim1(other));
+    TSize newSize = _max(newEnd0 - newBegin0, newEnd1 - newBegin1);
+    // New seed should be larger than either old one and overlap should be > 0.
+    SEQAN_ASSERT_GEQ(newSize, getSeedSize(seed));
+    SEQAN_ASSERT_GEQ(newSize, getSeedSize(other));
+    SEQAN_ASSERT_LEQ(newSize, getSeedSize(seed) + getSeedSize(other));
+    TSize overlap = getSeedSize(seed) + getSeedSize(other) - newSize;
+    // Overlap should be smaller than or equal to either seed size.
+    SEQAN_ASSERT_GEQ(getSeedSize(seed), overlap);
+    SEQAN_ASSERT_GEQ(getSeedSize(other), overlap);
+
+    // Compute fraction each seed contributes.
+    TSize total = getSeedSize(seed) + getSeedSize(other) - overlap;
+    double fracSeed = static_cast<double>(getSeedSize(seed) - 0.5 * overlap) / static_cast<double>(total);
+    double fracOther = static_cast<double>(getSeedSize(other) - 0.5 * overlap) / static_cast<double>(total);
+    typedef typename SeedScore<TSeed>::Type TScoreValue;
+	TScoreValue newScore = static_cast<TScoreValue>(round(fracSeed * getScore(seed) + fracOther * getScore(other)));
+    setScore(seed, newScore);
+}
+
+
+// Update the score for merging.  If the seeds do not have scores, nothing is done.
+template <typename TSpec, typename TConfig>
+inline void
+_updateSeedsScoreMerge(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other)
+{
+    SEQAN_CHECKPOINT;
+    typedef Seed<TSpec, TConfig> TSeed;
+    _updateSeedsScoreMergeHelper(seed, other, typename HasScore<TSeed>::Type());
+}
+
+// Case: No score, do not update anything.
+template <typename TSpec, typename TConfig, typename TScoreValue>
+inline void
+_updateSeedsScoreSimpleChainHelper(Seed<TSpec, TConfig> & /*seed*/, Seed<TSpec, TConfig> const & /*other*/, Score<TScoreValue, Simple> const & /*scoringScheme*/, False const &)
+{
+    SEQAN_CHECKPOINT;
+}
+
+// Case: Seeds have scores.  Update the score of seed according to the
+// gap size.
+template <typename TSpec, typename TConfig, typename TScoreValue>
+inline void
+_updateSeedsScoreSimpleChainHelper(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, Score<TScoreValue, Simple> const & scoringScheme, True const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef Seed<TSpec, TConfig> TSeed;
+    typedef typename Size<TSeed>::Type TSize;
+
+    // TODO(holtgrew): seed must be the one to the upper left.
+
+    // Only linear gap costs are supported.
+    SEQAN_ASSERT_EQ(scoreGapOpen(scoringScheme), scoreGapExtend(scoringScheme));
+    // Scores for gaps and mismatches must be penalties.
+    SEQAN_ASSERT_LT(scoreGap(scoringScheme), static_cast<TScoreValue>(0));
+    SEQAN_ASSERT_LT(scoreMismatch(scoringScheme), static_cast<TScoreValue>(0));
+
+    // We use a simple heuristic for updating the seed's score the
+    // systematically overestimates the gap costs: We close the gap
+    // with a maximal diagonal and then remaining indels or just
+    // indels, whatever yields a lower score.
+    TSize maxDist = _max(getBeginDim0(other) - getEndDim0(seed), getBeginDim1(other) - getEndDim1(seed));
+    TSize minDist = _max(getBeginDim0(other) - getEndDim0(seed), getBeginDim1(other) - getEndDim1(seed));
+    TSize diagLen = minDist;
+    TSize indelLen = maxDist - minDist;
+    TScoreValue gapScore1 = diagLen * scoreMismatch(scoringScheme) + indelLen * scoreGap(scoringScheme);
+    TScoreValue gapScore2 = (maxDist + minDist) * scoreGap(scoringScheme);
+    TScoreValue gapScore = _max(gapScore1, gapScore2);
+
+    // The new score is the sum of the seed scores and the better of
+    // the gap scores computed above.
+    setScore(seed, getScore(seed) + getScore(other) + gapScore);
+}
+
+
+// Update the score for simple chaining.  If the seeds do not have scores, nothing is done.
+template <typename TSpec, typename TConfig, typename TScoreValue>
+inline void
+_updateSeedsScoreSimpleChain(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, Score<TScoreValue, Simple> const & scoringScheme)
+{
+    SEQAN_CHECKPOINT;
+    typedef Seed<TSpec, TConfig> TSeed;
+    _updateSeedsScoreSimpleChainHelper(seed, other, scoringScheme, typename HasScore<TSeed>::Type());
+}
+
+
+// Case: No score, do not update anything.
+template <typename TSpec, typename TConfig, typename TScoreValue>
+inline void
+_updateSeedsScoreChaosHelper(Seed<TSpec, TConfig> & /*seed*/, Seed<TSpec, TConfig> const & /*other*/, TScoreValue const & /*scoreDelta*/, False const &)
+{
+    SEQAN_CHECKPOINT;
+}
+
+// Case: Seed has score.  The new score is the sum of the other seed's
+// score and the delta as computed by the chaining routine.
+template <typename TSpec, typename TConfig, typename TScoreValue>
+inline void
+_updateSeedsScoreChaosHelper(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, TScoreValue const & scoreDelta, True const &)
+{
+    SEQAN_CHECKPOINT;
+    setScore(seed, getScore(seed) + getScore(other) + scoreDelta);
+}
+
+
+// Update the score for CHAOS chaining.  If the seeds do not have scores, nothing is done.
+template <typename TSpec, typename TConfig, typename TScoreValue>
+inline void
+_updateSeedsScoreChaos(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, TScoreValue const & scoreDelta)
+{
+    SEQAN_CHECKPOINT;
+    typedef Seed<TSpec, TConfig> TSeed;
+    _updateSeedsScoreChaosHelper(seed, other, scoreDelta, typename HasScore<TSeed>::Type());
+}
+
+
+template <typename TSeed>
+inline typename SeedScore<TSeed>::Type
+getScore(TSeed const & seed)
+{
+    SEQAN_CHECKPOINT;
+    return seed._score;
+}
+
+
+template <typename TSeed, typename TScore>
+inline void
+setScore(TSeed & seed, TScore const & score)
+{
+    SEQAN_CHECKPOINT;
+    seed._score = score;
+}
+
+
+// The part of assign() for seeds that have no score mixin.
+template <typename TSpec, typename TConfig>
+inline void
+_assignScoreMixin(Seed<TSpec, TConfig> & /*seed*/, Seed<TSpec, TConfig> const & /*other*/, False const &)
+{
+    SEQAN_CHECKPOINT;
+    // Do nothing, no mixin.
+}
+
+
+// The part of assign() for seeds that have a score mixin.
+template <typename TSpec, typename TConfig>
+inline void
+_assignScoreMixin(Seed<TSpec, TConfig> & seed, Seed<TSpec, TConfig> const & other, True const &)
+{
+    SEQAN_CHECKPOINT;
+    // Update score.
+    seed._score = other._score;
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_SEED_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_seed_chained.h b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_chained.h
new file mode 100644
index 0000000..a767e9b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_chained.h
@@ -0,0 +1,419 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Specialization "Chained" for class Seed.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_SEED_CHAINED_H_
+#define SEQAN_SEEDS_SEEDS_SEED_CHAINED_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+struct Chained_;
+typedef Tag<Chained_> ChainedSeed;  // TODO(holtgrew): Chained already taken as template in file. Maybe prefer non-parameterized types for simpler names.
+
+/**
+.Spec.ChainedSeed
+..summary:Describes a seed with start and end position2 and diagonal upper and lower bounds. Additionaly diagonal segments
+between start and end position2 are stored.
+..cat:Seed Handling
+..general:Class.Seed
+..signature:Seed<TPosition, ChainedSeed>
+..param.TPosition:The type of number that schuld be used. Must have negative numbers (e.g. int/long).
+.Memfunc.ChainedSeed#Seed:
+..class:Spec.ChainedSeed
+..summary:Constructor
+..signature: Seed<TPosition, ChainedSeed> ()
+..signature: Seed<TPosition, ChainedSeed> (qStartPos, dStartPos, length)
+..param.qStartPos: Start in query sequence.
+..param.dStartPos: Start in database sequence.
+..param.length: Length of the seed.
+..include:seqan/seeds.h
+*/
+template <typename TConfig>
+class Seed<ChainedSeed, TConfig>
+        : public TConfig::TScoreMixin
+{
+public:
+    typedef typename TConfig::TPosition TPosition;
+    typedef typename TConfig::TSize TSize;
+    typedef typename TConfig::TDiagonal TDiagonal;
+
+    typedef typename TConfig::TScoreMixin TScoreMixin;
+
+    typedef SeedDiagonal<TPosition, TSize> TSeedDiagonal;
+
+    ::std::list<TSeedDiagonal> _seedDiagonals;
+    TDiagonal _lowerDiagonal;
+    TDiagonal _upperDiagonal;
+
+    Seed() : TScoreMixin(), _lowerDiagonal(0), _upperDiagonal(0)
+    { SEQAN_CHECKPOINT; }
+
+    Seed(TPosition beginDim0, TPosition beginDim1, TPosition seedLength)
+            : TScoreMixin(),
+              _lowerDiagonal(beginDim1 - beginDim0),
+              _upperDiagonal(beginDim1 - beginDim0)
+    {
+        SEQAN_CHECKPOINT;
+        appendValue(_seedDiagonals, TSeedDiagonal(beginDim0, beginDim1, seedLength));
+    }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+///.Metafunction.Value.param.T:Spec.ChainedSeed
+template <typename TConfig>
+struct Value<Seed<ChainedSeed, TConfig> >
+{
+    typedef Seed<ChainedSeed, TConfig> TSeed_;
+    typedef typename Position<TSeed_>::Type TPosition_;
+    typedef typename Size<TSeed_>::Type TSize_;
+
+    typedef SeedDiagonal<TPosition_, TSize_> Type;
+};
+
+template <typename TConfig>
+struct Value<Seed<ChainedSeed, TConfig> const>
+{
+    typedef Seed<ChainedSeed, TConfig> TSeed_;
+    typedef typename Position<TSeed_>::Type TPosition_;
+    typedef typename Size<TSeed_>::Type TSize_;
+
+    typedef SeedDiagonal<TPosition_, TSize_> const Type;
+};
+
+///.Metafunction.Size.param.T:Spec.ChainedSeed
+template <typename TConfig>
+struct Size<Seed<ChainedSeed, TConfig> >
+{
+    typedef typename TConfig::TSize Type;
+};
+
+template <typename TConfig>
+struct Size<Seed<ChainedSeed, TConfig> const>
+        : Size<Seed<ChainedSeed, TConfig> > {};
+
+///.Metafunction.Iterator.param.T:Spec.ChainedSeed
+template <typename TConfig>
+struct Iterator<Seed<ChainedSeed, TConfig>, Standard>
+{
+    typedef Seed<ChainedSeed, TConfig> TSeed_;
+    typedef typename Value<TSeed_>::Type TSeedDiagonal_;
+    typedef typename ::std::list<TSeedDiagonal_>::iterator Type;
+};
+
+template <typename TConfig>
+struct Iterator<Seed<ChainedSeed, TConfig> const, Standard>
+{
+    typedef Seed<ChainedSeed, TConfig> TSeed_;
+    typedef typename Value<TSeed_>::Type TSeedDiagonal_;
+    typedef typename ::std::list<TSeedDiagonal_>::const_iterator Type;
+};
+
+///.Metafunction.Reference.param.T:Spec.ChainedSeed
+template <typename TConfig>
+struct Reference<Seed<ChainedSeed, TConfig> >
+{
+    typedef Seed<ChainedSeed, TConfig> TSeed_;
+    typedef typename Value<TSeed_>::Type TSeedDiagonal_;
+    typedef TSeedDiagonal_ & Type;
+};
+
+template <typename TConfig>
+struct Reference<Seed<ChainedSeed, TConfig> const>
+{
+    typedef Seed<ChainedSeed, TConfig> TSeed_;
+    typedef typename Value<TSeed_>::Type TSeedDiagonal_;
+    typedef TSeedDiagonal_ const & Type;
+};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TStream, typename TConfig>
+inline TStream &
+operator<<(TStream & stream, Seed<ChainedSeed, TConfig> const & seed)
+{
+    typedef Seed<ChainedSeed, TConfig> const TSeed;
+    typedef typename Iterator<TSeed>::Type TIterator;
+
+    stream << "Seed<ChainedSeed, TConfig>([";
+    for (TIterator it = begin(seed); it != end(seed); ++it) {
+        if (it != begin(seed))
+            stream << ", ";
+        stream << *it;
+    }
+    stream << "])";
+    return stream;
+}
+
+template <typename TConfig>
+inline bool
+operator==(Seed<ChainedSeed, TConfig> const & a, Seed<ChainedSeed, TConfig> const & b)
+{
+    SEQAN_CHECKPOINT;
+    return a._seedDiagonals == b._seedDiagonals &&
+            a._upperDiagonal == b._upperDiagonal &&
+            a._lowerDiagonal == b._lowerDiagonal;
+}
+
+template <typename TConfig>
+inline typename Position<Seed<ChainedSeed, TConfig> >::Type
+getBeginDim0(Seed<ChainedSeed, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+	return front(seed._seedDiagonals).beginDim0;
+}
+
+template <typename TConfig>
+inline typename Position<Seed<ChainedSeed, TConfig> >::Type
+getEndDim0(Seed<ChainedSeed, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+	return back(seed._seedDiagonals).beginDim0 + back(seed._seedDiagonals).length;
+}
+
+template <typename TConfig>
+inline typename Position<Seed<ChainedSeed, TConfig> >::Type
+getBeginDim1(Seed<ChainedSeed, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+	return front(seed._seedDiagonals).beginDim1;
+}
+
+template <typename TConfig>
+inline typename Position<Seed<ChainedSeed, TConfig> >::Type
+getEndDim1(Seed<ChainedSeed, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+	return back(seed._seedDiagonals).beginDim1 + back(seed._seedDiagonals).length;
+}
+
+/**
+.Function.length.param.object.type:Spec.ChainedSeed
+..include:seqan/seeds2.h
+*/
+template <typename TConfig>
+inline typename Size<Seed<ChainedSeed, TConfig> >::Type
+length(Seed<ChainedSeed, TConfig> const & seed)
+{
+    SEQAN_CHECKPOINT;
+    return length(seed._seedDiagonals);
+}
+
+/**
+.Function.appendDiagonal
+..summary: Adds diagonal to the Chained Seed.
+..cat:Seed Handling
+..signature:appendDiag(seed, diagonal)
+..param.seed: The seed to which the diagonal should be added.
+...type:Spec.ChainedSeed
+..param.diag: The diagonal to add.
+...type:Class.SeedDiagonal
+...remarks: A diagonal consists of three values: 1: start in 1. sequence, 2: start in 2. sequence, 3: length of match
+..include:seqan/seeds2.h
+*/
+template <typename TConfig>
+inline void
+appendDiagonal(Seed<ChainedSeed, TConfig> & seed,
+               typename Value<Seed<ChainedSeed, TConfig> >::Type const & diagonal)
+{
+    SEQAN_CHECKPOINT;
+
+    if (length(seed) > 0) {
+        SEQAN_ASSERT_LEQ(back(seed._seedDiagonals).beginDim0 + back(seed._seedDiagonals).length, diagonal.beginDim0);
+        SEQAN_ASSERT_LEQ(back(seed._seedDiagonals).beginDim1 + back(seed._seedDiagonals).length, diagonal.beginDim1);
+    }
+
+    appendValue(seed._seedDiagonals, diagonal);
+}
+
+/**
+.Function.truncateDiagonals
+..summary:Removes diagonals from the given first one to the end of the seed's diagonals.
+..cat:Seed Handling
+..signature:truncateDiagonals(seed, first)
+..param.seed: The seed to which the diagonal should be added.
+...type:Spec.ChainedSeed
+..param.first: Iterator the first diagonal to remove.
+..include:seqan/seeds2.h
+*/
+template <typename TConfig>
+inline void
+truncateDiagonals(Seed<ChainedSeed, TConfig> & seed,
+                  typename Iterator<Seed<ChainedSeed, TConfig> >::Type const & first)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): Add erase() to std::list adaptors?
+    seed._seedDiagonals.erase(first, seed._seedDiagonals.end());
+}
+
+/**
+.Function.begin.param.object.type:Spec.ChainedSeed
+..include:seqan/seeds2.h
+*/
+template <typename TConfig>
+inline typename Iterator<Seed<ChainedSeed, TConfig> >::Type
+begin(Seed<ChainedSeed, TConfig> & seed, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return seed._seedDiagonals.begin();
+}
+
+template <typename TConfig>
+inline typename Iterator<Seed<ChainedSeed, TConfig> const>::Type
+begin(Seed<ChainedSeed, TConfig> const & seed, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return seed._seedDiagonals.begin();
+}
+
+/**
+.Function.front.param.object.type:Spec.ChainedSeed
+..include:seqan/seeds2.h
+*/
+template <typename TConfig>
+inline typename Reference<Seed<ChainedSeed, TConfig> >::Type
+front(Seed<ChainedSeed, TConfig> & seed)
+{
+    SEQAN_CHECKPOINT;
+    return front(seed._seedDiagonals);
+}
+
+template <typename TConfig>
+inline typename Reference<Seed<ChainedSeed, TConfig> const>::Type
+front(Seed<ChainedSeed, TConfig> const & seed)
+{
+    SEQAN_CHECKPOINT;
+    return front(seed._seedDiagonals);
+}
+
+/**
+.Function.back.param.container.type:Spec.ChainedSeed
+..include:seqan/seeds2.h
+*/
+template <typename TConfig>
+inline typename Reference<Seed<ChainedSeed, TConfig> >::Type
+back(Seed<ChainedSeed, TConfig> & seed)
+{
+    SEQAN_CHECKPOINT;
+    return back(seed._seedDiagonals);
+}
+
+template <typename TConfig>
+inline typename Reference<Seed<ChainedSeed, TConfig> const>::Type
+back(Seed<ChainedSeed, TConfig> const & seed)
+{
+    SEQAN_CHECKPOINT;
+    return back(seed._seedDiagonals);
+}
+
+/**
+.Function.end.param.object.type:Spec.ChainedSeed
+..include:seqan/seeds2.h
+*/
+template <typename TConfig>
+inline typename Iterator<Seed<ChainedSeed, TConfig> >::Type
+end(Seed<ChainedSeed, TConfig> & seed, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return seed._seedDiagonals.end();
+}
+
+template <typename TConfig>
+inline typename Iterator<Seed<ChainedSeed, TConfig> const>::Type
+end(Seed<ChainedSeed, TConfig> const & seed, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return seed._seedDiagonals.end();
+}
+
+// Basic Functions
+
+template <typename TConfig>
+void
+move(Seed<ChainedSeed, TConfig> & target, Seed<ChainedSeed, TConfig> & source)
+{
+    SEQAN_CHECKPOINT;
+    std::swap(target._seedDiagonals, source._seedDiagonals);
+    target._lowerDiagonal = source._lowerDiagonal;
+    target._upperDiagonal = source._upperDiagonal;
+    _assignScoreMixin(target, source, typename HasScore<Seed<Simple, TConfig> >::Type());
+}
+
+template <typename TConfig>
+void
+assign(Seed<ChainedSeed, TConfig> & target, Seed<ChainedSeed, TConfig> const & source)
+{
+    SEQAN_CHECKPOINT;
+    assign(target._seedDiagonals, source._seedDiagonals);
+    target._lowerDiagonal = source._lowerDiagonal;
+    target._upperDiagonal = source._upperDiagonal;
+    _assignScoreMixin(target, source, typename HasScore<Seed<Simple, TConfig> >::Type());
+}
+
+template <typename TConfig>
+void
+assign(Seed<ChainedSeed, TConfig> & target, Seed<ChainedSeed, TConfig> & source)
+{
+    SEQAN_CHECKPOINT;
+    typedef Seed<ChainedSeed, TConfig> TSeed;
+    assign(target, const_cast<TSeed const &>(source));
+}
+
+// Debug Output
+
+template <typename TStream, typename TConfig>
+inline void
+_write(TStream & stream, Seed<ChainedSeed, TConfig> const & seed, Tikz_ const &)
+{
+    // Overall seed.
+    stream << "\\draw[seed] (" << getBeginDim1(seed) << ", -" << getBeginDim0(seed) << ") -- (" << (getEndDim1(seed) - 1) << ", -" << (getEndDim0(seed) - 1) << ");" << std::endl;
+    // Diagonals.
+    typedef Seed<ChainedSeed, TConfig> TSeed;
+    typedef typename Iterator<TSeed const, Standard>::Type TIterator;
+    for (TIterator it = begin(seed); it != end(seed); ++it)
+        stream << "\\draw[seed diagonal] (" << it->beginDim1 << ", -" << it->beginDim0 << ") -- (" << (it->beginDim1 + it->length - 1) << ", -" << (it->beginDim0 + it->length - 1) << ");" << std::endl;
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_SEED_CHAINED_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_seed_diagonal.h b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_diagonal.h
new file mode 100644
index 0000000..7b9dffd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_diagonal.h
@@ -0,0 +1,130 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// SeedDiagonal objects store information about seed parts/segments of a
+// ChainedSeed.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_SEED_DIAGONAL_H_
+#define SEQAN_SEEDS_SEEDS_SEED_DIAGONAL_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+/**
+.Class.SeedDiagonal
+..summary:Store the information about a seed segment.
+..signature:SeedDiagonal<TPosition, TSize>
+..cat:Seed Handling
+..param.TPosition:The type to use for positions.
+..param.TSize:The type to use for the seed length.
+..include:seqan/seeds2.h
+*/
+template <typename TPosition, typename TSize>
+class SeedDiagonal
+{
+public:
+/**
+.Memvar.SeedDiagonal#beginDim0:The position in the query (dimension 0).
+*/
+    TPosition beginDim0;
+/**
+ .Memvar.SeedDiagonal#beginDim0:The position in the database sequence (dimension 1).
+*/
+    TPosition beginDim1;
+/**
+.Memvar.SeedDiagonal#length:The length of the diagonal.
+*/
+    TSize length;
+    
+    SeedDiagonal()
+            : beginDim0(0), beginDim1(0), length(0)
+    { SEQAN_CHECKPOINT; }
+
+    SeedDiagonal(TPosition _beginDim0, TPosition _beginDim1, TSize _length)
+            : beginDim0(_beginDim0), beginDim1(_beginDim1), length(_length)
+    { SEQAN_CHECKPOINT; }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+  
+///.Metafunction.Position.param.T:SeedDiagonal
+template <typename TPosition, typename TSize>
+struct Position<SeedDiagonal<TPosition, TSize> >
+{
+    typedef TPosition Type;
+};
+
+template <typename TPosition, typename TSize>
+struct Position<SeedDiagonal<TPosition, TSize> const>
+  : Position<SeedDiagonal<TPosition, TSize> > {};
+
+///.Metafunction.Size.param.T:SeedDiagonal
+template <typename TPosition, typename TSize>
+struct Size<SeedDiagonal<TPosition, TSize> >
+{
+  typedef TSize Type;
+};
+
+template <typename TPosition, typename TSize>
+struct Size<SeedDiagonal<TPosition, TSize> const>
+  : Size<SeedDiagonal<TPosition, TSize> > {};
+  
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TStream, typename TPosition, typename TSize>
+inline TStream &
+operator<<(TStream & stream, SeedDiagonal<TPosition, TSize> const & seedDiagonal)
+{
+    return stream << "SeedDiagonal(" << seedDiagonal.beginDim0 << ", " << seedDiagonal.beginDim1 << ", "  << seedDiagonal.length << ")";
+}
+
+
+template <typename TPosition, typename TSize>
+inline bool
+operator==(SeedDiagonal<TPosition, TSize> const & a, SeedDiagonal<TPosition, TSize> const & b)
+{
+    SEQAN_CHECKPOINT;
+    return a.beginDim0 == b.beginDim0 && a.beginDim1 == b.beginDim1 && a.length == b.length;
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_SEED_DIAGONAL_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_base.h b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_base.h
new file mode 100644
index 0000000..61a7961
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_base.h
@@ -0,0 +1,283 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// The class SeedSet.  ScoringScheme and related tags are defined in
+// seeds_scoring_scheme.h
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_SEED_SET_BASE_H_
+#define SEQAN_SEEDS_SEEDS_SEED_SET_BASE_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+struct MinSeedSize_;
+typedef Tag<MinSeedSize_> MinSeedSize;
+
+struct MinScore_;
+typedef Tag<MinScore_> MinScore;
+
+// TODO(holtgrew): Put configs and mixins into their own header.
+// TODO(holtgrew): Add metafunctions for mixin classes?
+
+struct DefaultSeedSetConfig
+{
+    typedef DefaultSeedConfig TSeedConfig;
+    typedef Nothing TQualityThreshold;
+    typedef Nothing TQualityThresholdMixin;
+};
+
+// TODO(holtgrew): Rename _qualityReached to _qualityAboveThreshold
+// Quality is always reached for seed sets without a quality threshold.
+template <typename TSeed, typename TSeedSet>
+bool _qualityReached(TSeed const & /*seed*/, TSeedSet const & /*seedSet*/, Nothing const &)
+{
+    SEQAN_CHECKPOINT;
+    return true;
+}
+
+template <typename TSize>
+struct MinSeedSizeMixin_
+{
+    TSize _minSeedSizeThreshold;
+
+    MinSeedSizeMixin_() : _minSeedSizeThreshold(MinValue<TSize>::VALUE) {}
+};
+
+template <typename TSeedSet, typename TSize>
+void setMinSeedSizeThreshold(TSeedSet & seedSet, TSize const & size)
+{
+    SEQAN_CHECKPOINT;
+    seedSet._minSeedSizeThreshold = size;
+}
+
+template <typename TSize>
+TSize getMinSeedSizeThreshold(MinSeedSizeMixin_<TSize> const & mixin)
+{
+    SEQAN_CHECKPOINT;
+    return mixin._minSeedSizeThreshold;
+}
+
+template <typename TSeed, typename TSeedSet>
+bool _qualityReached(TSeed const & seed, TSeedSet const & seedSet, MinSeedSize const &)
+{
+    SEQAN_CHECKPOINT;
+    return getSeedSize(seed) >= getMinSeedSizeThreshold(seedSet);
+}
+
+struct DefaultSeedSetConfigLength
+{
+    typedef DefaultSeedConfig TSeedConfig;
+    typedef MinSeedSize TQualityThreshold;
+    typedef MinSeedSizeMixin_<TSeedConfig::TSize> TQualityThresholdMixin;
+};
+
+template <typename TScore>
+struct MinScoreMixin_
+{
+    TScore _minScoreThreshold;
+    MinScoreMixin_() : _minScoreThreshold(MinValue<TScore>::VALUE) {}
+};
+
+template <typename TSeedSet, typename TScore>
+void setMinScoreThreshold(TSeedSet & seedSet, TScore const & score)
+{
+    SEQAN_CHECKPOINT;
+    seedSet._minScoreThreshold = score;
+}
+
+template <typename TScore>
+TScore getMinScoreThreshold(MinScoreMixin_<TScore> const & mixin)
+{
+    SEQAN_CHECKPOINT;
+    return mixin._minScoreThreshold;
+}
+
+
+template <typename TSeed, typename TSeedSet>
+bool _qualityReached(TSeed const & seed, TSeedSet const & seedSet, MinScore const &)
+{
+    SEQAN_CHECKPOINT;
+    return getScore(seed) >= getMinScoreThreshold(seedSet);
+}
+
+
+struct DefaultSeedSetConfigScore
+{
+    typedef DefaultSeedConfigScore TSeedConfig;
+    typedef MinScore TQualityThreshold;
+    typedef MinScoreMixin_<TSeedConfig::TScoreValue> TQualityThresholdMixin;
+};
+
+
+/**
+.Class.SeedSet:
+..summary:Handles a set of seeds with local chaining on adding seeds.
+..cat:Seed Handling
+..signature:SeedSet<TSeedSpec, TScored, TSpec[, TSeedConfig]>
+..param.TSeedSpec:Specialization of the seed to use.
+..param.TScored:Either UnScored or a seed set scoring scheme specification.
+..param.TSpec:Specialization of the seed set.
+..param.TSeedConfig:Configuration for the seeds.  Sensible defaults are chosen based on the other template parameters.
+..include:seqan/seeds.h
+*/
+template <typename TSeedSpec, typename TSpec, typename TSeedSetConfig = DefaultSeedSetConfig>
+class SeedSet;
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+///.Metafunction.Position.param.T:Class.SeedSet
+///.Metafunction.Size.param.T:Class.SeedSet
+///.Metafunction.Value.param.T:Class.SeedSet
+///.Metafunction.GetValue.param.T:Class.SeedSet
+///.Metafunction.Reference.param.T:Class.SeedSet
+///.Metafunction.Iterator.param.T:Class.SeedSet
+/**
+.Metafunction.Seed:
+..summary:Return the type of the underlying seed.
+..signature:Seed<TSeedSet>::Value
+..param.TSeedSet:The SeedSet to retrieve the seed type from.
+..include:seqan/seeds.h
+*/
+/**
+.Metafunction.ScoringScheme:
+..summary:Return the type of the seed set's scorings cheme.
+..signature:ScoringScheme<TSeedSet>::Value
+..param.TSeedSet:The SeedSet to retrieve the scoring scheme type from.
+..include:seqan/seeds.h
+*/
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+// Basic Container Functions
+
+/**
+.Function.begin.param.object.type:Class.SeedSet
+.Function.end.param.object.type:Class.SeedSet
+.Function.length.param.object.type:Class.SeedSet
+.Function.front.param.object.type:Class.SeedSet
+.Function.back.param.container.type:Class.SeedSet
+..include:seqan/seeds2.h
+ */
+// TODO(holtgrew): dddoc {begin,end,length,front,back}All(T)
+
+// SeedSet Functions
+
+/**
+.Function.addSeed:
+..summary:Adds a seed to an existing set.
+..cat:Seed Handling
+..signature:addSeed(set, qPos, dPos, length, tag)
+..signature:addSeed(set, qPos, dPos, qrPos, drPos, tag)
+..signature:addSeed(set, seed, tag)
+..param.set:The set to which the new seed should be added.
+...type:Class.SeedSet
+..param.qPos: Start position in sequence1.
+..param.dPos: Start position in sequence2.
+..param.length: Length of the seed.
+..param.tag: The algorithm that should be used to add the new seed.
+...type:Tag.Seed Adding
+...remark: Note that not every algorithm can be used with each type of @Class.Seed at .
+..param.qrPos: End position in sequence1.
+..param.drPos: End Position in sequence2.
+..param.seed: The new Seed.
+...type:Class.Seed
+...remarks: The seed is copied and then added.
+..returns:Boolean if succesfully added.
+...remarks:Always true for Tag Single.
+..include:seqan/seeds2.h
+*/
+
+/**
+.Function.addSeeds:
+..summary:Adds several seeds to an existing set. If a merging or chaining algorithm is used seeds are added if the merging or chaining fails.
+..cat:Seed Handling
+..signature:addSeed(set, container, tag)
+..signature:addSeed(set, begin, end, tag)
+..param.set:The set to which the new seed sould be added.
+...type:Class.SeedSet
+..param.container: Content is copied to set.
+...type:Concept.Container
+..param.begin: Iterator pointing to the first value to add.
+..param.end: Iterator pointing just behind the last value to add.
+..param.tag: The algorithm that should be used to add the new @Class.Seed at .
+...type:Tag.Local Chaining
+...remarks: Note that not every algorithm can be used with each specialization of @Class.Seed at .
+..include:seqan/seeds2.h
+*/
+
+// Debugging / TikZ Output
+
+template <typename TStream, typename TQuerySequence, typename TDatabaseSequence, typename TSeedSetSpec, typename TSeedSpec, typename TSeedConfig>
+inline void
+_write(TStream & stream,
+       TQuerySequence & sequence0,
+       TDatabaseSequence & sequence1,
+       SeedSet<TSeedSpec, TSeedSetSpec, TSeedConfig> const & seedSet,
+       Tikz_ const &)
+{
+    typedef SeedSet<TSeedSpec, TSeedSetSpec, TSeedConfig> TSeedSet;
+
+    stream << "\\begin{tikzpicture}[" << std::endl
+           << "    seed/.style={very thick}," << std::endl
+           << "    seed diagonal/.style={red,<->}" << std::endl
+           << "    ]" << std::endl;
+
+    // Draw sequences.
+    stream << "  \\draw";
+    // Draw query / sequence 0;
+    for (unsigned i = 0; i < length(sequence0); ++i)
+        stream << std::endl << "    (0, -" << i << ") node {" << sequence0[i] << "}";
+    stream << std::endl;
+    // Draw database / sequence 1.
+    for (unsigned i = 0; i < length(sequence1); ++i)
+        stream << std::endl << "    (" << i << ", 0) node {" << sequence1[i] << "}";
+    stream << ";" << std::endl;
+
+    // Draw seeds.
+    typedef typename Iterator<TSeedSet const, Standard>::Type TIterator;
+    for (TIterator it = begin(seedSet); it != end(seedSet); ++it)
+        _write(stream, value(it), Tikz_());
+    stream << "\\end{tikzpicture}" << std::endl;
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_SEED_SET_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_non_scored.h b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_non_scored.h
new file mode 100644
index 0000000..867ac48
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_non_scored.h
@@ -0,0 +1,69 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Non-Scored SeedSet specialization.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_SEED_SET_NON_SCORED_H_
+#define SEQAN_SEEDS_SEEDS_SEED_SET_NON_SCORED_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+/**
+.Spec.Scored SeedSet
+..summary:SeedSet that uses non-scored Seeds.
+..cat:Seed Handling
+..general:Class.SeedSet
+..signature:SeedSet<TPosition, TSeedSpec, TScoringScheme>
+..param.TPosition: Type that saves the positions and upper/lower bounds.
+...remarks: Positive and negative values are needed.
+..param.TSeedSpec:The @Class.Seed@ specialization.
+..param.TScoringScheme:The scoring sheme to use.
+..include:seqan/seeds.h
+*/
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_SEED_SET_NON_SCORED_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_scored.h b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_scored.h
new file mode 100644
index 0000000..79d4d42
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_scored.h
@@ -0,0 +1,69 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Scored SeedSet specialization.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_SEED_SET_SCORED_H_
+#define SEQAN_SEEDS_SEEDS_SEED_SET_SCORED_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+/**
+.Spec.Scored SeedSet
+..summary:SeedSet that uses scored Seeds.
+..cat:Seed Handling
+..general:Class.SeedSet
+..signature:SeedSet<TPosition, TSeedSpec, TScoringScheme>
+..param.TPosition: Type that saves the positions and upper/lower bounds.
+...remarks: Positive and negative values are needed.
+..param.TSeedSpec:The @Class.Seed@ specialization.
+..param.TScoringScheme:The scoring sheme to use.
+..include:seqan/seeds.h
+*/
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_SEED_SET_SCORED_H_
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_unordered.h b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_unordered.h
new file mode 100644
index 0000000..3063b3a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_set_unordered.h
@@ -0,0 +1,384 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// The Unordered specialization of the class SeedSet.  Seeds are stored
+// in a string and not kept in a particular order.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_SEED_SET_UNORDERED_H_
+#define SEQAN_SEEDS_SEEDS_SEED_SET_UNORDERED_H_
+
+#include <cmath>
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+struct Unordered_;
+typedef Tag<Unordered_> Unordered;
+
+// TODO(holtgrew): Maybe allow iterating over seeds that have reached a certain quality (length/score).
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+class SeedSet<TSeedSpec, Unordered, TSeedSetConfig>
+        : public TSeedSetConfig::TQualityThresholdMixin
+{
+public:
+    typedef typename TSeedSetConfig::TQualityThresholdMixin TQualityThresholdMixin_;
+    typedef typename TSeedSetConfig::TSeedConfig TSeedConfig;
+    typedef Seed<TSeedSpec, TSeedConfig> TSeed;
+
+    typedef Allocator<SinglePool<sizeof(TSeed) > > TSeedAllocator;
+
+    typedef String<TSeed *> TAllSeeds;
+    typedef std::set<TSeed *> THighQualitySeeds;
+
+    TSeedAllocator _seedAllocator;
+    TAllSeeds _allSeeds;
+    // TODO(holtgrew): High quality seeds are only necessary if qualities are considered.
+    THighQualitySeeds _highQualitySeeds;
+
+    SeedSet()
+            : TQualityThresholdMixin_()
+    { SEQAN_CHECKPOINT; }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Position<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >
+{
+    typedef SeedSet<TSeedSpec, Unordered, TSeedSetConfig> TSeedSet_;
+    typedef String<typename TSeedSet_::TSeed> TSeedString_;
+    typedef typename Position<TSeedString_>::Type Type;
+};
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Position<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>
+        : Position<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> > {};
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Size<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >
+{
+    typedef SeedSet<TSeedSpec, Unordered, TSeedSetConfig> TSeedSet_;
+    typedef String<typename TSeedSet_::TSeed> TSeedString_;
+    typedef typename Size<TSeedString_>::Type Type;
+};
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Size<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>
+        : Size<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> > {};
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >
+{
+    typedef typename TSeedSetConfig::TSeedConfig TSeedConfig_;
+    typedef Seed<TSeedSpec, TSeedConfig_> TSeed_;
+    typedef TSeed_ Type;
+};
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>
+{
+    typedef typename TSeedSetConfig::TSeedConfig TSeedConfig_;
+    typedef Seed<TSeedSpec, TSeedConfig_> TSeed_;
+    typedef TSeed_ const Type;
+};
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Reference<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >
+{
+    typedef typename TSeedSetConfig::TSeedConfig TSeedConfig_;
+    typedef Seed<TSeedSpec, TSeedConfig_> TSeed_;
+    typedef TSeed_ & Type;
+};
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Reference<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>
+{
+    typedef typename TSeedSetConfig::TSeedConfig TSeedConfig_;
+    typedef Seed<TSeedSpec, TSeedConfig_> TSeed_;
+    typedef TSeed_ const & Type;
+};
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig>, Standard>
+{
+    typedef typename TSeedSetConfig::TSeedConfig TSeedConfig_;
+    typedef Seed<TSeedSpec, TSeedConfig_> TSeed_;
+    typedef SeedSet<TSeedSpec, Unordered, TSeedSetConfig> TSeedSet_;
+//     typedef String<TSeed_> TSeedString_;
+//     typedef typename Iterator<TSeedString_, Standard>::Type TIterator_;
+//     typedef TIterator_ Type;
+    typedef Iter<TSeedSet_, Indirect<typename std::set<TSeed_ *>::iterator> > Type;
+};
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+struct Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const, Standard>
+{
+    typedef typename TSeedSetConfig::TSeedConfig TSeedConfig_;
+    typedef Seed<TSeedSpec, TSeedConfig_> TSeed_;
+    typedef SeedSet<TSeedSpec, Unordered, TSeedSetConfig> TSeedSet_;
+//     typedef String<TSeed_ const> TSeedString_;
+//     typedef typename Iterator<TSeedString_ const, Standard>::Type TIterator_;
+//     typedef TIterator_ Type;
+    typedef Iter<TSeedSet_ const, Indirect<typename std::set<TSeed_ *>::const_iterator> > Type;
+};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+// Standard Container Functions
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Size<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type
+length(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): Do not use dot function.
+    return seedSet._highQualitySeeds.size();
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Size<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type
+length(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): Do not use dot function.
+    return seedSet._highQualitySeeds.size();
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type
+begin(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type TIterator;
+    // TODO(holtgrew): Do not use dot-method.
+    return TIterator(seedSet._highQualitySeeds.begin());
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type
+begin(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type TIterator;
+    // TODO(holtgrew): Do not use dot-method.
+    return TIterator(seedSet._highQualitySeeds.begin());
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type
+end(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type TIterator;
+    // TODO(holtgrew): Do not use dot-method.
+    return TIterator(seedSet._highQualitySeeds.end());
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type
+end(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type TIterator;
+    // TODO(holtgrew): Do not use dot-method.
+    return TIterator(seedSet._highQualitySeeds.end());
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type
+front(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): Do not use dot-method.
+    return **seedSet._highQualitySeeds.begin();
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type
+front(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): Do not use dot-method.
+    return **seedSet._highQualitySeeds.begin();
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type
+back(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): Do not use dot-method.
+    return **seedSet._highQualitySeeds.rbegin();
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const>::Type
+back(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> const & seedSet)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): Do not use dot-method.
+    return **seedSet._highQualitySeeds.rbegin();
+}
+
+// SeedSet Functions
+
+// TODO(holtgrew): Add bulk-addSeeds functions.
+
+template <typename TSeedSpec, typename TSeedSetConfig, typename TDistanceThreshold, typename TBandwidth, typename TCombination>
+bool
+_findSeedForCombination(
+        typename Iterator<typename SeedSet<TSeedSpec, Unordered, TSeedSetConfig>::TAllSeeds, Standard>::Type & mergePartner,
+        bool & seedIsOnTheLeft,
+        SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet,
+        typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type const & seed,
+        TDistanceThreshold const & maxDistance,
+        TBandwidth const & bandwidth,
+        TCombination const & tag)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef typename Iterator<typename SeedSet<TSeedSpec, Unordered, TSeedSetConfig>::TAllSeeds, Standard>::Type TSeedPtrIterator;
+
+    // Iterate over all seeds and search for the first one in this
+    // arbitrary order that is combineable with parameter seed within
+    // a maximal diagonal distance maxDistance.  We allow either seed
+    // to be the left one.
+    //
+    // TODO(holtgrew): Search for *closest* overlapping one instead!
+    for (TSeedPtrIterator it = begin(seedSet._allSeeds); it != end(seedSet._allSeeds); ++it) {
+        if (_seedsCombineable(*value(it), seed, maxDistance, bandwidth, tag)) {
+//			std::cout << "Combineable: " << (*value(it)) << " and " << seed << std::endl;
+            // seed is to be merged into *it.
+            mergePartner = it;
+            seedIsOnTheLeft = false;
+            return true;
+        } else if (_seedsCombineable(seed, *value(it), maxDistance, bandwidth, tag)) {
+//			std::cout << "Combineable: " << seed << " and " << (*value(it)) << std::endl;
+            // *it is to be merged into seed.
+            mergePartner = it;
+            seedIsOnTheLeft = true;
+            return true;
+        }
+    }
+
+    // Found no seed to combine with.
+    return false;
+}
+
+// TODO(holtgrew): Score not needed for Merge!
+
+template <typename TSeedSpec, typename TSeedSetConfig, typename TDistanceThreshold, typename TBandwidth, typename TScoreValue, typename TSequence0, typename TSequence1, typename TCombination>
+inline bool
+addSeed(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet,
+        typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type const & seed,
+        TDistanceThreshold const & maxDiagDist,
+        TBandwidth const & bandwidth,
+        Score<TScoreValue, Simple> const & scoringScheme,
+        TSequence0 const & sequence0,
+        TSequence1 const & sequence1,
+        TCombination const & tag)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef SeedSet<TSeedSpec, Unordered, TSeedSetConfig> TSeedSet;
+    typedef typename TSeedSet::TAllSeeds TAllSeeds;
+    typedef typename Iterator<TAllSeeds, Standard>::Type TSeedPtrIterator;
+    typedef typename Value<TSeedSet>::Type TSeed;
+
+    // Try to find a seed for recombination.
+    TSeedPtrIterator it = 0;
+    bool seedIsOnTheLeft = false;
+    bool foundSeed = _findSeedForCombination(it, seedIsOnTheLeft, seedSet, seed, maxDiagDist, bandwidth, tag);
+
+    // If we could find a seed: Combine them.
+    if (foundSeed) {
+        // Swap seed and *value(it) if seed is on the left and
+        // *value(it) is on the right.  Then, merge both.
+        if (!seedIsOnTheLeft) {
+            _combineSeeds(*value(it), seed, scoringScheme, sequence0, sequence1, tag);
+        } else {
+            TSeed tmp;
+            move(tmp, *value(it));
+            assign(*value(it), seed);
+            _combineSeeds(*value(it), tmp, scoringScheme, sequence0, sequence1, tag);
+        }
+        // If the new seed has a high enough quality, add it to the
+        // set of high-scoring seeds.
+        typedef typename TSeedSetConfig::TQualityThreshold TQualityThreshold;
+        if (_qualityReached(*value(it), seedSet, TQualityThreshold())) {
+            // TODO(holtgrew): Do not use dot-methods.
+            seedSet._highQualitySeeds.insert(value(it));
+        }
+        return true;
+    }
+    return false;
+}
+
+template <typename TSeedSpec, typename TSeedSetConfig>
+inline void
+addSeed(SeedSet<TSeedSpec, Unordered, TSeedSetConfig> & seedSet,
+        typename Value<SeedSet<TSeedSpec, Unordered, TSeedSetConfig> >::Type const & seed,
+        Single const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef SeedSet<TSeedSpec, Unordered, TSeedSetConfig> TSeedSet;
+    typedef typename Value<TSeedSet>::Type TSeed;
+
+    // Allocate space for new seed in allocator and copy construct the
+    // seed there.
+    //
+    // TODO(holtgrew): Move would be faster if it is a chained seed with many diagonals.
+    TSeed * tmp;
+    allocate(seedSet._seedAllocator, tmp, 1);
+    new(tmp) TSeed(seed);
+
+    appendValue(seedSet._allSeeds, tmp);
+	typedef typename TSeedSetConfig::TQualityThreshold TQualityThreshold;
+    if (_qualityReached(seed, seedSet, TQualityThreshold()))
+        // TODO(holtgrew): Do not use dot-methods.
+        seedSet._highQualitySeeds.insert(tmp);
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_SEED_SET_UNORDERED_H_
+
diff --git a/src/SeqAn-1.3/seqan/seeds2/seeds_seed_simple.h b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_simple.h
new file mode 100644
index 0000000..5dbda16
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/seeds2/seeds_seed_simple.h
@@ -0,0 +1,328 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Specialization "Simple" for class Seed.
+// ==========================================================================
+
+#ifndef SEQAN_SEEDS_SEEDS_SEED_SIMPLE_H_
+#define SEQAN_SEEDS_SEEDS_SEED_SIMPLE_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+// Already defined in module score.
+// struct Simple_ {};
+// typedef Tag<Simple_> Simple;  // Already defined in module base.
+struct Simple {}; // .. but type is not complete yet
+
+/**
+.Spec.SimpleSeed:
+..summary:Describes a seed with start and end position and diagonal upper and lower bounds.
+..cat:Seed Handling
+..general:Class.Seed
+..signature:Seed<TPosition, SimpleSeed>
+..param.TPosition:The type number that schuld be used. Must have negative numbers (e.g. int/long).
+.Memfunc.SimpleSeed#Seed:
+..class:Spec.SimpleSeed
+..summary:Constructor
+..signature: Seed<TPosition, SimpleSeed> ()
+..signature: Seed<TPosition, SimpleSeed> (qStartPos, dStartPos, length)
+..signature: Seed<TPosition, SimpleSeed> (qStartPos, dStartPos, qEndPos, dEndPos)
+..param.qStartPos: Start in query sequence.
+..param.dStartPos: Start in database sequence.
+..param.qEndPos: End in query sequence.
+..param.dEndPos: End in database sequence.
+..param.length: Length of the seed.
+..include:seqan/seeds.h
+*/
+template <typename TConfiguration>
+class Seed<Simple, TConfiguration>
+        : public TConfiguration::TScoreMixin
+{
+  public:
+    typedef typename TConfiguration::TPosition TPosition;
+    typedef typename TConfiguration::TSize TSize;
+    typedef typename TConfiguration::TDiagonal TDiagonal;
+
+    typedef typename TConfiguration::TScoreMixin TScoreMixin;
+
+    TPosition _beginDim0;
+    TPosition _beginDim1;
+    TPosition _endDim0;
+    TPosition _endDim1;
+    TDiagonal _lowerDiagonal;
+    TDiagonal _upperDiagonal;
+
+    Seed()
+            : TScoreMixin(),
+              _beginDim0(0), _beginDim1(0), _endDim0(0), _endDim1(0),
+              _lowerDiagonal(0), _upperDiagonal(0)
+    { SEQAN_CHECKPOINT; }
+
+    Seed(TPosition beginDim0, TPosition beginDim1, TPosition seedLength)
+            : TScoreMixin(),
+              _beginDim0(beginDim0),
+              _beginDim1(beginDim1),
+              _endDim0(beginDim0 + seedLength),
+              _endDim1(beginDim1 + seedLength),
+              _lowerDiagonal(static_cast<TDiagonal>(beginDim1 - beginDim0)),
+              _upperDiagonal(static_cast<TDiagonal>(beginDim1 - beginDim0))
+    {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_GEQ(_upperDiagonal, _lowerDiagonal);
+    }
+
+    Seed(TPosition beginDim0, TPosition beginDim1, TPosition endDim0,
+         TPosition endDim1)
+            : TScoreMixin(),
+              _beginDim0(beginDim0),
+              _beginDim1(beginDim1),
+              _endDim0(endDim0),
+              _endDim1(endDim1),
+              _lowerDiagonal(_min(static_cast<TDiagonal>(beginDim1 - beginDim0), static_cast<TDiagonal>(endDim1 - endDim0))),
+              _upperDiagonal(_max(static_cast<TDiagonal>(beginDim1 - beginDim0), static_cast<TDiagonal>(endDim1 - endDim0)))
+    {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_GEQ(_upperDiagonal, _lowerDiagonal);
+    }
+
+    template <typename TSeed2>
+    Seed(TSeed2 const & other)
+            : TScoreMixin(),
+              _beginDim0(getBeginDim0(other)),
+              _beginDim1(getBeginDim1(other)),
+              _endDim0(getEndDim0(other)),
+              _endDim1(getEndDim1(other)),
+              _lowerDiagonal(getLowerDiagonal(other)),
+              _upperDiagonal(getUpperDiagonal(other))
+    {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_GEQ(_upperDiagonal, _lowerDiagonal);
+    }
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename TStream, typename TConfig>
+inline TStream &
+operator<<(TStream & stream, Seed<Simple, TConfig> const & seed)
+{
+    return stream << "Seed<Simple, TConfig>(" << getBeginDim0(seed)
+                  << ", " << getBeginDim1(seed) << ", "
+                  << getEndDim0(seed) << ", "
+                  << getEndDim1(seed) << ", lower diag = " << getLowerDiagonal(seed) << ", upper diag = " << getUpperDiagonal(seed) << ")";
+}
+
+template <typename TConfig>
+inline bool
+operator==(Seed<Simple, TConfig> const & a, Seed<Simple, TConfig> const & b)
+{
+    SEQAN_CHECKPOINT;
+    return a._beginDim0 == b._beginDim0 &&
+            a._beginDim1 == b._beginDim1 &&
+            a._endDim0 == b._endDim0 &&
+            a._endDim1 == b._endDim1 &&
+            a._upperDiagonal == b._upperDiagonal &&
+            a._lowerDiagonal == b._lowerDiagonal;
+}
+
+template <typename TConfig>
+inline typename Position<Seed<Simple, TConfig> >::Type
+getBeginDim0(Seed<Simple, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+	return seed._beginDim0;
+}
+
+/**
+.Function.setBeginDim0:
+..summary: Updates the start point of the seed.
+..cat:Seed Handling
+..signature:setBeginDim0(seed, start)
+..param.seed:The seed whose start position should be updated.
+...type:Spec.SimpleSeed
+..param.start:The query position where the seed should start.
+..include:seqan/seeds.h
+*/
+template <typename TConfig, typename TPosition>
+inline void 
+setBeginDim0(Seed<Simple, TConfig> & seed, 
+             TPosition newLeftPosition)
+{
+	SEQAN_CHECKPOINT;
+	seed._beginDim0 = newLeftPosition;
+}
+
+template <typename TConfig>
+inline typename Position<Seed<Simple, TConfig> >::Type
+getEndDim0(Seed<Simple, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+	return seed._endDim0;
+}
+
+template <typename TConfig>
+inline typename Position<Seed<Simple, TConfig> >::Type
+getBeginDim1(Seed<Simple, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+	return seed._beginDim1;
+}
+
+/**
+.Function.setBeginDim1:
+..summary: Updates the start point of the seed.
+..cat:Seed Handling
+..signature:setBeginDim1(seed, start)
+..param.seed:The seed whose start position should be updated.
+...type:Spec.SimpleSeed
+..param.start:The database position where the seed should start.
+..include:seqan/seeds.h
+*/
+template <typename TConfig, typename TPosition>
+inline void 
+setBeginDim1(Seed<Simple, TConfig> & seed, 
+             TPosition newLeftPosition)
+{
+	SEQAN_CHECKPOINT;
+	seed._beginDim1 = newLeftPosition;
+}
+
+template <typename TConfig>
+inline typename Position<Seed<Simple, TConfig> >::Type
+getEndDim1(Seed<Simple, TConfig> const & seed)
+{
+	SEQAN_CHECKPOINT;
+	return seed._endDim1;
+}
+
+/**
+.Function.setEndDim0:
+..summary: Updates the end point of the seed.
+..cat:Seed Handling
+..signature:setEndDim0(seed, end)
+..param.seed:The seed whose end position should be updated.
+...type:Spec.SimpleSeed
+..param.end:The query position where the seed should end.
+..include:seqan/seeds.h
+*/
+template <typename TConfig, typename TPosition>
+inline void 
+setEndDim0(Seed<Simple, TConfig> & seed, 
+           TPosition newRightPosition)
+{
+	SEQAN_CHECKPOINT;
+	seed._endDim0 = newRightPosition;
+}
+
+/**
+.Function.setEndDim1:
+..summary: Updates the end point of the seed.
+..cat:Seed Handling
+..signature:setEndDim1(seed, end)
+..param.seed:The seed whose end position should be updated.
+...type:Spec.SimpleSeed
+..param.end:The database position where the seed should end.
+..include:seqan/seeds.h
+*/
+template <typename TConfig, typename TPosition>
+inline void 
+setEndDim1(Seed<Simple, TConfig> & seed, 
+           TPosition newRightPosition)
+{
+	SEQAN_CHECKPOINT;
+	seed._endDim1 = newRightPosition;
+}
+
+// Basic Functions
+
+template <typename TConfig>
+void
+move(Seed<Simple, TConfig> & target, Seed<Simple, TConfig> & source)
+{
+    SEQAN_CHECKPOINT;
+    target._beginDim0 = source._beginDim0;
+    target._beginDim1 = source._beginDim1;
+    target._endDim0 = source._endDim0;
+    target._endDim1 = source._endDim1;
+    target._lowerDiagonal = source._lowerDiagonal;
+    target._upperDiagonal = source._upperDiagonal;
+    _assignScoreMixin(target, source, typename HasScore<Seed<Simple, TConfig> >::Type());
+}
+
+template <typename TConfig>
+void
+assign(Seed<Simple, TConfig> & target, Seed<Simple, TConfig> const & source)
+{
+    SEQAN_CHECKPOINT;
+    target._beginDim0 = source._beginDim0;
+    target._beginDim1 = source._beginDim1;
+    target._endDim0 = source._endDim0;
+    target._endDim1 = source._endDim1;
+    target._lowerDiagonal = source._lowerDiagonal;
+    target._upperDiagonal = source._upperDiagonal;
+    _assignScoreMixin(target, source, typename HasScore<Seed<Simple, TConfig> >::Type());
+}
+
+template <typename TConfig>
+void
+assign(Seed<Simple, TConfig> & target, Seed<Simple, TConfig> & source)
+{
+    SEQAN_CHECKPOINT;
+    typedef Seed<Simple, TConfig> TSeed;
+    assign(target, const_cast<TSeed const &>(source));
+}
+
+// Debug Output
+
+struct Tikz_ {};
+
+template <typename TStream, typename TConfig>
+inline void
+_write(TStream & stream, Seed<Simple, TConfig> const & seed, Tikz_ const &)
+{
+    stream << "\\draw[seed] (" << getBeginDim1(seed) << ", -" << getBeginDim0(seed) << ") -- (" << (getEndDim1(seed) - 1) << ", -" << (getEndDim0(seed) - 1) << ");" << std::endl;
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEEDS_SEEDS_SEED_SIMPLE_H_
diff --git a/src/SeqAn-1.3/seqan/sequence.h b/src/SeqAn-1.3/seqan/sequence.h
new file mode 100644
index 0000000..4af1e62
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence.h
@@ -0,0 +1,114 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Module header for the sequence module.
+//
+// The sequence module contains:
+//  * Class String and some specializations.
+//  * Class StringSet and its specialization.
+//  * Adaptions of STL classes to the SeqAn Sequence concept.
+//  * Misc sequence-related code such as treating sequences as streams and
+//    lexical comparison helpers.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_H
+#define SEQAN_HEADER_SEQUENCE_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <seqan/basic.h>
+
+#include <cassert>
+
+#include <map>  // used in string set
+// The classes std::string, std::list and std::vector are adapted in this
+// module.
+#include <string>
+#include <list>
+#include <vector>
+
+//____________________________________________________________________________
+
+#include <seqan/sequence/sequence_forwards.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/sequence/sequence_generated_forwards.h>
+#endif
+
+//____________________________________________________________________________
+// Miscellaneous sequence-related code.
+
+#include <seqan/sequence/sequence_stream.h>
+#include <seqan/sequence/sequence_lexical.h>
+
+//____________________________________________________________________________
+// Segments: Suffixes, Infixes, Prefixes.
+
+#include <seqan/sequence/sequence_interface.h>
+#include <seqan/sequence/segment_base.h>
+#include <seqan/sequence/segment_infix.h>
+#include <seqan/sequence/segment_suffix.h>
+#include <seqan/sequence/segment_prefix.h>
+
+//____________________________________________________________________________
+// Strings
+
+#include <seqan/sequence/string_base.h>
+#include <seqan/sequence/string_array.h>
+#include <seqan/sequence/string_alloc.h>
+#include <seqan/sequence/string_cstyle.h>
+#include <seqan/sequence/string_block.h>
+#include <seqan/sequence/string_packed.h>
+
+#include <seqan/sequence/sequence_shortcuts.h>
+
+//____________________________________________________________________________
+// StringSets
+#include <seqan/sequence/iter_concat_virtual.h>
+#include <seqan/sequence/sequence_concatenator.h>
+#include <seqan/sequence/string_set_base.h>
+#include <seqan/sequence/string_set_concat_direct.h>
+#include <seqan/sequence/string_set_dependent_tight.h>
+#include <seqan/sequence/string_set_dependent_generous.h>
+#include <seqan/sequence/string_set_owner.h>
+
+//____________________________________________________________________________
+// Adaptions
+
+#include <seqan/sequence/adapt_std_list.h>
+#include <seqan/sequence/adapt_std_string.h>
+#include <seqan/sequence/adapt_std_vector.h>
+#include <seqan/sequence/adapt_array_pointer.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/adapt_array_pointer.h b/src/SeqAn-1.3/seqan/sequence/adapt_array_pointer.h
new file mode 100644
index 0000000..f368b42
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/adapt_array_pointer.h
@@ -0,0 +1,837 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Adaptions for pointer and arrays to SeqAn strings.
+//
+// TODO(holtgrew): Break out into adapt_pointer.h and adapt_array.h? The important main distinction is the fixed size at compile time.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_ADAPT_ARRAY_POINTER_H_
+#define SEQAN_SEQUENCE_ADAPT_ARRAY_POINTER_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+/**
+.Adaption.char array:
+..summary:Zero terminated $char[]$ or $wchar_t[]$.
+..remarks:Char arrays only support the Insist @Tag.Overflow Strategy.overflow strategy at .
+*/
+
+/**
+.Adaption.char array.remarks:The default overflow strategy
+(both @Metafunction.DefaultOverflowImplicit@ and @Metafunction.DefaultOverflowExplicit@)
+for all operations on char arrays is @Tag.Overflow Strategy.insist at .
+*/
+
+template <typename TValue>
+struct DefaultOverflowImplicit;
+
+template <typename TValue>
+struct DefaultOverflowImplicit<TValue *>
+{
+    typedef Insist Type;
+};
+
+template <typename TValue>
+struct DefaultOverflowImplicit<TValue * const>
+{
+    typedef Insist Type;
+};
+
+template <typename TValue, size_t SIZE>
+struct DefaultOverflowImplicit<TValue [SIZE]>
+{
+    typedef Insist Type;
+};
+
+template <typename TValue, size_t SIZE>
+struct DefaultOverflowImplicit<TValue const [SIZE]>
+{
+    typedef Insist Type;
+};
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+template <typename TValue>
+struct DefaultOverflowExplicit;
+
+template <typename TValue>
+struct DefaultOverflowExplicit< TValue * >
+{
+    typedef Insist Type;
+};
+template <typename TValue>
+struct DefaultOverflowExplicit< TValue * const>
+{
+    typedef Insist Type;
+};
+template <typename TValue, size_t SIZE>
+struct DefaultOverflowExplicit< TValue [SIZE] >
+{
+    typedef Insist Type;
+};
+template <typename TValue, size_t SIZE>
+struct DefaultOverflowExplicit< TValue const [SIZE] >
+{
+    typedef Insist Type;
+};
+
+///.Metafunction.IsContiguous.param.T.type:Adaption.char array
+
+template <typename TValue>
+struct IsContiguous;
+
+template <typename TValue>
+struct IsContiguous< TValue * >
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+template <typename TValue, size_t SIZE>
+struct IsContiguous< TValue [SIZE] >
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+template <typename TValue, size_t SIZE>
+struct IsContiguous< TValue const [SIZE] >
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+/*
+.Metafunction.IsSequence.param.T.type:Adaption.char array
+..include:seqan/sequence.h
+*/
+
+template <typename TValue>
+struct IsSequence< TValue * >
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+template <typename TValue, size_t SIZE>
+struct IsSequence< TValue [SIZE] >
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+template <typename TValue, size_t SIZE>
+struct IsSequence< TValue const [SIZE] >
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+template <typename T>
+inline typename Iterator<T *, typename DefaultGetIteratorSpec<T>::Type>::Type
+begin(T * me)
+{
+SEQAN_CHECKPOINT
+    return begin(me, typename DefaultGetIteratorSpec<T>::Type()) ;
+}
+
+///.Function.begin.param.object.type:Adaption.char array
+
+template <typename TValue>
+inline typename Iterator<TValue *, Standard>::Type
+begin(TValue * me,
+      Standard)
+{
+SEQAN_CHECKPOINT
+    return me;
+}
+
+// TODO(holtgrew): Is the following still required since we dropped support for VC++ 2003?
+//folgende Versionen wurde wegen seltsamer Phaenomene bei VC++ 2003 hinzugenommen
+template <typename TValue>
+inline typename Iterator<TValue const *, Standard>::Type
+begin(TValue const * me,
+      Standard)
+{
+SEQAN_CHECKPOINT
+    return me;
+}
+
+template <typename TValue, typename TSpec>
+inline typename Iterator<TValue *, Tag<TSpec> const>::Type
+begin(TValue * me,
+      Tag<TSpec> const)
+{
+SEQAN_CHECKPOINT
+    typedef typename Iterator<TValue *, Tag<TSpec> const>::Type TIterator;
+    return TIterator(me, begin(me, Standard()));
+}
+
+template <typename TValue, typename TSpec>
+inline typename Iterator<TValue const *, Tag<TSpec> const>::Type
+begin(TValue const * me,
+      Tag<TSpec> const)
+{
+SEQAN_CHECKPOINT
+    typedef typename Iterator<TValue const *, Tag<TSpec> const>::Type TIterator;
+    return TIterator(me, begin(me, Standard()));
+}
+
+///.Function.end.param.object.type:Adaption.char array
+
+template <typename TValue>
+inline typename Iterator<TValue *, Standard>::Type
+end(TValue * me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(me, Standard()) + length(me);
+}
+
+//folgende Version wurde wegen eines seltsamen Phaenomens bei VC++ hinzugenommen
+template <typename TValue>
+inline typename Iterator<TValue const *, Standard>::Type
+end(TValue const * me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(me, Standard()) + length(me);
+}
+
+template <typename TValue, typename TSpec>
+inline typename Iterator<TValue *, Tag<TSpec> const>::Type
+end(TValue * me,
+      Tag<TSpec> const tag_)
+{
+SEQAN_CHECKPOINT
+    return begin(me, tag_) + length(me);
+}
+
+template <typename TValue, typename TSpec>
+inline typename Iterator<TValue const *, Tag<TSpec> const>::Type
+end(TValue const * me,
+      Tag<TSpec> const tag_)
+{
+SEQAN_CHECKPOINT
+    return begin(me, tag_) + length(me);
+}
+
+///.Function.value.param.container.type:Adaption.char array
+
+template <typename TValue, typename TPos>
+inline TValue &
+value(TValue * me,
+      TPos pos)
+{
+SEQAN_CHECKPOINT
+    return me[pos];
+}
+
+template <typename TValue, typename TPos>
+inline TValue const &
+value(TValue const * me,
+      TPos pos)
+{
+SEQAN_CHECKPOINT
+    return me[pos];
+}
+
+///.Function.assignValue.param.container.type:Adaption.char array
+
+template <typename TValue, typename TPos>
+inline void
+assignValue(TValue * me,
+            TPos pos,
+            TValue const & _value)
+{
+SEQAN_CHECKPOINT
+    assign(value(me, pos), _value);
+}
+
+///.Function.moveValue.param.container.type:Adaption.char array
+
+template <typename TValue, typename TPos>
+inline void
+moveValue(TValue * me,
+          TPos pos,
+          TValue const & _value)
+{
+SEQAN_CHECKPOINT
+    move(value(me, pos), _value);
+}
+
+// Function atEnd for pointers / array iterators.
+
+template <typename TValue>
+inline bool
+atEnd(TValue * pos)
+{
+SEQAN_CHECKPOINT
+    return *pos == 0;
+}
+
+template <typename TValue>
+inline bool
+atEnd(TValue const * pos,
+      TValue const * /*container*/)
+{
+SEQAN_CHECKPOINT
+    return *pos == 0;
+}
+
+///.Function.length.param.object.type:Adaption.char array
+
+template <typename TValue>
+inline size_t
+length(TValue * me)
+{
+SEQAN_CHECKPOINT
+    if (!me) return 0;
+    TValue * it = me;
+    TValue zero = TValue();
+    while ( *it != zero) ++it;
+    return it - me;
+}
+
+template <typename TValue>
+inline size_t
+length(TValue const * me)
+{
+SEQAN_CHECKPOINT
+    if (!me) return 0;
+    TValue const * it = me;
+    TValue const zero = TValue();
+    while ( *it != zero) ++it;
+    return it - me;
+}
+
+inline size_t
+length(char * me)
+{
+SEQAN_CHECKPOINT
+    return ::std::strlen(me);
+}
+
+inline size_t
+length(char const * me)
+{
+SEQAN_CHECKPOINT
+    return ::std::strlen(me);
+}
+
+template <typename TValue>
+inline void
+_setLength(TValue * me,
+           size_t new_length)
+{
+SEQAN_CHECKPOINT
+    me[new_length] = 0;
+}
+
+///.Function.clear.param.object.type:Adaption.char array
+
+template <typename TValue>
+inline void
+clear(TValue * me)
+{
+SEQAN_CHECKPOINT
+    // TODO(holtgrew): Review this.
+    //arrayDestruct(begin(me), length(me)); //??? Die Laengenbestimmung ist meistens nutzlos, braucht man sowieso nur fuer non-pod
+    _setLength(me, 0);
+}
+
+///.Function.empty.param.object.type:Adaption.char array
+
+template <typename TValue>
+inline bool
+empty(TValue * me)
+{
+SEQAN_CHECKPOINT
+    return !me || (*me == TValue());
+}
+
+template<typename TValue, typename TExpand>
+inline size_t
+_clearSpace(TValue * me,
+           size_t size,
+           Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return ClearSpaceStringBase_<Tag<TExpand> const>::_clearSpace_(me, size);
+}
+
+template<typename TValue, typename TExpand>
+inline size_t
+_clearSpace(TValue * me,
+           size_t size,
+           size_t limit,
+           Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return ClearSpaceStringBase_<Tag<TExpand> const>::_clearSpace_(me, size, limit);
+}
+
+template<typename TValue, typename TPosition, typename TExpand>
+inline size_t
+_clearSpace(TValue * me,
+           size_t size,
+           TPosition pos_begin,
+           TPosition pos_end,
+           Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return ClearSpaceStringBase_<Tag<TExpand> const>::_clearSpace_(me, size, pos_begin, pos_end);
+}
+
+template<typename TValue, typename TPosition, typename TExpand>
+inline size_t
+_clearSpace(TValue * me,
+           size_t size,
+           TPosition pos_begin,
+           TPosition pos_end,
+           size_t limit,
+           Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return ClearSpaceStringBase_<Tag<TExpand> const>::_clearSpace_(me, size, pos_begin, pos_end, limit);
+}
+
+///.Function.assign.param.target.type:.Adaption.char array
+///.Function.assign.param.source.type:.Adaption.char array
+
+//overload of binary version for strings:
+
+template<typename TTargetValue, typename TSource>
+inline void
+assign(TTargetValue * target,
+       TSource & source)
+{
+SEQAN_CHECKPOINT
+    typedef TTargetValue * TTarget;
+    assign(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+template<typename TTargetValue, typename TSource>
+inline void
+assign(TTargetValue * target,
+       TSource const & source)
+{
+SEQAN_CHECKPOINT
+    typedef TTargetValue * TTarget;
+    assign(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTargetValue, typename TSource, typename TExpand>
+inline void
+assign(TTargetValue * target,
+       TSource const & source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignString_<Tag<TExpand> const>::assign_(target, source);
+}
+
+template<typename TTargetValue, typename TSource, typename TExpand>
+inline void
+assign(TTargetValue * target,
+       TSource const & source,
+       size_t limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignString_<Tag<TExpand> const>::assign_(target, source, limit);
+}
+
+//____________________________________________________________________________
+//this variant is a workaround for the "const array"-bug of VC++
+
+template<typename TTargetValue, typename TSourceValue, typename TExpand>
+inline void
+assign(TTargetValue * target,
+       TSourceValue const * source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignString_<Tag<TExpand> const>::assign_(target, source);
+}
+
+template<typename TTargetValue, typename TSourceValue, typename TExpand>
+inline void
+assign(TTargetValue * target,
+       TSourceValue const * source,
+       size_t limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignString_<Tag<TExpand> const>::assign_(target, source, limit);
+}
+
+///.Function.move.param.target.type:Adaption.char array
+
+//overload of binary version for strings:
+
+template<typename TTargetValue, typename TSource>
+inline void
+move(TTargetValue * & target,
+     TSource & source)
+{
+SEQAN_CHECKPOINT
+    target = source;
+}
+template<typename TTargetValue, typename TSource>
+inline void
+move(TTargetValue * & target,
+     TSource const & source)
+{
+SEQAN_CHECKPOINT
+    target = source;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// append
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.append.param.target.type:.Adaption.char array
+///.Function.append.param.source.type:.Adaption.char array
+
+template<typename TTargetValue, typename TSource, typename TExpand>
+inline void
+append(TTargetValue * target,
+       TSource const & source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendString_<Tag<TExpand> const>::append_(target, source);
+}
+
+template<typename TTargetValue, typename TSource, typename TExpand>
+inline void
+append(TTargetValue * target,
+       TSource const & source,
+       size_t limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendString_<Tag<TExpand> const>::append_(target, source, limit);
+}
+
+//____________________________________________________________________________
+//this variant is a workaround for the "const array"-bug of VC++
+
+template<typename TTargetValue, typename TSourceValue, typename TExpand>
+inline void
+append(TTargetValue * target,
+       TSourceValue const * source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendString_<Tag<TExpand> const>::append_(target, source);
+}
+
+template<typename TTargetValue, typename TSourceValue, typename TExpand>
+inline void
+append(TTargetValue * target,
+       TSourceValue const * source,
+       size_t limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendString_<Tag<TExpand> const>::append_(target, source, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// replace
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.replace.param.target.type:.Adaption.char array
+///.Function.replace.param.source.type:.Adaption.char array
+
+template<typename TTargetValue, typename TSource, typename TExpand>
+inline void
+replace(TTargetValue * target,
+        size_t pos_begin,
+        size_t pos_end,
+        TSource const & source,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+
+template<typename TTargetValue, typename TSource, typename TExpand>
+inline void
+replace(TTargetValue * target,
+        size_t pos_begin,
+        size_t pos_end,
+        TSource const & source,
+        size_t limit,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+//____________________________________________________________________________
+//this variant is a workaround for the "const array"-bug of VC++
+
+template<typename TTargetValue, typename TSourceValue, typename TExpand>
+inline void
+replace(TTargetValue * target,
+        size_t pos_begin,
+        size_t pos_end,
+        TSourceValue const * source,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+
+template<typename TTargetValue, typename TSourceValue, typename TExpand>
+inline void
+replace(TTargetValue * target,
+        size_t pos_begin,
+        size_t pos_end,
+        TSourceValue const * source,
+        size_t limit,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// handling of iterators as begin and and
+/*
+template<typename TTargetValue, typename TSource, typename TExpand>
+inline void
+replace(TTargetValue * target,
+        typename Iterator<TTargetValue *, Rooted>::Type pos_begin,
+        typename Iterator<TTargetValue *, Rooted>::Type pos_end,
+        TSource const & source,
+        Tag<TExpand> const tag)
+{
+    replace(target, position(pos_begin), position(pos_end), source, tag);
+}
+template<typename TTargetValue, typename TSource, typename TExpand>
+inline void
+replace(TTargetValue * target,
+        typename Iterator<TTargetValue *, Rooted>::Type pos_begin,
+        typename Iterator<TTargetValue *, Rooted>::Type pos_end,
+        TSource const & source,
+        size_t limit,
+        Tag<TExpand> const tag)
+{
+    replace(target, position(pos_begin), position(pos_end), source, limit, tag);
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+///.Function.resize.param.object.type:Adaption.char array
+
+template <typename TValue, typename TSize, typename TExpand>
+inline size_t
+resize(
+    TValue * me,
+    TSize new_length,
+    Tag<TExpand> const &)
+{
+SEQAN_CHECKPOINT
+    return _Resize_String<Tag<TExpand> const>::resize_(me, new_length);
+}
+
+template <typename TValue, typename TSize, typename TExpand>
+inline size_t
+resize(
+    TValue * me,
+    TSize new_length,
+    TValue const & val,
+    Tag<TExpand> const &)
+{
+SEQAN_CHECKPOINT
+    return _Resize_String<Tag<TExpand> const>::resize_(me, new_length, val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// TODO(holtgrew): Review this problem, and document in ticket system.
+//PROBLEM: ambiguitiy "pointer/iterator" and "c-style string"
+//workaround: disable all operators
+/*
+template <typename TLeftValue, typename TRight >
+TLeftValue const *
+operator += (TLeftValue * left,
+             TRight const & right)
+{
+SEQAN_CHECKPOINT
+    append(left, right);
+    return left;
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TRight >
+inline bool
+isEqual(TLeftValue * left,
+        TRight const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<TLeftValue *>::Type _lex(left, right);
+    return isEqual(_lex);
+}
+/*
+template <typename TLeftValue, typename TRight >
+inline bool
+operator == (TLeftValue * left,
+            TRight const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<TLeftValue *>::Type _lex(left, right);
+    return isEqual(_lex);
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TRight >
+inline bool
+isNotEqual(TLeftValue * left,
+           TRight const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<TLeftValue *>::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+/*
+template <typename TLeftValue, typename TRight >
+inline bool
+operator != (TLeftValue * left,
+             TRight const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<TLeftValue *>::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TRight>
+inline bool
+isLess(TLeftValue * left,
+       TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isLess(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+/*
+template <typename TLeftValue, typename TRight>
+inline bool
+operator < (TLeftValue * left,
+            TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isLess(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TRight>
+inline bool
+isLessOrEqual(TLeftValue * left,
+             TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isLessOrEqual(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+/*
+template <typename TLeftValue, typename TRight>
+inline bool
+operator <= (TLeftValue * left,
+             TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isLessOrEqual(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TRight>
+inline bool
+isGreater(TLeftValue * left,
+        TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreater(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+/*
+template <typename TLeftValue, typename TRight>
+inline bool
+operator > (TLeftValue * left,
+        TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreater(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TRight>
+inline bool
+isGreaterOrEqual(TLeftValue * left,
+        TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreaterOrEqual(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+/*
+template <typename TLeftValue, typename TRight>
+inline bool
+operator >= (TLeftValue * left,
+        TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreaterOrEqual(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+}  // namespace seqan
+
+//____________________________________________________________________________
+
+#endif  // #ifndef SEQAN_SEQUENCE_ADAPT_ARRAY_POINTER_H_
diff --git a/src/SeqAn-1.3/seqan/sequence/adapt_std_list.h b/src/SeqAn-1.3/seqan/sequence/adapt_std_list.h
new file mode 100644
index 0000000..175bf86
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/adapt_std_list.h
@@ -0,0 +1,300 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+
+// SEQAN_NO_GENERATED_FORWARDS: No forwards are generated for this file.
+
+#ifndef SEQAN_SEQUENCE_ADAPT_STD_LIST_H_
+#define SEQAN_SEQUENCE_ADAPT_STD_LIST_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+/**
+.Adaption."std::list"
+..summary:Adaption for STL list objects.
+*/
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+///.Metafunction.IsContiguous.param.T.type:Adaption.std::list
+template <typename TChar, typename TAlloc>
+struct IsContiguous< ::std::basic_string<TChar, TAlloc> >
+{
+    enum { VALUE = false };
+};
+
+template <typename  TChar, typename TAlloc>
+struct IsContiguous< ::std::basic_string<TChar, TAlloc> const>
+        : IsContiguous< ::std::basic_string<TChar, TAlloc> > {};
+
+///.Metafunction.Value.param.T.type:Adaption.std::list
+template <typename TValue, typename TAlloc>
+struct Value< ::std::list<TValue, TAlloc> >
+{
+    typedef typename ::std::list<TValue, TAlloc>::value_type Type;
+};
+
+template <typename TValue, typename TAlloc>
+struct Value< ::std::list<TValue, TAlloc> const>
+        : Value< ::std::list<TValue, TAlloc> > {};
+
+///.Metafunction.GetValue.param.T.type:Adaption.std::list
+template <typename TValue, typename TAlloc>
+struct GetValue< ::std::list<TValue, TAlloc> >
+{
+    typedef typename ::std::list<TValue, TAlloc>::reference Type;
+};
+
+template <typename TValue, typename TAlloc>
+struct GetValue< ::std::list<TValue, TAlloc> const>
+{
+    typedef typename ::std::list<TValue, TAlloc>::const_reference Type;
+};
+
+///.Metafunction.Iterator.param.T.type:Adaption.std::list
+template <typename TValue, typename TAlloc>
+struct Iterator< ::std::list<TValue, TAlloc>, Rooted>
+{
+    typedef ::std::list<TValue, TAlloc> TString_;
+    typedef Iter<TString_, StdIteratorAdaptor> TIterator_;
+    typedef Iter<TString_, AdaptorIterator<TIterator_> > Type;
+};
+
+template <typename TValue, typename TAlloc>
+struct Iterator< ::std::list<TValue, TAlloc> const, Rooted>
+{
+    typedef ::std::list<TValue, TAlloc> const TString_;
+    typedef Iter<TString_, StdIteratorAdaptor> TIterator_;
+    typedef Iter<TString_, AdaptorIterator<TIterator_> > Type;
+};
+
+template <typename TValue, typename TAlloc>
+struct Iterator< ::std::list<TValue, TAlloc>, Standard>
+{
+    typedef Iter< ::std::list<TValue, TAlloc>, StdIteratorAdaptor> Type;
+};
+
+template <typename TValue, typename TAlloc>
+struct Iterator< ::std::list<TValue, TAlloc> const, Standard>
+{
+    typedef Iter< ::std::list<TValue, TAlloc> const, StdIteratorAdaptor> Type;
+};
+
+///.Metafunction.Position.param.T.type:Adaption.std::list
+template <typename TValue, typename TAlloc>
+struct Position< ::std::list<TValue, TAlloc> >
+{
+    typedef typename ::std::list<TValue, TAlloc>::size_type Type;
+};
+
+template <typename TValue, typename TAlloc>
+struct Position< ::std::list<TValue, TAlloc> const>
+        : Position< ::std::list<TValue, TAlloc> > {};
+
+///.Metafunction.Size.param.T.type:Adaption.std::list
+template <typename TValue, typename TAlloc>
+struct Size< ::std::list<TValue, TAlloc> >
+{
+    typedef typename ::std::list<TValue, TAlloc>::size_type Type;
+};
+
+template <typename TValue, typename TAlloc>
+struct Size< ::std::list<TValue, TAlloc> const>
+        : Size< ::std::list<TValue, TAlloc> > {};
+
+/**
+.Metafunction.StdContainerIterator
+..summary:Returns type of the STL container iterator.
+..signature:StdContainerIterator<T>::Type
+..param.T.type:Adaption.std::list
+..include:seqan/sequence.h
+*/
+template <typename TValue, typename TAlloc>
+struct StdContainerIterator< ::std::list<TValue, TAlloc> >
+{
+    typedef ::std::list<TValue, TAlloc> TContainer_;
+    typedef typename TContainer_::iterator Type;
+};
+
+template <typename TValue, typename TAlloc>
+struct StdContainerIterator< ::std::list<TValue, TAlloc> const>
+{
+    typedef ::std::list<TValue, TAlloc> TContainer_;
+    typedef typename TContainer_::const_iterator Type;
+};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+///.Function.begin.param.object.type:Adaption.std::list
+template<typename TValue>
+inline
+typename Iterator<std::list<TValue>, Standard>::Type
+begin(std::list<TValue> & list,
+      Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return list.begin();
+}
+
+template <typename TValue>
+inline
+typename Iterator<std::list<TValue> const, Standard>::Type
+begin(std::list<TValue> const & list,
+      Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return list.begin();
+}
+
+///.Function.end.param.object.type:Adaption.std::list
+template<typename TValue>
+inline
+typename Iterator<std::list<TValue>, Standard>::Type
+end(std::list<TValue> & list,
+      Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return list.end();
+}
+
+template <typename TValue>
+inline
+typename Iterator<std::list<TValue> const, Standard>::Type
+end(std::list<TValue> const & list,
+      Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return list.end();
+}
+
+/**
+.Function.front.param.container.type:Adaption.std::list
+*/
+template <typename TValue>
+inline typename Reference<std::list<TValue> >::Type
+front(std::list<TValue> & list)
+{
+    SEQAN_CHECKPOINT;
+    return list.front();
+}
+
+template <typename TValue>
+inline typename Reference<std::list<TValue> const>::Type
+front(std::list<TValue> const & list)
+{
+    SEQAN_CHECKPOINT;
+    return list.front();
+}
+
+///.Function.back.param.container.type:Adaption.std::list
+template <typename TValue>
+inline typename Reference<std::list<TValue> >::Type
+back(std::list<TValue> & list)
+{
+    SEQAN_CHECKPOINT;
+    return list.back();
+}
+
+template <typename TValue>
+inline typename Reference<std::list<TValue> const>::Type
+back(std::list<TValue> const & list)
+{
+    SEQAN_CHECKPOINT;
+    return list.back();
+}
+
+///.Function.length.param.object.type:Adaption.std::list
+template <typename TValue>
+inline typename Size<std::list<TValue> >::Type
+length(std::list<TValue> & list)
+{
+    SEQAN_CHECKPOINT;
+    return list.size();
+}
+
+template <typename TValue>
+inline typename Size<std::list<TValue> const>::Type
+length(std::list<TValue> const & list)
+{
+    SEQAN_CHECKPOINT;
+    return list.size();
+}
+
+/**
+.Function.prependValue:
+..summary:Prepend a value to a container.
+..signature:prependValue(container, value)
+..param.container:The container to prepend to.
+...type:Adaption.std::list
+..param.value:The value to prepend to the container.
+..include:seqan/sequence.h
+*/
+template <typename T, typename T2>
+inline void
+prependValue(std::list<T> & list,
+             T2 value)
+{
+    SEQAN_CHECKPOINT;
+    list.push_front(value);
+}
+
+///.Function.appendValue.param.target.type:Adaption.std::list
+template <typename T, typename T2>
+inline void
+appendValue(std::list<T> & list,
+            T2 value)
+{
+    SEQAN_CHECKPOINT;
+    list.push_back(value);
+}
+
+///.Function.clear.param.object.type:Adaption.std::list
+template <typename T>
+inline void
+clear(std::list<T> & list)
+{
+    SEQAN_CHECKPOINT;
+    list.clear();
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_ADAPT_STD_LIST_H_
diff --git a/src/SeqAn-1.3/seqan/sequence/adapt_std_string.h b/src/SeqAn-1.3/seqan/sequence/adapt_std_string.h
new file mode 100644
index 0000000..ab934fa
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/adapt_std_string.h
@@ -0,0 +1,693 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <doering at mdc-berlin.de
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// Adaptions for STL strings to SeqAn strings.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_ADAPT_STD_STRING_H_
+#define SEQAN_SEQUENCE_ADAPT_STD_STRING_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+/**
+.Adaption."std::basic_string"
+..summary:Adaption for STL strings.
+ */
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+
+///.Metafunction.IsContiguous.param.T.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct IsContiguous< ::std::basic_string<TChar, TCharTraits, TAlloc> >
+{
+    enum { VALUE = true };
+};
+
+template <typename  TChar, typename TCharTraits, typename TAlloc>
+struct IsContiguous< ::std::basic_string<TChar, TCharTraits, TAlloc> const>
+        : IsContiguous< ::std::basic_string<TChar, TCharTraits, TAlloc> > {};
+
+///.Metafunction.Value.param.T.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Value< ::std::basic_string<TChar, TCharTraits, TAlloc> >
+{
+    typedef typename ::std::basic_string<TChar, TCharTraits, TAlloc>::value_type Type;
+};
+
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Value< ::std::basic_string<TChar, TCharTraits, TAlloc> const>
+        : Value< ::std::basic_string<TChar, TCharTraits, TAlloc> > {};
+
+///.Metafunction.GetValue.param.T.type:Adaption.std::basic_string
+// TODO(holtgrew): GetValue is a reference?! I thought the reverse was true in respect to Value<>.
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct GetValue< ::std::basic_string<TChar, TCharTraits, TAlloc> >
+{
+    typedef typename ::std::basic_string<TChar, TCharTraits, TAlloc>::reference Type;
+};
+
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct GetValue< ::std::basic_string<TChar, TCharTraits, TAlloc> const>
+{
+    typedef typename ::std::basic_string<TChar, TCharTraits, TAlloc>::const_reference Type;
+};
+
+///.Metafunction.GetValue.param.T.type:Adaption.std::basic_string
+// TODO(holtgrew): GetValue is a reference?! I thought the reverse was true in respect to Value<>.
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Reference< ::std::basic_string<TChar, TCharTraits, TAlloc> >
+{
+    typedef typename ::std::basic_string<TChar, TCharTraits, TAlloc>::reference Type;
+};
+
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Reference< ::std::basic_string<TChar, TCharTraits, TAlloc> const>
+{
+    typedef typename ::std::basic_string<TChar, TCharTraits, TAlloc>::const_reference Type;
+};
+
+///.Metafunction.Iterator.param.T.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Rooted>
+{
+    typedef ::std::basic_string<TChar, TCharTraits, TAlloc> TString_;
+    typedef Iter<TString_, StdIteratorAdaptor> TIterator_;
+    typedef Iter<TString_, AdaptorIterator<TIterator_> > Type;
+};
+
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc> const, Rooted>
+{
+    typedef ::std::basic_string<TChar, TCharTraits, TAlloc> const TString_;
+    typedef Iter<TString_, StdIteratorAdaptor> TIterator_;
+    typedef Iter<TString_, AdaptorIterator<TIterator_> > Type;
+};
+
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Standard >
+{
+    typedef Iter< ::std::basic_string<TChar, TCharTraits, TAlloc>, StdIteratorAdaptor > Type;
+};
+
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc> const, Standard>
+{
+    typedef Iter< ::std::basic_string<TChar, TCharTraits, TAlloc> const, StdIteratorAdaptor > Type;
+};
+
+///.Metafunction.Position.param.T.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >
+{
+    typedef typename ::std::basic_string<TChar, TCharTraits, TAlloc>::size_type Type;
+};
+
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Position< ::std::basic_string<TChar, TCharTraits, TAlloc> const>
+        : Position< ::std::basic_string<TChar, TCharTraits, TAlloc> > {};
+
+///.Metafunction.Size.param.T.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >
+{
+    typedef typename ::std::basic_string<TChar, TCharTraits, TAlloc>::size_type Type;
+};
+
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct Size< ::std::basic_string<TChar, TCharTraits, TAlloc> const>
+        : Size< ::std::basic_string<TChar, TCharTraits, TAlloc> > {};
+
+///.Metafunction.Size.param.T.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+struct DefaultOverflowImplicit< ::std::basic_string<TChar, TCharTraits, TAlloc> >
+{
+    typedef Generous Type;
+};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+///.Function.id.param.object.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+inline void const *
+id(::std::basic_string<TChar, TCharTraits, TAlloc> const & me)
+{
+    SEQAN_CHECKPOINT;
+    if (me.empty())
+        return NULL;
+    else
+        return (& *(me.end() - 1)) + 1;
+}
+
+///.Function.begin.param.object.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+inline typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Standard>::Type
+begin(::std::basic_string<TChar, TCharTraits, TAlloc> & me,
+      Standard)
+{
+    SEQAN_CHECKPOINT;
+    return typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Standard>::Type(me.begin());
+}
+template <typename TChar, typename TCharTraits, typename TAlloc>
+inline typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc> const, Standard>::Type
+begin(::std::basic_string<TChar, TCharTraits, TAlloc> const & me,
+      Standard)
+{
+    SEQAN_CHECKPOINT;
+    return typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc> const, Standard>::Type(me.begin());
+}
+
+///.Function.end.param.object.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+inline typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Standard>::Type
+end(::std::basic_string<TChar, TCharTraits, TAlloc> & me,
+    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Standard>::Type(me.end());
+}
+template <typename TChar, typename TCharTraits, typename TAlloc>
+inline typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc> const, Standard>::Type
+end(::std::basic_string<TChar, TCharTraits, TAlloc> const & me,
+    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc> const, Standard>::Type(me.end());
+}
+
+///.Function.value.param.container.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TPos>
+inline typename GetValue< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type
+value(::std::basic_string<TChar, TCharTraits, TAlloc> & me,
+      TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return me[pos];
+}
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TPos>
+inline typename GetValue< ::std::basic_string<TChar, TCharTraits, TAlloc> const>::Type
+value(::std::basic_string<TChar, TCharTraits, TAlloc> const & me,
+      TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return me[pos];
+}
+
+///.Function.length.param.object.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type
+length(::std::basic_string<TChar, TCharTraits, TAlloc> const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.length();
+}
+
+///.Function.capacity.param.object.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type
+capacity(::std::basic_string<TChar, TCharTraits, TAlloc> const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.capacity();
+}
+
+///.Function.empty.param.object.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+inline bool
+empty(::std::basic_string<TChar, TCharTraits, TAlloc> const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.empty();
+}
+
+///.Function.clear.param.object.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc>
+inline void
+clear(::std::basic_string<TChar, TCharTraits, TAlloc> & me)
+{
+    SEQAN_CHECKPOINT;
+    me.clear();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//assign to ::std::basic_string
+
+///.Function.assign.param.target.type:Adaption.std::basic_string
+///.Function.assign.param.source.type:Adaption.std::basic_string
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource & source)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, Generous());
+}
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, Generous());
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource, typename TSize>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource & source,
+       TSize limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, limit, Generous());
+}
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource, typename TSize>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source,
+       TSize limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, limit, Generous());
+}
+
+//____________________________________________________________________________
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource & source,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    target.assign(begin(source, Standard()), end(source, Standard()));
+}
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    target.assign(begin(source, Standard()), end(source, Standard()));
+}
+
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign_std_string_Generous_impl(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+                                TSource & source,
+                                typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    typename Iterator<TSource const, Standard>::Type source_begin = begin(source, Standard());
+    typename Size<TSource const>::Type source_length = length(source);
+    if (source_length > limit)
+    {
+        source_length = limit;
+    }
+    target.assign(source_begin, source_begin + source_length);
+}
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource & source,
+       typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    assign_std_string_Generous_impl(target, source, limit);
+}
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source,
+       typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    assign_std_string_Generous_impl(target, source, limit);
+}
+
+//____________________________________________________________________________
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource & source,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, target.capacity(), Generous());
+}
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, target.capacity(), Generous());
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource & source,
+       typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (limit > target.capacity())
+    {
+        limit = target.capacity();
+    }
+
+    assign(target, source, limit, Generous());
+}
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source,
+       typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (limit > target.capacity())
+    {
+        limit = target.capacity();
+    }
+
+    assign(target, source, limit, Generous());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//append to ::std::basic_string
+
+///.Function.append.param.target.type:Adaption.std::basic_string
+///.Function.append.param.source.type:Adaption.std::basic_string
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+append(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    target.append(begin(source, Standard()), end(source, Standard()));
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+append(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source,
+       typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type target_length = target.length();
+    if (target_length > limit)
+    {
+        target.resize(limit);
+    }
+    else
+    {
+        limit -= target_length;
+        typename Iterator<TSource const, Standard>::Type source_begin = begin(source, Standard());
+        typename Size<TSource const>::Type source_length = length(source);
+        if (source_length > limit)
+        {
+            source_length = limit;
+        }
+        target.append(source_begin, source_begin + source_length);
+    }
+}
+
+//____________________________________________________________________________
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+append(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, target.capacity(), Generous());
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+append(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+       TSource const & source,
+       typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (limit > target.capacity())
+    {
+        limit = target.capacity();
+    }
+
+    append(target, source, limit, Generous());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.appendValue.param.target.type:Adaption.std::basic_string
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TValue, typename TTag>
+inline void
+appendValue(::std::basic_string<TChar, TCharTraits, TAlloc> & me,
+            TValue const & _value,
+            TTag)
+{
+    SEQAN_CHECKPOINT;
+    me.push_back(_value);
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TValue>
+inline void
+appendValue(::std::basic_string<TChar, TCharTraits, TAlloc> & me,
+            TValue const & _value,
+            Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (capacity(me) > length(me)) me.push_back(_value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//replace to ::std::basic_string
+
+///.Function.replace.param.target.type:Adaption.std::basic_string
+///.Function.replace.param.source.type:Adaption.std::basic_string
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+        typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_begin,
+        typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_end,
+        TSource const & source,
+        Generous)
+{
+    SEQAN_CHECKPOINT;
+    target.replace(target.begin() + pos_begin, target.begin() + pos_end, begin(source, Standard()), end(source, Standard()));
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+        typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_begin,
+        typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_end,
+        TSource const & source,
+        typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit,
+        Generous)
+{
+    SEQAN_CHECKPOINT;
+    if (pos_begin >= limit)
+    {
+        target.resize(limit);
+    }
+    else
+    {
+        typename Iterator<TSource const, Standard>::Type source_begin = begin(source, Standard());
+        typename Size<TSource const>::Type source_length = length(source);
+        typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_mid = pos_begin + source_length;
+        if (pos_mid > limit)
+        {
+            target.replace(target.begin() + pos_begin, target.begin() + limit, source_begin, source_begin + limit - pos_begin);
+            target.resize(limit);
+        }
+        else
+        {
+            target.replace(target.begin() + pos_begin, target.begin() + pos_end, source_begin, end(source, Standard()));
+            if (target.length() > limit)
+            {
+                target.resize(limit);
+            }
+        }
+    }
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+        typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_begin,
+        typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_end,
+        TSource const & source,
+        Limit)
+{
+    SEQAN_CHECKPOINT;
+    replace(target, pos_begin, pos_end, source, target.capacity(), Generous());
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource>
+inline void
+replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+        typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_begin,
+        typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_end,
+        TSource const & source,
+        typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit,
+        Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (limit > target.capacity())
+    {
+        limit = target.capacity();
+    }
+
+    replace(target, pos_begin, pos_end, source, limit, Generous());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// handling of iterators as begin and end
+
+/*
+template<typename TChar, typename TCharTraits, typename TAlloc, typename TSource, typename TExpand>
+inline void
+replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+        typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Rooted>::Type pos_begin,
+        typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Rooted>::Type pos_end,
+        TSource & source,
+        Tag<TExpand> const tag)
+{
+    replace(target, position(pos_begin), position(pos_end), source, tag);
+}
+
+template<typename TChar, typename TCharTraits, typename TAlloc, typename TSource, typename TExpand>
+inline void
+replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target,
+        typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Rooted>::Type pos_begin,
+        typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Rooted>::Type pos_end,
+        TSource & source,
+        typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit,
+        Tag<TExpand> const tag)
+{
+    replace(target,  position(pos_begin),  position(pos_end), source, tag);
+}
+*/
+
+///.Function.reserve.param.object.type:Adaption.std::basic_string
+///.Function.reserve.remarks:For @Adaption.std::basic_string|STL Adaptions@, $reserve$ is only guaranteed to have the specified behaviour with $Insist$ and $Generous$.
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize, typename TExpand>
+inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type
+reserve(
+    ::std::basic_string<TChar, TCharTraits, TAlloc> & seq,
+    TSize new_capacity,
+    Tag<TExpand> const & tag)
+{
+    SEQAN_CHECKPOINT;
+    seq.reserve(new_capacity);
+    return _capacityReturned(seq, new_capacity, tag);
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize>
+inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type
+reserve(
+    ::std::basic_string<TChar, TCharTraits, TAlloc> & seq,
+    TSize new_capacity,
+    Insist const &)
+{
+    SEQAN_CHECKPOINT;
+    // do nothing
+    return _capacityReturned(seq, new_capacity, Insist());
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize>
+inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type
+reserve(
+    ::std::basic_string<TChar, TCharTraits, TAlloc> & seq,
+    TSize new_capacity,
+    Limit const &)
+{
+    SEQAN_CHECKPOINT;
+    // do nothing
+    return _capacityReturned(seq, new_capacity, Limit());
+}
+
+///.Function.resize.param.object.type:Adaption.std::basic_string
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize, typename TExpand>
+inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type
+resize(
+    ::std::basic_string<TChar, TCharTraits, TAlloc> & me,
+    TSize new_length,
+    Tag<TExpand> const &)
+{
+    SEQAN_CHECKPOINT;
+    me.resize(new_length);
+    return me.length();
+}
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize, typename TExpand>
+inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type
+resize(
+    ::std::basic_string<TChar, TCharTraits, TAlloc> & me,
+    TSize new_length,
+    TChar const & val,
+    Tag<TExpand> const &)
+{
+    SEQAN_CHECKPOINT;
+    me.resize(new_length, val);
+    return me.length();
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_ADAPT_STD_STRING_H_
diff --git a/src/SeqAn-1.3/seqan/sequence/adapt_std_vector.h b/src/SeqAn-1.3/seqan/sequence/adapt_std_vector.h
new file mode 100644
index 0000000..0e50211
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/adapt_std_vector.h
@@ -0,0 +1,708 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Knut Reinert <knut.reinert at fu-berlin.de>
+// ==========================================================================
+// Adaptions for STL vectors to SeqAn strings.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_ADAPT_STD_VECTOR_H_
+#define SEQAN_SEQUENCE_ADAPT_STD_VECTOR_H_
+
+namespace seqan {
+
+// ===========================================================================
+// Enums, Tags, Classes, Specializations
+// ===========================================================================
+
+/**
+.Adaption."std::vector"
+..summary:Adaption for STL vector class.
+ */
+
+// ===========================================================================
+// Metafunctions
+// ===========================================================================
+
+///.Metafunction.IsContiguous.param.T.type:Adaption.std::vector
+template <typename TChar, typename TAlloc>
+struct IsContiguous< ::std::vector<TChar, TAlloc> >
+{
+    enum { VALUE = true };
+};
+
+template <typename  TChar, typename TAlloc>
+struct IsContiguous< ::std::vector<TChar, TAlloc> const>
+        : IsContiguous< ::std::vector<TChar, TAlloc> > {};
+
+///.Metafunction.Value.param.T.type:Adaption.std::vector
+template <typename TChar, typename TAlloc>
+struct Value< ::std::vector<TChar, TAlloc> >
+{
+    typedef typename ::std::vector<TChar, TAlloc>::value_type Type;
+};
+
+template <typename TChar, typename TAlloc>
+struct Value< ::std::vector<TChar, TAlloc> const>
+        : Value< ::std::vector<TChar, TAlloc> > {};
+
+///.Metafunction.GetValue.param.T.type:Adaption.std::vector
+// TODO(holtgrew): GetValue is a reference?! I thought the reverse was true in respect to Value<>.
+template <typename TChar, typename TAlloc>
+struct GetValue< ::std::vector<TChar, TAlloc> >
+{
+    typedef typename ::std::vector<TChar, TAlloc>::reference Type;
+};
+
+template <typename TChar, typename TAlloc>
+struct GetValue< ::std::vector<TChar,  TAlloc> const>
+{
+    typedef typename ::std::vector<TChar, TAlloc>::const_reference Type;
+};
+
+///.Metafunction.GetValue.param.T.type:Adaption.std::vector
+// TODO(holtgrew): GetValue is a reference?! I thought the reverse was true in respect to Value<>.
+template <typename TChar, typename TAlloc>
+struct Reference< ::std::vector<TChar, TAlloc> >
+{
+    typedef typename ::std::vector<TChar, TAlloc>::reference Type;
+};
+
+template <typename TChar,  typename TAlloc>
+struct Reference< ::std::vector<TChar, TAlloc> const>
+{
+    typedef typename ::std::vector<TChar,  TAlloc>::const_reference Type;
+};
+
+///.Metafunction.Iterator.param.T.type:Adaption.std::vector
+template <typename TChar, typename TAlloc>
+struct Iterator< ::std::vector<TChar, TAlloc>, Rooted>
+{
+    typedef ::std::vector<TChar, TAlloc> TVector_;
+    typedef Iter<TVector_, StdIteratorAdaptor> TIterator_;
+    typedef Iter<TVector_, AdaptorIterator<TIterator_> > Type;
+};
+
+template <typename TChar, typename TAlloc>
+struct Iterator< ::std::vector<TChar, TAlloc> const, Rooted>
+{
+    typedef ::std::vector<TChar, TAlloc> const TVector_;
+    typedef Iter<TVector_, StdIteratorAdaptor> TIterator_;
+    typedef Iter<TVector_, AdaptorIterator<TIterator_> > Type;
+};
+
+template <typename TChar,  typename TAlloc>
+struct Iterator< ::std::vector<TChar, TAlloc>, Standard >
+{
+    typedef Iter< ::std::vector<TChar,  TAlloc>, StdIteratorAdaptor > Type;
+};
+
+template <typename TChar,  typename TAlloc>
+struct Iterator< ::std::vector<TChar,  TAlloc> const, Standard>
+{
+    typedef Iter< ::std::vector<TChar, TAlloc> const, StdIteratorAdaptor > Type;
+};
+
+///.Metafunction.Position.param.T.type:Adaption.std::vector
+template <typename TChar,  typename TAlloc>
+struct Position< ::std::vector<TChar, TAlloc> >
+{
+    typedef typename ::std::vector<TChar,  TAlloc>::size_type Type;
+};
+
+template <typename TChar,  typename TAlloc>
+struct Position< ::std::vector<TChar,  TAlloc> const>
+        : Position< ::std::vector<TChar,  TAlloc> > {};
+
+///.Metafunction.Size.param.T.type:Adaption.std::vector
+template <typename TChar,  typename TAlloc>
+struct Size< ::std::vector<TChar, TAlloc> >
+{
+    typedef typename ::std::vector<TChar, TAlloc>::size_type Type;
+};
+
+template <typename TChar, typename TAlloc>
+struct Size< ::std::vector<TChar, TAlloc> const>
+        : Size< ::std::vector<TChar, TAlloc> > {};
+
+///.Metafunction.Size.param.T.type:Adaption.std::vector
+template <typename TChar, typename TAlloc>
+struct DefaultOverflowImplicit< ::std::vector<TChar, TAlloc> >
+{
+    typedef Generous Type;
+};
+
+// ===========================================================================
+// Functions
+// ===========================================================================
+
+///.Function.id.param.object.type:Adaption.std::vector
+template <typename TChar,  typename TAlloc>
+inline void const *
+id(::std::vector<TChar, TAlloc> const & me)
+{
+    SEQAN_CHECKPOINT;
+    if (me.empty())
+        return NULL;
+    else
+        return (& *(me.end() - 1)) + 1;
+}
+
+///.Function.begin.param.object.type:Adaption.std::vector
+template <typename TChar,  typename TAlloc>
+inline typename Iterator< ::std::vector<TChar,  TAlloc>, Standard>::Type
+begin(::std::vector<TChar,  TAlloc> & me,
+      Standard)
+{
+    SEQAN_CHECKPOINT;
+    return typename Iterator< ::std::vector<TChar,  TAlloc>, Standard>::Type(me.begin());
+}
+template <typename TChar,  typename TAlloc>
+inline typename Iterator< ::std::vector<TChar,  TAlloc> const, Standard>::Type
+begin(::std::vector<TChar, TAlloc> const & me,
+      Standard)
+{
+    SEQAN_CHECKPOINT;
+    return typename Iterator< ::std::vector<TChar,  TAlloc> const, Standard>::Type(me.begin());
+}
+
+///.Function.end.param.object.type:Adaption.std::vector
+template <typename TChar, typename TAlloc>
+inline typename Iterator< ::std::vector<TChar, TAlloc>, Standard>::Type
+end(::std::vector<TChar,  TAlloc> & me,
+    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return typename Iterator< ::std::vector<TChar, TAlloc>, Standard>::Type(me.end());
+}
+template <typename TChar,  typename TAlloc>
+inline typename Iterator< ::std::vector<TChar,  TAlloc> const, Standard>::Type
+end(::std::vector<TChar,  TAlloc> const & me,
+    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return typename Iterator< ::std::vector<TChar,  TAlloc> const, Standard>::Type(me.end());
+}
+
+///.Function.value.param.container.type:Adaption.std::vector
+template <typename TChar,  typename TAlloc, typename TPos>
+inline typename GetValue< ::std::vector<TChar, TAlloc> >::Type
+value(::std::vector<TChar,  TAlloc> & me,
+      TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return me[pos];
+}
+template <typename TChar,  typename TAlloc, typename TPos>
+inline typename GetValue< ::std::vector<TChar,  TAlloc> const>::Type
+value(::std::vector<TChar, TAlloc> const & me,
+      TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return me[pos];
+}
+
+///.Function.length.param.object.type:Adaption.std::vector
+template <typename TChar, typename TAlloc>
+inline typename Size< ::std::vector<TChar, TAlloc> >::Type
+length(::std::vector<TChar, TAlloc> const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.size();
+}
+
+///.Function.capacity.param.object.type:Adaption.std::vector
+template <typename TChar, typename TAlloc>
+inline typename Size< ::std::vector<TChar, TAlloc> >::Type
+capacity(::std::vector<TChar, TAlloc> const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.capacity();
+}
+
+///.Function.empty.param.object.type:Adaption.std::vector
+template <typename TChar, typename TAlloc>
+inline bool
+empty(::std::vector<TChar, TAlloc> const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.empty();
+}
+
+///.Function.clear.param.object.type:Adaption.std::vector
+template <typename TChar,  typename TAlloc>
+inline void
+clear(::std::vector<TChar, TAlloc> & me)
+{
+    SEQAN_CHECKPOINT;
+    me.clear();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//assign to ::std::vector
+
+///.Function.assign.param.target.type:Adaption.std::vector
+///.Function.assign.param.source.type:Adaption.std::vector
+
+template <typename TChar,  typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar,  TAlloc> & target,
+       TSource & source)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, Generous());
+}
+template <typename TChar,  typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar,  TAlloc> & target,
+       TSource const & source)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, Generous());
+}
+
+template <typename TChar,  typename TAlloc, typename TSource, typename TSize>
+inline void
+assign(::std::vector<TChar,  TAlloc> & target,
+       TSource & source,
+       TSize limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, limit, Generous());
+}
+template <typename TChar,  typename TAlloc, typename TSource, typename TSize>
+inline void
+assign(::std::vector<TChar,  TAlloc> & target,
+       TSource const & source,
+       TSize limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, limit, Generous());
+}
+
+//____________________________________________________________________________
+
+template <typename TChar,  typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar, TAlloc> & target,
+       TSource & source,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    target.assign(begin(source, Standard()), end(source, Standard()));
+}
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar, TAlloc> & target,
+       TSource const & source,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    target.assign(begin(source, Standard()), end(source, Standard()));
+}
+
+
+template <typename TChar,  typename TAlloc, typename TSource>
+inline void
+assign_std_vector_Generous_impl(::std::vector<TChar,  TAlloc> & target,
+                                TSource & source,
+                                typename Size< ::std::vector<TChar,  TAlloc> >::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    typename Iterator<TSource const, Standard>::Type source_begin = begin(source, Standard());
+    typename Size<TSource const>::Type source_length = length(source);
+    if (source_length > limit)
+    {
+        source_length = limit;
+    }
+    target.assign(source_begin, source_begin + source_length);
+}
+template <typename TChar,  typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar,  TAlloc> & target,
+       TSource & source,
+       typename Size< ::std::vector<TChar, TAlloc> >::Type limit,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    assign_std_vector_Generous_impl(target, source, limit);
+}
+template <typename TChar,  typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar, TAlloc> & target,
+       TSource const & source,
+       typename Size< ::std::vector<TChar, TAlloc> >::Type limit,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    assign_std_vector_Generous_impl(target, source, limit);
+}
+
+//____________________________________________________________________________
+
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar,  TAlloc> & target,
+       TSource & source,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, target.capacity(), Generous());
+}
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar,  TAlloc> & target,
+       TSource const & source,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, target.capacity(), Generous());
+}
+
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar, TAlloc> & target,
+       TSource & source,
+       typename Size< ::std::vector<TChar, TAlloc> >::Type limit,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (limit > target.capacity())
+    {
+        limit = target.capacity();
+    }
+
+    assign(target, source, limit, Generous());
+}
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+assign(::std::vector<TChar,  TAlloc> & target,
+       TSource const & source,
+       typename Size< ::std::vector<TChar,  TAlloc> >::Type limit,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (limit > target.capacity())
+    {
+        limit = target.capacity();
+    }
+
+    assign(target, source, limit, Generous());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//append to ::std::vector
+
+///.Function.append.param.target.type:Adaption.std::vector
+///.Function.append.param.source.type:Adaption.std::vector
+
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+append(::std::vector<TChar,  TAlloc> & target,
+       TSource const & source,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    target.insert(target.end(), begin(source, Standard()), end(source, Standard()));
+}
+
+template <typename TChar,  typename TAlloc, typename TSource>
+inline void
+append(::std::vector<TChar, TAlloc> & target,
+       TSource const & source,
+       typename Size< ::std::vector<TChar, TAlloc> >::Type limit,
+       Generous)
+{
+    SEQAN_CHECKPOINT;
+    typename Size< ::std::vector<TChar, TAlloc> >::Type target_length = target.length();
+    if (target_length > limit)
+    {
+        target.resize(limit);
+    }
+    else
+    {
+        limit -= target_length;
+        typename Iterator<TSource const, Standard>::Type source_begin = begin(source, Standard());
+        typename Size<TSource const>::Type source_length = length(source);
+        if (source_length > limit)
+        {
+            source_length = limit;
+        }
+
+        target.insert(target.end(), source_begin, source_begin + source_length);
+    }
+}
+
+//____________________________________________________________________________
+
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+append(::std::vector<TChar,  TAlloc> & target,
+       TSource const & source,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, target.capacity(), Generous());
+}
+
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+append(::std::vector<TChar, TAlloc> & target,
+       TSource const & source,
+       typename Size< ::std::vector<TChar, TAlloc> >::Type limit,
+       Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (limit > target.capacity())
+    {
+        limit = target.capacity();
+    }
+
+    append(target, source, limit, Generous());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.appendValue.param.target.type:Adaption.std::vector
+
+template <typename TChar, typename TAlloc, typename TValue, typename TTag>
+inline void
+appendValue(::std::vector<TChar, TAlloc> & me,
+            TValue const & _value,
+            TTag)
+{
+    SEQAN_CHECKPOINT;
+    me.push_back(_value);
+}
+
+template <typename TChar, typename TAlloc, typename TValue>
+inline void
+appendValue(::std::vector<TChar,  TAlloc> & me,
+            TValue const & _value,
+            Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (capacity(me) > length(me)) me.push_back(_value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//replace to ::std::vector
+
+///.Function.replace.param.target.type:Adaption.std::vector
+///.Function.replace.param.source.type:Adaption.std::vector
+
+template <typename TChar,  typename TAlloc, typename TSource>
+inline void
+replace(::std::vector<TChar, TAlloc> & target,
+        typename Position< ::std::vector<TChar, TAlloc> >::Type pos_begin,
+        typename Position< ::std::vector<TChar, TAlloc> >::Type pos_end,
+        TSource const & source,
+        Generous)
+{
+    SEQAN_CHECKPOINT;
+    typename Size< ::std::vector<TChar, TAlloc> >::Type target_size = pos_end-pos_begin;
+    typename Size< ::std::vector<TChar, TAlloc> >::Type source_size =length(source);
+
+    if(target_size >= source_size)
+        {
+            copy(source.begin(),source.end(), target.begin()+pos_begin);
+            if( target_size > source_size )
+                target.erase(target.begin()+pos_begin+source_size,target.begin()+pos_end);
+        }
+    else
+        {
+            copy(source.begin(),source.begin()+target_size,target.begin()+pos_begin);
+            target.insert(target.begin()+pos_end,source.begin()+target_size,source.end());
+        }
+}
+
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+replace(::std::vector<TChar, TAlloc> & target,
+        typename Position< ::std::vector<TChar, TAlloc> >::Type pos_begin,
+        typename Position< ::std::vector<TChar, TAlloc> >::Type pos_end,
+        TSource const & source,
+        typename Size< ::std::vector<TChar, TAlloc> >::Type limit,
+        Generous)
+{
+    SEQAN_CHECKPOINT;
+    if (pos_begin >= limit)
+    {
+        target.resize(limit);
+    }
+    else
+    {
+        typename Size<TSource const>::Type source_length = length(source);
+        typename Size< ::std::vector<TChar, TAlloc> >::Type pos_mid = pos_begin + source_length;
+        typename Size< ::std::vector<TChar, TAlloc> >::Type pos_limit(limit);
+        if (pos_mid > limit)
+        {
+            target.resize(limit);
+            replace(target,pos_begin,pos_limit,source);
+            target.resize(limit);
+        }
+        else
+        {
+            replace(target,pos_begin,pos_end,source);
+            if (target.size() > limit)
+            {
+                target.resize(limit);
+            }
+        }
+    }
+
+}
+
+template <typename TChar,  typename TAlloc, typename TSource>
+inline void
+replace(::std::vector<TChar,  TAlloc> & target,
+        typename Position< ::std::vector<TChar, TAlloc> >::Type pos_begin,
+        typename Position< ::std::vector<TChar, TAlloc> >::Type pos_end,
+        TSource const & source,
+        Limit)
+{
+    SEQAN_CHECKPOINT;
+    replace(target, pos_begin, pos_end, source, target.capacity(), Generous());
+}
+
+template <typename TChar, typename TAlloc, typename TSource>
+inline void
+replace(::std::vector<TChar, TAlloc> & target,
+        typename Position< ::std::vector<TChar,  TAlloc> >::Type pos_begin,
+        typename Position< ::std::vector<TChar,  TAlloc> >::Type pos_end,
+        TSource const & source,
+        typename Size< ::std::vector<TChar, TAlloc> >::Type limit,
+        Limit)
+{
+    SEQAN_CHECKPOINT;
+    if (limit > target.capacity())
+    {
+        limit = target.capacity();
+    }
+    replace(target, pos_begin, pos_end, source, limit, Generous());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// handling of iterators as begin and end
+
+template<typename TChar, typename TCharTraits, typename TAlloc, typename TSource, typename TExpand>
+inline void
+replace(::std::vector<TChar, TAlloc> & target,
+        typename Iterator< ::std::vector<TChar, TAlloc>, Rooted>::Type pos_begin,
+        typename Iterator< ::std::vector<TChar, TAlloc>, Rooted>::Type pos_end,
+        TSource & source,
+        Tag<TExpand> const tag)
+{
+    replace(target, position(pos_begin), position(pos_end), source, tag);
+}
+
+/*
+template<typename TChar, typename TAlloc, typename TSource, typename TExpand>
+inline void
+replace(::std::vector<TChar, TAlloc> & target,
+        typename Iterator< ::std::vector<TChar, TAlloc>, Rooted>::Type pos_begin,
+        typename Iterator< ::std::vector<TChar, TAlloc>, Rooted>::Type pos_end,
+        TSource & source,
+        typename Size< ::std::vector<TChar, TAlloc> >::Type limit,
+        Tag<TExpand> const tag)
+{
+    replace(target,  position(pos_begin),  position(pos_end), source, tag);
+}
+*/
+
+
+///.Function.reserve.param.object.type:Adaption.std::vector
+///.Function.reserve.remarks:For @Adaption.std::vector|STL Adaptions@, $reserve$ is only guaranteed to have the specified behaviour with $Insist$ and $Generous$.
+template <typename TChar,  typename TAlloc, typename TSize, typename TExpand>
+inline typename Size< ::std::vector<TChar, TAlloc> >::Type
+reserve(
+    ::std::vector<TChar, TAlloc> & seq,
+    TSize new_capacity,
+    Tag<TExpand> const & tag)
+{
+    SEQAN_CHECKPOINT;
+    seq.reserve(new_capacity);
+    return _capacityReturned(seq, new_capacity, tag);
+}
+
+template <typename TChar, typename TAlloc, typename TSize>
+inline typename Size< ::std::vector<TChar, TAlloc> >::Type
+reserve(
+    ::std::vector<TChar, TAlloc> & seq,
+    TSize new_capacity,
+    Insist const &)
+{
+    SEQAN_CHECKPOINT;
+    // do nothing
+    return _capacityReturned(seq, new_capacity, Insist());
+}
+
+template <typename TChar,  typename TAlloc, typename TSize>
+inline typename Size< ::std::vector<TChar, TAlloc> >::Type
+reserve(
+    ::std::vector<TChar,  TAlloc> & seq,
+    TSize new_capacity,
+    Limit const &)
+{
+    SEQAN_CHECKPOINT;
+    // do nothing
+    return _capacityReturned(seq, new_capacity, Limit());
+}
+
+///.Function.resize.param.object.type:Adaption.std::vector
+template <typename TChar,  typename TAlloc, typename TSize, typename TExpand>
+inline typename Size< ::std::vector<TChar,  TAlloc> >::Type
+resize(
+    ::std::vector<TChar, TAlloc> & me,
+    TSize new_length,
+    Tag<TExpand> const &)
+{
+    SEQAN_CHECKPOINT;
+    me.resize(new_length);
+    return me.size();
+}
+
+template <typename TChar, typename TAlloc, typename TSize, typename TExpand>
+inline typename Size< ::std::vector<TChar,  TAlloc> >::Type
+fill(
+    ::std::vector<TChar, TAlloc> & me,
+    TSize new_length,
+    TChar const & val,
+    Tag<TExpand> const &)
+{
+    SEQAN_CHECKPOINT;
+    me.resize(new_length, val);
+    return me.length();
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_ADAPT_STD_VECTOR_H_
diff --git a/src/SeqAn-1.3/seqan/sequence/iter_concat_virtual.h b/src/SeqAn-1.3/seqan/sequence/iter_concat_virtual.h
new file mode 100644
index 0000000..c62eda1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/iter_concat_virtual.h
@@ -0,0 +1,516 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// Implementation of the specialization ConcatVirtual of class Iter that
+// allows the iteration of arbitrary StringSet objects as if they were
+// the concatenation of all strings.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_ITER_CONCAT_VIRTUAL_H_
+#define SEQAN_SEQUENCE_ITER_CONCAT_VIRTUAL_H_
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// The Metafunction Concatenator is actually defined in string_set_base.h.
+template <typename T>
+struct Concatenator;
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+template <typename TDelimiter = void >
+struct ConcatVirtual;
+
+// TODO(holtgrew): Ask David about objNo and offset.
+/**
+.Spec.ConcatVirtual Iterator
+..cat:Sequences
+..general:Class.Iter
+..summary:Iterator that sequentially iterates through the elements of a @Class.StringSet@ as if they were directly concatenated, cmp. @Spec.ConcatDirect at .
+..signature:Iter<TStringSet, ConcatVirtual<TSpec> >
+..param.TStringSet:Type of the @Class.StringSet at .
+..param.TSpec:The delimiter to use.
+..include:seqan/sequence.h
+
+.Memfunc.ConcatVirtual Iterator#Iter:
+..class:Spec.ConcatVirtual Iterator
+..summary:Constructor
+..signature:Iter(host)
+..signature:Iter(host, objNo, offset)
+..param.host:Container to iterate.
+..param.objNo:Sequence number to set the iterator to.
+..param.offset:Offset in the object (specified by objNo) to point to.
+..remarks:If $objNo$ and $offset$ are not given, the iterator will point to the first element with offset 0.
+ */
+template <typename TStringSet, typename TSpec >
+class Iter<TStringSet, ConcatVirtual<TSpec> >
+{
+public:
+    typedef typename Value<TStringSet>::Type    TString;
+    typedef typename Value<TString>::Type       TValue;
+    typedef typename Size<TString>::Type        TSize;
+
+    // TODO(holtgrew): obj_iterator and const_obj_iterator do not appear to be in any C++/STL standard and do not conform to SeqAn's naming scheme.
+    typedef typename Iterator<TString, Standard>::Type            obj_iterator;
+    typedef typename Iterator<TString const, Standard>::Type      const_obj_iterator;
+
+    // ----------------------------------------------------------------------
+    // STL compatible public iterator interface
+    typedef Iter                                iterator;
+    typedef ::std::bidirectional_iterator_tag   iterator_category;
+    typedef TValue                              value_type;
+    typedef TValue &                            reference;
+    typedef TValue const &                      const_reference;
+    typedef TValue *                            pointer;
+    typedef TSize                               size_type;
+    typedef typename Difference<TString>::Type  difference_type;
+    // ----------------------------------------------------------------------
+
+    TStringSet *    host;
+    unsigned        objNo;
+    obj_iterator    _begin, _cur, _end;
+
+    inline Iter() {}
+
+    inline Iter(TStringSet &_host)
+        : host(&_host)
+    {
+        objNo = 0;
+        _begin = _cur = begin(_host[objNo]);
+        _end = end(_host[objNo]);
+        _testEnd();
+    }
+
+    inline Iter(TStringSet &_host, unsigned _objNo, difference_type _offset)
+        : host(&_host)
+    {
+        if (_objNo <length(_host)) {
+            objNo = _objNo;
+            _begin = _cur = begin(_host[objNo]);
+            _end = end(_host[objNo]);
+            goFurther(_cur, _offset);
+            _testEnd();
+        } else {
+            objNo = length(_host) - 1;
+            _begin = _cur = _end = end(_host[objNo]);
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Conversion operators; have to be defined in class def.
+    // ----------------------------------------------------------------------
+
+    inline operator obj_iterator()
+    {
+        return _cur;
+    }
+
+    inline operator void * ()
+    {
+        return _cur;
+    }
+
+    // ----------------------------------------------------------------------
+    // Shared methods for methods that *have* to be defined in the class def.
+    // ----------------------------------------------------------------------
+
+    // _testEnd() is used in the constructors only, so having it here as a
+    // non-public function is allowed.
+    inline void _testEnd()
+    {
+        while (_cur == _end && objNo < (length(*host) - 1)) {
+            ++objNo;
+            _begin = _cur = begin((*host)[objNo]);
+            _end = end((*host)[objNo]);
+        };
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Metafunction Value
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec>
+struct Value<Iter<TStringSet, ConcatVirtual<TSpec> > >
+    : Value<typename Value<TStringSet>::Type> {};
+
+template <typename TStringSet, typename TSpec>
+struct Value<Iter<TStringSet, ConcatVirtual<TSpec> > const>
+    : Value<typename Value<TStringSet>::Type> {};
+
+// --------------------------------------------------------------------------
+// Metafunction GetValue
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec>
+struct GetValue<Iter<TStringSet, ConcatVirtual<TSpec> > >
+    : GetValue<typename Value<TStringSet>::Type> {};
+
+template <typename TStringSet, typename TSpec>
+struct GetValue<Iter<TStringSet, ConcatVirtual<TSpec> > const>
+    : GetValue<typename Value<TStringSet>::Type> {};
+
+// --------------------------------------------------------------------------
+// Metafunction Size
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec>
+struct Size<Iter<TStringSet, ConcatVirtual<TSpec> > >
+    : Size<typename Value<TStringSet>::Type> {};
+// Default implementation Size<T const> redirects to non-const variant.
+
+// --------------------------------------------------------------------------
+// Metafunction Reference
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec>
+struct Reference<Iter<TStringSet, ConcatVirtual<TSpec> > >
+    : Reference<typename Value<TStringSet>::Type> {};
+
+template <typename TStringSet, typename TSpec>
+struct Reference<Iter<TStringSet, ConcatVirtual<TSpec> > const >
+    : Reference<typename Value<TStringSet>::Type> {};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Functions value(), operator*()
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec>
+inline typename Reference<Iter<TStringSet, ConcatVirtual<TSpec> > const>::Type
+value(Iter<TStringSet, ConcatVirtual<TSpec> > const & me)
+{
+    return *me._cur;
+}
+
+template <typename TStringSet, typename TSpec>
+inline typename Reference<Iter<TStringSet, ConcatVirtual<TSpec> > >::Type
+value(Iter<TStringSet, ConcatVirtual<TSpec> > & me)
+{
+    return *me._cur;
+}
+
+template <typename TStringSet, typename TSpec>
+inline typename Reference<Iter<TStringSet, ConcatVirtual<TSpec> > const>::Type
+operator*(Iter<TStringSet, ConcatVirtual<TSpec> > const & me)
+{
+    return *me._cur;
+}
+
+template <typename TStringSet, typename TSpec>
+inline typename Reference<Iter<TStringSet, ConcatVirtual<TSpec> > >::Type
+operator*(Iter<TStringSet, ConcatVirtual<TSpec> > & me)
+{
+    return *me._cur;
+}
+
+// --------------------------------------------------------------------------
+// Functions goNext(), operator++()
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec>
+inline void
+goNext(Iter<TStringSet, ConcatVirtual<TSpec> > & me)
+{
+    ++me._cur;
+    me._testEnd();
+}
+
+template <typename TStringSet, typename TSpec>
+inline Iter<TStringSet, ConcatVirtual<TSpec> > const &
+operator++(Iter<TStringSet, ConcatVirtual<TSpec> > & me)
+{
+    goNext(me);
+    return me;
+}
+
+template <typename TStringSet, typename TSpec>
+inline Iter<TStringSet, ConcatVirtual<TSpec> > const &
+operator++(Iter<TStringSet, ConcatVirtual<TSpec> > & me, int)
+{
+    Iter<TStringSet, ConcatVirtual<TSpec> > before = me;
+    goNext(me);
+    return before;
+}
+
+// --------------------------------------------------------------------------
+// Functions goPrevious(), operator++()
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec>
+inline void
+goPrevious(Iter<TStringSet, ConcatVirtual<TSpec> > & me)
+{
+    while (me._cur == me._begin && me.objNo > 0) {
+        --me.objNo;
+        me._begin = begin((*me.host)[me.objNo]);
+        me._end = me._cur = end((*me.host)[me.objNo]);
+    }
+    --me._cur;
+}
+
+template <typename TStringSet, typename TSpec>
+inline Iter<TStringSet, ConcatVirtual<TSpec> > const &
+operator--(Iter<TStringSet, ConcatVirtual<TSpec> > & me)
+{
+    goPrevious(me);
+    return me;
+}
+
+template <typename TStringSet, typename TSpec>
+inline Iter<TStringSet, ConcatVirtual<TSpec> > const &
+operator--(Iter<TStringSet, ConcatVirtual<TSpec> > & me, int)
+{
+    Iter<TStringSet, ConcatVirtual<TSpec> > before = me;
+    goPrevious(me);
+    return before;
+}
+
+// --------------------------------------------------------------------------
+// Helper function _tell()
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec>
+inline typename Size<typename Value<TStringSet>::Type >::Type
+_tell(Iter<TStringSet, ConcatVirtual<TSpec> > const & me)
+{
+    typedef typename Size<typename Value<TStringSet>::Type >::Type TSize;
+    typedef Pair<unsigned, TSize> TPair;
+    return posGlobalize(TPair(me.objNo, difference(me._begin, me._cur)), stringSetLimits(*me.host));
+}
+
+// --------------------------------------------------------------------------
+// Function operator+()
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec, typename TDelta>
+inline Iter<TStringSet, ConcatVirtual<TSpec> >
+operator+(Iter<TStringSet, ConcatVirtual<TSpec> > const & me, TDelta delta)
+{
+    Pair<unsigned, typename Size<typename Value<TStringSet>::Type>::Type> pos;
+    posLocalize(pos, _tell(me) + delta, stringSetLimits(*me.host));
+    return Iter<TStringSet, ConcatVirtual<TSpec> > (*me.host, getValueI1(pos), getValueI2(pos));
+}
+
+template <typename TStringSet, typename TSpec, typename T1, typename T2, typename TCompression>
+inline Iter<TStringSet, ConcatVirtual<TSpec> >
+operator+(Iter<TStringSet, ConcatVirtual<TSpec> > const & me, Pair<T1, T2, TCompression> delta)
+{
+    Pair<unsigned, typename Size<typename Value<TStringSet>::Type>::Type> pos;
+    posLocalize(pos, _tell(me) + delta, stringSetLimits(*me.host));
+    return Iter<TStringSet, ConcatVirtual<TSpec> > (*me.host, getValueI1(pos), getValueI2(pos));
+}
+
+// --------------------------------------------------------------------------
+// Function operator-()
+// --------------------------------------------------------------------------
+
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR>
+typename Difference<Iter<TSSetL, ConcatVirtual<TSpecL> > >::Type
+operator-(
+    Iter<TSSetL, ConcatVirtual<TSpecL> > const & L,
+    Iter<TSSetR, ConcatVirtual<TSpecR> > const & R)
+{
+    return _tell(L) - _tell(R);
+}
+
+template <typename TStringSet, typename TSpec, typename TDelta>
+inline Iter<TStringSet, ConcatVirtual<TSpec> >
+operator-(Iter<TStringSet, ConcatVirtual<TSpec> > const & me, TDelta delta)
+{
+    Pair<unsigned, typename Size<typename Value<TStringSet>::Type>::Type> pos;
+    posLocalize(pos, _tell(me) - delta, stringSetLimits(*me.host));
+    return Iter<TStringSet, ConcatVirtual<TSpec> > (*me.host, getValueI1(pos), getValueI2(pos));
+}
+
+// --------------------------------------------------------------------------
+// Function operator==()
+// --------------------------------------------------------------------------
+
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR>
+inline bool
+operator==(
+    Iter<TSSetL, ConcatVirtual<TSpecL> > const & L,
+    Iter<TSSetR, ConcatVirtual<TSpecR> > const & R)
+{
+    SEQAN_ASSERT(L.host == R.host);
+    return L.objNo == R.objNo && L._cur == R._cur;
+}
+
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR>
+inline bool
+operator!=(
+    Iter<TSSetL, ConcatVirtual<TSpecL> > const & L,
+    Iter<TSSetR, ConcatVirtual<TSpecR> > const & R)
+{
+    SEQAN_ASSERT(L.host == R.host);
+    return L.objNo != R.objNo || L._cur != R._cur;
+}
+
+// --------------------------------------------------------------------------
+// Function operator<()
+// --------------------------------------------------------------------------
+
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR>
+inline bool
+operator<(
+    Iter<TSSetL, ConcatVirtual<TSpecL> > const & L,
+    Iter<TSSetR, ConcatVirtual<TSpecR> > const & R)
+{
+    SEQAN_ASSERT(L.host == R.host);
+    return L.objNo < R.objNo || (L.objNo == R.objNo && L._cur < R._cur);
+}
+
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR>
+inline bool
+operator > (
+    Iter<TSSetL, ConcatVirtual<TSpecL> > const & L,
+    Iter<TSSetR, ConcatVirtual<TSpecR> > const & R)
+{
+    SEQAN_ASSERT(L.host == R.host);
+    return L.objNo > R.objNo || (L.objNo == R.objNo && L._cur > R._cur);
+}
+
+// --------------------------------------------------------------------------
+// Function container()
+// --------------------------------------------------------------------------
+
+template <typename TSSet, typename TSpec>
+inline typename Concatenator<TSSet>::Type
+container(Iter<TSSet, ConcatVirtual<TSpec> > & me)
+{
+    return concat(*me.host);
+}
+
+template <typename TSSet, typename TSpec>
+inline typename Concatenator<TSSet>::Type
+container(Iter<TSSet, ConcatVirtual<TSpec> > const & me)
+{
+    return concat(*me.host);
+}
+
+// --------------------------------------------------------------------------
+// Function atBegin()
+// --------------------------------------------------------------------------
+
+template <typename TSSet, typename TSpec>
+inline bool
+atBegin(Iter<TSSet, ConcatVirtual<TSpec> > & me)
+{
+    return me._cur == me._begin && me.objNo == 0;
+}
+
+template <typename TSSet, typename TSpec>
+inline bool
+atBegin(Iter<TSSet, ConcatVirtual<TSpec> > const & me)
+{
+    return me._cur == me._begin && me.objNo == 0;
+}
+
+// --------------------------------------------------------------------------
+// Function atEnd()
+// --------------------------------------------------------------------------
+
+template <typename TSSet, typename TSpec>
+inline bool
+atEnd(Iter<TSSet, ConcatVirtual<TSpec> > & me)
+{
+    return me._cur == me._end && me.objNo == (length(*me.host) - 1);
+}
+
+template <typename TSSet, typename TSpec>
+inline bool
+atEnd(Iter<TSSet, ConcatVirtual<TSpec> > const & me)
+{
+    return me._cur == me._end && me.objNo == (length(*me.host) - 1);
+}
+
+// --------------------------------------------------------------------------
+// Function atEndOfSequence()
+// --------------------------------------------------------------------------
+
+// TODO(holtgrew): Document Function.atEndOfSequence
+// TODO(holtgrew): Specifying a catch-all implementation appears a bit too generous, what about concept checking?
+
+/**
+.Function.atEndOfSequence
+..summary:Returns true if the iterator is at the end of a sequence.
+..cat:sequences
+..signature:atEndOfSequence(iter)
+..param.iter:Iterator to test.
+...type:Class.Iter
+..returns:$true$ if the iterator is at the end of a sequence.
+...type:nolink:$bool$
+..include:seqan/sequence.h
+ */
+template <typename TIterator>
+inline bool
+atEndOfSequence(TIterator const & me)
+{
+    return atEnd(me);
+}
+
+template <typename TSSet, typename TSpec>
+inline bool
+atEndOfSequence(Iter<TSSet, ConcatVirtual<TSpec> > const & me)
+{
+    if (me._cur == me._begin && me.objNo > 0)
+        return true;
+    if (me._cur == me._end)
+        return true;
+    return false;
+}
+
+template <typename TIterator>
+inline bool
+atEndOfSequence(TIterator & me)
+{
+    return atEndOfSequence(reinterpret_cast<TIterator const &>(me));
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_ITER_CONCAT_VIRTUAL_H_
diff --git a/src/SeqAn-1.3/seqan/sequence/segment_base.h b/src/SeqAn-1.3/seqan/sequence/segment_base.h
new file mode 100644
index 0000000..b65779e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/segment_base.h
@@ -0,0 +1,1358 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Declarations related to and implementation of the Segment class.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEGMENT_BASE_H
+#define SEQAN_HEADER_SEGMENT_BASE_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Segment
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.Segment:
+..cat:Sequences
+..summary:A contiguous part of a sequence.
+..signature:Segment<THost, TSpec>
+..param.THost:Type of the whole sequence.
+...metafunction:Metafunction.Host
+...text:Instances of $Segment<THost, TSpec>$ are subsequences of $THost$ objects.
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:@Spec.InfixSegment at .
+*/
+
+struct InfixSegment {};
+
+template <typename THost, typename TSpec = InfixSegment>
+class Segment
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Host.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct Host<Segment<THost, TSpec> >
+{
+    typedef THost Type;
+};
+
+template <typename THost, typename TSpec>
+struct Host<Segment<THost, TSpec> const >
+{
+    typedef THost Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct Spec<Segment<THost, TSpec> >
+{
+    typedef TSpec Type;
+};
+template <typename THost, typename TSpec>
+struct Spec<Segment<THost, TSpec> const>
+{
+    typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Value.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct Value<Segment<THost, TSpec> >
+{
+    typedef typename Value<THost>::Type Type;
+};
+
+template <typename THost, typename TSpec>
+struct Value<Segment<THost, TSpec> const >
+{
+    typedef typename Value<THost const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.GetValue.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct GetValue<Segment<THost, TSpec> >
+{
+    typedef typename GetValue<THost>::Type Type;
+};
+
+template <typename THost, typename TSpec>
+struct GetValue<Segment<THost, TSpec> const >
+{
+    typedef typename GetValue<THost const>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Iterator.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct Iterator<Segment<THost, TSpec>, Rooted>
+{
+    typedef Segment<THost, TSpec> TSequence_;
+    typedef typename Iterator<THost, Standard>::Type TIterator_;
+    typedef Iter<TSequence_, AdaptorIterator<TIterator_> > Type;
+};
+template <typename THost, typename TSpec>
+struct Iterator<Segment<THost, TSpec> const, Rooted>
+{
+    typedef Segment<THost, TSpec> const TSequence_;
+    typedef typename Iterator<THost const, Standard>::Type TIterator_;
+    typedef Iter<TSequence_, AdaptorIterator<TIterator_> > Type;
+};
+
+template <typename THost, typename TSpec>
+struct Iterator<Segment<THost, TSpec>, Standard>:
+    Iterator<THost, Standard>
+{
+};
+template <typename THost, typename TSpec>
+struct Iterator<Segment<THost, TSpec> const, Standard>:
+    Iterator<THost, Standard>
+{
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Size.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct Size<Segment<THost, TSpec> >
+{
+    typedef typename Size<THost>::Type Type;
+};
+
+template <typename THost, typename TSpec>
+struct Size<Segment<THost, TSpec> const >
+{
+    typedef typename Size<THost>::Type Type;
+};
+
+template <typename THost, typename TSpec>
+struct Position<Segment<THost, TSpec> >
+{
+    typedef typename Position<THost>::Type Type;
+};
+
+template <typename THost, typename TSpec>
+struct Position<Segment<THost, TSpec> const >
+{
+    typedef typename Position<THost>::Type Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.DefaultOverflowImplicit.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct DefaultOverflowImplicit<Segment<THost, TSpec > >:
+    DefaultOverflowImplicit<THost>
+{
+};
+
+template <typename THost, typename TSpec>
+struct DefaultOverflowImplicit<Segment<THost, TSpec > const >:
+    DefaultOverflowImplicit<THost>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.DefaultOverflowExplicit.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct DefaultOverflowExplicit<Segment<THost, TSpec > >:
+    DefaultOverflowExplicit<THost>
+{
+};
+
+template <typename THost, typename TSpec>
+struct DefaultOverflowExplicit<Segment<THost, TSpec > const >:
+    DefaultOverflowExplicit<THost>
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.IsContiguous.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct IsContiguous< Segment<THost, TSpec> >:
+    public IsContiguous<THost> {};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.IsSequence.param.T.type:Class.Segment
+
+template <typename THost, typename TSpec>
+struct IsSequence< Segment<THost, TSpec> > {
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.atBegin.param.iterator.type:Class.Segment
+///.Function.atEnd.param.iterator.type:Class.Segment
+///.Function.goBegin.param.iterator.type:Class.Segment
+///.Function.goEnd.param.iterator.type:Class.Segment
+///.Function.goNext.param.iterator.type:Class.Segment
+///.Function.goPrevious.param.iterator.type:Class.Segment
+///.Function.value.param.container.type:Class.Segment
+
+///.Function.shareResources.param.sequence1, sequence2.type:Class.Segment
+
+//////////////////////////////////////////////////////////////////////////////
+// functions for all Segment classes
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.id.param.object.type:Class.Segment
+
+template <typename THost, typename TSpec>
+inline void const *
+id(Segment<THost, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+    return id(host(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.length.param.object.type:Class.Segment
+
+template <typename THost, typename TSpec>
+inline typename Size<Segment<THost, TSpec> const>::Type
+length(Segment<THost, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+    return endPosition(me) - beginPosition(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.capacity.param.object.type:Class.Segment
+
+template <typename THost, typename TSpec>
+inline typename Size< Segment<THost, TSpec> const>::Type
+capacity(Segment<THost, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+    return capacity(host(me)) + length(me) - length(host(me));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec>
+inline bool
+hasNoHost(Segment<THost, TSpec> const & target)
+{
+    return !_toPointer(host(target));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+// operationToSet testet, ob statt einer assign/append-Funktion
+// eine set Funktion aufgerufen werden soll. Das ist nur dann der Fall,
+// wenn target keinen Host hat und source einen kompatiblen Host
+// anbietet.
+// returns true:  set Funktion verwendet,
+//                wurde bereits von test_operation_2_set gemacht
+// returns false: keine set Funktion verwenden
+//                muss noch assign/append gemacht werden.
+
+template <typename TSameSpec, typename TTargetInfix>
+struct SegmentSetImpl_
+{
+    template <typename TTarget, typename TSource>
+    static inline bool operationToSet(TTarget &, TSource &)
+    {
+        return false;
+    }
+};
+
+template <typename TTargetInfix>
+struct SegmentSetImpl_<True, TTargetInfix>
+{
+    template <typename TTarget, typename TSource>
+    static inline bool operationToSet(TTarget & target, TSource & source)
+    {
+        set(target, source);
+        return true;
+    }
+};
+
+template <>
+struct SegmentSetImpl_<False, True>
+{
+    template <typename TTarget, typename TSource>
+    static inline bool operationToSet(TTarget & target, TSource & source)
+    {
+        set(target, host(source), beginPosition(source), endPosition(source));
+        return true;
+    }
+};
+
+template <typename THost, typename TSpec, typename TSource>
+inline bool
+operationToSet(Segment<THost, TSpec> &,
+                TSource &)
+{
+    return false;
+}
+template <typename THost, typename TSpec, typename TSpec2>
+inline bool
+operationToSet(Segment<THost, TSpec> & target,
+                Segment<THost, TSpec2> & source)
+{
+    if (hasNoHost(target))
+        return SegmentSetImpl_<
+            typename IsSameType<TSpec, TSpec2>::Type,
+            typename IsSameType<TSpec, InfixSegment>::Type
+        >::operationToSet(target, source);
+    return false;
+}
+template <typename THost, typename TSpec, typename TSpec2>
+inline bool
+operationToSet(Segment<THost const, TSpec> & target,
+                Segment<THost, TSpec2> & source)
+{
+    if (hasNoHost(target))
+        return SegmentSetImpl_<
+            typename IsSameType<TSpec, TSpec2>::Type,
+            typename IsSameType<TSpec, InfixSegment>::Type
+        >::operationToSet(target, source);
+    return false;
+}
+template <typename THost, typename TSpec, typename TSpec2>
+inline bool
+operationToSet(Segment<THost const, TSpec> & target,
+                Segment<THost, TSpec2> const & source)
+{
+    if (hasNoHost(target))
+        return SegmentSetImpl_<
+            typename IsSameType<TSpec, TSpec2>::Type,
+            typename IsSameType<TSpec, InfixSegment>::Type
+        >::operationToSet(target, source);
+    return false;
+}
+template <typename THost, typename TSpec, typename TSpec2>
+inline bool
+operationToSet(Segment<THost, TSpec> & target,
+                Segment<THost, TSpec2> const & source)
+{
+    if (hasNoHost(target))
+        return SegmentSetImpl_<
+            typename IsSameType<TSpec, TSpec2>::Type,
+            typename IsSameType<TSpec, InfixSegment>::Type
+        >::operationToSet(target, source);
+    return false;
+}
+template <typename THost, typename TSpec>
+inline bool
+operationToSet(Segment<THost, TSpec> & target,
+                THost & source)
+{
+    if (hasNoHost(target))
+    {
+        set(target, source);
+        return true;
+    }
+    return false;
+}
+
+
+template <typename THost, typename TSpec, typename TSource, typename TSize>
+inline bool
+operationToSet(Segment<THost, TSpec> & /*target*/,
+                TSource & /*source*/,
+                TSize)
+{
+    return false;
+}
+template <typename THost, typename TSpec, typename TSpec2, typename TSize>
+inline bool
+operationToSet(Segment<THost, TSpec> & target,
+                Segment<THost, TSpec2> & source,
+                TSize limit)
+{
+    if (hasNoHost(target))
+    {
+        TSize beginpos = beginPosition(source);
+        TSize endpos = endPosition(source);
+        if (endpos - beginpos > limit)
+        {
+            endpos = beginpos + limit;
+        }
+        set(target, host(source), beginpos, endpos);
+        return true;
+    }
+    return false;
+}
+template <typename THost, typename TSpec, typename TSize>
+inline bool
+operationToSet(Segment<THost, TSpec> & target,
+                THost & source,
+                TSize limit)
+{
+    if (hasNoHost(target))
+    {
+        TSize size = length(source);
+        if (size > limit)
+        {
+            size = limit;
+        }
+        set(target, source, 0, size);
+        return true;
+    }
+    return false;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// assign
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.assign:
+..remarks:If $target$ is a @Class.Segment@ object, then
+$limit$ denotes the maximal length of @Function.host.$host(target)$@ after the operation.
+..param.target.type:Class.Segment
+..param.source.type:Class.Segment
+*/
+
+//overload of binary version for strings:
+
+template<typename THost, typename TSpec, typename TSource>
+inline void
+assign(Segment<THost, TSpec> & target,
+      TSource & source)
+{
+SEQAN_CHECKPOINT
+    typedef Segment<THost, TSpec> TTarget;
+    assign(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+template<typename THost, typename TSpec, typename TSource>
+inline void
+assign(Segment<THost, TSpec> & target,
+      TSource const & source)
+{
+SEQAN_CHECKPOINT
+    typedef Segment<THost, TSpec> TTarget;
+    assign(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+//(for temporary targets)
+
+template<typename THost, typename TSpec, typename TSource>
+inline void
+assign(Segment<THost, TSpec> const & target,
+      TSource & source)
+{
+SEQAN_CHECKPOINT
+    typedef Segment<THost, TSpec> const TTarget;
+    assign(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+template<typename THost, typename TSpec, typename TSource>
+inline void
+assign(Segment<THost, TSpec> const & target,
+      TSource const & source)
+{
+SEQAN_CHECKPOINT
+    typedef Segment<THost, TSpec> const TTarget;
+    assign(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TExpand>
+struct AssignSegment_
+{
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    assign_(
+        Segment<THost const, TSpec> & target,
+        TSource & source)
+    {
+SEQAN_CHECKPOINT
+        set(target, source);
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    assign_(
+        Segment<THost const, TSpec> & target,
+        TSource & source,
+        typename Size< Segment<THost const, TSpec> >::Type /*limit*/)
+    {
+SEQAN_CHECKPOINT
+        set(target, source);
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    assign_(
+        Segment<THost, TSpec> & target,
+        TSource & source)
+    {
+SEQAN_CHECKPOINT
+        if ((void *) &target == (void *) &source) return;
+
+        if (!operationToSet(target, source))
+        {
+            typedef Segment<THost, TSpec> Target;
+
+            replace(host(target), beginPosition(target), endPosition(target), source, TExpand());
+
+            typename Iterator<Target, Standard>::Type new_end = begin(target, Standard()) + length(source);
+            typename Iterator<THost, Standard>::Type host_end = end(host(target), Standard());
+            if (new_end > host_end) new_end = host_end;
+            setEnd(target, new_end);
+        }
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    assign_(
+        Segment<THost, TSpec> & target,
+        TSource & source,
+        typename Size< Segment<THost, TSpec> >::Type limit)
+    {
+SEQAN_CHECKPOINT
+        if ((void *) &target == (void *) &source) return;
+
+        if (!operationToSet(target, source))
+        {
+            typedef Segment<THost, TSpec> Target;
+
+            replace(host(target), beginPosition(target), endPosition(target), source, limit, TExpand());
+
+            typename Iterator<Target, Standard>::Type new_end = begin(target, Standard()) + length(source);
+            typename Iterator<THost, Standard>::Type host_end = end(host(target), Standard());
+            if (begin(target, Standard()) > host_end) setBegin(target, host_end);
+            if (new_end > host_end) new_end = host_end;
+            setEnd(target, new_end);
+        }
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    assign_(
+        Segment<THost, TSpec> const & target,
+        TSource & source)
+    {
+SEQAN_CHECKPOINT
+        SEQAN_ASSERT(!hasNoHost(target))
+        replace(host(target), beginPosition(target), endPosition(target), source, TExpand());
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    assign_(
+        Segment<THost, TSpec> const & target,
+        TSource & source,
+        typename Size< Segment<THost, TSpec> >::Type limit)
+    {
+SEQAN_CHECKPOINT
+        SEQAN_ASSERT(!hasNoHost(target))
+        replace(host(target), beginPosition(target), endPosition(target), source, limit, TExpand());
+    }
+};
+
+//____________________________________________________________________________
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(Segment<THost, TSpec> & target,
+       TSource & source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignSegment_<Tag<TExpand> const>::assign_(target, source);
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(Segment<THost, TSpec> & target,
+       TSource const & source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignSegment_<Tag<TExpand> const>::assign_(target, source);
+}
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(Segment<THost, TSpec> & target,
+       TSource & source,
+       typename Size< Segment<THost, TSpec> >::Type limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignSegment_<Tag<TExpand> const>::assign_(target, source, limit);
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(Segment<THost, TSpec> & target,
+       TSource const & source,
+       typename Size< Segment<THost, TSpec> >::Type limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignSegment_<Tag<TExpand> const>::assign_(target, source, limit);
+}
+
+//(for temporary targets)
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(Segment<THost, TSpec> const & target,
+       TSource & source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignSegment_<Tag<TExpand> const>::assign_(target, source);
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(Segment<THost, TSpec> const & target,
+       TSource const & source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignSegment_<Tag<TExpand> const>::assign_(target, source);
+}
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(Segment<THost, TSpec> const & target,
+       TSource & source,
+       typename Size< Segment<THost, TSpec> >::Type limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignSegment_<Tag<TExpand> const>::assign_(target, source, limit);
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+assign(Segment<THost, TSpec> const & target,
+       TSource const & source,
+       typename Size< Segment<THost, TSpec> >::Type limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AssignSegment_<Tag<TExpand> const>::assign_(target, source, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// move
+//////////////////////////////////////////////////////////////////////////////
+
+//overload of binary version:
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+move(Segment<THost, TSpec> & target,
+     TSource & source)
+{
+SEQAN_CHECKPOINT
+    typedef Segment<THost, TSpec> TTarget;
+    move(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+move(Segment<THost, TSpec> & target,
+     TSource const & source)
+{
+SEQAN_CHECKPOINT
+    typedef Segment<THost, TSpec> TTarget;
+    move(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+//(for temporary targets)
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+move(Segment<THost, TSpec> const & target,
+     TSource & source)
+{
+SEQAN_CHECKPOINT
+    typedef Segment<THost, TSpec> const TTarget;
+    move(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+move(Segment<THost, TSpec> const & target,
+     TSource const & source)
+{
+SEQAN_CHECKPOINT
+    typedef Segment<THost, TSpec> const TTarget;
+    move(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// append
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.append:
+..remarks:If $target$ is a @Class.Segment@ object, then
+$limit$ denotes the maximal length of @Function.host.$host(target)$@ after the operation.
+..param.target.type:Class.Segment
+..param.source.type:Class.Segment
+*/
+
+
+template <typename TExpand>
+struct AppendSequenceToSegment_
+{
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    append_(
+        Segment<THost, TSpec> & target,
+        TSource & source)
+    {
+SEQAN_CHECKPOINT
+        typedef Segment<THost, TSpec> Target;
+
+        if (!operationToSet(target, source))
+        {
+            replace(host(target), endPosition(target), endPosition(target), source, TExpand());
+
+            typename Iterator<Target, Standard>::Type new_end = end(target, Standard()) + length(source);
+            typename Iterator<THost, Standard>::Type host_end = end(host(target), Standard());
+            if (new_end > host_end) new_end = host_end;
+            setEnd(target, new_end);
+        }
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    append_(
+        Segment<THost, TSpec> & target,
+        TSource const & source,
+        typename Size< Segment<THost, TSpec> >::Type limit)
+    {
+SEQAN_CHECKPOINT
+        typedef Segment<THost, TSpec> Target;
+
+        if (!operationToSet(target, source))
+        {
+            replace(host(target), endPosition(target), endPosition(target), source, limit, TExpand());
+            typename Iterator<Target, Standard>::Type new_end = end(target, Standard()) + length(source);
+            typename Iterator<THost, Standard>::Type host_end = end(host(target), Standard());
+            if (begin(target) > host_end) setBegin(target, host_end);
+            if (new_end > host_end) new_end = host_end;
+            setEnd(target, new_end);
+        }
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    append_(
+        Segment<THost, TSpec> const & target,
+        TSource & source)
+    {
+SEQAN_CHECKPOINT
+        SEQAN_ASSERT(!hasNoHost(target))
+        replace(host(target), endPosition(target), endPosition(target), source, TExpand());
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    append_(
+        Segment<THost, TSpec> const & target,
+        TSource const & source,
+        typename Size< Segment<THost, TSpec> >::Type limit)
+    {
+SEQAN_CHECKPOINT
+        SEQAN_ASSERT(!hasNoHost(target))
+        replace(host(target), endPosition(target), endPosition(target), source, limit, TExpand()); //??? INSERT
+    }
+};
+//____________________________________________________________________________
+
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+append(
+    Segment<THost, TSpec> & target,
+    TSource & source,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendSequenceToSegment_<Tag<TExpand> const>::append_(target, source);
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+append(
+    Segment<THost, TSpec> & target,
+    TSource const & source,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendSequenceToSegment_<Tag<TExpand> const>::append_(target, source);
+}
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+append(
+    Segment<THost, TSpec> & target,
+    TSource & source,
+    typename Size< Segment<THost, TSpec> >::Type limit,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendSequenceToSegment_<Tag<TExpand> const>::append_(target, source, limit);
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+append(
+    Segment<THost, TSpec> & target,
+    TSource const & source,
+    typename Size< Segment<THost, TSpec> >::Type limit,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendSequenceToSegment_<Tag<TExpand> const>::append_(target, source, limit);
+}
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+append(
+    Segment<THost, TSpec> const & target,
+    TSource & source,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendSequenceToSegment_<Tag<TExpand> const>::append_(target, source);
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+append(
+    Segment<THost, TSpec> const & target,
+    TSource const & source,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendSequenceToSegment_<Tag<TExpand> const>::append_(target, source);
+}
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+append(
+    Segment<THost, TSpec> const & target,
+    TSource & source,
+    typename Size< Segment<THost, TSpec> >::Type limit,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendSequenceToSegment_<Tag<TExpand> const>::append_(target, source, limit);
+}
+template <typename THost, typename TSpec, typename TSource, typename TExpand>
+inline void
+append(
+    Segment<THost, TSpec> const & target,
+    TSource const & source,
+    typename Size< Segment<THost, TSpec> >::Type limit,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendSequenceToSegment_<Tag<TExpand> const>::append_(target, source, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// appendValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TExpand>
+struct AppendValueToSegment_
+{
+    template <typename T, typename TValue>
+    static inline void
+    appendValue_(T & me,
+                TValue & /*_value*/)
+    {
+SEQAN_CHECKPOINT
+        insertValue(host(me), endPosition(me), TExpand());
+        if (endPosition(me) < length(host(me)) ) //this could be false for some TExpand
+        {
+            setEndPosition(me, endPosition(me) + 1);
+        }
+    }
+};
+
+//____________________________________________________________________________
+
+template <typename THost, typename TSpec, typename TValue, typename TExpand>
+inline void
+appendValue(Segment<THost, TSpec> & me,
+            TValue const & _value,
+            Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendValueToSegment_<Tag<TExpand> const>::appendValue_(me, _value);
+}
+template <typename THost, typename TSpec, typename TValue, typename TExpand>
+inline void
+appendValue(Segment<THost, TSpec> const & me,
+            TValue const & _value,
+            Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendValueToSegment_<Tag<TExpand> const>::appendValue_(me, _value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// insertValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TExpand>
+struct InsertValueToSegment_
+{
+    template <typename T, typename TPosition, typename TValue>
+    static inline void
+    insertValue_(T & me,
+                TPosition pos,
+                TValue & /*_value*/)
+    {
+SEQAN_CHECKPOINT
+        insertValue(host(me), beginPosition(me) + pos, TExpand());
+        if (endPosition(me) < length(host(me)) ) //this could be false for some TExpand
+        {
+            setEndPosition(me, endPosition(me) + 1);
+        }
+    }
+};
+
+//____________________________________________________________________________
+
+template <typename THost, typename TSpec, typename TPosition, typename TValue, typename TExpand>
+inline void
+insertValue(Segment<THost, TSpec> & me,
+            TPosition pos,
+            TValue const & _value,
+            Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    InsertValueToSegment_<Tag<TExpand> const>::insertValue_(me, pos, _value);
+}
+template <typename THost, typename TSpec, typename TPosition, typename TValue, typename TExpand>
+inline void
+insertValue(Segment<THost, TSpec> const & me,
+            TPosition pos,
+            TValue const & _value,
+            Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    InsertValueToSegment_<Tag<TExpand> const>::insertValue_(me, pos, _value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// replace
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.replace:
+..remarks:If $target$ is a @Class.Segment@ object, then
+$limit$ denotes the maximal length of @Function.host.$host(target)$@ after the operation.
+..param.target.type:Class.Segment
+..param.source.type:Class.Segment
+*/
+
+template <typename TExpand>
+struct ReplaceSequenceToSegment_
+{
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    replace_(
+        Segment<THost, TSpec> & target,
+        typename Position< Segment<THost, TSpec> >::Type pos_begin,
+        typename Position< Segment<THost, TSpec> >::Type pos_end,
+        TSource & source)
+    {
+SEQAN_CHECKPOINT
+        SEQAN_ASSERT(!hasNoHost(target))
+
+        typedef Segment<THost, TSpec> Target;
+
+        replace(host(target), beginPosition(target) + pos_begin, beginPosition(target) + pos_end, source, TExpand());
+
+        typename Iterator<Target, Standard>::Type new_end = begin(target, Standard()) + length(target) - pos_end + pos_begin + length(source);
+        typename Iterator<THost, Standard>::Type host_end = end(host(target), Standard());
+        if (new_end > host_end) new_end = host_end;
+        setEnd(target, new_end);
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    replace_(
+        Segment<THost, TSpec> & target,
+        typename Position< Segment<THost, TSpec> >::Type pos_begin,
+        typename Position< Segment<THost, TSpec> >::Type pos_end,
+        TSource & source,
+        typename Size< Segment<THost, TSpec> >::Type limit)
+    {
+SEQAN_CHECKPOINT
+        SEQAN_ASSERT(!hasNoHost(target))
+
+        typedef Segment<THost, TSpec> Target;
+
+        replace(host(target), beginPosition(target) + pos_begin, beginPosition(target) + pos_end, source, limit, TExpand());
+
+        typename Iterator<Target, Standard>::Type new_end = begin(target, Standard()) + length(target) - pos_end + pos_begin + length(source);
+        typename Iterator<THost, Standard>::Type host_end = end(host(target), Standard());
+        if (begin(target, Standard()) > host_end) setBegin(target, host_end);
+        if (new_end > host_end) new_end = host_end;
+        setEnd(target, new_end);
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    replace_(
+        Segment<THost, TSpec> const & target,
+        typename Position< Segment<THost, TSpec> const>::Type pos_begin,
+        typename Position< Segment<THost, TSpec> const>::Type pos_end,
+        TSource & source)
+    {
+SEQAN_CHECKPOINT
+        SEQAN_ASSERT(!hasNoHost(target))
+
+        replace(host(target), beginPosition(target) + pos_begin, beginPosition(target) + pos_end, source, TExpand());
+    }
+
+    template <typename THost, typename TSpec, typename TSource>
+    static inline void
+    replace_(
+        Segment<THost, TSpec> const & target,
+        typename Position< Segment<THost, TSpec> const>::Type pos_begin,
+        typename Position< Segment<THost, TSpec> const>::Type pos_end,
+        TSource & source,
+        typename Size< Segment<THost, TSpec> >::Type limit)
+    {
+SEQAN_CHECKPOINT
+        SEQAN_ASSERT(!hasNoHost(target))
+
+        replace(host(target), beginPosition(target) + pos_begin, beginPosition(target) + pos_end, source, limit, TExpand()); //??? INSERT
+    }
+};
+//____________________________________________________________________________
+
+
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(
+    Segment<THost, TSpec> & target,
+    TPositionBegin pos_begin,
+    TPositionEnd pos_end,
+    TSource & source,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceSequenceToSegment_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(
+    Segment<THost, TSpec> & target,
+    TPositionBegin pos_begin,
+    TPositionEnd pos_end,
+    TSource const & source,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceSequenceToSegment_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(
+    Segment<THost, TSpec> & target,
+    TPositionBegin pos_begin,
+    TPositionEnd pos_end,
+    TSource & source,
+    typename Size< Segment<THost, TSpec> >::Type limit,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceSequenceToSegment_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(
+    Segment<THost, TSpec> & target,
+    TPositionBegin pos_begin,
+    TPositionEnd pos_end,
+    TSource const & source,
+    typename Size< Segment<THost, TSpec> >::Type limit,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceSequenceToSegment_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(
+    Segment<THost, TSpec> const & target,
+    TPositionBegin pos_begin,
+    TPositionEnd pos_end,
+    TSource & source,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceSequenceToSegment_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(
+    Segment<THost, TSpec> const & target,
+    TPositionBegin pos_begin,
+    TPositionEnd pos_end,
+    TSource const & source,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceSequenceToSegment_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(
+    Segment<THost, TSpec> const & target,
+    TPositionBegin pos_begin,
+    TPositionEnd pos_end,
+    TSource & source,
+    typename Size< Segment<THost, TSpec> >::Type limit,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceSequenceToSegment_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(
+    Segment<THost, TSpec> const & target,
+    TPositionBegin pos_begin,
+    TPositionEnd pos_end,
+    TSource const & source,
+    typename Size< Segment<THost, TSpec> >::Type limit,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    ReplaceSequenceToSegment_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.resize.param.object.type:Class.Segment
+
+template <typename THost, typename TSpec, typename TExpand>
+inline typename Size< Segment<THost, TSpec> >::Type
+resize(
+    Segment<THost, TSpec> & me,
+    typename Size< Segment<THost, TSpec> >::Type new_length,
+    Tag<TExpand> const tag)
+{
+SEQAN_CHECKPOINT
+
+    typename Size<Segment<THost, TSpec> >::Type me_length = length(me);
+    typename Position<THost>::Type me_end_pos = endPosition(me);
+    if (new_length > me_length)
+    {
+        new_length = me_length + resizeSpace(host(me), new_length - me_length, me_end_pos, me_end_pos, tag);
+    }
+    else if (new_length < me_length)
+    {
+        new_length = resizeSpace(host(me), 0, me_end_pos - (me_length - new_length), me_end_pos, tag);
+    }
+    _setLength(me, new_length);
+    return new_length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//??? TODO: fill (kopie von resize anpassen)
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.clear.param.object.type:Class.Segment
+
+template <typename THost, typename TSpec>
+inline void
+clear(Segment<THost, TSpec> & target)
+{
+SEQAN_CHECKPOINT
+    assign(target, "");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight>
+Segment<TLeftValue, TLeftSpec> const &
+operator += (Segment<TLeftValue, TLeftSpec> & left,
+             TRight const & right)
+{
+SEQAN_CHECKPOINT
+    append(left, right);
+    return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight >
+inline bool
+operator == (Segment<TLeftHost, TLeftSpec> const & left,
+            TRight const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<Segment<TLeftHost, TLeftSpec> >::Type _lex(left, right);
+    return isEqual(_lex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight >
+inline bool
+operator != (Segment<TLeftHost, TLeftSpec> const & left,
+            TRight const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<Segment<TLeftHost, TLeftSpec> >::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight>
+inline bool
+operator < (Segment<TLeftHost, TLeftSpec> const & left,
+            TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isLess(left, right, typename DefaultPrefixOrder<Segment<TLeftHost, TLeftSpec> >::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight>
+inline bool
+operator <= (Segment<TLeftHost, TLeftSpec> const & left,
+             TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isLessOrEqual(left, right, typename DefaultPrefixOrder<Segment<TLeftHost, TLeftSpec> >::Type());
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight>
+inline bool
+operator > (Segment<TLeftHost, TLeftSpec> const & left,
+            TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreater(left, right, typename DefaultPrefixOrder<Segment<TLeftHost, TLeftSpec> >::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight>
+inline bool
+operator >= (Segment<TLeftHost, TLeftSpec> const & left,
+        TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreaterOrEqual(left, right, typename DefaultPrefixOrder<Segment<TLeftHost, TLeftSpec> >::Type());
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// stream operators
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename THost, typename TSpec>
+inline TStream &
+operator << (TStream & target,
+             Segment<THost, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+    write(target, source);
+    return target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename THost, typename TSpec>
+inline TStream &
+operator >> (TStream & source,
+             Segment<THost, TSpec> & target)
+{
+SEQAN_CHECKPOINT
+    read(source, target);
+    return source;
+}
+template <typename TStream, typename THost, typename TSpec>
+inline TStream &
+operator >> (TStream & source,
+             Segment<THost, TSpec> const & target)
+{
+SEQAN_CHECKPOINT
+    read(source, target);
+    return source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/segment_infix.h b/src/SeqAn-1.3/seqan/sequence/segment_infix.h
new file mode 100644
index 0000000..c2f2ae9
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/segment_infix.h
@@ -0,0 +1,900 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Implementation of the Infix Segment specialization.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEGMENT_INFIX_H
+#define SEQAN_HEADER_SEGMENT_INFIX_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// InfixSegment
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Spec.InfixSegment:
+..cat:Segments
+..summary:An arbitrary segment.
+..general:Class.Segment
+..signature:Segment<THost, InfixSegment>
+..param.THost:Type of the whole sequence.
+...text:Instances of $Segment<THost, InfixSegment>$ are infixes of $THost$ objects.
+...remarks:Use @Metafunction.Host@ to get the host type for a given class.
+..remarks.note:Since the appropriate segment type depends on the host sequence type,
+    it is recommended to use the metafunction @Metafunction.Infix@ instead of explicitely
+    choose a specialization of @Class.Segment at .
+..see:Metafunction.Infix
+..include:seqan/sequence.h
+*/
+
+template <typename THost_>
+class Segment<THost_, InfixSegment>
+{
+public:
+    typedef typename Host<Segment>::Type THost;
+
+    typename Pointer_<THost>::Type data_host;
+    typename Position<THost>::Type data_begin_position;
+    typename Position<THost>::Type data_end_position;
+
+
+//____________________________________________________________________________
+
+public:
+    // Check member variables with assertions.  This is called in the
+    // constructors.
+    void _checkMemberVariables() const {
+        SEQAN_ASSERT_LEQ(data_begin_position, data_end_position);
+    }
+
+/**
+.Memfunc.InfixSegment#Segment:
+..class:Spec.InfixSegment
+..summary:Constructor
+..signature:Segment<THost, InfixSegment> ()
+..signature:Segment<THost, InfixSegment> (infix)
+..signature:Segment<THost, InfixSegment> (host [, begin, end])
+..param.infix:Other infix object. (copy constructor)
+..param.host:The whole sequence.
+..param.begin:Position/iterator in $host$ of the first item in segment.
+...type:Metafunction.Position.$Position<THost>::Type$
+...type:Metafunction.Iterator.$Iterator<THost>::Type$
+..param.end:Position/iterator behind the end of the segment.
+...type:Metafunction.Position.$Position<THost>::Type$
+...type:Metafunction.Iterator.$Iterator<THost>::Type$
+..remarks:
+...text:A Segment object cannot work without a host. If the object is default constructed,
+the host must be set by @Function.setHost@ before the segment can be used.
+...text:If a segment object is constructed by the copy constructor, the
+members of the new constructed object are set to the same values as the members in the
+source object; the host object is not modified.
+Note that this is a special case, since all other copy operations result in changes
+of the host object.
+...text:$begin$ and $end$ must be valid positions/iterators in $host$.
+...text:The predicate $begin <= end$ must be true.
+*/
+    Segment():
+        data_host(NULL),
+        data_begin_position(0),
+        data_end_position(0)
+    {
+SEQAN_CHECKPOINT
+        _checkMemberVariables();
+    }
+
+    Segment(typename Parameter_<THost>::Type _host):
+        data_host(_toPointer(_host)),
+        data_begin_position(0),
+        data_end_position(length(value(data_host)))
+    {
+SEQAN_CHECKPOINT
+        _checkMemberVariables();
+    }
+
+    Segment(typename Parameter_<THost>::Type _host, typename Position<THost>::Type _begin_index, typename Position<THost>::Type _end_index):
+        data_host(_toPointer(_host)),
+        data_begin_position(_begin_index),
+        data_end_position(_end_index)
+    {
+SEQAN_CHECKPOINT
+        _checkMemberVariables();
+    }
+/*
+    Segment(typename Parameter_<THost>::Type _host, typename Iterator<THost, Rooted>::Type _begin, typename Iterator<THost, Rooted>::Type _end):
+        data_host(_toPointer(_host)),
+        data_begin_position(position(_begin)),
+        data_end_position(position(_end))
+    {
+SEQAN_CHECKPOINT
+    }
+*/
+    Segment(typename Parameter_<THost>::Type _host, typename Iterator<THost, Standard>::Type _begin, typename Iterator<THost, Standard>::Type _end):
+        data_host(_toPointer(_host)),
+        data_begin_position(position(_begin, _host)),
+        data_end_position(position(_end, _host))
+    {
+SEQAN_CHECKPOINT
+        _checkMemberVariables();
+    }
+    template <typename THost2, typename TSpec2>
+    Segment(Segment<THost2, TSpec2> const & _other):
+        data_host(_toPointer(host(_other))),
+        data_begin_position(beginPosition(_other)),
+        data_end_position(endPosition(_other))
+    {
+SEQAN_CHECKPOINT
+        _checkMemberVariables();
+    }
+
+    ~ Segment()
+    {
+SEQAN_CHECKPOINT
+    }
+
+    template <typename TSource>
+    inline Segment &
+    operator = (TSource const & source)
+    {
+        assign(*this, source);
+        return *this;
+    }
+    inline Segment &
+    operator = (Segment const & source)
+    {
+        assign(*this, source);
+        return *this;
+    }
+//____________________________________________________________________________
+
+public:
+
+
+//____________________________________________________________________________
+
+    template <typename TPos>
+    inline typename Reference<Segment>::Type
+    operator [] (TPos pos)
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<Segment const>::Type
+    operator [] (TPos pos) const
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+};
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+
+///Function.host.param.object.type:Class.Segment
+
+template <typename THost_>
+inline typename Parameter_<THost_>::Type
+host(Segment<THost_, InfixSegment> & me)
+{
+SEQAN_CHECKPOINT
+    return _toParameter<THost_>(me.data_host);
+}
+
+template <typename THost_>
+inline typename Parameter_<THost_>::Type
+host(Segment<THost_, InfixSegment> const & me)
+{
+SEQAN_CHECKPOINT
+    return _toParameter<THost_>(me.data_host);
+}
+
+
+//____________________________________________________________________________
+
+///.Function.begin.param.object.type:Class.Segment
+
+template <typename THost_>
+inline typename Iterator<Segment<THost_, InfixSegment>, Standard>::Type
+begin(Segment<THost_, InfixSegment> & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard()) + me.data_begin_position;
+}
+template <typename THost_>
+inline typename Iterator<Segment<THost_, InfixSegment> const, Standard>::Type
+begin(Segment<THost_, InfixSegment> const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard()) + me.data_begin_position;
+}
+
+//____________________________________________________________________________
+
+///.Function.beginPosition.param.object.type:Class.Segment
+
+template <typename THost_>
+inline typename Position<Segment<THost_, InfixSegment> >::Type
+beginPosition(Segment<THost_, InfixSegment> & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_begin_position;
+}
+template <typename THost_>
+inline typename Position<Segment<THost_, InfixSegment> const>::Type
+beginPosition(Segment<THost_, InfixSegment> const & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_begin_position;
+}
+
+//____________________________________________________________________________
+
+/**
+.Function.setBegin:
+..summary:Sets begin of object in host.
+..cat:Dependent Objects
+..signature:setBegin(object, new_begin)
+..param.object:An object.
+...type:Spec.InfixSegment
+...type:Spec.SuffixSegment
+..param.new_begin:iterator to the new first item in $host(object)$ that belongs of $object$.
+...type:Metafunction.Iterator
+..see:Function.begin
+..see:Function.beginPosition
+..include:seqan/sequence.h
+*/
+template <typename THost_, typename TIterator>
+inline void
+setBegin(Segment<THost_, InfixSegment> & me, TIterator new_begin)
+{
+SEQAN_CHECKPOINT
+    me.data_begin_position = new_begin - begin(host(me));//, Standard());
+}
+
+
+//____________________________________________________________________________
+
+/**
+.Function.setBeginPosition:
+..summary:Sets begin position of object in host.
+..cat:Dependent Objects
+..signature:setBeginPosition(object, new_begin)
+..param.object:An object.
+...type:Spec.InfixSegment
+...type:Spec.SuffixSegment
+..param.new_begin:position of the new first item in $host(object)$ that belongs of $object$.
+...type:Metafunction.Position
+..see:Function.begin
+..see:Function.beginPosition
+..see:Function.setBegin
+..include:seqan/sequence.h
+*/
+
+template <typename THost_, typename TPosition>
+inline void
+setBeginPosition(Segment<THost_, InfixSegment> & me, TPosition new_begin)
+{
+SEQAN_CHECKPOINT
+    me.data_begin_position = new_begin;
+}
+
+//____________________________________________________________________________
+
+///.Function.begin.param.object.type:Class.Segment
+
+template <typename THost_>
+inline typename Iterator<Segment<THost_, InfixSegment>, Standard>::Type
+end(Segment<THost_, InfixSegment> & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard()) + me.data_end_position;
+}
+template <typename THost_>
+inline typename Iterator<Segment<THost_, InfixSegment> const, Standard>::Type
+end(Segment<THost_, InfixSegment> const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard()) + me.data_end_position;
+}
+
+//____________________________________________________________________________
+
+///.Function.endPosition.param.object.type:Class.Segment
+
+template <typename THost_>
+inline typename Position<Segment<THost_, InfixSegment> >::Type
+endPosition(Segment<THost_, InfixSegment> & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_end_position;
+}
+template <typename THost_>
+inline typename Position<Segment<THost_, InfixSegment> >::Type
+endPosition(Segment<THost_, InfixSegment> const & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_end_position;
+}
+
+//____________________________________________________________________________
+
+/**
+.Function.setEnd:
+..summary:Sets end of object in host.
+..cat:Dependent Objects
+..signature:setEnd(object, new_end)
+..param.object:An object.
+...type:Spec.InfixSegment
+...type:Spec.PrefixSegment
+..param.new_end:Iterator behind the last item in $host(object)$ belongs of $object$.
+...type:Metafunction.Iterator
+..see:Function.end
+..see:Function.endPosition
+..see:Function.setBegin
+..include:seqan/sequence.h
+*/
+
+template <typename THost_, typename TIterator>
+inline void
+setEnd(Segment<THost_, InfixSegment> & me, TIterator new_end)
+{
+SEQAN_CHECKPOINT
+    me.data_end_position = new_end - begin(host(me));//, Standard());
+}
+
+//____________________________________________________________________________
+
+
+/**
+.Function.setEndPosition:
+..summary:Sets begin position of object in host.
+..cat:Dependent Objects
+..signature:setEndPosition(object, new_end)
+..param.object:An object.
+...type:Spec.InfixSegment
+...type:Spec.PrefixSegment
+..param.new_end:position behind the last item in $host(object)$ that belongs of $object$.
+...type:Metafunction.Position
+..see:Function.end
+..see:Function.endPosition
+..see:Function.setBeginPosition
+..see:Function.setEnd
+..include:seqan/sequence.h
+*/
+
+template <typename THost_, typename TPosition>
+inline void
+setEndPosition(Segment<THost_, InfixSegment> & me, TPosition new_end)
+{
+SEQAN_CHECKPOINT
+    me.data_end_position = new_end;
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline void
+_setLength(
+    Segment<THost_, InfixSegment> & me,
+    typename Size<THost_>::Type new_length)
+{
+SEQAN_CHECKPOINT
+    me.data_end_position = me.data_begin_position + new_length;
+}
+
+
+//____________________________________________________________________________
+
+/**
+.Function.setHost:
+..summary:Sets the host of an object.
+..cat:Dependent Objects
+..signature:setHost(object, host)
+..param.object:The object that will get a new host.
+...type:Class.Segment
+..param.host:The new host.
+..remarks:After this operation, $object$ depends on $host$.
+...text:Note that setting the host can invalidate $object$.
+For example, if one changes the host of a @Class.Segment@ object, it is possible
+that begin- and end-position of the segment does not fit into the new host sequence.
+..see:Function.host
+..include:seqan/sequence.h
+*/
+template <typename THost_>
+inline void
+setHost(Segment<THost_, InfixSegment> & me, typename Parameter_<THost_>::Type _host)
+{
+SEQAN_CHECKPOINT
+    me.data_host = _toPointer(_host);
+}
+
+template <typename THost_>
+inline void
+setHost(Segment<THost_ const, InfixSegment> & me, typename Parameter_<THost_>::Type _host)
+{
+SEQAN_CHECKPOINT
+    me.data_host = _toPointer(_host);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Infix:
+..summary:Infix sequence type.
+..signature:Infix<T>::Type
+..remarks:Note that an infix of a @Class.Segment@ object is an @Spec.InfixSegment@ object having the same host type.
+..param.T:A sequence type.
+...type:Class.String
+..returns.param.Type:The infix type.
+..see:Spec.InfixSegment
+..include:seqan/sequence.h
+*/
+
+template <typename THost>
+struct Infix
+{
+    typedef Segment<THost, InfixSegment> Type;
+};
+
+template <typename THost, typename TSpec>
+struct Infix< Segment<THost, TSpec> >
+{
+    typedef Segment<THost, InfixSegment> Type;
+};
+
+template <typename THost, typename TSpec>
+struct Infix< Segment<THost, TSpec> const >:
+    Infix< Segment<THost, TSpec> > {};
+
+template <typename THost>
+struct Infix<THost &>:
+    Infix<THost> {};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TPosition1, typename TPosition2>
+inline void
+set(Segment<THost, InfixSegment> & me,
+    THost & host_,
+    TPosition1 begin_,
+    TPosition2 end_)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host_);
+    setBeginPosition(me, begin_);
+    setEndPosition(me, end_);
+}
+//____________________________________________________________________________
+
+template <typename THost>
+inline void
+set(Segment<THost, InfixSegment> & me,
+    THost & host_)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host_);
+    setBegin(me, begin(host_, Standard()));
+    setEnd(me, end(host_, Standard()));
+}
+template <typename THost>
+inline void
+set(Segment<THost, InfixSegment> & me,
+    THost const & host_)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host_);
+    setBegin(me, begin(host_, Standard()));
+    setEnd(me, end(host_, Standard()));
+}
+
+//____________________________________________________________________________
+
+template <typename THost, typename TSpec>
+inline void
+set(Segment<THost, InfixSegment> & me,
+    Segment<THost, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host(source));
+    setBeginPosition(me, beginPosition(source));
+    setEndPosition(me, endPosition(source));
+}
+template <typename THost, typename TSpec>
+inline void
+set(Segment<THost const, InfixSegment> & me,
+    Segment<THost, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host(source));
+    setBeginPosition(me, beginPosition(source));
+    setEndPosition(me, endPosition(source));
+}
+template <typename THost, typename TSpec>
+inline void
+set(Segment<THost, InfixSegment> & me,
+    Segment<THost, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host(source));
+    setBeginPosition(me, beginPosition(source));
+    setEndPosition(me, endPosition(source));
+}
+template <typename THost, typename TSpec>
+inline void
+set(Segment<THost const, InfixSegment> & me,
+    Segment<THost, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host(source));
+    setBeginPosition(me, beginPosition(source));
+    setEndPosition(me, endPosition(source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline bool
+atBegin(Segment<THost, InfixSegment> & segment)
+{
+SEQAN_CHECKPOINT
+    return (beginPosition(segment) == endPosition(segment));
+}
+template <typename THost>
+inline bool
+atBegin(Segment<THost, InfixSegment> const & segment)
+{
+SEQAN_CHECKPOINT
+    return (beginPosition(segment) == endPosition(segment));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline bool
+atEnd(Segment<THost, InfixSegment> & segment)
+{
+SEQAN_CHECKPOINT
+    return (endPosition(segment) - beginPosition(segment)) > length(host(segment));
+}
+template <typename THost>
+inline bool
+atEnd(Segment<THost, InfixSegment> const & segment)
+{
+SEQAN_CHECKPOINT
+    return (endPosition(segment) - beginPosition(segment)) > length(host(segment));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline void
+goBegin(Segment<THost, InfixSegment> & segment)
+{
+SEQAN_CHECKPOINT
+    setBeginPosition(segment, 0);
+    setEndPosition(segment, 1);
+}
+template <typename THost, typename THost2>
+inline void
+goBegin(Segment<THost, InfixSegment> & segment,
+        THost2 &)
+{
+    goBegin(segment);
+}
+template <typename THost, typename THost2>
+inline void
+goBegin(Segment<THost, InfixSegment> & segment,
+        THost2 const &)
+{
+    goBegin(segment);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename THost>
+inline void
+goEnd(Segment<THost, InfixSegment> & segment)
+{
+SEQAN_CHECKPOINT
+    setBeginPosition(segment, 0);
+    setEndPosition(segment, length(host(segment)));
+}
+template <typename THost, typename THost2>
+inline void
+goEnd(Segment<THost, InfixSegment> & segment,
+      THost2 &)
+{
+    goEnd(segment);
+}
+template <typename THost, typename THost2>
+inline void
+goEnd(Segment<THost, InfixSegment> & segment,
+      THost2 const &)
+{
+    goEnd(segment);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline Segment<THost, InfixSegment> &
+operator ++(Segment<THost, InfixSegment> & segment)
+{
+SEQAN_CHECKPOINT
+    if (endPosition(segment) == length(host(segment)))
+    {
+        setEndPosition(segment, endPosition(segment) - beginPosition(segment) + 1);
+        setBeginPosition(segment, 0);
+    }
+    else
+    {
+        setBeginPosition(segment, beginPosition(segment) + 1);
+        setEndPosition(segment, endPosition(segment) + 1);
+    }
+    return segment;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline Segment<THost, InfixSegment> &
+operator --(Segment<THost, InfixSegment> & segment)
+{
+SEQAN_CHECKPOINT
+    if (!beginPosition(segment))
+    {
+        typename Size<THost>::Type host_length = length(host(segment));
+
+        setBeginPosition(segment, host_length - endPosition(segment) + beginPosition(segment) + 1);
+        setEndPosition(segment, host_length);
+    }
+    else
+    {
+        setBeginPosition(segment, beginPosition(segment) - 1);
+        setEndPosition(segment, endPosition(segment) - 1);
+    }
+    return segment;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TSpec, typename TPos>
+inline typename Reference< Segment<THost, TSpec> >::Type
+value(Segment<THost, TSpec> & me,
+      TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_LT_MSG(pos, static_cast<TPos>(length(me)), "Trying to acces an element behind the last one!");
+    return *(begin(me, Standard()) + pos);
+}
+
+template <typename THost, typename TSpec, typename TPos>
+inline typename Reference< Segment<THost, TSpec> const >::Type
+value(Segment<THost, TSpec> const & me,
+      TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_LT_MSG(pos, static_cast<TPos>(length(me)), "Trying to acces an element behind the last one!");
+    return *(begin(me, Standard()) + pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.infix:
+..cat:Containers
+..summary:Creates infix object.
+..signature:infix(host, begin, end)
+..param.host:The complete sequence.
+...type:Class.String
+...type:Adaption.char array
+..param.begin:Position or iterator of the first element of the segment.
+...type:Metafunction.Position
+...type:Metafunction.Iterator
+..param.end:Position or iterator behind the last element of the segment.
+...remarks:$end$ must have the same type as $begin$.
+..returns:The infix of $host$ between $begin$ and $end-1$.
+...remarks:The type of the infix is given by @Metafunction.Infix at .
+..remarks:Notational sugar.
+..see:Spec.InfixSegment
+..see.Metafunction.Infix
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TPosBegin, typename TPosEnd>
+inline typename Infix<T>::Type
+infix(T & t, TPosBegin pos_begin, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<T>::Type(t, pos_begin, pos_end);
+}
+
+template <typename T, typename TPosBegin, typename TPosEnd>
+inline typename Infix<T *>::Type
+infix(T * t, TPosBegin pos_begin, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<T *>::Type (t, pos_begin, pos_end);
+}
+
+template <typename T, typename TSpec, typename TPosBegin, typename TPosEnd>
+inline typename Infix<Segment<T, TSpec> >::Type
+infix(Segment<T, TSpec> & t, TPosBegin pos_begin, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<Segment<T, TSpec> >::Type (
+        host(t),
+        beginPosition(t) + pos_begin,
+        beginPosition(t) + pos_end);
+}
+
+template <typename T, typename TSpec, typename TPosBegin, typename TPosEnd>
+inline typename Infix<Segment<T, TSpec> const>::Type
+infix(Segment<T, TSpec> const & t, TPosBegin pos_begin, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<Segment<T, TSpec> const>::Type (
+        host(t),
+        beginPosition(t) + pos_begin,
+        beginPosition(t) + pos_end);
+}
+
+// infix() with iterators
+
+template <typename T, typename TSpec, typename TIterSpec>
+inline typename Infix<Segment<T, TSpec> >::Type
+infix(Segment<T, TSpec> & t,
+      Iter<Segment<T, TSpec>, TIterSpec> const & iterBegin,
+      Iter<Segment<T, TSpec>, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<Segment<T, TSpec> >::Type (
+        host(t),
+        iterBegin,
+        iterEnd);
+}
+
+template <typename T, typename TSpec, typename TIterSpec>
+inline typename Infix<Segment<T, TSpec> const>::Type
+infix(Segment<T, TSpec> const & t,
+      Iter<Segment<T, TSpec> const, TIterSpec> const & iterBegin,
+      Iter<Segment<T, TSpec> const, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<Segment<T, TSpec> >::Type (
+        host(t),
+        iterBegin,
+        iterEnd);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.infixWithLength:
+..cat:Containers
+..summary:Creates infix object.
+..signature:infixWithLength(host, begin, length)
+..param.host:The complete sequence.
+...type:Class.String
+...type:Adaption.char array
+..param.begin:Position or iterator of the first element of the segment.
+...type:Metafunction.Position
+...type:Metafunction.Iterator
+..param.length:Length of the returned infix.
+..returns:The infix of $host$ between $begin$ and $begin+length-1$.
+...remarks:The type of the infix is given by @Metafunction.Infix at .
+..remarks:Notational sugar.
+..see:Spec.InfixSegment
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TPosBegin, typename TSize>
+inline typename Infix<T>::Type
+infixWithLength(T & t, TPosBegin pos_begin, TSize length)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<T>::Type(t, pos_begin, pos_begin + length);
+}
+
+template <typename T, typename TPosBegin, typename TSize>
+inline typename Infix<T *>::Type
+infixWithLength(T * t, TPosBegin pos_begin, TSize length)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<T *>::Type (t, pos_begin, pos_begin + length);
+}
+
+template <typename T, typename TSpec, typename TPosBegin, typename TSize>
+inline typename Infix<Segment<T, TSpec> >::Type
+infixWithLength(Segment<T, TSpec> & t, TPosBegin pos_begin, TSize length)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<Segment<T, TSpec> >::Type (
+        host(t),
+        beginPosition(t) + pos_begin,
+        beginPosition(t) + pos_begin + length);
+}
+
+template <typename T, typename TSpec, typename TPosBegin, typename TSize>
+inline typename Infix<Segment<T, TSpec> const>::Type
+infixWithLength(Segment<T, TSpec> const & t, TPosBegin pos_begin, TSize length)
+{
+SEQAN_CHECKPOINT
+    return typename Infix<Segment<T, TSpec> const>::Type (
+        host(t),
+        beginPosition(t) + pos_begin,
+        beginPosition(t) + pos_begin + length);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//setBegin
+
+
+template <typename TIterator>
+inline void
+setBegin(TIterator new_begin)
+{
+SEQAN_CHECKPOINT
+    setBegin(container(new_begin), hostIterator(new_begin));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//setEnd
+
+template <typename TIterator>
+inline void
+setEnd(TIterator new_end)
+{
+SEQAN_CHECKPOINT
+    setEnd(container(new_end), new_end);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/segment_prefix.h b/src/SeqAn-1.3/seqan/sequence/segment_prefix.h
new file mode 100644
index 0000000..baef793
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/segment_prefix.h
@@ -0,0 +1,748 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Implementation of the Prefix Segment specialization.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEGMENT_PREFIX_H
+#define SEQAN_HEADER_SEGMENT_PREFIX_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// PrefixSegment
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Spec.PrefixSegment:
+..cat:Segments
+..summary:First part of a sequence.
+..general:Class.Segment
+..signature:Segment<THost, PrefixSegment>
+..param.THost:Type of the whole sequence.
+...text:Instances of $Segment<THost, PrefixSegment>$ are prefixes of $THost$ objects.
+...remarks:Use @Metafunction.Host@ to get the host type for a given class.
+..remarks.note:Since the appropriate segment type depends on the host sequence type,
+    it is recommended to use the metafunction @Metafunction.Prefix@ instead of explicitely
+    choose a specialization of @Class.Segment at .
+..see:Spec.InfixSegment
+..see:Spec.SuffixSegment
+..see:Metafunction.Prefix
+..include:seqan/sequence.h
+*/
+
+struct PrefixSegment {};
+
+template <typename THost_>
+class Segment<THost_, PrefixSegment>
+{
+public:
+    typedef typename Host<Segment>::Type THost;
+
+    typename Pointer_<THost>::Type data_host;
+    typename Position<THost>::Type data_end_position;
+
+//____________________________________________________________________________
+
+public:
+
+/**
+.Memfunc.PrefixSegment#Segment:
+..class:Spec.PrefixSegment
+..summary:Constructor
+..signature:Segment<THost, PrefixSegment> ()
+..signature:Segment<THost, PrefixSegment> (prefix)
+..signature:Segment<THost, PrefixSegment> (host [, end])
+..param.prefix:Other prefix object. (copy constructor)
+..param.host:The whole sequence.
+..param.end:Position in $host$ behind the last item in segment. (optional)
+...default:$length(host)$
+...type:Metafunction.Position.$Position<THost>::Type$
+...type:Metafunction.Iterator.$Iterator<THost>::Type$
+..remarks:
+...text:A Segment object cannot work without a host. If the object is default constructed,
+the host must be set by @Function.setHost@ before the segment can be used.
+...text:If a segment object is constructed by the copy constructor, the
+members of the new constructed object are set to the same values as the members in the
+source object; the host object is not modified.
+Note that this is a special case, since all other copy operations result in changes
+of the host object.
+...text:$begin$ must be a valid position/iterator in $host$.
+If $begin$ is omitted, the prefix segment corresponding to
+the whole sequence $host$ is constructed.
+This is the same segment that is returned by @Function.goBegin at .
+*/
+    Segment():
+        data_host(NULL),
+        data_end_position(0)
+    {
+SEQAN_CHECKPOINT
+    }
+
+    Segment(THost & _host):
+        data_host(& _host),
+        data_end_position(length(_host))
+    {
+SEQAN_CHECKPOINT
+    }
+
+    Segment(typename Parameter_<THost>::Type _host, typename Position<THost>::Type _end_index):
+        data_host(_toPointer(_host)),
+        data_end_position(_end_index)
+    {
+SEQAN_CHECKPOINT
+    }
+/*
+    Segment(typename Parameter_<THost>::Type _host, typename Iterator<THost, Rooted>::Type _end):
+        data_host(_toPointer(_host)),
+        data_end_position(position(_end))
+    {
+SEQAN_CHECKPOINT
+    }
+*/
+    Segment(typename Parameter_<THost>::Type _host, typename Iterator<THost, Standard>::Type _end):
+        data_host(_toPointer(_host)),
+        data_end_position(position(_end, _host))
+    {
+SEQAN_CHECKPOINT
+    }
+
+/*
+    Segment(Segment const & _other):
+        data_host(_other.data_host),
+        data_end_position(_other.data_end_position)
+    {
+SEQAN_CHECKPOINT
+    }
+*/
+    template <typename THost2, typename TSpec2>
+    Segment(Segment<THost2, TSpec2> const & _other):
+        data_host(_toPointer(host(_other))),
+        data_end_position(endPosition(_other))
+    {
+SEQAN_CHECKPOINT
+    }
+
+    ~ Segment()
+    {
+SEQAN_CHECKPOINT
+    }
+
+    template <typename TSource>
+    inline Segment &
+    operator = (TSource const & source)
+    {
+        assign(*this, source);
+        return *this;
+    }
+    inline Segment &
+    operator = (Segment const & source)
+    {
+        assign(*this, source);
+        return *this;
+    }
+//____________________________________________________________________________
+
+public:
+
+
+    template <typename TPos>
+    inline typename Reference<Segment>::Type
+    operator [] (TPos pos)
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<Segment const>::Type
+    operator [] (TPos pos) const
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+
+//____________________________________________________________________________
+};
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost_>
+inline typename Parameter_<THost_>::Type
+host(Segment<THost_, PrefixSegment> & me)
+{
+SEQAN_CHECKPOINT
+    return _toParameter<THost_>(me.data_host);
+}
+
+template <typename THost_>
+inline typename Parameter_<THost_>::Type
+host(Segment<THost_, PrefixSegment> const & me)
+{
+SEQAN_CHECKPOINT
+    return _toParameter<THost_>(me.data_host);
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline void
+setHost(Segment<THost_, PrefixSegment> & me, typename Parameter_<THost_>::Type _host)
+{
+SEQAN_CHECKPOINT
+    me.data_host = _toPointer(_host);
+}
+
+template <typename THost_>
+inline void
+setHost(Segment<THost_ const, PrefixSegment> & me, typename Parameter_<THost_>::Type _host)
+{
+SEQAN_CHECKPOINT
+    me.data_host = _toPointer(_host);
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline typename Iterator<Segment<THost_, PrefixSegment>, Standard>::Type
+begin(Segment<THost_, PrefixSegment> & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard());
+}
+template <typename THost_>
+inline typename Iterator<Segment<THost_, PrefixSegment> const, Standard>::Type
+begin(Segment<THost_, PrefixSegment> const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard());
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline typename Position<Segment<THost_, PrefixSegment> const>::Type
+beginPosition(Segment<THost_, PrefixSegment> const & /*me*/)
+{
+SEQAN_CHECKPOINT
+    return 0;
+}
+template <typename THost_>
+inline typename Position<Segment<THost_, PrefixSegment> >::Type
+beginPosition(Segment<THost_, PrefixSegment> & /*me*/)
+{
+SEQAN_CHECKPOINT
+    return 0;
+}
+
+//____________________________________________________________________________
+
+template <typename THost_, typename TIterator>
+inline void
+setBegin(Segment<THost_, PrefixSegment> &, TIterator)
+{
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline typename Iterator<Segment<THost_, PrefixSegment>, Standard>::Type
+end(Segment<THost_, PrefixSegment> & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard()) + me.data_end_position;
+}
+template <typename THost_>
+inline typename Iterator<Segment<THost_, PrefixSegment> const, Standard>::Type
+end(Segment<THost_, PrefixSegment> const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard()) + me.data_end_position;
+}
+
+//____________________________________________________________________________
+
+
+template <typename THost_, typename TPosition>
+inline void
+setEndPosition(Segment<THost_, PrefixSegment> & me, TPosition new_end)
+{
+SEQAN_CHECKPOINT
+    me.data_end_position = new_end;
+}
+
+template <typename THost_, typename TIterator>
+inline void
+setEnd(Segment<THost_, PrefixSegment> & me, TIterator new_end)
+{
+SEQAN_CHECKPOINT
+    me.data_end_position = new_end - begin(host(me));//, Standard());
+}
+
+template <typename THost_>
+inline void
+setEnd(typename Iterator<Segment<THost_, PrefixSegment>, Rooted>::Type new_end)
+{
+SEQAN_CHECKPOINT
+    container(new_end).data_end_position = hostIterator(new_end) - begin(host(container(new_end)));//, Standard());
+}
+
+//____________________________________________________________________________
+
+template <typename THost_, typename TSize>
+inline void
+_setLength(
+    Segment<THost_, PrefixSegment> & me,
+    TSize new_length)
+{
+SEQAN_CHECKPOINT
+    me.data_end_position = new_length;
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline typename Position<Segment<THost_, PrefixSegment> >::Type
+endPosition(Segment<THost_, PrefixSegment> & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_end_position;
+}
+template <typename THost_>
+inline typename Position<Segment<THost_, PrefixSegment> const>::Type
+endPosition(Segment<THost_, PrefixSegment> const & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_end_position;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Prefix:
+..summary:Prefix sequence type.
+..signature:Prefix<T>::Type
+..param.T:A sequence type.
+...type:Class.String
+..returns.param.Type:The prefix type.
+..see:Spec.PrefixSegment
+..see:Metafunction.Infix
+..include:seqan/sequence.h
+*/
+
+struct InfixSegment;
+struct SuffixSegment;
+
+template <typename THost>
+struct Prefix
+{
+    typedef Segment<THost, PrefixSegment> Type;
+};
+
+template <typename THost>
+struct Prefix< Segment<THost, InfixSegment> >
+{
+    typedef Segment<THost, InfixSegment> Type;
+};
+template <typename THost>
+struct Prefix< Segment<THost, SuffixSegment> >
+{
+    typedef Segment<THost, InfixSegment> Type;
+};
+template <typename THost>
+struct Prefix< Segment<THost, PrefixSegment> >
+{
+    typedef Segment<THost, PrefixSegment> Type;
+};
+
+template <typename THost, typename TSpec>
+struct Prefix< Segment<THost, TSpec> const >:
+    Prefix< Segment<THost, TSpec> > {};
+
+template <typename THost>
+struct Prefix<THost &>:
+    Prefix<THost> {};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TPosition>
+inline void
+set(Segment<THost, PrefixSegment> & me,
+    THost & host_,
+    TPosition end_)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host_);
+    setEndPosition(me, end_);
+}
+//____________________________________________________________________________
+
+template <typename THost>
+inline void
+set(Segment<THost, PrefixSegment> & me,
+    THost & host_)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host_);
+    setEnd(me, end(host_));
+}
+
+//____________________________________________________________________________
+
+template <typename THost, typename TSpec>
+inline void
+set(Segment<THost, PrefixSegment> & me,
+    Segment<THost, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host(source));
+    setEndPosition(me, endPosition(source));
+}
+
+template <typename THost, typename TSpec>
+inline void
+set(Segment<THost, PrefixSegment> & me,
+    Segment<THost, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host(source));
+    setEndPosition(me, endPosition(source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline bool
+atBegin(Segment<THost, PrefixSegment> const & segment)
+{
+SEQAN_CHECKPOINT
+    return (endPosition(segment) == length(host(segment)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline bool
+atEnd(Segment<THost, PrefixSegment> const & segment)
+{
+SEQAN_CHECKPOINT
+    return (endPosition(segment) == 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline void
+goBegin(Segment<THost, PrefixSegment> & segment,
+        THost &)
+{
+SEQAN_CHECKPOINT
+    goBegin(segment);
+}
+
+template <typename THost>
+inline void
+goBegin(Segment<THost, PrefixSegment> & segment)
+{
+    setEnd(segment);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline void
+goEnd(Segment<THost, PrefixSegment> & segment,
+      THost &)
+{
+SEQAN_CHECKPOINT
+    goEnd(segment);
+}
+
+template <typename THost>
+inline void
+goEnd(Segment<THost, PrefixSegment> & segment)
+{
+    setEnd(segment, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline Segment<THost, PrefixSegment> &
+operator ++(Segment<THost, PrefixSegment> & segment)
+{
+    setEnd(segment, endPosition(segment) - 1);
+    return segment;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline Segment<THost, PrefixSegment> &
+operator --(Segment<THost, PrefixSegment> & segment)
+{
+    setEnd(segment, endPosition(segment) + 1);
+    return segment;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.prefix:
+..cat:Containers
+..summary:Creates prefix object.
+..signature:prefix(host, end)
+..remarks:Note that a prefix of a @Class.Segment@ object is an @Spec.SuffixSegment@ object having the same host type.
+..param.host:The complete sequence.
+...type:Class.String
+...type:Adaption.char array
+..param.end:Position or iterator behind the last element of the segment.
+...type:Metafunction.Position
+...type:Metafunction.Iterator
+..returns:The prefix of $host that begins at $begin$.
+...remarks:The type of the prefix is given by @Metafunction.Prefix at .
+..remarks:Notational sugar.
+..see:Spec.PrefixSegment
+..see:Function.suffix
+..see:Function.infix
+..see:Function.suffix
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TPosEnd>
+inline typename Prefix<T>::Type
+prefix(T & t, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<T>::Type(t, pos_end);
+}
+template <typename T, typename TPosEnd>
+inline typename Prefix<T const>::Type
+prefix(T const & t, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<T const>::Type(t, pos_end);
+}
+
+template <typename T, typename TPosEnd>
+inline typename Prefix<T *>::Type
+prefix(T * t, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<T *>::Type (t, pos_end);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// A prefix of a prefix -> is a prefix
+template <typename T, typename TPosEnd>
+inline typename Prefix<Segment<T, PrefixSegment> >::Type
+prefix(Segment<T, PrefixSegment> & t, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, PrefixSegment> >::Type (
+        host(t),
+        beginPosition(t) + pos_end);
+}
+template <typename T, typename TPosEnd>
+inline typename Prefix<Segment<T, PrefixSegment> const>::Type
+prefix(Segment<T, PrefixSegment> const & t, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, PrefixSegment> const>::Type (
+        host(t),
+        beginPosition(t) + pos_end);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// A prefix of an infix -> is an infix
+template <typename T, typename TPosEnd>
+inline typename Prefix<Segment<T, InfixSegment> >::Type
+prefix(Segment<T, InfixSegment> & t, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, InfixSegment> >::Type (
+        host(t),
+        beginPosition(t),
+        beginPosition(t) + pos_end);
+}
+template <typename T, typename TPosEnd>
+inline typename Prefix<Segment<T, InfixSegment> const>::Type
+prefix(Segment<T, InfixSegment> const & t, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, InfixSegment> const>::Type (
+        host(t),
+        beginPosition(t),
+        beginPosition(t) + pos_end);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// A prefix of an suffix -> is an infix
+template <typename T, typename TPosEnd>
+inline typename Prefix<Segment<T, SuffixSegment> >::Type
+prefix(Segment<T, SuffixSegment> & t, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, SuffixSegment> >::Type (
+        host(t),
+        beginPosition(t),
+        beginPosition(t) + pos_end);
+}
+template <typename T, typename TPosEnd>
+inline typename Prefix<Segment<T, SuffixSegment> const>::Type
+prefix(Segment<T, SuffixSegment> const & t, TPosEnd pos_end)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, SuffixSegment> const>::Type (
+        host(t),
+        beginPosition(t),
+        beginPosition(t) + pos_end);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// prefix() with iterators
+
+template <typename T, typename TIterSpec>
+inline typename Prefix<T>::Type
+prefix(T & t,
+       Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<T>::Type(t, iterEnd);
+}
+template <typename T, typename TIterSpec>
+inline typename Prefix<T const>::Type
+prefix(T const & t,
+       Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<T const>::Type(t, iterEnd);
+}
+
+template <typename T, typename TIterSpec>
+inline typename Prefix<T *>::Type
+prefix(T * t,
+       Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<T *>::Type (t, iterEnd);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// A prefix of a prefix -> is a prefix
+template <typename T, typename TIterSpec>
+inline typename Prefix<Segment<T, PrefixSegment> >::Type
+prefix(Segment<T, PrefixSegment> & t,
+       Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, PrefixSegment> >::Type (
+        host(t),
+        iterEnd);
+}
+template <typename T, typename TIterSpec>
+inline typename Prefix<Segment<T, PrefixSegment> const>::Type
+prefix(Segment<T, PrefixSegment> const & t,
+       Iter<Segment<T, PrefixSegment> const, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, PrefixSegment> const>::Type (
+        host(t),
+        iterEnd);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// A prefix of an infix -> is an infix
+template <typename T, typename TIterSpec>
+inline typename Prefix<Segment<T, InfixSegment> >::Type
+prefix(Segment<T, InfixSegment> & t,
+       Iter<Segment<T, InfixSegment>, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, InfixSegment> >::Type (
+        host(t),
+        begin(t),
+        iterEnd);
+}
+template <typename T, typename TIterSpec>
+inline typename Prefix<Segment<T, InfixSegment> const>::Type
+prefix(Segment<T, InfixSegment> const & t,
+       Iter<Segment<T, InfixSegment> const, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, InfixSegment> const>::Type (
+        host(t),
+        begin(t),
+        iterEnd);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// A prefix of an suffix -> is an infix
+template <typename T, typename TIterSpec>
+inline typename Prefix<Segment<T, SuffixSegment> >::Type
+prefix(Segment<T, SuffixSegment> & t,
+       Iter<Segment<T, SuffixSegment> const, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, SuffixSegment> >::Type (
+        host(t),
+        begin(t),
+        iterEnd);
+}
+template <typename T, typename TIterSpec>
+inline typename Prefix<Segment<T, SuffixSegment> const>::Type
+prefix(Segment<T, SuffixSegment> const & t,
+       Iter<Segment<T, SuffixSegment> const, TIterSpec> const & iterEnd)
+{
+SEQAN_CHECKPOINT
+    return typename Prefix<Segment<T, SuffixSegment> const>::Type (
+        host(t),
+        begin(t),
+        iterEnd);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/segment_suffix.h b/src/SeqAn-1.3/seqan/sequence/segment_suffix.h
new file mode 100644
index 0000000..ee5efcb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/segment_suffix.h
@@ -0,0 +1,744 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Implementation of the Suffix Segment specialization.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEGMENT_SUFFIX_H
+#define SEQAN_HEADER_SEGMENT_SUFFIX_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// SuffixSegment
+//////////////////////////////////////////////////////////////////////////////
+
+
+/**
+.Spec.SuffixSegment:
+..cat:Segments
+..summary:End part segment of a sequence.
+..general:Class.Segment
+..signature:Segment<THost, SuffixSegment>
+..param.THost:Type of the whole sequence.
+...text:Instances of $Segment<THost, SuffixSegment>$ are suffixes of $THost$ objects.
+...remarks:Use @Metafunction.Host@ to get the host type for a given class.
+..remarks.note:Since the appropriate segment type depends on the host sequence type,
+    it is recommended to use the metafunction @Metafunction.Suffix@ instead of explicitely
+    choose a specialization of @Class.Segment at .
+..see:Spec.InfixSegment
+..see:Metafunction.Suffix
+..include:seqan/sequence.h
+*/
+
+struct SuffixSegment {};
+
+template <typename THost_>
+class Segment<THost_, SuffixSegment>
+{
+public:
+    typedef typename Host<Segment>::Type THost;
+
+    typename Pointer_<THost>::Type data_host;
+    typename Position<THost>::Type data_begin_position;
+
+//____________________________________________________________________________
+
+public:
+
+/**
+.Memfunc.SuffixSegment#Segment:
+..class:Spec.SuffixSegment
+..summary:Constructor
+..signature:Segment<THost, SuffixSegment> ()
+..signature:Segment<THost, SuffixSegment> (suffix)
+..signature:Segment<THost, SuffixSegment> (host [, begin])
+..param.suffix:Other suffix object. (copy constructor)
+..param.host:The whole sequence.
+..param.begin:Position in $host$ of the first item in segment. (optional)
+...default:$0$
+...type:Metafunction.Position.$Position<THost>::Type$
+...type:Metafunction.Iterator.$Iterator<THost>::Type$
+..remarks:
+...text:A Segment object cannot work without a host. If the object is default constructed,
+the host must be set by @Function.setHost@ before the segment can be used.
+...text:If a segment object is constructed by the copy constructor, the
+members of the new constructed object are set to the same values as the members in the
+source object; the host object is not modified.
+Note that this is a special case, since all other copy operations result in changes
+of the host object.
+...text:$begin$ must be a valid position/iterator in $host$.
+If $begin$ is omitted, the suffix segment corresponding to
+the whole sequence $host$ is constructed.
+This is the same segment that is returned by @Function.goBegin at .
+*/
+    Segment():
+        data_host(NULL),
+        data_begin_position(0)
+    {
+SEQAN_CHECKPOINT
+    }
+
+    Segment(THost & _host):
+        data_host(& _host),
+        data_begin_position(0)
+    {
+SEQAN_CHECKPOINT
+    }
+
+    Segment(typename Parameter_<THost>::Type _host, typename Position<THost>::Type _begin_index):
+        data_host(_toPointer(_host)),
+        data_begin_position(_begin_index)
+    {
+SEQAN_CHECKPOINT
+    }
+/*
+    Segment(typename Parameter_<THost>::Type _host, typename Iterator<THost, Rooted>::Type _begin):
+        data_host(_toPointer(_host)),
+        data_begin_position(position(_begin))
+    {
+SEQAN_CHECKPOINT
+    }
+*/
+    Segment(typename Parameter_<THost>::Type _host, typename Iterator<THost, Standard>::Type _begin):
+        data_host(_toPointer(_host)),
+        data_begin_position(position(_begin, _host))
+    {
+SEQAN_CHECKPOINT
+    }
+/*
+    Segment(Segment const & _other):
+        data_host(_other.data_host),
+        data_begin_position(_other.data_begin_position)
+    {
+SEQAN_CHECKPOINT
+    }
+*/
+    template <typename THost2, typename TSpec2>
+    Segment(Segment<THost2, TSpec2> const & _other):
+        data_host(_toPointer(host(_other))),
+        data_begin_position(beginPosition(_other))
+    {
+SEQAN_CHECKPOINT
+    }
+
+    ~ Segment()
+    {
+SEQAN_CHECKPOINT
+    }
+
+    template <typename TSource>
+    inline Segment &
+    operator = (TSource const & source)
+    {
+        assign(*this, source);
+        return *this;
+    }
+    inline Segment &
+    operator = (Segment const & source)
+    {
+        assign(*this, source);
+        return *this;
+    }
+//____________________________________________________________________________
+
+public:
+
+
+//____________________________________________________________________________
+
+    template <typename TPos>
+    inline typename Reference<Segment>::Type
+    operator [] (TPos pos)
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<Segment const>::Type
+    operator [] (TPos pos) const
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+//____________________________________________________________________________
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost_>
+inline typename Parameter_<THost_>::Type
+host(Segment<THost_, SuffixSegment> & me)
+{
+SEQAN_CHECKPOINT
+    return _toParameter<THost_>(me.data_host);
+}
+
+template <typename THost_>
+inline typename Parameter_<THost_>::Type
+host(Segment<THost_, SuffixSegment> const & me)
+{
+SEQAN_CHECKPOINT
+    return _toParameter<THost_>(me.data_host);
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline void
+setHost(Segment<THost_, SuffixSegment> & me, typename Parameter_<THost_>::Type _host)
+{
+SEQAN_CHECKPOINT
+    me.data_host = _toPointer(_host);
+}
+
+template <typename THost_>
+inline void
+setHost(Segment<THost_ const, SuffixSegment> & me, typename Parameter_<THost_>::Type _host)
+{
+SEQAN_CHECKPOINT
+    me.data_host = _toPointer(_host);
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline typename Iterator<Segment<THost_, SuffixSegment>, Standard>::Type
+begin(Segment<THost_, SuffixSegment> & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard()) + me.data_begin_position;
+}
+template <typename THost_>
+inline typename Iterator<Segment<THost_, SuffixSegment> const, Standard>::Type
+begin(Segment<THost_, SuffixSegment> const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return begin(host(me), Standard()) + me.data_begin_position;
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline typename Position<Segment<THost_, SuffixSegment> const>::Type
+beginPosition(Segment<THost_, SuffixSegment> const & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_begin_position;
+}
+template <typename THost_>
+inline typename Position<Segment<THost_, SuffixSegment> >::Type
+beginPosition(Segment<THost_, SuffixSegment> & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_begin_position;
+}
+//____________________________________________________________________________
+
+template <typename THost_, typename TIterator>
+inline void
+setBegin(Segment<THost_, SuffixSegment> & me, TIterator new_begin)
+{
+SEQAN_CHECKPOINT
+    me.data_begin_position = new_begin - begin(host(me));//, Standard());
+}
+
+template <typename THost_>
+inline void
+setBegin(typename Iterator<Segment<THost_, SuffixSegment>, Rooted>::Type new_begin)
+{
+SEQAN_CHECKPOINT
+    container(new_begin).data_begin_position = hostIterator(new_begin) - begin(host(container(new_begin)));//, Standard());
+}
+
+//____________________________________________________________________________
+
+template <typename THost_, typename TPosition>
+inline void
+setBeginPosition(Segment<THost_, SuffixSegment> & me, TPosition new_begin)
+{
+SEQAN_CHECKPOINT
+    me.data_begin_position = new_begin;
+}
+
+//____________________________________________________________________________
+
+template <typename THost_>
+inline typename Iterator<Segment<THost_, SuffixSegment>, Standard>::Type
+end(Segment<THost_, SuffixSegment> & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return end(host(me), Standard());
+}
+template <typename THost_>
+inline typename Iterator<Segment<THost_, SuffixSegment> const, Standard>::Type
+end(Segment<THost_, SuffixSegment> const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return end(host(me), Standard());
+}
+
+//____________________________________________________________________________
+
+
+template <typename THost_>
+inline typename Position<Segment<THost_, SuffixSegment> >::Type
+endPosition(Segment<THost_, SuffixSegment> & me)
+{
+SEQAN_CHECKPOINT
+    return length(host(me));
+}
+
+template <typename THost_>
+inline typename Position<Segment<THost_, SuffixSegment> const>::Type
+endPosition(Segment<THost_, SuffixSegment> const & me)
+{
+SEQAN_CHECKPOINT
+    return length(host(me));
+}
+
+//____________________________________________________________________________
+
+template <typename TIterator, typename THost_>
+inline void
+setEnd(Segment<THost_, SuffixSegment> &, TIterator)
+{
+}
+
+template <typename THost_, typename TSize>
+inline void
+_setLength(Segment<THost_, SuffixSegment> &, TSize)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Metafunction.Suffix:
+..summary:Suffix sequence type.
+..signature:Suffix<T>::Type
+..param.T:A sequence type.
+...type:Class.String
+..returns.param.Type:The suffix type.
+..see:Spec.SuffixSegment
+..see:Metafunction.Infix
+..see:Metafunction.Prefix
+..include:seqan/sequence.h
+*/
+
+struct PrefixSegment;
+struct InfixSegment;
+
+template <typename THost>
+struct Suffix
+{
+    typedef Segment<THost, SuffixSegment> Type;
+};
+
+template <typename THost>
+struct Suffix< Segment<THost, InfixSegment> >
+{
+    typedef Segment<THost, InfixSegment> Type;
+};
+template <typename THost>
+struct Suffix< Segment<THost, SuffixSegment> >
+{
+    typedef Segment<THost, SuffixSegment> Type;
+};
+template <typename THost>
+struct Suffix< Segment<THost, PrefixSegment> >
+{
+    typedef Segment<THost, InfixSegment> Type;
+};
+
+template <typename THost, typename TSpec>
+struct Suffix< Segment<THost, TSpec> const >:
+    Suffix< Segment<THost, TSpec> > {};
+
+template <typename THost>
+struct Suffix<THost &>:
+    Suffix<THost> {};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost, typename TPosition>
+inline void
+set(Segment<THost, SuffixSegment> & me,
+    THost & host_,
+    TPosition begin_)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host_);
+    setBeginPosition(me, begin_);
+}
+//____________________________________________________________________________
+
+template <typename THost>
+inline void
+set(Segment<THost, SuffixSegment> & me,
+    THost & host_)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host_);
+    setBegin(me, begin(host_, Standard()));
+}
+
+//____________________________________________________________________________
+
+template <typename THost, typename TSpec>
+inline void
+set(Segment<THost, SuffixSegment> & me,
+    Segment<THost, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host(source));
+    setBeginPosition(me, beginPosition(source));
+}
+
+template <typename THost, typename TSpec>
+inline void
+set(Segment<THost, SuffixSegment> & me,
+    Segment<THost, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+    setHost(me, host(source));
+    setBeginPosition(me, beginPosition(source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline bool
+atBegin(Segment<THost, SuffixSegment> const & segment)
+{
+SEQAN_CHECKPOINT
+    return (beginPosition(segment) == 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline bool
+atEnd(Segment<THost, SuffixSegment> const & segment)
+{
+SEQAN_CHECKPOINT
+    return (beginPosition(segment) == length(host(segment)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline void
+goBegin(Segment<THost, SuffixSegment> & segment,
+        THost &)
+{
+SEQAN_CHECKPOINT
+    goBegin(segment);
+}
+
+template <typename THost>
+inline void
+goBegin(Segment<THost, SuffixSegment> & segment)
+{
+    setBegin(segment);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline void
+goEnd(Segment<THost, SuffixSegment> & segment,
+      THost &)
+{
+SEQAN_CHECKPOINT
+    goEnd(segment);
+}
+
+template <typename THost>
+inline void
+goEnd(Segment<THost, SuffixSegment> & segment)
+{
+    setBegin(segment, length(host(segment))-1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline Segment<THost, SuffixSegment> &
+operator ++(Segment<THost, SuffixSegment> & segment)
+{
+    setBegin(segment, beginPosition(segment) + 1);
+    return segment;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename THost>
+inline Segment<THost, SuffixSegment> &
+operator --(Segment<THost, SuffixSegment> & segment)
+{
+    setBegin(segment, beginPosition(segment) - 1);
+    return segment;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.suffix:
+..cat:Containers
+..summary:Creates suffix object.
+..signature:suffix(host, begin)
+..remarks:Note that a suffix of a @Class.Segment@ object is an @Spec.SuffixSegment@ object having the same host type.
+..param.host:The complete sequence.
+...type:Class.String
+...type:Adaption.char array
+..param.begin:Position or iterator of the first element of the segment.
+...type:Metafunction.Position
+...type:Metafunction.Iterator
+..returns:The suffix of $host that begins at $begin$.
+...remarks:The type of the suffix is given by @Metafunction.Suffix at .
+..remarks:Notational sugar.
+..see:Spec.SuffixSegment
+..see:Function.infix
+..see.Metafunction.Suffix
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TPosBegin>
+inline typename Suffix<T>::Type
+suffix(T & t, TPosBegin pos_begin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<T>::Type(t, pos_begin);
+}
+template <typename T, typename TPosBegin>
+inline typename Suffix<T const>::Type
+suffix(T const & t, TPosBegin pos_begin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<T const>::Type(t, pos_begin);
+}
+
+template <typename T, typename TPosBegin>
+inline typename Suffix<T *>::Type
+suffix(T * t, TPosBegin pos_begin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<T *>::Type (t, pos_begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// A suffix of a prefix -> is an infix
+template <typename T, typename TPosBegin>
+inline typename Suffix<Segment<T, PrefixSegment> >::Type
+suffix(Segment<T, PrefixSegment> & t, TPosBegin pos_begin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, PrefixSegment> >::Type (
+        host(t),
+        beginPosition(t) + pos_begin,
+        endPosition(t));
+}
+template <typename T, typename TPosBegin>
+inline typename Suffix<Segment<T, PrefixSegment> const>::Type
+suffix(Segment<T, PrefixSegment> const & t, TPosBegin pos_begin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, PrefixSegment> const>::Type (
+        host(t),
+        beginPosition(t) + pos_begin,
+        endPosition(t));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// A suffix of a infix -> is an infix
+template <typename T, typename TPosBegin>
+inline typename Suffix<Segment<T, InfixSegment> >::Type
+suffix(Segment<T, InfixSegment> & t, TPosBegin pos_begin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, InfixSegment> >::Type (
+        host(t),
+        beginPosition(t) + pos_begin,
+        endPosition(t));
+}
+template <typename T, typename TPosBegin>
+inline typename Suffix<Segment<T, InfixSegment> const>::Type
+suffix(Segment<T, InfixSegment> const & t, TPosBegin pos_begin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, InfixSegment> const>::Type (
+        host(t),
+        beginPosition(t) + pos_begin,
+        endPosition(t));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// A suffix of a suffix -> is a suffix
+template <typename T, typename TPosBegin>
+inline typename Suffix<Segment<T, SuffixSegment> >::Type
+suffix(Segment<T, SuffixSegment> & t, TPosBegin pos_begin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, SuffixSegment> >::Type (
+        host(t),
+        beginPosition(t) + pos_begin);
+}
+template <typename T, typename TPosBegin>
+inline typename Suffix<Segment<T, SuffixSegment> const>::Type
+suffix(Segment<T, SuffixSegment> const & t, TPosBegin pos_begin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, SuffixSegment> const>::Type (
+        host(t),
+        beginPosition(t) + pos_begin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// suffix() with iterators
+
+template <typename T, typename TIterSpec>
+inline typename Suffix<T>::Type
+suffix(T & t,
+       Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterBegin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<T>::Type(t, iterBegin);
+}
+template <typename T, typename TIterSpec>
+inline typename Suffix<T const>::Type
+suffix(T const & t,
+       Iter<Segment<T, PrefixSegment> const, TIterSpec> const & iterBegin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<T const>::Type(t, iterBegin);
+}
+
+template <typename T>
+inline typename Suffix<T *>::Type
+suffix(T * t,
+       T * & iterBegin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<T *>::Type (t, iterBegin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// A suffix of a prefix -> is an infix
+template <typename T, typename TIterSpec>
+inline typename Suffix<Segment<T, PrefixSegment> >::Type
+suffix(Segment<T, PrefixSegment> & t,
+       Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterBegin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, PrefixSegment> >::Type (
+        host(t),
+        iterBegin,
+        end(t));
+}
+template <typename T, typename TIterSpec>
+inline typename Suffix<Segment<T, PrefixSegment> const>::Type
+suffix(Segment<T, PrefixSegment> const & t,
+       Iter<Segment<T, PrefixSegment> const, TIterSpec> const & iterBegin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, PrefixSegment> const>::Type (
+        host(t),
+        iterBegin,
+        end(t));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// A suffix of a infix -> is an infix
+template <typename T, typename TIterSpec>
+inline typename Suffix<Segment<T, InfixSegment> >::Type
+suffix(Segment<T, InfixSegment> & t,
+       Iter<Segment<T, InfixSegment>, TIterSpec> const & iterBegin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, InfixSegment> >::Type (
+        host(t),
+        iterBegin,
+        end(t));
+}
+template <typename T, typename TIterSpec>
+inline typename Suffix<Segment<T, InfixSegment> const>::Type
+suffix(Segment<T, InfixSegment> const & t,
+       Iter<Segment<T, InfixSegment> const, TIterSpec> const & iterBegin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, InfixSegment> const>::Type (
+        host(t),
+        iterBegin,
+        end(t));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// A suffix of a suffix -> is a suffix
+template <typename T, typename TIterSpec>
+inline typename Suffix<Segment<T, SuffixSegment> >::Type
+suffix(Segment<T, SuffixSegment> & t,
+       Iter<Segment<T, SuffixSegment>, TIterSpec> const & iterBegin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, SuffixSegment> >::Type (
+        host(t),
+        iterBegin);
+}
+template <typename T, typename TIterSpec>
+inline typename Suffix<Segment<T, SuffixSegment> const>::Type
+suffix(Segment<T, SuffixSegment> const & t,
+       Iter<Segment<T, SuffixSegment> const, TIterSpec> const & iterBegin)
+{
+SEQAN_CHECKPOINT
+    return typename Suffix<Segment<T, SuffixSegment> const>::Type (
+        host(t),
+        iterBegin);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/sequence_concatenator.h b/src/SeqAn-1.3/seqan/sequence/sequence_concatenator.h
new file mode 100644
index 0000000..b0c93d8
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/sequence_concatenator.h
@@ -0,0 +1,255 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// A lightweight wrapper object around StringSet objects that makes the
+// behave like ConcatDirect StringSets.  This mainly affects the Iterator
+// metafunction and iterator-related functions such as begin(), end().
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_STRING_SET_CONCATENATOR_H_
+#define SEQAN_SEQUENCE_STRING_SET_CONCATENATOR_H_
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+/**
+.Class.ConcatenatorManyToOne:
+..summary:A sequence class that virtually concatenates all sequences in a @Class.StringSet at .
+..cat:Sequences
+..signature:ConcatenatorManyToOne<TStringSet>
+..param.TStringSet:The @Class.StringSet@ type.
+...type:Class.StringSet
+..remarks:This container can be iterated like the concatenation string of all sequences in a @Class.StringSet at .
+..remarks:This container only is a lightweight hull around a @Class.StringSet at . The iteration is handled by @Spec.ConcatVirtual Iterator at .
+..remarks:Note that accessing an element by index through $operator[]$ conducts a binary search and should be avoided. Use the @Spec.ConcatDirect@ specialization of @Class.StringSet@ for random access or only use sequential access through iterators.
+..include:seqan/sequence.h
+.Memfunc.ConcatenatorManyToOne#ConcatenatorManyToOne
+..summary:Constructor
+..signature:ConcatenatorManyToOne<TStringSet> (stringSet)
+..param.stringSet:The @Class.StringSet@ object to be concatenated.
+..class:Class.ConcatenatorManyToOne
+ */
+template <typename TStringSet>
+class ConcatenatorManyToOne
+{
+public:
+    // TODO(holtgrew): Why is this no holder? const-holder problem?
+    TStringSet * set;
+    ConcatenatorManyToOne() {}
+    ConcatenatorManyToOne(TStringSet & _set) : set(&_set) {}
+
+    template <typename TPos>
+    inline typename Reference<ConcatenatorManyToOne>::Type
+    operator[] (TPos pos)
+    {
+        SEQAN_CHECKPOINT;
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<ConcatenatorManyToOne const>::Type
+    operator[] (TPos pos) const
+    {
+        SEQAN_CHECKPOINT;
+        return value(*this, pos);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Metafunction Iterator
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec >
+struct Iterator<ConcatenatorManyToOne<StringSet<TString, TSpec> >, Standard>
+{
+    typedef Iter<StringSet<TString, TSpec>, ConcatVirtual<> > Type;
+};
+
+template <typename TString, typename TSpec >
+struct Iterator<ConcatenatorManyToOne<StringSet<TString, TSpec> const>, Standard>
+{
+    typedef Iter<StringSet<TString, TSpec> const, ConcatVirtual<> > Type;
+};
+
+template <typename TStringSet >
+struct Iterator<ConcatenatorManyToOne<TStringSet> const, Standard>
+{
+    typedef typename Iterator<ConcatenatorManyToOne<TStringSet>, Standard>::Type Type;
+};
+
+template <typename TString, typename TSpec >
+struct Iterator<ConcatenatorManyToOne<StringSet<TString, TSpec> >, Rooted>
+{
+    typedef Iter<StringSet<TString, TSpec>, ConcatVirtual<> > Type;
+};
+
+template <typename TString, typename TSpec >
+struct Iterator<ConcatenatorManyToOne<StringSet<TString, TSpec> const>, Rooted>
+{
+    typedef Iter<StringSet<TString, TSpec> const, ConcatVirtual<> > Type;
+};
+
+template <typename TStringSet >
+struct Iterator<ConcatenatorManyToOne<TStringSet> const, Rooted>
+{
+    typedef typename Iterator<ConcatenatorManyToOne<TStringSet>, Rooted>::Type Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction Value
+// --------------------------------------------------------------------------
+
+template <typename TStringSet>
+struct Value<ConcatenatorManyToOne<TStringSet> >
+{
+    typedef typename Value<typename Value<TStringSet>::Type >::Type Type;
+};
+
+template <typename TStringSet>
+struct Value<ConcatenatorManyToOne<TStringSet> const >
+    : Value<ConcatenatorManyToOne<TStringSet> > {};
+
+// --------------------------------------------------------------------------
+// Metafunction Size
+// --------------------------------------------------------------------------
+
+template <typename TStringSet>
+struct Size<ConcatenatorManyToOne<TStringSet> >
+{
+    typedef typename Size<typename Value<TStringSet>::Type >::Type Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction AllowsFastRandomAccess
+// --------------------------------------------------------------------------
+
+template <typename TStringSet>
+struct AllowsFastRandomAccess<ConcatenatorManyToOne<TStringSet> >
+{
+    typedef False Type;
+    enum { VALUE = false };
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function value()
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TPos >
+inline typename Reference<ConcatenatorManyToOne<TStringSet> >::Type
+value(ConcatenatorManyToOne<TStringSet> & me, TPos globalPos)
+{
+    Pair<unsigned, typename Size<typename Value<TStringSet>::Type >::Type> localPos;
+    posLocalize(localPos, globalPos, stringSetLimits(*me.set));
+    return value(value(*me.set, getValueI1(localPos)), getValueI2(localPos));
+}
+
+template <typename TStringSet, typename TPos >
+inline typename Reference<ConcatenatorManyToOne<TStringSet> const >::Type
+value(ConcatenatorManyToOne<TStringSet> const & me, TPos globalPos)
+{
+    typedef typename Value<TStringSet>::Type TString;
+    Pair<unsigned, typename Size<TString>::Type> localPos;
+    posLocalize(localPos, globalPos, stringSetLimits(*me.set));
+    return value(value(*(TStringSet const*)me.set, getValueI1(localPos)), getValueI2(localPos));
+}
+
+// --------------------------------------------------------------------------
+// Function length()
+// --------------------------------------------------------------------------
+
+template <typename TStringSet >
+inline typename Size<ConcatenatorManyToOne<TStringSet> >::Type
+length(ConcatenatorManyToOne<TStringSet> const & me)
+{
+    return lengthSum(*me.set);
+}
+
+// --------------------------------------------------------------------------
+// Function begin()
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec >
+inline typename Iterator<ConcatenatorManyToOne<TStringSet const>, Tag<TSpec> const>::Type
+begin(ConcatenatorManyToOne<TStringSet const> concat, Tag<TSpec> const &)
+{
+    typedef typename Iterator<ConcatenatorManyToOne<TStringSet const>, Tag<TSpec> const>::Type TIter;
+    return TIter(*concat.set);
+}
+
+template <typename TStringSet, typename TSpec >
+inline typename Iterator<ConcatenatorManyToOne<TStringSet>, Tag<TSpec> const>::Type
+begin(ConcatenatorManyToOne<TStringSet> concat, Tag<TSpec> const &)
+{
+    typedef typename Iterator<ConcatenatorManyToOne<TStringSet>, Tag<TSpec> const>::Type TIter;
+    return TIter(*concat.set);
+}
+
+// --------------------------------------------------------------------------
+// Function end()
+// --------------------------------------------------------------------------
+
+template <typename TStringSet, typename TSpec >
+inline typename Iterator<ConcatenatorManyToOne<TStringSet const>, Tag<TSpec> const>::Type
+end(ConcatenatorManyToOne<TStringSet const> concat, Tag<TSpec> const &)
+{
+    typedef typename Iterator<ConcatenatorManyToOne<TStringSet>, Tag<TSpec> const >::Type TIter;
+    return TIter(*concat.set, length(*concat.set), 0);
+}
+
+template <typename TStringSet, typename TSpec >
+inline typename Iterator<ConcatenatorManyToOne<TStringSet>, Tag<TSpec> const>::Type
+end(ConcatenatorManyToOne<TStringSet> concat, Tag<TSpec> const &)
+{
+    typedef typename Iterator<ConcatenatorManyToOne<TStringSet>, Tag<TSpec> const>::Type TIter;
+    return TIter(*concat.set, length(*concat.set), 0);
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_STRING_SET_CONCATENATOR_H_
diff --git a/src/SeqAn-1.3/seqan/sequence/sequence_forwards.h b/src/SeqAn-1.3/seqan/sequence/sequence_forwards.h
new file mode 100644
index 0000000..3a10ae3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/sequence_forwards.h
@@ -0,0 +1,84 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Manual forwards for the sequence module.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_FORWARDS_H
+#define SEQAN_HEADER_SEQUENCE_FORWARDS_H
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+// TODO(holtgrew): Still required since we dropped support for VS2003?
+// Workaround (copied from generated forwards) for VS 2003.
+#if defined(_MSC_VER) && (_MSC_VER < 1400)
+template <unsigned int SPACE > struct Block;        // "projects\library\seqan/sequence\string_stack.h"(48)
+template <typename THostspec > struct Packed;           // "projects\library\seqan/sequence\string_packed.h"(33)
+template <typename TValue, typename TSpec > class String;           // "projects\library\seqan/sequence\string_base.h"(54)
+template <typename TString, typename TSpec > class StringSet;           // "projects\library\seqan/sequence\sequence_multiple.h"(98)
+
+template <typename TValue, typename THostspec, typename TTag> inline typename Iterator<String<TValue, Packed<THostspec> >, Tag<TTag> const>::Type end(String<TValue, Packed<THostspec> > & me, Tag<TTag> const tag_);           // "projects\library\seqan/sequence\string_packed.h"(470)
+template <typename TValue, typename THostspec, typename TTag> inline typename Iterator<String<TValue, Packed<THostspec> > const, Tag<TTag> const>::Type end(String<TValue, Packed<THostspec> > const & me, Tag<TTag> const tag_);           // "projects\library\seqan/sequence\string_packed.h"(478)
+template <typename TValue, unsigned int SPACE, typename TSpec> inline typename Iterator<String<TValue, Block<SPACE> >, Tag<TSpec> const >::Type end(String<TValue, Block<SPACE> > & me, Tag<TSpec> const);           // "projects\library\seqan/sequence\string_stack.h"(209)
+template <typename TValue, unsigned int SPACE, typename TSpec> inline typename Iterator<String<TValue, Block<SPACE> > const, Tag<TSpec> const>::Type end(String<TValue, Block<SPACE> > const & me, Tag<TSpec> const);        // "projects\library\seqan/sequence\string_stack.h"(217)
+template <typename TString, typename TSpec, typename TTag> inline typename Iterator< StringSet< TString, TSpec >, Tag<TTag> const>::Type end(StringSet< TString, TSpec > & me, Tag<TTag> const tag);        // "projects\library\seqan/sequence\sequence_multiple.h"(1398)
+template <typename TString, typename TSpec, typename TTag> inline typename Iterator< StringSet< TString, TSpec > const, Tag<TTag> const>::Type end(StringSet< TString, TSpec > const & me, Tag<TTag> const tag);        // "projects\library\seqan/sequence\sequence_multiple.h"(1405)
+#endif  // defined(_MSC_VER) && (_MSC_VER < 1400)
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TData>
+void read(TFile & file, TData & data);          // "projects/library/seqan/file/file_format_raw.h"(307)
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFile, typename TData>
+void write(TFile & file, TData & data);         // "projects/library/seqan/file/file_format_raw.h"(327)
+
+template <typename TFile, typename TData>
+void write(TFile & file, TData const & data);   // "projects/library/seqan/file/file_format_raw.h"(335)
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/sequence/sequence_generated_forwards.h b/src/SeqAn-1.3/seqan/sequence/sequence_generated_forwards.h
new file mode 100644
index 0000000..7f35f87
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/sequence_generated_forwards.h
@@ -0,0 +1,2138 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SEQUENCE_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_SEQUENCE_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Alloc
+
+template <typename TSpec > struct Alloc;       	// "projects/library/seqan/sequence/string_base.h"(51)
+
+//____________________________________________________________________________
+// AppendSequenceToSegment_
+
+template <typename TExpand> struct AppendSequenceToSegment_;       	// "projects/library/seqan/sequence/segment_base.h"(758)
+
+//____________________________________________________________________________
+// AppendString_
+
+template <typename TExpand> struct AppendString_;       	// "projects/library/seqan/sequence/string_base.h"(1085)
+
+//____________________________________________________________________________
+// AppendValueToSegment_
+
+template <typename TExpand> struct AppendValueToSegment_;       	// "projects/library/seqan/sequence/segment_base.h"(920)
+
+//____________________________________________________________________________
+// AppendValueToString_
+
+template <typename TExpand> struct AppendValueToString_;       	// "projects/library/seqan/sequence/string_base.h"(1202)
+
+//____________________________________________________________________________
+// AssignSegment_
+
+template <typename TExpand> struct AssignSegment_;       	// "projects/library/seqan/sequence/segment_base.h"(519)
+
+//____________________________________________________________________________
+// AssignString_
+
+template <typename TExpand> struct AssignString_;       	// "projects/library/seqan/sequence/string_base.h"(859)
+
+//____________________________________________________________________________
+// ClearSpaceExpandStringBase_
+
+template <typename TExpand> struct ClearSpaceExpandStringBase_;       	// "projects/library/seqan/sequence/string_base.h"(519)
+
+//____________________________________________________________________________
+// ClearSpaceStringBase_
+
+template <typename TExpand> struct ClearSpaceStringBase_;       	// "projects/library/seqan/sequence/string_base.h"(307)
+
+//____________________________________________________________________________
+// Comparator
+
+template <typename T> struct Comparator;       	// "projects/library/seqan/sequence/sequence_lexical.h"(200)
+
+//____________________________________________________________________________
+// DefaultPrefixOrder
+
+template <typename T> struct DefaultPrefixOrder;       	// "projects/library/seqan/sequence/sequence_lexical.h"(76)
+
+//____________________________________________________________________________
+// Infix
+
+template <typename THost> struct Infix;       	// "projects/library/seqan/sequence/segment_infix.h"(476)
+
+//____________________________________________________________________________
+// InfixSegment
+
+struct InfixSegment;       	// "projects/library/seqan/sequence/segment_base.h"(61)
+struct InfixSegment;       	// "projects/library/seqan/sequence/segment_suffix.h"(368)
+struct InfixSegment;       	// "projects/library/seqan/sequence/segment_prefix.h"(370)
+
+//____________________________________________________________________________
+// InsertValueToSegment_
+
+template <typename TExpand> struct InsertValueToSegment_;       	// "projects/library/seqan/sequence/segment_base.h"(962)
+
+//____________________________________________________________________________
+// InsertValueToString_
+
+template <typename TExpand> struct InsertValueToString_;       	// "projects/library/seqan/sequence/string_base.h"(1249)
+
+//____________________________________________________________________________
+// Lexical
+
+template <typename TSpec > struct Lexical;       	// "projects/library/seqan/sequence/sequence_lexical.h"(136)
+
+//____________________________________________________________________________
+// Prefix
+
+template <typename THost> struct Prefix;       	// "projects/library/seqan/sequence/segment_prefix.h"(375)
+
+//____________________________________________________________________________
+// PrefixSegment
+
+struct PrefixSegment;       	// "projects/library/seqan/sequence/segment_suffix.h"(367)
+struct PrefixSegment;       	// "projects/library/seqan/sequence/segment_prefix.h"(67)
+
+//____________________________________________________________________________
+// ReplaceSequenceToSegment_
+
+template <typename TExpand> struct ReplaceSequenceToSegment_;       	// "projects/library/seqan/sequence/segment_base.h"(1015)
+
+//____________________________________________________________________________
+// ReplaceString_
+
+template <typename TExpand> struct ReplaceString_;       	// "projects/library/seqan/sequence/string_base.h"(1288)
+
+//____________________________________________________________________________
+// Segment
+
+template <typename THost, typename TSpec > class Segment;       	// "projects/library/seqan/sequence/segment_base.h"(65)
+
+//____________________________________________________________________________
+// SegmentSetImpl_
+
+template <typename TSameSpec, typename TTargetInfix> struct SegmentSetImpl_;       	// "projects/library/seqan/sequence/segment_base.h"(315)
+
+//____________________________________________________________________________
+// String
+
+template <typename TValue, typename TSpec > class String;       	// "projects/library/seqan/sequence/string_base.h"(71)
+template <typename TAlphabet, typename TSpec> class String;       	// "projects/library/seqan/sequence/string_base.h"(146)
+
+//____________________________________________________________________________
+// StringSet
+
+template <typename TString, typename TSpec> class StringSet;       	// "projects/library/seqan/sequence/string_base.h"(147)
+
+//____________________________________________________________________________
+// Suffix
+
+template <typename THost> struct Suffix;       	// "projects/library/seqan/sequence/segment_suffix.h"(372)
+
+//____________________________________________________________________________
+// SuffixSegment
+
+struct SuffixSegment;       	// "projects/library/seqan/sequence/segment_suffix.h"(66)
+struct SuffixSegment;       	// "projects/library/seqan/sequence/segment_prefix.h"(371)
+
+//____________________________________________________________________________
+// TagPrefixGreater_
+
+struct TagPrefixGreater_;       	// "projects/library/seqan/sequence/sequence_lexical.h"(60)
+
+//____________________________________________________________________________
+// TagPrefixLess_
+
+struct TagPrefixLess_;       	// "projects/library/seqan/sequence/sequence_lexical.h"(57)
+
+//____________________________________________________________________________
+// TempCopy_
+
+template <typename T> struct TempCopy_;       	// "projects/library/seqan/sequence/string_base.h"(125)
+
+//____________________________________________________________________________
+// _Resize_String
+
+template <typename TExpand> struct _Resize_String;       	// "projects/library/seqan/sequence/string_base.h"(1620)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// AllowsFastRandomAccess
+
+template <typename T> struct AllowsFastRandomAccess;       	// "projects/library/seqan/sequence/sequence_interface.h"(209)
+
+//____________________________________________________________________________
+// Array
+
+template <unsigned int LENGTH> struct Array;       	// "projects/library/seqan/sequence/string_array.h"(66)
+
+//____________________________________________________________________________
+// AssignStringToStringArray_
+
+template <typename TExpand, bool IS_CONTIGUOUS> struct AssignStringToStringArray_;       	// "projects/library/seqan/sequence/string_cstyle.h"(528)
+
+//____________________________________________________________________________
+// Block
+
+template <unsigned int SPACE > struct Block;       	// "projects/library/seqan/sequence/string_block.h"(52)
+
+//____________________________________________________________________________
+// CStyle
+
+struct CStyle;       	// "projects/library/seqan/sequence/string_cstyle.h"(93)
+
+//____________________________________________________________________________
+// ClearSpaceStringPacked_
+
+template <typename TExpand> struct ClearSpaceStringPacked_;       	// "projects/library/seqan/sequence/string_packed.h"(594)
+
+//____________________________________________________________________________
+// ConcatDirect
+
+template <typename TDelimiter > struct ConcatDirect;       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(53)
+
+//____________________________________________________________________________
+// ConcatVirtual
+
+template <typename TDelimiter > struct ConcatVirtual;       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(58)
+
+//____________________________________________________________________________
+// Concatenator
+
+template <typename T> struct Concatenator;       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(51)
+template <typename TObject> struct Concatenator;       	// "projects/library/seqan/sequence/string_set_base.h"(89)
+
+//____________________________________________________________________________
+// ConcatenatorManyToOne
+
+template <typename TStringSet> class ConcatenatorManyToOne;       	// "projects/library/seqan/sequence/sequence_concatenator.h"(72)
+
+//____________________________________________________________________________
+// CreateArrayStringExpand_
+
+template <typename TExpand> struct CreateArrayStringExpand_;       	// "projects/library/seqan/sequence/string_cstyle.h"(632)
+
+//____________________________________________________________________________
+// CreateArrayString_
+
+template <typename TExpand> struct CreateArrayString_;       	// "projects/library/seqan/sequence/string_cstyle.h"(685)
+
+//____________________________________________________________________________
+// DefaultOverflowExplicit
+
+template <typename T> struct DefaultOverflowExplicit;       	// "projects/library/seqan/sequence/sequence_interface.h"(138)
+template <typename TValue> struct DefaultOverflowExplicit;       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(92)
+
+//____________________________________________________________________________
+// DefaultOverflowImplicit
+
+template <typename T> struct DefaultOverflowImplicit;       	// "projects/library/seqan/sequence/sequence_interface.h"(115)
+template <typename TValue> struct DefaultOverflowImplicit;       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(61)
+
+//____________________________________________________________________________
+// Dependent
+
+template <typename TSpec > struct Dependent;       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(70)
+
+//____________________________________________________________________________
+// GetSequenceByNo
+
+template <typename TString> struct GetSequenceByNo;       	// "projects/library/seqan/sequence/string_set_base.h"(155)
+
+//____________________________________________________________________________
+// HostIterator
+
+template <typename T> struct HostIterator;       	// "projects/library/seqan/sequence/string_packed.h"(825)
+
+//____________________________________________________________________________
+// IsContiguous
+
+template <typename T> struct IsContiguous;       	// "projects/library/seqan/sequence/sequence_interface.h"(161)
+template <typename TValue> struct IsContiguous;       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(118)
+
+//____________________________________________________________________________
+// IsSequence
+
+template <typename T> struct IsSequence;       	// "projects/library/seqan/sequence/sequence_interface.h"(185)
+
+//____________________________________________________________________________
+// Owner
+
+template <typename TSpec > struct Owner;       	// "projects/library/seqan/sequence/string_set_base.h"(50)
+
+//____________________________________________________________________________
+// Packed
+
+template <typename THostspec > struct Packed;       	// "projects/library/seqan/sequence/string_packed.h"(51)
+
+//____________________________________________________________________________
+// PackedConsts_
+
+template <typename TPackedContainer> struct PackedConsts_;       	// "projects/library/seqan/sequence/string_packed.h"(54)
+template <typename TPackedContainer> struct PackedConsts_;       	// "projects/library/seqan/sequence/string_packed.h"(272)
+
+//____________________________________________________________________________
+// StringSet
+
+template <typename TString, typename TSpec > class StringSet;       	// "projects/library/seqan/sequence/string_set_base.h"(65)
+
+//____________________________________________________________________________
+// StringSetLimits
+
+template <typename TString> struct StringSetLimits;       	// "projects/library/seqan/sequence/string_set_base.h"(113)
+
+//____________________________________________________________________________
+// StringSetPosition
+
+template <typename TString> struct StringSetPosition;       	// "projects/library/seqan/sequence/string_set_base.h"(137)
+
+//____________________________________________________________________________
+// TagExact_
+
+struct TagExact_;       	// "projects/library/seqan/sequence/sequence_interface.h"(89)
+
+//____________________________________________________________________________
+// TagGenerous_
+
+struct TagGenerous_;       	// "projects/library/seqan/sequence/sequence_interface.h"(86)
+
+//____________________________________________________________________________
+// TagInsist_
+
+struct TagInsist_;       	// "projects/library/seqan/sequence/sequence_interface.h"(79)
+
+//____________________________________________________________________________
+// TagLimit_
+
+struct TagLimit_;       	// "projects/library/seqan/sequence/sequence_interface.h"(83)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// CharString
+
+typedef String<char, Alloc<void> > CharString;       	// "projects/library/seqan/sequence/sequence_shortcuts.h"(53)
+
+//____________________________________________________________________________
+// Dna5String
+
+typedef String<Dna5, Alloc<void> > Dna5String;       	// "projects/library/seqan/sequence/sequence_shortcuts.h"(135)
+
+//____________________________________________________________________________
+// DnaString
+
+typedef String<Dna, Alloc<void> > DnaString;       	// "projects/library/seqan/sequence/sequence_shortcuts.h"(106)
+
+//____________________________________________________________________________
+// IupacString
+
+typedef String<Iupac, Alloc<void> > IupacString;       	// "projects/library/seqan/sequence/sequence_shortcuts.h"(222)
+
+//____________________________________________________________________________
+// Peptide
+
+typedef String<AminoAcid, Alloc<void> > Peptide;       	// "projects/library/seqan/sequence/sequence_shortcuts.h"(250)
+
+//____________________________________________________________________________
+// Rna5String
+
+typedef String<Rna5, Alloc<void> > Rna5String;       	// "projects/library/seqan/sequence/sequence_shortcuts.h"(193)
+
+//____________________________________________________________________________
+// RnaString
+
+typedef String<Rna, Alloc<void> > RnaString;       	// "projects/library/seqan/sequence/sequence_shortcuts.h"(164)
+
+//____________________________________________________________________________
+// TagPrefixGreater
+
+typedef Tag<TagPrefixGreater_> const TagPrefixGreater;       	// "projects/library/seqan/sequence/sequence_lexical.h"(61)
+
+//____________________________________________________________________________
+// TagPrefixLess
+
+typedef Tag<TagPrefixLess_> const TagPrefixLess;       	// "projects/library/seqan/sequence/sequence_lexical.h"(58)
+
+//____________________________________________________________________________
+// UnicodeString
+
+typedef String<wchar_t, Alloc<void> > UnicodeString;       	// "projects/library/seqan/sequence/sequence_shortcuts.h"(79)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// Exact
+
+typedef Tag<TagExact_> const Exact;       	// "projects/library/seqan/sequence/sequence_interface.h"(90)
+
+//____________________________________________________________________________
+// Generous
+
+typedef Tag<TagGenerous_> const Generous;       	// "projects/library/seqan/sequence/sequence_interface.h"(87)
+
+//____________________________________________________________________________
+// Insist
+
+typedef Tag<TagInsist_> const Insist;       	// "projects/library/seqan/sequence/sequence_interface.h"(80)
+
+//____________________________________________________________________________
+// Limit
+
+typedef Tag<TagLimit_> const Limit;       	// "projects/library/seqan/sequence/sequence_interface.h"(84)
+
+//____________________________________________________________________________
+// Tight
+
+typedef Tag<TagInsist_> const Tight;       	// "projects/library/seqan/sequence/sequence_interface.h"(81)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _clearSpace
+
+template <typename TValue, typename TSpec, typename TSize, typename TExpand> inline typename Size< String<TValue, TSpec> >::Type _clearSpace(String<TValue, TSpec> & me, TSize size, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(724)
+template <typename TValue, typename TSpec, typename TSize, typename TExpand> inline typename Size< String<TValue, TSpec> >::Type _clearSpace(String<TValue, TSpec> & me, TSize size, TSize limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(735)
+template <typename TValue, typename TSpec, typename TSize, typename TPosition, typename TExpand> inline typename Size< String<TValue, TSpec> >::Type _clearSpace(String<TValue, TSpec> & me, TSize size, TPosition pos_begin, TPosition pos_end, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(747)
+template <typename TValue, typename TSpec, typename TSize, typename TPosition, typename TExpand> inline typename Size< String<TValue, TSpec> >::Type _clearSpace(String<TValue, TSpec> & me, TSize size, TPosition pos_begin, TPosition pos_end, TSize limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(760)
+
+//____________________________________________________________________________
+// _internalOrdValue
+
+template <typename TValue> inline unsigned _internalOrdValue(TValue const & c);       	// "projects/library/seqan/sequence/sequence_lexical.h"(819)
+template <typename TValue, typename TSpec> inline unsigned _internalOrdValue(SimpleType<TValue, TSpec> const & c);       	// "projects/library/seqan/sequence/sequence_lexical.h"(825)
+
+//____________________________________________________________________________
+// _moveContiguous
+
+template <typename TTarget, typename TSource> void _moveContiguous(TTarget & target, TSource & source);       	// "projects/library/seqan/sequence/string_base.h"(970)
+
+//____________________________________________________________________________
+// _reallocateStorage
+
+template <typename TValue, typename TSpec, typename TSize> inline typename Value<String<TValue, TSpec> >::Type * _reallocateStorage( String<TValue, TSpec> & me, TSize new_capacity);       	// "projects/library/seqan/sequence/string_base.h"(1428)
+template <typename TValue, typename TSpec, typename TSize> inline typename Value<String<TValue, TSpec> >::Type * _reallocateStorage( String<TValue, TSpec> & me, TSize new_capacity, Exact);       	// "projects/library/seqan/sequence/string_base.h"(1439)
+template <typename TValue, typename TSpec, typename TSize, typename TSize2> inline typename Value<String<TValue, TSpec> >::Type * _reallocateStorage( String<TValue, TSpec> & me, TSize new_capacity, TSize2 limit, Exact);       	// "projects/library/seqan/sequence/string_base.h"(1456)
+template <typename TValue, typename TSpec, typename TSize> inline typename Value<String<TValue, TSpec> >::Type * _reallocateStorage( String<TValue, TSpec> & me, TSize new_capacity, Generous);       	// "projects/library/seqan/sequence/string_base.h"(1473)
+template <typename TValue, typename TSpec, typename TSize, typename TSize2> inline typename Value<String<TValue, TSpec> >::Type * _reallocateStorage( String<TValue, TSpec> & me, TSize new_capacity, TSize2 limit, Generous);       	// "projects/library/seqan/sequence/string_base.h"(1494)
+template <typename TValue, typename TSpec, typename TSize> inline typename Value<String<TValue, TSpec> >::Type * _reallocateStorage( String<TValue, TSpec> &, TSize, Insist);       	// "projects/library/seqan/sequence/string_base.h"(1512)
+template <typename TValue, typename TSpec, typename TSize, typename TSize2> inline typename Value<String<TValue, TSpec> >::Type * _reallocateStorage( String<TValue, TSpec> &, TSize, TSize2, Insist);       	// "projects/library/seqan/sequence/string_base.h"(1523)
+template <typename TValue, typename TSpec, typename TSize> inline typename Value<String<TValue, TSpec> >::Type * _reallocateStorage( String<TValue, TSpec> &, TSize, Limit);       	// "projects/library/seqan/sequence/string_base.h"(1533)
+template <typename TValue, typename TSpec, typename TSize, typename TSize2> inline typename Value<String<TValue, TSpec> >::Type * _reallocateStorage( String<TValue, TSpec> &, TSize, TSize2, Limit);       	// "projects/library/seqan/sequence/string_base.h"(1544)
+
+//____________________________________________________________________________
+// _reserveStorage
+
+template <typename TValue, typename TSpec, typename TSize_> inline void _reserveStorage( String<TValue, TSpec> & , TSize_ , Insist);       	// "projects/library/seqan/sequence/string_base.h"(1557)
+template <typename TValue, typename TSpec, typename TSize_> inline void _reserveStorage( String<TValue, TSpec> & , TSize_ , Limit);       	// "projects/library/seqan/sequence/string_base.h"(1567)
+template <typename TValue, typename TSpec, typename TSize_, typename TExpand> inline void _reserveStorage( String<TValue, TSpec> & seq, TSize_ new_capacity, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_base.h"(1577)
+
+//____________________________________________________________________________
+// _setLength
+
+template <typename THost_> inline void _setLength( Segment<THost_, InfixSegment> & me, typename Size<THost_>::Type new_length);       	// "projects/library/seqan/sequence/segment_infix.h"(421)
+template <typename THost_, typename TSize> inline void _setLength(Segment<THost_, SuffixSegment> &, TSize);       	// "projects/library/seqan/sequence/segment_suffix.h"(349)
+template <typename THost_, typename TSize> inline void _setLength( Segment<THost_, PrefixSegment> & me, TSize new_length);       	// "projects/library/seqan/sequence/segment_prefix.h"(334)
+
+//____________________________________________________________________________
+// _streamEOF
+
+template <typename TContainer, typename TSpec> inline bool _streamEOF(Iter<TContainer, TSpec> const & iter);       	// "projects/library/seqan/sequence/sequence_stream.h"(51)
+
+//____________________________________________________________________________
+// _streamGet
+
+template <typename TContainer, typename TSpec> inline typename Value<Iter<TContainer, TSpec> >::Type _streamGet(Iter<TContainer, TSpec> & source);       	// "projects/library/seqan/sequence/sequence_stream.h"(78)
+
+//____________________________________________________________________________
+// _streamPeek
+
+template <typename TContainer, typename TSpec> inline typename Value<Iter<TContainer, TSpec> >::Type _streamPeek(Iter<TContainer, TSpec> & source);       	// "projects/library/seqan/sequence/sequence_stream.h"(90)
+
+//____________________________________________________________________________
+// _streamPut
+
+template <typename TContainer, typename TSpec, typename TChar> inline void _streamPut(Iter<TContainer, TSpec> & target, TChar character);       	// "projects/library/seqan/sequence/sequence_stream.h"(101)
+
+//____________________________________________________________________________
+// _streamRead
+
+template <typename TValue, typename TContainer, typename TSpec> inline ::std::streamsize _streamRead(TValue * target, Iter<TContainer, TSpec> & source, ::std::streamsize limit);       	// "projects/library/seqan/sequence/sequence_stream.h"(63)
+
+//____________________________________________________________________________
+// _streamSeek2G
+
+template <typename TContainer, typename TSpec> inline void _streamSeek2G(Iter<TContainer, TSpec> & me, int off);       	// "projects/library/seqan/sequence/sequence_stream.h"(160)
+
+//____________________________________________________________________________
+// _streamSeekG
+
+template <typename TContainer, typename TSpec> inline void _streamSeekG(Iter<TContainer, TSpec> & me, typename Position<Iter<TContainer, TSpec> >::Type pos);       	// "projects/library/seqan/sequence/sequence_stream.h"(138)
+
+//____________________________________________________________________________
+// _streamSeekP
+
+template <typename TContainer, typename TSpec> inline void _streamSeekP(Iter<TContainer, TSpec> & me, typename Position<Iter<TContainer, TSpec> >::Type pos);       	// "projects/library/seqan/sequence/sequence_stream.h"(149)
+
+//____________________________________________________________________________
+// _streamTellG
+
+template <typename TContainer, typename TSpec> inline typename Position<Iter<TContainer, TSpec> >::Type _streamTellG(Iter<TContainer, TSpec> & me);       	// "projects/library/seqan/sequence/sequence_stream.h"(117)
+
+//____________________________________________________________________________
+// _streamTellP
+
+template <typename TContainer, typename TSpec> inline typename Position<Iter<TContainer, TSpec> >::Type _streamTellP(Iter<TContainer, TSpec> & me);       	// "projects/library/seqan/sequence/sequence_stream.h"(127)
+
+//____________________________________________________________________________
+// append
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void append( Segment<THost, TSpec> & target, TSource & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(832)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void append( Segment<THost, TSpec> & target, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(842)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void append( Segment<THost, TSpec> & target, TSource & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(854)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void append( Segment<THost, TSpec> & target, TSource const & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(865)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void append( Segment<THost, TSpec> const & target, TSource & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(876)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void append( Segment<THost, TSpec> const & target, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(886)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void append( Segment<THost, TSpec> const & target, TSource & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(898)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void append( Segment<THost, TSpec> const & target, TSource const & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(909)
+template <typename TTargetValue, typename TTargetSpec, typename TSource, typename TExpand> inline void append(String<TTargetValue, TTargetSpec> & target, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1150)
+template <typename TTargetValue, typename TTargetSpec, typename TSource, typename TExpand> inline void append(String<TTargetValue, TTargetSpec> & target, TSource const & source, typename Size< String<TTargetValue, TTargetSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1162)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TExpand> inline void append(String<TTargetValue, TTargetSpec> & target, TSourceValue * source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1176)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TExpand> inline void append(String<TTargetValue, TTargetSpec> & target, TSourceValue * source, typename Size< String<TTargetValue, TTargetSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1188)
+
+//____________________________________________________________________________
+// appendValue
+
+template <typename THost, typename TSpec, typename TValue, typename TExpand> inline void appendValue(Segment<THost, TSpec> & me, TValue const & _value, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(942)
+template <typename THost, typename TSpec, typename TValue, typename TExpand> inline void appendValue(Segment<THost, TSpec> const & me, TValue const & _value, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(951)
+template <typename TTargetValue, typename TTargetSpec, typename TValue, typename TExpand> inline void appendValue(String<TTargetValue, TTargetSpec> & me, TValue const & _value, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1234)
+
+//____________________________________________________________________________
+// assign
+
+template <typename THost, typename TSpec, typename TSource> inline void assign(Segment<THost, TSpec> & target, TSource & source);       	// "projects/library/seqan/sequence/segment_base.h"(479)
+template <typename THost, typename TSpec, typename TSource> inline void assign(Segment<THost, TSpec> & target, TSource const & source);       	// "projects/library/seqan/sequence/segment_base.h"(488)
+template <typename THost, typename TSpec, typename TSource> inline void assign(Segment<THost, TSpec> const & target, TSource & source);       	// "projects/library/seqan/sequence/segment_base.h"(500)
+template <typename THost, typename TSpec, typename TSource> inline void assign(Segment<THost, TSpec> const & target, TSource const & source);       	// "projects/library/seqan/sequence/segment_base.h"(509)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void assign(Segment<THost, TSpec> & target, TSource & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(618)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void assign(Segment<THost, TSpec> & target, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(627)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void assign(Segment<THost, TSpec> & target, TSource & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(638)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void assign(Segment<THost, TSpec> & target, TSource const & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(648)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void assign(Segment<THost, TSpec> const & target, TSource & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(660)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void assign(Segment<THost, TSpec> const & target, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(669)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void assign(Segment<THost, TSpec> const & target, TSource & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(680)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void assign(Segment<THost, TSpec> const & target, TSource const & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(690)
+template <typename TTargetValue, typename TTargetSpec, typename TSource> inline void assign(String<TTargetValue, TTargetSpec> & target, TSource & source);       	// "projects/library/seqan/sequence/string_base.h"(840)
+template <typename TTargetValue, typename TTargetSpec, typename TSource> inline void assign(String<TTargetValue, TTargetSpec> & target, TSource const & source);       	// "projects/library/seqan/sequence/string_base.h"(849)
+template <typename TTargetValue, typename TTargetSpec, typename TSource, typename TExpand> inline void assign(String<TTargetValue, TTargetSpec> & target, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(918)
+template <typename TTargetValue, typename TTargetSpec, typename TSource, typename TSize, typename TExpand> inline void assign(String<TTargetValue, TTargetSpec> & target, TSource const & source, TSize limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(928)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TExpand> inline void assign(String<TTargetValue, TTargetSpec> & target, TSourceValue const * source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(941)
+template <typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TSize, typename TExpand> inline void assign(String<TTargetValue, TTargetSpec> & target, TSourceValue const * source, TSize limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(951)
+
+//____________________________________________________________________________
+// assignValue
+
+template <typename TValue, typename TSpec, typename TValue2> inline void assignValue(String<TValue, TSpec> & , TValue2 const & );       	// "projects/library/seqan/sequence/string_base.h"(821)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename THost> inline bool atBegin(Segment<THost, InfixSegment> & segment);       	// "projects/library/seqan/sequence/segment_infix.h"(579)
+template <typename THost> inline bool atBegin(Segment<THost, InfixSegment> const & segment);       	// "projects/library/seqan/sequence/segment_infix.h"(586)
+template <typename THost> inline bool atBegin(Segment<THost, SuffixSegment> const & segment);       	// "projects/library/seqan/sequence/segment_suffix.h"(451)
+template <typename THost> inline bool atBegin(Segment<THost, PrefixSegment> const & segment);       	// "projects/library/seqan/sequence/segment_prefix.h"(454)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename THost> inline bool atEnd(Segment<THost, InfixSegment> & segment);       	// "projects/library/seqan/sequence/segment_infix.h"(596)
+template <typename THost> inline bool atEnd(Segment<THost, InfixSegment> const & segment);       	// "projects/library/seqan/sequence/segment_infix.h"(603)
+template <typename THost> inline bool atEnd(Segment<THost, SuffixSegment> const & segment);       	// "projects/library/seqan/sequence/segment_suffix.h"(461)
+template <typename THost> inline bool atEnd(Segment<THost, PrefixSegment> const & segment);       	// "projects/library/seqan/sequence/segment_prefix.h"(464)
+
+//____________________________________________________________________________
+// begin
+
+template <typename THost_> inline typename Iterator<Segment<THost_, InfixSegment>, Standard>::Type begin(Segment<THost_, InfixSegment> & me, Standard);       	// "projects/library/seqan/sequence/segment_infix.h"(237)
+template <typename THost_> inline typename Iterator<Segment<THost_, InfixSegment> const, Standard>::Type begin(Segment<THost_, InfixSegment> const & me, Standard);       	// "projects/library/seqan/sequence/segment_infix.h"(245)
+template <typename THost_> inline typename Iterator<Segment<THost_, SuffixSegment>, Standard>::Type begin(Segment<THost_, SuffixSegment> & me, Standard);       	// "projects/library/seqan/sequence/segment_suffix.h"(243)
+template <typename THost_> inline typename Iterator<Segment<THost_, SuffixSegment> const, Standard>::Type begin(Segment<THost_, SuffixSegment> const & me, Standard);       	// "projects/library/seqan/sequence/segment_suffix.h"(251)
+template <typename THost_> inline typename Iterator<Segment<THost_, PrefixSegment>, Standard>::Type begin(Segment<THost_, PrefixSegment> & me, Standard);       	// "projects/library/seqan/sequence/segment_prefix.h"(243)
+template <typename THost_> inline typename Iterator<Segment<THost_, PrefixSegment> const, Standard>::Type begin(Segment<THost_, PrefixSegment> const & me, Standard);       	// "projects/library/seqan/sequence/segment_prefix.h"(251)
+
+//____________________________________________________________________________
+// beginPosition
+
+template <typename THost_> inline typename Position<Segment<THost_, InfixSegment> >::Type beginPosition(Segment<THost_, InfixSegment> & me);       	// "projects/library/seqan/sequence/segment_infix.h"(257)
+template <typename THost_> inline typename Position<Segment<THost_, InfixSegment> const>::Type beginPosition(Segment<THost_, InfixSegment> const & me);       	// "projects/library/seqan/sequence/segment_infix.h"(264)
+template <typename THost_> inline typename Position<Segment<THost_, SuffixSegment> const>::Type beginPosition(Segment<THost_, SuffixSegment> const & me);       	// "projects/library/seqan/sequence/segment_suffix.h"(261)
+template <typename THost_> inline typename Position<Segment<THost_, SuffixSegment> >::Type beginPosition(Segment<THost_, SuffixSegment> & me);       	// "projects/library/seqan/sequence/segment_suffix.h"(268)
+template <typename THost_> inline typename Position<Segment<THost_, PrefixSegment> const>::Type beginPosition(Segment<THost_, PrefixSegment> const & );       	// "projects/library/seqan/sequence/segment_prefix.h"(261)
+template <typename THost_> inline typename Position<Segment<THost_, PrefixSegment> >::Type beginPosition(Segment<THost_, PrefixSegment> & );       	// "projects/library/seqan/sequence/segment_prefix.h"(268)
+
+//____________________________________________________________________________
+// capacity
+
+template <typename THost, typename TSpec> inline typename Size< Segment<THost, TSpec> const>::Type capacity(Segment<THost, TSpec> const & me);       	// "projects/library/seqan/sequence/segment_base.h"(286)
+
+//____________________________________________________________________________
+// clear
+
+template <typename THost, typename TSpec> inline void clear(Segment<THost, TSpec> & target);       	// "projects/library/seqan/sequence/segment_base.h"(1232)
+template <typename TValue, typename TSpec> inline void clear(String<TValue, TSpec> & me);       	// "projects/library/seqan/sequence/string_base.h"(297)
+
+//____________________________________________________________________________
+// compare
+
+template <typename TSpec, typename TLeft, typename TRight> inline void compare(Lexical<TSpec> & lexical, TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(300)
+template <typename TSpec, typename TLeftValue, typename TRight> inline void compare(Lexical<TSpec> & lexical, TLeftValue const * left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(311)
+template <typename TSpec, typename TLeftValue, typename TRightValue> inline void compare(Lexical<TSpec> & lexical, TLeftValue const * left, TRightValue const * right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(319)
+template <typename TSpec, typename TLeft, typename TRightValue> inline void compare(Lexical<TSpec> & lexical, TLeft const & left, TRightValue const * right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(327)
+
+//____________________________________________________________________________
+// compare_
+
+template <typename TSpec, typename TLeft, typename TRight> inline void compare_(Lexical<TSpec> & lexical, TLeft & left, TRight & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(258)
+
+//____________________________________________________________________________
+// empty
+
+template <typename TValue, typename TSpec> inline bool empty(String<TValue, TSpec> const & me);       	// "projects/library/seqan/sequence/string_base.h"(271)
+
+//____________________________________________________________________________
+// end
+
+template <typename THost_> inline typename Iterator<Segment<THost_, InfixSegment>, Standard>::Type end(Segment<THost_, InfixSegment> & me, Standard);       	// "projects/library/seqan/sequence/segment_infix.h"(328)
+template <typename THost_> inline typename Iterator<Segment<THost_, InfixSegment> const, Standard>::Type end(Segment<THost_, InfixSegment> const & me, Standard);       	// "projects/library/seqan/sequence/segment_infix.h"(336)
+template <typename THost_> inline typename Iterator<Segment<THost_, SuffixSegment>, Standard>::Type end(Segment<THost_, SuffixSegment> & me, Standard);       	// "projects/library/seqan/sequence/segment_suffix.h"(306)
+template <typename THost_> inline typename Iterator<Segment<THost_, SuffixSegment> const, Standard>::Type end(Segment<THost_, SuffixSegment> const & me, Standard);       	// "projects/library/seqan/sequence/segment_suffix.h"(314)
+template <typename THost_> inline typename Iterator<Segment<THost_, PrefixSegment>, Standard>::Type end(Segment<THost_, PrefixSegment> & me, Standard);       	// "projects/library/seqan/sequence/segment_prefix.h"(287)
+template <typename THost_> inline typename Iterator<Segment<THost_, PrefixSegment> const, Standard>::Type end(Segment<THost_, PrefixSegment> const & me, Standard);       	// "projects/library/seqan/sequence/segment_prefix.h"(295)
+
+//____________________________________________________________________________
+// endPosition
+
+template <typename THost_> inline typename Position<Segment<THost_, InfixSegment> >::Type endPosition(Segment<THost_, InfixSegment> & me);       	// "projects/library/seqan/sequence/segment_infix.h"(348)
+template <typename THost_> inline typename Position<Segment<THost_, InfixSegment> >::Type endPosition(Segment<THost_, InfixSegment> const & me);       	// "projects/library/seqan/sequence/segment_infix.h"(355)
+template <typename THost_> inline typename Position<Segment<THost_, SuffixSegment> >::Type endPosition(Segment<THost_, SuffixSegment> & me);       	// "projects/library/seqan/sequence/segment_suffix.h"(325)
+template <typename THost_> inline typename Position<Segment<THost_, SuffixSegment> const>::Type endPosition(Segment<THost_, SuffixSegment> const & me);       	// "projects/library/seqan/sequence/segment_suffix.h"(333)
+template <typename THost_> inline typename Position<Segment<THost_, PrefixSegment> >::Type endPosition(Segment<THost_, PrefixSegment> & me);       	// "projects/library/seqan/sequence/segment_prefix.h"(344)
+template <typename THost_> inline typename Position<Segment<THost_, PrefixSegment> const>::Type endPosition(Segment<THost_, PrefixSegment> const & me);       	// "projects/library/seqan/sequence/segment_prefix.h"(351)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename THost> inline void goBegin(Segment<THost, InfixSegment> & segment);       	// "projects/library/seqan/sequence/segment_infix.h"(614)
+template <typename THost, typename THost2> inline void goBegin(Segment<THost, InfixSegment> & segment, THost2 &);       	// "projects/library/seqan/sequence/segment_infix.h"(623)
+template <typename THost, typename THost2> inline void goBegin(Segment<THost, InfixSegment> & segment, THost2 const &);       	// "projects/library/seqan/sequence/segment_infix.h"(630)
+template <typename THost> inline void goBegin(Segment<THost, SuffixSegment> & segment, THost &);       	// "projects/library/seqan/sequence/segment_suffix.h"(472)
+template <typename THost> inline void goBegin(Segment<THost, SuffixSegment> & segment);       	// "projects/library/seqan/sequence/segment_suffix.h"(480)
+template <typename THost> inline void goBegin(Segment<THost, PrefixSegment> & segment, THost &);       	// "projects/library/seqan/sequence/segment_prefix.h"(475)
+template <typename THost> inline void goBegin(Segment<THost, PrefixSegment> & segment);       	// "projects/library/seqan/sequence/segment_prefix.h"(483)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename THost> inline void goEnd(Segment<THost, InfixSegment> & segment);       	// "projects/library/seqan/sequence/segment_infix.h"(640)
+template <typename THost, typename THost2> inline void goEnd(Segment<THost, InfixSegment> & segment, THost2 &);       	// "projects/library/seqan/sequence/segment_infix.h"(649)
+template <typename THost, typename THost2> inline void goEnd(Segment<THost, InfixSegment> & segment, THost2 const &);       	// "projects/library/seqan/sequence/segment_infix.h"(656)
+template <typename THost> inline void goEnd(Segment<THost, SuffixSegment> & segment, THost &);       	// "projects/library/seqan/sequence/segment_suffix.h"(490)
+template <typename THost> inline void goEnd(Segment<THost, SuffixSegment> & segment);       	// "projects/library/seqan/sequence/segment_suffix.h"(498)
+template <typename THost> inline void goEnd(Segment<THost, PrefixSegment> & segment, THost &);       	// "projects/library/seqan/sequence/segment_prefix.h"(493)
+template <typename THost> inline void goEnd(Segment<THost, PrefixSegment> & segment);       	// "projects/library/seqan/sequence/segment_prefix.h"(501)
+
+//____________________________________________________________________________
+// hasNoHost
+
+template <typename THost, typename TSpec> inline bool hasNoHost(Segment<THost, TSpec> const & target);       	// "projects/library/seqan/sequence/segment_base.h"(297)
+
+//____________________________________________________________________________
+// hasPrefix
+
+template <typename TLeft, typename TRight > inline bool hasPrefix(TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(738)
+template <typename TSpec> inline bool hasPrefix(Lexical<TSpec> const & _lex);       	// "projects/library/seqan/sequence/sequence_lexical.h"(746)
+
+//____________________________________________________________________________
+// host
+
+template <typename THost_> inline typename Parameter_<THost_>::Type host(Segment<THost_, InfixSegment> & me);       	// "projects/library/seqan/sequence/segment_infix.h"(215)
+template <typename THost_> inline typename Parameter_<THost_>::Type host(Segment<THost_, InfixSegment> const & me);       	// "projects/library/seqan/sequence/segment_infix.h"(223)
+template <typename THost_> inline typename Parameter_<THost_>::Type host(Segment<THost_, SuffixSegment> & me);       	// "projects/library/seqan/sequence/segment_suffix.h"(206)
+template <typename THost_> inline typename Parameter_<THost_>::Type host(Segment<THost_, SuffixSegment> const & me);       	// "projects/library/seqan/sequence/segment_suffix.h"(214)
+template <typename THost_> inline typename Parameter_<THost_>::Type host(Segment<THost_, PrefixSegment> & me);       	// "projects/library/seqan/sequence/segment_prefix.h"(206)
+template <typename THost_> inline typename Parameter_<THost_>::Type host(Segment<THost_, PrefixSegment> const & me);       	// "projects/library/seqan/sequence/segment_prefix.h"(214)
+
+//____________________________________________________________________________
+// id
+
+template <typename THost, typename TSpec> inline void const * id(Segment<THost, TSpec> const & me);       	// "projects/library/seqan/sequence/segment_base.h"(262)
+
+//____________________________________________________________________________
+// infix
+
+template <typename T, typename TPosBegin, typename TPosEnd> inline typename Infix<T>::Type infix(T & t, TPosBegin pos_begin, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_infix.h"(750)
+template <typename T, typename TPosBegin, typename TPosEnd> inline typename Infix<T *>::Type infix(T * t, TPosBegin pos_begin, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_infix.h"(758)
+template <typename T, typename TSpec, typename TPosBegin, typename TPosEnd> inline typename Infix<Segment<T, TSpec> >::Type infix(Segment<T, TSpec> & t, TPosBegin pos_begin, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_infix.h"(766)
+template <typename T, typename TSpec, typename TPosBegin, typename TPosEnd> inline typename Infix<Segment<T, TSpec> const>::Type infix(Segment<T, TSpec> const & t, TPosBegin pos_begin, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_infix.h"(777)
+template <typename T, typename TSpec, typename TIterSpec> inline typename Infix<Segment<T, TSpec> >::Type infix(Segment<T, TSpec> & t, Iter<Segment<T, TSpec>, TIterSpec> const & iterBegin, Iter<Segment<T, TSpec>, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_infix.h"(792)
+template <typename T, typename TSpec, typename TIterSpec> inline typename Infix<Segment<T, TSpec> const>::Type infix(Segment<T, TSpec> const & t, Iter<Segment<T, TSpec> const, TIterSpec> const & iterBegin, Iter<Segment<T, TSpec> const, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_infix.h"(805)
+
+//____________________________________________________________________________
+// infixWithLength
+
+template <typename T, typename TPosBegin, typename TSize> inline typename Infix<T>::Type infixWithLength(T & t, TPosBegin pos_begin, TSize length);       	// "projects/library/seqan/sequence/segment_infix.h"(837)
+template <typename T, typename TPosBegin, typename TSize> inline typename Infix<T *>::Type infixWithLength(T * t, TPosBegin pos_begin, TSize length);       	// "projects/library/seqan/sequence/segment_infix.h"(845)
+template <typename T, typename TSpec, typename TPosBegin, typename TSize> inline typename Infix<Segment<T, TSpec> >::Type infixWithLength(Segment<T, TSpec> & t, TPosBegin pos_begin, TSize length);       	// "projects/library/seqan/sequence/segment_infix.h"(853)
+template <typename T, typename TSpec, typename TPosBegin, typename TSize> inline typename Infix<Segment<T, TSpec> const>::Type infixWithLength(Segment<T, TSpec> const & t, TPosBegin pos_begin, TSize length);       	// "projects/library/seqan/sequence/segment_infix.h"(864)
+
+//____________________________________________________________________________
+// insertValue
+
+template <typename THost, typename TSpec, typename TPosition, typename TValue, typename TExpand> inline void insertValue(Segment<THost, TSpec> & me, TPosition pos, TValue const & _value, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(986)
+template <typename THost, typename TSpec, typename TPosition, typename TValue, typename TExpand> inline void insertValue(Segment<THost, TSpec> const & me, TPosition pos, TValue const & _value, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(996)
+template <typename TTargetValue, typename TTargetSpec, typename TPosition, typename TValue, typename TExpand> inline void insertValue(String<TTargetValue, TTargetSpec> & me, TPosition pos, TValue const & _value, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1274)
+
+//____________________________________________________________________________
+// isEqual
+
+template <typename TLeft, typename TRight > inline bool isEqual(TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(353)
+template <typename TSpec> inline bool isEqual(Lexical<TSpec> const & _lex);       	// "projects/library/seqan/sequence/sequence_lexical.h"(361)
+
+//____________________________________________________________________________
+// isGreater
+
+template <typename TLeft, typename TRight, typename TPrefixOrder > inline bool isGreater(TLeft const & left, TRight const & right, Tag<TPrefixOrder> const tag);       	// "projects/library/seqan/sequence/sequence_lexical.h"(568)
+template <typename TLeft, typename TRight> inline bool isGreater(TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(577)
+template <typename TSpec> inline bool isGreater(Lexical<TSpec> const & _lex, TagPrefixLess);       	// "projects/library/seqan/sequence/sequence_lexical.h"(586)
+template <typename TSpec> inline bool isGreater(Lexical<TSpec> const & _lex, TagPrefixGreater);       	// "projects/library/seqan/sequence/sequence_lexical.h"(594)
+template <typename TSpec> inline bool isGreater(Lexical<TSpec> const & _lex);       	// "projects/library/seqan/sequence/sequence_lexical.h"(601)
+
+//____________________________________________________________________________
+// isGreaterOrEqual
+
+template <typename TLeft, typename TRight, typename TPrefixOrder > inline bool isGreaterOrEqual(TLeft const & left, TRight const & right, Tag<TPrefixOrder> const tag);       	// "projects/library/seqan/sequence/sequence_lexical.h"(637)
+template <typename TLeft, typename TRight> inline bool isGreaterOrEqual(TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(646)
+template <typename TSpec> inline bool isGreaterOrEqual(Lexical<TSpec> const & _lex, TagPrefixLess);       	// "projects/library/seqan/sequence/sequence_lexical.h"(655)
+template <typename TSpec> inline bool isGreaterOrEqual(Lexical<TSpec> const & _lex, TagPrefixGreater);       	// "projects/library/seqan/sequence/sequence_lexical.h"(663)
+template <typename TSpec> inline bool isGreaterOrEqual(Lexical<TSpec> const & _lex);       	// "projects/library/seqan/sequence/sequence_lexical.h"(670)
+
+//____________________________________________________________________________
+// isLess
+
+template <typename TLeft, typename TRight, typename TPrefixOrder > inline bool isLess(TLeft const & left, TRight const & right, Tag<TPrefixOrder> const tag);       	// "projects/library/seqan/sequence/sequence_lexical.h"(431)
+template <typename TLeft, typename TRight> inline bool isLess(TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(440)
+template <typename TSpec> inline bool isLess(Lexical<TSpec> const & _lex, TagPrefixLess);       	// "projects/library/seqan/sequence/sequence_lexical.h"(449)
+template <typename TSpec> inline bool isLess(Lexical<TSpec> const & _lex, TagPrefixGreater);       	// "projects/library/seqan/sequence/sequence_lexical.h"(457)
+template <typename TSpec> inline bool isLess(Lexical<TSpec> const & _lex);       	// "projects/library/seqan/sequence/sequence_lexical.h"(464)
+
+//____________________________________________________________________________
+// isLessOrEqual
+
+template <typename TLeft, typename TRight, typename TPrefixOrder > inline bool isLessOrEqual(TLeft const & left, TRight const & right, Tag<TPrefixOrder> const tag);       	// "projects/library/seqan/sequence/sequence_lexical.h"(500)
+template <typename TLeft, typename TRight> inline bool isLessOrEqual(TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(509)
+template <typename TSpec> inline bool isLessOrEqual(Lexical<TSpec> const & _lex, TagPrefixLess);       	// "projects/library/seqan/sequence/sequence_lexical.h"(518)
+template <typename TSpec> inline bool isLessOrEqual(Lexical<TSpec> const & _lex, TagPrefixGreater);       	// "projects/library/seqan/sequence/sequence_lexical.h"(526)
+template <typename TSpec> inline bool isLessOrEqual(Lexical<TSpec> const & _lex);       	// "projects/library/seqan/sequence/sequence_lexical.h"(533)
+
+//____________________________________________________________________________
+// isNotEqual
+
+template <typename TLeft, typename TRight > inline bool isNotEqual(TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(388)
+template <typename TSpec> inline bool isNotEqual(Lexical<TSpec> const & _lex);       	// "projects/library/seqan/sequence/sequence_lexical.h"(396)
+
+//____________________________________________________________________________
+// isPrefix
+
+template <typename TLeft, typename TRight > inline bool isPrefix(TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(699)
+template <typename TSpec> inline bool isPrefix(Lexical<TSpec> const & _lex);       	// "projects/library/seqan/sequence/sequence_lexical.h"(707)
+
+//____________________________________________________________________________
+// lcpLength
+
+template <typename TLeft, typename TRight > inline typename Size<TLeft>::Type lcpLength(TLeft const & left, TRight const & right);       	// "projects/library/seqan/sequence/sequence_lexical.h"(772)
+template <typename TSpec> inline typename Size< Lexical<TSpec> >::Type lcpLength(Lexical<TSpec> const & _lex);       	// "projects/library/seqan/sequence/sequence_lexical.h"(781)
+
+//____________________________________________________________________________
+// length
+
+template <typename THost, typename TSpec> inline typename Size<Segment<THost, TSpec> const>::Type length(Segment<THost, TSpec> const & me);       	// "projects/library/seqan/sequence/segment_base.h"(274)
+template <typename TValue, typename TSpec> inline typename Size< String<TValue, TSpec> const>::Type length(String<TValue, TSpec> const & me);       	// "projects/library/seqan/sequence/string_base.h"(259)
+
+//____________________________________________________________________________
+// move
+
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void move(Segment<THost, TSpec> & target, TSource & source);       	// "projects/library/seqan/sequence/segment_base.h"(705)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void move(Segment<THost, TSpec> & target, TSource const & source);       	// "projects/library/seqan/sequence/segment_base.h"(714)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void move(Segment<THost, TSpec> const & target, TSource & source);       	// "projects/library/seqan/sequence/segment_base.h"(726)
+template <typename THost, typename TSpec, typename TSource, typename TExpand> inline void move(Segment<THost, TSpec> const & target, TSource const & source);       	// "projects/library/seqan/sequence/segment_base.h"(735)
+template <typename TTargetValue, typename TTargetSpec, typename TSource> inline void move(String<TTargetValue, TTargetSpec> & target, TSource & source);       	// "projects/library/seqan/sequence/string_base.h"(1023)
+template <typename TTargetValue, typename TTargetSpec, typename TSource> inline void move(String<TTargetValue, TTargetSpec> & target, TSource const & source);       	// "projects/library/seqan/sequence/string_base.h"(1032)
+template <typename TTargetValue, typename TTargetSpec, typename TSource, typename TTag> inline void move(String<TTargetValue, TTargetSpec> & target, TSource & source, Tag<TTag> const tag);       	// "projects/library/seqan/sequence/string_base.h"(1045)
+template <typename TTargetValue, typename TTargetSpec, typename TSource, typename TTag> inline void move(String<TTargetValue, TTargetSpec> & target, TSource const & source, Tag<TTag> const tag);       	// "projects/library/seqan/sequence/string_base.h"(1055)
+
+//____________________________________________________________________________
+// operationToSet
+
+template <typename THost, typename TSpec, typename TSource> inline bool operationToSet(Segment<THost, TSpec> &, TSource &);       	// "projects/library/seqan/sequence/segment_base.h"(349)
+template <typename THost, typename TSpec, typename TSpec2> inline bool operationToSet(Segment<THost, TSpec> & target, Segment<THost, TSpec2> & source);       	// "projects/library/seqan/sequence/segment_base.h"(356)
+template <typename THost, typename TSpec, typename TSpec2> inline bool operationToSet(Segment<THost const, TSpec> & target, Segment<THost, TSpec2> & source);       	// "projects/library/seqan/sequence/segment_base.h"(368)
+template <typename THost, typename TSpec, typename TSpec2> inline bool operationToSet(Segment<THost const, TSpec> & target, Segment<THost, TSpec2> const & source);       	// "projects/library/seqan/sequence/segment_base.h"(380)
+template <typename THost, typename TSpec, typename TSpec2> inline bool operationToSet(Segment<THost, TSpec> & target, Segment<THost, TSpec2> const & source);       	// "projects/library/seqan/sequence/segment_base.h"(392)
+template <typename THost, typename TSpec> inline bool operationToSet(Segment<THost, TSpec> & target, THost & source);       	// "projects/library/seqan/sequence/segment_base.h"(404)
+template <typename THost, typename TSpec, typename TSource, typename TSize> inline bool operationToSet(Segment<THost, TSpec> & , TSource & , TSize);       	// "projects/library/seqan/sequence/segment_base.h"(419)
+template <typename THost, typename TSpec, typename TSpec2, typename TSize> inline bool operationToSet(Segment<THost, TSpec> & target, Segment<THost, TSpec2> & source, TSize limit);       	// "projects/library/seqan/sequence/segment_base.h"(427)
+template <typename THost, typename TSpec, typename TSize> inline bool operationToSet(Segment<THost, TSpec> & target, THost & source, TSize limit);       	// "projects/library/seqan/sequence/segment_base.h"(446)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight > inline bool operator!= (Segment<TLeftHost, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/segment_base.h"(1268)
+template <typename TLeftValue, typename TLeftSpec, typename TRight > inline bool operator!=(String<TLeftValue, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/string_base.h"(1787)
+template <typename TLeftValue, typename TRightValue, typename TRightSpec > inline bool operator!= (TLeftValue * left, String<TRightValue, TRightSpec> const & right);       	// "projects/library/seqan/sequence/string_base.h"(1796)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename THost> inline Segment<THost, InfixSegment> & operator++(Segment<THost, InfixSegment> & segment);       	// "projects/library/seqan/sequence/segment_infix.h"(665)
+template <typename THost> inline Segment<THost, SuffixSegment> & operator++(Segment<THost, SuffixSegment> & segment);       	// "projects/library/seqan/sequence/segment_suffix.h"(507)
+template <typename THost> inline Segment<THost, PrefixSegment> & operator++(Segment<THost, PrefixSegment> & segment);       	// "projects/library/seqan/sequence/segment_prefix.h"(510)
+
+//____________________________________________________________________________
+// operator+=
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight> Segment<TLeftValue, TLeftSpec> const & operator+= (Segment<TLeftValue, TLeftSpec> & left, TRight const & right);       	// "projects/library/seqan/sequence/segment_base.h"(1243)
+template <typename TLeftValue, typename TLeftSpec, typename TRight > String<TLeftValue, TLeftSpec> const & operator+= (String<TLeftValue, TLeftSpec> & left, TRight const & right);       	// "projects/library/seqan/sequence/string_base.h"(1754)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename THost> inline Segment<THost, InfixSegment> & operator--(Segment<THost, InfixSegment> & segment);       	// "projects/library/seqan/sequence/segment_infix.h"(685)
+template <typename THost> inline Segment<THost, SuffixSegment> & operator--(Segment<THost, SuffixSegment> & segment);       	// "projects/library/seqan/sequence/segment_suffix.h"(517)
+template <typename THost> inline Segment<THost, PrefixSegment> & operator--(Segment<THost, PrefixSegment> & segment);       	// "projects/library/seqan/sequence/segment_prefix.h"(520)
+
+//____________________________________________________________________________
+// operator<
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight> inline bool operator< (Segment<TLeftHost, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/segment_base.h"(1280)
+template <typename TLeftValue, typename TLeftSpec, typename TRight> inline bool operator< (String<TLeftValue, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/string_base.h"(1808)
+template <typename TLeftValue, typename TRightValue, typename TRightSpec > inline bool operator< (TLeftValue * left, String<TRightValue, TRightSpec> const & right);       	// "projects/library/seqan/sequence/string_base.h"(1816)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TStream, typename THost, typename TSpec> inline TStream & operator<< (TStream & target, Segment<THost, TSpec> const & source);       	// "projects/library/seqan/sequence/segment_base.h"(1326)
+template <typename TStream, typename TValue, typename TSpec> inline TStream & operator<< (TStream & target, String<TValue, TSpec> const & source);       	// "projects/library/seqan/sequence/string_base.h"(1886)
+
+//____________________________________________________________________________
+// operator<=
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight> inline bool operator<= (Segment<TLeftHost, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/segment_base.h"(1291)
+template <typename TLeftValue, typename TLeftSpec, typename TRight> inline bool operator<= (String<TLeftValue, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/string_base.h"(1827)
+template <typename TLeftValue, typename TRightValue, typename TRightSpec > inline bool operator<= (TLeftValue * left, String<TRightValue, TRightSpec> const & right);       	// "projects/library/seqan/sequence/string_base.h"(1835)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight > inline bool operator== (Segment<TLeftHost, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/segment_base.h"(1256)
+template <typename TLeftValue, typename TLeftSpec, typename TRight > inline bool operator== (String<TLeftValue, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/string_base.h"(1766)
+template <typename TLeftValue, typename TRightValue, typename TRightSpec > inline bool operator== (TLeftValue * left, String<TRightValue, TRightSpec> const & right);       	// "projects/library/seqan/sequence/string_base.h"(1775)
+
+//____________________________________________________________________________
+// operator>
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight> inline bool operator> (Segment<TLeftHost, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/segment_base.h"(1301)
+template <typename TLeftValue, typename TLeftSpec, typename TRight> inline bool operator> (String<TLeftValue, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/string_base.h"(1846)
+template <typename TLeftValue, typename TRightValue, typename TRightSpec > inline bool operator> (TLeftValue * left, String<TRightValue, TRightSpec> const & right);       	// "projects/library/seqan/sequence/string_base.h"(1854)
+
+//____________________________________________________________________________
+// operator>=
+
+template <typename TLeftHost, typename TLeftSpec, typename TRight> inline bool operator>= (Segment<TLeftHost, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/segment_base.h"(1312)
+template <typename TLeftValue, typename TLeftSpec, typename TRight> inline bool operator>= (String<TLeftValue, TLeftSpec> const & left, TRight const & right);       	// "projects/library/seqan/sequence/string_base.h"(1865)
+template <typename TLeftValue, typename TRightValue, typename TRightSpec > inline bool operator>= (TLeftValue * left, String<TRightValue, TRightSpec> const & right);       	// "projects/library/seqan/sequence/string_base.h"(1873)
+
+//____________________________________________________________________________
+// operator>>
+
+template <typename TStream, typename THost, typename TSpec> inline TStream & operator>> (TStream & source, Segment<THost, TSpec> & target);       	// "projects/library/seqan/sequence/segment_base.h"(1338)
+template <typename TStream, typename THost, typename TSpec> inline TStream & operator>> (TStream & source, Segment<THost, TSpec> const & target);       	// "projects/library/seqan/sequence/segment_base.h"(1347)
+template <typename TStream, typename TValue, typename TSpec> inline TStream & operator>> (TStream & source, String<TValue, TSpec> & target);       	// "projects/library/seqan/sequence/string_base.h"(1898)
+
+//____________________________________________________________________________
+// ordValue
+
+template <typename TValue> inline unsigned ordValue(TValue const & c);       	// "projects/library/seqan/sequence/sequence_lexical.h"(807)
+template <typename TValue, typename TSpec> inline unsigned ordValue(SimpleType<TValue, TSpec> const & c);       	// "projects/library/seqan/sequence/sequence_lexical.h"(813)
+
+//____________________________________________________________________________
+// prefix
+
+template <typename T, typename TPosEnd> inline typename Prefix<T>::Type prefix(T & t, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(552)
+template <typename T, typename TPosEnd> inline typename Prefix<T const>::Type prefix(T const & t, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(559)
+template <typename T, typename TPosEnd> inline typename Prefix<T *>::Type prefix(T * t, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(567)
+template <typename T, typename TPosEnd> inline typename Prefix<Segment<T, PrefixSegment> >::Type prefix(Segment<T, PrefixSegment> & t, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(577)
+template <typename T, typename TPosEnd> inline typename Prefix<Segment<T, PrefixSegment> const>::Type prefix(Segment<T, PrefixSegment> const & t, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(586)
+template <typename T, typename TPosEnd> inline typename Prefix<Segment<T, InfixSegment> >::Type prefix(Segment<T, InfixSegment> & t, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(598)
+template <typename T, typename TPosEnd> inline typename Prefix<Segment<T, InfixSegment> const>::Type prefix(Segment<T, InfixSegment> const & t, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(608)
+template <typename T, typename TPosEnd> inline typename Prefix<Segment<T, SuffixSegment> >::Type prefix(Segment<T, SuffixSegment> & t, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(622)
+template <typename T, typename TPosEnd> inline typename Prefix<Segment<T, SuffixSegment> const>::Type prefix(Segment<T, SuffixSegment> const & t, TPosEnd pos_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(632)
+template <typename T, typename TIterSpec> inline typename Prefix<T>::Type prefix(T & t, Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_prefix.h"(648)
+template <typename T, typename TIterSpec> inline typename Prefix<T const>::Type prefix(T const & t, Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_prefix.h"(656)
+template <typename T, typename TIterSpec> inline typename Prefix<T *>::Type prefix(T * t, Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_prefix.h"(665)
+template <typename T, typename TIterSpec> inline typename Prefix<Segment<T, PrefixSegment> >::Type prefix(Segment<T, PrefixSegment> & t, Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_prefix.h"(676)
+template <typename T, typename TIterSpec> inline typename Prefix<Segment<T, PrefixSegment> const>::Type prefix(Segment<T, PrefixSegment> const & t, Iter<Segment<T, PrefixSegment> const, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_prefix.h"(686)
+template <typename T, typename TIterSpec> inline typename Prefix<Segment<T, InfixSegment> >::Type prefix(Segment<T, InfixSegment> & t, Iter<Segment<T, InfixSegment>, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_prefix.h"(699)
+template <typename T, typename TIterSpec> inline typename Prefix<Segment<T, InfixSegment> const>::Type prefix(Segment<T, InfixSegment> const & t, Iter<Segment<T, InfixSegment> const, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_prefix.h"(710)
+template <typename T, typename TIterSpec> inline typename Prefix<Segment<T, SuffixSegment> >::Type prefix(Segment<T, SuffixSegment> & t, Iter<Segment<T, SuffixSegment> const, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_prefix.h"(725)
+template <typename T, typename TIterSpec> inline typename Prefix<Segment<T, SuffixSegment> const>::Type prefix(Segment<T, SuffixSegment> const & t, Iter<Segment<T, SuffixSegment> const, TIterSpec> const & iterEnd);       	// "projects/library/seqan/sequence/segment_prefix.h"(736)
+
+//____________________________________________________________________________
+// replace
+
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace( Segment<THost, TSpec> & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(1100)
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace( Segment<THost, TSpec> & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(1112)
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace( Segment<THost, TSpec> & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(1126)
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace( Segment<THost, TSpec> & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(1139)
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace( Segment<THost, TSpec> const & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(1152)
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace( Segment<THost, TSpec> const & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(1164)
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace( Segment<THost, TSpec> const & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(1178)
+template <typename THost, typename TSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace( Segment<THost, TSpec> const & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/segment_base.h"(1191)
+template <typename TTargetValue, typename TTargetSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace(String<TTargetValue, TTargetSpec> & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1356)
+template <typename TTargetValue, typename TTargetSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand> inline void replace(String<TTargetValue, TTargetSpec> & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source, typename Size< String<TTargetValue, TTargetSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1370)
+template <typename TTargetValue, typename TTargetSpec, typename TPositionBegin, typename TPositionEnd, typename TSourceValue, typename TExpand> inline void replace(String<TTargetValue, TTargetSpec> & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSourceValue const * source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1386)
+template <typename TTargetValue, typename TTargetSpec, typename TPositionBegin, typename TPositionEnd, typename TSourceValue, typename TExpand> inline void replace(String<TTargetValue, TTargetSpec> & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSourceValue const * source, typename Size< String<TTargetValue, TTargetSpec> >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1400)
+
+//____________________________________________________________________________
+// reserve
+
+template <typename TValue, typename TSpec, typename TSize_, typename TExpand> inline typename Size< String<TValue, TSpec> >::Type reserve( String<TValue, TSpec> & seq, TSize_ new_capacity, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_base.h"(1609)
+
+//____________________________________________________________________________
+// resize
+
+template <typename THost, typename TSpec, typename TExpand> inline typename Size< Segment<THost, TSpec> >::Type resize( Segment<THost, TSpec> & me, typename Size< Segment<THost, TSpec> >::Type new_length, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/segment_base.h"(1206)
+template <typename TValue, typename TSpec, typename TSize, typename TExpand> inline typename Size< String<TValue, TSpec> >::Type resize( String<TValue, TSpec> & me, TSize new_length, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1703)
+template <typename TValue, typename TSpec, typename TSize, typename TValue2, typename TExpand> inline TSize resize(String<TValue, TSpec> & me, TSize new_length, TValue2 const & val, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_base.h"(1714)
+
+//____________________________________________________________________________
+// resizeSpace
+
+template <typename TValue, typename TSpec, typename TSize, typename TBeginPosition, typename TEndPosition, typename TExpand> inline typename Size< String<TValue, TSpec> >::Type resizeSpace(String<TValue, TSpec> & me, TSize size, TBeginPosition pos_begin, TEndPosition pos_end, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_base.h"(776)
+template <typename TValue, typename TSpec, typename TSize, typename TBeginPosition, typename TEndPosition, typename TLimit, typename TExpand> inline typename Size< String<TValue, TSpec> >::Type resizeSpace(String<TValue, TSpec> & me, TSize size, TBeginPosition pos_begin, TEndPosition pos_end, TLimit limit, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_base.h"(798)
+
+//____________________________________________________________________________
+// set
+
+template <typename THost, typename TPosition1, typename TPosition2> inline void set(Segment<THost, InfixSegment> & me, THost & host_, TPosition1 begin_, TPosition2 end_);       	// "projects/library/seqan/sequence/segment_infix.h"(502)
+template <typename THost> inline void set(Segment<THost, InfixSegment> & me, THost & host_);       	// "projects/library/seqan/sequence/segment_infix.h"(514)
+template <typename THost> inline void set(Segment<THost, InfixSegment> & me, THost const & host_);       	// "projects/library/seqan/sequence/segment_infix.h"(524)
+template <typename THost, typename TSpec> inline void set(Segment<THost, InfixSegment> & me, Segment<THost, TSpec> & source);       	// "projects/library/seqan/sequence/segment_infix.h"(537)
+template <typename THost, typename TSpec> inline void set(Segment<THost const, InfixSegment> & me, Segment<THost, TSpec> & source);       	// "projects/library/seqan/sequence/segment_infix.h"(547)
+template <typename THost, typename TSpec> inline void set(Segment<THost, InfixSegment> & me, Segment<THost, TSpec> const & source);       	// "projects/library/seqan/sequence/segment_infix.h"(557)
+template <typename THost, typename TSpec> inline void set(Segment<THost const, InfixSegment> & me, Segment<THost, TSpec> const & source);       	// "projects/library/seqan/sequence/segment_infix.h"(567)
+template <typename THost, typename TPosition> inline void set(Segment<THost, SuffixSegment> & me, THost & host_, TPosition begin_);       	// "projects/library/seqan/sequence/segment_suffix.h"(407)
+template <typename THost> inline void set(Segment<THost, SuffixSegment> & me, THost & host_);       	// "projects/library/seqan/sequence/segment_suffix.h"(418)
+template <typename THost, typename TSpec> inline void set(Segment<THost, SuffixSegment> & me, Segment<THost, TSpec> & source);       	// "projects/library/seqan/sequence/segment_suffix.h"(430)
+template <typename THost, typename TSpec> inline void set(Segment<THost, SuffixSegment> & me, Segment<THost, TSpec> const & source);       	// "projects/library/seqan/sequence/segment_suffix.h"(440)
+template <typename THost, typename TPosition> inline void set(Segment<THost, PrefixSegment> & me, THost & host_, TPosition end_);       	// "projects/library/seqan/sequence/segment_prefix.h"(410)
+template <typename THost> inline void set(Segment<THost, PrefixSegment> & me, THost & host_);       	// "projects/library/seqan/sequence/segment_prefix.h"(421)
+template <typename THost, typename TSpec> inline void set(Segment<THost, PrefixSegment> & me, Segment<THost, TSpec> & source);       	// "projects/library/seqan/sequence/segment_prefix.h"(433)
+template <typename THost, typename TSpec> inline void set(Segment<THost, PrefixSegment> & me, Segment<THost, TSpec> const & source);       	// "projects/library/seqan/sequence/segment_prefix.h"(443)
+
+//____________________________________________________________________________
+// setBegin
+
+template <typename THost_, typename TIterator> inline void setBegin(Segment<THost_, InfixSegment> & me, TIterator new_begin);       	// "projects/library/seqan/sequence/segment_infix.h"(288)
+template <typename TIterator> inline void setBegin(TIterator new_begin);       	// "projects/library/seqan/sequence/segment_infix.h"(879)
+template <typename THost_, typename TIterator> inline void setBegin(Segment<THost_, SuffixSegment> & me, TIterator new_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(277)
+template <typename THost_> inline void setBegin(typename Iterator<Segment<THost_, SuffixSegment>, Rooted>::Type new_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(285)
+template <typename THost_, typename TIterator> inline void setBegin(Segment<THost_, PrefixSegment> &, TIterator);       	// "projects/library/seqan/sequence/segment_prefix.h"(278)
+
+//____________________________________________________________________________
+// setBeginPosition
+
+template <typename THost_, typename TPosition> inline void setBeginPosition(Segment<THost_, InfixSegment> & me, TPosition new_begin);       	// "projects/library/seqan/sequence/segment_infix.h"(315)
+template <typename THost_, typename TPosition> inline void setBeginPosition(Segment<THost_, SuffixSegment> & me, TPosition new_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(295)
+
+//____________________________________________________________________________
+// setEnd
+
+template <typename THost_, typename TIterator> inline void setEnd(Segment<THost_, InfixSegment> & me, TIterator new_end);       	// "projects/library/seqan/sequence/segment_infix.h"(381)
+template <typename TIterator> inline void setEnd(TIterator new_end);       	// "projects/library/seqan/sequence/segment_infix.h"(891)
+template <typename TIterator, typename THost_> inline void setEnd(Segment<THost_, SuffixSegment> &, TIterator);       	// "projects/library/seqan/sequence/segment_suffix.h"(343)
+template <typename THost_, typename TIterator> inline void setEnd(Segment<THost_, PrefixSegment> & me, TIterator new_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(314)
+template <typename THost_> inline void setEnd(typename Iterator<Segment<THost_, PrefixSegment>, Rooted>::Type new_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(322)
+
+//____________________________________________________________________________
+// setEndPosition
+
+template <typename THost_, typename TPosition> inline void setEndPosition(Segment<THost_, InfixSegment> & me, TPosition new_end);       	// "projects/library/seqan/sequence/segment_infix.h"(409)
+template <typename THost_, typename TPosition> inline void setEndPosition(Segment<THost_, PrefixSegment> & me, TPosition new_end);       	// "projects/library/seqan/sequence/segment_prefix.h"(306)
+
+//____________________________________________________________________________
+// setHost
+
+template <typename THost_> inline void setHost(Segment<THost_, InfixSegment> & me, typename Parameter_<THost_>::Type _host);       	// "projects/library/seqan/sequence/segment_infix.h"(447)
+template <typename THost_> inline void setHost(Segment<THost_ const, InfixSegment> & me, typename Parameter_<THost_>::Type _host);       	// "projects/library/seqan/sequence/segment_infix.h"(455)
+template <typename THost_> inline void setHost(Segment<THost_, SuffixSegment> & me, typename Parameter_<THost_>::Type _host);       	// "projects/library/seqan/sequence/segment_suffix.h"(224)
+template <typename THost_> inline void setHost(Segment<THost_ const, SuffixSegment> & me, typename Parameter_<THost_>::Type _host);       	// "projects/library/seqan/sequence/segment_suffix.h"(232)
+template <typename THost_> inline void setHost(Segment<THost_, PrefixSegment> & me, typename Parameter_<THost_>::Type _host);       	// "projects/library/seqan/sequence/segment_prefix.h"(224)
+template <typename THost_> inline void setHost(Segment<THost_ const, PrefixSegment> & me, typename Parameter_<THost_>::Type _host);       	// "projects/library/seqan/sequence/segment_prefix.h"(232)
+
+//____________________________________________________________________________
+// shareResources
+
+template <typename TValue, typename TSpec> inline bool shareResources(String<TValue, TSpec> const & obj1, TValue const & obj2);       	// "projects/library/seqan/sequence/string_base.h"(208)
+template <typename TValue, typename TSpec> inline bool shareResources(TValue const & obj1, String<TValue, TSpec> const & obj2);       	// "projects/library/seqan/sequence/string_base.h"(217)
+
+//____________________________________________________________________________
+// suffix
+
+template <typename T, typename TPosBegin> inline typename Suffix<T>::Type suffix(T & t, TPosBegin pos_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(548)
+template <typename T, typename TPosBegin> inline typename Suffix<T const>::Type suffix(T const & t, TPosBegin pos_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(555)
+template <typename T, typename TPosBegin> inline typename Suffix<T *>::Type suffix(T * t, TPosBegin pos_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(563)
+template <typename T, typename TPosBegin> inline typename Suffix<Segment<T, PrefixSegment> >::Type suffix(Segment<T, PrefixSegment> & t, TPosBegin pos_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(573)
+template <typename T, typename TPosBegin> inline typename Suffix<Segment<T, PrefixSegment> const>::Type suffix(Segment<T, PrefixSegment> const & t, TPosBegin pos_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(583)
+template <typename T, typename TPosBegin> inline typename Suffix<Segment<T, InfixSegment> >::Type suffix(Segment<T, InfixSegment> & t, TPosBegin pos_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(596)
+template <typename T, typename TPosBegin> inline typename Suffix<Segment<T, InfixSegment> const>::Type suffix(Segment<T, InfixSegment> const & t, TPosBegin pos_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(606)
+template <typename T, typename TPosBegin> inline typename Suffix<Segment<T, SuffixSegment> >::Type suffix(Segment<T, SuffixSegment> & t, TPosBegin pos_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(620)
+template <typename T, typename TPosBegin> inline typename Suffix<Segment<T, SuffixSegment> const>::Type suffix(Segment<T, SuffixSegment> const & t, TPosBegin pos_begin);       	// "projects/library/seqan/sequence/segment_suffix.h"(629)
+template <typename T, typename TIterSpec> inline typename Suffix<T>::Type suffix(T & t, Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterBegin);       	// "projects/library/seqan/sequence/segment_suffix.h"(644)
+template <typename T, typename TIterSpec> inline typename Suffix<T const>::Type suffix(T const & t, Iter<Segment<T, PrefixSegment> const, TIterSpec> const & iterBegin);       	// "projects/library/seqan/sequence/segment_suffix.h"(652)
+template <typename T> inline typename Suffix<T *>::Type suffix(T * t, T * & iterBegin);       	// "projects/library/seqan/sequence/segment_suffix.h"(661)
+template <typename T, typename TIterSpec> inline typename Suffix<Segment<T, PrefixSegment> >::Type suffix(Segment<T, PrefixSegment> & t, Iter<Segment<T, PrefixSegment>, TIterSpec> const & iterBegin);       	// "projects/library/seqan/sequence/segment_suffix.h"(672)
+template <typename T, typename TIterSpec> inline typename Suffix<Segment<T, PrefixSegment> const>::Type suffix(Segment<T, PrefixSegment> const & t, Iter<Segment<T, PrefixSegment> const, TIterSpec> const & iterBegin);       	// "projects/library/seqan/sequence/segment_suffix.h"(683)
+template <typename T, typename TIterSpec> inline typename Suffix<Segment<T, InfixSegment> >::Type suffix(Segment<T, InfixSegment> & t, Iter<Segment<T, InfixSegment>, TIterSpec> const & iterBegin);       	// "projects/library/seqan/sequence/segment_suffix.h"(697)
+template <typename T, typename TIterSpec> inline typename Suffix<Segment<T, InfixSegment> const>::Type suffix(Segment<T, InfixSegment> const & t, Iter<Segment<T, InfixSegment> const, TIterSpec> const & iterBegin);       	// "projects/library/seqan/sequence/segment_suffix.h"(708)
+template <typename T, typename TIterSpec> inline typename Suffix<Segment<T, SuffixSegment> >::Type suffix(Segment<T, SuffixSegment> & t, Iter<Segment<T, SuffixSegment>, TIterSpec> const & iterBegin);       	// "projects/library/seqan/sequence/segment_suffix.h"(723)
+template <typename T, typename TIterSpec> inline typename Suffix<Segment<T, SuffixSegment> const>::Type suffix(Segment<T, SuffixSegment> const & t, Iter<Segment<T, SuffixSegment> const, TIterSpec> const & iterBegin);       	// "projects/library/seqan/sequence/segment_suffix.h"(733)
+
+//____________________________________________________________________________
+// swap
+
+template <typename TAlphabet, typename TSpec> inline void swap(String<TAlphabet, TSpec> & left, String<TAlphabet, TSpec> & right);       	// "projects/library/seqan/sequence/string_base.h"(174)
+template <typename TString, typename TSpec> inline void swap(StringSet<TString, TSpec> & left, StringSet<TString, TSpec> & right);       	// "projects/library/seqan/sequence/string_base.h"(189)
+
+//____________________________________________________________________________
+// value
+
+template <typename THost, typename TSpec, typename TPos> inline typename Reference< Segment<THost, TSpec> >::Type value(Segment<THost, TSpec> & me, TPos pos);       	// "projects/library/seqan/sequence/segment_infix.h"(708)
+template <typename THost, typename TSpec, typename TPos> inline typename Reference< Segment<THost, TSpec> const >::Type value(Segment<THost, TSpec> const & me, TPos pos);       	// "projects/library/seqan/sequence/segment_infix.h"(718)
+template <typename TValue, typename TSpec, typename TPos> inline typename Reference< String<TValue, TSpec> >::Type value(String<TValue, TSpec> & me, TPos pos);       	// "projects/library/seqan/sequence/string_base.h"(234)
+template <typename TValue, typename TSpec, typename TPos> inline typename Reference< String<TValue, TSpec> const >::Type value(String<TValue, TSpec> const & me, TPos pos);       	// "projects/library/seqan/sequence/string_base.h"(245)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _allocateStorage
+
+template <typename TValue, typename TSpec> inline typename Value<String<TValue, Alloc<TSpec> > >::Type * _allocateStorage( String<TValue, Alloc<TSpec> > & me, size_t new_capacity);       	// "projects/library/seqan/sequence/string_alloc.h"(336)
+
+//____________________________________________________________________________
+// _assignCopyPackedString
+
+template <typename TTarget, typename TSource, typename TTag> inline void _assignCopyPackedString(TTarget & target, TSource & source, Tag<TTag> const tag);       	// "projects/library/seqan/sequence/string_packed.h"(377)
+template <typename TTarget, typename TSource, typename TSize, typename TTag> inline void _assignCopyPackedString(TTarget & target, TSource & source, TSize limit, Tag<TTag> const tag);       	// "projects/library/seqan/sequence/string_packed.h"(396)
+
+//____________________________________________________________________________
+// _assignValuePackedStringIterator
+
+template <typename TIter, typename TValue> inline void _assignValuePackedStringIterator(TIter & me, TValue & _value);       	// "projects/library/seqan/sequence/string_packed.h"(1040)
+
+//____________________________________________________________________________
+// _beginDefault
+
+template <typename T> inline typename Iterator<T, Standard>::Type _beginDefault(T & me, Standard);       	// "projects/library/seqan/sequence/sequence_interface.h"(292)
+template <typename T> inline typename Iterator<T const, Standard>::Type _beginDefault(T const & me, Standard);       	// "projects/library/seqan/sequence/sequence_interface.h"(301)
+template <typename T> inline typename Iterator<T, Rooted>::Type _beginDefault(T & me, Rooted);       	// "projects/library/seqan/sequence/sequence_interface.h"(311)
+template <typename T> inline typename Iterator<T const, Rooted>::Type _beginDefault(T const & me, Rooted);       	// "projects/library/seqan/sequence/sequence_interface.h"(320)
+
+//____________________________________________________________________________
+// _bitpos
+
+template <typename TContainer, typename THostspec> inline unsigned char & _bitpos(Iter<TContainer, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(954)
+template <typename TContainer, typename THostspec> inline unsigned char _bitpos(Iter<TContainer, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(961)
+
+//____________________________________________________________________________
+// _capacityReturned
+
+template <typename T, typename TSize, typename TExpand> inline typename Size<T>::Type _capacityReturned( T & me, TSize, Tag<TExpand> const);       	// "projects/library/seqan/sequence/sequence_interface.h"(1435)
+template <typename T, typename TSize> inline typename Size<T>::Type _capacityReturned( T &, TSize new_capacity, Insist);       	// "projects/library/seqan/sequence/sequence_interface.h"(1445)
+
+//____________________________________________________________________________
+// _clearSpace
+
+template <typename TValue, typename THostspec, typename TExpand> inline typename Size< String<TValue, Packed<THostspec> > >::Type _clearSpace(String<TValue, Packed<THostspec> > & me, typename Size< String<TValue, Packed<THostspec> > >::Type size, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_packed.h"(743)
+template <typename TValue, typename THostspec, typename TExpand> inline typename Size< String<TValue, Packed<THostspec> > >::Type _clearSpace(String<TValue, Packed<THostspec> > & me, typename Size< String<TValue, Packed<THostspec> > >::Type size, typename Size< String<TValue, Packed<THostspec> > >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_packed.h"(754)
+template <typename TValue, typename THostspec, typename TPosition, typename TExpand> inline typename Size< String<TValue, Packed<THostspec> > >::Type _clearSpace(String<TValue, Packed<THostspec> > & me, typename Size< String<TValue, Packed<THostspec> > >::Type size, TPosition pos_begin, TPosition pos_end, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_packed.h"(766)
+template <typename TValue, typename THostspec, typename TPosition, typename TExpand> inline typename Size< String<TValue, Packed<THostspec> > >::Type _clearSpace(String<TValue, Packed<THostspec> > & me, typename Size< String<TValue, Packed<THostspec> > >::Type size, TPosition pos_begin, TPosition pos_end, typename Size< String<TValue, Packed<THostspec> > >::Type limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_packed.h"(779)
+template <typename TValue, typename TExpand> inline size_t _clearSpace(TValue * me, size_t size, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(397)
+template <typename TValue, typename TExpand> inline size_t _clearSpace(TValue * me, size_t size, size_t limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(408)
+template <typename TValue, typename TPosition, typename TExpand> inline size_t _clearSpace(TValue * me, size_t size, TPosition pos_begin, TPosition pos_end, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(420)
+template <typename TValue, typename TPosition, typename TExpand> inline size_t _clearSpace(TValue * me, size_t size, TPosition pos_begin, TPosition pos_end, size_t limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(433)
+
+//____________________________________________________________________________
+// _computeSizeForCapacity
+
+template <typename T, typename TSize> inline TSize _computeSizeForCapacity(T const & , TSize capacity);       	// "projects/library/seqan/sequence/sequence_interface.h"(974)
+
+//____________________________________________________________________________
+// _countNonZeroValues
+
+template <typename TValue, typename TSpec, typename TPos > inline typename Size< String<TValue, TSpec> >::Type _countNonZeroValues(String<TValue, TSpec> const & me, TPos i);       	// "projects/library/seqan/sequence/string_set_base.h"(1004)
+
+//____________________________________________________________________________
+// _deallocateStorage
+
+template <typename TValue> inline void _deallocateStorage( String <TValue, CStyle > & me, TValue * ptr, size_t capacity);       	// "projects/library/seqan/sequence/string_cstyle.h"(409)
+template <typename TValue, typename TSpec, typename TPtr> inline void _deallocateStorage( String<TValue, Alloc<TSpec> > & me, TPtr * ptr, size_t capacity);       	// "projects/library/seqan/sequence/string_alloc.h"(366)
+
+//____________________________________________________________________________
+// _endDefault
+
+template <typename T> inline typename Iterator<T, Standard>::Type _endDefault(T & me, Standard);       	// "projects/library/seqan/sequence/sequence_interface.h"(474)
+template <typename T> inline typename Iterator<T const, Standard>::Type _endDefault(T const & me, Standard);       	// "projects/library/seqan/sequence/sequence_interface.h"(482)
+template <typename T> inline typename Iterator<T, Rooted>::Type _endDefault(T & me, Rooted);       	// "projects/library/seqan/sequence/sequence_interface.h"(492)
+template <typename T> inline typename Iterator<T const, Rooted>::Type _endDefault(T const & me, Rooted);       	// "projects/library/seqan/sequence/sequence_interface.h"(501)
+
+//____________________________________________________________________________
+// _findIthNonZeroValue
+
+template <typename TValue, typename TSpec, typename TPos > inline typename Size< String<TValue, TSpec> >::Type _findIthNonZeroValue(String<TValue, TSpec> const & me, TPos i);       	// "projects/library/seqan/sequence/string_set_base.h"(981)
+
+//____________________________________________________________________________
+// _reallocateStorage
+
+template <typename TValue> inline TValue * _reallocateStorage( String <TValue, CStyle > & me, size_t new_capacity, Exact);       	// "projects/library/seqan/sequence/string_cstyle.h"(380)
+
+//____________________________________________________________________________
+// _refreshStringSetLimits
+
+template <typename TString, typename TSpec > inline void _refreshStringSetLimits(StringSet<TString, Owner<ConcatDirect<TSpec> > > &);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(224)
+template <typename T > inline void _refreshStringSetLimits(T &);       	// "projects/library/seqan/sequence/string_set_base.h"(951)
+template <typename TString, typename TSpec > inline void _refreshStringSetLimits(StringSet< TString, TSpec > & me);       	// "projects/library/seqan/sequence/string_set_base.h"(955)
+
+//____________________________________________________________________________
+// _setBegin
+
+template <typename TValue, typename TValue2> inline void _setBegin(String <TValue, CStyle > & me, TValue2 new_begin);       	// "projects/library/seqan/sequence/string_cstyle.h"(313)
+template <typename TValue, typename TSpec, typename TPtr> inline void _setBegin( String<TValue, Alloc<TSpec> > & me, TPtr * new_begin);       	// "projects/library/seqan/sequence/string_alloc.h"(275)
+
+//____________________________________________________________________________
+// _setCapacity
+
+template <typename TValue, typename TSpec> inline void _setCapacity( String<TValue, Alloc<TSpec> > & me, size_t new_capacity);       	// "projects/library/seqan/sequence/string_alloc.h"(311)
+
+//____________________________________________________________________________
+// _setEnd
+
+template <typename TValue, typename TValue2> inline void _setEnd(String <TValue, CStyle > & me, TValue2 new_end);       	// "projects/library/seqan/sequence/string_cstyle.h"(347)
+
+//____________________________________________________________________________
+// _setLength
+
+template <typename TValue, typename THostspec, typename TSize> inline void _setLength( String<TValue, Packed<THostspec> > & me, TSize new_length);       	// "projects/library/seqan/sequence/string_packed.h"(359)
+template <typename TValue> inline void _setLength(TValue * me, size_t new_length);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(365)
+template <typename TValue, unsigned int LENGTH> inline void _setLength( String<TValue, Array<LENGTH> > & me, size_t new_length);       	// "projects/library/seqan/sequence/string_array.h"(233)
+template <typename TValue, typename TSpec> inline void _setLength( String<TValue, Alloc<TSpec> > & me, size_t new_length);       	// "projects/library/seqan/sequence/string_alloc.h"(296)
+
+//____________________________________________________________________________
+// _tell
+
+template <typename TStringSet, typename TSpec> inline typename Size<typename Value<TStringSet>::Type >::Type _tell(Iter<TStringSet, ConcatVirtual<TSpec> > const & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(319)
+
+//____________________________________________________________________________
+// _toCStringImpl
+
+template <typename TValue, typename TSpec> inline TValue * _toCStringImpl(String<TValue, TSpec> & me, True);       	// "projects/library/seqan/sequence/string_cstyle.h"(908)
+
+//____________________________________________________________________________
+// _validStringSetLimits
+
+template <typename TString, typename TSpec > inline bool _validStringSetLimits(StringSet<TString, Owner<ConcatDirect<TSpec> > > const &);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(215)
+template <typename T > inline bool _validStringSetLimits(T const &);       	// "projects/library/seqan/sequence/string_set_base.h"(937)
+template <typename TString, typename TSpec > inline bool _validStringSetLimits(StringSet< TString, TSpec > const & me);       	// "projects/library/seqan/sequence/string_set_base.h"(942)
+
+//____________________________________________________________________________
+// append
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void append(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, Generous);       	// "projects/library/seqan/sequence/adapt_std_string.h"(434)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void append(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Generous);       	// "projects/library/seqan/sequence/adapt_std_string.h"(445)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void append(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, Limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(472)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void append(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(483)
+template <typename TTarget, typename TSource> inline void append(TTarget & target, TSource & source);       	// "projects/library/seqan/sequence/sequence_interface.h"(1105)
+template <typename TTarget, typename TSource> inline void append(TTarget const & target, TSource & source);       	// "projects/library/seqan/sequence/sequence_interface.h"(1114)
+template <typename TTarget, typename TSource> inline void append(TTarget & target, TSource const & source);       	// "projects/library/seqan/sequence/sequence_interface.h"(1123)
+template <typename TTarget, typename TSource> inline void append(TTarget const & target, TSource const & source);       	// "projects/library/seqan/sequence/sequence_interface.h"(1132)
+template <typename TTarget, typename TSource> inline void append(TTarget & target, TSource & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1142)
+template <typename TTarget, typename TSource> inline void append(TTarget const & target, TSource & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1152)
+template <typename TTarget, typename TSource> inline void append(TTarget & target, TSource const & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1162)
+template <typename TTarget, typename TSource> inline void append(TTarget const & target, TSource const & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1172)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void append(TTargetValue * target, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(541)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void append(TTargetValue * target, TSource const & source, size_t limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(552)
+template <typename TTargetValue, typename TSourceValue, typename TExpand> inline void append(TTargetValue * target, TSourceValue const * source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(565)
+template <typename TTargetValue, typename TSourceValue, typename TExpand> inline void append(TTargetValue * target, TSourceValue const * source, size_t limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(576)
+template <typename TValue, unsigned int SPACE, typename TSource, typename TExpand> inline void append( String<TValue, Block<SPACE> >& me, TSource const& source, Tag<TExpand> const );       	// "projects/library/seqan/sequence/string_block.h"(408)
+template <typename TChar, typename TAlloc, typename TSource> inline void append(::std::vector<TChar, TAlloc> & target, TSource const & source, Generous);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(432)
+template <typename TChar, typename TAlloc, typename TSource> inline void append(::std::vector<TChar, TAlloc> & target, TSource const & source, typename Size< ::std::vector<TChar, TAlloc> >::Type limit, Generous);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(443)
+template <typename TChar, typename TAlloc, typename TSource> inline void append(::std::vector<TChar, TAlloc> & target, TSource const & source, Limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(471)
+template <typename TChar, typename TAlloc, typename TSource> inline void append(::std::vector<TChar, TAlloc> & target, TSource const & source, typename Size< ::std::vector<TChar, TAlloc> >::Type limit, Limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(482)
+
+//____________________________________________________________________________
+// appendValue
+
+template <typename TString, typename TExpand > inline void appendValue( StringSet<TString, Dependent<Tight> > & me, TString const & obj, Tag<TExpand> const & tag);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(147)
+template <typename TString, typename TString2, typename TExpand > inline void appendValue( StringSet<TString, Owner<Default> > & me, TString2 const & obj, Tag<TExpand> const & tag);       	// "projects/library/seqan/sequence/string_set_owner.h"(129)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TValue, typename TTag> inline void appendValue(::std::basic_string<TChar, TCharTraits, TAlloc> & me, TValue const & _value, TTag);       	// "projects/library/seqan/sequence/adapt_std_string.h"(501)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TValue> inline void appendValue(::std::basic_string<TChar, TCharTraits, TAlloc> & me, TValue const & _value, Limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(511)
+template <typename TString, typename TString2, typename TExpand > inline void appendValue( StringSet<TString, Owner<ConcatDirect<void> > > & me, TString2 const & obj, Tag<TExpand> const & tag);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(235)
+template <typename TString, typename TDelimiter, typename TString2, typename TExpand > inline void appendValue( StringSet<TString, Owner<ConcatDirect<TDelimiter> > > & me, TString2 const & obj, Tag<TExpand> const & tag);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(245)
+template <typename T, typename TValue> inline void appendValue(T & me, TValue const & _value);       	// "projects/library/seqan/sequence/sequence_interface.h"(1199)
+template <typename T, typename TValue> inline void appendValue(T const & me, TValue const & _value);       	// "projects/library/seqan/sequence/sequence_interface.h"(1208)
+template <typename TValue, unsigned int SPACE, typename TVal, typename TExpand> inline void appendValue( String<TValue, Block<SPACE> >& me, TVal const& source, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_block.h"(427)
+template <typename TChar, typename TAlloc, typename TValue, typename TTag> inline void appendValue(::std::vector<TChar, TAlloc> & me, TValue const & _value, TTag);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(500)
+template <typename TChar, typename TAlloc, typename TValue> inline void appendValue(::std::vector<TChar, TAlloc> & me, TValue const & _value, Limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(510)
+template <typename TString, typename TExpand > inline void appendValue( StringSet<TString, Dependent<Generous> > & me, TString const & obj, Tag<TExpand> const & tag);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(122)
+
+//____________________________________________________________________________
+// assign
+
+template <typename TValue> inline void assign(String <TValue, CStyle > & target, TValue * source);       	// "projects/library/seqan/sequence/string_cstyle.h"(448)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void assign(String<TTargetValue, CStyle> & target, TSource & source, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_cstyle.h"(464)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void assign(String<TTargetValue, CStyle> & target, TSource const & source, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_cstyle.h"(474)
+template <typename TTargetValue, typename TSource, typename TSize, typename TExpand> inline void assign(String<TTargetValue, CStyle> & target, TSource & source, TSize , Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_cstyle.h"(485)
+template <typename TTargetValue, typename TSource, typename TSize, typename TExpand> inline void assign(String<TTargetValue, CStyle> & target, TSource const & source, TSize limit, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_cstyle.h"(496)
+template <typename TTargetValue, typename TSourceValue, typename TExpand> inline void assign(String<TTargetValue, CStyle> & target, TSourceValue const * source, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_cstyle.h"(508)
+template <typename TTargetValue, typename TSourceValue, typename TSize, typename TExpand> inline void assign(String<TTargetValue, CStyle> & target, TSourceValue const * source, TSize limit, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_cstyle.h"(519)
+template <typename TValue, typename TSourceSpec, typename TExpand> inline void assign(String<TValue, CStyle> & target, String<TValue, TSourceSpec> & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_cstyle.h"(587)
+template <typename TValue, typename THostspec, typename TTag> inline void assign(String<TValue, Packed<THostspec> > & target, String<TValue, Packed<THostspec> > & source, Tag<TTag> const tag);       	// "projects/library/seqan/sequence/string_packed.h"(423)
+template <typename TValue, typename THostspec, typename TTag> inline void assign(String<TValue, Packed<THostspec> > & target, String<TValue, Packed<THostspec> > const & source, Tag<TTag> const tag);       	// "projects/library/seqan/sequence/string_packed.h"(432)
+template <typename TValue, typename THostspec, typename TSize, typename TTag> void assign(String<TValue, Packed<THostspec> > & target, String<TValue, Packed<THostspec> > & source, TSize limit, Tag<TTag> const tag);       	// "projects/library/seqan/sequence/string_packed.h"(441)
+template <typename TValue, typename THostspec, typename TSize, typename TTag> void assign(String<TValue, Packed<THostspec> > & target, String<TValue, Packed<THostspec> > const & source, TSize limit, Tag<TTag> const tag);       	// "projects/library/seqan/sequence/string_packed.h"(449)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source);       	// "projects/library/seqan/sequence/adapt_std_string.h"(281)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source);       	// "projects/library/seqan/sequence/adapt_std_string.h"(289)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource, typename TSize> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, TSize limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(299)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource, typename TSize> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, TSize limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(308)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, Generous);       	// "projects/library/seqan/sequence/adapt_std_string.h"(320)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, Generous);       	// "projects/library/seqan/sequence/adapt_std_string.h"(329)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Generous);       	// "projects/library/seqan/sequence/adapt_std_string.h"(356)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Generous);       	// "projects/library/seqan/sequence/adapt_std_string.h"(366)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, Limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(378)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, Limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(387)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(398)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(413)
+template <typename TTarget, typename TSource> inline void assign(TTarget & target, TSource & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1045)
+template <typename TTarget, typename TSource> inline void assign(TTarget const & target, TSource & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1055)
+template <typename TTarget, typename TSource> inline void assign(TTarget & target, TSource const & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1065)
+template <typename TTarget, typename TSource> inline void assign(TTarget const & target, TSource const & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1075)
+template <typename TTargetValue, typename TSource> inline void assign(TTargetValue * target, TSource & source);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(447)
+template <typename TTargetValue, typename TSource> inline void assign(TTargetValue * target, TSource const & source);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(456)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void assign(TTargetValue * target, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(467)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void assign(TTargetValue * target, TSource const & source, size_t limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(478)
+template <typename TTargetValue, typename TSourceValue, typename TExpand> inline void assign(TTargetValue * target, TSourceValue const * source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(491)
+template <typename TTargetValue, typename TSourceValue, typename TExpand> inline void assign(TTargetValue * target, TSourceValue const * source, size_t limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(502)
+template <typename TValue, unsigned int SPACE, typename TSource> inline void assign( String<TValue, Block<SPACE> >& target, TSource const& source);       	// "projects/library/seqan/sequence/string_block.h"(245)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource & source);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(279)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource const & source);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(287)
+template <typename TChar, typename TAlloc, typename TSource, typename TSize> inline void assign(::std::vector<TChar, TAlloc> & target, TSource & source, TSize limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(297)
+template <typename TChar, typename TAlloc, typename TSource, typename TSize> inline void assign(::std::vector<TChar, TAlloc> & target, TSource const & source, TSize limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(306)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource & source, Generous);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(318)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource const & source, Generous);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(327)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource & source, typename Size< ::std::vector<TChar, TAlloc> >::Type limit, Generous);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(354)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource const & source, typename Size< ::std::vector<TChar, TAlloc> >::Type limit, Generous);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(364)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource & source, Limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(376)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource const & source, Limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(385)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource & source, typename Size< ::std::vector<TChar, TAlloc> >::Type limit, Limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(396)
+template <typename TChar, typename TAlloc, typename TSource> inline void assign(::std::vector<TChar, TAlloc> & target, TSource const & source, typename Size< ::std::vector<TChar, TAlloc> >::Type limit, Limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(411)
+
+//____________________________________________________________________________
+// assignValue
+
+template <typename TContainer, typename THostspec, typename TValue> inline void assignValue(Iter<TContainer, Packed<THostspec> > & me, TValue const & _value);       	// "projects/library/seqan/sequence/string_packed.h"(1057)
+template <typename TContainer, typename THostspec, typename TValue> inline void assignValue(Iter<TContainer, Packed<THostspec> > const & me, TValue const & _value);       	// "projects/library/seqan/sequence/string_packed.h"(1067)
+template <typename TString, typename TSpec, typename TPos, typename TSequence > inline void assignValue( StringSet<TString, Owner<TSpec> > & me, TPos pos, TSequence const & seq);       	// "projects/library/seqan/sequence/string_set_owner.h"(144)
+template <typename T, typename TValue, typename TPos> inline void assignValue(T & me, TPos pos, TValue const & _value);       	// "projects/library/seqan/sequence/sequence_interface.h"(833)
+template <typename TValue, typename TPos> inline void assignValue(TValue * me, TPos pos, TValue const & _value);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(285)
+
+//____________________________________________________________________________
+// assignValueById
+
+template <typename TString, typename TString2> inline typename Id<StringSet<TString, Dependent<Tight> > >::Type assignValueById(StringSet<TString, Dependent<Tight> >& me, TString2& obj);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(215)
+template <typename TString, typename TId1> inline typename Id<StringSet<TString, Dependent<Tight> > >::Type assignValueById(StringSet<TString, Dependent<Tight> >& me, TString& obj, TId1 id);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(228)
+template <typename TString, typename TSpec, typename TId> inline typename Id<StringSet<TString, Owner<TSpec> > >::Type assignValueById(StringSet<TString, Owner<TSpec> > & me, TString& obj, TId id);       	// "projects/library/seqan/sequence/string_set_owner.h"(216)
+template <typename TString, typename TSpec, typename TString2> inline typename Id<StringSet<TString, TSpec> >::Type assignValueById(StringSet<TString, TSpec>& me, TString2& obj);       	// "projects/library/seqan/sequence/string_set_base.h"(1201)
+template <typename TString, typename TSpec1, typename TSpec2, typename TId> inline typename Id<StringSet<TString, TSpec1> >::Type assignValueById(StringSet<TString, TSpec1>& dest, StringSet<TString, TSpec2>& source, TId id);       	// "projects/library/seqan/sequence/string_set_base.h"(1213)
+template <typename TString, typename TId> inline typename Id<StringSet<TString, Dependent<Generous> > >::Type assignValueById(StringSet<TString, Dependent<Generous> >& me, TString& obj, TId id);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(194)
+
+//____________________________________________________________________________
+// assign_std_string_Generous_impl
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void assign_std_string_Generous_impl(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(340)
+
+//____________________________________________________________________________
+// assign_std_vector_Generous_impl
+
+template <typename TChar, typename TAlloc, typename TSource> inline void assign_std_vector_Generous_impl(::std::vector<TChar, TAlloc> & target, TSource & source, typename Size< ::std::vector<TChar, TAlloc> >::Type limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(338)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename TSSet, typename TSpec> inline bool atBegin(Iter<TSSet, ConcatVirtual<TSpec> > & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(442)
+template <typename TSSet, typename TSpec> inline bool atBegin(Iter<TSSet, ConcatVirtual<TSpec> > const & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(449)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TValue> inline bool atEnd(TValue * pos);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(307)
+template <typename TValue> inline bool atEnd(TValue const * pos, TValue const * );       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(316)
+template <typename TSSet, typename TSpec> inline bool atEnd(Iter<TSSet, ConcatVirtual<TSpec> > & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(460)
+template <typename TSSet, typename TSpec> inline bool atEnd(Iter<TSSet, ConcatVirtual<TSpec> > const & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(467)
+template <typename TValue, unsigned int SPACE, typename TIteratorSpec> inline bool atEnd( Iter<String<TValue, Block<SPACE> >, TIteratorSpec>& it, String<TValue, Block<SPACE> >& container);       	// "projects/library/seqan/sequence/string_block.h"(287)
+
+//____________________________________________________________________________
+// atEndOfSequence
+
+template <typename TIterator> inline bool atEndOfSequence(TIterator const & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(492)
+template <typename TSSet, typename TSpec> inline bool atEndOfSequence(Iter<TSSet, ConcatVirtual<TSpec> > const & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(499)
+template <typename TIterator> inline bool atEndOfSequence(TIterator & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(510)
+
+//____________________________________________________________________________
+// back
+
+template <typename T> inline typename Reference<T const>::Type back(T const & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(732)
+template <typename T> inline typename Reference<T>::Type back(T & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(740)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TValue> inline typename Iterator<String<TValue, CStyle >, Standard>::Type begin(String <TValue, CStyle > & me, Standard);       	// "projects/library/seqan/sequence/string_cstyle.h"(292)
+template <typename TValue> inline typename Iterator<String<TValue, CStyle > const, Standard>::Type begin(String <TValue, CStyle > const & me, Standard);       	// "projects/library/seqan/sequence/string_cstyle.h"(301)
+template <typename TStringSet, typename TSpec > inline typename Iterator<ConcatenatorManyToOne<TStringSet const>, Tag<TSpec> const>::Type begin(ConcatenatorManyToOne<TStringSet const> concat, Tag<TSpec> const &);       	// "projects/library/seqan/sequence/sequence_concatenator.h"(220)
+template <typename TStringSet, typename TSpec > inline typename Iterator<ConcatenatorManyToOne<TStringSet>, Tag<TSpec> const>::Type begin(ConcatenatorManyToOne<TStringSet> concat, Tag<TSpec> const &);       	// "projects/library/seqan/sequence/sequence_concatenator.h"(228)
+template <typename TValue, typename THostspec, typename TTag> inline typename Iterator<String<TValue, Packed<THostspec> >, Tag<TTag> const>::Type begin(String<TValue, Packed<THostspec> > & me, Tag<TTag> const tag_);       	// "projects/library/seqan/sequence/string_packed.h"(499)
+template <typename TValue, typename THostspec, typename TTag> inline typename Iterator<String<TValue, Packed<THostspec> > const, Tag<TTag> const>::Type begin(String<TValue, Packed<THostspec> > const & me, Tag<TTag> const tag_);       	// "projects/library/seqan/sequence/string_packed.h"(508)
+template <typename TChar, typename TCharTraits, typename TAlloc> inline typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Standard>::Type begin(::std::basic_string<TChar, TCharTraits, TAlloc> & me, Standard);       	// "projects/library/seqan/sequence/adapt_std_string.h"(186)
+template <typename TChar, typename TCharTraits, typename TAlloc> inline typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc> const, Standard>::Type begin(::std::basic_string<TChar, TCharTraits, TAlloc> const & me, Standard);       	// "projects/library/seqan/sequence/adapt_std_string.h"(194)
+template <typename T> inline typename Iterator<T, typename DefaultGetIteratorSpec<T>::Type>::Type begin(T & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(351)
+template <typename T> inline typename Iterator<T const, typename DefaultGetIteratorSpec<T>::Type>::Type begin(T const & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(359)
+template <typename T, typename TSpec> inline typename Iterator<T, Tag<TSpec> const>::Type begin(T & me, Tag<TSpec> const tag_);       	// "projects/library/seqan/sequence/sequence_interface.h"(375)
+template <typename T, typename TSpec> inline typename Iterator<T const, Tag<TSpec> const>::Type begin(T const & me, Tag<TSpec> const tag_);       	// "projects/library/seqan/sequence/sequence_interface.h"(383)
+template <typename T> inline typename Iterator<T *, typename DefaultGetIteratorSpec<T>::Type>::Type begin(T * me);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(172)
+template <typename TValue> inline typename Iterator<TValue *, Standard>::Type begin(TValue * me, Standard);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(183)
+template <typename TValue> inline typename Iterator<TValue const *, Standard>::Type begin(TValue const * me, Standard);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(194)
+template <typename TValue, typename TSpec> inline typename Iterator<TValue *, Tag<TSpec> const>::Type begin(TValue * me, Tag<TSpec> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(203)
+template <typename TValue, typename TSpec> inline typename Iterator<TValue const *, Tag<TSpec> const>::Type begin(TValue const * me, Tag<TSpec> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(213)
+template <typename TValue, unsigned int LENGTH> inline typename Iterator<String<TValue, Array<LENGTH> >, Standard>::Type begin(String<TValue, Array<LENGTH> > & me, Standard);       	// "projects/library/seqan/sequence/string_array.h"(160)
+template <typename TValue, unsigned int LENGTH> inline typename Iterator<String<TValue, Array<LENGTH> > const, Standard>::Type begin(String<TValue, Array<LENGTH> > const & me, Standard);       	// "projects/library/seqan/sequence/string_array.h"(168)
+template <typename TValue, unsigned int SPACE, typename TSpec> inline typename Iterator<String<TValue, Block<SPACE> >, Tag<TSpec> const >::Type begin(String<TValue, Block<SPACE> > & me, Tag<TSpec> const);       	// "projects/library/seqan/sequence/string_block.h"(203)
+template <typename TValue, unsigned int SPACE, typename TSpec> inline typename Iterator<String<TValue, Block<SPACE> > const, Tag<TSpec> const>::Type begin(String<TValue, Block<SPACE> > const & me, Tag<TSpec> const);       	// "projects/library/seqan/sequence/string_block.h"(211)
+template <typename TString, typename TSpec, typename TTag> inline typename Iterator<StringSet<TString, TSpec >, Tag<TTag> const>::Type begin(StringSet<TString, TSpec > & me, Tag<TTag> const & tag);       	// "projects/library/seqan/sequence/string_set_base.h"(1084)
+template <typename TString, typename TSpec, typename TTag> inline typename Iterator<StringSet<TString, TSpec > const, Tag<TTag> const>::Type begin(StringSet<TString, TSpec > const & me, Tag<TTag> const & tag);       	// "projects/library/seqan/sequence/string_set_base.h"(1092)
+template <typename TChar, typename TAlloc> inline typename Iterator< ::std::vector<TChar, TAlloc>, Standard>::Type begin(::std::vector<TChar, TAlloc> & me, Standard);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(184)
+template <typename TChar, typename TAlloc> inline typename Iterator< ::std::vector<TChar, TAlloc> const, Standard>::Type begin(::std::vector<TChar, TAlloc> const & me, Standard);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(192)
+template <typename TValue, typename TSpec> inline typename Iterator<String<TValue, Alloc<TSpec> >, Standard>::Type begin(String<TValue, Alloc<TSpec> > & me, Standard);       	// "projects/library/seqan/sequence/string_alloc.h"(199)
+template <typename TValue, typename TSpec> inline typename Iterator<String<TValue, Alloc<TSpec> > const, Standard>::Type begin(String<TValue, Alloc<TSpec> > const & me, Standard);       	// "projects/library/seqan/sequence/string_alloc.h"(207)
+
+//____________________________________________________________________________
+// beginPosition
+
+template <typename T> inline typename Position<T>::Type beginPosition(T &);       	// "projects/library/seqan/sequence/sequence_interface.h"(452)
+template <typename T> inline typename Position<T>::Type beginPosition(T const &);       	// "projects/library/seqan/sequence/sequence_interface.h"(460)
+
+//____________________________________________________________________________
+// capacity
+
+template <typename TValue> inline size_t capacity(String <TValue, CStyle > const & me);       	// "projects/library/seqan/sequence/string_cstyle.h"(361)
+template <typename TValue, typename THostspec> inline typename Size<String<TValue, Packed<THostspec> > const>::Type capacity(String<TValue, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(566)
+template <typename TChar, typename TCharTraits, typename TAlloc> inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type capacity(::std::basic_string<TChar, TCharTraits, TAlloc> const & me);       	// "projects/library/seqan/sequence/adapt_std_string.h"(248)
+template <typename T> inline typename Size<T const>::Type capacity(T const & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(929)
+template <typename TValue, unsigned int LENGTH> inline size_t capacity(String<TValue, Array<LENGTH> > &);       	// "projects/library/seqan/sequence/string_array.h"(197)
+template <typename TValue, unsigned int LENGTH> inline size_t capacity(String<TValue, Array<LENGTH> > const &);       	// "projects/library/seqan/sequence/string_array.h"(205)
+template <typename TValue, unsigned int SPACE> inline typename Size<String<TValue, Block<SPACE> > >::Type capacity(String<TValue, Block<SPACE> > const & me);       	// "projects/library/seqan/sequence/string_block.h"(605)
+template <typename TChar, typename TAlloc> inline typename Size< ::std::vector<TChar, TAlloc> >::Type capacity(::std::vector<TChar, TAlloc> const & me);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(246)
+template <typename TValue, typename TSpec> inline size_t capacity(String<TValue, Alloc<TSpec> > & me);       	// "projects/library/seqan/sequence/string_alloc.h"(236)
+template <typename TValue, typename TSpec> inline size_t capacity(String<TValue, Alloc<TSpec> > const & me);       	// "projects/library/seqan/sequence/string_alloc.h"(244)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TString > inline void clear(StringSet<TString, Dependent<Tight> >& me);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(164)
+template <typename TValue> inline void clear(String<TValue, CStyle> & me);       	// "projects/library/seqan/sequence/string_cstyle.h"(599)
+template <typename TValue, typename THostspec> inline void clear(String<TValue, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(581)
+template <typename TString > inline void clear(StringSet<TString, Owner<Default> > & me);       	// "projects/library/seqan/sequence/string_set_owner.h"(167)
+template <typename TChar, typename TCharTraits, typename TAlloc> inline void clear(::std::basic_string<TChar, TCharTraits, TAlloc> & me);       	// "projects/library/seqan/sequence/adapt_std_string.h"(266)
+template <typename TString, typename TDelimiter > inline void clear(StringSet<TString, Owner<ConcatDirect<TDelimiter> > > & me);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(310)
+template <typename TValue> inline void clear(TValue * me);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(375)
+template <typename TValue, unsigned int SPACE> inline void clear(String<TValue, Block<SPACE> >& me);       	// "projects/library/seqan/sequence/string_block.h"(301)
+template <typename TChar, typename TAlloc> inline void clear(::std::vector<TChar, TAlloc> & me);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(264)
+template <typename TString > inline void clear(StringSet<TString, Dependent<Generous> > & me);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(134)
+
+//____________________________________________________________________________
+// computeGenerousCapacity
+
+template <typename T, typename TSize> inline TSize computeGenerousCapacity(T const & , TSize capacity);       	// "projects/library/seqan/sequence/sequence_interface.h"(1003)
+
+//____________________________________________________________________________
+// concat
+
+template <typename TString, typename TSpec> inline typename Concatenator<StringSet<TString, Owner<ConcatDirect<TSpec> > > >::Type & concat(StringSet<TString, Owner<ConcatDirect<TSpec> > > & me);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(456)
+template <typename TString, typename TSpec> inline typename Concatenator<StringSet<TString, Owner<ConcatDirect<TSpec> > > const>::Type & concat(StringSet<TString, Owner<ConcatDirect<TSpec> > > const & me);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(463)
+template <typename TString> inline typename Concatenator<TString>::Type & concat(TString & string);       	// "projects/library/seqan/sequence/string_set_base.h"(1280)
+template <typename TString> inline typename Concatenator<TString const>::Type & concat(TString const & string);       	// "projects/library/seqan/sequence/string_set_base.h"(1288)
+template <typename TString, typename TSpec> inline typename Concatenator<StringSet<TString, TSpec> >::Type & concat(StringSet<TString, TSpec> & me);       	// "projects/library/seqan/sequence/string_set_base.h"(1295)
+template <typename TString, typename TSpec> inline typename Concatenator<StringSet<TString, TSpec> const>::Type & concat(StringSet<TString, TSpec> const & constMe);       	// "projects/library/seqan/sequence/string_set_base.h"(1303)
+
+//____________________________________________________________________________
+// container
+
+template <typename TContainer, typename THostspec> inline typename Parameter_<TContainer>::Type container(Iter<TContainer, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(908)
+template <typename TContainer, typename THostspec> inline typename Parameter_<TContainer>::Type container(Iter<TContainer, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(915)
+template <typename TSSet, typename TSpec> inline typename Concatenator<TSSet>::Type container(Iter<TSSet, ConcatVirtual<TSpec> > & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(424)
+template <typename TSSet, typename TSpec> inline typename Concatenator<TSSet>::Type container(Iter<TSSet, ConcatVirtual<TSpec> > const & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(431)
+
+//____________________________________________________________________________
+// countSequences
+
+template <typename TString> inline unsigned countSequences(TString const &);       	// "projects/library/seqan/sequence/string_set_base.h"(885)
+template <typename TString, typename TSpec> inline typename Size<StringSet<TString, TSpec> >::Type countSequences(StringSet<TString, TSpec> const & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(891)
+
+//____________________________________________________________________________
+// create
+
+template <typename TTargetValue, typename TSource> inline void create(String<TTargetValue, CStyle> & target, TSource & source);       	// "projects/library/seqan/sequence/string_cstyle.h"(770)
+template <typename TTargetValue, typename TSource, typename TSize> inline void create(String<TTargetValue, CStyle> & target, TSource & source, TSize limit);       	// "projects/library/seqan/sequence/string_cstyle.h"(781)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void create(String<TTargetValue, CStyle> & target, TSource & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_cstyle.h"(792)
+template <typename TTargetValue, typename TSource, typename TSize, typename TExpand> inline void create(String<TTargetValue, CStyle> & target, TSource & source, TSize limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_cstyle.h"(803)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void create(String<TTargetValue, CStyle> & target, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_cstyle.h"(813)
+template <typename TTargetValue, typename TSource, typename TSize, typename TExpand> inline void create(String<TTargetValue, CStyle> & target, TSource const & source, TSize limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_cstyle.h"(824)
+template <typename TTargetValue, typename TSourceValue, typename TExpand> inline void create(String<TTargetValue, CStyle> & target, TSourceValue const * source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_cstyle.h"(836)
+template <typename TTargetValue, typename TSourceValue, typename TSize, typename TExpand> inline void create(String<TTargetValue, CStyle> & target, TSourceValue const * source, TSize limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_cstyle.h"(847)
+
+//____________________________________________________________________________
+// dependent
+
+template <typename TValue> inline bool dependent(String <TValue, CStyle > & me);       	// "projects/library/seqan/sequence/string_cstyle.h"(434)
+
+//____________________________________________________________________________
+// empty
+
+template <typename TChar, typename TCharTraits, typename TAlloc> inline bool empty(::std::basic_string<TChar, TCharTraits, TAlloc> const & me);       	// "projects/library/seqan/sequence/adapt_std_string.h"(257)
+template <typename T> inline bool empty(T const & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(953)
+template <typename TValue> inline bool empty(TValue * me);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(387)
+template <typename TValue, unsigned int SPACE> inline bool empty(String<TValue, Block<SPACE> > const& me);       	// "projects/library/seqan/sequence/string_block.h"(578)
+template <typename TChar, typename TAlloc> inline bool empty(::std::vector<TChar, TAlloc> const & me);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(255)
+
+//____________________________________________________________________________
+// end
+
+template <typename TValue> inline typename Iterator<String <TValue, CStyle >, Standard>::Type end(String <TValue, CStyle > & me, Standard);       	// "projects/library/seqan/sequence/string_cstyle.h"(326)
+template <typename TValue> inline typename Iterator<String <TValue, CStyle > const, Standard>::Type end(String <TValue, CStyle > const & me, Standard);       	// "projects/library/seqan/sequence/string_cstyle.h"(335)
+template <typename TStringSet, typename TSpec > inline typename Iterator<ConcatenatorManyToOne<TStringSet const>, Tag<TSpec> const>::Type end(ConcatenatorManyToOne<TStringSet const> concat, Tag<TSpec> const &);       	// "projects/library/seqan/sequence/sequence_concatenator.h"(240)
+template <typename TStringSet, typename TSpec > inline typename Iterator<ConcatenatorManyToOne<TStringSet>, Tag<TSpec> const>::Type end(ConcatenatorManyToOne<TStringSet> concat, Tag<TSpec> const &);       	// "projects/library/seqan/sequence/sequence_concatenator.h"(248)
+template <typename TValue, typename THostspec, typename TTag> inline typename Iterator<String<TValue, Packed<THostspec> >, Tag<TTag> const>::Type end(String<TValue, Packed<THostspec> > & me, Tag<TTag> const tag_);       	// "projects/library/seqan/sequence/string_packed.h"(521)
+template <typename TValue, typename THostspec, typename TTag> inline typename Iterator<String<TValue, Packed<THostspec> > const, Tag<TTag> const>::Type end(String<TValue, Packed<THostspec> > const & me, Tag<TTag> const tag_);       	// "projects/library/seqan/sequence/string_packed.h"(530)
+template <typename TChar, typename TCharTraits, typename TAlloc> inline typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc>, Standard>::Type end(::std::basic_string<TChar, TCharTraits, TAlloc> & me, Standard);       	// "projects/library/seqan/sequence/adapt_std_string.h"(204)
+template <typename TChar, typename TCharTraits, typename TAlloc> inline typename Iterator< ::std::basic_string<TChar, TCharTraits, TAlloc> const, Standard>::Type end(::std::basic_string<TChar, TCharTraits, TAlloc> const & me, Standard);       	// "projects/library/seqan/sequence/adapt_std_string.h"(212)
+template <typename T> inline typename Iterator<T, typename DefaultGetIteratorSpec<T>::Type>::Type end(T & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(532)
+template <typename T> inline typename Iterator<T const, typename DefaultGetIteratorSpec<T>::Type>::Type end(T const & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(540)
+template <typename T, typename TSpec> inline typename Iterator<T, Tag<TSpec> const>::Type end(T & me, Tag<TSpec> const tag_);       	// "projects/library/seqan/sequence/sequence_interface.h"(549)
+template <typename T, typename TSpec> inline typename Iterator<T const, Tag<TSpec> const>::Type end(T const & me, Tag<TSpec> const tag_);       	// "projects/library/seqan/sequence/sequence_interface.h"(558)
+template <typename TValue> inline typename Iterator<TValue *, Standard>::Type end(TValue * me, Standard);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(225)
+template <typename TValue> inline typename Iterator<TValue const *, Standard>::Type end(TValue const * me, Standard);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(235)
+template <typename TValue, typename TSpec> inline typename Iterator<TValue *, Tag<TSpec> const>::Type end(TValue * me, Tag<TSpec> const tag_);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(244)
+template <typename TValue, typename TSpec> inline typename Iterator<TValue const *, Tag<TSpec> const>::Type end(TValue const * me, Tag<TSpec> const tag_);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(253)
+template <typename TValue, unsigned int LENGTH> inline typename Iterator<String<TValue, Array<LENGTH> >, Standard>::Type end(String<TValue, Array<LENGTH> > & me, Standard);       	// "projects/library/seqan/sequence/string_array.h"(179)
+template <typename TValue, unsigned int LENGTH> inline typename Iterator<String<TValue, Array<LENGTH> > const, Standard>::Type end(String<TValue, Array<LENGTH> > const & me, Standard);       	// "projects/library/seqan/sequence/string_array.h"(187)
+template <typename TValue, unsigned int SPACE, typename TSpec> inline typename Iterator<String<TValue, Block<SPACE> >, Tag<TSpec> const >::Type end(String<TValue, Block<SPACE> > & me, Tag<TSpec> const);       	// "projects/library/seqan/sequence/string_block.h"(223)
+template <typename TValue, unsigned int SPACE, typename TSpec> inline typename Iterator<String<TValue, Block<SPACE> > const, Tag<TSpec> const>::Type end(String<TValue, Block<SPACE> > const & me, Tag<TSpec> const);       	// "projects/library/seqan/sequence/string_block.h"(231)
+template <typename TString, typename TSpec, typename TTag> inline typename Iterator<StringSet<TString, TSpec >, Tag<TTag> const>::Type end(StringSet<TString, TSpec > & me, Tag<TTag> const & tag);       	// "projects/library/seqan/sequence/string_set_base.h"(1105)
+template <typename TString, typename TSpec, typename TTag> inline typename Iterator<StringSet<TString, TSpec > const, Tag<TTag> const>::Type end(StringSet<TString, TSpec > const & me, Tag<TTag> const & tag);       	// "projects/library/seqan/sequence/string_set_base.h"(1113)
+template <typename TChar, typename TAlloc> inline typename Iterator< ::std::vector<TChar, TAlloc>, Standard>::Type end(::std::vector<TChar, TAlloc> & me, Standard);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(202)
+template <typename TChar, typename TAlloc> inline typename Iterator< ::std::vector<TChar, TAlloc> const, Standard>::Type end(::std::vector<TChar, TAlloc> const & me, Standard);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(210)
+template <typename TValue, typename TSpec> inline typename Iterator<String<TValue, Alloc<TSpec> >, Standard>::Type end(String<TValue, Alloc<TSpec> > & me, Standard);       	// "projects/library/seqan/sequence/string_alloc.h"(218)
+template <typename TValue, typename TSpec> inline typename Iterator<String<TValue, Alloc<TSpec> > const, Standard>::Type end(String<TValue, Alloc<TSpec> > const & me, Standard);       	// "projects/library/seqan/sequence/string_alloc.h"(226)
+
+//____________________________________________________________________________
+// endPosition
+
+template <typename T> inline typename Position<T>::Type endPosition(T & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(584)
+template <typename T> inline typename Position<T>::Type endPosition(T const & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(592)
+
+//____________________________________________________________________________
+// erase
+
+template <typename TString, typename TDelimiter, typename TPos > inline void erase( StringSet<TString, Owner<ConcatDirect<TDelimiter> > > & me, TPos pos, TPos pos_end);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(285)
+template <typename T, typename TBeginPosition, typename TEndPosition> inline void erase(T & me, TBeginPosition pos, TEndPosition pos_end);       	// "projects/library/seqan/sequence/sequence_interface.h"(1614)
+template <typename T, typename TBeginPosition, typename TEndPosition> inline void erase(T const & me, TBeginPosition pos, TEndPosition pos_end);       	// "projects/library/seqan/sequence/sequence_interface.h"(1625)
+template <typename T, typename TPosition> inline void erase(T & me, TPosition pos);       	// "projects/library/seqan/sequence/sequence_interface.h"(1634)
+template <typename T, typename TPosition> inline void erase(T const & me, TPosition pos);       	// "projects/library/seqan/sequence/sequence_interface.h"(1643)
+
+//____________________________________________________________________________
+// eraseBack
+
+template <typename T> inline void eraseBack(T & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(1666)
+
+//____________________________________________________________________________
+// fill
+
+template <typename TChar, typename TAlloc, typename TSize, typename TExpand> inline typename Size< ::std::vector<TChar, TAlloc> >::Type fill( ::std::vector<TChar, TAlloc> & me, TSize new_length, TChar const & val, Tag<TExpand> const &);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(700)
+
+//____________________________________________________________________________
+// front
+
+template <typename T> inline typename Reference<T>::Type front(T & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(697)
+template <typename T> inline typename Reference<T const>::Type front(T const & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(704)
+
+//____________________________________________________________________________
+// getSeqNo
+
+template <typename TPosition> inline TPosition getSeqNo(TPosition const &, Nothing const &);       	// "projects/library/seqan/sequence/string_set_base.h"(346)
+template <typename TPosition> inline TPosition getSeqNo(TPosition const &);       	// "projects/library/seqan/sequence/string_set_base.h"(354)
+template <typename T1, typename T2, typename TCompression, typename TLimitsString> inline T1 getSeqNo(Pair<T1, T2, TCompression> const & pos, TLimitsString const &);       	// "projects/library/seqan/sequence/string_set_base.h"(361)
+template <typename T1, typename T2, typename TCompression> inline T1 getSeqNo(Pair<T1, T2, TCompression> const & pos);       	// "projects/library/seqan/sequence/string_set_base.h"(368)
+template <typename TPos, typename TLimitsString> inline TPos getSeqNo(TPos const & pos, TLimitsString const & limits);       	// "projects/library/seqan/sequence/string_set_base.h"(375)
+
+//____________________________________________________________________________
+// getSeqOffset
+
+template <typename TPosition> inline TPosition getSeqOffset(TPosition const & pos, Nothing const &);       	// "projects/library/seqan/sequence/string_set_base.h"(406)
+template <typename TPosition> inline TPosition getSeqOffset(TPosition const & pos);       	// "projects/library/seqan/sequence/string_set_base.h"(414)
+template <typename T1, typename T2, typename TCompression, typename TLimitsString> inline T2 getSeqOffset(Pair<T1, T2, TCompression> const & pos, TLimitsString const &);       	// "projects/library/seqan/sequence/string_set_base.h"(420)
+template <typename T1, typename T2, typename TCompression> inline T1 getSeqOffset(Pair<T1, T2, TCompression> const & pos);       	// "projects/library/seqan/sequence/string_set_base.h"(426)
+template <typename TPos, typename TLimitsString> inline TPos getSeqOffset(TPos const & pos, TLimitsString const & limits);       	// "projects/library/seqan/sequence/string_set_base.h"(432)
+
+//____________________________________________________________________________
+// getSequenceByNo
+
+template <typename TSeqNo, typename TString> inline typename GetSequenceByNo<TString>::Type getSequenceByNo(TSeqNo , TString & string);       	// "projects/library/seqan/sequence/string_set_base.h"(902)
+template <typename TSeqNo, typename TString, typename TSpec> inline typename GetSequenceByNo< StringSet<TString, TSpec> >::Type getSequenceByNo(TSeqNo seqNo, StringSet<TString, TSpec> & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(909)
+template <typename TSeqNo, typename TString, typename TSpec> inline typename GetSequenceByNo< StringSet<TString, TSpec> const>::Type getSequenceByNo(TSeqNo seqNo, StringSet<TString, TSpec> const & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(916)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TContainer, typename THostspec> inline typename GetValue<Iter<TContainer, Packed<THostspec> > >::Type getValue(Iter<TContainer, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(1020)
+template <typename TContainer, typename THostspec> inline typename GetValue<Iter<TContainer, Packed<THostspec> > const>::Type getValue(Iter<TContainer, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(1027)
+template <typename T, typename TPos> inline typename GetValue<T>::Type getValue(T & me, TPos pos);       	// "projects/library/seqan/sequence/sequence_interface.h"(661)
+template <typename T, typename TPos> inline typename GetValue<T const>::Type getValue(T const & me, TPos pos);       	// "projects/library/seqan/sequence/sequence_interface.h"(670)
+
+//____________________________________________________________________________
+// getValueById
+
+template <typename TString, typename TId> inline typename Reference<StringSet<TString, Dependent<Tight> > >::Type getValueById(StringSet<TString, Dependent<Tight> > & me, TId const id);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(202)
+template <typename TString, typename TSpec, typename TId> inline typename Reference<StringSet<TString, Owner<TSpec> > >::Type getValueById(StringSet<TString, Owner<TSpec> >& me, TId const id);       	// "projects/library/seqan/sequence/string_set_owner.h"(200)
+template <typename TString, typename TId> inline typename Reference<StringSet<TString, Dependent<Generous> > >::Type getValueById(StringSet<TString, Dependent<Generous> >& me, TId const id);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(177)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TContainer, typename THostspec> inline void goNext(Iter<TContainer, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(1216)
+template <typename TStringSet, typename TSpec> inline void goNext(Iter<TStringSet, ConcatVirtual<TSpec> > & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(257)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename TContainer, typename THostspec> inline void goPrevious(Iter<TContainer, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(1237)
+template <typename TStringSet, typename TSpec> inline void goPrevious(Iter<TStringSet, ConcatVirtual<TSpec> > & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(286)
+
+//____________________________________________________________________________
+// host
+
+template <typename TValue, typename THostspec> inline typename Host<String<TValue, Packed<THostspec> > >::Type & host(String<TValue, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(317)
+template <typename TValue, typename THostspec> inline typename Host<String<TValue, Packed<THostspec> > const>::Type const & host(String<TValue, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(325)
+
+//____________________________________________________________________________
+// hostIterator
+
+template <typename TContainer, typename THostspec> inline typename HostIterator<Iter<TContainer, Packed<THostspec> > >::Type & hostIterator(Iter<TContainer, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(937)
+template <typename TContainer, typename THostspec> inline typename HostIterator<Iter<TContainer, Packed<THostspec> > const>::Type & hostIterator(Iter<TContainer, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(944)
+
+//____________________________________________________________________________
+// id
+
+template <typename TValue, typename THostspec> inline void const * id(String<TValue, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(460)
+template <typename TChar, typename TCharTraits, typename TAlloc> inline void const * id(::std::basic_string<TChar, TCharTraits, TAlloc> const & me);       	// "projects/library/seqan/sequence/adapt_std_string.h"(173)
+template <typename T> inline void const * id(T const & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(252)
+template <typename TChar, typename TAlloc> inline void const * id(::std::vector<TChar, TAlloc> const & me);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(171)
+
+//____________________________________________________________________________
+// idToPosition
+
+template <typename TString, typename TId> inline typename Id<StringSet<TString, Dependent<Tight> > >::Type idToPosition(StringSet<TString, Dependent<Tight> > const & me, TId const id);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(309)
+template <typename TString, typename TSpec, typename TId> inline typename Id<StringSet<TString, Owner<TSpec> > >::Type idToPosition(StringSet<TString, Owner<TSpec> > const&, TId const id);       	// "projects/library/seqan/sequence/string_set_owner.h"(276)
+template <typename TString, typename TId> inline typename Id<StringSet<TString, Dependent<Generous> > >::Type idToPosition(StringSet<TString, Dependent<Generous> > const& me, TId const id);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(255)
+
+//____________________________________________________________________________
+// infix
+
+template <typename TString, typename TDelimiter, typename TPosBegin, typename TPosEnd > inline typename Infix<TString>::Type infix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > & me, TPosBegin posBegin, TPosEnd posEnd);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(402)
+template <typename TString, typename TDelimiter, typename TPosBegin, typename TPosEnd > inline typename Infix<TString const>::Type infix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > const & me, TPosBegin posBegin, TPosEnd posEnd);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(409)
+template <typename TString, typename TSpec, typename TPosBegin, typename TPosEnd > inline typename Infix<TString>::Type infix(StringSet< TString, TSpec > & me, TPosBegin posBegin, TPosEnd posEnd);       	// "projects/library/seqan/sequence/string_set_base.h"(676)
+template <typename TString, typename TSpec, typename TPosBegin, typename TPosEnd > inline typename Infix<TString const>::Type infix(StringSet< TString, TSpec > const & me, TPosBegin posBegin, TPosEnd posEnd);       	// "projects/library/seqan/sequence/string_set_base.h"(691)
+
+//____________________________________________________________________________
+// infixWithLength
+
+template <typename TString, typename TDelimiter, typename TPosition, typename TSize > inline typename Infix<TString>::Type infixWithLength(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > & me, TPosition pos, TSize length);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(420)
+template <typename TString, typename TDelimiter, typename TPosition, typename TSize > inline typename Infix<TString const>::Type infixWithLength(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > const & me, TPosition pos, TSize length);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(427)
+template <typename TString, typename TSpec, typename TPosition, typename TSize > inline typename Infix<TString>::Type infixWithLength(StringSet< TString, TSpec > & me, TPosition pos, TSize length);       	// "projects/library/seqan/sequence/string_set_base.h"(642)
+template <typename TString, typename TSpec, typename TPosition, typename TSize > inline typename Infix<TString const>::Type infixWithLength(StringSet< TString, TSpec > const & me, TPosition pos, TSize length);       	// "projects/library/seqan/sequence/string_set_base.h"(656)
+
+//____________________________________________________________________________
+// insert
+
+template <typename T, typename TPosition, typename TSeq, typename TExpand> inline void insert(T & me, TPosition pos, TSeq const & insertSeq, Tag<TExpand> const);       	// "projects/library/seqan/sequence/sequence_interface.h"(1238)
+template <typename T, typename TPosition, typename TSeq, typename TExpand> inline void insert(T const & me, TPosition pos, TSeq const & insertSeq, Tag<TExpand> const);       	// "projects/library/seqan/sequence/sequence_interface.h"(1249)
+template <typename T, typename TPosition, typename TSeq> inline void insert(T & me, TPosition pos, TSeq const & insertSeq);       	// "projects/library/seqan/sequence/sequence_interface.h"(1259)
+template <typename T, typename TPosition, typename TSeq> inline void insert(T const & me, TPosition pos, TSeq const & insertSeq);       	// "projects/library/seqan/sequence/sequence_interface.h"(1269)
+
+//____________________________________________________________________________
+// insertValue
+
+template <typename TString, typename TDelimiter, typename TPos, typename TSequence, typename TExpand > inline void insertValue( StringSet<TString, Owner<ConcatDirect<TDelimiter> > > & me, TPos pos, TSequence const & seq, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(262)
+template <typename T, typename TPosition, typename TValue> inline void insertValue(T & me, TPosition pos, TValue const & _value);       	// "projects/library/seqan/sequence/sequence_interface.h"(1298)
+template <typename T, typename TPosition, typename TValue> inline void insertValue(T const & me, TPosition pos, TValue const & _value);       	// "projects/library/seqan/sequence/sequence_interface.h"(1308)
+
+//____________________________________________________________________________
+// isEqual
+
+template <typename TLeftValue, typename TRight > inline bool isEqual(TLeftValue * left, TRight const & right);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(712)
+
+//____________________________________________________________________________
+// isGreater
+
+template <typename TLeftValue, typename TRight> inline bool isGreater(TLeftValue * left, TRight const & right);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(797)
+
+//____________________________________________________________________________
+// isGreaterOrEqual
+
+template <typename TLeftValue, typename TRight> inline bool isGreaterOrEqual(TLeftValue * left, TRight const & right);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(817)
+
+//____________________________________________________________________________
+// isLess
+
+template <typename TLeftValue, typename TRight> inline bool isLess(TLeftValue * left, TRight const & right);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(757)
+
+//____________________________________________________________________________
+// isLessOrEqual
+
+template <typename TLeftValue, typename TRight> inline bool isLessOrEqual(TLeftValue * left, TRight const & right);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(777)
+
+//____________________________________________________________________________
+// isNotEqual
+
+template <typename TLeftValue, typename TRight > inline bool isNotEqual(TLeftValue * left, TRight const & right);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(734)
+
+//____________________________________________________________________________
+// iter
+
+template <typename TValue, typename THostspec, typename TPos, typename TTag> inline typename Iterator<String<TValue, Packed<THostspec> >, Tag<TTag> const>::Type iter(String<TValue, Packed<THostspec> > & me, TPos pos_, Tag<TTag> const);       	// "projects/library/seqan/sequence/string_packed.h"(474)
+template <typename TValue, typename THostspec, typename TPos, typename TTag> inline typename Iterator<String<TValue, Packed<THostspec> > const, Tag<TTag> const>::Type iter(String<TValue, Packed<THostspec> > const & me, TPos pos_, Tag<TTag> const);       	// "projects/library/seqan/sequence/string_packed.h"(485)
+template <typename T, typename TPos> inline typename Iterator<T, typename DefaultGetIteratorSpec<T>::Type>::Type iter(T & me, TPos pos);       	// "projects/library/seqan/sequence/sequence_interface.h"(773)
+template <typename T, typename TPos> inline typename Iterator<T const, typename DefaultGetIteratorSpec<T>::Type>::Type iter(T const & me, TPos pos);       	// "projects/library/seqan/sequence/sequence_interface.h"(782)
+template <typename T, typename TPos, typename TTag> inline typename Iterator<T, Tag<TTag> const>::Type iter(T & me, TPos pos, Tag<TTag> const tag_);       	// "projects/library/seqan/sequence/sequence_interface.h"(792)
+template <typename T, typename TPos, typename TTag> inline typename Iterator<T const, Tag<TTag> const>::Type iter(T const & me, TPos pos, Tag<TTag> const tag_);       	// "projects/library/seqan/sequence/sequence_interface.h"(803)
+template <typename TString, typename TSpec, typename TPos, typename TTag> inline typename Iterator<StringSet<TString, TSpec >, Tag<TTag> const>::Type iter(StringSet<TString, TSpec > & me, TPos pos, Tag<TTag> const &);       	// "projects/library/seqan/sequence/string_set_base.h"(1056)
+template <typename TString, typename TSpec, typename TPos, typename TTag> inline typename Iterator<StringSet<TString, TSpec > const, Tag<TTag> const>::Type iter(StringSet<TString, TSpec > const & me, TPos pos, Tag<TTag> const &);       	// "projects/library/seqan/sequence/string_set_base.h"(1068)
+
+//____________________________________________________________________________
+// length
+
+template <typename TStringSet > inline typename Size<ConcatenatorManyToOne<TStringSet> >::Type length(ConcatenatorManyToOne<TStringSet> const & me);       	// "projects/library/seqan/sequence/sequence_concatenator.h"(209)
+template <typename TValue, typename THostspec> inline typename Size<String<TValue, Packed<THostspec> > >::Type length(String<TValue, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(337)
+template <typename TValue, typename THostspec> inline typename Size<String<TValue, Packed<THostspec> > const>::Type length(String<TValue, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(345)
+template <typename TChar, typename TCharTraits, typename TAlloc> inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type length(::std::basic_string<TChar, TCharTraits, TAlloc> const & me);       	// "projects/library/seqan/sequence/adapt_std_string.h"(239)
+template <typename TString, typename TDelimiter> inline typename Size<StringSet<TString, Owner<ConcatDirect<TDelimiter> > > >::Type length(StringSet<TString, Owner<ConcatDirect<TDelimiter> > > const & me);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(323)
+template <typename T> inline typename Size<T>::Type length(T const & );       	// "projects/library/seqan/sequence/sequence_interface.h"(901)
+template <typename TValue> inline size_t length(TValue * me);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(326)
+template <typename TValue> inline size_t length(TValue const * me);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(338)
+inline size_t length(char * me);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(349)
+inline size_t length(char const * me);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(356)
+template <typename TValue, unsigned int SPACE> inline typename Size<String<TValue, Block<SPACE> > >::Type length(String<TValue, Block<SPACE> > const & me);       	// "projects/library/seqan/sequence/string_block.h"(590)
+template <typename TString, typename TSpec > inline typename Size<StringSet<TString, TSpec > >::Type length(StringSet<TString, TSpec > const & me);       	// "projects/library/seqan/sequence/string_set_base.h"(1042)
+template <typename TChar, typename TAlloc> inline typename Size< ::std::vector<TChar, TAlloc> >::Type length(::std::vector<TChar, TAlloc> const & me);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(237)
+
+//____________________________________________________________________________
+// lengthSum
+
+template <typename TString > inline typename Size<TString>::Type lengthSum(TString const & me);       	// "projects/library/seqan/sequence/string_set_base.h"(1019)
+template <typename TString, typename TSpec > inline typename Size<TString>::Type lengthSum(StringSet< TString, TSpec > const & me);       	// "projects/library/seqan/sequence/string_set_base.h"(1025)
+
+//____________________________________________________________________________
+// move
+
+template <typename TValue> inline void move( String <TValue, CStyle > & target, String <TValue, CStyle > & source);       	// "projects/library/seqan/sequence/string_cstyle.h"(261)
+template <typename TValue> inline void move( String <TValue, CStyle > & target, String <TValue, CStyle > const & source);       	// "projects/library/seqan/sequence/string_cstyle.h"(279)
+template <typename TTargetValue, typename TSource> inline void move(TTargetValue * & target, TSource & source);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(515)
+template <typename TTargetValue, typename TSource> inline void move(TTargetValue * & target, TSource const & source);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(523)
+template <typename TTargetValue, typename TSourceValue, typename TSpec> inline void move(String<TTargetValue, Alloc<TSpec> > & target, String<TSourceValue, Alloc<TSpec> > & source);       	// "projects/library/seqan/sequence/string_alloc.h"(402)
+template <typename TTargetValue, typename TSourceValue, typename TSpec> inline void move(String<TTargetValue, Alloc<TSpec> > & target, String<TSourceValue, Alloc<TSpec> > const & source);       	// "projects/library/seqan/sequence/string_alloc.h"(409)
+template <typename TValue, typename TSpec> inline void move(String<TValue, Alloc<TSpec> > & target, String<TValue, Alloc<TSpec> > & source);       	// "projects/library/seqan/sequence/string_alloc.h"(417)
+template <typename TValue, typename TSpec> inline void move(String<TValue, Alloc<TSpec> > & target, String<TValue, Alloc<TSpec> > const & source);       	// "projects/library/seqan/sequence/string_alloc.h"(432)
+
+//____________________________________________________________________________
+// moveValue
+
+template <typename TContainer, typename THostspec, typename TValue> inline void moveValue(Iter<TContainer, Packed<THostspec> > & me, TValue const & _value);       	// "projects/library/seqan/sequence/string_packed.h"(1082)
+template <typename TContainer, typename THostspec, typename TValue> inline void moveValue(Iter<TContainer, Packed<THostspec> > const & me, TValue const & _value);       	// "projects/library/seqan/sequence/string_packed.h"(1090)
+template <typename T, typename TValue, typename TPos> inline void moveValue(T & me, TPos pos, TValue const & _value);       	// "projects/library/seqan/sequence/sequence_interface.h"(864)
+template <typename T, typename TValue, typename TPos> inline void moveValue(T const & me, TPos pos, TValue const & _value);       	// "projects/library/seqan/sequence/sequence_interface.h"(874)
+template <typename TValue, typename TPos> inline void moveValue(TValue * me, TPos pos, TValue const & _value);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(297)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TContainer, typename THostspec> inline bool operator!= (Iter<TContainer, Packed<THostspec> > const & left, Iter<TContainer, Packed<THostspec> > const & right);       	// "projects/library/seqan/sequence/string_packed.h"(1152)
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR> inline bool operator!=( Iter<TSSetL, ConcatVirtual<TSpecL> > const & L, Iter<TSSetR, ConcatVirtual<TSpecR> > const & R);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(388)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TStringSet, typename TSpec> inline typename Reference<Iter<TStringSet, ConcatVirtual<TSpec> > const>::Type operator*(Iter<TStringSet, ConcatVirtual<TSpec> > const & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(239)
+template <typename TStringSet, typename TSpec> inline typename Reference<Iter<TStringSet, ConcatVirtual<TSpec> > >::Type operator*(Iter<TStringSet, ConcatVirtual<TSpec> > & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(246)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename TContainer, typename THostspec, typename TIntegral> inline Iter<TContainer, Packed<THostspec> > operator+ (Iter<TContainer, Packed<THostspec> > const & left, TIntegral right);       	// "projects/library/seqan/sequence/string_packed.h"(1259)
+template <typename TContainer, typename THostspec, typename TIntegral> inline Iter<TContainer, Packed<THostspec> > operator+ (TIntegral left, Iter<TContainer, Packed<THostspec> > const & right);       	// "projects/library/seqan/sequence/string_packed.h"(1267)
+template <typename TStringSet, typename TSpec, typename TDelta> inline Iter<TStringSet, ConcatVirtual<TSpec> > operator+(Iter<TStringSet, ConcatVirtual<TSpec> > const & me, TDelta delta);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(332)
+template <typename TStringSet, typename TSpec, typename T1, typename T2, typename TCompression> inline Iter<TStringSet, ConcatVirtual<TSpec> > operator+(Iter<TStringSet, ConcatVirtual<TSpec> > const & me, Pair<T1, T2, TCompression> delta);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(341)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename TStringSet, typename TSpec> inline Iter<TStringSet, ConcatVirtual<TSpec> > const & operator++(Iter<TStringSet, ConcatVirtual<TSpec> > & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(265)
+template <typename TStringSet, typename TSpec> inline Iter<TStringSet, ConcatVirtual<TSpec> > const & operator++(Iter<TStringSet, ConcatVirtual<TSpec> > & me, int);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(273)
+
+//____________________________________________________________________________
+// operator+=
+
+template <typename TContainer, typename THostspec, typename TIntegral> inline Iter<TContainer, Packed<THostspec> > & operator+= (Iter<TContainer, Packed<THostspec> > & left, TIntegral right);       	// "projects/library/seqan/sequence/string_packed.h"(1280)
+
+//____________________________________________________________________________
+// operator-
+
+template <typename TContainer, typename THostspec, typename TIntegral> inline Iter<TContainer, Packed<THostspec> > operator- (Iter<TContainer, Packed<THostspec> > const & left, TIntegral right);       	// "projects/library/seqan/sequence/string_packed.h"(1294)
+template <typename TContainer, typename THostspec> inline typename Difference<Iter<TContainer, Packed<THostspec> > >::Type operator- (Iter<TContainer, Packed<THostspec> > const & left, Iter<TContainer, Packed<THostspec> > const & right);       	// "projects/library/seqan/sequence/string_packed.h"(1305)
+template <typename TContainer, typename THostspec> inline typename Difference<Iter<TContainer, Packed<THostspec> > >::Type operator- (Iter<TContainer, Packed<THostspec> > const & left, Iter<TContainer, Packed<THostspec> > & right);       	// "projects/library/seqan/sequence/string_packed.h"(1314)
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR> typename Difference<Iter<TSSetL, ConcatVirtual<TSpecL> > >::Type operator-( Iter<TSSetL, ConcatVirtual<TSpecL> > const & L, Iter<TSSetR, ConcatVirtual<TSpecR> > const & R);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(356)
+template <typename TStringSet, typename TSpec, typename TDelta> inline Iter<TStringSet, ConcatVirtual<TSpec> > operator-(Iter<TStringSet, ConcatVirtual<TSpec> > const & me, TDelta delta);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(363)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename TStringSet, typename TSpec> inline Iter<TStringSet, ConcatVirtual<TSpec> > const & operator--(Iter<TStringSet, ConcatVirtual<TSpec> > & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(298)
+template <typename TStringSet, typename TSpec> inline Iter<TStringSet, ConcatVirtual<TSpec> > const & operator--(Iter<TStringSet, ConcatVirtual<TSpec> > & me, int);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(306)
+
+//____________________________________________________________________________
+// operator-=
+
+template <typename TContainer, typename THostspec, typename TIntegral> inline Iter<TContainer, Packed<THostspec> > & operator-= (Iter<TContainer, Packed<THostspec> > & left, TIntegral right);       	// "projects/library/seqan/sequence/string_packed.h"(1327)
+
+//____________________________________________________________________________
+// operator<
+
+template <typename TContainer, typename THostspec> inline bool operator< (Iter<TContainer, Packed<THostspec> > const & left, Iter<TContainer, Packed<THostspec> > const & right);       	// "projects/library/seqan/sequence/string_packed.h"(1191)
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR> inline bool operator<( Iter<TSSetL, ConcatVirtual<TSpecL> > const & L, Iter<TSSetR, ConcatVirtual<TSpecR> > const & R);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(402)
+
+//____________________________________________________________________________
+// operator<=
+
+template <typename TContainer, typename THostspec> inline bool operator<= (Iter<TContainer, Packed<THostspec> > const & left, Iter<TContainer, Packed<THostspec> > const & right);       	// "projects/library/seqan/sequence/string_packed.h"(1204)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TContainer, typename THostspec> inline bool operator== (Iter<TContainer, Packed<THostspec> > const & left, Iter<TContainer, Packed<THostspec> > const & right);       	// "projects/library/seqan/sequence/string_packed.h"(1139)
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR> inline bool operator==( Iter<TSSetL, ConcatVirtual<TSpecL> > const & L, Iter<TSSetR, ConcatVirtual<TSpecR> > const & R);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(378)
+
+//____________________________________________________________________________
+// operator>
+
+template <typename TContainer, typename THostspec> inline bool operator> (Iter<TContainer, Packed<THostspec> > const & left, Iter<TContainer, Packed<THostspec> > const & right);       	// "projects/library/seqan/sequence/string_packed.h"(1165)
+template <typename TSSetL, typename TSpecL, typename TSSetR, typename TSpecR> inline bool operator> ( Iter<TSSetL, ConcatVirtual<TSpecL> > const & L, Iter<TSSetR, ConcatVirtual<TSpecR> > const & R);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(412)
+
+//____________________________________________________________________________
+// operator>=
+
+template <typename TContainer, typename THostspec> inline bool operator>= (Iter<TContainer, Packed<THostspec> > const & left, Iter<TContainer, Packed<THostspec> > const & right);       	// "projects/library/seqan/sequence/string_packed.h"(1178)
+
+//____________________________________________________________________________
+// pop
+
+template <typename TValue, unsigned int SPACE> inline void pop(String<TValue, Block<SPACE> >& me);       	// "projects/library/seqan/sequence/string_block.h"(538)
+
+//____________________________________________________________________________
+// pop_back
+
+template <typename TValue, unsigned int SPACE> inline void pop_back(String<TValue, Block<SPACE> >& me);       	// "projects/library/seqan/sequence/string_block.h"(566)
+
+//____________________________________________________________________________
+// posAdd
+
+template <typename TPos, typename TDelta> inline TPos posAdd(TPos pos, TDelta delta);       	// "projects/library/seqan/sequence/string_set_base.h"(767)
+template <typename T1, typename T2, typename TCompression, typename TDelta> inline Pair<T1, T2, TCompression> posAdd(Pair<T1, T2, TCompression> const & pos, TDelta delta);       	// "projects/library/seqan/sequence/string_set_base.h"(773)
+
+//____________________________________________________________________________
+// posAddAndCheck
+
+template <typename TPos, typename TDelta, typename TSequence> inline TPos posAddAndCheck(TPos & pos, TDelta delta, TSequence const & sequence);       	// "projects/library/seqan/sequence/string_set_base.h"(783)
+template <typename TPos, typename TDelta, typename TSequence, typename TSpec> inline TPos posAddAndCheck(TPos & pos, TDelta delta, StringSet<TSequence, TSpec> const & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(789)
+template <typename T1, typename T2, typename TCompression, typename TDelta, typename TSequence, typename TSpec> inline bool posAddAndCheck(Pair<T1, T2, TCompression> & pos, TDelta delta, StringSet<TSequence, TSpec> const & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(807)
+
+//____________________________________________________________________________
+// posAtEnd
+
+template <typename T1, typename T2, typename TCompression, typename TSequence, typename TSpec> inline bool posAtEnd(Pair<T1, T2, TCompression> const & pos, StringSet<TSequence, TSpec> const & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(721)
+template <typename TPos, typename TSequence, typename TSpec> inline bool posAtEnd(TPos pos, StringSet<TSequence, TSpec> const & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(725)
+template <typename TPos, typename TSequence> inline bool posAtEnd(TPos pos, TSequence const & seq);       	// "projects/library/seqan/sequence/string_set_base.h"(729)
+
+//____________________________________________________________________________
+// posAtFirstLocal
+
+template <typename TPos, typename TLimitsString> inline bool posAtFirstLocal(TPos pos, TLimitsString const & limits);       	// "projects/library/seqan/sequence/string_set_base.h"(708)
+template <typename TPos> inline bool posAtFirstLocal(TPos pos);       	// "projects/library/seqan/sequence/string_set_base.h"(712)
+
+//____________________________________________________________________________
+// posCompare
+
+template <typename TPos> inline int posCompare(TPos const & a, TPos const & b);       	// "projects/library/seqan/sequence/string_set_base.h"(850)
+template <typename T1, typename T2, typename TCompression> inline int posCompare(Pair<T1, T2, TCompression> const & a, Pair<T1, T2, TCompression> const & b);       	// "projects/library/seqan/sequence/string_set_base.h"(857)
+
+//____________________________________________________________________________
+// posGlobalize
+
+template <typename TPosition> inline TPosition posGlobalize(TPosition const & pos, Nothing const &);       	// "projects/library/seqan/sequence/string_set_base.h"(461)
+template <typename T1, typename T2, typename TCompression> inline T2 posGlobalize(Pair<T1, T2, TCompression> const & pos, Nothing const &);       	// "projects/library/seqan/sequence/string_set_base.h"(468)
+template <typename TLimitsString, typename TPosition> inline TPosition posGlobalize(TPosition const & pos, TLimitsString const &);       	// "projects/library/seqan/sequence/string_set_base.h"(475)
+template <typename TLimitsString, typename T1, typename T2, typename TCompression> inline typename Value<TLimitsString>::Type posGlobalize(Pair<T1, T2, TCompression> const & pos, TLimitsString const & limits);       	// "projects/library/seqan/sequence/string_set_base.h"(483)
+
+//____________________________________________________________________________
+// posLess
+
+template <typename TPos> inline bool posLess(TPos const & a, TPos const & b);       	// "projects/library/seqan/sequence/string_set_base.h"(834)
+template <typename T1, typename T2, typename TCompression> inline bool posLess(Pair<T1, T2, TCompression> const & a, Pair<T1, T2, TCompression> const & b);       	// "projects/library/seqan/sequence/string_set_base.h"(839)
+
+//____________________________________________________________________________
+// posLocalToX
+
+template <typename TDest, typename TLimitsString, typename T1, typename T2, typename TCompression> inline void posLocalToX(TDest & dst, Pair<T1, T2, TCompression> const & localPos, TLimitsString const & limits);       	// "projects/library/seqan/sequence/string_set_base.h"(507)
+template <typename TD1, typename TD2, typename TDCompression, typename TLimitsString, typename T1, typename T2, typename TCompression> inline void posLocalToX(Pair<TD1, TD2, TDCompression> & dst, Pair<T1, T2, TCompression> const & localPos, TLimitsString const &);       	// "projects/library/seqan/sequence/string_set_base.h"(514)
+
+//____________________________________________________________________________
+// posLocalize
+
+template <typename TResult, typename TPosition> inline void posLocalize(TResult & result, TPosition const & pos, Nothing const &);       	// "projects/library/seqan/sequence/string_set_base.h"(539)
+template <typename T1, typename T2, typename TCompression, typename TPosition> inline void posLocalize(Pair<T1, T2, TCompression> & result, TPosition const & pos, Nothing const &);       	// "projects/library/seqan/sequence/string_set_base.h"(544)
+template <typename TResult, typename TSize, typename TSpec, typename TPosition> inline void posLocalize(TResult & result, TPosition const & pos, String<TSize, TSpec> const & limits);       	// "projects/library/seqan/sequence/string_set_base.h"(551)
+template <typename TResult, typename TSize, typename TSpec, typename T1, typename T2, typename TCompression> inline void posLocalize(TResult & result, Pair<T1, T2, TCompression> const & pos, String<TSize, TSpec> const & );       	// "projects/library/seqan/sequence/string_set_base.h"(561)
+
+//____________________________________________________________________________
+// posNext
+
+template <typename TPos> inline TPos posNext(TPos pos);       	// "projects/library/seqan/sequence/string_set_base.h"(752)
+template <typename T1, typename T2, typename TCompression> inline Pair<T1, T2, TCompression> posNext(Pair<T1, T2, TCompression> const & pos);       	// "projects/library/seqan/sequence/string_set_base.h"(758)
+
+//____________________________________________________________________________
+// posPrev
+
+template <typename TPos> inline TPos posPrev(TPos pos);       	// "projects/library/seqan/sequence/string_set_base.h"(738)
+template <typename T1, typename T2, typename TCompression> inline Pair<T1, T2, TCompression> posPrev(Pair<T1, T2, TCompression> const & pos);       	// "projects/library/seqan/sequence/string_set_base.h"(743)
+
+//____________________________________________________________________________
+// posSub
+
+template <typename TA, typename TB> inline TA posSub(TA a, TB b);       	// "projects/library/seqan/sequence/string_set_base.h"(816)
+template <typename TA1, typename TA2, typename TACompression, typename TB1, typename TB2, typename TBCompression > inline TA2 posSub(Pair<TA1, TA2, TACompression> const & a, Pair<TB1, TB2, TBCompression> const & b);       	// "projects/library/seqan/sequence/string_set_base.h"(825)
+
+//____________________________________________________________________________
+// position
+
+template <typename TContainer, typename THostspec> inline typename Position<Iter<TContainer, Packed<THostspec> > const>::Type position(Iter<TContainer, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(973)
+
+//____________________________________________________________________________
+// positionToId
+
+template <typename TString, typename TPos> inline typename Id<StringSet<TString, Dependent<Tight> > >::Type positionToId(StringSet<TString, Dependent<Tight> > & me, TPos const pos);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(287)
+template <typename TString, typename TPos> inline typename Id<StringSet<TString, Dependent<Tight> > >::Type positionToId(StringSet<TString, Dependent<Tight> > const & me, TPos const pos);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(296)
+template <typename TString, typename TSpec, typename TPos> inline typename Id<StringSet<TString, Owner<TSpec> > >::Type positionToId(StringSet<TString, Owner<TSpec> > &, TPos const pos);       	// "projects/library/seqan/sequence/string_set_owner.h"(250)
+template <typename TString, typename TSpec, typename TPos> inline typename Id<StringSet<TString, Owner<TSpec> > >::Type positionToId(StringSet<TString, Owner<TSpec> > const &, TPos const pos);       	// "projects/library/seqan/sequence/string_set_owner.h"(263)
+template <typename TString, typename TPos> inline typename Id<StringSet<TString, Dependent<Generous> > >::Type positionToId(StringSet<TString, Dependent<Generous> >& me, TPos const pos);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(233)
+template <typename TString, typename TPos> inline typename Id<StringSet<TString, Dependent<Generous> > >::Type positionToId(StringSet<TString, Dependent<Generous> > const& me, TPos const pos);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(242)
+
+//____________________________________________________________________________
+// prefix
+
+template <typename TString, typename TDelimiter, typename TPosition > inline typename Infix<TString>::Type prefix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > & me, TPosition pos);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(366)
+template <typename TString, typename TDelimiter, typename TPosition > inline typename Infix<TString const>::Type prefix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > const & me, TPosition pos);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(373)
+template <typename TString, typename TSpec, typename TPosition > inline typename Prefix<TString>::Type prefix(StringSet< TString, TSpec > & me, TPosition pos);       	// "projects/library/seqan/sequence/string_set_base.h"(574)
+template <typename TString, typename TSpec, typename TPosition > inline typename Prefix<TString const>::Type prefix(StringSet< TString, TSpec > const & me, TPosition pos);       	// "projects/library/seqan/sequence/string_set_base.h"(588)
+
+//____________________________________________________________________________
+// push
+
+template <typename TValue, unsigned int SPACE, typename TVal> inline void push( String<TValue, Block<SPACE> >& me, TVal const& source);       	// "projects/library/seqan/sequence/string_block.h"(450)
+template <typename TValue, unsigned int SPACE> inline void push(String<TValue, Block<SPACE> >& me);       	// "projects/library/seqan/sequence/string_block.h"(457)
+
+//____________________________________________________________________________
+// push_back
+
+template <typename TValue, unsigned int SPACE, typename TVal> inline void push_back( String<TValue, Block<SPACE> >& me, TVal const& source);       	// "projects/library/seqan/sequence/string_block.h"(481)
+
+//____________________________________________________________________________
+// removeValueById
+
+template <typename TString, typename TId> inline void removeValueById(StringSet<TString, Dependent<Tight> >& me, TId const id);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(257)
+template <typename TString, typename TSpec, typename TId> inline void removeValueById(StringSet<TString, Owner<TSpec> > & me, TId const id);       	// "projects/library/seqan/sequence/string_set_owner.h"(235)
+template <typename TString, typename TId> inline void removeValueById(StringSet<TString, Dependent<Generous> >& me, TId const id);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(213)
+
+//____________________________________________________________________________
+// replace
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target, typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_begin, typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_end, TSource const & source, Generous);       	// "projects/library/seqan/sequence/adapt_std_string.h"(529)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target, typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_begin, typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_end, TSource const & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Generous);       	// "projects/library/seqan/sequence/adapt [...]
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target, typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_begin, typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_end, TSource const & source, Limit);       	// "projects/library/seqan/sequence/adapt_std_string.h"(576)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource> inline void replace(::std::basic_string<TChar, TCharTraits, TAlloc> & target, typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_begin, typename Position< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type pos_end, TSource const & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Limit);       	// "projects/library/seqan/sequence/adapt_st [...]
+template <typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource> inline void replace(TTarget & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource & source);       	// "projects/library/seqan/sequence/sequence_interface.h"(1346)
+template <typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource> inline void replace(TTarget const & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource & source);       	// "projects/library/seqan/sequence/sequence_interface.h"(1356)
+template <typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource> inline void replace(TTarget & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source);       	// "projects/library/seqan/sequence/sequence_interface.h"(1366)
+template <typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource> inline void replace(TTarget const & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source);       	// "projects/library/seqan/sequence/sequence_interface.h"(1376)
+template <typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource> inline void replace(TTarget & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1387)
+template <typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource> inline void replace(TTarget const & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1398)
+template <typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource> inline void replace(TTarget & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1409)
+template <typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource> inline void replace(TTarget const & target, TPositionBegin pos_begin, TPositionEnd pos_end, TSource const & source, typename Size<TTarget>::Type limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1420)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void replace(TTargetValue * target, size_t pos_begin, size_t pos_end, TSource const & source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(595)
+template <typename TTargetValue, typename TSource, typename TExpand> inline void replace(TTargetValue * target, size_t pos_begin, size_t pos_end, TSource const & source, size_t limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(608)
+template <typename TTargetValue, typename TSourceValue, typename TExpand> inline void replace(TTargetValue * target, size_t pos_begin, size_t pos_end, TSourceValue const * source, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(622)
+template <typename TTargetValue, typename TSourceValue, typename TExpand> inline void replace(TTargetValue * target, size_t pos_begin, size_t pos_end, TSourceValue const * source, size_t limit, Tag<TExpand> const);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(635)
+template <typename TChar, typename TAlloc, typename TSource> inline void replace(::std::vector<TChar, TAlloc> & target, typename Position< ::std::vector<TChar, TAlloc> >::Type pos_begin, typename Position< ::std::vector<TChar, TAlloc> >::Type pos_end, TSource const & source, Generous);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(528)
+template <typename TChar, typename TAlloc, typename TSource> inline void replace(::std::vector<TChar, TAlloc> & target, typename Position< ::std::vector<TChar, TAlloc> >::Type pos_begin, typename Position< ::std::vector<TChar, TAlloc> >::Type pos_end, TSource const & source, typename Size< ::std::vector<TChar, TAlloc> >::Type limit, Generous);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(554)
+template <typename TChar, typename TAlloc, typename TSource> inline void replace(::std::vector<TChar, TAlloc> & target, typename Position< ::std::vector<TChar, TAlloc> >::Type pos_begin, typename Position< ::std::vector<TChar, TAlloc> >::Type pos_end, TSource const & source, Limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(590)
+template <typename TChar, typename TAlloc, typename TSource> inline void replace(::std::vector<TChar, TAlloc> & target, typename Position< ::std::vector<TChar, TAlloc> >::Type pos_begin, typename Position< ::std::vector<TChar, TAlloc> >::Type pos_end, TSource const & source, typename Size< ::std::vector<TChar, TAlloc> >::Type limit, Limit);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(603)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSource, typename TExpand> inline void replace(::std::vector<TChar, TAlloc> & target, typename Iterator< ::std::vector<TChar, TAlloc>, Rooted>::Type pos_begin, typename Iterator< ::std::vector<TChar, TAlloc>, Rooted>::Type pos_end, TSource & source, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(623)
+
+//____________________________________________________________________________
+// reserve
+
+template <typename TValue, typename TSpec, typename TSize_, typename TExpand> inline typename Size< String<TValue, Packed<TSpec> > >::Type reserve( String<TValue, Packed<TSpec> > & seq, TSize_ new_capacity, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/string_packed.h"(795)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize, typename TExpand> inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type reserve( ::std::basic_string<TChar, TCharTraits, TAlloc> & seq, TSize new_capacity, Tag<TExpand> const & tag);       	// "projects/library/seqan/sequence/adapt_std_string.h"(635)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize> inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type reserve( ::std::basic_string<TChar, TCharTraits, TAlloc> & seq, TSize new_capacity, Insist const &);       	// "projects/library/seqan/sequence/adapt_std_string.h"(647)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize> inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type reserve( ::std::basic_string<TChar, TCharTraits, TAlloc> & seq, TSize new_capacity, Limit const &);       	// "projects/library/seqan/sequence/adapt_std_string.h"(659)
+template <typename T, typename TSize, typename TExpand> inline typename Size<T>::Type reserve( T & me, TSize new_capacity, Tag<TExpand> const tag);       	// "projects/library/seqan/sequence/sequence_interface.h"(1481)
+template <typename T, typename TSize> inline typename Size<T>::Type reserve( T & me, TSize new_capacity);       	// "projects/library/seqan/sequence/sequence_interface.h"(1491)
+template <typename TValue, unsigned int LENGTH, typename TExpand> inline size_t reserve( String<TValue, Array<LENGTH> > & me, size_t, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_array.h"(217)
+template <typename TValue, unsigned int SPACE, typename TSize, typename TExpand> inline typename Size< String<TValue, Block<SPACE> > >::Type reserve(String<TValue, Block<SPACE> > & , TSize new_capacity, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_block.h"(393)
+template <typename TChar, typename TAlloc, typename TSize, typename TExpand> inline typename Size< ::std::vector<TChar, TAlloc> >::Type reserve( ::std::vector<TChar, TAlloc> & seq, TSize new_capacity, Tag<TExpand> const & tag);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(650)
+template <typename TChar, typename TAlloc, typename TSize> inline typename Size< ::std::vector<TChar, TAlloc> >::Type reserve( ::std::vector<TChar, TAlloc> & seq, TSize new_capacity, Insist const &);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(662)
+template <typename TChar, typename TAlloc, typename TSize> inline typename Size< ::std::vector<TChar, TAlloc> >::Type reserve( ::std::vector<TChar, TAlloc> & seq, TSize new_capacity, Limit const &);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(674)
+
+//____________________________________________________________________________
+// resize
+
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize, typename TExpand> inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type resize( ::std::basic_string<TChar, TCharTraits, TAlloc> & me, TSize new_length, Tag<TExpand> const &);       	// "projects/library/seqan/sequence/adapt_std_string.h"(672)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TSize, typename TExpand> inline typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type resize( ::std::basic_string<TChar, TCharTraits, TAlloc> & me, TSize new_length, TChar const & val, Tag<TExpand> const &);       	// "projects/library/seqan/sequence/adapt_std_string.h"(685)
+template <typename TString, typename TSpec, typename TSize, typename TExpand > inline typename Size<StringSet<TString, TSpec > >::Type resize(StringSet<TString, TSpec > & me, TSize new_size, Tag<TExpand> const & tag);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(334)
+template <typename TString, typename TSpec, typename TSize, typename TExpand > inline typename Size<StringSet<TString, Owner<ConcatDirect<TSpec> > > >::Type resize(StringSet<TString, Owner<ConcatDirect<TSpec> > > & me, TSize new_size, Tag<TExpand> const & tag);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(350)
+template <typename T, typename TSize> inline typename Size<T>::Type resize( T & me, TSize new_length);       	// "projects/library/seqan/sequence/sequence_interface.h"(1525)
+template <typename T, typename TSize, typename TValue> inline typename Size<T>::Type resize( T & me, TSize new_length, TValue const & val);       	// "projects/library/seqan/sequence/sequence_interface.h"(1536)
+template <typename TValue, typename TSize, typename TExpand> inline size_t resize( TValue * me, TSize new_length, Tag<TExpand> const &);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(674)
+template <typename TValue, typename TSize, typename TExpand> inline size_t resize( TValue * me, TSize new_length, TValue const & val, Tag<TExpand> const &);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(686)
+template <typename TValue, unsigned int SPACE, typename TSize2, typename TExpand> inline typename Size< String<TValue, Block<SPACE> > >::Type resize(String<TValue, Block<SPACE> > & me, TSize2 new_length, Tag<TExpand> const);       	// "projects/library/seqan/sequence/string_block.h"(325)
+template <typename TValue, unsigned int SPACE, typename TSize2> inline typename Size< String<TValue, Block<SPACE> > >::Type resize(String<TValue, Block<SPACE> > & me, TSize2 new_length, Limit);       	// "projects/library/seqan/sequence/string_block.h"(347)
+template <typename TChar, typename TAlloc, typename TSize, typename TExpand> inline typename Size< ::std::vector<TChar, TAlloc> >::Type resize( ::std::vector<TChar, TAlloc> & me, TSize new_length, Tag<TExpand> const &);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(687)
+
+//____________________________________________________________________________
+// resizeSpace
+
+template <typename T, typename TSize, typename TBeginPosition, typename TEndPosition> inline TSize resizeSpace(T & me, TSize size, TBeginPosition pos_begin, TEndPosition pos_end);       	// "projects/library/seqan/sequence/sequence_interface.h"(1572)
+template <typename T, typename TSize, typename TBeginPosition, typename TEndPosition, typename TLimit> inline TSize resizeSpace(T & me, TSize size, TBeginPosition pos_begin, TEndPosition pos_end, TLimit limit);       	// "projects/library/seqan/sequence/sequence_interface.h"(1584)
+
+//____________________________________________________________________________
+// sequenceLength
+
+template <typename TSeqNo, typename TText> inline typename Size< typename GetSequenceByNo<TText const>::Type>::Type sequenceLength(TSeqNo seqNo, TText const & text);       	// "projects/library/seqan/sequence/string_set_base.h"(927)
+
+//____________________________________________________________________________
+// setContainer
+
+template <typename TContainer, typename THostspec, typename TContainer2> inline void setContainer(Iter<TContainer, Packed<THostspec> > & me, TContainer2 container_);       	// "projects/library/seqan/sequence/string_packed.h"(924)
+
+//____________________________________________________________________________
+// setPosition
+
+template <typename TContainer, typename THostspec, typename TPosition> inline void setPosition(Iter<TContainer, Packed<THostspec> > & me, TPosition pos_);       	// "projects/library/seqan/sequence/string_packed.h"(988)
+
+//____________________________________________________________________________
+// shareResources
+
+template <typename T1, typename T2> inline bool shareResources(T1 const & obj1, T2 const & obj2);       	// "projects/library/seqan/sequence/sequence_interface.h"(277)
+
+//____________________________________________________________________________
+// shrinkToFit
+
+template <typename T, typename TSize, typename TValue> inline void shrinkToFit(T & me);       	// "projects/library/seqan/sequence/sequence_interface.h"(1693)
+
+//____________________________________________________________________________
+// stringSetLimits
+
+template <typename TStringSet> inline typename StringSetLimits<TStringSet>::Type stringSetLimits(TStringSet &);       	// "projects/library/seqan/sequence/string_set_base.h"(301)
+template <typename TString, typename TSpec> inline typename StringSetLimits< StringSet<TString, TSpec> >::Type & stringSetLimits(StringSet<TString, TSpec> & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(308)
+template <typename TString, typename TSpec> inline typename StringSetLimits< StringSet<TString, TSpec> const>::Type & stringSetLimits(StringSet<TString, TSpec> const & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(317)
+
+//____________________________________________________________________________
+// suffix
+
+template <typename TString, typename TDelimiter, typename TPosition > inline typename Infix<TString>::Type suffix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > & me, TPosition pos);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(384)
+template <typename TString, typename TDelimiter, typename TPosition > inline typename Infix<TString const>::Type suffix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > const & me, TPosition pos);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(391)
+template <typename TString, typename TSpec, typename TPosition > inline typename Suffix<TString>::Type suffix(StringSet< TString, TSpec > & me, TPosition pos);       	// "projects/library/seqan/sequence/string_set_base.h"(608)
+template <typename TString, typename TSpec, typename TPosition > inline typename Suffix<TString const>::Type suffix(StringSet< TString, TSpec > const & me, TPosition pos);       	// "projects/library/seqan/sequence/string_set_base.h"(622)
+
+//____________________________________________________________________________
+// suffixLength
+
+template <typename TPos, typename TString> inline typename Size<TString>::Type suffixLength(TPos pos, TString const & string);       	// "projects/library/seqan/sequence/string_set_base.h"(869)
+template <typename TPos, typename TString, typename TSpec> inline typename Size<TString>::Type suffixLength(TPos pos, StringSet<TString, TSpec> const & stringSet);       	// "projects/library/seqan/sequence/string_set_base.h"(875)
+
+//____________________________________________________________________________
+// toCString
+
+template <typename TValue> inline TValue * toCString(TValue * me);       	// "projects/library/seqan/sequence/string_cstyle.h"(876)
+template <typename TValue> inline TValue const * toCString(TValue const * me);       	// "projects/library/seqan/sequence/string_cstyle.h"(884)
+template <typename TValue> inline TValue * toCString(String<TValue, CStyle> & me);       	// "projects/library/seqan/sequence/string_cstyle.h"(892)
+template <typename TValue> inline TValue const * toCString(String<TValue, CStyle> const & me);       	// "projects/library/seqan/sequence/string_cstyle.h"(900)
+template <typename TValue, typename TSpec> inline TValue * toCString(String<TValue, TSpec> & me);       	// "projects/library/seqan/sequence/string_cstyle.h"(928)
+template <typename TValue, typename TSpec> inline TValue * toCString(String<TValue, TSpec> const & me);       	// "projects/library/seqan/sequence/string_cstyle.h"(936)
+
+//____________________________________________________________________________
+// top
+
+template <typename TValue, unsigned int SPACE> inline TValue & top(String<TValue, Block<SPACE> > & me);       	// "projects/library/seqan/sequence/string_block.h"(492)
+template <typename TValue, unsigned int SPACE> inline TValue const & top(String<TValue, Block<SPACE> > const& me);       	// "projects/library/seqan/sequence/string_block.h"(500)
+
+//____________________________________________________________________________
+// topPrev
+
+template <typename TValue, unsigned int SPACE> inline TValue & topPrev(String<TValue, Block<SPACE> > & me);       	// "projects/library/seqan/sequence/string_block.h"(512)
+template <typename TValue, unsigned int SPACE> inline TValue const & topPrev(String<TValue, Block<SPACE> > const& me);       	// "projects/library/seqan/sequence/string_block.h"(523)
+
+//____________________________________________________________________________
+// value
+
+template <typename TString, typename TPos > inline typename Reference<StringSet<TString, Dependent<Tight> > >::Type value(StringSet<TString, Dependent<Tight> >& me, TPos pos);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(182)
+template <typename TString, typename TPos > inline typename Reference<StringSet<TString, Dependent<Tight> > const >::Type value(StringSet<TString, Dependent<Tight> >const & me, TPos pos);       	// "projects/library/seqan/sequence/string_set_dependent_tight.h"(190)
+template <typename TStringSet, typename TPos > inline typename Reference<ConcatenatorManyToOne<TStringSet> >::Type value(ConcatenatorManyToOne<TStringSet> & me, TPos globalPos);       	// "projects/library/seqan/sequence/sequence_concatenator.h"(186)
+template <typename TStringSet, typename TPos > inline typename Reference<ConcatenatorManyToOne<TStringSet> const >::Type value(ConcatenatorManyToOne<TStringSet> const & me, TPos globalPos);       	// "projects/library/seqan/sequence/sequence_concatenator.h"(195)
+template <typename TValue, typename THostspec, typename TPos> inline typename Reference<String<TValue, Packed<THostspec> > >::Type value(String<TValue, Packed<THostspec> > & me, TPos pos);       	// "projects/library/seqan/sequence/string_packed.h"(543)
+template <typename TValue, typename THostspec, typename TPos> inline typename Reference<String<TValue, Packed<THostspec> > const>::Type value(String<TValue, Packed<THostspec> > const & me, TPos pos);       	// "projects/library/seqan/sequence/string_packed.h"(553)
+template <typename TContainer, typename THostspec> inline typename Reference<Iter<TContainer, Packed<THostspec> > >::Type value(Iter<TContainer, Packed<THostspec> > & me);       	// "projects/library/seqan/sequence/string_packed.h"(1001)
+template <typename TContainer, typename THostspec> inline typename Reference<Iter<TContainer, Packed<THostspec> > const>::Type value(Iter<TContainer, Packed<THostspec> > const & me);       	// "projects/library/seqan/sequence/string_packed.h"(1008)
+template <typename TString, typename TPos > inline typename Reference<StringSet<TString, Owner<Default> > >::Type value(StringSet<TString, Owner<Default> > & me, TPos pos);       	// "projects/library/seqan/sequence/string_set_owner.h"(181)
+template <typename TString, typename TPos > inline typename Reference<StringSet<TString, Owner<Default> > const >::Type value(StringSet<TString, Owner<Default> > const & me, TPos pos);       	// "projects/library/seqan/sequence/string_set_owner.h"(188)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TPos> inline typename GetValue< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type value(::std::basic_string<TChar, TCharTraits, TAlloc> & me, TPos pos);       	// "projects/library/seqan/sequence/adapt_std_string.h"(222)
+template <typename TChar, typename TCharTraits, typename TAlloc, typename TPos> inline typename GetValue< ::std::basic_string<TChar, TCharTraits, TAlloc> const>::Type value(::std::basic_string<TChar, TCharTraits, TAlloc> const & me, TPos pos);       	// "projects/library/seqan/sequence/adapt_std_string.h"(230)
+template <typename TString, typename TSpec, typename TPos > inline typename Infix<TString>::Type value(StringSet<TString, Owner<ConcatDirect<TSpec> > > & me, TPos pos);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(438)
+template <typename TString, typename TSpec, typename TPos > inline typename Infix<TString const>::Type value(StringSet<TString, Owner<ConcatDirect<TSpec> > > const & me, TPos pos);       	// "projects/library/seqan/sequence/string_set_concat_direct.h"(445)
+template <typename T, typename TPos> inline typename Reference<T>::Type value(T & me, TPos );       	// "projects/library/seqan/sequence/sequence_interface.h"(618)
+template <typename T, typename TPos> inline typename Reference<T const>::Type value(T const & me, TPos );       	// "projects/library/seqan/sequence/sequence_interface.h"(627)
+template <typename TValue, typename TPos> inline TValue & value(TValue * me, TPos pos);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(264)
+template <typename TValue, typename TPos> inline TValue const & value(TValue const * me, TPos pos);       	// "projects/library/seqan/sequence/adapt_array_pointer.h"(273)
+template <typename TStringSet, typename TSpec> inline typename Reference<Iter<TStringSet, ConcatVirtual<TSpec> > const>::Type value(Iter<TStringSet, ConcatVirtual<TSpec> > const & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(225)
+template <typename TStringSet, typename TSpec> inline typename Reference<Iter<TStringSet, ConcatVirtual<TSpec> > >::Type value(Iter<TStringSet, ConcatVirtual<TSpec> > & me);       	// "projects/library/seqan/sequence/iter_concat_virtual.h"(232)
+template <typename TValue, unsigned int SPACE, typename TPos> inline typename Reference<String<TValue, Block<SPACE> > >::Type value( String<TValue, Block<SPACE> >& stack, TPos const pos);       	// "projects/library/seqan/sequence/string_block.h"(262)
+template <typename TValue, unsigned int SPACE, typename TPos> inline typename Reference<String<TValue, Block<SPACE> > >::Type value( String<TValue, Block<SPACE> > const& stack, TPos const pos);       	// "projects/library/seqan/sequence/string_block.h"(272)
+template <typename TChar, typename TAlloc, typename TPos> inline typename GetValue< ::std::vector<TChar, TAlloc> >::Type value(::std::vector<TChar, TAlloc> & me, TPos pos);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(220)
+template <typename TChar, typename TAlloc, typename TPos> inline typename GetValue< ::std::vector<TChar, TAlloc> const>::Type value(::std::vector<TChar, TAlloc> const & me, TPos pos);       	// "projects/library/seqan/sequence/adapt_std_vector.h"(228)
+template <typename TString, typename TPos > inline typename Reference<StringSet<TString, Dependent<Generous> > >::Type value(StringSet<TString, Dependent<Generous> >& me, TPos pos);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(148)
+template <typename TString, typename TPos > inline typename Reference<StringSet<TString, Dependent<Generous> > const >::Type value(StringSet<TString, Dependent<Generous> > const & me, TPos pos);       	// "projects/library/seqan/sequence/string_set_dependent_generous.h"(160)
+
+//____________________________________________________________________________
+// valueById
+
+template <typename TString, typename TSpec, typename TId> inline typename Reference<StringSet<TString, TSpec> >::Type valueById(StringSet<TString, TSpec> & me, TId const id);       	// "projects/library/seqan/sequence/string_set_base.h"(1167)
+
+//____________________________________________________________________________
+// valueConstruct
+
+template <typename TContainer, typename THostspec> inline void valueConstruct(Iter<TContainer, Packed<THostspec> > const & );       	// "projects/library/seqan/sequence/string_packed.h"(1103)
+template <typename TContainer, typename THostspec, typename TParam> inline void valueConstruct(Iter<TContainer, Packed<THostspec> > const & it, TParam const & param_);       	// "projects/library/seqan/sequence/string_packed.h"(1109)
+template <typename TContainer, typename THostspec, typename TParam> inline void valueConstruct(Iter<TContainer, Packed<THostspec> > const & it, TParam const & param_, Move );       	// "projects/library/seqan/sequence/string_packed.h"(1117)
+
+//____________________________________________________________________________
+// valueDestruct
+
+template <typename TContainer, typename THostspec> inline void valueDestruct(Iter<TContainer, Packed<THostspec> > const & );       	// "projects/library/seqan/sequence/string_packed.h"(1128)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/sequence/sequence_interface.h b/src/SeqAn-1.3/seqan/sequence/sequence_interface.h
new file mode 100644
index 0000000..6e0a790
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/sequence_interface.h
@@ -0,0 +1,1700 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Default implementations for sequences.
+//
+// TODO(holtgrew): There appears to be some overlap with string_base.h. Maybe it is a good idea to move everything related to strings to string_base.h and remove all default-container behaviour.
+// TODO(holtgrew): Each value is a container by itself. This is highly undesirable since it introduces the set-of-sets problem and when users confuse atomic values with containers, bugs are hard to find. This feature should be removed.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_INTERFACE_H
+#define SEQAN_HEADER_SEQUENCE_INTERFACE_H
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+/**
+.Tag.Overflow Strategy:
+..summary:The strategy for resizing containers.
+..tag.Insist:No capacity check.
+...remarks:The user has to ensure that the container's capacity is large enough.
+..tag.Limit:Limit the contents to current capacity.
+...remarks: All entries that exceed the capacity are lost.
+..tag.Exact:Expand as far as needed.
+...remarks: The capacity is only changed if the current capacity is not large enough.
+ If the capacity can only be expanded up to a certain ammount, it will be increased as far as possible
+ and the contents are limited to the new capacity.
+...remarks:Note that the capacity will never be shrinked.
+ Use @Function.shrinkToFit@ to resize the capacity down to the current length.
+..tag.Generous:Expand if needed, get precautionary extra space.
+...remarks:Whenever the capacity has to be increased, the new capacity is choosen somewhat large than actually needed.
+ This strategy limits the number of capacity changes, so that resizing takes armotized constant time.
+ Use this strategy if the total amount of storage is unkown at first.
+...remarks:The new capacity is computed by @Function.computeGenerousCapacity at .
+By default, it is guaranteed not to exceed about
+ tree halfs of the space that is used to store the data.
+ The user can overload @Function.computeGenerousCapacity@ in order to change this behavior.
+..remarks:Changing the capacity of a container can invalidate the iterators of this container.
+..remarks:If no overflow tag is specified, most operations use the default overflow strategy given by @Metafunction.DefaultOverflowImplicit@
+or @Metafunction.DefaultOverflowExplicit@, depending on the kind of operation.
+..include:seqan/sequence.h
+*/
+struct TagInsist_;
+typedef Tag<TagInsist_> const Insist;
+typedef Tag<TagInsist_> const Tight;
+
+struct TagLimit_;
+typedef Tag<TagLimit_> const Limit;
+
+struct TagGenerous_;
+typedef Tag<TagGenerous_> const Generous;
+
+struct TagExact_;
+typedef Tag<TagExact_> const Exact;
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Metafunction DefaultOverflowImplicit
+// --------------------------------------------------------------------------
+
+/**
+.Metafunction.DefaultOverflowImplicit:
+..hidefromindex
+..summary:The default overflow strategy for implicit resize.
+..signature:DefaultOverflowImplicit<T>::Type
+..param.T:Type for which the overflow strategy is determined.
+...type:Class.String
+..returns.param.Type:Expansion tag for type of $T$.
+..remarks:This function is used for functions that cause an implicit change of a container's size, like
+e.g. @Function.assign@, @Function.append@, and @Function.replace at .
+..see:Tag.Overflow Strategy
+..include:seqan/sequence.h
+*/
+template <typename T>
+struct DefaultOverflowImplicit
+{
+    typedef Generous Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction DefaultOverflowExplicit
+// --------------------------------------------------------------------------
+
+/**
+.Metafunction.DefaultOverflowExplicit:
+..hidefromindex
+..summary:The default overflow strategy for explicit resize.
+..signature:DefaultOverflowExplicit<T>::Type
+..param.T:Type for which the overflow strategy is determined.
+...type:Class.String
+..returns.param.Type:Expansion tag for type of $T$.
+..remarks:This function is used for functions that change a container's size explicit, like e.g. @Function.resize at .
+..see:Tag.Overflow Strategy
+..see:Metafunction.DefaultOverflowImplicit
+..include:seqan/sequence.h
+*/
+template <typename T>
+struct DefaultOverflowExplicit
+{
+    typedef Generous Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction IsContiguous
+// --------------------------------------------------------------------------
+
+/**
+.Metafunction.IsContiguous:
+..summary:Determines whether a container stores its elements in a contiguous array.
+..signature:IsContiguous<T>::VALUE
+..param.T:Type that is tested for being a string.
+..returns.param.VALUE:$true$ if $T$ is a string, $false$ otherwise.
+..remarks:Definition: A sequence container is "contiguous", if its elements
+    are stored in a single contiguous array.
+    Examples for contiguous sequences are @Spec.Alloc String@ or @Adaption.char array at .
+..remarks:If an object $obj$ is a contiguous sequence, then $begin(obj)$ can be
+    converted to a pointer to the first element of the content array.
+..include:seqan/sequence.h
+*/
+template <typename T>
+struct IsContiguous
+{
+    typedef False Type;
+    enum { VALUE = false };
+};
+
+template <typename T>
+struct IsContiguous<T const>
+    : public IsContiguous<T> {};
+
+// --------------------------------------------------------------------------
+// Metafunction IsSequence
+// --------------------------------------------------------------------------
+
+/**
+.Metafunction.IsSequence:
+..summary:Determines whether a container stores its elements in sequential order.
+..signature:IsSequence<T>::VALUE
+..param.T:Type that is tested for being a sequence.
+..returns.param.VALUE:$true$ if $T$ is a sequence, $false$ otherwise.
+..remarks:For example @Class.String@ and @Class.Segment@ return $true$.
+..include:seqan/sequence.h
+*/
+template <typename T>
+struct IsSequence
+{
+    typedef False Type;
+    enum { VALUE = false };
+};
+
+template <typename T>
+struct IsSequence<T const>
+    : public IsSequence<T> {};
+
+// --------------------------------------------------------------------------
+// Metafunction AllowsFastRandomAccess
+// --------------------------------------------------------------------------
+
+/**
+.Metafunction.AllowsFastRandomAccess:
+..summary:Determines whether a sequence efficiently supports random access.
+..signature:AllowsFastRandomAccess<T>::VALUE
+..param.T:Type that is tested for fast random access.
+..returns.param.VALUE:$true$ if $T$ supports fast random access, $false$ otherwise.
+..remarks:For example @Spec.Alloc String@, @Class.Segment@, and @Spec.Block String@ return $true$.
+..include:seqan/sequence.h
+*/
+template <typename T>
+struct AllowsFastRandomAccess
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+template <typename T>
+struct AllowsFastRandomAccess<T const>
+    : public AllowsFastRandomAccess<T> {};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function id()
+// --------------------------------------------------------------------------
+
+/**
+.Function.id:
+..cat:Miscellaneous
+..summary:A value that identifies the underlying sequence.
+..signature:void const * id(object)
+..param.object:The object for which the id will be determined.
+..returns:The id of $sequence$.
+..remarks.text:Two sequences should have the same id, if they share the same resource, e.g. the same memory buffer.
+..remarks.text:The exact semantic of the returned id can vary for different classes.
+Typically, the id of a string is a $void const *$ to the end of the string.
+..remarks.note:The id of a single character need not to be the id of its container.
+..example.code:String<char> str = "hallo seqan";
+bool b1 = (id(str) == id(infix(str, 3, 7));   //true
+bool b2 = (id(str) == id(String<char>(str))); //false
+bool b3 = (id(str) == id(toCString(str)));
+..example.text:In this example, $b1$ is $true$, since the segment object returned by $infix()$
+is just a filter and uses the buffer of it's host object $str$.
+..example.text:$String<char>(str)$ constructs a temporary copy of $str$, so these two
+strings have different id values.
+..example.text:The result of the last comparison depends on the implementation of $toCString$
+and cannot be predicted at compile time.
+..include:seqan/sequence.h
+*/
+template <typename T>
+inline void const *
+id(T const & me)
+{
+    SEQAN_CHECKPOINT;
+    return end(me, Standard());
+}
+
+// --------------------------------------------------------------------------
+// Function shareResources()
+// --------------------------------------------------------------------------
+
+/**
+.Function.shareResources:
+..cat:Miscellaneous
+..summary:Determines whether two sequences share the same resource.
+..signature:bool shareResources(sequence1, sequence2)
+..param.sequence1, sequence2:Two sequences.
+..returns:$false$ if it can be guaranteed that $sequence1$ and $sequence2$ can be modified without changing each other, $true$ otherwise.
+..remarks:Non-sequences are interpreted as sequences of size 1.
+..remarks:Note that this function may not work properly for argument types that are not listed here.
+..include:seqan/sequence.h
+*/
+
+template <typename T1, typename T2>
+inline bool
+shareResources(T1 const & obj1,
+               T2 const & obj2)
+{
+    SEQAN_CHECKPOINT;
+    return id(obj1) == id(obj2);
+}
+
+// --------------------------------------------------------------------------
+// Function _beginDefault()
+// --------------------------------------------------------------------------
+
+//* ???Anti Default Sequences
+// TODO(holtgrew): Evil -- each value is a container of length 1.
+template <typename T>
+inline typename Iterator<T, Standard>::Type
+_beginDefault(T & me,
+               Standard)
+{
+    SEQAN_CHECKPOINT;
+    return & me;
+}
+// TODO(holtgrew): Evil -- each value is a container of length 1.
+template <typename T>
+inline typename Iterator<T const, Standard>::Type
+_beginDefault(T const & me,
+               Standard)
+{
+    SEQAN_CHECKPOINT;
+    return & me;
+}
+//*/
+
+template <typename T>
+inline typename Iterator<T, Rooted>::Type
+_beginDefault(T & me,
+               Rooted)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<T, Rooted>::Type TIterator;
+    return TIterator(me, begin(me, Standard()));
+}
+template <typename T>
+inline typename Iterator<T const, Rooted>::Type
+_beginDefault(T const & me,
+               Rooted)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<T const, Rooted>::Type TIterator;
+    return TIterator(me, begin(me, Standard()));
+}
+
+// --------------------------------------------------------------------------
+// Function begin()
+// --------------------------------------------------------------------------
+
+/**
+.Function.begin:
+..cat:Iteration
+..cat:Containers
+..summary:The begin of a container.
+..signature:Iterator begin(object [, tag])
+..param.object:A container.
+...type:Class.String
+...concept:Concept.Container
+..param.tag:An @Tag.Iterator Spec.iterator spec@ tag that specifies the kind of the iterator returned. (optional)
+...default:Given by @Metafunction.DefaultGetIteratorSpec at .
+..returns:An iterator to the first item in $object$.
+...metafunction:Metafunction.Iterator
+..remarks.text:If the container does not contain any items at all, the function may return 0.
+..see:Function.end
+..see:Metafunction.Iterator
+..include:seqan/sequence.h
+*/
+template <typename T>
+inline typename Iterator<T, typename DefaultGetIteratorSpec<T>::Type>::Type
+begin(T & me)
+{
+    SEQAN_CHECKPOINT;
+    return begin(me, typename DefaultGetIteratorSpec<T>::Type()) ;
+}
+
+template <typename T>
+inline typename Iterator<T const, typename DefaultGetIteratorSpec<T>::Type>::Type
+begin(T const & me)
+{
+    SEQAN_CHECKPOINT;
+    return begin(me, typename DefaultGetIteratorSpec<T>::Type()) ;
+}
+
+//folgende forward Deklaration wurde wegen Phaenomene bei VC++ 2003 hinzugenommen
+//implemented in string_pointer.h
+template <typename TValue>
+inline typename Iterator<TValue const *, Standard>::Type
+begin(TValue const * me,
+      Standard);
+
+template <typename T, typename TSpec>
+inline typename Iterator<T, Tag<TSpec> const>::Type
+begin(T & me,
+      Tag<TSpec> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    return _beginDefault(me, tag_);
+}
+template <typename T, typename TSpec>
+inline typename Iterator<T const, Tag<TSpec> const>::Type
+begin(T const & me,
+      Tag<TSpec> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    return _beginDefault(me, tag_);
+}
+
+/*
+template <typename TValue>
+inline typename Iterator<TValue *, Standard>::Type
+begin(TValue * me,
+      Standard)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+
+//folgende Version wurde wegen eines seltsamen Phaenomens bei VC++ hinzugenommen
+template <typename TValue>
+inline typename Iterator<TValue const *, Standard>::Type
+begin(TValue const * me,
+      Standard)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+
+template <typename TValue, typename TSpec>
+inline typename Iterator<TValue *, Standard>::Type
+begin(TValue * me,
+      Tag<TSpec> const tag_)
+//    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+
+//folgende Version wurde wegen eines seltsamen Phaenomens bei VC++ hinzugenommen
+template <typename TValue, typename TSpec>
+inline typename Iterator<TValue const *, Standard>::Type
+begin(TValue const * me,
+      Tag<TSpec> const tag_)
+//    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+*/
+
+// --------------------------------------------------------------------------
+// Function beginPosition()
+// --------------------------------------------------------------------------
+
+/**
+.Function.beginPosition:
+..cat:Containers
+..summary:Begin position of object in host.
+..signature:Position beginPosition(object)
+..param.object:An object.
+...type:Class.String
+...concept:Concept.Container
+..returns:The position of the first item in $host(object)$ that belongs of $object$.
+...metafunction:Metafunction.Position
+..remarks
+...text:For most classes $beginPosition$ always returns 0. Exceptions are e.g. @Spec.InfixSegment@ and @Spec.SuffixSegment at .
+..see:Function.begin
+..include:seqan/sequence.h
+*/
+template <typename T>
+inline typename Position<T>::Type
+beginPosition(T &)
+{
+    SEQAN_CHECKPOINT;
+    return 0;
+}
+
+template <typename T>
+inline typename Position<T>::Type
+beginPosition(T const &)
+{
+    SEQAN_CHECKPOINT;
+    return 0;
+}
+
+// --------------------------------------------------------------------------
+// Function _endDefault()
+// --------------------------------------------------------------------------
+
+//* ???Anti Default Sequences
+template <typename T>
+inline typename Iterator<T, Standard>::Type
+_endDefault(T & me,
+             Standard)
+{
+    SEQAN_CHECKPOINT;
+    return (& me) + 1;
+}
+template <typename T>
+inline typename Iterator<T const, Standard>::Type
+_endDefault(T const & me,
+             Standard)
+{
+    SEQAN_CHECKPOINT;
+    return (& me) + 1;
+}
+//*/
+
+template <typename T>
+inline typename Iterator<T, Rooted>::Type
+_endDefault(T & me,
+             Rooted)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<T, Rooted>::Type TIterator;
+    return TIterator(me, end(me, Standard()));
+}
+template <typename T>
+inline typename Iterator<T const, Rooted>::Type
+_endDefault(T const & me,
+             Rooted)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<T const, Rooted>::Type TIterator;
+    return TIterator(me, end(me, Standard()));
+}
+
+// --------------------------------------------------------------------------
+// Function end()
+// --------------------------------------------------------------------------
+
+/**
+.Function.end:
+..cat:Iteration
+..cat:Containers
+..summary:The end of a container.
+..signature:Iterator end(object [, tag])
+..param.object:A container.
+...type:Class.String
+...concept:Concept.Container
+..param.tag:An @Tag.Iterator Spec.iterator spec@ tag that specifies the kind of the iterator returned. (optional)
+...default:Given by @Metafunction.DefaultGetIteratorSpec at .
+..returns:An iterator that points behind the last item in $object$.
+...metafunction:Metafunction.Iterator
+..remarks.text:If the container does not contain any items at all, the function may return 0.
+..see:Function.begin
+..see:Metafunction.Iterator
+..include:seqan/sequence.h
+*/
+template <typename T>
+inline typename Iterator<T, typename DefaultGetIteratorSpec<T>::Type>::Type
+end(T & me)
+{
+    SEQAN_CHECKPOINT;
+    return end(me, typename DefaultGetIteratorSpec<T>::Type()) ;
+}
+
+template <typename T>
+inline typename Iterator<T const, typename DefaultGetIteratorSpec<T>::Type>::Type
+end(T const & me)
+{
+    SEQAN_CHECKPOINT;
+    return end(me, typename DefaultGetIteratorSpec<T>::Type()) ;
+}
+
+template <typename T, typename TSpec>
+inline typename Iterator<T, Tag<TSpec> const>::Type
+end(T & me,
+    Tag<TSpec> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    return _endDefault(me, tag_);
+}
+
+template <typename T, typename TSpec>
+inline typename Iterator<T const, Tag<TSpec> const>::Type
+end(T const & me,
+    Tag<TSpec> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    return _endDefault(me, tag_);
+}
+
+// --------------------------------------------------------------------------
+// Function endPosition()
+// --------------------------------------------------------------------------
+
+/**
+.Function.endPosition:
+..cat:Containers
+..summary:End position of object in host.
+..signature:Position endPosition(object)
+..param.object:An object.
+...concept:Concept.Container
+...type:Class.String
+..returns:The position behind the last item in $host(object)$ that belongs of $object$.
+...metafunction:Metafunction.Position
+..see:Function.end
+..see:Function.beginPosition
+..include:seqan/sequence.h
+*/
+template <typename T>
+inline typename Position<T>::Type
+endPosition(T & me)
+{
+    SEQAN_CHECKPOINT;
+    return length(me);
+}
+
+template <typename T>
+inline typename Position<T>::Type
+endPosition(T const & me)
+{
+    SEQAN_CHECKPOINT;
+    return length(me);
+}
+
+// --------------------------------------------------------------------------
+// Function value()
+// --------------------------------------------------------------------------
+
+/**
+.Function.value:
+..cat:Iteration
+..cat:Containers
+..summary:Reference to the value.
+..signature:Reference value(container, position)
+..param.container:A container of values.
+..param.position:A position in $container$ on which the value should be accessed.
+..returns:A reference or proxy to the value.
+...metafunction:Metafunction.Reference
+..include:seqan/sequence.h
+*/
+//* ???Anti Default Sequences
+template <typename T, typename TPos>
+inline typename Reference<T>::Type
+value(T & me,
+      TPos /*pos*/)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+
+template <typename T, typename TPos>
+inline typename Reference<T const>::Type
+value(T const & me,
+      TPos /*pos*/)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+//*/
+
+// --------------------------------------------------------------------------
+// Function getValue()
+// --------------------------------------------------------------------------
+
+/**
+.Function.getValue:
+..summary:Access to the value.
+..cat:Containers
+..cat:Content Manipulation
+..signature:GetValue getValue(container, pos)
+..param.container:A container.
+...concept:Concept.Container
+..param.pos:The position of an item in $object$.
+...remarks:$pos$ should be convertible to $Position<T>::Type$ for $container$-type $T$.
+..returns:The item at position $pos$ in $container$.
+This can either be a reference to the item or a temporary copy of the item.
+...metafunction:Metafunction.GetValue
+..remarks:
+...text:If $pos$ is out of range, then the behavior of the function is undefined.
+..see:Metafunction.GetValue
+..see:Metafunction.Position
+..see:Function.value
+..include:seqan/sequence.h
+*/
+template <typename T, typename TPos>
+inline typename GetValue<T>::Type
+getValue(T & me,
+         TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return (typename GetValue<T>::Type) value(me, pos);
+}
+
+template <typename T, typename TPos>
+inline typename GetValue<T const>::Type
+getValue(T const & me,
+         TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return value(me, pos);
+}
+
+// --------------------------------------------------------------------------
+// Function front()
+// --------------------------------------------------------------------------
+
+/**
+.Function.front:
+..cat:Containers
+..summary:The first item in container.
+..signature:Iterator front(container)
+..param.container:A container.
+...concept:Concept.Container
+..returns:A @Metafunction.Reference.reference@ of the first item in $container$.
+...metafunction:Metafunction.Reference
+..remarks:This function is equivalent to $value(me, 0)$.
+..see:Function.value
+..see:Function.begin
+..include:seqan/sequence.h
+*/
+
+template <typename T>
+inline typename Reference<T>::Type
+front(T & me)
+{
+    SEQAN_CHECKPOINT;
+    return value(me, 0);
+}
+template <typename T>
+inline typename Reference<T const>::Type
+front(T const & me)
+{
+    SEQAN_CHECKPOINT;
+    return value(me, 0);
+}
+
+// --------------------------------------------------------------------------
+// Function back()
+// --------------------------------------------------------------------------
+
+/**
+.Function.back:
+..cat:Containers
+..summary:The last item in container.
+..signature:Iterator back(container)
+..param.container:A container.
+...concept:Concept.Container
+..returns:A @Metafunction.Reference.reference@ of the last item in $container$.
+...metafunction:Metafunction.Reference
+..remarks:This function is equivalent to $value(me, length(me) - 1)$.
+..see:Function.value
+..see:Function.end
+..see:Function.front
+..include:seqan/sequence.h
+*/
+
+template <typename T>
+inline typename Reference<T const>::Type
+back(T const & me)
+{
+    SEQAN_CHECKPOINT;
+    return value(me, length(me) - 1);
+}
+
+template <typename T>
+inline typename Reference<T>::Type
+back(T & me)
+{
+    SEQAN_CHECKPOINT;
+    return value(me, length(me) - 1);
+}
+
+// --------------------------------------------------------------------------
+// Function iter()
+// --------------------------------------------------------------------------
+
+/**
+.Function.iter:
+..cat:Containers
+..summary:Iterator to item at given position.
+..signature:Iterator iter(object, pos [, tag])
+..param.object:A container.
+...type:Class.String
+..param.pos:The position of an item in $object$.
+...metafunction:Metafunction.Position
+..param.tag:An @Tag.Iterator Spec.iterator spec@ tag that specifies the kind of the iterator returned. (optional)
+...default:Given by @Metafunction.DefaultGetIteratorSpec at .
+..returns:An iterator to the item at position $pos$ in $object$.
+...metafunction:Metafunction.Iterator
+..remarks:
+...text:If $pos$ is out of range, then the behavior of the function is undefined.
+..see:Function.value
+..see:Metafunction.Iterator
+..see:Metafunction.Position
+..include:seqan/sequence.h
+ */
+template <typename T, typename TPos>
+inline typename Iterator<T, typename DefaultGetIteratorSpec<T>::Type>::Type
+iter(T & me,
+     TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return iter(me, pos, typename DefaultGetIteratorSpec<T>::Type());
+}
+
+template <typename T, typename TPos>
+inline typename Iterator<T const, typename DefaultGetIteratorSpec<T>::Type>::Type
+iter(T const & me,
+     TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return iter(me, pos, typename DefaultGetIteratorSpec<T>::Type());
+}
+
+template <typename T, typename TPos, typename TTag>
+inline typename Iterator<T, Tag<TTag> const>::Type
+iter(T & me,
+     TPos pos,
+     Tag<TTag> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_LEQ_MSG(pos, static_cast<TPos>(length(me)), "Trying to get an iterator behind a container through iter().");
+    return begin(me, tag_) + pos;
+}
+
+template <typename T, typename TPos, typename TTag>
+inline typename Iterator<T const, Tag<TTag> const>::Type
+iter(T const & me,
+     TPos pos,
+     Tag<TTag> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_LEQ_MSG(pos, static_cast<TPos>(length(me)), "Trying to get an iterator behind a container through iter().");
+    return begin(me, tag_) + pos;
+}
+
+// --------------------------------------------------------------------------
+// Function assignValue()
+// --------------------------------------------------------------------------
+
+/**
+.Function.assignValue:
+..cat:Content Manipulation
+..signature:assignValue(container, pos, value)
+..param.container:A container.
+...concept:Concept.Container
+..param.pos:Position of the item in $container$ to that $value$ is assigned.
+..remarks:If $object$ is a container (that is $pos$ is not specified),
+    the whole content of $object$ is replaced by $value$.
+..remarks.text:
+    If $value$ is not used again after calling this function,
+    then consider to use @Function.moveValue@ that could be faster in some cases instead.
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TValue, typename TPos>
+inline void
+assignValue(T & me,
+            TPos pos,
+            TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    assign(value(me, pos), _value);
+}
+
+// --------------------------------------------------------------------------
+// Function moveValue()
+// --------------------------------------------------------------------------
+
+/**
+.Function.moveValue:
+..cat:Content Manipulation
+..signature:moveValue(container, pos, value)
+..param.object:
+...concept:Concept.Container
+..param.container:A container.
+...concept:Concept.Container
+..param.pos:Position of the item in $container$ to that $value$ is moved to.
+..remarks:If $object$ is a container (that is $pos$ is not specified),
+the whole content of $object$ is replaced by $value$.
+..remarks.text:
+    This function possibly clears $value$.
+    If $value$ should be used further, consider to use @Function.assignValue@ instead.
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TValue, typename TPos>
+inline void
+moveValue(T & me,
+          TPos pos,
+          TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    move(value(me, pos), _value);
+}
+
+template <typename T, typename TValue, typename TPos>
+inline void
+moveValue(T const & me,
+          TPos pos,
+          TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    move(value(me, pos), _value);
+}
+
+// --------------------------------------------------------------------------
+// Function length()
+// --------------------------------------------------------------------------
+
+/**
+.Function.length:
+..cat:Containers
+..summary:The number of items/characters.
+..signature:Size length(object)
+..param.object:A container.
+...concept:Concept.Container
+..returns:The number of items/characters in $object$.
+...metafunction:Metafunction.Size
+..remarks.text:The length of a sequence can never exceed it's capacity.
+..see:Function.capacity
+..include:seqan/sequence.h
+*/
+
+//* ???Anti Default Sequences
+template <typename T>
+inline typename Size<T>::Type
+length(T const & /*me*/)
+{
+    SEQAN_CHECKPOINT;
+    return 1;
+}
+//*/
+
+// --------------------------------------------------------------------------
+// Function capacity()
+// --------------------------------------------------------------------------
+
+/**
+.Function.capacity:
+..cat:Containers
+..summary:The maximal length.
+..signature:Size capacity(object)
+..param.object:A container.
+...remarks: If $object$ cannot be converted to one of these types, the function returns 1.
+..returns:The maximal number of items/characters that can be stored in $object$.
+...metafunction:Metafunction.Size
+..remarks.text:The size of a sequence can never exceed it's capacity, but some containers support
+resizing of the capacity.
+Some functions do that implicitely if they are called with a suitable @Tag.Overflow Strategy.overflow strategy at .
+The function @Function.reserve@ can be used to change the capacity explicitely.
+..include:seqan/sequence.h
+*/
+template <typename T>
+inline typename Size<T const>::Type
+capacity(T const & me)
+{
+    SEQAN_CHECKPOINT;
+    return length(me);
+}
+
+// --------------------------------------------------------------------------
+// Function empty()
+// --------------------------------------------------------------------------
+
+/**
+.Function.empty:
+..cat:Containers
+..summary:Test a container for being empty.
+..signature:bool empty(object)
+..param.object:A container.
+..returns:$true$ if $object$ contains no elements, otherwise $false$.
+..remarks.text:$empty(x)$ is guaranteed to be at least as fast as $length(me) == 0$,
+but can be significantly faster in some cases.
+..see:Function.length
+..include:seqan/sequence.h
+*/
+template <typename T>
+inline bool
+empty(T const & me)
+{
+    SEQAN_CHECKPOINT;
+    return (length(me) == 0);
+}
+
+// --------------------------------------------------------------------------
+// Function _computeSizeForCapacity()
+// --------------------------------------------------------------------------
+
+// note: for value types of size 1 or 2,
+// an extra position for the termination character is allocated.
+// This speeds up a conversion to a c style string (see Spec.CStyle String)
+// note that this extra position is necessary not only for char and wchar_t,
+// but also for all other value types of size 1 and 2 to make the application
+// of the funciton move for in-place alphabet conversion.
+
+
+template <typename T, typename TSize>
+inline TSize
+_computeSizeForCapacity(T const & /*me*/,
+                      TSize capacity)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Value<T>::Type TValue;
+    if (sizeof(TValue) <= 2) return capacity + 1;
+    else return capacity;
+}
+
+// --------------------------------------------------------------------------
+// Function computeGenerousCapacity()
+// --------------------------------------------------------------------------
+
+/**
+.Function.computeGenerousCapacity:
+..hidefromindex
+..cat:Containers
+..summary:Capacity for generous expansion.
+..signature:Size computeGenerousCapacity(container, capacity)
+..param.container:A container that should be expanded.
+..param.capacity:Minimal capacity needed.
+..returns:A value larger than $capacity$ that should be used as new capacity for $container$
+when it is expanded using the @Tag.Overflow Strategy."Generous" overflow strategy at .
+...metafunction:Metafunction.Size
+..see:Tag.Overflow Strategy
+..include:seqan/sequence.h
+*/
+template <typename T, typename TSize>
+inline TSize
+computeGenerousCapacity(T const & /*me*/,
+                         TSize capacity)
+{
+    SEQAN_CHECKPOINT;
+    if (capacity < 32) return 32;       // returned value is implicitly >= capacity + 1
+    return capacity + (capacity >> 1);
+}
+
+// --------------------------------------------------------------------------
+// Function _storageUpdated()
+// --------------------------------------------------------------------------
+
+/*
+template <typename T>
+inline void
+_storageUpdated(T & me,
+                void const *)
+{
+}
+
+template <typename T>
+inline void
+_storageUpdated(T & me)
+{
+    _storageUpdated_(me, (T *) 0);
+}
+
+template <typename T>
+inline void
+_storageUpdated(T const & me)
+{
+    _storageUpdated_(me, (T const *) 0);
+}
+*/
+
+// --------------------------------------------------------------------------
+// Function assign()
+// --------------------------------------------------------------------------
+
+template<typename TTarget, typename TSource>
+inline void
+assign(TTarget & target,
+       TSource & source,
+       typename Size<TTarget>::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, limit, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+assign(TTarget const & target,
+       TSource & source,
+       typename Size<TTarget>::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, limit, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+assign(TTarget & target,
+       TSource const & source,
+       typename Size<TTarget>::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, limit, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+assign(TTarget const & target,
+       TSource const & source,
+       typename Size<TTarget>::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    assign(target, source, limit, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+// --------------------------------------------------------------------------
+// Function append()
+// --------------------------------------------------------------------------
+
+/**
+.Function.append:
+..summary:Concatenate two containers.
+..cat:Content Manipulation
+..signature:append(target, source [, limit] [,resize_tag])
+..param.target: A container $source$ is append to.
+..param.source: A container that is append to $target$.
+...remarks:The function does not modify this container.
+..param.limit: The maximal length of $target$ after the operation. (optional)
+..param.resize_tag: Specifies the strategy that is applied if $target$ has not enough capacity to store the complete content. (optional)
+...type:Tag.Overflow Strategy
+...default:Specified by @Metafunction.DefaultOverflowImplicit@ of the $target$ type.
+..remarks:The result of this operation is stored in $target$.
+..see:Function.assign
+..include:seqan/sequence.h
+*/
+
+template<typename TTarget, typename TSource>
+inline void
+append(TTarget & target,
+       TSource & source)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+append(TTarget const & target,
+       TSource & source)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+append(TTarget & target,
+       TSource const & source)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+append(TTarget const & target,
+       TSource const & source)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+append(TTarget & target,
+       TSource & source,
+       typename Size<TTarget>::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, limit, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+append(TTarget const & target,
+       TSource & source,
+       typename Size<TTarget>::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, limit, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+append(TTarget & target,
+       TSource const & source,
+       typename Size<TTarget>::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, limit, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TSource>
+inline void
+append(TTarget const & target,
+       TSource const & source,
+       typename Size<TTarget>::Type limit)
+{
+    SEQAN_CHECKPOINT;
+    append(target, source, limit, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+// --------------------------------------------------------------------------
+// Function appendValue()
+// --------------------------------------------------------------------------
+
+/**
+.Function.appendValue:
+..signature:appendValue(target, value [, resize_tag])
+..cat:Content Manipulation
+..summary:Appends a value to a container.
+..param.target:A container.
+..param.value:Value that is appended to $target$.
+..param.resize_tag:
+..param.resize_tag: Specifies the strategy that is applied if $target$ has not enough capacity to store the complete content. (optional)
+...type:Tag.Overflow Strategy
+...default:Specified by @Metafunction.DefaultOverflowImplicit@ of the $target$ type.
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TValue>
+inline void
+appendValue(T & me,
+            TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    appendValue(me, _value, typename DefaultOverflowImplicit<T>::Type());
+}
+
+template <typename T, typename TValue>
+inline void
+appendValue(T const & me,
+            TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    appendValue(me, _value, typename DefaultOverflowImplicit<T const>::Type());
+}
+
+// --------------------------------------------------------------------------
+// Function insert()
+// --------------------------------------------------------------------------
+
+/**
+.Function.insert:
+..cat:Content Manipulation
+..summary:Inserts a sequence into a container.
+..signature:insert(target, pos, insertSeq [, resize_tag])
+..param.target:The container
+..param.pos:Position within $target$ at which $insertSeq$ is to be inserted.
+..param.insertSeq:Sequence that will be inserted into $target$.
+..param.resize_tag:Strategy that is applied if $target$ has not enough capacity to store the complete content.
+...type:Tag.Overflow Strategy
+..see:Function.insertValue
+..see:Function.append
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TPosition, typename TSeq, typename TExpand>
+inline void
+insert(T & me,
+       TPosition pos,
+       TSeq const & insertSeq,
+       Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    replace(me, pos, pos, insertSeq, Tag<TExpand>());
+}
+
+template <typename T, typename TPosition, typename TSeq, typename TExpand>
+inline void
+insert(T const & me,
+       TPosition pos,
+       TSeq const & insertSeq,
+       Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    replace(me, pos, pos, insertSeq, Tag<TExpand>());
+}
+
+template <typename T, typename TPosition, typename TSeq>
+inline void
+insert(T & me,
+       TPosition pos,
+       TSeq const & insertSeq)
+{
+    SEQAN_CHECKPOINT;
+    replace(me, pos, pos, insertSeq, typename DefaultOverflowImplicit<T>::Type());
+}
+
+template <typename T, typename TPosition, typename TSeq>
+inline void
+insert(T const & me,
+       TPosition pos,
+       TSeq const & insertSeq)
+{
+    SEQAN_CHECKPOINT;
+    replace(me, pos, pos, insertSeq, typename DefaultOverflowImplicit<T const>::Type());
+}
+
+// --------------------------------------------------------------------------
+// Function insertValue()
+// --------------------------------------------------------------------------
+
+/**
+.Function.insertValue:
+..cat:Content Manipulation
+..summary:Inserts a single value into a container.
+..signature:insertValue(target, pos, value [, resize_tag])
+..param.target:The container
+..param.pos:Position within $target$ at which $value$ is to be inserted.
+..param.value:Value that will be inserted into $target$.
+..param.resize_tag:Strategy that is applied if $target$ has not enough capacity to store the complete content.
+...type:Tag.Overflow Strategy
+..see:Function.insert
+..see:Function.appendValue
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TPosition, typename TValue>
+inline void
+insertValue(T & me,
+            TPosition pos,
+            TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    insertValue(me, pos, _value, typename DefaultOverflowImplicit<T>::Type());
+}
+
+template <typename T, typename TPosition, typename TValue>
+inline void
+insertValue(T const & me,
+            TPosition pos,
+            TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    insertValue(me, pos, _value, typename DefaultOverflowImplicit<T const>::Type());
+}
+
+// --------------------------------------------------------------------------
+// Function replace()
+// --------------------------------------------------------------------------
+
+/**
+.Function.replace:
+..summary:Replaces a part of a container with another container.
+..cat:Content Manipulation
+..signature:replace(target, pos_begin, pos_end, source [, limit] [,resize_tag])
+..param.target: A container that is modified.
+..param.pos_begin: Begin of replaced area.
+...text:The first position in $target$ of the area that is replaced by $source$.
+..param.pos_end: End of replaced area.
+...text:The position behind the last position in $target$ of the area that is replaced by $source$.
+..param.source: A container that is inserted into $target$.
+...remarks:The function does not modify this container.
+..param.limit: The maximal length of $target$ after the operation. (optional)
+..param.resize_tag: Specifies the strategy that is applied if $target$ has not enough capacity to store the complete content. (optional)
+...type:Tag.Overflow Strategy
+...default:Specified by @Metafunction.DefaultOverflowImplicit@ of the $target$ type.
+..see:Function.assign
+..see:Function.append
+..remarks.text:Some compilers have difficulties if $pos_begin$ and $pos_end$ are both 0, since 0 can be
+both a position or an iterator. The workaround is to convert at least one of these arguments
+explicite to the position or to the interator type.
+..include:seqan/sequence.h
+*/
+template<typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource>
+inline void
+replace(TTarget & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource & source)
+{
+    replace(target, pos_begin, pos_end, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource>
+inline void
+replace(TTarget const & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource & source)
+{
+    replace(target, pos_begin, pos_end, source, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+template<typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource>
+inline void
+replace(TTarget & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource const & source)
+{
+    replace(target, pos_begin, pos_end, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource>
+inline void
+replace(TTarget const & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource const & source)
+{
+    replace(target, pos_begin, pos_end, source, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+template<typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource>
+inline void
+replace(TTarget & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource & source,
+        typename Size<TTarget>::Type limit)
+{
+    replace(target, pos_begin, pos_end, source, limit, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource>
+inline void
+replace(TTarget const & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource & source,
+        typename Size<TTarget>::Type limit)
+{
+    replace(target, pos_begin, pos_end, source, limit, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+template<typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource>
+inline void
+replace(TTarget & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource const & source,
+        typename Size<TTarget>::Type limit)
+{
+    replace(target, pos_begin, pos_end, source, limit, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template<typename TTarget, typename TPositionBegin, typename TPositionEnd, typename TSource>
+inline void
+replace(TTarget const & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource const & source,
+        typename Size<TTarget>::Type limit)
+{
+    replace(target, pos_begin, pos_end, source, limit, typename DefaultOverflowImplicit<TTarget const>::Type());
+}
+
+
+// --------------------------------------------------------------------------
+// Function _capacityReturned()
+// --------------------------------------------------------------------------
+
+template <typename T, typename TSize, typename TExpand>
+inline typename Size<T>::Type
+_capacityReturned(
+    T & me,
+    TSize,
+    Tag<TExpand> const)
+{
+    return capacity(me);
+}
+
+template <typename T, typename TSize>
+inline typename Size<T>::Type
+_capacityReturned(
+    T &,
+    TSize new_capacity,
+    Insist)
+{
+    return new_capacity;
+}
+
+// --------------------------------------------------------------------------
+// Function reserve()
+// --------------------------------------------------------------------------
+
+/**
+.Function.reserve:
+..cat:Containers
+..summary:Increases the capacity.
+..signature:Size reserve(object, new_capacity [, resize_tag])
+..param.object: A container.
+..param.new_capacity: The new capacity $object$ will get.
+..param.resize_tag: Specifies the strategy that is applied for changing the capacity. (optional)
+...type:Tag.Overflow Strategy
+...default:Specified by @Metafunction.DefaultOverflowExplicit at .
+..returns:The ammout of the requested capacity that was available.
+That is the function returns the minimum of $new_capacity$ and $capacity(me)$.
+...metafunction:Metafunction.Size
+..remarks:At the end of the operation, $capacity(me)$ can be larger than $new_capacity$.
+If $new_capacity$ is smaller than $capacity(me)$ at the beginning of the operation,
+the operation need not to change the capacity at all.
+..remarks:This operation does not changes the content of $object$.
+...note:This operation may invalidate iterators of $object$.
+..see:Function.capacity
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TSize, typename TExpand>
+inline typename Size<T>::Type
+reserve(
+    T & me,
+    TSize new_capacity,
+    Tag<TExpand> const tag)
+{
+    SEQAN_CHECKPOINT;
+    return _capacityReturned(me, new_capacity, tag);
+}
+
+template <typename T, typename TSize>
+inline typename Size<T>::Type
+reserve(
+    T & me,
+    TSize new_capacity)
+{
+    SEQAN_CHECKPOINT;
+    return reserve(me, new_capacity, typename DefaultOverflowExplicit<T>::Type());
+}
+
+// --------------------------------------------------------------------------
+// Function resize()
+// --------------------------------------------------------------------------
+
+/**
+.Function.resize:
+..cat:Containers
+..summary:Resizes a container. If the new length exceeds the old length the new elements are filled with copies of $value$.
+..signature:Size resize(object, newLength [value], [resizeTag])
+..param.object: A container.
+...type:Class.String
+..param.newLength: The new length $object$ will get.
+..param.value: Value that is copied if new items are created in $object$.
+...remarks:If the $value$ argument is omitted, the items are not initialized.
+..param.resizeTag: Specifies the strategy that is applied if the capacity of $object$ is less than $newLength$. (optional)
+...type:Tag.Overflow Strategy
+...default:Specified by @Metafunction.DefaultOverflowExplicit at .
+..returns:The new length $length(object)$.
+...metafunction:Metafunction.Size
+..remarks:This function can be used both for expanding and for shrinking $object$.
+..see:Function.length
+..see:Function.reserve
+..include:seqan/sequence.h
+*/
+template <typename T, typename TSize>
+inline typename Size<T>::Type
+resize(
+    T & me,
+    TSize new_length)
+{
+    SEQAN_CHECKPOINT;
+    return resize(me, new_length, typename DefaultOverflowExplicit<T>::Type());
+}
+
+template <typename T, typename TSize, typename TValue>
+inline typename Size<T>::Type
+resize(
+    T & me,
+    TSize new_length,
+    TValue const & val)
+{
+    SEQAN_CHECKPOINT;
+    return resize(me, new_length, val, typename DefaultOverflowExplicit<T>::Type());
+}
+
+// --------------------------------------------------------------------------
+// Function resizeSpace()
+// --------------------------------------------------------------------------
+
+/**
+.Function.resizeSpace:
+..cat:Containers
+..summary:Makes free space in container
+..signature:Size resizeSpace(object, size, pos_begin, pos_end [, limit] [, resize_tag])
+..param.object:The container.
+...type:Class.String
+..param.size:Number of characters that should be freed.
+..param.pos_begin:Position of the first item in $object$ that is to be destroyed.
+..param.pos_end:Position behind the last item in $object$ that is to be destroyed.
+...remarks:If $pos_end == pos_begin$, no item in $object$ will be destroyed.
+..param.limit:Maximal length $object$ can get after this operation. (optional)
+..param.resize_tag:Strategy that is applied if $object$ has not enough capacity to store the complete content. (optional)
+...metafunction:Metafunction.DefaultOverflowExplicit
+..returns:The number of free characters.
+...metafunction:Metafunction.Size
+...remarks:Depeding on the @Tag.Overflow Strategy.overflow strategy@ specified by $resize_tag$,
+this could be $size$ or less than $size$ if $object$ has not enough @Function.capacity at .
+..include:seqan/sequence.h
+*/
+
+template<typename T, typename TSize, typename TBeginPosition, typename TEndPosition>
+inline TSize
+resizeSpace(T & me,
+            TSize size,
+            TBeginPosition pos_begin,
+            TEndPosition pos_end)
+{
+    SEQAN_CHECKPOINT;
+    return resizeSpace(me, size, pos_begin, pos_end, typename DefaultOverflowExplicit<T>::Type());
+}
+
+template<typename T, typename TSize, typename TBeginPosition, typename TEndPosition, typename TLimit>
+inline TSize
+resizeSpace(T & me,
+            TSize size,
+            TBeginPosition pos_begin,
+            TEndPosition pos_end,
+            TLimit limit)
+{
+    SEQAN_CHECKPOINT;
+    return resizeSpace(me, size, pos_begin, pos_end, limit, typename DefaultOverflowExplicit<T>::Type());
+}
+
+// --------------------------------------------------------------------------
+// Function erase()
+// --------------------------------------------------------------------------
+
+/**
+.Function.erase:
+..summary:Erases a part of a container
+..cat:Containers
+..signature:erase(object, pos [, pos_end])
+..param.object:The container.
+...type:Class.String
+..param.pos:Position of the first item in $object$ that is to be destroyed.
+..param.pos_end:Position behind the last item in $object$ that is to be destroyed. (optional)
+...default:$pos + 1$
+...remarks:If $pos_end$ is omitted, only one element in $object$ at position $pos$ is destroyed.
+..remarks:$erase(object, pos, pos_end)$ is semantically the same as @Function.resizeSpace.resizeSpace(object, 0, pos, pos_end)@.
+..see:Function.eraseBack
+..include:seqan/sequence.h
+*/
+
+template<typename T, typename TBeginPosition, typename TEndPosition>
+inline void
+erase(T & me,
+      TBeginPosition pos,
+      TEndPosition pos_end)
+{
+    SEQAN_CHECKPOINT;
+    resizeSpace(me, 0, pos, pos_end);
+}
+
+// for segments
+template<typename T, typename TBeginPosition, typename TEndPosition>
+inline void
+erase(T const & me,
+      TBeginPosition pos,
+      TEndPosition pos_end)
+{
+    SEQAN_CHECKPOINT;
+    resizeSpace(me, 0, pos, pos_end);
+}
+
+template<typename T, typename TPosition>
+inline void
+erase(T & me,
+      TPosition pos)
+{
+    SEQAN_CHECKPOINT;
+    resizeSpace(me, 0, pos, pos + 1);
+}
+
+template<typename T, typename TPosition>
+inline void
+erase(T const & me,
+      TPosition pos)
+{
+    SEQAN_CHECKPOINT;
+    resizeSpace(me, 0, pos, pos + 1);
+}
+
+// --------------------------------------------------------------------------
+// Function eraseBack()
+// --------------------------------------------------------------------------
+
+/**
+.Function.eraseBack:
+..summary:Deletes the last item of a container and reduces its size by 1.  The container must have a size greater than or equal to 1.
+..cat:Containers
+..signature:eraseBack(object)
+..param.object:The container.
+...type:Class.String
+..remarks:$erase(object)$ is semantically the same as @Function.erase.erase(me, length(me) - 1)@.
+..see:Function.erase
+..include:seqan/sequence.h
+*/
+
+template <typename T>
+inline void eraseBack(T & me)
+{
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_GT_MSG(length(me), 0u, "Must erase more than 0 characters in eraseBack()!");
+    erase(me, length(me) - 1);
+}
+
+// --------------------------------------------------------------------------
+// Function shrinkToFit()
+// --------------------------------------------------------------------------
+
+/**
+.Function.shrinkToFit:
+..cat:Containers
+..summary:Resizes container to minimum capacity
+..signature:shrinkToFit(object)
+..param.object: A container.
+..remarks
+...text:$shrinkToFit(object)$ is equivalent to $reserve(object, length(object), Exact())$.
+..see:Function.capacity
+..see:Function.length
+..see:Function.reserve
+..include:seqan/sequence.h
+*/
+
+template <typename T, typename TSize, typename TValue>
+inline void
+shrinkToFit(T & me)
+{
+    SEQAN_CHECKPOINT;
+    reserve(me, length(me), Exact());
+}
+
+} // namespace seqan
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/sequence_lexical.h b/src/SeqAn-1.3/seqan/sequence/sequence_lexical.h
new file mode 100644
index 0000000..5caeb4a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/sequence_lexical.h
@@ -0,0 +1,833 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Implementation of efficient lexical sequence comparison.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_LEXICAL_H
+#define SEQAN_HEADER_LEXICAL_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+//////////////////////////////////////////////////////////////////////////////
+// Switches for prefix ordering mode
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.Prefix Order:
+..summary:Specify whether less-than or greather-than comparison is meant.
+..tag.TagPrefixLess:A prefix is smaller.
+...text:For example: $"abc" < "abcde"$.
+..tag.TagPrefixGreater:A prefix is greater.
+...text:For example: $"abc" > "abcde"$.
+..remarks:The default for all comparison functions is $TagPrefixLess$.
+..include:seqan/sequence.h
+*/
+struct TagPrefixLess_ {};
+typedef Tag<TagPrefixLess_> const TagPrefixLess;
+
+struct TagPrefixGreater_ {};
+typedef Tag<TagPrefixGreater_> const TagPrefixGreater;
+
+
+/**
+.Metafunction.DefaultPrefixOrder:
+..hidefromindex
+..summary:The default prefix order.
+..signature:DefaultPrefixOrder<T>::Type
+..param.T:Type for which the prefix order is determined.
+..returns.param.Type:Prefix order tag for type of $T$.
+..see:Tag.Prefix Order
+..include:seqan/sequence.h
+*/
+template <typename T>
+struct DefaultPrefixOrder
+{
+	typedef TagPrefixLess Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Lexical
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.Lexical:
+..cat:Basic
+..summary:Comparator for lexical comparison.
+..signature:Lexical<TSpec>
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...text:This type can be used for specializations of $Lexical$.
+...remarks:$TSpec$ is by default interpreted as size-type.
+...default:$size_t$
+..remarks:
+...text:This class implement comparator objects that perform (lexical) comparisons between two sequences.
+The result of the comparison is stored in the data members of the instance an can be
+accessed by some functions, for example @Function.isLess@ or @Function.isEqual at .
+...text:In most cases, there is no need for an explicite use of comparators,
+but sometimes this concept provide the opportunity to speed up the code.
+..example:
+...text:This program compares the strings $str1$ and $str2$:
+...code:if (isLess(str1, str2)) //first comparison
+{
+	//str1 < str2
+}
+else if (isGreater(str1, str2)) //second comparison
+{
+	//str1 > str2
+}
+else
+{
+	//str == str2
+}
+...text:Using a comparator, the same program only needs one comparison instead of two:
+...code:Lexical <> comparator(str1, str2); //comparison is executed here
+if (isLess(comparator))
+{
+	//str1 < str2
+}
+else if (lexGreater(comparator))
+{
+	//str1 > str2
+}
+else
+{
+	//str == str2
+}
+...text:The state of a default constructed $Lexical$ instance is undefined until
+it is set by a call of @Function.compare at .
+..see:Metafunction.Comparator
+..include:seqan/sequence.h
+*/
+
+template <typename TSpec = size_t>
+struct Lexical
+{
+public:
+	typename Size<Lexical>::Type data_lcp;
+	char data_compare;
+
+public:
+	Lexical()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	template <typename TLeft, typename TRight>
+	Lexical(TLeft const & left, TRight const & right)
+	{
+SEQAN_CHECKPOINT
+		compare(*this, left, right);
+	}
+
+	Lexical(Lexical const & other):
+		data_lcp(other.data_lcp),
+		data_compare(other.data_compare)
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Lexical & operator=(Lexical const & other)
+	{
+SEQAN_CHECKPOINT
+		data_compare = other.data_compare;
+		data_lcp = other.data_lcp;
+		return *this;
+	}
+
+	~Lexical() {}
+//____________________________________________________________________________
+
+	enum
+	{
+		EQUAL = 1,
+		LESS = 2,
+		GREATER = 4,
+		LEFT_IS_PREFIX = 8,
+		RIGHT_IS_PREFIX = 16
+	};
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Metafunctions
+//////////////////////////////////////////////////////////////////////////////
+// Comparator: returns object that can compare objects of type T
+
+/**
+.Metafunction.Comparator:
+..summary:Type of comparator object
+..signature:Comparator<T>::Type
+..param.T:Type for which the comparator type is to be determined.
+..returns.param.Type:Comparator type
+..remarks:Comparators are objects that can be used to compare other objects and store the
+result of comparisons.
+..include:seqan/sequence.h
+*/
+template <typename T>
+struct Comparator
+{
+	typedef Lexical<typename Size<T>::Type> Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Size
+
+template <typename TSpec>
+struct Size<Lexical<TSpec> >
+{
+	typedef TSpec Type;
+};
+
+template <typename TSpec>
+struct Size<Lexical<TSpec> const>
+{
+	typedef TSpec Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Spec
+
+template <typename TSpec>
+struct Spec<Lexical<TSpec> >
+{
+	typedef TSpec Type;
+};
+
+template <typename TSpec>
+struct Spec<Lexical<TSpec> const>
+{
+	typedef TSpec Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// compare
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.compare:
+..cat:Comparisons
+..summary:Compares two objects.
+..signature:compare(comparator, left, right)
+..param.left:The first objects.
+..param.right:The second objects that is compared to $left$.
+..param.comparator:Object that stores the results.
+...type:Class.Lexical
+..see:Metafunction.Comparator
+..include:seqan/sequence.h
+*/
+
+template <typename TSpec, typename TLeft, typename TRight>
+inline void
+compare_(Lexical<TSpec> & lexical,
+		 TLeft & left,
+		 TRight & right)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<TLeft>::Type TLeftValue;
+	typedef typename Value<TRight>::Type TRightValue;
+
+	typename Iterator<TLeft, Standard>::Type left_it = begin(left, Standard());
+	typename Size<TLeft>::Type left_length = length(left);
+	typename Iterator<TRight, Standard>::Type right_it = begin(right, Standard());
+	typename Size<TRight>::Type right_length = length(right);
+
+	if (left_length == right_length) lexical.data_compare = Lexical<TSpec>::EQUAL;
+	else if (left_length < right_length) lexical.data_compare = Lexical<TSpec>::LEFT_IS_PREFIX;
+	else
+	{
+		lexical.data_compare = Lexical<TSpec>::RIGHT_IS_PREFIX;
+		left_length = right_length;
+	}
+
+	lexical.data_lcp = 0;
+	for (lexical.data_lcp = 0; lexical.data_lcp < left_length; ++lexical.data_lcp)
+	{
+		if (*left_it < *right_it)
+		{
+			lexical.data_compare = Lexical<TSpec>::LESS;
+			break;
+		}
+		if (*left_it > *right_it)
+		{
+			lexical.data_compare = Lexical<TSpec>::GREATER;
+			break;
+		}
+		++left_it;
+		++right_it;
+	}
+}
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec, typename TLeft, typename TRight>
+inline void
+compare(Lexical<TSpec> & lexical,
+		TLeft const & left,
+		TRight const & right)
+{
+	compare_(lexical, left, right);
+}
+
+// TODO(holtgrew): Are these bugs present in currently supported VC++ versions or is this only a legacy issue?
+//workaround for VC++ "const arrays" bug
+template <typename TSpec, typename TLeftValue, typename TRight>
+inline void
+compare(Lexical<TSpec> & lexical,
+		TLeftValue const * left,
+		TRight const & right)
+{
+	compare_(lexical, left, right);
+}
+template <typename TSpec, typename TLeftValue, typename TRightValue>
+inline void
+compare(Lexical<TSpec> & lexical,
+		TLeftValue const * left,
+		TRightValue const * right)
+{
+	compare_(lexical, left, right);
+}
+template <typename TSpec, typename TLeft, typename TRightValue>
+inline void
+compare(Lexical<TSpec> & lexical,
+		TLeft const & left,
+		TRightValue const * right)
+{
+	compare_(lexical, left, right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// isEqual
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isEqual:
+..cat:Comparisons
+..summary:Operator "==".
+..signature:isEqual(left, right)
+..signature:isEqual(comparator)
+..param.left:The first parameter.
+..param.right:The second parameter that is compared to $left$.
+..param.comparator:A comparator.
+...type:Class.Lexical
+..returns:$true$ if $left$ equals $right$, $false$ otherwise.
+..see:Metafunction.Comparator
+..include:seqan/sequence.h
+*/
+template <typename TLeft, typename TRight >
+inline bool
+isEqual(TLeft const & left,
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return left == right;
+}
+
+template <typename TSpec>
+inline bool
+isEqual(Lexical<TSpec> const & _lex)
+{
+SEQAN_CHECKPOINT
+	return (_lex.data_compare & Lexical<TSpec>::EQUAL);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// isNotEqual
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isNotEqual:
+..cat:Comparisons
+..summary:Operator "!=".
+..signature:isNotEqual(left, right)
+..signature:isNotEqual(comparator)
+..param.left:The first parameter.
+..param.right:The second parameter that is compared to $left$.
+..param.comparator:A comparator.
+...type:Class.Lexical
+..returns:$true$ if $left$ is not equal to $right$, $false$ otherwise.
+..see:Metafunction.Comparator
+..include:seqan/sequence.h
+*/
+template <typename TLeft, typename TRight >
+inline bool
+isNotEqual(TLeft const & left,
+		 TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return left != right;
+}
+
+template <typename TSpec>
+inline bool
+isNotEqual(Lexical<TSpec> const & _lex)
+{
+SEQAN_CHECKPOINT
+	return !(_lex.data_compare & Lexical<TSpec>::EQUAL);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// isLess
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isLess:
+..cat:Comparisons
+..summary:Operator "<".
+..signature:isLess(left, right [, prefix_order_tag])
+..signature:isLess(comparator)
+..param.left:The first parameter.
+..param.right:The second parameter that is compared to $left$.
+..param.prefix_order_tag:Tag that specify whether prefixes are less or greater. (optional)
+...text:If omitted, the default tag is determined by @Metafunction.DefaultPrefixOrder@ for the type of $left$.
+...see:Tag.Prefix Order
+..param.comparator:A comparator.
+...type:Class.Lexical
+..returns:$true$ if $left$ is less than $right$, $false$ otherwise.
+..see:Metafunction.Comparator
+..remarks:
+...text:Sequences are compared in lexicographical order.
+..see:Tag.Prefix Order
+..see:Metafunction.DefaultPrefixOrder
+..include:seqan/sequence.h
+*/
+template <typename TLeft, typename TRight, typename TPrefixOrder >
+inline bool
+isLess(TLeft const & left,
+	   TRight const & right,
+	   Tag<TPrefixOrder> const tag)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<TLeft>::Type _lex(left, right);
+    return isLess(_lex, tag);
+}
+template <typename TLeft, typename TRight>
+inline bool
+isLess(TLeft const & left,
+	   TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return left < right;
+}
+
+template <typename TSpec>
+inline bool
+isLess(Lexical<TSpec> const & _lex,
+	   TagPrefixLess)
+{
+SEQAN_CHECKPOINT
+   return (_lex.data_compare & (Lexical<TSpec>::LESS | Lexical<TSpec>::LEFT_IS_PREFIX)) != 0;
+}
+template <typename TSpec>
+inline bool
+isLess(Lexical<TSpec> const & _lex,
+	   TagPrefixGreater)
+{
+SEQAN_CHECKPOINT
+   return (_lex.data_compare & (Lexical<TSpec>::LESS | Lexical<TSpec>::RIGHT_IS_PREFIX)) != 0;
+}
+template <typename TSpec>
+inline bool
+isLess(Lexical<TSpec> const & _lex)
+{
+SEQAN_CHECKPOINT
+	return isLess(_lex, typename DefaultPrefixOrder< Lexical<TSpec> >::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// isLessOrEqual
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isLessOrEqual:
+..cat:Comparisons
+..summary:Operator "<=".
+..signature:isLessOrEqual(left, right [, prefix_order_tag])
+..signature:isLessOrEqual(comparator)
+..param.left:The first parameter.
+..param.right:The second parameter that is compared to $left$.
+..param.prefix_order_tag:Tag that specify whether prefixes are less or greater. (optional)
+...text:If omitted, the default tag is determined by @Metafunction.DefaultPrefixOrder@ for the type of $left$.
+...see:Tag.Prefix Order
+..param.comparator:A comparator.
+...type:Class.Lexical
+..returns:$true$ if $left$ is less than or equal to $right$, $false$ otherwise.
+..see:Metafunction.Comparator
+..remarks:
+...text:Sequences are compared in lexicographical order.
+..see:Tag.Prefix Order
+..see:Metafunction.DefaultPrefixOrder
+..include:seqan/sequence.h
+*/
+
+template <typename TLeft, typename TRight, typename TPrefixOrder >
+inline bool
+isLessOrEqual(TLeft const & left,
+		TRight const & right,
+		Tag<TPrefixOrder> const tag)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<TLeft>::Type _lex(left, right);
+    return isLessOrEqual(_lex, tag);
+}
+template <typename TLeft, typename TRight>
+inline bool
+isLessOrEqual(TLeft const & left,
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return left <= right;
+}
+
+template <typename TSpec>
+inline bool
+isLessOrEqual(Lexical<TSpec> const & _lex,
+		TagPrefixLess)
+{
+SEQAN_CHECKPOINT
+   return (_lex.data_compare & (Lexical<TSpec>::LESS | Lexical<TSpec>::EQUAL | Lexical<TSpec>::LEFT_IS_PREFIX)) != 0;
+}
+template <typename TSpec>
+inline bool
+isLessOrEqual(Lexical<TSpec> const & _lex,
+		TagPrefixGreater)
+{
+SEQAN_CHECKPOINT
+   return (_lex.data_compare & (Lexical<TSpec>::LESS | Lexical<TSpec>::EQUAL | Lexical<TSpec>::RIGHT_IS_PREFIX)) != 0;
+}
+template <typename TSpec>
+inline bool
+isLessOrEqual(Lexical<TSpec> const & _lex)
+{
+SEQAN_CHECKPOINT
+	return isLessOrEqual(_lex, typename DefaultPrefixOrder< Lexical<TSpec> >::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// isGreater
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isGreater:
+..cat:Comparisons
+..summary:Operator ">".
+..signature:isGreater(left, right [, prefix_order_tag])
+..signature:isGreater(comparator)
+..param.left:The first parameter.
+..param.right:The second parameter that is compared to $left$.
+..param.prefix_order_tag:Tag that specify whether prefixes are less or greater. (optional)
+...text:If omitted, the default tag is determined by @Metafunction.DefaultPrefixOrder@ for the type of $left$.
+...see:Tag.Prefix Order
+..param.comparator:A comparator.
+...type:Class.Lexical
+..returns:$true$ if $left$ is greater than $right$, $false$ otherwise.
+..see:Metafunction.Comparator
+..remarks:
+...text:Sequences are compared in lexicographical order.
+..see:Tag.Prefix Order
+..see:Metafunction.DefaultPrefixOrder
+..include:seqan/sequence.h
+*/
+template <typename TLeft, typename TRight, typename TPrefixOrder >
+inline bool
+isGreater(TLeft const & left,
+		TRight const & right,
+		Tag<TPrefixOrder> const tag)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<TLeft>::Type _lex(left, right);
+    return isGreater(_lex, tag);
+}
+template <typename TLeft, typename TRight>
+inline bool
+isGreater(TLeft const & left,
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return left > right;
+}
+
+template <typename TSpec>
+inline bool
+isGreater(Lexical<TSpec> const & _lex,
+		TagPrefixLess)
+{
+SEQAN_CHECKPOINT
+   return (_lex.data_compare & (Lexical<TSpec>::GREATER | Lexical<TSpec>::RIGHT_IS_PREFIX)) != 0;
+}
+template <typename TSpec>
+inline bool
+isGreater(Lexical<TSpec> const & _lex,
+		TagPrefixGreater)
+{
+SEQAN_CHECKPOINT
+   return (_lex.data_compare & (Lexical<TSpec>::GREATER | Lexical<TSpec>::LEFT_IS_PREFIX)) != 0;
+}
+template <typename TSpec>
+inline bool
+isGreater(Lexical<TSpec> const & _lex)
+{
+SEQAN_CHECKPOINT
+	return isGreater(_lex, typename DefaultPrefixOrder< Lexical<TSpec> >::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// isGreaterOrEqual
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isGreaterOrEqual:
+..cat:Comparisons
+..summary:Operator ">=".
+..signature:isGreaterOrEqual(left, right [, prefix_order_tag])
+..signature:isGreaterOrEqual(comparator)
+..param.left:The first parameter.
+..param.right:The second parameter that is compared to $left$.
+..param.prefix_order_tag:Tag that specify whether prefixes are less or greater. (optional)
+...text:If omitted, the default tag is determined by @Metafunction.DefaultPrefixOrder@ for the type of $left$.
+...see:Tag.Prefix Order
+..param.comparator:A comparator.
+...type:Class.Lexical
+..returns:$true$ if $left$ is greater than or equal to $right$, $false$ otherwise.
+..see:Metafunction.Comparator
+..remarks:
+...text:Sequences are compared in lexicographical order.
+..see:Tag.Prefix Order
+..see:Metafunction.DefaultPrefixOrder
+..include:seqan/sequence.h
+*/
+
+template <typename TLeft, typename TRight, typename TPrefixOrder >
+inline bool
+isGreaterOrEqual(TLeft const & left,
+		TRight const & right,
+		Tag<TPrefixOrder> const tag)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<TLeft>::Type _lex(left, right);
+    return isGreaterOrEqual(_lex, tag);
+}
+template <typename TLeft, typename TRight>
+inline bool
+isGreaterOrEqual(TLeft const & left,
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	return left >= right;
+}
+
+template <typename TSpec>
+inline bool
+isGreaterOrEqual(Lexical<TSpec> const & _lex,
+		TagPrefixLess)
+{
+SEQAN_CHECKPOINT
+   return (_lex.data_compare & (Lexical<TSpec>::GREATER | Lexical<TSpec>::EQUAL | Lexical<TSpec>::RIGHT_IS_PREFIX)) != 0;
+}
+template <typename TSpec>
+inline bool
+isGreaterOrEqual(Lexical<TSpec> const & _lex,
+		TagPrefixGreater)
+{
+SEQAN_CHECKPOINT
+   return (_lex.data_compare & (Lexical<TSpec>::GREATER | Lexical<TSpec>::EQUAL | Lexical<TSpec>::LEFT_IS_PREFIX)) != 0;
+}
+template <typename TSpec>
+inline bool
+isGreaterOrEqual(Lexical<TSpec> const & _lex)
+{
+SEQAN_CHECKPOINT
+	return isGreaterOrEqual(_lex, typename DefaultPrefixOrder< Lexical<TSpec> >::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// isPrefix
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.isPrefix:
+..cat:Comparisons
+..summary:Test whether a sequence is prefix of another sequence.
+..signature:isPrefix(left, right)
+..signature:isPrefix(comparator)
+..param.left:The first sequence, the putative prefix.
+..param.right:The second sequence.
+..param.comparator:A comparator.
+...type:Class.Lexical
+..returns:$true$ if $left$ is a prefix of $right$, $false$ otherwise.
+..see:Metafunction.Comparator
+..remarks:By definition, the whole sequence is a prefix of itself too: $isPrefix("abc", "abc") == true$.
+..include:seqan/sequence.h
+*/
+
+template <typename TLeft, typename TRight >
+inline bool
+isPrefix(TLeft const & left,
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<TLeft>::Type _lex(left, right);
+    return isPrefix(_lex);
+}
+template <typename TSpec>
+inline bool
+isPrefix(Lexical<TSpec> const & _lex)
+{
+SEQAN_CHECKPOINT
+    return (_lex.data_compare & (Lexical<TSpec>::LEFT_IS_PREFIX | Lexical<TSpec>::EQUAL)) != 0;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// hasPrefix
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.hasPrefix:
+..cat:Comparisons
+..summary:Test whether a sequence is prefix of another sequence.
+..signature:hasPrefix(left, right)
+..signature:hasPrefix(comparator)
+..param.left:The first sequence.
+..param.right:The second sequence, the putative prefix.
+..param.comparator:A comparator.
+...type:Class.Lexical
+..returns:$true$ if $right$ is a prefix of $left$, $false$ otherwise.
+..see:Metafunction.Comparator
+..see:Function.isPrefix
+..remarks:By definition, the whole sequence is a prefix of itself too: $hasPrefix("abc", "abc") == true$.
+..include:seqan/sequence.h
+*/
+
+template <typename TLeft, typename TRight >
+inline bool
+hasPrefix(TLeft const & left,
+		TRight const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<TLeft>::Type _lex(left, right);
+    return hasPrefix(_lex);
+}
+template <typename TSpec>
+inline bool
+hasPrefix(Lexical<TSpec> const & _lex)
+{
+SEQAN_CHECKPOINT
+    return (_lex.data_compare & (Lexical<TSpec>::RIGHT_IS_PREFIX | Lexical<TSpec>::EQUAL)) != 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// lcpLength
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.lcpLength:
+..summary:Length of longest common prefix.
+..cat:Comparisons
+..signature:lcpLength(left, right)
+..signature:lcpLength(comparator)
+..param.left:The first sequence.
+..param.right:The second sequence that is compared to $left$.
+..param.comparator:A comparator.
+...type:Class.Lexical
+..returns:The length of the longest common prefix of $left$ and $right$.
+..see:Metafunction.Comparator
+..include:seqan/sequence.h
+*/
+template <typename TLeft, typename TRight >
+inline typename Size<TLeft>::Type
+lcpLength(TLeft const & left, TRight const & right)
+{
+SEQAN_CHECKPOINT
+	typename Comparator<TLeft>::Type _lex(left, right);
+    return lcpLength(_lex);
+}
+
+template <typename TSpec>
+inline typename Size< Lexical<TSpec> >::Type
+lcpLength(Lexical<TSpec> const & _lex)
+{
+SEQAN_CHECKPOINT
+    return _lex.data_lcp;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// ordValue
+//////////////////////////////////////////////////////////////////////////////
+
+// TODO(holtgrew): Why is this the place for the definition of ordValue? Should this not go into the alphabet interface header? #838
+
+/**
+.Function.ordValue:
+..summary:Maps an alphabet 1-to-1 to the interval [0..ValueSize).
+..cat:Alphabets
+..signature:ordValue(value)
+..param.value:Arbitrary character value.
+...type:Class.SimpleType
+..returns:An $unsigned int$ between 0 and @Metafunction.ValueSize@ of the type of value.
+..note:This function first converts value to its unsigned value type and after that to an $unsigned int$.
+You can't use $(unsigned int)c$ for a character $c$ as on some systems $char$ is signed and a $-1$ would be mapped to $0xffffffff$ instead of $0x000000ff$.
+..include:seqan/sequence.h
+*/
+
+template <typename TValue>
+inline unsigned ordValue(TValue const & c)
+{
+	return static_cast<typename MakeUnsigned_<TValue>::Type const &>(c);
+}
+
+template <typename TValue, typename TSpec>
+inline unsigned ordValue(SimpleType<TValue, TSpec> const & c)
+{
+	return c;
+}
+
+template <typename TValue>
+inline unsigned _internalOrdValue(TValue const & c)
+{
+	return ordValue(c);
+}
+
+template <typename TValue, typename TSpec>
+inline unsigned _internalOrdValue(SimpleType<TValue, TSpec> const & c)
+{
+	return c.value;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/sequence_shortcuts.h b/src/SeqAn-1.3/seqan/sequence/sequence_shortcuts.h
new file mode 100644
index 0000000..1d4e6c7
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/sequence_shortcuts.h
@@ -0,0 +1,271 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Shortcuts for certain often-used string types.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_SHORTCUTS_H
+#define SEQAN_HEADER_SEQUENCE_SHORTCUTS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Shortcut.CharString:
+..cat:Strings
+..summary:A string of $char$.
+..signature:CharString
+..shortcutfor:Spec.Alloc String
+...signature:String<char, Alloc<> >
+*/
+
+typedef String<char, Alloc<void> > CharString;
+
+//____________________________________________________________________________
+
+/**
+.Shortcut.CharIterator:
+..cat:Iterators
+..summary:Iterator for @Shortcut.CharString at .
+..signature:CharIterator
+..shortcutfor:Concept.Rooted Iterator
+...signature:Iterator<CharString, Rooted>::Type
+..see:Shortcut.CharString
+*/
+
+typedef Iterator<CharString, Rooted>::Type CharIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Shortcut.UnicodeString:
+..cat:Strings
+..summary:A string of $wchar_t$.
+..signature:UnicodeString
+..shortcutfor:Spec.Alloc String
+...signature:String<wchar_t, Alloc<> >
+*/
+
+typedef String<wchar_t, Alloc<void> > UnicodeString;
+
+//____________________________________________________________________________
+
+/**
+.Shortcut.UnicodeIterator:
+..cat:Iterators
+..summary:Iterator for @Shortcut.UnicodeString at .
+..signature:UnicodeIterator
+..shortcutfor:Concept.Rooted Iterator
+...signature:Iterator<UnicodeString, Rooted>::Type
+..see:Shortcut.UnicodeString
+*/
+
+typedef Iterator<UnicodeString, Rooted>::Type UnicodeIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Shortcut.DnaString:
+..cat:Strings
+..summary:A string of @Spec.Dna at .
+..signature:DnaString
+..shortcutfor:Spec.Alloc String
+...signature:String<Dna, Alloc<> >
+..see:Spec.Dna
+*/
+
+typedef String<Dna, Alloc<void> > DnaString;
+
+//____________________________________________________________________________
+
+/**
+.Shortcut.DnaIterator:
+..cat:Iterators
+..summary:Iterator for @Shortcut.DnaString at .
+..signature:DnaIterator
+..shortcutfor:Concept.Rooted Iterator
+...signature:Iterator<DnaString, Rooted>::Type
+..see:Spec.Dna
+..see:Shortcut.DnaString
+*/
+
+typedef Iterator<DnaString, Rooted>::Type DnaIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Shortcut.Dna5String:
+..cat:Strings
+..summary:A string of @Spec.Dna5 at .
+..signature:Dna5String
+..shortcutfor:Spec.Alloc String
+...signature:String<Dna5, Alloc<> >
+..see:Spec.Dna5
+..see:Shortcut.DnaString
+*/
+
+typedef String<Dna5, Alloc<void> > Dna5String;
+
+//____________________________________________________________________________
+
+/**
+.Shortcut.Dna5Iterator:
+..cat:Iterators
+..summary:Iterator for @Shortcut.Dna5String at .
+..signature:Dna5Iterator
+..shortcutfor:Concept.Rooted Iterator
+...signature:Iterator<Dna5String, Rooted>::Type
+..see:Spec.Dna5
+..see:Shortcut.Dna5String
+..see:Shortcut.DnaIterator
+*/
+
+typedef Iterator<Dna5String, Rooted>::Type Dna5Iterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Shortcut.RnaString:
+..cat:Strings
+..summary:A string of @Spec.Rna at .
+..signature:RnaString
+..shortcutfor:Spec.Alloc String
+...signature:String<Rna, Alloc<> >
+..see:Spec.Rna
+*/
+
+typedef String<Rna, Alloc<void> > RnaString;
+
+//____________________________________________________________________________
+
+/**
+.Shortcut.RnaIterator:
+..cat:Iterators
+..summary:Iterator for @Shortcut.RnaString at .
+..signature:RnaIterator
+..shortcutfor:Concept.Rooted Iterator
+...signature:Iterator<RnaString, Rooted>::Type
+..see:Spec.Rna
+..see:Shortcut.RnaString
+*/
+
+typedef Iterator<RnaString, Rooted>::Type RnaIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Shortcut.Rna5String:
+..cat:Strings
+..summary:A string of @Spec.Rna5 at .
+..signature:Rna5String
+..shortcutfor:Spec.Alloc String
+...signature:String<Rna5, Alloc<> >
+..see:Spec.Rna5
+..see:Shortcut.RnaString
+*/
+
+typedef String<Rna5, Alloc<void> > Rna5String;
+
+//____________________________________________________________________________
+
+/**
+.Shortcut.Rna5Iterator:
+..cat:Iterators
+..summary:Iterator for @Shortcut.Rna5String at .
+..signature:Rna5Iterator
+..shortcutfor:Concept.Rooted Iterator
+...signature:Iterator<Rna5String, Rooted>::Type
+..see:Spec.Rna5
+..see:Shortcut.Rna5String
+..see:Shortcut.RnaIterator
+*/
+
+typedef Iterator<Rna5String, Rooted>::Type Rna5Iterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Shortcut.IupacString:
+..cat:Strings
+..summary:A string of @Spec.Iupac at .
+..signature:IupacString
+..shortcutfor:Spec.Alloc String
+...signature:String<Iupac, Alloc<> >
+..see:Spec.Iupac
+*/
+
+typedef String<Iupac, Alloc<void> > IupacString;
+
+//____________________________________________________________________________
+
+/**
+.Shortcut.IupacIterator:
+..cat:Iterators
+..summary:Iterator for @Shortcut.IupacString at .
+..signature:IupacIterator
+..shortcutfor:Concept.Rooted Iterator
+...signature:Iterator<IupacString, Rooted>::Type
+..see:Spec.Iupac
+..see:Shortcut.IupacString
+*/
+
+typedef Iterator<IupacString, Rooted>::Type IupacIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Shortcut.Peptide:
+..cat:Strings
+..summary:A string of @Spec.AminoAcid at .
+..signature:IupacString
+..shortcutfor:Spec.Alloc String
+...signature:String<AminoAcid, Alloc<> >
+..see:Spec.AminoAcid
+*/
+
+typedef String<AminoAcid, Alloc<void> > Peptide;
+
+//____________________________________________________________________________
+
+/**
+.Shortcut.PeptideIterator:
+..cat:Iterators
+..summary:Iterator for @Shortcut.Peptide at .
+..signature:PeptideIterator
+..shortcutfor:Concept.Rooted Iterator
+...signature:Iterator<Peptide, Rooted>::Type
+..see:Spec.AminoAcid
+..see:Shortcut.Peptide
+*/
+
+typedef Iterator<Peptide, Rooted>::Type PeptideIterator;
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/sequence_stream.h b/src/SeqAn-1.3/seqan/sequence/sequence_stream.h
new file mode 100644
index 0000000..81d50c0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/sequence_stream.h
@@ -0,0 +1,170 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// Code that allows strings to be treated like streams.
+//
+// TODO(holtgrew): This could be called ${module}_adapt_sequence.h, where $module is the name of a future streaming/I/O module.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_STREAM_H
+#define SEQAN_HEADER_SEQUENCE_STREAM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline bool
+_streamEOF(Iter<TContainer, TSpec> const & iter)
+{
+SEQAN_CHECKPOINT
+    return atEnd(iter);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TContainer, typename TSpec>
+inline ::std::streamsize
+_streamRead(TValue * target,
+            Iter<TContainer, TSpec> & source,
+            ::std::streamsize limit)
+{
+SEQAN_CHECKPOINT
+    if (position(target) + limit > length(container(target)))
+        limit = length(container(target)) - position(target);
+    Iter<TContainer, TSpec> sourceEnd = source + limit;
+    for (; source != sourceEnd; ++source, ++target)
+        *target = *source;
+    return limit;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline typename Value<Iter<TContainer, TSpec> >::Type
+_streamGet(Iter<TContainer, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+    typename Value<Iter<TContainer, TSpec> >::Type _val = getValue(source);
+    goNext(source);
+    return _val;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline typename Value<Iter<TContainer, TSpec> >::Type
+_streamPeek(Iter<TContainer, TSpec> & source)
+{
+SEQAN_CHECKPOINT
+    return getValue(source);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec, typename TChar>
+inline void
+_streamPut(Iter<TContainer, TSpec> & target,
+           TChar character)
+{
+SEQAN_CHECKPOINT
+    if (atEnd(target))
+    {
+        typename Container<Iter<TContainer, TSpec> >::Type & container_ = container(target);
+        appendValue(container_, character);
+        target = begin(container_) + (length(container_) - 1);
+    } else
+        *target = character;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline typename Position<Iter<TContainer, TSpec> >::Type
+_streamTellG(Iter<TContainer, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+    return position(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline typename Position<Iter<TContainer, TSpec> >::Type
+_streamTellP(Iter<TContainer, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+    return position(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline void
+_streamSeekG(Iter<TContainer, TSpec> & me,
+     typename Position<Iter<TContainer, TSpec> >::Type pos)
+{
+SEQAN_CHECKPOINT
+    me = begin(container(me)) + pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline void
+_streamSeekP(Iter<TContainer, TSpec> & me,
+     typename Position<Iter<TContainer, TSpec> >::Type pos)
+{
+SEQAN_CHECKPOINT
+    me = begin(container(me)) + pos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename TSpec>
+inline void
+_streamSeek2G(Iter<TContainer, TSpec> & me,
+     int off)
+{
+SEQAN_CHECKPOINT
+    me = begin(container(me)) + (position(me) + off);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/string_alloc.h b/src/SeqAn-1.3/seqan/sequence/string_alloc.h
new file mode 100644
index 0000000..84938dd
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_alloc.h
@@ -0,0 +1,438 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Implementation of the Alloc string class.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_STRING_ALLOC_H
+#define SEQAN_HEADER_SEQUENCE_STRING_ALLOC_H
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// TODO(holtgrew): Where is Alloc<> defined? In module base?
+
+/**
+.Spec.Alloc String:
+..cat:Strings
+..general:Class.String
+..summary:Expandable string that is stored on heap.
+..signature:String<TValue, Alloc<TSpec> >
+..param.TValue:The value type, that is the type of the items/characters stored in the string.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.TSpec:The specializing type.
+...default:$void$
+..include:seqan/sequence.h
+*/
+template <typename TValue>
+class String<TValue, Alloc<void> >
+{
+public:
+    typename Value<String>::Type * data_begin;
+    typename Value<String>::Type * data_end;
+    size_t data_capacity;
+
+    String():
+        data_begin(0),
+        data_end(0),
+        data_capacity(0)
+    {
+        SEQAN_CHECKPOINT;
+        SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
+    }
+
+    template <typename TSource>
+    String(TSource & source):
+        data_begin(0),
+        data_end(0),
+        data_capacity(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+        SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
+    }
+    
+    template <typename TSource>
+    String(TSource const & source):
+        data_begin(0),
+        data_end(0),
+        data_capacity(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+        SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
+    }
+    
+    String(String const & source):
+        data_begin(0),
+        data_end(0),
+        data_capacity(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+        SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
+    }
+    
+    String(String & source, Move const &):
+        data_begin(0),
+        data_end(0),
+        data_capacity(0)
+    {
+        SEQAN_CHECKPOINT;
+        move(*this, source);
+        SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
+    }
+    
+    template <typename TSource, typename TSize>
+    String(TSource & source, TSize limit):
+        data_begin(0),
+        data_end(0),
+        data_capacity(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source, limit);
+        SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
+    }
+    
+    template <typename TSource, typename TSize>
+    String(TSource const & source, TSize limit):
+        data_begin(0),
+        data_end(0),
+        data_capacity(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source, limit);
+        SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
+    }
+
+
+    template <typename TSource>
+    String & operator =(TSource const & source)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+        SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
+        return *this;
+    }
+    
+    String & operator =(String const & source)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+        SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
+        return *this;
+    }
+
+    ~String()
+    {
+        SEQAN_CHECKPOINT;
+        arrayDestruct(this->data_begin, this->data_end);
+        _deallocateStorage(*this, this->data_begin, data_capacity);
+    }
+
+    // ----------------------------------------------------------------------
+    // Subscription operators; have to be defined in class def.
+    // ----------------------------------------------------------------------
+
+    template <typename TPos>
+    inline typename Reference<String>::Type
+    operator [] (TPos pos)
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<String const>::Type
+    operator [] (TPos pos) const
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TValue, typename TSpec>
+inline typename Iterator<String<TValue, Alloc<TSpec> >, Standard>::Type
+begin(String<TValue, Alloc<TSpec> > & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return me.data_begin;
+}
+template <typename TValue, typename TSpec>
+inline typename Iterator<String<TValue, Alloc<TSpec> > const, Standard>::Type
+begin(String<TValue, Alloc<TSpec> > const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return me.data_begin;
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, typename TSpec>
+inline typename Iterator<String<TValue, Alloc<TSpec> >, Standard>::Type
+end(String<TValue, Alloc<TSpec> > & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return me.data_end;
+}
+template <typename TValue, typename TSpec>
+inline typename Iterator<String<TValue, Alloc<TSpec> > const, Standard>::Type
+end(String<TValue, Alloc<TSpec> > const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return me.data_end;
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, typename TSpec>
+inline size_t
+capacity(String<TValue, Alloc<TSpec> > & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_capacity;
+}
+
+template <typename TValue, typename TSpec>
+inline size_t
+capacity(String<TValue, Alloc<TSpec> > const & me)
+{
+SEQAN_CHECKPOINT
+    return me.data_capacity;
+}
+
+//____________________________________________________________________________
+/* Entwicklungsschrott?
+inline void
+move(String & target,
+     String & source)
+{
+    clear(target);
+    target.data_begin = source.data_begin;
+    target.data_end = source.data_end;
+    target.data_capacity = source.data_capacity;
+
+    source.data_begin = 0;
+    source.data_end = 0;
+    source.data_capacity = 0;
+}
+*/
+//____________________________________________________________________________
+
+/**
+.Internal._setBegin:
+*/
+template <typename TValue, typename TSpec, typename TPtr>
+inline void
+_setBegin(
+    String<TValue, Alloc<TSpec> > & me,
+    TPtr * new_begin)
+{
+SEQAN_CHECKPOINT
+    me.data_begin = new_begin;
+}
+
+//____________________________________________________________________________
+
+/**
+.Internal._setLength:
+..cat:Functions
+..summary:Set the length of container.
+..signature:_setLength(object, new_length)
+..param.object:A container.
+..param.object.type:Spec.Alloc String
+..param.new_length:The new length.
+*/
+template <typename TValue, typename TSpec>
+inline void
+_setLength(
+    String<TValue, Alloc<TSpec> > & me,
+    size_t new_length)
+{
+SEQAN_CHECKPOINT
+    me.data_end = me.data_begin + new_length;
+}
+
+//____________________________________________________________________________
+
+/**
+.Internal._setCapacity:
+*/
+template <typename TValue, typename TSpec>
+inline void
+_setCapacity(
+    String<TValue, Alloc<TSpec> > & me,
+    size_t new_capacity)
+{
+SEQAN_CHECKPOINT
+    me.data_capacity = new_capacity;
+}
+
+//____________________________________________________________________________
+
+/**
+.Internal._allocateStorage:
+..cat:Functions
+..summary:Allocates a new buffer for a container.
+..signature:_allocateStorage(object, new_capacity)
+..param.object:A container.
+..param.object.type:Spec.Alloc String
+..param.new_capacity:The capacity of the new allocated buffer.
+..returns:The old butter $object$, that is replaced by the new allocated buffer.
+..remarks:The returned buffer must be deallocated by @Internal._deallocateStorage at .
+..remarks:This function does not construct objects in the allocated buffer.
+..see:Internal._reallocateStorage
+*/
+template <typename TValue, typename TSpec>
+inline typename Value<String<TValue, Alloc<TSpec> > >::Type *
+_allocateStorage(
+    String<TValue, Alloc<TSpec> > & me,
+    size_t new_capacity)
+{
+SEQAN_CHECKPOINT
+    size_t size = _computeSizeForCapacity(me, new_capacity);
+    typename Value<String<TValue, Alloc<TSpec> > >::Type * _returnValue = me.data_begin;
+    allocate(me, me.data_begin, size, TagAllocateStorage());
+    me.data_capacity = new_capacity;
+    return _returnValue;
+}
+
+//____________________________________________________________________________
+
+/**
+.Internal._deallocateStorage:
+..cat:Functions
+..summary:Deallocates a buffer of a container.
+..signature:_deallocateStorage(object, buffer, capacity)
+..param.object:A container.
+..param.object.type:Spec.Alloc String
+..param.buffer:The buffer that will be deallocated.
+..param.capacity:The capacity of $buffer$.
+..remarks:All objects in the buffer must be destroyed before calling $_deallocateStorage$.
+..see:Internal._allocateStorage
+..see:Internal._reallocateStorage
+*/
+template <typename TValue, typename TSpec, typename TPtr>
+inline void
+_deallocateStorage(
+    String<TValue, Alloc<TSpec> > & me,
+    TPtr * ptr,
+    size_t capacity)
+{
+SEQAN_CHECKPOINT
+    size_t size = _computeSizeForCapacity(me, capacity);
+    deallocate(me, ptr, size, TagAllocateStorage());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct DefaultOverflowImplicit<String<TValue, Alloc<TSpec> > >
+{
+    typedef Generous Type;
+};
+
+template <typename TValue, typename TSpec>
+struct DefaultOverflowImplicit<String<TValue, Alloc<TSpec> > const >
+{
+    typedef Generous Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct IsContiguous< String<TValue, Alloc<TSpec> > >
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTargetValue, typename TSourceValue, typename TSpec>
+inline void
+move(String<TTargetValue, Alloc<TSpec> > & target,
+     String<TSourceValue, Alloc<TSpec> > & source)
+{
+    _moveContiguous(target, source);
+}
+template <typename TTargetValue, typename TSourceValue, typename TSpec>
+inline void
+move(String<TTargetValue, Alloc<TSpec> > & target,
+     String<TSourceValue, Alloc<TSpec> > const & source)
+{
+    _moveContiguous(target, source);
+}
+
+template <typename TValue, typename TSpec>
+inline void
+move(String<TValue, Alloc<TSpec> > & target,
+     String<TValue, Alloc<TSpec> > & source)
+{
+    clear(target);
+    target.data_begin = source.data_begin;
+    target.data_end = source.data_end;
+    target.data_capacity = source.data_capacity;
+
+    source.data_begin = 0;
+    source.data_end = 0;
+    source.data_capacity = 0;
+}
+
+template <typename TValue, typename TSpec>
+inline void
+move(String<TValue, Alloc<TSpec> > & target,
+     String<TValue, Alloc<TSpec> > const & source)
+{
+    move(target, const_cast<String<TValue, Alloc<TSpec> > &>(source));
+}
+
+} // namespace seqan
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/string_array.h b/src/SeqAn-1.3/seqan/sequence/string_array.h
new file mode 100644
index 0000000..8773356
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_array.h
@@ -0,0 +1,288 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Implementation of constant-sized Array String class.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_STRING_ARRAY_H
+#define SEQAN_HEADER_SEQUENCE_STRING_ARRAY_H
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+/**
+.Spec.Array String:
+..cat:Strings
+..general:Class.String
+..summary:Fast, static-size string.
+..remarks:This is useful as members of structs for external memory algorithms, for example.
+..signature:String<TValue, Array<LENGTH> >
+..param.TValue:The value type, that is the type of the items/characters stored in the string.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.LENGTH:A positive integer that specifies the capacity of the string.
+...remarks:Note that the capacity of an Array String is fixed at compile-time.
+..include:seqan/sequence.h
+*/
+//////////////////////////////////////////////////////////////////////////////
+
+template <unsigned int LENGTH>
+struct Array;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned int LENGTH>
+class String<TValue, Array<LENGTH> >
+{
+public:
+    mutable TValue data_begin[LENGTH];
+    TValue * data_end;
+
+//____________________________________________________________________________
+
+public:
+    String()
+    {
+SEQAN_CHECKPOINT
+        data_end = data_begin;
+    }
+
+    template <typename TSource>
+    String(TSource & source)
+    {
+SEQAN_CHECKPOINT
+        data_end = data_begin;
+        assign(*this, source);
+    }
+    template <typename TSource>
+    String(TSource const & source)
+    {
+SEQAN_CHECKPOINT
+        data_end = data_begin;
+        assign(*this, source);
+    }
+    String(String const & source)
+    {
+SEQAN_CHECKPOINT
+        data_end = data_begin;
+        assign(*this, source);
+    }
+
+    template <typename TSource>
+    String & operator =(TSource const & source)
+    {
+SEQAN_CHECKPOINT
+        assign(*this, source);
+        return *this;
+    }
+    String & operator =(String const & source)
+    {
+SEQAN_CHECKPOINT
+        assign(*this, source);
+        return *this;
+    }
+
+    ~String()
+    {
+    }
+
+//____________________________________________________________________________
+
+    template <typename TPos>
+    inline typename Reference<String>::Type
+    operator [] (TPos pos)
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<String const>::Type
+    operator [] (TPos pos) const
+    {
+SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+//____________________________________________________________________________
+
+
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TValue, unsigned int LENGTH>
+inline typename Iterator<String<TValue, Array<LENGTH> >, Standard>::Type
+begin(String<TValue, Array<LENGTH> > & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return me.data_begin;
+}
+template <typename TValue, unsigned int LENGTH>
+inline typename Iterator<String<TValue, Array<LENGTH> > const, Standard>::Type
+begin(String<TValue, Array<LENGTH> > const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return me.data_begin;
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, unsigned int LENGTH>
+inline typename Iterator<String<TValue, Array<LENGTH> >, Standard>::Type
+end(String<TValue, Array<LENGTH> > & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return me.data_end;
+}
+template <typename TValue, unsigned int LENGTH>
+inline typename Iterator<String<TValue, Array<LENGTH> > const, Standard>::Type
+end(String<TValue, Array<LENGTH> > const & me,
+    Standard)
+{
+SEQAN_CHECKPOINT
+    return me.data_end;
+}
+
+//____________________________________________________________________________
+
+template <typename TValue, unsigned int LENGTH>
+inline size_t
+capacity(String<TValue, Array<LENGTH> > &)
+{
+SEQAN_CHECKPOINT
+    return LENGTH;
+}
+
+template <typename TValue, unsigned int LENGTH>
+inline size_t
+capacity(String<TValue, Array<LENGTH> > const &)
+{
+SEQAN_CHECKPOINT
+    return LENGTH;
+}
+//____________________________________________________________________________
+
+template <typename TValue, unsigned int LENGTH, typename TExpand>
+inline size_t
+reserve(
+    String<TValue, Array<LENGTH> > & me,
+    size_t,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return capacity(me);
+}
+
+
+//____________________________________________________________________________
+
+/**
+.Internal._setLength.param.object.type:Spec.Array String
+*/
+template <typename TValue, unsigned int LENGTH>
+inline void
+_setLength(
+    String<TValue, Array<LENGTH> > & me,
+    size_t new_length)
+{
+SEQAN_CHECKPOINT
+    me.data_end = me.data_begin + new_length;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned int LENGTH>
+struct DefaultOverflowImplicit<String<TValue, Array<LENGTH> > >
+{
+    typedef Limit Type;
+};
+
+template <typename TValue, unsigned int LENGTH>
+struct DefaultOverflowImplicit<String<TValue, Array<LENGTH> > const >
+{
+    typedef Limit Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned int LENGTH>
+struct DefaultOverflowExplicit<String<TValue, Array<LENGTH> > >
+{
+    typedef Limit Type;
+};
+
+template <typename TValue, unsigned int LENGTH>
+struct DefaultOverflowExplicit<String<TValue, Array<LENGTH> > const >
+{
+    typedef Limit Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, unsigned int LENGTH>
+struct IsContiguous< String<TValue, Array<LENGTH> > >
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.LENGTH.param.T.type:Spec.Array String
+template <typename TValue, unsigned int LENGTH_>
+struct LENGTH< String<TValue, Array<LENGTH_> > >
+{
+    enum { VALUE = LENGTH_ };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+} // namespace seqan
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/string_base.h b/src/SeqAn-1.3/seqan/sequence/string_base.h
new file mode 100644
index 0000000..76f0f13
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_base.h
@@ -0,0 +1,1948 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Tags, declarations and generic code for the String class and its
+// specializations.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_ARRAY_BASE_H
+#define SEQAN_HEADER_SEQUENCE_ARRAY_BASE_H
+
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Tags
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TSpec = void>
+struct Alloc {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Class.String:
+..cat:Sequences
+..summary:General purpose container for sequences.
+..signature:String<TValue, TSpec>
+..param.TValue:The value type, that is the type of the items/characters stored in the string.
+...metafunction:Metafunction.Value
+..param.TSpec:The specializing type.
+...metafunction:Metafunction.Spec
+...default:$Alloc<>$, see @Spec.Alloc String at .
+..implements:Concept.Container
+..include:seqan/sequence.h
+*/
+
+template <typename TValue, typename TSpec = Alloc<> >
+class String;
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// METAFUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Iterator.param.T.type:Class.String
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec>
+struct Value<String<TValue, TSpec> >
+{
+    typedef TValue Type;
+};
+template <typename TValue, typename TSpec>
+struct Value<String<TValue, TSpec> const >:
+    public Value<String<TValue, TSpec> >
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.Spec.param.T.type:Class.String
+
+template <typename TValue, typename TSpec>
+struct Spec<String<TValue, TSpec> >
+{
+    typedef TSpec Type;
+};
+template <typename TValue, typename TSpec>
+struct Spec<String<TValue, TSpec> const>:
+    public Spec<String<TValue, TSpec> >
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Metafunction.IsSequence.param.T.type:Class.String
+
+template <typename TValue, typename TSpec>
+struct IsSequence<String<TValue, TSpec> > {
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Returns a Class that can be used to store a temporary copy of a String
+
+template <typename T>
+struct TempCopy_
+{
+    typedef typename Value<T>::Type TValue;
+    typedef typename RemoveConst_<TValue>::Type TValue_NotConst;
+    typedef String<TValue_NotConst, Alloc<> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.id.param.object.type:Class.String
+///.Function.empty.param.object.type:Class.String
+///.Function.capacity.param.object.type:Class.String
+
+
+//////////////////////////////////////////////////////////////////////////////
+// swap
+//////////////////////////////////////////////////////////////////////////////
+
+// forwards for swap
+
+template<typename TAlphabet, typename TSpec> class String;
+template<typename TString, typename TSpec> class StringSet;
+
+/**
+.Function.swap:
+..summary:Swaps the contents of two values.
+..cat:Content Manipulation
+..signature:swap(left, right)
+..param.left:The first value.
+...type:Class.String
+...type:Class.StringSet
+..param.right:The second value.
+...type:Class.String
+...type:Class.StringSet
+..remarks:The function swaps the values of variables left and right.
+This is equivalent to using move three times with a temporary variable.
+
+Note that this function has the same name as the STL function $std::swap$ but is in a different namespace.
+Argument Dependent Lookup (ADL, aka Koenig lookup) will take care that the right $swap$ function is called from STL $sort$, for example.
+We only specialize it for Class.String and Class.StringSet.
+..see:Function.move
+..include:seqan/sequence.h
+*/
+
+template <typename TAlphabet, typename TSpec>
+inline void
+swap(String<TAlphabet, TSpec> & left,
+     String<TAlphabet, TSpec> & right)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef String<TAlphabet, TSpec> TString;
+
+    TString tmp(left, Move());
+    move(left, right);
+    move(right, tmp);
+}
+
+// TODO(holtgrew): This actually belongs into sequence_multiple.h.
+template <typename TString, typename TSpec>
+inline void
+swap(StringSet<TString, TSpec> & left,
+     StringSet<TString, TSpec> & right)
+{
+    SEQAN_CHECKPOINT;
+    typedef StringSet<TString, TSpec> TStringSet;
+
+    TStringSet tmp(left, Move());
+    move(left, right);
+    move(right, tmp);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//shareResources
+
+///.Function.shareResources.param.sequence1, sequence2.type:Class.String
+
+template <typename TValue, typename TSpec>
+inline bool
+shareResources(String<TValue, TSpec> const & obj1,
+                    TValue const & obj2)
+{
+SEQAN_CHECKPOINT
+    return (begin(obj1) >= &obj2) && (end(obj1) <= &obj2);
+}
+
+template <typename TValue, typename TSpec>
+inline bool
+shareResources(TValue const & obj1,
+                    String<TValue, TSpec> const & obj2)
+{
+SEQAN_CHECKPOINT
+    return (begin(obj2) >= &obj1) && (end(obj2) <= &obj1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.begin.param.object.type:Class.String
+///.Function.end.param.object.type:Class.String
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.value.param.container.type:Class.String
+
+template <typename TValue, typename TSpec, typename TPos>
+inline typename Reference< String<TValue, TSpec> >::Type
+value(String<TValue, TSpec> & me,
+      TPos pos)
+{
+    typedef typename Position< String<TValue, TSpec> >::Type TStringPos;
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_LT_MSG(static_cast<TStringPos>(pos), static_cast<TStringPos>(length(me)), "Trying to access an element behind the last one!");
+    return *(begin(me, Standard()) + pos);
+}
+
+template <typename TValue, typename TSpec, typename TPos>
+inline typename Reference< String<TValue, TSpec> const >::Type
+value(String<TValue, TSpec> const & me,
+      TPos pos)
+{
+    typedef typename Position< String<TValue, TSpec> const >::Type TStringPos;
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_LT_MSG(static_cast<TStringPos>(pos), static_cast<TStringPos>(length(me)), "Trying to access an element behind the last one!");
+    return *(begin(me, Standard()) + pos);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.length.param.object.type:Class.String
+
+template <typename TValue, typename TSpec>
+inline typename Size< String<TValue, TSpec> const>::Type
+length(String<TValue, TSpec> const & me)
+{
+SEQAN_CHECKPOINT
+    return end(me, Standard()) - begin(me, Standard());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.length.param.object.type:Class.String
+
+template <typename TValue, typename TSpec>
+inline bool
+empty(String<TValue, TSpec> const & me)
+{
+    SEQAN_CHECKPOINT
+    return end(me, Standard()) == begin(me, Standard());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.clear:
+..cat:Containers
+..summary:Resets an object.
+..signature:clear(object)
+..param.object:The object that will be resetted.
+...type:Class.String
+..remarks:$object$ is set to a state that is equivalent to a default constructed object of the same type.
+..remarks:If $object$ is a container, then all elements are removed from this container.
+The length is set to 0.
+The capacity can be changed, depending on the implementation.
+..see:Function.resize
+..see:Function.length
+..include:seqan/sequence.h
+*/
+
+template <typename TValue, typename TSpec>
+inline void
+clear(String<TValue, TSpec> & me)
+{
+SEQAN_CHECKPOINT
+    arrayDestruct(begin(me, Standard()), end(me, Standard()));
+    _setLength(me, 0);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TExpand>
+struct ClearSpaceStringBase_
+{
+};
+
+//____________________________________________________________________________
+
+template <>
+struct ClearSpaceStringBase_<Insist>
+{
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size)
+    {
+SEQAN_CHECKPOINT
+        arrayDestruct(begin(seq, Standard()), end(seq, Standard()));
+        _setLength(seq, size);
+        return size;
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Size<T>::Type limit)
+    {
+        arrayDestruct(begin(seq, Standard()), end(seq, Standard()));
+        if (limit < size)
+        {
+SEQAN_CHECKPOINT
+            size = limit;
+        }
+        _setLength(seq, size);
+        return size;
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Size<T>::Type start,
+        typename Size<T>::Type end)
+    {
+SEQAN_CHECKPOINT
+        typename Size<T>::Type new_length = length(seq) + size - (end - start);
+        arrayClearSpace(begin(seq, Standard()) + start, length(seq) - start, end - start, size);
+        _setLength(seq, new_length);
+        return size;
+    }
+
+    template <typename T>
+    static typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Size<T>::Type start,
+        typename Size<T>::Type end,
+        typename Size<T>::Type limit)
+    {
+        typename Value<T>::Type * seq_buffer = begin(seq);
+        typename Size<T>::Type seq_length = length(seq);
+
+        if (limit > start + size)
+        {
+SEQAN_CHECKPOINT
+            typename Size<T>::Type removed_size = end - start;
+            typename Size<T>::Type new_length = seq_length - removed_size + size;
+            if (limit < new_length)
+            {
+SEQAN_CHECKPOINT
+                arrayDestruct(seq_buffer + limit, seq_buffer + new_length);
+                seq_length -= new_length - limit;
+            }
+            arrayClearSpace(seq_buffer + start, seq_length - start, end - start, size);
+            _setLength(seq, new_length);
+            return size;
+        }
+        else
+        {
+SEQAN_CHECKPOINT
+            arrayDestruct(seq_buffer + start, seq_buffer + seq_length);
+            _setLength(seq, limit);
+            if (limit > start) return limit - start;
+            else return 0;
+        }
+    }
+/*
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Iterator<T>::Type start,
+        typename Iterator<T>::Type end)
+    {
+        typename Iterator<T>::Type seq_begin = begin(seq);
+        return _clearSpace(seq, size, start - seq_begin, end - seq_begin, Insist());
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Iterator<T>::Type start,
+        typename Iterator<T>::Type end,
+        typename Size<T>::Type limit)
+    {
+        typename Iterator<T>::Type seq_begin = begin(seq);
+        return _clearSpace(seq, size, start - seq_begin, end - seq_begin, limit, Insist());
+    }
+*/
+};
+
+
+//____________________________________________________________________________
+
+
+template <>
+struct ClearSpaceStringBase_<Limit>
+{
+
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size)
+    {
+SEQAN_CHECKPOINT
+        return _clearSpace(seq, size, capacity(seq), Insist());
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Size<T>::Type limit)
+    {
+        typename Size<T>::Type seq_capacity = capacity(seq);
+        if (limit > seq_capacity)
+        {
+SEQAN_CHECKPOINT
+            limit = seq_capacity;
+        }
+        return _clearSpace(seq, size, limit, Insist());
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Size<T>::Type start,
+        typename Size<T>::Type end)
+    {
+SEQAN_CHECKPOINT
+        return _clearSpace(seq, size, start, end, capacity(seq), Insist());
+    }
+
+    template <typename T>
+    static typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Size<T>::Type start,
+        typename Size<T>::Type end,
+        typename Size<T>::Type limit)
+    {
+        typename Size<T>::Type seq_capacity = capacity(seq);
+        if (limit > seq_capacity)
+        {
+SEQAN_CHECKPOINT
+            limit = seq_capacity;
+        }
+        return _clearSpace(seq, size, start, end, limit, Insist());
+    }
+
+/*
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Iterator<T>::Type start,
+        typename Iterator<T>::Type end)
+    {
+        typename Iterator<T>::Type seq_begin = begin(seq);
+        return _clearSpace(seq, size, start - seq_begin, end - seq_begin, Insist());
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Iterator<T>::Type start,
+        typename Iterator<T>::Type end,
+        typename Size<T>::Type limit)
+    {
+        typename Iterator<T>::Type seq_begin = begin(seq);
+        return _clearSpace(seq, size, start - seq_begin, end - seq_begin, limit, Insist());
+    }
+*/
+};
+
+//____________________________________________________________________________
+
+template <typename TExpand>
+struct ClearSpaceExpandStringBase_
+{
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size)
+    {
+        arrayDestruct(begin(seq, Standard()), end(seq, Standard()));
+        typename Size<T>::Type old_capacity = capacity(seq);
+        typename Value<T>::Type * old_array = _reallocateStorage(seq, size, TExpand());
+        if (old_array)
+        {
+SEQAN_CHECKPOINT
+            _deallocateStorage(seq, old_array, old_capacity);
+        }
+        _setLength(seq, size);
+        return size;
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Size<T>::Type limit)
+    {
+        arrayDestruct(begin(seq, Standard()), end(seq, Standard()));
+        if (limit < size)
+        {
+SEQAN_CHECKPOINT
+            size = limit;
+        }
+        typename Size<T>::Type old_capacity = capacity(seq);
+        typename Value<T>::Type * old_array = _reallocateStorage(seq, size, limit, TExpand());
+        if (old_array)
+        {
+            _deallocateStorage(seq, old_array, old_capacity);
+        }
+        _setLength(seq, size);
+        return size;
+    }
+
+    template <typename T>
+    static typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Size<T>::Type start,
+        typename Size<T>::Type end)
+    {
+        typename Size<T>::Type old_length = length(seq);
+        typename Size<T>::Type removed_size = end - start;
+        typename Size<T>::Type new_length = old_length - removed_size + size;
+
+        typename Size<T>::Type old_capacity = capacity(seq);
+        typename Value<T>::Type * old_array = _reallocateStorage(seq, new_length, TExpand());
+        typename Value<T>::Type * seq_array = begin(seq);
+
+        if (old_array)
+        {
+SEQAN_CHECKPOINT
+            arrayConstructMove(old_array, old_array + start, seq_array);
+            arrayConstructMove(old_array + end, old_array + old_length, seq_array + start + size);
+            _deallocateStorage(seq, old_array, old_capacity);
+        }
+        else
+        {
+SEQAN_CHECKPOINT
+            arrayClearSpace(seq_array + start, old_length - start, removed_size, size);
+        }
+
+        _setLength(seq, new_length);
+
+        return size;
+    }
+
+    template <typename T>
+    static typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Size<T>::Type start,
+        typename Size<T>::Type end,
+        typename Size<T>::Type limit)
+    {
+        typename Size<T>::Type old_length = length(seq);
+        typename Size<T>::Type removed_size = end - start;
+        typename Size<T>::Type need_length = old_length - removed_size + size;
+
+        typename Size<T>::Type new_length = need_length;
+        typename Size<T>::Type length_to_copy = old_length;
+        if (limit < need_length)
+        {
+SEQAN_CHECKPOINT
+            new_length = limit;
+            length_to_copy = new_length - size + removed_size;
+        }
+
+        bool keep_second_part = (new_length > start + size);
+
+        typename Size<T>::Type old_capacity = capacity(seq);
+        typename Value<T>::Type * old_array = _reallocateStorage(seq, new_length, limit, TExpand());
+        typename Value<T>::Type * seq_array = begin(seq);
+
+        if (old_array)
+        {//new buffer allocated
+            typename Size<T>::Type keep_start_length = (start > new_length) ? new_length : start;
+            arrayConstructMove(old_array, old_array + keep_start_length, seq_array);
+            if (keep_second_part)
+            {
+                arrayConstructMove(old_array + end, old_array + length_to_copy, seq_array + start + size);
+            }
+            _deallocateStorage(seq, old_array, old_capacity);
+        }
+        else
+        {
+            if (keep_second_part)
+            {
+                arrayClearSpace(seq_array + start, length_to_copy - start, end - start, size);
+                if (length_to_copy < old_length)
+                {
+                    arrayDestruct(seq_array + length_to_copy, seq_array + old_length);
+                }
+            }
+            else
+            {
+                arrayDestruct(seq_array + start, seq_array + old_length);
+            }
+        }
+
+        _setLength(seq, new_length);
+
+        if (keep_second_part) return size;
+        else if (new_length > start) return new_length - start;
+        else return 0;
+    }
+
+/*
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Iterator<T>::Type start,
+        typename Iterator<T>::Type end)
+    {
+        typename Iterator<T>::Type seq_begin = begin(seq);
+        return _clearSpace(seq, size, start - seq_begin, end - seq_begin, TExpand());
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq,
+        typename Size<T>::Type size,
+        typename Iterator<T>::Type start,
+        typename Iterator<T>::Type end,
+        typename Size<T>::Type limit)
+    {
+        typename Iterator<T>::Type seq_begin = begin(seq);
+        return _clearSpace(seq, size, start - seq_begin, end - seq_begin, limit, TExpand());
+    }
+*/
+};
+
+//____________________________________________________________________________
+
+template <>
+struct ClearSpaceStringBase_<Exact>:
+    ClearSpaceExpandStringBase_<Exact>
+{
+};
+
+//____________________________________________________________________________
+
+template <>
+struct ClearSpaceStringBase_<Generous>:
+    ClearSpaceExpandStringBase_<Generous>
+{
+};
+
+//____________________________________________________________________________
+/**
+.Internal._clearSpace:
+..cat:Functions
+..summary:Makes space in container
+..signature:_clearSpace(object, size [, pos_begin, pos_end] [, limit], resize_tag)
+..param.object:The container.
+..param.size:Length of the freed space.
+..param.pos_begin:Position of the first item in $object$ that is to be destroyed. (optional)
+..param.pos_end:Position behind the last item in $object$ that is to be destroyed. (optional)
+...remarks:If $pos_end == pos_begin$, no item in $object$ will be destroyed.
+..param.limit:Maximal length $object$ can get after this operation. (optional)
+..param.resize_tag:Strategy that is applied if $object$ has not enough capacity to store the complete content.
+..returns:The number of free characters.
+...remarks:Depeding on the @Tag.Overflow Strategy.overflow strategy@ specified by $resize_tag$,
+this could be $size$ or less than $size$ if $object$ has not enough @Function.capacity at .
+..remarks:This function is similar to @Function.resizeSpace@ and @Function.fillSpace at .
+The main difference is that $_clearSpace$ does not construct objects in the new created space.
+*/
+template<typename TValue, typename TSpec, typename TSize, typename TExpand>
+inline typename Size< String<TValue, TSpec> >::Type
+_clearSpace(String<TValue, TSpec> & me,
+        TSize size,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return ClearSpaceStringBase_<Tag<TExpand> const>::_clearSpace_(me, size);
+}
+
+template<typename TValue, typename TSpec, typename TSize, typename TExpand>
+inline typename Size< String<TValue, TSpec> >::Type
+_clearSpace(String<TValue, TSpec> & me,
+        TSize size,
+        TSize limit,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return ClearSpaceStringBase_<Tag<TExpand> const>::_clearSpace_(me, size, limit);
+}
+
+template<typename TValue, typename TSpec, typename TSize, typename TPosition, typename TExpand>
+inline typename Size< String<TValue, TSpec> >::Type
+_clearSpace(String<TValue, TSpec> & me,
+            TSize size,
+            TPosition pos_begin,
+            TPosition pos_end,
+            Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return ClearSpaceStringBase_<Tag<TExpand> const>::_clearSpace_(me, size, pos_begin, pos_end);
+}
+
+template<typename TValue, typename TSpec, typename TSize, typename TPosition, typename TExpand>
+inline typename Size< String<TValue, TSpec> >::Type
+_clearSpace(String<TValue, TSpec> & me,
+            TSize size,
+            TPosition pos_begin,
+            TPosition pos_end,
+            TSize limit,
+            Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return ClearSpaceStringBase_<Tag<TExpand> const>::_clearSpace_(me, size, pos_begin, pos_end, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.resizeSpace.param.object.type:Class.String
+
+template<typename TValue, typename TSpec, typename TSize, typename TBeginPosition, typename TEndPosition, typename TExpand>
+inline typename Size< String<TValue, TSpec> >::Type
+resizeSpace(String<TValue, TSpec> & me,
+            TSize size,
+            TBeginPosition pos_begin,
+            TEndPosition pos_end,
+            Tag<TExpand> const tag)
+{
+SEQAN_CHECKPOINT
+    typedef typename Size< String<TValue, TSpec> >::Type TSize_;
+    typedef typename Position<String<TValue, TSpec> >::Type TPos_;
+    TSize_ ret_ = _clearSpace(
+        me,
+        static_cast<TSize_>(size),
+        static_cast<TPos_>(pos_begin),
+        static_cast<TPos_>(pos_end),
+        tag);
+    arrayConstruct(iter(me, pos_begin), iter(me, pos_begin) + ret_);
+    return ret_;
+}
+
+template<typename TValue, typename TSpec, typename TSize, typename TBeginPosition, typename TEndPosition, typename TLimit, typename TExpand>
+inline typename Size< String<TValue, TSpec> >::Type
+resizeSpace(String<TValue, TSpec> & me,
+            TSize size,
+            TBeginPosition pos_begin,
+            TEndPosition pos_end,
+            TLimit limit,
+            Tag<TExpand> const tag)
+{
+SEQAN_CHECKPOINT
+    typedef typename Size< String<TValue, TSpec> >::Type TSize_;
+    typedef typename Position<String<TValue, TSpec> >::Type TPos_;
+    TSize_ ret_ = _clearSpace(
+        me,
+        static_cast<TSize_>(size),
+        static_cast<TPos_>(pos_begin),
+        static_cast<TPos_>(pos_end),
+        static_cast<TSize_>(limit),
+        tag);
+    arrayConstruct(iter(me, pos_begin), iter(me, pos_begin) + ret_);
+    return ret_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// assignValue (2)
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename TSpec, typename TValue2>
+inline void
+assignValue(String<TValue, TSpec> & /*me*/,
+            TValue2 const & /*_value*/)
+{
+//  assign(me, toString(_value)); ???TODO
+}
+
+//???TODO: moveValue (2)
+
+//////////////////////////////////////////////////////////////////////////////
+// assign
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.assign.param.target.type:Class.String
+///.Function.assign.param.source.type:Class.String
+
+//overload of binary version for strings:
+
+template<typename TTargetValue, typename TTargetSpec, typename TSource>
+inline void
+assign(String<TTargetValue, TTargetSpec> & target,
+      TSource & source)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    assign(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+template<typename TTargetValue, typename TTargetSpec, typename TSource>
+inline void
+assign(String<TTargetValue, TTargetSpec> & target,
+      TSource const & source)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    assign(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TExpand>
+struct AssignString_
+{
+    template <typename TTarget, typename TSource>
+    static inline void
+    assign_(
+        TTarget & target,
+        TSource & source)
+    {
+        if (empty(source) && empty(target))
+            return;  // Do nothing if both source and target are empty.
+        if (!id(source) || !shareResources(target, source))
+        {
+SEQAN_CHECKPOINT
+            typename Size<TTarget>::Type part_length = _clearSpace(target, length(source), TExpand());
+            arrayConstructCopy(begin(source, Standard()), begin(source, Standard()) + part_length, begin(target, Standard()));
+        }
+        else
+        {
+SEQAN_CHECKPOINT
+            if ((void *) &target == (void *) &source) return;
+
+            typename TempCopy_<TSource>::Type temp(source, length(source));
+            assign(target, temp, TExpand());
+        }
+    }
+
+    template <typename TTarget, typename TSource>
+    static inline void
+    assign_(
+        TTarget & target,
+        TSource & source,
+        typename Size<TTarget>::Type limit)
+    {
+        if (!id(source) || !shareResources(target, source))
+        {
+SEQAN_CHECKPOINT
+            typename Size<TTarget>::Type part_length = _clearSpace(target, typename Size<TTarget>::Type(length(source)), limit, TExpand());
+            arrayConstructCopy(begin(source, Standard()), begin(source, Standard()) + part_length, begin(target, Standard()));
+        }
+        else
+        {
+SEQAN_CHECKPOINT
+            if ((void *) &target == (void *) &source) return;
+
+            typename Size<TTarget>::Type source_length = length(source);
+            if (source_length > limit) source_length = limit;
+
+            typename TempCopy_<TSource>::Type temp(source, source_length);
+            assign(target, temp, TExpand());
+        }
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TTargetValue, typename TTargetSpec, typename TSource, typename TExpand>
+inline void
+assign(String<TTargetValue, TTargetSpec> & target,
+       TSource const & source,
+       Tag<TExpand> const)
+{
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    AssignString_<Tag<TExpand> const>::assign_(target, source);
+}
+template<typename TTargetValue, typename TTargetSpec, typename TSource, typename TSize, typename TExpand>
+inline void
+assign(String<TTargetValue, TTargetSpec> & target,
+       TSource const & source,
+       TSize limit,
+       Tag<TExpand> const)
+{
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    AssignString_<Tag<TExpand> const>::assign_(target, source, limit);
+}
+
+//____________________________________________________________________________
+//this variant is a workaround for the "const array"-bug of VC++
+
+template<typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TExpand>
+inline void
+assign(String<TTargetValue, TTargetSpec> & target,
+       TSourceValue const * source,
+       Tag<TExpand> const)
+{
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    AssignString_<Tag<TExpand> const>::assign_(target, source);
+}
+template<typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TSize, typename TExpand>
+inline void
+assign(String<TTargetValue, TTargetSpec> & target,
+       TSourceValue const * source,
+       TSize limit,
+       Tag<TExpand> const)
+{
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    AssignString_<Tag<TExpand> const>::assign_(target, source, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// move
+//////////////////////////////////////////////////////////////////////////////
+
+//____________________________________________________________________________
+//implementation of move for contiguous sequences
+//note: there is a problem, if sizeof(TSourceValue) and sizeof(TTargetValue) are not a multiple
+//  of each other, since in this case the correct size cannot be determined afterwards
+//  when calling the deallocate function.
+//  ???TODO
+template <typename TTarget, typename TSource>
+void
+_moveContiguous(TTarget & target,
+                TSource & source)
+{
+    typedef typename Value<TSource>::Type TSourceValue;
+    typedef typename Value<TTarget>::Type TTargetValue;
+
+    clear(target);
+
+    typename Iterator<TSource, Standard>::Type source_begin = begin(source, Standard());
+    typename Iterator<TTarget, Standard>::Type target_begin = (typename Iterator<TTarget, Standard>::Type) begin(source, Standard());
+
+    typename Size<TTarget>::Type size = sizeof(TSourceValue) * capacity(source);
+    if (size >=  sizeof(TTargetValue))
+    {
+SEQAN_CHECKPOINT
+        if (sizeof(TSourceValue) <= 2) ++size; //regard the "end of string termination" case
+        typename Size<TTarget>::Type target_capacity = size / sizeof(TTargetValue);
+        if (sizeof(TTargetValue) <= 2) --target_capacity; //regard the "end of string termination" case
+
+        typename Size<TTarget>::Type target_length = length(source);
+        if (target_length > target_capacity)
+        {
+            target_length = target_capacity;
+        }
+
+        if (sizeof(TSourceValue) >= sizeof(TTargetValue))
+        {
+            arrayMoveForward(source_begin, source_begin + target_length, target_begin);
+        }
+        else
+        {
+            arrayMoveBackward(source_begin, source_begin + target_length, target_begin);
+        }
+
+        _setBegin(target, target_begin);
+        _setLength(target, target_length);
+        _setCapacity(target, target_capacity);
+
+        _setBegin(source, 0);
+        _setLength(source, 0);
+        _setCapacity(source, 0);
+    }
+    else
+    {
+        clear(source);
+    }
+}
+//____________________________________________________________________________
+
+//overload of binary version for strings:
+
+template<typename TTargetValue, typename TTargetSpec, typename TSource>
+inline void
+move(String<TTargetValue, TTargetSpec> & target,
+     TSource & source)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    move(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+template<typename TTargetValue, typename TTargetSpec, typename TSource>
+inline void
+move(String<TTargetValue, TTargetSpec> & target,
+     TSource const & source)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    move(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+//____________________________________________________________________________
+
+template<typename TTargetValue, typename TTargetSpec, typename TSource, typename TTag>
+inline void
+move(String<TTargetValue, TTargetSpec> & target,
+     TSource & source,
+     Tag<TTag> const tag)
+{
+SEQAN_CHECKPOINT
+    assign(target, source, tag);
+}
+
+template<typename TTargetValue, typename TTargetSpec, typename TSource, typename TTag>
+inline void
+move(String<TTargetValue, TTargetSpec> & target,
+     TSource const & source,
+     Tag<TTag> const tag)
+{
+SEQAN_CHECKPOINT
+    assign(target, source, tag);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// valueConstructMove:
+// it is usually better for strings to default construct and move instead of
+// copy construct strings
+
+/*
+template <typename TIterator, typename TValue, typename TSpec>
+inline void
+valueConstructMove(TIterator it,
+                   String<TValue, TSpec> const & value)
+{
+    valueConstruct(it);
+    move(*it, value);
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+// append
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.append.param.target.type:Class.String
+///.Function.append.param.source.type:Class.String
+
+template <typename TExpand>
+struct AppendString_
+{
+    template <typename TTarget, typename TSource>
+    static inline void
+    append_(TTarget & target,
+            TSource & source)
+    {
+        if (!id(source) || !shareResources(target, source))
+        {
+SEQAN_CHECKPOINT
+            typename Size<TTarget>::Type target_length = length(target);
+            typename Size<TTarget>::Type part_length = _clearSpace(target, length(source), target_length, target_length, TExpand());
+            arrayConstructCopy(begin(source, Standard()), begin(source, Standard()) + part_length, begin(target, Standard()) + target_length);
+        }
+        else
+        {
+SEQAN_CHECKPOINT
+            typename TempCopy_<TSource>::Type temp(source, length(source));
+            append(target, temp, TExpand());
+        }
+    }
+
+    template <typename TTarget, typename TSource>
+    static inline void
+    append_(TTarget & target,
+            TSource & source,
+            typename Size<TTarget>::Type limit)
+    {
+        typename Iterator<TTarget, Standard>::Type target_begin = begin(target, Standard());
+        if (!id(source) || !shareResources(target, source))
+        {
+SEQAN_CHECKPOINT
+            typename Size<TTarget>::Type target_length = length(target);
+            typename Size<TTarget>::Type part_length = _clearSpace(target, length(source), target_length, target_length, limit, TExpand());
+            arrayConstructCopy(begin(source, Standard()), begin(source, Standard()) + part_length, begin(target, Standard()) + target_length);
+        }
+        else
+        {
+            typename Size<TTarget>::Type target_length = length(target);
+            if (target_length >= limit)
+            {
+SEQAN_CHECKPOINT
+                arrayDestruct(target_begin + limit, target_begin + target_length);
+                _setLength(target, limit);
+            }
+            else
+            {
+SEQAN_CHECKPOINT
+                limit -= target_length;
+                typename Size<TTarget>::Type source_length = length(source) ;
+                if (source_length > limit) source_length = limit;
+
+                typename TempCopy_<TSource>::Type temp(source, source_length);
+                append(target, temp, TExpand());
+            }
+        }
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TTargetValue, typename TTargetSpec, typename TSource, typename TExpand>
+inline void
+append(String<TTargetValue, TTargetSpec> & target,
+       TSource const & source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    AppendString_<Tag<TExpand> const>::append_(target, source);
+}
+
+template<typename TTargetValue, typename TTargetSpec, typename TSource, typename TExpand>
+inline void
+append(String<TTargetValue, TTargetSpec> & target,
+       TSource const & source,
+       typename Size< String<TTargetValue, TTargetSpec> >::Type limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    AppendString_<Tag<TExpand> const>::append_(target, source, limit);
+}
+
+//____________________________________________________________________________
+//this variant is a workaround for the "const array"-bug of VC++
+
+template<typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TExpand>
+inline void
+append(String<TTargetValue, TTargetSpec> & target,
+       TSourceValue * source,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    AppendString_<Tag<TExpand> const>::append_(target, source);
+}
+
+template<typename TTargetValue, typename TTargetSpec, typename TSourceValue, typename TExpand>
+inline void
+append(String<TTargetValue, TTargetSpec> & target,
+       TSourceValue * source,
+       typename Size< String<TTargetValue, TTargetSpec> >::Type limit,
+       Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    AppendString_<Tag<TExpand> const>::append_(target, source, limit);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// appendValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TExpand>
+struct AppendValueToString_
+{
+    template <typename T, typename TValue>
+    static inline void
+    appendValue_(T & me,
+                TValue & _value)
+    {
+SEQAN_CHECKPOINT
+        typename Position<T>::Type me_length = length(me);
+        if (capacity(me) <= me_length)
+        {
+            typename Value<T>::Type temp_copy(_value); //temp copy because resize could invalidate _value
+            typename Size<T>::Type new_length = resize(me, me_length + 1, TExpand());
+            if (me_length < new_length)
+            {
+                valueConstruct(begin(me) + me_length, temp_copy); //??? this should be valueMoveConstruct
+            }
+        }
+        else
+        {
+            valueConstruct(begin(me, Standard()) + me_length, _value);
+            _setLength(me, me_length + 1);
+        }
+    }
+};
+
+//____________________________________________________________________________
+
+template <typename TTargetValue, typename TTargetSpec, typename TValue, typename TExpand>
+inline void
+appendValue(String<TTargetValue, TTargetSpec> & me,
+            TValue const & _value,
+            Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    AppendValueToString_<Tag<TExpand> const>::appendValue_(me, _value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// insertValue
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Function.insertValue:
+..include:seqan/sequence.h
+*/
+
+template <typename TExpand>
+struct InsertValueToString_
+{
+    template <typename T, typename TPosition, typename TValue>
+    static inline void
+    insertValue_(T & me,
+                TPosition pos,
+                TValue & _value)
+    {
+SEQAN_CHECKPOINT
+        typename Value<T>::Type temp_copy = _value; //temp copy because resizeSpace could invalidate _value
+        resizeSpace(me, 1, pos, pos, TExpand());
+        if ((typename Size<T>::Type) pos < length(me))
+        {
+            moveValue(me, pos, temp_copy);
+        }
+    }
+};
+
+//____________________________________________________________________________
+
+template <typename TTargetValue, typename TTargetSpec, typename TPosition, typename TValue, typename TExpand>
+inline void
+insertValue(String<TTargetValue, TTargetSpec> & me,
+            TPosition pos,
+            TValue const & _value,
+            Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    InsertValueToString_<Tag<TExpand> const>::insertValue_(me, pos, _value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// replace
+//////////////////////////////////////////////////////////////////////////////
+
+///.Function.replace.param.target.type:Class.String
+///.Function.replace.param.source.type:Class.String
+
+template <typename TExpand>
+struct ReplaceString_
+{
+    template <typename TTarget, typename TSource>
+    static inline void
+    replace_(TTarget & target,
+             typename Size<TTarget>::Type pos_begin,
+             typename Size<TTarget>::Type pos_end,
+             TSource & source)
+    {
+        if (!id(source) || !shareResources(target, source))
+        {
+SEQAN_CHECKPOINT
+            typename Size<TTarget>::Type part_length = _clearSpace(target, length(source), pos_begin, pos_end, TExpand());
+            arrayConstructCopy(begin(source, Standard()), begin(source, Standard()) + part_length, begin(target, Standard()) + pos_begin);
+        }
+        else
+        {
+SEQAN_CHECKPOINT
+            typename TempCopy_<TSource>::Type temp(source, length(source));
+            replace(target, pos_begin, pos_end, temp, TExpand());
+        }
+    }
+
+    template <typename TTarget, typename TSource>
+    static inline void
+    replace_(TTarget & target,
+             typename Size<TTarget>::Type pos_begin,
+             typename Size<TTarget>::Type pos_end,
+             TSource & source,
+             typename Size<TTarget>::Type limit)
+    {
+        if (!id(source) || !shareResources(target, source))
+        {
+SEQAN_CHECKPOINT
+            typename Size<TTarget>::Type part_length = _clearSpace(target, length(source), pos_begin, pos_end, limit, TExpand());
+            arrayConstructCopy(begin(source, Standard()), begin(source, Standard()) + part_length, begin(target, Standard()) + pos_begin);
+        }
+        else
+        {
+            if (pos_begin >= limit)
+            {
+SEQAN_CHECKPOINT
+                arrayDestruct(begin(target) + limit, end(target));
+                _setLength(target, limit);
+            }
+            else
+            {
+SEQAN_CHECKPOINT
+                limit -= pos_begin;
+                typename Size<TTarget>::Type source_length = length(source) ;
+                if (source_length > limit) source_length = limit;
+
+                typename TempCopy_<TSource>::Type temp(source, source_length);
+                replace(target, pos_begin, pos_end, temp, limit, TExpand());
+            }
+        }
+    }
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TTargetValue, typename TTargetSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(String<TTargetValue, TTargetSpec> & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource const & source,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    ReplaceString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+
+template<typename TTargetValue, typename TTargetSpec, typename TPositionBegin, typename TPositionEnd, typename TSource, typename TExpand>
+inline void
+replace(String<TTargetValue, TTargetSpec> & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSource const & source,
+        typename Size< String<TTargetValue, TTargetSpec> >::Type limit,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    ReplaceString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+
+//____________________________________________________________________________
+//this variant is a workaround for the "const array"-bug of VC++
+
+template<typename TTargetValue, typename TTargetSpec, typename TPositionBegin, typename TPositionEnd, typename TSourceValue, typename TExpand>
+inline void
+replace(String<TTargetValue, TTargetSpec> & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSourceValue const * source,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    ReplaceString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source);
+}
+
+template<typename TTargetValue, typename TTargetSpec, typename TPositionBegin, typename TPositionEnd, typename TSourceValue, typename TExpand>
+inline void
+replace(String<TTargetValue, TTargetSpec> & target,
+        TPositionBegin pos_begin,
+        TPositionEnd pos_end,
+        TSourceValue const * source,
+        typename Size< String<TTargetValue, TTargetSpec> >::Type limit,
+        Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    typedef String<TTargetValue, TTargetSpec> TTarget;
+    ReplaceString_<Tag<TExpand> const>::replace_(target, pos_begin, pos_end, source, limit);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/**
+.Internal._reallocateStorage:
+..cat:Functions
+..summary:Allocates a new buffer if needed.
+..signature:_reallocateStorage(object, new_capacity, resize_tag)
+..param.object:A container for which the buffer is reallocated.
+...type:Class.String
+..param.new_capacity:The capacity $object$ will get after reallocating the buffer.
+..param.resize_tag:Strategy that is used for changing the capacity.
+..returns:Returns the old buffer, if a new buffer has been allocated, $0$ otherwise.
+..remarks:This function only allocates a new buffer if the current capacity is less then $new_capacity$.
+A new buffer is not filled with any content, all copy operations must be done by the caller.
+..remarks:If $object$ never had a buffer, or the buffer is not changed by the function,
+the returned pointer is 0.
+*/
+
+template <typename TValue, typename TSpec, typename TSize>
+inline typename Value<String<TValue, TSpec> >::Type *
+_reallocateStorage(
+    String<TValue, TSpec> & me,
+    TSize new_capacity)
+{
+SEQAN_CHECKPOINT
+    return _allocateStorage(me, new_capacity);
+}
+
+template <typename TValue, typename TSpec, typename TSize>
+inline typename Value<String<TValue, TSpec> >::Type *
+_reallocateStorage(
+    String<TValue, TSpec> & me,
+    TSize new_capacity,
+    Exact)
+{
+    typedef typename Size<String<TValue, TSpec> >::Type TStringSize;
+    if (static_cast<TStringSize>(new_capacity) <= capacity(me)) return 0;
+    else
+    {
+SEQAN_CHECKPOINT
+        return _reallocateStorage(me, new_capacity);
+    }
+}
+
+template <typename TValue, typename TSpec, typename TSize, typename TSize2>
+inline typename Value<String<TValue, TSpec> >::Type *
+_reallocateStorage(
+    String<TValue, TSpec> & me,
+    TSize new_capacity,
+    TSize2 limit,
+    Exact)
+{
+    typedef typename Size<String<TValue, TSpec> >::Type TStringSize;
+    if (static_cast<TStringSize>(new_capacity) <= capacity(me)) return 0;
+    else
+    {
+SEQAN_CHECKPOINT
+        if (new_capacity > limit) new_capacity = limit;
+        return _reallocateStorage(me, new_capacity);
+    }
+}
+
+template <typename TValue, typename TSpec, typename TSize>
+inline typename Value<String<TValue, TSpec> >::Type *
+_reallocateStorage(
+    String<TValue, TSpec> & me,
+    TSize new_capacity,
+    Generous)
+{
+    typedef typename Size<String<TValue, TSpec> >::Type TStringSize;
+    if (static_cast<TStringSize>(new_capacity) <= capacity(me))
+    {
+        return 0;
+    }
+    else
+    {
+SEQAN_CHECKPOINT
+        new_capacity = computeGenerousCapacity(me, new_capacity);
+        return _reallocateStorage(me, new_capacity);
+    }
+}
+
+template <typename TValue, typename TSpec, typename TSize, typename TSize2>
+inline typename Value<String<TValue, TSpec> >::Type *
+_reallocateStorage(
+    String<TValue, TSpec> & me,
+    TSize new_capacity,
+    TSize2 limit,
+    Generous)
+{
+    typedef typename Size<String<TValue, TSpec> >::Type TStringSize;
+    if (static_cast<TStringSize>(new_capacity) <= capacity(me)) return 0;
+    else
+    {
+SEQAN_CHECKPOINT
+        new_capacity = computeGenerousCapacity(me, new_capacity);
+        if (new_capacity > limit) new_capacity = limit;
+        return _reallocateStorage(me, new_capacity);
+    }
+}
+
+template <typename TValue, typename TSpec, typename TSize>
+inline typename Value<String<TValue, TSpec> >::Type *
+_reallocateStorage(
+    String<TValue, TSpec> &,
+    TSize,
+    Insist)
+{
+    return 0;
+}
+
+template <typename TValue, typename TSpec, typename TSize, typename TSize2>
+inline typename Value<String<TValue, TSpec> >::Type *
+_reallocateStorage(
+    String<TValue, TSpec> &,
+    TSize,
+    TSize2,
+    Insist)
+{
+    return 0;
+}
+
+template <typename TValue, typename TSpec, typename TSize>
+inline typename Value<String<TValue, TSpec> >::Type *
+_reallocateStorage(
+    String<TValue, TSpec> &,
+    TSize,
+    Limit)
+{
+    return 0;
+}
+
+template <typename TValue, typename TSpec, typename TSize, typename TSize2>
+inline typename Value<String<TValue, TSpec> >::Type *
+_reallocateStorage(
+    String<TValue, TSpec> &,
+    TSize,
+    TSize2,
+    Limit)
+{
+    return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.reserve.param.object.type:Class.String
+
+template <typename TValue, typename TSpec, typename TSize_>
+inline void
+_reserveStorage(
+    String<TValue, TSpec> & /*seq*/,
+    TSize_ /*new_capacity*/,
+    Insist)
+{
+    // do nothing
+}
+
+template <typename TValue, typename TSpec, typename TSize_>
+inline void
+_reserveStorage(
+    String<TValue, TSpec> & /*seq*/,
+    TSize_ /*new_capacity*/,
+    Limit)
+{
+    // do nothing
+}
+
+template <typename TValue, typename TSpec, typename TSize_, typename TExpand>
+inline void
+_reserveStorage(
+    String<TValue, TSpec> & seq,
+    TSize_ new_capacity,
+    Tag<TExpand> const tag)
+{
+    typedef typename Size< String<TValue, TSpec> >::Type TSize;
+
+    TSize old_capacity = capacity(seq);
+
+//  if (old_capacity == (TSize)new_capacity) return;
+//  if (!IsSameType<TExpand,TagExact_>::VALUE && old_capacity > (TSize)new_capacity) return;
+    if (old_capacity >= (TSize)new_capacity) return;
+
+    TSize seq_length = length(seq);
+    typename Value< String<TValue, TSpec> >::Type * old_array = _reallocateStorage(seq, new_capacity, tag);
+    if (old_array)
+    {//buffer was replaced, destruct old buffer
+//      arrayConstruct(begin(seq, Standard()), begin(seq, Standard()) + seq_length);
+//      arrayMoveForward(old_array, old_array + seq_length, begin(seq, Standard()));
+        arrayConstructCopy(old_array, old_array + seq_length, begin(seq, Standard()));
+        arrayDestruct(old_array, old_array + seq_length);
+        _deallocateStorage(seq, old_array, old_capacity);
+        _setLength(seq, seq_length);
+    }
+    else if (!old_capacity)
+    {//new buffer created and the string had no buffer yet
+        _setLength(seq, seq_length);
+    }
+}
+
+template <typename TValue, typename TSpec, typename TSize_, typename TExpand>
+inline typename Size< String<TValue, TSpec> >::Type
+reserve(
+    String<TValue, TSpec> & seq,
+    TSize_ new_capacity,
+    Tag<TExpand> const tag)
+{
+SEQAN_CHECKPOINT
+    _reserveStorage(seq, new_capacity, tag);
+    return _capacityReturned(seq, new_capacity, tag);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+///.Function.resize.param.object.type:Class.String
+
+template <typename TExpand>
+struct _Resize_String
+{
+    template <typename T>
+    static inline typename Size<T>::Type
+    resize_(
+        T & me,
+        typename Size<T>::Type new_length)
+    {
+        typedef typename Size<T>::Type TSize;
+        TSize me_length = length(me);
+        if (new_length < me_length)
+        {
+SEQAN_CHECKPOINT
+            arrayDestruct(begin(me, Standard()) + new_length, begin(me, Standard()) + me_length);
+        }
+        else
+        {
+            typename Size<T>::Type me_capacity = capacity(me);
+            if (new_length > me_capacity)
+            {
+SEQAN_CHECKPOINT
+                TSize new_capacity = reserve(me, new_length, TExpand());
+                if (new_capacity < new_length)
+                {
+                    new_length = new_capacity;
+                }
+            }
+            if (new_length > me_length)
+            {
+SEQAN_CHECKPOINT
+                arrayConstruct(begin(me, Standard()) + me_length, begin(me, Standard()) + new_length);
+            }
+        }
+
+        _setLength(me, new_length);
+        return new_length;
+    }
+
+    template <typename T, typename TValue>
+    static inline typename Size<T>::Type
+    resize_(
+        T & me,
+        typename Size<T>::Type new_length,
+        TValue const & val)
+    {
+        typedef typename Size<T>::Type TSize;
+        TSize me_length = length(me);
+        if (new_length < me_length)
+        {
+SEQAN_CHECKPOINT
+            arrayDestruct(begin(me, Standard()) + new_length, begin(me, Standard()) + me_length);
+        }
+        else
+        {
+            TSize me_capacity = capacity(me);
+            if (new_length > me_capacity)
+            {
+SEQAN_CHECKPOINT
+                TValue tempCopy = val;  // reserve could invalidate val
+                TSize new_capacity = reserve(me, new_length, TExpand());
+                if (new_capacity < new_length)
+                {
+                    new_length = new_capacity;
+                }
+                arrayConstruct(begin(me, Standard()) + me_length, begin(me, Standard()) + new_length, tempCopy);
+            } else
+                if (new_length > me_length)
+                {
+SEQAN_CHECKPOINT
+                    arrayConstruct(begin(me, Standard()) + me_length, begin(me, Standard()) + new_length, val);
+                }
+        }
+
+        _setLength(me, new_length);
+        return new_length;
+    }
+};
+
+template <typename TValue, typename TSpec, typename TSize, typename TExpand>
+inline typename Size< String<TValue, TSpec> >::Type
+resize(
+    String<TValue, TSpec> & me,
+    TSize new_length,
+    Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return _Resize_String<Tag<TExpand> const>::resize_(me, new_length);
+}
+
+template <typename TValue, typename TSpec, typename TSize, typename TValue2, typename TExpand>
+inline TSize
+resize(String<TValue, TSpec> & me,
+     TSize new_length,
+     TValue2 const & val,
+     Tag<TExpand> const)
+{
+SEQAN_CHECKPOINT
+    return _Resize_String<Tag<TExpand> const>::resize_(me, new_length, val);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+template <typename TLeftValue, typename TLeftSpec, typename TRightValue, typename TRightSpec>
+String<TLeftValue, TLeftSpec> const &
+operator += (String<TLeftValue, TLeftSpec> & left,
+             String<TRightValue, TRightSpec> const & right)
+{
+    append(left, right);
+    return left;
+}
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight>
+String<TLeftValue, TLeftSpec> const &
+operator += (String<TLeftValue, TLeftSpec> & left,
+             TRight const & right)
+{
+    append(left, right);
+    return left;
+}
+
+template <typename TLeft, typename TRightValue, typename TRightSpec>
+TLeft const &
+operator += (TLeft & left,
+             String<TRightValue, TRightSpec> const & right)
+{
+    append(left, right);
+    return left;
+}
+*/
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight >
+String<TLeftValue, TLeftSpec> const &
+operator += (String<TLeftValue, TLeftSpec> & left,
+             TRight const & right)
+{
+SEQAN_CHECKPOINT
+    append(left, right);
+    return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight >
+inline bool
+operator == (String<TLeftValue, TLeftSpec> const & left,
+            TRight const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<String<TLeftValue, TLeftSpec> >::Type _lex(left, right);
+    return isEqual(_lex);
+}
+template <typename TLeftValue, typename TRightValue, typename TRightSpec >
+inline bool
+operator == (TLeftValue * left,
+             String<TRightValue, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<String<TRightValue, TRightSpec> >::Type _lex(left, right);
+    return isEqual(_lex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight >
+inline bool
+operator !=(String<TLeftValue, TLeftSpec> const & left,
+            TRight const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<String<TLeftValue, TLeftSpec> >::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+template <typename TLeftValue, typename TRightValue, typename TRightSpec >
+inline bool
+operator != (TLeftValue * left,
+             String<TRightValue, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+    typename Comparator<String<TRightValue, TRightSpec> >::Type _lex(left, right);
+    return isNotEqual(_lex);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight>
+inline bool
+operator < (String<TLeftValue, TLeftSpec> const & left,
+            TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isLess(left, right, typename DefaultPrefixOrder<String<TLeftValue, TLeftSpec> >::Type());
+}
+template <typename TLeftValue, typename TRightValue, typename TRightSpec >
+inline bool
+operator < (TLeftValue * left,
+             String<TRightValue, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+    return isLess(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight>
+inline bool
+operator <= (String<TLeftValue, TLeftSpec> const & left,
+             TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isLessOrEqual(left, right, typename DefaultPrefixOrder<String<TLeftValue, TLeftSpec> >::Type());
+}
+template <typename TLeftValue, typename TRightValue, typename TRightSpec >
+inline bool
+operator <= (TLeftValue * left,
+             String<TRightValue, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+    return isLessOrEqual(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight>
+inline bool
+operator > (String<TLeftValue, TLeftSpec> const & left,
+        TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreater(left, right, typename DefaultPrefixOrder<String<TLeftValue, TLeftSpec> >::Type());
+}
+template <typename TLeftValue, typename TRightValue, typename TRightSpec >
+inline bool
+operator > (TLeftValue * left,
+             String<TRightValue, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreater(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TLeftValue, typename TLeftSpec, typename TRight>
+inline bool
+operator >= (String<TLeftValue, TLeftSpec> const & left,
+        TRight const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreaterOrEqual(left, right, typename DefaultPrefixOrder<String<TLeftValue, TLeftSpec> >::Type());
+}
+template <typename TLeftValue, typename TRightValue, typename TRightSpec >
+inline bool
+operator >= (TLeftValue * left,
+             String<TRightValue, TRightSpec> const & right)
+{
+SEQAN_CHECKPOINT
+    return isGreaterOrEqual(left, right, typename DefaultPrefixOrder<TLeftValue *>::Type());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// stream operators
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename TValue, typename TSpec>
+inline TStream &
+operator << (TStream & target,
+             String<TValue, TSpec> const & source)
+{
+SEQAN_CHECKPOINT
+    write(target, source);
+    return target;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TStream, typename TValue, typename TSpec>
+inline TStream &
+operator >> (TStream & source,
+             String<TValue, TSpec> & target)
+{
+SEQAN_CHECKPOINT
+    read(source, target);
+    return source;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+//////////////////////////////////////////////////////////////////////////////
+// Converter
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TTarget, typename TSource, typename TSpec>
+struct Value<String<Convert<TTarget, TSource>, TSpec> >:
+    Value< String<TSource, TSpec> >
+{
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TAccessor, typename TConverter>
+struct AccessorConverter_
+{
+    typedef T Type;
+};
+template <typename T, typename TAccessor, typename TConverter>
+struct AccessorConverter_<T, TAccessor &, typename TConverter &>
+{
+    typedef T & Type;
+};
+
+template <typename TTarget, typename TSource, typename TSpec>
+struct GetValue<String<Converter<TTarget, TSource>, TSpec> >:
+    AccessorConverter_<
+        TTarget,
+        typename GetValue<String<TSource, TSpec> >::Type,
+        typename Converter<TTarget, TSource>::Type
+    >
+{
+};
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/string_block.h b/src/SeqAn-1.3/seqan/sequence/string_block.h
new file mode 100644
index 0000000..d21d7db
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_block.h
@@ -0,0 +1,615 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// Implementation of the Block String which allows constant-sized, e.g.
+// linear expansion
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_GRAPH_STACK_H
+#define SEQAN_HEADER_GRAPH_STACK_H
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+template<unsigned int SPACE = 4096>
+struct Block;
+
+/**
+.Spec.Block String:
+..cat:Strings
+..general:Class.String
+..summary:String optimized for push_back, top, and pop (Stack behaviour).
+..signature:String<TValue, Block<size> >
+..param.TValue:The value type, that is the type of the items/characters stored in the string.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.size:A positive integer that specifies the number of values in each allocated block.
+...remarks: Size should be a power of 2, e.g., 1024.
+..include:seqan/sequence.h
+*/
+template<typename TValue, unsigned int SPACE>
+class String<TValue, Block<SPACE> >
+{
+    typedef String<TValue, Array<SPACE> >               TBlock;
+    typedef TBlock*                                     PBlock;
+    typedef Allocator< SinglePool<sizeof(TBlock)> >     TAllocator;
+
+public:
+    typedef typename Iterator<TBlock, Standard>::Type   TBlockIter;
+    typedef String<PBlock>                              TBlockTable;
+
+    TBlockTable     blocks;
+    TBlockIter      blockFirst, blockLast;  // current block boundaries
+    TBlockIter      lastValue;              // pointer to top value
+    TAllocator      alloc;
+
+    String():
+        blockFirst(TBlockIter()),
+        blockLast(TBlockIter()),
+        lastValue(TBlockIter()) {}
+
+    template<typename TSource>
+    String(TSource const& source):
+        blockFirst(TBlockIter()),
+        blockLast(TBlockIter()),
+        lastValue(TBlockIter())
+    {
+    SEQAN_CHECKPOINT
+        assign(*this, source);
+    }
+
+    String(String const & source):
+        blockFirst(TBlockIter()),
+        blockLast(TBlockIter()),
+        lastValue(TBlockIter())
+    {
+    SEQAN_CHECKPOINT
+        assign(*this, source);
+    }
+
+    template<typename TSource>
+    String & operator =(TSource const& source)
+    {
+    SEQAN_CHECKPOINT
+        assign(*this, source);
+        return *this;
+    }
+
+    String & operator =(String const& _other)
+    {
+    SEQAN_CHECKPOINT
+        if (this == &_other) return *this;
+        assign(*this, _other);
+        return *this;
+    }
+
+    ~String()
+    {
+        clear(*this);
+    }
+
+    // ----------------------------------------------------------------------
+    // Subscription operators; have to be defined in class def.
+    // ----------------------------------------------------------------------
+
+    template<typename TPos>
+    inline typename Reference<String>::Type
+        operator[] (TPos pos)
+    {
+    SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+
+    template<typename TPos>
+    inline typename Reference<String const>::Type
+        operator[] (TPos pos) const
+    {
+    SEQAN_CHECKPOINT
+        return value(*this, pos);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Metafunction DefaultOverflowImplicit
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE>
+struct DefaultOverflowImplicit< String<TValue, Block<SPACE> > >
+{
+    typedef Generous Type;
+};
+
+// ----------------------------------------------------------------------------
+// Metafunction Iterator
+// ----------------------------------------------------------------------------
+
+///.Metafunction.Iterator.param.T.type:Spec.Block String
+
+template<typename TValue, unsigned int SPACE>
+struct Iterator<String<TValue, Block<SPACE> >, Standard>
+{
+    typedef Iter<String<TValue, Block<SPACE> >, PositionIterator> Type;
+};
+
+template<typename TValue, unsigned int SPACE>
+struct Iterator<String<TValue, Block<SPACE> > const, Standard>
+{
+    typedef Iter<String<TValue, Block<SPACE> > const, PositionIterator> Type;
+};
+
+template<typename TValue, unsigned int SPACE>
+struct Iterator<String<TValue, Block<SPACE> >, Rooted>
+{
+    typedef Iter<String<TValue, Block<SPACE> >, PositionIterator> Type;
+};
+
+template<typename TValue, unsigned int SPACE>
+struct Iterator<String<TValue, Block<SPACE> > const, Rooted>
+{
+    typedef Iter<String<TValue, Block<SPACE> > const, PositionIterator> Type;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Function begin()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE, typename TSpec>
+inline typename Iterator<String<TValue, Block<SPACE> >, Tag<TSpec> const >::Type
+begin(String<TValue, Block<SPACE> > & me, Tag<TSpec> const)
+{
+    SEQAN_CHECKPOINT;
+    return Iter<String<TValue, Block<SPACE> >, PositionIterator>(me, 0);
+}
+
+template<typename TValue, unsigned int SPACE, typename TSpec>
+inline typename Iterator<String<TValue, Block<SPACE> > const, Tag<TSpec> const>::Type
+begin(String<TValue, Block<SPACE> > const & me, Tag<TSpec> const)
+{
+    SEQAN_CHECKPOINT;
+    return Iter<String<TValue, Block<SPACE> > const, PositionIterator>(me, 0);
+}
+
+// ----------------------------------------------------------------------------
+// Function end()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE, typename TSpec>
+inline typename Iterator<String<TValue, Block<SPACE> >, Tag<TSpec> const >::Type
+end(String<TValue, Block<SPACE> > & me, Tag<TSpec> const)
+{
+    SEQAN_CHECKPOINT;
+    return Iter<String<TValue, Block<SPACE> >, PositionIterator>(me, length(me));
+}
+
+template<typename TValue, unsigned int SPACE, typename TSpec>
+inline typename Iterator<String<TValue, Block<SPACE> > const, Tag<TSpec> const>::Type
+end(String<TValue, Block<SPACE> > const & me, Tag<TSpec> const)
+{
+    SEQAN_CHECKPOINT;
+    return Iter<String<TValue, Block<SPACE> > const, PositionIterator>(me, length(me));
+}
+
+// ----------------------------------------------------------------------------
+// Function assign()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE, typename TSource>
+inline void
+assign(
+    String<TValue, Block<SPACE> >& target,
+    TSource const& source)
+{
+    SEQAN_CHECKPOINT;
+    clear(target);
+    typedef typename Iterator<TSource const, Standard>::Type TIter;
+    for(TIter it = begin(source, Standard()); !atEnd(it, source); goNext(it))
+        push(target, *it);
+}
+
+// ----------------------------------------------------------------------------
+// Function value()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE, typename TPos>
+inline typename Reference<String<TValue, Block<SPACE> > >::Type
+value(
+    String<TValue, Block<SPACE> >& stack,
+    TPos const pos)
+{
+    SEQAN_CHECKPOINT;
+    return value(*(stack.blocks[pos / SPACE]), pos % SPACE);
+}
+
+template<typename TValue, unsigned int SPACE, typename TPos>
+inline typename Reference<String<TValue, Block<SPACE> > >::Type
+value(
+    String<TValue, Block<SPACE> > const& stack,
+    TPos const pos)
+{
+    SEQAN_CHECKPOINT;
+    return value(*(stack.blocks[pos / SPACE]), pos % SPACE);
+}
+
+// ----------------------------------------------------------------------------
+// Function atEnd()
+// ----------------------------------------------------------------------------
+
+// TODO(holtgrew): Probably wrong place?
+template<typename TValue, unsigned int SPACE, typename TIteratorSpec>
+inline bool
+atEnd(
+    Iter<String<TValue, Block<SPACE> >, TIteratorSpec>& it,
+    String<TValue, Block<SPACE> >& container)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<String<TValue, Block<SPACE> >, Standard>::Type TIter;
+    TIter endIt = end(container, Standard());
+    return (it == endIt);
+}
+
+// ----------------------------------------------------------------------------
+// Function clear()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE>
+inline void
+clear(String<TValue, Block<SPACE> >& me)
+{
+    SEQAN_CHECKPOINT;
+    typedef String<TValue, Block<SPACE> >           TBlockString;
+    typedef typename TBlockString::TBlockTable      TBlockTable;
+    typedef typename Iterator<TBlockTable, Standard>::Type  TIter;
+
+    TIter it = begin(me.blocks), itEnd = end(me.blocks);
+    while (it != itEnd) {
+        deallocate(me.alloc, *it, 1);
+        ++it;
+    }
+    clear(me.blocks);
+    me.lastValue = me.blockLast = typename TBlockString::TBlockIter();
+}
+
+// ----------------------------------------------------------------------------
+// Function resize()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE, typename TSize2, typename TExpand>
+inline typename Size< String<TValue, Block<SPACE> > >::Type
+resize(String<TValue, Block<SPACE> > & me,
+    TSize2 new_length,
+    Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    typedef String<TValue, Block<SPACE> >           TBlockString;
+    typedef typename Size<TBlockString>::Type       TSize;
+    TSize len = length(me);
+
+    if ((TSize)new_length > len)
+    {
+        for (; len < (TSize)new_length; ++len) push(me);
+    }
+    else if ((TSize)new_length < len)
+    {
+        for (; len > (TSize)new_length; --len) pop(me);
+    }
+    return new_length;
+}
+
+template<typename TValue, unsigned int SPACE, typename TSize2>
+inline typename Size< String<TValue, Block<SPACE> > >::Type
+resize(String<TValue, Block<SPACE> > & me,
+    TSize2 new_length,
+    Limit)
+{
+    SEQAN_CHECKPOINT;
+    typedef String<TValue, Block<SPACE> >           TBlockString;
+    typedef typename Size<TBlockString>::Type       TSize;
+    TSize len = length(me);
+
+    if (new_length > capacity(me)) new_length = capacity(me);
+
+    if (new_length > len)
+    {
+        TValue val;
+        for (; len < new_length; ++len) push(me, val);
+    }
+    else if (new_length < len)
+    {
+        for (; len > new_length; --len) pop(me);
+    }
+    return new_length;
+}
+
+// ----------------------------------------------------------------------------
+// Function reserve()
+// ----------------------------------------------------------------------------
+
+// TODO(holtgrew): Why is this only a dummy implementation?
+///.Function.reserve.param.object.type:Spec.Block String
+/*
+template <typename TValue, unsigned int SPACE, typename TSize, typename TExpand>
+inline typename Size< String<TValue, Block<SPACE> > >::Type
+reserve(
+    String<TValue, Block<SPACE> >& me,
+    TSize new_capacity,
+    Tag<TExpand> const tag)
+{
+SEQAN_CHECKPOINT
+    reserve(me.blocks, (new_capacity + SPACE - 1) / SPACE, tag);
+    return capacity(me.blocks) * SPACE;
+}
+*/
+
+// dummy implementation
+template<typename TValue, unsigned int SPACE, typename TSize, typename TExpand>
+inline typename Size< String<TValue, Block<SPACE> > >::Type
+reserve(String<TValue, Block<SPACE> > & /*me*/,
+    TSize new_capacity,
+    Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    return new_capacity;
+}
+
+// ----------------------------------------------------------------------------
+// Function append()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE, typename TSource, typename TExpand>
+inline void
+append(
+    String<TValue, Block<SPACE> >& me,
+    TSource const& source,
+    Tag<TExpand> const /*tag*/)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<TSource const, Standard>::Type TIter;
+    for(TIter it = begin(source, Standard()); !atEnd(it, source); goNext(it))
+        appendValue(me, *it);
+}
+
+// ----------------------------------------------------------------------------
+// Function appendValue()
+// ----------------------------------------------------------------------------
+
+///.Function.appendValue.param.target.type:Spec.Block String
+
+template<typename TValue, unsigned int SPACE, typename TVal, typename TExpand>
+inline void
+appendValue(
+    String<TValue, Block<SPACE> >& me,
+    TVal const& source,
+    Tag<TExpand> const tag)
+{
+    SEQAN_CHECKPOINT;
+    if (me.lastValue == me.blockLast) {
+        typename Size< String<TValue, Block<SPACE> > >::Type last = length(me.blocks);
+
+        resize(me.blocks, last + 1, tag);
+        allocate(me.alloc, me.blocks[last], 1);
+        me.lastValue = me.blockFirst = begin(*me.blocks[last]);
+        me.blockLast = (me.blockFirst + (SPACE - 1));
+    } else
+        ++me.lastValue;
+    valueConstruct(me.lastValue, source);
+}
+
+// ----------------------------------------------------------------------------
+// Function push()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE, typename TVal>
+inline void
+push(
+    String<TValue, Block<SPACE> >& me,
+    TVal const& source)
+{
+    appendValue(me, source);
+}
+
+template<typename TValue, unsigned int SPACE>
+inline void
+push(String<TValue, Block<SPACE> >& me)
+{
+    SEQAN_CHECKPOINT;
+    if (me.lastValue == me.blockLast) {
+        typename Size< String<TValue, Block<SPACE> > >::Type last = length(me.blocks);
+
+        resize(me.blocks, last + 1, typename DefaultOverflowImplicit<String<TValue, Block<SPACE> > >::Type());
+        allocate(me.alloc, me.blocks[last], 1);
+        me.lastValue = me.blockFirst = begin(*me.blocks[last]);
+        me.blockLast = (me.blockFirst + (SPACE - 1));
+    } else
+        ++me.lastValue;
+    valueConstruct(me.lastValue);
+}
+
+// ----------------------------------------------------------------------------
+// Function push_back()
+// ----------------------------------------------------------------------------
+
+// TODO(holtgrew): Breaks naming-conventions.
+template<typename TValue, unsigned int SPACE, typename TVal>
+inline void
+push_back(
+    String<TValue, Block<SPACE> >& me,
+    TVal const& source)
+{
+    appendValue(me, source);
+}
+
+// ----------------------------------------------------------------------------
+// Function top()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE>
+inline TValue &
+top(String<TValue, Block<SPACE> > & me)
+{
+    SEQAN_CHECKPOINT;
+    return *me.lastValue;
+}
+
+template<typename TValue, unsigned int SPACE>
+inline TValue const &
+top(String<TValue, Block<SPACE> > const& me)
+{
+    SEQAN_CHECKPOINT;
+    return *me.lastValue;
+}
+
+// ----------------------------------------------------------------------------
+// Function topPrev()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE>
+inline TValue &
+topPrev(String<TValue, Block<SPACE> > & me)
+{
+    SEQAN_CHECKPOINT;
+    if (me.lastValue != me.blockFirst)
+        return *(me.lastValue - 1);
+    else
+        return *(begin(*me.blocks[length(me.blocks) - 1]) + (SPACE - 1));
+}
+
+template<typename TValue, unsigned int SPACE>
+inline TValue const &
+topPrev(String<TValue, Block<SPACE> > const& me)
+{
+    SEQAN_CHECKPOINT;
+    if (me.lastValue != me.blockFirst)
+        return *(me.lastValue - 1);
+    else
+        return *(begin(*me.blocks[length(me.blocks) - 1]) + (SPACE - 1));
+}
+
+// ----------------------------------------------------------------------------
+// Function pop()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE>
+inline void
+pop(String<TValue, Block<SPACE> >& me)
+{
+    SEQAN_CHECKPOINT;
+    if (me.lastValue == me.blockFirst) {
+        typename Size< String<TValue, Block<SPACE> > >::Type last = length(me.blocks);
+
+        if (last) {
+            valueDestruct(me.lastValue);
+            deallocate(me.alloc, me.blocks[--last], 1);
+            resize(me.blocks, last);
+            if (last) {
+                me.blockFirst = begin(*me.blocks[--last]);
+                me.lastValue = me.blockLast = (me.blockFirst + (SPACE - 1));
+            }
+        }
+    } else {
+        valueDestruct(me.lastValue);
+        --me.lastValue;
+    }
+}
+
+// ----------------------------------------------------------------------------
+// Function pop_back()
+// ----------------------------------------------------------------------------
+
+// TODO(holtgrew): Breaks naming-conventions.
+template<typename TValue, unsigned int SPACE>
+inline void
+pop_back(String<TValue, Block<SPACE> >& me)
+{
+    SEQAN_CHECKPOINT;
+    pop(me);
+}
+
+// ----------------------------------------------------------------------------
+// Function empty()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE>
+inline bool
+empty(String<TValue, Block<SPACE> > const& me)
+{
+    SEQAN_CHECKPOINT;
+    return length(me.blocks) == 0;
+}
+
+// ----------------------------------------------------------------------------
+// Function length()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE>
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+length(String<TValue, Block<SPACE> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    if (length(me.blocks))
+        return (length(me.blocks) - 1) * SPACE + (me.lastValue - me.blockFirst) + 1;
+    else
+        return 0;
+}
+
+// ----------------------------------------------------------------------------
+// Function capacity()
+// ----------------------------------------------------------------------------
+
+template<typename TValue, unsigned int SPACE>
+inline typename Size<String<TValue, Block<SPACE> > >::Type
+capacity(String<TValue, Block<SPACE> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    if (length(me.blocks))
+        return length(me.blocks) * SPACE;
+    else
+        return 0;
+}
+
+} // namespace seqan
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/string_cstyle.h b/src/SeqAn-1.3/seqan/sequence/string_cstyle.h
new file mode 100644
index 0000000..2cb1035
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_cstyle.h
@@ -0,0 +1,943 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Implementation of the CStyle String specialization,
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_CSTYLE_H
+#define SEQAN_HEADER_SEQUENCE_CSTYLE_H
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+//////////////////////////////////////////////////////////////////////////////
+//string that exports an interface to cstyle strings.
+
+/**
+.Spec.CStyle String:
+..cat:Strings
+..general:Class.String
+..summary:Allows adaption of strings to C-style strings.
+..signature:String<TValue, CStyle>
+..param.TValue:The value type, that is the type of the items/characters stored in the string.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+...note:$TValue$ must be a @Concept.Simple Type at .
+..remarks:
+..text:Assigning a string $TValue *$ to a CStyle String will not create a copy of the string but just copy pointers.
+..remarks:
+...text:The purpose of this class is to access to the content of a sequence
+in a "zero terminated string" style.
+This can be useful if SeqAn classes has to be integrated in programs that use $char$ arrays
+to store strings.
+Instances of $String<TValue, CStyle>$ can implicitely converted to a $TValue *$ that
+points to a zero terminated CStyle of $TValue$.
+...text:The stored c-style string object can be set by constructors or assignment.
+The content of a c-style string can eighter be stored in a separate buffer, that is the source string
+is copied. Or the buffer of the source string itself is used instead, in this case the c-style string
+depends on the source string and gets invalid as soon as the buffer of the source string is destroyed.
+...text:Hence, this class is a kind of adaptor from an arbitrary SeqAn string to char arrays.
+Of course, the opposite way is possible too:
+Read @Adaption.char array.here@ about adapting char arrays to SeqAn strings.
+..example:
+...code:// Create a string str:
+String<char> str = "this is a test string";
+
+// Create a c-style string object for str:
+String<char, CStyle> cStyle = str;
+
+// Now use cStyle as char array:
+strcmp(cStyle, "compare it to this string");
+...text:If the c-style string is needed only temporarily, the function $toCString$ can be used:
+...code:String<char> str = "this is a test string";
+strcmp(toCString(str), "compare it to this string");
+..include:seqan/sequence.h
+*/
+
+struct CStyle;
+
+#ifdef PLATFORM_WINDOWS_VS
+#pragma warning( push )
+// Disable warning C4521 locally (multiple copy constructors).
+#pragma warning( disable: 4521 )
+// Disable warning C4522 locally (multiple assignment operators).
+#pragma warning( disable: 4522 )
+#endif  // PLATFORM_WINDOWS_VS
+
+template <typename TValue>
+class String <TValue, CStyle >
+{
+public:
+    TValue * data_begin;
+    TValue * data_end;
+    // If data_size > 0, then the buffer is owned by me and must be deallocated.
+    size_t data_size;
+
+public:
+    // TODO(holtgrew): Maybe better point to 0?
+    static TValue EMPTY_STRING;
+//____________________________________________________________________________
+
+public:
+    String():
+        data_begin(&EMPTY_STRING),
+        data_end(&EMPTY_STRING),
+        data_size(0)
+    {
+        SEQAN_CHECKPOINT;
+    }
+
+//____________________________________________________________________________
+
+    template <typename TString>
+    String(TString & str):
+        data_size(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, str);
+    }
+    template <typename TString>
+    String(TString const & str):
+        data_size(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, str);
+    }
+
+    String(String & str):
+        data_size(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, str);
+    }
+    String(String const & str):
+        data_size(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, str);
+    }
+
+    String(TValue * str):
+        data_begin(str),
+        data_end(end(str)),
+        data_size(0)
+    {
+        SEQAN_CHECKPOINT;
+    }
+
+//____________________________________________________________________________
+
+    template <typename TString>
+    String & operator = (TString & str)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, str);
+        return *this;
+    }
+    template <typename TString>
+    String & operator = (TString const & str)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, str);
+        return *this;
+    }
+    String & operator = (String & str)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, str);
+        return *this;
+    }
+    String & operator = (String const & str)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, str);
+        return *this;
+    }
+
+    ~String()
+    {
+        SEQAN_CHECKPOINT;
+        clear(*this);
+    }
+
+//____________________________________________________________________________
+
+    operator TValue * ()
+    {
+        SEQAN_CHECKPOINT;
+        return data_begin;
+    }
+
+    operator TValue const * () const
+    {
+        SEQAN_CHECKPOINT;
+        return data_begin;
+    }
+};
+
+// Define the static member
+template <typename TValue>
+TValue String<TValue, CStyle >::EMPTY_STRING = TValue();
+
+#ifdef PLATFORM_WINDOWS_VS
+// Reset warning state to previous one for C4521, C4522.
+#pragma warning( pop )
+#endif  // PLATFORM_WINDOWS_VS
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Metafunction DefaultOverflowImplicit
+// --------------------------------------------------------------------------
+
+template <typename TValue>
+struct DefaultOverflowImplicit<String<TValue, CStyle> >
+{
+    typedef Exact Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction IsContiguous
+// --------------------------------------------------------------------------
+
+template <typename TValue>
+struct IsContiguous< String<TValue, CStyle > >
+{
+    typedef True Type;
+    enum { VALUE = true };
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function move()
+// --------------------------------------------------------------------------
+
+template <typename TValue>
+inline void
+move(
+    String <TValue, CStyle > & target,
+    String <TValue, CStyle > & source)
+{
+    SEQAN_CHECKPOINT;
+    clear(target);
+
+    target.data_begin = source.data_begin;
+    target.data_end = source.data_end;
+    target.data_size = source.data_size;
+
+    source.data_begin = 0;
+    source.data_end = 0;
+    source.data_size = 0;
+}
+
+template <typename TValue>
+inline void
+move(
+    String <TValue, CStyle > & target,
+    String <TValue, CStyle > const & source)
+{
+    SEQAN_CHECKPOINT;
+    move(target, const_cast<String<TValue, CStyle> &>(source));
+}
+
+// --------------------------------------------------------------------------
+// Function begin()
+// --------------------------------------------------------------------------
+
+template <typename TValue>
+inline typename Iterator<String<TValue, CStyle >, Standard>::Type
+begin(String <TValue, CStyle > & me,
+    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_begin;
+}
+
+template <typename TValue>
+inline typename Iterator<String<TValue, CStyle > const, Standard>::Type
+begin(String <TValue, CStyle > const & me,
+    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_begin;
+}
+
+// --------------------------------------------------------------------------
+// Function _setBegin()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename TValue2>
+inline void
+_setBegin(String <TValue, CStyle > & me, TValue2 new_begin)
+{
+    SEQAN_CHECKPOINT;
+    me.data_begin = new_begin;
+}
+
+// --------------------------------------------------------------------------
+// Function end()
+// --------------------------------------------------------------------------
+
+template <typename TValue>
+inline typename Iterator<String <TValue, CStyle >, Standard>::Type
+end(String <TValue, CStyle > & me,
+    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_end;
+}
+
+template <typename TValue>
+inline typename Iterator<String <TValue, CStyle > const, Standard>::Type
+end(String <TValue, CStyle > const & me,
+    Standard)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_end;
+}
+
+// --------------------------------------------------------------------------
+// Function _setEnd()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename TValue2>
+inline void
+_setEnd(String <TValue, CStyle > & me, TValue2 new_end)
+{
+    SEQAN_CHECKPOINT;
+    me.data_end = new_end;
+    if (new_end != NULL)
+        *new_end = TValue(); //??? ist das wirklich sinnvoll fuer typen, die weder char noch wchar_t sind?
+}
+
+// --------------------------------------------------------------------------
+// Function capacity()
+// --------------------------------------------------------------------------
+
+template <typename TValue>
+inline size_t
+capacity(String <TValue, CStyle > const & me)
+{
+    SEQAN_CHECKPOINT;
+    if (me.data_size) return me.data_size -1;
+    else return me.data_end - me.data_begin;
+}
+
+// --------------------------------------------------------------------------
+// Function _reallocateStorage()
+// --------------------------------------------------------------------------
+
+///.Internal._reallocateStorage.param.object.type:Spec.CStyle String
+///.Internal._reallocateStorage.param.resize_tag.remarks:@Spec.CStyle String@ only supports @Tag.Overflow Strategy.exact at .
+//this function works also for dependent buffers
+template <typename TValue>
+inline TValue *
+_reallocateStorage(
+    String <TValue, CStyle > & me,
+    size_t new_capacity,
+    Exact)
+{
+    SEQAN_CHECKPOINT;
+    TValue * _returnValue;
+    if (me.data_size)
+    {//dependent
+        _returnValue = me.data_begin;
+    }
+    else
+    {//not dependent
+        _returnValue = 0;
+    }
+
+    me.data_size = new_capacity + 1; //+1 for zero termination
+    allocate(me, me.data_begin, me.data_size, TagAllocateStorage());
+    return _returnValue;
+}
+
+// --------------------------------------------------------------------------
+// Function _deallocateStorage()
+// --------------------------------------------------------------------------
+
+///.Internal._deallocateStorage.param.object.type:Spec.CStyle String
+
+template <typename TValue>
+inline void
+_deallocateStorage(
+    String <TValue, CStyle > & me,
+    TValue * ptr,
+    size_t capacity)
+{
+    SEQAN_CHECKPOINT;
+    size_t size = capacity + 1;
+    deallocate(me, ptr, size, TagAllocateStorage());
+}
+
+// --------------------------------------------------------------------------
+// Function dependent()
+// --------------------------------------------------------------------------
+
+/**
+.Function.dependent:
+..summary:Test whether object depends on other objects.
+..cat:Dependent Objects
+..signature:bool dependent(object)
+..param.object:An object.
+...type:Spec.CStyle String
+..returns:$true$ if $object$ depends one some other object, $false$ otherwise.
+..remarks:An object "$a$" depends on another object "$b$", if changing "$b$" can invalidate "$a$";
+especially the destruction of "$b$" invalidates "$a$".
+..include:seqan/sequence.h
+*/
+template <typename TValue>
+inline bool
+dependent(String <TValue, CStyle > & me)
+{
+    SEQAN_CHECKPOINT;
+    return (me.data_size == 0);
+}
+
+// --------------------------------------------------------------------------
+// Function assign()
+// --------------------------------------------------------------------------
+
+//special implementation for char array sources
+template <typename TValue>
+inline void
+assign(String <TValue, CStyle > & target,
+    TValue * source)
+{
+    SEQAN_CHECKPOINT;
+    clear(target);
+    target.data_begin = source;
+    target.data_end = end(source);
+}
+
+// --------------------------------------------------------------------------
+// Function assign()
+// --------------------------------------------------------------------------
+
+template <typename TTargetValue, typename TSource, typename TExpand>
+inline void
+assign(String<TTargetValue, CStyle> & target,
+       TSource & source,
+       Tag<TExpand> const tag)
+{
+    SEQAN_CHECKPOINT;
+    create(target, source, tag);
+}
+
+template <typename TTargetValue, typename TSource, typename TExpand>
+inline void
+assign(String<TTargetValue, CStyle> & target,
+       TSource const & source,
+       Tag<TExpand> const tag)
+{
+    SEQAN_CHECKPOINT;
+    create(target, source, tag);
+}
+
+template <typename TTargetValue, typename TSource, typename TSize, typename TExpand>
+inline void
+assign(String<TTargetValue, CStyle> & target,
+       TSource & source,
+       TSize /*limit*/,
+       Tag<TExpand> const tag)
+{
+    SEQAN_CHECKPOINT;
+    create(target, source, tag);
+}
+
+template <typename TTargetValue, typename TSource, typename TSize, typename TExpand>
+inline void
+assign(String<TTargetValue, CStyle> & target,
+       TSource const & source,
+       TSize limit,
+       Tag<TExpand> const tag)
+{
+    SEQAN_CHECKPOINT;
+    create(target, source, limit, tag);
+}
+
+//this variant is a workaround for the "const array"-bug of VC++
+
+template <typename TTargetValue, typename TSourceValue, typename TExpand>
+inline void
+assign(String<TTargetValue, CStyle> & target,
+       TSourceValue const * source,
+       Tag<TExpand> const tag)
+{
+    SEQAN_CHECKPOINT;
+    create(target, source, tag);
+}
+
+template <typename TTargetValue, typename TSourceValue, typename TSize, typename TExpand>
+inline void
+assign(String<TTargetValue, CStyle> & target,
+       TSourceValue const * source,
+       TSize limit,
+       Tag<TExpand> const tag)
+{
+    SEQAN_CHECKPOINT;
+    create(target, source, limit, tag);
+}
+
+//If source is non-const String, then there could be the possibility
+//to use the source buffer
+
+template <typename TExpand, bool IS_CONTIGUOUS>
+struct AssignStringToStringArray_;
+
+template <typename TExpand>
+struct AssignStringToStringArray_<TExpand, true>
+{
+    template <typename TValue, typename TSourceSpec>
+    static inline void
+    assign_(String<TValue, CStyle> & target,
+        String<TValue, TSourceSpec> & source)
+    {
+        if (capacity(source) > length(source))
+        {//use source's buffer
+    SEQAN_CHECKPOINT;
+            clear(target);
+            _setBegin(target, begin(source));
+            _setEnd(target, end(source));
+        }
+        else
+        {
+            create(target, source, TExpand());
+        }
+    }
+
+//special treatment of char:
+//_computeSizeForCapacity is specialized for char such that there
+//is enough place for the zero termination
+
+    template <typename TSourceSpec>
+    static inline void
+    assign_(String<char, CStyle> & target,
+        String<char, TSourceSpec> & source)
+    {
+    SEQAN_CHECKPOINT;
+        clear(target);
+        typedef String<char, CStyle> TTarget;
+        typedef typename Iterator<TTarget>::Type TIterator;
+        _setBegin(target, TIterator(begin(source)));
+        _setEnd(target, TIterator(end(source)));
+    }
+};
+
+template <typename TExpand>
+struct AssignStringToStringArray_<TExpand, false>
+{
+    template <typename TValue, typename TSourceSpec>
+    static inline void
+    assign_(String<TValue, CStyle> & target,
+        String<TValue, TSourceSpec> & source)
+    {
+    SEQAN_CHECKPOINT;
+        create(target, source, TExpand());
+    }
+};
+
+template <typename TValue, typename TSourceSpec, typename TExpand>
+inline void
+assign(String<TValue, CStyle> & target,
+    String<TValue, TSourceSpec> & source,
+    Tag<TExpand> const)
+{
+    typedef String<TValue, TSourceSpec> TSource;
+    AssignStringToStringArray_<Tag<TExpand> const, IsContiguous<TSource>::VALUE>::assign_(target, source);
+}
+
+// --------------------------------------------------------------------------
+// Function clear()
+// --------------------------------------------------------------------------
+
+template <typename TValue>
+inline void
+clear(String<TValue, CStyle> & me)
+{
+    if (me.data_size)
+    {
+        SEQAN_CHECKPOINT
+        //          arrayDestruct(me, length(me));
+        deallocate(me, me.data_begin, me.data_size);
+        me.data_size = 0;
+    }
+    me.data_begin = me.data_end = &me.EMPTY_STRING;
+}
+
+// --------------------------------------------------------------------------
+// Function create()
+// --------------------------------------------------------------------------
+
+//see basic_holder
+/**
+.Function.create:
+..signature:create(target, source [, limit] [,resize_tag])
+..param.target: Gets a copy of the content of $source$.
+...type:Spec.CStyle String
+..param.source: Is copied to $target$.
+..param.limit: The maximal length of $target$ after the operation. (optional)
+..param.resize_tag: Specifies the strategy that is applied if $target$ has not enough capacity to store the complete content. (optional)
+...type:Tag.Overflow Strategy
+...default:Specified by @Metafunction.DefaultOverflowImplicit@ of the $target$ type.
+..remarks.text:It is guaranteed, that after calling this function $source$ and $target$ can be used independently.
+..see:Spec.CStyle String
+..include:seqan/sequence.h
+*/
+
+template <typename TExpand>
+struct CreateArrayStringExpand_
+{
+    template <typename TTarget, typename TSource>
+    static inline void
+    create_(TTarget & target,
+        TSource & source)
+    {
+        typename Size<TTarget>::Type source_length = length(source);
+        if (dependent(target) || (capacity(target) < source_length))
+        {
+    SEQAN_CHECKPOINT;
+            typename Size<TTarget>::Type old_target_capacity = capacity(target);
+            typename Value<TTarget>::Type * buf = _reallocateStorage(target, source_length, TExpand());
+            if (buf)
+            {
+                _deallocateStorage(target, buf, old_target_capacity);
+            }
+        }
+        if (length(source) > 0)
+        {
+            assignValue(begin(target, Standard()), 0); //set target length to 0
+            assign(begin(target, Standard()), source, Insist());
+            typedef typename Iterator<TTarget>::Type TTargetIterator;
+            _setEnd(target, TTargetIterator( begin(target) + source_length));
+        }
+    }
+
+    template <typename TTarget, typename TSource, typename TLimit>
+    static inline void
+    create_(TTarget & target,
+        TSource & source,
+        TLimit limit)
+    {
+        typename Size<TTarget>::Type copy_length = length(source);
+        if (limit < copy_length)
+        {
+            copy_length = limit;
+        }
+        if (dependent(target) || (capacity(target) < copy_length))
+        {
+    SEQAN_CHECKPOINT;
+            typename Size<TTarget>::Type old_target_capacity = capacity(target);
+            TTarget * buf = _reallocateStorage(target, copy_length, TExpand());
+            if (buf)
+            {
+                _deallocateStorage(target, buf, old_target_capacity);
+            }
+        }
+        assign(begin(target, Standard()), source, copy_length, Insist());
+        _setEnd(target, begin(target, Standard()) + copy_length);
+    }
+};
+
+template <typename TExpand>
+struct CreateArrayString_;
+
+template <>
+struct CreateArrayString_<Insist>
+{
+    template <typename TTarget, typename TSource>
+    static inline void
+    create_(TTarget & target,
+        TSource & source)
+    {
+    SEQAN_CHECKPOINT;
+        typename Size<TTarget>::Type source_length = length(source);
+        if (dependent(target))
+        {
+            TTarget * buf = _reallocateStorage(target, source_length, Exact());
+        }
+        assign(begin(target, Standard()), source, source_length, Insist());
+        _setEnd(target, begin(target, Standard()) + source_length);
+    }
+
+    template <typename TTarget, typename TSource, typename TSize>
+    static inline void
+    create_(TTarget & target,
+        TSource & source,
+        TSize limit)
+    {
+    SEQAN_CHECKPOINT;
+        typename Size<TTarget>::Type copy_size = length(source);
+        if (limit < copy_size)
+        {
+            copy_size = limit;
+        }
+        if (dependent(target))
+        {
+            TTarget * buf = _reallocateStorage(target, copy_size, Exact());
+        }
+        assign(begin(target, Standard()), source, copy_size, Insist());
+        _setEnd(target, begin(target, Standard()) + copy_size);
+    }
+};
+
+template <>
+struct CreateArrayString_<Limit>
+{
+    template <typename TTarget, typename TSource>
+    static inline void
+    create_(TTarget & target,
+        TSource & source)
+    {
+    SEQAN_CHECKPOINT;
+        CreateArrayString_<Insist>::create_(target, source, capacity(target));
+    }
+
+    template <typename TTarget, typename TSource, typename TSize>
+    static inline void
+    create_(TTarget & target,
+        TSource & source,
+        TSize & limit)
+    {
+    SEQAN_CHECKPOINT;
+        typename Size<TTarget>::Type copy_size = capacity(target);
+        if (copy_size > limit)
+        {
+            copy_size = limit;
+        }
+        CreateArrayString_<Insist>::create_(target, source, copy_size);
+    }
+};
+
+template <>
+struct CreateArrayString_<Exact>:
+    CreateArrayStringExpand_<Exact>
+{
+};
+
+template <>
+struct CreateArrayString_<Generous>:
+    CreateArrayStringExpand_<Generous>
+{
+};
+
+template <typename TTargetValue, typename TSource>
+inline void
+create(String<TTargetValue, CStyle> & target,
+       TSource & source)
+{
+    SEQAN_CHECKPOINT;
+    typedef String<TTargetValue, CStyle> TTarget;
+    create(target, source, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template <typename TTargetValue, typename TSource, typename TSize>
+inline void
+create(String<TTargetValue, CStyle> & target,
+       TSource & source,
+       TSize limit)
+{
+    SEQAN_CHECKPOINT;
+    typedef String<TTargetValue, CStyle> TTarget;
+    create(target, source, limit, typename DefaultOverflowImplicit<TTarget>::Type());
+}
+
+template <typename TTargetValue, typename TSource, typename TExpand>
+inline void
+create(String<TTargetValue, CStyle> & target,
+       TSource & source,
+       Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    CreateArrayString_<Tag<TExpand> const>::create_(target, source);
+}
+
+template <typename TTargetValue, typename TSource, typename TSize, typename TExpand>
+inline void
+create(String<TTargetValue, CStyle> & target,
+       TSource & source,
+       TSize limit,
+       Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    CreateArrayString_<Tag<TExpand> const>::create_(target, source, limit);
+}
+
+template <typename TTargetValue, typename TSource, typename TExpand>
+inline void
+create(String<TTargetValue, CStyle> & target,
+       TSource const & source,
+       Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    CreateArrayString_<Tag<TExpand> const>::create_(target, source);
+}
+
+template <typename TTargetValue, typename TSource, typename TSize, typename TExpand>
+inline void
+create(String<TTargetValue, CStyle> & target,
+       TSource const & source,
+       TSize limit,
+       Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    CreateArrayString_<Tag<TExpand> const>::create_(target, source, limit);
+}
+
+//this variant is a workaround for the "const array"-bug of VC++
+
+template <typename TTargetValue, typename TSourceValue, typename TExpand>
+inline void
+create(String<TTargetValue, CStyle> & target,
+       TSourceValue const * source,
+       Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    CreateArrayString_<Tag<TExpand> const>::create_(target, source);
+}
+
+template <typename TTargetValue, typename TSourceValue, typename TSize, typename TExpand>
+inline void
+create(String<TTargetValue, CStyle> & target,
+       TSourceValue const * source,
+       TSize limit,
+       Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    CreateArrayString_<Tag<TExpand> const>::create_(target, source, limit);
+}
+
+// --------------------------------------------------------------------------
+// Function toCString()
+// --------------------------------------------------------------------------
+
+/**
+.Function.toCString:
+..cat:Containers
+..summary:Access sequence as c-style string.
+..signature:toCString(object)
+..param.object:A string.
+...type:Class.String
+...type:Adaption.char array
+..returns:For strings that store their elements in a contiguous block (see @Metafunction.IsContiguous@)
+a pointer to first element of $object$ is returned.
+The last element is followed by a default constructed element.
+..remarks:If the alphabet of $object$ is $char$ or $wchar_t$ the return value is a c-style string representing the contents of $object$.
+Calling this function for non-contiguous containers will raise a compilation error.
+To create c-style strings for non-contiguous strings or strings with different alphabets, use a @Spec.CStyle String@ as an intermediate.
+..include:seqan/sequence.h
+*/
+
+template <typename TValue>
+inline TValue *
+toCString(TValue * me)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+
+template <typename TValue>
+inline TValue const *
+toCString(TValue const * me)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+
+template <typename TValue>
+inline TValue *
+toCString(String<TValue, CStyle> & me)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+
+template <typename TValue>
+inline TValue const *
+toCString(String<TValue, CStyle> const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me;
+}
+
+template <typename TValue, typename TSpec>
+inline TValue *
+_toCStringImpl(String<TValue, TSpec> & me, True)
+{
+    SEQAN_CHECKPOINT;
+    typename Size< String<TValue, TSpec> >::Type len = length(me);
+    if (len >= capacity(me))
+        reserve(me, len + 1);
+    if (end(me) != NULL)
+        *end(me) = TValue();
+    return begin(me);
+}
+
+// You called toCString with non-contiguous strings.
+// Convert to String<..., CStyle> and try again!
+template <typename TValue, typename TSpec>
+inline TValue *
+_toCStringImpl(String<TValue, TSpec> & me, False);
+
+
+template <typename TValue, typename TSpec>
+inline TValue *
+toCString(String<TValue, TSpec> & me)
+{
+    SEQAN_CHECKPOINT;
+    return _toCStringImpl(me, typename IsContiguous<String<TValue, TSpec> >::Type());
+}
+
+template <typename TValue, typename TSpec>
+inline TValue *
+toCString(String<TValue, TSpec> const & me)
+{
+    SEQAN_CHECKPOINT;
+    return toCString(const_cast<String<TValue, TSpec> &>(me));
+}
+
+} // namespace seqan
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/string_packed.h b/src/SeqAn-1.3/seqan/sequence/string_packed.h
new file mode 100644
index 0000000..f70ef8f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_packed.h
@@ -0,0 +1,1335 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// ==========================================================================
+// Implementation of the Packed String class.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_PACKED_H
+#define SEQAN_HEADER_SEQUENCE_PACKED_H
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+template <typename THostspec = Alloc<> >
+struct Packed;
+
+template <typename TPackedContainer>
+struct PackedConsts_;
+
+/**
+.Spec.Packed String:
+..cat:Strings
+..general:Class.String
+..summary:A string that stores as many values in one machine word as possible.
+..signature:String<TValue, Packed<THostspec> >
+..param.TValue:The value type, that is the type of the items/characters stored in the string.
+...remarks:Use @Metafunction.Value@ to get the value type for a given class.
+..param.THostspec:The specializing type.
+...remarks:This is the specialization of the host string that is used for storing the packed values.
+...default:@Spec.Alloc String.Alloc<>@
+..include:seqan/sequence.h
+*/
+
+/*???TODO Optimierungsm�glichkeiten:
+- _clearSpace kopiert Zeichenweise im Packed-String, und nicht im Host-String
+- _clearSpace verwendet resize, um den Host zu vergr��ern, d.h. der Inhalt wird eventuell doppelt kopiert.
+*/
+
+template <typename TValue, typename THostspec>
+class String<TValue, Packed<THostspec> >
+{
+public:
+    typedef typename Host<String>::Type THost;
+    typedef typename Size<String>::Type TSize;
+
+    THost data_host;
+    TSize data_length;
+
+    String():
+        data_length(0)
+    {
+        SEQAN_CHECKPOINT;
+    }
+
+    template <typename TSource>
+    String(TSource & source):
+        data_length(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+    }
+    template <typename TSource>
+    String(TSource const & source):
+        data_length(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+    }
+    String(String const & source):
+        data_length(0)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+    }
+
+    template <typename TSource>
+    String & operator =(TSource const & source)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+        return *this;
+    }
+    String & operator =(String const & source)
+    {
+        SEQAN_CHECKPOINT;
+        assign(*this, source);
+        return *this;
+    }
+
+    ~String()
+    {
+        SEQAN_CHECKPOINT;
+    }
+
+    // ----------------------------------------------------------------------
+    // Subscription operators; have to be defined in class def.
+    // ----------------------------------------------------------------------
+
+    template <typename TPos>
+    inline typename Reference<String>::Type
+    operator[](TPos pos)
+    {
+        SEQAN_CHECKPOINT;
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<String const>::Type 
+    operator[](TPos pos) const
+    {
+        SEQAN_CHECKPOINT;
+        return value(*this, pos);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Metafunction DefaultOverflowImplicit
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec>
+struct DefaultOverflowImplicit<String<TValue, Packed<THostspec> > >:
+    DefaultOverflowImplicit< typename Host<String<TValue, Packed<THostspec> > >::Type >
+{
+};
+
+template <typename TValue, typename THostspec>
+struct DefaultOverflowImplicit<String<TValue, Packed<THostspec> > const>:
+    DefaultOverflowImplicit< typename Host<String<TValue, Packed<THostspec> > const>::Type >
+{
+};
+
+// --------------------------------------------------------------------------
+// Metafunction DefaultOverflowExplicit
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec>
+struct DefaultOverflowExplicit<String<TValue, Packed<THostspec> > >:
+    DefaultOverflowExplicit< typename Host<String<TValue, Packed<THostspec> > >::Type >
+{
+};
+template <typename TValue, typename THostspec>
+struct DefaultOverflowExplicit<String<TValue, Packed<THostspec> > const>:
+    DefaultOverflowExplicit< typename Host<String<TValue, Packed<THostspec> > const>::Type >
+{
+};
+
+// --------------------------------------------------------------------------
+// Metafunction IsContiguous
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec>
+struct IsContiguous<String<TValue, Packed<THostspec> > >
+{
+    typedef False Type;
+    enum { VALUE = false };
+};
+
+// --------------------------------------------------------------------------
+// Metafunction Host
+// --------------------------------------------------------------------------
+
+///.Metafunction.Host.param.T.type:Spec.Packed String
+template <typename TValue, typename THostspec>
+struct Host<String<TValue, Packed<THostspec> > >
+{
+    typedef String<unsigned int, THostspec> Type;
+};
+
+template <typename TValue, typename THostspec>
+struct Host<String<TValue, Packed<THostspec> > const>
+{
+    typedef String<unsigned int, THostspec> const Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction GetValue
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec>
+struct GetValue<String<TValue, Packed<THostspec> > >:
+    Value<String<TValue, Packed<THostspec> > >
+{
+};
+
+template <typename TValue, typename THostspec>
+struct GetValue<String<TValue, Packed<THostspec> > const>:
+    Value<String<TValue, Packed<THostspec> > const>
+{
+};
+
+// --------------------------------------------------------------------------
+// Metafunction Reference
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec>
+struct Reference<String<TValue, Packed<THostspec> > >
+{
+    typedef typename Iterator<String<TValue, Packed<THostspec> >, Standard>::Type TIterator;
+    typedef Proxy<IteratorProxy<TIterator> > Type;
+};
+
+template <typename TValue, typename THostspec>
+struct Reference<String<TValue, Packed<THostspec> > const>
+{
+    typedef typename Iterator<String<TValue, Packed<THostspec> > const, Standard>::Type TIterator;
+    typedef Proxy<IteratorProxy<TIterator> > Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction Size
+// --------------------------------------------------------------------------
+
+/*
+template <typename TValue, typename THostspec>
+struct Size<String<TValue, Packed<THostspec> > >
+{
+    typedef __int64 Type;
+};
+template <typename TValue, typename THostspec>
+struct Size<String<TValue, Packed<THostspec> > const>
+{
+    typedef __int64 Type;
+};
+*/
+
+// --------------------------------------------------------------------------
+// Metafunction PackedConsts_
+// --------------------------------------------------------------------------
+
+template <typename TPackedContainer>
+struct PackedConsts_
+{
+    typedef typename Value<TPackedContainer>::Type TValue;
+    typedef typename Host<TPackedContainer>::Type THost;
+    typedef typename Value<THost>::Type THostValue;
+
+    enum
+    {
+        BITS_PER_VALUE = BitsPerValue<TValue>::VALUE,
+        BITS_PER_HOST_VALUE = BitsPerValue<THostValue>::VALUE,
+        VALUES_PER_WORD = (BITS_PER_VALUE > BITS_PER_HOST_VALUE) ? 1 : (BITS_PER_HOST_VALUE / BITS_PER_VALUE),
+        VALUE_MASK = (1 << BITS_PER_VALUE) - 1,
+        MAX_BIT_POS = (VALUES_PER_WORD - 1) * BITS_PER_VALUE
+    };
+
+    static typename Size<THost>::Type
+    toHostLength(typename Size<TPackedContainer>::Type len)
+    {
+        return (len + VALUES_PER_WORD - 1) / VALUES_PER_WORD;
+    }
+};
+
+// --------------------------------------------------------------------------
+// Metafunction TempCopy_
+// --------------------------------------------------------------------------
+
+// Note: this works only, if the copy assignment is done without using TempCopy_.
+template <typename TValue, typename THostspec>
+struct TempCopy_<String<TValue, Packed<THostspec> > >
+{
+    typedef String<TValue, Packed<THostspec> > Type;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function host
+// --------------------------------------------------------------------------
+
+///.Function.host.param.object.type:Spec.Packed String
+
+template <typename TValue, typename THostspec>
+inline typename Host<String<TValue, Packed<THostspec> > >::Type &
+host(String<TValue, Packed<THostspec> > & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_host;
+}
+
+template <typename TValue, typename THostspec>
+inline typename Host<String<TValue, Packed<THostspec> > const>::Type const &
+host(String<TValue, Packed<THostspec> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_host;
+}
+
+// --------------------------------------------------------------------------
+// Function length
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec>
+inline typename Size<String<TValue, Packed<THostspec> > >::Type
+length(String<TValue, Packed<THostspec> > & me) 
+{
+    SEQAN_CHECKPOINT;
+    return me.data_length;
+}
+
+template <typename TValue, typename THostspec>
+inline typename Size<String<TValue, Packed<THostspec> > const>::Type
+length(String<TValue, Packed<THostspec> > const & me) 
+{
+    SEQAN_CHECKPOINT;
+    return me.data_length;
+}
+
+// --------------------------------------------------------------------------
+// Function _setLength
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec, typename TSize>
+inline void 
+_setLength(
+    String<TValue, Packed<THostspec> > & me, 
+    TSize new_length)
+{
+    SEQAN_CHECKPOINT;
+    typedef String<TValue, Packed<THostspec> > TString;
+    me.data_length = new_length;
+    _setLength(host(me), PackedConsts_<TString>::toHostLength(new_length));
+}
+
+// --------------------------------------------------------------------------
+// Function _assignCopyPackedString()
+// --------------------------------------------------------------------------
+
+// optimized variant for copy assignment. The host sequence is copied instead of
+// copying the packed string value by value.
+template <typename TTarget, typename TSource, typename TTag>
+inline void 
+_assignCopyPackedString(TTarget & target,
+                           TSource & source,
+                           Tag<TTag> const tag)
+{
+    typedef typename Size<TTarget>::Type TSize2;
+
+    assign(host(target), host(source), tag);
+    TSize2 new_length_limit = length(host(target)) * PackedConsts_<TTarget>::VALUES_PER_WORD;
+    TSize2 new_length = length(source);
+    if (new_length > new_length_limit)
+    {
+        new_length = new_length_limit;
+    }
+    _setLength(target, new_length);
+}
+
+template <typename TTarget, typename TSource, typename TSize, typename TTag>
+inline void 
+_assignCopyPackedString(TTarget & target,
+                           TSource & source,
+                           TSize limit,
+                           Tag<TTag> const tag)
+{
+    typedef typename Size<TTarget>::Type TSize2;
+
+    TSize2 host_limit = PackedConsts_<TTarget>::toHostLength(limit);
+    assign(host(target), host(source), host_limit, tag);
+    TSize2 new_length_limit = length(host(target)) * PackedConsts_<TTarget>::VALUES_PER_WORD;
+    TSize2 new_length = length(source);
+    if (new_length > new_length_limit)
+    {
+        new_length = new_length_limit;
+    }
+    if (new_length > limit)
+    {
+        new_length = limit;
+    }
+    _setLength(target, new_length);
+}
+
+// --------------------------------------------------------------------------
+// Function assign()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec, typename TTag>
+inline void 
+assign(String<TValue, Packed<THostspec> > & target,
+       String<TValue, Packed<THostspec> > & source,
+       Tag<TTag> const tag)
+{
+    _assignCopyPackedString(target, source, tag);
+}
+
+template <typename TValue, typename THostspec, typename TTag>
+inline void 
+assign(String<TValue, Packed<THostspec> > & target,
+       String<TValue, Packed<THostspec> > const & source,
+       Tag<TTag> const tag)
+{
+    _assignCopyPackedString(target, source, tag);
+}
+
+template <typename TValue, typename THostspec, typename TSize, typename TTag>
+void assign(String<TValue, Packed<THostspec> > & target,
+            String<TValue, Packed<THostspec> > & source,
+            TSize limit,
+            Tag<TTag> const tag)
+{
+    _assignCopyPackedString(target, source, limit, tag);
+}
+template <typename TValue, typename THostspec, typename TSize, typename TTag>
+void assign(String<TValue, Packed<THostspec> > & target,
+            String<TValue, Packed<THostspec> > const & source,
+            TSize limit,
+            Tag<TTag> const tag)
+{
+    _assignCopyPackedString(target, source, limit, tag);
+}
+
+// --------------------------------------------------------------------------
+// Function id()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec>
+inline void const * 
+id(String<TValue, Packed<THostspec> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    return id(host(me));
+}
+
+// --------------------------------------------------------------------------
+// Function iter()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec, typename TPos, typename TTag>
+inline typename Iterator<String<TValue, Packed<THostspec> >, Tag<TTag> const>::Type 
+iter(String<TValue, Packed<THostspec> > & me,
+     TPos pos_,
+     Tag<TTag> const)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<String<TValue, Packed<THostspec> >, Tag<TTag> const>::Type TIterator;
+    return TIterator(me, pos_);
+}
+
+template <typename TValue, typename THostspec, typename TPos, typename TTag>
+inline typename Iterator<String<TValue, Packed<THostspec> > const, Tag<TTag> const>::Type 
+iter(String<TValue, Packed<THostspec> > const & me,
+     TPos pos_,
+     Tag<TTag> const)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<String<TValue, Packed<THostspec> > const, Tag<TTag> const>::Type TIterator;
+    return TIterator(me, pos_);
+}
+
+// --------------------------------------------------------------------------
+// Function begin()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec, typename TTag>
+inline typename Iterator<String<TValue, Packed<THostspec> >, Tag<TTag> const>::Type 
+begin(String<TValue, Packed<THostspec> > & me,
+      Tag<TTag> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    return iter(me, 0, tag_);
+}
+
+template <typename TValue, typename THostspec, typename TTag>
+inline typename Iterator<String<TValue, Packed<THostspec> > const, Tag<TTag> const>::Type 
+begin(String<TValue, Packed<THostspec> > const & me,
+      Tag<TTag> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    return iter(me, 0, tag_);
+}
+
+// --------------------------------------------------------------------------
+// Function end()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec, typename TTag>
+inline typename Iterator<String<TValue, Packed<THostspec> >, Tag<TTag> const>::Type 
+end(String<TValue, Packed<THostspec> > & me,
+    Tag<TTag> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    return iter(me, length(me), tag_);
+}
+
+template <typename TValue, typename THostspec, typename TTag>
+inline typename Iterator<String<TValue, Packed<THostspec> > const, Tag<TTag> const>::Type 
+end(String<TValue, Packed<THostspec> > const & me,
+    Tag<TTag> const tag_)
+{
+    SEQAN_CHECKPOINT;
+    return iter(me, length(me), tag_);
+}
+
+// --------------------------------------------------------------------------
+// Function value()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec, typename TPos>
+inline typename Reference<String<TValue, Packed<THostspec> > >::Type
+value(String<TValue, Packed<THostspec> > & me, 
+      TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    
+    return *iter(me, pos, Standard());
+} 
+
+template <typename TValue, typename THostspec, typename TPos>
+inline typename Reference<String<TValue, Packed<THostspec> > const>::Type
+value(String<TValue, Packed<THostspec> > const & me, 
+      TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    
+    return *iter(me, pos, Standard());
+} 
+
+// --------------------------------------------------------------------------
+// Function capacity()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec>
+inline typename Size<String<TValue, Packed<THostspec> > const>::Type
+capacity(String<TValue, Packed<THostspec> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Size<String<TValue, Packed<THostspec> > const>::Type TSize;
+    TSize len = capacity(host(me));
+    len *= PackedConsts_<String<TValue, Packed<THostspec> > >::VALUES_PER_WORD;
+    return len;
+}
+
+// --------------------------------------------------------------------------
+// Function clear()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename THostspec>
+inline void 
+clear(String<TValue, Packed<THostspec> > & me)
+{
+    SEQAN_CHECKPOINT;
+    clear(host(me));
+    _setLength(me, 0);
+}
+
+// --------------------------------------------------------------------------
+// Function _clearSpace()
+// --------------------------------------------------------------------------
+
+//implementation for all expand tags other than "limit"
+template <typename TExpand>
+struct ClearSpaceStringPacked_
+{
+    template <typename T>
+    static inline typename Size<T>::Type
+    _clearSpace_(
+        T & seq, 
+        typename Size<T>::Type size)
+    {
+    SEQAN_CHECKPOINT;
+        typedef typename Size<T>::Type TSize;
+        TSize wanted_host_length = PackedConsts_<T>::toHostLength(size);
+        TSize new_host_length = resize(host(seq), wanted_host_length, TExpand());
+        if (new_host_length < wanted_host_length)
+        {
+            size = new_host_length * PackedConsts_<T>::VALUES_PER_WORD;
+        }
+        _setLength(seq, size);
+        return size;
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type 
+    _clearSpace_(
+        T & seq, 
+        typename Size<T>::Type size,
+        typename Size<T>::Type limit)
+    {
+        if (limit < size)
+        {
+    SEQAN_CHECKPOINT;
+            size = limit;
+        }
+        return _clearSpace_(seq, limit);
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type 
+    _clearSpace_(
+        T & seq, 
+        typename Size<T>::Type size, 
+        typename Size<T>::Type start, 
+        typename Size<T>::Type end)
+    {
+    SEQAN_CHECKPOINT;
+        return _clearSpace_(seq, size, start, end, maxValue<typename Size<T>::Type >());
+    }
+
+    template <typename T>
+    static typename Size<T>::Type 
+    _clearSpace_(
+        T & seq, 
+        typename Size<T>::Type size, 
+        typename Size<T>::Type start, 
+        typename Size<T>::Type end, 
+        typename Size<T>::Type limit)
+    {
+    SEQAN_CHECKPOINT;
+//??? TODO: This function can be accelerated this way: 
+//              - move values in host
+//              - avoid double moving of the rest-part if "resize" allocates a new block
+
+        typedef typename Size<T>::Type TSize;
+        typedef typename Iterator<T, Standard>::Type TIterator;
+
+        TSize old_length = length(seq);
+        TSize old_size = end - start;
+        TSize wanted_new_length = old_length + size - old_size;
+
+        if (wanted_new_length > limit)
+        {
+            wanted_new_length = limit;
+        }
+
+        TSize wanted_host_length = PackedConsts_<T>::toHostLength(wanted_new_length);
+        TSize new_host_length = resize(host(seq), wanted_host_length, TExpand());
+
+        TSize new_length;
+        if (new_host_length < wanted_host_length)
+        {
+            new_length = new_host_length * PackedConsts_<T>::VALUES_PER_WORD;
+            if (new_length <= start + size)
+            {
+                goto FINISH;
+            }
+            old_length = new_length - size + old_size;
+        }
+        else
+        {
+            new_length = wanted_new_length;
+        }
+/*
+        //move [end:right_end] to [start + size:..]
+        if (old_size > size)
+        {//move rest to left
+            ::std::copy(iter(seq, end, Standard()), iter(seq, old_length, Standard()), iter(seq, end + size - old_size, Standard()));
+        }
+        else
+        {//move rest to right
+            ::std::copy_backward(iter(seq, end, Standard()), iter(seq, old_length, Standard()), iter(seq,  new_length, Standard()));
+        }
+*/
+        if (old_size > size)
+        {
+            arrayMoveForward(iter(seq, end, Standard()), iter(seq, old_length, Standard()), iter(seq, end + size - old_size, Standard()));
+        }
+        else
+        {
+            arrayMoveBackward(iter(seq, end, Standard()), iter(seq, old_length, Standard()), iter(seq, end + size - old_size, Standard()));
+        }
+FINISH:
+        _setLength(seq, new_length);
+        return size;
+    }
+/*
+    template <typename T>
+    static inline typename Size<T>::Type 
+    _clearSpace_(
+        T & seq, 
+        typename Size<T>::Type size, 
+        typename Iterator<T>::Type start, 
+        typename Iterator<T>::Type end)
+    {
+    SEQAN_CHECKPOINT;
+        typename Iterator<T>::Type seq_begin = begin(seq);
+        return _clearSpace(seq, size, start - seq_begin, end - seq_begin, Insist());
+    }
+
+    template <typename T>
+    static inline typename Size<T>::Type 
+    _clearSpace_(
+        T & seq, 
+        typename Size<T>::Type size,  
+        typename Iterator<T>::Type start,
+        typename Iterator<T>::Type end,
+        typename Size<T>::Type limit) 
+    {
+    SEQAN_CHECKPOINT;
+        typename Iterator<T>::Type seq_begin = begin(seq);
+        return _clearSpace(seq, size, start - seq_begin, end - seq_begin, limit, Insist());
+    }
+*/
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue, typename THostspec, typename TExpand>
+inline typename Size< String<TValue, Packed<THostspec> > >::Type 
+_clearSpace(String<TValue, Packed<THostspec> > & me, 
+        typename Size< String<TValue, Packed<THostspec> > >::Type size, 
+        Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    return ClearSpaceStringPacked_<Tag<TExpand> const>::_clearSpace_(me, size);
+}
+
+template<typename TValue, typename THostspec, typename TExpand>
+inline typename Size< String<TValue, Packed<THostspec> > >::Type 
+_clearSpace(String<TValue, Packed<THostspec> > & me, 
+        typename Size< String<TValue, Packed<THostspec> > >::Type size, 
+        typename Size< String<TValue, Packed<THostspec> > >::Type limit, 
+        Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    return ClearSpaceStringPacked_<Tag<TExpand> const>::_clearSpace_(me, size, limit);
+}
+
+template<typename TValue, typename THostspec, typename TPosition, typename TExpand>
+inline typename Size< String<TValue, Packed<THostspec> > >::Type 
+_clearSpace(String<TValue, Packed<THostspec> > & me, 
+            typename Size< String<TValue, Packed<THostspec> > >::Type size, 
+            TPosition pos_begin, 
+            TPosition pos_end, 
+            Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    return ClearSpaceStringPacked_<Tag<TExpand> const>::_clearSpace_(me, size, pos_begin, pos_end);
+}
+
+template<typename TValue, typename THostspec, typename TPosition, typename TExpand>
+inline typename Size< String<TValue, Packed<THostspec> > >::Type 
+_clearSpace(String<TValue, Packed<THostspec> > & me, 
+            typename Size< String<TValue, Packed<THostspec> > >::Type size, 
+            TPosition pos_begin, 
+            TPosition pos_end, 
+            typename Size< String<TValue, Packed<THostspec> > >::Type limit, 
+            Tag<TExpand> const)
+{
+    SEQAN_CHECKPOINT;
+    return ClearSpaceStringPacked_<Tag<TExpand> const>::_clearSpace_(me, size, pos_begin, pos_end, limit);
+}
+
+// --------------------------------------------------------------------------
+// Function reserve()
+// --------------------------------------------------------------------------
+
+///.Function.reserve.param.object.type:Spec.Packed String
+template <typename TValue, typename TSpec, typename TSize_, typename TExpand>
+inline typename Size< String<TValue, Packed<TSpec> > >::Type
+reserve(
+    String<TValue, Packed<TSpec> > & seq, 
+    TSize_ new_capacity,
+    Tag<TExpand> const tag)
+{
+    SEQAN_CHECKPOINT;
+
+    typedef String<TValue, Packed<TSpec> > TString;
+    typedef typename Size<TString>::Type TSize;
+    TSize ret_value = reserve(host(seq), PackedConsts_<TString>::toHostLength(new_capacity), tag);
+    return ret_value * PackedConsts_<TString>::VALUES_PER_WORD;
+}
+
+// TODO(holtgrew): Below not reviewed in polishing process.
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Iteration
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TValue, typename THostspec, typename TSpec>
+struct Iterator<String<TValue, Packed<THostspec> >, TSpec>
+{
+    typedef Iter<String<TValue, Packed<THostspec> >, Packed<THostspec> > Type;
+};
+template <typename TValue, typename THostspec, typename TSpec>
+struct Iterator<String<TValue, Packed<THostspec> > const, TSpec>
+{
+    typedef Iter<String<TValue, Packed<THostspec> > const, Packed<THostspec> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+struct HostIterator;
+
+template <typename TContainer, typename THostspec>
+struct HostIterator<Iter<TContainer, Packed<THostspec> > >
+{
+    typedef typename Host<TContainer>::Type THost_;
+    typedef typename Iterator<THost_, Standard>::Type Type;
+};
+template <typename TContainer, typename THostspec>
+struct HostIterator<Iter<TContainer, Packed<THostspec> > const>
+{
+    typedef typename Host<TContainer>::Type THost_;
+    typedef typename Iterator<THost_, Standard>::Type const Type;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// Iterator for packed strings
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+template <typename TContainer, typename THostspec>
+class Iter<TContainer, Packed<THostspec> >
+{
+public:
+    typedef typename HostIterator<Iter>::Type THostIterator;
+    typedef typename Position<TContainer>::Type TPosition;
+
+    typename Pointer_<TContainer>::Type data_container;
+    THostIterator data_iterator;
+    unsigned char data_bitpos;
+
+//____________________________________________________________________________
+
+public:
+    Iter()
+    {
+    SEQAN_CHECKPOINT;
+    }
+    Iter(typename Parameter_<TContainer>::Type container_):
+        data_container(_toPointer(container_)),
+        data_iterator(begin(host(container_))),
+        data_bitpos(0)
+    {
+    SEQAN_CHECKPOINT;
+    }
+    Iter(typename Parameter_<TContainer>::Type container_, TPosition pos_):
+        data_container(_toPointer(container_))
+    {
+    SEQAN_CHECKPOINT;
+        setPosition(*this, pos_);
+    }
+    Iter(Iter const & other_):
+        data_container(other_.data_container),
+        data_iterator(other_.data_iterator),
+        data_bitpos(other_.data_bitpos)
+    {
+    SEQAN_CHECKPOINT;
+    }
+    ~Iter()
+    {
+    SEQAN_CHECKPOINT;
+    }
+    Iter const & 
+    operator = (Iter const & other_)
+    {
+    SEQAN_CHECKPOINT;
+        data_container = other_.data_container;
+        data_iterator = other_.data_iterator;
+        data_bitpos = other_.data_bitpos;
+        return *this;
+    }
+//____________________________________________________________________________
+
+
+//____________________________________________________________________________
+};
+
+template <typename TContainer, typename THostspec>
+inline typename Parameter_<TContainer>::Type 
+container(Iter<TContainer, Packed<THostspec> > & me)
+{
+    SEQAN_CHECKPOINT;
+    return _toParameter<TContainer>(me.data_container);
+}
+template <typename TContainer, typename THostspec>
+inline typename Parameter_<TContainer>::Type 
+container(Iter<TContainer, Packed<THostspec> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    return _toParameter<TContainer>(me.data_container);
+}
+//____________________________________________________________________________
+
+template <typename TContainer, typename THostspec, typename TContainer2>
+inline void
+setContainer(Iter<TContainer, Packed<THostspec> > & me, TContainer2 container_)
+{
+    SEQAN_CHECKPOINT;
+   typedef Iter<TContainer, Packed<THostspec> > TIter;
+    typename Position<TIter>::Type pos = position(me);
+    me.data_container = _toPointer(container_);
+    setPosition(me, pos);
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer, typename THostspec>
+inline typename HostIterator<Iter<TContainer, Packed<THostspec> > >::Type &
+hostIterator(Iter<TContainer, Packed<THostspec> > & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_iterator;
+}
+template <typename TContainer, typename THostspec>
+inline typename HostIterator<Iter<TContainer, Packed<THostspec> > const>::Type  &
+hostIterator(Iter<TContainer, Packed<THostspec> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_iterator;
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer, typename THostspec>
+inline unsigned char &
+_bitpos(Iter<TContainer, Packed<THostspec> > & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_bitpos;
+}
+template <typename TContainer, typename THostspec>
+inline unsigned char
+_bitpos(Iter<TContainer, Packed<THostspec> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    return me.data_bitpos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// position
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline typename Position<Iter<TContainer, Packed<THostspec> > const>::Type 
+position(Iter<TContainer, Packed<THostspec> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Host<TContainer>::Type THost;
+    THost const & host_ = host(container(me));
+    return (hostIterator(me) - begin(host_)) * PackedConsts_<TContainer>::VALUES_PER_WORD + _bitpos(me) / PackedConsts_<TContainer>::BITS_PER_VALUE;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// setPosition
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec, typename TPosition>
+inline void 
+setPosition(Iter<TContainer, Packed<THostspec> > & me,
+            TPosition pos_)
+{
+    SEQAN_CHECKPOINT;
+    hostIterator(me) = begin(host(container(me))) + pos_ / PackedConsts_<TContainer>::VALUES_PER_WORD;
+    _bitpos(me) = (pos_ % PackedConsts_<TContainer>::VALUES_PER_WORD) * PackedConsts_<TContainer>::BITS_PER_VALUE;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// value
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline typename Reference<Iter<TContainer, Packed<THostspec> > >::Type 
+value(Iter<TContainer, Packed<THostspec> > & me)
+{
+    SEQAN_CHECKPOINT;
+    return typename Reference<Iter<TContainer, Packed<THostspec> > >::Type(me);
+}
+template <typename TContainer, typename THostspec>
+inline typename Reference<Iter<TContainer, Packed<THostspec> > const>::Type 
+value(Iter<TContainer, Packed<THostspec> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    return typename Reference<Iter<TContainer, Packed<THostspec> > const>::Type(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// getValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline typename GetValue<Iter<TContainer, Packed<THostspec> > >::Type 
+getValue(Iter<TContainer, Packed<THostspec> > & me)
+{
+    SEQAN_CHECKPOINT;
+    return (value(hostIterator(me)) >> _bitpos(me)) & PackedConsts_<TContainer>::VALUE_MASK;
+}
+template <typename TContainer, typename THostspec>
+inline typename GetValue<Iter<TContainer, Packed<THostspec> > const>::Type 
+getValue(Iter<TContainer, Packed<THostspec> > const & me)
+{
+    SEQAN_CHECKPOINT;
+    return (value(hostIterator(me)) >> _bitpos(me)) & PackedConsts_<TContainer>::VALUE_MASK;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// assignValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TIter, typename TValue>
+inline void
+_assignValuePackedStringIterator(TIter & me,
+                                    TValue & _value)
+{
+    typedef typename Container<TIter>::Type TContainer;
+    typedef typename Host<TContainer>::Type THost;
+    typedef typename Value<THost>::Type THostValue;
+    THostValue mask_ = PackedConsts_<TContainer>::VALUE_MASK << _bitpos(me);
+    THostValue val_;
+    assign(val_, _value);
+    val_ <<= _bitpos(me);
+
+    assignValue(hostIterator(me), (getValue(hostIterator(me)) & ~(mask_)) | val_);
+}
+
+
+template <typename TContainer, typename THostspec, typename TValue>
+inline void
+assignValue(Iter<TContainer, Packed<THostspec> > & me,
+            TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    typedef Iter<TContainer, Packed<THostspec> > TIterator;
+    typename Value<TIterator>::Type _temp_value = _value; //conversion
+    _assignValuePackedStringIterator(me, _temp_value);
+}
+template <typename TContainer, typename THostspec, typename TValue>
+inline void
+assignValue(Iter<TContainer, Packed<THostspec> > const & me,
+            TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    typedef Iter<TContainer, Packed<THostspec> > const TIterator;
+    typename Value<TIterator>::Type _temp_value = _value; //conversion
+    _assignValuePackedStringIterator(me, _temp_value);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// moveValue
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec, typename TValue>
+inline void
+moveValue(Iter<TContainer, Packed<THostspec> > & me,
+          TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    assignValue(me, _value);
+}
+template <typename TContainer, typename THostspec, typename TValue>
+inline void
+moveValue(Iter<TContainer, Packed<THostspec> > const & me,
+          TValue const & _value)
+{
+    SEQAN_CHECKPOINT;
+    assignValue(me, _value);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// valueConstruct
+//////////////////////////////////////////////////////////////////////////////
+//emulate construction and destruction 
+
+template <typename TContainer, typename THostspec>
+inline void
+valueConstruct(Iter<TContainer, Packed<THostspec> > const & /*it*/)
+{
+}
+template <typename TContainer, typename THostspec, typename TParam>
+inline void
+valueConstruct(Iter<TContainer, Packed<THostspec> > const & it,
+               TParam const & param_)
+{
+    assignValue(it, param_);
+}
+template <typename TContainer, typename THostspec, typename TParam>
+inline void
+valueConstruct(Iter<TContainer, Packed<THostspec> > const & it,
+               TParam const & param_,
+               Move /*tag*/)
+{
+    moveValue(it, param_);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// valueDestruct
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline void
+valueDestruct(Iter<TContainer, Packed<THostspec> > const & /*it*/)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator ==
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline bool 
+operator == (Iter<TContainer, Packed<THostspec> > const & left,
+             Iter<TContainer, Packed<THostspec> > const & right)
+{
+    SEQAN_CHECKPOINT;
+    return (hostIterator(left) == hostIterator(right)) && (_bitpos(left) == _bitpos(right));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator !=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline bool 
+operator != (Iter<TContainer, Packed<THostspec> > const & left,
+             Iter<TContainer, Packed<THostspec> > const & right)
+{
+    SEQAN_CHECKPOINT;
+    return (hostIterator(left) != hostIterator(right)) || (_bitpos(left) != _bitpos(right));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator >
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline bool 
+operator > (Iter<TContainer, Packed<THostspec> > const & left,
+            Iter<TContainer, Packed<THostspec> > const & right)
+{
+    SEQAN_CHECKPOINT;
+    return (hostIterator(left) > hostIterator(right)) || ((hostIterator(left) == hostIterator(right)) && (_bitpos(left) > _bitpos(right)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator >=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline bool 
+operator >= (Iter<TContainer, Packed<THostspec> > const & left,
+             Iter<TContainer, Packed<THostspec> > const & right)
+{
+    SEQAN_CHECKPOINT;
+    return (hostIterator(left) > hostIterator(right)) || ((hostIterator(left) == hostIterator(right)) && (_bitpos(left) >= _bitpos(right)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator <
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline bool 
+operator < (Iter<TContainer, Packed<THostspec> > const & left,
+            Iter<TContainer, Packed<THostspec> > const & right)
+{
+    SEQAN_CHECKPOINT;
+    return (hostIterator(left) < hostIterator(right)) || ((hostIterator(left) == hostIterator(right)) && (_bitpos(left) < _bitpos(right)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator <=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline bool 
+operator <= (Iter<TContainer, Packed<THostspec> > const & left,
+             Iter<TContainer, Packed<THostspec> > const & right)
+{
+    SEQAN_CHECKPOINT;
+    return (hostIterator(left) < hostIterator(right)) || ((hostIterator(left) == hostIterator(right)) && (_bitpos(left) <= _bitpos(right)));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goNext
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline void
+goNext(Iter<TContainer, Packed<THostspec> > & me)
+{
+    SEQAN_CHECKPOINT;
+    int new_bitpos = _bitpos(me) + PackedConsts_<TContainer>::BITS_PER_VALUE;
+    if (new_bitpos <= PackedConsts_<TContainer>::MAX_BIT_POS)
+    {
+        _bitpos(me) = (unsigned char) new_bitpos;
+    }
+    else
+    {
+        _bitpos(me) = 0;
+        goNext(hostIterator(me));
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// goPrevious
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec>
+inline void
+goPrevious(Iter<TContainer, Packed<THostspec> > & me)
+{
+    SEQAN_CHECKPOINT;
+    int new_bitpos = _bitpos(me) - PackedConsts_<TContainer>::BITS_PER_VALUE;
+    if (new_bitpos >= 0)
+    {
+        _bitpos(me) = (unsigned char) new_bitpos;
+    }
+    else
+    {
+        _bitpos(me) = PackedConsts_<TContainer>::MAX_BIT_POS;
+        goPrevious(hostIterator(me));
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec, typename TIntegral>
+inline Iter<TContainer, Packed<THostspec> >  
+operator + (Iter<TContainer, Packed<THostspec> > const & left,
+            TIntegral right)
+{
+    SEQAN_CHECKPOINT;
+    return Iter<TContainer, Packed<THostspec> >(container(left), position(left) + right);
+}
+template <typename TContainer, typename THostspec, typename TIntegral>
+inline Iter<TContainer, Packed<THostspec> >  
+operator + (TIntegral left,
+            Iter<TContainer, Packed<THostspec> > const & right)
+{
+    SEQAN_CHECKPOINT;
+    return Iter<TContainer, Packed<THostspec> >(container(right), position(right) + left);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator +=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec, typename TIntegral>
+inline Iter<TContainer, Packed<THostspec> > &
+operator += (Iter<TContainer, Packed<THostspec> > & left,
+             TIntegral right)
+{
+    SEQAN_CHECKPOINT;
+    setPosition(left, position(left) + right);
+    return left;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec, typename TIntegral>
+inline Iter<TContainer, Packed<THostspec> >  
+operator - (Iter<TContainer, Packed<THostspec> > const & left,
+            TIntegral right)
+{
+    SEQAN_CHECKPOINT;
+    return Iter<TContainer, Packed<THostspec> >(container(left), position(left) - right);
+}
+
+//____________________________________________________________________________
+
+template <typename TContainer, typename THostspec>
+inline typename Difference<Iter<TContainer, Packed<THostspec> > >::Type  
+operator - (Iter<TContainer, Packed<THostspec> > const & left,
+            Iter<TContainer, Packed<THostspec> > const & right)
+{
+    SEQAN_CHECKPOINT;
+    return position(left) - position(right);
+}
+
+template <typename TContainer, typename THostspec>
+inline typename Difference<Iter<TContainer, Packed<THostspec> > >::Type  
+operator - (Iter<TContainer, Packed<THostspec> > const & left,
+            Iter<TContainer, Packed<THostspec> > & right)
+{
+    SEQAN_CHECKPOINT;
+    return position(left) - position(right);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// operator -=
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContainer, typename THostspec, typename TIntegral>
+inline Iter<TContainer, Packed<THostspec> > &
+operator -= (Iter<TContainer, Packed<THostspec> > & left,
+             TIntegral right)
+{
+    SEQAN_CHECKPOINT;
+    setPosition(left, position(left) - right);
+    return left;
+}
+
+} // namespace seqan
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/sequence/string_set_base.h b/src/SeqAn-1.3/seqan/sequence/string_set_base.h
new file mode 100644
index 0000000..515e62f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_set_base.h
@@ -0,0 +1,1411 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_STRING_SET_BASE_H_
+#define SEQAN_SEQUENCE_STRING_SET_BASE_H_
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+template <typename TSpec = Default>
+struct Owner;
+
+/**
+.Class.StringSet:
+..cat:Sequences
+..summary:A container class for a set of strings.
+..signature:StringSet<TString, TSpec>
+..param.TString:The string type.
+...type:Class.String
+..param.TSpec:The specializing type for the StringSet.
+...metafunction:Metafunction.Spec
+...default:$Owner<Generous>$.
+..include:sequence.h
+ */
+template <typename TString, typename TSpec = Owner<> >
+class StringSet;
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Metafunction Concatenator
+// --------------------------------------------------------------------------
+
+/**
+.Metafunction.Concatenator:
+..summary:Returns the type of the concatenation sequence of all sequences in a @Class.StringSet at .
+..cat:Sequences
+..signature:Concatenator<TStringSet>::Type
+..param.TStringSet:The @Class.StringSet@ type.
+...type:Class.StringSet
+..returns:The type of a container that can be iterated like the concatenation string of all sequences in a @Class.StringSet at .
+..include:seqan/sequence.h
+*/
+
+// TODO(holtgrew): Why is this specialized for all types?
+template <typename TObject>
+struct Concatenator
+{
+    typedef TObject Type;
+};
+
+template <typename TObject>
+struct Concatenator<TObject const>
+{
+    typedef typename Concatenator<TObject>::Type const Type;
+};
+
+template <typename TString, typename TSpec >
+struct Concatenator<StringSet<TString, TSpec> >
+{
+    typedef ConcatenatorManyToOne<StringSet<TString, TSpec> > Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction StringSetLimits
+// --------------------------------------------------------------------------
+
+// TODO(holtgrew): Document these metafunctions.
+// TODO(holtgrew): Default specializations necessary?
+template <typename TString>
+struct StringSetLimits
+{
+    typedef Nothing Type;
+};
+
+template <typename TString>
+struct StringSetLimits<TString const>
+{
+    typedef typename StringSetLimits<TString>::Type const Type;
+};
+
+template <typename TString, typename TSpec>
+struct StringSetLimits<StringSet<TString, TSpec> >
+{
+    typedef typename Size<TString>::Type TSize_;
+    typedef String<TSize_> Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction StringSetPosition
+// --------------------------------------------------------------------------
+
+// TODO(holtgrew): Default specializations necessary?
+template <typename TString>
+struct StringSetPosition
+{
+    typedef typename Size<TString>::Type Type;
+};
+
+template <typename TString, typename TSpec>
+struct StringSetPosition<StringSet<TString, TSpec> >
+{
+    typedef typename Size<TString>::Type TSize_;
+    typedef Pair<TSize_> Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction GetSequenceNo
+// --------------------------------------------------------------------------
+
+// TODO(holtgrew): Default specializations necessary?
+template <typename TString>
+struct GetSequenceByNo
+{
+    typedef TString & Type;
+};
+
+template <typename TString, typename TSpec>
+struct GetSequenceByNo<StringSet<TString, TSpec> >
+{
+    typedef typename Reference< StringSet<TString, TSpec> >::Type Type;
+};
+
+template <typename TString, typename TSpec>
+struct GetSequenceByNo<StringSet<TString, TSpec> const>
+{
+    typedef typename Reference< StringSet<TString, TSpec> const>::Type Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction Value
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TSpec >
+struct Value< StringSet< TString, TSpec > >
+{
+    typedef TString Type;
+};
+
+template < typename TString, typename TSpec >
+struct Value< StringSet< TString, TSpec > const>
+{
+    typedef TString Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction Iterator
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TSpec, typename TIteratorSpec>
+struct Iterator< StringSet< TString, TSpec >, TIteratorSpec>
+{
+    typedef Iter< StringSet< TString, TSpec >, PositionIterator> Type;
+};
+
+template < typename TString, typename TSpec, typename TIteratorSpec >
+struct Iterator< StringSet< TString, TSpec> const, TIteratorSpec>
+{
+    typedef Iter< StringSet< TString, TSpec > const, PositionIterator> Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction Size
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec>
+struct Size< StringSet< TString, TSpec > >
+    : Size<typename StringSetLimits< StringSet<TString, TSpec> >::Type > {};
+// Default Size<T const> redirects to non-const.
+
+// --------------------------------------------------------------------------
+// Metafunction Prefix
+// --------------------------------------------------------------------------
+// TODO(holtgrew): Do Prefix, Suffix, Infix make sense if defined in this way for all StringSet classes?
+// TODO(holtgrew): However, if this works nicely then it shows that implementing segments as Strings would not be advantageous since they now work for arbitrary sequential-access containers.
+
+template <typename TString, typename TSpec>
+struct Prefix< StringSet< TString, TSpec > >
+    : Prefix<TString > {};
+
+template <typename TString, typename TSpec>
+struct Prefix<StringSet< TString, TSpec > const>
+    : Prefix<TString const > {};
+
+// --------------------------------------------------------------------------
+// Metafunction Suffix
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec>
+struct Suffix<StringSet< TString, TSpec> >
+    : Suffix<TString> {};
+
+template <typename TString, typename TSpec>
+struct Suffix<StringSet< TString, TSpec> const>
+    : Suffix<TString const> {};
+
+// --------------------------------------------------------------------------
+// Metafunction Infix
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec>
+struct Infix<StringSet< TString, TSpec> >
+    : Infix<TString> {};
+
+template <typename TString, typename TSpec>
+struct Infix<StringSet< TString, TSpec > const>
+    : Infix< TString const > {};
+
+// --------------------------------------------------------------------------
+// Metafunction AllowsFastRandomAccess
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec>
+struct AllowsFastRandomAccess<StringSet<TString, TSpec> >
+    : AllowsFastRandomAccess<TString> {};
+// Default AllowsFastRandomAccess<T const> redirects to non-const.
+
+// --------------------------------------------------------------------------
+// Metafunction DefaultOverflowImplicit
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TSpec >
+struct DefaultOverflowImplicit<StringSet< TString, TSpec> >
+{
+    typedef Generous Type;
+};
+
+template < typename TString, typename TSpec >
+struct DefaultOverflowImplicit<StringSet< TString, TSpec> const>
+{
+    typedef Generous Type;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function stringSetLimits()
+// --------------------------------------------------------------------------
+
+/**
+.Function.stringSetLimits:
+..cat:Sequences
+..summary:Retrieves a string of delimiter positions of a @Class.StringSet@ which is needed for local<->global position conversions.
+..signature:stringSetLimits(me)
+..param.me:A string or string set.
+...type:Class.String
+...type:Class.StringSet
+..returns:A reference to a string.
+...remarks:If $me$ is a @Class.StringSet@ then the returned string is of size $length(me)+1$ and contains the ascending (virtual) delimiter positions of the concatenation of all strings in the string set.
+...remarks:If $me$ is a @Class.String@, @Tag.Nothing@ is returned.
+..include:seqan/sequence.h
+*/
+
+// TODO(holtgrew): Default implementation necessary?!
+template <typename TStringSet>
+inline typename StringSetLimits<TStringSet>::Type
+stringSetLimits(TStringSet &)
+{
+    return typename StringSetLimits<TStringSet>::Type();
+}
+
+template <typename TString, typename TSpec>
+inline typename StringSetLimits< StringSet<TString, TSpec> >::Type &
+stringSetLimits(StringSet<TString, TSpec> & stringSet)
+{
+    if (!_validStringSetLimits(stringSet))
+        _refreshStringSetLimits(stringSet);
+    return stringSet.limits;
+}
+
+template <typename TString, typename TSpec>
+inline typename StringSetLimits< StringSet<TString, TSpec> const>::Type &
+stringSetLimits(StringSet<TString, TSpec> const & stringSet)
+{
+    if (!_validStringSetLimits(stringSet))
+        _refreshStringSetLimits(const_cast< StringSet<TString, TSpec>& >(stringSet));
+    return stringSet.limits;
+}
+
+// --------------------------------------------------------------------------
+// Function getSeqNo()
+// --------------------------------------------------------------------------
+
+/**
+.Function.getSeqNo:
+..cat:Sequences
+..summary:Returns the sequence number of a position.
+..signature:getSeqNo(pos[, limits])
+..param.pos:A position.
+...type:Class.Pair
+..param.limits:The limits string returned by @Function.stringSetLimits at .
+..returns:A single integer value that identifies the string within the stringset $pos$ points at.
+...remarks:If $limits$ is omitted or @Tag.Nothing@ $getSeqNo$ returns 0.
+...remarks:If $pos$ is a local position (of class @Class.Pair@) then $i1$ is returned.
+...remarks:If $pos$ is a global position (integer type and $limits$ is a @Class.String@) then $pos$ is converted to a local position and $i1$ is returned.
+..include:seqan/sequence.h
+*/
+
+// TODO(holtgrew): Auto-sequences should go away!
+template <typename TPosition>
+inline TPosition
+getSeqNo(TPosition const &, Nothing const &)
+{
+    return 0;
+}
+
+// TODO(holtgrew): Auto-sequences should go away!
+template <typename TPosition>
+inline TPosition
+getSeqNo(TPosition const &)
+{
+    return 0;
+}
+
+// n sequences (position type is Pair)
+template <typename T1, typename T2, typename TCompression, typename TLimitsString>
+inline T1 getSeqNo(Pair<T1, T2, TCompression> const & pos, TLimitsString const &)
+{
+    return getValueI1(pos);
+}
+
+// n sequences (position type is Pair)
+template <typename T1, typename T2, typename TCompression>
+inline T1 getSeqNo(Pair<T1, T2, TCompression> const & pos)
+{
+    return getValueI1(pos);
+}
+
+// n sequences (position type is an integral type)
+template <typename TPos, typename TLimitsString>
+inline TPos getSeqNo(TPos const & pos, TLimitsString const & limits)
+{
+    typedef typename Iterator<TLimitsString const, Standard>::Type TIter;
+    typedef typename Value<TLimitsString>::Type TSize;
+    TIter _begin = begin(limits, Standard());
+    TIter _upper = ::std::upper_bound(_begin, end(limits, Standard()), (TSize)pos) - 1;
+    return difference(_begin, _upper);
+}
+
+// --------------------------------------------------------------------------
+// Function getSeqOffset()
+// --------------------------------------------------------------------------
+
+/**
+.Function.getSeqOffset:
+..cat:Sequences
+..summary:Returns the local sequence offset of a position.
+..signature:getSeqOffset(pos[, limits])
+..param.pos:A position.
+...type:Class.Pair
+..param.limits:The limits string returned by @Function.stringSetLimits at .
+..returns:A single integer value that identifies the position within the string $pos$ points at.
+...remarks:If $limits$ is omitted or @Tag.Nothing@ $getSeqNo$ returns $pos$.
+...remarks:If $pos$ is a local position (of class @Class.Pair@) then $i2$ is returned.
+...remarks:If $pos$ is a global position (integer type and $limits$ is a @Class.String@) then $pos$ is converted to a local position and $i2$ is returned.
+..include:seqan/sequence.h
+*/
+
+// TODO(holtgrew): Auto-sequences should go away!
+template <typename TPosition>
+inline TPosition
+getSeqOffset(TPosition const & pos, Nothing const &)
+{
+    return pos;
+}
+
+// TODO(holtgrew): Auto-sequences should go away!
+template <typename TPosition>
+inline TPosition
+getSeqOffset(TPosition const & pos)
+{
+    return pos;
+}
+
+// n sequences (position type is Pair)
+template <typename T1, typename T2, typename TCompression, typename TLimitsString>
+inline T2 getSeqOffset(Pair<T1, T2, TCompression> const & pos, TLimitsString const &) {
+    return getValueI2(pos);
+}
+
+// n sequences (position type is Pair)
+template <typename T1, typename T2, typename TCompression>
+inline T1 getSeqOffset(Pair<T1, T2, TCompression> const & pos) {
+    return getValueI2(pos);
+}
+
+// n sequences (position type is an integral type)
+template <typename TPos, typename TLimitsString>
+inline TPos getSeqOffset(TPos const & pos, TLimitsString const & limits) {
+    typedef typename Iterator<TLimitsString const, Standard>::Type TIter;
+    typedef typename Value<TLimitsString>::Type TSize;
+    TIter _begin = begin(limits, Standard());
+    TIter _upper = ::std::upper_bound(_begin, end(limits, Standard()), (TSize)pos) - 1;
+    return pos - *_upper;
+}
+
+// --------------------------------------------------------------------------
+// Function posGlobalize()
+// --------------------------------------------------------------------------
+
+/**
+.Function.posGlobalize:
+..cat:Sequences
+..summary:Converts a local/global to a global position.
+..signature:posGlobalize(pos, limits)
+..param.pos:A local or global position (pair or integer value).
+...type:Class.Pair
+..param.limits:The limits string returned by @Function.stringSetLimits at .
+..returns:The corresponding global position of $pos$.
+...remarks:If $pos$ is an integral type $pos$ is returned.
+...remarks:If not, $limits[getSeqNo(pos, limits)] + getSeqOffset(pos, limits)$ is returned.
+..include:seqan/sequence.h
+*/
+
+// any_position and no limits_string -> any_position
+template <typename TPosition>
+inline TPosition posGlobalize(TPosition const & pos, Nothing const &)
+{
+    return pos;
+}
+
+// local_position (0,x) and no limits_string -> global_position x
+template <typename T1, typename T2, typename TCompression>
+inline T2 posGlobalize(Pair<T1, T2, TCompression> const & pos, Nothing const &)
+{
+    return getSeqOffset(pos);
+}
+
+// any_position and no limits_string -> any_position
+template <typename TLimitsString, typename TPosition>
+inline TPosition posGlobalize(TPosition const & pos, TLimitsString const &)
+{
+    return pos;
+}
+
+// local_position and limits_string -> global_position
+template <typename TLimitsString, typename T1, typename T2, typename TCompression>
+inline typename Value<TLimitsString>::Type
+posGlobalize(Pair<T1, T2, TCompression> const & pos, TLimitsString const & limits)
+{
+    return limits[getSeqNo(pos, limits)] + getSeqOffset(pos, limits);
+}
+
+// --------------------------------------------------------------------------
+// Function posLocalToX()
+// --------------------------------------------------------------------------
+
+/**
+.Function.posLocalToX:
+..cat:Sequences
+..summary:Converts a local to a local/global position.
+..signature:posGlobalize(dst, localPos, limits)
+..param.dst:Destination value. A local or global position (pair or integer value).
+...type:Class.Pair
+..param.localPos:A local position (pair).
+...type:Class.Pair
+..param.limits:The limits string returned by @Function.stringSetLimits at .
+..include:seqan/sequence.h
+*/
+
+template <typename TDest, typename TLimitsString, typename T1, typename T2, typename TCompression>
+inline void
+posLocalToX(TDest & dst, Pair<T1, T2, TCompression> const & localPos, TLimitsString const & limits)
+{
+    dst = posGlobalize(localPos, limits);
+}
+
+template <typename TD1, typename TD2, typename TDCompression, typename TLimitsString, typename T1, typename T2, typename TCompression>
+inline void
+posLocalToX(Pair<TD1, TD2, TDCompression> & dst, Pair<T1, T2, TCompression> const & localPos, TLimitsString const &)
+{
+    dst = localPos;
+}
+
+// --------------------------------------------------------------------------
+// Function posLocalize()
+// --------------------------------------------------------------------------
+
+/**
+.Function.posLocalize:
+..cat:Sequences
+..summary:Converts a local/global to a local position.
+..signature:posLocalize(result, pos, limits)
+..param.pos:A local or global position (pair or integer value).
+...type:Class.Pair
+..param.limits:The limits string returned by @Function.stringSetLimits at .
+..param.result:Reference to the resulting corresponding local position of $pos$.
+...remarks:If $pos$ is an integral type and $limits$ is omitted or @Tag.Nothing@, $pos$ is returned.
+...remarks:If $pos$ is a local position (of class @Class.Pair@) then $pos$ is returned.
+...remarks:If $pos$ is a global position (integer type and $limits$ is a @Class.String@) then $pos$ is converted to a local position.
+..include:seqan/sequence.h
+*/
+
+// any_position and no limits_string -> any_position
+template <typename TResult, typename TPosition>
+inline void posLocalize(TResult & result, TPosition const & pos, Nothing const &) {
+    result = pos;
+}
+
+template <typename T1, typename T2, typename TCompression, typename TPosition>
+inline void posLocalize(Pair<T1, T2, TCompression> & result, TPosition const & pos, Nothing const &) {
+    result.i1 = 0;
+    result.i2 = pos;
+}
+
+// global_position and limits_string -> local_position
+template <typename TResult, typename TSize, typename TSpec, typename TPosition>
+inline void posLocalize(TResult & result, TPosition const & pos, String<TSize, TSpec> const & limits) {
+    typedef typename Iterator<String<TSize> const, Standard>::Type TIter;
+    TIter _begin = begin(limits, Standard());
+    TIter _upper = ::std::upper_bound(_begin, end(limits, Standard()), (TSize)pos) - 1;
+    result.i1 = difference(_begin, _upper);
+    result.i2 = pos - *_upper;
+}
+
+// local_position -> local_position
+template <typename TResult, typename TSize, typename TSpec, typename T1, typename T2, typename TCompression>
+inline void posLocalize(TResult & result, Pair<T1, T2, TCompression> const & pos, String<TSize, TSpec> const &/*limits*/) {
+    result = pos;
+}
+
+// --------------------------------------------------------------------------
+// Function prefix()
+// --------------------------------------------------------------------------
+
+///.Function.prefix.param.host.type:Class.StringSet
+
+template < typename TString, typename TSpec, typename TPosition >
+inline typename Prefix<TString>::Type
+prefix(StringSet< TString, TSpec > & me, TPosition pos)
+{
+    typedef StringSet<TString, TSpec>               TStringSet;
+    typedef typename Size<TStringSet>::Type         TSetSize;
+    typedef typename Size<TString>::Type            TStringSize;
+    typedef Pair<TSetSize, TStringSize, Compressed> TPair;
+
+    TPair lPos;
+    posLocalize(lPos, pos, stringSetLimits(me));
+    return prefix(me[getSeqNo(lPos)], getSeqOffset(lPos));
+}
+
+template < typename TString, typename TSpec, typename TPosition >
+inline typename Prefix<TString const>::Type
+prefix(StringSet< TString, TSpec > const & me, TPosition pos)
+{
+    typedef StringSet<TString, TSpec>               TStringSet;
+    typedef typename Size<TStringSet>::Type         TSetSize;
+    typedef typename Size<TString>::Type            TStringSize;
+    typedef Pair<TSetSize, TStringSize, Compressed> TPair;
+
+    TPair lPos;
+    posLocalize(lPos, pos, stringSetLimits(me));
+    return prefix(me[getSeqNo(lPos)], getSeqOffset(lPos));
+}
+
+// --------------------------------------------------------------------------
+// Function suffix()
+// --------------------------------------------------------------------------
+
+///.Function.suffix.param.host.type:Class.StringSet
+
+template < typename TString, typename TSpec, typename TPosition >
+inline typename Suffix<TString>::Type
+suffix(StringSet< TString, TSpec > & me, TPosition pos)
+{
+    typedef StringSet<TString, TSpec>               TStringSet;
+    typedef typename Size<TStringSet>::Type         TSetSize;
+    typedef typename Size<TString>::Type            TStringSize;
+    typedef Pair<TSetSize, TStringSize, Compressed> TPair;
+
+    TPair lPos;
+    posLocalize(lPos, pos, stringSetLimits(me));
+    return suffix(me[getSeqNo(lPos)], getSeqOffset(lPos));
+}
+
+template < typename TString, typename TSpec, typename TPosition >
+inline typename Suffix<TString const>::Type
+suffix(StringSet< TString, TSpec > const & me, TPosition pos)
+{
+    typedef StringSet<TString, TSpec>               TStringSet;
+    typedef typename Size<TStringSet>::Type         TSetSize;
+    typedef typename Size<TString>::Type            TStringSize;
+    typedef Pair<TSetSize, TStringSize, Compressed> TPair;
+
+    TPair lPos;
+    posLocalize(lPos, pos, stringSetLimits(me));
+    return suffix(me[getSeqNo(lPos)], getSeqOffset(lPos));
+}
+
+// --------------------------------------------------------------------------
+// Function infixWithLength()
+// --------------------------------------------------------------------------
+
+///.Function.infixWithLength.param.host.type:Class.StringSet
+
+template < typename TString, typename TSpec, typename TPosition, typename TSize >
+inline typename Infix<TString>::Type
+infixWithLength(StringSet< TString, TSpec > & me, TPosition pos, TSize length)
+{
+    typedef StringSet<TString, TSpec>               TStringSet;
+    typedef typename Size<TStringSet>::Type         TSetSize;
+    typedef typename Size<TString>::Type            TStringSize;
+    typedef Pair<TSetSize, TStringSize, Compressed> TPair;
+
+    TPair lPos;
+    posLocalize(lPos, pos, stringSetLimits(me));
+    return infixWithLength(me[getSeqNo(lPos)], getSeqOffset(lPos), length);
+}
+
+template < typename TString, typename TSpec, typename TPosition, typename TSize >
+inline typename Infix<TString const>::Type
+infixWithLength(StringSet< TString, TSpec > const & me, TPosition pos, TSize length)
+{
+    typedef StringSet<TString, TSpec>               TStringSet;
+    typedef typename Size<TStringSet>::Type         TSetSize;
+    typedef typename Size<TString>::Type            TStringSize;
+    typedef Pair<TSetSize, TStringSize, Compressed> TPair;
+
+    TPair lPos;
+    posLocalize(lPos, pos, stringSetLimits(me));
+    return infixWithLength(me[getSeqNo(lPos)], getSeqOffset(lPos), length);
+}
+
+// --------------------------------------------------------------------------
+// Function infix()
+// --------------------------------------------------------------------------
+
+///.Function.infix.param.host.type:Class.StringSet
+
+template < typename TString, typename TSpec, typename TPosBegin, typename TPosEnd >
+inline typename Infix<TString>::Type
+infix(StringSet< TString, TSpec > & me, TPosBegin posBegin, TPosEnd posEnd)
+{
+    typedef StringSet<TString, TSpec>               TStringSet;
+    typedef typename Size<TStringSet>::Type         TSetSize;
+    typedef typename Size<TString>::Type            TStringSize;
+    typedef Pair<TSetSize, TStringSize, Compressed> TPair;
+
+    TPair localPosBegin, localPosEnd;
+    posLocalize(localPosBegin, posBegin, stringSetLimits(me));
+    posLocalize(localPosEnd, posEnd, stringSetLimits(me));
+    return infix(me[getSeqNo(localPosBegin)], getSeqOffset(localPosBegin), getSeqOffset(localPosEnd));
+}
+
+template < typename TString, typename TSpec, typename TPosBegin, typename TPosEnd >
+inline typename Infix<TString const>::Type
+infix(StringSet< TString, TSpec > const & me, TPosBegin posBegin, TPosEnd posEnd)
+{
+    typedef StringSet<TString, TSpec>               TStringSet;
+    typedef typename Size<TStringSet>::Type         TSetSize;
+    typedef typename Size<TString>::Type            TStringSize;
+    typedef Pair<TSetSize, TStringSize, Compressed> TPair;
+
+    TPair localPosBegin, localPosEnd;
+    posLocalize(localPosBegin, posBegin, stringSetLimits(me));
+    posLocalize(localPosEnd, posEnd, stringSetLimits(me));
+    return infix(me[getSeqNo(localPosBegin)], getSeqOffset(localPosBegin), getSeqOffset(localPosEnd));
+}
+
+// --------------------------------------------------------------------------
+// Function posAtFirstLocal()
+// --------------------------------------------------------------------------
+
+template <typename TPos, typename TLimitsString>
+inline bool posAtFirstLocal(TPos pos, TLimitsString const & limits) {
+    return getSeqOffset(pos, limits) == 0;
+}
+template <typename TPos>
+inline bool posAtFirstLocal(TPos pos) {
+    return getSeqOffset(pos) == 0;
+}
+
+// --------------------------------------------------------------------------
+// Function posAtEnd()
+// --------------------------------------------------------------------------
+
+template <typename T1, typename T2, typename TCompression, typename TSequence, typename TSpec>
+inline bool posAtEnd(Pair<T1, T2, TCompression> const & pos, StringSet<TSequence, TSpec> const & stringSet) {
+    return pos.i2 == sequenceLength(pos.i1, stringSet);
+}
+template <typename TPos, typename TSequence, typename TSpec>
+inline bool posAtEnd(TPos pos, StringSet<TSequence, TSpec> const & stringSet) {
+    return getSeqOffset(pos, stringSetLimits(stringSet)) == 0;
+}
+template <typename TPos, typename TSequence>
+inline bool posAtEnd(TPos pos, TSequence const & seq) {
+    return pos == length(seq);
+}
+
+// --------------------------------------------------------------------------
+// Function posPrev()
+// --------------------------------------------------------------------------
+
+template <typename TPos>
+inline TPos posPrev(TPos pos) {
+    return pos - 1;
+}
+
+template <typename T1, typename T2, typename TCompression>
+inline Pair<T1, T2, TCompression> posPrev(Pair<T1, T2, TCompression> const & pos) {
+    return Pair<T1, T2, TCompression>(getValueI1(pos), getValueI2(pos) - 1);
+}
+
+// --------------------------------------------------------------------------
+// Function posNext()
+// --------------------------------------------------------------------------
+
+template <typename TPos>
+inline TPos posNext(TPos pos) {
+    return pos + 1;
+}
+
+template <typename T1, typename T2, typename TCompression>
+inline Pair<T1, T2, TCompression>
+posNext(Pair<T1, T2, TCompression> const & pos) {
+    return Pair<T1, T2, TCompression>(getValueI1(pos), getValueI2(pos) + 1);
+}
+
+// --------------------------------------------------------------------------
+// Function posAdd()
+// --------------------------------------------------------------------------
+
+template <typename TPos, typename TDelta>
+inline TPos posAdd(TPos pos, TDelta delta) {
+    return pos + delta;
+}
+
+template <typename T1, typename T2, typename TCompression, typename TDelta>
+inline Pair<T1, T2, TCompression>
+posAdd(Pair<T1, T2, TCompression> const & pos, TDelta delta) {
+    return Pair<T1, T2, TCompression>(getValueI1(pos), getValueI2(pos) + delta);
+}
+
+
+// --------------------------------------------------------------------------
+// Function posAddAndCheck()
+// --------------------------------------------------------------------------
+
+template <typename TPos, typename TDelta, typename TSequence>
+inline TPos posAddAndCheck(TPos & pos, TDelta delta, TSequence const & sequence) {
+    return (pos += delta) < length(sequence);
+}
+
+template <typename TPos, typename TDelta, typename TSequence, typename TSpec>
+inline TPos posAddAndCheck(TPos & pos, TDelta delta, StringSet<TSequence, TSpec> const & stringSet)
+{
+    typedef StringSet<TSequence, TSpec> TStringSet;
+    typedef typename StringSetLimits<TStringSet const>::Type TLimits;
+    typedef typename Iterator<TLimits, Standard>::Type TIter;
+    typedef typename Value<TLimits>::Type TSize;
+
+    TLimits & limits = stringSetLimits(stringSet);
+    TIter _end = end(limits, Standard());
+    TIter _endMark = ::std::upper_bound(begin(limits, Standard()), _end, (TSize)pos);
+    pos += delta;
+    if (_endMark < _end)
+        return pos < *_endMark;
+    else
+        return false;
+}
+
+template <typename T1, typename T2, typename TCompression, typename TDelta, typename TSequence, typename TSpec>
+inline bool
+posAddAndCheck(Pair<T1, T2, TCompression> & pos, TDelta delta, StringSet<TSequence, TSpec> const & stringSet) {
+    return (pos.i2 += delta) < length(stringSet[pos.i1]);
+}
+
+// --------------------------------------------------------------------------
+// Function posSub()
+// --------------------------------------------------------------------------
+
+template <typename TA, typename TB>
+inline TA posSub(TA a, TB b) {
+    return a - b;
+}
+
+template <
+    typename TA1, typename TA2, typename TACompression,
+    typename TB1, typename TB2, typename TBCompression
+>
+inline TA2
+posSub(Pair<TA1, TA2, TACompression> const & a, Pair<TB1, TB2, TBCompression> const & b) {
+    return getValueI2(a) - getValueI2(b);
+}
+
+// --------------------------------------------------------------------------
+// Function posLess()
+// --------------------------------------------------------------------------
+
+template <typename TPos>
+inline bool posLess(TPos const & a, TPos const & b) {
+    return a < b;
+}
+
+template <typename T1, typename T2, typename TCompression>
+inline bool posLess(Pair<T1, T2, TCompression> const & a, Pair<T1, T2, TCompression> const & b) {
+    return
+         (getValueI1(a) <  getValueI1(b)) ||
+        ((getValueI1(a) == getValueI1(b)) && (getValueI2(a) < getValueI2(b)));
+}
+
+// --------------------------------------------------------------------------
+// Function posCompare()
+// --------------------------------------------------------------------------
+
+template <typename TPos>
+inline int posCompare(TPos const & a, TPos const & b) {
+    if (a < b) return -1;
+    if (a > b) return 1;
+    return 0;
+}
+
+template <typename T1, typename T2, typename TCompression>
+inline int posCompare(Pair<T1, T2, TCompression> const & a, Pair<T1, T2, TCompression> const & b) {
+    if (getValueI1(a) < getValueI1(b)) return -1;
+    if (getValueI1(a) > getValueI1(b)) return 1;
+    return posCompare(getValueI2(a), getValueI2(b));
+}
+
+// --------------------------------------------------------------------------
+// Function suffixLength()
+// --------------------------------------------------------------------------
+
+template <typename TPos, typename TString>
+inline typename Size<TString>::Type
+suffixLength(TPos pos, TString const & string) {
+    return length(string) - pos;
+}
+
+template <typename TPos, typename TString, typename TSpec>
+inline typename Size<TString>::Type
+suffixLength(TPos pos, StringSet<TString, TSpec> const & stringSet) {
+    return length(stringSet[getSeqNo(pos, stringSetLimits(stringSet))]) - getSeqOffset(pos, stringSetLimits(stringSet));
+}
+
+// --------------------------------------------------------------------------
+// Function countSequences()
+// --------------------------------------------------------------------------
+
+template <typename TString>
+inline unsigned
+countSequences(TString const &) {
+    return 1;
+}
+
+template <typename TString, typename TSpec>
+inline typename Size<StringSet<TString, TSpec> >::Type
+countSequences(StringSet<TString, TSpec> const & stringSet) {
+    return length(stringSet);
+}
+
+// --------------------------------------------------------------------------
+// Function getSequenceByNo()
+// --------------------------------------------------------------------------
+
+template <typename TSeqNo, typename TString>
+inline typename GetSequenceByNo<TString>::Type
+getSequenceByNo(TSeqNo /*seqNo*/, TString & string)
+{
+    return string;
+}
+
+template <typename TSeqNo, typename TString, typename TSpec>
+inline typename GetSequenceByNo< StringSet<TString, TSpec> >::Type
+getSequenceByNo(TSeqNo seqNo, StringSet<TString, TSpec> & stringSet)
+{
+    return stringSet[seqNo];
+}
+
+template <typename TSeqNo, typename TString, typename TSpec>
+inline typename GetSequenceByNo< StringSet<TString, TSpec> const>::Type
+getSequenceByNo(TSeqNo seqNo, StringSet<TString, TSpec> const & stringSet)
+{
+    return stringSet[seqNo];
+}
+
+// --------------------------------------------------------------------------
+// Function sequenceLength()
+// --------------------------------------------------------------------------
+
+template <typename TSeqNo, typename TText>
+inline typename Size< typename GetSequenceByNo<TText const>::Type>::Type
+sequenceLength(TSeqNo seqNo, TText const & text)
+{
+    return length(getSequenceByNo(seqNo, text));
+}
+
+// --------------------------------------------------------------------------
+// Function _validStringSetLimits
+// --------------------------------------------------------------------------
+
+// TODO(holtgrew): Anti auto-stringset
+template < typename T >
+inline bool _validStringSetLimits(T const &) {
+    return true;
+}
+
+template < typename TString, typename TSpec >
+inline bool _validStringSetLimits(StringSet< TString, TSpec > const & me) {
+    return me.limitsValid;
+}
+
+// --------------------------------------------------------------------------
+// Function _refreshStringSetLimits
+// --------------------------------------------------------------------------
+
+template < typename T >
+inline void _refreshStringSetLimits(T &) {}
+
+template < typename TString, typename TSpec >
+inline void _refreshStringSetLimits(StringSet< TString, TSpec > & me)
+{
+    typedef StringSet< TString, TSpec >                 TStringSet;
+    typedef typename StringSetLimits<TStringSet>::Type  TLimits;
+
+    typename Value<TLimits>::Type   sum = 0;
+    typename Size<TStringSet>::Type len = length(me);
+    typename Size<TStringSet>::Type i = 0;
+
+//      SEQAN_ASSERT(length(me.limits) == len + 1);
+    resize(me.limits, len + 1, Generous());
+    for(; i < len; ++i) {
+        me.limits[i] = sum;
+        sum += length(me[i]);
+    }
+    me.limits[i] = sum;
+    me.limitsValid = true;
+}
+
+// --------------------------------------------------------------------------
+// Function _findIthNonZeroValue()
+// --------------------------------------------------------------------------
+
+// find the i-th non-zero value of a string me
+template < typename TValue, typename TSpec, typename TPos >
+inline typename Size< String<TValue, TSpec> >::Type
+_findIthNonZeroValue(String<TValue, TSpec> const & me, TPos i)
+{
+    typename Iterator< String<TValue, TSpec> const, Standard >::Type it = begin(me, Standard());
+    typename Iterator< String<TValue, TSpec> const, Standard >::Type itEnd = end(me, Standard());
+
+    for(; it != itEnd; ++it)
+        if (*it)
+        {
+            if (i)
+                --i;
+            else
+                return position(it, me);
+        }
+    return length(me);
+}
+
+// --------------------------------------------------------------------------
+// Function _countNonZeroValues()
+// --------------------------------------------------------------------------
+
+// count non-zero values before position i
+template < typename TValue, typename TSpec, typename TPos >
+inline typename Size< String<TValue, TSpec> >::Type
+_countNonZeroValues(String<TValue, TSpec> const & me, TPos i)
+{
+    typename Iterator< String<TValue, TSpec> const, Standard >::Type it = begin(me, Standard());
+    typename Iterator< String<TValue, TSpec> const, Standard >::Type itEnd = begin(me, Standard()) + i;
+    typename Size< String<TValue, TSpec> >::Type counter = 0;
+
+    for(; it != itEnd; ++it)
+        if (*it) ++counter;
+    return counter;
+}
+
+// --------------------------------------------------------------------------
+// Function lengthSum()
+// --------------------------------------------------------------------------
+
+template < typename TString >
+inline typename Size<TString>::Type lengthSum(TString const & me) {
+    return length(me);
+}
+
+template < typename TString, typename TSpec >
+inline typename Size<TString>::Type lengthSum(StringSet< TString, TSpec > const & me)
+{
+    if (!_validStringSetLimits(me))
+        _refreshStringSetLimits(me);
+    return back(stringSetLimits(me));
+}
+
+// --------------------------------------------------------------------------
+// Function length()
+// --------------------------------------------------------------------------
+
+///.Function.appendValue.param.target.type:Class.StringSet
+///.Function.clear.param.object.type:Class.StringSet
+///.Function.resize.param.object.type:Class.StringSet
+///.Function.length.param.object.type:Class.StringSet
+template <typename TString, typename TSpec >
+inline typename Size<StringSet<TString, TSpec > >::Type
+length(StringSet<TString, TSpec > const & me)
+{
+    return length(me.strings);
+}
+
+// --------------------------------------------------------------------------
+// Function iter()
+// --------------------------------------------------------------------------
+
+///.Function.iter.param.object.type:Class.StringSet
+template <typename TString, typename TSpec, typename TPos, typename TTag>
+inline typename Iterator<StringSet<TString, TSpec >, Tag<TTag> const>::Type
+iter(StringSet<TString, TSpec > & me,
+     TPos pos,
+     Tag<TTag> const &)
+{
+    typedef StringSet<TString, TSpec > TStringSet;
+    typedef typename Iterator<TStringSet, Tag<TTag> const>::Type TIterator;
+    typedef typename Position<TStringSet>::Type TPosition;
+    return TIterator(me, (TPosition) pos);
+}
+
+template <typename TString, typename TSpec, typename TPos, typename TTag>
+inline typename Iterator<StringSet<TString, TSpec > const, Tag<TTag> const>::Type
+iter(StringSet<TString, TSpec > const & me,
+     TPos pos,
+     Tag<TTag> const &)
+{
+    typedef StringSet<TString, TSpec > const TStringSet;
+    typedef typename Iterator<TStringSet, Tag<TTag> const>::Type TIterator;
+    typedef typename Position<TStringSet>::Type TPosition;
+    return TIterator(me, (TPosition) pos);
+}
+
+// --------------------------------------------------------------------------
+// Function begin()
+// --------------------------------------------------------------------------
+
+///.Function.begin.param.object.type:Class.StringSet
+template <typename TString, typename TSpec, typename TTag>
+inline typename Iterator<StringSet<TString, TSpec >, Tag<TTag> const>::Type
+begin(StringSet<TString, TSpec > & me,
+      Tag<TTag> const & tag)
+{
+    return iter(me, 0, tag);
+}
+
+template <typename TString, typename TSpec, typename TTag>
+inline typename Iterator<StringSet<TString, TSpec > const, Tag<TTag> const>::Type
+begin(StringSet<TString, TSpec > const & me,
+      Tag<TTag> const & tag)
+{
+    return iter(me, 0, tag);
+}
+
+// --------------------------------------------------------------------------
+// Function end()
+// --------------------------------------------------------------------------
+
+///.Function.end.param.object.type:Class.StringSet
+template <typename TString, typename TSpec, typename TTag>
+inline typename Iterator<StringSet<TString, TSpec >, Tag<TTag> const>::Type
+end(StringSet<TString, TSpec > & me,
+Tag<TTag> const & tag)
+{
+return iter(me, length(me), tag);
+}
+
+template <typename TString, typename TSpec, typename TTag>
+inline typename Iterator<StringSet<TString, TSpec > const, Tag<TTag> const>::Type
+end(StringSet<TString, TSpec > const & me,
+Tag<TTag> const & tag)
+{
+return iter(me, length(me), tag);
+}
+
+// --------------------------------------------------------------------------
+// Function value()
+// --------------------------------------------------------------------------
+
+///.Function.value.param.object.type:Class.StringSet
+
+// --------------------------------------------------------------------------
+// Function getValueById()
+// --------------------------------------------------------------------------
+
+/**
+.Function.getValueById:
+..cat:Sequences
+..summary:Retrieves a string from the StringSet given an id.
+..signature:getValueById(me, id)
+..param.me:A StringSet.
+...type:Class.StringSet
+..param.id:An id.
+...type:Metafunction.Id
+..returns:A reference to a string.
+..see:Function.assignValueById
+..see:Function.valueById
+..include:seqan/sequence.h
+*/
+
+// TODO(holtgrew): Why is there no generic implementation for StringSets??
+
+// --------------------------------------------------------------------------
+// Function valueById()
+// --------------------------------------------------------------------------
+
+/**
+.Function.valueById:
+..cat:Sequences
+..summary:Retrieves a string from the StringSet given an id.
+..signature:valueById(me, id)
+..param.me:A StringSet.
+...type:Class.StringSet
+..param.id:An id.
+...type:Metafunction.Id
+..returns:A reference to a string.
+..see:Function.assignValueById
+..see:Function.getValueById
+..include:seqan/sequence.h
+*/
+
+template<typename TString, typename TSpec, typename TId>
+inline typename Reference<StringSet<TString, TSpec> >::Type
+valueById(StringSet<TString, TSpec> & me,
+        TId const id)
+{
+    SEQAN_CHECKPOINT;
+    return getValueById(me, id);
+}
+
+// --------------------------------------------------------------------------
+// Function assignValueById()
+// --------------------------------------------------------------------------
+
+/**
+.Function.assignValueById:
+..cat:Sequences
+..summary:Adds a new string to the StringSet and returns an id.
+..signature:assignValueById(dest, str, [id])
+..signature:assignValueById(dest, source, id)
+..param.dest:A StringSet.
+...type:Class.StringSet
+..param.source:A StringSet.
+...type:Class.StringSet
+..param.str:A new string.
+...type:Metafunction.Value
+..param.id:An associated id.
+...type:Metafunction.Id
+..returns:A new id
+...type:Metafunction.Id
+..see:Function.getValueById
+..see:Function.valueById
+..include:seqan/sequence.h
+*/
+
+template<typename TString, typename TSpec, typename TString2>
+inline typename Id<StringSet<TString, TSpec> >::Type
+assignValueById(StringSet<TString, TSpec>& me,
+                TString2& obj)
+{
+    SEQAN_CHECKPOINT;
+    appendValue(me, obj);
+    SEQAN_ASSERT(length(me.limits) == length(me) + 1);
+    return length(me.strings) - 1;
+}
+
+template<typename TString, typename TSpec1, typename TSpec2, typename TId>
+inline typename Id<StringSet<TString, TSpec1> >::Type
+assignValueById(StringSet<TString, TSpec1>& dest,
+                StringSet<TString, TSpec2>& source,
+                TId id)
+{
+    SEQAN_CHECKPOINT;
+    return assignValueById(dest, getValueById(source, id), id);
+}
+
+// --------------------------------------------------------------------------
+// Function removeValueById()
+// --------------------------------------------------------------------------
+
+/**
+.Function.removeValueById:
+..cat:Sequences
+..summary:Removes a string from the StringSet given an id.
+..signature:removeValueById(me, id)
+..param.me:A StringSet.
+...type:Class.StringSet
+..param.id:An id.
+...type:Metafunction.Id
+..returns:void
+..see:Function.assignValueById
+..include:seqan/sequence.h
+*/
+
+// TODO(holtgrew): Why is there no generic implementation for StringSets??
+
+// --------------------------------------------------------------------------
+// Function positionToId()
+// --------------------------------------------------------------------------
+
+/**
+.Function.positionToId:
+..cat:Sequences
+..summary:Retrieves the id of a string in the StringSet given a position.
+..signature:positionToId(string_set, pos)
+..param.string_set:A StringSet.
+...type:Class.StringSet
+..param.pos:A position that is transfored into an id.
+..returns:An id that corresponds to $pos$ within $string_set$
+..see:Function.assignValueById
+..see:Function.valueById
+..include:seqan/sequence.h
+*/
+
+// TODO(holtgrew): Why is there no generic implementation for StringSets??
+
+// --------------------------------------------------------------------------
+// Function concat()
+// --------------------------------------------------------------------------
+
+/**
+.Function.concat:
+..summary:Returns the concatenation sequence of all sequences in a @Class.StringSet at .
+..cat:Sequences
+..signature:concat(stringSet)
+..param.stringSet:A @Class.StringSet@ object.
+...type:Class.StringSet
+..returns:A container that can be iterated like the concatenation string of all sequences in a @Class.StringSet at .
+..remarks:If $stringSet$ is a @Spec.ConcatDirect@ StringSet a reference to $stringSet.concat$ is returned.
+For all other StringSets a @Class.ConcatenatorManyToOne@ object is returned.
+...type:Metafunction.Concatenator
+..include:seqan/sequence.h
+*/
+
+// TODO(holtgrew): Why default concat() for any class?
+template <typename TString>
+inline typename Concatenator<TString>::Type &
+concat(TString & string)
+{
+    return string;
+}
+
+// TODO(holtgrew): Why default concat() for any class?
+template <typename TString>
+inline typename Concatenator<TString const>::Type &
+concat(TString const & string)
+{
+    return string;
+}
+
+template <typename TString, typename TSpec>
+inline typename Concatenator<StringSet<TString, TSpec> >::Type &
+concat(StringSet<TString, TSpec> & me)
+{
+    me.concat.set = &me;
+    return me.concat;
+}
+
+template <typename TString, typename TSpec>
+inline typename Concatenator<StringSet<TString, TSpec> const>::Type &
+concat(StringSet<TString, TSpec> const & constMe)
+{
+    StringSet<TString, TSpec> &me = const_cast<StringSet<TString, TSpec> &>(constMe);
+    me.concat.set = &me;
+    return me.concat;
+}
+
+// --------------------------------------------------------------------------
+// Function idToPosition()
+// --------------------------------------------------------------------------
+
+/**
+.Function.idToPosition:
+..cat:Sequences
+..summary:Retrieves the position of a string in the StringSet given an id.
+..signature:idToPosition(me, id)
+..param.me:A StringSet.
+...type:Class.StringSet
+..param.id:An id.
+...type:Metafunction.Id
+..returns:A reference to a string.
+..see:Function.assignValueById
+..see:Function.valueById
+..include:seqan/sequence.h
+*/
+
+// TODO(holtgrew): Why is there no generic implementation for StringSets??
+
+
+// TODO(holtgrew): Should the following code be thrown away?
+
+//template <typename TString, typename TSpec, typename TDestSpec, typename TIds, typename TLength>
+//inline void
+//subset(StringSet<TString, Owner<TSpec> >& source,
+//    StringSet<TString, TDestSpec>& dest,
+//    TIds ids,
+//    TLength len)
+//{
+//SEQAN_CHECKPOINT
+//}
+
+//template <typename TString, typename TIds, typename TLength>
+//inline void
+//subset(StringSet<TString, Dependent<Generous> >& source,
+//    StringSet<TString, Dependent<Generous> >& dest,
+//    TIds ids,
+//    TLength len)
+//{
+//SEQAN_CHECKPOINT
+//    typedef StringSet<TString, Dependent<Generous> > TStringSet;
+//    typedef typename Id<TStringSet>::Type TId;
+//    typedef typename Size<TStringSet>::Type TSize;
+
+//    clear(dest);
+//    resize(dest.limits, len + 1);
+//    dest.limitsValid = (len == 0);
+//    resize(dest.strings, length(source.strings), (TString*) 0);
+//    for(TSize i = 0; i < len; ++i)
+//        dest.strings[ids[i]] = source.strings[ids[i]];
+//}
+
+//template <typename TString, typename TIds, typename TLength>
+//inline void
+//subset(StringSet<TString, Dependent<Tight> >& source,
+//    StringSet<TString, Dependent<Tight> >& dest,
+//    TIds ids,
+//    TLength len)
+//{
+//SEQAN_CHECKPOINT
+//    typedef StringSet<TString, Dependent<Tight> > TStringSet;
+//    typedef typename Id<TStringSet>::Type TId;
+//    typedef typename Size<TStringSet>::Type TSize;
+
+//    clear(dest);
+//    resize(dest.limits, len + 1);
+//    dest.limitsValid = (len == 0);
+//    TLength upperBound = length(source.ids);
+//    for(TSize i=0;i<len;++i) {
+//        TId id = ids[i];
+//        if ((upperBound > id) &&
+//            (source.ids[id] == id)) {
+//                appendValue(dest.strings, source.strings[id]);
+//                appendValue(dest.ids, id);
+//        } else {
+//            typedef String<TId> TIdString;
+//            typedef typename Iterator<TIdString, Rooted>::Type TIter;
+//            TIter it = begin(source.ids);
+//            for(;!atEnd(it);goNext(it)) {
+//                if (*it == id) {
+//                    appendValue(dest.strings, source.strings[position(it)]);
+//                    appendValue(dest.ids, id);
+//                }
+//            }
+//        }
+//    }
+//}
+
+//template <typename TString, typename TSpec, typename TIds>
+//inline void
+//subset(StringSet<TString, TSpec>& source,
+//    StringSet<TString, TSpec>& dest,
+//    TIds ids)
+//{
+//SEQAN_CHECKPOINT
+//    subset(source, dest, ids, length(ids));
+//}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_STRING_SET_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/sequence/string_set_concat_direct.h b/src/SeqAn-1.3/seqan/sequence/string_set_concat_direct.h
new file mode 100644
index 0000000..fd7d3f1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_set_concat_direct.h
@@ -0,0 +1,469 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// Implementation of ConcatDirect string set, a string set storing the
+// concatenation of all strings within one string.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_STRING_SET_CONCAT_DIRECT_H_
+#define SEQAN_SEQUENCE_STRING_SET_CONCAT_DIRECT_H_
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+template <typename TDelimiter = void>
+struct ConcatDirect;                    // contains 1 string (the concatenation of n strings)
+
+// TODO(holtgrew): Change name of specialization to ConcatDirect StringSet.
+
+/**
+.Spec.ConcatDirect:
+..summary:A string set storing the concatenation of all strings within one string.
+..cat:Sequences
+..general:Spec.Owner
+..signature:StringSet<TString, Owner<ConcatDirect<> > >
+..param.TString:The string type.
+...type:Class.String
+..remarks:The strings are internally stored in a $TString$ object and the character position type is a
+a single integer value between 0 and the sum of string lengths minus 1.
+..remarks:The position type can be returned or modified by the meta-function @Metafunction.SAValue@ called with the @Class.StringSet@ type.
+..include:seqan/sequence.h
+.Memvar.ConcatDirect#concat:
+..class:Spec.ConcatDirect
+..summary:The concatenation string. Concatenates all sequences of the StringSet without gaps.
+*/
+template <typename TString, typename TDelimiter>
+class StringSet<TString, Owner<ConcatDirect<TDelimiter> > >
+{
+public:
+    typedef typename StringSetLimits<StringSet>::Type   TLimits;
+    typedef typename Concatenator<StringSet>::Type      TConcatenator;
+
+    TLimits         limits;
+    TConcatenator   concat;
+
+    StringSet()
+    {
+        appendValue(limits, 0);
+    }
+
+    // ----------------------------------------------------------------------
+    // Subscription operators; have to be defined in class def.
+    // ----------------------------------------------------------------------
+
+    template <typename TPos>
+    inline typename Reference<StringSet>::Type
+    operator[](TPos pos)
+    {
+        SEQAN_CHECKPOINT;
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<StringSet const>::Type
+    operator[](TPos pos) const
+    {
+        SEQAN_CHECKPOINT;
+        return value(*this, pos);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Metafunction Concatenator
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec >
+struct Concatenator<StringSet<TString, Owner<ConcatDirect<TSpec> > > >
+{
+    typedef TString Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction Value
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec>
+struct Value<StringSet< TString, Owner<ConcatDirect<TSpec> > > >
+    : Infix<TString> {};
+
+// --------------------------------------------------------------------------
+// Metafunction GetValue
+// --------------------------------------------------------------------------
+
+/* // we had a problem with constructing a Finder<GetValue<TConcatStringSet>::Type>
+template < typename TString, typename TSpec >
+struct GetValue< StringSet< TString, Owner<ConcatDirect<TSpec> > > >:
+    Infix<TString> {};
+
+template < typename TString, typename TSpec >
+struct GetValue< StringSet< TString, Owner<ConcatDirect<TSpec> > > const >:
+    Infix<TString const> {};
+*/
+
+template < typename TString, typename TSpec >
+struct GetValue< StringSet< TString, Owner<ConcatDirect<TSpec> > > >
+{
+    typedef typename Infix<TString>::Type const Type;
+};
+
+template < typename TString, typename TSpec >
+struct GetValue< StringSet< TString, Owner<ConcatDirect<TSpec> > > const>
+{
+    typedef typename Infix<TString const>::Type const Type;
+};
+
+// --------------------------------------------------------------------------
+// Metafunction Reference
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TSpec >
+struct Reference< StringSet< TString, Owner<ConcatDirect<TSpec> > > >
+    : Infix<TString> {};
+
+template < typename TString, typename TSpec >
+struct Reference< StringSet< TString, Owner<ConcatDirect<TSpec> > > const>
+    : Infix<TString const> {};
+
+// --------------------------------------------------------------------------
+// Metafunction Prefix
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TSpec >
+struct Prefix<StringSet< TString, Owner<ConcatDirect<TSpec> > > >
+    : Infix<TString> {};
+
+template < typename TString, typename TSpec >
+struct Prefix<StringSet<TString, Owner<ConcatDirect<TSpec> > > const>
+    : Infix<TString const> {};
+
+// --------------------------------------------------------------------------
+// Metafunction Suffix
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec>
+struct Suffix< StringSet< TString, Owner<ConcatDirect<TSpec> > > >
+    : Infix<TString> {};
+
+template <typename TString, typename TSpec>
+struct Suffix< StringSet< TString, Owner<ConcatDirect<TSpec> > > const>
+    : Infix<TString const> {};
+
+// --------------------------------------------------------------------------
+// Metafunction Infix
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TSpec >
+struct Infix< StringSet< TString, Owner<ConcatDirect<TSpec> > > >
+    : Infix< TString > {};
+
+template < typename TString, typename TSpec >
+struct Infix< StringSet< TString, Owner<ConcatDirect<TSpec> > > const >
+    : Infix< TString const > {};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function _validStringSetLimits
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec >
+inline bool _validStringSetLimits(StringSet<TString, Owner<ConcatDirect<TSpec> > > const &)
+{
+    return true;
+}
+
+// --------------------------------------------------------------------------
+// Function _refreshStringSetLimits()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec >
+inline void _refreshStringSetLimits(StringSet<TString, Owner<ConcatDirect<TSpec> > > &) {}
+
+// --------------------------------------------------------------------------
+// Function appendValue()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TString2, typename TExpand >
+inline void appendValue(
+    StringSet<TString, Owner<ConcatDirect<void> > > & me,
+    TString2 const & obj,
+    Tag<TExpand> const & tag)
+{
+    appendValue(me.limits, lengthSum(me) + length(obj), tag);
+    append(me.concat, obj, tag);
+}
+
+template <typename TString, typename TDelimiter, typename TString2, typename TExpand >
+inline void appendValue(
+    StringSet<TString, Owner<ConcatDirect<TDelimiter> > > & me,
+    TString2 const & obj,
+    Tag<TExpand> const & tag)
+{
+    appendValue(me.limits, lengthSum(me) + length(obj) + 1, tag);
+    append(me.concat, obj, tag);
+    appendValue(me.concat, TDelimiter(), tag);
+}
+
+
+// --------------------------------------------------------------------------
+// Function insertValue()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TDelimiter, typename TPos, typename TSequence, typename TExpand >
+inline void insertValue(
+    StringSet<TString, Owner<ConcatDirect<TDelimiter> > > & me,
+    TPos pos,
+    TSequence const & seq,
+    Tag<TExpand> const tag)
+{
+    typedef StringSet<TString, Owner<ConcatDirect<TDelimiter> > > TStringSet;
+    typedef typename Size<TStringSet>::Type TSize;
+    typedef typename StringSetLimits<TStringSet>::Type TLimits;
+    typedef typename Value<TLimits>::Type TLimitValue;
+
+    replace(me.concat, me.limits[pos], me.limits[pos], seq, tag);
+    insertValue(me.limits, pos, me.limits[pos], tag);
+    TLimitValue delta = (TLimitValue)length(seq);
+    TSize size = length(me);
+    while (pos <size)
+        me.limits[++pos] += delta;
+}
+
+// --------------------------------------------------------------------------
+// Function erase()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TDelimiter, typename TPos >
+inline void erase(
+    StringSet<TString, Owner<ConcatDirect<TDelimiter> > > & me,
+    TPos pos,
+    TPos pos_end)
+{
+    typedef StringSet<TString, Owner<ConcatDirect<TDelimiter> > > TStringSet;
+    typedef typename Size<TStringSet>::Type TSize;
+    typedef typename StringSetLimits<TStringSet>::Type TLimits;
+    typedef typename Value<TLimits>::Type TLimitValue;
+
+    erase(me.concat, me.limits[pos], me.limits[pos_end]);
+
+    TLimitValue lengthSum = 0;
+    for (TSize i = pos; i <pos_end; ++i)
+        lengthSum += me.limits[i];
+
+    erase(me.limits, pos, pos_end);
+
+    TSize size = length(me);
+    while (pos <size)
+        me.limits[++pos] -= lengthSum;
+}
+
+// --------------------------------------------------------------------------
+// Function clear()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TDelimiter >
+inline void clear(StringSet<TString, Owner<ConcatDirect<TDelimiter> > > & me)
+{
+    SEQAN_CHECKPOINT;
+    clear(me.concat);
+    resize(me.limits, 1, Exact());
+}
+
+// --------------------------------------------------------------------------
+// Function length()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TDelimiter>
+inline typename Size<StringSet<TString, Owner<ConcatDirect<TDelimiter> > > >::Type
+length(StringSet<TString, Owner<ConcatDirect<TDelimiter> > > const & me)
+{
+    return length(me.limits) - 1;
+}
+
+// --------------------------------------------------------------------------
+// Function resize()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec, typename TSize, typename TExpand >
+inline typename Size<StringSet<TString, TSpec > >::Type
+resize(StringSet<TString, TSpec > & me, TSize new_size, Tag<TExpand> const & tag)
+{
+    resize(me.limits, new_size + 1, tag);
+    me.limitsValid = (new_size == 0);
+
+//     the following would not work as changing the size of
+//     a single string cannot be recognized by the stringset
+//
+//        if (_validStringSetLimits(me))
+//            resize(me.limits, new_size + 1, back(me.limits), tag);
+
+    return resize(me.strings, new_size, tag);
+}
+
+template <typename TString, typename TSpec, typename TSize, typename TExpand >
+inline typename Size<StringSet<TString, Owner<ConcatDirect<TSpec> > > >::Type
+resize(StringSet<TString, Owner<ConcatDirect<TSpec> > > & me, TSize new_size, Tag<TExpand> const & tag)
+{
+    if (new_size < length(me.limits))
+    {
+        resize(me.concat, me.limits[new_size]);
+        return resize(me.limits, new_size + 1, tag) - 1;
+    } else
+        return resize(me.limits, new_size + 1, back(me.limits), tag) - 1;
+}
+
+// --------------------------------------------------------------------------
+// Function prefix()
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TDelimiter, typename TPosition >
+inline typename Infix<TString>::Type
+prefix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > & me, TPosition pos)
+{
+    return infix(me.concat, stringSetLimits(me)[getSeqNo(pos, stringSetLimits(me))], posGlobalize(pos, stringSetLimits(me)));
+}
+
+template < typename TString, typename TDelimiter, typename TPosition >
+inline typename Infix<TString const>::Type
+prefix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > const & me, TPosition pos)
+{
+    return infix(me.concat, stringSetLimits(me)[getSeqNo(pos, stringSetLimits(me))], posGlobalize(pos, stringSetLimits(me)));
+}
+
+// --------------------------------------------------------------------------
+// Function suffix()
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TDelimiter, typename TPosition >
+inline typename Infix<TString>::Type
+suffix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > & me, TPosition pos)
+{
+    return infix(me.concat, posGlobalize(pos, stringSetLimits(me)), stringSetLimits(me)[getSeqNo(pos, stringSetLimits(me)) + 1]);
+}
+
+template < typename TString, typename TDelimiter, typename TPosition >
+inline typename Infix<TString const>::Type
+suffix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > const & me, TPosition pos)
+{
+    return infix(me.concat, posGlobalize(pos, stringSetLimits(me)), stringSetLimits(me)[getSeqNo(pos, stringSetLimits(me)) + 1]);
+}
+
+// --------------------------------------------------------------------------
+// Function infix()
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TDelimiter, typename TPosBegin, typename TPosEnd >
+inline typename Infix<TString>::Type
+infix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > & me, TPosBegin posBegin, TPosEnd posEnd)
+{
+    return infix(me.concat, posGlobalize(posBegin, stringSetLimits(me)), posGlobalize(posEnd, stringSetLimits(me)));
+}
+
+template < typename TString, typename TDelimiter, typename TPosBegin, typename TPosEnd >
+inline typename Infix<TString const>::Type
+infix(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > const & me, TPosBegin posBegin, TPosEnd posEnd)
+{
+    return infix(me.concat, posGlobalize(posBegin, stringSetLimits(me)), posGlobalize(posEnd, stringSetLimits(me)));
+}
+
+// --------------------------------------------------------------------------
+// Function infixWithLength()
+// --------------------------------------------------------------------------
+
+template < typename TString, typename TDelimiter, typename TPosition, typename TSize >
+inline typename Infix<TString>::Type
+infixWithLength(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > & me, TPosition pos, TSize length)
+{
+    return infixWithLength(me.concat, posGlobalize(pos, stringSetLimits(me)), length);
+}
+
+template < typename TString, typename TDelimiter, typename TPosition, typename TSize >
+inline typename Infix<TString const>::Type
+infixWithLength(StringSet< TString, Owner<ConcatDirect<TDelimiter> > > const & me, TPosition pos, TSize length)
+{
+    return infixWithLength(me.concat, posGlobalize(pos, stringSetLimits(me)), length);
+}
+
+// --------------------------------------------------------------------------
+// Function value()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec, typename TPos >
+inline typename Infix<TString>::Type
+value(StringSet<TString, Owner<ConcatDirect<TSpec> > > & me, TPos pos)
+{
+    return infix(me.concat, me.limits[pos], me.limits[pos + 1]);
+}
+
+template <typename TString, typename TSpec, typename TPos >
+inline typename Infix<TString const>::Type
+value(StringSet<TString, Owner<ConcatDirect<TSpec> > > const & me, TPos pos)
+{
+    return infix(me.concat, me.limits[pos], me.limits[pos + 1]);
+}
+
+// --------------------------------------------------------------------------
+// Function concat()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec>
+inline typename Concatenator<StringSet<TString, Owner<ConcatDirect<TSpec> > > >::Type &
+concat(StringSet<TString, Owner<ConcatDirect<TSpec> > > & me)
+{
+    return me.concat;
+}
+
+template <typename TString, typename TSpec>
+inline typename Concatenator<StringSet<TString, Owner<ConcatDirect<TSpec> > > const>::Type &
+concat(StringSet<TString, Owner<ConcatDirect<TSpec> > > const & me)
+{
+    return me.concat;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_STRING_SET_CONCAT_DIRECT_H_
diff --git a/src/SeqAn-1.3/seqan/sequence/string_set_dependent_generous.h b/src/SeqAn-1.3/seqan/sequence/string_set_dependent_generous.h
new file mode 100644
index 0000000..84dd377
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_set_dependent_generous.h
@@ -0,0 +1,262 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// Implementation of the StringSet specialization Dependent<Generous>.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_STRING_SET_DEPENDENT_GENEROUS_H_
+#define SEQAN_SEQUENCE_STRING_SET_DEPENDENT_GENEROUSH_
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// The documentation of the Dependent specialization is in string_set_tight.h
+// since Tight is the default specialization of Dependent.
+
+// StringSet with individual sequences in a string of string pointers
+template <typename TString>
+class StringSet<TString, Dependent<Generous> >
+{
+public:
+    typedef String<TString *>                           TStrings;
+    typedef typename Size<StringSet>::Type              TSize;
+    typedef typename StringSetLimits<StringSet>::Type   TLimits;
+    typedef typename Concatenator<StringSet>::Type      TConcatenator;
+
+    TStrings        strings;
+    TLimits         limits;
+    bool            limitsValid;        // is true if limits contains the cumulative sum of the sequence lengths
+    TConcatenator   concat;
+
+    StringSet()
+        : limitsValid(true)
+    {
+        SEQAN_CHECKPOINT;
+        appendValue(limits, 0);
+    }
+
+    template <typename TDefault>
+    StringSet(StringSet<TString, Owner<TDefault> > const& _other)
+        : limitsValid(true)
+    {
+        SEQAN_CHECKPOINT;
+        appendValue(limits, 0);
+        for (unsigned int i = 0; i < length(_other); ++i)
+            appendValue(*this, _other[i]);
+    }
+
+    // ----------------------------------------------------------------------
+    // Subscription operators; have to be defined in class def.
+    // ----------------------------------------------------------------------
+
+    template <typename TPos>
+    inline typename Reference<StringSet>::Type
+    operator[] (TPos pos)
+    {
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<StringSet const>::Type
+    operator[] (TPos pos) const
+    {
+        return value(*this, pos);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function appendValue()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TExpand >
+inline void appendValue(
+    StringSet<TString, Dependent<Generous> > & me,
+    TString const & obj,
+    Tag<TExpand> const & tag)
+{
+    SEQAN_CHECKPOINT;
+    appendValue(me.limits, lengthSum(me) + length(obj), tag);
+    appendValue(me.strings, const_cast<TString*>(&obj), tag);
+}
+
+// --------------------------------------------------------------------------
+// Function clear()
+// --------------------------------------------------------------------------
+
+template <typename TString >
+inline void clear(StringSet<TString, Dependent<Generous> > & me)
+{
+    SEQAN_CHECKPOINT;
+    clear(me.strings);
+    resize(me.limits, 1, Exact());
+    me.limitsValid = true;
+}
+
+// --------------------------------------------------------------------------
+// Function value()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TPos >
+inline typename Reference<StringSet<TString, Dependent<Generous> > >::Type
+value(StringSet<TString, Dependent<Generous> >& me, TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    unsigned i = _findIthNonZeroValue(me.strings, pos);
+    if (i <length(me.strings))
+        return *me.strings[i];
+    static TString tmp = "";
+    return tmp;
+}
+
+template <typename TString, typename TPos >
+inline typename Reference<StringSet<TString, Dependent<Generous> > const >::Type
+value(StringSet<TString, Dependent<Generous> > const & me, TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    unsigned i = _findIthNonZeroValue(me.strings, pos);
+    if (i < length(me.strings))
+        return *me.strings[i];
+    static TString tmp = "";
+    return tmp;
+}
+
+// --------------------------------------------------------------------------
+// Function getValueById()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TId>
+inline typename Reference<StringSet<TString, Dependent<Generous> > >::Type
+getValueById(StringSet<TString, Dependent<Generous> >& me,
+            TId const id)
+{
+    SEQAN_CHECKPOINT;
+    if (me.strings[id])
+        return *me.strings[id];
+    static TString tmp = "";
+    return tmp;
+}
+
+// --------------------------------------------------------------------------
+// Function assignValueById()
+// --------------------------------------------------------------------------
+
+template<typename TString, typename TId>
+inline typename Id<StringSet<TString, Dependent<Generous> > >::Type
+assignValueById(StringSet<TString, Dependent<Generous> >& me,
+                TString& obj,
+                TId id)
+{
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT(length(stringSetLimits(me)) == length(me) + 1);
+    if (id >= (TId) length(me.strings)) resize(me.strings, id+1, (TString*) 0);
+    if ((TString*) me.strings[id] == (TString*) 0)
+        resize(me.limits, length(me.limits) + 1, Generous());
+    me.strings[id] = &obj;
+    me.limitsValid = false;
+    SEQAN_ASSERT(length(stringSetLimits(me)) == length(me) + 1);
+    return id;
+}
+
+// --------------------------------------------------------------------------
+// Function removeValueById()
+// --------------------------------------------------------------------------
+
+template<typename TString, typename TId>
+inline void
+removeValueById(StringSet<TString, Dependent<Generous> >& me, TId const id)
+{
+    SEQAN_CHECKPOINT;
+    if (me.strings[id] != (TString*) 0)
+    {
+        resize(me.limits, length(me.limits) - 1, Generous());
+        me.limitsValid = empty(me);
+    }
+    me.strings[id] = 0;
+    while (!empty(me.strings) && !me.strings[length(me.strings) - 1])
+        resize(me.strings, length(me.strings) - 1, Generous());
+}
+
+// --------------------------------------------------------------------------
+// Function positionToId()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TPos>
+inline typename Id<StringSet<TString, Dependent<Generous> > >::Type
+positionToId(StringSet<TString, Dependent<Generous> >& me,
+        TPos const pos)
+{
+    SEQAN_CHECKPOINT;
+    return _findIthNonZeroValue(me.strings,pos);
+}
+
+template <typename TString, typename TPos>
+inline typename Id<StringSet<TString, Dependent<Generous> > >::Type
+positionToId(StringSet<TString, Dependent<Generous> > const& me,
+            TPos const pos)
+{
+    SEQAN_CHECKPOINT;
+    return _findIthNonZeroValue(me.strings,pos);
+}
+
+// --------------------------------------------------------------------------
+// Function idToPosition()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TId>
+inline typename Id<StringSet<TString, Dependent<Generous> > >::Type
+idToPosition(StringSet<TString, Dependent<Generous> > const& me,
+            TId const id)
+{
+    SEQAN_CHECKPOINT;
+    return _countNonZeroValues(me.strings,id);
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_STRING_SET_DEPENDENT_GENEROUSH_
diff --git a/src/SeqAn-1.3/seqan/sequence/string_set_dependent_tight.h b/src/SeqAn-1.3/seqan/sequence/string_set_dependent_tight.h
new file mode 100644
index 0000000..49be67b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_set_dependent_tight.h
@@ -0,0 +1,322 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// Implementation of the StringSet specialization Dependent<Tight>, the
+// the default specialization of Dependent<>.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_STRING_SET_DEPENDENT_TIGHT_H_
+#define SEQAN_SEQUENCE_STRING_SET_DEPENDENT_TIGHT_H_
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// TODO(holtgrew): Change name of specialization to Dependent StringSet.
+
+/**
+.Spec.Dependent:
+..summary:A string set storing references of the strings.
+..cat:Sequences
+..general:Class.StringSet
+..signature:StringSet<TString, Dependent<TSpec> >
+..param.TString:The string type.
+...type:Class.String
+..param.TSpec:The specializing type for the dependent string set.
+...default:$Tight$
+...remarks:Possible values are $Tight$ or $Generous$
+...remarks:$Tight$ is very space efficient whereas $Generous$ provides fast access to the strings in the container via ids.
+..include:seqan/sequence.h
+ */
+// Default id holder string set
+template <typename TSpec = Tight>
+struct Dependent;
+
+// StringSet with individual sequences in a tight string of string pointers and corr. IDs
+template <typename TString>
+class StringSet<TString, Dependent<Tight> >
+{
+public:
+    typedef String<TString *>                           TStrings;
+    typedef typename Id<StringSet>::Type                TIdType;
+    typedef typename Position<StringSet>::Type          TPosition;
+    typedef String<TIdType>                             TIds;
+    typedef std::map<TIdType, TPosition>                TIdPosMap;
+    typedef typename StringSetLimits<StringSet>::Type   TLimits;
+    typedef typename Concatenator<StringSet>::Type      TConcatenator;
+
+    TIdType         lastId;
+    TStrings        strings;
+    TIds            ids;
+    TIdPosMap       id_pos_map;
+    TLimits         limits;
+    bool            limitsValid;        // is true if limits contains the cumulative sum of the sequence lengths
+    TConcatenator   concat;
+
+    StringSet()
+        : lastId(0), limitsValid(true)
+    {
+        SEQAN_CHECKPOINT;
+        appendValue(limits, 0);
+    }
+
+    template <typename TDefault>
+    StringSet(StringSet<TString, Owner<TDefault> > const & _other)
+        : lastId(0), limitsValid(true)
+    {
+        SEQAN_CHECKPOINT;
+        appendValue(limits, 0);
+        for (unsigned int i = 0; i < length(_other); ++i)
+            appendValue(*this, _other[i]);
+    }
+
+    // ----------------------------------------------------------------------
+    // Subscription operators; have to be defined in class def.
+    // ----------------------------------------------------------------------
+
+    template <typename TPos>
+    inline typename Reference<StringSet>::Type
+    operator[] (TPos pos)
+    {
+        SEQAN_CHECKPOINT;
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<StringSet const>::Type
+    operator[] (TPos pos) const
+    {
+        return value(*this, pos);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function appendValue()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TExpand >
+inline void appendValue(
+    StringSet<TString, Dependent<Tight> > & me,
+    TString const & obj,
+    Tag<TExpand> const & tag)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Position<StringSet<TString, Dependent<Tight> > >::Type TPos;
+    appendValue(me.limits, lengthSum(me) + length(obj), tag);
+    typedef typename StringSet<TString, Dependent<Tight> >::TIdType TIdType;
+    appendValue(me.strings, const_cast<TString*>(&obj));
+    TIdType last = me.lastId++;
+    appendValue(me.ids, last, tag);
+    me.id_pos_map.insert(std::make_pair(last, (TPos)(length(me.strings) - 1)));
+}
+
+// --------------------------------------------------------------------------
+// Function clear()
+// --------------------------------------------------------------------------
+
+template <typename TString >
+inline void clear(StringSet<TString, Dependent<Tight> >& me)
+{
+    SEQAN_CHECKPOINT;
+    clear(me.strings);
+    me.id_pos_map.clear();
+    resize(me.limits, 1, Exact());
+    me.limitsValid = true;
+
+    clear(me.ids);
+    me.lastId = 0;
+}
+
+// --------------------------------------------------------------------------
+// Function value()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TPos >
+inline typename Reference<StringSet<TString, Dependent<Tight> > >::Type
+value(StringSet<TString, Dependent<Tight> >& me, TPos pos)
+{
+    SEQAN_CHECKPOINT;
+    return *me.strings[pos];
+}
+
+template <typename TString, typename TPos >
+inline typename Reference<StringSet<TString, Dependent<Tight> > const >::Type
+value(StringSet<TString, Dependent<Tight> >const & me, TPos pos)
+{
+    return *me.strings[pos];
+}
+
+// --------------------------------------------------------------------------
+// Function getValueById()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TId>
+inline typename Reference<StringSet<TString, Dependent<Tight> > >::Type
+getValueById(StringSet<TString, Dependent<Tight> > & me,
+            TId const id)
+{
+    SEQAN_CHECKPOINT;
+    return (value(me, me.id_pos_map.find(id)->second));
+}
+
+// --------------------------------------------------------------------------
+// Function assignValueById()
+// --------------------------------------------------------------------------
+
+template<typename TString, typename TString2>
+inline typename Id<StringSet<TString, Dependent<Tight> > >::Type
+assignValueById(StringSet<TString, Dependent<Tight> >& me,
+                TString2& obj)
+{
+    SEQAN_CHECKPOINT;
+    appendValue(me, obj);
+    SEQAN_ASSERT(length(me.limits) == length(me) + 1);
+    return positionToId(me, length(me.strings) - 1);
+}
+
+
+template<typename TString, typename TId1>
+inline typename Id<StringSet<TString, Dependent<Tight> > >::Type
+assignValueById(StringSet<TString, Dependent<Tight> >& me,
+                TString& obj,
+                TId1 id)
+{
+    SEQAN_CHECKPOINT;
+    typedef StringSet<TString, Dependent<Tight> > TStringSet;
+    typedef typename TStringSet::TIdPosMap::const_iterator TIter;
+    typedef typename Size<TStringSet>::Type TSize;
+    typedef typename Id<TStringSet>::Type TId;
+
+    if (me.lastId < (TId) id) me.lastId = (TId) (id + 1);
+
+    TIter pos = me.id_pos_map.find(id);
+    if (pos != me.id_pos_map.end()) {
+        me.strings[pos->second] = &obj;
+        me.limitsValid = false;
+        return id;
+    }
+    appendValue(me.strings, &obj);
+    appendValue(me.ids, id);
+    me.id_pos_map.insert(std::make_pair(id, length(me.strings) - 1));
+    appendValue(me.limits, lengthSum(me) + length(obj));
+    return id;
+}
+
+// --------------------------------------------------------------------------
+// Function removeValueById()
+// --------------------------------------------------------------------------
+
+template<typename TString, typename TId>
+inline void
+removeValueById(StringSet<TString, Dependent<Tight> >& me, TId const id)
+{
+    SEQAN_CHECKPOINT;
+    typedef StringSet<TString, Dependent<Tight> > TStringSet;
+    typedef typename Size<TStringSet>::Type TSize;
+    typedef typename TStringSet::TIdPosMap::iterator TIter;
+
+    SEQAN_ASSERT(length(me.limits) == length(me) + 1);
+    TIter pos = me.id_pos_map.find(id);
+    if (pos != me.id_pos_map.end()) {
+        TSize remPos = pos->second;
+        erase(me.strings, remPos);
+        erase(me.ids, remPos);
+        me.id_pos_map.erase(pos);
+        resize(me.limits, length(me.limits) - 1, Generous());
+
+        for(TIter itChange = me.id_pos_map.begin(); itChange != me.id_pos_map.end(); ++itChange) {
+            if (itChange->second > remPos) --(itChange->second);
+        }
+    }
+    SEQAN_ASSERT(length(me.limits) == length(me) + 1);
+}
+
+// --------------------------------------------------------------------------
+// Function positionToId()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TPos>
+inline typename Id<StringSet<TString, Dependent<Tight> > >::Type
+positionToId(StringSet<TString, Dependent<Tight> > & me,
+            TPos const pos)
+{
+    SEQAN_CHECKPOINT;
+    return me.ids[pos];
+}
+
+template <typename TString, typename TPos>
+inline typename Id<StringSet<TString, Dependent<Tight> > >::Type
+positionToId(StringSet<TString, Dependent<Tight> > const & me,
+            TPos const pos)
+{
+    SEQAN_CHECKPOINT;
+    return me.ids[pos];
+}
+
+// --------------------------------------------------------------------------
+// Function idToPosition()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TId>
+inline typename Id<StringSet<TString, Dependent<Tight> > >::Type
+idToPosition(StringSet<TString, Dependent<Tight> > const & me,
+            TId const id)
+{
+    SEQAN_CHECKPOINT;
+    return me.id_pos_map.find(id)->second;
+/*
+    for(unsigned i = 0; i < length(me.ids); ++i)
+        if ((TId) me.ids[i] == id)
+            return i;
+    return 0;
+    */
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_STRING_SET_DEPENDENT_TIGHT_H_
diff --git a/src/SeqAn-1.3/seqan/sequence/string_set_owner.h b/src/SeqAn-1.3/seqan/sequence/string_set_owner.h
new file mode 100644
index 0000000..86be33f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence/string_set_owner.h
@@ -0,0 +1,283 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Andreas Gogol-Doering <andreas.doering at mdc-berlin.de>
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+// Implementation of the StringSet specialization Owner.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_STRING_SET_OWNER_H_
+#define SEQAN_SEQUENCE_STRING_SET_OWNER_H_
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// The tag Owner is defined in string_set_base since it is the default
+// specialization.
+
+// template <typename TSpec = Default>
+// struct Owner;
+
+// TODO(holtgrew): Change name of specialization to Owner StringSet.
+
+/**
+.Spec.Owner:
+..summary:A string set storing the strings as members.
+..cat:Sequences
+..general:Class.StringSet
+..signature:StringSet<TString, Owner<> >
+..signature:StringSet<TString, Owner<Default> >
+..param.TString:The string type.
+...type:Class.String
+..remarks:The strings are internally stored in a $String<TString>$ object and the character position type is a
+ at Class.Pair@ $(seqNo,seqOfs)$ where seqNo identifies the string within the stringset and seqOfs identifies the position within this string.
+..remarks:The position type can be returned or modified by the meta-function @Metafunction.SAValue@ called with the @Class.StringSet@ type.
+..include:seqan/sequence.h
+ */
+template <typename TString>
+class StringSet<TString, Owner<Default> >
+{
+public:
+
+    typedef String<TString>                             TStrings;
+    typedef typename StringSetLimits<StringSet>::Type   TLimits;
+    typedef typename Concatenator<StringSet>::Type      TConcatenator;
+
+    TStrings        strings;
+    TLimits         limits;
+    bool            limitsValid;        // is true if limits contains the cumulative sum of the sequence lengths
+    TConcatenator   concat;
+
+    StringSet()
+        : limitsValid(true)
+    {
+        appendValue(limits, 0);
+    }
+
+    // ----------------------------------------------------------------------
+    // Subscription operators; have to be defined in class def.
+    // ----------------------------------------------------------------------
+
+    template <typename TPos>
+    inline typename Reference<StringSet>::Type
+    operator[] (TPos pos)
+    {
+        return value(*this, pos);
+    }
+
+    template <typename TPos>
+    inline typename Reference<StringSet const>::Type
+    operator[] (TPos pos) const
+    {
+        return value(*this, pos);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function appendValue()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TString2, typename TExpand >
+inline void appendValue(
+    StringSet<TString, Owner<Default> > & me,
+    TString2 const & obj,
+    Tag<TExpand> const & tag)
+{
+    if (_validStringSetLimits(me))
+        appendValue(me.limits, lengthSum(me) + length(obj), tag);
+    appendValue(me.strings, obj, tag);
+}
+
+// --------------------------------------------------------------------------
+// Function assignValue()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec, typename TPos, typename TSequence >
+inline void assignValue(
+    StringSet<TString, Owner<TSpec> > & me,
+    TPos pos,
+    TSequence const & seq)
+{
+    typedef StringSet<TString, Owner<TSpec> > TStringSet;
+    typedef typename Size<TStringSet>::Type TSize;
+    typedef typename StringSetLimits<TStringSet>::Type TLimits;
+    typedef typename Value<TLimits>::Type TLimitValue;
+
+    TLimitValue oldSize = length(me[pos]);
+    assign(me[pos], seq);
+    if (_validStringSetLimits(me))
+    {
+        TLimitValue delta = (TLimitValue)length(seq) - oldSize;
+        TSize size = length(me);
+        while (pos <size)
+            me.limits[++pos] += delta;
+    }
+}
+
+// --------------------------------------------------------------------------
+// Function clear()
+// --------------------------------------------------------------------------
+
+template <typename TString >
+inline void clear(StringSet<TString, Owner<Default> > & me)
+{
+    SEQAN_CHECKPOINT;
+    clear(me.strings);
+    resize(me.limits, 1, Exact());
+    me.limitsValid = true;
+}
+
+// --------------------------------------------------------------------------
+// Function value()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TPos >
+inline typename Reference<StringSet<TString, Owner<Default> > >::Type
+value(StringSet<TString, Owner<Default> > & me, TPos pos)
+{
+    return me.strings[pos];
+}
+
+template <typename TString, typename TPos >
+inline typename Reference<StringSet<TString, Owner<Default> > const >::Type
+value(StringSet<TString, Owner<Default> > const & me, TPos pos)
+{
+    return me.strings[pos];
+}
+
+// --------------------------------------------------------------------------
+// Function getValueById()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec, typename TId>
+inline typename Reference<StringSet<TString, Owner<TSpec> > >::Type
+getValueById(StringSet<TString, Owner<TSpec> >& me,
+            TId const id)
+{
+    SEQAN_CHECKPOINT;
+    if (id < (TId) length(me)) return value(me, id);
+    static TString tmp = "";
+    return tmp;
+}
+
+// --------------------------------------------------------------------------
+// Function assignValueById()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec, typename TId>
+inline typename Id<StringSet<TString, Owner<TSpec> > >::Type
+assignValueById(StringSet<TString, Owner<TSpec> > & me,
+                TString& obj,
+                TId id)
+{
+    SEQAN_CHECKPOINT;
+    if (id >= (TId) length(me.strings))
+    {
+        resize(me.strings, id+1, TString());
+        resize(me.limits, length(me.limits) + 1, Generous());
+    }
+    assignValue(me, id, obj);
+    me.limitsValid = false;
+    return id;
+}
+
+// --------------------------------------------------------------------------
+// Function removeValueById()
+// --------------------------------------------------------------------------
+
+template<typename TString, typename TSpec, typename TId>
+inline void
+removeValueById(StringSet<TString, Owner<TSpec> > & me, TId const id)
+{
+    SEQAN_CHECKPOINT;
+    erase(me.strings, id);
+    resize(me.limits, length(me.limits) - 1, Generous());
+    me.limitsValid = empty(me);
+}
+
+// --------------------------------------------------------------------------
+// Function positionToId()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec, typename TPos>
+inline typename Id<StringSet<TString, Owner<TSpec> > >::Type
+positionToId(StringSet<TString, Owner<TSpec> > &,
+            TPos const pos)
+{
+    SEQAN_CHECKPOINT;
+    return pos;
+}
+
+// --------------------------------------------------------------------------
+// Function positionToId()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec, typename TPos>
+inline typename Id<StringSet<TString, Owner<TSpec> > >::Type
+positionToId(StringSet<TString, Owner<TSpec> > const &,
+            TPos const pos)
+{
+    SEQAN_CHECKPOINT;
+    return pos;
+}
+
+// --------------------------------------------------------------------------
+// Function idToPosition()
+// --------------------------------------------------------------------------
+
+template <typename TString, typename TSpec, typename TId>
+inline typename Id<StringSet<TString, Owner<TSpec> > >::Type
+idToPosition(StringSet<TString, Owner<TSpec> > const&,
+            TId const id)
+{
+    SEQAN_CHECKPOINT;
+    return id;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_SEQUENCE_STRING_SET_OWNER_H_
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled.h b/src/SeqAn-1.3/seqan/sequence_journaled.h
new file mode 100644
index 0000000..40633d4
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled.h
@@ -0,0 +1,81 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Umbrella Header for the sequence_journaleded module.
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SEQUENCE_JOURNALED_H
+#define SEQAN_HEADER_SEQUENCE_JOURNALED_H
+
+// ============================================================================
+// Prerequisites.
+// ============================================================================
+
+#include <algorithm>
+#include <map>
+#include <ostream>
+#include <string>
+#include <sstream>
+
+#include <seqan/basic.h>
+#include <seqan/sequence.h>
+
+// ============================================================================
+// Forwards.
+// ============================================================================
+
+#include <seqan/sequence_journaled/sequence_journaled_forwards.h>
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/sequence_journaled/sequence_journaled_generated_forwards.h>
+#endif
+
+// ============================================================================
+// Journaled Sequences.
+// ============================================================================
+
+#include <seqan/sequence_journaled/journal_entry.h>
+#include <seqan/sequence_journaled/journal_entries_unbalanced_tree_node.h>
+#include <seqan/sequence_journaled/journal_entries_unbalanced_tree.h>
+#include <seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h>
+#include <seqan/sequence_journaled/journal_entries_sorted_array.h>
+#include <seqan/sequence_journaled/sequence_journaled.h>
+#include <seqan/sequence_journaled/sequence_journaled_iterator.h>
+
+// ============================================================================
+// Incremental Indices.
+// ============================================================================
+
+// TODO(holtgrew): Port back the incremental index stuff to the new code.
+
+#endif  // SEQAN_HEADER_SEQUENCE_JOURNALED_H
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_sorted_array.h b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_sorted_array.h
new file mode 100644
index 0000000..1dfbe26
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_sorted_array.h
@@ -0,0 +1,476 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Journal entries implementation using a sorted string of journal elements.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_SORTED_ARRAY_H_
+#define SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_SORTED_ARRAY_H_
+
+namespace seqan {
+
+// ============================================================================
+// Tags, Classes
+// ============================================================================
+
+// Tag: SortedArray.
+struct SortedArray {};
+
+
+template <typename TNode, typename TTreeSpec>
+class JournalEntries;
+
+
+template <typename TCargo_>
+class JournalEntries<TCargo_, SortedArray>
+{
+public:
+    typedef TCargo_ TCargo;
+    typedef typename Size<TCargo>::Type TSize;
+
+    String<TCargo> _journalNodes;
+    TSize _originalStringLength;
+
+    JournalEntries() : _originalStringLength(0) {}
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+template <typename TCargo>
+struct Iterator<JournalEntries<TCargo, SortedArray>, Standard>
+{
+    typedef typename Iterator<String<TCargo>, Standard>::Type Type;
+};
+
+
+template <typename TCargo>
+struct Iterator<JournalEntries<TCargo, SortedArray> const, Standard>
+{
+    typedef typename Iterator<String<TCargo> const, Standard>::Type Type;
+};
+
+template <typename TCargo>
+struct Reference<JournalEntries<TCargo, SortedArray> >
+{
+    typedef TCargo & Type;
+};
+
+template <typename TCargo>
+struct Reference<JournalEntries<TCargo, SortedArray> const>
+{
+    typedef TCargo const & Type;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TStream, typename TNode>
+inline
+TStream &
+operator<<(TStream & stream, JournalEntries<TNode, SortedArray> const & tree)
+{
+    stream << "JournalEntries(";
+    for (unsigned i = 0; i < length(tree._journalNodes); ++i) {
+        if (i > 0) stream << ", ";
+        stream << tree._journalNodes[i];
+    }
+    stream << ")";
+    return stream;
+}
+
+template <typename TCargo>
+bool _checkSortedArrayTree(JournalEntries<TCargo, SortedArray> const & tree)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<String<TCargo> const, Standard>::Type TIterator;
+    if (length(tree._journalNodes) == 0)
+        return true;
+    if (tree._journalNodes[0].virtualPosition != 0)
+        return false;
+    if (tree._journalNodes[0].length == 0)
+        return false;
+    for (TIterator it = begin(tree._journalNodes, Standard()) + 1, itend = end(tree._journalNodes, Standard()); it != itend; ++it) {
+		if (it->length == 0)
+			return false;
+        if ((it - 1)->virtualPosition >= it->virtualPosition)
+            return false;
+        if ((it - 1)->virtualPosition + (it - 1)->length != it->virtualPosition)
+            return false;
+    }
+	return true;
+}
+
+template <typename TCargo>
+typename Iterator<JournalEntries<TCargo, SortedArray>, Standard>::Type
+begin(JournalEntries<TCargo, SortedArray> & journalTree, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return begin(journalTree._journalNodes, Standard());
+}
+
+
+template <typename TCargo>
+typename Iterator<JournalEntries<TCargo, SortedArray> const, Standard>::Type
+begin(JournalEntries<TCargo, SortedArray> const & journalTree, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return begin(journalTree._journalNodes, Standard());
+}
+
+
+template <typename TCargo>
+typename Iterator<JournalEntries<TCargo, SortedArray>, Standard>::Type
+end(JournalEntries<TCargo, SortedArray> & journalTree, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return end(journalTree._journalNodes, Standard());
+}
+
+
+template <typename TCargo>
+typename Iterator<JournalEntries<TCargo, SortedArray> const, Standard>::Type
+end(JournalEntries<TCargo, SortedArray> const & journalTree, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return end(journalTree._journalNodes, Standard());
+}
+
+
+template <typename TCargo>
+inline
+void reinit(JournalEntries<TCargo, SortedArray> & tree,
+            typename Size<TCargo>::Type originalStringLength)
+{
+    SEQAN_CHECKPOINT;
+    clear(tree._journalNodes);
+    appendValue(tree._journalNodes, TCargo(TCargo(SOURCE_ORIGINAL, 0, 0, originalStringLength)));
+    tree._originalStringLength = originalStringLength;
+}
+
+
+template <typename TCargo>
+inline
+typename Iterator<JournalEntries<TCargo, SortedArray> const, Standard>::Type 
+findInJournalEntries(JournalEntries<TCargo, SortedArray> const & journalEntries,
+                     typename Position<TCargo>::Type const & pos) {
+    typedef typename Size<TCargo>::Type TSize;
+    typedef typename Position<TCargo>::Type TPos;
+    typedef typename Iterator<String<TCargo>, Standard>::Type TIterator;
+    typedef JournalEntryLtByVirtualPos<TPos, TSize> TCmp;
+
+    TCargo refCargo;
+    refCargo.virtualPosition = pos;
+    TIterator iter = std::upper_bound(begin(journalEntries._journalNodes, Standard()),
+                                      end(journalEntries._journalNodes, Standard()),
+                                      refCargo,
+                                      TCmp());
+    SEQAN_ASSERT_TRUE(iter != begin(journalEntries._journalNodes, Standard()));
+    iter -= 1;
+
+    SEQAN_ASSERT_TRUE(iter != end(journalEntries._journalNodes, Standard()));
+
+    return iter;
+}
+
+
+template <typename TCargo>
+inline
+TCargo const &
+findJournalEntry(JournalEntries<TCargo, SortedArray> const & journalEntries,
+                 typename Position<TCargo>::Type const & pos) {
+    return *findInJournalEntries(journalEntries, pos);
+}
+
+
+template <typename TCargo>
+inline
+void recordInsertion(JournalEntries<TCargo, SortedArray> & tree,
+                     typename Position<TCargo>::Type const & virtualPosition,
+                     typename Position<TCargo>::Type const & physicalBeginPos,
+                     typename Size<TCargo>::Type const & len)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Size<TCargo>::Type TSize;
+    typedef typename Position<TCargo>::Type TPos;
+    typedef typename Iterator<String<TCargo>, Standard>::Type TIterator;
+    typedef JournalEntryLtByVirtualPos<TPos, TSize> TCmp;
+
+	//std::cerr << __FILE__ << ":" << __LINE__ << " -- INSERT(" << virtualPosition << ", " << physicalBeginPos << ", " << len << ")" << std::endl;
+    //std::cerr << __FILE__ << ":" << __LINE__ << " -- " << tree << std::endl;
+
+    // Handle special case that the entry list is empty.
+    if (empty(tree._journalNodes)) {
+        SEQAN_ASSERT_EQ(virtualPosition, 0u);
+        if (len == 0)
+            return;
+        appendValue(tree._journalNodes, TCargo(SOURCE_PATCH, physicalBeginPos, virtualPosition, len));
+        return;
+    }
+
+    // Find position in sorted array of nodes to insert in.
+    TCargo refCargo;
+    refCargo.virtualPosition = virtualPosition;
+    TIterator iter = std::upper_bound(begin(tree._journalNodes, Standard()),
+                                      end(tree._journalNodes, Standard()),
+                                      refCargo,
+                                      TCmp());
+    // TODO(holtgrew): Maybe move and update entries right of pos at the same time?
+    
+	// MUST NOT find begin.
+	SEQAN_ASSERT_TRUE(iter != begin(tree._journalNodes, Standard()));
+	--iter;
+	
+    // Create new journal entries.
+    String<TCargo> buffer;
+    reserve(buffer, 3, Exact());
+	if (iter->virtualPosition + iter->length > virtualPosition) {
+		TPos pos = iter - begin(tree._journalNodes, Standard());
+		TPos shiftRightOf = pos;
+        // Found node that contains virtualPos.
+        SEQAN_ASSERT_LEQ(iter->virtualPosition, virtualPosition);
+        if (iter->virtualPosition == virtualPosition) {
+            // Simple case:  Insert left of iter.
+            insertValue(tree._journalNodes, pos, TCargo(SOURCE_PATCH, physicalBeginPos, virtualPosition, len));
+			shiftRightOf += 1;
+        } else {
+            // Harder case:  Split current and insert new node.
+            TPos offset = virtualPosition - iter->virtualPosition;
+            appendValue(buffer, TCargo(iter->segmentSource, iter->physicalPosition, iter->virtualPosition, offset));
+            appendValue(buffer, TCargo(SOURCE_PATCH, physicalBeginPos, virtualPosition, len));
+            appendValue(buffer, TCargo(iter->segmentSource, iter->physicalPosition + offset, virtualPosition + len, iter->length - offset));
+            // Insert new journal entries.
+            infix(tree._journalNodes, pos, pos + 1) = buffer;
+			shiftRightOf += 3;
+        }
+        // Update journal entries right of pos.
+        for (TIterator it = begin(tree._journalNodes, Standard()) + shiftRightOf, itend = end(tree._journalNodes, Standard()); it != itend; ++it)
+            it->virtualPosition += len;
+    } else {
+        // Insert at end.
+		SEQAN_ASSERT_EQ(virtualPosition, iter->virtualPosition + iter->length);
+        appendValue(tree._journalNodes, TCargo(SOURCE_PATCH, physicalBeginPos, virtualPosition, len));
+    }
+    //std::cerr << __FILE__ << ":" << __LINE__ << " -- " << tree << std::endl;
+
+    SEQAN_ASSERT_TRUE(_checkSortedArrayTree(tree));
+}
+
+template <typename TCargo>
+inline
+void recordErase(JournalEntries<TCargo, SortedArray> & tree,
+                 typename Position<TCargo>::Type const & pos,
+                 typename Position<TCargo>::Type const & posEnd)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Size<TCargo>::Type TSize;
+    typedef typename Position<TCargo>::Type TPos;
+    typedef typename Iterator<String<TCargo>, Standard>::Type TIter;
+    typedef JournalEntryLtByVirtualPos<TPos, TSize> TCmp;
+//	std::cerr << __FILE__ << ":" << __LINE__ << " -- ERASE(" << pos << ", " << posEnd << ")" << std::endl;
+//    std::cerr << __FILE__ << ":" << __LINE__ << " -- " << tree << std::endl;
+
+    // Handle special case of removing all of the singleton existing entry.
+    if (length(tree._journalNodes) == 1 && pos == 0 && front(tree._journalNodes).length == posEnd) {
+        clear(tree._journalNodes);
+        return;
+    }
+    // Handle case of an empty journal.
+    if (length(tree._journalNodes) == 0) {
+        SEQAN_ASSERT_EQ(pos, 0u);
+        SEQAN_ASSERT_EQ(posEnd, 0u);
+        return;
+    }
+
+    // Find node.
+    TCargo refCargo;
+    refCargo.virtualPosition = pos;
+    TIter it = std::upper_bound(
+            begin(tree._journalNodes, Standard()),
+            end(tree._journalNodes, Standard()),
+            refCargo,
+            TCmp());
+
+    // We will shift the virtual positions of all entries right of and
+    // including beginShiftPos by delta positions to the left.
+    TPos delta = 0;
+    TPos beginShiftPos = 0;
+
+	// MUST NOT find begin.
+	SEQAN_ASSERT_TRUE(it != begin(tree._journalNodes, Standard()));
+	--it;
+	
+	TPos itPos = it - begin(tree._journalNodes, Standard());
+	if (it->virtualPosition == pos && it->length == posEnd - pos) {
+		// Remove the whole entry.
+		erase(tree._journalNodes, itPos);
+		delta = posEnd - pos;
+		beginShiftPos = itPos;
+	} else if (it->virtualPosition == pos && it->length > posEnd - pos) {
+		// Remove a prefix of the entry.
+		SEQAN_ASSERT_LT(pos, it->virtualPosition + it->length);
+		delta = posEnd - pos;
+		it->physicalPosition += delta;
+		it->length -= delta;
+		beginShiftPos = itPos + 1;
+	} else if (it->virtualPosition < pos && it->virtualPosition + it->length == posEnd) {
+		// Remove a suffix of the entry.
+		SEQAN_ASSERT_GT(pos, it->virtualPosition);
+		delta = posEnd - pos;
+		it->length -= delta;
+		beginShiftPos = itPos + 1;
+	} else if (it->virtualPosition < pos && it->virtualPosition + it->length > posEnd) {
+		// Remove a true infix of the entry.
+		TSize prefixLength = pos - it->virtualPosition;
+		TSize suffixLength = it->length - prefixLength - (posEnd - pos);
+		TSize removedInfixLength = posEnd - pos;
+		// Update the left part, this must be done before the iterator is possibly invalidate because of copied memory.
+		it->length -= removedInfixLength + suffixLength;
+		// Insert a new entry for the right part.
+		TCargo tmpEntry(it->segmentSource, it->physicalPosition + prefixLength + removedInfixLength, it->virtualPosition + prefixLength, suffixLength);
+		insertValue(tree._journalNodes, itPos + 1, tmpEntry);
+		// Set shift position and delta.
+		delta = removedInfixLength;
+		beginShiftPos = itPos + 2;
+	} else {
+		// Remove more than one entry.
+		TPos rmBeginPos = itPos;
+		TPos rmEndPos = itPos;
+		if (it->virtualPosition != pos) {
+			// Do not remove all of first.
+			delta += it->length - (pos - it->virtualPosition);
+			rmBeginPos += 1;
+			rmEndPos += 1;
+			it->length = (pos - it->virtualPosition);
+		} else {
+			// Remove all of first.
+			delta = it->length;
+			rmEndPos += 1;
+		}
+		it += 1;
+		while (posEnd > it->virtualPosition + it->length) {
+			rmEndPos += 1;
+			delta += it->length;
+			it += 1;
+		}
+		if (it->virtualPosition + it->length == posEnd) {
+			// Remove all of last.
+			rmEndPos += 1;
+			delta += it->length;
+			beginShiftPos = rmBeginPos;
+		} else {
+			// Do not remove all of last.
+			SEQAN_ASSERT_GT(it->virtualPosition + it->length, posEnd);
+			TSize tmpDelta = delta;
+			delta += posEnd - it->virtualPosition;
+			it->physicalPosition += posEnd - it->virtualPosition;
+			it->length -= posEnd - it->virtualPosition;
+			// We update this entry manually.
+			it->virtualPosition -= tmpDelta;
+			beginShiftPos = rmBeginPos + 1;
+		}
+		erase(tree._journalNodes, rmBeginPos, rmEndPos);
+	}
+
+    // Perform left-shift of the virtual positions.
+    for (TIter it = begin(tree._journalNodes, Standard()) + beginShiftPos; it != end(tree._journalNodes, Standard()); ++it) {
+        SEQAN_ASSERT_GEQ(it->virtualPosition, delta);
+        it->virtualPosition -= delta;
+    }
+//	std::cerr << __FILE__ << ":" << __LINE__ << " -- " << tree << std::endl;
+
+    SEQAN_ASSERT_TRUE(_checkSortedArrayTree(tree));
+}
+
+
+template <typename TNode, typename TJournalSpec, typename TPos>
+inline
+typename Position<typename Cargo<TNode>::Type >::Type
+virtualToHostPosition(JournalEntries<TNode, TJournalSpec> const & journalEntries,
+                      TPos const & pos)
+{
+    SEQAN_CHECKPOINT;
+    typedef JournalEntries<TNode, TJournalSpec> TJournalEntries;
+    typedef typename Iterator<TJournalEntries>::Type TIterator;
+
+    TIterator it = findInJournalEntries(journalEntries, pos);
+    // The easiest case is to find a segment from the original sequence that
+    // contains the position.  This case also works if we hit the entry after
+    // the last one in a segment from the original sequence.
+    if (value(it).segmentSource == SOURCE_ORIGINAL) {
+        TPos offset = pos - value(it).virtualPosition;
+        return value(it).physicalPosition + offset;
+    }
+    // The harder case is to find a segment from the patch sequence.  We first
+    // try to find an original segment right of it, if this fails a segment
+    // left of it.  If this fails, 0 is returned.
+    SEQAN_ASSERT_EQ(value(it).segmentSource, SOURCE_PATCH);
+    TIterator it2 = it;
+    for (++it; it != end(journalEntries, Standard()); ++it) {
+        if (value(it).segmentSource == SOURCE_ORIGINAL)
+            return value(it).physicalPosition;
+    }
+	it = it2;
+    // Search left;
+    while (true) {
+        if (value(it).segmentSource == SOURCE_ORIGINAL)
+            return value(it).physicalPosition + value(it).length;
+        if (it == begin(journalEntries, Standard()))
+            return 0;
+        --it;
+    }
+
+    SEQAN_ASSERT_FAIL("Should never reach here!");
+    return 0;
+}
+
+template <typename TNode, typename TJournalSpec, typename TPos>
+inline
+bool
+isGapInHost(JournalEntries<TNode, TJournalSpec> const & journalEntries,
+            TPos const & pos)
+{
+    SEQAN_CHECKPOINT;
+    typedef JournalEntries<TNode, TJournalSpec> TJournalEntries;
+    typedef typename Iterator<TJournalEntries>::Type TIterator;
+
+    TIterator it = findInJournalEntries(journalEntries, pos);
+    return value(it).segmentSource == SOURCE_PATCH;
+}
+
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_SORTED_ARRAY_H_
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_unbalanced_tree.h b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_unbalanced_tree.h
new file mode 100644
index 0000000..49dcc71
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_unbalanced_tree.h
@@ -0,0 +1,695 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Journal entries implementation using an unbalanced binary search tree.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_UNBALANCED_TREE_H_
+#define SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_UNBALANCED_TREE_H_
+
+namespace seqan {
+
+// ============================================================================
+// Tags, Classes
+// ============================================================================
+
+// For iterator, needs to be declared here.
+enum IterationDirection {
+    DIRECTION_NULL,
+    DIRECTION_DOWN_LEFT,
+    DIRECTION_DOWN_RIGHT,
+    DIRECTION_UP_LEFT,
+    DIRECTION_UP_RIGHT
+};
+
+
+// Tag: Unbalanced tree.
+struct UnbalancedTree {};
+
+
+template <typename TNode, typename TTreeSpec>
+class JournalEntries;
+
+
+template <typename TCargo_>
+class JournalEntries<TCargo_, UnbalancedTree>
+{
+  public:
+    typedef TCargo_ TCargo;
+    typedef JournalEntriesUnorderedTreeNode<TCargo> TNode;
+    typedef JournalEntries<TCargo, UnbalancedTree> TJournalEntries;
+    typedef typename Position<TNode>::Type TPos;
+    typedef typename Size<TNode>::Type TSize;
+    typedef UnbalancedTree TSpec;
+
+    // Allocator for the nodes.
+    Allocator<SinglePool<sizeof(TNode)> > _nodeAllocator;
+    // Length of the underlying string.
+    TSize _originalStringLength;
+    // The root node.
+    TNode * _root;
+    
+    JournalEntries()
+            : _root(0)
+    {
+        SEQAN_CHECKPOINT;
+    }
+
+    JournalEntries(JournalEntries const & other)
+            : _originalStringLength(other._originalStringLength)
+    {
+        _copyJournalEntriesNodes(_root, _nodeAllocator, other._root);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+template <typename TCargo>
+struct Reference<JournalEntries<TCargo, UnbalancedTree> >
+{
+    typedef TCargo & Type;
+};
+
+template <typename TCargo>
+struct Reference<JournalEntries<TCargo, UnbalancedTree> const>
+{
+    typedef TCargo const & Type;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TNode, typename TAllocator>
+void
+_copyJournalEntriesNodes(TNode * & target,
+                      TAllocator & allocator,
+                      TNode * const & source)
+{
+    SEQAN_CHECKPOINT;
+    allocate(allocator, target, 1);
+    target = new (target) TNode(*source);
+
+    if (source->left != 0) {
+        _copyJournalEntriesNodes(target->left, allocator, source->left);
+        target->left->parent = target;
+    }
+    if (source->right != 0) {
+        _copyJournalEntriesNodes(target->right, allocator, source->right);
+        target->right->parent = target;
+    }
+}
+
+
+template <typename TNode>
+inline
+bool checkVirtualPositionsRec(TNode * const & node, unsigned & virtualPosition)
+{
+    SEQAN_CHECKPOINT;
+    if (node == 0)
+        return true;
+    bool res = true;
+    if (node->left)
+        res = res && checkVirtualPositionsRec(node->left, virtualPosition);
+    if (cargo(*node).virtualPosition != virtualPosition)
+        res = false;
+    virtualPosition += cargo(*node).length;
+    if (node->right)
+        res = res && checkVirtualPositionsRec(node->right, virtualPosition);
+    return res;
+}
+
+template <typename TNode>
+inline
+bool checkVirtualPositions(TNode * const & node)
+{
+    SEQAN_CHECKPOINT;
+    unsigned virtualPosition = 0;
+    return checkVirtualPositionsRec(node, virtualPosition);
+}
+
+template <typename TNode>
+inline
+bool checkOrderRec(TNode * const & node)
+{
+    SEQAN_CHECKPOINT;
+    bool result = true;
+    if (node->left != 0) {
+        result = result && (cargo(*node).virtualPosition > cargo(*node->left).virtualPosition);
+        result = result && checkOrderRec(node->left);
+    }
+    if (node->right != 0) {
+        result = result && (cargo(*node).virtualPosition < cargo(*node->right).virtualPosition);
+        result = result && checkOrderRec(node->right);
+    }
+    return result;
+}
+
+template <typename TNode>
+inline
+bool checkOrder(TNode * const & node)
+{
+    SEQAN_CHECKPOINT;
+    if (node == 0)
+        return true;
+    return checkOrderRec(node);
+}
+
+template <typename TNode>
+inline
+bool checkStructureRec(TNode * const & node)
+{
+    SEQAN_CHECKPOINT;
+    bool result = true;
+    if (node->left != 0) {
+        result = result && (node->left->parent == node);
+        result = result && checkStructureRec(node->left);
+    }
+    if (node->right != 0) {
+        result = result && (node->right->parent == node);
+        result = result && checkStructureRec(node->right);
+    }
+    return result;
+}
+
+template <typename TNode>
+inline
+bool checkStructure(TNode * const & node)
+{
+    if (node == 0)
+        return true;
+    if (node->parent == 0)
+        return checkStructureRec(node);
+    if (node->parent->left != 0 && node->parent->right != 0) {
+        if (!((node->parent->left == node) ^ (node->parent->right == node)))
+            return false;
+    } else if (node->parent->left == 0 && node->parent->right != 0) {
+        if (node->parent->right != node)
+            return false;
+    } else if (node->parent->left != 0 && node->parent->right == 0) {
+        if (node->parent->left != node)
+            return false;
+    } else {  // both == 0
+        return false;
+    }
+    return checkStructureRec(node);
+}
+
+template <typename TStream, typename TNode>
+inline
+TStream &
+operator<<(TStream & stream, JournalEntries<TNode, UnbalancedTree> const & tree)
+{
+    if (tree._root != 0)
+        return stream << "JournalEntries(" << *tree._root << ")";
+    else
+        return stream << "JournalEntries()";
+}
+
+template <typename TCargo>
+inline
+void reinit(JournalEntries<TCargo, UnbalancedTree> & tree,
+            typename Size<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type originalStringLength)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename JournalEntries<TCargo, UnbalancedTree>::TNode TNode;
+    clear(tree._nodeAllocator);
+    tree._originalStringLength = originalStringLength;
+    TNode *tmp;
+    allocate(tree._nodeAllocator, tmp, 1);
+    tree._root = new (tmp) TNode(TCargo(SOURCE_ORIGINAL, 0, 0, originalStringLength));
+}
+
+
+// Subtract delta from all nodes with virtual positions right of,
+// respectively >= pos.  Note that this must not make the tree invalid.
+template <typename TNode>
+inline
+void
+_subtractFromVirtualPositionsRightOf(TNode * node,
+                                     typename Position<TNode>::Type const & pos,
+                                     typename Position<TNode>::Type const & delta)
+{
+    SEQAN_CHECKPOINT;
+
+    if (cargo(*node).virtualPosition >= pos) {
+        cargo(*node).virtualPosition -= delta;
+        if (node->left != 0)
+            _subtractFromVirtualPositionsRightOf(node->left, pos, delta);
+        if (node->right != 0)
+            _subtractFromVirtualPositionsRightOf(node->right, pos, delta);
+    } else {  // node->virtualPosition < pos
+        if (node->right != 0)
+            _subtractFromVirtualPositionsRightOf(node->right, pos, delta);
+    }
+}
+
+
+// Add delta to all nodes with virtual positions right of,
+// respectively >= pos.  Note that this must not make the tree invalid.
+template <typename TNode>
+inline
+void
+_addToVirtualPositionsRightOf(TNode * node,
+                              typename Position<TNode>::Type const & pos,
+                              typename Position<TNode>::Type const & delta)
+{
+    SEQAN_CHECKPOINT;
+
+    if (cargo(*node).virtualPosition >= pos) {
+        cargo(*node).virtualPosition += delta;
+        if (node->left != 0)
+            _addToVirtualPositionsRightOf(node->left, pos, delta);
+        if (node->right != 0)
+            _addToVirtualPositionsRightOf(node->right, pos, delta);
+    } else {  // node->virtualPosition < pos
+        if (node->right != 0)
+            _addToVirtualPositionsRightOf(node->right, pos, delta);
+    }
+}
+
+
+template <typename TCargo>
+inline
+typename Iterator<JournalEntries<TCargo, UnbalancedTree> const, Standard>::Type
+findInJournalEntries(JournalEntries<TCargo, UnbalancedTree> const & journalEntries,
+                     typename Position<TCargo>::Type const & pos) {
+    SEQAN_CHECKPOINT;
+    typedef JournalEntries<TCargo, UnbalancedTree> TJournalEntries;
+    typedef typename TJournalEntries::TNode TNode;
+    typedef typename Iterator<TJournalEntries, Standard>::Type TIterator;
+
+    TIterator result;
+    result._currentNode = journalEntries._root;
+    result._iterationDirection = DIRECTION_DOWN_LEFT;
+
+    while (true) {
+        SEQAN_ASSERT_NEQ(result._currentNode, static_cast<TNode *>(0));
+
+        if ((value(result).virtualPosition <= pos) && (value(result).virtualPosition + value(result).length > pos)) {
+            break;
+        } else if (value(result).virtualPosition + value(result).length <= pos) {
+            if (!goRight(result))
+                break;
+        } else {  // pos < node->virtualPosition
+            if (!goLeft(result))
+                break;
+        }
+    }
+
+    return result;
+}
+
+
+template <typename TCargo>
+inline
+TCargo const &
+findJournalEntry(JournalEntries<TCargo, UnbalancedTree> const & journalEntries,
+                 typename Position<TCargo>::Type const & pos) {
+    SEQAN_CHECKPOINT;
+    return *findInJournalEntries(journalEntries, pos);
+}
+
+
+template <typename TCargo>
+inline
+void recordErase(JournalEntries<TCargo, UnbalancedTree> & tree,
+                 typename Position<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & pos,
+                 typename Position<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & posEnd)
+{
+    SEQAN_CHECKPOINT;
+    typedef JournalEntries<TCargo, UnbalancedTree> TJournalEntries;
+    typedef typename Iterator<TJournalEntries>::Type TIterator;
+    typedef typename TJournalEntries::TNode TNode;
+    typedef typename Position<TNode>::Type TPos;
+    typedef typename Size<TNode>::Type TSize;
+
+    SEQAN_ASSERT_TRUE(checkStructure(tree._root));
+    SEQAN_ASSERT_TRUE(checkOrder(tree._root));
+    SEQAN_ASSERT_TRUE(checkVirtualPositions(tree._root));
+
+//     std::cout << __FILE__ << ":" << __LINE__ << " -- " << tree << std::endl;
+
+    // Handle special case of removing all of the root node.
+    if (tree._root->left == 0 && tree._root->right == 0 && pos == 0 && posEnd == cargo(*tree._root).length) {
+        tree._root = 0;
+        clear(tree._nodeAllocator);
+        return;
+    }
+    // Handle case of an empty journal tree.
+    if (tree._root == 0) {
+        SEQAN_ASSERT_EQ(pos, 0u);
+        SEQAN_ASSERT_EQ(posEnd, 0u);
+        return;
+    }
+
+    // Find node with virtual position pos.
+    TNode * node = 0;
+    TNode * parent = 0;
+    TIterator iter = findInJournalEntries(tree, pos);
+    node = iter._currentNode;
+    parent = node->parent;
+
+    // The position to subtract values from right of.
+    TPos subtractRightOf = pos;
+    // Virtual begin and end position of the node.
+    TPos nodeBegin = cargo(*node).virtualPosition;
+    TPos nodeEnd = cargo(*node).virtualPosition + cargo(*node).length;
+
+    // The simple cases are: A prefix or suffix but not all of the node are erased.
+    // Otherwise, we have to delete or split the existing node.
+    if (nodeBegin == pos && nodeEnd == posEnd) {
+//         std::cout << "whole node" << std::endl;
+        // The whole node is removed.  If there is <= one child, things are
+        // simple, otherwise, we replace node with its right child and perform
+        // a left-right traversal to find the leaf for which node's left child
+        // can become the left child of.
+        TNode * left = node->left;
+        TNode * right = node->right;
+        if (left == 0) {
+            // Replace parent's pointer.
+            if (parent == 0) {
+                // Node was root.
+                tree._root = node->right;
+                tree._root->parent = 0;
+            } else {
+                // Node was not root.
+                if (parent->left == node) {
+                    parent->left = node->right;
+                } else {
+                    SEQAN_ASSERT_EQ(parent->right, node);
+                    parent->right = node->right;
+                }
+                if (node->right != 0)
+                    node->right->parent = parent;
+            }
+        } else {
+            if (right == 0) { // left != 0 && right == 0
+                if (parent == 0) {
+                    // Node was root.
+                    node->left->parent = 0;
+                    tree._root = node->left;
+                } else {
+                    // Node was not root.
+                    if (parent->left == node) {
+                        node->left->parent = parent;
+                        parent->left = node->left;
+                    } else {
+                        node->left->parent = parent;
+                        parent->right = node->left;
+                    }
+                }
+            } else {
+                // left != 0 && right != 0
+                if (parent == 0) {
+                    // node is root
+                    node->right->parent = 0;
+                    tree._root = node->right;
+                } else {
+                    if (parent->left == node) {
+                        node->right->parent = parent;
+                        parent->left = node->right;
+                    } else {
+                        node->right->parent = parent;
+                        parent->right = node->right;
+                    }
+                }
+                TNode * tmp = node->right->left;
+                node->right->left = node->left;
+                node->left->parent = node->right;
+                // Left-right traversal from node on.
+                TNode * current = node->left;
+                SEQAN_ASSERT_NEQ(current, static_cast<TNode *>(0));
+                while (current->right != 0)
+                    current = current->right;
+                current->right = tmp;
+                if (tmp != 0)
+                    tmp->parent = current;
+            }
+        }
+        // Actually deallocate node.
+        deallocate(tree._nodeAllocator, node, 1);
+        // Adjust virtual positions.
+        _subtractFromVirtualPositionsRightOf(tree._root, subtractRightOf, posEnd - pos);
+    } else if (nodeBegin == pos && nodeEnd > posEnd) {
+//         std::cout << "true prefix" << std::endl;
+        // A true prefix is removed, not the whole node.
+        cargo(*node).length -= posEnd - pos;
+        cargo(*node).physicalPosition += posEnd - pos;
+        subtractRightOf = posEnd;  // No need to update this node!
+        // Adjust virtual positions.
+        _subtractFromVirtualPositionsRightOf(tree._root, subtractRightOf, posEnd - pos);
+    } else if (nodeBegin < pos && nodeEnd == posEnd) {
+//         std::cout << "true suffix" << std::endl;
+        // A true suffix is removed, not the whole node.
+        cargo(*node).length -= posEnd - pos;
+        subtractRightOf = posEnd;  // No need to update this node!
+        // Adjust virtual positions.
+        _subtractFromVirtualPositionsRightOf(tree._root, subtractRightOf, posEnd - pos);
+    } else if (nodeBegin < pos && nodeEnd > posEnd) {
+//         std::cout << "true infix" << std::endl;
+        // A true infix of the node is removed.  This node stores the prefix
+        // and we do a right-left traversal to place the newly created node.
+        TNode * tmp;
+        allocate(tree._nodeAllocator, tmp, 1);
+        // Perform index calculations for prefix and suffix node.
+        TSize prefixLength = pos - cargo(*node).virtualPosition;
+        TSize deletedInfixLength = posEnd - pos;
+        TSize suffixLength = cargo(*node).length - prefixLength - deletedInfixLength;
+        // Update prefix node.
+        cargo(*node).length = prefixLength;
+        // Construct suffix node.
+        TNode * suffixNode = new (tmp) TNode(TCargo(cargo(*node).segmentSource,
+                                                    cargo(*node).physicalPosition + prefixLength + deletedInfixLength,
+                                                    cargo(*node).virtualPosition + prefixLength,
+                                                    suffixLength));
+        // Insert node for suffix.
+        if (node->right == 0) {
+            node->right = suffixNode;
+            suffixNode->parent = node;
+        } else {
+            TNode * current = node->right;
+            while (current->left != 0) {
+                current = current->left;
+            }
+            current->left = suffixNode;
+            suffixNode->parent = current;
+        }
+        subtractRightOf = cargo(*node).virtualPosition + prefixLength + deletedInfixLength + 1;
+        // Adjust virtual positions.
+        _subtractFromVirtualPositionsRightOf(tree._root, subtractRightOf, posEnd - pos);
+    } else {
+//         std::cout << "spans more than one" << std::endl;
+        // The deletion range spans more than this node.  We solve this by
+        // calling this function recursively.  First, we delete a suffix of
+        // this node (possibly all of it) and then we recursively remove the
+        // remaining suffix of [pos, posEnd).
+        TSize len = cargo(*node).length - (pos - cargo(*node).virtualPosition);
+        recordErase(tree, pos, pos + len);
+        recordErase(tree, pos, posEnd - len);
+    }
+//     unsigned nextId = mtRand();
+//     journalTreeToDot(std::cerr, nextId, tree);
+//     std::cout << __FILE__ << ":" << __LINE__ << " -- " << tree << std::endl;
+    SEQAN_ASSERT_TRUE(checkStructure(tree._root));
+    SEQAN_ASSERT_TRUE(checkOrder(tree._root));
+    SEQAN_ASSERT_TRUE(checkVirtualPositions(tree._root));
+}
+
+
+template <typename TCargo>
+inline
+void recordInsertion(JournalEntries<TCargo, UnbalancedTree> & tree,
+                     typename Position<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & virtualPos,
+                     typename Position<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & physicalBeginPos,
+                     typename Size<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & length)
+{
+    SEQAN_CHECKPOINT;
+    typedef JournalEntries<TCargo, UnbalancedTree> TJournalEntries;
+    typedef typename Iterator<TJournalEntries>::Type TIterator;
+    typedef typename TJournalEntries::TNode TNode;
+    typedef typename Position<TNode>::Type TPos;
+    typedef typename Size<TNode>::Type TSize;
+
+    SEQAN_ASSERT_TRUE(checkStructure(tree._root));
+    SEQAN_ASSERT_TRUE(checkOrder(tree._root));
+    SEQAN_ASSERT_TRUE(checkVirtualPositions(tree._root));
+
+    // Handle special case of empty tree.
+    if (tree._root == 0) {
+        SEQAN_ASSERT_EQ(virtualPos, 0u);
+        if (length == 0)
+            return;
+        TNode * tmp;
+        allocate(tree._nodeAllocator, tmp, 1);
+        tree._root = new (tmp) TNode(TCargo(SOURCE_PATCH, physicalBeginPos, virtualPos, length));
+        return;
+    }
+    
+    TNode * node;
+    TNode * parent;
+    TIterator iter = findInJournalEntries(tree, virtualPos);
+    node = iter._currentNode;
+    parent = node->parent;
+    SEQAN_ASSERT_LEQ(cargo(*node).virtualPosition, virtualPos);
+
+    if (cargo(*node).virtualPosition + cargo(*node).length > virtualPos) {
+        // Found node that contains virtualPos.
+        SEQAN_ASSERT_LEQ(cargo(*node).virtualPosition, virtualPos);
+        if (cargo(*node).virtualPosition == virtualPos) {
+            // Simple case: Insert left of current.
+            TNode * tmp;
+            allocate(tree._nodeAllocator, tmp, 1);
+            TNode * insertNode = new (tmp) TNode(TCargo(SOURCE_PATCH, physicalBeginPos, virtualPos, length));
+            _addToVirtualPositionsRightOf(tree._root, virtualPos, length);
+            insertNode->left = node->left;
+            if (insertNode->left != 0)
+                insertNode->left->parent = insertNode;
+            node->left = insertNode;
+            insertNode->parent = node;
+        } else {
+            // Harder case: Split current and insert new node.
+            _addToVirtualPositionsRightOf(tree._root, cargo(*node).virtualPosition + cargo(*node).length, length);
+            TPos offset = virtualPos - cargo(*node).virtualPosition;
+            // Create right part of the node.
+            TNode * tmp;
+            allocate(tree._nodeAllocator, tmp, 1);
+            TNode * splitNode = new (tmp) TNode(TCargo(cargo(*node).segmentSource, cargo(*node).physicalPosition + offset, cargo(*node).virtualPosition + offset + length, cargo(*node).length - offset));
+            // Current node becomes left part of current node.
+            cargo(*node).length = offset;
+            // Create insertion node.
+            allocate(tree._nodeAllocator, tmp, 1);
+            TNode * insertNode = new (tmp) TNode(TCargo(SOURCE_PATCH, physicalBeginPos, virtualPos, length));
+            // Insert into tree...
+            insertNode->left = node;
+            node->parent = insertNode;
+            insertNode->right = splitNode;
+            splitNode->parent = insertNode;
+            splitNode->right = node->right;
+            if (node->right != 0)
+                node->right->parent = splitNode;
+            node->right = 0;
+            if (parent == 0) {
+                // current is the root node.
+                tree._root = insertNode;
+                insertNode->parent = 0;
+            } else {
+                if (parent->left == node)
+                    parent->left = insertNode;
+                else
+                    parent->right = insertNode;
+                insertNode->parent = parent;
+            }
+        }
+    } else {
+        // Returned node with highest virtualPosition but we need to insert
+        // right of it.
+        SEQAN_ASSERT_EQ(node->right, static_cast<TNode *>(0));
+        SEQAN_ASSERT_EQ(cargo(*node).virtualPosition + cargo(*node).length, virtualPos);
+        TNode * tmp;
+        allocate(tree._nodeAllocator, tmp, 1);
+        TNode * insertNode = new (tmp) TNode(TCargo(SOURCE_PATCH, physicalBeginPos, virtualPos, length));
+        node->right = insertNode;
+        insertNode->parent = node;
+    }
+//     unsigned nextId = mtRand();
+//     journalTreeToDot(std::cerr, nextId, tree);
+//     std::cout << tree << std::endl;
+//     std::cout << __FILE__ << ":" << __LINE__ << " -- " << tree << std::endl;
+    SEQAN_ASSERT_TRUE(checkStructure(tree._root));
+    SEQAN_ASSERT_TRUE(checkOrder(tree._root));
+    SEQAN_ASSERT_TRUE(checkVirtualPositions(tree._root));
+}
+
+
+// TODO(holtgrew): Remove?
+/*
+template <typename TNode>
+inline
+TNode const * 
+back(JournalEntries<TNode, UnbalancedTree> const & tree)
+{
+    SEQAN_XXXCHECKPOINT;
+    TNode * current = tree._root;
+    while (current->right != 0)
+        current = current->right;
+    return current;
+}
+
+
+template <typename TNode>
+inline
+TNode const * 
+front(JournalEntries<TNode, UnbalancedTree> const & tree)
+{
+    SEQAN_XXXCHECKPOINT;
+    TNode * current = tree._root;
+    while (current->left != 0)
+        current = current->left;
+    return current;
+}
+*/
+
+
+template <typename TStream, typename TNode>
+void journalTreeToDotRec(TStream & stream, unsigned & nextId, TNode const & node)
+{
+    unsigned currentId = nextId;
+    nextId += 1;
+    stream << "  node_" << currentId << "[label=\"source=" << node.segmentSource << ", vpos=" << node.virtualPosition << ", phpos=" << node.physicalPosition << ", len=" << node.length << "\"]" << std::endl;
+    if (node.left != 0) {
+        stream << "  node_" << currentId << " -> node_" << nextId << "[label=\"L\"]" << std::endl;
+        journalTreeToDotRec(stream, nextId, *(node.left));
+        nextId += 1;
+    }
+    if (node.right != 0) {
+        stream << "  node_" << currentId << " -> node_" << nextId << "[label=\"R\"]" << std::endl;
+        journalTreeToDotRec(stream, nextId, *(node.right));
+        nextId += 1;
+    }
+}
+
+
+template <typename TStream, typename TNode>
+void journalTreeToDot(TStream & stream, unsigned & nextId, JournalEntries<TNode, UnbalancedTree> const & journalTree)
+{
+    stream << "ROOTPTR" << nextId << " -> node_" << nextId << std::endl;
+    journalTreeToDotRec(stream, nextId, *journalTree._root);
+}
+
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_UNBALANCED_TREE_H_
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h
new file mode 100644
index 0000000..f4bbb8f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h
@@ -0,0 +1,528 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Code for a SearchEntries<UnorderedTree> iterator.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_UNBALANCED_TREE_ITERATOR_H_
+#define SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_UNBALANCED_TREE_ITERATOR_H_
+
+namespace seqan {
+
+// ============================================================================
+// Tags, Classes
+// ============================================================================
+
+template <typename TJournalEntriesSpec>
+struct JournalEntriesIterSpec;
+
+
+template <typename TJournalEntries>
+class Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> >
+{
+public:
+    typedef Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > TIter;
+    typedef typename TJournalEntries::TNode TNode;
+
+    // The current node.
+    TNode * _currentNode;
+    // The direction we arrived from at this node.  The end node is
+    // encoded as the root and _iterationDirection == DIRECTION_UP_RIGHT.
+    IterationDirection _iterationDirection;
+
+    Iter() : _currentNode(0), _iterationDirection(DIRECTION_NULL) {}
+
+    Iter(TIter const & other)
+            : _currentNode(other._currentNode),
+              _iterationDirection(other._iterationDirection)
+    { SEQAN_CHECKPOINT; }
+
+    Iter(typename IterComplementConst<TIter>::Type const & other)
+            : _currentNode(other._currentNode),
+              _iterationDirection(other._iterationDirection)
+    { SEQAN_CHECKPOINT; }
+
+    explicit
+    Iter(TJournalEntries & tree)
+    {
+        SEQAN_CHECKPOINT;
+        _initJournalEntriesIterator(*this, tree);
+    }
+};
+
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+template <typename TCargo>
+struct Iterator<JournalEntries<TCargo, UnbalancedTree>, Standard>
+{
+    typedef Iter<JournalEntries<TCargo, UnbalancedTree>, JournalEntriesIterSpec<UnbalancedTree> > Type;
+};
+
+template <typename TCargo>
+struct Iterator<JournalEntries<TCargo, UnbalancedTree> const, Standard>
+{
+    typedef Iter<JournalEntries<TCargo, UnbalancedTree> const, JournalEntriesIterSpec<UnbalancedTree> > Type;
+};
+
+template <typename TJournalEntries>
+struct Value<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >
+{
+    typedef typename TJournalEntries::TCargo & Type;
+};
+
+template <typename TJournalEntries>
+struct Value<Iter<TJournalEntries const, JournalEntriesIterSpec<UnbalancedTree> > >
+{
+    typedef typename TJournalEntries::TCargo const & Type;
+};
+
+template <typename TJournalEntries>
+struct GetValue<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >
+{
+    typedef typename TJournalEntries::TCargo Type;
+};
+
+template <typename TJournalEntries>
+struct GetValue<Iter<TJournalEntries const, JournalEntriesIterSpec<UnbalancedTree> > >
+{
+    typedef typename TJournalEntries::TCargo Type;
+};
+
+template <typename TJournalEntries>
+struct Reference<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >
+{
+    typedef typename TJournalEntries::TCargo & Type;
+};
+
+template <typename TJournalEntries>
+struct Reference<Iter<TJournalEntries const, JournalEntriesIterSpec<UnbalancedTree> > >
+{
+    typedef typename TJournalEntries::TCargo const & Type;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// For JournalEntries<TNode, UnbalancedTree>
+
+template <typename TNode>
+inline
+typename Iterator<JournalEntries<TNode, UnbalancedTree> const, Standard>::Type
+begin(JournalEntries<TNode, UnbalancedTree> const & journalTree, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return Iter<JournalEntries<TNode, UnbalancedTree> const, JournalEntriesIterSpec<UnbalancedTree> >(journalTree);
+}
+
+template <typename TNode>
+inline
+typename Iterator<JournalEntries<TNode, UnbalancedTree>, Standard>::Type
+begin(JournalEntries<TNode, UnbalancedTree> & journalTree, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    return Iter<JournalEntries<TNode, UnbalancedTree>, JournalEntriesIterSpec<UnbalancedTree> >(journalTree);
+}
+
+template <typename TNode>
+inline
+typename Iterator<JournalEntries<TNode, UnbalancedTree> const, Standard>::Type
+end(JournalEntries<TNode, UnbalancedTree> const & journalTree, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<JournalEntries<TNode, UnbalancedTree> const, Standard>::Type TIterator;
+    TIterator result;
+    result._currentNode = journalTree._root;
+    result._iterationDirection = DIRECTION_UP_RIGHT;
+    return result;
+}
+
+template <typename TNode>
+inline
+typename Iterator<JournalEntries<TNode, UnbalancedTree>, Standard>::Type
+end(JournalEntries<TNode, UnbalancedTree> & journalTree, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef Iter<JournalEntries<TNode, UnbalancedTree>, JournalEntriesIterSpec<UnbalancedTree> > TIterator;
+    TIterator result;
+    result._currentNode = journalTree._root;
+    result._iterationDirection = DIRECTION_UP_RIGHT;
+    return result;
+}
+
+// For JournalEntriesIterator<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> >
+
+template <typename TJournalEntries>
+inline
+void
+_initJournalEntriesIterator(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator,
+                         TJournalEntries & tree)
+{
+    SEQAN_CHECKPOINT;
+    iterator._currentNode = tree._root;
+    if (tree._root == 0) {
+        iterator._iterationDirection = DIRECTION_UP_RIGHT;
+    } else {
+        iterator._iterationDirection = DIRECTION_DOWN_LEFT;
+        while (goLeft(iterator))
+            continue;  // Left-only traversal.
+    }
+}
+
+// Initialize journal tree iterator to end, i.e. root & direction is up right.
+template <typename TJournalEntries>
+inline
+void
+_initJournalEntriesIteratorEnd(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator,
+                            TJournalEntries & tree)
+{
+    SEQAN_CHECKPOINT;
+    iterator._currentNode = tree._root;
+    iterator._iterationDirection = DIRECTION_UP_RIGHT;
+}
+
+// TODO(holtgrew): Unused, remove?
+/*
+template <typename TJournalEntries>
+inline
+void
+setValue(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator,
+         typename Value<TJournalEntries>::Type const & value)
+{
+    SEQAN_XXXCHECKPOINT;
+    setValue(*iterator._currentNode, value);
+}
+*/
+
+template <typename TJournalEntries>
+inline
+typename Value<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type
+value(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    return cargo(*iterator._currentNode);
+}
+
+template <typename TJournalEntries>
+inline
+typename Value<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type
+value(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & iterator)
+{
+    SEQAN_CHECKPOINT;
+    return cargo(*iterator._currentNode);
+}
+
+// TODO(holtgrew): Unused, remove?
+/*
+template <typename TJournalEntries>
+inline
+typename Value<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type
+operator*(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    SEQAN_XXXCHECKPOINT;
+    return value(iterator);
+}
+*/
+
+// TODO(holtgrew): Unused, remove?
+/*
+template <typename TJournalEntries>
+inline
+typename Value<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type
+operator*(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & iterator)
+{
+    SEQAN_XXXCHECKPOINT;
+    return value(iterator);
+}
+*/
+
+template <typename TJournalEntries>
+inline
+bool
+hasLeftChild(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    return iterator._currentNode->left != 0;
+}
+
+template <typename TJournalEntries>
+inline
+bool
+goLeft(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    if (!hasLeftChild(iterator))
+        return false;
+    iterator._iterationDirection = DIRECTION_DOWN_LEFT;
+    iterator._currentNode = iterator._currentNode->left;
+    return true;
+}
+
+template <typename TJournalEntries>
+inline
+bool
+hasRightChild(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    return iterator._currentNode->right != 0;
+}
+
+template <typename TJournalEntries>
+inline
+bool
+goRight(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    if (!hasRightChild(iterator))
+        return false;
+    iterator._iterationDirection = DIRECTION_DOWN_RIGHT;
+    iterator._currentNode = iterator._currentNode->right;
+    return true;
+}
+
+template <typename TJournalEntries>
+inline
+bool
+hasParent(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & iterator)
+{
+    SEQAN_CHECKPOINT;
+    return iterator._currentNode->parent != 0;
+}
+    
+template <typename TJournalEntries>
+inline
+bool
+goUp(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    if (!hasParent(iterator)) {
+        // Up from the root means we go to end, set direction to up-right.
+        iterator._iterationDirection = DIRECTION_UP_RIGHT;
+        return false;
+    }
+    if (iterator._currentNode->parent->left == iterator._currentNode)
+        iterator._iterationDirection = DIRECTION_UP_LEFT;
+    else
+        iterator._iterationDirection = DIRECTION_UP_RIGHT;
+    iterator._currentNode = iterator._currentNode->parent;
+    return true;
+}
+
+template <typename TJournalEntries>
+inline
+bool
+atEnd(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & iterator)
+{
+    SEQAN_CHECKPOINT;
+    return (iterator._currentNode == 0) || (!hasParent(iterator) && (iterator._iterationDirection == DIRECTION_UP_RIGHT));
+}
+
+template <typename TJournalEntries>
+inline
+bool
+atEnd(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    typedef Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > TIterator;
+    return (iterator._currentNode == 0) || (!hasParent(iterator) && (iterator._iterationDirection == DIRECTION_UP_RIGHT));
+}
+
+template <typename TJournalEntries>
+inline
+Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > &
+operator++(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    switch (iterator._iterationDirection) {
+        case DIRECTION_DOWN_LEFT:
+        case DIRECTION_DOWN_RIGHT:
+            // Arrived here by going down (either right or left).  Next is
+            // either right-left traversal (if node has a child to the right)
+            // or going up if we do not have a child on the right.
+            if (goRight(iterator)) {
+                while (goLeft(iterator))
+                    continue;
+            } else {
+                while (goUp(iterator) && iterator._iterationDirection == DIRECTION_UP_RIGHT)
+                    continue;
+            }
+            break;
+        case DIRECTION_UP_LEFT:
+            // We came up from our left child.  Next is either right-left
+            // traversal (if node has a child to the right) or going up if
+            // we do not have a child on the left.
+            if (goRight(iterator)) {
+                while (goLeft(iterator))
+                    continue;
+            } else {
+                while (goUp(iterator) && iterator._iterationDirection == DIRECTION_UP_RIGHT)
+                    continue;
+            }
+            break;
+        case DIRECTION_UP_RIGHT:
+            // We came here from our right child.  Next is up until we got
+            // to the current node from it's left child.
+            while (goUp(iterator) && iterator._iterationDirection == DIRECTION_UP_RIGHT)
+                continue;
+            break;
+        default:
+            SEQAN_ASSERT_FAIL("Invalid iteration direction.");
+    }
+        
+    return iterator;    
+}
+
+template <typename TJournalEntries>
+inline
+Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> >
+operator++(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator,
+           int /*postfix*/)
+{
+    SEQAN_CHECKPOINT;
+    Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > temp(iterator);
+    ++iterator;
+    return temp;
+}
+
+template <typename TJournalEntries>
+inline
+Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > &
+operator--(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename TJournalEntries::TNode TNode;
+    
+    // If we are at the end, go to the last vertex.
+    if (atEnd(iterator)) {
+        while (goRight(iterator))
+            continue;
+        return iterator;
+    }
+    // Otherwise, simply go one step left.
+    
+    // The following comments are from the point of perspective of having
+    // performed an increment in the previous step.
+    TNode const * parent;
+    switch (iterator._iterationDirection) {
+        case DIRECTION_DOWN_RIGHT:
+        case DIRECTION_DOWN_LEFT:
+            // Arrived here in a right-left traversal.  Reverse this by
+            // going up until we went up from a right child.
+            while (goUp(iterator) && iterator._iterationDirection != DIRECTION_UP_RIGHT)
+                continue;
+            // Next, update iteration direction such that going up and then
+            // down the same edge would lead to current node.
+            parent = iterator._currentNode->parent;
+            if (parent == 0) {
+                iterator._iterationDirection = DIRECTION_DOWN_LEFT;
+            } else {
+                if (parent->left == iterator._currentNode) {
+                    iterator._iterationDirection = DIRECTION_DOWN_LEFT;
+                } else {
+                    SEQAN_ASSERT_EQ(parent->right, iterator._currentNode);
+                    iterator._iterationDirection = DIRECTION_DOWN_RIGHT;
+                }
+            }
+            break;
+        case DIRECTION_UP_LEFT:
+            // We came up from our left child.  Next in going to predecessor
+            // is going back to the left child.
+            goLeft(iterator);
+            break;
+        case DIRECTION_UP_RIGHT:
+            SEQAN_ASSERT_FAIL("Should probably not happen.");
+            break;
+        default:
+            SEQAN_ASSERT_FAIL("Invalid iteration direction.");
+    }
+        
+    return iterator;    
+}
+
+template <typename TJournalEntries>
+inline
+Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> >
+operator--(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator,
+           int /*postfix*/)
+{
+    SEQAN_CHECKPOINT;
+    Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > temp(iterator);
+    --iterator;
+    return temp;
+}
+
+template <typename TJournalEntries>
+inline
+bool
+operator==(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & a,
+           Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & b)
+{
+    SEQAN_CHECKPOINT;
+    return (a._currentNode == b._currentNode) && (a._iterationDirection == b._iterationDirection);
+}
+
+template <typename TJournalEntries>
+inline
+bool
+operator==(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & a,
+           typename IterComplementConst<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type const & b)
+{
+    SEQAN_CHECKPOINT;
+    return (a._currentNode == b._currentNode) && (a._iterationDirection == b._iterationDirection);
+}
+
+template <typename TJournalEntries>
+inline
+bool
+operator!=(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & a,
+           Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & b)
+{
+    SEQAN_CHECKPOINT;
+    return (a._currentNode != b._currentNode) || (a._iterationDirection != b._iterationDirection);
+}
+
+template <typename TJournalEntries>
+inline
+bool
+operator!=(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & a,
+           typename IterComplementConst<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type const & b)
+{
+    SEQAN_CHECKPOINT;
+    return (a._currentNode != b._currentNode) || (a._iterationDirection != b._iterationDirection);
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_UNBALANCED_TREE_ITERATOR_H_
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_unbalanced_tree_node.h b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_unbalanced_tree_node.h
new file mode 100644
index 0000000..6481bd1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entries_unbalanced_tree_node.h
@@ -0,0 +1,145 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Code for the node of JournalEntries<UnorderedTree>, i.e. a node of an
+// unbalanced binary search tree.  This could easily be extended to a Red Black
+// Tree with a flag (which could actually be stored in the lowest bits of one
+// of the pointers).  However, since std::set already implements balanced
+// trees, it should be sufficient to use a STL implementation of std::set for
+// balanced binary search trees.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_UNBALANCED_TREE_NODE_H_
+#define SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_UNBALANCED_TREE_NODE_H_
+
+namespace seqan {
+
+// ============================================================================
+// Classes
+// ============================================================================
+
+template <typename TCargo>
+struct JournalEntriesUnorderedTreeNode
+{
+    // Left child.
+    JournalEntriesUnorderedTreeNode * left;
+    // Right child.
+    JournalEntriesUnorderedTreeNode * right;
+    // Parent, 0 for root.
+    JournalEntriesUnorderedTreeNode * parent;
+    // The actual payload:  The journal entry.
+    TCargo cargo;
+    
+    JournalEntriesUnorderedTreeNode() : left(0), right(0), parent(0) {}
+
+    JournalEntriesUnorderedTreeNode(TCargo const & _cargo)
+            : left(0),
+              right(0),
+              parent(0),
+              cargo(_cargo) {}
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// TODO(holtgrew): Rename value to cargo?
+
+template <typename T>
+struct Cargo;
+
+template <typename TCargo>
+struct Cargo<JournalEntriesUnorderedTreeNode<TCargo> >
+{
+    typedef TCargo Type;
+};
+
+template <typename TCargo>
+struct Cargo<JournalEntriesUnorderedTreeNode<TCargo> const>
+{
+    typedef TCargo const Type;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TStream, typename TCargo>
+TStream & operator<<(TStream & stream, JournalEntriesUnorderedTreeNode<TCargo> const & node)
+{
+    stream << "JournalEntriesUnorderedTreeNode(add=" << &node
+           << ", cargo=" << node.cargo
+           << ", parent=" << node.parent
+           << ", left=";
+    if (node.left)
+        stream << *node.left;
+    else
+        stream << "NULL";
+    stream << ", right=";
+    if (node.right)
+        stream << *node.right;
+    else
+        stream << "NULL";
+    return stream << ")";
+}
+
+template <typename TCargo>
+typename Cargo<JournalEntriesUnorderedTreeNode<TCargo> >::Type &
+cargo(JournalEntriesUnorderedTreeNode<TCargo> & node)
+{
+    SEQAN_CHECKPOINT;
+    return node.cargo;
+}
+
+// TODO(holtgrew): Unused, remove?
+/*
+template <typename TCargo>
+typename Cargo<JournalEntriesUnorderedTreeNode<TCargo> const>::Type &
+cargo(JournalEntriesUnorderedTreeNode<TCargo> const & node)
+{
+    SEQAN_XXXCHECKPOINT;
+    return node.cargo;
+}
+
+template <typename TCargo>
+typename Cargo<JournalEntriesUnorderedTreeNode<TCargo> const>::Type
+getCargo(JournalEntriesUnorderedTreeNode<TCargo> const & node)
+{
+    SEQAN_XXXCHECKPOINT;
+    return node.cargo;
+}
+*/
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRIES_UNBALANCED_TREE_NODE_H_
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled/journal_entry.h b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entry.h
new file mode 100644
index 0000000..b0b1f37
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled/journal_entry.h
@@ -0,0 +1,144 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Code for journal entries.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRY_H_
+#define SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRY_H_
+
+namespace seqan {
+
+// ============================================================================
+// Enums, Classes
+// ============================================================================
+
+enum SegmentSource {
+    SOURCE_NULL,
+    SOURCE_ORIGINAL,
+    SOURCE_PATCH
+};
+
+
+template <typename TPos_, typename TSize_>
+struct JournalEntry
+{
+    typedef TPos_ TPos;
+    typedef TSize_ TSize;
+
+    // Flag for where the segment comes from.
+    SegmentSource segmentSource;
+    // Position in the original string or the insertion buffer,
+    // depending on segmentSource.
+    TPos physicalPosition;
+    // Position in the virtual string.
+    TPos virtualPosition;
+    // Length of the segment.
+    TSize length;
+
+    JournalEntry()
+            : segmentSource(SOURCE_NULL),
+              physicalPosition(0),
+              virtualPosition(0),
+              length(0)
+    {
+		SEQAN_CHECKPOINT;
+    }
+
+    JournalEntry(SegmentSource const & _segmentSource,
+                 TPos _physicalPosition,
+                 TPos _virtualPosition,
+                 TSize _length)
+            : segmentSource(_segmentSource),
+              physicalPosition(_physicalPosition),
+              virtualPosition(_virtualPosition),
+              length(_length)
+    {
+		SEQAN_CHECKPOINT;
+    }
+};
+
+
+template <typename TPos, typename TSize>
+struct JournalEntryLtByVirtualPos
+{
+    bool operator()(JournalEntry<TPos, TSize> const & a,
+                    JournalEntry<TPos, TSize> const & b) const
+    {
+        SEQAN_CHECKPOINT;
+        return a.virtualPosition < b.virtualPosition;
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+template <typename TPos, typename TSize>
+struct Size<JournalEntry<TPos, TSize> >
+{
+    typedef TSize Type;
+};
+
+template <typename TPos, typename TSize>
+struct Size<JournalEntry<TPos, TSize> const>
+        : Size<JournalEntry<TPos, TSize> > {};
+
+template <typename TPos, typename TSize>
+struct Position<JournalEntry<TPos, TSize> >
+{
+    typedef TPos Type;
+};
+
+template <typename TPos, typename TSize>
+struct Position<JournalEntry<TPos, TSize> const>
+        : Position<JournalEntry<TPos, TSize> > {};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TStream, typename TPos, typename TSize>
+TStream & operator<<(TStream & stream, JournalEntry<TPos, TSize> const & entry)
+{
+    return stream << "{segmentSource=" << entry.segmentSource
+                  << ", virtualPosition=" << entry.virtualPosition
+                  << ", physicalPosition=" << entry.physicalPosition
+                  << ", length=" << entry.length
+                  << "}";
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEQUENCE_JOURNALED_JOURNAL_ENTRY_H_
+
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled.h b/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled.h
new file mode 100644
index 0000000..62652a5
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled.h
@@ -0,0 +1,536 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Journaled String implementation.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_JOURNAL_SEQUENCE_JOURNAL_H_
+#define SEQAN_SEQUENCE_JOURNAL_SEQUENCE_JOURNAL_H_
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes
+// ============================================================================
+
+/**
+.Spec.Journaled String
+..summary:Journaled versions of arbitrary underlying string.
+..signature:String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >
+..include:seqan/sequence_journaled.h
+..cat:Sequences
+ */
+
+template <typename THostSpec, typename TJournalSpec = SortedArray, typename TBufferSpec = Alloc<void> >
+struct Journaled {};
+
+template <typename TValue_, typename THostSpec_, typename TJournalSpec_, typename TBufferSpec_>
+class String<TValue_, Journaled<THostSpec_, TJournalSpec_, TBufferSpec_> >
+{
+public:
+    typedef TValue_ TValue;
+    typedef THostSpec_ THostSpec;
+    typedef TJournalSpec_ TJournalSpec;
+    typedef TBufferSpec_ TBufferSpec;
+
+    typedef String<TValue, THostSpec> THost;
+    typedef typename Size<THost>::Type TSize;
+    typedef typename Position<THost>::Type TPosition;
+    typedef String<TValue, TBufferSpec> TInsertionBuffer;
+    typedef JournalEntry<TSize, TPosition> TJournalEntry;
+    typedef JournalEntries<TJournalEntry, TJournalSpec> TJournalEntries;
+
+    // The underlying host string.
+    Holder<THost> _holder;
+    // A buffer for inserted strings.
+    TInsertionBuffer _insertionBuffer;
+    // The journal is a sorted set of TJournalEntry objects, the exact types
+    // depends on TJournalSpec.  Note that the entries resemble a partial
+    // sum datastructure.
+    TJournalEntries _journalEntries;
+    // The journaled string's size.
+    TSize _length;
+
+    String() {}
+
+    String(THost & host)
+    {
+        SEQAN_CHECKPOINT;
+        setHost(*this, host);
+    }
+
+    // TODO(holtgrew): Actually, we want to have a proxy for non-const.
+    TValue operator[](TPosition const & pos) const
+    {
+        SEQAN_CHECKPOINT;
+        return getValue(*this, pos);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+///.Metafunction.Host.param.T:Spec.Journaled String
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Host<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >
+{
+    typedef String<TValue, THostSpec> Type;
+};
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Host<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>
+{
+    typedef String<TValue, THostSpec> const Type;
+};
+
+/**
+.Metafunction.InsertionBuffer
+..summary:Return type of insertion buffer string for a journaled string.
+..param.T:Spec.Journaled String
+..include:sequan/sequence_journal.h
+*/
+template <typename T>
+struct InsertionBuffer;
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct InsertionBuffer<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >
+{
+    typedef String<TValue, TBufferSpec> Type;
+};
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct InsertionBuffer<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>
+{
+    typedef String<TValue, TBufferSpec> const Type;
+};
+
+///.Metafunction.Size.param.T:Spec.Journaled String
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Size<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >
+{
+    typedef typename String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >::TSize Type;
+};
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Size<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>
+    : Size<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > > {};
+
+///.Metafunction.Position.param.T:Spec.Journaled String
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Position<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >
+{
+  typedef typename String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >::TPosition Type;
+};
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Position<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>
+    : Position<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > > {};
+
+///.Metafunction.Value.param.T:Spec.Journaled String
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Value<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >
+{
+  typedef TValue Type;
+};
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Value<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>
+{
+  typedef TValue Type;
+};
+
+///.Metafunction.GetValue.param.T:Spec.Journaled String
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct GetValue<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >
+{
+  typedef TValue Type;
+};
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct GetValue<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>
+{
+  typedef TValue Type;
+};
+
+///.Metafunction.Reference.param.T:Spec.Journaled String
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Reference<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >
+{
+  typedef TValue & Type;
+};
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Reference<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>
+{
+  typedef TValue const & Type;
+};
+
+/**
+.Metafunction.JournalType
+..signature:JournalType<T>::Type
+..summary:Metafunction for returning the type of the journal of a Journaled String.
+..param.T:Spec.Journaled String
+..include:seqan/string_journaled.h
+ */
+template <typename T>
+struct JournalType;
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct JournalType<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >
+{
+    typedef typename Size<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type TSize_;
+    typedef typename Position<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type TPosition_;
+    typedef JournalEntry<TSize_, TPosition_> TJournalEntry_;
+
+    typedef JournalEntries<TJournalEntry_, TJournalSpec> Type;
+};
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct JournalType<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>
+{
+    typedef typename JournalType<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type const Type;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TStream, typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+TStream &
+operator<<(TStream & stream, String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & s)
+{
+    SEQAN_CHECKPOINT;
+    typedef String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > TString;
+    typedef typename TString::TJournalEntries TJournalEntries;
+    typedef typename Iterator<TJournalEntries const, Standard>::Type TIterator;
+
+    for (TIterator it = begin(s._journalEntries), itend = end(s._journalEntries); it != itend; ++it) {
+        if (value(it).segmentSource == SOURCE_ORIGINAL) {
+            stream << infix(value(s._holder), value(it).physicalPosition, value(it).physicalPosition + value(it).length);
+        } else {
+            SEQAN_ASSERT_EQ(value(it).segmentSource, SOURCE_PATCH);
+            stream << infix(s._insertionBuffer, value(it).physicalPosition, value(it).physicalPosition + value(it).length);
+        }
+    }
+    return stream;
+}
+
+/**
+.Function.setHost:
+..param.object.type:Spec.Journaled String
+..param.host.type:Class.String
+..include:seqan/sequence_journaled.h
+*/
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TSequence2>
+inline
+void
+setHost(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString, TSequence2 & str)
+{
+    SEQAN_CHECKPOINT;
+    setValue(journaledString._holder, str);
+    journaledString._length = length(str);
+    reinit(journaledString._journalEntries, length(str));
+}
+
+/**
+.Function.host:
+..param.object.type:Spec.Journaled String
+..include:seqan/sequence_journaled.h
+*/
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+typename Host<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type &
+host(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString)
+{
+    SEQAN_CHECKPOINT;
+    return value(journaledString._holder);
+}
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+typename Host<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type const &
+host(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString)
+{
+    SEQAN_CHECKPOINT;
+    return value(journaledString._holder);
+}
+
+/**
+.Function.clear:
+..param.object.type:Spec.Journaled String
+..include:seqan/sequence_journaled.h
+ */
+// TODO(holtgrew): Behaviour is to clear the journal, not the string!
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline void
+clear(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString)
+{
+    SEQAN_CHECKPOINT;
+    reinit(journaledString._journalEntries, length(host(journaledString)));
+}
+
+/**
+.Function.flatten:
+..summary:Apply the journal to the underlying string, destructively on the underlying string.
+..signature:flatten(journaledString)
+..param.journaledString:The journaled string to flatten.
+...type:Spec.Journaled String
+..include:seqan/sequence_journaled.h
+ */
+// TODO(holtgrew): Write me! What about non-destructive version that creates a new copy and sets holder to it?
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos>
+inline void
+erase(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString,
+      TPos const & pos,
+      TPos const & posEnd)
+{
+    SEQAN_CHECKPOINT;
+	SEQAN_ASSERT_GEQ(static_cast<TPos>(journaledString._length), pos);
+	SEQAN_ASSERT_GEQ(static_cast<TPos>(journaledString._length), posEnd);
+    SEQAN_ASSERT_GEQ(static_cast<TPos>(journaledString._length), posEnd - pos);
+    journaledString._length -= posEnd - pos;
+    recordErase(journaledString._journalEntries, pos, posEnd);
+    if (length(journaledString._journalEntries) == 0)
+        clear(journaledString._insertionBuffer);
+}
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos>
+inline void
+erase(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString,
+      TPos const & pos)
+{
+    SEQAN_CHECKPOINT;
+    SEQAN_ASSERT_GEQ(journaledString._length, 1u);
+    erase(journaledString, pos, pos + 1);
+}
+
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TString, typename TPos>
+inline void
+insert(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString,
+       TPos const & pos,
+       TString const & seq)
+{
+    SEQAN_CHECKPOINT;
+    journaledString._length += length(seq);
+    TPos beginPos = length(journaledString._insertionBuffer);
+    append(journaledString._insertionBuffer, seq);
+    recordInsertion(journaledString._journalEntries, pos, beginPos, length(seq));
+}
+
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos, typename TValue2>
+inline void
+insertValue(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString,
+            TPos const & pos,
+            TValue2 const & value)
+{
+    SEQAN_CHECKPOINT;
+    journaledString._length += 1;
+    TPos beginPos = length(journaledString._insertionBuffer);
+    appendValue(journaledString._insertionBuffer, value);
+    recordInsertion(journaledString._journalEntries, pos, beginPos, 1u);
+}
+
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos, typename TSequence2>
+inline void
+assignInfix(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString,
+            TPos const & beginPos,
+            TPos const & endPos,
+            TSequence2 const & valueString)
+{
+    SEQAN_CHECKPOINT;
+    erase(journaledString, beginPos, endPos);
+    insert(journaledString, beginPos, valueString);
+}
+
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos, typename TValue2>
+inline void
+assignValue(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString,
+            TPos const & pos,
+            TValue2 const & value)
+{
+    SEQAN_CHECKPOINT;
+    erase(journaledString, pos);
+    insertValue(journaledString, pos, value);
+}
+
+
+// TODO(holtgrew): Batch-Assignment of values through segments?
+
+// TODO(holtgrew): begin
+// TODO(holtgrew): empty
+// TODO(holtgrew): end
+// TODO(holtgrew): flatten
+// TODO(holtgrew): fill
+// TODO(holtgrew): getValue
+// TODO(holtgrew): infix
+// TODO(holtgrew): infixWithLength
+// TODO(holtgrew): iter
+
+// TODO(holtgrew): Unused, remove?
+/*
+template <typename TSequence, typename TJournalSpec>
+inline
+typename Value<TSequence>::Type const &
+front(String...<TSequence, TJournalSpec> const & journaledString)
+{
+    SEQAN_XXXCHECKPOINT;
+    typedef SequenceJournal<TSequence, TJournalSpec> TString;
+    typedef typename TString::TNode TNode;
+    TNode frontNode = front(journaledString._journalEntries);
+    if (frontNode->segmentSource == SOURCE_ORIGINAL) {
+        return getValue(value(journaledString._holder), frontNode->virtualPosition + frontNode->length - 1);
+    } else {
+        SEQAN_ASSERT_EQ(frontNode->segmentSource, SOURCE_PATCH);
+        return getValue(journaledString._insertionBuffer, frontNode->virtualPosition + frontNode->length - 1);
+    }
+}
+
+// front/back clash with general sequence definitions.
+template <typename TSequence, typename TJournalSpec>
+inline
+TValue const &
+back(SequenceJournal<TSequence, TJournalSpec> const & journaledString)
+{
+    SEQAN_XXXCHECKPOINT;
+    typedef SequenceJournal<TSequence, TJournalSpec> TString;
+    typedef typename TString::TNode TNode;
+    TNode backNode = back(journaledString._journalEntries);
+    if (backNode->segmentSource == SOURCE_ORIGINAL) {
+        return getValue(value(journaledString._holder), backNode->virtualPosition + backNode->length - 1);
+    } else {
+        SEQAN_ASSERT_EQ(backNode->segmentSource, SOURCE_PATCH);
+        return getValue(journaledString._insertionBuffer, backNode->virtualPosition + backNode->length - 1);
+    }
+}
+*/
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+typename Size<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type
+length(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString)
+{
+    SEQAN_CHECKPOINT;
+    return journaledString._length;
+}
+
+
+// TODO(holtgrew): toCString
+// TODO(holtgrew): value
+
+// TOOD(holtgrew): operator<
+// TOOD(holtgrew): operator>
+// TOOD(holtgrew): operator<=
+// TOOD(holtgrew): operator>=
+// TOOD(holtgrew): operator==
+// TOOD(holtgrew): operator!=
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+typename GetValue<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>::Type
+getValue(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString,
+         typename Position<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type const & pos)
+{
+    SEQAN_CHECKPOINT;
+    typedef String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const TJournaledString;
+    typedef typename TJournaledString::TJournalEntry TJournalEntry;
+    typedef typename Position<TJournaledString>::Type TPos;
+
+    TJournalEntry entry = findJournalEntry(journaledString._journalEntries, pos);
+    TPos relativePos = pos - entry.virtualPosition;
+
+    if (entry.segmentSource == SOURCE_ORIGINAL) {
+        return getValue(value(journaledString._holder), entry.physicalPosition + relativePos);
+    } else {
+        return getValue(journaledString._insertionBuffer, entry.physicalPosition + relativePos);
+    }
+}
+
+
+// Note that if pos is in a gap, we return the position of the entry
+// after the gap in the host.
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos>
+inline
+typename Position<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type
+virtualToHostPosition(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString,
+                      TPos const & pos)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): With a better journal entries datastructure, we could solve the main problem here. At the moment, we delegate completely.
+    return virtualToHostPosition(journaledString._journalEntries, pos);
+}
+
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos>
+inline
+bool
+isGapInHost(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString,
+            TPos const & pos)
+{
+    SEQAN_CHECKPOINT;
+    // TODO(holtgrew): With a better journal entries datastructure, we could solve the main problem here. At the moment, we delegate completely.
+    return isGapInHost(journaledString._journalEntries, pos);
+}
+
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+const void *
+id(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString)
+{
+    SEQAN_CHECKPOINT;
+    return id(value(journaledString._holder));
+}
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+const void *
+id(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString)
+{
+    SEQAN_CHECKPOINT;
+    return id(value(journaledString._holder));
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEQUENCE_JOURNAL_SEQUENCE_JOURNAL_H_
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled_forwards.h b/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled_forwards.h
new file mode 100644
index 0000000..9f95b87
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled_forwards.h
@@ -0,0 +1,51 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_JOURNAL_SEQUENCE_JOURNAL_FORWARDS_H_
+#define SEQAN_SEQUENCE_JOURNAL_SEQUENCE_JOURNAL_FORWARDS_H_
+
+namespace seqan {
+
+// TODO(holtgrew): Is this actually needed?
+
+struct UnbalancedTree;
+
+struct SortedArray;
+
+template <typename TJournalEntriesSpec>
+struct JournalEntriesIterSpec;
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEQUENCE_JOURNAL_SEQUENCE_JOURNAL_H_
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled_generated_forwards.h b/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled_generated_forwards.h
new file mode 100644
index 0000000..7e724c0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled_generated_forwards.h
@@ -0,0 +1,440 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SEQUENCE_JOURNALED_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_SEQUENCE_JOURNALED_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// Cargo
+
+template <typename T> struct Cargo;       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_node.h"(79)
+
+//____________________________________________________________________________
+// InsertionBuffer
+
+template <typename T> struct InsertionBuffer;       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(128)
+
+//____________________________________________________________________________
+// JournalEntries
+
+template <typename TNode, typename TTreeSpec> class JournalEntries;       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(51)
+template <typename TNode, typename TTreeSpec> class JournalEntries;       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(61)
+
+//____________________________________________________________________________
+// JournalEntriesIterSpec
+
+template <typename TJournalEntriesSpec> struct JournalEntriesIterSpec;       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(47)
+template <typename TJournalEntriesSpec> struct JournalEntriesIterSpec;       	// "projects/library/seqan/sequence_journaled/sequence_journaled_forwards.h"(47)
+
+//____________________________________________________________________________
+// JournalEntriesUnorderedTreeNode
+
+template <typename TCargo> struct JournalEntriesUnorderedTreeNode;       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_node.h"(53)
+
+//____________________________________________________________________________
+// JournalEntry
+
+template <typename TPos_, typename TSize_> struct JournalEntry;       	// "projects/library/seqan/sequence_journaled/journal_entry.h"(55)
+
+//____________________________________________________________________________
+// JournalEntryLtByVirtualPos
+
+template <typename TPos, typename TSize> struct JournalEntryLtByVirtualPos;       	// "projects/library/seqan/sequence_journaled/journal_entry.h"(94)
+
+//____________________________________________________________________________
+// JournalType
+
+template <typename T> struct JournalType;       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(211)
+
+//____________________________________________________________________________
+// Journaled
+
+template <typename THostSpec, typename TJournalSpec , typename TBufferSpec > struct Journaled;       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(59)
+
+//____________________________________________________________________________
+// JournaledStringIterSpec
+
+template <typename TJournaledStringSpec> struct JournaledStringIterSpec;       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(47)
+
+//____________________________________________________________________________
+// SortedArray
+
+struct SortedArray;       	// "projects/library/seqan/sequence_journaled/sequence_journaled_forwards.h"(44)
+struct SortedArray;       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(47)
+
+//____________________________________________________________________________
+// UnbalancedTree
+
+struct UnbalancedTree;       	// "projects/library/seqan/sequence_journaled/sequence_journaled_forwards.h"(42)
+struct UnbalancedTree;       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(57)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _addToVirtualPositionsRightOf
+
+template <typename TNode> inline void _addToVirtualPositionsRightOf(TNode * node, typename Position<TNode>::Type const & pos, typename Position<TNode>::Type const & delta);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(288)
+
+//____________________________________________________________________________
+// _checkSortedArrayTree
+
+template <typename TCargo> bool _checkSortedArrayTree(JournalEntries<TCargo, SortedArray> const & tree);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(116)
+
+//____________________________________________________________________________
+// _copyJournalEntriesNodes
+
+template <typename TNode, typename TAllocator> void _copyJournalEntriesNodes(TNode * & target, TAllocator & allocator, TNode * const & source);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(120)
+
+//____________________________________________________________________________
+// _initJournalEntriesIterator
+
+template <typename TJournalEntries> inline void _initJournalEntriesIterator(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator, TJournalEntries & tree);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(193)
+
+//____________________________________________________________________________
+// _initJournalEntriesIteratorEnd
+
+template <typename TJournalEntries> inline void _initJournalEntriesIteratorEnd(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator, TJournalEntries & tree);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(211)
+
+//____________________________________________________________________________
+// _initJournaledStringIterator
+
+template <typename TJournaledString, typename TJournalSpec> inline void _initJournaledStringIterator(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator, TJournaledString & journalString);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(211)
+
+//____________________________________________________________________________
+// _initJournaledStringIteratorEnd
+
+template <typename TJournaledString, typename TJournalSpec> inline void _initJournaledStringIteratorEnd(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator, TJournaledString & journalString);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(224)
+
+//____________________________________________________________________________
+// _subtractFromVirtualPositionsRightOf
+
+template <typename TNode> inline void _subtractFromVirtualPositionsRightOf(TNode * node, typename Position<TNode>::Type const & pos, typename Position<TNode>::Type const & delta);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(264)
+
+//____________________________________________________________________________
+// _updateSegmentIterators
+
+template <typename TJournaledString, typename TJournalSpec> inline void _updateSegmentIterators(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(234)
+
+//____________________________________________________________________________
+// assignInfix
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos, typename TSequence2> inline void assignInfix(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString, TPos const & beginPos, TPos const & endPos, TSequence2 const & valueString);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(379)
+
+//____________________________________________________________________________
+// assignValue
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos, typename TValue2> inline void assignValue(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString, TPos const & pos, TValue2 const & value);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(391)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TJournalEntries> inline bool atEnd(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(347)
+template <typename TJournalEntries> inline bool atEnd(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(356)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TNode> inline typename Iterator<JournalEntries<TNode, UnbalancedTree> const, Standard>::Type begin(JournalEntries<TNode, UnbalancedTree> const & journalTree, Standard const &);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(146)
+template <typename TNode> inline typename Iterator<JournalEntries<TNode, UnbalancedTree>, Standard>::Type begin(JournalEntries<TNode, UnbalancedTree> & journalTree, Standard const &);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(155)
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const, Standard>::Type begin(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journalString, Standard const &);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(164)
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >, Standard>::Type begin(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journalString, Standard const &);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(174)
+template <typename TCargo> typename Iterator<JournalEntries<TCargo, SortedArray>, Standard>::Type begin(JournalEntries<TCargo, SortedArray> & journalTree, Standard const &);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(139)
+template <typename TCargo> typename Iterator<JournalEntries<TCargo, SortedArray> const, Standard>::Type begin(JournalEntries<TCargo, SortedArray> const & journalTree, Standard const &);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(148)
+
+//____________________________________________________________________________
+// cargo
+
+template <typename TCargo> typename Cargo<JournalEntriesUnorderedTreeNode<TCargo> >::Type & cargo(JournalEntriesUnorderedTreeNode<TCargo> & node);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_node.h"(119)
+
+//____________________________________________________________________________
+// checkOrder
+
+template <typename TNode> inline bool checkOrder(TNode * const & node);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(183)
+
+//____________________________________________________________________________
+// checkOrderRec
+
+template <typename TNode> inline bool checkOrderRec(TNode * const & node);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(166)
+
+//____________________________________________________________________________
+// checkStructure
+
+template <typename TNode> inline bool checkStructure(TNode * const & node);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(210)
+
+//____________________________________________________________________________
+// checkStructureRec
+
+template <typename TNode> inline bool checkStructureRec(TNode * const & node);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(193)
+
+//____________________________________________________________________________
+// checkVirtualPositions
+
+template <typename TNode> inline bool checkVirtualPositions(TNode * const & node);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(157)
+
+//____________________________________________________________________________
+// checkVirtualPositionsRec
+
+template <typename TNode> inline bool checkVirtualPositionsRec(TNode * const & node, unsigned & virtualPosition);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(139)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline void clear(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(303)
+
+//____________________________________________________________________________
+// end
+
+template <typename TNode> inline typename Iterator<JournalEntries<TNode, UnbalancedTree> const, Standard>::Type end(JournalEntries<TNode, UnbalancedTree> const & journalTree, Standard const &);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(164)
+template <typename TNode> inline typename Iterator<JournalEntries<TNode, UnbalancedTree>, Standard>::Type end(JournalEntries<TNode, UnbalancedTree> & journalTree, Standard const &);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(177)
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const, Standard>::Type end(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journalString, Standard);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(184)
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >, Standard>::Type end(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journalString, Standard const &);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(196)
+template <typename TCargo> typename Iterator<JournalEntries<TCargo, SortedArray>, Standard>::Type end(JournalEntries<TCargo, SortedArray> & journalTree, Standard const &);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(157)
+template <typename TCargo> typename Iterator<JournalEntries<TCargo, SortedArray> const, Standard>::Type end(JournalEntries<TCargo, SortedArray> const & journalTree, Standard const &);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(166)
+
+//____________________________________________________________________________
+// erase
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos> inline void erase(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString, TPos const & pos, TPos const & posEnd);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(323)
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos> inline void erase(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString, TPos const & pos);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(338)
+
+//____________________________________________________________________________
+// findInJournalEntries
+
+template <typename TCargo> inline typename Iterator<JournalEntries<TCargo, SortedArray> const, Standard>::Type findInJournalEntries(JournalEntries<TCargo, SortedArray> const & journalEntries, typename Position<TCargo>::Type const & pos);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(188)
+template <typename TCargo> inline typename Iterator<JournalEntries<TCargo, UnbalancedTree> const, Standard>::Type findInJournalEntries(JournalEntries<TCargo, UnbalancedTree> const & journalEntries, typename Position<TCargo>::Type const & pos);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(308)
+
+//____________________________________________________________________________
+// findJournalEntry
+
+template <typename TCargo> inline TCargo const & findJournalEntry(JournalEntries<TCargo, SortedArray> const & journalEntries, typename Position<TCargo>::Type const & pos);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(213)
+template <typename TCargo> inline TCargo const & findJournalEntry(JournalEntries<TCargo, UnbalancedTree> const & journalEntries, typename Position<TCargo>::Type const & pos);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(340)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline typename GetValue<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const>::Type getValue(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString, typename Position<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type const & pos);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(473)
+template <typename TJournaledString, typename TJournalSpec> inline typename GetValue<Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > >::Type getValue(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & iterator);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(291)
+template <typename TJournaledString, typename TJournalSpec> inline typename GetValue<Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > >::Type getValue(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(305)
+
+//____________________________________________________________________________
+// goLeft
+
+template <typename TJournalEntries> inline bool goLeft(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(285)
+
+//____________________________________________________________________________
+// goRight
+
+template <typename TJournalEntries> inline bool goRight(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(307)
+
+//____________________________________________________________________________
+// goUp
+
+template <typename TJournalEntries> inline bool goUp(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(329)
+
+//____________________________________________________________________________
+// hasLeftChild
+
+template <typename TJournalEntries> inline bool hasLeftChild(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(276)
+
+//____________________________________________________________________________
+// hasParent
+
+template <typename TJournalEntries> inline bool hasParent(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(320)
+
+//____________________________________________________________________________
+// hasRightChild
+
+template <typename TJournalEntries> inline bool hasRightChild(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(298)
+
+//____________________________________________________________________________
+// host
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline typename Host<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type & host(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(280)
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline typename Host<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type const & host(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(289)
+
+//____________________________________________________________________________
+// id
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline const void * id(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(520)
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline const void * id(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(529)
+
+//____________________________________________________________________________
+// insert
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TString, typename TPos> inline void insert(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString, TPos const & pos, TString const & seq);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(350)
+
+//____________________________________________________________________________
+// insertValue
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos, typename TValue2> inline void insertValue(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString, TPos const & pos, TValue2 const & value);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(364)
+
+//____________________________________________________________________________
+// isGapInHost
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos> inline bool isGapInHost(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString, TPos const & pos);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(509)
+template <typename TNode, typename TJournalSpec, typename TPos> inline bool isGapInHost(JournalEntries<TNode, TJournalSpec> const & journalEntries, TPos const & pos);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(464)
+
+//____________________________________________________________________________
+// journalTreeToDot
+
+template <typename TStream, typename TNode> void journalTreeToDot(TStream & stream, unsigned & nextId, JournalEntries<TNode, UnbalancedTree> const & journalTree);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(687)
+
+//____________________________________________________________________________
+// journalTreeToDotRec
+
+template <typename TStream, typename TNode> void journalTreeToDotRec(TStream & stream, unsigned & nextId, TNode const & node);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(668)
+
+//____________________________________________________________________________
+// length
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline typename Size<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type length(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(452)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TJournalEntries> inline bool operator!=(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & a, Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & b);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(511)
+template <typename TJournalEntries> inline bool operator!=(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & a, typename IterComplementConst<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type const & b);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(521)
+template <typename TJournaledString, typename TJournalSpec> inline bool operator!=(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & a, Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & b);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(463)
+template <typename TJournaledString, typename TJournalSpec> inline bool operator!=(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & a, typename IterComplementConst<Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > >::Type const & b);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(473)
+
+//____________________________________________________________________________
+// operator*
+
+template <typename TJournaledString, typename TJournalSpec> inline typename Value<TJournaledString>::Type operator*(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(357)
+template <typename TJournaledString, typename TJournalSpec> inline typename Value<TJournaledString>::Type operator*(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & iterator);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(366)
+
+//____________________________________________________________________________
+// operator+
+
+template <typename TJournaledString, typename TJournalSpec> inline Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > operator+(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & iterator, typename Size<TJournaledString>::Type const & len);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(418)
+
+//____________________________________________________________________________
+// operator++
+
+template <typename TJournalEntries> inline Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & operator++(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(366)
+template <typename TJournalEntries> inline Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > operator++(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator, int );       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(412)
+template <typename TJournaledString, typename TJournalSpec> inline Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & operator++(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(319)
+template <typename TJournaledString, typename TJournalSpec> inline Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > operator++(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator, int );       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(346)
+
+//____________________________________________________________________________
+// operator+=
+
+template <typename TJournaledString, typename TJournalSpec> inline Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & operator+=(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator, typename Size<TJournaledString>::Type len);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(376)
+
+//____________________________________________________________________________
+// operator--
+
+template <typename TJournalEntries> inline Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & operator--(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(423)
+template <typename TJournalEntries> inline Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > operator--(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator, int );       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(479)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TStream, typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec> inline TStream & operator<<(TStream & stream, String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & s);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(237)
+template <typename TStream, typename TCargo> TStream & operator<<(TStream & stream, JournalEntriesUnorderedTreeNode<TCargo> const & node);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_node.h"(99)
+template <typename TStream, typename TPos, typename TSize> TStream & operator<<(TStream & stream, JournalEntry<TPos, TSize> const & entry);       	// "projects/library/seqan/sequence_journaled/journal_entry.h"(133)
+template <typename TStream, typename TNode> inline TStream & operator<<(TStream & stream, JournalEntries<TNode, SortedArray> const & tree);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(104)
+template <typename TStream, typename TNode> inline TStream & operator<<(TStream & stream, JournalEntries<TNode, UnbalancedTree> const & tree);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(234)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TJournalEntries> inline bool operator==(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & a, Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & b);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(491)
+template <typename TJournalEntries> inline bool operator==(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & a, typename IterComplementConst<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type const & b);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(501)
+template <typename TJournaledString, typename TJournalSpec> inline bool operator==(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & a, Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & b);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(430)
+template <typename TJournaledString, typename TJournalSpec> inline bool operator==(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & a, typename IterComplementConst<Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > >::Type const & b);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(452)
+
+//____________________________________________________________________________
+// recordErase
+
+template <typename TCargo> inline void recordErase(JournalEntries<TCargo, SortedArray> & tree, typename Position<TCargo>::Type const & pos, typename Position<TCargo>::Type const & posEnd);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(296)
+template <typename TCargo> inline void recordErase(JournalEntries<TCargo, UnbalancedTree> & tree, typename Position<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & pos, typename Position<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & posEnd);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(351)
+
+//____________________________________________________________________________
+// recordInsertion
+
+template <typename TCargo> inline void recordInsertion(JournalEntries<TCargo, SortedArray> & tree, typename Position<TCargo>::Type const & virtualPosition, typename Position<TCargo>::Type const & physicalBeginPos, typename Size<TCargo>::Type const & len);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(224)
+template <typename TCargo> inline void recordInsertion(JournalEntries<TCargo, UnbalancedTree> & tree, typename Position<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & virtualPos, typename Position<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & physicalBeginPos, typename Size<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type const & length);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(538)
+
+//____________________________________________________________________________
+// reinit
+
+template <typename TCargo> inline void reinit(JournalEntries<TCargo, SortedArray> & tree, typename Size<TCargo>::Type originalStringLength);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(176)
+template <typename TCargo> inline void reinit(JournalEntries<TCargo, UnbalancedTree> & tree, typename Size<typename JournalEntries<TCargo, UnbalancedTree>::TNode>::Type originalStringLength);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree.h"(245)
+
+//____________________________________________________________________________
+// setHost
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TSequence2> inline void setHost(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journaledString, TSequence2 & str);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(264)
+
+//____________________________________________________________________________
+// value
+
+template <typename TJournalEntries> inline typename Value<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type value(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(234)
+template <typename TJournalEntries> inline typename Value<Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > >::Type value(Iter<TJournalEntries, JournalEntriesIterSpec<UnbalancedTree> > const & iterator);       	// "projects/library/seqan/sequence_journaled/journal_entries_unbalanced_tree_iterator.h"(243)
+template <typename TJournaledString, typename TJournalSpec> inline typename Value<TJournaledString>::Type value(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & iterator);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(263)
+template <typename TJournaledString, typename TJournalSpec> inline typename Value<TJournaledString>::Type value(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator);       	// "projects/library/seqan/sequence_journaled/sequence_journaled_iterator.h"(277)
+
+//____________________________________________________________________________
+// virtualToHostPosition
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec, typename TPos> inline typename Position<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > >::Type virtualToHostPosition(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journaledString, TPos const & pos);       	// "projects/library/seqan/sequence_journaled/sequence_journaled.h"(497)
+template <typename TNode, typename TJournalSpec, typename TPos> inline typename Position<typename Cargo<TNode>::Type >::Type virtualToHostPosition(JournalEntries<TNode, TJournalSpec> const & journalEntries, TPos const & pos);       	// "projects/library/seqan/sequence_journaled/journal_entries_sorted_array.h"(423)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled_iterator.h b/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled_iterator.h
new file mode 100644
index 0000000..5ecdb7e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/sequence_journaled/sequence_journaled_iterator.h
@@ -0,0 +1,480 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Code for the Journaled string iterator.
+// ==========================================================================
+
+#ifndef SEQAN_SEQUENCE_JOURNAL_SEQUENCE_JOURNAL_ITERATOR_H_
+#define SEQAN_SEQUENCE_JOURNAL_SEQUENCE_JOURNAL_ITERATOR_H_
+
+namespace seqan {
+
+// ============================================================================
+// Tags, Classes
+// ============================================================================
+
+template <typename TJournaledStringSpec>
+struct JournaledStringIterSpec;
+
+template <typename TJournaledString, typename TJournalSpec>
+class Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> >
+{
+public:
+    typedef Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > TIterator;
+    typedef typename TJournaledString::TValue TValue;
+    typedef typename JournalType<TJournaledString>::Type TJournalEntries;
+    // We need a rooted iterator for iterating the journal tree since we need atEnd().
+    typedef typename Iterator<TJournalEntries, Rooted>::Type TJournalEntriesIterator;
+    typedef typename Host<TJournaledString>::Type THost;
+    typedef typename Iterator<THost, Standard>::Type THostIterator;
+    typedef typename InsertionBuffer<TJournaledString>::Type TInsertionBuffer;
+    typedef typename Iterator<TInsertionBuffer, Standard>::Type TInsertionBufferIterator;
+
+    // The journal string we iterate over.
+    TJournaledString * _journalStringPtr;
+    // Iterator over the segments in the journal tree.
+    TJournalEntriesIterator _journalEntriesIterator;
+    // Begin and end iterator in the host string of the journal string.
+    THostIterator _hostSegmentBegin;
+    THostIterator _hostSegmentEnd;
+    // Current iterator in the host segment.
+    THostIterator _currentHostIt;
+    // Begin and end iterator in the insertion buffer of the journal string.
+    TInsertionBufferIterator _insertionBufferSegmentBegin;
+    TInsertionBufferIterator _insertionBufferSegmentEnd;
+    // Current iterator in the insertion buffer.
+    TInsertionBufferIterator _currentInsertionBufferIt;
+
+    Iter() : _journalStringPtr(0) { SEQAN_CHECKPOINT; }
+
+    Iter(TIterator const & other)
+            : _journalStringPtr(other._journalStringPtr),
+              _journalEntriesIterator(other._journalEntriesIterator),
+              _hostSegmentBegin(other._hostSegmentBegin),
+              _hostSegmentEnd(other._hostSegmentEnd),
+              _currentHostIt(other._currentHostIt),
+              _insertionBufferSegmentBegin(other._insertionBufferSegmentBegin),
+              _insertionBufferSegmentEnd(other._insertionBufferSegmentEnd),
+              _currentInsertionBufferIt(other._currentInsertionBufferIt)
+    {
+        SEQAN_CHECKPOINT;
+    }
+
+    Iter(typename IterComplementConst<TIterator>::Type const & other)
+            : _journalStringPtr(other._journalStringPtr),
+              _journalEntriesIterator(other._journalEntriesIterator),
+              _hostSegmentBegin(other._hostSegmentBegin),
+              _hostSegmentEnd(other._hostSegmentEnd),
+              _currentHostIt(other._currentHostIt),
+              _insertionBufferSegmentBegin(other._insertionBufferSegmentBegin),
+              _insertionBufferSegmentEnd(other._insertionBufferSegmentEnd),
+              _currentInsertionBufferIt(other._currentInsertionBufferIt)
+    {
+        SEQAN_CHECKPOINT;
+    }
+
+    explicit
+    Iter(TJournaledString & journalString)
+    {
+        SEQAN_CHECKPOINT;
+        _initJournaledStringIterator(*this, journalString);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// For String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >
+
+///.Metafunction.Iterator.param.T:Spec.Journal String
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >, Standard>
+{
+    typedef Iter<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >, JournaledStringIterSpec<TJournalSpec> > Type;
+};
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+struct Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const, Standard>
+{
+    typedef Iter<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const, JournaledStringIterSpec<TJournalSpec> > Type;
+};
+
+// For Iter<TJournaledString, TJournaledStringIterSpec>
+template <typename TJournaledString, typename TJournaledStringIterSpec>
+struct GetValue<Iter<TJournaledString, JournaledStringIterSpec<TJournaledStringIterSpec> > >
+{
+    typedef typename GetValue<TJournaledString>::Type Type;
+};
+
+template <typename TJournaledString, typename TJournaledStringIterSpec>
+struct GetValue<Iter<TJournaledString, JournaledStringIterSpec<TJournaledStringIterSpec> > const>
+        : GetValue<Iter<TJournaledString, JournaledStringIterSpec<TJournaledStringIterSpec> > > {};
+
+template <typename TJournaledString, typename TJournaledStringIterSpec>
+struct Value<Iter<TJournaledString, JournaledStringIterSpec<TJournaledStringIterSpec> > >
+{
+    typedef typename Value<TJournaledString>::Type Type;
+};
+
+template <typename TJournaledString, typename TJournaledStringIterSpec>
+struct Value<Iter<TJournaledString, JournaledStringIterSpec<TJournaledStringIterSpec> > const>
+        : Value<Iter<TJournaledString, JournaledStringIterSpec<TJournaledStringIterSpec> > > {};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// For String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const, Standard>::Type
+begin(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journalString, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const, Standard>::Type TResult;
+    return TResult(journalString);
+}
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >, Standard>::Type
+begin(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journalString, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >, Standard>::Type TResult;
+    return TResult(journalString);
+}
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const, Standard>::Type
+end(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const & journalString, Standard)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > const, Standard>::Type TResult;
+    TResult result;
+    _initJournaledStringIteratorEnd(result, journalString);
+    return result;
+}
+
+template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBufferSpec>
+inline
+typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >, Standard>::Type
+end(String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> > & journalString, Standard const &)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Iterator<String<TValue, Journaled<THostSpec, TJournalSpec, TBufferSpec> >, Standard>::Type TResult;
+    TResult result;
+    _initJournaledStringIteratorEnd(result, journalString);
+    return result;
+}
+
+// For Iter<TJournaledString, JournaledStringIterSpec>
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+void
+_initJournaledStringIterator(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator,
+                           TJournaledString & journalString)
+{
+    SEQAN_CHECKPOINT;
+    iterator._journalStringPtr = &journalString;
+    iterator._journalEntriesIterator = begin(journalString._journalEntries);
+    // Update iterators on the segment.
+    _updateSegmentIterators(iterator);
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+void
+_initJournaledStringIteratorEnd(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator,
+                              TJournaledString & journalString)
+{
+    SEQAN_CHECKPOINT;
+    iterator._journalStringPtr = &journalString;
+    iterator._journalEntriesIterator = end(journalString._journalEntries);
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+void
+_updateSegmentIterators(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    if (atEnd(iterator._journalEntriesIterator))
+        return;
+    switch (value(iterator._journalEntriesIterator).segmentSource) {
+        case SOURCE_ORIGINAL:
+//             static_cast<int>(begin(host(*iterator._journalStringPtr), Standard()));
+//             static_cast<int>(host(*iterator._journalStringPtr));
+//             static_cast<int>(*iterator._journalStringPtr);
+//             static_cast<int>(iterator._journalStringPtr);
+//             static_cast<int>(iterator._hostSegmentBegin);
+            iterator._hostSegmentBegin = begin(host(*iterator._journalStringPtr), Standard()) + value(iterator._journalEntriesIterator).physicalPosition;
+            iterator._hostSegmentEnd = iterator._hostSegmentBegin + value(iterator._journalEntriesIterator).length;
+            iterator._currentHostIt = iterator._hostSegmentBegin;
+            break;
+        case SOURCE_PATCH:
+            iterator._insertionBufferSegmentBegin = begin(iterator._journalStringPtr->_insertionBuffer, Standard()) + value(iterator._journalEntriesIterator).physicalPosition;
+            iterator._insertionBufferSegmentEnd = iterator._insertionBufferSegmentBegin + value(iterator._journalEntriesIterator).length;
+            iterator._currentInsertionBufferIt = iterator._insertionBufferSegmentBegin;
+            break;
+        default:
+            SEQAN_ASSERT_FAIL("Invalid segment source!");
+    }
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+typename Value<TJournaledString>::Type
+value(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & iterator)
+{
+    SEQAN_CHECKPOINT;
+    if (value(iterator._journalEntriesIterator).segmentSource == SOURCE_ORIGINAL) {
+        return value(iterator._currentHostIt);
+    } else {
+        SEQAN_ASSERT_EQ(value(iterator._journalEntriesIterator).segmentSource, SOURCE_PATCH);
+        return value(iterator._currentInsertionBufferIt);
+    }
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+typename Value<TJournaledString>::Type
+value(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    if (value(iterator._journalEntriesIterator).segmentSource == SOURCE_ORIGINAL) {
+        return value(iterator._currentHostIt);
+    } else {
+        SEQAN_ASSERT_EQ(value(iterator._journalEntriesIterator).segmentSource, SOURCE_PATCH);
+        return value(iterator._currentInsertionBufferIt);
+    }
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+typename GetValue<Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > >::Type
+getValue(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & iterator)
+{
+    SEQAN_CHECKPOINT;
+    if (value(iterator._journalEntriesIterator).segmentSource == SOURCE_ORIGINAL) {
+        return getValue(iterator._currentHostIt);
+    } else {
+        SEQAN_ASSERT_EQ(value(iterator._journalEntriesIterator).segmentSource, SOURCE_PATCH);
+        return getValue(iterator._currentInsertionBufferIt);
+    }
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+typename GetValue<Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > >::Type
+getValue(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    if (value(iterator._journalEntriesIterator).segmentSource == SOURCE_ORIGINAL) {
+        return getValue(iterator._currentHostIt);
+    } else {
+        SEQAN_ASSERT_EQ(value(iterator._journalEntriesIterator).segmentSource, SOURCE_PATCH);
+        return getValue(iterator._currentInsertionBufferIt);
+    }
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > &
+operator++(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    switch (value(iterator._journalEntriesIterator).segmentSource) {
+        case SOURCE_ORIGINAL:
+            ++iterator._currentHostIt;
+            if (iterator._currentHostIt == iterator._hostSegmentEnd) {
+                ++iterator._journalEntriesIterator;
+                _updateSegmentIterators(iterator);
+            }
+            break;
+        case SOURCE_PATCH:
+            ++iterator._currentInsertionBufferIt;
+            if (iterator._currentInsertionBufferIt == iterator._insertionBufferSegmentEnd) {
+                ++iterator._journalEntriesIterator;
+                _updateSegmentIterators(iterator);
+            }
+            break;
+        default:
+            SEQAN_ASSERT_FAIL("Invalid segment source!");
+    }
+    return iterator;
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> >
+operator++(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator, int /*postfix*/)
+{
+    SEQAN_CHECKPOINT;
+    Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > temp(iterator);
+    ++iterator;
+    return temp;    
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+typename Value<TJournaledString>::Type
+operator*(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator)
+{
+    SEQAN_CHECKPOINT;
+    return value(iterator);
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+typename Value<TJournaledString>::Type
+operator*(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & iterator)
+{
+    SEQAN_CHECKPOINT;
+    return value(iterator);
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > &
+operator+=(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > & iterator,
+          typename Size<TJournaledString>::Type len)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename Size<TJournaledString>::Type TSize;
+    while (len > 0) {
+        TSize remaining;
+        switch (value(iterator._journalEntriesIterator).segmentSource) {
+            case SOURCE_ORIGINAL:
+                remaining = iterator._hostSegmentEnd - iterator._currentHostIt;
+                SEQAN_ASSERT_GT(remaining, 0u);
+                if (len >= remaining) {
+                    len -= remaining;
+                    ++iterator._journalEntriesIterator;
+                    _updateSegmentIterators(iterator);
+                } else {
+                    iterator._currentHostIt += len;
+                    len = 0;
+                }
+                break;
+            case SOURCE_PATCH:
+                remaining = iterator._insertionBufferSegmentEnd - iterator._currentInsertionBufferIt;
+                SEQAN_ASSERT_GT(remaining, 0u);
+                if (len >= remaining) {
+                    len -= remaining;
+                    ++iterator._journalEntriesIterator;
+                    _updateSegmentIterators(iterator);
+                } else {
+                    iterator._currentInsertionBufferIt += len;
+                    len = 0;
+                }
+                break;
+            default:
+                SEQAN_ASSERT_FAIL("Invalid segment source!");
+        }
+    }
+    return iterator;
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> >
+operator+(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & iterator,
+          typename Size<TJournaledString>::Type const & len)
+{
+    SEQAN_CHECKPOINT;
+    Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > temp(iterator);
+    temp += len;
+    return temp;
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+bool
+operator==(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & a,
+           Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & b)
+{
+    SEQAN_CHECKPOINT;
+    if (atEnd(a._journalEntriesIterator) && atEnd(b._journalEntriesIterator))
+        return true;
+    if (a._journalEntriesIterator != b._journalEntriesIterator)
+        return false;
+    if (value(a._journalEntriesIterator).segmentSource == SOURCE_ORIGINAL) {
+        if (a._currentHostIt != b._currentHostIt)
+            return false;
+    } else {
+        SEQAN_ASSERT_EQ(value(a._journalEntriesIterator).segmentSource, SOURCE_PATCH);
+        if (a._currentInsertionBufferIt != b._currentInsertionBufferIt)
+            return false;
+    }
+    return true;
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+bool
+operator==(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & a,
+           typename IterComplementConst<Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > >::Type const & b)
+{
+    SEQAN_CHECKPOINT;
+    typedef typename IterMakeConst<Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > >::Type TConstIter;
+    return static_cast<TConstIter>(a) == static_cast<TConstIter>(b);
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+bool
+operator!=(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & a,
+           Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & b)
+{
+    SEQAN_CHECKPOINT;
+    return !(a == b);
+}
+
+template <typename TJournaledString, typename TJournalSpec>
+inline
+bool
+operator!=(Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > const & a,
+           typename IterComplementConst<Iter<TJournaledString, JournaledStringIterSpec<TJournalSpec> > >::Type const & b)
+{
+    SEQAN_CHECKPOINT;
+    return !(a == b);
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_SEQUENCE_JOURNAL_SEQUENCE_JOURNAL_ITERATOR_H_
diff --git a/src/SeqAn-1.3/seqan/statistics.h b/src/SeqAn-1.3/seqan/statistics.h
new file mode 100644
index 0000000..e6aabc1
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/statistics.h
@@ -0,0 +1,53 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STATISTICS_H
+#define SEQAN_HEADER_STATISTICS_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <cmath>
+#include <seqan/align.h>
+#include <seqan/index.h>
+//____________________________________________________________________________
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+#include <seqan/statistics/statistics_generated_forwards.h>
+#endif
+
+#include <seqan/statistics/statistics_markov_model.h>
+#include <seqan/statistics/statistics_base.h>
+
+//____________________________________________________________________________
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/statistics/statistics_base.h b/src/SeqAn-1.3/seqan/statistics/statistics_base.h
new file mode 100644
index 0000000..5ad9ed3
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/statistics/statistics_base.h
@@ -0,0 +1,501 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_STATISTICS_STATISTICS_BASE_H_
+#define SEQAN_STATISTICS_STATISTICS_BASE_H_
+
+namespace seqan
+{
+
+template <typename TAlgorithm, typename TFloat, typename TAlphabet>
+void _numOccurrences(TFloat &nW, String<TAlphabet>& haystack, StringSet<String<TAlphabet> >& needle, TAlgorithm const &);
+
+/*
+.Function._zscore:
+..summary:Auxiliary function to compute the z-score index for a set of patterns w.r.t. a set of text strings and a MarkovModel
+..signature:template <TFloat,TStringSet,TAlphabet,TSpec,tTAlgorithm>_zscore(W,X,M, algorithmTag)
+..param.TFloat:The type of the exploited arrays.
+..param.TStringSet:A set of strings.
+..param.TAlphabet:The type of the alphabet.
+..param.TAlgorithm:The algorithm to exploit to compute the number of occurrences of patterns in the text strings.
+..param.W:The set of patterns.
+...type:Class.StringSet
+..param.X:The text strings.
+...type:Class.StringSet
+..param.M:The @MarkovModel@ object.
+...type:Class.MarkovModel
+..returns:The z-score for W w.r.t. X and M.
+..remarks:If the alphabet is Dna, then the suitable correction factors are computed.
+..include:seqan/statistics.h
+*/
+
+template <typename TAlgorithm, typename TFloat,  typename TStringSet, typename TAlphabet, typename TSpec>
+TFloat _zscore(TStringSet W,  TStringSet& X, MarkovModel<TAlphabet, TFloat, TSpec> & M, TAlgorithm const &)
+{
+
+
+	TFloat z_score=0;
+	TFloat nW=0;
+	//compute occurrances
+	for(unsigned int i=0; i< length(X); i++)
+	{
+		String<TAlphabet> temp = getValueById(X, i);
+		_numOccurrences(nW, temp, W, TAlgorithm());
+	}
+
+	//compute expectation
+	TFloat E = expectation(W, X, M);
+//std::cout<<"\nE:"<<E;
+	//compute variance
+	TFloat V = _computeVariance(W, X, M, E);
+//std::cout<<"\nV:"<<V;
+	//compute z-score
+	z_score=(nW-E)/sqrt(V);
+
+	return z_score;
+
+}
+
+/*
+.Function._numOccurrences:
+..summary:Auxiliary function to compute the number of occurrences of a set of patterns in a set of text strings
+..signature:template <tTAlgorithm,TFloat,TAlphabet,TStringSet>_numOccurrences(W,haystack,needle)
+..param.TAlgorithm:The algorithm to exploit to compute the number of occurrences of patterns in the text strings.
+..param.TFloat:The type of the exploited arrays.
+..param.TAlphabet:The type of the alphabet.
+..param.TStringSet:A set of strings.
+..param.W:The set of patterns.
+...type:Class.StringSet
+..param.haystack:The text strings.
+...type:Metafunction.Haystack
+..param.needle:The sequence that is searched in the @Metafunction.Haystack at .
+..include:seqan/statistics.h
+*/
+
+//Fixed to  AhoCorasick in original code, reason???
+template <typename TAlgorithm, typename TFloat, typename TAlphabet>
+void _numOccurrences(TFloat &nW, String<TAlphabet> &haystack, StringSet<String<TAlphabet> > &needle, TAlgorithm const &)
+{
+	SEQAN_CHECKPOINT;
+	Finder<String<TAlphabet> > finder(haystack);
+	Pattern<StringSet<String<TAlphabet> >, TAlgorithm> pattern(needle);
+	while (find(finder, pattern))
+	{
+		nW++;
+	}
+}
+
+
+/*
+.Function._computeExpectation:
+..summary:Auxiliary function to compute the expectation for a set of patterns w.r.t. a text string  and a MarkovModel
+..signature:template <TAlphabet,TFloat,TSpec,TStringSet>_computeExpectation(mm,W,n)
+..param.TAlphabet:The type of the alphabet.
+..param.TFloat:The type of the exploited arrays.
+..param.TStringSet:A set of strings.
+..param.mm:The @MarkovModel@ object.
+...type:Class.MarkovModel
+..param.W:The set of patterns.
+...type:Class.StringSet
+..param.n:The length of the string.
+...type:nolink:unsigned int
+
+..returns:The expectation for W w.r.t. a string and M.
+..include:seqan/statistics.h
+*/
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+TFloat _computeExpectation(MarkovModel<TAlphabet, TFloat, TSpec> &mm,
+					 StringSet<String<TAlphabet> > &W, unsigned int n)
+{
+	TFloat E=0;
+	for (unsigned int i=0; i<length(W); i++){
+		String<TAlphabet> temp = getValueById(W, i);
+		E += (n - length(temp) + 1)*mm.emittedProbability(temp);
+	}
+	return E;
+}
+
+
+/*
+.Function._computevariance:
+..summary:Auxiliary function to compute the variance for a set of patterns w.r.t. a set of text strings and a MarkovModel
+..signature:template <TFloat,TStringSet,TAlphabet,TSpec>_computevariance(W,X,M)
+..param.TFloat:The type of the exploited arrays.
+..param.TStringSet:A set of strings.
+..param.TAlphabet:The type of the alphabet.
+..param.W:The set of patterns.
+...type:nolink:TStringSet
+..param.X:The text strings.
+...type:nolink:TStringSet
+..param.M:The @MarkovModel@ object.
+...type:Class.MarkovModel
+..returns:The variance for W w.r.t. X and M.
+..remarks:If the alphabet is Dna, then the suitable correction factors are computed.
+..include:seqan/statistics.h
+*/
+
+template <typename TFloat, typename TAlphabet, typename TSpec>
+TFloat _computeVariance( StringSet<String<TAlphabet> > W,  StringSet<String<TAlphabet> > &X, MarkovModel<TAlphabet, TFloat, TSpec> &M, TFloat &E)
+{
+	//V=B+2C-E^2
+	TFloat V = E;
+
+	//C=D+A
+
+	//compute A and D
+
+	TFloat A = 0;
+	TFloat D = 0;
+	TFloat tmpA, eQPPPe, eQPPQPPe;
+	unsigned int sizeW=length(W);
+	unsigned int n;
+
+	String <TFloat> pStar;
+	resize(pStar, sizeW, 0);
+
+	Shape<TAlphabet, SimpleShape> orderShape;
+	resize(orderShape, M.order);
+
+	for(unsigned int j=0; j<sizeW; j++){
+		String<TAlphabet> string =getValueById(W, j);
+
+		int row = hash(orderShape,begin(string));
+		TFloat p = 1;
+		for(unsigned int i=1; i<length(string)-M.order+1; i++)
+		{
+			int column=hash(orderShape,begin(string)+i);
+			p*=value(M.transition,row,column);
+			row = column;
+		}
+		value(pStar, j) = p;
+	}
+
+
+
+	for(unsigned int z=0; z<length(X); z++){
+
+	  for(unsigned int i=0; i<length(X); i++){
+
+	 	n = length(getValueById(X, i));
+
+		 for(unsigned int j=0; j<sizeW; j++){
+
+			String<TAlphabet> Wj =getValueById(W, j);
+
+			TFloat q = (TFloat) (n-(2*length(Wj))+2);
+
+			for(unsigned int k=0; k<sizeW; k++){
+
+				tmpA=value(pStar,j)*value(pStar,k);
+
+				unsigned int jfirst, jlast, kfirst;
+
+				jfirst = hash(orderShape,begin(Wj));
+
+				jlast = hash(orderShape,end(Wj)-M.order);
+
+				kfirst = hash(orderShape,begin(getValueById(W, k)));
+
+				eQPPPe = value(M._qppp, jlast,kfirst);
+
+				eQPPQPPe = value(M._qppqpp, jlast,kfirst);
+
+				tmpA  *= value(M.stationaryDistribution, jfirst) * ((q*(q+1)/2)* value(M.stationaryDistribution, kfirst) - (q-1)*eQPPPe - eQPPQPPe);
+
+				A += tmpA;
+			}
+		 }
+	  }
+
+	  // Compute D
+	  D+= _overlapExpectation(W,M,length(getValueById(X, z)));
+	}
+
+
+
+
+	//Compute Variance
+	V += (2*A) + (2*D) -  std::pow((double) E, (int) 2);
+
+	//return V;
+	return V;
+}
+
+
+/*
+.Function._overlapExpectation:
+..summary:Auxiliary function necessary when correction factors have to be computed
+..signature:template <TFloat,TStringSet,TAlphabet,TSpec>_overlapExpectation(W,X,M)
+..param.TFloat:The type of the exploited arrays.
+..param.TStringSet:A set of strings.
+..param.TAlphabet:The type of the alphabet.
+..param.W:The set of patterns.
+...type:Class.StringSet
+..param.X:The text strings.
+...type:Class.StringSet
+..param.M:The @MarkovModel@ object.
+...type:Class.MarkovModel
+..returns:A value of overlapping for the expectation.
+..include:seqan/statistics.h
+*/
+
+template <typename TFloat, typename TAlphabet, typename TSpec>
+TFloat _overlapExpectation(StringSet<String<TAlphabet> > W, MarkovModel<TAlphabet, TFloat, TSpec> &M, unsigned int n)
+{
+	TFloat E_overlap = 0;
+	unsigned int sizeW = length(W);
+	for(unsigned int i=0; i<sizeW; i++)
+	{
+		String<TAlphabet> patt1 = getValueById(W, i);
+		unsigned int size1 = length(patt1);
+		for(unsigned int j=0; j<sizeW; j++)
+		{
+			String<TAlphabet> patt2 = getValueById(W, j);
+			unsigned int k=1;
+			unsigned int size2 = length(patt2);
+			if(size1>size2)
+			{
+				k = size1 - size2 + 1;
+			}
+			for(; k<size1; k++)
+			{
+				if(isEqual(infix(patt1,begin(patt1)+k,end(patt1)),infix(patt2,begin(patt2),begin(patt2)+k-1)))
+				{
+					String<TAlphabet> temp = infix(patt1, begin(patt1),begin(patt1)+k-1);
+					append(temp,infix(patt2,begin(patt2),end(patt2)));
+					E_overlap += (n - size1 + 1)*M.emittedProbability(temp);
+				}
+			}
+		}
+	}
+	return E_overlap;
+}
+
+/*
+.Function._addReveseComplements:
+..summary:Computes the reverse complements of a set of strings in input.
+..signature:<TStringSet> void _addReveseComplements(needle)
+..param.needle:The sequence to be computed the reverse complement.
+..include:seqan/statistics.h
+*/
+
+template <typename TAlphabet>
+void _addReveseComplements(StringSet<String<TAlphabet> > &stringSet)
+{
+	unsigned int num= length(stringSet);
+
+	for(unsigned int i=0; i< num; i++){
+  	     DnaStringReverseComplement mycom(getValueById(stringSet, i));
+		 appendValue(stringSet, mycom);
+	}
+}
+
+
+///////////////////////////////////////////////////////////////////////
+// Extern functions to be provided by SeqAn
+///////////////////////////////////////////////////////////////////////
+
+typedef Dna TDnaAlphabet;
+typedef String<TDnaAlphabet> TDnaSequence;
+
+/**
+.Function.zscore:
+..summary:Computes the z-score index for a set of patterns w.r.t. a set of text strings and a MarkovModel
+..signature:zscore(W, X, M, algorithmTag)
+..param.W:The set of patterns.
+...type:Class.StringSet
+..param.X:The set of text strings.
+...type:Class.StringSet
+..param.M:The MarkovModel object.
+...type:Class.MarkovModel
+..param.algorithmTag:The algorithm to exploit to compute the number of occurrences of patterns in the text strings (see @Spec.AhoCorasick@ etc.).
+..returns:The z-score for W w.r.t. X and M.
+..remarks:If the alphabet is Dna, then the suitable correction factors are computed.
+..include:seqan/statistics.h
+*/
+
+template <typename TAlgorithm, typename TFloat, typename TSpec, typename TStringSet, typename TAlphabet>
+TFloat zscore(TStringSet W,  TStringSet &X, MarkovModel<TAlphabet, TFloat, TSpec> &M, TAlgorithm const & algorithmTag)
+{
+	ensureAuxMatrices(M);
+   	return _zscore(W,X,M, algorithmTag);
+}
+
+template <typename TAlgorithm, typename TFloat, typename TSpec, typename TDnaSequence>
+TFloat zscore(StringSet<TDnaSequence> W,  StringSet<TDnaSequence> &X, MarkovModel<Dna, TFloat, TSpec> &M, TAlgorithm const &)
+{
+   //add-reverse complements
+   _addReveseComplements(W);
+
+	ensureAuxMatrices(M);
+
+   TFloat z_score=0;
+   TFloat nW=0;
+   //compute occurrences
+   for(unsigned int i=0; i < length(X); i++)
+   {
+		 String<Dna> temp = getValueById(X, i);
+		_numOccurrences(nW, temp, W, TAlgorithm());
+	}
+
+	//compute expectation
+	TFloat E = expectation(W, X, M);
+	//std::cout<<"\nE: "<<E<<"\n";
+	//compute variance
+	TFloat V = _computeVariance(W, X, M, E);
+	//std::cout<<"\nV: "<<V<<"\n";
+	//compute correction factor
+	TFloat correction = 0;
+
+	unsigned int n;
+	unsigned int sizeW= length(W);
+
+	for(unsigned int j=0; j<length(X); j++){
+
+	 	n = length(getValueById(X, j));
+
+		for(unsigned int i=0; i<sizeW; i++)
+		{
+			String<Dna> patt = getValueById(W, i);
+			DnaStringReverseComplement revpatt(patt);
+			String<Dna> revc= revpatt;
+			if (isEqual(patt,revc))
+			{
+				correction += (n-length(patt)+1)*M.emittedProbability(revc);
+			}
+		}
+	}
+
+	V+= correction;
+
+	//compute z-score
+	z_score=(nW-E)/sqrt(V);
+	//std::cout<<"\nnW: "<<nW<<"\n";
+	//std::cout<<"\nZ: "<<z_score<<"\n";
+	return z_score;
+}
+
+
+/**
+.Function.variance:
+..summary:Computes the variance for a set of patterns w.r.t. a set of text strings and a MarkovModel
+..signature:variance(W,X,M)
+..param.W:The set of patterns.
+...type:Class.StringSet
+..param.X:The set of text strings.
+...type:Class.StringSet
+..param.M:The MarkovModel object.
+...type:Class.MarkovModel
+..returns:The variance for W w.r.t. X and M.
+..remarks:If the alphabet is Dna, then the suitable correction factors are computed.
+..include:seqan/statistics.h
+*/
+
+template <typename TFloat, typename TAlphabet, typename TSpec>
+TFloat variance(StringSet<String<TAlphabet> > &W, StringSet<String<TAlphabet> >& X, MarkovModel<TAlphabet, TFloat, TSpec> & M)
+{
+   TFloat E = expectation(W, X, M);
+
+   return _computeVariance(W,X,M,E);
+}
+
+//Special case for DNA sequences, reverse complement sequences are added
+template <typename TFloat, typename TSpec>
+TFloat variance(StringSet<String<Dna> > W, StringSet<String<Dna> > &X, MarkovModel<Dna, TFloat, TSpec> & M)
+{
+
+   //add-reverse complements
+	_addReveseComplements(W);
+
+	TFloat E = expectation(W, X, M);
+
+	TFloat var =  _computeVariance(W,X,M,E);
+
+	//compute correction factor
+	TFloat correction = 0;
+
+	unsigned int n;
+	unsigned int sizeW= length(W);
+
+
+   for(unsigned int j=0; j<length(X); j++){
+
+	 	n = length(getValueById(X, j));
+
+		for(unsigned int i=0; i<sizeW; i++)
+		{
+			String<Dna> patt = getValueById(W, i);
+			DnaStringReverseComplement revpatt(patt);
+			String<Dna> revc= revpatt;
+			if (isEqual(patt,revc))
+			{
+				correction += (n-length(patt)+1)*M.emittedProbability(revc);
+			}
+		}
+	}
+	var+=correction;
+
+  return var;
+}
+
+/**
+.Function.expectation:
+..summary:Computes the expectation for a set of patterns w.r.t. a set of text strings and a MarkovModel
+..signature:expectation(W,X,M)
+..param.W:The set of patterns.
+...type:Class.StringSet
+..param.X:The set of text strings.
+...type:Class.StringSet
+..param.M:The MarkovModel object.
+...type:Class.MarkovModel
+..returns:The expectation for W w.r.t. X and M.
+..include:seqan/statistics.h
+*/
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+TFloat expectation(StringSet<String<TAlphabet> > & W, StringSet<String<TAlphabet> > &X, MarkovModel<TAlphabet, TFloat, TSpec> &M)
+{
+	unsigned int n;
+	TFloat E = 0;
+
+	for(unsigned int i=0; i<length(X); i++){
+	 	n = length(getValueById(X, i));
+        E += _computeExpectation(M, W, n);
+	}
+
+    return E;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef SEQAN_STATISTICS_STATISTICS_BASE_H_
diff --git a/src/SeqAn-1.3/seqan/statistics/statistics_generated_forwards.h b/src/SeqAn-1.3/seqan/statistics/statistics_generated_forwards.h
new file mode 100644
index 0000000..fe7491c
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/statistics/statistics_generated_forwards.h
@@ -0,0 +1,182 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_STATISTICS_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_STATISTICS_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// MarkovModel
+
+template <typename TAlphabet, typename TFloat , typename TSpec > class MarkovModel;       	// "projects/library/seqan/statistics/statistics_markov_model.h"(120)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// TDnaAlphabet
+
+typedef Dna TDnaAlphabet;       	// "projects/library/seqan/statistics/statistics_base.h"(328)
+
+//____________________________________________________________________________
+// TDnaSequence
+
+typedef String<TDnaAlphabet> TDnaSequence;       	// "projects/library/seqan/statistics/statistics_base.h"(329)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _addReveseComplements
+
+template <typename TAlphabet> void _addReveseComplements(StringSet<String<TAlphabet> > &stringSet);       	// "projects/library/seqan/statistics/statistics_base.h"(314)
+
+//____________________________________________________________________________
+// _computeExpectation
+
+template <typename TAlphabet, typename TFloat, typename TSpec> TFloat _computeExpectation(MarkovModel<TAlphabet, TFloat, TSpec> &mm, StringSet<String<TAlphabet> > &W, unsigned int n);       	// "projects/library/seqan/statistics/statistics_base.h"(139)
+
+//____________________________________________________________________________
+// _computeInverseMatrix
+
+template <typename TValue> Matrix<TValue,2> _computeInverseMatrix(Matrix<TValue,2> &matrix);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(547)
+
+//____________________________________________________________________________
+// _computeVariance
+
+template <typename TFloat, typename TAlphabet, typename TSpec> TFloat _computeVariance( StringSet<String<TAlphabet> > W, StringSet<String<TAlphabet> > &X, MarkovModel<TAlphabet, TFloat, TSpec> &M, TFloat &E);       	// "projects/library/seqan/statistics/statistics_base.h"(169)
+
+//____________________________________________________________________________
+// _lubksb
+
+template <typename TValue> void _lubksb(Matrix<TValue,2> &a, String<TValue> &indx, String<TValue> &b);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(692)
+
+//____________________________________________________________________________
+// _ludcmp
+
+template <typename TValue> String<TValue> _ludcmp(Matrix<TValue,2> &result);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(599)
+
+//____________________________________________________________________________
+// _numOccurrences
+
+template <typename TAlgorithm, typename TFloat, typename TAlphabet> void _numOccurrences(TFloat &nW, String<TAlphabet> &haystack, StringSet<String<TAlphabet> > &needle, TAlgorithm const &);       	// "projects/library/seqan/statistics/statistics_base.h"(107)
+
+//____________________________________________________________________________
+// _overlapExpectation
+
+template <typename TFloat, typename TAlphabet, typename TSpec> TFloat _overlapExpectation(StringSet<String<TAlphabet> > W, MarkovModel<TAlphabet, TFloat, TSpec> &M, unsigned int n);       	// "projects/library/seqan/statistics/statistics_base.h"(274)
+
+//____________________________________________________________________________
+// _zscore
+
+template <typename TAlgorithm, typename TFloat, typename TStringSet, typename TAlphabet, typename TSpec> TFloat _zscore(TStringSet W, TStringSet& X, MarkovModel<TAlphabet, TFloat, TSpec> & M, TAlgorithm const &);       	// "projects/library/seqan/statistics/statistics_base.h"(63)
+
+//____________________________________________________________________________
+// buildMarkovModel
+
+template <typename TAlphabet, typename TFloat, typename TSpec> void buildMarkovModel(MarkovModel<TAlphabet, TFloat, TSpec> &mm, StringSet<String<TAlphabet > > &stringSet);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(738)
+template <typename TAlphabet, typename TFloat, typename TSpec> void buildMarkovModel(MarkovModel<TAlphabet, TFloat, TSpec> &mm, StringSet<String<TAlphabet > > const &stringSet);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(747)
+
+//____________________________________________________________________________
+// emittedProbability
+
+template <typename TAlphabet, typename TFloat, typename TSpec> TFloat emittedProbability(MarkovModel<TAlphabet, TFloat, TSpec> & mm, StringSet<String<TAlphabet > > & stringSet);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(778)
+template <typename TAlphabet, typename TFloat, typename TSpec> TFloat emittedProbability(MarkovModel<TAlphabet, TFloat, TSpec> & mm, String<TAlphabet> &string);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(785)
+template <typename TAlphabet, typename TFloat, typename TSpec, typename TString, typename TSetSpec> TFloat emittedProbability(MarkovModel<TAlphabet, TFloat, TSpec> & mm, StringSet<TString, TSetSpec> const &stringSet);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(793)
+template <typename TAlphabet, typename TFloat, typename TSpec, typename TString> TFloat emittedProbability(MarkovModel<TAlphabet, TFloat, TSpec> & mm, TString const &string);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(800)
+
+//____________________________________________________________________________
+// ensureAuxMatrices
+
+template <typename TAlphabet, typename TFloat, typename TSpec> void ensureAuxMatrices(MarkovModel<TAlphabet, TFloat, TSpec> & mm );       	// "projects/library/seqan/statistics/statistics_markov_model.h"(824)
+
+//____________________________________________________________________________
+// expectation
+
+template <typename TAlphabet, typename TFloat, typename TSpec> TFloat expectation(StringSet<String<TAlphabet> > & W, StringSet<String<TAlphabet> > &X, MarkovModel<TAlphabet, TFloat, TSpec> &M);       	// "projects/library/seqan/statistics/statistics_base.h"(487)
+
+//____________________________________________________________________________
+// read
+
+template <typename TAlphabet, typename TFloat, typename TSpec> void read(FILE *file, MarkovModel<TAlphabet, TFloat, TSpec> & mm );       	// "projects/library/seqan/statistics/statistics_markov_model.h"(818)
+
+//____________________________________________________________________________
+// setMarkovModel
+
+template <typename TAlphabet, typename TFloat, typename TSpec> void setMarkovModel(MarkovModel<TAlphabet, TFloat, TSpec> & mm, Matrix<TFloat,2> &iTransition);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(759)
+template <typename TAlphabet, typename TFloat, typename TSpec> void setMarkovModel(MarkovModel<TAlphabet, TFloat, TSpec> & mm, Matrix<TFloat,2> &iTransition, String<TFloat> &iStationaryDistribution);       	// "projects/library/seqan/statistics/statistics_markov_model.h"(769)
+
+//____________________________________________________________________________
+// variance
+
+template <typename TFloat, typename TAlphabet, typename TSpec> TFloat variance(StringSet<String<TAlphabet> > &W, StringSet<String<TAlphabet> >& X, MarkovModel<TAlphabet, TFloat, TSpec> & M);       	// "projects/library/seqan/statistics/statistics_base.h"(426)
+template <typename TFloat, typename TSpec> TFloat variance(StringSet<String<Dna> > W, StringSet<String<Dna> > &X, MarkovModel<Dna, TFloat, TSpec> & M);       	// "projects/library/seqan/statistics/statistics_base.h"(435)
+
+//____________________________________________________________________________
+// write
+
+template <typename TAlphabet, typename TFloat, typename TSpec> void write(FILE *file, MarkovModel<TAlphabet, TFloat, TSpec> & mm );       	// "projects/library/seqan/statistics/statistics_markov_model.h"(809)
+
+//____________________________________________________________________________
+// zscore
+
+template <typename TAlgorithm, typename TFloat, typename TSpec, typename TStringSet, typename TAlphabet> TFloat zscore(TStringSet W, TStringSet &X, MarkovModel<TAlphabet, TFloat, TSpec> &M, TAlgorithm const & algorithmTag);       	// "projects/library/seqan/statistics/statistics_base.h"(349)
+template <typename TAlgorithm, typename TFloat, typename TSpec, typename TDnaSequence> TFloat zscore(StringSet<TDnaSequence> W, StringSet<TDnaSequence> &X, MarkovModel<Dna, TFloat, TSpec> &M, TAlgorithm const &);       	// "projects/library/seqan/statistics/statistics_base.h"(356)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/statistics/statistics_markov_model.h b/src/SeqAn-1.3/seqan/statistics/statistics_markov_model.h
new file mode 100644
index 0000000..6b528b2
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/statistics/statistics_markov_model.h
@@ -0,0 +1,834 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Author: utro at math.unipa.it
+// Author: srombo at deis.unical.it
+// Author: Jonathan Göke
+// ==========================================================================
+
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef SEQAN_STATISTICS_STATISTICS_MARKOV_MODEL_H_
+#define SEQAN_STATISTICS_STATISTICS_MARKOV_MODEL_H_
+
+#include <seqan/align.h>
+#include <seqan/index.h>
+
+namespace seqan {
+
+/*
+with matrix calss matrices
+*/
+/**
+.Class.MarkovModel:
+..summary:Gives a suitable representation of a Marcov Chain.
+..cat:MarkovModel
+..signature:MarkovModel<TAlphabet[, TFloat, TSpec]>
+..param.TAlphabet:The alphabet type
+..param.TFloat:The type of the exploited arrays
+..param.TSpec:The MarkovModel type
+.Memvar.MarkovModel#order:
+..class:Class.MarkovModel
+..summary:The MarkovModel order
+..type:nolink:int
+.Memvar.MarkovModel#transition
+..class:Class.MarkovModel
+..summary:The transition matrix.
+..type:Class.Matrix
+.Memvar.MarkovModel#stationaryDistribution
+..class:Class.MarkovModel
+..summary:The vector of character distribution
+..type:Class.String
+.Memfunc.MarkovModel#MarkovModel
+..class:Class.MarkovModel
+..summary:Constructor
+..signature:MarkovModel(order_)
+..param.order_:The order of the MarkovModel.
+.Memfunc.MarkovModel#build:
+..class:Class.MarkovModel
+..summary:Given a training set, computes the transition matrix, the character stationary distributions and the auxiliary information that give raise to an instance of MarkovModel
+..signature:build(strings)
+..param.strings:The training set.
+...type:Class.StringSet
+
+.Memfunc.MarkovModel#set:
+..class:Class.MarkovModel
+..summary: Given e transition matrix, sets it as transition matrix of the MarkovModel and computes (if it is not available) the  vector of character distributions and the auxiliary information
+..signature:set(iTransition)
+..signature:set(iTransition, iStationaryDistribution)
+..param.iTransition:The transition matrix.
+...type:Class.Matrix
+..param.iStationaryDistribution:The vector of character distributions.
+...type:Class.String
+
+.Memfunc.MarkovModel#emittedProbability:
+..class:Class.MarkovModel
+..summary:Computes the probability that a string (or a set of strings) is emitted by the MarkovModel.
+..signature:emittedProbability(string)
+..signature:emittedProbability(stringSet)
+..param.string:The string whose emission probability has to be computed.
+...type:Class.String
+..param.stringSet:The set of strings whose emission probability has to be computed.
+...type:Class.StringSet
+..returns:A TFloat representing the emission probability.
+
+.Memfunc.MarkovModel#write:
+..class:Class.MarkovModel
+..summary: Stores an instance of MarkovModel on a file
+..signature:write(file)
+..param.file:The file on which storing the MarkovModel.
+
+.Memfunc.MarkovModel#read:
+..class:Class.MarkovModel
+..summary: Loads an instance of MarkovModel from a file
+..signature:read(file)
+..param.file:The file from which loading the MarkovModel.
+..include:seqan/statistics.h
+*/
+template <typename TAlphabet, typename TFloat = double, typename TSpec = Default>
+class MarkovModel
+{
+
+public:
+
+	//Definition of matrix types, could be set to two dimensional as soon as implemented
+	typedef Matrix<TFloat, 2> TMatrix;
+	//typedef String<TFloat> TMatrix;
+	typedef String<TFloat> TVector;
+
+	unsigned int order;
+	TMatrix transition;
+	TVector stationaryDistribution;
+	//The following matrices are only for internal use of the class
+	TMatrix _q;			//QPP^(morder-1)
+	TMatrix _qppp;		//QPP^(morder-1)
+	TMatrix _qppqpp;	//QPPQP^(morder-1)
+
+
+	MarkovModel(unsigned int order_):
+	order(order_)
+	{
+
+		unsigned int const alphabet_size = ValueSize<TAlphabet>::VALUE;
+		//unsigned int const column_size = (unsigned int) std::pow((double) alphabet_size, (int) order);
+		unsigned int column_size = (unsigned int) std::pow((double) alphabet_size, (int) order);
+
+		//Special case of order 0 marko model:
+		//A Bernoulli scheme is a special case of a Markov chain where the transition probability matrix has identical rows, which means that the next state is even independent of the current state (in addition to being independent of the past states).
+		if(order==0)
+		{
+			column_size=alphabet_size;
+
+		}
+		//resize the matrix
+		setLength(transition, 0, column_size);
+		setLength(transition, 1, column_size);
+
+		resize(transition,(TFloat) 0);
+
+		clear(stationaryDistribution);
+		resize(stationaryDistribution, column_size);
+	}
+
+
+	///////////////////////////////////////////////////////////////
+	///// BUILD THE MODEL
+	///////////////////////////////////////////////////////////////
+	typedef String<Dna> TText;
+	typedef Size<TText>::Type TSize;
+	typedef StringSet<TText > TStringSet;
+
+	//template <typename TAlphabet>
+	void build(StringSet<String<TAlphabet> > const &strings)
+	{
+
+		typedef String<TAlphabet> TText;
+		//typedef Size<TText>::Type TSize;
+		typedef StringSet<TText > TStringSet;
+
+		typedef Index<TStringSet, IndexQGram<SimpleShape> > TIndex;
+		typedef typename Fibre<TIndex, QGramDir>::Type TDir;
+		typedef typename Iterator<TDir, Standard>::Type TIter;
+		unsigned int const alphabet_size = ValueSize<TAlphabet>::VALUE;
+		//unsigned int const column_size = (unsigned int) std::pow((double) alphabet_size, (int) order);
+		unsigned int column_size = (unsigned int) std::pow((double) alphabet_size, (int) order);
+
+		//Special case of order 0 marko model:
+		//A Bernoulli scheme is a special case of a Markov chain where the transition probability matrix has identical rows, which means that the next state is even independent of the current state (in addition to being independent of the past states).
+		if(order==0)
+		{
+			column_size=alphabet_size;
+
+		}
+
+		TIndex ind(strings);
+		resize(indexShape(ind), order + 1);
+		indexRequire(ind, QGramSADir());
+
+		TIter itBegin = begin(indexDir(ind), Standard());
+		TIter itEnd = end(indexDir(ind), Standard()) - 1;
+
+		//Frequency of all q-grams for a markov model of order q-1 to calculate transition probabilitiesof (q-1) gram to next (q-1)gram
+		String<TAlphabet> qgram;
+		Shape<TAlphabet, SimpleShape> orderShape;
+		resize(orderShape, order);
+		if(order==0)
+		{
+			resize(orderShape, order+1);
+		}
+
+		//count transition of sequences according to model order
+		for(TIter itA = itBegin; itA != itEnd; ++itA)
+		{
+			unhash(qgram, itA - itBegin, weight(indexShape(ind)));
+			//std::cout<<"\n"<<qgram<<"\n"<<(*(itA+1) - *itA)<<"\n"<<hash(orderShape, begin(qgram));
+			//old for the array: value(transition, hash(orderShape, begin(qgram)) * column_size + hash(orderShape, begin(qgram) + 1)) = *(itA+1) - *itA;
+
+			if(order==0)
+			{
+				for(unsigned int row=0;row<column_size;++row)
+				{
+					value(transition, row,hash(orderShape, begin(qgram))) = *(itA+1) - *itA;
+
+				}
+			}
+			else
+			{
+				//new for the matrix
+				value(transition, hash(orderShape, begin(qgram)),hash(orderShape, begin(qgram) + 1)) = *(itA+1) - *itA;
+
+			}
+		}
+		//std::cout<<"\n"<<transition<<"\n\n";
+
+		//normalization, rows have to sum up to 1
+		for(unsigned int row = 0; row < column_size;++row)
+		{
+			TFloat sum = 0;
+			for(unsigned int col = 0; col < column_size;++col)
+			{
+				sum += value(transition, row,col);	//sum of the rows
+			}
+			if (sum != 0)
+			{
+				for(unsigned int col = 0; col < column_size;++col)
+				{
+					value(transition, row, col) /= sum;	//normalize by dividing by sum of rows
+				}
+			}
+		}
+//std::cout<<transition<<"\n\n";
+		//Special case of order 0 marko model:
+		//A Bernoulli scheme is a special case of a Markov chain where the transition probability matrix has identical rows, which means that the next state is even independent of the current state (in addition to being independent of the past states).
+		if(order==0)
+		{
+			order=1;
+		}
+		//----Calculation of stationary Distribution-----
+		TMatrix temp = transition;
+		//initialise a variable t representing a good threshold to estimate the vector
+		//after multiplying t times the transition matrix with itself
+		unsigned int t=6;
+		for (unsigned int i=0; i<t; i++)
+		{
+			temp=temp*temp;
+		}
+
+		for (unsigned int i=0; i<column_size; i++){
+			value(stationaryDistribution,i)=value(temp, 0,i);
+
+		}
+		//std::cout<<temp<<"\n\n";
+
+		//for(unsigned int i=0;i<length(stationaryDistribution);++i){std::cout<<stationaryDistribution[i]<<"\t";}
+		//!is commented since I dont use it and it makes everything very slow for k>3 or 4 
+		//!call ensureAuxMatrices(markovModel);
+		//_computeAuxiliaryMatrices();
+
+
+	}
+
+
+	///////////////////////////////////////////////////////////////
+	///// EMITTEDPROBABILITY
+	///////////////////////////////////////////////////////////////
+
+
+	template <typename TString, typename TSetSpec>
+	TFloat emittedProbability(StringSet<TString, TSetSpec > const &stringSet)
+	{
+		TFloat p = 0;
+
+		for(unsigned int i=0; i<length(stringSet); i++)
+		{
+			p+= emittedProbability(stringSet[i]);
+		}
+
+		return p;
+	}
+
+	template <typename TString>
+    TFloat emittedProbability(TString const &string)
+	{
+		Shape<TAlphabet, SimpleShape> orderShape;
+		resize(orderShape, order);
+
+		int row = hash(orderShape,begin(string));
+		TFloat p = value(stationaryDistribution,row);
+
+		for(unsigned int i=1; i<(length(string)-order+1); i++)
+		{
+			int column=hash(orderShape,begin(string)+i);
+			p*=value(transition,row,column);
+
+			row = column;
+		}
+
+		return p;
+	}
+
+
+	///////////////////////////////////////////////////////////////
+	///// SET THE MODEL
+	///////////////////////////////////////////////////////////////
+
+
+	void set(Matrix<TFloat,2> &iTransition)
+	{
+		unsigned int const alphabet_size = ValueSize<TAlphabet>::VALUE;
+		unsigned int const column_size = (unsigned int) std::pow((double) alphabet_size, (int) order);
+
+		transition = iTransition;
+
+		Matrix<TFloat,2> temp = transition;
+		//initialise a variable t representing a good threshold to estimate the vector
+		//after multiplying e times the transition matrix with itself
+		unsigned int t=6;
+		for (unsigned int i=0; i<t; i++){
+			temp=temp*temp;
+		}
+
+		for (unsigned int i=0; i<column_size; i++){
+			value(stationaryDistribution,i)=value(temp, 0,i);	//Set stationary distribution to row of transition^6
+		}
+
+		//_computeAuxiliaryMatrices();
+	}
+
+
+
+	void set(Matrix<TFloat,2> &iTransition, String<TFloat> &iStationaryDistribution)
+	{
+		transition = iTransition;
+
+		stationaryDistribution = iStationaryDistribution;
+
+		//_computeAuxiliaryMatrices();
+	}
+
+
+	///////////////////////////////////////////////////////////////
+	///// WRITE
+	///////////////////////////////////////////////////////////////
+
+
+	void write(FILE *file)
+	{
+		ensureAuxMatrices(*this);
+		unsigned int const alphabet_size = ValueSize<TAlphabet>::VALUE;
+		unsigned int const column_size = (unsigned int) std::pow((double) alphabet_size, (int) order);
+
+		//write the transition matrix
+		for(unsigned int row=0; row<column_size; row++){
+			for(unsigned int col=0; col<column_size; col++){
+			  fprintf(file,"%f ",value(transition, row,col));
+			}
+			fprintf(file,"\n");
+		}
+		//write the stationary distribution vector
+		for(unsigned int row=0; row<column_size; row++){
+			  fprintf(file,"%f ",value(stationaryDistribution, row));
+			}
+		fprintf(file,"\n");
+
+		if(length(_q)){
+			//write the auxiliary matrix
+			for(unsigned int row=0; row<column_size; row++){
+				for(unsigned int col=0; col<column_size; col++){
+					fprintf(file,"%f ",value(_q, row,col));
+				}
+				fprintf(file,"\n");
+			}
+
+			for(unsigned int row=0; row<column_size; row++){
+				for(unsigned int col=0; col<column_size; col++){
+				  fprintf(file,"%f ",value(_qppp,row,col));
+				}
+				fprintf(file,"\n");
+			}
+
+			for(unsigned int row=0; row<column_size; row++){
+				for(unsigned int col=0; col<column_size; col++){
+				fprintf(file,"%f ",value(_qppqpp, row,col));
+				}
+				fprintf(file,"\n");
+			}
+		}
+	}
+
+
+	///////////////////////////////////////////////////////////////
+	///// READ
+	///////////////////////////////////////////////////////////////
+
+	void read(FILE *file)
+	{
+		unsigned int const alphabet_size = ValueSize<TAlphabet>::VALUE;
+		unsigned int const column_size = (unsigned int) std::pow((double) alphabet_size, (int) order);
+
+		//read the transition matrix
+		for(unsigned int row=0; row<column_size; row++)
+		{
+			for(unsigned int col=0; col<column_size; col++)
+			{
+			  fscanf(file,"%lf ", & value(transition, row,col));
+			}
+			fscanf(file,"\n");
+		}
+		//read the stationary distribution vector
+		for(unsigned int row=0; row<column_size; row++)
+		{
+			  fscanf(file,"%lf ",&value(stationaryDistribution, row));
+		}
+		fscanf(file,"\n");
+
+		if (!feof(file))
+		{
+			setLength(_q, 0, column_size);
+			setLength(_q, 1, column_size);
+			resize(_q);
+
+			//read the auxiliary matrix
+			for(unsigned int row=0; row<column_size; row++)
+			{
+				for(unsigned int col=0; col<column_size; col++)
+				{
+					fscanf(file,"%lf ",&value(_q, row,col));
+				}
+				fscanf(file,"\n");
+			}
+			setLength(_qppp, 0, column_size);
+			setLength(_qppp, 1, column_size);
+			resize(_qppp);
+			for(unsigned int row=0; row<column_size; row++){
+				for(unsigned int col=0; col<column_size; col++){
+				  fscanf(file,"%lf ",&value(_qppp, row,col));
+				}
+				fscanf(file,"\n");
+			}
+			setLength(_qppqpp, 0, column_size);
+			setLength(_qppqpp, 1, column_size);
+			resize(_qppqpp);
+			for(unsigned int row=0; row<column_size; row++){
+				for(unsigned int col=0; col<column_size; col++){
+					fscanf(file,"%lf ",&value(_qppqpp, row,col));
+				}
+				fscanf(file,"\n");
+			}
+		}
+	}
+
+
+	/////////////////////////////////////////////////////////////////////////////
+	///// COMPUTE THE AUXILIARY MATRICES FOR THE VARIANCE And Z-SCORE COMPUTATION
+	/////////////////////////////////////////////////////////////////////////////
+
+	/*
+		.Memfunc.MarkovModel#_computeAuxiliaryMatrices:
+		..class:Class.MarkovModel
+		..summary:Computes the auxiliary information for statistical indices computation
+		..signature:_computeAuxiliaryMatrices()
+	*/
+
+	void _computeAuxiliaryMatrices()
+	{
+	//std::cout<<"auxMat\n";
+		//clear(_q);
+		//clear(_qppp);
+		//clear(_qppqpp);
+
+		unsigned int const alphabet_size = ValueSize<TAlphabet>::VALUE;
+		unsigned int const column_size = (unsigned int) std::pow((double) alphabet_size, (int) order);
+		TMatrix I;
+		TMatrix Ip;
+
+		//resize the matrices
+		setLength(I, 0, column_size);
+		setLength(I, 1, column_size);
+		resize(I, 0.0);
+
+		setLength(Ip, 0, column_size);
+		setLength(Ip, 1, column_size);
+		resize(Ip, 0.0);
+
+		for(unsigned int i=0; i<column_size; i++){
+			value(I,i,i)=1.0;
+			 for (unsigned int j=0; j<column_size; j++)
+			    value(Ip,i,j)=value(stationaryDistribution,j);
+		}
+
+
+		_q=transition-I;
+		_q=_q+Ip;
+		_q=_computeInverseMatrix(_q);//works for simple non singular matrices, others not checked
+		//original code: _q=_computeInverseMatrix(_matricialSum(_matricialDifference(transition, I), Ip));
+
+		_qppp=_q*transition;
+		_qppqpp = _qppp*transition;
+		_qppqpp = _qppqpp*_q;
+		for(unsigned int i=1; i<order; i++)
+		{
+			_qppp=_qppp*transition;
+			_qppqpp=_qppqpp*transition;
+		}
+	}
+
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// _computeInverseMatrix
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+.Function._computeInverseMatrix:
+..summary:Computes the inverse matrix of a given matrix
+..signature:_computeInverseMatrix(matrix,n)
+..param.matrix:The matrix in input.
+...type:String<TAlphabet, TSpec1>&
+..param.n:The number of columns of the matrix.
+...type:nolink:unsigned int
+..returns:The inverse matrix of the matrix.
+..include:seqan/statistics.h
+*/
+
+template <typename TValue>
+Matrix<TValue,2> _computeInverseMatrix(Matrix<TValue,2> &matrix)
+{
+	typedef Matrix<TValue,2> TMatrix;
+	unsigned int n = length(matrix,0);
+	TMatrix result;
+	//resize the matrix
+	setLength(result, 0, n);
+	setLength(result, 1, n);
+	resize(result, 0.0);
+
+	//copy the matrix in result, since the procedure is in-place
+	TMatrix tmp = matrix;
+
+	//lu decomposition of a in-place
+	String<TValue> indx=_ludcmp(tmp);
+
+	String<TValue> col;
+
+	unsigned int i;
+
+	// inverse by columns
+	for (unsigned int j=0; j<n; j++)
+	{
+		resize(col,n,0);
+		if(j>0)
+		{
+			for(i=0; i<n; i++)
+			{
+				value(col,i)=0;
+			}
+		}
+		value(col,j) = 1;
+
+		_lubksb(tmp,indx,col);
+
+		for (i=0; i<n; i++)
+		{
+			value(result, i,j)= value(col,i);
+		}
+
+	}
+
+	return result;
+}
+
+/*
+ *
+ * LU decomposition
+ *
+ */
+
+template <typename TValue>
+String<TValue> _ludcmp(Matrix<TValue,2> &result)
+{
+    double const TINY = 1.0e-20;
+	int n = length(result,0);
+	int i, imax, j, k,d;
+	imax = MinValue<int>::VALUE;
+	double big,dum,sum,temp;
+	String<TValue> vv;
+	resize(vv, n, 1.0);
+
+
+	d = 1;
+	for (i=1; i<=n; i++)
+	{
+		big = 0.0;
+		for (j=1; j<=n; j++)
+		{
+			if ((temp=fabs(value(result, i-1,j-1)))>big)
+			{
+				big = temp;
+			}
+		}
+		if (big==0.0)
+		{
+			std::cout<<"Singular matrix in routine ludcmp" << std::endl;
+			exit(1);
+		}
+
+		value(vv,i-1) = 1.0/big;
+	}
+	String<TValue> indx;
+	resize(indx,n);
+
+	for (j=1; j<=n; j++)
+	{
+		for (i=1; i<j; i++)
+		{
+			sum = value(result,i-1,j-1);
+			for (k=1; k<i; k++)
+			{
+				sum -= value(result, i-1,k-1)*value(result, k-1,j-1);
+			}
+			value(result, i-1,j-1) = sum;
+		}
+		big = 0.0;
+		for (i=j; i<=n; i++)
+		{
+			sum = value(result,i-1,j-1);
+			for (k=1; k<j; k++)
+			{
+				sum -= value(result, i-1,k-1)*value(result, k-1,j-1);
+			}
+			value(result, i-1,j-1) = sum;
+			if ((dum = value(vv, i-1)*fabs(sum))>=big)
+			{
+				big = dum;
+				imax = i;
+			}
+		}
+		if (j != imax)
+		{
+			for (k=1; k<=n; k++)
+			{
+				dum = value(result,imax-1,k-1);
+				value(result, imax-1,k-1) = value(result, j-1,k-1);
+				value(result,j-1,k-1) = dum;
+			}
+			d = -(d);
+			value(vv, imax-1)=value(vv,j-1);
+		}
+
+		value(indx, j-1) = imax;
+
+		if (value(result, j-1,j-1) == 0.0)
+		{
+			value(result, j-1,j-1) = TINY;
+		}
+		if (j!=n)
+		{
+			dum = 1.0/(value(result,j-1,j-1));
+			for (i=j+1; i<=n; i++)
+			{
+				value(result, i-1,j-1) *= dum;
+			}
+		}
+  }
+
+ return indx;
+
+}
+
+
+template <typename TValue>
+void _lubksb(Matrix<TValue,2> &a, String<TValue> &indx, String<TValue>  &b)
+{
+	int n =length(a,0);	//Number of columns in matrix a
+	int i, ii=0,ip,j;
+	double sum;
+
+	for (i=1; i<=n; i++)
+	{
+		ip = static_cast<int>(value(indx,i-1));
+		sum = value(b,ip-1);
+		value(b,ip-1) = value(b,i-1);
+		if (ii)
+		{
+			for (j=ii;j<=i-1;j++)
+			{
+				sum -=value(a,i-1,j-1)*value(b,j-1);
+			}
+		}
+		else
+		if (sum)
+		{
+			ii=i;
+		}
+		value(b,i-1) = sum;
+	}
+	for (i=n; i>=1; i--)
+	{
+		sum = value(b,i-1);
+		for (j=i+1; j<=n; j++)
+		{
+			sum -= value(a,i-1,j-1)*value(b,j-1);
+		}
+		value(b,i-1) = sum/value(a,i-1,i-1);
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Interface
+//////////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+void buildMarkovModel(MarkovModel<TAlphabet, TFloat, TSpec> &mm,
+		StringSet<String<TAlphabet > > &stringSet)
+{
+
+	mm.build(stringSet);
+
+}
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+void buildMarkovModel(MarkovModel<TAlphabet, TFloat, TSpec> &mm,
+		StringSet<String<TAlphabet > > const &stringSet)
+{
+
+	mm.build(stringSet);
+
+}
+
+
+///////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+void setMarkovModel(MarkovModel<TAlphabet, TFloat, TSpec> & mm,
+					Matrix<TFloat,2> &iTransition)
+{
+	mm.set(iTransition);
+}
+
+
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+void setMarkovModel(MarkovModel<TAlphabet, TFloat, TSpec> & mm,
+					Matrix<TFloat,2> &iTransition,
+					String<TFloat> &iStationaryDistribution)
+{
+	mm.set(iTransition, iStationaryDistribution);
+}
+
+///////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+TFloat emittedProbability(MarkovModel<TAlphabet, TFloat, TSpec> & mm,
+		StringSet<String<TAlphabet > > & stringSet)
+{
+	return mm.emittedProbability(stringSet);
+}
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+TFloat emittedProbability(MarkovModel<TAlphabet, TFloat, TSpec> & mm,
+						  String<TAlphabet> &string)
+{
+	return mm.emittedProbability(string);
+}
+
+//const
+template <typename TAlphabet, typename TFloat, typename TSpec, typename TString, typename TSetSpec>
+TFloat emittedProbability(MarkovModel<TAlphabet, TFloat, TSpec> & mm,
+		StringSet<TString, TSetSpec> const &stringSet)
+{
+	return mm.emittedProbability(stringSet);
+}
+
+template <typename TAlphabet, typename TFloat, typename TSpec, typename TString>
+TFloat emittedProbability(MarkovModel<TAlphabet, TFloat, TSpec> & mm,
+						  TString const &string)
+{
+	return mm.emittedProbability(string);
+}
+
+///////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+void write(FILE *file,
+		   MarkovModel<TAlphabet, TFloat, TSpec> & mm )
+{
+	mm.write(file);
+}
+
+///////////////////////////////////////////////////////////////
+
+template <typename TAlphabet, typename TFloat, typename TSpec>
+void read(FILE *file,
+		  MarkovModel<TAlphabet, TFloat, TSpec> & mm )
+{
+	mm.read(file);
+}
+//////////////////////////////////////////////////////////////////////////////
+template <typename TAlphabet, typename TFloat, typename TSpec>
+void ensureAuxMatrices(MarkovModel<TAlphabet, TFloat, TSpec> & mm )
+{
+
+	if(empty(mm._q)){
+		mm._computeAuxiliaryMatrices();
+	}
+}
+
+
+}
+
+#endif  // #ifndef SEQAN_STATISTICS_STATISTICS_MARKOV_MODEL_H_
diff --git a/src/SeqAn-1.3/seqan/store.h b/src/SeqAn-1.3/seqan/store.h
new file mode 100644
index 0000000..b558e94
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store.h
@@ -0,0 +1,78 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_H
+#define SEQAN_HEADER_STORE_H
+
+#include <seqan/basic.h>
+#include <seqan/sequence.h>
+#include <seqan/align.h>
+#include <seqan/file.h>
+
+#include <sstream>
+#include <algorithm>
+#include <set>
+
+#ifndef SEQAN_HAS_SAMTOOLS 
+#define SEQAN_HAS_SAMTOOLS 0
+#endif  // #ifndef SEQAN_HAS_SAMTOOLS 
+
+#if SEQAN_HAS_SAMTOOLS
+#include <sam.h>
+#include <bam.h>
+#endif  // #if SEQAN_HAS_SAMTOOLS
+
+//////////////////////////////////////////////////////////////////////////////
+// FRAGMENT STORE SUB-CONTAINERS
+//////////////////////////////////////////////////////////////////////////////
+
+#include <seqan/store/store_base.h>
+#include <seqan/store/store_read.h>
+#include <seqan/store/store_matepair.h>
+#include <seqan/store/store_library.h>
+#include <seqan/store/store_contig.h>
+#include <seqan/store/store_align.h>
+#include <seqan/store/store_annotation.h>
+#include <seqan/store/store_all.h>
+
+#include <seqan/store/store_align_intervals.h>
+#include <seqan/store/store_intervaltree.h>
+
+#include <seqan/store/store_io.h>
+#include <seqan/store/store_io_sam.h>
+#include <seqan/store/store_io_gff.h>
+#include <seqan/store/store_io_ucsc.h>
+#if SEQAN_HAS_SAMTOOLS
+#include <seqan/store/store_io_bam.h>
+#endif  // #if SEQAN_HAS_SAMTOOLS
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_align.h b/src/SeqAn-1.3/seqan/store/store_align.h
new file mode 100644
index 0000000..fef0d31
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_align.h
@@ -0,0 +1,1932 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_ALIGN_H
+#define SEQAN_HEADER_STORE_ALIGN_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Aligned Read Store
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.AlignedReadStoreElement
+..summary:Represents an alignment between read and contig.
+..cat:Fragment Store
+..signature:AlignedReadStoreElement<>
+..signature:AlignedReadStoreElement<TPos[, TGapAnchor[, TSpec]]>
+..param.TPos:Type to store gap-space positions.
+..param.TGapAnchor:Type of a read gap anchor.
+...type:Class.GapAnchor
+..param.TSpec:The specialization type.
+...default:$void$
+..remarks:Value type of the @Memvar.FragmentStore#alignedReadStore@ string.
+
+.Typedef.AlignedReadStoreElement#TPos
+..summary:Type of the $beginPos$ and $endPos$ members.
+..class:Class.AlignedReadStoreElement
+.Typedef.AlignedReadStoreElement#TGapAnchors
+..summary:Type of the $gaps$ member.
+..class:Class.AlignedReadStoreElement
+.Typedef.AlignedReadStoreElement#TSpec
+..summary:The specialization type.
+..class:Class.AlignedReadStoreElement
+
+.Memfunc.AlignedReadStoreElement#AlignedReadStoreElement
+..summary:Constructor
+..signature:AlignedReadStoreElement<> ()
+..signature:AlignedReadStoreElement<TPos[, TGapAnchor[, TSpec]]> ()
+..signature:AlignedReadStoreElement<TPos[, TGapAnchor[, TSpec]]> (id, readId, contigId, beginPos, endPos[, gaps])
+..param.id:The alignment id refers to associated alignment information in @Memvar.FragmentStore#alignQualityStore@ or @Memvar.FragmentStore#alignedReadTagStore at .
+..param.readId:Refers to the aligned read in the @Memvar.FragmentStore#readStore at .
+..param.contigId:Refers to the contig in the @Memvar.FragmentStore#contigStore@ the read is aligned with.
+..param.beginPos:Begin position of the alignment in gap-space.
+..param.endPos:End position of the alignment in gap-space.
+..param.gaps:Read gap anchors.
+..remarks:The default constructor sets all ids to $INVALID_ID$ and $beginPos$ and $endPos$ to $0$.
+
+..class:Class.AlignedReadStoreElement
+.Memvar.AlignedReadStoreElement#id
+..summary:The alignment id refers to associated alignment information in @Memvar.FragmentStore#alignQualityStore@ or @Memvar.FragmentStore#alignedReadTagStore at .
+..type:Metafunction.Id
+..class:Class.AlignedReadStoreElement
+.Memvar.AlignedReadStoreElement#readId
+..summary:Refers to the aligned read in the @Memvar.FragmentStore#readStore at .
+..type:Metafunction.Id
+..class:Class.AlignedReadStoreElement
+.Memvar.AlignedReadStoreElement#contigId
+..summary:Refers to the contig in the @Memvar.FragmentStore#contigStore@ the read is aligned with.
+..type:Metafunction.Id
+..class:Class.AlignedReadStoreElement
+.Memvar.AlignedReadStoreElement#pairMatchId
+..summary:Two read alignments having the same $pairMatchId$ form a valid pair match.
+If $INVALID_ID$ the read is either not paired or could not be aligned as part of a pair match.
+..type:Metafunction.Id
+..class:Class.AlignedReadStoreElement
+.Memvar.AlignedReadStoreElement#beginPos
+..summary:Begin position of the alignment in gap-space.
+..type:Typedef.AlignedReadStoreElement#TPos
+..class:Class.AlignedReadStoreElement
+.Memvar.AlignedReadStoreElement#endPos
+..summary:End position of the alignment in gap-space.
+..type:Typedef.AlignedReadStoreElement#TPos
+..class:Class.AlignedReadStoreElement
+.Memvar.AlignedReadStoreElement#gaps
+..summary:String of read gap anchors. Can be used to create a $Spec.AnchorGaps$ alignment row.
+..type:Typedef.AlignedReadStoreElement#TGapAnchors
+..class:Class.AlignedReadStoreElement
+.Memvar.AlignedReadStoreElement#INVALID_ID
+..summary:Constant to represent an invalid id.
+..type:Metafunction.Id
+..class:Class.AlignedReadStoreElement
+..include:seqan/store.h
+*/
+
+template <typename TPos_, typename TGapAnchor_, typename TSpec_ = void>
+struct AlignedReadStoreElement
+{
+	typedef typename Id<AlignedReadStoreElement>::Type	TId;
+	typedef TPos_										TPos;
+	typedef TGapAnchor_									TGapAnchor;
+	typedef TSpec_										TSpec;
+	typedef String<TGapAnchor>							TGapAnchors;
+
+	static const TId INVALID_ID;
+	
+	TId			id;
+	TId			readId;
+	TId			contigId;
+	TId			pairMatchId;	// unique id. for multiple mate-pair matches (not matePairId)
+	TPos		beginPos;		// begin position of the gapped sequence in gapped contig sequence
+	TPos		endPos;			// end position of ..., for reverse aligned reads holds end < begin
+	TGapAnchors	gaps;
+
+	AlignedReadStoreElement() : id(INVALID_ID), readId(INVALID_ID), contigId(INVALID_ID), pairMatchId(INVALID_ID), beginPos(0), endPos(0) {}
+
+	AlignedReadStoreElement(TId _id, TId _readId, TId _contigId, TPos _beginPos, TPos _endPos) :
+		id(_id), 
+		readId(_readId), 
+		contigId(_contigId), 
+		pairMatchId(INVALID_ID), 
+		beginPos(_beginPos), 
+		endPos(_endPos) {}
+
+	AlignedReadStoreElement(TId _id, TId _readId, TId _contigId, TPos _beginPos, TPos _endPos, TGapAnchors const &_gaps) :
+		id(_id), 
+		readId(_readId), 
+		contigId(_contigId), 
+		pairMatchId(INVALID_ID), 
+		beginPos(_beginPos), 
+		endPos(_endPos),
+		gaps(_gaps) {}
+
+    inline bool operator==(AlignedReadStoreElement const & other) const
+    {
+        return id == other.id &&
+                readId == other.readId &&
+                contigId == other.contigId &&
+                pairMatchId == other.pairMatchId &&
+                beginPos == other.beginPos &&
+                endPos == other.endPos &&
+                gaps == other.gaps;
+    }
+};
+
+
+// TODO(holtgrew): I find this useful for debugging purposes. Keep it?
+template <typename TStream, typename TPos, typename TGapAnchor, typename TSpec>
+TStream & operator<<(TStream & stream, AlignedReadStoreElement<TPos, TGapAnchor, TSpec> const & e) {
+    return stream << "AlignedReadStore(id=" << e.id << ", readId=" << e.readId << ", contigId=" << e.contigId << ", pairMatchId=" << e.pairMatchId << ", beginPos=" << e.beginPos << ", endPos=" << e.endPos << ", {gaps})";
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TPos, typename TGapAnchor, typename TSpec> 
+const typename Id<AlignedReadStoreElement<TPos, TGapAnchor, TSpec> >::Type 
+AlignedReadStoreElement<TPos, TGapAnchor, TSpec>::INVALID_ID = MaxValue<typename Id<AlignedReadStoreElement<TPos, TGapAnchor, TSpec> >::Type>::VALUE; 
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.AlignQualityStoreElement
+..summary:Stores alignment qualities.
+..cat:Fragment Store
+..signature:AlignQualityStoreElement<TScore[, TSpec]>
+..param.TScore:Type to store align and pair score values.
+..param.TSpec:The specialization type.
+...default:$void$
+..remarks:Value type of the @Memvar.FragmentStore#alignQualityStore@ string.
+
+.Memfunc.AlignQualityStoreElement#AlignQualityStoreElement
+..summary:Constructor
+..signature:AlignQualityStoreElement<TScore[, TSpec]> ()
+..remarks:Sets all members to $0$.
+
+..class:Class.AlignQualityStoreElement
+.Memvar.AlignQualityStoreElement#pairScore
+..summary:Combined score of both alignments of a pair match.
+..class:Class.AlignQualityStoreElement
+.Memvar.AlignQualityStoreElement#score
+..summary:Score of the alignment.
+..class:Class.AlignQualityStoreElement
+.Memvar.AlignQualityStoreElement#errors
+..summary:Absolute number of errors in the alignment.
+..type:nolink:unsigned char
+..class:Class.AlignQualityStoreElement
+..include:seqan/store.h
+*/
+
+template <typename TScore, typename TSpec = void>
+struct AlignQualityStoreElement
+{
+	TScore				pairScore;		// score of the mate-pair alignment (this read is part of)
+	TScore				score;			// score of the single read alignment
+	unsigned char		errors;			// absolute number of errors (Hamming or edit distance)
+	
+	AlignQualityStoreElement():
+		pairScore(0),
+		score(0),
+		errors(0) {}
+
+    inline bool operator==(AlignQualityStoreElement const & other)
+    {
+        return pairScore == other.pairScore &&
+                score == other.score &&
+                errors == other.errors;
+    }
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Sorting tags
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.sortAlignedRead Tags
+..summary:Tag to select a specific field to stably sort the @Memvar.FragmentStore#alignedReadStore@ by.
+..cat:Fragment Store
+..see:Function.sortAlignedReads
+..see:Function.lowerBoundAlignedReads
+..see:Function.upperBoundAlignedReads
+..tag.SortContigId:
+...summary:Sort alignedReads by $contigId$.
+...signature:SortContigId
+..tag.SortId:
+...summary:Sort alignedReads by $id$.
+...signature:SortId
+..tag.SortBeginPos:
+...summary:Sort alignedReads by $beginPos$.
+...signature:SortBeginPos
+..tag.SortEndPos:
+...summary:Sort alignedReads by $endPos$.
+...signature:SortEndPos
+..tag.SortPairMatchId:
+...summary:Sort alignedReads by $pairMatchId$.
+...signature:SortPairMatchId
+..tag.SortReadId:
+...summary:Sort alignedReads by $readId$.
+...signature:SortReadId
+..include:seqan/store.h
+*/
+
+struct SortContigId_;
+typedef Tag<SortContigId_> const SortContigId;
+
+struct SortId_;
+typedef Tag<SortId_> const SortId;
+
+struct SortBeginPos_;
+typedef Tag<SortBeginPos_> const SortBeginPos;
+
+struct SortEndPos_;
+typedef Tag<SortEndPos_> const SortEndPos;
+
+struct SortPairMatchId_;
+typedef Tag<SortPairMatchId_> const SortPairMatchId;
+
+struct SortReadId_;
+typedef Tag<SortReadId_> const SortReadId;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Sorting functors
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+template <typename TAlignedRead, typename TTag>
+struct _LessAlignedRead;
+
+template <typename TAlignedRead>
+struct _LessAlignedRead<TAlignedRead, SortId> :
+	public ::std::binary_function<TAlignedRead, TAlignedRead, bool>
+{
+	inline bool 
+	operator() (TAlignedRead const& a1, TAlignedRead const& a2) const {
+		return (a1.id) < (a2.id);
+	}
+};
+
+template <typename TAlignedRead>
+struct _LessAlignedRead<TAlignedRead, SortContigId> :
+	public ::std::binary_function<TAlignedRead, TAlignedRead, bool>
+{
+	inline bool 
+	operator() (TAlignedRead const& a1, TAlignedRead const& a2) const {
+		return a1.contigId < a2.contigId;
+	}
+};
+
+template <typename TAlignedRead>
+struct _LessAlignedRead<TAlignedRead, SortBeginPos> :
+	public ::std::binary_function<TAlignedRead, TAlignedRead, bool>
+{
+	inline bool 
+	operator() (TAlignedRead const& a1, TAlignedRead const& a2) const {
+		return _min(a1.beginPos, a1.endPos) < _min(a2.beginPos, a2.endPos);
+	}
+};
+
+template <typename TAlignedRead>
+struct _LessAlignedRead<TAlignedRead, SortEndPos> :
+	public ::std::binary_function<TAlignedRead, TAlignedRead, bool>
+{
+	inline bool 
+	operator() (TAlignedRead const& a1, TAlignedRead const& a2) const {
+		return _max(a1.beginPos, a1.endPos) < _max(a2.beginPos, a2.endPos);
+	}
+};
+
+template <typename TAlignedRead>
+struct _LessAlignedRead<TAlignedRead, SortPairMatchId> :
+	public ::std::binary_function<TAlignedRead, TAlignedRead, bool>
+{
+	inline bool 
+	operator() (TAlignedRead const& a1, TAlignedRead const& a2) const {
+		return a1.pairMatchId < a2.pairMatchId;
+	}
+};
+
+template <typename TAlignedRead>
+struct _LessAlignedRead<TAlignedRead, SortReadId> :
+	public ::std::binary_function<TAlignedRead, TAlignedRead, bool>
+{
+	inline bool 
+	operator() (TAlignedRead const& a1, TAlignedRead const& a2) const {
+		return a1.readId < a2.readId;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Sorting function
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+// TODO(holtgrew): Maybe add equalRangeAlignedReads?
+
+/**
+.Function.sortAlignedReads
+..summary:Stably sort aligned reads.
+..cat:Fragment Store
+..signature:sortAlignedReads(alignStore, sortTag)
+..signature:sortAlignedReads(alignStore, lessFunctor)
+..param.alignStore:A sequence of @Class.AlignedReadStoreElement@ to be sorted, e.g. @Memvar.FragmentStore#alignedReadStore at .
+..param.sortTag:Selects the field to sort by.
+...type:Tag.sortAlignedRead Tags
+..param.lessFunctor:STL-less functor to compare two @Class.AlignedReadStoreElement.AlignedReadStoreElements at .
+..remarks:This function calls $std::stable_sort$ to sort $alignStore$.
+..include:seqan/store.h
+..see:Function.lowerBoundAlignedReads
+..see:Function.upperBoundAlignedReads
+
+.Function.lowerBoundAlignedReads
+..summary:Performs a binary lower bound search on the aligned reads.
+..cat:Fragment Store
+..signature:lowerBoundAlignedReads(alignStore, value, sortTag)
+..signature:lowerBoundAlignedReads(itBegin, itEnd, value, sortTag)
+..param.alignStore:A sequence of @Class.AlignedReadStoreElement@ to be searched through, e.g. @Memvar.FragmentStore#alignedReadStore at .
+..param.itBegin:An iterator to the first element of the sequence of @Class.AlignedReadStoreElement@ to be searched through.
+..param.itEnd:An iterator behind the last element of the sequence of @Class.AlignedReadStoreElement@ to be searched through.
+..param.value:The value to use for the comparison.
+..param.sortTag:Selects the field for the comparison in the binary search.
+...type:Tag.sortAlignedRead Tags
+..remarks:This is equivalent to calling $std::lower_bound$ on $alignStore$ with according parameters.
+..include:seqan/store.h
+..see:Function.sortAlignedReads
+..see:Function.upperBoundAlignedReads
+
+.Function.upperBoundAlignedReads
+..summary:Performs a binary upper bound search on the aligned reads.
+..cat:Fragment Store
+..signature:upperBoundAlignedReads(alignStore, value, sortTag)
+..signature:upperBoundAlignedReads(itBegin, itEnd, value, sortTag)
+..param.alignStore:A sequence of @Class.AlignedReadStoreElement@ to be searched through, e.g. @Memvar.FragmentStore#alignedReadStore at .
+..param.itBegin:An iterator to the first element of the sequence of @Class.AlignedReadStoreElement@ to be searched through.
+..param.itEnd:An iterator behind the last element of the sequence of @Class.AlignedReadStoreElement@ to be searched through.
+..param.value:The value to use for the comparison.
+..param.sortTag:Selects the field for the comparison in the binary search.
+...type:Tag.sortAlignedRead Tags
+..remarks:This is equivalent to calling $std::upper_bound$ on $alignStore$ with according parameters.
+..include:seqan/store.h
+..see:Function.sortAlignedReads
+..see:Function.lowerBoundAlignedReads
+*/
+
+template <typename TAlign, typename TSortSpec>
+inline void
+sortAlignedReads(TAlign& alignStore, Tag<TSortSpec> const &) 
+{
+	std::stable_sort(
+		begin(alignStore, Standard() ), 
+		end(alignStore, Standard() ), 
+		_LessAlignedRead<typename Value<TAlign>::Type, Tag<TSortSpec> const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSortSpec>
+inline void
+sortAlignedReads(TAlign const & alignStore, Tag<TSortSpec> const &) 
+{
+	std::stable_sort(
+		begin(const_cast<TAlign&>(alignStore), Standard() ), 
+		end(const_cast<TAlign&>(alignStore), Standard() ), 
+		_LessAlignedRead<typename Value<TAlign>::Type, Tag<TSortSpec> const>() );
+}
+
+template <typename TAlign, typename TFunctorLess>
+inline void
+sortAlignedReads(TAlign & alignStore, TFunctorLess const &less) 
+{
+	std::stable_sort(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		less);
+}
+
+template <typename TAlign, typename TFunctorLess>
+inline void
+sortAlignedReads(TAlign const & alignStore, TFunctorLess const &less) 
+{
+	std::stable_sort(
+		begin(const_cast<TAlign&>(alignStore), Standard()), 
+		end(const_cast<TAlign&>(alignStore), Standard()), 
+		less);
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+lowerBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortId) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.id = val;
+	return ::std::lower_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+upperBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortId) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.id = val;
+	return ::std::upper_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+lowerBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortContigId) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.contigId = val;
+	return ::std::lower_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortContigId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+upperBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortContigId) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.contigId = val;
+	return ::std::upper_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortContigId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+lowerBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortBeginPos) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::lower_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortBeginPos const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+upperBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortBeginPos) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::upper_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortBeginPos const>() );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+lowerBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortEndPos) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::lower_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortEndPos const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+upperBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortEndPos) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::upper_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortEndPos const>() );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+lowerBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortPairMatchId) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.pairMatchId = val;
+	return ::std::lower_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortPairMatchId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+upperBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortPairMatchId) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.pairMatchId = val;
+	return ::std::upper_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortPairMatchId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+lowerBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortReadId) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.readId = val;
+	return ::std::lower_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortReadId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TAlign, typename TSearchValue>
+inline typename Iterator<TAlign, Standard>::Type
+upperBoundAlignedReads(TAlign const& alignStore, 
+					   TSearchValue const val,
+					   SortReadId) 
+{
+	typedef typename Value<TAlign>::Type TAlignElement;
+	TAlignElement el;
+	el.readId = val;
+	return ::std::upper_bound(
+		begin(alignStore, Standard()), 
+		end(alignStore, Standard()), 
+		el,
+		_LessAlignedRead<typename Value<TAlign>::Type, SortReadId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortId) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.id = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortId) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.id = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortContigId) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.contigId = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortContigId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortContigId) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.contigId = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortContigId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortBeginPos) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortBeginPos const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortBeginPos) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortBeginPos const>() );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortEndPos) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortEndPos const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortEndPos) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortEndPos const>() );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortPairMatchId) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.pairMatchId = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortPairMatchId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortPairMatchId) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.pairMatchId = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortPairMatchId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortReadId) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.readId = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortReadId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename T, typename TSpec, typename TSearchValue>
+inline Iter<T, TSpec>
+upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin,
+                       Iter<T, TSpec> const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortReadId) 
+{
+	typedef typename Value<Iter<T, TSpec> >::Type TAlignElement;
+	TAlignElement el;
+	el.readId = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<Iter<T, TSpec> >::Type, SortReadId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortId) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.id = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortId) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.id = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortContigId) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.contigId = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortContigId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortContigId) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.contigId = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortContigId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortBeginPos) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortBeginPos const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortBeginPos) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortBeginPos const>() );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortEndPos) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortEndPos const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortEndPos) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.beginPos = val;
+	el.endPos = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortEndPos const>() );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortPairMatchId) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.pairMatchId = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortPairMatchId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortPairMatchId) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.pairMatchId = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortPairMatchId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortReadId) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.readId = val;
+	return ::std::lower_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortReadId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TReadAlignElement, typename TSearchValue>
+inline TReadAlignElement *
+upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin,
+                       TReadAlignElement * const & alignedReadsItEnd,
+					   TSearchValue const val,
+					   SortReadId) 
+{
+	typedef typename Value<TReadAlignElement *>::Type TAlignElement;
+	TAlignElement el;
+	el.readId = val;
+	return ::std::upper_bound(
+		alignedReadsItBegin, 
+		alignedReadsItEnd, 
+		el,
+		_LessAlignedRead<typename Value<TReadAlignElement *>::Type, SortReadId const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Spec.AnchorGaps:
+..cat:Alignments
+..general:Class.Gaps
+..summary:Stores gaps anchors of the first characters behind gaps.
+..signature:Gaps<TSource, AnchorGaps<TGapAnchors> >
+..param.TSource:Type of the ungapped sequence.
+...metafunction:Metafunction.Source
+..param.TGapAnchors:Type of the sequence of gap anchors, e.g. a string of $Class.GapAnchor$.
+..include:seqan/store.h
+
+.Memfunc.Gaps#Gaps
+..summary:Constructor
+..signature:Gaps<TSource, AnchorGaps<TGapAnchors> > ()
+..signature:Gaps<TSource, AnchorGaps<TGapAnchors> > (source[, anchors])
+..signature:Gaps<TSource, AnchorGaps<TGapAnchors> > (anchors)
+..param.source:The underlying ungapped sequence.
+..param.anchors:The sequence of gap anchors, e.g. the $gaps$ members in $Class.ReadStoreElement$ or $Class.ContigStoreElement$.
+*/
+
+template <typename TGapAnchors = String<GapAnchor<unsigned> > >
+struct AnchorGaps;
+
+template <typename TSource, typename TGapAnchors>
+class Gaps<TSource, AnchorGaps<TGapAnchors> >
+{
+public:
+	typedef typename Value<TGapAnchors>::Type TGapAnchor;
+	typedef typename Position<TGapAnchor>::Type TViewPosition;
+
+public:
+	Holder<TSource>		data_source;
+	Holder<TGapAnchors>	data_gaps;
+	int					data_viewCutBegin;	// how many alignment chars should be clipped at the beginning (can be negative too)
+	int					data_viewCutEnd;	// how ...                                           end ...
+	
+	Gaps() {}
+
+	Gaps(TSource &source): 
+		data_source(source),
+		data_viewCutBegin(0),
+		data_viewCutEnd(0) {}
+
+	Gaps(TGapAnchors &anchors):
+		data_gaps(anchors),
+		data_viewCutBegin(0),
+		data_viewCutEnd(0) {}
+
+	Gaps(TSource &source, TGapAnchors &anchors):
+		data_source(source),
+		data_gaps(anchors),
+		data_viewCutBegin(0),
+		data_viewCutEnd(0) {}
+
+	Gaps(TSource const &source, TGapAnchors &anchors):
+		data_source(source),
+		data_gaps(anchors),
+		data_viewCutBegin(0),
+		data_viewCutEnd(0) {}
+
+	Gaps(TSource &source, TGapAnchors const &anchors):
+		data_source(source),
+		data_gaps(anchors),
+		data_viewCutBegin(0),
+		data_viewCutEnd(0) {}
+
+	Gaps(TSource const &source, TGapAnchors const &anchors):
+		data_source(source),
+		data_gaps(anchors),
+		data_viewCutBegin(0),
+		data_viewCutEnd(0) {}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TGapAnchors>
+inline Holder<TSource> &
+_dataSource(Gaps<TSource, AnchorGaps<TGapAnchors> > & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_source;
+}
+template <typename TSource, typename TGapAnchors>
+inline Holder<TSource> const &
+_dataSource(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_source;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSize, typename TSource, typename TGapAnchors>
+inline void
+_assignSourceLength(TSize & size, Gaps<TSource, AnchorGaps<TGapAnchors> > const & me)
+{
+SEQAN_CHECKPOINT
+	if (IsSameType<TSource, Nothing>::VALUE)
+		size = maxValue<TSize>();
+	else
+		size = length(value(me.data_source));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TGapAnchors>
+inline TGapAnchors &
+_dataAnchors(Gaps<TSource, AnchorGaps<TGapAnchors> > & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_gaps);
+}
+
+template <typename TSource, typename TGapAnchors>
+inline TGapAnchors const &
+_dataAnchors(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me)
+{
+SEQAN_CHECKPOINT
+	return value(me.data_gaps);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAnchor, typename TSource, typename TGapAnchors, typename TIdx>
+inline void
+_getAnchor(TAnchor &anchor, Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, TIdx idx)
+{
+    SEQAN_CHECKPOINT;
+
+	typedef typename Value<TGapAnchors>::Type TGapAnchor;
+	typedef typename Position<TGapAnchor>::Type TPos;
+
+	if (idx > (TIdx)length(_dataAnchors(me)))
+	{
+		_assignSourceLength(anchor.seqPos, me);
+		if (empty(_dataAnchors(me)) && idx == 1)
+			anchor.gapPos = anchor.seqPos;
+		else
+		{
+			// for the sick case that an anchor seq position is beyond the sequence end
+			if (!empty(_dataAnchors(me)))
+			{
+				// if there is no sequence but anchors -> assume infinite sequence
+				if (anchor.seqPos == 0)
+					anchor.seqPos = maxValue(anchor.gapPos);
+				// if the sequence has a length > 0, but there is an anchor behind the end
+				// -> elongate sequence
+				else if ((__int64)anchor.seqPos < (__int64)back(_dataAnchors(me)).seqPos)
+					anchor.seqPos = back(_dataAnchors(me)).seqPos;
+			}
+			anchor.gapPos = maxValue(anchor.gapPos);
+		}
+	}
+	else if (idx > 0)
+		anchor = _dataAnchors(me)[idx - 1];
+	else
+	{
+		anchor.seqPos = 0;
+		if (idx == 0)
+			anchor.gapPos = 0;
+		else
+			anchor.gapPos = minValue(anchor.gapPos);
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TGapAnchors>
+inline typename Size< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type
+_unclippedLength(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me)
+{
+	typedef typename Size<Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type TSize;
+	typedef typename Value<TGapAnchors>::Type TAnchor;
+	TSize len;
+	_assignSourceLength(len, me);
+	if (!empty(_dataAnchors(me)))
+	{
+		TAnchor const &last = back(_dataAnchors(me));
+		len += last.gapPos - last.seqPos;
+	}
+	return len;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TGapAnchors>
+inline typename Size< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type
+length(Gaps<TSource, AnchorGaps<TGapAnchors> > & me)
+{
+SEQAN_CHECKPOINT
+	return _unclippedLength(me) - (me.data_viewCutBegin + me.data_viewCutEnd);
+}
+
+template <typename TSource, typename TGapAnchors>
+inline typename Size< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type
+length(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me)
+{
+SEQAN_CHECKPOINT
+	return _unclippedLength(me) - (me.data_viewCutBegin + me.data_viewCutEnd);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TGapAnchors>
+inline typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type
+begin(Gaps<TSource, AnchorGaps<TGapAnchors> > & me, Standard)
+{
+SEQAN_CHECKPOINT
+	return typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type(me);
+}
+
+template <typename TSource, typename TGapAnchors>
+inline typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > const>::Type
+begin(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, Standard)
+{
+SEQAN_CHECKPOINT
+	return typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > const>::Type(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TGapAnchors>
+inline typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type
+begin(Gaps<TSource, AnchorGaps<TGapAnchors> > & me, Rooted)
+{
+SEQAN_CHECKPOINT
+	return typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type(me);
+}
+
+template <typename TSource, typename TGapAnchors>
+inline typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > const>::Type
+begin(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, Rooted)
+{
+SEQAN_CHECKPOINT
+	return typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > const>::Type(me);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TGapAnchors>
+inline typename Position< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type
+beginPosition(Gaps<TSource, AnchorGaps<TGapAnchors> > & me)
+{
+SEQAN_CHECKPOINT
+	return me.data_viewCutBegin;
+}
+
+template <typename TSource, typename TGapAnchors>
+inline typename Position< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type
+endPosition(Gaps<TSource, AnchorGaps<TGapAnchors> > & me)
+{
+SEQAN_CHECKPOINT
+	return _unclippedLength(me) - me.data_viewCutEnd;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSource, typename TGapAnchors, typename TPosition>
+inline void
+setBeginPosition(Gaps<TSource, AnchorGaps<TGapAnchors> > & me, TPosition view_position)
+{
+SEQAN_CHECKPOINT
+	me.data_viewCutBegin = view_position;
+}
+
+template <typename TSource, typename TGapAnchors, typename TPosition>
+inline void
+setEndPosition(Gaps<TSource, AnchorGaps<TGapAnchors> > & me, TPosition view_position)
+{
+SEQAN_CHECKPOINT
+	me.data_viewCutEnd = _unclippedLength(me) - view_position;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// to remove '... < 0 is always false' warning
+template <typename T>
+inline bool
+_helperIsNegative(T, False)
+{
+	return false;
+}
+template <typename T>
+inline bool
+_helperIsNegative(T t, True)
+{
+	return t < 0;
+}
+
+template <typename TSource, typename TGapAnchors, typename TPosition>
+inline TPosition
+positionGapToSeq(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, TPosition pos)
+{
+	typedef typename Position<typename Value<TGapAnchors>::Type >::Type TAnchorPos;	
+
+	GapAnchor<__int64> prevAnchor, nextAnchor;
+	TPosition			seqPos;
+	int					anchorIdx;
+
+	if (_helperIsNegative(pos, typename IsSameType<TPosition, typename MakeSigned_<TPosition>::Type>::Type()))
+		anchorIdx = -1;
+	else
+	{
+		TGapAnchors const & anchors = _dataAnchors(me);
+		TAnchorPos seqLength;
+		_assignSourceLength(seqLength, me);
+		if (!empty(anchors))
+		{
+			anchorIdx = upperBoundGapAnchor(anchors, pos, SortGapPos()) - begin(anchors, Standard());
+			if (anchorIdx < (int)length(anchors))
+				if (anchors[anchorIdx].gapPos == (TAnchorPos)pos && anchors[anchorIdx].seqPos != seqLength)
+					++anchorIdx;
+		}
+		else 
+			anchorIdx = ((TAnchorPos)pos < seqLength)? 0: 1;
+	}
+	_getAnchor(prevAnchor, me, anchorIdx);
+	_getAnchor(nextAnchor, me, anchorIdx + 1);
+
+	if (nextAnchor.seqPos - prevAnchor.seqPos > (int)pos - prevAnchor.gapPos)
+		seqPos = prevAnchor.seqPos + (pos - prevAnchor.gapPos);
+	else
+		seqPos = nextAnchor.seqPos;
+	return seqPos;
+}
+
+template <typename TSource, typename TGapAnchors, typename TPosition>
+inline TPosition
+positionSeqToGap(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, TPosition pos)
+{
+	typedef typename Position<typename Value<TGapAnchors>::Type >::Type TAnchorPos;	
+
+	GapAnchor<__int64>	prevAnchor, nextAnchor;
+	TPosition			gapPos;
+	int					anchorIdx;
+
+	if (_helperIsNegative(pos, typename IsSameType<TPosition, typename MakeSigned_<TPosition>::Type>::Type()))
+		anchorIdx = -1;
+	else
+	{
+		TGapAnchors const & anchors = _dataAnchors(me);
+		TAnchorPos seqLength;
+		_assignSourceLength(seqLength, me);
+		if (!empty(anchors))
+		{
+			anchorIdx = upperBoundGapAnchor(anchors, pos, SortSeqPos()) - begin(anchors, Standard());
+			if (anchorIdx < (int)length(anchors))
+				if (anchors[anchorIdx].seqPos == (TAnchorPos)pos)
+					++anchorIdx;
+		}
+		else 
+			anchorIdx = ((TAnchorPos)pos < seqLength)? 0: 1;
+	}
+	_getAnchor(prevAnchor, me, anchorIdx);
+	_getAnchor(nextAnchor, me, anchorIdx + 1);
+
+	if (nextAnchor.gapPos - prevAnchor.gapPos > (int)pos - prevAnchor.seqPos)
+		gapPos = prevAnchor.gapPos + (pos - prevAnchor.seqPos);
+	else
+		gapPos = nextAnchor.gapPos;
+	return gapPos;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGaps_, typename TGapAnchors_> //Gaps<TSource_, AnchorGaps<TGapAnchors_> >
+class Iter<TGaps_, GapsIterator<AnchorGaps<TGapAnchors_> > >
+{
+public:
+	typedef TGaps_											TGaps;
+	typedef typename Source<TGaps>::Type					TSource;
+	typedef TGapAnchors_									TGapAnchors;
+
+//	typedef typename Value<TGapAnchors>::Type				TGapAnchor;
+	typedef GapAnchor<int>									TGapAnchor;
+	typedef typename Size<TGapAnchor>::Type					TGapSize;
+	typedef typename Iterator<TGapAnchors, Standard>::Type	TAnchorIter;
+
+	TGaps *					data_container;							//the gaps object
+	TGapSize				seqLength;
+	mutable TGapAnchor		current;
+	mutable TGapAnchor		prevAnchor;
+	mutable TGapAnchor		nextAnchor;
+	mutable TGapAnchor		viewBegin;
+	mutable TGapAnchor		viewEnd;
+	mutable int				anchorIdx;
+
+public:
+	Iter() 
+	{
+SEQAN_CHECKPOINT
+		data_container = NULL;
+		seqLength = 0;
+	}
+/*	Iter(Iter const & other_):
+		data_container(other_.data_container),
+		seqLength(other_.seqLength),
+		current(other_.current),
+		prevAnchor(other_.prevAnchor),
+		nextAnchor(other_.nextAnchor),
+		anchorIdx(other_.anchorIdx)
+	{
+SEQAN_CHECKPOINT
+	}
+*/	Iter(TGaps & container_):
+		data_container(&container_)
+	{
+SEQAN_CHECKPOINT
+		_assignSourceLength(seqLength, container_);
+		_goToGapAnchorIterator(*this, data_container->data_viewCutBegin);
+		viewBegin = current;
+		viewEnd.gapPos = _unclippedLength(*data_container) - data_container->data_viewCutEnd;
+		viewEnd.seqPos = positionGapToSeq(*data_container, viewEnd.gapPos);
+	}
+	Iter(TGaps & container_, TGapSize position):
+		data_container(&container_)
+	{
+SEQAN_CHECKPOINT
+		_assignSourceLength(seqLength, container_);
+		_goToGapAnchorIterator(*this, position + data_container->data_viewCutBegin);
+		viewBegin.gapPos = data_container->data_viewCutBegin;
+		viewEnd.gapPos   = _unclippedLength(*data_container) - data_container->data_viewCutEnd;
+		viewBegin.seqPos = positionGapToSeq(*data_container, viewBegin.gapPos);
+		viewEnd.seqPos   = positionGapToSeq(*data_container, viewEnd.gapPos);
+	}
+	~Iter()
+	{
+SEQAN_CHECKPOINT
+	}
+
+	Iter const & operator = (Iter const & other_)
+	{
+SEQAN_CHECKPOINT
+		data_container = other_.data_container;
+		seqLength = other_.seqLength;
+		current = other_.current;
+		prevAnchor = other_.prevAnchor;
+		nextAnchor = other_.nextAnchor;
+		anchorIdx = other_.anchorIdx;
+		viewBegin = other_.viewBegin;
+		viewEnd = other_.viewEnd;
+		return *this;
+	}
+};
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TGapAnchors>
+inline typename Source<Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const>::Type
+source(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me)
+{
+	return begin(source(*me.data_container), Rooted()) + me.current.seqPos;
+}
+template <typename TGaps, typename TGapAnchors>
+inline typename Source<Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > >::Type
+source(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me)
+{
+	return begin(source(*me.data_container), Rooted()) + me.current.seqPos;
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TGapAnchors>
+inline typename GetValue< Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > >::Type
+getValue(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<Iter<TGaps, GapsIterator<ArrayGaps> > >::Type TValue;
+	if (isGap(me)) return gapValue<TValue>();
+	else if (isUnknown(me)) return unknownValue<TValue>();
+	else return getValue(source(me));
+}
+template <typename TGaps, typename TGapAnchors>
+inline typename GetValue< Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const>::Type
+getValue(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me)
+{
+SEQAN_CHECKPOINT
+	typedef typename Value<Iter<TGaps, GapsIterator<ArrayGaps> > const>::Type TValue;
+	if (isGap(me)) return gapValue<TValue>();
+	else if (isUnknown(me)) return unknownValue<TValue>();
+	else return getValue(source(me));
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+isGap(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me)
+{
+	return me.current.seqPos == me.nextAnchor.seqPos;
+}
+
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+isUnknown(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me)
+{
+	int len;
+	_assignSourceLength(len, *me.data_container);
+	return me.current.seqPos < 0 || me.current.seqPos >= len;
+}
+
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+isClipped(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me)
+{
+	return me.current.gapPos == me.nextAnchor.gapPos;
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TGapAnchors>
+inline typename Size<TGaps>::Type
+countGaps(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me)
+{
+	typedef typename Size<TGaps>::Type TGapsSize;
+	
+SEQAN_CHECKPOINT
+	if (isGap(me))
+		return me.nextAnchor.gapPos - me.current.gapPos;
+	else
+		return 0;
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+atBegin(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me)
+{
+//	return me.current.seqPos == 0 && me.current.gapPos == 0;
+	return me.current <= me.viewBegin;
+}
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+atBegin(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me)
+{
+//	return me.current.seqPos == 0 && me.current.gapPos == 0;
+	return me.current <= me.viewBegin;
+}
+
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+atEnd(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me)
+{
+//	return me.current == me.nextAnchor;
+	return me.current >= me.viewEnd;
+}
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+atEnd(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me)
+{
+//	return me.current == me.nextAnchor;
+	return me.current >= me.viewEnd;
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+operator == (
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & left,
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & right)
+{
+	return left.current == right.current;
+}
+
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+operator != (
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & left,
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & right)
+{
+	return left.current != right.current;
+}
+
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+operator < (
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & left,
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & right)
+{
+	return left.current < right.current;
+}
+
+template <typename TGaps, typename TGapAnchors>
+inline bool 
+operator > (
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & left,
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & right)
+{
+	return left.current > right.current;
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TGapAnchors, typename TCount>
+inline void
+insertGaps(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me,
+		   TCount size)
+{
+	TGapAnchors & anchors = _dataAnchors(*me.data_container);
+	typedef typename Iterator<TGapAnchors, Standard>::Type TIter;
+	typedef typename Value<TGapAnchors>::Type TGapAnchor;
+
+	if (size <= 0) return;
+	
+	// insert a new anchor
+	if (!isGap(me))
+	{
+		if (me.prevAnchor.gapPos == me.current.gapPos)
+		{
+			me.nextAnchor = me.prevAnchor;
+			_getAnchor(me.prevAnchor, *me.data_container, --me.anchorIdx);
+		}
+		else
+		{
+			me.nextAnchor = me.current;
+			insertValue(anchors, me.anchorIdx, me.nextAnchor, Generous());
+		}
+	}
+	else
+	{
+		if (me.anchorIdx >= (int)length(anchors)) return;
+		if (empty(anchors))
+			appendValue(anchors, me.nextAnchor, Generous());
+	}
+	if (me.anchorIdx < (int)length(anchors))
+	{
+		if (me.anchorIdx >= 0)
+			me.nextAnchor.gapPos += size;
+		TIter it = begin(anchors, Standard());
+		TIter itEnd = end(anchors, Standard());
+		if (me.anchorIdx >= 0)
+			it += me.anchorIdx;
+		for (; it != itEnd; ++it)
+			(*it).gapPos += size;
+	}
+	if (me.current.gapPos <= me.viewEnd.gapPos)
+		me.viewEnd.gapPos += size;
+/*
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > it2 = begin(*me.data_container) + me.current.gapPos;
+	if (me.current != it2.current || me.prevAnchor != it2.prevAnchor || me.nextAnchor != it2.nextAnchor || me.anchorIdx != it2.anchorIdx)
+		std::cout<<"*";
+*/
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TGapAnchors, typename TCount>
+inline void
+removeGaps(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me,
+		   TCount size)
+{
+	TGapAnchors & anchors = _dataAnchors(*me.data_container);
+	typedef typename Iterator<TGapAnchors, Standard>::Type TIter;
+	typedef typename Value<TGapAnchors>::Type TGapAnchor;
+
+	if (size <= 0 || !isGap(me)) return;
+	
+	if (me.current.gapPos + size > me.nextAnchor.gapPos)
+		size = me.nextAnchor.gapPos - me.current.gapPos;
+	
+	if (me.prevAnchor.gapPos + me.current.seqPos == me.current.gapPos + me.prevAnchor.seqPos &&
+		me.current.gapPos + size == me.nextAnchor.gapPos)
+	{	
+		// remove the gap
+		if (me.anchorIdx < (int)length(anchors))
+			erase(anchors, me.anchorIdx);
+		_getAnchor(me.nextAnchor, *me.data_container, me.anchorIdx);
+	}
+
+	// shift anchors
+	if (me.anchorIdx < (int)length(anchors))
+	{
+		me.nextAnchor.gapPos -= size;	
+		if (me.anchorIdx >= 0)
+			me.nextAnchor.gapPos += size;
+		TIter it = begin(anchors, Standard());
+		TIter itEnd = end(anchors, Standard());
+		if (me.anchorIdx >= 0)
+			it += me.anchorIdx;
+		for (; it != itEnd; ++it)
+			(*it).gapPos -= size;
+	}
+	if (me.current.gapPos <= me.viewEnd.gapPos)
+		me.viewEnd.gapPos -= size;
+/*
+	Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > it2 = begin(*me.data_container) + me.current.gapPos;
+	if (me.current != it2.current || me.prevAnchor != it2.prevAnchor || me.nextAnchor != it2.nextAnchor || me.anchorIdx != it2.anchorIdx)
+		std::cout<<"*";
+*/
+}
+
+//____________________________________________________________________________
+
+template <typename T>
+inline void 
+_goNextGapAnchorIterator(T & me)
+{
+	if (me.current.gapPos < me.nextAnchor.gapPos)
+	{
+		++me.current.gapPos;
+		if (me.current.seqPos < me.nextAnchor.seqPos)
+			++me.current.seqPos;
+	}
+	while (me.current.gapPos == me.nextAnchor.gapPos)
+	{
+		me.current = me.prevAnchor = me.nextAnchor;
+		_getAnchor(me.nextAnchor, *me.data_container, ++me.anchorIdx + 1);
+	}
+}
+
+template <typename T>
+inline void 
+_goPreviousGapAnchorIterator(T & me)
+{	
+	while (me.current.gapPos == me.prevAnchor.gapPos)
+	{
+		me.current = me.nextAnchor = me.prevAnchor;
+		_getAnchor(me.prevAnchor, *me.data_container, --me.anchorIdx);
+	}
+	--me.current.gapPos;
+	if (me.nextAnchor.seqPos - me.prevAnchor.seqPos > me.current.gapPos - me.prevAnchor.gapPos)
+		me.current.seqPos = me.prevAnchor.seqPos + (me.current.gapPos - me.prevAnchor.gapPos);
+	else
+		me.current.seqPos = me.nextAnchor.seqPos;
+}
+
+
+template <typename T, typename TPos>
+inline void 
+_goToGapAnchorIterator(T & me, TPos pos)
+{
+	typedef typename T::TGapAnchors	TGapAnchors;
+	typedef typename T::TGapAnchor	TGapAnchor;
+	typedef typename Position<typename Value<TGapAnchors>::Type >::Type TAnchorPos;
+
+	if (_helperIsNegative(pos, typename IsSameType<TPos, typename MakeSigned_<TPos>::Type>::Type()))
+		me.anchorIdx = -1;
+	else
+	{
+		TGapAnchors const & anchors = _dataAnchors(*me.data_container);
+		if (!empty(anchors))
+		{
+			me.anchorIdx = upperBoundGapAnchor(anchors, pos, SortGapPos()) - begin(anchors, Standard());
+			if (me.anchorIdx < (int)length(anchors))
+				if (anchors[me.anchorIdx].gapPos == (TAnchorPos)pos && anchors[me.anchorIdx].seqPos != (TAnchorPos)me.seqLength)
+					++me.anchorIdx;
+		}
+		else 
+			me.anchorIdx = (pos < (TPos)me.seqLength)? 0: 1;
+	}
+	_getAnchor(me.prevAnchor, *me.data_container, me.anchorIdx);
+	_getAnchor(me.nextAnchor, *me.data_container, me.anchorIdx + 1);
+
+	me.current.gapPos = pos;
+	if (me.nextAnchor.seqPos - me.prevAnchor.seqPos > (int)pos - me.prevAnchor.gapPos)
+		me.current.seqPos = me.prevAnchor.seqPos + ((int)pos - me.prevAnchor.gapPos);
+	else
+		me.current.seqPos = me.nextAnchor.seqPos;
+}
+
+//____________________________________________________________________________
+
+template <typename TGaps, typename TGapAnchors>
+inline void
+goNext(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me)
+{
+	_goNextGapAnchorIterator(me);
+}
+
+template <typename TGaps, typename TGapAnchors>
+inline void
+goPrevious(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me)
+{
+	_goPreviousGapAnchorIterator(me);
+}
+
+template <typename TGaps, typename TGapAnchors, typename TSize>
+inline void
+goFurther(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me, TSize steps)
+{
+	_goToGapAnchorIterator(me, me.current.gapPos + steps);
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_align_intervals.h b/src/SeqAn-1.3/seqan/store/store_align_intervals.h
new file mode 100644
index 0000000..45c3270
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_align_intervals.h
@@ -0,0 +1,357 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_ALIGN_INTERVALS_H
+#define SEQAN_HEADER_STORE_ALIGN_INTERVALS_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// MatchedIntervals Store
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TValue = int >
+struct Interval
+{
+	TValue i1;
+	TValue i2;
+	
+	Interval() : i1(0), i2(0) {}
+};
+
+template<typename TValue>
+inline bool
+operator == (Interval<TValue> const & interval1, Interval<TValue> const & interval2)
+{
+	return (interval1.i1 == interval2.i1 && interval1.i2 == interval2.i2);
+}
+
+template<typename TValue>
+inline bool
+operator < (Interval<TValue> const & interval1, Interval<TValue> const & interval2)
+{
+	return (interval1.i1 < interval2.i1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+template <typename TInterval = Interval<unsigned>, typename TSpec = void>         
+struct AlignIntervalsStoreElement
+{
+	typedef  String<TInterval> 	TIntervals;
+	
+	TIntervals intervals; 
+};
+
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+template<typename TAlignIntervalsStore, typename TSpec, typename TConfig >
+inline void
+buildAlignIntervalsStore(TAlignIntervalsStore & alignIntervalsStore, 			
+                         FragmentStore<TSpec, TConfig> & me, const unsigned & thresholdGaps)  						
+{	
+	typedef typename FragmentStore<TSpec, TConfig>::TAlignedReadStore 	TAlignedReadStore;
+	typedef typename FragmentStore<TSpec, TConfig>::TContigStore 		TContigStore;
+	typedef typename FragmentStore<TSpec, TConfig>::TReadGapAnchor 		TReadGapAnchor;
+	typedef typename FragmentStore<TSpec, TConfig>::TContigGapAnchor 	TContigGapAnchor;
+	typedef typename Value<TAlignedReadStore>::Type 			TAlignedReadStoreElement;
+	
+	typedef typename Value<TAlignIntervalsStore>::Type	 		TAlignIntervalsStoreElement;
+	typedef typename TAlignIntervalsStoreElement::TIntervals 		TIntervals;
+
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type 		TAlignIter;
+	typedef typename Iterator<TAlignIntervalsStore>::Type 			TAlignIntervalsStoreIter;
+	
+	if (!empty(me.alignedReadStore))
+	{
+		resize(alignIntervalsStore, length(me.alignedReadStore));
+	
+		TAlignIntervalsStoreIter it = begin(alignIntervalsStore);
+
+		TAlignIter itAlign = begin(me.alignedReadStore);
+		TAlignIter itAlignEnd = end(me.alignedReadStore);
+		
+		// get matched intervals for each aligned read
+		for ( ; itAlign != itAlignEnd; goNext(itAlign), goNext(it))
+		{
+			extractAlignIntervals(value(it).intervals, getValue(itAlign), me, thresholdGaps);
+		}
+	}
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////// extract contig intervals of aligned read
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+template<typename TIntervals, typename TAlignedReadStoreElement, typename TSpec, typename TConfig>
+inline void 
+extractAlignIntervals(TIntervals & contigIntervals, TAlignedReadStoreElement & align, FragmentStore<TSpec, TConfig> & me, const unsigned & thresholdGaps)
+{
+
+	////////////////////////////////////////////////////////////////////////////////////////////////////////
+	///////// get read intervals in gapped contig sequence:		
+	
+	typedef typename FragmentStore<TSpec, TConfig>::TContigPos 		TContigPos;
+	typedef typename FragmentStore<TSpec, TConfig>::TReadGapAnchor 		TReadGapAnchor;
+	typedef 	 String<TReadGapAnchor> 				TReadGaps;
+	typedef typename Position<TReadGaps >::Type 				TGapPos;
+	typedef typename Value<TIntervals>::Type 				TInterval;
+	typedef typename Iterator<TReadGaps>::Type 				TReadGapsIter;
+	
+	clear(contigIntervals);
+	
+	TIntervals readIntervals;
+	
+	TContigPos beginPos = align.beginPos;
+	TContigPos endPos = align.endPos;
+	if (beginPos > endPos)
+	{
+		TContigPos help = beginPos;
+		beginPos = endPos;
+		endPos = help;
+	}
+	TInterval interval;
+	if (length(align.gaps) == 0)
+	{
+		resize(readIntervals, 1, Generous());
+		interval.i1 = beginPos;
+		interval.i2 = endPos -1;
+		assignValue(readIntervals, 0, interval);
+	}
+	else 
+	{
+		TReadGapsIter itGap = begin(align.gaps);
+		TReadGapsIter itGapEnd = end(align.gaps);
+	
+		TContigPos firstSeqPos = getValue(itGap).seqPos + beginPos;   // seqPos from Read projected to pos in ungapped contig sequence
+		TContigPos firstGapPos = getValue(itGap).gapPos + beginPos;   // gapPos from Read projected to pos in ungapped contig sequence
+		TGapPos i = 0;
+		// without gaps at the beginnig
+		if (beginPos < firstGapPos) 		// end != 0 ??
+		{
+			resize(readIntervals, length(align.gaps), Generous());
+			interval.i1 = beginPos; 
+			interval.i2 = firstSeqPos - 1;
+			assignValue(readIntervals, i, interval);
+			++i;
+		}
+		// with gaps at the beginning
+		else resize(readIntervals, length(align.gaps) -1, Generous());
+		
+		TContigPos seqPos1 = 0;
+		TContigPos gapPos1 = 0;
+		TContigPos seqPos2 = firstSeqPos;
+		TContigPos gapPos2 = firstGapPos;
+		goNext(itGap);
+		// calculate interval between 2 gaps:
+		for (; itGap != itGapEnd; goNext(itGap), ++i)
+		{
+			seqPos1 = seqPos2;
+			gapPos1 = gapPos2;
+			seqPos2 = getValue(itGap).seqPos + beginPos;
+			gapPos2 = getValue(itGap).gapPos + beginPos;
+			interval.i1 = gapPos1;					// ==  gapPos of Gap-Anchor1  + beginPos 
+			interval.i2 = seqPos2 + gapPos1 - seqPos1 - 1;   	// ==  gapPos2 - ((gapPos2-seqPos2) - (gapPos1-seqPos1)) - 1
+			assignValue(readIntervals, i, interval);
+		}
+		
+		// without gaps at the end
+		if (endPos != gapPos2)
+		{
+			interval.i1 = gapPos2;
+			interval.i2 = endPos - 1;
+			appendValue(readIntervals, interval, Generous());
+		}
+		
+		// with gaps at the end
+		else if (endPos == gapPos2)
+		{
+			interval.i1 = gapPos1;
+			interval.i2 = endPos - 1;
+			assignValue(readIntervals, i - 1, interval);
+		}
+	}
+	
+	////////////////////////////////////////////////////////////////////////////////////////////////////////
+	///////// get contig intervals in ungapped sequence:
+	
+	typedef typename TAlignedReadStoreElement::TId 				TId;
+	typedef typename FragmentStore<TSpec, TConfig>::TContigGapAnchor 	TContigGapAnchor;
+	typedef		 String<TContigGapAnchor> 				TContigGaps;
+	typedef typename Iterator<TContigGaps >::Type 				TContigGapsIter;
+	typedef typename Iterator<TIntervals>::Type 				TReadIntervalIter;
+	
+	
+	TId contigId = align.contigId;
+	
+	if (empty(getValue(me.contigStore, contigId).gaps))
+	{
+		contigIntervals = readIntervals;
+	}
+	else
+	{
+		if (front(getValue(me.contigStore, contigId).gaps).seqPos != 0) 
+		{
+			TContigGapAnchor pseudoGapAnchor;
+			pseudoGapAnchor.seqPos = 0;
+			pseudoGapAnchor.gapPos = 0;
+			insertValue(value(me.contigStore, contigId).gaps, 0, pseudoGapAnchor, Generous());
+		}
+		
+		TReadIntervalIter itI = begin(readIntervals);
+		TReadIntervalIter itIEnd = end(readIntervals);
+		
+		TContigGapsIter it1Gap = begin(getValue(me.contigStore, contigId).gaps);
+		TContigGapsIter it2Gap = begin(getValue(me.contigStore, contigId).gaps);
+		TContigGapsIter it2GapEnd = end(getValue(me.contigStore, contigId).gaps);
+		goNext(it2Gap);
+		TInterval contigInterval;
+		TInterval readInterval;
+		TContigPos lastGapPosBeforeGap1;
+		TContigPos lastGapPosBeforeGap2;
+		for ( ; itI != itIEnd; goNext(itI))
+		{
+			readInterval = getValue(itI);
+
+			if (static_cast<TContigPos>(readInterval.i2) < getValue(it1Gap).gapPos) continue;    		// interval-positions are smaller than first-position of contig: read-interval mappt in contig gaps
+		
+			// interval i1:
+			while ( (it2Gap != it2GapEnd) && (static_cast<TContigPos>(readInterval.i1) >= getValue(it2Gap).gapPos) )   // iterate over 2 contig gap-anchors, until gapPos2 is behind start of read-interval
+			{
+				goNext(it1Gap);
+				goNext(it2Gap);
+			}
+		
+			if (it2Gap != it2GapEnd)
+			{
+				lastGapPosBeforeGap1 = getValue(it2Gap).seqPos + getValue(it1Gap).gapPos - getValue(it1Gap).seqPos -1;  // last position in gapped sequence before gap 
+			
+				if (static_cast<TContigPos>(readInterval.i1) < getValue(it1Gap).gapPos)  				// occurs, if interval.i1 position is smaller than start-postion of contig
+				{
+					contigInterval.i1 = getValue(it1Gap).gapPos;
+				}
+				else if (static_cast<TContigPos>(readInterval.i1) <= lastGapPosBeforeGap1)				// read-interval starts in contig-interval between the 2 gaps		
+				{
+					contigInterval.i1 = readInterval.i1 - (getValue(it1Gap).gapPos - getValue(it1Gap).seqPos);  // project position onto ungapped sequence
+				}
+				else if (static_cast<TContigPos>(readInterval.i2) < getValue(it2Gap).gapPos)				// whole read-interval lies in gaps of contig
+				{
+					continue;
+				}
+				else 										// read-interval starts in contig gap -> alignment-interval starts in seqPos2
+				{
+					contigInterval.i1 = getValue(it2Gap).seqPos;
+				}
+			}
+			else		// read-interval lies behind last gap-anchor
+			{
+				goPrevious(it1Gap);
+				goPrevious(it2Gap);
+				contigInterval.i1 = readInterval.i1 - (getValue(it2Gap).gapPos - getValue(it2Gap).seqPos); // not goPrev -> it1Gap
+			}
+		
+			// interval i2:	
+			while ( (it2Gap != it2GapEnd) && (static_cast<TContigPos>(readInterval.i2) >= getValue(it2Gap).gapPos) )		// iterate over 2 contig gap-anchors, until gapPos2 is behind end of read-interval
+			{
+				goNext(it1Gap);
+				goNext(it2Gap);
+			}
+	
+			if (it2Gap != it2GapEnd)
+			{
+				lastGapPosBeforeGap2 = getValue(it2Gap).seqPos + getValue(it1Gap).gapPos - getValue(it1Gap).seqPos -1;  // last position in gapped sequence before gap 
+				
+				if (static_cast<TContigPos>(readInterval.i2) <= lastGapPosBeforeGap2)					// read-interval ends in contig-interval between the 2 gaps	
+				{
+					contigInterval.i2 = readInterval.i2 - (getValue(it1Gap).gapPos - getValue(it1Gap).seqPos);    // project position onto ungapped sequence
+				}
+				else 										// read-interval ends in gap -> end of alignment-interval is last position before gap
+				{
+					contigInterval.i2 = lastGapPosBeforeGap2 - (getValue(it1Gap).gapPos - getValue(it1Gap).seqPos);
+				}
+			}
+			else if (it2Gap == it2GapEnd)				// read-intervall ends behind the last gap-anchor
+			{
+				goPrevious(it1Gap);
+				goPrevious(it2Gap);
+				contigInterval.i2 = readInterval.i2 - (getValue(it2Gap).gapPos - getValue(it2Gap).seqPos);
+			}	
+		
+			appendValue(contigIntervals, contigInterval, Generous());
+		}
+	}
+	mergeIntervals(contigIntervals, thresholdGaps);
+	
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+//// merge intervals (for sortet intervals; i1 <= i2 <= (i+1)1 <= (i+1)2 )
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+template<typename TIntervals>
+inline void
+mergeIntervals(TIntervals & intervals, const unsigned & thresholdGaps)
+{
+	typedef typename Position<TIntervals>::Type 	TPos;
+	typedef typename Value<TIntervals>::Type 	TInterval;
+	
+	TPos j;
+	TInterval newInterval;
+	for (TPos i = 0; i < length(intervals) - 1; ++i)
+	{
+		j = i;
+		while ( (j < length(intervals) - 1) && (getValue(intervals, j).i2 + thresholdGaps >= getValue(intervals, j + 1).i1 - 1) )		// merges intervals, if the no. of gaps inbetween is smaller than threshold 
+		{
+			++j;
+		}
+		
+		if ( j != i)
+		{
+			newInterval.i1 = getValue(intervals, i).i1;
+			newInterval.i2 = getValue(intervals, j).i2;
+			replace(intervals, i, j + 1, newInterval);       
+		}
+		
+	}
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_all.h b/src/SeqAn-1.3/seqan/store/store_all.h
new file mode 100644
index 0000000..6060d0e
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_all.h
@@ -0,0 +1,2004 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_ALL_H
+#define SEQAN_HEADER_STORE_ALL_H
+
+//#include <stdio.h>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Name Store Cache
+//////////////////////////////////////////////////////////////////////////////
+
+	template <typename TNameStore, typename TName>
+	struct NameStoreLess
+	{
+		typedef typename Position<TNameStore>::Type TId;
+
+		TNameStore *store;
+		TName *name;
+		
+		NameStoreLess() {}
+
+		NameStoreLess(TNameStore &_store, TName &_name):
+			store(&_store),
+			name(&_name) {}
+		
+		template <typename TId>
+		inline bool operator() (TId a, TId b) const
+		{
+			if (a != maxValue(a))
+			{
+				if (b != maxValue(b))
+					return (*store)[a] < (*store)[b];
+				else
+					return (*store)[a] < *name;
+			} else
+			{
+				if (b != maxValue(b))
+					return *name < (*store)[b];
+				else
+					return false;
+			}
+		}
+	};
+
+/**
+.Class.NameStoreCache
+..summary:Stores a mapping from names to ids.
+..cat:Fragment Store
+..signature:FragmentStore<>
+..signature:NameStoreCache<TNameStore[, TName]>
+..param.TNameStore:The name store to be cached.
+...see:Class.FragmentStore
+..param.TName:The name type.
+...default:$Value<TNameStore>::Type$
+...type:Shortcut.CharString
+
+.Memvar.NameStoreCache#NameStoreCache
+..summary:Constructor
+..signature:NameStoreCache<TNameStore, TName> (nameStore)
+..param.nameStore:A name store, e.g. @Memvar.FragmentStore#readNameStore@
+...see:Class.FragmentStore
+..class:Class.NameStoreCache
+..include:seqan/store.h
+*/
+	
+	template <typename TNameStore, typename TName = typename Value<TNameStore>::Type>
+	struct NameStoreCache
+	{
+		typedef typename Position<TNameStore>::Type TId;
+		typedef NameStoreLess<TNameStore, TName> TLess;
+		typedef std::set<TId, TLess> TSet;
+		
+		TSet nameSet;
+		TNameStore &store;
+		TName name;
+
+		NameStoreCache(TNameStore &_store):
+			nameSet(TLess(_store, name)),
+			store(_store)
+		{
+			for (unsigned i = 0; i < length(store); ++i)
+				nameSet.insert(i);
+		}
+	};
+
+//////////////////////////////////////////////////////////////////////////////
+// refresh
+
+/**
+.Function.refresh:
+..summary:Recreate a name store cache.
+..cat:Fragment Store
+..signature:refresh(cache)
+..param.cache:A @Class.NameStoreCache@ object.
+...type:Class.NameStoreCache
+..see:Function.getIdByName
+..include:seqan/store.h
+*/
+    
+    template <typename TNameStore, typename TName>
+    inline void
+    refresh(NameStoreCache<TNameStore, TName> &cache)
+    {
+		cache.nameSet.clear();
+		for (unsigned i = 0; i < length(cache.store); ++i)
+			cache.nameSet.insert(i);
+	}
+		
+
+//////////////////////////////////////////////////////////////////////////////
+// getIdByName
+    
+/**
+.Function.getIdByName:
+..summary:Appends a name to a name store.
+..cat:Fragment Store
+..signature:getIdByName(nameStore, name, id[, cache])
+..param.nameStore:A name store, e.g. @Memvar.FragmentStore#readNameStore@
+...see:Class.FragmentStore
+..param.name:The name to be searched.
+...type:Shortcut.CharString
+..param.id:The resulting id.
+..param.cache:A structure to efficiently retrieve the id for a given name. If ommited a brute force method is used to search.
+...default:Tag.Nothing
+...type:Class.NameStoreCache
+..returns:$true$ if the name was found and $false$ if not.
+..see:Function.getIdByName
+..include:seqan/store.h
+*/
+
+    template <typename TNameStore, typename TName, typename TPos>
+    inline bool 
+    getIdByName(TNameStore &store, TName &name, TPos &pos)
+    {
+        typedef typename Iterator<TNameStore, Standard>::Type TNameStoreIter;
+        
+        // Iterator over read names
+        for (TNameStoreIter iter = begin(store); iter != end(store); ++iter)
+		{
+            // if the element was found
+            if (name == getValue(iter))
+			{
+                // set the ID
+                pos = position(iter);
+                // and break the loop
+                return true;
+            }
+        }
+        return false;
+    }
+	
+    template <typename TNameStore, typename TName, typename TPos, typename TContext>
+    inline bool 
+    getIdByName(TNameStore &store, TName &name, TPos &pos, TContext &)
+	{
+		return getIdByName(store, name, pos);
+	}
+    
+    template<typename TNameStore, typename TName, typename TPos, typename TCNameStore, typename TCName>
+    inline bool 
+    getIdByName(TNameStore &, TName &name, TPos &pos, NameStoreCache<TCNameStore, TCName> &context)
+    {
+        typedef Iterator<StringSet<CharString> >::Type TNameStoreIter;
+		typedef typename Position<TNameStore>::Type TId;
+		typedef NameStoreCache<TCNameStore, TCName> TNameStoreCache;
+		typedef typename TNameStoreCache::TSet TSet;
+		
+		TSet const &set = context.nameSet;	
+		context.name = name;
+		
+		typename TSet::const_iterator it = set.find(maxValue<TId>());
+		if (it != set.end())
+		{
+			pos = *it;
+			return true;
+		}
+		return false;
+    }
+	
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.appendName:
+..summary:Appends a name to a name store.
+..cat:Fragment Store
+..signature:appendName(nameStore, name[, cache])
+..param.nameStore:A name store, e.g. @Memvar.FragmentStore#readNameStore@
+...see:Class.FragmentStore
+..param.name:The name to be appended.
+...type:Shortcut.CharString
+..param.cache:A structure to efficiently retrieve the id for a given name. See @Function.getIdByName at .
+...default:Tag.Nothing
+...type:Class.NameStoreCache
+..see:Function.getIdByName
+..include:seqan/store.h
+*/
+
+    template <typename TNameStore, typename TName>
+    inline void
+    appendName(TNameStore &store, TName &name)
+    {
+		appendValue(store, name, Generous());
+	}
+	
+    template <typename TNameStore, typename TName, typename TContext>
+    inline void
+    appendName(TNameStore &store, TName &name, TContext &)
+    {
+		appendName(store, name, Generous());
+	}
+	
+    template <typename TNameStore, typename TName, typename TCNameStore, typename TCName>
+    inline void
+    appendName(TNameStore &store, TName &name, NameStoreCache<TCNameStore, TCName> &context)
+    {
+		appendValue(store, name, Generous());
+		context.nameSet.insert(length(store) - 1);
+    }
+	
+
+//////////////////////////////////////////////////////////////////////////////
+// Contig Store Configuration
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec = void>
+struct FragmentStoreConfig 
+{
+	typedef String<Dna5Q>	TReadSeq;
+	typedef String<Dna5Q>	TContigSeq;
+	
+	typedef double			TMean;
+	typedef double			TStd;
+	typedef signed char		TMappingQuality;
+		
+	typedef void					TReadStoreElementSpec;
+	typedef Owner<ConcatDirect<> >	TReadSeqStoreSpec;
+	typedef void					TMatePairStoreElementSpec;
+	typedef void					TLibraryStoreElementSpec;
+	typedef void					TContigStoreElementSpec;
+	typedef void					TContigFileSpec;
+	typedef void					TAlignedReadStoreElementSpec;
+	typedef Owner<ConcatDirect<> >	TAlignedReadTagStoreSpec;
+	typedef void					TAnnotationStoreElementSpec;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Fragment Store
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.FragmentStore
+..summary:Multi-Container to store contigs, reads and a multiple alignment between them.
+..cat:Fragment Store
+..signature:FragmentStore<>
+..signature:FragmentStore<TSpec[, TConfig]>
+..param.TSpec:The specializing type.
+...default:$void$
+..param.TConfig:The configuration struct.
+...default:$FragmentStoreConfig<TSpec>$
+
+.Typedef.FragmentStore#TReadStore
+..summary:Type of the $readStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TReadSeqStore
+..summary:Type of the $readSeqStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TMatePairStore
+..summary:Type of the $matePairStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TLibraryStore
+..summary:Type of the $libraryStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TContigFileStore
+..summary:Type of the $contigFileStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TContigStore
+..summary:Type of the $contigStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TAlignedReadStore
+..summary:Type of the $alignedReadStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TAnnotationStore
+..summary:Type of the $annotationStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TAlignQualityStore
+..summary:Type of the $alignQualityStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TAlignedReadTagStore
+..summary:Type of the $alignedReadTagStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TReadNameStore
+..summary:Type of the $readNameStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TMatePairNameStore
+..summary:Type of the $matePairNameStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TLibraryNameStore
+..summary:Type of the $libraryNameStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TContigNameStore
+..summary:Type of the $contigNameStore$ member.
+..class:Class.FragmentStore
+.Typedef.FragmentStore#TAnnotationNameStore
+..summary:Type of the $annotationNameStore$ member.
+..class:Class.FragmentStore
+
+.Memvar.FragmentStore#readStore
+..summary:String that maps from $readId$ to $<matePairId>$.
+..remarks:Value type is @Class.ReadStoreElement at .
+..type:Typedef.FragmentStore#TReadStore
+..class:Class.FragmentStore
+.Memvar.FragmentStore#readSeqStore
+..summary:String that maps from $readId$ to $readSeq$.
+..type:Typedef.FragmentStore#TReadSeqStore
+..class:Class.FragmentStore
+.Memvar.FragmentStore#matePairStore
+..summary:String that maps from $matePairId$ to $<readId[2], libId>$.
+..type:Typedef.FragmentStore#TMatePairStore
+..remarks:Value type is @Class.MatePairStoreElement at .
+..class:Class.FragmentStore
+.Memvar.FragmentStore#libraryStore
+..summary:String that maps from $libId$ to $<mean, std>$.
+..type:Typedef.FragmentStore#TLibraryStore
+..remarks:Value type is @Class.LibraryStoreElement at .
+..class:Class.FragmentStore
+.Memvar.FragmentStore#contigFileStore
+..summary:String that maps from $contigFileId$ to $<fileName, firstContigId>$.
+..type:Typedef.FragmentStore#TContigFileStore
+..remarks:Value type is @Class.ContigFile at .
+..class:Class.FragmentStore
+.Memvar.FragmentStore#contigStore
+..summary:String that maps from $contigId$ to $<contigSeq, contigGaps, contigFileId>$.
+..type:Typedef.FragmentStore#TContigStore
+..remarks:Value type is @Class.ContigStoreElement at .
+..class:Class.FragmentStore
+.Memvar.FragmentStore#alignedReadStore
+..summary:String that stores $<alignId, readId, contigId, pairMatchId, beginPos, endPos, gaps>$.
+..type:Typedef.FragmentStore#TAlignedReadStore
+..remarks:Value type is @Class.AlignedReadStoreElement at .
+..class:Class.FragmentStore
+.Memvar.FragmentStore#annotationStore
+..summary:String that maps from $annoId$ to $<contigId, typeId, beginPos, endPos, parentId, lastChildId, nextSiblingId, values>$.
+..type:Typedef.FragmentStore#TAnnotationStore
+..class:Class.FragmentStore
+.Memvar.FragmentStore#alignQualityStore
+..summary:String that maps from $alignId$ to $<pairScore, score, errors>$.
+..type:Typedef.FragmentStore#TAlignQualityStore
+..remarks:Value type is @Class.AlignQualityStoreElement at .
+..class:Class.FragmentStore
+.Memvar.FragmentStore#alignedReadTagStore
+..summary:String that maps from $alignId$ to $alignTag$.
+..type:Typedef.FragmentStore#TAlignedReadTagStore
+..class:Class.FragmentStore
+.Memvar.FragmentStore#readNameStore
+..summary:String that maps from $readId$ to $readName$.
+..type:Typedef.FragmentStore#TReadNameStore
+..class:Class.FragmentStore
+.Memvar.FragmentStore#matePairNameStore
+..summary:String that maps from $contigId$ to $contigName$.
+..type:Typedef.FragmentStore#TMatePairNameStore
+..class:Class.FragmentStore
+.Memvar.FragmentStore#libraryNameStore
+..summary:String that maps from $libId$ to $libName$.
+..type:Typedef.FragmentStore#TLibraryNameStore
+..class:Class.FragmentStore
+.Memvar.FragmentStore#contigNameStore
+..summary:String that maps from $contigId$ to $contigName$.
+..type:Typedef.FragmentStore#TContigNameStore
+..class:Class.FragmentStore
+.Memvar.FragmentStore#annotationNameStore
+..summary:String that maps from $annoId$ to $annoName$.
+..type:Typedef.FragmentStore#TAnnotationNameStore
+..class:Class.FragmentStore
+..include:seqan/store.h
+*/
+
+
+template <typename TSpec = void, typename TConfig = FragmentStoreConfig<TSpec> >
+class FragmentStore
+{
+private:
+	typedef typename TConfig::TReadStoreElementSpec			TReadStoreElementSpec;
+	typedef typename TConfig::TReadSeqStoreSpec				TReadSeqStoreSpec;
+	typedef typename TConfig::TMatePairStoreElementSpec		TMatePairStoreElementSpec;
+	typedef typename TConfig::TLibraryStoreElementSpec		TLibraryStoreElementSpec;
+	typedef typename TConfig::TContigStoreElementSpec		TContigStoreElementSpec;
+	typedef typename TConfig::TContigFileSpec				TContigFileSpec;
+	typedef typename TConfig::TAlignedReadStoreElementSpec	TAlignedReadStoreElementSpec;
+	typedef typename TConfig::TAlignedReadTagStoreSpec		TAlignedReadTagStoreSpec;
+	typedef typename TConfig::TAnnotationStoreElementSpec	TAnnotationStoreElementSpec;
+
+public:
+	typedef typename TConfig::TMean					TMean;
+	typedef typename TConfig::TStd					TStd;
+	typedef typename TConfig::TMappingQuality		TMappingQuality;
+	
+	typedef typename TConfig::TReadSeq				TReadSeq;
+	typedef typename TConfig::TContigSeq			TContigSeq;
+
+	typedef typename Position<TReadSeq>::Type		TRSeqPos_;
+	typedef typename Position<TContigSeq>::Type     TCSeqPos_;
+	typedef typename MakeSigned_<TRSeqPos_>::Type	TReadPos;
+	typedef typename MakeSigned_<TCSeqPos_>::Type	TContigPos;
+	
+	typedef GapAnchor<TReadPos>						TReadGapAnchor;
+	typedef GapAnchor<TContigPos>					TContigGapAnchor;
+	
+	typedef StringSet<CharString>					TNameStore;
+
+	typedef AnnotationStoreElement< TContigPos, TAnnotationStoreElementSpec >	TAnnotationStoreElement;
+	typedef typename TAnnotationStoreElement::TId								TAnnotationStoreElementId;
+
+	typedef String< ReadStoreElement< TReadStoreElementSpec > >												TReadStore;
+	typedef String< MatePairStoreElement< TMatePairStoreElementSpec > >										TMatePairStore;
+	typedef String< LibraryStoreElement< TMean, TStd, TLibraryStoreElementSpec > >							TLibraryStore;
+	typedef String< ContigStoreElement< TContigSeq, TContigGapAnchor, TContigStoreElementSpec > >			TContigStore;
+	typedef String< ContigFile< TContigFileSpec > >															TContigFileStore;
+	typedef String< AlignedReadStoreElement< TContigPos, TReadGapAnchor, TAlignedReadStoreElementSpec > >	TAlignedReadStore;
+	typedef String< AlignQualityStoreElement< TMappingQuality >	>											TAlignQualityStore;
+	typedef StringSet<CharString, TAlignedReadTagStoreSpec>													TAlignedReadTagStore;
+	typedef String< TAnnotationStoreElement >																TAnnotationStore;
+	typedef String< IntervalTree< TContigPos, TAnnotationStoreElementId > >									TIntervalTreeStore;
+	typedef StringSet<TReadSeq, TReadSeqStoreSpec>															TReadSeqStore;
+	
+	typedef TNameStore																						TReadNameStore;
+	typedef TNameStore																						TMatePairNameStore;
+	typedef TNameStore																						TLibraryNameStore;
+	typedef TNameStore																						TContigNameStore;
+	typedef TNameStore																						TAnnotationNameStore;
+	typedef TNameStore																						TAnnotationTypeStore;
+	typedef TNameStore																						TAnnotationKeyStore;
+	
+	// main containers
+	TReadStore			readStore;			// readId       -> matePairId
+	TMatePairStore		matePairStore;		// matePairId   -> readId0, readId1, libraryId
+	TLibraryStore		libraryStore;		// libraryId    -> libSizeMean, libSizeStd
+	TContigStore		contigStore;		// contigId     -> contigSeq, contigGaps, contigFileId
+	TContigFileStore	contigFileStore;	// contigFileId -> fileName, firstContigId
+	TAlignedReadStore	alignedReadStore;	//              -> id, readId, contigId, pairMatchId (not matePairId!), beginPos, endPos, gaps
+	TAnnotationStore	annotationStore;	// annoId       -> parentId, contigId, beginPos, endPos
+	TIntervalTreeStore	intervalTreeStore_F;		// treeId (same as contigId)	-> intervalTree (F: forward strand)
+	TIntervalTreeStore	intervalTreeStore_R;		// 						(R: reverse complement strand)
+
+											// REMARKS: 
+											// 1)
+											//    beginPos <= endPos     forward strand
+											//    beginPos >  endPos     backward strand (reverse complement)
+											// 2) 
+											//    The alignedReadStore can arbitrarily be resorted. The unique identifier id should
+											//    be used to address additional information for each alignedRead in additional tables.
+
+	// we store the read sequences in a seperate stringset to reduce the memory overhead 
+	TReadSeqStore		readSeqStore;
+
+	// extra Sam fields
+	TAlignQualityStore		alignQualityStore;
+	TAlignedReadTagStore	alignedReadTagStore;
+
+	// retrieve the names of reads, mate-pairs, libraries, contigs, annotations by their ids
+	TReadNameStore			readNameStore;
+	TMatePairNameStore		matePairNameStore;
+	TLibraryNameStore		libraryNameStore;
+	TContigNameStore		contigNameStore;
+	TAnnotationNameStore	annotationNameStore;
+	TAnnotationTypeStore	annotationTypeStore;
+	TAnnotationKeyStore		annotationKeyStore;
+	
+	NameStoreCache<TReadNameStore, CharString>			readNameStoreCache;
+	NameStoreCache<TContigNameStore, CharString>		contigNameStoreCache;
+	NameStoreCache<TAnnotationNameStore, CharString>	annotationNameStoreCache;
+	NameStoreCache<TAnnotationTypeStore, CharString>	annotationTypeStoreCache;
+	NameStoreCache<TAnnotationKeyStore, CharString>		annotationKeyStoreCache;
+
+	enum {
+		ANNO_ROOT,
+		ANNO_DELETED,
+		ANNO_GENE,
+		ANNO_MRNA,
+		ANNO_CDS,
+		ANNO_EXON,
+		ANNO_FIVE_PRIME_UTR,
+		ANNO_INTRON,
+		ANNO_THREE_PRIME_UTR,
+		ANNO_PREDEFINED
+	};
+	
+	FragmentStore():
+		readNameStoreCache(readNameStore),
+		contigNameStoreCache(contigNameStore),
+		annotationNameStoreCache(annotationNameStore),
+		annotationTypeStoreCache(annotationTypeStore),
+		annotationKeyStoreCache(annotationKeyStore)
+	{
+		// ATTENTION: The order of these keywords must correspond to the order of the enums above.
+		appendName(annotationTypeStore, "<root>", annotationTypeStoreCache);
+		appendName(annotationTypeStore, "<deleted>", annotationTypeStoreCache);
+		appendName(annotationTypeStore, "gene", annotationTypeStoreCache);
+		appendName(annotationTypeStore, "mRNA", annotationTypeStoreCache);
+		appendName(annotationTypeStore, "CDS", annotationTypeStoreCache);
+		appendName(annotationTypeStore, "exon", annotationTypeStoreCache);
+		appendName(annotationTypeStore, "five_prime_UTR", annotationTypeStoreCache);
+		appendName(annotationTypeStore, "intron", annotationTypeStoreCache);
+		appendName(annotationTypeStore, "three_prime_UTR", annotationTypeStoreCache);
+		_storeClearAnnotations(*this);
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+    
+template < typename TSpec, typename TConfig >
+struct VertexDescriptor< FragmentStore<TSpec, TConfig> > 
+{
+	typedef FragmentStore<TSpec, TConfig>		TFragmentStore_;
+	typedef typename Id<TFragmentStore_>::Type	Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename TConfig, typename TSpec, typename TIterSpec >
+inline typename Iterator<FragmentStore<TSpec, TConfig>, TIterSpec >::Type
+begin(FragmentStore<TSpec, TConfig> &store, TIterSpec const) 
+{
+	return Iter<FragmentStore<TSpec, TConfig>, TIterSpec>(store);
+}
+
+template < typename TConfig, typename TSpec, typename TIterSpec >
+inline typename Iterator<FragmentStore<TSpec, TConfig> const, TIterSpec >::Type
+begin(FragmentStore<TSpec, TConfig> const &store, TIterSpec const) 
+{
+	return Iter<FragmentStore<TSpec, TConfig> const, TIterSpec>(store);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename TConfig, typename TSpec, typename TIterSpec >
+inline typename Iterator<FragmentStore<TSpec, TConfig>, TIterSpec >::Type
+end(FragmentStore<TSpec, TConfig> &store, TIterSpec const) 
+{
+	return Iter<FragmentStore<TSpec, TConfig>, TIterSpec>(store, MinimalCtor());
+}
+
+template < typename TConfig, typename TSpec, typename TIterSpec >
+inline typename Iterator<FragmentStore<TSpec, TConfig> const, TIterSpec >::Type
+end(FragmentStore<TSpec, TConfig> const &store, TIterSpec const) 
+{
+	return Iter<FragmentStore<TSpec, TConfig> const, TIterSpec>(store, MinimalCtor());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template < typename TConfig, typename TSpec >
+inline void
+_storeClearAnnotations(FragmentStore<TSpec, TConfig> & me)
+{
+	typedef FragmentStore<TSpec, TConfig>				TFragmentStore;
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	
+	resize(me.annotationStore, 1);
+	resize(me.annotationNameStore, 1);
+	resize(me.annotationTypeStore, (unsigned)TFragmentStore::ANNO_PREDEFINED);
+	
+	TAnnotation root;
+	root.typeId = 0;
+	me.annotationStore[0] = root;
+	me.annotationNameStore[0] = "<root>";
+}
+
+template < typename TConfig, typename TSpec >
+inline void
+_storeRemoveTempAnnoNames(FragmentStore<TSpec, TConfig> & me)
+{
+	typedef FragmentStore<TSpec, TConfig>						TFragmentStore;
+	typedef typename TFragmentStore::TAnnotationStore			TAnnotationStore;
+	typedef typename TFragmentStore::TAnnotationNameStore		TAnnotationNameStore;
+	typedef typename TFragmentStore::TAnnotationTypeStore		TAnnotationTypeStore;
+
+	typedef typename GetValue<TAnnotationNameStore>::Type		TName;
+	typedef typename GetValue<TAnnotationTypeStore>::Type		TType;
+	typedef typename Iterator<TAnnotationStore, Standard>::Type	TAnnoIter;
+	typedef typename Position<TAnnotationStore>::Type			TPosition;
+	
+	TAnnoIter it = end(me.annotationStore, Standard()) - 1;
+	TAnnoIter itBegin = begin(me.annotationStore, Standard());
+	TPosition pos = it - itBegin;
+	for (; itBegin <= it; --it, --pos)
+	{
+		if ((*it).typeId >= length(me.annotationTypeStore))
+			continue;
+		TName name = me.annotationNameStore[pos];
+		TType type = me.annotationTypeStore[(*it).typeId];
+		if (length(name) > length(type) + 3)
+			if (prefix(name, 2) == "__" && infix(name, 2, 2 + length(type)) == type && name[2 + length(type)] == '_')
+				assignValue(me.annotationNameStore, pos, "");
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec, typename TConfig, typename TId>
+inline typename GetValue<typename FragmentStore<TSpec, TConfig>::TAnnotationNameStore>::Type
+getAnnoName(FragmentStore<TSpec, TConfig> & store, TId id)
+{
+	return store.annotationNameStore[id];
+}
+
+template <typename TSpec, typename TConfig, typename TId>
+inline typename GetValue<typename FragmentStore<TSpec, TConfig>::TAnnotationTypeStore>::Type
+getAnnoType(FragmentStore<TSpec, TConfig> & store, TId id)
+{
+	return store.annotationTypeStore[id];
+}
+
+template <typename TSpec, typename TConfig, typename TId>
+inline CharString
+getAnnoUniqueName(FragmentStore<TSpec, TConfig> & store, TId id)
+{
+	if (id < length(store.annotationNameStore))
+		return getAnnoName(store, id);
+	
+	std::stringstream tmp;
+	tmp << "__" << getAnnoType(store, store.annotationStore[id].typeId) << '_' << id;
+	return tmp.str();
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// append functions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// _storeAppendRead
+// 
+// adds a new entry to the read store if neccessary. Otherwise it writes the 
+// correct Id in the variable using to qname to identify it
+// If needed a mate pair entry is created
+    
+template <typename TSpec, typename TConfig, typename TId, typename TName, typename TString, typename TFlag, typename TContext>
+inline void 
+_storeAppendRead (
+	FragmentStore<TSpec, TConfig> & fragStore, 
+	TId & readId, 
+	TName & qname,
+	TString & readSeq,
+	TFlag & flag,
+	TContext &)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Value<typename TFragmentStore::TMatePairStore>::Type TMatePairElement;
+
+	// search for readId by name
+	if (getIdByName(fragStore.readNameStore, qname, readId, fragStore.readNameStoreCache))
+	{
+		if ((flag & 1) == 1)
+		{
+			// if the read is in the store and paired
+			// check the mate pair store if it is the same mate of the pair
+			// assuming that only one flag 0x040 or 0x0080 is 1
+			int inPair = 1 - ((flag & 0x40) >> 6);	// bit 7 is set => inPair = 0
+													// else inPair = 1 (even if bits 6 and 7 are not set)
+			
+			TId matePairId = fragStore.readStore[readId].matePairId;
+			if (matePairId != TMatePairElement::INVALID_ID)
+			{
+				readId = fragStore.matePairStore[matePairId].readId[inPair];
+				if (readId == TMatePairElement::INVALID_ID)
+				{
+					// create new entry in read and read name store
+					// set sequence and mate pair ID in new read store element
+					readId = appendRead(fragStore, readSeq, matePairId);
+					// add the identifier to the read name store
+					appendName(fragStore.readNameStore, qname, fragStore.readNameStoreCache);
+					// set the ID in the mate pair store
+					fragStore.matePairStore[matePairId].readId[inPair] = readId;
+					return;
+				}
+			}
+		} else 
+			return;
+	}
+
+	// if the read name is not in the store
+	// create new entry in read and read name store
+	readId = length(fragStore.readStore);
+
+	// if the read is paired
+	if ((flag & 1) == 1)
+	{
+		TMatePairElement mateElem;
+		// set the first or second read ID in the mate pair element
+		TId matePairId = length(fragStore.matePairStore);
+		mateElem.readId[(flag & 0x80) >> 7] = readId;
+		// get a new mate pair ID and add the new mate pair element
+		appendValue(fragStore.matePairStore, mateElem);
+		// set the new mate pair ID in the read element
+		appendRead(fragStore, readSeq, matePairId);
+	} 
+	// if read is not paired
+	else
+		appendRead(fragStore, readSeq);
+	
+	appendName(fragStore.readNameStore, qname, fragStore.readNameStoreCache);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// _storeAppendContig
+// 
+// adds a new entry to the read store if neccessary. Otherwise it writes the 
+// correct Id in the variable using to qname to identify it
+// If needed a mate pair entry is created
+    
+template <typename TSpec, typename TConfig, typename TId, typename TName>
+inline void 
+_storeAppendContig (
+	FragmentStore<TSpec, TConfig> & fragStore, 
+	TId & contigId, 
+	TName & rName)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigElement;
+	
+	if (!getIdByName(fragStore.contigNameStore, rName, contigId, fragStore.contigNameStoreCache))
+	{
+		// if the contig is not in the store yet
+		// set the ID on the last entry after appending
+		contigId = length(fragStore.contigStore);
+		// append contig store
+		appendName(fragStore.contigNameStore, rName, fragStore.contigNameStoreCache);
+		appendValue(fragStore.contigStore, TContigElement());
+//		std::cout << "added contig:" << rName << std::endl;	
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// _annotationAppendAnnotation
+// 
+// adds a new entry to the read store if neccessary. Otherwise it writes the 
+// correct Id in the variable using to qname to identify it
+
+template <typename TSpec, typename TConfig, typename TId, typename TName>
+inline void 
+_storeAppendAnnotationName (
+	FragmentStore<TSpec, TConfig> & fragStore, 
+	TId & annotationId, 
+	TName & annotationName)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigElement;
+
+	if (!empty(annotationName) && getIdByName(fragStore.annotationNameStore, annotationName, annotationId, fragStore.annotationNameStoreCache))
+		return;
+	// if the annotation is not in the store yet
+	// set the ID on the last entry after appending
+	annotationId = length(fragStore.annotationNameStore);
+	// append to annotationName store
+	appendName(fragStore.annotationNameStore, annotationName, fragStore.annotationNameStoreCache);
+//	std::cout << "added annotation:" << annotationName << std::endl;	
+}
+
+template <typename TSpec, typename TConfig, typename TId, typename TName>
+inline void 
+_storeAppendType (
+	FragmentStore<TSpec, TConfig> & fragStore, 
+	TId & typeId, 
+	TName & annotationType)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigElement;
+	
+	if (!getIdByName(fragStore.annotationTypeStore, annotationType, typeId, fragStore.annotationTypeStoreCache))
+	{
+		// if the annotation type name is not in the store yet
+		// set the ID on the last entry after appending
+		typeId = length(fragStore.annotationTypeStore);
+		// append to annotationType store
+		if (!empty(annotationType))
+			appendName(fragStore.annotationTypeStore, annotationType, fragStore.annotationTypeStoreCache);
+//		std::cout << "added type:" << annotationType << std::endl;	
+	}
+}
+
+template <typename TSpec, typename TConfig, typename TId, typename TName>
+inline void 
+_storeAppendKey (
+	FragmentStore<TSpec, TConfig> & fragStore, 
+	TId & keyId,
+	TName & annotationKey)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigElement;
+	
+	if (!getIdByName(fragStore.annotationKeyStore, annotationKey, keyId, fragStore.annotationKeyStoreCache))
+	{
+		// if the key name is not in the store yet
+		// set the ID on the last entry after appending
+		keyId = length(fragStore.annotationKeyStore);
+		// append to annotationKey store
+		if (!empty(annotationKey))
+			appendName(fragStore.annotationKeyStore, annotationKey, fragStore.annotationKeyStoreCache);
+//		std::cout << "added key:" << annotationKey << std::endl;	
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec, typename TConfig, typename TAnnotation, typename TKey, typename TValue>
+inline void 
+annotationAssignValueByKey (
+	FragmentStore<TSpec, TConfig> & fragStore, 
+	TAnnotation & annotation,
+	TKey const & key,
+	TValue const & value)
+{
+	typedef typename TAnnotation::TValues	TValues;
+	typedef typename Size<TValues>::Type	TKeyId;
+	
+	TKeyId keyId = 0;	
+	_storeAppendKey(fragStore, keyId, key);
+	if (length(annotation.values) <= keyId)
+		resize(annotation.values, keyId + 1);
+	assignValue(annotation.values, keyId, value);
+}
+
+template <typename TSpec, typename TConfig, typename TAnnotation, typename TKey, typename TValue>
+inline bool 
+annotationGetValueByKey (
+	FragmentStore<TSpec, TConfig> & fragStore, 
+	TAnnotation const & annotation,
+	TKey const & key,
+	TValue & value)
+{
+	typedef typename TAnnotation::TValues	TValues;
+	typedef typename Size<TValues>::Type	TKeyId;
+	
+	TKeyId keyId = 0;	
+	if (getIdByName(fragStore.annotationKeyStore, key, keyId, fragStore.annotationKeyStoreCache))
+	{
+		assign(value, annotation.values[keyId]);
+		return true;
+	}
+	return false;
+}
+
+template <typename TSpec, typename TConfig, typename TAnnotation, typename TKey>
+inline CharString 
+annotationGetValueByKey (
+	FragmentStore<TSpec, TConfig> & fragStore, 
+	TAnnotation const & annotation,
+	TKey const & key)
+{
+	typedef typename TAnnotation::TValues	TValues;
+	typedef typename Size<TValues>::Type	TKeyId;
+	
+	TKeyId keyId = 0;
+	if (getIdByName(fragStore.annotationKeyStore, key, keyId, fragStore.annotationKeyStoreCache))
+		return annotation.values[keyId];
+	else
+		return "";
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Read Store Accessors
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.clearReads
+..summary:Removes all reads from a fragment store.
+..cat:Fragment Store
+..signature:clearReads(store)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..remarks:This function clears the @Memvar.FragmentStore#readStore@, @Memvar.FragmentStore#readSeqStore@ and @Memvar.FragmentStore#readNameStore at .
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig>
+inline void
+clearReads(FragmentStore<TSpec, TConfig> &me)
+{
+	clear(me.readStore);
+	clear(me.readSeqStore);
+	clear(me.readNameStore);
+}
+
+/**
+.Function.appendRead:
+..summary:Appends a read to a fragment store.
+..cat:Fragment Store
+..signature:appendRead(store, read[, matePairId])
+..signature:appendRead(store, read, name[, matePairId])
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.read:The read sequence.
+..param.name:The read name.
+...type:Shortcut.CharString
+..param.matePairId:Id of mate-pair this read is part of.
+...default:$INVALID_ID$, which corresponds to an unmated read.
+..returns:The $readId$ of the newly appended read.
+..remarks:This function appends a single read to the @Memvar.FragmentStore#readStore@ and @Memvar.FragmentStore#readSeqStore at .
+If name is given, it is appended to the @Memvar.FragmentStore#readNameStore at .
+..see:Function.getRead
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TRead, typename TId>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TReadStore>::Type
+appendRead(
+	FragmentStore<TSpec, TConfig> &me, 
+	TRead const &read, 
+	TId matePairId)
+{
+	SEQAN_ASSERT(length(me.readStore) == length(me.readSeqStore))
+
+	typedef typename FragmentStore<TSpec, TConfig>::TReadStore TReadStore;
+	typename Value<TReadStore>::Type r;
+	r.matePairId = matePairId;
+
+	appendValue(me.readStore, r, Generous());
+	appendValue(me.readSeqStore, read, Generous());
+	return length(me.readStore) - 1;
+}
+
+template <typename TSpec, typename TConfig, typename TRead, typename TId>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TReadStore>::Type
+appendRead(
+	FragmentStore<TSpec, TConfig> &me, 
+	TRead const &read, 
+	CharString const &name,
+	TId matePairId)
+{
+	SEQAN_ASSERT(length(me.readStore) == length(me.readSeqStore))
+
+	typedef typename FragmentStore<TSpec, TConfig>::TReadStore TReadStore;
+	typename Value<TReadStore>::Type r;
+	r.matePairId = matePairId;
+
+	appendValue(me.readStore, r, Generous());
+	appendValue(me.readSeqStore, read, Generous());
+	appendValue(me.readNameStore, name, Generous());
+	return length(me.readStore) - 1;
+}
+
+template <typename TSpec, typename TConfig, typename TRead>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TReadStore>::Type
+appendRead(
+	FragmentStore<TSpec, TConfig> &me, 
+	TRead const &read)
+{
+	typedef typename FragmentStore<TSpec, TConfig>::TReadStore TReadStore;
+    typedef typename Value<TReadStore>::Type TReadStoreElement;
+    
+	return appendRead(me, read, TReadStoreElement::INVALID_ID);
+}
+
+template <typename TSpec, typename TConfig, typename TRead>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TReadStore>::Type
+appendRead(
+	FragmentStore<TSpec, TConfig> &me, 
+	TRead const &read,
+	CharString const &name)
+{
+	typedef typename FragmentStore<TSpec, TConfig>::TReadStore TReadStore;
+    typedef typename Value<TReadStore>::Type TReadStoreElement;
+    
+	return appendRead(me, read, name, TReadStoreElement::INVALID_ID);
+}
+
+/**
+.Function.getRead
+..summary:Returns the read with the given $readId$.
+..cat:Fragment Store
+..signature:getRead(store, readId)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.readId:The read id.
+..returns:The sequence of the read with id $readId$ from the @Memvar.FragmentStore#readSeqStore at .
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TId>
+inline typename Value<typename FragmentStore<TSpec, TConfig>::TReadSeqStore>::Type
+getRead(
+	FragmentStore<TSpec, TConfig> &me, 
+	TId id)
+{
+	return value(me.readSeqStore, id);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.appendAlignedRead:
+..summary:Appends an aligned read entry to a fragment store.
+..cat:Fragment Store
+..signature:appendRead(store, readId, contigId, beginPos, endPos[, pairMatchId])
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.readId:The id of the read.
+..param.contigId:The id of the contig.
+..param.beginPos:The begin position of the alignment.
+..param.endPos:The end position of the alignment.
+..param.pairMatchId:Id of alignedRead pair.
+...default:$INVALID_ID$, which corresponds to an unmated read.
+..returns:The $alignedReadId$ of the aligned read.
+..remarks:This function appends a single aligned read to the @Memvar.FragmentStore#alignedReadStore at .
+Note that this really only adds a match.
+To generate a global alignment out of all of these matches, use @Function.convertMatchesToGlobalAlignment at .
+..see:Function.appendRead
+..include:seqan/store.h
+*/
+template <typename TSpec, typename TConfig, typename TReadId, typename TContigId, typename TPos, typename TPairMatchId>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type
+appendAlignedRead(
+        FragmentStore<TSpec, TConfig> & store,
+        TReadId const & readId,
+        TContigId const & contigId,
+        TPos const & beginPos,
+        TPos const & endPos,
+        TPairMatchId const & pairMatchId)
+{
+    SEQAN_CHECKPOINT;
+	typedef typename FragmentStore<TSpec, TConfig>::TAlignedReadStore TAlignedReadStore;
+    typedef typename Value<TAlignedReadStore>::Type TAlignedReadStoreElement;
+
+    TAlignedReadStoreElement element(length(store.alignedReadStore), readId, contigId, beginPos, endPos);
+    element.pairMatchId = pairMatchId;
+    appendValue(store.alignedReadStore, element);
+
+    return back(store.alignedReadStore).id;
+}
+
+template <typename TSpec, typename TConfig, typename TReadId, typename TContigId, typename TPos>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type
+appendAlignedRead(
+        FragmentStore<TSpec, TConfig> & store,
+        TReadId const & readId,
+        TContigId const & contigId,
+        TPos const & beginPos,
+        TPos const & endPos)
+{
+    SEQAN_CHECKPOINT;
+	typedef typename FragmentStore<TSpec, TConfig>::TAlignedReadStore TAlignedReadStore;
+    typedef typename Value<TAlignedReadStore>::Type TAlignedReadStoreElement;
+    return appendAlignedRead(store, readId, contigId, beginPos, endPos, TAlignedReadStoreElement::INVALID_ID);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.appendMatePair
+..summary:Appends two paired-end reads to a fragment store.
+..cat:Fragment Store
+..signature:appendMatePair(store, readId1, readId2)
+..signature:appendMatePair(store, readId1, readId2, name1, name2)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.readId1:The read sequence of the first read.
+..param.readId2:The read sequence of the second read.
+..param.name1:The read name of the first read.
+..param.name2:The read name of the second read.
+..returns:The $matePairId$ of the newly appended mate-pair.
+..remarks:This function appends two reads to the @Memvar.FragmentStore#readStore@ and @Memvar.FragmentStore#readSeqStore@ 
+and a mate-pair entry between both of them to the @Memvar.FragmentStore#matePairStore at .
+If names are given, they are appended to the @Memvar.FragmentStore#readNameStore at .
+..see:Function.appendRead
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TRead>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TMatePairStore>::Type
+appendMatePair(
+	FragmentStore<TSpec, TConfig> &me, 
+	TRead const &read1, 
+	TRead const &read2)
+{
+	typedef FragmentStore<TSpec, TConfig>			TFragmentStore;
+	typedef typename TFragmentStore::TReadStore		TReadStore;
+	typedef typename TFragmentStore::TMatePairStore	TMatePairStore;
+
+	typename Value<TReadStore>::Type r;
+	typename Value<TMatePairStore>::Type mp;
+	r.matePairId = length(me.matePairStore);
+	mp.readId[0] = length(me.readStore);
+	mp.readId[1] = length(me.readStore) + 1;
+
+	appendValue(me.readStore, r, Generous());
+	appendValue(me.readStore, r, Generous());
+	appendValue(me.matePairStore, mp, Generous());
+	appendValue(me.readSeqStore, read1, Generous());
+	appendValue(me.readSeqStore, read2, Generous());
+	return length(me.matePairStore) - 1;
+}
+
+template <typename TSpec, typename TConfig, typename TRead>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TMatePairStore>::Type
+appendMatePair(
+	FragmentStore<TSpec, TConfig> &me, 
+	TRead const &read1, 
+	TRead const &read2, 
+	CharString const &name1,
+	CharString const &name2)
+{
+	SEQAN_ASSERT(length(me.readStore) == length(me.readSeqStore))
+
+	typedef FragmentStore<TSpec, TConfig>			TFragmentStore;
+	typedef typename TFragmentStore::TReadStore		TReadStore;
+	typedef typename TFragmentStore::TMatePairStore	TMatePairStore;
+
+	typename Value<TReadStore>::Type r;
+	typename Value<TMatePairStore>::Type mp;
+	r.matePairId = length(me.matePairStore);
+	mp.readId[0] = length(me.readStore);
+	mp.readId[1] = length(me.readStore) + 1;
+
+	appendValue(me.readStore, r, Generous());
+	appendValue(me.readStore, r, Generous());
+	appendValue(me.matePairStore, mp, Generous());
+	appendValue(me.readSeqStore, read1, Generous());
+	appendValue(me.readSeqStore, read2, Generous());
+	appendValue(me.readNameStore, name1, Generous());
+	appendValue(me.readNameStore, name2, Generous());
+	return length(me.matePairStore) - 1;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.compactAlignedReads
+..summary:Removes invalid aligned reads and rename $alignId$ sequentially beginning with 0.
+..cat:Fragment Store
+..signature:compactAlignedReads(store)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..returns:The new size of the @Memvar.FragmentStore#alignedReadStore at .
+..remarks:This function removes all entries from @Memvar.FragmentStore#alignedReadStore@ whose $alignId$ equals to $INVALID_ID$ as well as orphan entries
+in @Memvar.FragmentStore#alignQualityStore at .
+Afterwards the alignIds are renamed sequentially beginning with 0.
+This function can be used to remove alignments which are selected by previously setting their id to $INVALID_ID$.
+..include:seqan/store.h
+*/
+
+// 1. remove aligned reads with invalid ids
+// 2. rename ids beginning with 0
+template <typename TSpec, typename TConfig>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type
+compactAlignedReads(FragmentStore<TSpec, TConfig> &me)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+	typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+	typedef typename TFragmentStore::TAlignQualityStore				TAlignQualityStore;
+
+	typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+	typedef typename Id<TAlignedRead>::Type							TId;
+	typedef typename Size<TAlignQualityStore>::Type					TAQSize;
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type	TAlignedReadIter;
+	typedef typename Iterator<TAlignQualityStore, Standard>::Type	TAlignQualityIter;
+	
+	sortAlignedReads(me.alignedReadStore, SortId());
+	
+	TAlignedReadIter itAR = begin(me.alignedReadStore, Standard());
+	TAlignedReadIter itARend = end(me.alignedReadStore, Standard());
+	TAlignQualityIter itAQ = begin(me.alignQualityStore, Standard());
+	TAlignQualityIter itAQbegin = itAQ;
+	TAQSize aqSize = length(me.alignQualityStore);
+	TId newId = 0;
+	
+	for (; itAR != itARend; ++itAR, ++newId)
+	{
+		TId id = (*itAR).id;
+		if (id == TAlignedRead::INVALID_ID) break;	// we assume that invalid ids are at the end of the AlignedReadStore
+		if (id < aqSize)
+		{
+			*itAQ = *(itAQbegin + id);
+			++itAQ;
+		}
+		(*itAR).id = newId;
+	}
+	
+	resize(me.alignedReadStore, newId, Exact());
+	resize(me.alignQualityStore, itAQ - itAQbegin, Exact());
+	return newId;
+}
+
+/**
+.Function.compactPairMatchIds
+..summary:Renames $pairMatchId$ sequentially beginning with 0.
+..cat:Fragment Store
+..signature:compactPairMatchIds(store)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..returns:The number of pair matches.
+..remarks:This function renames the $pairMatchId$ in the @Memvar.FragmentStore#alignedReadStore@ sequentially beginning with 0.
+Two read alignments can be identified to be a pair match if they have the same $pairMatchId$.
+Please note that paired reads not necessarily have to mapped as a pair match, 
+e.g. if they are on different contigs or have the same orientation or a wrong insert size.
+..include:seqan/store.h
+*/
+
+// rename pair match ids beginning with 0, returns the number of pair matches
+template <typename TSpec, typename TConfig>
+inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type
+compactPairMatchIds(FragmentStore<TSpec, TConfig> &me)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+	typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+
+	typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+	typedef typename Id<TAlignedRead>::Type							TId;
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type	TAlignedReadIter;
+	
+	sortAlignedReads(me.alignedReadStore, SortPairMatchId());
+	
+	TAlignedReadIter itAR = begin(me.alignedReadStore, Standard());
+	TAlignedReadIter itARend = end(me.alignedReadStore, Standard());
+	if (itAR == itARend) return 0;
+	
+	TId lastId = (*itAR).pairMatchId;
+	TId newId = 0;
+	for (; itAR != itARend; ++itAR)
+	{
+		TId id = (*itAR).pairMatchId;
+		if (id == TAlignedRead::INVALID_ID) break;	// we assume that invalid ids are at the end of the AlignedReadStore
+		if (lastId < id)
+		{
+			lastId = id;
+			++newId;
+		}
+		(*itAR).pairMatchId = newId;
+	}
+	return newId + 1;
+}
+
+/**
+.Function.calculateInsertSizes
+..summary:Calculates a string with insert sizes for each pair match.
+..cat:Fragment Store
+..signature:compactPairMatchIds(insertSizes, store)
+..param.insertSizes:The resulting string of insert sizes.
+...remarks:This string is accordingly resized and can be addressed by the $pairMatchId$.
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..remarks:This function calls @Function.compactPairMatchIds@ first and calculate the insert size for every pair match.
+The insert size of a pair match is the outer distance between the two matches.
+..include:seqan/store.h
+*/
+
+template <typename TLibSizeString, typename TSpec, typename TConfig>
+inline void
+calculateInsertSizes(TLibSizeString &insertSizes, FragmentStore<TSpec, TConfig> &me)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+	typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+	
+	typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+	typedef typename Id<TAlignedRead>::Type							TId;
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type	TAlignedReadIter;
+	typedef typename TFragmentStore::TContigPos						TGPos;
+
+	TAlignedReadIter it = begin(me.alignedReadStore, Standard());
+	TAlignedReadIter itEnd = end(me.alignedReadStore, Standard());
+
+	resize(insertSizes, compactPairMatchIds(me), Exact());
+	TId lastId = TAlignedRead::INVALID_ID;
+	TGPos leftMatePos = 0;
+	for (; it != itEnd; ++it)
+	{
+		TId id = (*it).pairMatchId;
+		if (id == TAlignedRead::INVALID_ID) break;	// we assume that invalid ids are at the end of the AlignedReadStore
+		if (id != lastId)
+		{
+			leftMatePos = (*it).beginPos;
+			lastId = id;
+		} else
+			insertSizes[id] = (*it).beginPos - leftMatePos;
+	}
+}
+
+/**
+.Function.getMateNo
+..summary:Returns the mate number of read for a given $readId$.
+..cat:Fragment Store
+..signature:getMateNo(store, readId)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.readId:The read id.
+..returns:The mate number (0..first mate, 1..second mate) of the read in its mate-pair or -1 if the read is not paired.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TId>
+inline int
+getMateNo(FragmentStore<TSpec, TConfig> const &me, TId readId)
+{
+	typedef FragmentStore<TSpec, TConfig>			TFragmentStore;
+	typedef typename TFragmentStore::TReadStore		TReadStore;
+	typedef typename TFragmentStore::TMatePairStore	TMatePairStore;
+
+	typedef typename Value<TReadStore>::Type		TRead;
+	typedef typename Value<TMatePairStore>::Type	TMatePair;
+	
+	if (readId != TRead::INVALID_ID)
+	{
+		TRead const &r = me.readStore[readId];
+		if (r.matePairId != TRead::INVALID_ID)
+		{
+			TMatePair const &mp = me.matePairStore[r.matePairId];
+			if (mp.readId[0] == readId) return 0;
+			if (mp.readId[1] == readId) return 1;
+		}
+	}
+	return -1;
+}
+
+/**
+.Function.calculateMateIndices
+..summary:Calculates a string that maps the $readId$ of a read to the $readId$ of its mate.
+..cat:Fragment Store
+..signature:calculateMateIndices(mateIndices, store)
+..param.mateIndices:The resulting string of mate indices.
+...remarks:This string is accordingly resized and can be addressed by the $readId$.
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..remarks:Entries of reads without a mate contain $INVALID_ID$.
+..include:seqan/store.h
+*/
+
+// calculate index of the other mate for each pair match
+template <typename TMateIndexString, typename TSpec, typename TConfig>
+inline void
+calculateMateIndices(TMateIndexString &mateIndices, FragmentStore<TSpec, TConfig> &me)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+	typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+	
+	typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+	typedef typename Id<TAlignedRead>::Type							TId;
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type	TAlignedReadIter;
+
+	TAlignedReadIter it = begin(me.alignedReadStore, Standard());
+	TAlignedReadIter itEnd = end(me.alignedReadStore, Standard());
+
+	for (TId idx = 0; it != itEnd; ++it, ++idx)
+	{
+		TId id = (*it).pairMatchId;
+		if (id == TAlignedRead::INVALID_ID) continue;
+		if (length(mateIndices) < 2*id + 2)
+			resize(mateIndices, 2*id + 2, TAlignedRead::INVALID_ID, Generous());
+		mateIndices[2*id + 1 - getMateNo(me, (*it).readId)] = idx;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.AlignedReadLayout
+..summary:Stores a 2-dimensional visible layout of a multi-read alignment.
+..cat:Fragment Store
+..signature:AlignedReadLayout
+
+.Memvar.AlignedReadLayout#contigRows
+..class:Class.AlignedReadLayout
+..summary:2-D multi-read layout
+..remarks:Stores for a contig and a row the ids of aligned reads from left to right.
+$contigRows[contigId][row]$ stores the $alignId$ of all aligned reads from left to right assigned to the same row
+$row$ is the row of the alignment in the multiple sequence alignment and $contigId$ the id of the reference contig.
+..include:seqan/store.h
+*/
+	
+struct AlignedReadLayout
+{
+	typedef String<unsigned>	TRow;
+	typedef String<TRow>		TRows;
+	typedef String<TRows>		TContigRows;
+	
+	TContigRows contigRows;			// rows string, each row is a string of ids of alignedReads from left to right
+	String<Pair<int> > mateCoords;	// coords of mate pair
+};
+
+/**
+.Function.layoutAlignment
+..summary:Calculates a visible layout of aligned reads.
+..cat:Fragment Store
+..signature:layoutAlignment(layout, store)
+..param.layout:The resulting layout structure.
+...type:Class.AlignedReadLayout
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..remarks:For each contig this function layouts all reads in rows from up to down reusing empty row spaces.
+..see:Function.printAlignment
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig>
+void layoutAlignment(AlignedReadLayout &layout, FragmentStore<TSpec, TConfig> &store)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+
+	typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+	typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type	TAlignedReadIter;
+
+	typedef typename Id<TAlignedRead>::Type							TId;
+	typedef typename TFragmentStore::TContigPos						TContigPos;
+	
+	typedef typename AlignedReadLayout::TRows						TRows;
+	typedef typename AlignedReadLayout::TRow						TRow;
+	typedef typename Iterator<TRows>::Type							TRowsIter;
+	
+	// sort matches by increasing begin positions
+	sortAlignedReads(store.alignedReadStore, SortBeginPos());
+	sortAlignedReads(store.alignedReadStore, SortContigId());
+
+	clear(layout.contigRows);
+	TAlignedReadIter it = begin(store.alignedReadStore, Standard());
+	TAlignedReadIter itEnd = end(store.alignedReadStore, Standard());
+
+	for (TId id = 0; it != itEnd; ++it, ++id)
+	{
+		if ((*it).contigId == TAlignedRead::INVALID_ID) continue;
+		if (length(layout.contigRows) <= (*it).contigId)
+			resize(layout.contigRows, (*it).contigId + 1);
+		
+		TRowsIter lit = begin(layout.contigRows[(*it).contigId], Standard());
+		TRowsIter litEnd = end(layout.contigRows[(*it).contigId], Standard());
+		
+		TContigPos beginPos = _min((*it).beginPos, (*it).endPos);
+		
+		for (; lit != litEnd; ++lit)
+		{
+			if (empty(*lit)) break;
+			TAlignedRead &align = store.alignedReadStore[back(*lit)];
+			if (_max(align.beginPos, align.endPos) < beginPos)			// maybe <= would be better
+				break;													// but harder to differ between reads borders
+		}
+			
+		if (lit == litEnd)
+		{
+			TRow s;
+			appendValue(s, id);
+			appendValue(layout.contigRows[(*it).contigId], s);
+		} else
+			appendValue(*lit, id);
+	}
+}
+
+template <typename TStream, typename TFormatTag, typename TContigGaps, typename TReadGaps, typename TAlignedRead, typename TLine>
+inline void _printRead(
+	TStream &stream, 
+	Tag<TFormatTag> const &format,
+	AlignedReadLayout &, 
+	TContigGaps &,
+	TReadGaps &readGaps,
+	TAlignedRead &,
+	TLine)
+{
+	write(stream, readGaps, "", format);
+}
+
+template <typename TStream, typename TFormatTag, typename TContigGaps, typename TContigName>
+inline void _printContig(
+	TStream &stream,
+	Tag<TFormatTag> const &format,
+	AlignedReadLayout &, 
+	TContigGaps &contigGaps,
+	TContigName const &)
+{
+	write(stream, contigGaps, "", format);
+}
+
+/**
+.Function.printAlignment
+..summary:Prints a window of the visible layout of reads into a outstream.
+..cat:Fragment Store
+..signature:printAlignment(stream, format, layout, store, contigId, posBegin, posEnd, lineBegin, lineEnd)
+..param.stream:A C++ outstream, e.g. std::cout.
+..param.layout:A layout structure created by a previous call of @Function.layoutAlignment at .
+...type:Class.AlignedReadLayout
+..param.format:Output format.
+...type:Tag.File Format.tag.Raw
+...remarks: This tag is used for subsequent calls of @Function.write@ for contig and read gaps data structures.
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.contigId:The $contigId$ of the affected contig.
+..param.posBegin:Window begin position in gap-space.
+..param.posEnd:Window end position in gap-space.
+..param.lineBegin:Begin line of the window.
+..param.lineEnd:End line of the window.
+..remarks:The window coordinates ($beginPos$, ...) may be chosen bigger than the layout.
+The empty space is then filled with whitespaces.
+..see:Function.layoutAlignment
+..include:seqan/store.h
+*/
+
+template <typename TStream, typename TFormatTag, typename TSpec, typename TConfig, typename TContigId, typename TPos, typename TNum>
+void printAlignment(
+	TStream &stream, 
+	Tag<TFormatTag> const &format,
+	AlignedReadLayout &layout, 
+	FragmentStore<TSpec, TConfig> &store, 
+	TContigId contigId,
+	TPos posBegin, TPos posEnd,
+	TNum lineBegin, TNum lineEnd)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+
+	typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+	typedef typename TFragmentStore::TContigStore					TContigStore;
+
+	typedef typename Value<TContigStore>::Type						TContig;
+	typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+	typedef typename TFragmentStore::TReadSeq						TReadSeq;
+	typedef typename Id<TAlignedRead>::Type							TId;
+	typedef typename TFragmentStore::TContigPos						TContigPos;
+	typedef typename TContig::TContigSeq							TContigSeq;
+
+	typedef AlignedReadLayout::TRows								TRows;
+	typedef typename Value<TRows>::Type								TRow;
+	typedef typename Size<TRows>::Type								TRowsSize;
+	typedef typename Iterator<TRows>::Type							TRowsIter;
+	typedef typename Iterator<TRow>::Type							TRowIter;
+
+	typedef Gaps<TContigSeq, AnchorGaps<typename TContig::TGapAnchors> >	TContigGaps;
+	typedef Gaps<CharString, AnchorGaps<typename TAlignedRead::TGapAnchors> >	TReadGaps;
+	
+	TContigGaps	contigGaps;
+	if ((TId)contigId < length(store.contigStore))
+	{
+		set(contigGaps.data_source, store.contigStore[contigId].seq);
+		set(contigGaps.data_gaps, store.contigStore[contigId].gaps);
+//		TContigGaps	contigGaps(store.contigStore[contigId].seq, store.contigStore[contigId].gaps);
+		setBeginPosition(contigGaps, posBegin);
+		setEndPosition(contigGaps, posEnd);
+		_printContig(stream, format, layout, contigGaps, store.contigNameStore[contigId]);
+		stream << '\n';
+	} else
+		stream << '\n';
+	
+	if ((TId)contigId >= length(layout.contigRows))
+		return;
+	
+	if ((TRowsSize)lineEnd > length(layout.contigRows[contigId])) lineEnd = length(layout.contigRows[contigId]);
+	if ((TRowsSize)lineBegin >= (TRowsSize)lineEnd) return;
+
+	TRowsIter lit = begin(layout.contigRows[contigId], Standard()) + lineBegin;
+	TRowsIter litEnd = begin(layout.contigRows[contigId], Standard()) + lineEnd;
+	TReadSeq readSeq;
+	CharString readSeqString;
+	setBeginPosition(contigGaps, 0);
+	setEndPosition(contigGaps, _unclippedLength(contigGaps));
+
+	for (TNum line = 1; lit < litEnd; ++lit, ++line)
+	{
+		TRowIter itEnd = end(*lit, Standard());
+		TRowIter left = begin(*lit, Standard());
+		TRowIter right = itEnd;
+		TRowIter mid = itEnd;
+
+		while (left < right)
+		{
+			mid = left + (right - left) / 2;
+			TAlignedRead &align = store.alignedReadStore[*mid];
+
+			if (align.contigId < (TId)contigId || (align.contigId == (TId)contigId && (TPos)_max(align.beginPos, align.endPos) <= posBegin))
+				left = mid + 1;	// what we search is in the right part
+			else
+				right = mid;	//            ...           left part
+		}
+		
+		TPos cursor = posBegin;
+		for (; mid < itEnd; ++mid)
+		{
+//			if (*mid >= lastRead) continue;
+			TAlignedRead &align = store.alignedReadStore[*mid];
+			if (align.contigId != (TId)contigId) break;
+
+			TReadGaps readGaps(readSeqString, align.gaps);
+			TContigPos	left = align.beginPos;
+			TContigPos	right = align.endPos;
+			TContigPos	cBegin = _min(left, right);
+			TContigPos	cEnd = _max(left, right);
+			
+			if ((TPos)cEnd <= posBegin) continue; // shouldn't occur
+			if (posEnd <= (TPos)cBegin) break;
+			
+			readSeq = store.readSeqStore[align.readId];
+			if (left > right)
+			{
+				reverseComplement(readSeq);
+				readSeqString = readSeq;
+				toLower(readSeqString);
+			} else
+				readSeqString = readSeq;
+			
+			if ((TPos)cBegin < posBegin)
+				setBeginPosition(readGaps, posBegin - (TPos)cBegin);
+			else
+				for (; cursor < (TPos)cBegin; ++cursor)
+					stream << ' ';
+			
+			if (posEnd < (TPos)cEnd)
+				setEndPosition(readGaps, posEnd - (TPos)cBegin);
+			
+			_printRead(stream, format, layout, contigGaps, readGaps, align, line);
+			cursor = cEnd;
+		}
+		stream << '\n';
+	}
+}
+
+/**
+.Function.convertMatchesToGlobalAlignment
+..summary:Converts all matches to a multiple global alignment in gap-space.
+..cat:Fragment Store
+..signature:convertMatchesToGlobalAlignment(store, score)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.score:A score object used by @Function.globalAlignment@ in this function.
+..remarks:Before calling this function all $gaps$ structures in @Memvar.FragmentStore#alignedReadStore@ and @Memvar.FragmentStore#contigStore@ must be empty, i.e. there are no gaps in the alignments.
+This function iterates over entries in the @Memvar.FragmentStore#alignedReadStore@ and semi-global aligns each read to its contig segments given by begin and end position.
+Gaps introduced by these pair-wise alignments are then inserted to the affected contig and reads correspondingly.
+..remarks:The invariant that positions in the @Memvar.FragmentStore#alignedReadStore@ are in gap-space holds before (there were no gaps in alignments) and after calling this functions.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TScore, typename TShrinkMatches>
+void convertMatchesToGlobalAlignment(FragmentStore<TSpec, TConfig> &store, TScore const & score, TShrinkMatches const &)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+
+	typedef typename TFragmentStore::TReadStore						TReadStore;
+	typedef typename TFragmentStore::TReadSeqStore					TReadSeqStore;
+	typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+	typedef typename TFragmentStore::TContigStore					TContigStore;
+
+	typedef typename Value<TReadStore>::Type						TRead;
+	typedef typename Value<TContigStore>::Type						TContig;
+	typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+
+	typedef typename TFragmentStore::TReadSeq						TReadSeq;
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type	TAlignedReadIter;
+	typedef typename Id<TAlignedRead>::Type							TId;
+	typedef typename TFragmentStore::TContigPos						TContigPos;
+	
+	typedef typename TContig::TContigSeq							TContigSeq;
+	typedef Align<TReadSeq, ArrayGaps>								TAlign;
+	typedef Gaps<TReadSeq, ArrayGaps>								TGaps;
+
+	typedef Gaps<TContigSeq, AnchorGaps<typename TContig::TGapAnchors> >	TContigGaps;
+	typedef Gaps<TReadSeq, AnchorGaps<typename TAlignedRead::TGapAnchors> >	TReadGaps;
+	typedef typename Iterator<TContigGaps>::Type							TContigIter;
+	typedef typename Iterator<TReadGaps>::Type								TReadIter;
+	
+	// sort matches by increasing begin positions
+	sortAlignedReads(store.alignedReadStore, SortBeginPos());
+	sortAlignedReads(store.alignedReadStore, SortContigId());
+
+	TReadSeq readSeq;
+	TId lastContigId = TAlignedRead::INVALID_ID;
+	TAlignedReadIter it = begin(store.alignedReadStore, Standard());
+	TAlignedReadIter itEnd = end(store.alignedReadStore, Standard());
+	TAlignedReadIter firstOverlap = begin(store.alignedReadStore, Standard());
+	for (; it != itEnd; ++it)
+	{
+		TContigPos	left = (*it).beginPos;
+		TContigPos	right = (*it).endPos;
+		TContigPos	cBegin = _min(left, right);
+		TContigPos	cEnd = _max(left, right);
+		TContigGaps	contigGaps(store.contigStore[(*it).contigId].seq, store.contigStore[(*it).contigId].gaps);
+		TReadGaps	readGaps(readSeq, (*it).gaps);
+		
+		readSeq = store.readSeqStore[(*it).readId];
+		if (left > right)
+			reverseComplement(readSeq);
+				
+		// 1. Calculate pairwise alignment
+		TAlign align;
+		resize(rows(align), 2);
+		assignSource(row(align, 0), infix(store.contigStore[(*it).contigId].seq, cBegin, cEnd));
+		assignSource(row(align, 1), readSeq);
+		if (IsSameType<TShrinkMatches, True>::VALUE)
+		    globalAlignment(align, score, AlignConfig<true, false, false, true>(), Gotoh());
+        else
+		    globalAlignment(align, score);
+
+		// 2. Skip non-overlapping matches
+		cBegin = positionSeqToGap(contigGaps, cBegin);
+		// Increment cBegin by the number of gaps in front of the read
+		// row in the global alignment computed above.
+		cBegin += beginPosition(row(align, 1));
+		if (lastContigId != (*it).contigId)
+		{
+			firstOverlap = it;
+			lastContigId = (*it).contigId;
+		} else
+			while (firstOverlap != it && _max((*firstOverlap).beginPos, (*firstOverlap).endPos) <= cBegin)
+				++firstOverlap;
+
+		// 3. Iterate over alignment
+		setBeginPosition(contigGaps, cBegin);
+		
+		TContigIter cIt = begin(contigGaps);
+		TReadIter rIt = begin(readGaps);
+		typename Iterator<TGaps>::Type it1 = begin(row(align, 0));
+		typename Iterator<TGaps>::Type it2 = begin(row(align, 1));
+
+        unsigned beginLocalContigGaps = beginPosition(row(align, 0));
+		// Heuristic (hack) for gaps in the beginning, so the following 
+		// does not happen:
+		//
+		// contig: XXXX------AAA
+		//             CCC---AAA
+		//                CCCAAA
+		//
+		// But instead, the C's are all aligned.
+		if (beginLocalContigGaps > 0u) {
+			unsigned i = beginLocalContigGaps;
+			do {
+				goPrevious(cIt);
+				i -= 1;
+				cBegin -= 1;
+			} while (isGap(cIt) && i > 0u);
+			if (!isGap(cIt)) {
+				goNext(cIt);
+				cBegin += 1;
+			}
+		}
+        
+		for (; !atEnd(cIt) && !atEnd(it1); goNext(cIt), goNext(rIt))
+		{
+			bool isGapContig = isGap(cIt);
+			bool isGapLocalContig = (beginLocalContigGaps > 0) ? true : isGap(it1);
+			if (isGapContig != isGapLocalContig)
+			{
+				if (isGapContig)
+				{
+					// *** gap in contig of the global alignment ***
+					// copy exisiting contig gap
+					insertGaps(rIt, 1);
+					continue;
+				} else
+				{
+					// *** gap in contig of the pairwise alignment ***
+					// insert padding gaps in contig and reads
+					TContigPos insPos = cIt.current.gapPos;
+					insertGaps(cIt, 1);
+					for (TAlignedReadIter j = firstOverlap; j != it; ++j)
+					{
+						TContigPos rBegin = _min((*j).beginPos, (*j).endPos);
+						TContigPos rEnd = _max((*j).beginPos, (*j).endPos);
+						if (rBegin < insPos && insPos < rEnd)
+						{
+							if (rBegin < insPos)
+							{
+								TReadGaps gaps(store.readSeqStore[(*j).readId], (*j).gaps);
+								insertGap(gaps, insPos - rBegin);
+							} else
+							{
+								// shift beginPos if insertion was at the front of the read
+								if ((*j).beginPos < (*j).endPos)
+									++(*j).beginPos;
+								else
+									++(*j).endPos;
+							}
+							// shift endPos as the alignment was elongated or shifted
+							if ((*j).beginPos < (*j).endPos)
+								++(*j).endPos;
+							else
+								++(*j).beginPos;
+						} else if (insPos <= rBegin) {
+                            ++(*j).endPos;
+                            ++(*j).beginPos;
+                        }
+					}
+				}
+			}
+			if (isGap(it2))
+			{
+				// *** gap in read of pairwise alignment ***
+				// copy gaps from alignment
+				insertGaps(rIt, 1);
+			}
+            if (beginLocalContigGaps == 0)
+                goNext(it1);
+            else
+                beginLocalContigGaps -= 1;
+			goNext(it2);
+		}
+
+		// store new gap-space alignment borders
+		cEnd = cBegin + length(readGaps);
+		if (left < right)
+		{
+			(*it).beginPos = cBegin;
+			(*it).endPos = cEnd;
+		} else
+		{
+			(*it).beginPos = cEnd;
+			(*it).endPos = cBegin;
+		}
+/*		
+//		if (interesting)
+		{
+			String<String<unsigned> > layout;
+			layoutAlignment(layout, store, (*it).contigId);
+			std::cout << store.readNameStore[(*it).readId] << std::endl;
+			std::cout << readGaps << '\t' << cBegin << '\t' << cEnd << std::endl << std::endl;
+			printAlignment(std::cout, layout, store, (*it).contigId, (int)cBegin-20, (int)cEnd+20, 0, 40, 1 + (it - begin(store.alignedReadStore, Standard())));
+//			getc(stdin);
+		}
+*/
+//		if (store.readNameStore[(*it).readId] == "read3305")
+//			return;
+	}
+}
+
+/**
+.Function.convertPairWiseToGlobalAlignment
+..summary:Converts pair-wise alignments to a multiple global alignment.
+..cat:Fragment Store
+..signature:convertPairWiseToGlobalAlignment(store, pairwiseContigGaps)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.pairwiseContigGaps:A string of anchored contig gaps for every pairwise alignment.
+..remarks:Before calling this function the $gaps$ structures in the @Memvar.FragmentStore#contigStore@ must be empty, i.e. there are no gaps in the contig.
+The pairwise alignment gaps of the reads are stored in the $gaps$ structure in the @Memvar.FragmentStore#alignedReadStore@, whereas the pairwise alignment gaps of the contig are stored in the $pairwiseContigGaps$ string.
+..remarks:After calling this functions all positions in the @Memvar.FragmentStore#alignedReadStore@ are in gap-space.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TContigGapsString>
+void convertPairWiseToGlobalAlignment(FragmentStore<TSpec, TConfig> &store, TContigGapsString &gaps)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+
+	// stores
+	typedef typename TFragmentStore::TReadStore						TReadStore;
+	typedef typename TFragmentStore::TReadSeqStore					TReadSeqStore;
+	typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+	typedef typename TFragmentStore::TContigStore					TContigStore;
+
+	// store elements
+	typedef typename Value<TReadStore>::Type						TRead;
+	typedef typename Value<TReadSeqStore>::Type						TReadSeq;
+	typedef typename Value<TContigStore>::Type						TContig;
+	typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+
+	typedef typename Iterator<TAlignedReadStore, Standard>::Type	TAlignedReadIter;
+	typedef typename Id<TAlignedRead>::Type							TId;
+	typedef typename TFragmentStore::TContigPos						TContigPos;
+	
+	typedef typename TContig::TContigSeq							TContigSeq;
+	typedef Align<TReadSeq, ArrayGaps>								TAlign;
+	typedef Gaps<TReadSeq, ArrayGaps>								TGaps;
+
+	// gap structures
+	typedef Gaps</*TContigSeq*/Nothing, AnchorGaps<typename TContig::TGapAnchors> >			TContigGapsGlobal;
+	typedef Gaps</*TContigSeq*/Nothing, AnchorGaps<typename Value<TContigGapsString>::Type> >	TContigGapsPW;
+	typedef Gaps<TReadSeq, AnchorGaps<typename TAlignedRead::TGapAnchors> >			TReadGaps;
+	
+	// gap iterators
+	typedef typename Iterator<TContigGapsGlobal>::Type								TContigGlobalIter;	
+	typedef typename Iterator<TContigGapsPW>::Type									TContigPWIter;
+	typedef typename Iterator<TReadGaps>::Type										TReadIter;
+	
+	// sort matches by increasing begin positions
+	sortAlignedReads(store.alignedReadStore, SortBeginPos());
+	sortAlignedReads(store.alignedReadStore, SortContigId());
+
+	TReadSeq readSeq;
+	TId lastContigId = TAlignedRead::INVALID_ID;
+	TAlignedReadIter it = begin(store.alignedReadStore, Standard());
+	TAlignedReadIter itEnd = end(store.alignedReadStore, Standard());
+	TAlignedReadIter firstOverlap = begin(store.alignedReadStore, Standard());
+	for (; it != itEnd; ++it)
+	{
+		TContigPos	left = (*it).beginPos;
+		TContigPos	right = (*it).endPos;
+		TContigPos	cBegin = _min(left, right);
+		TContigPos	cEnd = _max(left, right);
+		
+		// 1. Initialize gap structures
+		TContigGapsGlobal	contigGapsGlobal(/*store.contigStore[(*it).contigId].seq, */store.contigStore[(*it).contigId].gaps);
+		TContigGapsPW		contigGapsPW(/*store.contigStore[(*it).contigId].seq, */gaps[(*it).id]);
+		TReadGaps			readGaps(store.readSeqStore[(*it).readId], (*it).gaps);
+		
+		// 2. Skip non-overlapping matches
+		cBegin = positionSeqToGap(contigGapsGlobal, cBegin);
+		if (lastContigId != (*it).contigId)
+		{
+			firstOverlap = it;
+			lastContigId = (*it).contigId;
+		} else
+			while (firstOverlap != it && _max((*firstOverlap).beginPos, (*firstOverlap).endPos) <= cBegin)
+				++firstOverlap;
+
+		// 3. Iterate over alignment
+		setBeginPosition(contigGapsGlobal, cBegin);
+
+		TContigGlobalIter cIt = begin(contigGapsGlobal);
+		TContigPWIter pIt = begin(contigGapsPW);
+		TReadIter rIt = begin(readGaps);
+		
+		for (; /*!atEnd(cIt) && */!atEnd(rIt); goNext(cIt), goNext(rIt))
+		{
+			bool isGapContig = isGap(cIt);
+			bool isGapLocalContig = isGap(pIt);
+			if (isGapContig != isGapLocalContig)
+			{
+				if (isGapContig)
+				{
+					// *** gap in contig of the global alignment ***
+					// copy exisiting contig gap
+					insertGaps(rIt, 1);
+					continue;
+				} else
+				{
+					// *** gap in contig of the pairwise alignment ***
+					// insert padding gaps in contig and reads
+					TContigPos insPos = cIt.current.gapPos;
+					insertGaps(cIt, 1);
+					for (TAlignedReadIter j = firstOverlap; j != it; ++j)
+					{
+                        
+						TContigPos rBegin = _min((*j).beginPos, (*j).endPos);
+						TContigPos rEnd = _max((*j).beginPos, (*j).endPos);
+						if (rBegin < insPos && insPos < rEnd)
+						{
+							if (rBegin < insPos)
+							{
+								TReadGaps gaps(store.readSeqStore[(*j).readId], (*j).gaps);
+								insertGap(gaps, insPos - rBegin);
+							} else
+							{
+								// shift beginPos if insertion was at the front of the read
+								if ((*j).beginPos < (*j).endPos)
+									++(*j).beginPos;
+								else
+									++(*j).endPos;
+							}
+							// shift endPos as the alignment was elongated or shifted
+							if ((*j).beginPos < (*j).endPos)
+								++(*j).endPos;
+							else
+								++(*j).beginPos;
+						}
+					}
+				}
+			}
+			goNext(pIt);
+		}
+
+		// store new gap-space alignment borders
+		cEnd = cBegin + length(readGaps);
+		if (left < right)
+		{
+			(*it).beginPos = cBegin;
+			(*it).endPos = cEnd;
+		} else
+		{
+			(*it).beginPos = cEnd;
+			(*it).endPos = cBegin;
+		}
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_annotation.h b/src/SeqAn-1.3/seqan/store/store_annotation.h
new file mode 100644
index 0000000..2c83e9d
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_annotation.h
@@ -0,0 +1,705 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_ANNOTATION_H
+#define SEQAN_HEADER_STORE_ANNOTATION_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Annotation Store
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TPos_, typename TSpec = void>
+struct AnnotationStoreElement
+{
+	typedef typename Id<AnnotationStoreElement>::Type		TId;
+	typedef TPos_											TPos;
+	typedef StringSet<CharString, Owner< ConcatDirect<> > >	TValues;
+
+	static const TId  INVALID_ID;
+	static const TPos INVALID_POS;
+	
+	TId					parentId;
+	TId					contigId;
+	TId					countId;
+	TId					typeId;			// gene, intron, ...
+
+	TPos				beginPos;		// begin position of the gapped sequence in gapped contig sequence
+	TPos				endPos;			// end position of ..., for reverse aligned reads holds end < begin
+	
+	TId					lastChildId;	// generated back links to child
+	TId					nextSiblingId;	// and sibling
+	
+	TValues				values;			// stores values for each keyId of (key,value) pairs
+
+	AnnotationStoreElement() : 
+		parentId(INVALID_ID), contigId(INVALID_ID), countId(INVALID_ID), typeId(INVALID_ID), 
+		beginPos(INVALID_POS), endPos(INVALID_POS),
+		lastChildId(INVALID_ID), nextSiblingId(INVALID_ID) {}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TPos, typename TSpec>
+const typename Id<AnnotationStoreElement<TPos, TSpec> >::Type
+AnnotationStoreElement<TPos, TSpec>::INVALID_ID = MaxValue<typename Id<AnnotationStoreElement<TPos, TSpec> >::Type>::VALUE;
+
+template <typename TPos, typename TSpec>
+const TPos
+AnnotationStoreElement<TPos, TSpec>::INVALID_POS = MaxValue<TPos>::VALUE;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec = void>
+struct AnnotationTree {};
+
+template <typename TFragmentStore, typename TSpec>
+class Iter<TFragmentStore, AnnotationTree<TSpec> >
+{
+public:
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	typedef typename TAnnotation::TId					TId;
+
+	TFragmentStore *store;
+	TId id;
+	
+	Iter():
+		store(NULL),
+		id(TAnnotation::INVALID_ID) {}
+
+	Iter(TFragmentStore &_store):
+		store(&_store),
+		id(0) {}
+
+	Iter(TFragmentStore &_store, MinimalCtor):
+		store(&_store),
+		id(TAnnotation::INVALID_ID) {}
+
+	inline Iter const &
+	operator = (Iter const &_origin)
+	{
+		store = &container(_origin);
+		id = _origin.id;
+		return *this;
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+struct Iterator< TFragmentStore, AnnotationTree<TSpec> > {
+	typedef Iter< TFragmentStore, AnnotationTree<TSpec> > Type;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+struct Value< Iter< TFragmentStore, AnnotationTree<TSpec> > >:
+	VertexDescriptor<TFragmentStore> {};
+
+template <typename TFragmentStore, typename TSpec>
+struct Size< Iter< TFragmentStore, AnnotationTree<TSpec> > > :
+	Size<TFragmentStore> {};
+
+template <typename TFragmentStore, typename TSpec>
+struct Position< Iter< TFragmentStore, AnnotationTree<TSpec> > > :
+	Position<TFragmentStore> {};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline typename VertexDescriptor<TFragmentStore>::Type & 
+value(Iter< TFragmentStore, AnnotationTree<TSpec> > &it) { 
+	return it.id;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline typename VertexDescriptor<TFragmentStore>::Type const & 
+value(Iter< TFragmentStore, AnnotationTree<TSpec> > const &it) { 
+	return it.id;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline TFragmentStore & 
+container(Iter< TFragmentStore, AnnotationTree<TSpec> > &it) { 
+	return *it.store;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline TFragmentStore & 
+container(Iter< TFragmentStore, AnnotationTree<TSpec> > const &it) { 
+	return *it.store;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline typename Reference<typename TFragmentStore::TAnnotationStore>::Type
+getAnnotation(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	return it.store->annotationStore[it.id];
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline typename GetValue<typename TFragmentStore::TAnnotationNameStore>::Type
+getName(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	return getAnnoName(*it.store, it.id);
+}
+
+template <typename TFragmentStore, typename TSpec, typename TName>
+inline typename GetValue<typename TFragmentStore::TAnnotationNameStore>::Type
+setName(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it, TName & name)
+{
+	if (length(it.store->annotationNameStore) <= it.id)
+		resize(it.store->annotationNameStore, it.id + 1);
+	it.store->annotationNameStore[it.id] = name;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline typename GetValue<typename TFragmentStore::TAnnotationNameStore>::Type
+getParentName(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	typedef typename TAnnotation::TId					TId;
+
+	TId parentId = it.store->annotationStore[it.id].parentId;
+	if (parentId == TAnnotation::INVALID_ID) parentId = it.id;
+	return getAnnoName(*it.store, parentId);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline typename GetValue<typename TFragmentStore::TAnnotationTypeStore>::Type
+getType(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	return getAnnoType(*it.store, it.id);
+}
+
+template <typename TFragmentStore, typename TSpec, typename TTypeName>
+inline void
+setType(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it, TTypeName & typeName)
+{
+	_storeAppendType(*it.store, getAnnotation(it).typeId, typeName);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline CharString
+getUniqueName(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	return getAnnoUniqueName(*it.store, it.id);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline void 
+clearValues(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	clear(getAnnotation(it).values);
+}
+
+template <typename TFragmentStore, typename TSpec, typename TKey, typename TValue>
+inline void 
+assignValueByKey(
+	Iter<TFragmentStore, AnnotationTree<TSpec> > & it,
+	TKey const & key,
+	TValue const & value)
+{
+	annotationAssignValueByKey(*it.store, getAnnotation(it), key, value);
+}
+
+template <typename TFragmentStore, typename TSpec, typename TKey, typename TValue>
+inline bool 
+getValueByKey(
+	Iter<TFragmentStore, AnnotationTree<TSpec> > const & it,
+	TKey const & key,
+	TValue & value)
+{
+	return annotationGetValueByKey(*it.store, getAnnotation(it), key, value);
+}
+
+template <typename TFragmentStore, typename TSpec, typename TKey>
+inline CharString
+getValueByKey(
+	Iter<TFragmentStore, AnnotationTree<TSpec> > const & it,
+	TKey const & key)
+{
+	return annotationGetValueByKey(*it.store, getAnnotation(it), key);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline void
+goBegin(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	it.id = 0;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline void
+goEnd(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+
+	it.id = TAnnotation::INVALID_ID;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline void
+clear(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+
+	it.id = TAnnotation::INVALID_ID;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline bool
+atBegin(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	return it.id == 0;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline bool
+atEnd(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+
+	return it.id == TAnnotation::INVALID_ID;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline void
+goNext(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	// preorder dfs
+	if (!goDown(it) && !goRight(it))
+		while (goUp(it) && !goRight(it)) ;
+	if (isRoot(it)) {
+		clear(it);
+		return;
+	}
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline void
+goNextRight(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	// preorder dfs
+	if (!goRight(it))
+		while (goUp(it) && !goRight(it)) ;
+	if (isRoot(it)) {
+		clear(it);
+		return;
+	}
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline void
+goNextUp(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	// preorder dfs
+	while (goUp(it) && !goRight(it)) ;
+	if (isRoot(it)) {
+		clear(it);
+		return;
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline void
+goRoot(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	it.id = 0;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline bool
+goUp(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	typedef typename TAnnotation::TId					TId;
+	
+	TId parentId = getAnnotation(it).parentId;
+	if (parentId != TAnnotation::INVALID_ID)
+	{
+		it.id = parentId;
+		return true;
+	}
+	return false;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline bool
+goDown(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	typedef typename TAnnotation::TId					TId;
+	
+	TId lastChildId = getAnnotation(it).lastChildId;
+	if (lastChildId != TAnnotation::INVALID_ID)
+	{
+		it.id = it.store->annotationStore[lastChildId].nextSiblingId;
+		return true;
+	}
+	return false;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline bool
+goRight(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	typedef typename TAnnotation::TId					TId;
+	
+	TAnnotation &anno = getAnnotation(it);
+	TId nextSiblingId = anno.nextSiblingId;
+	if (nextSiblingId != TAnnotation::INVALID_ID)
+	{
+		TId lastChildId = it.store->annotationStore[anno.parentId].lastChildId;
+		if (it.id != lastChildId)
+		{
+			it.id = nextSiblingId;
+			return true;
+		}
+	}
+	return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline Iter<TFragmentStore, AnnotationTree<TSpec> >
+nodeUp(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	Iter<TFragmentStore, AnnotationTree<TSpec> > tmp(it);
+	goUp(tmp);
+	return tmp;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline Iter<TFragmentStore, AnnotationTree<TSpec> >
+nodeDown(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	Iter<TFragmentStore, AnnotationTree<TSpec> > tmp(it);
+	goDown(tmp);
+	return tmp;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline Iter<TFragmentStore, AnnotationTree<TSpec> >
+nodeRight(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	Iter<TFragmentStore, AnnotationTree<TSpec> > tmp(it);
+	goRight(tmp);
+	return tmp;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+// insert a new id into a cyclic list and returns new last child id
+template <typename TAnnotationStore, typename TId>
+inline TId
+_cyclicListFrontInsert(TAnnotationStore & annotationStore, TId newId, TId lastChildId)
+{
+	typedef typename Value<TAnnotationStore>::Type TAnnotation;
+
+	TId nextId, newLastId;
+	if (lastChildId != TAnnotation::INVALID_ID)
+	{
+		// get last node in the cycle
+		TAnnotation &lastChild = annotationStore[lastChildId];
+		// last child points to first child
+		nextId = lastChild.nextSiblingId;
+		// insert new node between last and first
+		lastChild.nextSiblingId = newId;
+		// last child remains the same
+		newLastId = lastChildId;
+	} else
+		// cyclic list was empty
+		newLastId = nextId = newId;
+	
+	// link new node to former first node
+	annotationStore[newId].nextSiblingId = nextId;
+	
+	return newLastId;
+}
+
+// delete an id from a cyclic list and returns new last child id
+template <typename TAnnotationStore, typename TId>
+inline TId
+_cyclicListSearchPrev(TAnnotationStore & annotationStore, TId id, TId lastChildId)
+{
+	typedef typename Value<TAnnotationStore>::Type TAnnotation;
+
+	if (lastChildId == TAnnotation::INVALID_ID)
+		return TAnnotation::INVALID_ID;
+	
+	TId prevId, i = lastChildId;
+	do {
+		prevId = i;
+		i = annotationStore[i].nextSiblingId;
+		if (i == id) break;
+	} while (i != lastChildId);
+
+	if (i == id)
+		return prevId;
+	else
+		return TAnnotation::INVALID_ID;
+}
+
+// delete an id from a cyclic list and returns new last child id
+template <typename TAnnotationStore, typename TId>
+inline TId
+_cyclicListRemove(TAnnotationStore & annotationStore, TId id, TId lastChildId)
+{
+	typedef typename Value<TAnnotationStore>::Type TAnnotation;
+
+	TId prevId = _cyclicListSearchPrev(annotationStore, id, lastChildId);
+	
+	if (prevId != TAnnotation::INVALID_ID)
+	{
+		annotationStore[prevId].nextSiblingId = annotationStore[id].nextSiblingId;
+		
+		if (id == lastChildId)
+		{
+			if (prevId != id)
+				return prevId;
+			else
+				return TAnnotation::INVALID_ID;
+		} else
+			return lastChildId;
+	}
+	return lastChildId;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline Iter<TFragmentStore, AnnotationTree<TSpec> >
+createLeftChild(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	typedef typename TAnnotation::TId					TId;
+	
+	appendValue(it.store->annotationStore, getAnnotation(it));
+	TAnnotation &parentAnno = getAnnotation(it);
+
+	TId childId = length(it.store->annotationStore) - 1;
+	TAnnotation &childAnno = it.store->annotationStore[childId];
+	
+	parentAnno.lastChildId = _cyclicListFrontInsert(it.store->annotationStore, childId, parentAnno.lastChildId);
+	childAnno.parentId = it.id;
+	childAnno.lastChildId = TAnnotation::INVALID_ID;
+	
+	Iter<TFragmentStore, AnnotationTree<TSpec> > childIter(it);
+	childIter.id = childId;
+	return childIter;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline Iter<TFragmentStore, AnnotationTree<TSpec> >
+createRightChild(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	typedef typename TAnnotation::TId					TId;
+	
+	appendValue(it.store->annotationStore, getAnnotation(it));
+	TAnnotation &parentAnno = getAnnotation(it);
+
+	TId childId = length(it.store->annotationStore) - 1;
+	TAnnotation &childAnno = it.store->annotationStore[childId];
+	
+	_cyclicListFrontInsert(it.store->annotationStore, childId, parentAnno.lastChildId);
+	parentAnno.lastChildId = childId;
+	childAnno.parentId = it.id;
+	childAnno.lastChildId = TAnnotation::INVALID_ID;
+	
+	Iter<TFragmentStore, AnnotationTree<TSpec> > childIter(it);
+	childIter.id = childId;
+	return childIter;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline Iter<TFragmentStore, AnnotationTree<TSpec> >
+createSibling(Iter<TFragmentStore, AnnotationTree<TSpec> > & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	typedef typename TAnnotation::TId					TId;
+
+	appendValue(it.store->annotationStore, getAnnotation(it));
+	TAnnotation &anno = getAnnotation(it);
+
+	TId siblingId = length(it.store->annotationStore) - 1;
+
+	TAnnotation &parentAnno = it.store->annotationStore[anno.parentId];
+	if (parentAnno.lastChildId == it.id)
+		parentAnno.lastChildId = siblingId;
+
+	TAnnotation &siblingAnno = it.store->annotationStore[siblingId];
+	siblingAnno.nextSiblingId = anno.nextSiblingId;
+	siblingAnno.parentId = anno.parentId;
+	siblingAnno.lastChildId = TAnnotation::INVALID_ID;
+	anno.nextSiblingId = siblingId;
+	
+	Iter<TFragmentStore, AnnotationTree<TSpec> > siblingIter(it);
+	siblingIter.id = siblingId;
+	return siblingIter;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec>
+inline bool
+isRoot(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+
+//	if (it.id >= length(it.store->annotationStore)) return false;
+	return it.store->annotationStore[it.id].parentId == TAnnotation::INVALID_ID;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline bool
+isLeaf(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+
+//	if (it.id >= length(it.store->annotationStore)) return false;
+	return it.store->annotationStore[it.id].lastChildId == TAnnotation::INVALID_ID;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline bool
+isLastChild(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it)
+{
+	typedef typename TFragmentStore::TAnnotationStore	TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type		TAnnotation;
+	typedef typename TAnnotation::TId					TId;
+
+	TAnnotation &anno = getAnnotation(it);
+	TId nextSiblingId = anno.nextSiblingId;
+	if (nextSiblingId != TAnnotation::INVALID_ID)
+	{
+		TId lastChildId = it.store->annotationStore[anno.parentId].lastChildId;
+		return it.id == lastChildId;
+	}
+	return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TAnnotationStore>
+inline void
+_storeClearAnnoBackLinks(TAnnotationStore & me)
+{
+	typedef typename Value<TAnnotationStore>::Type				TAnnotation;
+	typedef typename Iterator<TAnnotationStore, Standard>::Type TAnnoIter;
+
+	TAnnoIter it = begin(me, Standard());
+	TAnnoIter itEnd = end(me, Standard());
+	
+	for (; it != itEnd; ++it)
+	{
+		(*it).lastChildId = TAnnotation::INVALID_ID;
+		(*it).nextSiblingId = TAnnotation::INVALID_ID;
+	}
+}
+
+template <typename TAnnotationStore>
+inline void
+_storeCreateAnnoBackLinks(TAnnotationStore & me)
+{
+	typedef typename Value<TAnnotationStore>::Type				TAnnotation;
+	typedef typename TAnnotation::TId							TId;
+	typedef typename Iterator<TAnnotationStore, Standard>::Type TAnnoIter;
+	
+	TAnnoIter itBegin = begin(me, Standard());
+	TAnnoIter itEnd = end(me, Standard());
+	TId id = (itEnd - itBegin) - 1;
+	TAnnoIter it = itBegin + id;
+	
+	for (; itBegin <= it; --it, --id)
+	{
+		if ((*it).parentId != TAnnotation::INVALID_ID)
+		{
+			TAnnoIter parent = itBegin + (*it).parentId;
+			if ((*parent).lastChildId == TAnnotation::INVALID_ID)
+			{
+				(*parent).lastChildId = id;
+				(*it).nextSiblingId = id;
+			}
+
+			if ((*it).nextSiblingId == TAnnotation::INVALID_ID)
+			{
+				TAnnoIter lastChild = itBegin + (*parent).lastChildId;
+				(*it).nextSiblingId = (*lastChild).nextSiblingId;
+				(*lastChild).nextSiblingId = id;
+			}
+		}
+		else 
+			(*it).nextSiblingId = TAnnotation::INVALID_ID;
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_base.h b/src/SeqAn-1.3/seqan/store/store_base.h
new file mode 100644
index 0000000..cc5f64a
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_base.h
@@ -0,0 +1,282 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_BASE_H
+#define SEQAN_HEADER_STORE_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Base structs
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.GapAnchor
+..summary:Stores the position of an alignment character in sequence-space and in gap-space.
+..cat:Alignments
+..signature:GapAnchor<TPos>
+..param.TPos:Type to store gapped/ungapped positions.
+..remarks:Value types of the $gaps$ strings in @Class.ReadStoreElement@ and @Class.ContigStoreElement at .
+
+.Memfunc.GapAnchor#GapAnchor
+..summary:Constructor
+..signature:GapAnchor<TPos> ()
+..signature:GapAnchor<TPos> (TPos seqPos, TPos gapPos)
+..param.seqPos:Sequence character position in the ungapped sequence.
+..param.gapPos:Sequence character position in the gapped sequence.
+..remarks:Default constructor sets both positions to $0$.
+..class:Class.GapAnchor
+.Memvar.GapAnchor#seqPos
+..summary:Sequence character position in the ungapped sequence.
+..class:Class.GapAnchor
+.Memvar.GapAnchor#gapPos
+..summary:Sequence character position in the gapped sequence.
+..class:Class.GapAnchor
+..include:seqan/store.h
+*/
+
+// We store gap anchors only for the first text character behind a gap or a clipped sequence character
+
+template <typename TPos>
+struct GapAnchor {
+	TPos	seqPos;			// sequence character position in the ungapped sequence
+	TPos	gapPos;			// sequence character position in the gapped sequence
+
+	GapAnchor() : seqPos(0), gapPos(0) {}
+	GapAnchor(TPos sP, TPos gP) : seqPos(sP), gapPos(gP) {}
+	
+	template <typename TPos_>
+	GapAnchor(GapAnchor<TPos_> const &other)
+	{
+		seqPos = other.seqPos;
+		gapPos = other.gapPos;
+	} 
+
+	template <typename TPos_>
+	inline GapAnchor const &
+	operator = (GapAnchor<TPos_> const &other)
+	{
+		seqPos = other.seqPos;
+		gapPos = other.gapPos;
+		return *this;
+	} 
+
+	template <typename TOther>
+	inline bool
+	operator == (TOther const &other) const
+	{
+		return seqPos == other.seqPos && gapPos == other.gapPos;
+	} 
+
+	template <typename TOther>
+	inline bool
+	operator != (TOther const &other) const
+	{
+		return !(*this == other);
+	} 
+
+	template <typename TOther>
+	inline bool
+	operator < (TOther const &other) const
+	{
+		return seqPos < other.seqPos || gapPos < other.gapPos;
+	} 
+
+	template <typename TOther>
+	inline bool
+	operator > (TOther const &other) const
+	{
+		return seqPos > other.seqPos || gapPos > other.gapPos;
+	} 
+
+	template <typename TOther>
+	inline bool
+	operator <= (TOther const &other) const
+	{
+		return seqPos < other.seqPos || gapPos <= other.gapPos;
+	} 
+
+	template <typename TOther>
+	inline bool
+	operator >= (TOther const &other) const
+	{
+		return seqPos > other.seqPos || gapPos >= other.gapPos;
+	}
+};
+
+template <typename TPos>
+struct Size< GapAnchor<TPos> >
+{
+	typedef TPos Type;
+};
+
+template <typename TPos>
+struct Size< GapAnchor<TPos> const>:
+	public Size< GapAnchor<TPos> > {};
+
+template <typename TPos>
+struct Position< GapAnchor<TPos> >
+{
+	typedef TPos Type;
+};
+
+template <typename TPos>
+struct Position< GapAnchor<TPos> const>:
+	public Position< GapAnchor<TPos> > {};
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// Sorting tags (just for lower_bound and upper_bound, positions are always sorted)
+//////////////////////////////////////////////////////////////////////////////
+
+
+struct SortSeqPos_;
+typedef Tag<SortSeqPos_> const SortSeqPos;
+
+struct SortGapPos_;
+typedef Tag<SortGapPos_> const SortGapPos;
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGapAnchor, typename TTag>
+struct _LessGapAnchor;
+
+template <typename TGapAnchor>
+struct _LessGapAnchor<TGapAnchor, SortSeqPos> :
+	public ::std::binary_function<TGapAnchor, TGapAnchor, bool>
+{
+	inline bool 
+	operator() (TGapAnchor const& a1, TGapAnchor const& a2) const {
+		return (a1.seqPos) < (a2.seqPos);
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TGapAnchor>
+struct _LessGapAnchor<TGapAnchor, SortGapPos> :
+	public ::std::binary_function<TGapAnchor, TGapAnchor, bool>
+{
+	inline bool 
+	operator() (TGapAnchor const& a1, TGapAnchor const& a2) const {
+		return (a1.gapPos) < (a2.gapPos);
+	}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Lower and upper bound search
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TGapAnchor, typename TSearchValue>
+inline typename Iterator<TGapAnchor, Standard>::Type
+lowerBoundGapAnchor(TGapAnchor const& gaps, 
+					TSearchValue const val,
+					SortSeqPos) 
+{
+	typedef typename Value<TGapAnchor>::Type TGapAnchorElement;
+	TGapAnchorElement el;
+	el.seqPos = val;
+	return ::std::lower_bound(
+		begin(gaps, Standard()), 
+		end(gaps, Standard()), 
+		el,
+		_LessGapAnchor<typename Value<TGapAnchor>::Type, SortSeqPos const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TGapAnchor, typename TSearchValue>
+inline typename Iterator<TGapAnchor, Standard>::Type
+upperBoundGapAnchor(TGapAnchor const& gaps, 
+					TSearchValue const val,
+					SortSeqPos) 
+{
+	typedef typename Value<TGapAnchor>::Type TGapAnchorElement;
+	TGapAnchorElement el;
+	el.seqPos = val;
+	return ::std::upper_bound(
+		begin(gaps, Standard()), 
+		end(gaps, Standard()), 
+		el,
+		_LessGapAnchor<typename Value<TGapAnchor>::Type, SortSeqPos const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TGapAnchor, typename TSearchValue>
+inline typename Iterator<TGapAnchor, Standard>::Type
+lowerBoundGapAnchor(TGapAnchor const& gaps, 
+					TSearchValue const val,
+					SortGapPos) 
+{
+	typedef typename Value<TGapAnchor>::Type TGapAnchorElement;
+	TGapAnchorElement el;
+	el.gapPos = val;
+	return ::std::lower_bound(
+		begin(gaps, Standard()), 
+		end(gaps, Standard()), 
+		el,
+		_LessGapAnchor<typename Value<TGapAnchor>::Type, SortGapPos const>() );
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+template <typename TGapAnchor, typename TSearchValue>
+inline typename Iterator<TGapAnchor, Standard>::Type
+upperBoundGapAnchor(TGapAnchor const& gaps, 
+					TSearchValue const val,
+					SortGapPos) 
+{
+	typedef typename Value<TGapAnchor>::Type TGapAnchorElement;
+	TGapAnchorElement el;
+	el.gapPos = val;
+	return ::std::upper_bound(
+		begin(gaps, Standard()), 
+		end(gaps, Standard()), 
+		el,
+		_LessGapAnchor<typename Value<TGapAnchor>::Type, SortGapPos const>() );
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_contig.h b/src/SeqAn-1.3/seqan/store/store_contig.h
new file mode 100644
index 0000000..0a48edb
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_contig.h
@@ -0,0 +1,205 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_CONTIG_H
+#define SEQAN_HEADER_STORE_CONTIG_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Contig Store
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.ContigStoreElement
+..summary:Represents a single contig.
+..cat:Fragment Store
+..signature:ContigStoreElement<>
+..signature:ContigStoreElement<TContigSeq[, TGapAnchor[, TSpec]]>
+..param.TContigSeq:Type to store the contig sequence.
+..param.TGapAnchor:Type of a contig gap anchor.
+...type:Class.GapAnchor
+..param.TSpec:The specialization type.
+...default:$void$
+..remarks:Value type of the @Memvar.FragmentStore#contigStore@ string.
+
+.Typedef.ContigStoreElement#TContigSeq
+..summary:Type of the $seq$ member.
+..class:Class.ContigStoreElement
+.Typedef.ContigStoreElement#TGapAnchors
+..summary:Type of the $gaps$ member.
+..class:Class.ContigStoreElement
+.Typedef.ContigStoreElement#TPos
+..summary:Type of the $fileBeginPos$ and $fileEndPos$ members.
+..class:Class.ContigStoreElement
+.Typedef.ContigStoreElement#TSpec
+..summary:The specialization type.
+..class:Class.ContigStoreElement
+
+
+.Memfunc.ContigStoreElement#ContigStoreElement
+..summary:Constructor
+..signature:ContigStoreElement<> ()
+..signature:ContigStoreElement<TContigSeq[, TGapAnchor[, TSpec]]> ()
+..remarks:Sets $fileId$ to $INVALID_ID$ and $usage$, $fileBeginPos$ and $fileEndPos$ to $0$.
+..class:Class.ContigStoreElement
+.Memvar.ContigStoreElement#seq
+..summary:Contig sequence.
+..type:Typedef.ContigStoreElement#TContigSeq
+..class:Class.ContigStoreElement
+.Memvar.ContigStoreElement#gaps
+..summary:String of contig gap anchors. Can be used to create a $Spec.AnchorGaps$ alignment row.
+..type:Typedef.ContigStoreElement#TGapAnchors
+..class:Class.ContigStoreElement
+.Memvar.ContigStoreElement#usage
+..summary:Counts the number of locks, see @Function.lockContigs at .
+..class:Class.ContigStoreElement
+.Memvar.ContigStoreElement#fileId
+..summary:Refers to a file in the @Memvar.FragmentStore#contigFileStore@ or is $INVALID_ID$ if the contig has no file association.
+..type:Metafunction.Id
+..class:Class.ContigStoreElement
+.Memvar.ContigStoreElement#fileBeginPos
+..summary:Begin position of the contig sequence fragment in the file.
+..type:Typedef.ContigStoreElement#TPos
+..class:Class.ContigStoreElement
+.Memvar.ContigStoreElement#fileEndPos
+..summary:End position of the contig sequence fragment in the file.
+..type:Typedef.ContigStoreElement#TPos
+..class:Class.ContigStoreElement
+.Memvar.ContigStoreElement#INVALID_ID
+..summary:Constant to represent an invalid id.
+..type:Metafunction.Id
+..class:Class.ContigStoreElement
+..include:seqan/store.h
+*/
+
+template <typename TContigSeq_, typename TGapAnchor_, typename TSpec_ = void>
+struct ContigStoreElement
+{
+	typedef typename Id<ContigStoreElement>::Type	TId;
+	
+	typedef TContigSeq_			TContigSeq;
+	typedef TGapAnchor_			TGapAnchor;
+	typedef TSpec_				TSpec;
+	typedef __int64				TPos;
+	typedef String<TGapAnchor>	TGapAnchors;
+
+	static const TId INVALID_ID;
+
+	TContigSeq	seq;
+	TGapAnchors	gaps;
+	
+// dynamic loading and disposing of contigs
+	unsigned	usage;			// number of threads,... using this contig
+	TId			fileId;
+	TPos		fileBeginPos;
+	TPos		fileEndPos;
+
+	ContigStoreElement() : usage(0), fileId(INVALID_ID), fileBeginPos(0), fileEndPos(0) {}
+
+    inline bool operator==(ContigStoreElement const & other) const
+    {
+        return usage == other.usage &&
+                fileId == other.fileId &&
+                fileBeginPos == other.fileBeginPos &&
+                fileEndPos == other.fileEndPos &&
+                seq == other.seq &&
+                gaps == other.gaps;
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TContigSeq_, typename TGapAnchor_, typename TSpec_> 
+const typename Id<ContigStoreElement<TContigSeq_, TGapAnchor_, TSpec_> >::Type 
+ContigStoreElement<TContigSeq_, TGapAnchor_, TSpec_>::INVALID_ID = MaxValue<typename Id<ContigStoreElement<TContigSeq_, TGapAnchor_, TSpec_> >::Type>::VALUE; 
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.ContigFile
+..summary:Represents a file containing contigs.
+..cat:Fragment Store
+..signature:ContigFile<>
+..signature:ContigFile<TSpec>
+..param.TSpec:The specialization type.
+...default:$void$
+..remarks:Value type of the @Memvar.FragmentStore#contigFileStore@ string.
+
+.Memvar.ContigFile#fileName
+..summary:Contig file name.
+..type:Shortcut.CharString
+..class:Class.ContigFile
+.Memvar.ContigFile#format
+..summary:Stores the contig file format, auto-detected in $Function.loadContigs$.
+..type:Class.AutoSeqFormat
+..class:Class.ContigFile
+.Memvar.ContigFile#firstContigId
+..summary:The $contigId$ of the first sequence in the file. Subsequent contig sequences have an increasing $contigId$.
+..type:Metafunction.Id
+..class:Class.ContigFile
+..include:seqan/store.h
+*/
+
+template <typename TSpec_ = void>
+struct ContigFile
+{
+	typedef typename Id<ContigFile>::Type	TId;
+
+	static const TId INVALID_ID;
+
+	CharString		fileName;
+	AutoSeqFormat	format;
+	TId				firstContigId;	// first sequence of the file corresponds to this contigId
+
+    inline bool operator==(ContigFile const & other) const
+    {
+        return fileName == other.fileName &&
+                format == other.format &&
+                firstContigId == other.firstContigId;
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec_> 
+const typename Id<ContigFile<TSpec_> >::Type 
+ContigFile<TSpec_>::INVALID_ID = MaxValue<typename Id<ContigFile<TSpec_> >::Type>::VALUE; 
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_generated_forwards.h b/src/SeqAn-1.3/seqan/store/store_generated_forwards.h
new file mode 100644
index 0000000..a649778
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_generated_forwards.h
@@ -0,0 +1,1276 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_STORE_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_STORE_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// AlignIntervalsStoreElement
+
+template <typename TInterval , typename TSpec > struct AlignIntervalsStoreElement;       	// "projects/library/seqan/store/store_align_intervals.h"(72)
+
+//____________________________________________________________________________
+// AlignQualityStoreElement
+
+template <typename TScore, typename TSpec > struct AlignQualityStoreElement;       	// "projects/library/seqan/store/store_align.h"(215)
+
+//____________________________________________________________________________
+// AlignedReadLayout
+
+struct AlignedReadLayout;       	// "projects/library/seqan/store/store_all.h"(1406)
+
+//____________________________________________________________________________
+// AlignedReadStoreElement
+
+template <typename TPos_, typename TGapAnchor_, typename TSpec_ > struct AlignedReadStoreElement;       	// "projects/library/seqan/store/store_align.h"(120)
+
+//____________________________________________________________________________
+// AnchorGaps
+
+template <typename TGapAnchors > struct AnchorGaps;       	// "projects/library/seqan/store/store_align.h"(1166)
+
+//____________________________________________________________________________
+// AnnotationStoreElement
+
+template <typename TPos_, typename TSpec > struct AnnotationStoreElement;       	// "projects/library/seqan/store/store_annotation.h"(47)
+
+//____________________________________________________________________________
+// AnnotationTree
+
+template <typename TSpec > struct AnnotationTree;       	// "projects/library/seqan/store/store_annotation.h"(87)
+
+//____________________________________________________________________________
+// CigarElement
+
+template <typename TOperation_ , typename TCount_ > struct CigarElement;       	// "projects/library/seqan/store/store_io_sam.h"(67)
+
+//____________________________________________________________________________
+// ContigFile
+
+template <typename TSpec_ > struct ContigFile;       	// "projects/library/seqan/store/store_contig.h"(178)
+
+//____________________________________________________________________________
+// ContigStoreElement
+
+template <typename TContigSeq_, typename TGapAnchor_, typename TSpec_ > struct ContigStoreElement;       	// "projects/library/seqan/store/store_contig.h"(110)
+
+//____________________________________________________________________________
+// FragmentStore
+
+template <typename TSpec , typename TConfig > class FragmentStore;       	// "projects/library/seqan/store/store_all.h"(415)
+
+//____________________________________________________________________________
+// FragmentStoreConfig
+
+template <typename TSpec > struct FragmentStoreConfig;       	// "projects/library/seqan/store/store_all.h"(262)
+
+//____________________________________________________________________________
+// FromBam_
+
+struct FromBam_;       	// "projects/library/seqan/store/store_io_sam.h"(61)
+
+//____________________________________________________________________________
+// GapAnchor
+
+template <typename TPos> struct GapAnchor;       	// "projects/library/seqan/store/store_base.h"(75)
+
+//____________________________________________________________________________
+// IOContextGff_
+
+template <typename TFragmentStore, typename TSpec > struct IOContextGff_;       	// "projects/library/seqan/store/store_io_gff.h"(154)
+
+//____________________________________________________________________________
+// IOContextUcsc_
+
+template <typename TFragmentStore, typename TSpec > struct IOContextUcsc_;       	// "projects/library/seqan/store/store_io_ucsc.h"(95)
+
+//____________________________________________________________________________
+// Interval
+
+template <typename TValue > struct Interval;       	// "projects/library/seqan/store/store_align_intervals.h"(47)
+
+//____________________________________________________________________________
+// LibraryStoreElement
+
+template <typename TMean , typename TStd , typename TSpec > struct LibraryStoreElement;       	// "projects/library/seqan/store/store_library.h"(77)
+
+//____________________________________________________________________________
+// MatchMateInfoLess_
+
+struct MatchMateInfoLess_;       	// "projects/library/seqan/store/store_io_sam.h"(512)
+
+//____________________________________________________________________________
+// MatchMateInfo_
+
+template <typename TPos, typename TId> struct MatchMateInfo_;       	// "projects/library/seqan/store/store_io_sam.h"(504)
+
+//____________________________________________________________________________
+// MatePairStoreElement
+
+template <typename TSpec > struct MatePairStoreElement;       	// "projects/library/seqan/store/store_matepair.h"(80)
+
+//____________________________________________________________________________
+// NameStoreCache
+
+template <typename TNameStore, typename TName > struct NameStoreCache;       	// "projects/library/seqan/store/store_all.h"(103)
+
+//____________________________________________________________________________
+// NameStoreLess
+
+template <typename TNameStore, typename TName> struct NameStoreLess;       	// "projects/library/seqan/store/store_all.h"(49)
+
+//____________________________________________________________________________
+// ReadStoreElement
+
+template <typename TSpec > struct ReadStoreElement;       	// "projects/library/seqan/store/store_read.h"(74)
+
+//____________________________________________________________________________
+// Sam_
+
+struct Sam_;       	// "projects/library/seqan/store/store_io_sam.h"(52)
+
+//____________________________________________________________________________
+// SortBeginPos_
+
+struct SortBeginPos_;       	// "projects/library/seqan/store/store_align.h"(272)
+
+//____________________________________________________________________________
+// SortContigId_
+
+struct SortContigId_;       	// "projects/library/seqan/store/store_align.h"(266)
+
+//____________________________________________________________________________
+// SortEndPos_
+
+struct SortEndPos_;       	// "projects/library/seqan/store/store_align.h"(275)
+
+//____________________________________________________________________________
+// SortGapPos_
+
+struct SortGapPos_;       	// "projects/library/seqan/store/store_base.h"(174)
+
+//____________________________________________________________________________
+// SortId_
+
+struct SortId_;       	// "projects/library/seqan/store/store_align.h"(269)
+
+//____________________________________________________________________________
+// SortPairMatchId_
+
+struct SortPairMatchId_;       	// "projects/library/seqan/store/store_align.h"(278)
+
+//____________________________________________________________________________
+// SortReadId_
+
+struct SortReadId_;       	// "projects/library/seqan/store/store_align.h"(281)
+
+//____________________________________________________________________________
+// SortSeqPos_
+
+struct SortSeqPos_;       	// "projects/library/seqan/store/store_base.h"(171)
+
+//____________________________________________________________________________
+// TagAmos_
+
+struct TagAmos_;       	// "projects/library/seqan/store/store_io.h"(54)
+
+//____________________________________________________________________________
+// TagGff_
+
+struct TagGff_;       	// "projects/library/seqan/store/store_io_gff.h"(46)
+
+//____________________________________________________________________________
+// TagGtf_
+
+struct TagGtf_;       	// "projects/library/seqan/store/store_io_gff.h"(54)
+
+//____________________________________________________________________________
+// UcscKnownGene_
+
+struct UcscKnownGene_;       	// "projects/library/seqan/store/store_io_ucsc.h"(50)
+
+//____________________________________________________________________________
+// UcscKnownIsoforms_
+
+struct UcscKnownIsoforms_;       	// "projects/library/seqan/store/store_io_ucsc.h"(58)
+
+//____________________________________________________________________________
+// Ucsc_
+
+template <typename TSpec> struct Ucsc_;       	// "projects/library/seqan/store/store_io_ucsc.h"(42)
+
+//____________________________________________________________________________
+// _LessAlignedRead
+
+template <typename TAlignedRead, typename TTag> struct _LessAlignedRead;       	// "projects/library/seqan/store/store_align.h"(293)
+
+//____________________________________________________________________________
+// _LessGapAnchor
+
+template <typename TGapAnchor, typename TTag> struct _LessGapAnchor;       	// "projects/library/seqan/store/store_base.h"(180)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// Bam_
+
+struct Bam_;       	// "projects/library/seqan/store/store_io_bam.h"(54)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Amos
+
+typedef Tag<TagAmos_> const Amos;       	// "projects/library/seqan/store/store_io.h"(55)
+
+//____________________________________________________________________________
+// FromBam
+
+typedef Tag<FromBam_> FromBam;       	// "projects/library/seqan/store/store_io_sam.h"(62)
+
+//____________________________________________________________________________
+// Gff
+
+typedef Tag<TagGff_> const Gff;       	// "projects/library/seqan/store/store_io_gff.h"(47)
+
+//____________________________________________________________________________
+// Gtf
+
+typedef Tag<TagGtf_> const Gtf;       	// "projects/library/seqan/store/store_io_gff.h"(55)
+
+//____________________________________________________________________________
+// Sam
+
+typedef Tag<Sam_> const Sam;       	// "projects/library/seqan/store/store_io_sam.h"(53)
+
+//____________________________________________________________________________
+// SortBeginPos
+
+typedef Tag<SortBeginPos_> const SortBeginPos;       	// "projects/library/seqan/store/store_align.h"(273)
+
+//____________________________________________________________________________
+// SortContigId
+
+typedef Tag<SortContigId_> const SortContigId;       	// "projects/library/seqan/store/store_align.h"(267)
+
+//____________________________________________________________________________
+// SortEndPos
+
+typedef Tag<SortEndPos_> const SortEndPos;       	// "projects/library/seqan/store/store_align.h"(276)
+
+//____________________________________________________________________________
+// SortGapPos
+
+typedef Tag<SortGapPos_> const SortGapPos;       	// "projects/library/seqan/store/store_base.h"(175)
+
+//____________________________________________________________________________
+// SortId
+
+typedef Tag<SortId_> const SortId;       	// "projects/library/seqan/store/store_align.h"(270)
+
+//____________________________________________________________________________
+// SortPairMatchId
+
+typedef Tag<SortPairMatchId_> const SortPairMatchId;       	// "projects/library/seqan/store/store_align.h"(279)
+
+//____________________________________________________________________________
+// SortReadId
+
+typedef Tag<SortReadId_> const SortReadId;       	// "projects/library/seqan/store/store_align.h"(282)
+
+//____________________________________________________________________________
+// SortSeqPos
+
+typedef Tag<SortSeqPos_> const SortSeqPos;       	// "projects/library/seqan/store/store_base.h"(172)
+
+//____________________________________________________________________________
+// Ucsc
+
+typedef Tag<Ucsc_<UcscKnownGene_> > const Ucsc;       	// "projects/library/seqan/store/store_io_ucsc.h"(51)
+
+//____________________________________________________________________________
+// UcscIsoforms
+
+typedef Tag<Ucsc_<UcscKnownIsoforms_> > const UcscIsoforms;       	// "projects/library/seqan/store/store_io_ucsc.h"(59)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// Bam
+
+typedef Tag<Bam_> Bam;       	// "projects/library/seqan/store/store_io_bam.h"(55)
+
+} //namespace seqan
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// _adjustParent
+
+template <typename TAnnotation> inline void _adjustParent ( TAnnotation &parent, TAnnotation const &child);       	// "projects/library/seqan/store/store_io_gff.h"(329)
+
+//____________________________________________________________________________
+// _assignSourceLength
+
+template <typename TSize, typename TSource, typename TGapAnchors> inline void _assignSourceLength(TSize & size, Gaps<TSource, AnchorGaps<TGapAnchors> > const & me);       	// "projects/library/seqan/store/store_align.h"(1240)
+
+//____________________________________________________________________________
+// _cyclicListFrontInsert
+
+template <typename TAnnotationStore, typename TId> inline TId _cyclicListFrontInsert(TAnnotationStore & annotationStore, TId newId, TId lastChildId);       	// "projects/library/seqan/store/store_annotation.h"(459)
+
+//____________________________________________________________________________
+// _cyclicListRemove
+
+template <typename TAnnotationStore, typename TId> inline TId _cyclicListRemove(TAnnotationStore & annotationStore, TId id, TId lastChildId);       	// "projects/library/seqan/store/store_annotation.h"(510)
+
+//____________________________________________________________________________
+// _cyclicListSearchPrev
+
+template <typename TAnnotationStore, typename TId> inline TId _cyclicListSearchPrev(TAnnotationStore & annotationStore, TId id, TId lastChildId);       	// "projects/library/seqan/store/store_annotation.h"(487)
+
+//____________________________________________________________________________
+// _dataAnchors
+
+template <typename TSource, typename TGapAnchors> inline TGapAnchors & _dataAnchors(Gaps<TSource, AnchorGaps<TGapAnchors> > & me);       	// "projects/library/seqan/store/store_align.h"(1253)
+template <typename TSource, typename TGapAnchors> inline TGapAnchors const & _dataAnchors(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me);       	// "projects/library/seqan/store/store_align.h"(1261)
+
+//____________________________________________________________________________
+// _dataSource
+
+template <typename TSource, typename TGapAnchors> inline Holder<TSource> & _dataSource(Gaps<TSource, AnchorGaps<TGapAnchors> > & me);       	// "projects/library/seqan/store/store_align.h"(1223)
+template <typename TSource, typename TGapAnchors> inline Holder<TSource> const & _dataSource(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me);       	// "projects/library/seqan/store/store_align.h"(1230)
+
+//____________________________________________________________________________
+// _generatePairMatchIds
+
+template <typename TSpec, typename TConfig, typename TMatchMateInfos> inline void _generatePairMatchIds ( FragmentStore<TSpec, TConfig> & fragStore, TMatchMateInfos & matchMateInfos);       	// "projects/library/seqan/store/store_io_sam.h"(526)
+
+//____________________________________________________________________________
+// _getAnchor
+
+template <typename TAnchor, typename TSource, typename TGapAnchors, typename TIdx> inline void _getAnchor(TAnchor &anchor, Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, TIdx idx);       	// "projects/library/seqan/store/store_align.h"(1271)
+
+//____________________________________________________________________________
+// _getClippedLength
+
+template <typename TCigarString, typename TNum> inline void _getClippedLength(TCigarString const & cigar, TNum & sum);       	// "projects/library/seqan/store/store_io_sam.h"(264)
+
+//____________________________________________________________________________
+// _goNextGapAnchorIterator
+
+template <typename T> inline void _goNextGapAnchorIterator(T & me);       	// "projects/library/seqan/store/store_align.h"(1843)
+
+//____________________________________________________________________________
+// _goPreviousGapAnchorIterator
+
+template <typename T> inline void _goPreviousGapAnchorIterator(T & me);       	// "projects/library/seqan/store/store_align.h"(1860)
+
+//____________________________________________________________________________
+// _goToGapAnchorIterator
+
+template <typename T, typename TPos> inline void _goToGapAnchorIterator(T & me, TPos pos);       	// "projects/library/seqan/store/store_align.h"(1877)
+
+//____________________________________________________________________________
+// _helperIsNegative
+
+template <typename T> inline bool _helperIsNegative(T, False);       	// "projects/library/seqan/store/store_align.h"(1424)
+template <typename T> inline bool _helperIsNegative(T t, True);       	// "projects/library/seqan/store/store_align.h"(1430)
+
+//____________________________________________________________________________
+// _parseIsDna
+
+template <typename TChar> inline bool _parseIsDna(TChar const & c);       	// "projects/library/seqan/store/store_io_sam.h"(381)
+
+//____________________________________________________________________________
+// _parseIsPhredQual
+
+template <typename TChar> inline bool _parseIsPhredQual(TChar c);       	// "projects/library/seqan/store/store_io_sam.h"(411)
+
+//____________________________________________________________________________
+// _parseReadCharsUntilEndOfLine
+
+template <typename TFile, typename TChar> inline void _parseReadCharsUntilEndOfLine(TFile & file, String<char> & str, TChar& c);       	// "projects/library/seqan/store/store_io_sam.h"(455)
+
+//____________________________________________________________________________
+// _parseReadCigar
+
+template <typename TFile, typename TCigarString, typename TChar> inline void _parseReadCigar(TFile & file, TCigarString & cigar, TChar & c);       	// "projects/library/seqan/store/store_io_sam.h"(332)
+
+//____________________________________________________________________________
+// _parseReadDnaSeq
+
+template <typename TFile, typename TString, typename TChar> inline void _parseReadDnaSeq(TFile & file, TString & str, TChar & c);       	// "projects/library/seqan/store/store_io_sam.h"(392)
+
+//____________________________________________________________________________
+// _parseReadGffIdentifier
+
+template <typename TFile, typename TString, typename TChar> inline void _parseReadGffIdentifier(TFile & file, TString & str, TChar& c);       	// "projects/library/seqan/store/store_io_gff.h"(63)
+
+//____________________________________________________________________________
+// _parseReadGffKeyValue
+
+template <typename TFile, typename TKeyString, typename TValueString, typename TChar> inline bool _parseReadGffKeyValue(TFile & file, TKeyString & key, TValueString & value, TChar& c);       	// "projects/library/seqan/store/store_io_gff.h"(94)
+
+//____________________________________________________________________________
+// _parseReadSamIdentifier
+
+template <typename TFile, typename TString, typename TChar> inline void _parseReadSamIdentifier(TFile & file, TString & str, TChar& c);       	// "projects/library/seqan/store/store_io_sam.h"(364)
+
+//____________________________________________________________________________
+// _parseReadSeqQual
+
+template <typename TFile, typename TQualString, typename TChar> inline void _parseReadSeqQual(TFile & file, TQualString & str, TChar & c);       	// "projects/library/seqan/store/store_io_sam.h"(422)
+
+//____________________________________________________________________________
+// _parseReadUcscIdentifier
+
+template <typename TFile, typename TString, typename TChar> inline void _parseReadUcscIdentifier(TFile & file, TString & str, TChar& c);       	// "projects/library/seqan/store/store_io_ucsc.h"(67)
+
+//____________________________________________________________________________
+// _parseSkipEntryUntilWhitespace
+
+template <typename TFile, typename TChar> inline bool _parseSkipEntryUntilWhitespace(TFile& file, TChar& c);       	// "projects/library/seqan/store/store_io_gff.h"(81)
+
+//____________________________________________________________________________
+// _parseSkipWhiteComma
+
+template <typename TFile, typename TChar> inline void _parseSkipWhiteComma(TFile& file, TChar& c);       	// "projects/library/seqan/store/store_io_ucsc.h"(81)
+
+//____________________________________________________________________________
+// _printContig
+
+template <typename TStream, typename TFormatTag, typename TContigGaps, typename TContigName> inline void _printContig( TStream &stream, Tag<TFormatTag> const &format, AlignedReadLayout &, TContigGaps &contigGaps, TContigName const &);       	// "projects/library/seqan/store/store_all.h"(1502)
+
+//____________________________________________________________________________
+// _printRead
+
+template <typename TStream, typename TFormatTag, typename TContigGaps, typename TReadGaps, typename TAlignedRead, typename TLine> inline void _printRead( TStream &stream, Tag<TFormatTag> const &format, AlignedReadLayout &, TContigGaps &, TReadGaps &readGaps, TAlignedRead &, TLine);       	// "projects/library/seqan/store/store_all.h"(1491)
+
+//____________________________________________________________________________
+// _readAlignments
+
+template <typename TFile, typename TSpec, typename TConfig, typename TContigAnchorGaps, typename TMatchMateInfos, typename TChar> inline void _readAlignments ( TFile & file, FragmentStore<TSpec, TConfig> & fragStore, TContigAnchorGaps & contigAnchorGaps, TMatchMateInfos & matchMateInfos, TChar & c, Sam);       	// "projects/library/seqan/store/store_io_sam.h"(658)
+
+//____________________________________________________________________________
+// _readHeader
+
+template <typename TFile, typename TSpec, typename TConfig, typename TChar> inline void _readHeader ( TFile & file, FragmentStore<TSpec, TConfig> &, TChar & c, Sam);       	// "projects/library/seqan/store/store_io_sam.h"(638)
+
+//____________________________________________________________________________
+// _readOneAlignment
+
+template <typename TFile, typename TSpec, typename TConfig, typename TContigAnchorGaps, typename TMatchMateInfos, typename TChar, typename TContextSAM> inline void _readOneAlignment ( TFile & file, FragmentStore<TSpec, TConfig> & fragStore, TContigAnchorGaps & contigAnchorGaps, TMatchMateInfos & matchMateInfos, TChar & c, Sam, TContextSAM & contextSAM);       	// "projects/library/seqan/store/store_io_sam.h"(702)
+
+//____________________________________________________________________________
+// _readOneAnnotation
+
+template <typename TFile, typename TChar, typename TFragmentStore, typename TSpec> inline bool _readOneAnnotation ( TFile & file, TChar & c, IOContextGff_<TFragmentStore, TSpec> & ctx);       	// "projects/library/seqan/store/store_io_gff.h"(209)
+template <typename TFile, typename TChar, typename TFragmentStore, typename TSpec> inline bool _readOneAnnotation ( TFile & file, TChar & c, IOContextUcsc_<TFragmentStore, TSpec> & ctx);       	// "projects/library/seqan/store/store_io_ucsc.h"(137)
+
+//____________________________________________________________________________
+// _retrieveOneAnnotation
+
+template <typename TFragmentStore, typename TSpec, typename TAnnotation, typename TId> inline bool _retrieveOneAnnotation ( TFragmentStore & fragStore, IOContextUcsc_<TFragmentStore, TSpec> & ctx, TAnnotation &annotation, TId id, Ucsc);       	// "projects/library/seqan/store/store_io_ucsc.h"(427)
+template <typename TFragmentStore, typename TSpec, typename TAnnotation, typename TId> inline bool _retrieveOneAnnotation ( TFragmentStore & fragStore, IOContextUcsc_<TFragmentStore, TSpec> & ctx, TAnnotation &annotation, TId id, UcscIsoforms);       	// "projects/library/seqan/store/store_io_ucsc.h"(471)
+
+//____________________________________________________________________________
+// _storeAppendAnnotationName
+
+template <typename TSpec, typename TConfig, typename TId, typename TName> inline void _storeAppendAnnotationName ( FragmentStore<TSpec, TConfig> & fragStore, TId & annotationId, TName & annotationName);       	// "projects/library/seqan/store/store_all.h"(781)
+
+//____________________________________________________________________________
+// _storeAppendContig
+
+template <typename TSpec, typename TConfig, typename TId, typename TName> inline void _storeAppendContig ( FragmentStore<TSpec, TConfig> & fragStore, TId & contigId, TName & rName);       	// "projects/library/seqan/store/store_all.h"(753)
+
+//____________________________________________________________________________
+// _storeAppendKey
+
+template <typename TSpec, typename TConfig, typename TId, typename TName> inline void _storeAppendKey ( FragmentStore<TSpec, TConfig> & fragStore, TId & keyId, TName & annotationKey);       	// "projects/library/seqan/store/store_all.h"(823)
+
+//____________________________________________________________________________
+// _storeAppendRead
+
+template <typename TSpec, typename TConfig, typename TId, typename TName, typename TString, typename TFlag, typename TContext> inline void _storeAppendRead ( FragmentStore<TSpec, TConfig> & fragStore, TId & readId, TName & qname, TString & readSeq, TFlag & flag, TContext &);       	// "projects/library/seqan/store/store_all.h"(682)
+
+//____________________________________________________________________________
+// _storeAppendType
+
+template <typename TSpec, typename TConfig, typename TId, typename TName> inline void _storeAppendType ( FragmentStore<TSpec, TConfig> & fragStore, TId & typeId, TName & annotationType);       	// "projects/library/seqan/store/store_all.h"(801)
+
+//____________________________________________________________________________
+// _storeClearAnnoBackLinks
+
+template <typename TAnnotationStore> inline void _storeClearAnnoBackLinks(TAnnotationStore & me);       	// "projects/library/seqan/store/store_annotation.h"(653)
+
+//____________________________________________________________________________
+// _storeClearAnnotations
+
+template <typename TConfig, typename TSpec > inline void _storeClearAnnotations(FragmentStore<TSpec, TConfig> & me);       	// "projects/library/seqan/store/store_all.h"(589)
+
+//____________________________________________________________________________
+// _storeCreateAnnoBackLinks
+
+template <typename TAnnotationStore> inline void _storeCreateAnnoBackLinks(TAnnotationStore & me);       	// "projects/library/seqan/store/store_annotation.h"(670)
+
+//____________________________________________________________________________
+// _storeOneAnnotation
+
+template <typename TFragmentStore, typename TSpec> inline void _storeOneAnnotation ( TFragmentStore & fragStore, IOContextGff_<TFragmentStore, TSpec> & ctx);       	// "projects/library/seqan/store/store_io_gff.h"(367)
+template <typename TFragmentStore, typename TSpec> inline void _storeOneAnnotation ( TFragmentStore & fragStore, IOContextUcsc_<TFragmentStore, TSpec> & ctx);       	// "projects/library/seqan/store/store_io_ucsc.h"(379)
+
+//____________________________________________________________________________
+// _storeOneAnnotationKnownGene
+
+template <typename TFragmentStore, typename TSpec> inline void _storeOneAnnotationKnownGene ( TFragmentStore & fragStore, IOContextUcsc_<TFragmentStore, TSpec> & ctx);       	// "projects/library/seqan/store/store_io_ucsc.h"(275)
+
+//____________________________________________________________________________
+// _storeOneAnnotationKnownIsoforms
+
+template <typename TFragmentStore, typename TSpec> inline void _storeOneAnnotationKnownIsoforms ( TFragmentStore & fragStore, IOContextUcsc_<TFragmentStore, TSpec> & ctx);       	// "projects/library/seqan/store/store_io_ucsc.h"(337)
+
+//____________________________________________________________________________
+// _storeRemoveTempAnnoNames
+
+template <typename TConfig, typename TSpec > inline void _storeRemoveTempAnnoNames(FragmentStore<TSpec, TConfig> & me);       	// "projects/library/seqan/store/store_all.h"(607)
+
+//____________________________________________________________________________
+// _unclippedLength
+
+template <typename TSource, typename TGapAnchors> inline typename Size< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type _unclippedLength(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me);       	// "projects/library/seqan/store/store_align.h"(1315)
+
+//____________________________________________________________________________
+// _writeAlignments
+
+template <typename TFile, typename TSpec, typename TConfig> inline void _writeAlignments(TFile & target, FragmentStore<TSpec, TConfig> & store, Sam);       	// "projects/library/seqan/store/store_io_sam.h"(927)
+
+//____________________________________________________________________________
+// _writeGffGtf
+
+template <typename TTargetStream, typename TSpec, typename TConfig, typename TFormat> inline void _writeGffGtf ( TTargetStream & target, FragmentStore<TSpec, TConfig> & store, TFormat format);       	// "projects/library/seqan/store/store_io_gff.h"(698)
+
+//____________________________________________________________________________
+// _writeHeader
+
+template <typename TFile, typename TSpec, typename TConfig> inline void _writeHeader(TFile & target, FragmentStore<TSpec, TConfig> & store, Sam);       	// "projects/library/seqan/store/store_io_sam.h"(872)
+
+//____________________________________________________________________________
+// _writeOneAnnotation
+
+template <typename TTargetStream, typename TSpec, typename TConfig, typename TAnnotation, typename TId> inline void _writeOneAnnotation ( TTargetStream & target, FragmentStore<TSpec, TConfig> & store, TAnnotation &annotation, TId id, Gff);       	// "projects/library/seqan/store/store_io_gff.h"(477)
+template <typename TTargetStream, typename TSpec, typename TConfig, typename TAnnotation, typename TId> inline void _writeOneAnnotation ( TTargetStream & target, FragmentStore<TSpec, TConfig> & store, TAnnotation &annotation, TId id, Gtf);       	// "projects/library/seqan/store/store_io_gff.h"(581)
+template <typename TTargetStream, typename TFragmentStore, typename TSpec> inline void _writeOneAnnotation ( TTargetStream & file, IOContextUcsc_<TFragmentStore, TSpec> & ctx);       	// "projects/library/seqan/store/store_io_ucsc.h"(486)
+
+//____________________________________________________________________________
+// annotationAssignValueByKey
+
+template <typename TSpec, typename TConfig, typename TAnnotation, typename TKey, typename TValue> inline void annotationAssignValueByKey ( FragmentStore<TSpec, TConfig> & fragStore, TAnnotation & annotation, TKey const & key, TValue const & value);       	// "projects/library/seqan/store/store_all.h"(848)
+
+//____________________________________________________________________________
+// annotationGetValueByKey
+
+template <typename TSpec, typename TConfig, typename TAnnotation, typename TKey, typename TValue> inline bool annotationGetValueByKey ( FragmentStore<TSpec, TConfig> & fragStore, TAnnotation const & annotation, TKey const & key, TValue & value);       	// "projects/library/seqan/store/store_all.h"(866)
+template <typename TSpec, typename TConfig, typename TAnnotation, typename TKey> inline CharString annotationGetValueByKey ( FragmentStore<TSpec, TConfig> & fragStore, TAnnotation const & annotation, TKey const & key);       	// "projects/library/seqan/store/store_all.h"(885)
+
+//____________________________________________________________________________
+// appendAlignedRead
+
+template <typename TSpec, typename TConfig, typename TReadId, typename TContigId, typename TPos, typename TPairMatchId> inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type appendAlignedRead( FragmentStore<TSpec, TConfig> & store, TReadId const & readId, TContigId const & contigId, TPos const & beginPos, TPos const & endPos, TPairMatchId const & pairMatchId);       	// "projects/library/seqan/store/store_all.h"(1056)
+template <typename TSpec, typename TConfig, typename TReadId, typename TContigId, typename TPos> inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type appendAlignedRead( FragmentStore<TSpec, TConfig> & store, TReadId const & readId, TContigId const & contigId, TPos const & beginPos, TPos const & endPos);       	// "projects/library/seqan/store/store_all.h"(1076)
+
+//____________________________________________________________________________
+// appendAlignment
+
+template <typename TSpec, typename TConfig, typename TId, typename TPos, typename TGaps> inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type appendAlignment( FragmentStore<TSpec, TConfig> & fragStore, TId readId, TId contigId, TPos beginPos, TPos endPos, TGaps const & gaps);       	// "projects/library/seqan/store/store_io_sam.h"(481)
+
+//____________________________________________________________________________
+// appendMatePair
+
+template <typename TSpec, typename TConfig, typename TRead> inline typename Size<typename FragmentStore<TSpec, TConfig>::TMatePairStore>::Type appendMatePair( FragmentStore<TSpec, TConfig> &me, TRead const &read1, TRead const &read2);       	// "projects/library/seqan/store/store_all.h"(1111)
+template <typename TSpec, typename TConfig, typename TRead> inline typename Size<typename FragmentStore<TSpec, TConfig>::TMatePairStore>::Type appendMatePair( FragmentStore<TSpec, TConfig> &me, TRead const &read1, TRead const &read2, CharString const &name1, CharString const &name2);       	// "projects/library/seqan/store/store_all.h"(1138)
+
+//____________________________________________________________________________
+// appendName
+
+template <typename TNameStore, typename TName> inline void appendName(TNameStore &store, TName &name);       	// "projects/library/seqan/store/store_all.h"(236)
+template <typename TNameStore, typename TName, typename TContext> inline void appendName(TNameStore &store, TName &name, TContext &);       	// "projects/library/seqan/store/store_all.h"(243)
+template <typename TNameStore, typename TName, typename TCNameStore, typename TCName> inline void appendName(TNameStore &store, TName &name, NameStoreCache<TCNameStore, TCName> &context);       	// "projects/library/seqan/store/store_all.h"(250)
+
+//____________________________________________________________________________
+// appendRead
+
+template <typename TSpec, typename TConfig, typename TRead, typename TId> inline typename Size<typename FragmentStore<TSpec, TConfig>::TReadStore>::Type appendRead( FragmentStore<TSpec, TConfig> &me, TRead const &read, TId matePairId);       	// "projects/library/seqan/store/store_all.h"(947)
+template <typename TSpec, typename TConfig, typename TRead, typename TId> inline typename Size<typename FragmentStore<TSpec, TConfig>::TReadStore>::Type appendRead( FragmentStore<TSpec, TConfig> &me, TRead const &read, CharString const &name, TId matePairId);       	// "projects/library/seqan/store/store_all.h"(966)
+template <typename TSpec, typename TConfig, typename TRead> inline typename Size<typename FragmentStore<TSpec, TConfig>::TReadStore>::Type appendRead( FragmentStore<TSpec, TConfig> &me, TRead const &read);       	// "projects/library/seqan/store/store_all.h"(984)
+template <typename TSpec, typename TConfig, typename TRead> inline typename Size<typename FragmentStore<TSpec, TConfig>::TReadStore>::Type appendRead( FragmentStore<TSpec, TConfig> &me, TRead const &read, CharString const &name);       	// "projects/library/seqan/store/store_all.h"(997)
+
+//____________________________________________________________________________
+// assignValueByKey
+
+template <typename TFragmentStore, typename TSpec, typename TKey, typename TValue> inline void assignValueByKey( Iter<TFragmentStore, AnnotationTree<TSpec> > & it, TKey const & key, TValue const & value);       	// "projects/library/seqan/store/store_annotation.h"(248)
+
+//____________________________________________________________________________
+// atBegin
+
+template <typename TFragmentStore, typename TSpec> inline bool atBegin(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(305)
+template <typename TGaps, typename TGapAnchors> inline bool atBegin(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me);       	// "projects/library/seqan/store/store_align.h"(1673)
+template <typename TGaps, typename TGapAnchors> inline bool atBegin(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me);       	// "projects/library/seqan/store/store_align.h"(1680)
+
+//____________________________________________________________________________
+// atEnd
+
+template <typename TFragmentStore, typename TSpec> inline bool atEnd(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(312)
+template <typename TGaps, typename TGapAnchors> inline bool atEnd(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me);       	// "projects/library/seqan/store/store_align.h"(1688)
+template <typename TGaps, typename TGapAnchors> inline bool atEnd(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me);       	// "projects/library/seqan/store/store_align.h"(1695)
+
+//____________________________________________________________________________
+// begin
+
+template <typename TConfig, typename TSpec, typename TIterSpec > inline typename Iterator<FragmentStore<TSpec, TConfig>, TIterSpec >::Type begin(FragmentStore<TSpec, TConfig> &store, TIterSpec const);       	// "projects/library/seqan/store/store_all.h"(557)
+template <typename TConfig, typename TSpec, typename TIterSpec > inline typename Iterator<FragmentStore<TSpec, TConfig> const, TIterSpec >::Type begin(FragmentStore<TSpec, TConfig> const &store, TIterSpec const);       	// "projects/library/seqan/store/store_all.h"(564)
+template <typename TSource, typename TGapAnchors> inline typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type begin(Gaps<TSource, AnchorGaps<TGapAnchors> > & me, Standard);       	// "projects/library/seqan/store/store_align.h"(1351)
+template <typename TSource, typename TGapAnchors> inline typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > const>::Type begin(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, Standard);       	// "projects/library/seqan/store/store_align.h"(1359)
+template <typename TSource, typename TGapAnchors> inline typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type begin(Gaps<TSource, AnchorGaps<TGapAnchors> > & me, Rooted);       	// "projects/library/seqan/store/store_align.h"(1369)
+template <typename TSource, typename TGapAnchors> inline typename Iterator<Gaps<TSource, AnchorGaps<TGapAnchors> > const>::Type begin(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, Rooted);       	// "projects/library/seqan/store/store_align.h"(1377)
+
+//____________________________________________________________________________
+// beginPosition
+
+template <typename TSource, typename TGapAnchors> inline typename Position< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type beginPosition(Gaps<TSource, AnchorGaps<TGapAnchors> > & me);       	// "projects/library/seqan/store/store_align.h"(1387)
+
+//____________________________________________________________________________
+// buildAlignIntervalsStore
+
+template <typename TAlignIntervalsStore, typename TSpec, typename TConfig > inline void buildAlignIntervalsStore(TAlignIntervalsStore & alignIntervalsStore, FragmentStore<TSpec, TConfig> & me, const unsigned & thresholdGaps);       	// "projects/library/seqan/store/store_align_intervals.h"(85)
+
+//____________________________________________________________________________
+// calculateInsertSizes
+
+template <typename TLibSizeString, typename TSpec, typename TConfig> inline void calculateInsertSizes(TLibSizeString &insertSizes, FragmentStore<TSpec, TConfig> &me);       	// "projects/library/seqan/store/store_all.h"(1286)
+
+//____________________________________________________________________________
+// calculateMateIndices
+
+template <typename TMateIndexString, typename TSpec, typename TConfig> inline void calculateMateIndices(TMateIndexString &mateIndices, FragmentStore<TSpec, TConfig> &me);       	// "projects/library/seqan/store/store_all.h"(1367)
+
+//____________________________________________________________________________
+// cigarToGapAnchorContig
+
+template <typename TCigarString, typename TGaps> inline void cigarToGapAnchorContig(TCigarString const & cigar, TGaps & gaps);       	// "projects/library/seqan/store/store_io_sam.h"(301)
+
+//____________________________________________________________________________
+// cigarToGapAnchorRead
+
+template <typename TCigarString, typename TGaps> inline void cigarToGapAnchorRead(TCigarString const & cigar, TGaps & gaps);       	// "projects/library/seqan/store/store_io_sam.h"(281)
+
+//____________________________________________________________________________
+// clear
+
+template <typename TFragmentStore, typename TSpec> inline void clear(IOContextGff_<TFragmentStore, TSpec> &ctx);       	// "projects/library/seqan/store/store_io_gff.h"(179)
+template <typename TFragmentStore, typename TSpec> inline void clear(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(293)
+template <typename TFragmentStore, typename TSpec> inline void clear(IOContextUcsc_<TFragmentStore, TSpec> &ctx);       	// "projects/library/seqan/store/store_io_ucsc.h"(114)
+
+//____________________________________________________________________________
+// clearReads
+
+template <typename TSpec, typename TConfig> inline void clearReads(FragmentStore<TSpec, TConfig> &me);       	// "projects/library/seqan/store/store_all.h"(915)
+
+//____________________________________________________________________________
+// clearValues
+
+template <typename TFragmentStore, typename TSpec> inline void clearValues(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(238)
+
+//____________________________________________________________________________
+// compactAlignedReads
+
+template <typename TSpec, typename TConfig> inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type compactAlignedReads(FragmentStore<TSpec, TConfig> &me);       	// "projects/library/seqan/store/store_all.h"(1183)
+
+//____________________________________________________________________________
+// compactPairMatchIds
+
+template <typename TSpec, typename TConfig> inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type compactPairMatchIds(FragmentStore<TSpec, TConfig> &me);       	// "projects/library/seqan/store/store_all.h"(1239)
+
+//____________________________________________________________________________
+// container
+
+template <typename TFragmentStore, typename TSpec> inline TFragmentStore & container(Iter< TFragmentStore, AnnotationTree<TSpec> > &it);       	// "projects/library/seqan/store/store_annotation.h"(160)
+template <typename TFragmentStore, typename TSpec> inline TFragmentStore & container(Iter< TFragmentStore, AnnotationTree<TSpec> > const &it);       	// "projects/library/seqan/store/store_annotation.h"(166)
+
+//____________________________________________________________________________
+// convertMatchesToGlobalAlignment
+
+template <typename TSpec, typename TConfig, typename TScore, typename TShrinkMatches> void convertMatchesToGlobalAlignment(FragmentStore<TSpec, TConfig> &store, TScore const & score, TShrinkMatches const &);       	// "projects/library/seqan/store/store_all.h"(1663)
+
+//____________________________________________________________________________
+// convertPairWiseToGlobalAlignment
+
+template <typename TSpec, typename TConfig, typename TContigGapsString> void convertPairWiseToGlobalAlignment(FragmentStore<TSpec, TConfig> &store, TContigGapsString &gaps);       	// "projects/library/seqan/store/store_all.h"(1868)
+
+//____________________________________________________________________________
+// countGaps
+
+template <typename TGaps, typename TGapAnchors> inline typename Size<TGaps>::Type countGaps(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me);       	// "projects/library/seqan/store/store_align.h"(1658)
+
+//____________________________________________________________________________
+// createIntervalTreeStore
+
+template <typename TSpec, typename TConfig> inline void createIntervalTreeStore(FragmentStore<TSpec, TConfig> & me, const bool &unknownO);       	// "projects/library/seqan/store/store_intervaltree.h"(50)
+
+//____________________________________________________________________________
+// createLeftChild
+
+template <typename TFragmentStore, typename TSpec> inline Iter<TFragmentStore, AnnotationTree<TSpec> > createLeftChild(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(534)
+
+//____________________________________________________________________________
+// createRightChild
+
+template <typename TFragmentStore, typename TSpec> inline Iter<TFragmentStore, AnnotationTree<TSpec> > createRightChild(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(557)
+
+//____________________________________________________________________________
+// createSibling
+
+template <typename TFragmentStore, typename TSpec> inline Iter<TFragmentStore, AnnotationTree<TSpec> > createSibling(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(581)
+
+//____________________________________________________________________________
+// end
+
+template <typename TConfig, typename TSpec, typename TIterSpec > inline typename Iterator<FragmentStore<TSpec, TConfig>, TIterSpec >::Type end(FragmentStore<TSpec, TConfig> &store, TIterSpec const);       	// "projects/library/seqan/store/store_all.h"(573)
+template <typename TConfig, typename TSpec, typename TIterSpec > inline typename Iterator<FragmentStore<TSpec, TConfig> const, TIterSpec >::Type end(FragmentStore<TSpec, TConfig> const &store, TIterSpec const);       	// "projects/library/seqan/store/store_all.h"(580)
+
+//____________________________________________________________________________
+// endPosition
+
+template <typename TSource, typename TGapAnchors> inline typename Position< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type endPosition(Gaps<TSource, AnchorGaps<TGapAnchors> > & me);       	// "projects/library/seqan/store/store_align.h"(1395)
+
+//____________________________________________________________________________
+// extractAlignIntervals
+
+template <typename TIntervals, typename TAlignedReadStoreElement, typename TSpec, typename TConfig> inline void extractAlignIntervals(TIntervals & contigIntervals, TAlignedReadStoreElement & align, FragmentStore<TSpec, TConfig> & me, const unsigned & thresholdGaps);       	// "projects/library/seqan/store/store_align_intervals.h"(123)
+
+//____________________________________________________________________________
+// findIntervalsForInterval
+
+template <typename TIntervalTree, typename TInterval, typename TCargo> inline void findIntervalsForInterval(String<TCargo> & result, TIntervalTree & intervalTree, TInterval & interval, const unsigned & offsetInterval);       	// "projects/library/seqan/store/store_intervaltree.h"(179)
+
+//____________________________________________________________________________
+// getAnnoName
+
+template <typename TSpec, typename TConfig, typename TId> inline typename GetValue<typename FragmentStore<TSpec, TConfig>::TAnnotationNameStore>::Type getAnnoName(FragmentStore<TSpec, TConfig> & store, TId id);       	// "projects/library/seqan/store/store_all.h"(638)
+
+//____________________________________________________________________________
+// getAnnoType
+
+template <typename TSpec, typename TConfig, typename TId> inline typename GetValue<typename FragmentStore<TSpec, TConfig>::TAnnotationTypeStore>::Type getAnnoType(FragmentStore<TSpec, TConfig> & store, TId id);       	// "projects/library/seqan/store/store_all.h"(645)
+
+//____________________________________________________________________________
+// getAnnoUniqueName
+
+template <typename TSpec, typename TConfig, typename TId> inline CharString getAnnoUniqueName(FragmentStore<TSpec, TConfig> & store, TId id);       	// "projects/library/seqan/store/store_all.h"(652)
+
+//____________________________________________________________________________
+// getAnnotation
+
+template <typename TFragmentStore, typename TSpec> inline typename Reference<typename TFragmentStore::TAnnotationStore>::Type getAnnotation(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(175)
+
+//____________________________________________________________________________
+// getCigarString
+
+template <typename TCigar, typename TGaps1, typename TGaps2, typename TThresh> inline void getCigarString( TCigar &cigar, TGaps1 &gaps1, TGaps2 &gaps2, TThresh splicedGapThresh);       	// "projects/library/seqan/store/store_io_sam.h"(121)
+template <typename TCigar, typename TGaps1, typename TGaps2> inline void getCigarString( TCigar &cigar, TGaps1 &gaps1, TGaps2 &gaps2);       	// "projects/library/seqan/store/store_io_sam.h"(191)
+template <typename TOperation, typename TCount, typename TSpec, typename TGaps1, typename TGaps2, typename TThresh> inline void getCigarString( String<CigarElement<TOperation, TCount>, TSpec> &cigar, TGaps1 &gaps1, TGaps2 &gaps2, TThresh splicedGapThresh);       	// "projects/library/seqan/store/store_io_sam.h"(208)
+
+//____________________________________________________________________________
+// getClrRange
+
+template <typename TSpec, typename TConfig, typename TPos, typename TGapAnchor, typename TSpecAlign, typename TBeginClr, typename TEndClr> inline void getClrRange(FragmentStore<TSpec, TConfig> const& fragStore, AlignedReadStoreElement<TPos, TGapAnchor, TSpecAlign> const& alignEl, TBeginClr& begClr, TEndClr& endClr);       	// "projects/library/seqan/store/store_io.h"(72)
+
+//____________________________________________________________________________
+// getIdByName
+
+template <typename TNameStore, typename TName, typename TPos> inline bool getIdByName(TNameStore &store, TName &name, TPos &pos);       	// "projects/library/seqan/store/store_all.h"(169)
+template <typename TNameStore, typename TName, typename TPos, typename TContext> inline bool getIdByName(TNameStore &store, TName &name, TPos &pos, TContext &);       	// "projects/library/seqan/store/store_all.h"(190)
+template <typename TNameStore, typename TName, typename TPos, typename TCNameStore, typename TCName> inline bool getIdByName(TNameStore &, TName &name, TPos &pos, NameStoreCache<TCNameStore, TCName> &context);       	// "projects/library/seqan/store/store_all.h"(197)
+
+//____________________________________________________________________________
+// getMateNo
+
+template <typename TSpec, typename TConfig, typename TId> inline int getMateNo(FragmentStore<TSpec, TConfig> const &me, TId readId);       	// "projects/library/seqan/store/store_all.h"(1329)
+
+//____________________________________________________________________________
+// getName
+
+template <typename TFragmentStore, typename TSpec> inline typename GetValue<typename TFragmentStore::TAnnotationNameStore>::Type getName(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(182)
+
+//____________________________________________________________________________
+// getParentName
+
+template <typename TFragmentStore, typename TSpec> inline typename GetValue<typename TFragmentStore::TAnnotationNameStore>::Type getParentName(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(198)
+
+//____________________________________________________________________________
+// getRead
+
+template <typename TSpec, typename TConfig, typename TId> inline typename Value<typename FragmentStore<TSpec, TConfig>::TReadSeqStore>::Type getRead( FragmentStore<TSpec, TConfig> &me, TId id);       	// "projects/library/seqan/store/store_all.h"(1021)
+
+//____________________________________________________________________________
+// getType
+
+template <typename TFragmentStore, typename TSpec> inline typename GetValue<typename TFragmentStore::TAnnotationTypeStore>::Type getType(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(213)
+
+//____________________________________________________________________________
+// getUniqueName
+
+template <typename TFragmentStore, typename TSpec> inline CharString getUniqueName(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(229)
+
+//____________________________________________________________________________
+// getValue
+
+template <typename TGaps, typename TGapAnchors> inline typename GetValue< Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > >::Type getValue(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me);       	// "projects/library/seqan/store/store_align.h"(1610)
+template <typename TGaps, typename TGapAnchors> inline typename GetValue< Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const>::Type getValue(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me);       	// "projects/library/seqan/store/store_align.h"(1620)
+
+//____________________________________________________________________________
+// getValueByKey
+
+template <typename TFragmentStore, typename TSpec, typename TKey, typename TValue> inline bool getValueByKey( Iter<TFragmentStore, AnnotationTree<TSpec> > const & it, TKey const & key, TValue & value);       	// "projects/library/seqan/store/store_annotation.h"(258)
+template <typename TFragmentStore, typename TSpec, typename TKey> inline CharString getValueByKey( Iter<TFragmentStore, AnnotationTree<TSpec> > const & it, TKey const & key);       	// "projects/library/seqan/store/store_annotation.h"(267)
+
+//____________________________________________________________________________
+// goBegin
+
+template <typename TFragmentStore, typename TSpec> inline void goBegin(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(276)
+
+//____________________________________________________________________________
+// goDown
+
+template <typename TFragmentStore, typename TSpec> inline bool goDown(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(388)
+
+//____________________________________________________________________________
+// goEnd
+
+template <typename TFragmentStore, typename TSpec> inline void goEnd(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(283)
+
+//____________________________________________________________________________
+// goFurther
+
+template <typename TGaps, typename TGapAnchors, typename TSize> inline void goFurther(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me, TSize steps);       	// "projects/library/seqan/store/store_align.h"(1926)
+
+//____________________________________________________________________________
+// goNext
+
+template <typename TFragmentStore, typename TSpec> inline void goNext(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(324)
+template <typename TGaps, typename TGapAnchors> inline void goNext(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me);       	// "projects/library/seqan/store/store_align.h"(1912)
+
+//____________________________________________________________________________
+// goNextRight
+
+template <typename TFragmentStore, typename TSpec> inline void goNextRight(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(337)
+
+//____________________________________________________________________________
+// goNextUp
+
+template <typename TFragmentStore, typename TSpec> inline void goNextUp(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(350)
+
+//____________________________________________________________________________
+// goPrevious
+
+template <typename TGaps, typename TGapAnchors> inline void goPrevious(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me);       	// "projects/library/seqan/store/store_align.h"(1919)
+
+//____________________________________________________________________________
+// goRight
+
+template <typename TFragmentStore, typename TSpec> inline bool goRight(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(405)
+
+//____________________________________________________________________________
+// goRoot
+
+template <typename TFragmentStore, typename TSpec> inline void goRoot(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(364)
+
+//____________________________________________________________________________
+// goUp
+
+template <typename TFragmentStore, typename TSpec> inline bool goUp(Iter<TFragmentStore, AnnotationTree<TSpec> > & it);       	// "projects/library/seqan/store/store_annotation.h"(371)
+
+//____________________________________________________________________________
+// insertGaps
+
+template <typename TGaps, typename TGapAnchors, typename TCount> inline void insertGaps(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me, TCount size);       	// "projects/library/seqan/store/store_align.h"(1744)
+
+//____________________________________________________________________________
+// isClipped
+
+template <typename TGaps, typename TGapAnchors> inline bool isClipped(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me);       	// "projects/library/seqan/store/store_align.h"(1649)
+
+//____________________________________________________________________________
+// isGap
+
+template <typename TGaps, typename TGapAnchors> inline bool isGap(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me);       	// "projects/library/seqan/store/store_align.h"(1633)
+
+//____________________________________________________________________________
+// isLastChild
+
+template <typename TFragmentStore, typename TSpec> inline bool isLastChild(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(633)
+
+//____________________________________________________________________________
+// isLeaf
+
+template <typename TFragmentStore, typename TSpec> inline bool isLeaf(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(622)
+
+//____________________________________________________________________________
+// isRoot
+
+template <typename TFragmentStore, typename TSpec> inline bool isRoot(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(611)
+
+//____________________________________________________________________________
+// isUnknown
+
+template <typename TGaps, typename TGapAnchors> inline bool isUnknown(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me);       	// "projects/library/seqan/store/store_align.h"(1640)
+
+//____________________________________________________________________________
+// layoutAlignment
+
+template <typename TSpec, typename TConfig> void layoutAlignment(AlignedReadLayout &layout, FragmentStore<TSpec, TConfig> &store);       	// "projects/library/seqan/store/store_all.h"(1431)
+
+//____________________________________________________________________________
+// length
+
+template <typename TSource, typename TGapAnchors> inline typename Size< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type length(Gaps<TSource, AnchorGaps<TGapAnchors> > & me);       	// "projects/library/seqan/store/store_align.h"(1333)
+template <typename TSource, typename TGapAnchors> inline typename Size< Gaps<TSource, AnchorGaps<TGapAnchors> > >::Type length(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me);       	// "projects/library/seqan/store/store_align.h"(1341)
+
+//____________________________________________________________________________
+// loadContig
+
+template <typename TSpec, typename TConfig, typename TId> bool loadContig(FragmentStore<TSpec, TConfig> &store, TId id);       	// "projects/library/seqan/store/store_io.h"(928)
+
+//____________________________________________________________________________
+// loadContigs
+
+template <typename TFSSpec, typename TFSConfig> bool loadContigs(FragmentStore<TFSSpec, TFSConfig> &store, StringSet<CharString> const &fileNameList, bool loadSeqs);       	// "projects/library/seqan/store/store_io.h"(853)
+template <typename TFSSpec, typename TFSConfig> bool loadContigs(FragmentStore<TFSSpec, TFSConfig> &store, CharString const &fileName, bool loadSeqs);       	// "projects/library/seqan/store/store_io.h"(898)
+template <typename TFSSpec, typename TFSConfig, typename TFileNames> bool loadContigs(FragmentStore<TFSSpec, TFSConfig> &store, TFileNames const &fileNames);       	// "projects/library/seqan/store/store_io.h"(908)
+
+//____________________________________________________________________________
+// loadReads
+
+template <typename TFSSpec, typename TFSConfig, typename TFileName> bool loadReads(FragmentStore<TFSSpec, TFSConfig> &store, TFileName &fileName);       	// "projects/library/seqan/store/store_io.h"(1114)
+template <typename TFSSpec, typename TFSConfig, typename TFileName> bool loadReads(FragmentStore<TFSSpec, TFSConfig> & store, TFileName & fileNameL, TFileName & fileNameR);       	// "projects/library/seqan/store/store_io.h"(1158)
+
+//____________________________________________________________________________
+// lockContig
+
+template <typename TSpec, typename TConfig, typename TId> bool lockContig(FragmentStore<TSpec, TConfig> &store, TId id);       	// "projects/library/seqan/store/store_io.h"(964)
+
+//____________________________________________________________________________
+// lockContigs
+
+template <typename TSpec, typename TConfig> bool lockContigs(FragmentStore<TSpec, TConfig> &store);       	// "projects/library/seqan/store/store_io.h"(1044)
+
+//____________________________________________________________________________
+// lowerBoundAlignedReads
+
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type lowerBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortId);       	// "projects/library/seqan/store/store_align.h"(460)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type lowerBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortContigId);       	// "projects/library/seqan/store/store_align.h"(496)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type lowerBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortBeginPos);       	// "projects/library/seqan/store/store_align.h"(532)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type lowerBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortEndPos);       	// "projects/library/seqan/store/store_align.h"(571)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type lowerBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortPairMatchId);       	// "projects/library/seqan/store/store_align.h"(610)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type lowerBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortReadId);       	// "projects/library/seqan/store/store_align.h"(646)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortId);       	// "projects/library/seqan/store/store_align.h"(683)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortContigId);       	// "projects/library/seqan/store/store_align.h"(721)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortBeginPos);       	// "projects/library/seqan/store/store_align.h"(759)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortEndPos);       	// "projects/library/seqan/store/store_align.h"(800)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortPairMatchId);       	// "projects/library/seqan/store/store_align.h"(841)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> lowerBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortReadId);       	// "projects/library/seqan/store/store_align.h"(879)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortId);       	// "projects/library/seqan/store/store_align.h"(917)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortContigId);       	// "projects/library/seqan/store/store_align.h"(955)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortBeginPos);       	// "projects/library/seqan/store/store_align.h"(993)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortEndPos);       	// "projects/library/seqan/store/store_align.h"(1034)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortPairMatchId);       	// "projects/library/seqan/store/store_align.h"(1075)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * lowerBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortReadId);       	// "projects/library/seqan/store/store_align.h"(1113)
+
+//____________________________________________________________________________
+// lowerBoundGapAnchor
+
+template <typename TGapAnchor, typename TSearchValue> inline typename Iterator<TGapAnchor, Standard>::Type lowerBoundGapAnchor(TGapAnchor const& gaps, TSearchValue const val, SortSeqPos);       	// "projects/library/seqan/store/store_base.h"(215)
+template <typename TGapAnchor, typename TSearchValue> inline typename Iterator<TGapAnchor, Standard>::Type lowerBoundGapAnchor(TGapAnchor const& gaps, TSearchValue const val, SortGapPos);       	// "projects/library/seqan/store/store_base.h"(251)
+
+//____________________________________________________________________________
+// mergeIntervals
+
+template <typename TIntervals> inline void mergeIntervals(TIntervals & intervals, const unsigned & thresholdGaps);       	// "projects/library/seqan/store/store_align_intervals.h"(328)
+
+//____________________________________________________________________________
+// nodeDown
+
+template <typename TFragmentStore, typename TSpec> inline Iter<TFragmentStore, AnnotationTree<TSpec> > nodeDown(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(438)
+
+//____________________________________________________________________________
+// nodeRight
+
+template <typename TFragmentStore, typename TSpec> inline Iter<TFragmentStore, AnnotationTree<TSpec> > nodeRight(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(447)
+
+//____________________________________________________________________________
+// nodeUp
+
+template <typename TFragmentStore, typename TSpec> inline Iter<TFragmentStore, AnnotationTree<TSpec> > nodeUp(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it);       	// "projects/library/seqan/store/store_annotation.h"(429)
+
+//____________________________________________________________________________
+// operator!=
+
+template <typename TGaps, typename TGapAnchors> inline bool operator!= ( Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & left, Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & right);       	// "projects/library/seqan/store/store_align.h"(1716)
+
+//____________________________________________________________________________
+// operator<
+
+template <typename TValue> inline bool operator< (Interval<TValue> const & interval1, Interval<TValue> const & interval2);       	// "projects/library/seqan/store/store_align_intervals.h"(64)
+template <typename TGaps, typename TGapAnchors> inline bool operator< ( Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & left, Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & right);       	// "projects/library/seqan/store/store_align.h"(1725)
+
+//____________________________________________________________________________
+// operator<<
+
+template <typename TStream, typename TPos, typename TGapAnchor, typename TSpec> TStream & operator<<(TStream & stream, AlignedReadStoreElement<TPos, TGapAnchor, TSpec> const & e);       	// "projects/library/seqan/store/store_align.h"(171)
+
+//____________________________________________________________________________
+// operator==
+
+template <typename TValue> inline bool operator== (Interval<TValue> const & interval1, Interval<TValue> const & interval2);       	// "projects/library/seqan/store/store_align_intervals.h"(57)
+template <typename TGaps, typename TGapAnchors> inline bool operator== ( Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & left, Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & right);       	// "projects/library/seqan/store/store_align.h"(1707)
+
+//____________________________________________________________________________
+// operator>
+
+template <typename TGaps, typename TGapAnchors> inline bool operator> ( Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & left, Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & right);       	// "projects/library/seqan/store/store_align.h"(1734)
+
+//____________________________________________________________________________
+// positionGapToSeq
+
+template <typename TSource, typename TGapAnchors, typename TPosition> inline TPosition positionGapToSeq(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, TPosition pos);       	// "projects/library/seqan/store/store_align.h"(1437)
+
+//____________________________________________________________________________
+// positionSeqToGap
+
+template <typename TSource, typename TGapAnchors, typename TPosition> inline TPosition positionSeqToGap(Gaps<TSource, AnchorGaps<TGapAnchors> > const & me, TPosition pos);       	// "projects/library/seqan/store/store_align.h"(1474)
+
+//____________________________________________________________________________
+// printAlignment
+
+template <typename TStream, typename TFormatTag, typename TSpec, typename TConfig, typename TContigId, typename TPos, typename TNum> void printAlignment( TStream &stream, Tag<TFormatTag> const &format, AlignedReadLayout &layout, FragmentStore<TSpec, TConfig> &store, TContigId contigId, TPos posBegin, TPos posEnd, TNum lineBegin, TNum lineEnd);       	// "projects/library/seqan/store/store_all.h"(1539)
+
+//____________________________________________________________________________
+// read
+
+template <typename TFile, typename TSpec, typename TConfig> inline void read ( TFile & file, FragmentStore<TSpec, TConfig> & fragStore, Gff);       	// "projects/library/seqan/store/store_io_gff.h"(432)
+template <typename TFile, typename TSpec, typename TConfig> inline void read ( TFile & file, FragmentStore<TSpec, TConfig> & fragStore, Gtf);       	// "projects/library/seqan/store/store_io_gff.h"(461)
+template <typename TFile, typename TSpec, typename TConfig, typename TFormatSpec> inline void read ( TFile & file, FragmentStore<TSpec, TConfig> & fragStore, Tag<Ucsc_<TFormatSpec> > const);       	// "projects/library/seqan/store/store_io_ucsc.h"(392)
+template <typename TFile, typename TSpec, typename TConfig> inline void read(TFile & file, FragmentStore<TSpec, TConfig>& fragStore, Amos);       	// "projects/library/seqan/store/store_io.h"(130)
+template <typename TFile, typename TSpec, typename TConfig> inline void read( TFile & file, FragmentStore<TSpec, TConfig> & fragStore, Sam);       	// "projects/library/seqan/store/store_io_sam.h"(596)
+
+//____________________________________________________________________________
+// refresh
+
+template <typename TNameStore, typename TName> inline void refresh(NameStoreCache<TNameStore, TName> &cache);       	// "projects/library/seqan/store/store_all.h"(138)
+
+//____________________________________________________________________________
+// removeGaps
+
+template <typename TGaps, typename TGapAnchors, typename TCount> inline void removeGaps(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me, TCount size);       	// "projects/library/seqan/store/store_align.h"(1797)
+
+//____________________________________________________________________________
+// setBeginPosition
+
+template <typename TSource, typename TGapAnchors, typename TPosition> inline void setBeginPosition(Gaps<TSource, AnchorGaps<TGapAnchors> > & me, TPosition view_position);       	// "projects/library/seqan/store/store_align.h"(1405)
+
+//____________________________________________________________________________
+// setEndPosition
+
+template <typename TSource, typename TGapAnchors, typename TPosition> inline void setEndPosition(Gaps<TSource, AnchorGaps<TGapAnchors> > & me, TPosition view_position);       	// "projects/library/seqan/store/store_align.h"(1413)
+
+//____________________________________________________________________________
+// setName
+
+template <typename TFragmentStore, typename TSpec, typename TName> inline typename GetValue<typename TFragmentStore::TAnnotationNameStore>::Type setName(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it, TName & name);       	// "projects/library/seqan/store/store_annotation.h"(189)
+
+//____________________________________________________________________________
+// setType
+
+template <typename TFragmentStore, typename TSpec, typename TTypeName> inline void setType(Iter<TFragmentStore, AnnotationTree<TSpec> > const & it, TTypeName & typeName);       	// "projects/library/seqan/store/store_annotation.h"(220)
+
+//____________________________________________________________________________
+// sortAlignedReads
+
+template <typename TAlign, typename TSortSpec> inline void sortAlignedReads(TAlign& alignStore, Tag<TSortSpec> const &);       	// "projects/library/seqan/store/store_align.h"(414)
+template <typename TAlign, typename TSortSpec> inline void sortAlignedReads(TAlign const & alignStore, Tag<TSortSpec> const &);       	// "projects/library/seqan/store/store_align.h"(426)
+template <typename TAlign, typename TFunctorLess> inline void sortAlignedReads(TAlign & alignStore, TFunctorLess const &less);       	// "projects/library/seqan/store/store_align.h"(436)
+template <typename TAlign, typename TFunctorLess> inline void sortAlignedReads(TAlign const & alignStore, TFunctorLess const &less);       	// "projects/library/seqan/store/store_align.h"(446)
+
+//____________________________________________________________________________
+// source
+
+template <typename TGaps, typename TGapAnchors> inline typename Source<Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const>::Type source(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me);       	// "projects/library/seqan/store/store_align.h"(1595)
+template <typename TGaps, typename TGapAnchors> inline typename Source<Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > >::Type source(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me);       	// "projects/library/seqan/store/store_align.h"(1601)
+
+//____________________________________________________________________________
+// toBamCigarElement
+
+template <typename TOperation, typename TCount> __uint32 toBamCigarElement(CigarElement<TOperation, TCount> const & cigarElement);       	// "projects/library/seqan/store/store_io_sam.h"(92)
+
+//____________________________________________________________________________
+// unlockAndFreeContig
+
+template <typename TSpec, typename TConfig, typename TId> bool unlockAndFreeContig(FragmentStore<TSpec, TConfig> &store, TId id);       	// "projects/library/seqan/store/store_io.h"(1014)
+
+//____________________________________________________________________________
+// unlockAndFreeContigs
+
+template <typename TSpec, typename TConfig> bool unlockAndFreeContigs(FragmentStore<TSpec, TConfig> &store);       	// "projects/library/seqan/store/store_io.h"(1086)
+
+//____________________________________________________________________________
+// unlockContig
+
+template <typename TSpec, typename TConfig, typename TId> bool unlockContig(FragmentStore<TSpec, TConfig> &store, TId id);       	// "projects/library/seqan/store/store_io.h"(993)
+
+//____________________________________________________________________________
+// unlockContigs
+
+template <typename TSpec, typename TConfig> bool unlockContigs(FragmentStore<TSpec, TConfig> &store);       	// "projects/library/seqan/store/store_io.h"(1065)
+
+//____________________________________________________________________________
+// upperBoundAlignedReads
+
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type upperBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortId);       	// "projects/library/seqan/store/store_align.h"(478)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type upperBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortContigId);       	// "projects/library/seqan/store/store_align.h"(514)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type upperBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortBeginPos);       	// "projects/library/seqan/store/store_align.h"(551)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type upperBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortEndPos);       	// "projects/library/seqan/store/store_align.h"(590)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type upperBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortPairMatchId);       	// "projects/library/seqan/store/store_align.h"(628)
+template <typename TAlign, typename TSearchValue> inline typename Iterator<TAlign, Standard>::Type upperBoundAlignedReads(TAlign const& alignStore, TSearchValue const val, SortReadId);       	// "projects/library/seqan/store/store_align.h"(664)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortId);       	// "projects/library/seqan/store/store_align.h"(702)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortContigId);       	// "projects/library/seqan/store/store_align.h"(740)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortBeginPos);       	// "projects/library/seqan/store/store_align.h"(779)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortEndPos);       	// "projects/library/seqan/store/store_align.h"(820)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortPairMatchId);       	// "projects/library/seqan/store/store_align.h"(860)
+template <typename T, typename TSpec, typename TSearchValue> inline Iter<T, TSpec> upperBoundAlignedReads(Iter<T, TSpec> const & alignedReadsItBegin, Iter<T, TSpec> const & alignedReadsItEnd, TSearchValue const val, SortReadId);       	// "projects/library/seqan/store/store_align.h"(898)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortId);       	// "projects/library/seqan/store/store_align.h"(936)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortContigId);       	// "projects/library/seqan/store/store_align.h"(974)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortBeginPos);       	// "projects/library/seqan/store/store_align.h"(1013)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortEndPos);       	// "projects/library/seqan/store/store_align.h"(1054)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortPairMatchId);       	// "projects/library/seqan/store/store_align.h"(1094)
+template <typename TReadAlignElement, typename TSearchValue> inline TReadAlignElement * upperBoundAlignedReads(TReadAlignElement * const & alignedReadsItBegin, TReadAlignElement * const & alignedReadsItEnd, TSearchValue const val, SortReadId);       	// "projects/library/seqan/store/store_align.h"(1132)
+
+//____________________________________________________________________________
+// upperBoundGapAnchor
+
+template <typename TGapAnchor, typename TSearchValue> inline typename Iterator<TGapAnchor, Standard>::Type upperBoundGapAnchor(TGapAnchor const& gaps, TSearchValue const val, SortSeqPos);       	// "projects/library/seqan/store/store_base.h"(233)
+template <typename TGapAnchor, typename TSearchValue> inline typename Iterator<TGapAnchor, Standard>::Type upperBoundGapAnchor(TGapAnchor const& gaps, TSearchValue const val, SortGapPos);       	// "projects/library/seqan/store/store_base.h"(269)
+
+//____________________________________________________________________________
+// value
+
+template <typename TFragmentStore, typename TSpec> inline typename VertexDescriptor<TFragmentStore>::Type & value(Iter< TFragmentStore, AnnotationTree<TSpec> > &it);       	// "projects/library/seqan/store/store_annotation.h"(146)
+template <typename TFragmentStore, typename TSpec> inline typename VertexDescriptor<TFragmentStore>::Type const & value(Iter< TFragmentStore, AnnotationTree<TSpec> > const &it);       	// "projects/library/seqan/store/store_annotation.h"(152)
+
+//____________________________________________________________________________
+// write
+
+template <typename TTargetStream, typename TSpec, typename TConfig> inline void write ( TTargetStream & target, FragmentStore<TSpec, TConfig> & store, Gff format);       	// "projects/library/seqan/store/store_io_gff.h"(718)
+template <typename TTargetStream, typename TSpec, typename TConfig> inline void write ( TTargetStream & target, FragmentStore<TSpec, TConfig> & store, Gtf format);       	// "projects/library/seqan/store/store_io_gff.h"(728)
+template <typename TTargetStream, typename TSpec, typename TConfig, typename TFormatSpec> inline void write ( TTargetStream & target, FragmentStore<TSpec, TConfig> & store, Tag<Ucsc_<TFormatSpec> > const format);       	// "projects/library/seqan/store/store_io_ucsc.h"(580)
+template <typename TFile, typename TSpec, typename TConfig> inline void write(TFile & target, FragmentStore<TSpec, TConfig>& fragStore, Amos);       	// "projects/library/seqan/store/store_io.h"(549)
+template <typename TFile, typename TSpec, typename TConfig> inline void write(TFile & target, FragmentStore<TSpec, TConfig> & store, Sam);       	// "projects/library/seqan/store/store_io_sam.h"(1123)
+
+//____________________________________________________________________________
+// writeContigs
+
+template <typename TStream, typename TFSSpec, typename TFSConfig, typename TFormat> bool writeContigs(TStream & file, FragmentStore<TFSSpec, TFSConfig> & store, TFormat const &);       	// "projects/library/seqan/store/store_io.h"(823)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+//////////////////////////////////////////////////////////////////////////////
+
+namespace seqan {
+
+//____________________________________________________________________________
+// _readAlignments
+
+template <typename TSpec, typename TConfig, typename TContigAnchorGaps, typename TMatchMateInfos> inline void _readAlignments( samfile_t * file, FragmentStore<TSpec, TConfig> & fragStore, TContigAnchorGaps & contigAnchorGaps, TMatchMateInfos & matchMateInfos, Bam const &);       	// "projects/library/seqan/store/store_io_bam.h"(108)
+
+//____________________________________________________________________________
+// _readOneAlignment
+
+template <typename TSpec, typename TConfig, typename TContigAnchorGaps, typename TMatchMateInfos, typename TContextBAM> inline void _readOneAlignment ( samfile_t * file, bam1_t * record, FragmentStore<TSpec, TConfig> & fragStore, TContigAnchorGaps & contigAnchorGaps, TMatchMateInfos & matchMateInfos, Bam const &, TContextBAM & contextBam);       	// "projects/library/seqan/store/store_io_bam.h"(153)
+
+//____________________________________________________________________________
+// _writeAlignments
+
+template <typename TSpec, typename TConfig> inline void _writeAlignments(samfile_t * , FragmentStore<TSpec, TConfig> & store, Bam const &);       	// "projects/library/seqan/store/store_io_bam.h"(411)
+
+//____________________________________________________________________________
+// read
+
+template <typename TSpec, typename TConfig> inline void read(samfile_t * file, FragmentStore<TSpec, TConfig> & fragStore, Bam const &);       	// "projects/library/seqan/store/store_io_bam.h"(73)
+
+//____________________________________________________________________________
+// write
+
+template <typename TSpec, typename TConfig> inline void write(char const * fileName, FragmentStore<TSpec, TConfig> & fragStore, Bam const &);       	// "projects/library/seqan/store/store_io_bam.h"(370)
+
+} //namespace seqan
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/store/store_intervaltree.h b/src/SeqAn-1.3/seqan/store/store_intervaltree.h
new file mode 100644
index 0000000..59b1175
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_intervaltree.h
@@ -0,0 +1,197 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_INTERVALTREE_H
+#define SEQAN_HEADER_STORE_INTERVALTREE_H
+//#define DEBUG_TREE
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Create IntervallTreeStores
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TSpec, typename TConfig>
+inline void
+createIntervalTreeStore(FragmentStore<TSpec, TConfig> & me, const bool &unknownO)
+{
+	typedef typename FragmentStore<TSpec, TConfig>::TAnnotationStore 	TAnnotationStore;
+	typedef typename FragmentStore<TSpec, TConfig>::TContigPos 		TContigPos;
+	typedef typename Value<TAnnotationStore>::Type 				TAnnotationStoreElement;
+	typedef typename TAnnotationStoreElement::TId 				TId;
+	typedef typename Iterator<TAnnotationStore>::Type 			TAnnotationIterator;
+	
+	typedef	typename FragmentStore<TSpec, TConfig>::TIntervalTreeStore 	TIntervalTreeStore;
+	typedef typename Value<TIntervalTreeStore>::Type 			TIntervalTree;
+	typedef typename TIntervalTree::TInterval 				TInterval;
+	typedef 	 String<TInterval>					TIntervals;
+	typedef typename Iterator<String<TIntervals> >::Type			TCIter;
+	
+	static const TId INVALID_ID = TAnnotationStoreElement::INVALID_ID;
+	
+	// get intervals for each contig (R- and F-strand):
+	if (!empty(me.annotationStore) && !unknownO)
+	{
+		resize(me.intervalTreeStore_F, length(me.contigStore) );
+		resize(me.intervalTreeStore_R, length(me.contigStore) );
+
+		String<TIntervals> contigIntervals_F;
+		String<TIntervals> contigIntervals_R;
+		resize(contigIntervals_F, length(me.contigStore));
+		resize(contigIntervals_R, length(me.contigStore));
+		
+		TAnnotationIterator itAnno = begin(me.annotationStore);
+		TAnnotationIterator itAnnoEnd = end(me.annotationStore);
+		TId beginPos;
+		TId endPos;
+		TInterval interval;
+		for ( ; itAnno != itAnnoEnd; goNext(itAnno))
+		{
+			if (getValue(itAnno).contigId != INVALID_ID)
+			{
+				beginPos = getValue(itAnno).beginPos;
+				endPos = getValue(itAnno).endPos;
+				if (beginPos != INVALID_ID && beginPos <= endPos)
+				{
+					interval.i1 = beginPos;
+					interval.i2 = endPos;
+					interval.cargo = position(itAnno, me.annotationStore);
+					appendValue(value(contigIntervals_F,  getValue(itAnno).contigId), interval, Generous());		
+				}
+				else if (beginPos != INVALID_ID  && beginPos > endPos)
+				{
+					interval.i1 = endPos;					
+					interval.i2 = beginPos;
+					interval.cargo = position(itAnno, me.annotationStore);
+					appendValue(value(contigIntervals_R, getValue(itAnno).contigId), interval, Generous() );
+				}
+			}
+		}
+	
+		// build trees for each contig and each strand:
+		TCIter itF = begin(contigIntervals_F);
+		TCIter itFEnd = end(contigIntervals_F);
+		TCIter itR = begin(contigIntervals_R);
+		for ( ; itF != itFEnd; goNext(itF), goNext(itR))
+		{
+			TIntervalTree intervalTree_F(getValue(itF),RandomCenter());
+			TIntervalTree intervalTree_R(getValue(itR),RandomCenter());
+				
+			assignValue(me.intervalTreeStore_F, position(itF, contigIntervals_F), intervalTree_F);  
+			assignValue(me.intervalTreeStore_R, position(itR, contigIntervals_R), intervalTree_R);
+		}
+	}
+	
+	// if read orientation is not known:
+	// get intervals for each contig:
+	if (!empty(me.annotationStore) && unknownO)
+	{
+		resize(me.intervalTreeStore_F, length(me.contigStore) );
+		clear(me.intervalTreeStore_R);
+
+		String<TIntervals> contigIntervals;
+		resize(contigIntervals, length(me.contigStore));
+		TAnnotationIterator itAnno = begin(me.annotationStore);
+		TAnnotationIterator itAnnoEnd = end(me.annotationStore);
+		TId beginPos;
+		TId endPos;
+		TInterval interval;
+		for ( ; itAnno != itAnnoEnd; goNext(itAnno))
+		{
+			if (getValue(itAnno).contigId != INVALID_ID)
+			{
+				beginPos = getValue(itAnno).beginPos;
+				endPos = getValue(itAnno).endPos;
+				if (beginPos != INVALID_ID)
+				{
+					if (beginPos <= endPos)
+					{
+						interval.i1 = beginPos;
+						interval.i2 = endPos;
+					}
+					else
+					{
+						interval.i1 = endPos;
+						interval.i2 = beginPos;
+					}
+					interval.cargo = position(itAnno, me.annotationStore);
+					appendValue(value(contigIntervals,  getValue(itAnno).contigId), interval, Generous());		
+				}
+			}
+		}
+		// build trees for each contig:
+		TCIter itC = begin(contigIntervals);
+		TCIter itCEnd = end(contigIntervals);
+		for ( ; itC != itCEnd; goNext(itC))
+		{
+			TIntervalTree intervalTree(getValue(itC),RandomCenter());
+				
+			assignValue(me.intervalTreeStore_F, position(itC, contigIntervals), intervalTree); 
+		}
+	}
+}
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// find intervals containing one interval
+//////////////////////////////////////////////////////////////////////////////
+
+
+template<typename TIntervalTree, typename TInterval, typename TCargo>
+inline void
+findIntervalsForInterval(String<TCargo> & result, TIntervalTree & intervalTree, TInterval & interval, const unsigned & offsetInterval)
+{
+	String<TCargo> result1;
+	String<TCargo> result2;
+	
+	findIntervals(intervalTree.g, intervalTree.pm, interval.i1 + offsetInterval, result1);
+	findIntervals(intervalTree.g, intervalTree.pm, interval.i2 - offsetInterval, result2);
+	
+	interSec(result, result1, result2); 
+	
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_io.h b/src/SeqAn-1.3/seqan/store/store_io.h
new file mode 100644
index 0000000..deb1f63
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_io.h
@@ -0,0 +1,1213 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_IO_H
+#define SEQAN_HEADER_STORE_IO_H
+
+#include <seqan/misc/misc_parsing.h>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// File tags
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.File Format.tag.Amos message file:
+	Amos message file.
+..include:seqan/store.h
+*/
+struct TagAmos_;
+typedef Tag<TagAmos_> const Amos;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Auxillary functions
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+template <typename TSpec, typename TConfig, typename TPos, typename TGapAnchor, typename TSpecAlign, typename TBeginClr, typename TEndClr>
+inline void
+getClrRange(FragmentStore<TSpec, TConfig> const& fragStore,
+			AlignedReadStoreElement<TPos, TGapAnchor, TSpecAlign> const& alignEl,
+			TBeginClr& begClr,		// Out-parameter: left / begin position of the clear range
+			TEndClr& endClr)		// Out-parameter: right / end position of the clear range
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename Iterator<String<TGapAnchor>, Standard>::Type TGapIter;
+	
+	TSize lenRead = length(fragStore.readSeqStore[alignEl.readId]);
+	TGapIter itGap = begin(alignEl.gaps, Standard() );
+	TGapIter itGapEnd = end(alignEl.gaps, Standard() );
+	
+	// Any gaps or clipped characters?
+	if (itGap == itGapEnd) {
+		begClr = 0;
+		endClr = lenRead;
+	} else {
+		// Begin clear range
+		begClr = (itGap->gapPos == 0) ? itGap->seqPos : 0;
+		// End clear range
+		--itGapEnd;
+		if (static_cast<TSize>(itGapEnd->seqPos) != lenRead) endClr = lenRead;
+		else {
+			int diff = (itGap != itGapEnd) ? (*(itGapEnd - 1)).gapPos - (*(itGapEnd-1)).seqPos : 0;
+			int newDiff = itGapEnd->gapPos - itGapEnd->seqPos;
+			endClr = (newDiff < diff) ? lenRead - (diff - newDiff) : lenRead;	
+		}
+	}
+
+	// For reverse reads adapt clear ranges
+	if (alignEl.beginPos > alignEl.endPos) {
+		TBeginClr tmp = begClr;
+		begClr = lenRead - endClr;
+		endClr = lenRead - tmp;
+	}
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Read / Write of AMOS message files (*.afg)
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.read
+..cat:Fragment Store
+..signature:read(file, fragStore, tag)
+..param.fragStore:A fragment store. Currently @Tag.File Format.tag.Amos message file@ and @Tag.File Format.tag.Sam@ formats are supported.
+...type:Class.FragmentStore
+..param.tag.type:Tag.File Format.tag.Amos message file
+..include:seqan/store.h
+*/
+
+template<typename TFile, typename TSpec, typename TConfig>
+inline void 
+read(TFile & file,
+	 FragmentStore<TSpec, TConfig>& fragStore,
+	 Amos) 
+{
+	SEQAN_CHECKPOINT
+	// Basic types
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Id<TFragmentStore>::Type TId;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename Value<TFile>::Type TValue;
+	typedef typename TFragmentStore::TReadSeq TReadSeq;
+
+	// All fragment store element types
+	typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigElement;
+	typedef typename Value<typename TFragmentStore::TLibraryStore>::Type TLibraryStoreElement;
+	typedef typename Value<typename TFragmentStore::TMatePairStore>::Type TMatePairElement;
+	typedef typename Value<typename TFragmentStore::TReadStore>::Type TReadStoreElement;
+	typedef typename Value<typename TFragmentStore::TAlignedReadStore>::Type TAlignedElement;
+
+	// All maps to mirror file ids to our ids
+	typedef std::map<TId, TSize> TIdMap;
+	TIdMap libIdMap;
+	TIdMap frgIdMap;
+	TIdMap readIdMap;
+
+	// Parse the file and convert the internal ids
+	TValue c;
+	if (_streamEOF(file)) return;
+	else c = _streamGet(file);
+	while (!_streamEOF(file)) {
+		if (_streamEOF(file)) break;
+
+		// New block?
+		if (c == '{') {
+			c = _streamGet(file);
+			String<char> blockIdentifier;
+			_parseReadIdentifier(file, blockIdentifier, c);
+			_parseSkipLine(file, c);
+
+			// Library block
+			if (blockIdentifier == "LIB") {
+				TLibraryStoreElement libEl;
+				TId id = 0;
+				String<char> fieldIdentifier;
+				String<char> eid;
+				while (c != '}') {
+					clear(fieldIdentifier);
+					_parseReadIdentifier(file, fieldIdentifier, c);
+					if (fieldIdentifier == "iid") {
+						c = _streamGet(file);
+						id = _parseReadNumber(file, c);
+						_parseSkipLine(file, c);
+					} else if (fieldIdentifier == "eid") {
+						c = _streamGet(file);
+						while ((c != '\n') && (c != '\r')) {
+							appendValue(eid, c, Generous());
+							c = _streamGet(file);
+						}
+						_parseSkipLine(file, c);
+					} else if (fieldIdentifier == "mea") {
+						c = _streamGet(file);
+						libEl.mean = _parseReadDouble(file, c);
+						_parseSkipLine(file, c);
+					} else if (fieldIdentifier == "std") {
+						c = _streamGet(file);
+						libEl.std = _parseReadDouble(file, c);
+						_parseSkipLine(file, c);
+					} else {
+						_parseSkipLine(file, c);
+					}
+				}
+				libIdMap.insert(std::make_pair(id, length(fragStore.libraryStore)));
+				appendValue(fragStore.libraryStore, libEl, Generous() );
+				appendValue(fragStore.libraryNameStore, eid, Generous() );
+			} else if (blockIdentifier == "FRG") {  // Fragment block
+				TMatePairElement matePairEl;
+				TId id = 0;
+				String<char> fieldIdentifier;
+				String<char> eid;
+				bool foundRds = false;
+				while (c != '}') {
+					clear(fieldIdentifier);
+					_parseReadIdentifier(file, fieldIdentifier, c);
+					if (fieldIdentifier == "iid") {
+						c = _streamGet(file);
+						id = _parseReadNumber(file, c);
+						_parseSkipLine(file, c);
+					} else if (fieldIdentifier == "eid") {
+						c = _streamGet(file);
+						while ((c != '\n') && (c != '\r')) {
+							appendValue(eid, c, Generous() );
+							c = _streamGet(file);
+						}
+						_parseSkipLine(file, c);
+					} else if (fieldIdentifier == "lib") {
+						c = _streamGet(file);
+						matePairEl.libId = _parseReadNumber(file, c);
+						_parseSkipLine(file, c);
+					} else if (fieldIdentifier == "rds") {
+						foundRds = true;
+						c = _streamGet(file);
+						matePairEl.readId[0] = _parseReadNumber(file, c);
+						c = _streamGet(file);
+						matePairEl.readId[1] = _parseReadNumber(file, c);
+						_parseSkipLine(file, c);
+					} else {
+						_parseSkipLine(file, c);
+					}
+				}
+				// Only insert valid mate pairs
+				if (foundRds) {
+					frgIdMap.insert(std::make_pair(id, length(fragStore.matePairStore)));
+					appendValue(fragStore.matePairStore, matePairEl, Generous() );
+					appendValue(fragStore.matePairNameStore, eid, Generous() );
+				}
+			} else if (blockIdentifier == "RED") {   // Read block
+				TId id = 0;
+				String<char> fieldIdentifier;
+				String<char> eid;
+				String<char> qual;
+				TId matePairId = 0;
+				TReadSeq seq;
+				while (c != '}') {
+					clear(fieldIdentifier);
+					_parseReadIdentifier(file, fieldIdentifier, c);
+					if (fieldIdentifier == "iid") {
+						c = _streamGet(file);
+						id = _parseReadNumber(file, c);
+						_parseSkipLine(file, c);
+					} else if (fieldIdentifier == "eid") {
+						c = _streamGet(file);
+						while ((c != '\n') && (c != '\r')) {
+							appendValue(eid, c, Generous() );
+							c = _streamGet(file);
+						}
+						_parseSkipLine(file, c);
+					} else if (fieldIdentifier == "frg") {
+						c = _streamGet(file);
+						matePairId = _parseReadNumber(file, c);
+						_parseSkipLine(file, c);
+					} else if (fieldIdentifier == "seq") {
+						c = _streamGet(file);
+						_parseSkipWhitespace(file, c);
+						while (c != '.') {
+							_parseReadSequenceData(file,c,seq);
+							_parseSkipWhitespace(file, c);
+						}
+					} else if (fieldIdentifier == "qlt") {
+						clear(qual);
+						c = _streamGet(file);
+						_parseSkipWhitespace(file, c);
+						while (c != '.') {
+							if ((c!=' ') && (c != '\t') && (c != '\n') && (c != '\r')) appendValue(qual, c, Generous() );
+							c = _streamGet(file);
+						}
+					} else {
+						_parseSkipLine(file, c);
+					}
+				}
+				// Set quality
+				assignQualities(seq, qual);
+
+				// Insert the read
+				readIdMap.insert(std::make_pair(id, length(fragStore.readStore)));
+				appendRead(fragStore, seq, matePairId);
+				appendValue(fragStore.readNameStore, eid, Generous() );
+			} else if (blockIdentifier == "CTG") {   // Contig block
+				TContigElement contigEl;
+				TSize fromAligned = length(fragStore.alignedReadStore);
+				TId id = 0;
+				String<char> fieldIdentifier;
+				String<char> eid;
+				String<char> contigSeq;
+				String<char> contigQual;
+				while (c != '}') {
+					// Are we entering a TLE block
+					if (c == '{') {
+						TAlignedElement alignEl;
+						String<char> fdIdentifier;
+						typedef typename TFragmentStore::TContigPos TContigPos;
+						TContigPos offsetPos = 0;
+						TContigPos clr1 = 0;
+						TContigPos clr2 = 0;
+						String<TContigPos> gaps;
+						while (c != '}') {
+							clear(fdIdentifier);
+							_parseReadIdentifier(file, fdIdentifier, c);
+							if (fdIdentifier == "src") {
+								c = _streamGet(file);
+								alignEl.readId = _parseReadNumber(file, c);
+								_parseSkipLine(file, c);
+							} else if (fdIdentifier == "off") {
+								c = _streamGet(file);
+								if (c != '-') offsetPos = _parseReadNumber(file, c);
+								else offsetPos = 0;
+								_parseSkipLine(file, c);
+							} else if (fdIdentifier == "clr") {
+								c = _streamGet(file);
+								clr1 = _parseReadNumber(file, c);
+								c = _streamGet(file);
+								clr2 = _parseReadNumber(file, c);
+								_parseSkipLine(file, c);
+							} else if (fdIdentifier == "gap") {
+								c = _streamGet(file);
+								_parseSkipWhitespace(file, c);
+								while (c != '.') {
+									if ((c!=' ') && (c != '\t') && (c != '\n') && (c != '\r')) {
+										TSize nextGap = _parseReadNumber(file, c);
+										appendValue(gaps, nextGap, Generous() );
+									}
+									c = _streamGet(file);
+								}
+							} else {
+								_parseSkipLine(file, c);
+							}
+						}
+						_parseSkipLine(file, c);
+
+						// Get the length of the read
+						TId readId = (readIdMap.find(alignEl.readId))->second;
+						TSize lenRead = length(value(fragStore.readSeqStore, readId));
+
+						// Create the gap anchors
+						typedef typename TFragmentStore::TContigGapAnchor TContigGapAnchor;
+						int offset = 0;
+						if ((clr1 < clr2) && (clr1>0)) offset = clr1;
+						else if ((clr1 > clr2) && (clr1 < static_cast<TContigPos>(lenRead))) offset = lenRead - clr1;
+						int diff = -1 * (int) (offset);
+						// Clipped begin
+						if (offset != 0) appendValue(alignEl.gaps, TContigGapAnchor(offset, 0), Generous() );
+						// Internal gaps
+						typedef typename Iterator<String<TContigPos>, Standard>::Type TPosIter;
+						TPosIter posIt = begin(gaps, Standard() ); 
+						TPosIter posItEnd = end(gaps, Standard() );
+						TContigPos lastGap = 0;
+						TSize gapLen = 0;
+						TSize totalGapLen = 0;
+						for(;posIt!=posItEnd; goNext(posIt)) {
+							if (gapLen == 0) {
+								++gapLen; ++totalGapLen;
+								++diff;
+								lastGap = value(posIt);
+							} 
+							else if (lastGap == value(posIt)) {
+								++gapLen; ++totalGapLen;
+								++diff;
+							}
+							else {
+								appendValue(alignEl.gaps, TContigGapAnchor(offset + lastGap, offset + lastGap + diff), Generous() );
+								gapLen = 1; ++totalGapLen;
+								lastGap = value(posIt);
+								++diff;
+							}
+						}
+						if (gapLen > 0) appendValue(alignEl.gaps, TContigGapAnchor(offset + lastGap, offset + lastGap + diff), Generous() );
+						// Clipped end
+						if ((clr1 < clr2) && (clr2 < static_cast<TContigPos>(lenRead))) {
+							diff -= (lenRead - clr2);				
+							appendValue(alignEl.gaps, TContigGapAnchor(lenRead, lenRead + diff), Generous() );
+						} else if ((clr1 > clr2) && (clr2 > 0)) {
+							diff -= clr2;
+							appendValue(alignEl.gaps, TContigGapAnchor(lenRead, lenRead + diff), Generous() );
+						}
+						
+						// Set begin and end position
+						if (clr1 < clr2) {
+							alignEl.beginPos = offsetPos;
+							alignEl.endPos = offsetPos + totalGapLen + (clr2 - clr1);
+						} else {
+							alignEl.beginPos = offsetPos + totalGapLen + (clr1 - clr2);
+							alignEl.endPos = offsetPos;
+						}
+		
+						// Append new align fragment, note: contigId must still be set
+						alignEl.id = length(fragStore.alignedReadStore);
+						appendValue(fragStore.alignedReadStore, alignEl, Generous() );
+					} else {
+						clear(fieldIdentifier);
+						_parseReadIdentifier(file, fieldIdentifier, c);
+						if (fieldIdentifier == "iid") {
+							c = _streamGet(file);
+							id = _parseReadNumber(file, c);
+							_parseSkipLine(file, c);
+						} else if (fieldIdentifier == "eid") {
+							c = _streamGet(file);
+							while ((c != '\n') && (c != '\r')) {
+								appendValue(eid, c, Generous() );
+								c = _streamGet(file);
+							}
+							_parseSkipLine(file, c);
+						} else if (fieldIdentifier == "seq") {
+							c = _streamGet(file);
+							_parseSkipWhitespace(file, c);
+							while (c != '.') {
+								do {
+									_parseReadSequenceData(file,c,contigSeq);
+								} while (c == '-');
+								_parseSkipWhitespace(file, c);
+							}
+						} else if (fieldIdentifier == "qlt") {
+							c = _streamGet(file);
+							_parseSkipWhitespace(file, c);
+							while (c != '.') {
+								if ((c!=' ') && (c != '\t') && (c != '\n') && (c != '\r')) {
+									appendValue(contigQual, c, Generous() );
+								}
+								c = _streamGet(file);
+							}
+						} else {
+							_parseSkipLine(file, c);
+						}
+					}
+				}
+
+				// Create the gap anchors
+				char gapChar = gapValue<char>();
+				typedef typename Iterator<String<char> >::Type TStringIter;
+				TStringIter seqIt = begin(contigSeq);
+				TStringIter seqItEnd = end(contigSeq);
+				TStringIter qualIt = begin(contigQual);
+				typedef typename TFragmentStore::TReadPos TPos;
+				typedef typename TFragmentStore::TContigGapAnchor TContigGapAnchor;
+				TPos ungappedPos = 0;
+				TPos gappedPos = 0;
+				bool gapOpen = false;
+				for(;seqIt != seqItEnd; goNext(seqIt), goNext(qualIt), ++gappedPos) {
+					if (value(seqIt) == gapChar) gapOpen = true;				
+					else {
+						if (gapOpen) {
+							appendValue(contigEl.gaps, TContigGapAnchor(ungappedPos, gappedPos), Generous() );
+							gapOpen = false;
+						}
+						Dna5Q letter = value(seqIt);
+						assignQualityValue(letter, value(qualIt));
+						appendValue(contigEl.seq, letter, Generous() );
+						++ungappedPos;
+					}
+				}
+				if (gapOpen) appendValue(contigEl.gaps, TContigGapAnchor(ungappedPos, gappedPos), Generous() );
+
+				// Set the contigId in all aligned reads
+				TSize toAligned = length(fragStore.alignedReadStore);
+				TId newContigId = length(fragStore.contigStore);
+				for(; fromAligned < toAligned; ++fromAligned) {
+					(value(fragStore.alignedReadStore, fromAligned)).contigId = newContigId;
+				}
+
+				// Insert the contig
+				appendValue(fragStore.contigStore, contigEl, Generous() );
+				appendValue(fragStore.contigNameStore, eid, Generous() );
+			} else {
+				_parseSkipLine(file, c);
+			}	
+		} else {
+			_parseSkipLine(file, c);
+		}
+	}
+
+	// Renumber all ids
+	typedef typename TIdMap::const_iterator TIdMapIter;
+	typedef typename Iterator<typename TFragmentStore::TMatePairStore>::Type TMateIter;
+	TMateIter mateIt = begin(fragStore.matePairStore);
+	TMateIter mateItEnd = end(fragStore.matePairStore);
+	for(;mateIt != mateItEnd; goNext(mateIt)) {
+		if (mateIt->libId != TMatePairElement::INVALID_ID) {
+			TIdMapIter libIdPos = libIdMap.find(mateIt->libId);
+			if (libIdPos != libIdMap.end()) mateIt->libId = libIdPos->second;
+			else mateIt->libId = TMatePairElement::INVALID_ID;
+		}
+		if (mateIt->readId[0] != TMatePairElement::INVALID_ID) {
+			TIdMapIter readIdPos = readIdMap.find(mateIt->readId[0]);
+			if (readIdPos != readIdMap.end()) mateIt->readId[0] = readIdPos->second;
+			else mateIt->readId[0] = TMatePairElement::INVALID_ID;
+		}
+		if (mateIt->readId[1]!= TMatePairElement::INVALID_ID) {
+			TIdMapIter readIdPos = readIdMap.find(mateIt->readId[1]);
+			if (readIdPos != readIdMap.end()) mateIt->readId[1] = readIdPos->second;
+			else mateIt->readId[0] = TMatePairElement::INVALID_ID;
+		}
+	}
+	typedef typename Iterator<typename TFragmentStore::TReadStore>::Type TReadIter;
+	TReadIter readIt = begin(fragStore.readStore);
+	TReadIter readItEnd = end(fragStore.readStore);
+	for(;readIt != readItEnd; goNext(readIt)) {
+		if (readIt->matePairId != TReadStoreElement::INVALID_ID) {
+			TIdMapIter mateIdPos = frgIdMap.find(readIt->matePairId);
+			if (mateIdPos != frgIdMap.end()) readIt->matePairId = mateIdPos->second;
+			else readIt->matePairId = TReadStoreElement::INVALID_ID;
+		}
+	}
+	TId myPairMatchId = 0;  // Dummy variable to count the matches
+	typedef typename Iterator<typename TFragmentStore::TAlignedReadStore>::Type TAlignIter;
+	TAlignIter alignIt = begin(fragStore.alignedReadStore);
+	TAlignIter alignItEnd = end(fragStore.alignedReadStore);
+	for(;alignIt != alignItEnd; goNext(alignIt)) {
+		if (alignIt->readId != TAlignedElement::INVALID_ID) {
+			TIdMapIter readIdPos = readIdMap.find(alignIt->readId);
+			if (readIdPos != readIdMap.end()) alignIt->readId = readIdPos->second;
+			else alignIt->readId = TAlignedElement::INVALID_ID;
+		}
+		alignIt->pairMatchId = myPairMatchId++;
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.write
+..cat:Fragment Store
+..signature:write(file, fragStore, tag)
+..param.fragStore:A fragment store.
+...type:Class.FragmentStore
+..param.tag.type:Tag.File Format.tag.Amos message file
+..include:seqan/store.h
+*/
+
+template<typename TFile, typename TSpec, typename TConfig>
+inline void 
+write(TFile & target,
+	  FragmentStore<TSpec, TConfig>& fragStore,
+	  Amos) 
+{
+	SEQAN_CHECKPOINT
+	// Basic types
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	typedef typename Id<TFragmentStore>::Type TId;
+	typedef typename Size<TFragmentStore>::Type TSize;
+	typedef typename Value<TFile>::Type TValue;
+
+	// All fragment store element types
+	typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigElement;
+	typedef typename Value<typename TFragmentStore::TLibraryStore>::Type TLibraryStoreElement;
+	typedef typename Value<typename TFragmentStore::TMatePairStore>::Type TMatePairElement;
+	typedef typename Value<typename TFragmentStore::TReadStore>::Type TReadStoreElement;
+	typedef typename Value<typename TFragmentStore::TAlignedReadStore>::Type TAlignedElement;
+
+	// Write Header
+	_streamWrite(target,"{UNV\niid:1\neid:seqan\ncom:\nafg file created with SeqAn\n.\n}\n");
+	
+	// Write Libraries
+	typedef typename Iterator<typename TFragmentStore::TLibraryStore, Standard>::Type TLibIter;
+	TLibIter libIt = begin(fragStore.libraryStore, Standard() );
+	TLibIter libItEnd = end(fragStore.libraryStore, Standard() );
+	bool noNamesPresent = (length(fragStore.libraryNameStore) == 0);
+	for(TSize idCount = 0;libIt != libItEnd; goNext(libIt), ++idCount) {
+		_streamWrite(target,"{LIB\n");
+		_streamWrite(target,"iid:");
+		_streamPutInt(target, idCount + 1);
+		_streamPut(target, '\n');
+		if (!noNamesPresent) {
+			_streamWrite(target,"eid:");
+			_streamWrite(target, value(fragStore.libraryNameStore, idCount));
+			_streamPut(target, '\n');
+		}
+		_streamWrite(target,"{DST\n");
+		_streamWrite(target,"mea:");
+		_streamPutFloat(target, libIt->mean);
+		_streamPut(target, '\n');
+		_streamWrite(target,"std:");
+		_streamPutFloat(target, libIt->std);
+		_streamPut(target, '\n');
+		_streamWrite(target,"}\n");	
+		_streamWrite(target,"}\n");
+	}
+
+	// Write Fragments / mate pairs
+	typedef typename Iterator<typename TFragmentStore::TMatePairStore, Standard>::Type TMateIter;
+	TMateIter mateIt = begin(fragStore.matePairStore, Standard() );
+	TMateIter mateItEnd = end(fragStore.matePairStore, Standard() );
+	noNamesPresent = (length(fragStore.matePairNameStore) == 0);
+	for(TSize idCount = 0;mateIt != mateItEnd; goNext(mateIt), ++idCount) {
+		_streamWrite(target,"{FRG\n");
+		_streamWrite(target,"iid:");
+		_streamPutInt(target, idCount + 1);
+		_streamPut(target, '\n');
+		if (!noNamesPresent) {
+			_streamWrite(target,"eid:");
+			_streamWrite(target, value(fragStore.matePairNameStore, idCount));
+			_streamPut(target, '\n');
+		}
+		_streamWrite(target,"lib:");
+		_streamPutInt(target, mateIt->libId + 1);
+		_streamPut(target, '\n');
+		if ((mateIt->readId[0] != TMatePairElement::INVALID_ID) && (mateIt->readId[1] != TMatePairElement::INVALID_ID)) {
+			_streamWrite(target,"rds:");
+			_streamPutInt(target, mateIt->readId[0] + 1);
+			_streamPut(target, ',');
+			_streamPutInt(target, mateIt->readId[1] + 1);
+			_streamPut(target, '\n');
+		}
+		_streamWrite(target,"}\n");
+	}
+
+	// Get clear ranges
+	typedef Pair<typename TFragmentStore::TReadPos, typename TFragmentStore::TReadPos> TClrRange;
+	String<TClrRange> clrRange;
+	resize(clrRange, length(fragStore.readStore), TClrRange(0,0));
+	typedef typename Iterator<typename TFragmentStore::TAlignedReadStore, Standard>::Type TAlignIter;
+	TAlignIter alignIt = begin(fragStore.alignedReadStore, Standard() );
+	TAlignIter alignItEnd = end(fragStore.alignedReadStore, Standard() );
+	for(;alignIt != alignItEnd; goNext(alignIt)) {
+		typename TFragmentStore::TReadPos begClr = 0;
+		typename TFragmentStore::TReadPos endClr = 0;
+		getClrRange(fragStore, value(alignIt), begClr, endClr);
+		value(clrRange, alignIt->readId) = TClrRange(begClr, endClr);
+	}
+
+	// Write reads
+	typedef typename Iterator<typename TFragmentStore::TReadStore, Standard>::Type TReadIter;
+	TReadIter readIt = begin(fragStore.readStore, Standard() );
+	TReadIter readItEnd = end(fragStore.readStore, Standard() );
+	noNamesPresent = (length(fragStore.readNameStore) == 0);
+	for(TSize idCount = 0;readIt != readItEnd; ++readIt, ++idCount) {
+		_streamWrite(target,"{RED\n");
+		_streamWrite(target,"iid:");
+		_streamPutInt(target, idCount + 1);
+		_streamPut(target, '\n');
+		if (!noNamesPresent) {
+			_streamWrite(target,"eid:");
+			_streamWrite(target, value(fragStore.readNameStore, idCount));
+			_streamPut(target, '\n');
+		}
+		_streamWrite(target,"seq:\n");
+		typedef typename Iterator<typename TFragmentStore::TReadSeq>::Type TSeqIter;
+		typedef typename Value<typename TFragmentStore::TReadSeq>::Type TAlphabet;
+		TSeqIter seqIt = begin(value(fragStore.readSeqStore, idCount));
+		TSeqIter seqItEnd = end(value(fragStore.readSeqStore, idCount));
+		for(TSize k = 0;seqIt!=seqItEnd;goNext(seqIt), ++k) {
+			if ((k % 60 == 0) && (k != 0)) _streamPut(target, '\n');
+			_streamPut(target, getValue(seqIt));
+		}
+		_streamWrite(target, "\n.\n");
+		_streamWrite(target,"qlt:\n");
+		seqIt = begin(value(fragStore.readSeqStore, idCount));
+		for(TSize k = 0;seqIt!=seqItEnd;goNext(seqIt), ++k) {
+			if ((k % 60 == 0) && (k != 0)) _streamPut(target, '\n');
+			Ascii c = ' ';
+			convertQuality(c, getQualityValue(value(seqIt)));
+			_streamPut(target, c);
+		}
+		_streamWrite(target, "\n.\n");
+		if (readIt->matePairId != TReadStoreElement::INVALID_ID) {
+			_streamWrite(target,"frg:");
+			_streamPutInt(target, readIt->matePairId + 1);
+			_streamPut(target, '\n');
+		}
+		if ((value(clrRange, idCount)).i1 != (value(clrRange, idCount)).i2) {
+			_streamWrite(target,"clr:");
+			_streamPutInt(target, (value(clrRange, idCount)).i1);
+			_streamPut(target, ',');
+			_streamPutInt(target, (value(clrRange, idCount)).i2);
+			_streamPut(target, '\n');
+		}
+		_streamWrite(target,"}\n");
+	}
+
+	// Sort aligned reads according to contigId
+	sortAlignedReads(fragStore.alignedReadStore, SortContigId());
+
+	// Write Contigs
+	typedef typename Iterator<typename TFragmentStore::TContigStore, Standard>::Type TContigIter;
+	TContigIter contigIt = begin(fragStore.contigStore, Standard() );
+	TContigIter contigItEnd = end(fragStore.contigStore, Standard() );
+	alignIt = begin(fragStore.alignedReadStore);
+	alignItEnd = end(fragStore.alignedReadStore);
+	noNamesPresent = (length(fragStore.contigNameStore) == 0);
+	for(TSize idCount = 0;contigIt != contigItEnd; goNext(contigIt), ++idCount) {
+		_streamWrite(target,"{CTG\n");
+		_streamWrite(target,"iid:");
+		_streamPutInt(target, idCount + 1);
+		_streamPut(target, '\n');
+		if (!noNamesPresent) {
+			_streamWrite(target,"eid:");
+			_streamWrite(target, value(fragStore.contigNameStore, idCount));
+			_streamPut(target, '\n');
+		}
+		String<char> qlt;
+		_streamWrite(target,"seq:\n");
+		typedef typename Iterator<typename TFragmentStore::TContigSeq>::Type TContigIter;
+		TContigIter seqContigIt = begin(contigIt->seq);
+		TContigIter seqContigItEnd = end(contigIt->seq);
+		typedef typename Iterator<String<typename TFragmentStore::TContigGapAnchor> >::Type TGapsIter;
+		TGapsIter itGaps = begin(contigIt->gaps);
+		TGapsIter itGapsEnd = end(contigIt->gaps);
+		int diff = 0;
+		char gapChar = gapValue<char>();
+		typename TFragmentStore::TContigPos mySeqPos = 0;
+		TSize k = 0;
+		for(;itGaps != itGapsEnd; goNext(itGaps)) {
+			while (mySeqPos < itGaps->seqPos) {
+				if ((k % 60 == 0) && (k != 0)) _streamPut(target, '\n');
+				++k;
+				_streamPut(target, value(seqContigIt));
+				Ascii c = ' ';
+				convertQuality(c, getQualityValue(value(seqContigIt)));
+				appendValue(qlt, c, Generous() );
+				goNext(seqContigIt);++mySeqPos;
+			}
+			for(int i = 0; i < ((int) itGaps->gapPos - (int) itGaps->seqPos) - diff; ++i) {
+				if ((k % 60 == 0) && (k != 0)) _streamPut(target, '\n');
+				++k;
+				_streamPut(target, gapChar);
+				appendValue(qlt, '0', Generous() );
+			}
+			diff = (itGaps->gapPos - itGaps->seqPos);
+		}
+		for(;seqContigIt != seqContigItEnd; goNext(seqContigIt)) {
+			if ((k % 60 == 0) && (k != 0)) _streamPut(target, '\n');
+			++k;
+			_streamPut(target, value(seqContigIt));
+			Ascii c = ' ';
+			convertQuality(c, getQualityValue(value(seqContigIt)));
+			appendValue(qlt, c, Generous() );
+		}
+		_streamWrite(target, "\n.\n");
+		_streamWrite(target,"qlt:\n");
+		for(TSize k = 0;k<length(qlt); k+=60) {
+			TSize endK = k + 60;
+			if (endK > length(qlt)) endK = length(qlt);
+			_streamWrite(target, infix(qlt, k, endK));
+			_streamPut(target, '\n');
+		}
+		_streamWrite(target, ".\n");
+		
+		while ((alignIt != alignItEnd) && (idCount < alignIt->contigId)) goNext(alignIt);
+		for(;(alignIt != alignItEnd) && (idCount == alignIt->contigId); goNext(alignIt)) {
+			_streamWrite(target,"{TLE\n");
+			_streamWrite(target,"src:");
+			_streamPutInt(target, alignIt->readId + 1);
+			_streamPut(target, '\n');
+			typedef typename Iterator<String<typename TFragmentStore::TReadGapAnchor> >::Type TReadGapsIter;
+			TReadGapsIter itGaps = begin(alignIt->gaps);
+			TReadGapsIter itGapsEnd = end(alignIt->gaps);
+
+			// Create the gaps string and the clear ranges
+			typename TFragmentStore::TReadPos lenRead = length(value(fragStore.readSeqStore, alignIt->readId));
+			TSize clr1 = 0;
+			TSize clr2 = lenRead;
+			// Create first clear range
+			if ((itGaps != itGapsEnd) && (itGaps->gapPos == 0)) clr1 = itGaps->seqPos;
+			int diff = clr1;
+			String<unsigned int> gaps;
+			for(;itGaps != itGapsEnd; goNext(itGaps)) {
+				for(int i = 0; i< diff - ((int) itGaps->seqPos - (int) itGaps->gapPos); ++i) {
+					appendValue(gaps, itGaps->seqPos - clr1, Generous() );
+				}
+				// Clipped sequence
+				if (diff - ((int) itGaps->seqPos - (int) itGaps->gapPos) < 0) {
+					clr2 = lenRead + diff - ((int) itGaps->seqPos - (int) itGaps->gapPos);
+				}
+				diff = ((int) itGaps->seqPos - (int) itGaps->gapPos);
+			}
+			if (alignIt->beginPos > alignIt->endPos) {
+				clr1 = lenRead - clr1;
+				clr2 = lenRead - clr2;
+			}
+			_streamWrite(target,"off:");
+			if (alignIt->beginPos < alignIt->endPos) _streamPutInt(target, alignIt->beginPos);
+			else _streamPutInt(target, alignIt->endPos);
+			_streamPut(target, '\n');
+			_streamWrite(target,"clr:");
+			_streamPutInt(target, clr1);
+			_streamPut(target, ',');
+			_streamPutInt(target, clr2);
+			_streamPut(target, '\n');
+			if (length(gaps)) {
+				_streamWrite(target,"gap:\n");
+				for(TSize z = 0;z<length(gaps); ++z) {
+					_streamPutInt(target, value(gaps, z));
+					_streamPut(target, '\n');
+				}
+				_streamWrite(target, ".\n");
+			}
+			_streamWrite(target,"}\n");
+		}
+		_streamWrite(target,"}\n");
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.writeContigs
+..summary:Write contigs from fragment store into file.
+..cat:Fragment Store
+..signature:writeContigs(file, store, tag)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.file:A file/stream.
+..param.tag:Specify format to write, e.g. Fasta.
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/store.h
+*/
+template <typename TStream, typename TFSSpec, typename TFSConfig, typename TFormat>
+bool writeContigs(TStream & file, FragmentStore<TFSSpec, TFSConfig> & store, TFormat const &)
+{
+	for (unsigned i = 0; i < length(store.contigNameStore); ++i)
+		write(file, store.contigStore[i].seq, store.contigNameStore[i], TFormat());
+	return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.loadContigs
+..summary:Loads contigs into fragment store.
+..cat:Fragment Store
+..signature:loadContigs(store, fileName[, loadSeqs])
+..signature:loadContigs(store, fileNameList[, loadSeqs])
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.fileName:A sequence file name.
+...type:Shortcut.CharString
+..param.fileNameList:A @Class.StringSet@ of sequence file names.
+...type:Class.StringSet
+..param.loadSeqs:If $true$, sequences are loaded immediately. 
+If $false$, an empty contig with a reference to the file is created. Its sequence can be loaded on-demand by @Function.lockContig@ or @Function.loadContig at .
+...default:$true$
+...type:nolink:bool
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/store.h
+*/
+
+template <typename TFSSpec, typename TFSConfig>
+bool loadContigs(FragmentStore<TFSSpec, TFSConfig> &store, StringSet<CharString> const &fileNameList, bool loadSeqs)
+{
+	typedef FragmentStore<TFSSpec, TFSConfig>			TFragmentStore;
+	typedef typename TFragmentStore::TContigFileStore	TContigFileStore;
+	typedef typename Value<TContigFileStore>::Type		TContigFile;
+	
+	unsigned seqOfs = length(store.contigStore);
+	for (unsigned filecount = 0; filecount < length(fileNameList); ++filecount)
+	{
+		MultiSeqFile multiSeqFile;
+		if (!open(multiSeqFile.concat, toCString(fileNameList[filecount]), OPEN_RDONLY))
+			return false;
+
+		TContigFile contigFile;
+		guessFormat(multiSeqFile.concat, contigFile.format);		// guess file format
+		split(multiSeqFile, contigFile.format);						// divide into single sequences
+
+		contigFile.fileName = fileNameList[filecount];
+		contigFile.firstContigId = seqOfs;
+		appendValue(store.contigFileStore, contigFile, Generous());
+
+		unsigned seqCount = length(multiSeqFile);
+		resize(store.contigStore, seqOfs + seqCount, Generous());
+		resize(store.contigNameStore, seqOfs + seqCount, Generous());
+		for (unsigned i = 0; i < seqCount; ++i)
+		{
+			store.contigStore[seqOfs + i].usage = 0;
+			store.contigStore[seqOfs + i].fileBeginPos = beginPosition(multiSeqFile[i]);
+			store.contigStore[seqOfs + i].fileEndPos = endPosition(multiSeqFile[i]);
+			store.contigStore[seqOfs + i].fileId = length(store.contigFileStore) - 1;
+			if (loadSeqs)
+				assignSeq(store.contigStore[seqOfs + i].seq, multiSeqFile[i], contigFile.format);	// read Genome sequence
+			else
+				clear(store.contigStore[seqOfs + i].seq);
+			assignCroppedSeqId(store.contigNameStore[seqOfs + i], multiSeqFile[i], contigFile.format);
+		}
+		seqOfs += seqCount;
+	}
+	reserve(store.contigStore, seqOfs, Exact());
+	return seqOfs > 0;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFSSpec, typename TFSConfig>
+bool loadContigs(FragmentStore<TFSSpec, TFSConfig> &store, CharString const &fileName, bool loadSeqs)
+{
+	StringSet<CharString> fileNames;
+	appendValue(fileNames, fileName);
+	return loadContigs(store, fileNames, loadSeqs);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFSSpec, typename TFSConfig, typename TFileNames>
+bool loadContigs(FragmentStore<TFSSpec, TFSConfig> &store, TFileNames const &fileNames)
+{
+	return loadContigs(store, fileNames, true);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.loadContig
+..summary:Manually loads a contig sequence.
+..cat:Fragment Store
+..signature:loadContig(store, contigId)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.contigId:Id of the contig which was created earlier by @Function.loadContigs at .
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TId>
+bool loadContig(FragmentStore<TSpec, TConfig> &store, TId id)
+{
+	typedef FragmentStore<TSpec, TConfig>				TFragmentStore;
+	typedef typename TFragmentStore::TContigStore		TContigStore;
+	typedef typename TFragmentStore::TContigFileStore	TContigFileStore;
+	typedef typename Value<TContigStore>::Type			TContig;
+	typedef typename Value<TContigFileStore>::Type		TContigFile;
+
+	if ((TId)length(store.contigStore) <= id) return false;
+	TContig &contig = store.contigStore[id];
+
+	if (contig.fileId >= length(store.contigFileStore)) return false;
+	
+	TContigFile &contigFile = store.contigFileStore[contig.fileId];
+	String<char, MMap<> > fileString(toCString(contigFile.fileName), OPEN_RDONLY);
+	assignSeq(contig.seq, infix(fileString, contig.fileBeginPos, contig.fileEndPos), contigFile.format);			// read Read sequence
+
+	return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.lockContig
+..summary:Locks a contig sequence from being removed.
+..cat:Fragment Store
+..signature:lockContig(store, contigId)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.contigId:Id of the contig which was created earlier by @Function.loadContigs at .
+..returns:A $bool$ which is $true$ on success.
+..remarks:This function increases the contig usage counter by 1 and ensures that the contig sequence is loaded.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TId>
+bool lockContig(FragmentStore<TSpec, TConfig> &store, TId id)
+{
+	typedef FragmentStore<TSpec, TConfig>				TFragmentStore;
+	typedef typename TFragmentStore::TContigStore		TContigStore;
+	typedef typename TFragmentStore::TContigFileStore	TContigFileStore;
+	typedef typename Value<TContigStore>::Type			TContig;
+	typedef typename Value<TContigFileStore>::Type		TContigFile;
+	
+	if ((TId)length(store.contigStore) <= id) return false;
+	TContig &contig = store.contigStore[id];
+	
+	if (contig.usage++ > 0 || !empty(contig.seq)) return true;
+	return loadContig(store, id);
+}
+
+/**
+.Function.unlockContig
+..summary:Removes a previous contig lock.
+..cat:Fragment Store
+..signature:unlockContig(store, contigId)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.contigId:Id of the contig which was created earlier by @Function.loadContigs at .
+..returns:A $bool$ which is $true$ on success.
+..remarks:This function decreases the contig usage counter by 1.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TId>
+bool unlockContig(FragmentStore<TSpec, TConfig> &store, TId id)
+{
+	if ((TId)length(store.contigStore) <= id) return false;
+	--store.contigStore[id].usage;
+	return true;
+}
+
+/**
+.Function.unlockAndFreeContig
+..summary:Removes a previous contig lock and clears sequence no further lock exist.
+..cat:Fragment Store
+..signature:unlockAndFreeContig(store, contigId)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.contigId:Id of the contig which was created earlier by @Function.loadContigs at .
+..returns:A $bool$ which is $true$ on success.
+..remarks:This function decreases contig usage counter by 1 and clears contig sequence if counter is 0.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig, typename TId>
+bool unlockAndFreeContig(FragmentStore<TSpec, TConfig> &store, TId id)
+{
+	typedef FragmentStore<TSpec, TConfig>				TFragmentStore;
+	typedef typename TFragmentStore::TContigStore		TContigStore;
+	typedef typename Value<TContigStore>::Type			TContig;
+
+	if ((TId)length(store.contigStore) <= id) return false;
+	TContig &contig = store.contigStore[id];
+
+	if (--contig.usage == 0 && contig.fileId < length(store.contigFileStore))
+	{
+		clear(contig.seq);
+		return true;
+	}
+	return false;
+}
+
+/**
+.Function.lockContigs
+..summary:Locks all contig sequences from being removed. 
+..cat:Fragment Store
+..signature:lockContigs(store)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..returns:A $bool$ which is $true$ on success.
+..remarks:Calls @Function.lockContig@ for all contigs.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig>
+bool lockContigs(FragmentStore<TSpec, TConfig> &store)
+{
+	bool result = true;
+	for (unsigned id = 0; id < length(store.contigStore); ++id)
+		result &= lockContig(store, id);
+	return result;
+}
+
+/**
+.Function.unlockContigs
+..summary:Removes a previous lock for all contigs.
+..cat:Fragment Store
+..signature:unlockContigs(store)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..returns:A $bool$ which is $true$ on success.
+..remarks:Calls @Function.unlockContig@ for all contigs.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig>
+bool unlockContigs(FragmentStore<TSpec, TConfig> &store)
+{
+	bool result = true;
+	for (unsigned id = 0; id < length(store.contigStore); ++id)
+		result &= unlockContig(store, id);
+	return result;
+}
+
+/**
+.Function.unlockAndFreeContigs
+..summary:Removes a previous lock for all contigs and clears sequences without lock.
+..cat:Fragment Store
+..signature:unlockAndFreeContigs(store)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..returns:A $bool$ which is $true$ on success.
+..remarks:Calls @Function.unlockAndFreeContigs@ for all contigs.
+..include:seqan/store.h
+*/
+
+template <typename TSpec, typename TConfig>
+bool unlockAndFreeContigs(FragmentStore<TSpec, TConfig> &store)
+{
+	bool result = true;
+	for (unsigned id = 0; id < length(store.contigStore); ++id)
+		result &= unlockAndFreeContig(store, id);
+	return result;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Function.loadReads
+..summary:Loads reads into fragment store.
+..remarks:When two file names are given, the files are expected to contain the same number of reads and reads with the same index are assumed to be mate pairs.
+Mate pairs are stored internally in an "interleaved" mode, i.e. a read is read from each file before reading the next one.
+..cat:Fragment Store
+..signature:loadReads(store, fileName)
+..signature:loadReads(store, fileNameL, fileNameR)
+..param.store:The fragment store.
+...type:Class.FragmentStore
+..param.fileName:A sequence file name.
+...type:Shortcut.CharString
+..returns:A $bool$ which is $true$ on success.
+..include:seqan/store.h
+*/
+
+template <typename TFSSpec, typename TFSConfig, typename TFileName>
+bool loadReads(FragmentStore<TFSSpec, TFSConfig> &store, TFileName &fileName)
+{
+	typedef FragmentStore<TFSSpec, TFSConfig>			TFragmentStore;
+	typedef typename TFragmentStore::TContigFileStore	TContigFileStore;
+	typedef typename Value<TContigFileStore>::Type		TContigFile;
+
+	MultiSeqFile multiSeqFile;
+	if (!open(multiSeqFile.concat, toCString(fileName), OPEN_RDONLY))
+		return false;
+
+	// guess file format and split into sequence fractions
+	AutoSeqFormat format;
+	guessFormat(multiSeqFile.concat, format);
+	split(multiSeqFile, format);
+
+	// reserve space in fragment store
+	unsigned seqOfs = length(store.readStore);
+	unsigned seqCount = length(multiSeqFile);
+	reserve(store.readStore, seqOfs + seqCount);
+	reserve(store.readSeqStore, seqOfs + seqCount);
+	reserve(store.readNameStore, seqOfs + seqCount);
+
+	// read sequences
+	String<Dna5Q> seq;
+	CharString qual;
+	CharString id;
+
+	for (unsigned i = 0; i < seqCount; ++i)
+	{
+		assignSeq(seq, multiSeqFile[i], format);    // read sequence
+		assignQual(qual, multiSeqFile[i], format);  // read ascii quality values
+		assignSeqId(id, multiSeqFile[i], format);   // read sequence id
+
+		// convert ascii to values from 0..62
+		// store dna and quality together in Dna5Q
+		// TODO: support different ASCII represenations of quality values
+		assignQualities(seq, qual);
+		appendRead(store, seq, id);
+	}
+	return true;
+}
+
+
+template <typename TFSSpec, typename TFSConfig, typename TFileName>
+bool loadReads(FragmentStore<TFSSpec, TFSConfig> & store, TFileName & fileNameL, TFileName & fileNameR)
+{
+	typedef FragmentStore<TFSSpec, TFSConfig>			TFragmentStore;
+	typedef typename TFragmentStore::TContigFileStore	TContigFileStore;
+	typedef typename Value<TContigFileStore>::Type		TContigFile;
+
+	MultiSeqFile multiSeqFileL, multiSeqFileR;
+	if (!open(multiSeqFileL.concat, toCString(fileNameL), OPEN_RDONLY))
+		return false;
+	if (!open(multiSeqFileR.concat, toCString(fileNameR), OPEN_RDONLY))
+		return false;
+
+	// Guess file format and split into sequence fractions
+	AutoSeqFormat formatL, formatR;
+	guessFormat(multiSeqFileL.concat, formatL);
+	split(multiSeqFileL, formatL);
+	guessFormat(multiSeqFileR.concat, formatR);
+	split(multiSeqFileR, formatR);
+
+    // Check that both files have the same number of reads
+	SEQAN_ASSERT_EQ(length(multiSeqFileL), length(multiSeqFileR));
+
+	// Reserve space in fragment store
+	unsigned seqOfs = length(store.readStore);
+	unsigned seqCountL = length(multiSeqFileL);
+	unsigned seqCountR = length(multiSeqFileR);
+	reserve(store.readStore, seqOfs + seqCountL + seqCountR);
+	reserve(store.readSeqStore, seqOfs + seqCountL + seqCountR);
+	reserve(store.readNameStore, seqOfs + seqCountL + seqCountR);
+
+	// Read in sequences
+	String<Dna5Q> seq[2];
+	CharString qual[2];
+	CharString id[2];
+
+	for (unsigned i = 0; i < seqCountL; ++i) {
+		assignSeq(seq[0], multiSeqFileL[i], formatL);    // read sequence
+		assignQual(qual[0], multiSeqFileL[i], formatL);  // read ascii quality values
+		assignSeqId(id[0], multiSeqFileL[i], formatL);   // read sequence id
+		assignSeq(seq[1], multiSeqFileR[i], formatR);    // read sequence
+		assignQual(qual[1], multiSeqFileR[i], formatR);  // read ascii quality values
+		assignSeqId(id[1], multiSeqFileR[i], formatR);   // read sequence id
+
+		// convert ascii to values from 0..62
+		// store dna and quality together in Dna5Q
+		// TODO: support different ASCII represenations of quality values
+		for (int j = 0; j < 2; ++j)
+			assignQualities(seq[j], qual[j]);
+		
+		appendMatePair(store, seq[0], seq[1], id[0], id[1]);
+	}
+	return true;
+}
+
+}  // namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_io_bam.h b/src/SeqAn-1.3/seqan/store/store_io_bam.h
new file mode 100644
index 0000000..c624f64
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_io_bam.h
@@ -0,0 +1,572 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// I/O code for BAM files, based on samtools.  This mirrors the functions
+// in store_io_sam.h.
+//
+// TODO(holtgrew): Only allowing to read from samfile_t should be circumvented somehow. It is possible to get a FILE* from a posix file via fdopen, maybe the same is also true for streams from the <iostream> library?
+// TODO(holtgrew): Writing BAM.
+// ==========================================================================
+
+#ifndef SEQAN_STORE_IO_BAM_
+#define SEQAN_STORE_IO_BAM_
+
+#include <sstream>
+
+#include <seqan/store.h>
+
+namespace seqan {
+
+// ============================================================================
+// Enums, Tags, Classes
+// ============================================================================
+
+struct Bam_;
+typedef Tag<Bam_> Bam;
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// Read a file in BAM format.
+//
+// TODO(holtgrew): How to support more file types, need to rewrite BAM reading in C++?
+template <typename TSpec, typename TConfig>
+inline void 
+read(samfile_t * file,
+     FragmentStore<TSpec, TConfig> & fragStore,
+     Bam const &)
+{
+    typedef Value<FILE>::Type TValue;
+    typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+    typedef typename TFragmentStore::TContigPos TContigPos;
+    typedef typename Id<TFragmentStore>::Type TId;
+        
+    // data structure to temporarily store the gaps that need to be inserted in the contig sequences
+    typedef MatchMateInfo_<TContigPos, TId> TMatchMateInfo;
+    typedef String<TMatchMateInfo> TMatchMateInfos;
+    typedef StringSet<String<typename TFragmentStore::TContigGapAnchor> > TContigAnchorGaps;
+
+    // data structure to temporarily store information about match mates
+    TMatchMateInfos matchMateInfos;
+    TContigAnchorGaps contigAnchorGaps;
+
+    // Header is already loaded in samopen().
+    
+    // Read in alignments section.
+    _readAlignments(file, fragStore, contigAnchorGaps, matchMateInfos, Bam());
+    
+    // Set the match mate IDs using the information stored in matchMateInfos.
+    _generatePairMatchIds(fragStore, matchMateInfos);
+    
+    convertPairWiseToGlobalAlignment(fragStore, contigAnchorGaps);
+}
+
+// Read all alignments from a BAM file.
+template <typename TSpec, typename TConfig, typename TContigAnchorGaps, typename TMatchMateInfos>
+inline void 
+_readAlignments(
+        samfile_t * file,
+        FragmentStore<TSpec, TConfig> & fragStore,
+        TContigAnchorGaps & contigAnchorGaps,   
+        TMatchMateInfos & matchMateInfos,
+        Bam const &)
+{
+    // create dummy entries in Sam specific aligned read quality store and aligned read tag store
+    // is needed so the ID in the aligned store can be use to access the other stores
+    // even if there exists previous entries without
+    typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+    typedef typename TFragmentStore::TAlignQualityStore TAlignQualityStore;
+    typedef typename TFragmentStore::TNameStore TNameStore;
+    typedef typename Value<TAlignQualityStore>::Type TAlignQuality;
+        
+    TAlignQuality q;
+    q.score = maxValue(q.score);
+    int diff = length(fragStore.alignedReadStore) - length(fragStore.alignQualityStore);
+    for(int i = 0; i < diff; ++i)
+        appendValue(fragStore.alignQualityStore, q, Generous());
+        
+    diff = length(fragStore.alignedReadStore) - length(fragStore.alignedReadTagStore);
+    for(int i = 0; i < diff; ++i)
+        appendValue(fragStore.alignedReadTagStore, "", Generous());
+        
+    // read in alignments
+    Nothing contextBam;
+    refresh(fragStore.contigNameStoreCache);
+    refresh(fragStore.readNameStoreCache);
+
+    bam1_t * record = bam_init1();
+    while (samread(file, record) > 0) {
+        // TODO(holtgrew): Allow enabling/disabling of validation.
+        bam_validate1(file->header, record);
+
+        _readOneAlignment(file, record, fragStore, contigAnchorGaps, matchMateInfos, Bam(), contextBam);
+    }
+    bam_destroy1(record);
+}
+
+// Read one alignment from a BAM file.
+template <typename TSpec, typename TConfig, typename TContigAnchorGaps, typename TMatchMateInfos, typename TContextBAM>
+inline void 
+_readOneAlignment (
+        samfile_t * file,
+        bam1_t * record,
+		FragmentStore<TSpec, TConfig> & fragStore,
+		TContigAnchorGaps & contigAnchorGaps,
+		TMatchMateInfos & matchMateInfos,
+		Bam const &,
+		TContextBAM & contextBam)
+{
+    // Basic types
+    typedef FragmentStore<TSpec, TConfig>										TFragmentStore;
+    typedef typename Id<TFragmentStore>::Type									TId;
+    typedef typename Size<TFragmentStore>::Type									TSize;
+        
+    // All fragment store element types
+    typedef typename Value<typename TFragmentStore::TContigStore>::Type			TContigElement;
+    typedef typename Value<typename TFragmentStore::TLibraryStore>::Type		TLibraryStoreElement;
+    typedef typename Value<typename TFragmentStore::TMatePairStore>::Type		TMatePairElement;
+    typedef typename Value<typename TFragmentStore::TReadStore>::Type			TReadStoreElement;
+    typedef typename Value<typename TFragmentStore::TAlignedReadStore>::Type	TAlignedElement;
+    typedef typename Value<typename TFragmentStore::TAlignQualityStore>::Type	TAlignQualityElement;
+    typedef typename TAlignedElement::TGapAnchors								TReadGapAnchors;
+		
+    // Type for sequence in readstore
+    typedef typename TFragmentStore::TReadSeq TReadSeq2;
+        
+    // Type for gap anchor
+    typedef typename TFragmentStore::TContigPos									TContigPos;
+    typedef Gaps<TReadSeq2, AnchorGaps<TReadGapAnchors> >						TReadGaps;
+    typedef Gaps<Nothing, AnchorGaps<typename Value<TContigAnchorGaps>::Type> >	TContigGapsPW;
+        
+    // Type to temporarily store information about match mates
+    typedef typename Value<TMatchMateInfos>::Type								TMatchMateInfo;
+
+    // Get query name.
+    String<char> qname = bam1_qname(record);
+
+    // Get flag.
+    int flag = record->core.flag;
+    bool reverse = (flag & (1 << 4)) == (1 << 4);
+
+    // Get reference name.
+    // TODO(holtgrew): Correct behaviour? Or should rname be empty in this case?
+    String<char> rname = "*";
+    if (record->core.tid >= 0)
+        rname = file->header->target_name[record->core.tid];
+
+    // Get begin position.
+    TContigPos beginPos = record->core.pos;
+
+    // Get map quality.
+    TAlignQualityElement mapQ;
+    mapQ.score = record->core.qual;
+
+    // Get CIGAR.
+    String<CigarElement<> > cigar;
+    resize(cigar, record->core.n_cigar);
+    for (unsigned i = 0; i < record->core.n_cigar; ++i) {
+        cigar[i] = CigarElement<>(bam1_cigar(record)[i], FromBam());
+    }
+        
+    // Calculate the end position.
+    TContigPos endPos;
+    _getClippedLength(cigar, endPos);
+    endPos = beginPos + endPos;
+    // If the read is on the antisense strand switch begin and end position.
+    if (reverse)
+    {
+        TContigPos temp = beginPos;
+        beginPos = endPos;
+        endPos = temp;
+    }
+
+    // Generate gap anchor string for the read.
+    TReadGapAnchors readGapAnchors;
+        
+    // Get read mate reference name.
+    String<char> mrnm = "*";
+    if (record->core.mtid >= 0)
+        mrnm = file->header->target_name[record->core.mtid];
+
+    // Get read mate position.
+    TContigPos mPos = record->core.mpos;
+
+    // Template length is ignored for now.
+
+    // Get sequence and associated qualities.
+    TReadSeq2 readSeq;
+    static const char table[16] = {'=', 'A', 'C', 'N', 'G', 'N', 'N', 'N',
+                                   'T', 'N', 'N', 'N', 'N', 'N', 'N', 'N'};
+    for (int i = 0; i < record->core.l_qseq; ++i) {
+        appendValue(readSeq, Dna5(table[bam1_seqi(bam1_seq(record), i)]));
+        assignQualityValue(back(readSeq), bam1_qual(record)[i]);
+    }
+    SEQAN_ASSERT_GT(length(readSeq), 0u);
+    if (reverse)
+        reverseComplement(readSeq);
+
+    // Insert alignment gaps.
+    TReadGaps readGaps(readSeq, readGapAnchors);
+    cigarToGapAnchorRead(cigar, readGaps);
+        
+    // Convert binary tags into SAM tag string.
+    String<char> tags;
+    {
+        uint8_t * s = bam1_aux(record);
+        while (s < record->data + record->data_len) {
+            appendValue(tags, *s++);
+            appendValue(tags, *s++);
+            appendValue(tags, ':');
+            uint8_t type = *s++;
+            appendValue(tags, type);
+            appendValue(tags, ':');
+
+            std::stringstream ss;
+            if (type == 'A') {
+                append(tags, "a:");
+                appendValue(tags, (char)*s);
+                s += 1;
+            } else if (type == 'C') {
+                append(tags, "i:");
+                ss << *(uint8_t*)s;
+                append(tags, ss.str());
+                s += 1;
+            } else if (type == 'c') {
+                append(tags, "i:");
+                ss << *(int8_t*)s;
+                append(tags, ss.str());
+                s += 1;
+            } else if (type == 'S') {
+                append(tags, "i:");
+                ss << *(uint16_t*)s;
+                append(tags, ss.str());
+                s += 2;
+            } else if (type == 's') {
+                append(tags, "i:");
+                ss << *(int16_t*)s;
+                append(tags, ss.str());
+                s += 2;
+            } else if (type == 'I') {
+                append(tags, "i:");
+                ss << *(uint32_t*)s;
+                append(tags, ss.str());
+                s += 4;
+            } else if (type == 'i') {
+                append(tags, "i:");
+                ss << *(int32_t*)s;
+                append(tags, ss.str());
+                s += 4;
+            } else if (type == 'f') {
+                append(tags, "f:");
+                ss << *(float*)s;
+                append(tags, ss.str());
+                s += 4;
+            } else if (type == 'd') {
+                append(tags, "d:");
+                ss << *(float*)s;
+                append(tags, ss.str());
+                s += 8;
+            } else if (type == 'Z' || type == 'H') {
+                appendValue(tags, type);
+                appendValue(tags, ':');
+                while (*s)
+                    appendValue(tags, *s++);
+                s += 1;
+            }
+
+            if (s < record->data + record->data_len)
+                appendValue(tags, ' ');
+        }
+    }
+
+    if (empty(qname) || empty(rname))
+        return;
+        
+    // check if read sequence is already in the store.
+    // if so get the ID, otherwise create new entries in the
+    // read, read name and mate pair store
+        
+    TId readId = 0;
+    _storeAppendRead(fragStore, readId, qname, readSeq, flag, contextBam);
+        
+    // check if the contig is already in the store
+    // get its ID or create a new one otherwise
+    TId contigId = 0;
+    _storeAppendContig(fragStore, contigId, rname);
+
+    if (empty(cigar)) return;
+		
+    // create a new entry in the aligned read store
+    TId pairMatchId = appendAlignment(fragStore, readId, contigId, beginPos, endPos, readGapAnchors);
+    resize(contigAnchorGaps, length(fragStore.alignedReadStore), Generous());
+    TContigGapsPW contigGaps(back(contigAnchorGaps));
+    cigarToGapAnchorContig(cigar, contigGaps);
+		
+    // create entries in Sam specific stores
+    appendValue(fragStore.alignQualityStore, mapQ, Generous());
+    appendValue(fragStore.alignedReadTagStore, tags, Generous());
+        
+    // store additional data about match mate temporarily
+    // used in the end of the read function to generate match mate IDs
+    TId mcontigId = contigId;
+    if (mrnm != "*")
+    {
+        if (mrnm != "=")
+            _storeAppendContig(fragStore, mcontigId, mrnm);
+
+        if (flag & 0x40)	// store mate info only for the first read in the pair
+        {
+            TMatchMateInfo matchMateInfo = {readId, mcontigId, pairMatchId, mPos};
+            appendValue(matchMateInfos, matchMateInfo);
+            back(fragStore.alignedReadStore).pairMatchId = pairMatchId;
+        }
+    }
+}
+
+// Write a file in BAM format.
+//
+// TODO(holtgrew): Accept file, not file pointer.
+// TODO(holtgrew): How to support more file types, need to rewrite BAM reading in C++?
+template <typename TSpec, typename TConfig>
+inline void 
+write(char const * fileName,
+     FragmentStore<TSpec, TConfig> & fragStore,
+     Bam const &)
+{
+    // -----------------------------------------------------------------------
+    // Initialize Header.
+    // -----------------------------------------------------------------------
+    bam_header_t bamHeader;
+    bamHeader.n_targets = length(fragStore.contigStore);
+    bamHeader.target_name = new char*[bamHeader.n_targets];
+    bamHeader.target_len = new uint32_t[bamHeader.n_targets];
+    for (int i = 0; i < bamHeader.n_targets; ++i) {
+        bamHeader.target_name[i] = new char[length(fragStore.contigNameStore[i]) + 1];
+        strncpy(bamHeader.target_name[i], toCString(fragStore.contigNameStore[i]), length(fragStore.contigNameStore[i]) + 1);
+        bamHeader.target_len[i] = length(fragStore.contigStore[i].seq);
+    }
+    bamHeader.hash = 0;
+    bamHeader.dict = 0;
+    bamHeader.rg2lib = 0;
+    bamHeader.l_text = 0;
+    bamHeader.n_text = 0;
+    bamHeader.text = 0;
+
+    // -----------------------------------------------------------------------
+    // Perform I/O.
+    // -----------------------------------------------------------------------
+    std::cerr << "fileName == " << fileName << std::endl;
+    samfile_t * bamFp = samopen(fileName, "wbz", &bamHeader);
+    _writeAlignments(bamFp, fragStore, Bam());
+    samclose(bamFp);
+
+    // -----------------------------------------------------------------------
+    // Cleanup Header.
+    // -----------------------------------------------------------------------
+    for (int i = 0; i < bamHeader.n_targets; ++i)
+        delete [] bamHeader.target_name[i];
+    delete [] bamHeader.target_name;
+    delete [] bamHeader.target_len;
+}
+
+template <typename TSpec, typename TConfig>
+inline void _writeAlignments(samfile_t * /*samfile*/,
+                             FragmentStore<TSpec, TConfig> & store,
+                             Bam const &)
+{
+    typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+
+    typedef typename TFragmentStore::TReadStore						TReadStore;
+    typedef typename TFragmentStore::TReadSeqStore					TReadSeqStore;
+    typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+    typedef typename TFragmentStore::TContigStore					TContigStore;
+    typedef typename TFragmentStore::TReadSeq						TReadSeq;
+
+    typedef typename Value<TReadStore>::Type						TRead;
+    typedef typename Value<TReadSeqStore>::Type						TReadSeqStored;
+    typedef typename Value<TContigStore>::Type						TContig;
+    typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+
+    typedef typename TContig::TContigSeq							TContigSeq;
+    typedef typename Iterator<TAlignedReadStore, Standard>::Type	TAlignIter;
+    typedef typename Iterator<TReadSeqStored, Standard>::Type		TReadSeqIter;
+    typedef typename Id<TAlignedRead>::Type							TId;
+
+    typedef Gaps<TReadSeq, AnchorGaps<typename TAlignedRead::TGapAnchors> >	TReadGaps;
+    typedef Gaps<Nothing, AnchorGaps<typename TContig::TGapAnchors> >	TContigGaps;
+
+    String<int> mateIndex;	// store outer library size for each pair match (indexed by pairMatchId)
+    calculateMateIndices(mateIndex, store);
+		
+    TAlignIter it = begin(store.alignedReadStore, Standard());
+    TAlignIter itEnd = end(store.alignedReadStore, Standard());
+    TAlignIter mit = it;
+    String<CigarElement<> > cigar;
+    TReadSeq readSeq;
+
+    // The plan is to build BAM records and write them out to the file using libbam.
+    bam1_t bamRecord;
+    bamRecord.l_aux = 0;  // No auxiliary data / tags for now.
+    
+    for(; it != itEnd; ++it)
+    {
+        TId alignedId = (*it).id;
+        TId readId = (*it).readId;
+        TId mateIdx = TRead::INVALID_ID;
+
+        if ((*it).pairMatchId != TRead::INVALID_ID)
+            mateIdx = mateIndex[2*(*it).pairMatchId + getMateNo(store, (*it).readId)];
+
+        TContigGaps	contigGaps(/*store.contigStore[(*it).contigId].seq, */store.contigStore[(*it).contigId].gaps);
+        __int64 pos = positionGapToSeq(contigGaps, _min((*it).beginPos, (*it).endPos)) + 1;
+        __int64 mpos = 0;
+        int isize = 0;
+        unsigned short flag = 0;
+
+        if ((*it).beginPos > (*it).endPos)
+            flag |= 0x0010;			
+
+        // calculate flags, mpos, isize
+        if (mateIdx < length(store.alignedReadStore))
+        {
+            mit = begin(store.alignedReadStore, Standard()) + mateIdx;
+            if ((*it).contigId == (*mit).contigId)
+            {
+                mpos = positionGapToSeq(contigGaps, _min((*mit).beginPos, (*mit).endPos)) + 1;
+                if ((*it).beginPos < (*mit).beginPos)
+                    isize = positionGapToSeq(contigGaps, _max((*mit).beginPos, (*mit).endPos) - 1) + 2 - pos;
+                else
+                    isize = mpos - positionGapToSeq(contigGaps, _max((*it).beginPos, (*it).endPos) - 1) - 2;
+            }
+            flag |= 0x0002;
+            if ((*mit).beginPos > (*mit).endPos)
+                flag |= 0x0020;				
+        }
+        else
+            flag |= 0x0008;					// mate is unmapped (actually we should check if the mate has no match at all)
+			
+        signed char mateNo = getMateNo(store, readId);
+        if (mateNo == 0) flag |= 0x0040;	// this read is the first in the pair
+        if (mateNo == 1) flag |= 0x0080;	// this read is the second in the pair
+
+        if (readId < length(store.readStore))
+        {
+            TRead &read = store.readStore[readId];
+            if (read.matePairId != TRead::INVALID_ID)
+                flag |= 0x0001;
+        }
+
+        // Compute length of data field of the BAM record.  The contents will
+        // be filled below.
+        bamRecord.core.n_cigar = length(cigar);
+        bamRecord.core.l_qname = length(store.readNameStore[readId]) + 1;
+        bamRecord.core.l_qseq = length(store.readSeqStore[readId]);
+        bamRecord.data_len = bamRecord.core.l_qname + bamRecord.core.n_cigar + bamRecord.core.l_qseq + (bamRecord.core.l_qseq + 1) / 2 + bamRecord.l_aux;
+        bamRecord.m_data = bamRecord.data_len;
+        bamRecord.data = new uint8_t[bamRecord.data_len];
+
+        // <qname>
+        strncpy(bam1_qname(&bamRecord), toCString(store.readNameStore[readId]), bamRecord.core.l_qname);
+            
+        // <flag>
+        bamRecord.core.flag = flag;
+
+        // <rname>
+        bamRecord.core.tid = (*it).contigId < length(store.contigNameStore) ? (*it).contigId : -1;
+            
+        // <pos>
+        bamRecord.core.pos = pos - 1;
+            
+        // <mapq>
+        if (alignedId < length(store.alignQualityStore))
+            bamRecord.core.qual = store.alignQualityStore[alignedId].score;
+        else
+            bamRecord.core.qual = 255;
+            
+        // get read sequence
+        if (readId < length(store.readSeqStore)) {
+            readSeq = store.readSeqStore[readId];
+            if ((*it).beginPos <= (*it).endPos) {
+                setBeginPosition(contigGaps, (*it).beginPos);
+                setEndPosition(contigGaps, (*it).endPos);
+            } else {
+                setBeginPosition(contigGaps, (*it).endPos);
+                setEndPosition(contigGaps, (*it).beginPos);
+                reverseComplement(readSeq);
+            }
+        } else {
+            clear(readSeq);
+        }
+			
+        // <cigar>
+        TReadGaps readGaps(readSeq, (*it).gaps);
+        getCigarString(cigar, contigGaps, readGaps);
+        for (unsigned i = 0; i < length(cigar); ++i)
+            bam1_cigar(&bamRecord)[i] = toBamCigarElement(cigar[i]);
+            
+        // <mrnm>
+        if ((mateIdx < length(store.alignedReadStore)))
+            bamRecord.core.mtid = ((*mit).contigId < length(store.contigNameStore)) ? (*mit).contigId : -1;
+        else
+            bamRecord.core.mtid = -1;
+            
+        // <mpos>
+        bamRecord.core.mpos = mpos;
+            
+        // <isize>
+        bamRecord.core.isize = isize;
+
+        // <seq>
+        // TODO(holtgrew): Compressed sequence.
+            
+        // <qual>
+        TReadSeqIter readIt = begin(store.readSeqStore[readId], Standard());
+        TReadSeqIter readItEnd = end(store.readSeqStore[readId], Standard());
+        for (int i = 0; readIt != readItEnd; ++readIt, ++i)
+            bam1_qual(&bamRecord)[i] = (char)(getQualityValue(*readIt) + 33);
+            
+        // <tags>
+        // TODO(holtgrew): No tags yet.
+
+        delete [] bamRecord.data;  // TODO(holtgrew): Do not reallocate in each iteration.
+    }   
+}
+
+}  // namespace seqan
+
+#endif  // SEQAN_STORE_IO_BAM_
diff --git a/src/SeqAn-1.3/seqan/store/store_io_gff.h b/src/SeqAn-1.3/seqan/store/store_io_gff.h
new file mode 100755
index 0000000..3c20e90
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_io_gff.h
@@ -0,0 +1,735 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_IO_GFF_H
+#define SEQAN_HEADER_STORE_IO_GFF_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+/**
+.Tag.File Format.tag.Gff:
+	Gff annotation file.
+..include:seqan/store.h
+*/
+struct TagGff_;
+typedef Tag<TagGff_> const Gff;
+
+/**
+.Tag.File Format.tag.Gtf:
+	Gtf annotation file.
+..include:seqan/store.h
+*/
+struct TagGtf_;
+typedef Tag<TagGtf_> const Gtf;
+
+//////////////////////////////////////////////////////////////////////////////
+// _parseReadGffIdentifier
+    
+    template<typename TFile, typename TString, typename TChar>
+    inline void
+    _parseReadGffIdentifier(TFile & file, TString & str, TChar& c)
+    {
+        if (c == ' ' || c == '\t' || c == '\n') return;
+        appendValue(str, c);
+        while (!_streamEOF(file)) 
+		{
+            c = _streamGet(file);
+            if (c == ' ' || c == '\t' || c == '\n') return;
+            appendValue(str, c);
+        }
+    }
+	
+//////////////////////////////////////////////////////////////////////////////
+// skip entry until whitespace
+//////////////////////////////////////////////////////////////////////////////
+
+	template<typename TFile, typename TChar>
+	inline bool
+	_parseSkipEntryUntilWhitespace(TFile& file, TChar& c)
+	{
+		if (c== ' ' || c== '\t' || c == '\n' || (c == '\r' && _streamPeek(file) != '\n')) return false;
+		
+		while (!_streamEOF(file)) {
+			c = _streamGet(file);
+			if (c== ' ' || c== '\t' || c == '\n' || (c == '\r' && _streamPeek(file) != '\n')) break;
+		}
+		return true; 
+	}
+
+    template<typename TFile, typename TKeyString, typename TValueString, typename TChar>
+    inline bool
+    _parseReadGffKeyValue(TFile & file, TKeyString & key, TValueString & value, TChar& c)
+    {
+		if (c == ' ' || c == '\t' || c == '\n' || c == '=') return false;
+        appendValue(key, c);
+        while (!_streamEOF(file)) 
+		{
+            c = _streamGet(file);
+            if (c == ' ' || c == '\t' || c == '\n' || c == '=') break;
+            appendValue(key, c);
+        }
+		_parseSkipSpace(file, c);
+		if (c == '=')
+		{
+			c = _streamGet(file);
+			_parseSkipSpace(file, c);
+		}
+		
+		if (c == '"')
+		{
+			c = _streamGet(file);
+			appendValue(value, c);
+			while (!_streamEOF(file)) 
+			{
+				c = _streamGet(file);
+				if (c == '\n') return true;
+				if (c == '"')
+				{
+					if (!_streamEOF(file)) c = _streamGet(file);
+					break;
+				}
+				appendValue(value, c);
+			}
+			if (c == ';')
+			{
+				if (!_streamEOF(file)) c = _streamGet(file);
+			}
+		}
+		else
+		{
+			do {
+				if (c == ' ' || c == '\t' || c == '\n') return true;
+				if (c == ';')
+				{
+					if (!_streamEOF(file)) c = _streamGet(file);
+					return true;
+				}
+				appendValue(value, c);
+				if (_streamEOF(file)) break;
+				c = _streamGet(file);
+			} while (true);
+		}
+		return true;
+	}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Read Gff
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec = void>
+struct IOContextGff_
+{
+	typedef typename TFragmentStore::TAnnotationStore   TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type      TAnnotation;
+	typedef typename TAnnotation::TId                   TId;
+
+	CharString contigName;
+	CharString typeName;
+	CharString annotationName;
+	CharString parentKey;
+	CharString parentName;
+	
+	CharString _key;
+	CharString _value;
+	StringSet<CharString> keys;
+	StringSet<CharString> values;
+	
+	CharString gtfGeneKey;
+	CharString gtfGene;
+
+	TId annotationId;
+	TAnnotation annotation;
+};
+
+template <typename TFragmentStore, typename TSpec>
+inline void clear(IOContextGff_<TFragmentStore, TSpec> &ctx)
+{
+	typedef typename TFragmentStore::TAnnotationStore   TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type      TAnnotation;
+
+	clear(ctx.contigName);
+	clear(ctx.typeName);
+	clear(ctx.annotationName);
+	clear(ctx.parentKey);
+	clear(ctx.parentName);
+	clear(ctx._key);
+	clear(ctx._value);
+	clear(ctx.gtfGeneKey);
+	clear(ctx.gtfGene);
+	clear(ctx.keys);
+	clear(ctx.values);
+	ctx.annotationId = TAnnotation::INVALID_ID;
+	clear(ctx.annotation.values);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// _readOneAnnotation
+//
+// reads in one annotation line from a Gff file
+
+template <typename TFile, typename TChar, typename TFragmentStore, typename TSpec>
+inline bool 
+_readOneAnnotation (
+	TFile & file,
+	TChar & c,
+	IOContextGff_<TFragmentStore, TSpec> & ctx)
+{
+	typedef typename TFragmentStore::TContigPos         TContigPos;	
+	typedef typename TFragmentStore::TAnnotationStore   TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type      TAnnotation;
+	typedef typename TAnnotation::TId                   TId;
+		
+	clear(ctx);
+
+	// read fields of annotation line        
+	_parseSkipWhitespace(file, c);
+	
+	// read column 1: contig name
+	// The letters until the first whitespace will be read.
+	// Then, we skip until we hit the first tab character.
+	_parseReadGffIdentifier(file, ctx.contigName, c);
+	if (!empty(ctx.contigName) && ctx.contigName[0] == '#')
+	{
+		_parseSkipLine(file, c);
+		return false;
+	}
+	_parseSkipUntilChar(file, '\t', c);
+	c = _streamGet(file);
+	
+	// skip column 2
+	_parseSkipEntryUntilWhitespace(file, c);
+	_parseSkipWhitespace(file, c);
+	
+	// read column 3: type
+	_parseReadGffIdentifier(file, ctx.typeName, c);
+	_parseSkipWhitespace(file, c);
+	
+	// read column 4: begin position
+	if (_parseIsDigit(c))
+		ctx.annotation.beginPos = _parseReadNumber(file, c) - 1;
+	else
+	{
+		ctx.annotation.beginPos = TAnnotation::INVALID_POS;
+		_parseSkipEntryUntilWhitespace(file, c);
+	}
+	_parseSkipWhitespace(file, c);
+
+	// read column 5: end position
+	if (_parseIsDigit(c))
+		ctx.annotation.endPos = _parseReadNumber(file, c);
+	else 
+	{
+		ctx.annotation.endPos = TAnnotation::INVALID_POS;
+		_parseSkipEntryUntilWhitespace(file, c);
+	}
+	_parseSkipWhitespace(file, c);	
+
+	// skip column 6
+	_parseSkipEntryUntilWhitespace(file, c);
+	_parseSkipWhitespace(file, c);
+
+	// read column 7: orientation
+	if (c == '-')
+	{
+		TContigPos tmp = ctx.annotation.beginPos;
+		ctx.annotation.beginPos = ctx.annotation.endPos;
+		ctx.annotation.endPos = tmp;
+	}
+	c = _streamGet(file);
+	_parseSkipWhitespace(file, c);
+
+	// skip column 8
+	_parseSkipEntryUntilWhitespace(file, c);
+	_parseSkipSpace(file, c);
+	
+	// read column 9: name
+	while (!_streamEOF(file) &&	_parseReadGffKeyValue(file, ctx._key, ctx._value, c))
+	{
+		if (ctx._key == "ID") 
+			ctx.annotationName = ctx._value;
+		else
+			if (!empty(ctx._key) && !empty(ctx._value))
+			{
+				appendValue(ctx.keys, ctx._key);
+				appendValue(ctx.values, ctx._value);
+			}
+				
+		if (ctx._key == "Parent" || ctx._key == "ParentID" || ctx._key == "transcript_id") 
+		{
+			ctx.parentKey = ctx._key;
+			ctx.parentName = ctx._value;
+		}
+		else if (ctx._key == "transcript_name")
+		{
+			if (empty(ctx.parentName)) 
+			{
+				ctx.parentKey = ctx._key;
+				ctx.parentName = ctx._value;
+			}
+		} 
+		else if (ctx._key == "gene_id")
+		{
+			ctx.gtfGeneKey = ctx._key;
+			ctx.gtfGene = ctx._value;
+		}
+		else if (ctx._key == "gene_name")
+		{
+			if (empty(ctx.gtfGene))
+			{
+				ctx.gtfGeneKey = ctx._key;
+				ctx.gtfGene = ctx._value;
+			}
+		} 
+
+		clear(ctx._key);
+		clear(ctx._value);
+		_parseSkipSpace(file, c);
+	}
+	return true;
+}
+
+template <typename TAnnotation>
+inline void 
+_adjustParent (
+	TAnnotation &parent,
+	TAnnotation const &child)
+{
+	if (child.contigId == TAnnotation::INVALID_ID || child.beginPos == TAnnotation::INVALID_POS || child.endPos == TAnnotation::INVALID_POS)
+		return;
+
+	parent.contigId = child.contigId;	
+	if ((parent.beginPos == TAnnotation::INVALID_POS) != (parent.endPos == TAnnotation::INVALID_POS))
+		return;
+
+	typename TAnnotation::TPos childBegin, childEnd;
+	if (child.beginPos < child.endPos)
+	{
+		childBegin = child.beginPos;
+		childEnd = child.endPos;
+	} else {
+		childBegin = child.endPos;
+		childEnd = child.beginPos;
+	}
+
+	if (parent.beginPos < parent.endPos)
+	{
+		if (parent.beginPos == TAnnotation::INVALID_POS || parent.beginPos > childBegin)
+			parent.beginPos = childBegin;
+		if (parent.endPos == TAnnotation::INVALID_POS || parent.endPos < childEnd)
+			parent.endPos = childEnd;
+	} else
+	{
+		if (parent.endPos == TAnnotation::INVALID_POS || parent.endPos > childBegin)
+			parent.endPos = childBegin;
+		if (parent.beginPos == TAnnotation::INVALID_POS || parent.beginPos < childEnd)
+			parent.beginPos = childEnd;
+	}
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline void 
+_storeOneAnnotation (
+	TFragmentStore & fragStore,
+	IOContextGff_<TFragmentStore, TSpec> & ctx)
+{
+	typedef typename TFragmentStore::TAnnotationStore   TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type      TAnnotation;
+	typedef typename TAnnotation::TId                   TId;
+	
+	TId maxId = 0;
+
+	// for lines in Gtf format get/add the parent gene first
+	TId geneId = TAnnotation::INVALID_ID;
+	if (!empty(ctx.gtfGene))
+	{
+		_storeAppendAnnotationName(fragStore, geneId, ctx.gtfGene);
+		if (maxId < geneId)
+			maxId = geneId;
+	}	
+
+	// if we have a parent transcript, get/add the parent transcript then
+	if (!empty(ctx.parentName))
+	{
+		_storeAppendAnnotationName(fragStore, ctx.annotation.parentId, ctx.parentName);
+		if (maxId < ctx.annotation.parentId)
+			maxId = ctx.annotation.parentId;
+	}
+	else
+		ctx.annotation.parentId = 0;	// if we have no parent, we are a child of the root
+
+	// add contig and type name
+	_storeAppendContig(fragStore, ctx.annotation.contigId, ctx.contigName);	
+	_storeAppendType(fragStore, ctx.annotation.typeId, ctx.typeName);
+
+	// add annotation name of the current line
+	_storeAppendAnnotationName(fragStore, ctx.annotationId, ctx.annotationName);
+	if (maxId < ctx.annotationId)
+		maxId = ctx.annotationId;
+	
+	for (unsigned i = 0; i < length(ctx.keys); ++i)
+		if (ctx.keys[i] != ctx.gtfGeneKey && ctx.keys[i] != ctx.parentKey)
+			annotationAssignValueByKey(fragStore, ctx.annotation, ctx.keys[i], ctx.values[i]);
+
+	if (length(fragStore.annotationStore) <= maxId)
+		resize(fragStore.annotationStore, maxId + 1, Generous());
+	fragStore.annotationStore[ctx.annotationId] = ctx.annotation;
+	
+	if (geneId != TAnnotation::INVALID_ID)
+	{
+		// link and adjust our gtf ancestors
+		TAnnotation &gene = fragStore.annotationStore[geneId];
+		TAnnotation &transcript = fragStore.annotationStore[ctx.annotation.parentId];
+
+		gene.parentId = 0;
+		gene.typeId = TFragmentStore::ANNO_GENE;
+		_adjustParent(gene, ctx.annotation);
+
+		transcript.parentId = geneId;
+		transcript.typeId = TFragmentStore::ANNO_MRNA;
+		_adjustParent(transcript, ctx.annotation);
+	}
+}
+
+template<typename TFile, typename TSpec, typename TConfig>
+inline void 
+read (
+	TFile & file,
+	FragmentStore<TSpec, TConfig> & fragStore,
+	Gff)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	
+	if (_streamEOF(file)) return;
+
+	// get first character from the stream
+	char c = _streamGet(file);
+	IOContextGff_<TFragmentStore> ctx;
+	
+	refresh(fragStore.contigNameStoreCache);
+	refresh(fragStore.annotationNameStoreCache);
+	refresh(fragStore.annotationTypeStoreCache);
+	
+	while (!_streamEOF(file))
+	{
+		if (_readOneAnnotation(file, c, ctx))
+			_storeOneAnnotation(fragStore, ctx);
+	}
+	_storeClearAnnoBackLinks(fragStore.annotationStore);
+	_storeCreateAnnoBackLinks(fragStore.annotationStore);
+	_storeRemoveTempAnnoNames(fragStore);
+}
+
+template<typename TFile, typename TSpec, typename TConfig>
+inline void 
+read (
+	TFile & file,
+	FragmentStore<TSpec, TConfig> & fragStore,
+	Gtf)
+{
+	read (file, fragStore, Gff());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Write Gff
+//////////////////////////////////////////////////////////////////////////////
+
+template<typename TTargetStream, typename TSpec, typename TConfig, typename TAnnotation, typename TId>
+inline void 
+_writeOneAnnotation (
+	TTargetStream & target,
+	FragmentStore<TSpec, TConfig> & store,
+	TAnnotation &annotation,
+	TId id,
+	Gff)
+{
+	typedef FragmentStore<TSpec, TConfig>       TFragmentStore;
+	typedef typename TFragmentStore::TContigPos TContigPos;
+	
+	if (id == 0) return;
+	
+	// write column 1: contig name
+	if (annotation.contigId < length(store.contigNameStore))
+		_streamWrite(target, store.contigNameStore[annotation.contigId]);
+	_streamPut(target, '\t');
+	
+	// skip column 2: source
+	_streamWrite(target, ".\t");
+	
+	// write column 3: type
+	if (annotation.typeId < length(store.annotationTypeStore))
+		_streamWrite(target, store.annotationTypeStore[annotation.typeId]);
+	_streamPut(target, '\t');
+	
+	TContigPos beginPos = annotation.beginPos;
+	TContigPos endPos = annotation.endPos;
+	char orienation = '+';
+	if (endPos < beginPos)
+	{
+		TContigPos tmp = beginPos;
+		beginPos = endPos;
+		endPos = tmp;
+		orienation = '-';
+	}
+	
+	// write column 4: begin position
+	if (beginPos != TAnnotation::INVALID_POS)
+		_streamPutInt(target, beginPos + 1);
+	else
+		_streamPut(target, '.');
+	_streamPut(target, '\t');
+
+	// write column 5: end position
+	if (endPos != TAnnotation::INVALID_POS)
+		_streamPutInt(target, endPos);
+	else
+		_streamPut(target, '.');
+	_streamPut(target, '\t');
+
+	// skip column 6: score
+	_streamWrite(target, "0\t");
+
+	// write column 7: orientation
+	_streamPut(target, orienation);
+	_streamPut(target, '\t');
+
+	// skip column 8: frame
+	_streamWrite(target, ".\t");
+	
+	// write column 9: group
+	// write column 9.1: annotation id
+	bool semicolon = false;
+	if (id < length(store.annotationNameStore) && !empty(getAnnoName(store, id)))
+	{
+		_streamWrite(target, "ID=");
+		_streamWrite(target, getAnnoName(store, id));
+		semicolon = true;
+	} 
+	else if (annotation.lastChildId != TAnnotation::INVALID_ID)
+	{
+		_streamWrite(target, "ID=");
+		_streamWrite(target, getAnnoUniqueName(store, id));
+		semicolon = true;
+	}
+	
+	// write column 9.2: parent id
+	if (store.annotationStore[annotation.parentId].typeId > 1)	// ignore root/deleted nodes
+	{
+		if (semicolon) _streamPut(target, ';');
+		_streamWrite(target, "Parent=");
+		if (annotation.parentId < length(store.annotationNameStore) && !empty(getAnnoName(store, annotation.parentId)))
+			_streamWrite(target, getAnnoName(store, annotation.parentId));
+		else
+			_streamWrite(target, getAnnoUniqueName(store, annotation.parentId));
+		semicolon = true;
+	}
+	
+	// write column 9.3-...: key, value pairs
+	for (unsigned keyId = 0; keyId < length(annotation.values); ++keyId)
+		if (!empty(annotation.values[keyId]))
+		{
+			if (semicolon) _streamPut(target, ';');
+			_streamWrite(target, store.annotationKeyStore[keyId]);
+			_streamPut(target, '=');
+			_streamWrite(target, annotation.values[keyId]);
+			semicolon = true;
+		}
+	
+	_streamPut(target, '\n');	
+}
+
+template<typename TTargetStream, typename TSpec, typename TConfig, typename TAnnotation, typename TId>
+inline void 
+_writeOneAnnotation (
+	TTargetStream & target,
+	FragmentStore<TSpec, TConfig> & store,
+	TAnnotation &annotation,
+	TId id,
+	Gtf)
+{
+	typedef FragmentStore<TSpec, TConfig>				TFragmentStore;
+	typedef typename TFragmentStore::TContigPos			TContigPos;
+	
+	if (annotation.typeId <= TFragmentStore::ANNO_MRNA) return;
+	
+	// write column 1: contig name
+	if (annotation.contigId < length(store.contigNameStore))
+		_streamWrite(target, store.contigNameStore[annotation.contigId]);
+	_streamPut(target, '\t');
+	
+	// skip column 2: source
+	_streamWrite(target, ".\t");
+	
+	// write column 3: type
+	if (annotation.typeId < length(store.annotationTypeStore))
+		_streamWrite(target, store.annotationTypeStore[annotation.typeId]);
+	_streamPut(target, '\t');
+	
+	TContigPos beginPos = annotation.beginPos;
+	TContigPos endPos = annotation.endPos;
+	char orienation = '+';
+	if (endPos < beginPos)
+	{
+		TContigPos tmp = beginPos;
+		beginPos = endPos;
+		endPos = tmp;
+		orienation = '-';
+	}
+	
+	// write column 4: begin position
+	if (beginPos != TAnnotation::INVALID_POS)
+		_streamPutInt(target, beginPos + 1);
+	else
+		_streamPut(target, '.');
+	_streamPut(target, '\t');
+
+	// write column 5: end position
+	if (endPos != TAnnotation::INVALID_POS)
+		_streamPutInt(target, endPos);
+	else
+		_streamPut(target, '.');
+	_streamPut(target, '\t');
+
+	// skip column 6: score
+	_streamWrite(target, "0\t");
+
+	// write column 7: orientation
+	_streamPut(target, orienation);
+	_streamPut(target, '\t');
+
+	// skip column 8: frame
+	_streamWrite(target, ".\t");
+	
+	// write column 9: group
+	// write column 9.1: transcript_id
+	bool semicolon = false;
+	TId transcriptId = annotation.parentId;
+	
+	// step up until we reach a transcript
+	while (transcriptId < length(store.annotationStore) && store.annotationStore[transcriptId].typeId != TFragmentStore::ANNO_MRNA)
+		transcriptId = store.annotationStore[transcriptId].parentId;
+	
+	if (transcriptId < length(store.annotationStore))
+	{
+		_streamWrite(target, "transcript_id \"");
+		if (transcriptId < length(store.annotationNameStore) && !empty(getAnnoName(store, transcriptId)))
+			_streamWrite(target, getAnnoName(store, transcriptId));
+		else
+			_streamWrite(target, getAnnoUniqueName(store, transcriptId));
+		_streamPut(target, '"');
+
+		// write column 9.2: gene_id	
+		TId geneId = store.annotationStore[transcriptId].parentId;
+		if (geneId < length(store.annotationStore))
+		{
+			_streamWrite(target, "; gene_id \"");
+			if (geneId < length(store.annotationNameStore) && !empty(getAnnoName(store, geneId)))
+				_streamWrite(target, getAnnoName(store, geneId));
+			else
+				_streamWrite(target, getAnnoUniqueName(store, geneId));
+			_streamPut(target, '"');
+		}
+		semicolon = true;
+	}
+
+	if (id < length(store.annotationNameStore) && !empty(getAnnoName(store, id)))
+	{
+		if (semicolon) _streamWrite(target, "; ");
+		_streamWrite(target, "ID \"");
+		_streamWrite(target, getAnnoName(store, id));
+		_streamPut(target, '"');
+		semicolon = true;
+	} 
+		
+	// write column 9.3-...: key, value pairs
+	for (unsigned keyId = 0; keyId < length(annotation.values); ++keyId)
+		if (!empty(annotation.values[keyId]))
+		{
+			if (semicolon) _streamWrite(target, "; ");
+			_streamWrite(target, store.annotationKeyStore[keyId]);
+			_streamWrite(target, " \"");
+			_streamWrite(target, annotation.values[keyId]);
+			_streamPut(target, '"');
+			semicolon = true;
+		}
+
+	if (semicolon) _streamWrite(target, ';');	
+	_streamPut(target, '\n');	
+}
+
+template<typename TTargetStream, typename TSpec, typename TConfig, typename TFormat>
+inline void 
+_writeGffGtf (
+	TTargetStream & target,
+	FragmentStore<TSpec, TConfig> & store,
+	TFormat format)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+	typedef typename TFragmentStore::TAnnotationStore				TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type					TAnnotation;
+	typedef typename Iterator<TAnnotationStore, Standard>::Type		TAnnoIter;
+	typedef typename Id<TAnnotation>::Type							TId;
+
+	TAnnoIter it = begin(store.annotationStore, Standard());
+	TAnnoIter itEnd = end(store.annotationStore, Standard());
+	
+	for(TId id = 0; it != itEnd; ++it, ++id)
+		_writeOneAnnotation(target, store, *it, id, format);
+}
+
+template<typename TTargetStream, typename TSpec, typename TConfig>
+inline void 
+write (
+	TTargetStream & target,
+	FragmentStore<TSpec, TConfig> & store,
+	Gff format)
+{
+	_writeGffGtf(target, store, format);
+}
+
+template<typename TTargetStream, typename TSpec, typename TConfig>
+inline void 
+write (
+	TTargetStream & target,
+	FragmentStore<TSpec, TConfig> & store,
+	Gtf format)
+{
+	_writeGffGtf(target, store, format);
+}
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_io_sam.h b/src/SeqAn-1.3/seqan/store/store_io_sam.h
new file mode 100644
index 0000000..8ef2510
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_io_sam.h
@@ -0,0 +1,1133 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#include <iostream>
+
+#ifndef SEQAN_HEADER_STORE_IO_SAM_H
+#define SEQAN_HEADER_STORE_IO_SAM_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// File tags
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Tag.File Format.tag.Sam:
+	Sam mapping file.
+..include:seqan/store.h
+*/
+struct Sam_;
+typedef Tag<Sam_> const Sam;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CIGAR struct
+//////////////////////////////////////////////////////////////////////////////
+
+#if SEQAN_HAS_SAMTOOLS
+    struct FromBam_;
+    typedef Tag<FromBam_> FromBam;
+#endif  // #if SEQAN_HAS_SAMTOOLS
+    
+    template <typename TOperation_ = char, typename TCount_ = unsigned>
+	struct CigarElement
+	{
+		typedef TOperation_ TOperation;
+		typedef TCount_		TCount;
+
+		TOperation			operation;
+		TCount				count;
+
+		CigarElement() : operation(0), count(0) {}
+		
+		CigarElement(TOperation o, TCount c):
+			operation(o),
+			count(c) {}
+
+#if SEQAN_HAS_SAMTOOLS
+        CigarElement(__uint32 bamCigarElement, FromBam const &)
+        {
+            SEQAN_ASSERT_LEQ(bamCigarElement & BAM_CIGAR_MASK, 8u);
+            operation = "MIDNSHP=X"[bamCigarElement & BAM_CIGAR_MASK];
+            count = bamCigarElement >> 4;
+        }
+#endif  // #if SEQAN_HAS_SAMTOOLS
+	};
+
+template <typename TOperation, typename TCount>
+__uint32 toBamCigarElement(CigarElement<TOperation, TCount> const & cigarElement)
+{
+    char operation = 0;
+    switch (cigarElement.operation) {
+        case 'X': operation += 1;
+        case '=': operation += 1;
+        case 'P': operation += 1;
+        case 'H': operation += 1;
+        case 'S': operation += 1;
+        case 'N': operation += 1;
+        case 'D': operation += 1;
+        case 'I': operation += 1;
+        case 'M': break;
+    }
+    return (cigarElement.count << 4) | operation;
+}
+
+//____________________________________________________________________________
+
+template <
+	typename TCigar,
+	typename TGaps1,
+	typename TGaps2,
+	typename TThresh>
+inline void
+getCigarString(
+	TCigar &cigar,
+	TGaps1 &gaps1,
+	TGaps2 &gaps2,
+	TThresh splicedGapThresh)
+{
+	typename Iterator<TGaps1>::Type it1 = begin(gaps1);
+	typename Iterator<TGaps2>::Type it2 = begin(gaps2);
+	clear(cigar);
+	char op, lastOp = ' ';
+	unsigned numOps = 0;
+
+//	std::cout << gaps1 << std::endl;
+//	std::cout << gaps2 << std::endl;
+	for (; !atEnd(it1) && !atEnd(it2); goNext(it1), goNext(it2))
+	{
+		if (isGap(it1))
+		{
+			if (isGap(it2))
+				op = 'P';
+			else if (isClipped(it2))
+				op = '?';
+			else
+				op = 'I';
+		} 
+		else if (isClipped(it1))
+		{
+			op = '?';
+		}
+		else 
+		{
+			if (isGap(it2))
+				op = 'D';
+			else if (isClipped(it2))
+				op = 'S';
+			else
+				op = 'M';
+		}
+		if (lastOp != op)
+		{
+			if (lastOp == 'D' && numOps >= (unsigned)splicedGapThresh)
+				lastOp = 'N';
+			if (numOps > 0)
+			{
+				std::stringstream num;
+				num << numOps;
+				append(cigar, num.str());
+				appendValue(cigar, lastOp);
+			}
+			numOps = 0;
+			lastOp = op;
+		}
+		++numOps;
+	}
+	SEQAN_ASSERT_EQ(atEnd(it1), atEnd(it2));
+	if (lastOp == 'D' && numOps >= (unsigned)splicedGapThresh)
+		lastOp = 'N';
+	if (numOps > 0)
+	{
+		std::stringstream num;
+		num << numOps;
+		append(cigar, num.str());
+		appendValue(cigar, lastOp);
+	}
+}
+
+template <
+	typename TCigar,
+	typename TGaps1,
+	typename TGaps2>
+inline void
+getCigarString(
+	TCigar &cigar,
+	TGaps1 &gaps1,
+	TGaps2 &gaps2)
+{
+	return getCigarString(cigar, gaps1, gaps2, 20);
+}
+
+template <
+    typename TOperation,
+    typename TCount,
+	typename TSpec,
+	typename TGaps1,
+	typename TGaps2,
+	typename TThresh>
+inline void
+getCigarString(
+        String<CigarElement<TOperation, TCount>, TSpec> &cigar,
+        TGaps1 &gaps1,
+        TGaps2 &gaps2,
+        TThresh splicedGapThresh)
+{
+	typename Iterator<TGaps1>::Type it1 = begin(gaps1);
+	typename Iterator<TGaps2>::Type it2 = begin(gaps2);
+	clear(cigar);
+	char op, lastOp = ' ';
+	unsigned numOps = 0;
+
+//	std::cout << gaps1 << std::endl;
+//	std::cout << gaps2 << std::endl;
+	for (; !atEnd(it1) && !atEnd(it2); goNext(it1), goNext(it2))
+	{
+		if (isGap(it1))
+		{
+			if (isGap(it2))
+				op = 'P';
+			else if (isClipped(it2))
+				op = '?';
+			else
+				op = 'I';
+		} 
+		else if (isClipped(it1))
+		{
+			op = '?';
+		}
+		else 
+		{
+			if (isGap(it2))
+				op = 'D';
+			else if (isClipped(it2))
+				op = 'S';
+			else
+				op = 'M';
+		}
+		if (lastOp != op)
+		{
+			if (lastOp == 'D' && numOps >= (unsigned)splicedGapThresh)
+				lastOp = 'N';
+			if (numOps > 0)
+				appendValue(cigar, CigarElement<>(op, numOps));
+			numOps = 0;
+			lastOp = op;
+		}
+		++numOps;
+	}
+	SEQAN_ASSERT_EQ(atEnd(it1), atEnd(it2));
+	if (lastOp == 'D' && numOps >= (unsigned)splicedGapThresh)
+		lastOp = 'N';
+	if (numOps > 0)
+        appendValue(cigar, CigarElement<>(op, numOps));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// _getClippedLength
+    
+    template <typename TCigarString, typename TNum>
+    inline void _getClippedLength(TCigarString const & cigar, TNum & sum)
+    {
+        typedef typename Iterator<TCigarString, Standard>::Type TCigarIter;
+        
+        TCigarIter it = begin(cigar, Standard());
+        TCigarIter itEnd = end(cigar, Standard());
+        
+        sum = 0;        
+        for (; it != itEnd; ++it)
+            if (getValue(it).operation != 'S' && getValue(it).operation != 'H')
+                sum += getValue(it).count;
+    }
+
+//////////////////////////////////////////////////////////////////////////////
+// convert CIGAR to gaps
+
+    template<typename TCigarString, typename TGaps>
+    inline void cigarToGapAnchorRead(TCigarString const & cigar, TGaps & gaps)
+    {
+		typename Iterator<TGaps>::Type it = begin(gaps);
+		for (unsigned i = 0; i < length(cigar); ++i)
+		{
+			switch (cigar[i].operation)
+			{
+				case 'D':
+				case 'N':
+				case 'P':
+					insertGaps(it, cigar[i].count);
+				case 'I':
+				case 'M':
+        case 'S':
+					it += cigar[i].count;
+			}
+		}
+	}
+
+    template<typename TCigarString, typename TGaps>
+    inline void cigarToGapAnchorContig(TCigarString const & cigar, TGaps & gaps)
+    {
+		typename Iterator<TGaps>::Type it = begin(gaps);
+		for (unsigned i = 0; i < length(cigar); ++i)
+		{
+			switch (cigar[i].operation)
+			{
+				case 'I':
+				case 'P':
+					insertGaps(it, cigar[i].count);
+				case 'D':
+				case 'M':
+				case 'N':
+        case 'S':
+					it += cigar[i].count;
+			}
+		}
+	}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Parsing functions
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// _parseReadCigar
+    
+    template <typename TFile, typename TCigarString, typename TChar>
+    inline void
+    _parseReadCigar(TFile & file, TCigarString & cigar, TChar & c)
+    {
+		typedef typename Value<TCigarString>::Type	TCigarElement;
+		typedef typename TCigarElement::TOperation	TOperation;
+		typedef typename TCigarElement::TCount		TCount;
+
+		clear(cigar);
+		
+        // if the CIGAR is not set and '*'
+        if (c == '*')
+		{
+            c = _streamGet(file);
+            return;
+        }
+        
+        while (!_streamEOF(file)) 
+		{
+            TCount count = _parseReadNumber(file, c);
+			if (c >= 'a' && c <= 'z')
+				c = c + 'A' - 'a';
+            appendValue(cigar, TCigarElement(c, count));
+            
+            c = _streamGet(file);
+            if (c == ' ' || c == '\t' || c == '\n') break;
+        }
+    }
+    
+//////////////////////////////////////////////////////////////////////////////
+// _parseReadSamIdentifier
+    
+    template<typename TFile, typename TString, typename TChar>
+    inline void
+    _parseReadSamIdentifier(TFile & file, TString & str, TChar& c)
+    {
+        if (c == ' ' || c == '\t' || c == '\n') return;
+        appendValue(str, c);
+        while (!_streamEOF(file)) 
+		{
+            c = _streamGet(file);
+            if (c == ' ' || c == '\t' || c == '\n') return;
+            appendValue(str, c);
+        }
+    }
+    
+//////////////////////////////////////////////////////////////////////////////
+// _parseIsDna
+    
+    template<typename TChar>
+    inline bool
+    _parseIsDna(TChar const & c)
+    {
+        char x = TChar(Dna5(c));
+        return (c == x) || (c + 'A' - 'a' == x);
+    }
+    
+//////////////////////////////////////////////////////////////////////////////
+//_parseReadDnaSeq
+    
+    template<typename TFile, typename TString, typename TChar>
+    inline void
+    _parseReadDnaSeq(TFile & file, TString & str, TChar & c)
+    {
+		TChar first = c;
+		if (!_streamEOF(file)) 
+			c = _streamGet(file);
+
+        if (!_parseIsDna(first))
+			return;
+        appendValue(str, first, Generous());
+        
+        for (; !_streamEOF(file) && _parseIsDna(c); c = _streamGet(file))
+            appendValue(str, c, Generous());
+    }
+        
+//////////////////////////////////////////////////////////////////////////////
+// _parseIsPhredQual
+    
+    template <typename TChar>
+    inline bool
+    _parseIsPhredQual(TChar c)
+    {
+        return c >= '!' && c <= '~';
+    }
+    
+//////////////////////////////////////////////////////////////////////////////
+// _parseReadSeqQual
+//
+    
+    template<typename TFile, typename TQualString, typename TChar>
+    inline void
+    _parseReadSeqQual(TFile & file, TQualString & str, TChar & c)
+    {
+        typedef typename Size<TQualString>::Type				TSize;
+        typedef typename Iterator<TQualString, Standard>::Type	TIter;
+        
+        TIter itBegin = begin(str, Standard());
+        TSize rest = length(str);
+        
+        int q = 0;
+        for (TIter it = itBegin; rest != 0 && _parseIsPhredQual(c); --rest, ++it)
+        {
+            q = c - '!';
+			if (!_streamEOF(file)) 
+				c = _streamGet(file);
+			else
+				if (rest > 1)
+					rest = 1;
+			
+			if (q == '*' - '!' && !_parseIsPhredQual(c) && it == itBegin)
+				return;
+			
+            assignQualityValue(*it, q);
+        }
+    }
+    
+//////////////////////////////////////////////////////////////////////////////
+// _parseReadCharsUntilEndOfLine
+//
+// Reads all symbols till the next '\n' and writes them in the CharString str
+// the c is the first character after the '\n'.
+    
+    template<typename TFile, typename TChar>
+    inline void
+    _parseReadCharsUntilEndOfLine(TFile & file, String<char> & str, TChar& c)
+    {
+        // read all chars till '\n'
+        while (c != '\n')
+        {
+            appendValue(str, c, Generous());
+			if (_streamEOF(file)) return;
+	        c = _streamGet(file);
+        }
+        
+        // read the first char after the '\n'
+		if (!_streamEOF(file))
+	        c = _streamGet(file);
+    }
+
+//////////////////////////////////////////////////////////////////////////////
+// appendAlignment
+    
+    template<typename TSpec, typename TConfig, typename TId, typename TPos, typename TGaps>
+    inline typename Size<typename FragmentStore<TSpec, TConfig>::TAlignedReadStore>::Type
+	appendAlignment(
+		FragmentStore<TSpec, TConfig> & fragStore, 
+		TId readId, 
+		TId contigId, 
+		TPos beginPos, 
+		TPos endPos, 
+		TGaps const & gaps)
+	{
+        typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+        typedef typename Value<typename TFragmentStore::TAlignedReadStore>::Type TAlignedElement;
+        
+        TId id = length(fragStore.alignedReadStore);
+        TAlignedElement alignedElem = TAlignedElement(id, readId, contigId, beginPos, endPos, gaps);
+        appendValue(fragStore.alignedReadStore, alignedElem);
+		
+		return id;
+    }
+    
+
+
+//////////////////////////////////////////////////////////////////////////////
+// read functions for Sam
+//////////////////////////////////////////////////////////////////////////////
+
+    
+//////////////////////////////////////////////////////////////////////////////
+// _generatePairMatchIds
+//
+	template <typename TPos, typename TId>
+	struct MatchMateInfo_
+	{
+		TId		readId;
+		TId		contigId;
+		TId		pairMatchId;
+		TPos	beginPos;
+	};
+    
+    struct MatchMateInfoLess_
+	{
+        template <typename TMInfo>
+        inline bool 
+        operator() (TMInfo const &a, TMInfo const &b) const 
+		{
+            return (a.contigId < b.contigId) || (a.contigId == b.contigId && a.beginPos < b.beginPos);
+        }
+    };
+
+    template<typename TSpec, typename TConfig, typename TMatchMateInfos>
+    inline void 
+	_generatePairMatchIds (
+		FragmentStore<TSpec, TConfig> & fragStore,
+		TMatchMateInfos & matchMateInfos)
+    {
+        typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+        
+        typedef typename TFragmentStore::TReadStore			TReadStore;
+        typedef typename TFragmentStore::TAlignedReadStore	TAlignedReadStore;
+        typedef typename TFragmentStore::TContigPos			TContigPos;
+
+        typedef typename Value<TReadStore>::Type						TRead;
+        typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+        typedef typename Iterator<TAlignedReadStore, Standard>::Type	TIter;    
+		typedef typename Iterator<TMatchMateInfos, Standard>::Type		TMIter;    
+        typedef typename Id<TFragmentStore>::Type						TId;
+                
+        TIter it = begin(fragStore.alignedReadStore, Standard());
+		TIter itEnd = end(fragStore.alignedReadStore, Standard());
+		TMIter mit = begin(matchMateInfos, Standard());
+		TMIter mitEnd = end(matchMateInfos, Standard());
+
+		if (it == itEnd || mit == mitEnd) return;
+
+        // sort the aligned read store by: begin position, contig name
+        sortAlignedReads(fragStore.alignedReadStore, SortBeginPos());
+        sortAlignedReads(fragStore.alignedReadStore, SortContigId());
+		std::sort(mit, mitEnd, MatchMateInfoLess_());
+
+		TMIter mitNext = mit;
+		while (mitNext != mitEnd && (*mit).beginPos == (*mitNext).beginPos)
+			++mitNext;
+		
+		TContigPos pos = _min((*it).beginPos, (*it).endPos);
+		typename Size<TReadStore>::Type readStoreLength = length(fragStore.readStore);
+
+		while (mit != mitEnd)
+		{
+			int cmp = 0;
+			if ((*it).contigId < (*mit).contigId) cmp = -1;
+			else if ((*it).contigId > (*mit).contigId) cmp = 1;
+			else if (pos < (*mit).beginPos) cmp = -1;
+			else if (pos > (*mit).beginPos) cmp = 1;
+
+			if (cmp == 1)
+			{
+				mit = mitNext;
+				while (mitNext != mitEnd && (*mit).beginPos == (*mitNext).beginPos)
+					++mitNext;
+				continue;
+			}
+			if (cmp == 0)
+			{
+				for (TMIter m = mit; m != mitNext; ++m)
+					if ((*it).readId != (*m).readId && (*it).readId < readStoreLength && (*m).readId < readStoreLength)		// correct position found
+						if (fragStore.readStore[(*it).readId].matePairId == fragStore.readStore[(*m).readId].matePairId)	// correct mate found
+							(*it).pairMatchId = (*m).pairMatchId;															// link mate
+			}
+			if (++it == itEnd) break;
+			pos = _min((*it).beginPos, (*it).endPos);
+		}
+    }    
+
+//////////////////////////////////////////////////////////////////////////////
+// read
+
+///.Function.read.param.tag.type:Tag.File Format.tag.Sam
+    
+    template<typename TFile, typename TSpec, typename TConfig>
+    inline void 
+    read(
+		TFile & file,
+		FragmentStore<TSpec, TConfig> & fragStore,
+		Sam)
+    {
+        typedef Value<FILE>::Type TValue;
+        typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+		typedef typename TFragmentStore::TContigPos TContigPos;
+        typedef typename Id<TFragmentStore>::Type TId;
+        
+        // data structure to temporarily store the gaps that need to be inserted in the contig sequences
+        typedef MatchMateInfo_<TContigPos, TId> TMatchMateInfo;
+        typedef String<TMatchMateInfo> TMatchMateInfos;
+        typedef StringSet<String<typename TFragmentStore::TContigGapAnchor> > TContigAnchorGaps;
+
+        // data structure to temporarily store information about match mates
+        TMatchMateInfos matchMateInfos;
+		TContigAnchorGaps contigAnchorGaps;
+        
+        if (_streamEOF(file)) return;
+
+		// get first character from the stream
+        char c = _streamGet(file);
+        
+        // Read in header section
+        _readHeader(file, fragStore, c, Sam());
+        
+        // Read in alignments section
+        _readAlignments(file, fragStore, contigAnchorGaps, matchMateInfos, c, Sam());
+        
+        // set the match mate IDs using the information stored in matchMateInfos
+        _generatePairMatchIds(fragStore, matchMateInfos);
+        
+		convertPairWiseToGlobalAlignment(fragStore, contigAnchorGaps);
+    }
+    
+//////////////////////////////////////////////////////////////////////////////
+// _readHeader
+
+    template<typename TFile, typename TSpec, typename TConfig, typename TChar>
+    inline void 
+    _readHeader (
+		TFile & file,
+		FragmentStore<TSpec, TConfig> &,
+		TChar & c,
+		Sam)
+    {
+        // skip header for now
+        while (c == '@')
+            _parseSkipLine(file, c);
+    }
+    
+//////////////////////////////////////////////////////////////////////////////
+// _readAlignments
+//
+// reads in alignement sections from a Sam file
+    
+    template<typename TFile, typename TSpec, typename TConfig, typename TContigAnchorGaps, typename TMatchMateInfos, typename TChar>
+    inline void 
+    _readAlignments (
+		TFile & file,
+        FragmentStore<TSpec, TConfig> & fragStore,
+        TContigAnchorGaps & contigAnchorGaps,	
+        TMatchMateInfos & matchMateInfos,
+        TChar & c,
+        Sam)
+    {
+        // create dummy entries in Sam specific aligned read quality store and aligned read tag store
+        // is needed so the ID in the aligned store can be use to access the other stores
+        // even if there exists previous entries without
+		typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+		typedef typename TFragmentStore::TAlignQualityStore TAlignQualityStore;
+		typedef typename TFragmentStore::TNameStore TNameStore;
+		typedef typename Value<TAlignQualityStore>::Type TAlignQuality;
+		
+		TAlignQuality q;
+		q.score = maxValue(q.score);
+        int diff = length(fragStore.alignedReadStore) - length(fragStore.alignQualityStore);
+        for(int i = 0; i < diff; ++i)
+            appendValue(fragStore.alignQualityStore, q, Generous());
+		
+        diff = length(fragStore.alignedReadStore) - length(fragStore.alignedReadTagStore);
+        for(int i = 0; i < diff; ++i)
+            appendValue(fragStore.alignedReadTagStore, "", Generous());
+        
+        // read in alignments
+		Nothing contextSAM;
+		refresh(fragStore.contigNameStoreCache);
+		refresh(fragStore.readNameStoreCache);
+
+        while (!_streamEOF(file))
+            _readOneAlignment(file, fragStore, contigAnchorGaps, matchMateInfos, c, Sam(), contextSAM);
+    }
+    
+    
+//////////////////////////////////////////////////////////////////////////////
+// _readOneAlignment
+//
+// reads in one alignement section from a Sam file
+    
+    template<typename TFile, typename TSpec, typename TConfig, typename TContigAnchorGaps, typename TMatchMateInfos, typename TChar, typename TContextSAM>
+    inline void 
+    _readOneAlignment (
+		TFile & file,
+		FragmentStore<TSpec, TConfig> & fragStore,
+		TContigAnchorGaps & contigAnchorGaps,
+		TMatchMateInfos & matchMateInfos,
+		TChar & c,
+		Sam,
+		TContextSAM & contextSAM)
+    {
+        // Basic types
+        typedef FragmentStore<TSpec, TConfig>										TFragmentStore;
+        typedef typename Id<TFragmentStore>::Type									TId;
+        typedef typename Size<TFragmentStore>::Type									TSize;
+        
+        // All fragment store element types
+        typedef typename Value<typename TFragmentStore::TContigStore>::Type			TContigElement;
+        typedef typename Value<typename TFragmentStore::TLibraryStore>::Type		TLibraryStoreElement;
+        typedef typename Value<typename TFragmentStore::TMatePairStore>::Type		TMatePairElement;
+        typedef typename Value<typename TFragmentStore::TReadStore>::Type			TReadStoreElement;
+        typedef typename Value<typename TFragmentStore::TAlignedReadStore>::Type	TAlignedElement;
+        typedef typename Value<typename TFragmentStore::TAlignQualityStore>::Type	TAlignQualityElement;
+        typedef typename TAlignedElement::TGapAnchors								TReadGapAnchors;
+		
+        // Type for sequence in readstore
+        typedef typename TFragmentStore::TReadSeq TReadSeq2;
+        
+        // Type for gap anchor
+        typedef typename TFragmentStore::TContigPos									TContigPos;
+		typedef Gaps<TReadSeq2, AnchorGaps<TReadGapAnchors> >						TReadGaps;
+		typedef Gaps<Nothing, AnchorGaps<typename Value<TContigAnchorGaps>::Type> >	TContigGapsPW;
+        
+        // Type to temporarily store information about match mates
+        typedef typename Value<TMatchMateInfos>::Type								TMatchMateInfo;
+        
+        // read fields of alignments line        
+        _parseSkipWhitespace(file, c);
+
+		// Read the query name.  The letters until the first
+		// whitespace will be read into qname.  Then, we skip until we
+		// hit the first tab character.
+        String<char> qname;
+        _parseReadSamIdentifier(file, qname, c);
+        _parseSkipUntilChar(file, '\t', c);
+
+		// read the flag
+        int flag;
+        flag = _parseReadNumber(file, c);
+        _parseSkipWhitespace(file, c);
+		bool reverse = (flag & (1 << 4)) == (1 << 4);
+
+		// Read reference name.  Same behaviour as for query name:  Read up to
+        // the first whitespace character and skip to next tab char.
+        String<char> rname;
+        _parseReadSamIdentifier(file, rname, c);
+        _parseSkipUntilChar(file, '\t', c);
+
+		// read begin position
+        TContigPos beginPos;
+        beginPos = _parseReadNumber(file, c);
+        --beginPos; // Sam stores positions starting at 1 the fragment store starting at 0
+        _parseSkipWhitespace(file, c);
+
+        // read map quality
+        TAlignQualityElement mapQ;
+        mapQ.score = _parseReadNumber(file, c);
+        _parseSkipWhitespace(file, c);
+
+		// read CIGAR
+        String<CigarElement<> > cigar;
+        _parseReadCigar(file, cigar, c);
+        _parseSkipWhitespace(file, c);
+        
+        // calculate the end position
+        TContigPos endPos;
+        _getClippedLength(cigar, endPos);
+        endPos = beginPos + endPos;
+        // if the read is on the antisense strand switch begin and end position
+        if (reverse)
+		{
+            TContigPos temp = beginPos;
+            beginPos = endPos;
+            endPos = temp;
+        }
+
+		// generate gap anchor string for the read
+        TReadGapAnchors readGapAnchors;
+        
+        // read mate reference name
+        String<char> mrnm;
+        _parseReadSamIdentifier(file, mrnm, c);
+        _parseSkipWhitespace(file, c);
+
+		// read mate position
+        TContigPos mPos;
+        mPos = _parseReadNumber(file, c);
+        --mPos; // Sam stores positions starting at 1 the fragment store starting at 0
+        _parseSkipWhitespace(file, c);
+
+		// read iSize
+        _parseReadNumber(file, c);
+        _parseSkipWhitespace(file, c);
+
+		// read in sequence
+        TReadSeq2 readSeq;
+        _parseReadDnaSeq(file, readSeq, c);
+        SEQAN_ASSERT_GT(length(readSeq), 0u);
+		if (reverse)  // TODO(holtgrew): Why not after parsing quality? ib. for BAM...
+			reverseComplement(readSeq);
+        _parseSkipWhitespace(file, c);
+
+		// and associated qualities
+        _parseReadSeqQual(file, readSeq, c);
+
+		// insert alignment gaps
+		TReadGaps readGaps(readSeq, readGapAnchors);
+        cigarToGapAnchorRead(cigar, readGaps);
+        
+        // read in Sam tags
+        String<char> tags;
+        _parseSkipSpace(file, c);
+        _parseReadCharsUntilEndOfLine(file, tags, c);
+		
+		if (empty(qname) || empty(rname))
+			return;
+        
+        // check if read sequence is already in the store.
+        // if so get the ID, otherwise create new entries in the
+        // read, read name and mate pair store
+        
+        TId readId = 0;
+        _storeAppendRead(fragStore, readId, qname, readSeq, flag, contextSAM);
+        
+        // check if the contig is already in the store
+        // get its ID or create a new one otherwise
+        TId contigId = 0;
+        _storeAppendContig(fragStore, contigId, rname);
+
+		if (empty(cigar)) return;
+		
+        // create a new entry in the aligned read store
+        TId pairMatchId = appendAlignment(fragStore, readId, contigId, beginPos, endPos, readGapAnchors);
+		resize(contigAnchorGaps, length(fragStore.alignedReadStore), Generous());
+		TContigGapsPW contigGaps(back(contigAnchorGaps));
+        cigarToGapAnchorContig(cigar, contigGaps);
+		
+		// create entries in Sam specific stores
+        appendValue(fragStore.alignQualityStore, mapQ, Generous());
+        appendValue(fragStore.alignedReadTagStore, tags, Generous());
+        
+        // store additional data about match mate temporarily
+        // used in the end of the read function to generate match mate IDs
+		TId mcontigId = contigId;
+        if (mrnm != "*")
+		{
+			if (mrnm != "=")
+				_storeAppendContig(fragStore, mcontigId, mrnm);
+
+			if (flag & 0x40)	// store mate info only for the first read in the pair
+			{
+				TMatchMateInfo matchMateInfo = {readId, mcontigId, pairMatchId, mPos};
+				appendValue(matchMateInfos, matchMateInfo);
+				back(fragStore.alignedReadStore).pairMatchId = pairMatchId;
+			}
+		}
+    }
+
+
+//////////////////////////////////////////////////////////////////////////////
+// write functions for Sam
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// _writeAlignments
+
+    template<typename TFile, typename TSpec, typename TConfig>
+	inline void _writeHeader(TFile & target,
+                                 FragmentStore<TSpec, TConfig> & store,
+                                 Sam)
+    {
+		typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+		typedef typename TFragmentStore::TLibraryStore					TLibraryStore;
+		typedef typename TFragmentStore::TContigStore					TContigStore;
+		typedef typename TFragmentStore::TNameStore						TNameStore;
+
+        typedef typename Value<TContigStore>::Type						TContig;
+        typedef typename Iterator<TLibraryStore, Standard>::Type		TLibraryIter;
+        typedef typename Iterator<TContigStore, Standard>::Type			TContigIter;
+        typedef typename Iterator<TNameStore, Standard>::Type			TContigNameIter;
+        typedef typename Id<TContig>::Type								TId;
+
+        TContigIter it = begin(store.contigStore, Standard());
+        TContigIter itEnd = end(store.contigStore, Standard());
+		TContigNameIter nit = begin(store.contigNameStore, Standard());
+		TContigNameIter nitEnd = end(store.contigNameStore, Standard());
+		
+		_streamWrite(target, "@HD\tVN:1.0\n");
+        for(; it != itEnd; ++it)
+		{
+			_streamWrite(target, "@SQ\tSN:");
+			if (nit != nitEnd)
+			{
+				_streamWrite(target, *nit);
+				++nit;
+			}
+			_streamWrite(target, "\tLN:");
+			_streamPutInt(target, length((*it).seq));
+            _streamPut(target, '\n');
+		}
+
+		TLibraryIter lit = begin(store.libraryStore, Standard());
+		TLibraryIter litEnd = end(store.libraryStore, Standard());
+        for(TId id = 0; lit != litEnd; ++lit, ++id)
+		{
+			_streamWrite(target, "@RG\tID:");
+			_streamPutInt(target, id + 1);
+			_streamWrite(target, "\tLB:");
+			_streamWrite(target, store.libraryNameStore[id]);
+			_streamWrite(target, "\tPI:");
+			_streamPutInt(target, (int)/*std::round*/(store.libraryStore[id].mean));
+			_streamWrite(target, "\tSM:none");	// sample name needs to be included into fragment store
+            _streamPut(target, '\n');
+		}
+		_streamWrite(target, "@PG\tID:SeqAn\n");
+	}
+	
+	
+//////////////////////////////////////////////////////////////////////////////
+// _writeAlignments
+
+    template<typename TFile, typename TSpec, typename TConfig>
+	inline void _writeAlignments(TFile & target,
+                                 FragmentStore<TSpec, TConfig> & store,
+                                 Sam)
+    {
+		typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+
+		typedef typename TFragmentStore::TReadStore						TReadStore;
+		typedef typename TFragmentStore::TReadSeqStore					TReadSeqStore;
+		typedef typename TFragmentStore::TAlignedReadStore				TAlignedReadStore;
+		typedef typename TFragmentStore::TContigStore					TContigStore;
+		typedef typename TFragmentStore::TReadSeq						TReadSeq;
+
+        typedef typename Value<TReadStore>::Type						TRead;
+        typedef typename Value<TReadSeqStore>::Type						TReadSeqStored;
+        typedef typename Value<TContigStore>::Type						TContig;
+        typedef typename Value<TAlignedReadStore>::Type					TAlignedRead;
+
+		typedef typename TContig::TContigSeq							TContigSeq;
+        typedef typename Iterator<TAlignedReadStore, Standard>::Type	TAlignIter;
+        typedef typename Iterator<TReadSeqStored, Standard>::Type		TReadSeqIter;
+        typedef typename Id<TAlignedRead>::Type							TId;
+
+		typedef Gaps<TReadSeq, AnchorGaps<typename TAlignedRead::TGapAnchors> >	TReadGaps;
+		typedef Gaps<Nothing, AnchorGaps<typename TContig::TGapAnchors> >	TContigGaps;
+
+		String<int> mateIndex;	// store outer library size for each pair match (indexed by pairMatchId)
+		calculateMateIndices(mateIndex, store);
+		
+        TAlignIter it = begin(store.alignedReadStore, Standard());
+        TAlignIter itEnd = end(store.alignedReadStore, Standard());
+		TAlignIter mit = it;
+		CharString cigar;
+		TReadSeq readSeq;
+
+//        int i = 0;
+        for(; it != itEnd; ++it)
+		{
+//            std::cerr << "alignment " << i++ << std::endl;
+            TId alignedId = (*it).id;
+			TId readId = (*it).readId;
+			TId mateIdx = TRead::INVALID_ID;
+
+			if ((*it).pairMatchId != TRead::INVALID_ID)
+				mateIdx = mateIndex[2*(*it).pairMatchId + getMateNo(store, (*it).readId)];
+
+			TContigGaps	contigGaps(/*store.contigStore[(*it).contigId].seq, */store.contigStore[(*it).contigId].gaps);
+			__int64 pos = positionGapToSeq(contigGaps, _min((*it).beginPos, (*it).endPos)) + 1;
+			__int64 mpos = 0;
+			int isize = 0;
+			unsigned short flag = 0;
+
+			if ((*it).beginPos > (*it).endPos)
+				flag |= 0x0010;			
+
+			// calculate flags, mpos, isize
+			if (mateIdx < length(store.alignedReadStore))
+			{
+				mit = begin(store.alignedReadStore, Standard()) + mateIdx;
+				if ((*it).contigId == (*mit).contigId)
+				{
+					mpos = positionGapToSeq(contigGaps, _min((*mit).beginPos, (*mit).endPos)) + 1;
+					if ((*it).beginPos < (*mit).beginPos)
+						isize = positionGapToSeq(contigGaps, _max((*mit).beginPos, (*mit).endPos) - 1) + 2 - pos;
+					else
+						isize = mpos - positionGapToSeq(contigGaps, _max((*it).beginPos, (*it).endPos) - 1) - 2;
+				}
+				flag |= 0x0002;
+				if ((*mit).beginPos > (*mit).endPos)
+					flag |= 0x0020;				
+			}
+			else
+				flag |= 0x0008;					// mate is unmapped (actually we should check if the mate has no match at all)
+			
+			signed char mateNo = getMateNo(store, readId);
+			if (mateNo == 0) flag |= 0x0040;	// this read is the first in the pair
+			if (mateNo == 1) flag |= 0x0080;	// this read is the second in the pair
+
+			if (readId < length(store.readStore))
+			{
+				TRead &read = store.readStore[readId];
+				if (read.matePairId != TRead::INVALID_ID)
+					flag |= 0x0001;
+			}
+			
+			// <qname>
+			if (readId < length(store.readNameStore)) {
+                typedef typename Iterator<CharString, Standard>::Type TCharStringIterator;
+                for (TCharStringIterator it = begin(store.readNameStore[readId]); it != end(store.readNameStore[readId]); ++it) {
+                    if (*it == ' ' || *it == '\t' || *it == '\n' || *it == '\r')
+                        break;
+                    _streamPut(target, *it);
+                }
+            }
+            _streamPut(target, '\t');
+            
+            // <flag>
+            _streamPutInt(target, flag);
+            _streamPut(target, '\t');
+            
+			// <rname>
+			if ((*it).contigId < length(store.contigNameStore))
+				_streamWrite(target, store.contigNameStore[(*it).contigId]);
+            else
+                _streamWrite(target, '.');  // No reference name given.  Standard says field must not be empty but gives no "NULL" value.
+            _streamPut(target, '\t');
+            
+			// <pos>
+            _streamPutInt(target, pos);
+            _streamPut(target, '\t');
+            
+			// <mapq>
+			if (alignedId < length(store.alignQualityStore))
+				_streamPutInt(target, store.alignQualityStore[alignedId].score);
+            else
+                _streamPutInt(target, 255);
+            _streamPut(target, '\t');
+            
+			// get read sequence
+			if (readId < length(store.readSeqStore))
+			{
+				readSeq = store.readSeqStore[readId];
+				if ((*it).beginPos <= (*it).endPos) 
+				{
+					setBeginPosition(contigGaps, (*it).beginPos);
+					setEndPosition(contigGaps, (*it).endPos);
+				} else
+				{
+					setBeginPosition(contigGaps, (*it).endPos);
+					setEndPosition(contigGaps, (*it).beginPos);
+					reverseComplement(readSeq);
+				}
+			} else
+				clear(readSeq);
+			
+            // <cigar>
+			TReadGaps readGaps(readSeq, (*it).gaps);
+            typedef Gaps<TContigSeq, AnchorGaps<typename TContig::TGapAnchors> >	TContigGaps2;
+			// TContigGaps	contigGaps2(store.contigStore[(*it).contigId].seq, store.contigStore[(*it).contigId].gaps);
+            // if (i == 4)
+            //     printf("It's it!\n");
+            // std::cerr << "read gaps:  " << readGaps << std::endl;
+            // std::cerr << "contig gaps:" << contigGaps2 << std::endl;
+			getCigarString(cigar, contigGaps, readGaps);
+			
+			_streamWrite(target, cigar);
+            _streamPut(target, '\t');
+            
+            // <mrnm>
+			if ((mateIdx < length(store.alignedReadStore)))
+			{
+				if ((*it).contigId == (*mit).contigId)
+					_streamWrite(target, '=');
+				else
+					if ((*mit).contigId < length(store.contigNameStore))
+						_streamWrite(target, store.contigNameStore[(*mit).contigId]);
+			} else
+				_streamWrite(target, '*');
+				
+            _streamPut(target, '\t');
+            
+            // <mpos>
+			_streamPutInt(target, (int)mpos);
+            _streamPut(target, '\t');
+            
+            // <isize>
+			_streamPutInt(target, isize);
+            _streamPut(target, '\t');
+
+            // <seq>
+			_streamWrite(target, readSeq);
+            _streamPut(target, '\t');
+            
+            // <qual>
+			TReadSeqIter it = begin(store.readSeqStore[readId], Standard());
+			TReadSeqIter itEnd = end(store.readSeqStore[readId], Standard());
+			for (; it != itEnd; ++it)
+				_streamPut(target, (char)(getQualityValue(*it) + 33));
+            
+			// <tags>
+			if (alignedId < length(store.alignedReadTagStore) && !empty(store.alignedReadTagStore[alignedId]))
+			{
+				_streamPut(target, '\t');
+				_streamWrite(target, store.alignedReadTagStore[alignedId]);
+			}
+            
+            _streamPut(target, '\n');
+        }
+        
+    }
+    
+//////////////////////////////////////////////////////////////////////////////
+// write
+
+///.Function.write.param.tag.type:Tag.File Format.tag.Sam
+    
+    template<typename TFile, typename TSpec, typename TConfig>
+    inline void write(TFile & target,
+                      FragmentStore<TSpec, TConfig> & store,
+                      Sam)
+    {
+        // write header
+		_writeHeader(target, store, Sam());
+        
+        // write aligments
+        _writeAlignments(target, store, Sam());
+    }
+    
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_io_ucsc.h b/src/SeqAn-1.3/seqan/store/store_io_ucsc.h
new file mode 100755
index 0000000..45d0747
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_io_ucsc.h
@@ -0,0 +1,601 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_IO_UCSC_H
+#define SEQAN_HEADER_STORE_IO_UCSC_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+template <typename TSpec>
+struct Ucsc_;
+
+/**
+.Tag.File Format.tag.Ucsc:
+	Ucsc Genome Browser annotation file (a.k.a. knownGene format).
+..include:seqan/store.h
+*/
+
+struct UcscKnownGene_;
+typedef Tag<Ucsc_<UcscKnownGene_> > const Ucsc;
+
+/**
+.Tag.File Format.tag.UcscIsoforms:
+	Ucsc Genome Browser isoforms file (a.k.a. knownIsoforms format).
+..include:seqan/store.h
+*/
+struct UcscKnownIsoforms_;
+typedef Tag<Ucsc_<UcscKnownIsoforms_> > const UcscIsoforms;
+	
+//////////////////////////////////////////////////////////////////////////////
+// _parseReadUcscIdentifier
+    
+    template<typename TFile, typename TString, typename TChar>
+    inline void
+    _parseReadUcscIdentifier(TFile & file, TString & str, TChar& c)
+    {
+        if (c == ' ' || c == '\t' || c == '\n') return;
+        appendValue(str, c);
+        while (!_streamEOF(file)) 
+		{
+            c = _streamGet(file);
+            if (c == ' ' || c == '\t' || c == '\n') return;
+            appendValue(str, c);
+        }
+    }
+
+	template<typename TFile, typename TChar>
+	inline void 
+	_parseSkipWhiteComma(TFile& file, TChar& c)
+	{
+		if (c != ',' && c != ' ') return;
+		while (!_streamEOF(file)) {
+			c = _streamGet(file);
+			if (c != ',' && c != ' ') break;
+		}
+	}
+	
+//////////////////////////////////////////////////////////////////////////////
+// Read Ucsc
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec = void>
+struct IOContextUcsc_
+{
+	typedef typename TFragmentStore::TAnnotationStore   TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type      TAnnotation;
+	typedef typename TAnnotation::TId                   TId;
+
+	CharString		transName;
+	CharString		contigName;
+	__int64			cdsBegin;
+	__int64			cdsEnd;
+	String<__int64>	exonBegin;
+	String<__int64>	exonEnd;
+	CharString		proteinName;
+	
+	enum { KNOWN_GENE, KNOWN_ISOFORMS } format;
+	TAnnotation annotation;
+};
+
+template <typename TFragmentStore, typename TSpec>
+inline void clear(IOContextUcsc_<TFragmentStore, TSpec> &ctx)
+{
+	typedef typename TFragmentStore::TAnnotationStore   TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type      TAnnotation;
+
+	clear(ctx.transName);
+	clear(ctx.contigName);
+	clear(ctx.exonBegin);
+	clear(ctx.exonEnd);
+	clear(ctx.proteinName);
+	clear(ctx.annotation.values);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// _readOneAnnotation
+//
+// reads in one annotation line from a Gff file
+
+template <typename TFile, typename TChar, typename TFragmentStore, typename TSpec>
+inline bool 
+_readOneAnnotation (
+	TFile & file,
+	TChar & c,
+	IOContextUcsc_<TFragmentStore, TSpec> & ctx)
+{
+	typedef typename TFragmentStore::TContigPos         TContigPos;	
+	typedef typename TFragmentStore::TAnnotationStore   TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type      TAnnotation;
+	typedef typename TAnnotation::TId                   TId;
+		
+	clear(ctx);
+
+	// read fields of alignments line        
+	_parseSkipWhitespace(file, c);
+	
+	// read column 1: transcript name
+	// The letters until the first whitespace will be read.
+	// Then, we skip until we hit the first tab character.
+	_parseReadUcscIdentifier(file, ctx.transName, c);
+	if (!empty(ctx.transName) && ctx.transName[0] == '#')
+	{
+		_parseSkipLine(file, c);
+		return false;
+	}
+	_parseSkipUntilChar(file, '\t', c);
+	c = _streamGet(file);
+	
+	// read column 2: contig name
+	_parseReadUcscIdentifier(file, ctx.contigName, c);
+	_parseSkipSpace(file, c);
+	
+	// read column 3: orientation
+	if (c != '+' && c != '-')
+	{
+		ctx.format = ctx.KNOWN_ISOFORMS;
+		assign(prefix(ctx.transName, 0), "GENE");
+		_parseSkipLine(file, c);
+		return true;
+	}
+	ctx.format = ctx.KNOWN_GENE;
+	char orientation = c;
+	c = _streamGet(file);
+	_parseSkipWhitespace(file, c);
+
+	// read column 4: transcript begin position
+	if (_parseIsDigit(c))
+		ctx.annotation.beginPos = _parseReadNumber(file, c);
+	else
+	{
+		ctx.annotation.beginPos = TAnnotation::INVALID_POS;
+		_parseSkipEntryUntilWhitespace(file, c);
+	}
+	_parseSkipWhitespace(file, c);
+
+	// read column 5: transcript end position
+	if (_parseIsDigit(c))
+		ctx.annotation.endPos = _parseReadNumber(file, c);
+	else 
+	{
+		ctx.annotation.endPos = TAnnotation::INVALID_POS;
+		_parseSkipEntryUntilWhitespace(file, c);
+	}
+	_parseSkipWhitespace(file, c);	
+
+	// read column 6: CDS begin position
+	if (_parseIsDigit(c))
+		ctx.cdsBegin = _parseReadNumber(file, c);
+	else
+	{
+		ctx.cdsBegin = TAnnotation::INVALID_POS;
+		_parseSkipEntryUntilWhitespace(file, c);
+	}
+	_parseSkipWhitespace(file, c);
+	
+	// read column 7: CDS end position
+	if (_parseIsDigit(c))
+		ctx.cdsEnd = _parseReadNumber(file, c);
+	else 
+	{
+		ctx.cdsEnd = TAnnotation::INVALID_POS;
+		_parseSkipEntryUntilWhitespace(file, c);
+	}
+	_parseSkipWhitespace(file, c);	
+	
+	// read column 8: exon count
+	int exons = -1;
+	if (_parseIsDigit(c))
+		exons = _parseReadNumber(file, c);
+	_parseSkipWhitespace(file, c);
+
+	// read column 9: exon begin positions
+	for (int i = 0; i < exons; ++i)
+	{
+		appendValue(ctx.exonBegin, _parseReadNumber(file, c), Generous());
+		_parseSkipWhiteComma(file, c);
+	}
+	_parseSkipUntilChar(file, '\t', c);
+	c = _streamGet(file);
+	
+	// read column 10: exon end positions
+	for (int i = 0; i < exons; ++i)
+	{
+		appendValue(ctx.exonEnd, _parseReadNumber(file, c));
+		_parseSkipWhiteComma(file, c);
+	}
+	_parseSkipUntilChar(file, '\t', c);
+	c = _streamGet(file);
+	
+	// read column 10: protein name
+	_parseReadUcscIdentifier(file, ctx.proteinName, c);
+	_parseSkipUntilChar(file, '\t', c);
+	c = _streamGet(file);
+
+	// skip column 11
+	_parseSkipEntryUntilWhitespace(file, c);
+	_parseSkipWhitespace(file, c);
+
+	// adapt positions
+	if (orientation == '-')
+	{
+		TContigPos tmp = ctx.annotation.beginPos;
+		ctx.annotation.beginPos = ctx.annotation.endPos;
+		ctx.annotation.endPos = tmp;
+		tmp = ctx.cdsBegin;
+		ctx.cdsBegin = ctx.cdsEnd;
+		ctx.cdsEnd = tmp;
+		for (int i = 0; i < exons; ++i)
+		{
+			tmp = ctx.exonBegin[i];
+			ctx.exonBegin[i] = ctx.exonEnd[i];
+			ctx.exonEnd[i] = tmp;
+		}
+	}
+
+	return true;
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline void 
+_storeOneAnnotationKnownGene (
+	TFragmentStore & fragStore,
+	IOContextUcsc_<TFragmentStore, TSpec> & ctx)
+{
+	typedef typename TFragmentStore::TAnnotationStore   TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type      TAnnotation;
+	typedef typename TAnnotation::TId                   TId;
+	
+	SEQAN_ASSERT_EQ(length(fragStore.annotationStore), length(fragStore.annotationNameStore));
+
+	TId annoStoreLen = length(fragStore.annotationStore);
+	TId transId = TAnnotation::INVALID_ID;
+	TId cdsId = TAnnotation::INVALID_ID;
+
+	// add transcript and CDS
+	_storeAppendAnnotationName(fragStore, transId, ctx.transName);
+	cdsId = length(fragStore.annotationNameStore);
+	appendName(fragStore.annotationNameStore, ctx.proteinName, fragStore.annotationNameStoreCache);
+	
+	if (annoStoreLen <= transId)
+		annoStoreLen = transId + 1;
+	
+	if (annoStoreLen <= cdsId)
+		annoStoreLen = cdsId + 1;
+	
+	resize(fragStore.annotationStore, annoStoreLen + length(ctx.exonBegin), Generous());
+	resize(fragStore.annotationNameStore, annoStoreLen + length(ctx.exonBegin), Generous());
+
+	// add contig name
+	_storeAppendContig(fragStore, ctx.annotation.contigId, ctx.contigName);	
+
+	TAnnotation &transcript = fragStore.annotationStore[transId];
+	TId geneId = transcript.parentId;
+	if (geneId == TAnnotation::INVALID_ID) geneId = 0;
+	transcript = ctx.annotation;
+	transcript.parentId = geneId;
+	transcript.typeId = TFragmentStore::ANNO_MRNA;
+	
+	TAnnotation &cds = fragStore.annotationStore[cdsId];
+	cds = ctx.annotation;
+	cds.parentId = transId;
+	cds.typeId = TFragmentStore::ANNO_CDS;
+	cds.beginPos = ctx.cdsBegin;
+	cds.endPos = ctx.cdsEnd;
+	_adjustParent(transcript, cds);
+	
+	// insert exons
+	ctx.annotation.parentId = transId;
+	ctx.annotation.typeId = TFragmentStore::ANNO_EXON;
+	for (unsigned i = 0; i < length(ctx.exonBegin); ++i)
+	{
+		ctx.annotation.beginPos = ctx.exonBegin[i];
+		ctx.annotation.endPos = ctx.exonEnd[i];
+		fragStore.annotationStore[annoStoreLen + i] = ctx.annotation;
+		_adjustParent(transcript, ctx.annotation);
+	}
+	if (geneId != 0)
+		_adjustParent(fragStore.annotationStore[geneId], transcript);
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline void 
+_storeOneAnnotationKnownIsoforms (
+	TFragmentStore & fragStore,
+	IOContextUcsc_<TFragmentStore, TSpec> & ctx)
+{
+	typedef typename TFragmentStore::TAnnotationStore   TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type      TAnnotation;
+	typedef typename TAnnotation::TId                   TId;
+	
+	SEQAN_ASSERT_EQ(length(fragStore.annotationStore), length(fragStore.annotationNameStore));
+	
+	TId annoStoreLen = length(fragStore.annotationStore);
+	TId geneId = TAnnotation::INVALID_ID;
+	TId transId = TAnnotation::INVALID_ID;
+	
+	// add transcript and CDS
+	_storeAppendAnnotationName(fragStore, geneId, ctx.transName);
+	_storeAppendAnnotationName(fragStore, transId, ctx.contigName);
+	
+	if (annoStoreLen <= geneId)
+		annoStoreLen = geneId + 1;
+	
+	if (annoStoreLen <= transId)
+		annoStoreLen = transId + 1;
+	
+	resize(fragStore.annotationStore, annoStoreLen, Generous());
+	resize(fragStore.annotationNameStore, annoStoreLen, Generous());
+	
+	// set parent link locus->root
+	TAnnotation &locus = fragStore.annotationStore[geneId];
+	locus.parentId = 0;
+	locus.typeId = TFragmentStore::ANNO_GENE;
+
+	// set parent link transcript->locus
+	TAnnotation &transcript = fragStore.annotationStore[transId];
+	transcript.parentId = geneId;
+	transcript.typeId = TFragmentStore::ANNO_MRNA;
+	
+	_adjustParent(locus, transcript);
+}
+
+template <typename TFragmentStore, typename TSpec>
+inline void 
+_storeOneAnnotation (
+	TFragmentStore & fragStore,
+	IOContextUcsc_<TFragmentStore, TSpec> & ctx)
+{
+	if (ctx.format == ctx.KNOWN_GENE)
+		_storeOneAnnotationKnownGene(fragStore, ctx);
+	else
+		_storeOneAnnotationKnownIsoforms(fragStore, ctx);
+}
+
+template<typename TFile, typename TSpec, typename TConfig, typename TFormatSpec>
+inline void 
+read (
+	TFile & file,
+	FragmentStore<TSpec, TConfig> & fragStore,
+	Tag<Ucsc_<TFormatSpec> > const)
+{
+	typedef FragmentStore<TSpec, TConfig> TFragmentStore;
+	
+	if (_streamEOF(file)) return;
+
+	// get first character from the stream
+	char c = _streamGet(file);
+	IOContextUcsc_<TFragmentStore> ctx;
+	
+	refresh(fragStore.contigNameStoreCache);
+	refresh(fragStore.annotationNameStoreCache);
+	refresh(fragStore.annotationTypeStoreCache);
+	
+	while (!_streamEOF(file))
+	{
+		if (_readOneAnnotation(file, c, ctx))
+			_storeOneAnnotation(fragStore, ctx);
+	}
+	_storeClearAnnoBackLinks(fragStore.annotationStore);
+	_storeCreateAnnoBackLinks(fragStore.annotationStore);
+	_storeRemoveTempAnnoNames(fragStore);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Write Ucsc
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TFragmentStore, typename TSpec, typename TAnnotation, typename TId>
+inline bool 
+_retrieveOneAnnotation (
+	TFragmentStore & fragStore,
+	IOContextUcsc_<TFragmentStore, TSpec> & ctx,
+	TAnnotation &annotation,
+	TId id,
+	Ucsc)
+{	
+	if (annotation.typeId != TFragmentStore::ANNO_MRNA) return false;
+	
+	ctx.format = ctx.KNOWN_GENE;
+	ctx.transName = getAnnoUniqueName(fragStore, id);
+	if (annotation.contigId < length(fragStore.contigNameStore))
+		ctx.contigName = fragStore.contigNameStore[annotation.contigId];
+	else
+		clear(ctx.contigName);
+	
+	ctx.annotation = annotation;
+	clear(ctx.proteinName);
+	clear(ctx.exonBegin);
+	clear(ctx.exonEnd);
+	
+	TId lastChildId = annotation.lastChildId;
+	TId i = lastChildId;
+	do {
+		i = fragStore.annotationStore[i].nextSiblingId;
+		TAnnotation &anno = fragStore.annotationStore[i];
+		if (anno.typeId == TFragmentStore::ANNO_CDS)
+		{
+			if (i < length(fragStore.annotationNameStore))
+				ctx.proteinName = fragStore.annotationNameStore[i];
+			ctx.cdsBegin = anno.beginPos;
+			ctx.cdsEnd = anno.endPos;
+		}
+		if (anno.typeId == TFragmentStore::ANNO_EXON)
+		{
+			appendValue(ctx.exonBegin, anno.beginPos, Generous());
+			appendValue(ctx.exonEnd, anno.endPos, Generous());
+		}
+	} while (i != lastChildId);
+	return true;
+}
+
+template <typename TFragmentStore, typename TSpec, typename TAnnotation, typename TId>
+inline bool 
+_retrieveOneAnnotation (
+	TFragmentStore & fragStore,
+	IOContextUcsc_<TFragmentStore, TSpec> & ctx,
+	TAnnotation &annotation,
+	TId id,
+	UcscIsoforms)
+{	
+	if (annotation.typeId != TFragmentStore::ANNO_MRNA) return false;
+	if (annotation.parentId == TAnnotation::INVALID_ID || annotation.parentId == 0) return false;
+	
+	ctx.format = ctx.KNOWN_ISOFORMS;
+	ctx.transName = getAnnoUniqueName(fragStore, annotation.parentId);
+	ctx.contigName = getAnnoUniqueName(fragStore, id);
+	return true;
+}
+
+template<typename TTargetStream, typename TFragmentStore, typename TSpec>
+inline void 
+_writeOneAnnotation (
+	TTargetStream & file,
+	IOContextUcsc_<TFragmentStore, TSpec> & ctx)
+{
+	typedef typename TFragmentStore::TContigPos         TContigPos;	
+	
+	unsigned suf = 0;
+	if (ctx.format == ctx.KNOWN_ISOFORMS && length(ctx.transName) >= 4 && prefix(ctx.transName, 4) == "GENE")
+		suf = 4;
+	
+	// read column 1: transcript name
+	// The letters until the first whitespace will be read.
+	// Then, we skip until we hit the first tab character.
+	_streamWrite(file, suffix(ctx.transName, suf));
+	_streamPut(file, '\t');
+	
+	// read column 2: contig name
+	_streamWrite(file, ctx.contigName);
+	if (ctx.format == ctx.KNOWN_ISOFORMS)
+	{
+		_streamPut(file, '\n');
+		return;
+	}
+	_streamPut(file, '\t');
+	
+	// read column 3: orientation
+	TContigPos transBeginPos, transEndPos;
+	TContigPos cdsBeginPos, cdsEndPos;
+	if (ctx.annotation.beginPos < ctx.annotation.endPos)
+	{
+		_streamPut(file, '+');
+		transBeginPos = ctx.annotation.beginPos;
+		transEndPos = ctx.annotation.endPos;
+		cdsBeginPos = ctx.cdsBegin;
+		cdsEndPos = ctx.cdsEnd;
+	}
+	else
+	{
+		_streamPut(file, '-');
+		transEndPos = ctx.annotation.beginPos;
+		transBeginPos = ctx.annotation.endPos;
+		cdsEndPos = ctx.cdsBegin;
+		cdsBeginPos = ctx.cdsEnd;
+	}
+	_streamPut(file, '\t');
+
+	// read column 4: transcript begin position
+	_streamPutInt(file, transBeginPos);
+	_streamPut(file, '\t');
+
+	// read column 5: transcript end position
+	_streamPutInt(file, transEndPos);
+	_streamPut(file, '\t');
+
+	// read column 6: CDS begin position
+	_streamPutInt(file, cdsBeginPos);
+	_streamPut(file, '\t');
+	
+	// read column 7: CDS end position
+	_streamPutInt(file, cdsEndPos);
+	_streamPut(file, '\t');
+	
+	// read column 8: exon count
+	_streamPutInt(file, length(ctx.exonBegin));
+	_streamPut(file, '\t');
+
+	// read column 9: exon begin positions
+	for (unsigned i = 0; i < length(ctx.exonBegin); ++i)
+	{
+		_streamPutInt(file, _min(ctx.exonBegin[i], ctx.exonEnd[i]));
+		_streamPut(file, ',');
+	}
+	_streamPut(file, '\t');
+	
+	// read column 10: exon end positions
+	for (unsigned i = 0; i < length(ctx.exonBegin); ++i)
+	{
+		_streamPutInt(file, _max(ctx.exonBegin[i], ctx.exonEnd[i]));
+		_streamPut(file, ',');
+	}
+	_streamPut(file, '\t');
+	
+	// read column 10: protein name
+	_streamWrite(file, ctx.proteinName);
+	_streamPut(file, '\t');
+
+	// skip column 11
+	_streamWrite(file, ctx.transName);
+	_streamPut(file, '\n');
+}
+
+template<typename TTargetStream, typename TSpec, typename TConfig, typename TFormatSpec>
+inline void 
+write (
+	TTargetStream & target,
+	FragmentStore<TSpec, TConfig> & store,
+	Tag<Ucsc_<TFormatSpec> > const format)
+{
+	typedef FragmentStore<TSpec, TConfig>							TFragmentStore;
+	typedef typename TFragmentStore::TAnnotationStore				TAnnotationStore;
+	typedef typename Value<TAnnotationStore>::Type					TAnnotation;
+	typedef typename Iterator<TAnnotationStore, Standard>::Type		TAnnoIter;
+	typedef typename Id<TAnnotation>::Type							TId;
+
+	IOContextUcsc_<TFragmentStore> ctx;
+
+	TAnnoIter it = begin(store.annotationStore, Standard());
+	TAnnoIter itEnd = end(store.annotationStore, Standard());
+	
+	for(TId id = 0; it != itEnd; ++it, ++id)
+	{
+		if (_retrieveOneAnnotation(store, ctx, *it, id, format))
+			_writeOneAnnotation(target, ctx);
+	}
+}
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_library.h b/src/SeqAn-1.3/seqan/store/store_library.h
new file mode 100644
index 0000000..5d850a9
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_library.h
@@ -0,0 +1,94 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_LIBRARY_H
+#define SEQAN_HEADER_STORE_LIBRARY_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Library Store
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.LibraryStoreElement
+..summary:Represents a fragment library.
+..cat:Fragment Store
+..signature:LibraryStoreElement<>
+..signature:LibraryStoreElement<TMean[, TStd[, TSpec]]>
+..param.TMean:The type to represent the library size mean.
+...default:$double$
+..param.TStd:The type to represent the library size standard deviation.
+...default:$double$
+..param.TSpec:The specialization type.
+...default:$void$
+..remarks:A fragment library is a set of mate-pairs having a certain distribution of insert sizes.
+..remarks:Value type of the @Memvar.FragmentStore#libraryStore@ string.
+
+.Memfunc.LibraryStoreElement#LibraryStoreElement
+..summary:Constructor
+..signature:LibraryStoreElement<>()
+..signature:LibraryStoreElement<TMean[, TStd[, TSpec]]> ()
+..remarks:Sets $mean$ and $std$ to $0$.
+..class:Class.LibraryStoreElement
+.Memvar.LibraryStoreElement#mean
+..summary:The library size mean.
+..class:Class.LibraryStoreElement
+.Memvar.LibraryStoreElement#std
+..summary:The library size standard deviation.
+..class:Class.LibraryStoreElement
+..include:seqan/store.h
+*/
+
+template <typename TMean = double, typename TStd = double, typename TSpec = void>
+struct LibraryStoreElement
+{
+	TMean		mean;		// mean library size in bps
+	TStd		std;	// library size variance
+
+	LibraryStoreElement() : mean(0), std(0) {}
+
+    inline bool operator==(LibraryStoreElement const & other) const
+    {
+        return mean == other.mean && std == other.std;
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_matepair.h b/src/SeqAn-1.3/seqan/store/store_matepair.h
new file mode 100644
index 0000000..57eadc7
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_matepair.h
@@ -0,0 +1,112 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_MATEPAIR_H
+#define SEQAN_HEADER_STORE_MATEPAIR_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Mate Store
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.MatePairStoreElement
+..summary:Represents a mate-pair.
+..cat:Fragment Store
+..signature:MatePairStoreElement<>
+..signature:MatePairStoreElement<TSpec>
+..param.TSpec:The specialization type.
+...default:$void$
+..remarks:A mate-pair consists of two reads sequenced from opposite ends and strands of the same fragment.
+The insert size of a mate-pair is the size of the fragment.
+..remarks:Value type of the @Memvar.FragmentStore#matePairStore@ string.
+
+.Memfunc.MatePairStoreElement#MatePairStoreElement
+..summary:Constructor
+..signature:MatePairStoreElement<> ()
+..signature:MatePairStoreElement<TSpec> ()
+..remarks:Sets $readId[0]$, $readId[1]$ and $libId$ to $INVALID_ID$.
+..class:Class.MatePairStoreElement
+.Memvar.MatePairStoreElement#readId[2]
+..summary:Refers to two paired reads in the @Memvar.FragmentStore#readStore@ or contains $INVALID_ID$ values.
+..type:Metafunction.Id
+..class:Class.MatePairStoreElement
+.Memvar.MatePairStoreElement#libId
+..summary:Refers to a library in the @Memvar.FragmentStore#libraryStore@ or is $INVALID_ID$ if the mate-pair has no library.
+..type:Metafunction.Id
+..class:Class.MatePairStoreElement
+.Memvar.MatePairStoreElement#INVALID_ID
+..summary:Constant to represent an invalid id.
+..type:Metafunction.Id
+..class:Class.MatePairStoreElement
+..include:seqan/store.h
+*/
+
+template <typename TSpec = void>
+struct MatePairStoreElement
+{
+	typedef typename Id<MatePairStoreElement>::Type TId;
+
+	static const TId INVALID_ID;
+	
+	TId		readId[2];	// refers to the two reads of a mate-pair, INVALID_ID if this is a singleton fragment (e.g. in afg: reads refer to fragments (mate pairs) and these refer to libraries, singletons refer to an empty fragment)
+	TId		libId;
+
+	MatePairStoreElement() : libId(INVALID_ID) 
+	{
+		readId[0] = INVALID_ID;
+		readId[1] = INVALID_ID;
+	}
+
+    inline bool operator==(MatePairStoreElement const & other) const
+    {
+        return readId[0] == other.readId[0] &&
+                readId[1] == other.readId[1] &&
+                libId == other.libId;
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec>
+const typename Id<MatePairStoreElement<TSpec> >::Type
+MatePairStoreElement<TSpec>::INVALID_ID = MaxValue<typename Id<MatePairStoreElement<TSpec> >::Type>::VALUE;
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/store/store_read.h b/src/SeqAn-1.3/seqan/store/store_read.h
new file mode 100644
index 0000000..7d8b1ba
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/store/store_read.h
@@ -0,0 +1,101 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_STORE_READ_H
+#define SEQAN_HEADER_STORE_READ_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+//////////////////////////////////////////////////////////////////////////////
+// Read Store
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+.Class.ReadStoreElement
+..summary:Represents a single read (without sequence).
+..cat:Fragment Store
+..signature:ReadStoreElement<>
+..signature:ReadStoreElement<TSpec>
+..param.TSpec:The specialization type.
+...default:$void$
+..remarks:Value type of the @Memvar.FragmentStore#readStore@ string.
+
+.Memfunc.ReadStoreElement#ReadStoreElement
+..summary:Constructor
+..signature:ReadStoreElement<>()
+..signature:ReadStoreElement<TSpec> ()
+..remarks:Sets $matePairId$ to $INVALID_ID$.
+..class:Class.ReadStoreElement
+.Memvar.ReadStoreElement#matePairId
+..summary:Refers to a mate-pair in the @Memvar.FragmentStore#matePairStore@ or is $INVALID_ID$ if the read is not paired.
+..type:Metafunction.Id
+..class:Class.ReadStoreElement
+.Memvar.ReadStoreElement#INVALID_ID
+..summary:Constant to represent an invalid id.
+..type:Metafunction.Id
+..class:Class.ReadStoreElement
+..include:seqan/store.h
+*/
+
+template <typename TSpec = void>
+struct ReadStoreElement
+{
+	typedef typename Id<ReadStoreElement>::Type TId;
+	
+	static const TId INVALID_ID;
+
+	TId matePairId;				// refers to the mate-pair, INVALID_ID if not part of a mate-pair
+
+	ReadStoreElement() : matePairId(INVALID_ID) {}
+
+    inline
+    bool
+    operator==(ReadStoreElement const & other)
+    {
+        return matePairId == other.matePairId;
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+template <typename TSpec>
+const typename Id<ReadStoreElement<TSpec> >::Type
+ReadStoreElement<TSpec>::INVALID_ID = MaxValue<typename Id<ReadStoreElement<TSpec> >::Type>::VALUE;
+
+//////////////////////////////////////////////////////////////////////////////
+
+}// namespace SEQAN_NAMESPACE_MAIN
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/system.h b/src/SeqAn-1.3/seqan/system.h
new file mode 100644
index 0000000..9d693b0
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system.h
@@ -0,0 +1,93 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+#include <seqan/file.h>
+
+#ifndef SEQAN_HEADER_SYSTEM_H
+#define SEQAN_HEADER_SYSTEM_H
+
+//____________________________________________________________________________
+// prerequisites
+
+#include <cstdio>
+#include <ctime>
+#include <string>
+#include <iostream>
+
+#ifdef PLATFORM_WINDOWS
+
+#include <windows.h>
+
+#else //#ifdef PLATFORM_WINDOWS
+
+#include <cstdlib>
+#include <climits>
+#include <pthread.h>
+#include <errno.h>
+#include <semaphore.h>
+#include <aio.h>
+#include <sys/mman.h>
+
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+
+#ifndef O_DIRECT
+#define O_DIRECT 0
+#endif
+
+#endif //#ifdef PLATFORM_WINDOWS
+
+#ifdef SEQAN_SWITCH_USE_FORWARDS
+# include <seqan/system/system_manual_forwards.h>
+# ifndef PLATFORM_WINDOWS
+#  include <seqan/system/file_manual_forwards.h>
+# endif
+#endif
+
+//____________________________________________________________________________
+// multi-threading
+
+#include <seqan/system/system_base.h>
+#include <seqan/system/system_mutex.h>
+#include <seqan/system/system_sema.h>
+#include <seqan/system/system_event.h>
+#include <seqan/system/system_thread.h>
+
+//____________________________________________________________________________
+// synchronous and asynchronous files
+
+#include <seqan/system/file_sync.h>
+#include <seqan/system/file_async.h>
+#include <seqan/system/file_directory.h>
+
+#endif //#ifndef SEQAN_HEADER_...
diff --git a/src/SeqAn-1.3/seqan/system/file_async.h b/src/SeqAn-1.3/seqan/system/file_async.h
new file mode 100644
index 0000000..964c71b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/file_async.h
@@ -0,0 +1,1035 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_FILE_ASYNC_H
+#define SEQAN_HEADER_FILE_ASYNC_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+ 
+	template <typename TSpec /* = void */>
+	struct Async;
+
+
+#ifdef PLATFORM_WINDOWS
+
+
+    static DWORD _transferedBytes;  // for reporting
+
+	template <typename TSpec>
+	class File<Async<TSpec> >
+    {
+    public:
+
+        typedef LONGLONG    FilePtr;
+        typedef ULONGLONG   SizeType;
+        typedef DWORD       SizeType_;
+        typedef HANDLE      Handle;
+
+		Handle              handle, handleAsync;
+        bool                noBuffering;
+
+        File():
+            handle(INVALID_HANDLE_VALUE) {}
+
+        File(void *): // to be compatible with the FILE*(NULL) constructor
+            handle(INVALID_HANDLE_VALUE) {}
+
+        bool open(char const *fileName, int openMode = DefaultOpenMode<File>::VALUE) {
+			SEQAN_PROADD(SEQAN_PROOPENFILES, 1);
+            noBuffering = (getExtraFlags(openMode | OPEN_ASYNC) & (FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED)) != 0;
+            handleAsync = CreateFileA(fileName,
+                                getFileAccess(openMode | OPEN_ASYNC),
+                                FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
+                                NULL,
+                                getCreationFlags(openMode | OPEN_ASYNC),
+                                getExtraFlags(openMode | OPEN_ASYNC),
+                                NULL);
+
+            if (handleAsync == INVALID_HANDLE_VALUE) {
+				if (!(openMode & OPEN_QUIET))
+					::std::cerr << "Open failed on file " << fileName << ". (ErrNo=" << GetLastError() << ")" << ::std::endl;
+                return false;
+            }
+            #ifdef SEQAN_VERBOSE
+				if (!(openMode & OPEN_QUIET))
+	                ::std::cerr << "file opened asynchronously " << fileName << " handle " << ::std::hex << handleAsync << ::std::dec << ::std::endl;
+            #endif
+
+            if (noBuffering) {
+                handle = CreateFileA(fileName,                // in this case io must be sector aligned
+                                getFileAccess(openMode),    // so we open a second file, for unaligned access
+                                FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
+                                NULL,
+                                OPEN_EXISTING,
+                                getExtraFlags(openMode & ~OPEN_ASYNC),
+                                NULL);
+                if (handle == INVALID_HANDLE_VALUE) {
+					if (!(openMode & OPEN_QUIET))
+	                	::std::cerr << "Open failed on secondary file " << fileName << ". (ErrNo=" << GetLastError() << ")" << ::std::endl;
+                    return false;
+                }
+	            #ifdef SEQAN_VERBOSE
+					if (!(openMode & OPEN_QUIET))
+	                	::std::cerr << "async file opened  " << fileName << " handle " << ::std::hex << handle << ::std::dec << ::std::endl;
+                #endif
+            } else
+                handle = handleAsync;
+
+            return true;
+        }
+
+        bool openTemp(int openMode = DefaultOpenTempMode<File>::VALUE) {
+            char szTempName[MAX_PATH];
+#ifdef SEQAN_DEFAULT_TMPDIR
+            static const char szTempPath[MAX_PATH] = SEQAN_DEFAULT_TMPDIR;
+#else
+            char szTempPath[MAX_PATH];
+            if (!GetTempPathA(MAX_PATH, szTempPath)) {
+				if (!(openMode & OPEN_QUIET))
+					::std::cerr << "Couldn't get a temporary path name. (ErrNo=" << GetLastError() << ")" << ::std::endl;
+                return false;
+            }
+#endif
+            if (!GetTempFileNameA(szTempPath, "GNDX", 0, szTempName)) {
+				if (!(openMode & OPEN_QUIET))
+					::std::cerr << "Couldn't get a temporary file name. (ErrNo=" << GetLastError() << ")" << ::std::endl;
+                return false;
+            }
+            return open(szTempName, openMode | OPEN_TEMPORARY);
+        }
+
+        inline bool close() {
+            BOOL result = TRUE;
+            #ifdef SEQAN_VERBOSE
+                ::std::cerr << "files closed handles " << ::std::hex << handleAsync << " and " << handle << ::std::dec << ::std::endl;
+            #endif
+            if (handle != handleAsync)
+                result &= CloseHandle(handleAsync);
+            result &= CloseHandle(handle);
+            handleAsync = INVALID_HANDLE_VALUE;
+            handle = INVALID_HANDLE_VALUE;
+			SEQAN_PROSUB(SEQAN_PROOPENFILES, 1);
+            return result != FALSE;
+        }
+
+        inline bool read(void *memPtr, SizeType_ count) const {
+            SEQAN_PROADD(SEQAN_PROIO, (count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+            SEQAN_PROTIMESTART(tw);
+		    bool result = ReadFile(handle, memPtr, count, &_transferedBytes, NULL) != 0;
+            SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+            return result;
+        }
+
+        inline bool write(void const *memPtr, SizeType_ count) const {
+            SEQAN_PROADD(SEQAN_PROIO, (count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+            SEQAN_PROTIMESTART(tw);
+		    bool result = WriteFile(handle, memPtr, count, &_transferedBytes, NULL) != 0;
+            SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+            return result;
+        }
+
+		inline FilePtr seek(FilePtr _pos, DWORD origin = FILE_BEGIN) {
+//          LARGE_INTEGER li = _pos;
+//			return SetFilePointer(handleAsync, li.LowPart, &li.HighPart, MoveMethod);
+            LARGE_INTEGER new_pos, pos;
+            pos.QuadPart = _pos;
+            SetFilePointerEx(handle, pos, &new_pos, origin);
+//            position = new_pos.QuadPart;
+            return new_pos.QuadPart;
+		}
+
+		inline FilePtr tell() {
+			return seek(0, FILE_CURRENT);
+        }
+
+		inline FilePtr size() const {
+            LARGE_INTEGER result;
+            DWORD dwError, high;
+            result.LowPart = GetFileSize(handle, &high);
+            result.HighPart = high;
+            if (result.LowPart == INVALID_FILE_SIZE && (dwError = GetLastError()) != NO_ERROR) {
+				::std::cerr << "Couldn't get file size. (ErrNo=" << dwError << ")" << ::std::endl;
+                return 0;
+            }
+            return result.QuadPart;
+        }
+
+        inline bool setEof() const {
+            return SetEndOfFile(handle) != FALSE;
+        }
+
+		inline static DWORD error() {
+			return GetLastError();
+		}
+
+        operator bool () const {
+            return (handle != INVALID_HANDLE_VALUE) && (handleAsync != INVALID_HANDLE_VALUE);
+        }
+
+    protected:
+
+        DWORD getFileAccess(int openMode) {
+            switch (openMode & OPEN_MASK) {
+                case OPEN_RDONLY:
+                    return GENERIC_READ;
+                case OPEN_WRONLY:
+                    return GENERIC_WRITE;
+                case OPEN_RDWR:
+                    return GENERIC_READ | GENERIC_WRITE;
+				default:
+					return 0;
+            }
+        }
+
+        DWORD getCreationFlags(int openMode) {
+            if (openMode & OPEN_CREATE)
+                if (openMode & OPEN_APPEND)
+                    return OPEN_ALWAYS;
+                else
+                    return CREATE_ALWAYS;
+            else
+                return OPEN_EXISTING;
+        }
+
+        DWORD getExtraFlags(int openMode) {
+            DWORD extra = FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS;// | FILE_FLAG_WRITE_THROUGH;
+            if (openMode & OPEN_ASYNC) {
+                extra |= FILE_FLAG_OVERLAPPED;
+                #ifdef SEQAN_DIRECTIO
+                    extra |= FILE_FLAG_NO_BUFFERING;
+                #endif
+            }
+            if (openMode & OPEN_TEMPORARY)  extra |= FILE_FLAG_DELETE_ON_CLOSE;
+            return extra;
+        }
+
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // (SeqAn adaption)
+    //////////////////////////////////////////////////////////////////////////////
+
+    struct aiocb_win32 {
+        OVERLAPPED  overlapped;
+        Event       xmitDone;
+    };
+
+	template <typename TSpec>
+    struct AsyncRequest<File<Async<TSpec> > >
+    {
+        typedef aiocb_win32 Type;
+    };
+/*
+	template <typename TSpec>
+    struct aEvent<File<Async<TSpec> > >
+    {
+        typedef Event Type;
+    };
+
+
+	template <typename TSpec>
+    struct aQueue<File<Async<TSpec> > >
+    {
+        typedef IOQueue Type;
+    };
+
+	template <typename TSpec>
+    struct aHint<File<Async<TSpec> > >
+    {
+        typedef typename aQueue<File<Async<TSpec> > >::Type::aHint Type;
+    };
+
+	template <typename TSpec>
+    struct aCallback<File<Async<TSpec> > >
+    {
+        typedef typename aQueue<File<Async<TSpec> > >::Type::aCallback Type;
+    };*/
+
+
+	template <typename TSpec>
+    inline typename Size<File<Async<TSpec> > >::Type size(File<Async<TSpec> > &me) {
+        return me.size();
+    }
+
+	template <typename TSpec>
+    inline bool setEof(File<Async<TSpec> > &me) {
+        return me.setEof();
+    }
+
+	template <typename TSpec>
+    inline unsigned sectorSize(File<Async<TSpec> > const &) {
+        DWORD SpC, nofC, tnoC, aligning;
+        if (GetDiskFreeSpace(NULL, &SpC, &aligning, &nofC, &tnoC) == 0)  {
+            ::std::cerr << "Error " << GetLastError() << " while querying cluster size" << ::std::endl;
+            return 4096;
+        }
+        return aligning;
+    }
+
+
+    template < typename TSpec, typename TValue, typename TSize, typename TPos >
+    inline bool asyncReadAt(File<Async<TSpec> > & me, TValue *memPtr, TSize const count, TPos const fileOfs,
+        aiocb_win32 &request)
+    {
+        SEQAN_PROTIMESTART(tw);
+        LARGE_INTEGER ofs;
+        ofs.QuadPart = fileOfs;
+        ofs.QuadPart *= sizeof(TValue);
+        request.overlapped.Offset = ofs.LowPart;
+        request.overlapped.OffsetHigh = ofs.HighPart;
+        if (!request.xmitDone) open(request.xmitDone);
+        request.overlapped.hEvent = request.xmitDone.hEvent;
+        if (ReadFile(
+            me.handleAsync, 
+            memPtr, 
+            count * sizeof(TValue),
+            &ofs.LowPart,
+            &request.overlapped) || (me.error() == ERROR_IO_PENDING))
+        {
+            SEQAN_PROADD(SEQAN_PROIO, (sizeof(TValue) * count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+            SEQAN_PROADD(SEQAN_PROIWAIT, SEQAN_PROTIMEDIFF(tw));
+            return true;
+        }
+        if (me.error() == ERROR_NO_SYSTEM_RESOURCES) {  // read synchronoulsy instead
+            #ifdef SEQAN_DEBUG_OR_TEST_
+            	::std::cerr << "Warning: Falling back to sync. read. :( " << ::std::endl;
+            #endif
+			signal(request.xmitDone);
+            return readAt(me, memPtr, count, fileOfs);
+        }
+        return false;
+    }
+    
+    template < typename TSpec, typename TValue, typename TSize, typename TPos >
+    inline bool asyncWriteAt(File<Async<TSpec> > & me, TValue const *memPtr, TSize const count, TPos const fileOfs,
+        aiocb_win32 &request)
+    {
+        SEQAN_PROTIMESTART(tw);
+        LARGE_INTEGER ofs;
+        ofs.QuadPart = fileOfs;
+        ofs.QuadPart *= sizeof(TValue);
+        request.overlapped.Offset = ofs.LowPart;
+        request.overlapped.OffsetHigh = ofs.HighPart;
+        if (!request.xmitDone) open(request.xmitDone);
+        request.overlapped.hEvent = request.xmitDone.hEvent;
+        if (WriteFile(
+            me.handleAsync, 
+            memPtr, 
+            count * sizeof(TValue),
+            &ofs.LowPart,
+            &request.overlapped) || (me.error() == ERROR_IO_PENDING))
+        {
+            SEQAN_PROADD(SEQAN_PROIO, (sizeof(TValue) * count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+            SEQAN_PROADD(SEQAN_PROIWAIT, SEQAN_PROTIMEDIFF(tw));
+            return true;
+        }
+        if (me.error() == ERROR_NO_SYSTEM_RESOURCES) {  // write synchronoulsy instead
+            #ifdef SEQAN_DEBUG_OR_TEST_
+            	::std::cerr << "Warning: Falling back to sync. write. :( " << ::std::endl;
+            #endif
+			signal(request.xmitDone);
+            return writeAt(me, memPtr, count, fileOfs);
+        }
+        return false;
+    }
+
+    //////////////////////////////////////////////////////////////////////
+    // queue specific functions
+
+    inline bool waitFor(aiocb_win32 &request) {
+        SEQAN_PROTIMESTART(tw);
+		if (!waitFor(request.xmitDone, 60000))
+            ::std::cerr << "waitFor timeout" << ::std::endl;
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+        return true;
+	}
+
+    template < typename TTime >
+    inline bool waitFor(aiocb_win32 &request, TTime timeout_millis) {
+        SEQAN_PROTIMESTART(tw);
+		bool result = waitFor(request.xmitDone, timeout_millis);
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+        return result;
+	}
+
+	template < typename TSize >
+	inline TSize waitForAny(aiocb_win32 const * const contexts[], TSize count, DWORD timeout_millis = Event::Infinite) {
+        Event::Handle *handles = new Event::Handle[count];
+        for(TSize i = 0; i < count; ++i)
+            handles[i] = contexts[i]->xmitDone.hEvent;
+
+        SEQAN_PROTIMESTART(tw);
+        DWORD result = WaitForMultipleObjects(count, handles, false, timeout_millis);
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+		delete[] handles;
+        if (/*result >= WAIT_OBJECT_0 && */result < WAIT_OBJECT_0 + count)
+    		return result - WAIT_OBJECT_0;
+        return count;
+	}
+
+	template <typename TSpec>
+    inline bool cancel(File<Async<TSpec> > & me, aiocb_win32 const &request) {
+        return CancelIo(me.handleAsync);
+    }
+
+	template <typename TSpec>
+    inline bool flush(File<Async<TSpec> > & me) {
+		if (me.handle != me.handleAsync)	// in case of equality no direct access was done -> no flush needed
+        	return FlushFileBuffers(me.handle) != 0;
+        else
+            return true;
+    }
+
+    template < typename TSpec, typename AsyncRequest >
+    inline void release(File<Async<TSpec> > & me, AsyncRequest & request) { }
+
+
+/*        
+    //////////////////////////////////////////////////////////////////////
+    // callback based read/write
+
+    template < typename TSpec, typename TValue, typename TSize,
+               typename aCallback, typename aHint >
+    inline typename AsyncRequest<File<Async<TSpec> > >::Type
+    asyncRead(File<Async<TSpec> > & me, TValue *memPtr, TSize const count,
+        aCallback* cb, aHint* hint)
+    {
+        DWORD bsize = (DWORD)(count * sizeof(TValue));
+        typename AsyncRequest<File<Async<TSpec> > >::Type request = 
+            me.queue->asyncReadAt(
+                me.handleAsync,
+                me.position,
+                memPtr,
+                bsize,
+                cb,
+                hint);
+        me.position += bsize;
+        return request;
+    }
+    
+    template < typename TSpec, typename TValue, typename TSize,
+               typename aCallback, typename aHint >
+    inline typename AsyncRequest<File<Async<TSpec> > >::Type
+    asyncWrite(File<Async<TSpec> > & me, TValue const *memPtr, TSize const count,
+        aCallback* cb, aHint* hint)
+    {
+        DWORD bsize = (DWORD)(count * sizeof(TValue));
+        typename AsyncRequest<File<Async<TSpec> > >::Type request = 
+            me.queue->asyncWriteAt(
+                memPtr,
+                me.handleAsync,
+                me.position,
+                bsize,
+                cb,
+                hint);
+        me.position += bsize;
+        return request;
+    }
+
+    template < typename TSpec, typename TValue, typename TSize, typename TPos,
+               typename aCallback, typename aHint >
+    inline typename AsyncRequest<File<Async<TSpec> > >::Type
+    asyncReadAt(File<Async<TSpec> > & me, TValue *memPtr, TSize const count, TPos const fileOfs,
+        aCallback* cb, aHint* hint)
+    {
+        DWORD bsize = (DWORD)(count * sizeof(TValue));
+        return me.queue->asyncReadAt(
+            me.handleAsync,
+            fileOfs * sizeof(TValue),
+            memPtr,
+            bsize,
+            cb,
+            hint);
+    }
+    
+    template < typename TSpec, typename TValue, typename TSize, typename TPos,
+               typename aCallback, typename aHint >
+    inline typename AsyncRequest<File<Async<TSpec> > >::Type
+    asyncWriteAt(File<Async<TSpec> > & me, TValue *memPtr, TSize const count, TPos const fileOfs,
+        aCallback* cb, aHint* hint)
+    {
+        DWORD bsize = (DWORD)(count * sizeof(TValue));
+        return me.queue->asyncWriteAt(
+            memPtr,
+            me.handleAsync,
+            fileOfs * sizeof(TValue),
+            bsize,
+            cb,
+            hint);
+    }
+
+
+    //////////////////////////////////////////////////////////////////////
+    // event based read/write
+
+    template < typename TSpec, typename TValue, typename TSize,
+               typename aEvent >
+    inline typename AsyncRequest<File<Async<TSpec> > >::Type
+    asyncRead(File<Async<TSpec> > & me, TValue *memPtr, TSize const count,
+        aEvent &event)
+    {
+        DWORD bsize = (DWORD)(count * sizeof(TValue));
+        typename AsyncRequest<File<Async<TSpec> > >::Type request = 
+            me.queue->asyncReadAt(
+                me.handleAsync,
+                me.position,
+                memPtr,
+                bsize,
+                event);
+        me.position += bsize;
+        return request;
+    }
+    
+    template < typename TSpec, typename TValue, typename TSize,
+               typename aEvent >
+    inline typename AsyncRequest<File<Async<TSpec> > >::Type
+    asyncWrite(File<Async<TSpec> > & me, TValue *memPtr, TSize const count,
+        aEvent &event)
+    {
+        DWORD bsize = (DWORD)(count * sizeof(TValue));
+        typename AsyncRequest<File<Async<TSpec> > >::Type request =  
+            me.queue->asyncWriteAt(
+                memPtr,
+                me.handleAsync,
+                me.position,
+                bsize,
+                event);
+        me.position += bsize;
+        return request;
+    }
+
+    template < typename TSpec, typename TValue, typename TSize, typename TPos,
+               typename aEvent >
+    inline typename AsyncRequest<File<Async<TSpec> > >::Type
+    asyncReadAt(File<Async<TSpec> > & me, TValue *memPtr, TSize const count, TPos const fileOfs,
+        aEvent &event)
+    {
+        DWORD bsize = (DWORD)(count * sizeof(TValue));
+        return me.queue->asyncReadAt(
+            me.handleAsync,
+            fileOfs * sizeof(TValue),
+            memPtr,
+            bsize,
+            event);
+    }
+    
+    template < typename TSpec, TValue, typename TSize, typename TPos,
+               typename aEvent >
+    inline typename AsyncRequest<File<Async<TSpec> > >::Type
+    asyncWriteAt(File<Async<TSpec> > & me, TValue *memPtr, TSize const count, TPos const fileOfs,
+        aEvent &event)
+    {
+        DWORD bsize = (DWORD)(count * sizeof(TValue));
+        return me.queue->asyncWriteAt(
+            memPtr,
+            me.handleAsync,
+            fileOfs * sizeof(TValue),
+            bsize,
+            event);
+    }
+
+
+    //////////////////////////////////////////////////////////////////////
+    // queue specific functions
+
+	template <typename TSpec>
+    inline void flush(File<Async<TSpec> > & me) {
+        me.queue->flush();
+    }
+
+    template < typename TSpec, typename AsyncRequest >
+    inline void release(File<Async<TSpec> > & me, AsyncRequest & request) {
+        me.queue->release(request);
+    }
+*/
+
+	//////////////////////////////////////////////////////////////////////////////
+	// page aligned allocate for direct file io
+
+    struct TagAllocateAligned_;	//< allocate page aligned memory for direct i/o access
+    typedef Tag<TagAllocateAligned_> const TagAllocateAligned;
+
+	template <typename T, typename TValue, typename TSize>
+	inline void
+	allocate(T const &, 
+			 TValue * & data,
+			 TSize count,
+			 TagAllocateAligned const)
+	{
+		data = (TValue *) VirtualAlloc(NULL, count * sizeof(TValue), MEM_COMMIT, PAGE_READWRITE);
+        if (data)
+            SEQAN_PROADD(SEQAN_PROMEMORY, count * sizeof(TValue));
+        else
+			::std::cerr << "AlignAllocator: Could not allocate memory of size " << ::std::hex << count * sizeof(TValue) << ::std::dec << ". (ErrNo=" << GetLastError() << ")" << ::std::endl;
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// page aligned deallocate for direct file io
+
+	template <typename T, typename TValue, typename TSize>
+	inline void 
+	deallocate( T const &,
+				TValue * data, 
+				TSize count,
+				TagAllocateAligned const)
+	{
+		if (data) {
+			VirtualFree(data, 0, MEM_RELEASE);
+			if (count)	// .. to use count if SEQAN_PROFILE is not defined
+				SEQAN_PROSUB(SEQAN_PROMEMORY, count * sizeof(TValue));
+		}
+	}
+
+#else
+
+    
+	template <typename TSpec>
+    class File<Async<TSpec> > : public File<Sync<TSpec> >
+    {
+    public:
+
+        typedef File<Sync<TSpec> >  Base;
+
+        typedef off_t			FilePtr;
+		typedef off_t           SizeType;   // type of file size
+        typedef size_t          SizeType_;  // type of transfer size (for read or write)
+		typedef int				Handle;
+
+        Handle handleAsync;
+		using Base::handle;
+
+		File(void * = NULL): 	// to be compatible with the FILE*(NULL) constructor
+			handleAsync(-1) {}
+
+        virtual ~File() {}
+        
+        bool open(char const *fileName, int openMode = DefaultOpenMode<File>::VALUE) {
+            handle = ::open(fileName, Base::_getOFlag(openMode & ~OPEN_ASYNC), S_IREAD | S_IWRITE);
+			if (handle == -1) 
+			{
+				handleAsync = handle;
+				if (!(openMode & OPEN_QUIET))
+					::std::cerr << "Open failed on file " << fileName << ". (" << ::strerror(errno) << ")" << ::std::endl;
+				return false;
+			}
+
+			if (Base::_getOFlag(openMode | OPEN_ASYNC) & O_DIRECT) 
+			{
+				handleAsync = ::open(fileName, Base::_getOFlag(openMode | (OPEN_ASYNC & ~OPEN_CREATE)), S_IREAD | S_IWRITE);
+				if (handleAsync == -1 || errno == EINVAL) {	// fall back to cached access
+					#ifdef SEQAN_DEBUG_OR_TEST_
+						if (!(openMode & OPEN_QUIET))
+							::std::cerr << "Warning: Direct access openening failed. (" << ::strerror(errno) << ")" << ::std::endl;
+					#endif
+					handleAsync = handle;
+				}
+				#ifdef SEQAN_DEBUG_OR_TEST_
+				    else
+						if (!(openMode & OPEN_QUIET))
+							::std::cerr << "Direct access successfully initiated" << ::std::endl;
+				#endif
+			} else
+				handleAsync = handle;
+
+			if (sizeof(FilePtr) < 8 && !(openMode & OPEN_QUIET))
+				// To remove this warning, you have to options:
+				// 1. include the following line before including anything in your application
+				//    #define _FILE_OFFSET_BITS 64
+				// 2. include <seqan/platform.h> or <seqan/sequence.h> before any other include
+				::std::cerr << "WARNING: FilePtr is not 64bit wide" << ::std::endl;
+
+
+			SEQAN_PROADD(SEQAN_PROOPENFILES, 1);
+            return true;
+        }
+
+		bool close() {
+			bool result = true;
+			if (handleAsync != handle && handleAsync != -1)
+	            result &= (::close(handleAsync) == 0);
+            result &= (::close(handle) == 0);
+            handleAsync = -1;
+            handle = -1;
+			SEQAN_PROSUB(SEQAN_PROOPENFILES, 1);
+            return result;
+        }
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // (SeqAn adaption)
+    //////////////////////////////////////////////////////////////////////////////
+/*
+	template <typename TSpec>
+    struct aQueue<File<Async<TSpec> > >
+    {
+        typedef void* Type;
+    };
+*/
+
+	template <typename TSpec>
+    struct AsyncRequest<File<Async<TSpec> > >
+    {
+		typedef aiocb Type;
+    };
+/*
+	template <typename TSpec>
+    struct aEvent<File<Async<TSpec> > >
+    {
+        typedef aiocb Type;
+    };
+*/
+
+    //////////////////////////////////////////////////////////////////////
+    // event based read/write
+
+//    enum { AsyncIOSignal_ = SIGIO };
+
+	inline void printRequest(aiocb &request, const char *_hint = NULL) {
+		::std::cerr << ::std::hex;
+		if (_hint)
+			::std::cerr << _hint << ::std::endl;
+		::std::cerr << "fildes:  " << request.aio_fildes << ::std::endl;
+		::std::cerr << "buffer:  " << (unsigned long)request.aio_buf << ::std::endl;
+		::std::cerr << "offset:  " << request.aio_offset<< ::std::endl;
+		::std::cerr << "nbytes:  " << request.aio_nbytes << ::std::endl;
+		::std::cerr << "event:   " << request.aio_sigevent.sigev_notify << ::std::endl;
+		::std::cerr << "Raddr:   " << &request << ::std::endl;
+		::std::cerr << ::std::dec;
+	}
+
+    template < typename TSpec, typename TValue, typename TSize, typename TPos >
+    bool asyncReadAt(File<Async<TSpec> > & me, TValue *memPtr, TSize const count, TPos const fileOfs,
+        aiocb &request)
+    {
+        SEQAN_PROTIMESTART(tw);
+        memset(&request, 0, sizeof(aiocb));
+        request.aio_fildes = me.handleAsync;
+        request.aio_buf = memPtr;
+        request.aio_offset = fileOfs;
+        request.aio_offset *= sizeof(TValue);
+        request.aio_nbytes = count * sizeof(TValue);
+        request.aio_sigevent.sigev_notify = SIGEV_NONE;
+/*      request.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
+        request.aio_sigevent.sigev_signo = AsyncIOSignal_;
+        request.aio_sigevent.sigev_value.sival_ptr = &request;
+		#ifdef SEQAN_VVERBOSE
+			printRequest(request, "aio_read():");
+		#endif
+*/      if (request.aio_nbytes == 0) return true;
+		SEQAN_PROADD(SEQAN_PROIO, (request.aio_nbytes + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+		int result = aio_read(&request);
+        SEQAN_PROADD(SEQAN_PROIWAIT, SEQAN_PROTIMEDIFF(tw));
+        if (result) 
+		{
+			request.aio_nbytes = 0;
+			if (errno == EAGAIN) {  // read synchronoulsy instead
+#ifdef SEQAN_DEBUG_OR_TEST_
+            	::std::cerr << "Warning: Falling back to sync. read. :( " << ::std::endl;
+#endif
+				return readAt(me, memPtr, count, fileOfs);
+			}
+#ifdef SEQAN_DEBUG
+			else
+				::std::cerr << "asyncReadAt returned " << result << " and errno=" << errno << " " << ::strerror(errno) << ::std::endl;
+#endif
+        }
+		return result == 0;
+    }
+    
+    template < typename TSpec, typename TValue, typename TSize, typename TPos >
+    bool asyncWriteAt(File<Async<TSpec> > & me, const TValue *memPtr, TSize const count, TPos const fileOfs,
+        aiocb &request)
+    {
+        SEQAN_PROTIMESTART(tw);
+        memset(&request, 0, sizeof(aiocb));
+        request.aio_fildes = me.handleAsync;
+        request.aio_buf = const_cast<TValue*>(memPtr);
+        request.aio_offset = fileOfs;
+        request.aio_offset *= sizeof(TValue);
+        request.aio_nbytes = count * sizeof(TValue);
+        request.aio_sigevent.sigev_notify = SIGEV_NONE;
+/*      request.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
+        request.aio_sigevent.sigev_signo = AsyncIOSignal_;
+        request.aio_sigevent.sigev_value.sival_ptr = &request;
+		#ifdef SEQAN_VVERBOSE
+			printRequest(request, "aio_write():");
+		#endif
+*/      if (request.aio_nbytes == 0) return true;
+		SEQAN_PROADD(SEQAN_PROIO, (request.aio_nbytes + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+		int result = aio_write(&request);
+        SEQAN_PROADD(SEQAN_PROIWAIT, SEQAN_PROTIMEDIFF(tw));
+        if (result) 
+		{
+			request.aio_nbytes = 0;
+			if (errno == EAGAIN) {  // write synchronoulsy instead
+#ifdef SEQAN_DEBUG_OR_TEST_
+            	::std::cerr << "Warning: Falling back to sync. write. :( " << ::std::endl;
+#endif
+				return writeAt(me, memPtr, count, fileOfs);
+			}
+#ifdef SEQAN_DEBUG
+			else
+				::std::cerr << "asyncWriteAt returned " << result << " and errno=" << errno << " " << ::strerror(errno) << ::std::endl;
+#endif
+        }
+        return result == 0;
+    }
+
+	template <typename TSpec>
+    inline bool flush(File<Async<TSpec> > & me) {
+		#if _POSIX_SYNCHRONIZED_IO > 0
+			return me.handle == me.handleAsync || fdatasync(me.handle) == 0;
+		#else
+			return me.handle == me.handleAsync || fsync(me.handle) == 0;
+		#endif
+    }
+
+    //////////////////////////////////////////////////////////////////////
+    // queue specific functions
+
+	inline bool waitFor(aiocb &request) {
+/*		#ifdef SEQAN_VVERBOSE
+			printRequest(request, "aio_suspend():");
+		#endif
+*/
+		if (request.aio_nbytes == 0) return true;
+		aiocb * cblist = &request;
+        SEQAN_PROTIMESTART(tw);
+		int result = aio_suspend(&cblist, 1, NULL);
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+        #ifdef SEQAN_DEBUG
+			if (result) {
+	 			int eno = aio_error(&request);
+				if (eno != EINPROGRESS)
+					::std::cerr << "waitFor: aio_error returned " << ::strerror(eno) << " and errno=" << errno << " " << ::strerror(errno) << ::std::endl;
+			}
+		#endif
+		return result == 0;
+	}
+
+	inline bool waitFor(aiocb &request, long timeout_millis) {
+/*		#ifdef SEQAN_VVERBOSE
+			printRequest(request, "aio_suspend_timeout():");
+		#endif
+*/
+		if (request.aio_nbytes == 0) return true;
+
+		int result;
+		if (timeout_millis == 0)
+			result = aio_error(&request);
+		else {
+			aiocb * cblist = &request;
+			timespec ts;
+			ts.tv_sec = timeout_millis / 1000;
+			ts.tv_nsec = (timeout_millis % 1000) * 1000;
+			SEQAN_PROTIMESTART(tw);
+			result = aio_suspend(&cblist, 1, &ts);
+			SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+		}
+
+        #ifdef SEQAN_DEBUG
+			if (result) {
+	 			int eno = aio_error(&request);
+				if (eno != EINPROGRESS)
+					::std::cerr << "waitFor(timeOut=" << timeout_millis << "): aio_error returned " << ::strerror(eno) << " and errno=" << errno << " " << ::strerror(errno) << ::std::endl;
+			}
+		#endif
+        return result == 0;
+	}
+
+	template < typename TSize >
+	inline TSize waitForAny(aiocb const * const contexts[], TSize count) {
+        SEQAN_PROTIMESTART(tw);
+		bool result = aio_suspend(contexts, count, NULL);
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+        return result == 0;
+	}
+
+	template < typename TSize >
+	inline TSize waitForAny(aiocb const * const contexts[], TSize count, long timeout_millis) {
+        timespec ts;
+        ts.tv_sec = timeout_millis / 1000;
+        ts.tv_nsec = (timeout_millis % 1000) * 1000;
+        SEQAN_PROTIMESTART(tw);
+		bool result = aio_suspend(contexts, count, &ts);
+        SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+        return result == 0;
+	}
+
+	template <typename TSpec>
+    inline bool cancel(File<Async<TSpec> > & me, aiocb &request) {
+/*		#ifdef SEQAN_VVERBOSE
+			printRequest(request, "aio_cancel():");
+		#endif
+*/      return aio_cancel(me.handleAsync, &request) == 0;
+    }
+
+    inline int error(aiocb const & request) {
+        return aio_error(&request);
+    }
+
+    inline int _returnValue(aiocb & request) {
+        return aio_return(&request);
+    }
+
+	template <typename TSpec>
+    inline void release(File<Async<TSpec> > & /*me*/, aiocb const & /*request*/) {}
+
+/*
+    typedef void (*sighandler_t)(int);
+    static unsigned AsyncIOHandlerRefCount_ = 0;
+    static struct sigaction AsyncIOOldSig_;
+
+    inline void AsyncIOHandler_(int sigNo, siginfo_t *info, void *hint) {
+        SEQAN_ASSERT(sigNo == AsyncIOSignal_);
+        // TODO: signal respective event
+        // currently we don't need async IO handlers because
+        // we only wait for single events
+    }
+
+    static sighandler_t _addAsyncIOHandler() {
+        struct sigaction newSig, oldSig;
+        newSig.sa_sigaction = AsyncIOHandler_;
+        sigemptyset(&newSig.sa_mask);
+        newSig.sa_flags = SA_RESTART + SA_SIGINFO;
+        if (sigaction(AsyncIOSignal_, &newSig, &oldSig) < 0)
+            return SIG_ERR;
+        return oldSig.sa_handler;
+    }
+*/
+    
+	//////////////////////////////////////////////////////////////////////////////
+	// page aligned allocate for direct file io
+
+    struct TagAllocateAligned_;	//< allocate page aligned memory for direct i/o access
+    typedef Tag<TagAllocateAligned_> const TagAllocateAligned;
+
+	template <typename T, typename TValue, typename TSize>
+	inline void
+	allocate(T const & /*me*/, 
+			 TValue * & data,
+			 TSize count,
+			 TagAllocateAligned const)
+	{
+		data = (TValue *) ::valloc(count * sizeof(TValue));
+#ifdef SEQAN_PROFILE 
+        if (data)
+			SEQAN_PROADD(SEQAN_PROMEMORY, count * sizeof(TValue));
+		else
+			::std::cerr << "AlignAllocator: Could not allocate memory of size " << ::std::hex << 
+				count * sizeof(TValue) << " with page alignment. (ErrNo=" << ::std::dec <<
+				errno << ")" << ::std::endl;
+#endif
+	}
+
+	//////////////////////////////////////////////////////////////////////////////
+	// page aligned deallocate for direct file io
+
+	template <typename T, typename TValue, typename TSize>
+	inline void 
+	deallocate( T const & /*me*/,
+				TValue * data,
+				TSize
+#ifdef SEQAN_PROFILE 
+					count
+#endif
+					,
+				TagAllocateAligned const)
+	{
+#ifdef SEQAN_PROFILE 
+        if (data && count)	// .. to use count if SEQAN_PROFILE is not defined
+			SEQAN_PROSUB(SEQAN_PROMEMORY, count * sizeof(TValue));
+#endif
+		::free(data);
+	}
+
+    template < typename TSpec, typename TSize >
+    inline void resize(File<Async<TSpec> > &me, TSize new_length) {
+		me.resize(new_length);
+    }
+	
+
+#endif
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global functions
+
+	template <typename TSpec>
+    struct Size< File<Async<TSpec> > >
+    {
+        typedef typename File<Async<TSpec> >::SizeType Type;
+    };
+
+	template <typename TSpec>
+    struct Position< File<Async<TSpec> > >
+    {
+        typedef typename File<Async<TSpec> >::FilePtr Type;
+    };
+
+	template <typename TSpec>
+    struct Difference< File<Async<TSpec> > >
+    {
+        typedef typename File<Async<TSpec> >::FilePtr Type;
+    };
+
+
+
+    template < typename TSpec, typename TValue, typename TSize>
+	inline void
+	allocate( File<Async<TSpec> > const & me,
+			  TValue * & data, 
+			  TSize count)
+	{
+		allocate(me, data, count, TagAllocateAligned());
+	}
+
+    template <typename TSpec, typename TValue, typename TSize>
+	inline void
+	deallocate( File<Async<TSpec> > const & me,
+				TValue * data, 
+				TSize count)
+	{
+		deallocate(me, data, count, TagAllocateAligned());
+	}
+
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/system/file_directory.h b/src/SeqAn-1.3/seqan/system/file_directory.h
new file mode 100644
index 0000000..f9b7d77
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/file_directory.h
@@ -0,0 +1,284 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_FILE_DIRECTORY_H
+#define SEQAN_HEADER_FILE_DIRECTORY_H
+
+#ifdef PLATFORM_WINDOWS
+# include <io.h>
+#else
+# include <dirent.h>
+#endif
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+#ifdef PLATFORM_WINDOWS
+
+    class Directory
+    {
+	protected:
+	
+		intptr_t			handle;
+		struct _finddata_t	entry;
+		bool				_atEnd;
+
+		friend inline bool open(Directory &dir, char const *dirName);
+		friend inline bool close(Directory &dir);
+		friend inline char const * value(Directory &dir);
+		friend inline char const * value(Directory const &dir);
+		friend inline Directory & goNext(Directory &dir);
+		friend inline bool atEnd(Directory &dir);
+		friend inline bool atEnd(Directory const &dir);
+
+	public:
+
+		Directory()
+		{
+			handle = 0;
+			_atEnd = true;
+		}
+		
+		Directory(char const *dirName)
+		{
+			open(*this, dirName);
+		}
+		
+		~Directory()
+		{
+			close(*this);
+		}
+		
+		inline char const * operator* () const
+		{
+			return value(*this);
+		}
+
+		inline Directory & operator++ ()
+		{
+			return goNext(*this);
+		}
+		
+		inline operator bool () const
+		{
+			return !_atEnd;
+		}
+	};
+
+//////////////////////////////////////////////////////////////////////////////	
+
+	inline bool
+	open(Directory &dir, char const *dirName)
+	{
+		CharString selection = dirName;
+		append(selection, "\\*");
+		dir._atEnd = ((dir.handle = _findfirst(toCString(selection), &dir.entry)) == -1L);
+		return !dir._atEnd;
+	}
+
+	inline bool
+	close(Directory &dir)
+	{
+		int result = 0;
+		if (dir.handle)
+			result = _findclose(dir.handle);
+
+		dir._atEnd = true;
+		dir.handle = 0;
+		return result == 0;
+	}
+
+	inline char const *
+	value(Directory &dir)
+	{
+		return dir.entry.name;
+	}
+
+	inline char const *
+	value(Directory const &dir)
+	{
+		return dir.entry.name;
+	}
+
+	inline Directory &
+	goNext(Directory &dir)
+	{
+		dir._atEnd = (_findnext(dir.handle, &dir.entry) != 0);
+		return dir;
+	}
+
+	inline bool
+	atEnd(Directory &dir)
+	{
+		return dir._atEnd;
+	}
+	
+	inline bool
+	atEnd(Directory const &dir)
+	{
+		return dir._atEnd;
+	}
+	
+//////////////////////////////////////////////////////////////////////////////	
+	
+	
+#else
+
+
+//////////////////////////////////////////////////////////////////////////////	
+
+    class Directory
+    {
+	protected:
+	
+		DIR		*handle;
+		dirent	*it;
+		
+		friend inline bool open(Directory &dir, char const *dirName);
+		friend inline bool close(Directory &dir);
+		friend inline char const * value(Directory &dir);
+		friend inline char const * value(Directory const &dir);
+		friend inline Directory & goBegin(Directory &dir);
+		friend inline Directory & goNext(Directory &dir);
+		friend inline bool atEnd(Directory &dir);
+		friend inline bool atEnd(Directory const &dir);
+
+	public:
+
+		Directory()
+		{
+			handle = NULL;
+			it = NULL;
+		}
+		
+		Directory(char const *dirName)
+		{
+			open(*this, dirName);
+		}
+		
+		~Directory()
+		{
+			close(*this);
+		}
+		
+		inline char const * operator* () const
+		{
+			return value(*this);
+		}
+
+		inline Directory & operator++ ()
+		{
+			return goNext(*this);
+		}
+		
+		inline operator bool () const
+		{
+			return !atEnd(*this);
+		}
+	};
+	
+//////////////////////////////////////////////////////////////////////////////	
+	
+	inline bool
+	open(Directory &dir, char const *dirName)
+	{
+		if ((dir.handle = opendir(dirName)) != NULL)
+		{
+			goNext(dir);
+			return true;
+		}
+		dir.it = NULL;
+		return false;
+	}
+
+	inline bool
+	close(Directory &dir)
+	{
+		int result = 0;
+		if (dir.handle != NULL)
+			result = closedir(dir.handle);
+
+		dir.handle = NULL;
+		dir.it = NULL;
+		return result == 0;
+	}
+
+	inline char const *
+	value(Directory &dir)
+	{
+		return dir.it->d_name;
+	}
+
+	inline char const *
+	value(Directory const &dir)
+	{
+		return dir.it->d_name;
+	}
+
+	inline Directory &
+	goBegin(Directory &dir)
+	{
+		rewinddir(dir.handle);
+		return goNext(dir);
+	}
+
+	inline Directory &
+	goNext(Directory &dir)
+	{
+		dir.it = readdir(dir.handle);
+		return dir;
+	}
+
+	inline bool
+	atEnd(Directory &dir)
+	{
+		return dir.it == NULL;
+	}
+	
+	inline bool
+	atEnd(Directory const &dir)
+	{
+		return dir.it == NULL;
+	}
+	
+#endif
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/system/file_manual_forwards.h b/src/SeqAn-1.3/seqan/system/file_manual_forwards.h
new file mode 100644
index 0000000..c49a644
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/file_manual_forwards.h
@@ -0,0 +1,160 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_FILE_MANUAL_FORWARDS_H 
+#define SEQAN_HEADER_FILE_MANUAL_FORWARDS_H 
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// TagAllocateAligned_
+
+struct TagAllocateAligned_;       	// "projects/library/seqan/file/file_async.h"(283)
+//struct aiocb;
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+//////////////////////////////////////////////////////////////////////////////
+
+//____________________________________________________________________________
+// (*sighandler_t)(int)
+
+typedef void (*sighandler_t)(int);       	// "projects/library/seqan/file/file_async.h"(258)
+
+//____________________________________________________________________________
+// TagAllocateAligned
+
+typedef Tag<TagAllocateAligned_> const TagAllocateAligned;       	// "projects/library/seqan/file/file_async.h"(284)
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+//____________________________________________________________________________
+// allocate
+
+template <typename T, typename TValue, typename TSize> inline void allocate(T const & me, TValue * & data, TSize count, TagAllocateAligned const);       	// "projects/library/seqan/file/file_async.h"(292)
+template <typename TSpec, typename TValue, typename TSize> inline void allocate( File<Async<TSpec> > const & me, TValue * & data, TSize count);       	// "projects/library/seqan/file/file_async.h"(351)
+
+//____________________________________________________________________________
+// asyncReadAt
+
+template <typename TSpec, typename TValue, typename TSize, typename TPos > bool asyncReadAt(File<Async<TSpec> > & me, TValue *memPtr, TSize const count, TPos const fileOfs, aiocb &request);       	// "projects/library/seqan/file/file_async.h"(136)
+
+//____________________________________________________________________________
+// asyncWriteAt
+
+template <typename TSpec, typename TValue, typename TSize, typename TPos > bool asyncWriteAt(File<Async<TSpec> > & me, const TValue *memPtr, TSize const count, TPos const fileOfs, aiocb &request);       	// "projects/library/seqan/file/file_async.h"(160)
+
+//____________________________________________________________________________
+// cancel
+
+template <typename TSpec> inline bool cancel(File<Async<TSpec> > & me, aiocb &request);       	// "projects/library/seqan/file/file_async.h"(242)
+
+//____________________________________________________________________________
+// deallocate
+
+template <typename T, typename TValue, typename TSize> inline void deallocate( T const & me, TValue * data, TSize count, TagAllocateAligned const);       	// "projects/library/seqan/file/file_async.h"(310)
+template <typename TSpec, typename TValue, typename TSize> inline void deallocate( File<Async<TSpec> > const & me, TValue * data, TSize count);       	// "projects/library/seqan/file/file_async.h"(360)
+
+//____________________________________________________________________________
+// error
+
+inline int error(aiocb const &request);       	// "projects/library/seqan/file/file_async.h"(246)
+
+//____________________________________________________________________________
+// fileExists
+
+inline bool fileExists(const char *fileName);       	// "projects/library/seqan/file/file_sync.h"(189)
+
+//____________________________________________________________________________
+// fileUnlink
+
+inline bool fileUnlink(const char *fileName);       	// "projects/library/seqan/file/file_sync.h"(194)
+
+//____________________________________________________________________________
+// flush
+
+template <typename TSpec> inline bool flush(File<Async<TSpec> > & me);       	// "projects/library/seqan/file/file_async.h"(182)
+
+//____________________________________________________________________________
+// printRequest
+
+inline void printRequest(aiocb &request);       	// "projects/library/seqan/file/file_async.h"(125)
+
+//____________________________________________________________________________
+// read
+
+template <typename TSpec, typename TValue, typename TSize > inline bool read(File<Sync<TSpec> > & me, TValue *memPtr, TSize const count);       	// "projects/library/seqan/file/file_sync.h"(226)
+
+//____________________________________________________________________________
+// release
+
+template <typename TSpec> inline void release(File<Async<TSpec> > & me, aiocb const &request);       	// "projects/library/seqan/file/file_async.h"(255)
+
+//____________________________________________________________________________
+// _returnValue
+
+inline int _returnValue(aiocb &request);       	// "projects/library/seqan/file/file_async.h"(250)
+
+//____________________________________________________________________________
+// waitFor
+
+inline bool waitFor(aiocb &request);       	// "projects/library/seqan/file/file_async.h"(189)
+inline bool waitFor(aiocb &request, long timeout_millis);       	// "projects/library/seqan/file/file_async.h"(204)
+
+//____________________________________________________________________________
+// waitForAny
+
+template <typename TSize > inline TSize waitForAny(aiocb const * const contexts[], TSize count);       	// "projects/library/seqan/file/file_async.h"(223)
+template <typename TSize > inline TSize waitForAny(aiocb const * const contexts[], TSize count, long timeout_millis);       	// "projects/library/seqan/file/file_async.h"(231)
+
+//____________________________________________________________________________
+// write
+
+template <typename TSpec, typename TValue, typename TSize > inline bool write(File<Sync<TSpec> > & me, TValue const *memPtr, TSize const count);       	// "projects/library/seqan/file/file_sync.h"(231)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/system/file_sync.h b/src/SeqAn-1.3/seqan/system/file_sync.h
new file mode 100644
index 0000000..181890f
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/file_sync.h
@@ -0,0 +1,421 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_FILE_SIMPLE_H
+#define SEQAN_HEADER_FILE_SIMPLE_H
+
+#include <fcntl.h>          // O_CREAT ..
+#include <sys/stat.h>       // 
+#include <cstdio>           // tmpnam(..)
+
+#ifdef PLATFORM_WINDOWS
+# include <io.h>            // read(..) ..
+#else
+# include <cstdlib>
+# include <cerrno>
+# include <unistd.h>
+#endif
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+
+	template <typename TSpec /* = void */>
+	struct Sync;
+
+
+#ifdef PLATFORM_WINDOWS
+
+    //////////////////////////////////////////////////////////////////////////////
+    // Windows rtl file access
+	template <typename TSpec>
+	class File<Sync<TSpec> >
+    {
+    public:
+
+		typedef __int64			FilePtr;
+		typedef __int64         SizeType;   // type of file size
+        typedef unsigned int    SizeType_;  // type of transfer size (for read or write)
+		typedef int				Handle;
+
+        Handle handle;
+
+        File(void * /*dummy*/ = NULL): // to be compatible with the FILE*(NULL) constructor
+            handle(-1) {}
+
+        inline int _getOFlag(int openMode) const 
+		{
+			int result;
+
+			switch (openMode & OPEN_MASK) {
+                case OPEN_RDONLY:
+                    result = _O_RDONLY;
+					break;
+                case OPEN_WRONLY:
+                    result = _O_WRONLY;
+					break;
+                case OPEN_RDWR:
+				default:
+                    result = _O_RDWR;
+					break;
+			}
+
+			if (openMode & OPEN_CREATE)     result |= _O_CREAT;
+			if (!(openMode & OPEN_APPEND))	result |= _O_TRUNC;
+            if (openMode & OPEN_TEMPORARY)  result |= _O_TEMPORARY;
+			return result | _O_BINARY;
+        }
+
+        bool open(char const *fileName, int openMode = DefaultOpenMode<File>::VALUE) 
+		{
+            handle = _open(fileName, _getOFlag(openMode), _S_IREAD | _S_IWRITE);
+			if (handle == -1) {
+				if (!(openMode & OPEN_QUIET))
+					::std::cerr << "Open failed on file " << fileName << ". (" << ::strerror(errno) << ")" << ::std::endl;
+				return false;
+			}
+			SEQAN_PROADD(SEQAN_PROOPENFILES, 1);
+            return true;
+        }
+
+        bool openTemp(int openMode = DefaultOpenTempMode<File>::VALUE) 
+		{
+#ifdef SEQAN_DEFAULT_TMPDIR
+			char *fileName = _tempnam(SEQAN_DEFAULT_TMPDIR, "SQN");
+#else
+			char *fileName = _tempnam(NULL, "SQN");
+#endif
+			if (!fileName) {
+				if (!(openMode & OPEN_QUIET))
+					::std::cerr << "Cannot create a unique temporary filename" << ::std::endl;
+				return false;
+			}
+            bool result = open(fileName, openMode | OPEN_TEMPORARY);
+			free(fileName);
+			return result;
+        }
+
+        inline bool close() 
+		{
+            if (_close(handle) != 0)
+                return false;
+            handle = -1;
+			SEQAN_PROSUB(SEQAN_PROOPENFILES, 1);
+            return true;
+        }
+
+		inline int read(void *buffer, SizeType_ count) const 
+		{
+            SEQAN_PROADD(SEQAN_PROIO, (count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+            SEQAN_PROTIMESTART(tw);
+		    int result = _read(handle, buffer, count);
+            SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+            return result;
+		}
+
+		inline int write(void const *buffer, SizeType_ count) const 
+		{
+            SEQAN_PROADD(SEQAN_PROIO, (count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+            SEQAN_PROTIMESTART(tw);
+		    int result = _write(handle, buffer, count);
+            SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+            return result;
+		}
+
+		inline FilePtr seek(FilePtr pos, int origin = SEEK_SET) const 
+		{
+			return _lseeki64(handle, pos, origin);
+		}
+
+		inline FilePtr tell() const 
+		{
+			return _telli64(handle);
+		}
+
+		static int error() 
+		{
+			return errno;
+		}
+
+        operator bool () const 
+		{
+            return handle != -1;
+        }
+    };
+
+	inline bool fileExists(const char *fileName) 
+	{
+		struct _stat buf;
+		return _stat(fileName, &buf) == 0;
+	}
+
+	inline bool fileUnlink(const char *fileName) 
+	{
+		return _unlink(fileName) == 0;
+	}
+
+#else
+
+    //////////////////////////////////////////////////////////////////////////////
+    // Unix file access
+	template <typename TSpec>
+	class File<Sync<TSpec> >
+    {
+    public:
+
+		typedef off_t			FilePtr;
+		typedef off_t           SizeType;   // type of file size
+        typedef size_t          SizeType_;  // type of transfer size (for read or write)
+		typedef int				Handle;
+
+        Handle handle;
+
+        File(void * /*dummy*/ = NULL): // to be compatible with the FILE*(NULL) constructor
+            handle(-1) {}
+
+        virtual ~File() {}
+        
+        inline int _getOFlag(int openMode) const {
+			int result = O_LARGEFILE;
+
+			switch (openMode & OPEN_MASK) {
+                case OPEN_RDONLY:
+                    result |= O_RDONLY;
+					break;
+                case OPEN_WRONLY:
+                    result |= O_WRONLY;
+					if (!(openMode & OPEN_APPEND))	result |= O_TRUNC;
+					break;
+                case OPEN_RDWR:
+                    result |= O_RDWR;
+					if (!(openMode & OPEN_APPEND))	result |= O_TRUNC;
+					break;
+			}
+
+			if (openMode & OPEN_CREATE)     result |= O_CREAT;
+//			if (openMode & OPEN_TEMPORARY)  result |= O_TEMPORARY;
+        #ifdef SEQAN_DIRECTIO
+    		if (openMode & OPEN_ASYNC)		result |= O_DIRECT;
+        #endif
+			return result;
+        }
+
+        virtual bool open(char const *fileName, int openMode = DefaultOpenMode<File>::VALUE) {
+            handle = ::open(fileName, _getOFlag(openMode), S_IREAD | S_IWRITE);
+			if (handle == -1 && errno == EINVAL) {	// fall back to cached access
+	            #ifdef SEQAN_DEBUG_OR_TEST_
+					if (!(openMode & OPEN_QUIET))
+						::std::cerr << "Warning: Direct access openening failed: " << fileName << "." << ::std::endl;
+				#endif			
+          	    handle = ::open(fileName, _getOFlag(openMode & ~OPEN_ASYNC), S_IREAD | S_IWRITE);
+			}
+			
+			if (handle == -1) {
+				if (!(openMode & OPEN_QUIET))
+					::std::cerr << "Open failed on file " << fileName << ". (" << ::strerror(errno) << ")" << ::std::endl;
+				return false;
+			}
+
+			if (sizeof(FilePtr) < 8 && !(openMode & OPEN_QUIET))
+				// To remove this warning, you have to options:
+				// 1. include the following line before including anything in your application
+				//    #define _FILE_OFFSET_BITS 64
+				// 2. include <seqan/platform.h> or <seqan/sequence.h> before any other include
+				::std::cerr << "WARNING: FilePtr is not 64bit wide" << ::std::endl;
+
+			SEQAN_PROADD(SEQAN_PROOPENFILES, 1);
+            return true;
+        }
+
+        bool openTemp(int openMode = DefaultOpenTempMode<File>::VALUE) {
+            // Construct the pattern for the temporary file.
+            //
+            // First, try to get the temporary directory from the environment
+            // variables TMPDIR, TMP.
+            CharString tmpDir;
+            if ((getuid() == geteuid()) && (getgid() == getegid())) 
+			{
+                char * res;
+                if ((res = getenv("TMPDIR")) != NULL)
+                    tmpDir = res;
+                else
+                    if ((res = getenv("TMP")) != NULL)
+                        tmpDir = res;
+            }
+            // If this does not work, try to use the constant
+            // SEQAN_DEFAULT_TMPDIR, fall back to "/tmp", if this does not
+            // work.
+#ifdef SEQAN_DEFAULT_TMPDIR
+            if (empty(tmpDir))
+                tmpDir = SEQAN_DEFAULT_TMPDIR;
+#else  // #ifdef SEQAN_DEFAULT_TMPDIR
+            if (empty(tmpDir))
+                tmpDir = "/tmp";
+#endif  // #ifdef SEQAN_DEFAULT_TMPDIR
+
+            // At this point, we have a temporary directory.  Now, we add the
+            // file name template to get the full path template.
+            append(tmpDir, "/SQNXXXXXX");
+            // Open temporary file and unlink it immediately afterwards so the
+            // memory is released when the program exits.
+            int oldMode = umask(077);  // Create with restrictive permissions.
+			if ((handle = ::mkstemp(toCString(tmpDir))) == -1) {
+			    umask(oldMode);  // Reset umask mode.
+				if (!(openMode & OPEN_QUIET))
+					::std::cerr << "Couldn't create temporary file " << tmpDir << ". (" << ::strerror(errno) << ")" << ::std::endl;
+				return false;
+			}
+			if (!(close() && open(toCString(tmpDir), openMode))) 
+			{
+				umask(oldMode);  // Reset umask mode.
+			    return false;
+            }
+			umask(oldMode);  // Reset umask mode.
+            #ifdef SEQAN_DEBUG
+				if (::unlink(toCString(tmpDir)) == -1 && !(openMode & OPEN_QUIET))
+					::std::cerr << "Couldn't unlink temporary file " << tmpDir << ". (" << ::strerror(errno) << ")" << ::std::endl;
+            #else
+				::unlink(toCString(tmpDir));
+			#endif
+			return true;
+        }
+
+
+        virtual bool close() {
+            if (::close(this->handle) == -1) return false;
+            handle = -1;
+			SEQAN_PROSUB(SEQAN_PROOPENFILES, 1);
+            return true;
+        }
+
+		inline ssize_t read(void *buffer, SizeType_ count) const {
+            SEQAN_PROADD(SEQAN_PROIO, (count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+            SEQAN_PROTIMESTART(tw);
+		    ssize_t result = ::read(handle, buffer, count);
+            SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+            return result;
+		}
+
+		inline ssize_t write(void const *buffer, SizeType_ count) const {
+            SEQAN_PROADD(SEQAN_PROIO, (count + SEQAN_PROPAGESIZE - 1) / SEQAN_PROPAGESIZE);
+            SEQAN_PROTIMESTART(tw);
+		    ssize_t result = ::write(handle, buffer, count);
+            SEQAN_PROADD(SEQAN_PROCWAIT, SEQAN_PROTIMEDIFF(tw));
+            return result;
+		}
+
+		inline FilePtr seek(FilePtr pos, int origin = SEEK_SET) const {
+            FilePtr result = ::lseek(handle, pos, origin);
+//			#ifdef SEQAN_DEBUG
+				if (result < 0)
+					::std::cerr << "lseek returned " << result << ". (" << ::strerror(errno) << ")" << ::std::endl;
+//			#endif
+			return result;
+		}
+
+		inline FilePtr tell() const {
+            return seek(0, SEEK_CUR);
+        }
+
+		inline bool resize(SizeType new_length) const {
+			return ftruncate(handle, new_length) == 0;
+		}
+
+		static int error() {
+            return errno;
+		}
+
+        operator bool () const {
+            return handle != -1;
+        }
+    };
+
+	inline bool fileExists(const char *fileName)
+	{
+		struct stat buf;
+		return stat(fileName, &buf) != -1;
+	}
+
+	inline bool fileUnlink(const char *fileName)
+	{
+		return unlink(fileName) == 0;
+	}
+
+    template < typename TSpec, typename TSize >
+    inline void resize(File<Sync<TSpec> > &me, TSize new_length)
+	{
+		me.resize(new_length);
+    }
+
+#endif
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global functions
+
+	template <typename TSpec>
+    struct Size< File<Sync<TSpec> > >
+    {
+        typedef typename File<Sync<TSpec> >::SizeType Type;
+    };
+
+	template <typename TSpec>
+    struct Position< File<Sync<TSpec> > >
+    {
+        typedef typename File<Sync<TSpec> >::FilePtr Type;
+    };
+
+	template <typename TSpec>
+    struct Difference< File<Sync<TSpec> > >
+    {
+        typedef typename File<Sync<TSpec> >::FilePtr Type;
+    };
+
+    template < typename TSpec, typename TValue, typename TSize >
+    inline bool read(File<Sync<TSpec> > & me, TValue *memPtr, TSize const count) {
+		return (int) me.read(memPtr, count * sizeof(TValue)) == (int) (count * sizeof(TValue));
+    }
+    
+    template < typename TSpec, typename TValue, typename TSize >
+    inline bool write(File<Sync<TSpec> > & me, TValue const *memPtr, TSize const count) {
+		return (int) me.write(memPtr, count * sizeof(TValue)) == (int) (count * sizeof(TValue));
+    }
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/system/system_base.h b/src/SeqAn-1.3/seqan/system/system_base.h
new file mode 100644
index 0000000..2999400
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/system_base.h
@@ -0,0 +1,65 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SYSTEM_BASE_H
+#define SEQAN_HEADER_SYSTEM_BASE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+#if SEQAN_ENABLE_DEBUG  // Note the new-style for macros, is always defined and 0/1
+
+#define SEQAN_DO_SYS(_cond) SEQAN_ASSERT_TRUE(_cond)
+#define SEQAN_DO_SYS1(_cond) SEQAN_DO_SYS(_cond)
+#define SEQAN_DO_SYS2(_cond, _comment) SEQAN_ASSERT_TRUE_MSG(_cond, _comment)
+
+#else  // #ifdef SEQAN_ENABLE_DEBUG
+
+#ifdef PLATFORM_GCC
+// GCC warns below that the "value computed is not used".  However,
+// MSVC does not like casting void values to void. Thus, this
+// distinction.
+#define SEQAN_DO_SYS(_cond) do { (void) _cond; } while (false)
+#else   // #ifdef PLATFORM_GCC
+#define SEQAN_DO_SYS(_cond) do { _cond; } while (false)
+#endif  // #ifdef PLATFORM_GCC
+
+#define SEQAN_DO_SYS1(_cond) SEQAN_DO_SYS(_cond)
+#define SEQAN_DO_SYS2(_cond, _comment) SEQAN_DO_SYS(_cond)
+
+#endif  // #ifdef SEQAN_ENABLE_DEBUG
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/system/system_event.h b/src/SeqAn-1.3/seqan/system/system_event.h
new file mode 100644
index 0000000..b243275
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/system_event.h
@@ -0,0 +1,315 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_SYSTEM_EVENT_H
+#define SEQAN_HEADER_SYSTEM_EVENT_H
+
+//#include <iterator>
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+#ifdef PLATFORM_WINDOWS
+
+    static SECURITY_ATTRIBUTES EventDefaultAttributes = {
+        sizeof(SECURITY_ATTRIBUTES),
+        NULL,
+        true
+    };
+
+    struct Event    // this class mustn't exceed the size of HANDLE (needed by waitForAll/Any)
+    {
+        typedef HANDLE Handle;
+		enum { Infinite = INFINITE };
+        Handle hEvent;
+
+        Event():
+            hEvent(NULL) {}
+
+        Event(BOOL initial) {
+            SEQAN_DO_SYS2(open(initial), "Could not create Event");
+        }
+
+        ~Event() {
+            if (*this) SEQAN_DO_SYS2(close(), "Could not destroy Event");
+        }
+
+        Event(Event const &origin) {
+            // resource sharing is not yet supported (performance reason)
+            // it needs a reference counting technique
+            if (origin) {
+                hEvent = origin.hEvent;
+                const_cast<Event&>(origin).hEvent = NULL;
+            } else
+                hEvent = NULL;
+        }
+
+        inline Event& operator=(Event const &origin) {
+            // resource sharing is not yet supported (performance reason)
+            // it needs a reference counting technique
+            if (origin) {
+                hEvent = origin.hEvent;
+                const_cast<Event&>(origin).hEvent = NULL;
+            } else
+                hEvent = NULL;
+            return *this;
+        }
+
+        inline bool open(BOOL initial = FALSE) {
+            return (hEvent = CreateEvent(&EventDefaultAttributes, TRUE, initial, NULL)) != NULL;
+        }
+
+        inline bool close() {
+            bool success = CloseHandle(hEvent);
+			hEvent = NULL;
+			return success;
+        }
+
+        inline bool wait(DWORD timeout_millis = Infinite) {
+            if (!hEvent) return true;
+            return WaitForSingleObject(hEvent, timeout_millis) != WAIT_TIMEOUT;
+        }
+
+        inline bool signal() {
+            return SetEvent(hEvent) != 0;
+        }
+
+        inline bool reset() {
+            return ResetEvent(hEvent) != 0;
+        }
+
+        inline operator bool() const {
+            return hEvent != NULL;
+        }
+    };
+
+
+    //////////////////////////////////////////////////////////////////////////////
+    // global event functions
+	
+	inline void reset(Event &e) {
+		e.reset();
+	}
+
+    inline bool waitForAll(Event eventList[], DWORD count, DWORD timeout_millis)
+	{
+		return WaitForMultipleObjects(count, &eventList[0].hEvent, true, timeout_millis) != WAIT_TIMEOUT;
+	}
+    
+    inline bool waitForAll(Event eventList[], DWORD count)
+	{
+		return waitForAll(eventList, count, Event::Infinite);
+	}
+    
+	inline int waitForAny(Event eventList[], DWORD count, DWORD timeout_millis)
+	{
+        DWORD result = WaitForMultipleObjects(count, &eventList[0].hEvent, false, timeout_millis);
+
+        if (/*result >= WAIT_OBJECT_0 && */result < WAIT_OBJECT_0 + count)
+    		return result - WAIT_OBJECT_0;
+
+        return -1;
+	}
+    
+	inline int waitForAny(Event eventList[], DWORD count)
+	{
+		return waitForAny(eventList, count, Event::Infinite);
+	}
+    
+#else
+
+    struct Event: public Mutex
+    {
+        typedef pthread_cond_t* Handle;
+		enum { Infinite = LONG_MAX };
+        pthread_cond_t data, *hEvent;
+
+        Event():
+            hEvent(NULL) {}
+
+        Event(bool initial) {
+            SEQAN_DO_SYS(open(initial));
+        }
+
+        ~Event() {
+            if (*this)
+                SEQAN_DO_SYS(close());
+        }
+
+		Event(Event const &origin):
+			Mutex()
+		{
+            // resource sharing is not yet supported (performance reason)
+            // it needs a reference counting technique
+            if (origin) {
+                data = origin.data;
+                const_cast<Event&>(origin).hEvent = NULL;
+                hEvent = &data;
+            } else
+                hEvent = NULL;
+        }
+
+        inline Event& operator=(Event const &origin) {
+            // resource sharing is not yet supported (performance reason)
+            // it needs a reference counting technique
+            if (origin) {
+                data = origin.data;
+                const_cast<Event&>(origin).hEvent = NULL;
+                hEvent = &data;
+            } else
+                hEvent = NULL;
+            return *this;
+        }
+
+        inline bool open(bool initial = false)
+        {
+            if (Mutex::open() && !pthread_cond_init(&data, NULL) && (hEvent = &data)) {
+                if (initial) return signal();
+                return true;
+            } else
+                return false;
+        }
+
+        inline bool close() {
+            bool success = (pthread_cond_destroy(hEvent) == 0);
+		    success &= Mutex::close();
+            hEvent = NULL;
+            return success;
+		}
+
+        inline bool wait() {
+            if (!hEvent) return true;
+            Mutex::lock();
+            return !pthread_cond_wait(hEvent, Mutex::hMutex);
+        }
+
+        inline bool wait(long timeout_millis) {
+            if (timeout_millis != Infinite) {
+                timespec ts;
+                ts.tv_sec = timeout_millis / 1000;
+                ts.tv_nsec = (timeout_millis % 1000) * 1000;
+                Mutex::lock();
+				return pthread_cond_timedwait(hEvent, Mutex::hMutex, &ts) != ETIMEDOUT;
+            } else
+                return wait();
+        }
+
+        inline bool signal() {
+            return !pthread_cond_broadcast(hEvent);
+        }
+
+        inline operator bool() const {
+            return hEvent != NULL;
+        }
+    };
+    
+#endif
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// global event functions
+
+	inline bool open(Event &e, bool initial) {
+		return e.open(initial);
+	}
+
+	inline bool open(Event &e) {
+		return open(e, false);
+	}
+
+	inline bool close(Event &e) {
+		return e.close();
+	}
+
+	inline bool waitFor(Event &e) {
+		return e.wait();
+	}
+
+    template < typename TTime >
+	inline bool waitFor(Event &e, TTime timeout_millis) {
+        #ifdef disabledSEQAN_PROFILE
+			double begin = sysTime();
+			bool b = e.wait(timeout_millis);
+			double end = sysTime();
+            if (begin != end)
+                ::std::cerr << "waitTime: " << end - begin << ::std::endl;
+			return b;
+        #else
+            return e.wait(timeout_millis);
+        #endif
+	}
+
+	inline bool signal(Event &e) {
+		return e.signal();
+	}
+
+/*
+	//////////////////////////////////////////////////////////////////////////////
+	// emulate events in a singlethreaded environment
+
+	struct DummyEvent {
+		typedef	void Handle;
+		DummyEvent(bool initial = false) {}
+		inline bool wait(unsigned timeOut = NULL) { return true; }
+		inline void reset() {}
+		inline void signal() {}
+	};
+
+	//////////////////////////////////////////////////////////////////////////////
+	// global dummy event functions
+
+	template < typename TCount >
+	inline bool waitForAll(DummyEvent eventList[], TCount count) {
+		return true;
+	}
+
+	template < typename TCount, typename TTime >
+	inline bool waitForAll(DummyEvent eventList[], TCount count, TTime timeout_millis) {
+		return true;
+	}
+
+	template < typename TCount >
+	inline TCount waitForAny(DummyEvent eventList[], TCount count) {
+		return 0;
+	}
+	template < typename TCount, typename TTime >
+	inline TCount waitForAny(DummyEvent eventList[], TCount count, TTime timeout_millis) {
+		return 0;
+	}
+*/
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/system/system_generated_forwards.h b/src/SeqAn-1.3/seqan/system/system_generated_forwards.h
new file mode 100644
index 0000000..1931093
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/system_generated_forwards.h
@@ -0,0 +1,55 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+
+
+#ifndef SEQAN_HEADER_SYSTEM_GENERATED_FORWARDS_H 
+#define SEQAN_HEADER_SYSTEM_GENERATED_FORWARDS_H 
+
+//////////////////////////////////////////////////////////////////////////////
+// NOTE: This file is automatically generated by build_forwards.py
+//       Do not edit this file manually!
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+
+
+//////////////////////////////////////////////////////////////////////////////
+// TYPEDEFS
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/system/system_manual_forwards.h b/src/SeqAn-1.3/seqan/system/system_manual_forwards.h
new file mode 100644
index 0000000..1ae5d71
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/system_manual_forwards.h
@@ -0,0 +1,124 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+#ifndef SEQAN_HEADER_SYSTEM_MANUAL_FORWARDS_H 
+#define SEQAN_HEADER_SYSTEM_MANUAL_FORWARDS_H 
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+//////////////////////////////////////////////////////////////////////////////
+// CLASSES
+//////////////////////////////////////////////////////////////////////////////
+
+namespace SEQAN_NAMESPACE_MAIN {
+
+//____________________________________________________________________________
+// Event
+
+struct Event;       	// "projects/library/seqan/system/system_event.h"(18)
+
+//____________________________________________________________________________
+// Mutex
+
+struct Mutex;       	// "projects/library/seqan/system/system_mutex.h"(16)
+
+//____________________________________________________________________________
+// Semaphore
+
+struct Semaphore;       	// "projects/library/seqan/system/system_sema.h"(16)
+
+//____________________________________________________________________________
+// Thread
+
+template <typename Worker> struct Thread;       	// "projects/library/seqan/system/system_thread.h"(18)
+
+
+//////////////////////////////////////////////////////////////////////////////
+// FUNCTIONS
+//////////////////////////////////////////////////////////////////////////////
+
+
+//____________________________________________________________________________
+// close
+
+inline bool close(Event &e);       	// "projects/library/seqan/system/system_event.h"(109)
+inline bool close(Mutex &m);       	// "projects/library/seqan/system/system_mutex.h"(79)
+template <typename TWorker> inline bool close(Thread<TWorker> &m);       	// "projects/library/seqan/system/system_thread.h"(97)
+
+//____________________________________________________________________________
+// kill
+
+template <typename TWorker> inline bool kill(Thread<TWorker> &m);       	// "projects/library/seqan/system/system_thread.h"(102)
+
+//____________________________________________________________________________
+// lock
+
+inline bool lock(Mutex &m);       	// "projects/library/seqan/system/system_mutex.h"(83)
+
+//____________________________________________________________________________
+// open
+
+inline bool open(Event &e, bool initial);       	// "projects/library/seqan/system/system_event.h"(101)
+inline bool open(Event &e);       	// "projects/library/seqan/system/system_event.h"(105)
+inline bool open(Mutex &m, bool initial);       	// "projects/library/seqan/system/system_mutex.h"(71)
+inline bool open(Mutex &m);       	// "projects/library/seqan/system/system_mutex.h"(75)
+template <typename TWorker> inline bool open(Thread<TWorker> &m);       	// "projects/library/seqan/system/system_thread.h"(87)
+
+//____________________________________________________________________________
+// run
+
+template <typename TWorker> inline bool run(Thread<TWorker> &m);       	// "projects/library/seqan/system/system_thread.h"(92)
+
+//____________________________________________________________________________
+// signal
+
+inline bool signal(Event &e);       	// "projects/library/seqan/system/system_event.h"(131)
+
+//____________________________________________________________________________
+// unlock
+
+inline bool unlock(Mutex &m);       	// "projects/library/seqan/system/system_mutex.h"(87)
+
+//____________________________________________________________________________
+// waitFor
+
+inline bool waitFor(Event &e);       	// "projects/library/seqan/system/system_event.h"(113)
+template <typename TTime > inline bool waitFor(Event &e, TTime timeout_millis);       	// "projects/library/seqan/system/system_event.h"(118)
+template <typename TWorker> inline bool waitFor(Thread<TWorker> &m);       	// "projects/library/seqan/system/system_thread.h"(107)
+
+} //namespace SEQAN_NAMESPACE_MAIN
+
+
+#endif
+
diff --git a/src/SeqAn-1.3/seqan/system/system_mutex.h b/src/SeqAn-1.3/seqan/system/system_mutex.h
new file mode 100644
index 0000000..9091098
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/system_mutex.h
@@ -0,0 +1,183 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_SYSTEM_MUTEX_H
+#define SEQAN_HEADER_SYSTEM_MUTEX_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+#ifdef PLATFORM_WINDOWS
+
+    static SECURITY_ATTRIBUTES MutexDefaultAttributes = {
+        sizeof(SECURITY_ATTRIBUTES),
+        NULL,
+        true
+    };
+
+    struct Mutex
+    {
+        typedef HANDLE Handle;
+
+        Handle hMutex;
+
+        Mutex():
+            hMutex(NULL) {}
+
+        Mutex(BOOL initial) {
+            SEQAN_DO_SYS2(open(initial), "Could not create Mutex");
+        }
+
+        ~Mutex() {
+            if (*this)
+                SEQAN_DO_SYS2(close(), "Could not destroy Mutex");
+        }
+
+        inline bool open(BOOL initial = false) {
+            return (hMutex = CreateMutex(&MutexDefaultAttributes, initial, NULL)) != NULL;
+        }
+
+        inline bool close() {
+            bool success = CloseHandle(hMutex);
+			hMutex = NULL;
+			return success;
+        }
+
+        inline bool lock(DWORD timeout_millis = INFINITE) {
+            return WaitForSingleObject(hMutex, timeout_millis) != WAIT_TIMEOUT;
+        }
+
+        inline bool unlock() {
+            return ReleaseMutex(hMutex) != 0;
+        }
+
+        inline operator bool() const {
+            return hMutex != NULL;
+        }
+
+    private:
+
+        Mutex(Mutex const &) {
+            // resource copying is not yet supported (performance reason)
+            // it needs a reference counting technique
+        }
+    };
+    
+#else
+
+    struct Mutex
+    {
+        typedef pthread_mutex_t* Handle;
+        
+        pthread_mutex_t data, *hMutex;
+
+        Mutex():
+            hMutex(NULL) {}
+
+        Mutex(bool initial) {
+            SEQAN_DO_SYS(open(initial));
+        }
+
+        ~Mutex() {
+            if (*this)
+                SEQAN_DO_SYS(close());
+        }
+
+        inline bool open(bool initial = false)
+        {
+            if (!pthread_mutex_init(&data, NULL) && (hMutex = &data)) {
+                if (initial) return lock();
+                return true;
+            } else
+                return false;
+        }
+
+        inline bool close() {
+			bool success = (pthread_mutex_destroy(hMutex) == 0);
+			hMutex = NULL;
+			return success;
+        }
+
+        inline bool lock() {
+            return !pthread_mutex_lock(hMutex);
+        }
+
+        inline bool unlock() {
+            return !pthread_mutex_unlock(hMutex);
+        }
+
+        inline operator bool() const {
+            return hMutex != NULL;
+        }
+
+    private:
+
+        Mutex(Mutex const &) {
+            // resource copying is not yet supported (performance reason)
+            // it needs a reference counting technique
+        }
+
+    };
+    
+#endif
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// global mutex functions
+
+	inline bool open(Mutex &m, bool initial) {
+		return m.open(initial);
+	}
+
+	inline bool open(Mutex &m) {
+		return open(m, false);
+	}
+
+	inline bool close(Mutex &m) {
+		return m.close();
+	}
+
+	inline bool lock(Mutex &m) {
+		return m.lock();
+	}
+
+	inline bool unlock(Mutex &m) {
+		return m.unlock();
+	}
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/system/system_sema.h b/src/SeqAn-1.3/seqan/system/system_sema.h
new file mode 100644
index 0000000..bff3280
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/system_sema.h
@@ -0,0 +1,149 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_SYSTEM_SEMAPHORE_H
+#define SEQAN_HEADER_SYSTEM_SEMAPHORE_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+#ifdef PLATFORM_WINDOWS
+
+    static SECURITY_ATTRIBUTES SemaphoreDefaultAttributes = {
+        sizeof(SECURITY_ATTRIBUTES),
+        NULL,
+        true
+    };
+
+    struct Semaphore
+    {
+        typedef LONG Type;
+        typedef HANDLE Handle;
+        enum { MAX_VALUE = MAXLONG };
+        
+        Handle hSemaphore;
+
+        Semaphore(Type init = 0, Type max = MAX_VALUE) {
+			// Disable warnings on side-effect free operator!= in Release mode.
+#ifdef PLATFORM_WINDOWS_VS
+#pragma warning( push )
+#pragma warning( disable : 4552 )
+#endif  // #ifdef PLATFORM_WINDOWS_VS
+            SEQAN_DO_SYS2((hSemaphore = CreateSemaphore(&SemaphoreDefaultAttributes, init, max, NULL)) != NULL, "Could not create Semaphore");
+#ifdef PLATFORM_WINDOWS_VS
+#pragma warning( pop )
+#endif  // #ifdef PLATFORM_WINDOWS_VS
+		}
+
+        ~Semaphore() {
+			// Disable warnings on side-effect free operator!= in Release mode.
+#ifdef PLATFORM_WINDOWS_VS
+#pragma warning( push )
+#pragma warning( disable : 4552 )
+#endif  // #ifdef PLATFORM_WINDOWS_VS
+            SEQAN_DO_SYS2(CloseHandle(hSemaphore) != 0, "Could not destroy Semaphore");
+#ifdef PLATFORM_WINDOWS_VS
+#pragma warning( pop )
+#endif  // #ifdef PLATFORM_WINDOWS_VS
+        }
+
+        bool lock(DWORD timeout_millis = INFINITE) {
+            return WaitForSingleObject(hSemaphore, timeout_millis) != WAIT_TIMEOUT;
+        }
+
+        void unlock() {
+			// Disable warnings on side-effect free operator!= in Release mode.
+#ifdef PLATFORM_WINDOWS_VS
+#pragma warning( push )
+#pragma warning( disable : 4552 )
+#endif  // #ifdef PLATFORM_WINDOWS_VS
+            SEQAN_DO_SYS2(ReleaseSemaphore(hSemaphore, 1, NULL) != 0, "Could not unlock Semaphore");
+#ifdef PLATFORM_WINDOWS_VS
+#pragma warning( pop )
+#endif  // #ifdef PLATFORM_WINDOWS_VS
+        }
+
+    private:
+
+        Semaphore(Semaphore const &) {
+            // resource copying is not yet supported (performance reason)
+            // it needs a reference counting technique
+        }
+
+    };
+
+#else
+
+    struct Semaphore
+    {
+        typedef unsigned int Type;
+        typedef sem_t* Handle;
+        
+        sem_t data, *hSemaphore;
+
+        Semaphore(Type init = 0):
+            hSemaphore(&data)
+        {
+            SEQAN_DO_SYS(!sem_init(hSemaphore, 0, init));
+        }
+
+        ~Semaphore() {
+            SEQAN_DO_SYS(!sem_destroy(hSemaphore));
+        }
+
+        void lock() {
+            SEQAN_DO_SYS(!sem_wait(hSemaphore));
+        }
+
+        void unlock() {
+            SEQAN_DO_SYS(!sem_post(hSemaphore));
+        }
+
+    private:
+
+        Semaphore(Semaphore const &) {
+            // resource copying is not yet supported (performance reason)
+            // it needs a reference counting technique
+        }
+
+    };
+
+
+#endif
+
+}
+
+#endif
diff --git a/src/SeqAn-1.3/seqan/system/system_thread.h b/src/SeqAn-1.3/seqan/system/system_thread.h
new file mode 100644
index 0000000..b79e52b
--- /dev/null
+++ b/src/SeqAn-1.3/seqan/system/system_thread.h
@@ -0,0 +1,215 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+// ==========================================================================
+
+//SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
+
+#ifndef SEQAN_HEADER_SYSTEM_THREAD_H
+#define SEQAN_HEADER_SYSTEM_THREAD_H
+
+namespace SEQAN_NAMESPACE_MAIN
+{
+
+#ifdef PLATFORM_WINDOWS
+
+    static SECURITY_ATTRIBUTES ThreadDefaultAttributes = {
+        sizeof(SECURITY_ATTRIBUTES),
+        NULL,
+        true
+    };
+
+    template <typename Worker>
+    struct Thread
+    {
+        typedef HANDLE Handle;
+
+        Handle hThread;
+        DWORD  hThreadID;
+        Worker worker;
+
+        Thread() {}
+
+        template <typename TArg>
+        Thread(TArg &arg):
+            worker(arg) {}
+
+        ~Thread() {
+            if (*this) {
+                cancel();
+                wait();
+            }
+        }
+
+        inline bool open(BOOL initital = false) {
+            return hThread = CreateThread(
+                &ThreadDefaultAttributes,    // default security attributes 
+                0,                           // use default stack size  
+                &_start,                     // thread function 
+                this,                        // argument to thread function 
+                0,                           // use default creation flags 
+                &hThreadID);                 // returns the thread identifier 
+        }
+
+        inline bool close() {
+            if (CloseHandle(hThread)) return true;
+			hThread = NULL;
+			return false;
+        }
+
+        inline bool cancel(DWORD exitCode = 0) {
+            return !TerminateThread(hThread, exitCode);
+        }
+
+        inline bool wait(DWORD timeout_millis = INFINITE) {
+            return WaitForSingleObject(hThread, timeout_millis) != WAIT_TIMEOUT;
+        }
+
+        inline operator bool() const {
+            return hThread != NULL;
+        }
+
+    private:
+
+        Thread(Thread const &) {
+            // resource copying is not yet supported (performance reason)
+            // it needs a reference counting technique
+        }
+
+        static DWORD WINAPI _start(LPVOID _this) {
+            reinterpret_cast<Thread*>(_this)->worker.run(&reinterpret_cast<Thread*>(_this));
+			return 0;	// return value should indicate success/failure
+        }
+    };
+    
+#else
+
+    template <typename Worker>
+    struct Thread
+    {
+        typedef pthread_t* Handle;
+
+        pthread_t data, *hThread;
+        Worker worker;
+
+        Thread() {}
+
+        template <typename TArg>
+        Thread(TArg &arg):
+            worker(arg) {}
+
+        ~Thread() {
+            if (*this) {
+                cancel();
+                wait();
+            }
+        }
+
+        inline bool open()
+        {
+            if (!pthread_create(&data, NULL, _start, this) && (hThread = &data)) {
+                return true;
+            } else
+                return false;
+        }
+
+        inline bool close() {
+            return cancel() && wait() && !(hThread == NULL);
+        }
+
+        inline bool cancel() {
+            return !(pthread_cancel(data));
+        }
+
+        inline bool wait() {
+            return !(pthread_join(data, NULL));
+        }
+
+        inline bool wait(void* &retVal) {
+            return !(pthread_join(data, &retVal));
+        }
+
+        inline bool detach() {
+            return !(pthread_detach(data));
+        }
+
+        inline operator bool() const {
+            return hThread != NULL;
+        }
+
+    private:
+
+        Thread(Thread const &) {
+            // resource copying is not yet supported (performance reason)
+            // it needs a reference counting technique
+        }
+
+        static void* _start(void* _this) {
+            reinterpret_cast<Thread*>(_this)->worker.run(&reinterpret_cast<Thread*>(_this));
+			return 0;
+        }
+    };
+    
+#endif
+
+
+	//////////////////////////////////////////////////////////////////////////////
+	// global thread functions
+
+	template <typename TWorker>
+	inline bool open(Thread<TWorker> &m) {
+		return m.open();
+	}
+
+	template <typename TWorker>
+	inline bool run(Thread<TWorker> &m) {
+		return m.open();
+	}
+
+	template <typename TWorker>
+	inline bool close(Thread<TWorker> &m) {
+		return m.close();
+	}
+
+	template <typename TWorker>
+	inline bool kill(Thread<TWorker> &m) {
+		return m.close();
+	}
+
+	template <typename TWorker>
+	inline bool waitFor(Thread<TWorker> &m) {
+		return m.wait();
+	}
+
+}
+
+#endif

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/tophat.git



More information about the debian-med-commit mailing list